PGNd
2014-Sep-29 15:01 UTC
how to build-time modify build46 script's host-specific rpm install target-locations?
Sourcing shorewall-git (commit 0ac97c4) on openSUSE 13.1. Using SW's UNMODIFIED upstream ./release/*.specs in building rpms Building rpms with cd ./release setversion 4.6.4.git_0ac97c4 git commit -a -m "working" cd ../ /usr/local/src/shorewall-build/tools/build/build46 -tr -cil6Ls 4.6.4.git_0ac97c4 ... Shorewall 4.6.4.git_0ac97c4 Build complete - Mon Sep 29 06:10:15 PDT 2014 ls -al *rpm -rw-r--r-- 1 root root 535K Sep 29 06:10 shorewall-4.6.4-git_0ac97c4.noarch.rpm -rw-r--r-- 1 root root 292K Sep 29 06:10 shorewall6-4.6.4-git_0ac97c4.noarch.rpm -rw-r--r-- 1 root root 54K Sep 29 06:10 shorewall6-lite-4.6.4-git_0ac97c4.noarch.rpm -rw-r--r-- 1 root root 54K Sep 29 06:10 shorewall-core-4.6.4-git_0ac97c4.noarch.rpm -rw-r--r-- 1 root root 41K Sep 29 06:10 shorewall-init-4.6.4-git_0ac97c4.noarch.rpm -rw-r--r-- 1 root root 55K Sep 29 06:10 shorewall-lite-4.6.4-git_0ac97c4.noarch.rpm Note that the rpms' install targets for the sbins are rpm -qlp *rpm | grep sbin /sbin/shorewall /sbin/shorewall6 /sbin/shorewall6-lite /sbin/shorewall-lite The build process' location vendor/host-specific rc for == 'suse' appears to be sourced from cat ./code/Shorewall-core/shorewallrc.suse # # SuSE Shorewall 4.5 rc file # BUILD= #Default is to detect the build system HOST=suse ... It contains var defs that are incorrect for host == suse. In particular, looking at PERLLIBDIR=${PREFIX}/lib/perl5/vendor_perl/5.14.2 #Directory to install Shorewall Perl module directory SBINDIR=/sbin #Directory where system administration programs are installed 'Somewhere' in SW's upstream build46 process, one's corrected (PERLLIBDIR), the other's not (SBINDIR), and propagated to the resulting, built rpms' install targets, e.g. rpm -qlp shorewall-4*rpm | egrep "sbin|perl" | sort -r | tail -n 2 /usr/lib/perl5/vendor_perl/5.18.1/Shorewall/Accounting.pm /sbin/shorewall openSUSE project's release-up-to-date, downstream packaging .spec https://build.opensuse.org/package/view_file/security:netfilter/shorewall/shorewall.spec?expand=1 corrects these values with a ./configure stanza under %install; I assume that's considered to be 'correct' config for host == suse. Its built rpms' install targets include rpm -qlp ./shorewall-4.6.3.4-157.1.noarch.rpm | egrep "sbin|perl" | sort /usr/lib/perl5/vendor_perl/5.18.1/Shorewall /usr/lib/perl5/vendor_perl/5.18.1/Shorewall/Accounting.pm ... /usr/sbin/rcshorewall /usr/sbin/shorewall Attempting to correct them for builds using SW's upstream build process, using included .specs, exporting corrected PERLLIBDIR, SBINDIR, etc ENV vars prior to build46 exec has no effect on outcome; still "/sbin/..." OTOH, manually correcting, pre-build perl -pi -e \ 's|^.*(PERLLIBDIR=).*|${1}\${PREFIX}/lib/perl5/vendor_perl/5.18.1|g; \ s|^.*(SBINDIR=).*|${1}/usr/sbin|' \ ./code/Shorewall-core/shorewallrc.suse git commit -a -m "fix rc" ... ./build46 ... causes the build to fail ... Building shorewall-core-4.6.4-git_0ac97c4.noarch.rpm... Building shorewall-4.6.4-git_0ac97c4.noarch.rpm... Step "do_rpmbuild -ba /usr/src/packages//SPECS/shorewall.spec" FAILED chekcing the manual step rpmbuild -ba /usr/src/packages//SPECS/shorewall.spec ... Shorewall Version 4.6.4.git_0ac97c4 Installed + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-suse calling /usr/lib/rpm/brp-suse.d/brp-99-pesign Processing files: shorewall-4.6.4-git_0ac97c4.noarch !! error: File not found: /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/sbin/shorewall Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.qI45DA + umask 022 + cd /usr/src/packages/BUILD + cd shorewall-4.6.4 + DOCDIR=/usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + export DOCDIR + /usr/bin/mkdir -p /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr COPYING /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr INSTALL /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr changelog.txt /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr releasenotes.txt /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr Contrib/ipsecvpn Contrib/swping Contrib/swping.init Contrib/tunnel /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + cp -pr Samples /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/usr/share/doc/packages/shorewall + exit 0 RPM build errors: bogus date in %changelog: Tue Oct 03 2007 Tom Eastep tom@shorewall.net bogus date in %changelog: Thu Mar 24 2007 Tom Eastep tom@shorewall.net File not found: /usr/src/packages/BUILDROOT/shorewall-4.6.4-git_0ac97c4.x86_64/sbin/shorewall What's the appropriate method for passing corrected/reconfigured vendor/host-specific values to the SW build46 script? Goal here is to get to a clean/correct host-specific, build46 process from upstream sources. ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk