linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] btrfs-progs: introduce kernelsrc directory to update it
@ 2013-02-12  8:37 Filipe Brandenburger
  2013-02-12  8:37 ` [PATCH 1/2] btrfs-progs: anchor gitignore patterns on the root of the tree Filipe Brandenburger
  2013-02-12  8:37 ` [PATCH 2/2] btrfs-progs: introduce kernelsrc directory and script to update it Filipe Brandenburger
  0 siblings, 2 replies; 3+ messages in thread
From: Filipe Brandenburger @ 2013-02-12  8:37 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Filipe Brandenburger

Hello,

This is a proposal on a way to keep btrfs-progs in sync with kernel code.
https://btrfs.wiki.kernel.org/index.php/Cleanup_ideas#Use_the_kernel_code_in_user_mode

For now, the patch introduces a method to import and update the kernel source
files into the btrfs-progs tree. Further work will be needed to update the
kernel source code so to make it generic (i.e. add #define's and #ifdef's) so
that it can be compiled in both kernel and user space.

The Python script is just a draft, it's already functional but error handling
(and reporting) could definitely be improved, the code could be cleaned up, it
could cache the kernel source directory and allow a --force parameter to allow
moving to an tag that's not a descendant, but it's already fully functional and
it's probably a good start...

To see it in action, try this after applying the commits:

  $ kernelsrc/update_kernelsrc.py /path/to/linux v3.6
  $ git status
  $ git commit -m "btrfs-progs: initial checkout of kernelsrc v3.6"
  $ vim kernelsrc/update_kernelsrc.filelist (add/delete a line)
  $ kernelsrc/update_kernelsrc.py ../linux-btrfs/ v3.7
  $ git status
  $ git commit -m "btrfs-progs: upgrade kernelsrc from v3.6 to v3.7"

Let me know what you think and if you think it's worth to continue on this path.

Cheers,
Filipe


Filipe Brandenburger (2):
  btrfs-progs: anchor gitignore patterns on root
  btrfs-progs: introduce kernelsrc directory and script to update it

 .gitignore                          |  32 +++++---
 kernelsrc/README.kernelsrc          | 108 ++++++++++++++++++++++++
 kernelsrc/update_kernelsrc.filelist |  23 ++++++
 kernelsrc/update_kernelsrc.py       | 158 ++++++++++++++++++++++++++++++++++++
 4 files changed, 308 insertions(+), 13 deletions(-)
 create mode 100644 kernelsrc/README.kernelsrc
 create mode 100644 kernelsrc/update_kernelsrc.filelist
 create mode 100755 kernelsrc/update_kernelsrc.py

-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-12  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12  8:37 [RFC][PATCH 0/2] btrfs-progs: introduce kernelsrc directory to update it Filipe Brandenburger
2013-02-12  8:37 ` [PATCH 1/2] btrfs-progs: anchor gitignore patterns on the root of the tree Filipe Brandenburger
2013-02-12  8:37 ` [PATCH 2/2] btrfs-progs: introduce kernelsrc directory and script to update it Filipe Brandenburger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).