xfsprogs build tweaks for Debian
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 xfsprogs build tweaks for Debian
Hi all,
This patch allows deb packages to be generated more cleanly by Makepkgs than it currently allows. In particular, it handles the issue of having .git files in the generated tarball, and also puts the debs in build/deb when they're built, which is a bit more convenient and consistent.
Another handy side-effect of doing the build this new way (pcp packages are also built this way, FWIW), is that it verifies the SRCFILES macros as part of the build, which ensures the source tarball that we generate will actually build.
cheers.
Signature · 1 line
Nathan
Makefile +1 -3
@@ -9,9 +9,7 @@ ifeq ($(HAVE_BUILDDEFS), yes) include $(TOPDIR)/include/builddefs endif -CONFIGURE = aclocal.m4 configure config.guess config.sub configure install-sh \ - ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ - m4/ltversion.m4 m4/lt~obsolete.m4 +CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh LSRCFILES = configure.in Makepkgs release.sh README VERSION $(CONFIGURE) LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
Makepkgs +21 -7
@@ -6,6 +6,7 @@ LOGDIR=Logs type=rpm +[ -f /etc/debian_version ] && type=debian verbose=false MAKE=${MAKE:-make}
@@ -35,13 +36,27 @@ test -f fileslib.rpm && rm -f fileslib.rpm test ! -d $LOGDIR && mkdir $LOGDIR rm -rf $LOGDIR/* > /dev/null 2>&1 -# build Debian packages, cleans itself before starting -SUDO=${SUDO:-sudo} -test ! -z "$SUDO" && sudo=$SUDO if [ $type = debian ] ; then - LOGDEB=`pwd` - LOGDEB=../`basename $LOGDEB`.log - echo "== Debian build, log is $LOGDEB"; echo + SOURCE=`pwd` + PACKAGE=`basename $SOURCE` + LOGDEB=$SOURCE/$LOGDIR/$PACKAGE.log + if $verbose ; then + $MAKE include/builddefs 2>&1 | tee $LOGDIR/configure + else + $MAKE include/builddefs > $LOGDIR/configure 2>&1 || exit 1 + fi + + . ./VERSION + VERSION=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION} + export SRCLINK_ROOT="$SOURCE/build/deb/$PACKAGE-$VERSION" + rm -fr "$SRCLINK_ROOT" + mkdir -p "$SRCLINK_ROOT" || exit 1 + + $MAKE source-link || exit 1 + + cd "$SRCLINK_ROOT" + SUDO=${SUDO:-fakeroot} + test ! -z "$SUDO" && sudo=$SUDO if $verbose ; then dpkg-buildpackage -r$SUDO | tee $LOGDEB else
@@ -50,7 +65,6 @@ if [ $type = debian ] ; then exit 0 fi -# build RPM packages - manual clean before starting echo "== clean, log is $LOGDIR/clean" if $verbose ; then $MAKE clean 2>&1 | tee $LOGDIR/clean
VERSION +1 -1
@@ -3,5 +3,5 @@ # PKG_MAJOR=3 PKG_MINOR=0 -PKG_REVISION=3 +PKG_REVISION=4 PKG_BUILD=1
build/Makefile +1 -0
@@ -9,6 +9,7 @@ MANIFEST=src-manifest SRCTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-* +LDIRDIRT = deb # for clean and clobber SUBDIRS = tar rpm
debian/changelog +7 -0
@@ -1,3 +1,10 @@ +xfsprogs (3.0.4) unstable; urgency=low + + * New bugfix release + * Update readline dependency to allow libreadline6. + + -- Nathan Scott <[email protected]> Thu, 17 Sep 2009 14:32:48 +1000 + xfsprogs (3.0.2) unstable; urgency=low * New bugfix release
debian/control +1 -1
@@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Nathan Scott <[email protected]> Uploaders: Anibal Monsalve Salazar <[email protected]> -Build-Depends: uuid-dev, autoconf, debhelper (>= 5), gettext, libtool, libreadline5-dev +Build-Depends: uuid-dev, autoconf, debhelper (>= 5), gettext, libtool, libreadline5-dev | libreadline-dev Standards-Version: 3.8.1 Homepage: http://oss.sgi.com/projects/xfs/
doc/CHANGES +4 -0
@@ -1,3 +1,7 @@ +xfsprogs-3.0.4 (17 September 2009) + - Debian packaging updates, esp. readline6 dependency. + - Rework Makepkgs and Makefiles to improve deb generation. + xfsprogs-3.0.3 (30 August 2009) - Fix unaligned accesses in libxfs. - Various small fixes to xfs_db, xfs_repair and xfs_io.
include/Makefile +1 -1
@@ -19,7 +19,7 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs QAHFILES = libxfs.h libxlog.h \ - bitops.h cache.h kmem.h list.h parent.h swab.h xqm.h \ + bitops.h cache.h kmem.h list.h parent.h swab.h \ xfs_ag.h xfs_alloc.h xfs_alloc_btree.h xfs_arch.h xfs_attr_leaf.h \ xfs_attr_sf.h xfs_bit.h xfs_bmap.h xfs_bmap_btree.h xfs_btree.h \ xfs_btree_trace.h xfs_buf_item.h xfs_da_btree.h xfs_dinode.h \
include/buildmacros +3 -1
@@ -22,6 +22,8 @@ MANDIRT = *.[1-9].gz PODIRT = *.tmpo *.mo CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY) DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT) +LIBDIRT = .libs +DIRDIRT = $(LDIRDIRT) $(LIBDIRT) OBJECTS = $(ASFILES:.s=.o) \ $(CFILES:.c=.o) \
@@ -138,7 +140,7 @@ DIST_MAKERULE = \ SOURCE_MAKERULE = \ @test -z "$$DIR" && DIR="."; \ - for f in $(SRCFILES) ""; do \ + for f in $(SRCFILES) $(POTHEAD) ""; do \ test -z "$$f" && break; \ test -L "$$f" || $(ECHO) $$DIR/$$f; \ done; \
include/buildrules +12 -1
@@ -8,7 +8,7 @@ include $(TOPDIR)/include/builddefs clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) - @rm -fr .libs + rm -fr $(DIRDIRT) %-clean: $(MAKE) -C $* clean
@@ -21,6 +21,17 @@ $(SUBDIRS): $(MAKE) -C $@ endif +source-link: + @test -z "$$DIR" && DIR="."; \ + for f in `echo $(SRCFILES) $(SUBDIRS)`; do \ + if test -d $$f ; then \ + mkdir $$SRCLINK_ROOT/$$DIR/$$f || exit $$?; \ + $(MAKEF) DIR=$$DIR/$$f -C $$f $@ || exit $$?; \ + else \ + ln $$f $$SRCLINK_ROOT/$$DIR/$$f || exit $$?; \ + fi; \ + done + # # Standard targets #
m4/Makefile +12 -1
@@ -5,6 +5,13 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs +CONFIGURE = \ + libtool.m4 \ + ltoptions.m4 \ + ltsugar.m4 \ + ltversion.m4 \ + lt~obsolete.m4 + LSRCFILES = \ manual_format.m4 \ package_aiodev.m4 \
@@ -14,10 +21,14 @@ LSRCFILES = \ package_types.m4 \ package_utilies.m4 \ package_uuiddev.m4 \ - multilib.m4 + multilib.m4 \ + $(CONFIGURE) default: include $(BUILDRULES) install install-dev install-lib: default + +realclean: distclean + rm -f $(CONFIGURE)
po/Makefile +1 -1
@@ -7,7 +7,7 @@ include $(TOPDIR)/include/builddefs POTHEAD = $(PKG_NAME).pot LINGUAS = pl -LSRCFILES = $(LINGUAS:%=%.po) $(POTHEAD) +LSRCFILES = $(LINGUAS:%=%.po) LDIRT = $(POTHEAD) XGETTEXTFILES = $(LOCALIZED_FILES)
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Nathan Scott
Hi all,
This patch allows deb packages to be generated more cleanly by Makepkgs than it currently allows. In particular, it handles the issue of having .git files in the generated tarball, and also puts the debs in build/deb when they're built, which is a bit more convenient and consistent.
The tarball generated by Makepks does not contain .git. Do you create a tarball in a different way for debian?
Makefile ifeq ($(HAVE_BUILDDEFS), yes) · line 12
Quoted 9 lines
+++ b/Makefile
Makefile +1
-3@@ -9,9 +9,7 @@ ifeq ($(HAVE_BUILDDEFS), yes) include $(TOPDIR)/include/builddefs endif -CONFIGURE = aclocal.m4 configure config.guess config.sub configure install-sh \ - ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ - m4/ltversion.m4 m4/lt~obsolete.m4 +CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
So configure was mentioned twice which is an obvious bug. But why do we want to remove the m4/* files from the list of files to package?
[Ah, they're added inside the m4 directory, ok]
Makepkgs line 9
Quoted 2 lines
Makepkgs +1
-0type=rpm +[ -f /etc/debian_version ] && type=debian
would be cleaner as
#
# If we're on a Debian or Debian-derived system generate deb packages by # default, else RPM packages.
#
if [ -f /etc/debian_version ]
type=debian
else
type=rpm
fi
VERSION line 7
Quoted 11 lines
VERSION +1
-1@@ -3,5 +3,5 @@ # PKG_MAJOR=3 PKG_MINOR=0 -PKG_REVISION=3 +PKG_REVISION=4 PKG_BUILD=1
Note that when you bump package version please always also tag the result in git.
VERSION
Quoted 1 line
VERSION +1
-0+ - Debian packaging updates, esp. readline6 dependency.
Btw, didn't readline move to GPLv3 while we have GPLv2 code in libxfs?
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · Christoph Hellwig
VERSION line 7
Quoted 4 lines
PKG_MINOR=0
VERSION +1
-1-PKG_REVISION=3 +PKG_REVISION=4 PKG_BUILD=1Note that when you bump package version please always also tag the result in git.
Actually given that the tree has moved ahead that's not even easily doable. I'd suggest to commit this ontop of the few patches in already and include them in the changelog.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 2 lines · ----- "Christoph Hellwig
The tarball generated by Makepks does not contain .git. Do you create a tarball in a different way for debian?
Building directly from a git tree - its a one-step process.
Quoted 13 lines
would be cleaner as
#
# If we're on a Debian or Debian-derived system generate deb packages by
# default, else RPM packages.
#
if [ -f/etc/debian_version]
type=debian
else
type=rpm
fi
OK, yep, will do.
Quoted 2 lines
Note that when you bump package version please always also tag the result in git.
Will do (and pull in & document those other merged changes when I do).
Quoted 3 lines
doc/CHANGES line 2
Quoted 1 line
doc/CHANGES +1
-0+ - Debian packaging updates, esp. readline6 dependency.Btw, didn't readline move to GPLv3 while we have GPLv2 code in libxfs?
Hmm, not sure, will have to look into that. The (new) dependency doesn't specify any particular version, it just allows versions other than 5 ... but still worth checking into.
thanks!
Signature · 6 lines
Nathan _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs