- adding CREATOR_* variables. Place CREATOR_TAG to the package default filename

This commit is contained in:
DT Netsolution GmbH 2012-01-27 10:00:40 +01:00
parent 6c79660df7
commit 9be0bd41f1
2 changed files with 20 additions and 7 deletions

View File

@ -8,6 +8,16 @@
#################################
TMP_DIR=/tmp
###############################
# CREATOR
###############################
# Part of the published OPSI-package name
CREATOR_TAG=unknown
# Additonal information from the person creating the packages
CREATOR_NAME="Your name"
CREATOR_EMAIL="your-email@domain.de"
##################################
# OPSI repository settings
#################################
@ -18,7 +28,7 @@ OPSI_REPOS_BASE_DIR=$HOME/.opsi-repository
OPSI_REPOS_PRODUCT_DIR=${OPSI_REPOS_BASE_DIR}/${STATUS}/${VENDOR}/${PN}/${VERSION}-${RELEASE}
# OPSI-package filepattern
OPSI_REPOS_FILE_PATTERN=${PN}_${VERSION}-${RELEASE}.opsi
OPSI_REPOS_FILE_PATTERN=${PN}_${VERSION}-${CREATOR_TAG}${RELEASE}.opsi
# Force alway upload to opsi repos
# OPSI_REPOS_FORCE_UPLOAD=1

View File

@ -19,11 +19,11 @@ builder_config() {
. $PRODUCT_DIR/builder-product.cfg
# set default build configuration and source the user dependent file
. $BASEDIR/conf/build-default.cfg
. $BASEDIR/conf/opsi-builder.cfg
# Source local build configuration (must be done AFTER sourcing the release.cfg)
test -f $HOME/.builder.cfg && . $HOME/.builder.cfg && echo "Loaded builder configuration: $HOME/.builder.cfg"
test -f "$BUILD_LOCAL_CFG" && . $BUILD_LOCAL_CFG && echo "Loaded builder configuration: $BUILD_LOCAL_CFG"
test -f $HOME/.opsi-builder.cfg && . $HOME/.opsi-builder.cfg && echo "Loaded builder configuration: $HOME/.opsi-builder.cfg"
test -f "$OPSI_BUILDER" && . $OPSI_BUILDER && echo "Loaded builder configuration: $OPSI_BUILDER"
# Check variables
if [ -z ${OPSI_REPOS_BASE_DIR} ] || [ ! -d ${OPSI_REPOS_BASE_DIR} ] ; then
@ -195,7 +195,7 @@ builder_package() {
# rename opsi package file
if [ "${PN}_${VERSION}-${RELEASE}.opsi" != "$OPSI_REPOS_FILE_PATTERN" ]; then
mv ${PN}_${VERSION}-${RELEASE}.opsi $OPSI_REPOS_FILE_PATTERN
mv ${output_dir}/${PN}_${VERSION}-${RELEASE}.opsi ${output_dir}/$OPSI_REPOS_FILE_PATTERN
fi
}
@ -207,8 +207,11 @@ builder_publish() {
# Upload file to repository
mkdir -p ${OPSI_REPOS_PRODUCT_DIR}
cp $output_dir/$OPSI_REPOS_FILE_PATTERN ${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}
builder_check_error "Can't upload file $output_dir/$OPSI_REPOS_FILE_PATTERN to ${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}"
local src=$output_dir/${OPSI_REPOS_FILE_PATTERN}
local dst=${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}
echo "Publishing opsi-package to $dst"
cp $src $dst
builder_check_error "Can't upload file $dst --> $dst"
}