public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] Linux Kernel Subversion Howto
@ 2005-02-09 18:46 Larry McVoy
  2005-02-09 20:13 ` Nicolas Pitre
  0 siblings, 1 reply; 111+ messages in thread
From: Larry McVoy @ 2005-02-09 18:46 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Roman Zippel, Jon Smirl, Theodo, tytso, Stelian Pop,
	Francois Romieu, lkml

On Wed, Feb 09, 2005 at 12:17:48PM -0500, Nicolas Pitre wrote:
> On Tue, 8 Feb 2005, Larry McVoy wrote:
> > You know, you could change all this.  Instead of complaining that we
> > are somehow hurting you, which virtually 100% of the readers know is
> > nonsense, you could be producing an alternative answer which is better.
> 
> IMHO something is flawed in this whole argument.  Why would someone be
> interested into any alternative answer for working on the Linux kernel
> tree if the whole thing can't be imported into it with the same
> granularity as can be found in BK?  IOW what's the point to alternatives
> if you can't retrieve the entire workset?

Please explain to me where the data is being lost.  100% of the patches
are available on bkbits.net with no license agreement required.  They
always have been.

The problem is that you want us to tell you how BK manages those patches.
That was never part of the agreement, in fact we made it clear in the
license that that information was considered to be IP and could not be
distributed.  How BK does that is our business, not yours.  If you want
to know how BK does it you must go figure it out without the benefit
of BK itself or metadata managed by BK.

While I understand that you don't like it, is there no sense of fairness
left?  We did the hard work to create BK.  Some of us worked for *years*
without pay to create this product.  Some of us put our life savings
into the product.  It's our IP, we paid heavily to create this, is it
so unreasonable of us to want to protect our work?  I believe we are
within our legal rights, or so our legal team tells us, but that should
be beside the point.  It's our work.  We paid for it.  We certainly
don't have any obligation to tell you how we did it and to us it seems
pretty unreasonable that you don't just go off and do the work yourself.
And pretty unadmirable as well, don't you have any faith in your own
abilities?
-- 
---
Larry McVoy                lm at bitmover.com           http://www.bitkeeper.com

^ permalink raw reply	[flat|nested] 111+ messages in thread
[parent not found: <fa.hd724f5.h36q2j@ifi.uio.no>]
* Re: [RFC] Linux Kernel Subversion Howto
@ 2005-02-11 18:56 none given
  2005-02-11 19:50 ` Larry McVoy
  0 siblings, 1 reply; 111+ messages in thread
From: none given @ 2005-02-11 18:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: lm

On Fri, February 11, 2005 11:18 am, Larry McVoy said:
>The mails have started flowing in saying "I don't agree with Alexandre
>and please don't pull the plug" so a point of clarification.  We have
>no intention of shutting down the BK free product.  We are aware that
>there are 10's of thousands of developers in the open source world
>who do not agree with Alexandre's narrow view of things.  You're fine,
>we're not taking BK away.  I only trying to get Alexandre to see that
>his definition of "help" is somewhat narrow-minded.
>

Then why don't you stop threatening to take it away every time someone 
points out to you that your "help" for free software isn't ideal?   Just 
can't help yourself?  Your cheap shot at Alexandre doesn't change the fact 
that you've shown yet again why people who believe in free software should 
work to replace BK.

Cheers,
Hank

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


^ permalink raw reply	[flat|nested] 111+ messages in thread
* Re: [RFC] Linux Kernel Subversion Howto
@ 2005-02-10 16:42 Steve Lee
  2005-02-10 19:23 ` Vojtech Pavlik
  0 siblings, 1 reply; 111+ messages in thread
From: Steve Lee @ 2005-02-10 16:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: zippel

Roman, besides BK being closed source, how exactly is it lacking for
your needs?  If what it lacks is a good idea and helps many, Larry and
crew might be willing to add whatever it is you need.



^ permalink raw reply	[flat|nested] 111+ messages in thread
* [RFC] Linux Kernel Subversion Howto
@ 2005-02-02 15:54 Stelian Pop
  2005-02-02 16:15 ` Lethalman
                   ` (4 more replies)
  0 siblings, 5 replies; 111+ messages in thread
From: Stelian Pop @ 2005-02-02 15:54 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

I've played lately a bit with Subversion and used it for managing
the kernel sources, using Larry McVoy's bk2cvs bridge and Ben Collins'
bkcvs2svn conversion script.

Since there is little information on the web on how to properly
set up a SVN repository and use it for tracking the latest kernel
tree, I wrote a small howto (modeled after the bk kernel howto)
in case it can be useful for other people too.

Feel free to comment on it (but let's not start a new BK flamewar
or SVN bashing session please). If there is enough interest I'll
submit a patch to include this in the kernel Documentation/ 
directory.

I've put it also on my web page along with the necessary scripts:
	http://popies.net/svn-kernel/

And now a question to Larry and whoever else is involved in the
bkcvs mirror on kernel.org: what is the periodicity of the CVS
repository update ? 

Stelian.

---------------------8<-----------------------8<----------------------
This document is intended mainly for kernel developers, occasional or full-time,
but sysadmins and power users may find parts of it useful as well.

This in *not* intended to replace the Subversion documentation.  Always run
'svn <command> --help' or browse the manual at http://svnbook.red-bean.com for
reference documentation.

But I thought the kernel used BitKeeper not Subversion ?
--------------------------------------------------------

Indeed, some kernel developers, including Linus, use BitKeeper to manage the
kernel sources. The Linus BitKeeper repository (hosted on
http://linux.bkbits.net) is the reference repository for the latest kernel code.

However, BitKeeper is not free software. It is provided either free of charge
under a restrictive license or under a classical commercial license. For more
details, read the BitKeeper license.

This document is intended for those who can't or don't want to use BitKeeper to
follow the kernel development, but still want to use a SCM tool to:
* keep up to date to Linus tree
* easily consult change logs
* do kernel related development and merge them with the latest Linus changes
* etc...

In this document, the SCM tool used is Subversion.

How does it work ?
------------------

Thanks to Larry McVoy of BitMover, the kernel metadata (change logs, authors
etc) are not only available in the BitKeeper tree, but are also made available
through a special BK to CVS bridge.

In the past, this bridge was accessible using a CVS pserver running on
cvs.kernel.org, but due to several reasons this was changed and the only way
to access the CVS repository today is by using rsync from:
	rsync://rsync.kernel.org/pub/scm/linux/kernel/bkcvs/

Ben Collins wrote a small tool which converts the kernel CVS repository into a
SVN repository. The same script can be used in an incremental fashion afterwards
to keep the two repositories synchronized.

How can I setup a SVN repository ?
----------------------------------

Get the CVS repository:

	rsync -avz --delete \
		rsync://rsync.kernel.org/pub/scm/linux/kernel/bkcvs/linux-2.5/ \
		/repos/kernel/linux-2.6-bkcvs

Create the SVN repository:

	svnadmin create /repos/kernel/linux-2.6-svn

Convert the CVS repository to SVN:

	bkcvs2svn -s \
		/repos/kernel/linux-2.6-svn \
		/repos/kernel/linux-2.6-bkcvs

The previous step will take a LONG time. On my AMD64 2000+ it took about 8 hours
to complete. But you'll have to pay this price only once, subsequent re-syncs
will be much quicker.

You also need about 500 MB of disk space for the CVS repository and 900 MB for
the SVN one (example for a kernel 2.6.11). In addition, each working copy of
this repository will take 650 MB.

How do I access this repository ?
---------------------------------

You can use the SVN repository just to track the Linus latest commits.

The SVN repository is not easily readable, you will want to get a 'working copy'
of it, by doing a 'svn checkout':

	svn checkout file://repos/kernel/linux-2.6-svn/trunk \
		/home/user/kernel/linux-2.6-linus

You will then have a full kernel source tree in 
'/home/user/kernel/linux-2.6-linus'.

In this document the repository and the working copy are on the same machine,
but this is not required. You can easily have the repository on a remote machine
and access it using directly SVN (svnserve) or SSH (svn+ssh). Please refer to
the SVN documentation for more details.

How can I update the repository to the latest version ?
-------------------------------------------------------

The repository can be updated on real-time to show Linus latest commits in his
BitKeeper tree.

The CVS tree exported by BitMover is updated each XXX hours and you can rerun
'bkcvs2svn' in an incremental fashion, to get only the new changes insert them
into the SVN repository.

You will then just redo the 'rsync' and 'bkcvs2svn' steps and you will obtain
a full updated SVN repository. (the script 'bk2svn' does just that, and you
can run it from 'cron' to periodically update your repository).

Back into your working copy, you can get the updated code by issuing a
'svn update'.

Where do I make my development ?
--------------------------------

The Linus repository gets converted to SVN using the main SVN branch (called
'trunk'). You cannot do your own modification directly on the 'trunk' because
Linus changes will overwrite your owns ('bkcvs2svn' does overwrite not merge
the modifications it imports into the repository).

So, if you are doing kernel related work, you will have to use a separate 
SVN branch. All your development will occur on this branch, you will regularly
merge the trunk into the branch (to adapt to the latest Linus tree).

Branch creation:

	svn mkdir file://repos/kernel/linux-2.6-svn/branches/
	svn copy file://repos/kernel/linux-2.6-svn/trunk \
		file://repos/kernel/linux-2.6-svn/branches/user
	... note the revision you copy, referenced later by <first> ...

Branch checkout:

	svn checkout file://repos/kernel/linux-2.6-svn/branches/user \
		/home/user/kernel/linux-2.6-user
	... hack in /home/user/kernel/linux-2.6-user ...

Merge the updated changes:

	cd /home/user/kernel/linux-2.6-linus
	svn update
	... note the revision here, referenced later by <last> ...
	cd /home/user/kernel/linux-2.6-user
	svn merge -r <first>:<last> file://repos/kernel/linux-2.6-svn/trunk
	... if there are conflicts, resolve them ...
	svn commit
	... give <first> the value of <last> ...

Note on merges: you will need to remember the revision numbers you used for a
merge because on subsequent merges you'll need to start from the last revision
merged (<first> in the example). A common way to do this is to record the
revision range in the SVN commit log.

Patch submission day. How do I do it ?
--------------------------------------

When submitting patches to Linus (or to some other kernel maintainer), you will
have to generate patches against the 'trunk'.

You can find all the differences between the trunk and your branch using:

	svn diff file://repos/kernel/linux-2.6-svn/trunk \
		file://repos/kernel/linux-2.6-svn/branches/user
		
A cleaner way to submit the differences (which enables you to properly split the
changes into small patches, document them etc), is to create a temporary branch
just for the submission:

	svn copy file://repos/kernel/linux-2.6-svn/trunk \
		file://repos/kernel/linux-2.6-svn/branches/to-linus

Then, find the differences between your branch and the temporary one:

	svn diff file://repos/kernel/linux-2.6-svn/branches/to-linus \
		file://repos/kernel/linux-2.6-svn/branches/user

And for each logical change, copy it by hand from the 'user' branch to the
'to-linus' branch, and commit the change.

Once you've finished, all you have to do is send each revision (beginning with
the creation of the branch) in the 'to-linus' branch as a separate patch (the
script 'svnsend' can help you presenting the patch is a clean format for
submission to lkml. You can also use 'svnsendall' which calls 'svnsend' for
each revision in a revision range).

The temporary branch can be removed when it is no longer needed via a simple:

	svn remove file://repos/kernel/linux-2.6-svn/branches/to-linus

How to I ignore temporary build files ?
---------------------------------------

It is useful to ignore temporary build kernel files so they are not shown in
'svn diff' etc. The lines below show how to do this on a SVN kernel tree:

	cd /tmp
	wget http://www.moses.uklinux.net/patches/dontdiff
	cd /home/user/kernel/linux-2.6-user
	svn propset svn:ignore -R -F /tmp/dontdiff .
	svn commit -m "Added svn:ignore properties." 

How do I generate 'proper' diffs ?
----------------------------------

Subversion by default does generate patches to be applied with 'patch -p0', 
which is not recommended for the kernel. The patch format also doesn't use '-p'
(tell the name of the function being modified) which is also recommended.

If you want to generate proper kernel patches, you will have to edit your
'$HOME/.subversion/config' file and put the following lines into it:

	[helpers]
	diff-cmd = /usr/local/bin/svn-diff

This will instruct SVN to call the 'svn-diff' wrapper (find it into this 
directory) whenever you call 'svn diff'.

What are the possible problems with using SVN for kernel development ?
----------------------------------------------------------------------

There are several possible problems you should be aware of when using
Subversion for kernel related development.

1. Unfortunately, the BK->CVS conversion is not perfect and the granularity
of changes is bigger than the original. The explanation is that BK branches and
consequent merges into the mainline are not reproduced on the CVS side, so all
changes done in a parallel trees will be shown as a single commit on the CVS
side. This is why you'll sometimes find a single SVN revision for many
BitKeeper changesets.

2. Subversion is based on a centralized, server based model, and this imposes
limitations on the operations you can do while being disconnected from the
server (no commits, no history accesses etc).

3. Subversion can be rather slow on some operations. This is due to the fact
that the kernel tree is rather large, and also to the fact that the operations
are done on the server rather than doing them on the client.

4. The SVN repository could need complete regeneration, and this would require
hand recreation of the development branches. The CVS repository is generated by
a tool written by Larry McVoy of BitMover, and it happened in the past (and
could happen again in the future) that bugs are discovered in this tool which
requires regenerating the whole CVS repository, and the revision numbers could
become incompatible with the old repository. This will require regenerating the
SVN repository as well, and all the branches contents will be lost. There is
unfortunately no simple way to moving the data you had in the old branches
to the new repository, you'll have to do it manually (using 'svnsendall' for
example).

5. Backuping the data is not simple. You cannot backup only the development
branches, you will have to backup the whole SVN repository (using 'svnadmin
dump' for example).


-- 
Stelian Pop <stelian@popies.net>

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

end of thread, other threads:[~2011-08-18 19:22 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09 18:46 [RFC] Linux Kernel Subversion Howto Larry McVoy
2005-02-09 20:13 ` Nicolas Pitre
2005-02-09 23:53   ` Larry McVoy
2005-02-10  0:14     ` Roman Zippel
2005-02-10  0:50       ` Larry McVoy
2005-02-10  9:52         ` Roman Zippel
2005-02-10 10:11           ` linux
2005-02-10  6:08       ` James Bruce
2005-02-10 15:14         ` Stelian Pop
     [not found] <fa.hd724f5.h36q2j@ifi.uio.no>
2011-08-18 19:08 ` lucasrangit
2011-08-18 19:22   ` Randy Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2005-02-11 18:56 none given
2005-02-11 19:50 ` Larry McVoy
2005-02-10 16:42 Steve Lee
2005-02-10 19:23 ` Vojtech Pavlik
2005-02-10 19:50   ` Dmitry Torokhov
2005-02-02 15:54 Stelian Pop
2005-02-02 16:15 ` Lethalman
2005-02-02 16:37   ` Lethalman
2005-02-03 10:34   ` Stelian Pop
2005-02-02 21:47 ` Daniele Venzano
2005-02-03 10:45   ` Stelian Pop
2005-02-04 20:04     ` Daniele Venzano
2005-02-04 20:52     ` Olaf Dietsche
2005-02-09  5:19       ` Kevin Puetz
2005-02-09  8:58         ` Miles Bader
2005-02-09 13:44           ` David Roundy
2005-02-03  0:29 ` H. Peter Anvin
2005-02-03 10:24   ` Stelian Pop
     [not found] ` <200502030028.j130SNU9004640@terminus.zytor.com>
2005-02-03  3:34   ` Larry McVoy
2005-02-03 16:45     ` H. Peter Anvin
2005-02-03 19:32     ` Stelian Pop
2005-02-03 20:20       ` Larry McVoy
2005-02-03 22:00         ` Stelian Pop
2005-02-03 22:28           ` Larry McVoy
2005-02-04 13:01             ` Stelian Pop
2005-02-04 16:06               ` Larry McVoy
2005-02-04 16:22                 ` Roland Dreier
2005-02-04 21:53                   ` Stelian Pop
2005-02-04 17:03                 ` Stelian Pop
2005-02-04 18:39                   ` Larry McVoy
2005-02-04 20:05                     ` Stelian Pop
2005-02-04 20:11                       ` Larry McVoy
2005-02-04 21:40                         ` Stelian Pop
2005-02-04 23:31                           ` Francois Romieu
2005-02-05 19:38                             ` Stelian Pop
2005-02-05 23:38                               ` Larry McVoy
2005-02-08 15:43                                 ` Stelian Pop
2005-02-08 15:58                                   ` Larry McVoy
2005-02-08 17:17                                     ` Roman Zippel
2005-02-08 18:16                                       ` Larry McVoy
2005-02-08 18:52                                         ` Roman Zippel
2005-02-09  0:07                                           ` Theodore Ts'o
2005-02-09  2:05                                             ` Roman Zippel
2005-02-09  2:24                                               ` Jon Smirl
2005-02-09  2:35                                                 ` Roman Zippel
2005-02-09  2:39                                                   ` Larry McVoy
2005-02-09  2:47                                                     ` Roman Zippel
2005-02-09  3:40                                                       ` Larry McVoy
     [not found]                                                         ` <Pine.LNX.4.61.0502091128070.7836@localhost.localdomain>
2005-02-09 17:38                                                           ` Jon Smirl
2005-02-09 18:24                                                             ` Nicolas Pitre
2005-02-09 18:48                                                               ` Jon Smirl
2005-02-09 23:31                                                                 ` Roman Zippel
2005-02-09 23:52                                                                   ` Jon Smirl
2005-02-09 23:22                                                         ` Roman Zippel
2005-02-10  0:13                                                           ` Larry McVoy
2005-02-10 19:34                                                           ` d.c
2005-02-11  8:40                                                             ` Stelian Pop
2005-02-09  2:40                                                   ` Jon Smirl
2005-02-09  2:57                                                     ` Roman Zippel
2005-02-09  3:03                                                       ` Jon Smirl
2005-02-09  5:48                                                       ` Gene Heskett
2005-02-09  9:05                                                         ` Miles Bader
2005-02-09  7:06                                     ` Alexandre Oliva
2005-02-09 14:48                                       ` d.c
2005-02-09 15:51                                       ` Larry McVoy
2005-02-09 17:30                                         ` Nicolas Pitre
2005-02-09 17:44                                           ` Valdis.Kletnieks
2005-02-10  5:44                                           ` Horst von Brand
2005-02-10  9:36                                         ` Alexandre Oliva
2005-02-10 21:17                                           ` Larry McVoy
2005-02-11  9:02                                             ` Stelian Pop
2005-02-11 15:30                                             ` Alexandre Oliva
2005-02-11 15:48                                               ` Larry McVoy
2005-02-11 16:18                                                 ` Larry McVoy
2005-02-11 16:54                                                 ` Alexandre Oliva
2005-02-11 16:13                                               ` Jon Smirl
2005-02-11 17:22                                                 ` Alexandre Oliva
2005-02-11 20:00                                                   ` Larry McVoy
     [not found]                                           ` <20050210222403.GA5920@thunk.org>
     [not found]                                             ` <or650z6syt.fsf@livre.redhat.lsd.ic.unicamp.br>
2005-02-11 15:53                                               ` Larry McVoy
2005-02-11 17:24                                                 ` Alexandre Oliva
2005-02-10  5:47                                     ` James Bruce
2005-02-06 16:40                 ` Roman Zippel
2005-02-06 17:39                   ` Larry McVoy
2005-02-07  1:45                     ` Roman Zippel
2005-02-07  2:10                       ` Larry McVoy
2005-02-08 14:57                         ` Roman Zippel
2005-02-08 15:19                           ` Larry McVoy
2005-02-08 15:24                           ` Stelian Pop
2005-02-08 15:47                             ` Larry McVoy
2005-02-08 15:36                           ` Catalin Marinas
2005-02-08 15:58                           ` Jon Smirl
2005-02-08 16:15                             ` Roman Zippel
2005-02-08 17:17                               ` Valdis.Kletnieks
2005-02-08 17:23                                 ` Roman Zippel
2005-02-08 17:01                             ` Larry McVoy
2005-02-07  2:16                       ` Al Viro
2005-02-04 10:18 ` Michael S. Tsirkin
2005-02-04 10:59   ` Stelian Pop
2005-02-04 11:08     ` Michael S. Tsirkin
2005-02-04 11:20       ` Stelian Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox