rm -rf boot/
echo "Generating boot iso"
-_run_cmd genisoimage -U -r -v -T -J -joliet-long \
+genisoimage -U -r -v -T -J -joliet-long \
-V "${release_version}" -A "${release_version}" -P ${iso_image_label} \
-b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
mkdir -p $iso_build_dir/rpms
echo "Generating product iso"
-_run_cmd genisoimage -U -r -v -T -J -joliet-long \
+genisoimage -U -r -v -T -J -joliet-long \
-V "${release_version}" -A "${release_version}" -P ${iso_image_label} \
-b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
-o release.iso $iso_build_dir
-_run_cmd isohybrid $tmp/release.iso
+isohybrid $tmp/release.iso
_publish_image $tmp/release.iso $output_image_path
echo "Clean up to preserve workspace footprint"
+++ /dev/null
-#!/bin/bash
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -x
-set -e
-
-scriptdir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
-source $scriptdir/lib.sh
-
-_run_cmd_as_step _create_localrepo
+++ /dev/null
-#!/bin/bash
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -x
-set -e
-
-scriptdir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
-source $scriptdir/lib.sh
-_read_manifest_vars
-
-_run_cmd_as_step _initialize_work_dirs
-
-_run_cmd_as_step $LIBDIR/repo_summary.sh
-
-_run_cmd_as_step $LIBDIR/create_mock_config.sh
echo "Download $sourceurl to $WORKTMP/base-img"
mkdir -pv $WORKTMP/base-img
pushd $WORKTMP/base-img
- _run_cmd wget --no-check-certificate --no-verbose -N \
+ wget --no-check-certificate --no-verbose -N \
--auth-no-challenge $wget_args \
$sourceurl
popd
mkdir -p $work
cp -f $MANIFEST_PATH/*.spec $work
-$scriptdir/create_mock_config.sh $MANIFEST_PATH/build_config.ini $work/mock_config
+$scriptdir/create_mock_config.sh $BUILD_CONFIG_INI $work/mock_config
rpm_macros=$work/rpmmacros
$scriptdir/mock2rpmbuild_config.py --mock-config $work/mock_config/mock.cfg --output-file-path $rpm_macros
config_ini=${1:-$BUILD_CONFIG_INI}
output_repo_files_dir=${2:-$REPO_FILES}
-output_mock_dir=${2:-$(dirname $RPM_BUILDER_SETTINGS)}
+output_mock_dir=${2:-$output_repo_files_dir}
[ -f "$config_ini" ] || _abort "Config INI '$config_ini' not found"
# Create .repo files
WORK=$(readlink -f ${WORK:-$(dirname $(dirname $LIBDIR))})
mkdir -p $WORK
-RPM_BUILDER=$(find $WORK -maxdepth 2 -type d -name rpmbuilder)
WORKTMP=$WORK/tmp
WORKLOGS=$WORKTMP/logs
RPMLISTS=$WORKRESULTS/rpmlists
CHECKSUM_DIR=$WORKRESULTS/bin_checksum
RESULT_IMAGES_DIR=$WORKRESULTS/images
-RPM_BUILDER_SETTINGS=$WORKTMP/mocksettings/mock.cfg
function _read_build_config()
{
_header "STEP OK: $@"
}
-
-function _run_cmd()
-{
- _info "[cmd-start]: $@"
- stamp_start=$(date +%s)
- time $@ 2>&1 || _abort "Command failed: $@"
- stamp_end=$(date +%s)
- echo "$((stamp_end - stamp_start)) $@" >> $DURATION_LOG.unsorted
- sort -nr $DURATION_LOG.unsorted > $DURATION_LOG
- _log "[cmd-end]: $@"
-}
-
-
-function _run_cmd_as_step()
-{
- if [ $# -eq 1 -a -f $1 ]; then
- step="$(basename $1)"
- else
- step="$@"
- fi
- _step $step
- _run_cmd $@
- _success $step
-}
-
function _add_rpms_to_localrepo()
{
local rpms=$@
_create_localrepo
}
-function _add_rpms_dir_to_repo()
-{
- local repo_dir=$1
- local rpm_dir=$2
- mkdir -p $repo_dir
- cp -f $(repomanage --keep=1 --new $rpm_dir) $repo_dir/
-}
-
function _create_localrepo()
{
pushd $REPO_DIR
- _run_cmd createrepo --workers=8 --update .
+ createrepo --workers=8 --update .
popd
pushd $SRC_REPO_DIR
- _run_cmd createrepo --workers=8 --update .
+ createrepo --workers=8 --update .
popd
}
-function _add_rpms_to_repos_from_workdir()
-{
- _add_rpms_dir_to_repo $REPO_DIR $1/buildrepository/mock/rpm
- _add_rpms_dir_to_repo $SRC_REPO_DIR $1/buildrepository/mock/srpm
- #find $1/ -name '*.tar.gz' | xargs rm -f
- true
-}
-
function _publish_results()
{
local from=$1
+++ /dev/null
-#!/bin/bash
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-scriptdir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
-source $scriptdir/lib.sh
-
-_run_repo_cmd()
-{
- _divider
- _run_cmd $@
-}
-
-pushd $WORK/.repo/repo
-_run_repo_cmd git rev-parse --short HEAD
-popd
-echo q | _run_repo_cmd repo info
-_run_repo_cmd repo status -o
-echo q | _run_repo_cmd repo forall -p -c git rev-parse HEAD
-
-# Store build manifest with project HEADS to a file
-repo manifest -o $WORKRESULTS/manifest.xml
-repo manifest -r -o $WORKRESULTS/manifest_revisions.xml