lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20080202085734.GC31694@webber.adilger.int>
Date:	Sat, 02 Feb 2008 01:57:34 -0700
From:	Andreas Dilger <adilger@....com>
To:	"Theodore Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH][28/28] e2fsprogs-lts-make_rpms.patch


Allow "make rpm" to take some extra configure options from the build
environment without having to patch the code.

Build the tarball in a temporary directory instead of the e2fsprogs
source directory.

Signed-off-by: Michael MacDonald <Michael.Macdonald@....COM>
Signed-off-by: Andreas Dilger <adilger@....com>

diff -Naur e2fsprogs-1.40.2/contrib/build-rpm e2fsprogs-1.40.2.new/contrib/build-rpm
--- e2fsprogs-1.40.2/contrib/build-rpm	2007-06-30 08:58:34.000000000 -0400
+++ e2fsprogs-1.40.2.new/contrib/build-rpm	2007-12-21 12:49:43.000000000 -0500
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+# enable xtrace output if requested
+if [ -n ${ENABLE_XTRACE:-''} ]; then
+    set -x
+fi
+
 # Build an e2fsprogs RPM from cvs
 
 pwd=`pwd`
@@ -8,8 +13,11 @@
 pkgvers=`grep Version: e2fsprogs.spec | awk '{print $2;}'`
 builddir=${pkgname}-${pkgvers}
 
+# ensure that $TMP is set to something
+TMP=${TMP:-'/tmp'}
+
 cd ..
-tmpdir=`mktemp -d rpmtmp.XXXXXX`
+tmpdir=`mktemp -d ${RPM_TMPDIR:-$TMP}/rpmtmp.XXXXXX`
 
 # We need to build a tarball for the SRPM using $builddir as the 
 # directory name (since that's what RPM will expect it to unpack
@@ -25,10 +33,13 @@
 (cd $tmpdir && tar czfh ${builddir}.tar.gz $EXCLUDE $builddir)
 
 [ "`rpmbuild --version 2> /dev/null`" ] && RPM=rpmbuild || RPM=rpm
-$RPM --define "_sourcedir `pwd`/$tmpdir" -ba $currdir/e2fsprogs.spec
-
-ret=$?
-rm -rf $tmpdir
-exit $?
 
+$RPM --define "_sourcedir $tmpdir" \
+     --define "_topdir ${RPM_TOPDIR:-$(rpm -E %_topdir)}" \
+     --define "_tmpdir ${RPM_TMPDIR:-$TMP}" \
+     --define "extra_config_flags ${EXTRA_CONFIG_FLAGS:-''}" \
+     -ba $currdir/e2fsprogs.spec
 
+rpm_exit=$?
+rm -rf $tmpdir
+exit $rpm_exit
diff -Naur e2fsprogs-1.40.2/e2fsprogs.spec.in e2fsprogs-1.40.2.new/e2fsprogs.spec.in
--- e2fsprogs-1.40.2/e2fsprogs.spec.in	2007-12-12 22:48:29.000000000 -0500
+++ e2fsprogs-1.40.2.new/e2fsprogs.spec.in	2007-12-21 12:39:11.000000000 -0500
@@ -50,7 +50,8 @@
 %setup
 
 %build
-%configure --enable-elf-shlibs --enable-nls
+%configure --enable-elf-shlibs --enable-nls \
+	%{?extra_config_flags:%extra_config_flags}
 make
 
 %install

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ