On Fri, Jan 18, 2013 at 10:49:20AM -0500, Gene Czarcinski wrote: > On 01/18/2013 09:44 AM, David Sterba wrote: > >On Fri, Jan 18, 2013 at 09:16:00AM -0500, Gene Czarcinski wrote: > >>>Sergei Trofimovich (1): > >>> version.sh: fix version when built from tarball > >>While you are about it, how about adding in this fix from Dieter Ries to fix > >>version a little more: > >>http://article.gmane.org/gmane.comp.file-systems.btrfs/20069 > >I did not notice it before, but Dieter's patch does not work when progs > >are built from .git repository > > > >-echo "#define BTRFS_BUILD_VERSION \"Btrfs $v\"" >> .build-version.h > >+echo "#define BTRFS_BUILD_VERSION \"$v\"" >> .build-version.h > > > >$v is set with the git tag, so the "Btrfs" string does not appear in the > >output (eg. mkfs.btrfs). > > > >Technically, $v should always contain some sort of a tag, Sergei's patch > >hardcodes it to the latest one for the non-git case. This is IMHO the > >right approach. > > > OK, I see what you mean. However, the current situation when btrfs > is built from a tarball results in: > > >btrfs --version > Btrfs Btrfs v0.19
I guess one problem here is that there's no canonical way of generating a tarball (without the git files) from a git checkout, with detailed version information. So what's happening, I suspect, is that the distributions/people producing source tarballs of btrfs-progs are checking out the git tree, deleting .git, and tarring up that, which loses any git versioning. I think a solution may be to have a "dist" or "tar" make target which does the above automatically and includes a suitably-generated version.h in the tarball. Hugo. > and > > >mkfs.btrfs -V > mkfs.btrfs, part of Btrfs Btrfs v0.19 > > There must be a way to reliably just have one "Btrfs" and I will > look into it. > > Gene -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Klytus, I'm bored. What plaything can you offer me today? ---
signature.asc
Description: Digital signature