* [PATCH] create xfstests install target @ 2009-01-01 22:25 Eric Sandeen 2009-01-02 3:47 ` [PATCH] xfstests Makepkgs framework, builds rpms Eric Sandeen 2009-01-02 18:02 ` [PATCH] create xfstests install target Christoph Hellwig 0 siblings, 2 replies; 6+ messages in thread From: Eric Sandeen @ 2009-01-01 22:25 UTC (permalink / raw) To: xfs-oss 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. :) Signed-off-by: Eric Sandeen <sandeen@sandeen.net> --- Index: xfstests-dev.work/Makefile =================================================================== --- xfstests-dev.work.orig/Makefile +++ xfstests-dev.work/Makefile @@ -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) Index: xfstests-dev.work/include/builddefs.in =================================================================== --- xfstests-dev.work.orig/include/builddefs.in +++ xfstests-dev.work/include/builddefs.in @@ -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@ Index: xfstests-dev.work/ltp/Makefile =================================================================== --- xfstests-dev.work.orig/ltp/Makefile +++ xfstests-dev.work/ltp/Makefile @@ -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 + Index: xfstests-dev.work/src/Makefile =================================================================== --- xfstests-dev.work.orig/src/Makefile +++ xfstests-dev.work/src/Makefile @@ -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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] xfstests Makepkgs framework, builds rpms 2009-01-01 22:25 [PATCH] create xfstests install target Eric Sandeen @ 2009-01-02 3:47 ` Eric Sandeen 2009-01-02 18:03 ` Christoph Hellwig 2009-01-02 18:02 ` [PATCH] create xfstests install target Christoph Hellwig 1 sibling, 1 reply; 6+ messages in thread From: Eric Sandeen @ 2009-01-02 3:47 UTC (permalink / raw) To: xfs-oss 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. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> --- Index: xfstests-dev.work/Makepkgs =================================================================== --- /dev/null +++ xfstests-dev.work/Makepkgs @@ -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 Index: xfstests-dev.work/build/rpm/macros.template =================================================================== --- /dev/null +++ xfstests-dev.work/build/rpm/macros.template @@ -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 Index: xfstests-dev.work/build/rpm/xfstests.spec.in =================================================================== --- /dev/null +++ xfstests-dev.work/build/rpm/xfstests.spec.in @@ -0,0 +1,49 @@ +Summary: XFS regression test suite +Name: @pkg_name@ +Version: @pkg_version@ +Release: @pkg_release@ +Distribution: @pkg_distribution@ +Packager: Silicon Graphics, Inc. <http://www.sgi.com/> +BuildRoot: @build_root@ +BuildRequires: autoconf, xfsprogs-devel, e2fsprogs-devel +BuildREquires: libacl-devel, libattr-devel, libaio-devel +Requires: bash, xfsprogs, xfsdump, perl, acl, attr, bind-utils +Requires: bc, indent, quota +Source: @pkg_name@-@pkg_version@.src.tar.gz +License: GPL2+ +Vendor: Silicon Graphics, Inc. +URL: http://oss.sgi.com/projects/xfs/ +Group: System Environment/Base + +%description +The XFS regression test suite. Also includes some support for +acl, attr, dmapi, udf, and nfs testing. Contains around 200 specific tests +for userspace & kernelspace. + +%prep +if [ -f .census ] ; then + if [ ! -d ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} ] ; then + ln -s . ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} + fi +else +%setup +INSTALL_USER=root +INSTALL_GROUP=root +export INSTALL_USER INSTALL_GROUP +@make@ configure +fi + +%build +@make@ + +%install +DIST_ROOT="$RPM_BUILD_ROOT" +DIST_INSTALL=`pwd`/install.manifest +export DIST_ROOT DIST_INSTALL +@make@ install DIST_MANIFEST="$DIST_INSTALL" +@make@ -C build/rpm rpmfiles DIST_MANIFEST="$DIST_INSTALL" + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f build/rpm/rpmfiles _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests Makepkgs framework, builds rpms 2009-01-02 3:47 ` [PATCH] xfstests Makepkgs framework, builds rpms Eric Sandeen @ 2009-01-02 18:03 ` Christoph Hellwig 0 siblings, 0 replies; 6+ messages in thread From: Christoph Hellwig @ 2009-01-02 18:03 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss On Thu, Jan 01, 2009 at 09:47:48PM -0600, Eric Sandeen wrote: > 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. You missed the Debian packaging :) I'll give it a try. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] create xfstests install target 2009-01-01 22:25 [PATCH] create xfstests install target Eric Sandeen 2009-01-02 3:47 ` [PATCH] xfstests Makepkgs framework, builds rpms Eric Sandeen @ 2009-01-02 18:02 ` Christoph Hellwig 2009-01-02 18:26 ` Eric Sandeen 1 sibling, 1 reply; 6+ messages in thread From: Christoph Hellwig @ 2009-01-02 18:02 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss On Thu, Jan 01, 2009 at 04:25:18PM -0600, Eric Sandeen wrote: > 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. > +PKG_SBIN_DIR = @sbindir@ This one doesn't actually seem to be used. Otherwise looks good to me. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] create xfstests install target 2009-01-02 18:02 ` [PATCH] create xfstests install target Christoph Hellwig @ 2009-01-02 18:26 ` Eric Sandeen 2009-01-03 3:46 ` Eric Sandeen 0 siblings, 1 reply; 6+ messages in thread From: Eric Sandeen @ 2009-01-02 18:26 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs-oss Christoph Hellwig wrote: > On Thu, Jan 01, 2009 at 04:25:18PM -0600, Eric Sandeen wrote: >> 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. Ok, easy enough. > Even better would be keeping > the scripts under /usr/lib and the output in /var/lib, but that might > be too much work. Yeah at least right now I'm not that highly motivated. :) >> +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 > Otherwise looks good to me. > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] create xfstests install target 2009-01-02 18:26 ` Eric Sandeen @ 2009-01-03 3:46 ` Eric Sandeen 0 siblings, 0 replies; 6+ messages in thread From: Eric Sandeen @ 2009-01-03 3:46 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs-oss Eric Sandeen wrote: > Christoph Hellwig wrote: >> On Thu, Jan 01, 2009 at 04:25:18PM -0600, Eric Sandeen wrote: >>> 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. > > 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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-03 3:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-01 22:25 [PATCH] create xfstests install target Eric Sandeen 2009-01-02 3:47 ` [PATCH] xfstests Makepkgs framework, builds rpms Eric Sandeen 2009-01-02 18:03 ` Christoph Hellwig 2009-01-02 18:02 ` [PATCH] create xfstests install target Christoph Hellwig 2009-01-02 18:26 ` Eric Sandeen 2009-01-03 3:46 ` Eric Sandeen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox