On Sat, Sep 27, 2014, at 01:26 PM, Tom Eastep wrote:
> It's me, not you -- the files are .spec files, not .rpm files :-( I
> never use rpms so seldom even think about how they are built.

The ONLY reason I'm building rpms is for their robust uninstall-ability.  And 
that, simply because I've not (yet) convinced myself of any 
uninstall-the-completely-fubar'd-tarball-you-just-installed capability ...

As for version numbering, looking now in the .spec,

SW_TOP_DIR="/usr/local/src/shorewall-build"
SW_GIT=${SW_TOP_DIR}/code
SW_STYLESHEET=`find /usr/share/xml/docbook/stylesheet/nwalsh5 -wholename 
*/xhtml/docbook.xsl`
SW_BUILD="${SW_TOP_DIR}/tools/build/build46"
SW_RPMDIR=/usr/src/packages/
SW_BUILD_OPTS="-tr -cil6Ls"

cd $SW_TOP_DIR
for d in code tools release
do
 git -C ./$d checkout master
 git -C ./$d clean -xfd
 git -C ./$d reset --hard HEAD
done

perl -pi -e 's|^(STYLESHEET).*|$1='${SW_STYLESHEET}'|g' ${SW_BUILD}
perl -pi -e 's|^(GIT).*|$1='${SW_GIT}'|g'               ${SW_BUILD}
perl -pi -e 's|^(RPMDIR).*|$1='${SW_RPMDIR}'|g'         ${SW_BUILD}

egrep "^STYLESHEET=|^LOGDIR=|^RPMDIR=|^DIR=|^GIT=" ${SW_BUILD}
        
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh5/1.78.1/xhtml/docbook.xsl
        LOGDIR=$PWD
        RPMDIR=/usr/src/packages/
        DIR=$PWD
        GIT=/usr/local/src/shorewall-build/code

source ~/.bashrc
PATH=${SW_TOP_DIR}/tools/build/:$PATH

cd   ${SW_TOP_DIR}/release
setversion 4.6.4.X

SW_BUILD_VER_MAJOR=$( grep "^%define version" shorewall-core.spec | awk -F " " 
'{print $NF}' )
SW_BUILD_VER_MINOR=$( grep "^%define release" shorewall-core.spec | awk -F " " 
'{print $NF}' )
echo $SW_BUILD_VER_MAJOR $SW_BUILD_VER_MINOR
        4.6.4 X

matching the `setversion` build target,

SW_BUILD_VER=4.6.4.X

cd ~
rm -rf   ${SW_TOP_DIR}/BUILD/${SW_BUILD_VER}
mkdir -p ${SW_TOP_DIR}/BUILD/${SW_BUILD_VER}
cd       ${SW_TOP_DIR}/BUILD/${SW_BUILD_VER}

rm -rf *
touch shorewall-pkg.config
${SW_BUILD} ${SW_BUILD_OPTS} ${SW_BUILD_VER}
        ...
        COREBALL is shorewall-core-4.6.4.X.tgz
        TARBALL is shorewall-4.6.4.X.tgz
        TARBALL6 is shorewall6-4.6.4.X.tgz
        LITETARBALL is shorewall-lite-4.6.4.X.tgz
        INITTARBALL is shorewall-init-4.6.4.X.tgz
        LITE6TARBALL is shorewall6-lite-4.6.4.X.tgz
        Core RPM is shorewall-core-4.6.4-X.noarch.rpm
        RPM is shorewall-4.6.4-X.noarch.rpm
        RPM6 is shorewall6-4.6.4-X.noarch.rpm
        LITERPM is shorewall-lite-4.6.4-X.noarch.rpm
        INITRPM is shorewall-init-4.6.4-X.noarch.rpm
        LITE6RPM is shorewall6-lite-4.6.4-X.noarch.rpm
        ...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall-core-4.6.4.X.tgz...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall-4.6.4.X.tgz...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall6-4.6.4.X.tgz...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall-lite-4.6.4.X.tgz...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall-init-4.6.4.X.tgz...
        Creating 
/usr/local/src/shorewall-build/BUILD/4.6.4.X/shorewall6-lite-4.6.4.X.tgz...
        Building shorewall-core-4.6.4-X.noarch.rpm...
        cp: cannot stat 
‘/usr/src/packages//RPMS/noarch/shorewall-core-4.6.4-X.noarch.rpm’: No such 
file or directory
        Step "cp -a 
/usr/src/packages//RPMS/noarch/shorewall-core-4.6.4-X.noarch.rpm ." FAILED

??

        ls -al /usr/src/packages//RPMS/noarch/shorewall-core-4.6.4-X.noarch.rpm
                ls: cannot access 
/usr/src/packages//RPMS/noarch/shorewall-core-4.6.4-X.noarch.rpm: No such file 
or directory

instead

        ls -al /usr/src/packages/RPMS/noarch/shorewall*.rpm
                -rw-rw-r-- 1 root root 54K Sep 27 17:51 
/usr/src/packages/RPMS/noarch/shorewall-core-4.6.4-0Beta2.noarch.rpm

where is that "0Beta2" coming from?

I've `setversion`, then built to THAT version.

There's something else at play re: versioning.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to