Removed BUILDVARS variable in main and section build files
Replaced $PACKAGE_VERSION and $PACKAGE_VERSION variable with $BUILD and $VERSION Miscellaneous fixes to section build files
This commit is contained in:
parent
a04f324663
commit
34502b73e5
5 changed files with 22 additions and 36 deletions
|
@ -15,7 +15,7 @@ if [ -z "$SM_AUTOBUILD" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ${BUILDVARS:-/etc/bldpkg.conf}
|
. /etc/bldpkg.conf
|
||||||
|
|
||||||
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
||||||
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
||||||
|
@ -175,11 +175,10 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get package version and build numbers from the package SMBuild.
|
# Get package version and build numbers from the package SMBuild.
|
||||||
declare PACKAGE_$( egrep -m 1 "^VERSION=.*" $PACKAGE/$PACKAGE.SMBuild )
|
source "$PACKAGE/$PACKAGE.SMBuild"
|
||||||
declare PACKAGE_$( egrep -m 1 "^BUILD=.*" $PACKAGE/$PACKAGE.SMBuild )
|
|
||||||
|
|
||||||
# Check that we got a version and build.
|
# Check that we got a version and build.
|
||||||
[ -z "$PACKAGE_VERSION" ] || [ -z "$PACKAGE_BUILD" ] && {
|
[ -z "$VERSION" ] || [ -z "$BUILD" ] && {
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
|
@ -193,7 +192,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
"" "" "" "\.$PKGEXT" >/dev/null
|
"" "" "" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
||||||
"${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" >/dev/null
|
"${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
# Package with same version/build was found in the main directory.
|
# Package with same version/build was found in the main directory.
|
||||||
SKIP_BUILD=1
|
SKIP_BUILD=1
|
||||||
|
@ -220,8 +219,6 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
exit $ERR
|
exit $ERR
|
||||||
else
|
else
|
||||||
unset CURRENTPKGNUMBER
|
unset CURRENTPKGNUMBER
|
||||||
VERSION="$(cat $SM_PARENTTMP/$PACKAGE.VERSION)"
|
|
||||||
BUILD="$(cat $SM_PARENTTMP/$PACKAGE.BUILD)"
|
|
||||||
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
||||||
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
||||||
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
||||||
|
@ -239,7 +236,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
echo "*** Installing '$PACKAGE'..."
|
echo "*** Installing '$PACKAGE'..."
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
||||||
"${PACKAGE//+/\+}" "${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" ) || {
|
"${PACKAGE//+/\+}" "${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" ) || {
|
||||||
echo
|
echo
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to install '$PACKAGE'."
|
echo "*** Error: failed to install '$PACKAGE'."
|
||||||
|
|
|
@ -15,7 +15,7 @@ if [ -z "$SM_AUTOBUILD" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ${BUILDVARS:-/etc/bldpkg.conf}
|
. /etc/bldpkg.conf
|
||||||
|
|
||||||
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
||||||
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
||||||
|
@ -175,11 +175,10 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get package version and build numbers from the package SMBuild.
|
# Get package version and build numbers from the package SMBuild.
|
||||||
declare PACKAGE_$( egrep -m 1 "^VERSION=.*" $PACKAGE/$PACKAGE.SMBuild )
|
source "$PACKAGE/$PACKAGE.SMBuild"
|
||||||
declare PACKAGE_$( egrep -m 1 "^BUILD=.*" $PACKAGE/$PACKAGE.SMBuild )
|
|
||||||
|
|
||||||
# Check that we got a version and build.
|
# Check that we got a version and build.
|
||||||
[ -z "$PACKAGE_VERSION" ] || [ -z "$PACKAGE_BUILD" ] && {
|
[ -z "$VERSION" ] || [ -z "$BUILD" ] && {
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
|
@ -193,7 +192,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
"" "" "" "\.$PKGEXT" >/dev/null
|
"" "" "" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
||||||
"${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" >/dev/null
|
"${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
# Package with same version/build was found in the main directory.
|
# Package with same version/build was found in the main directory.
|
||||||
SKIP_BUILD=1
|
SKIP_BUILD=1
|
||||||
|
@ -220,8 +219,6 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
exit $ERR
|
exit $ERR
|
||||||
else
|
else
|
||||||
unset CURRENTPKGNUMBER
|
unset CURRENTPKGNUMBER
|
||||||
VERSION="$(cat $SM_PARENTTMP/$PACKAGE.VERSION)"
|
|
||||||
BUILD="$(cat $SM_PARENTTMP/$PACKAGE.BUILD)"
|
|
||||||
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
||||||
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
||||||
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
||||||
|
@ -239,7 +236,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
echo "*** Installing '$PACKAGE'..."
|
echo "*** Installing '$PACKAGE'..."
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
||||||
"${PACKAGE//+/\+}" "${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" ) || {
|
"${PACKAGE//+/\+}" "${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" ) || {
|
||||||
echo
|
echo
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to install '$PACKAGE'."
|
echo "*** Error: failed to install '$PACKAGE'."
|
||||||
|
|
|
@ -15,7 +15,7 @@ if [ -z "$SM_AUTOBUILD" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ${BUILDVARS:-/etc/bldpkg.conf}
|
. /etc/bldpkg.conf
|
||||||
|
|
||||||
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
||||||
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
||||||
|
@ -175,11 +175,10 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get package version and build numbers from the package SMBuild.
|
# Get package version and build numbers from the package SMBuild.
|
||||||
declare PACKAGE_$( egrep -m 1 "^VERSION=.*" $PACKAGE/$PACKAGE.SMBuild )
|
source "$PACKAGE/$PACKAGE.SMBuild"
|
||||||
declare PACKAGE_$( egrep -m 1 "^BUILD=.*" $PACKAGE/$PACKAGE.SMBuild )
|
|
||||||
|
|
||||||
# Check that we got a version and build.
|
# Check that we got a version and build.
|
||||||
[ -z "$PACKAGE_VERSION" ] || [ -z "$PACKAGE_BUILD" ] && {
|
[ -z "$VERSION" ] || [ -z "$BUILD" ] && {
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
|
@ -193,7 +192,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
"" "" "" "\.$PKGEXT" >/dev/null
|
"" "" "" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
||||||
"${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" >/dev/null
|
"${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
# Package with same version/build was found in the main directory.
|
# Package with same version/build was found in the main directory.
|
||||||
SKIP_BUILD=1
|
SKIP_BUILD=1
|
||||||
|
@ -220,8 +219,6 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
exit $ERR
|
exit $ERR
|
||||||
else
|
else
|
||||||
unset CURRENTPKGNUMBER
|
unset CURRENTPKGNUMBER
|
||||||
VERSION="$(cat $SM_PARENTTMP/$PACKAGE.VERSION)"
|
|
||||||
BUILD="$(cat $SM_PARENTTMP/$PACKAGE.BUILD)"
|
|
||||||
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
||||||
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
||||||
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
||||||
|
@ -239,7 +236,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
echo "*** Installing '$PACKAGE'..."
|
echo "*** Installing '$PACKAGE'..."
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
||||||
"${PACKAGE//+/\+}" "${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" ) || {
|
"${PACKAGE//+/\+}" "${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" ) || {
|
||||||
echo
|
echo
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to install '$PACKAGE'."
|
echo "*** Error: failed to install '$PACKAGE'."
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
# Modified and trimmed extensively for use with SMLinux
|
# Modified and trimmed extensively for use with SMLinux
|
||||||
|
|
||||||
# The default list of GSB sections, in the order they should be processed.
|
# The default list of GSB sections, in the order they should be processed.
|
||||||
#SECTIONS="${SECTIONS:- base xorg gtk extra net xfce }"
|
SECTIONS="${SECTIONS:- base xorg gtk extra net xfce }"
|
||||||
SECTIONS="${SECTIONS:- extra }"
|
|
||||||
|
|
||||||
# Generate HTML and TXT reports. Use 1 to enable and 0 to disable.
|
# Generate HTML and TXT reports. Use 1 to enable and 0 to disable.
|
||||||
SM_GENERATEREPORTS=0
|
SM_GENERATEREPORTS=0
|
||||||
|
@ -62,13 +61,12 @@ cd $( cd ${BASH_SOURCE%/*} ; pwd )
|
||||||
|
|
||||||
# Setup the environment
|
# Setup the environment
|
||||||
# Use custom build variables file
|
# Use custom build variables file
|
||||||
BUILDVARS="/etc/bldpkg.conf"
|
|
||||||
SM_PARENTTMP="/tmp"
|
SM_PARENTTMP="/tmp"
|
||||||
PKGDEST=${PKGDEST:-$SM_PARENTTMP/sml/packages}
|
PKGDEST=${PKGDEST:-$SM_PARENTTMP/sml/packages}
|
||||||
LOGSDIR=${LOGSDIR:-$SM_PARENTTMP/sml/sml-buildlogs}
|
LOGSDIR=${LOGSDIR:-$SM_PARENTTMP/sml/sml-buildlogs}
|
||||||
SM_AUTOBUILD=1
|
SM_AUTOBUILD=1
|
||||||
ARCH="$HOSTTYPE"
|
ARCH="$HOSTTYPE"
|
||||||
export BUILDVARS PKGDEST LOGSDIR SM_AUTOBUILD ARCH SM_PARENTTMP
|
export PKGDEST LOGSDIR SM_AUTOBUILD ARCH SM_PARENTTMP
|
||||||
|
|
||||||
# Temporary space, package and log file storage.
|
# Temporary space, package and log file storage.
|
||||||
mkdir -p $PKGDEST $LOGSDIR
|
mkdir -p $PKGDEST $LOGSDIR
|
||||||
|
|
|
@ -15,7 +15,7 @@ if [ -z "$SM_AUTOBUILD" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ${BUILDVARS:-/etc/bldpkg.conf}
|
. /etc/bldpkg.conf
|
||||||
|
|
||||||
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
if [ -n "$SM_AUTOBUILDTEMP" ] ; then
|
||||||
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
SM_AUTOBUILDTEMP="$(echo $SM_AUTOBUILDTEMP)"
|
||||||
|
@ -175,11 +175,10 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get package version and build numbers from the package SMBuild.
|
# Get package version and build numbers from the package SMBuild.
|
||||||
declare PACKAGE_$( egrep -m 1 "^VERSION=.*" $PACKAGE/$PACKAGE.SMBuild )
|
source "$PACKAGE/$PACKAGE.SMBuild"
|
||||||
declare PACKAGE_$( egrep -m 1 "^BUILD=.*" $PACKAGE/$PACKAGE.SMBuild )
|
|
||||||
|
|
||||||
# Check that we got a version and build.
|
# Check that we got a version and build.
|
||||||
[ -z "$PACKAGE_VERSION" ] || [ -z "$PACKAGE_BUILD" ] && {
|
[ -z "$VERSION" ] || [ -z "$BUILD" ] && {
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
echo "*** Error: failed to get VERSION or BUILD from '$PACKAGE.SMBuild'"
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
|
@ -193,7 +192,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
"" "" "" "\.$PKGEXT" >/dev/null
|
"" "" "" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
if find_package_files "$PKGDEST/$SUBDIR" "${PACKAGE//+/\+}" \
|
||||||
"${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" >/dev/null
|
"${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" >/dev/null
|
||||||
then
|
then
|
||||||
# Package with same version/build was found in the main directory.
|
# Package with same version/build was found in the main directory.
|
||||||
SKIP_BUILD=1
|
SKIP_BUILD=1
|
||||||
|
@ -220,8 +219,6 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
exit $ERR
|
exit $ERR
|
||||||
else
|
else
|
||||||
unset CURRENTPKGNUMBER
|
unset CURRENTPKGNUMBER
|
||||||
VERSION="$(cat $SM_PARENTTMP/$PACKAGE.VERSION)"
|
|
||||||
BUILD="$(cat $SM_PARENTTMP/$PACKAGE.BUILD)"
|
|
||||||
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
mv $LOGSDIR/$SECTION/$PACKAGE-$SECTION-$HOSTTYPE.log.txt \
|
||||||
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
$LOGSDIR/$SECTION/$PACKAGE-$VERSION-$BUILD-$SECTION-$HOSTTYPE.log.txt
|
||||||
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
rm -f $SM_PARENTTMP/$PACKAGE.{APP,VERSION,BUILD}
|
||||||
|
@ -239,7 +236,7 @@ mkdir -p $PKGDEST $LOGSDIR/$SECTION
|
||||||
echo "*** Installing '$PACKAGE'..."
|
echo "*** Installing '$PACKAGE'..."
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
upgradepkg --install-new $( find_package_files "$PKGDEST/$SUBDIR" \
|
||||||
"${PACKAGE//+/\+}" "${PACKAGE_VERSION//-/_}" "" "$PACKAGE_BUILD" "\.$PKGEXT" ) || {
|
"${PACKAGE//+/\+}" "${VERSION//-/_}" "" "$BUILD" "\.$PKGEXT" ) || {
|
||||||
echo
|
echo
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "*** Error: failed to install '$PACKAGE'."
|
echo "*** Error: failed to install '$PACKAGE'."
|
||||||
|
|
Loading…
Reference in a new issue