create xfstests install target
PATCH 1/1 create xfstests install target
Not sure what the best location for this is in the end, but that's just a one-line change in builddefs.in if it should move. Currently it goes to whatever configure thinks "libexecdir" is.
Once we have an install target we can probably hook this up to makepkgs etc, too, and even publish tarballs & packages. :)
---
Makefile +15 -1
@@ -62,7 +62,21 @@ $(DMAPI_MAKEFILE): aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install install-dev install-lib: +install: default $(addsuffix -install,$(SUBDIRS)) + $(INSTALL) -m 755 -d $(PKG_LIB_DIR) + $(INSTALL) -m 755 check $(PKG_LIB_DIR) + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR) + $(INSTALL) -m 755 run.* $(PKG_LIB_DIR) + $(INSTALL) -m 644 group $(PKG_LIB_DIR) + $(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR) + $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR) + $(INSTALL) -m 644 common* $(PKG_LIB_DIR) + +# Nothing. +install-dev install-lib: + +%-install: + $(MAKE) -C $* install realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
include/builddefs.in +2 -0
@@ -27,6 +27,8 @@ PKG_RELEASE = @pkg_release@ PKG_VERSION = @pkg_version@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ +PKG_SBIN_DIR = @sbindir@ +PKG_LIB_DIR = @libexecdir@@libdirsuffix@/@pkg_name@ CC = @cc@ AWK = @awk@
ltp/Makefile +5 -0
@@ -49,3 +49,8 @@ ifeq ($(HAVE_AIO), true) aio-stress: aio-stress.c $(LINKTEST) $(LIBAIO) $(LDLIBS) endif + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp + $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp +
src/Makefile +7 -0
@@ -126,3 +126,10 @@ open_unlink: open_unlink.o $(LIBHANDLE) $(LINKTEST) $(LIBHANDLE) $(LDLIBS) endif + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src + $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src + $(INSTALL) -m 755 fill2attr fill2fs $(PKG_LIB_DIR)/src + $(INSTALL) -m 755 fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src + $(INSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 1/1 xfstests Makepkgs framework, builds rpms
With the install target in place, this lets us do Makepkgs:
== dist, log is Logs/dist
Wrote: /root/src/xfstests-dev.work/build/xfstests-1.0.0.src.tar.gz
Wrote: /root/src/xfstests-dev.work/build/tar/xfstests-1.0.0.tar.gz
Wrote: /root/src/xfstests-dev.work/build/rpm/xfstests-1.0.0-1.src.rpm
Wrote: /root/src/xfstests-dev.work/build/rpm/xfstests-1.0.0-1.x86_64.rpm
It's all largely cut & pasted from the xfsprogs framework. I'll let the debian elves do the things they do for debian packaging if they're interested...
xfstests could use more work to make it package-friendly but this is a good start at least.
---
Makepkgs new file +88 -0
@@ -0,0 +1,88 @@ +#! /bin/sh +# +# Make whichever packages have been requested. +# Defaults to RPMs. +# +LOGDIR=Logs + +type=rpm +verbose=false + +MAKE=${MAKE:-make} +test ! -z "$MAKE" && make=$MAKE + +for opt in $* +do + case "$opt" in + clean) + ;; # ignored, kept for backward compatibility + rpm) + type=rpm ;; + debian) + type=debian ;; + verbose) + verbose=true ;; + *) + echo "Usage: Makepkgs [verbose] [debian|rpm]"; exit 1 ;; + esac +done + +# start with a clean manifest +test -f files.rpm && rm -f files.rpm +test -f filesdevel.rpm && rm -f filesdevel.rpm +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 + if $verbose ; then + dpkg-buildpackage -r$SUDO | tee $LOGDEB + else + dpkg-buildpackage -r$SUDO > $LOGDEB || exit 1 + fi + 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 +else + $MAKE clean > $LOGDIR/clean 2>&1 || exit 1 +fi + +echo +echo "== configure, log is $LOGDIR/configure" +rm -f .census # force configure to run here +if $verbose ; then + $MAKE configure 2>&1 | tee $LOGDIR/configure +else + $MAKE configure > $LOGDIR/configure 2>&1 || exit 1 +fi + +echo +echo "== default, log is $LOGDIR/default" +if $verbose ; then + $MAKE default 2>&1 | tee $LOGDIR/default +else + $MAKE default > $LOGDIR/default 2>&1 || exit 1 +fi + +echo +echo "== dist, log is $LOGDIR/dist" +[ ! -f .census ] && touch .census +if $verbose ; then + $MAKE -C build dist 2>&1 | tee $LOGDIR/dist +else + $MAKE -C build dist > $LOGDIR/dist 2>&1 || exit 1 + grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///' +fi + +exit 0
build/rpm/macros.template new file +30 -0
@@ -0,0 +1,30 @@ +# +# rpmrc.template +# +# Template to fudge rpm directory structure inside IRIX-like build +# environment + +# Force 386 build on all platforms +%_target i386-pc-linux +%_target_cpu i386 +%_target_os linux + +# topdir == $(WORKAREA) +%_topdir %topdir% + +# Following directories are specific to the topdir +# This is where build is done. In our case it's the same as $WORKAREA +%_builddir %topdir% + +# This is where foo.1.99.tar.gz is living in the real world. +# Be careful not to run full rpm build as it will override the sources +%_sourcedir %topdir%/build + +# This is where binary RPM and source RPM would end up +%_rpmdir %topdir%/build/rpm +%_srcrpmdir %topdir%/build/rpm +%_specdir %topdir%/build/rpm + +# Leave RPM files in the same directory - we're not building for +# multiple architectures +%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
build/rpm/xfstests.spec.in new file +49 -0
49 lines not on this page · raw message
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 3 lines · Eric Sandeen
Not sure what the best location for this is in the end, but that's just a one-line change in builddefs.in if it should move. Currently it goes to whatever configure thinks "libexecdir" is.
I think that's incorrect. libexecdir is /usr/lib for FHS or /usr/libexec for BSDish filesystem layouts, but /use should be read-only mountable.
Maybe /var/lib/xfstests as a start? That seems to be the dumping ground for random stuff that needs write access. Even better would be keeping the scripts under /usr/lib and the output in /var/lib, but that might be too much work.
Quoted 1 line
+PKG_SBIN_DIR = @sbindir@
This one doesn't actually seem to be used.
Otherwise looks good to me.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH] xfstests Makepkgs framework, builds rpms
In reply to Eric SandeenQuoted 8 lines · Eric Sandeen
With the install target in place, this lets us do Makepkgs:
== dist, log is Logs/dist
Wrote:/root/src/xfstests-dev.work/build/xfstests-1.0.0.src.tar.gz
Wrote:/root/src/xfstests-dev.work/build/tar/xfstests-1.0.0.tar.gz
Wrote:/root/src/xfstests-dev.work/build/rpm/xfstests-1.0.0-1.src.rpm
Wrote:/root/src/xfstests-dev.work/build/rpm/xfstests-1.0.0-1.x86_64.rpm
Quoted 6 lines
It's all largely cut & pasted from the xfsprogs framework. I'll let the debian elves do the things they do for debian packaging if they're interested...
xfstests could use more work to make it package-friendly but this is a good start at least.
You missed the Debian packaging :) I'll give it a try.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines · Christoph Hellwig
Quoted 3 lines · Eric Sandeen
Not sure what the best location for this is in the end, but that's just a one-line change in builddefs.in if it should move. Currently it goes to whatever configure thinks "libexecdir" is.
I think that's incorrect. libexecdir is
/usr/libfor FHS or/usr/libexecfor BSDish filesystem layouts, but /use should be read-only mountable.Maybe
/var/lib/xfstestsas a start? That seems to be the dumping ground for random stuff that needs write access.
Ok, easy enough.
Quoted 3 lines
Even better would be keeping
the scripts under/usr/liband the output in/var/lib, but that might be too much work.
Yeah at least right now I'm not that highly motivated. :)
Quoted 3 lines
Quoted 1 line
+PKG_SBIN_DIR = @sbindir@
This one doesn't actually seem to be used.
true, it's not ... I put it in there thinking about putting a wrapper in sbin or /usr/sbin so tests could be launched from root's path ...
-Eric
Quoted 7 lines
Otherwise looks good to me.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Eric Sandeen
Quoted 4 lines · Christoph Hellwig
Quoted 3 lines · Eric Sandeen
Not sure what the best location for this is in the end, but that's just a one-line change in builddefs.in if it should move. Currently it goes to whatever configure thinks "libexecdir" is.
Quoted 7 lines
Quoted 5 lines
I think that's incorrect. libexecdir is
/usr/libfor FHS or/usr/libexecfor BSDish filesystem layouts, but /use should be read-only mountable.Maybe
/var/lib/xfstestsas a start? That seems to be the dumping ground for random stuff that needs write access.Ok, easy enough.
Or so one might think. Anyone good with autoconf who can tell me how the *!@% to specify /var/lib ?
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs