xfs
[Top] [All Lists]

[PATCH] xfsprogs: release.sh use git archive for source tarball

To: Arkadiusz Miśkiewicz <arekm@xxxxxxxx>
Subject: [PATCH] xfsprogs: release.sh use git archive for source tarball
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 14 Dec 2012 17:48:05 -0600
Cc: xfs@xxxxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxxx>
In-reply-to: <201212140707.33191.arekm@xxxxxxxx>
References: <20121213233131.GV30652@xxxxxxx> <201212140707.33191.arekm@xxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
Hi Arkadiusz,

   See what you think of this:

On Fri, Dec 14, 2012 at 07:07:33AM +0100, Arkadiusz Miśkiewicz wrote:
> and file missing in tarball:
> 
> gmake[2]: *** No rule to make target `sync_file_range.c', needed by `.dep'.  
> Stop.

The current method of using 'make dist' to generate source tarballs for a
release can miss some files depending upon which distro it is running on.  In
the 3.1.10 release of xfsprogs 'make dist' missed a file 'io/sync_file_range.c'
because the machine I ran it on didn't HAVE_SYNC_FILE_RANGE.

Update the release script to use a simple 'git archive' method to create the
tarball.  This will ensure that all necessary sources are included.

This is the difference between 'make dist' and 'git archive' for the 3.1.10
release:
$ diff make-dist.list git-archive.list
2,5d1
< /aclocal.m4
< /config.guess
< /config.sub
< /configure
129a126
> /.gitignore
210d206
< /install-sh
236a233
> /io/sync_file_range.c
319d315
< /ltmain.sh
321,325d316
< /m4/libtool.m4
< /m4/lt~obsolete.m4
< /m4/ltoptions.m4
< /m4/ltsugar.m4
< /m4/ltversion.m4
385d375
< /po/xfsprogs.pot

I've appended all of the above to the tarball.  Here's the delta between
xfsprogs-3.1.10 and a tarball created using this method:

$ diff make-dist.list new-release.list
129a130
> /.gitignore
236a238
> /io/sync_file_range.c

Signed-off-by: Ben Myers <bpm@xxxxxxx>

---
 release.sh |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: b/release.sh
===================================================================
--- a/release.sh        2012-12-14 16:49:45.731320927 -0600
+++ b/release.sh        2012-12-14 17:30:04.561319647 -0600
@@ -19,7 +19,13 @@ echo "Tagging git repository"
 git tag -s -a -m "${version} release" v${version}
 
 echo "Making source tarball"
-make dist
+git archive --prefix=xfsprogs-${version}/ --format=tar v${version} \
+                    -o xfsprogs-${version}.tar
+tar --transform "s,^,xfsprogs-${version}/," -rf xfsprogs-${version}.tar \
+           aclocal.m4 config.guess config.sub configure install-sh ltmain.sh \
+           m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+           m4/ltversion.m4 po/xfsprogs.pot
+gzip xfsprogs-${version}.tar
 
 echo "Sign the source tarball"
 gpg --detach-sign xfsprogs-${version}.tar.gz

<Prev in Thread] Current Thread [Next in Thread>