#296 included spec file in release is not expanded

closed-rejected
Sean Morrison
5
2011-06-28
2011-06-26
R P Herrold
No

The current top level .spec file, used xxx@ values, and also a non-funcitonal %setup stanza

This patch file, run at 'make release' time will fix that issue

[herrold@centos-5 brl-cad]$ cat rph-FIXUP-SPEC.SH
#!/bin/sh
#
# rph-FIXUP-SPEC.SH
# Copyright (c) 2011 R P Herrold <info@owlriver.com> Columbus OH
# License: GPLv3+
#
# fix up the BRL-CAD current spec file at the 7.20.0 release level
# for rpmbuild under CentOS 5 (will also work in the Fedora series)
#
BAS=`basename $0`
TGT="brlcad.spec"
[ ! -e ${TGT} ] && {
echo "error: cannot see target: ${TGT}" 1>&2
export DIE="y"
} || {
cp ${TGT} ${TGT}.bak
}
[ "x$1" = "x" ] && {
echo "error: major version is missing" 1>&2
export DIE="y"
}
[ "x$2" = "x" ] && {
echo "error: minor version is missing" 1>&2
export DIE="y"
}
[ "x$3" = "x" ] && {
echo "error: release string is missing" 1>&2
export DIE="y"
}
[ "x$1" = "x" -o "x$1" = "x-u" -o "x$1" = "x-h" -o "x${DIE}" = "xy" ] && {
echo "usage: ${BAS} major minor release " 1>&2
echo " where eg, major = 7.2 , minor = 0" 1>&2
echo " release = 1%{?dist}%{?_isa} " 1>&2
exit 1
}
#
# fix up version
sed -i -e "s+@MAJOR_VERSION@+${1}+g" -e "s+@MINOR_VERSION@+${2}+g" ${TGT}
#
# fi@PATCH_VERSION@x up release
sed -i -e "s+@PATCH_VERSION@+${3}+g" ${TGT}
#
TARBALL=`grep -i "Source0" ${TGT} | awk {'print $2'}`
# ... presently -- we really need to look at the tarball itself,
# rather than the NAME of the tarball, but ...
TARPATH=`basename ${TARBALL} .tar.gz`
sed -i -e "s+^%setup -q+%setup -q -n ${TARPATH} +g" ${TGT}
#

Discussion

  • Sean Morrison
    Sean Morrison
    2011-06-28

    Patches should go to the patches tracker, not the bug tracker. That said, this patch could not be accepted regardless because you've marked the file as GPLv3+, which is incompatible with out project licensing (LGPLv2 or BSD).

    There is an issue in the generated misc/brlcad.spec file, but our migration to a new build system requires that entire approach to be revisited. Regardless, thanks for noticing and reporting the issue.

     
  • Sean Morrison
    Sean Morrison
    2011-06-28

    • milestone: 387262 --> other bug / workaround
    • assigned_to: nobody --> brlcad
    • status: open --> closed-rejected