Revert "Add support CentOS-8/dnf/mock-2.6 based builds"
This reverts commit c34d5f4b2e
.
Change-Id: I70735e6571d5699fcfff34afef3aa0a31c089c56
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
1bc9f49b7e
commit
09c66cd0d7
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
# Copyright (c) 2018-2019 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -18,10 +18,6 @@ BUILD_ISO_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
|||||||
source "${BUILD_ISO_DIR}/image-utils.sh"
|
source "${BUILD_ISO_DIR}/image-utils.sh"
|
||||||
source "${BUILD_ISO_DIR}/git-utils.sh"
|
source "${BUILD_ISO_DIR}/git-utils.sh"
|
||||||
|
|
||||||
# Set REPOQUERY, REPOQUERY_SUB_COMMAND, REPOQUERY_RESOLVE and
|
|
||||||
# REPOQUERY_WHATPROVIDES_DELIM for our build environment.
|
|
||||||
source "${BUILD_ISO_DIR}/pkg-manager-utils.sh"
|
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: "
|
echo "Usage: "
|
||||||
@ -44,8 +40,8 @@ usage () {
|
|||||||
MY_YUM_CONF=""
|
MY_YUM_CONF=""
|
||||||
STD_REPO_ID="local-std"
|
STD_REPO_ID="local-std"
|
||||||
RT_REPO_ID="local-rt"
|
RT_REPO_ID="local-rt"
|
||||||
LOWER_LAYER_STD_REPO_ID=""
|
LOWER_LAYER_STD_REPO_ID="StxCentos7Distro"
|
||||||
LOWER_LAYER_RT_REPO_ID=""
|
LOWER_LAYER_RT_REPO_ID="StxCentos7Distro-rt"
|
||||||
|
|
||||||
NPROCS=$(nproc)
|
NPROCS=$(nproc)
|
||||||
|
|
||||||
@ -162,10 +158,6 @@ function init_vars {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# LOWER_LAYER_STD_REPO_ID should be something like StxCentos7Distro or StxCentos8Distro
|
|
||||||
LOWER_LAYER_STD_REPO_ID=$(grep '\[StxCentos.*Distro\]' ${MY_YUM_CONF} | sed -e 's/^\[//' -e 's/\].*//')
|
|
||||||
LOWER_LAYER_RT_REPO_ID=$(grep '\[StxCentos.*Distro-rt\]' ${MY_YUM_CONF} | sed -e 's/^\[//' -e 's/\].*//')
|
|
||||||
|
|
||||||
DISTRO_REPO_DIR=$(for d in $(grep baseurl $MY_YUM_CONF | grep file: | awk -F : '{print $2}' | sed 's:///:/:g'); do if [ -d $d/images ]; then echo $d ;fi; done)
|
DISTRO_REPO_DIR=$(for d in $(grep baseurl $MY_YUM_CONF | grep file: | awk -F : '{print $2}' | sed 's:///:/:g'); do if [ -d $d/images ]; then echo $d ;fi; done)
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -503,7 +495,7 @@ function final_touches {
|
|||||||
|
|
||||||
function extract_pkg_from_local_repo {
|
function extract_pkg_from_local_repo {
|
||||||
local pkgname=$1
|
local pkgname=$1
|
||||||
local pkg_mgr_conf=$2
|
local yum_conf=$2
|
||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
local repoid=""
|
local repoid=""
|
||||||
@ -513,14 +505,7 @@ function extract_pkg_from_local_repo {
|
|||||||
repoid_arg+=" --repoid=${repoid}"
|
repoid_arg+=" --repoid=${repoid}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "TMPDIR=$TMP_DIR"\
|
local pkgfile=$(TMPDIR=$TMP_DIR repoquery --config=${yum_conf} ${repoid_arg} --location -q ${pkgname})
|
||||||
"${REPOQUERY} --config=${pkg_mgr_conf} ${repoid_arg}"\
|
|
||||||
"${REPOQUERY_SUB_COMMAND} --location"\
|
|
||||||
"--arch=noarch,x86_64 -q ${pkgname}"
|
|
||||||
local pkgfile=$(TMPDIR=$TMP_DIR \
|
|
||||||
${REPOQUERY} --config=${pkg_mgr_conf} ${repoid_arg} \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --location \
|
|
||||||
--arch=noarch,x86_64 -q ${pkgname})
|
|
||||||
if [ -z "${pkgfile}" ]; then
|
if [ -z "${pkgfile}" ]; then
|
||||||
echo "Could not find package $pkgname in $@"
|
echo "Could not find package $pkgname in $@"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
# Copyright (c) 2018 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -15,10 +15,6 @@
|
|||||||
|
|
||||||
BUILD_PKGS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
BUILD_PKGS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||||
|
|
||||||
# Set REPOQUERY and REPOQUERY_SUB_COMMAND for our build environment.
|
|
||||||
source "${BUILD_PKGS_DIR}/pkg-manager-utils.sh"
|
|
||||||
|
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: "
|
echo "Usage: "
|
||||||
@ -79,15 +75,11 @@ make_cache_current_rpms () {
|
|||||||
if [ -d $MY_WORKSPACE/$build_type/rpmbuild/$rpm_type/repodata ]; then
|
if [ -d $MY_WORKSPACE/$build_type/rpmbuild/$rpm_type/repodata ]; then
|
||||||
current=$MY_WORKSPACE/$build_type/rpmbuild/$rpm_type/
|
current=$MY_WORKSPACE/$build_type/rpmbuild/$rpm_type/
|
||||||
|
|
||||||
${REPOQUERY} \
|
repoquery \
|
||||||
--repofrompath=$build_type-$rpm_type,$current \
|
--repofrompath=$build_type-$rpm_type,$current \
|
||||||
--repoid=$build_type-$rpm_type --arch=noarch,src,x86_64 \
|
--repoid=$build_type-$rpm_type --arch=noarch,src,x86_64 -a \
|
||||||
${REPOQUERY_SUB_COMMAND} \
|
|
||||||
--all \
|
|
||||||
--qf "%-10{repoid} %-40{name} %-10{version} %-10{release}" \
|
--qf "%-10{repoid} %-40{name} %-10{version} %-10{release}" \
|
||||||
>> ${FILE}
|
>> ${FILE}
|
||||||
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
done;
|
done;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
# Copyright (c) 2018 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -24,12 +24,9 @@
|
|||||||
# messages go by!
|
# messages go by!
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
export ME=$(basename "$0")
|
export ME=$(basename "$0")
|
||||||
CMDLINE="$ME $@"
|
CMDLINE="$ME $@"
|
||||||
BUILD_RPMS_PARALLEL_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
|
||||||
|
|
||||||
# Set PKG_MANAGER for our build environment.
|
|
||||||
source "${BUILD_RPMS_PARALLEL_DIR}/pkg-manager-utils.sh"
|
|
||||||
|
|
||||||
|
|
||||||
# Build for distribution. Currently 'centos' is only supported value.
|
# Build for distribution. Currently 'centos' is only supported value.
|
||||||
@ -71,19 +68,6 @@ if [ $? -ne 0 ]; then
|
|||||||
CREATEREPO="createrepo"
|
CREATEREPO="createrepo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Yum vs DNF compatibility
|
|
||||||
YUM=$(which yum)
|
|
||||||
DNF=$(which dnf)
|
|
||||||
PKG_MANAGER=""
|
|
||||||
if [ ! -z ${DNF} ]; then
|
|
||||||
PKG_MANAGER="dnf"
|
|
||||||
elif [ ! -z ${YUM} ]; then
|
|
||||||
PKG_MANAGER="yum"
|
|
||||||
else
|
|
||||||
echo "ERROR: Couldn't find a supported package manager"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Old repo path or new?
|
# Old repo path or new?
|
||||||
LOCAL_REPO=${MY_REPO}/local-repo
|
LOCAL_REPO=${MY_REPO}/local-repo
|
||||||
if [ ! -d ${LOCAL_REPO} ]; then
|
if [ ! -d ${LOCAL_REPO} ]; then
|
||||||
@ -195,14 +179,7 @@ create-no-clean-list () {
|
|||||||
local g
|
local g
|
||||||
|
|
||||||
for g in $install_groups; do
|
for g in $install_groups; do
|
||||||
# Find manditory packages in the group.
|
tmp_list=$(yum -c $MY_YUM_CONF groupinfo $g 2>> /dev/null | awk 'f;/Mandatory Packages:/{f=1}' | cut -c 5-)
|
||||||
# Discard anything before (and including) 'Mandatory Packages:'
|
|
||||||
# and anything after (and including) 'Optional Packages:'.
|
|
||||||
# Also discard leading spaces or '+' characters.
|
|
||||||
tmp_list=$(${PKG_MANAGER} -c $MY_YUM_CONF groupinfo $g 2>> /dev/null \
|
|
||||||
| awk 'f;/Mandatory Packages:/{f=1}' \
|
|
||||||
| sed -n '/Optional Packages:/q;p' \
|
|
||||||
| sed 's#[ +]*##')
|
|
||||||
noclean_list=$(join_by ' ' $noclean_list $tmp_list)
|
noclean_list=$(join_by ' ' $noclean_list $tmp_list)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -212,7 +189,7 @@ create-no-clean-list () {
|
|||||||
|
|
||||||
while [ $noclean_list_len -gt $noclean_last_list_len ]; do
|
while [ $noclean_list_len -gt $noclean_last_list_len ]; do
|
||||||
noclean_last_list_len=$noclean_list_len
|
noclean_last_list_len=$noclean_list_len
|
||||||
noclean_list=$( (${PKG_MANAGER} -c $MY_YUM_CONF deplist $noclean_list 2>> /dev/null | grep provider: | awk '{ print $2 }' | awk -F . '{ print $1 }'; for p in $noclean_list; do echo $p; done) | sort --uniq)
|
noclean_list=$( (yum -c $MY_YUM_CONF deplist $noclean_list 2>> /dev/null | grep provider: | awk '{ print $2 }' | awk -F . '{ print $1 }'; for p in $noclean_list; do echo $p; done) | sort --uniq)
|
||||||
noclean_list_len=$(echo $noclean_list | wc -w)
|
noclean_list_len=$(echo $noclean_list | wc -w)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -334,9 +311,7 @@ create_lst () {
|
|||||||
recreate_repodata () {
|
recreate_repodata () {
|
||||||
local DIR=${1}
|
local DIR=${1}
|
||||||
|
|
||||||
(
|
(cd $DIR
|
||||||
mkdir -p $DIR
|
|
||||||
cd $DIR
|
|
||||||
if [ -f repodata/*comps*xml ]; then
|
if [ -f repodata/*comps*xml ]; then
|
||||||
\mv repodata/*comps*xml comps.xml
|
\mv repodata/*comps*xml comps.xml
|
||||||
fi
|
fi
|
||||||
@ -971,11 +946,11 @@ mock_clean_cfg () {
|
|||||||
echo "=================================="
|
echo "=================================="
|
||||||
mock_clean_cache_cfg $CFG
|
mock_clean_cache_cfg $CFG
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --clean"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --clean"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --clean
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --clean
|
||||||
### Note: this sometimes leaves behind a $MY_WORKSPACE/cache/mock/yum_cache/yumcache.lock
|
### Note: this sometimes leaves behind a $MY_WORKSPACE/cache/mock/yum_cache/yumcache.lock
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
mock_clean_cache_all_cfg $CFG
|
mock_clean_cache_all_cfg $CFG
|
||||||
@ -1086,8 +1061,8 @@ mock_partial_clean_cfg () {
|
|||||||
if [ "$DELETE_LIST" != "" ]; then
|
if [ "$DELETE_LIST" != "" ]; then
|
||||||
rpm -e --nodeps $DELETE_LIST;
|
rpm -e --nodeps $DELETE_LIST;
|
||||||
fi'
|
fi'
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --chroot "bash -c '$CMD'" &>> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --chroot "bash -c '$CMD'" &>> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -1137,8 +1112,8 @@ mock_clean_cache_cfg () {
|
|||||||
|
|
||||||
clean_yum_cache_cfg $CFG
|
clean_yum_cache_cfg $CFG
|
||||||
|
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache" &> $TMP
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache" &> $TMP
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache &>> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache &>> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -1166,8 +1141,8 @@ mock_clean_cache_all_cfg () {
|
|||||||
echo "=================================="
|
echo "=================================="
|
||||||
clean_yum_cache_cfg $CFG
|
clean_yum_cache_cfg $CFG
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,16 +1169,9 @@ mock_clean_metadata_cfg () {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CMD=$((cat $CFG; \
|
CMD=$((cat $CFG; grep config_opts\\[\'yum.conf\'\\\] $CFG | sed 's#\\n#\n#g') | grep '^[[]' | grep -v main | sed 's/[][]//g' | sed 's#^#yum --enablerepo=#' | sed 's#$# clean metadata#' | sort -u | tr '\n' ';')
|
||||||
grep config_opts\\[\'yum.conf\'\\\] $CFG | \
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
||||||
sed 's#\\n#\n#g') | \
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --chroot "bash -c '($CMD)'" &>>$TMP
|
||||||
grep '^[[]' | \
|
|
||||||
grep -v main | \
|
|
||||||
sed -e 's/[][]//g' -e "s#^#${PKG_MANAGER} --enablerepo=#" -e 's#$# clean metadata#' | \
|
|
||||||
sort -u | \
|
|
||||||
tr '\n' ';')
|
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --chroot "bash -c '($CMD)'" &>>$TMP
|
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -1390,8 +1358,8 @@ mock_update_cfg () {
|
|||||||
echo "${FUNCNAME[0]}: $CFG"
|
echo "${FUNCNAME[0]}: $CFG"
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --update"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --update"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --update
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --update
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,8 +1368,8 @@ mock_init_cfg () {
|
|||||||
echo "${FUNCNAME[0]}: $CFG"
|
echo "${FUNCNAME[0]}: $CFG"
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --init"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --init"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --init
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --init
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1420,14 +1388,14 @@ mock_update_or_init_cfg () {
|
|||||||
if [ -d $ROOT_DIR/root ]; then
|
if [ -d $ROOT_DIR/root ]; then
|
||||||
echo "Updating the mock environment"
|
echo "Updating the mock environment"
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --update"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --update"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --update &> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --update &> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
else
|
else
|
||||||
echo "Init the mock environment"
|
echo "Init the mock environment"
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --init"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --init"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --init &> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --init &> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
fi
|
fi
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
@ -2331,28 +2299,15 @@ mock_clean_metadata
|
|||||||
echo
|
echo
|
||||||
echo "Building"
|
echo "Building"
|
||||||
|
|
||||||
recreate_repodata $BUILD_BASE/results/$BUILD_ENVIRONMENT_DIR
|
|
||||||
|
|
||||||
CMD_PREFIX=""
|
CMD_PREFIX=""
|
||||||
if [ -x /bin/ionice ]; then
|
if [ -x /bin/ionice ]; then
|
||||||
CMD_PREFIX="nice -n 20 ionice -c Idle /bin/ionice "
|
CMD_PREFIX="nice -n 20 ionice -c Idle /bin/ionice "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REAL_MOCKCHAIN=0
|
CMD_OPTIONS="-m --no-clean -m --no-cleanup-after"
|
||||||
MOCK_PASSTHROUGH="-m"
|
|
||||||
MOCKCHAIN="mockchain-parallel"
|
|
||||||
CHAIN_OPTION=""
|
|
||||||
if file $(which mockchain) | grep -q 'Python script'; then
|
|
||||||
REAL_MOCKCHAIN=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
CMD_OPTIONS="$MOCK_PASSTHROUGH --no-clean $MOCK_PASSTHROUGH --no-cleanup-after"
|
|
||||||
if [ $CAREFUL -eq 1 ]; then
|
if [ $CAREFUL -eq 1 ]; then
|
||||||
CMD_OPTIONS="$MOCK_PASSTHROUGH --no-cleanup-after"
|
CMD_OPTIONS="-m --no-cleanup-after"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CMD_OPTIONS+=" --log=$MOCKCHAIN_LOG"
|
|
||||||
|
|
||||||
echo "CAREFUL=$CAREFUL"
|
echo "CAREFUL=$CAREFUL"
|
||||||
|
|
||||||
# Sets WORKERS and MOCKCHAIN_RESOURCE_ALLOCATION
|
# Sets WORKERS and MOCKCHAIN_RESOURCE_ALLOCATION
|
||||||
@ -2360,13 +2315,13 @@ compute_resources $SRPMS_LIST
|
|||||||
|
|
||||||
|
|
||||||
if [ -f $SRPM_RPM_DIRECT_REQUIRES_FILE ]; then
|
if [ -f $SRPM_RPM_DIRECT_REQUIRES_FILE ]; then
|
||||||
CMD_OPTIONS+=" --srpm-dependency-file $SRPM_RPM_DIRECT_REQUIRES_FILE"
|
CMD_OPTIONS="$CMD_OPTIONS --srpm-dependency-file $SRPM_RPM_DIRECT_REQUIRES_FILE"
|
||||||
fi
|
fi
|
||||||
if [ -f "$RPM_DIRECT_REQUIRES_FILE" ]; then
|
if [ -f "$RPM_DIRECT_REQUIRES_FILE" ]; then
|
||||||
CMD_OPTIONS+=" --rpm-dependency-file $RPM_DIRECT_REQUIRES_FILE"
|
CMD_OPTIONS="$CMD_OPTIONS --rpm-dependency-file $RPM_DIRECT_REQUIRES_FILE"
|
||||||
fi
|
fi
|
||||||
if [ -f "$RPM_TO_SRPM_MAP_FILE" ]; then
|
if [ -f "$RPM_TO_SRPM_MAP_FILE" ]; then
|
||||||
CMD_OPTIONS+=" --rpm-to-srpm-map-file $RPM_TO_SRPM_MAP_FILE"
|
CMD_OPTIONS="$CMD_OPTIONS --rpm-to-srpm-map-file $RPM_TO_SRPM_MAP_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -2387,12 +2342,12 @@ echo "MAX_WORKERS=$MAX_WORKERS"
|
|||||||
echo "MOCKCHAIN_RESOURCE_ALLOCATION=$MOCKCHAIN_RESOURCE_ALLOCATION"
|
echo "MOCKCHAIN_RESOURCE_ALLOCATION=$MOCKCHAIN_RESOURCE_ALLOCATION"
|
||||||
|
|
||||||
|
|
||||||
CMD="$CMD_PREFIX $MOCKCHAIN --root $BUILD_CFG --localrepo $BUILD_BASE --recurse --workers=$MAX_WORKERS --worker-resources=$MOCKCHAIN_RESOURCE_ALLOCATION --basedir=$MY_WORKSPACE --tmp_prefix=$USER --addrepo=$LOCAL_URL --addrepo=$LOCAL_SRC_URL $CMD_OPTIONS $MOCK_PASSTHROUGH --rebuild"
|
CMD="$CMD_PREFIX mockchain-parallel -r $BUILD_CFG -l $BUILD_BASE --recurse --workers=$MAX_WORKERS --worker-resources=$MOCKCHAIN_RESOURCE_ALLOCATION --basedir=$MY_WORKSPACE --log=$MOCKCHAIN_LOG --tmp_prefix=$USER --addrepo=$LOCAL_URL --addrepo=$LOCAL_SRC_URL $CMD_OPTIONS -m --rebuild $SRPMS_LIST"
|
||||||
CMD_BUILD_LIST="$CHAIN_OPTION $SRPMS_LIST"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "$CMD $MOCK_PASSTHROUGH --define='_tis_dist .tis' $MOCK_PASSTHROUGH --define='platform_release $PLATFORM_RELEASE' $CMD_BUILD_LIST"
|
echo "$CMD -m --define='_tis_dist .tis' -m --define='platform_release $PLATFORM_RELEASE'"
|
||||||
echo ""
|
echo ""
|
||||||
trapwrap stdbuf -o0 $CMD $MOCK_PASSTHROUGH --define="_tis_dist .tis" $MOCK_PASSTHROUGH --define="platform_release $PLATFORM_RELEASE" $CMD_BUILD_LIST
|
|
||||||
|
trapwrap stdbuf -o0 $CMD -m --define="_tis_dist .tis" -m --define="platform_release $PLATFORM_RELEASE"
|
||||||
MOCKCHAIN_RC=$?
|
MOCKCHAIN_RC=$?
|
||||||
|
|
||||||
echo $PLATFORM_RELEASE > $LAST_PLATFORM_RELEASE_FILE
|
echo $PLATFORM_RELEASE > $LAST_PLATFORM_RELEASE_FILE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
# Copyright (c) 2018 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -118,14 +118,7 @@ create-no-clean-list () {
|
|||||||
local g
|
local g
|
||||||
|
|
||||||
for g in $install_groups; do
|
for g in $install_groups; do
|
||||||
# Find manditory packages in the group.
|
tmp_list=$(yum -c $MY_YUM_CONF groupinfo $g 2>> /dev/null | awk 'f;/Mandatory Packages:/{f=1}' | cut -c 5-)
|
||||||
# Discard anything before (and including) 'Mandatory Packages:'
|
|
||||||
# and anything after (and including) 'Optional Packages:'.
|
|
||||||
# Also discard leading spaces or '+' characters.
|
|
||||||
tmp_list=$(${PKG_MANAGER} -c $MY_YUM_CONF groupinfo $g 2>> /dev/null \
|
|
||||||
| awk 'f;/Mandatory Packages:/{f=1}' \
|
|
||||||
| sed -n '/Optional Packages:/q;p' \
|
|
||||||
| sed 's#[ +]*##')
|
|
||||||
noclean_list=$(join_by ' ' $noclean_list $tmp_list)
|
noclean_list=$(join_by ' ' $noclean_list $tmp_list)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -176,9 +169,7 @@ create_lst () {
|
|||||||
recreate_repodata () {
|
recreate_repodata () {
|
||||||
local DIR=${1}
|
local DIR=${1}
|
||||||
|
|
||||||
(
|
(cd $DIR
|
||||||
mkdir -p $DIR
|
|
||||||
cd $DIR
|
|
||||||
if [ -f repodata/*comps*xml ]; then
|
if [ -f repodata/*comps*xml ]; then
|
||||||
\mv repodata/*comps*xml comps.xml
|
\mv repodata/*comps*xml comps.xml
|
||||||
fi
|
fi
|
||||||
@ -763,11 +754,11 @@ mock_clean_cfg () {
|
|||||||
echo "=================================="
|
echo "=================================="
|
||||||
mock_clean_cache_cfg $CFG
|
mock_clean_cache_cfg $CFG
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --clean"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --clean"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --clean
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --clean
|
||||||
### Note: this sometimes leaves behind a $MY_WORKSPACE/cache/mock/yum_cache/yumcache.lock
|
### Note: this sometimes leaves behind a $MY_WORKSPACE/cache/mock/yum_cache/yumcache.lock
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
mock_clean_cache_all_cfg $CFG
|
mock_clean_cache_all_cfg $CFG
|
||||||
@ -869,8 +860,8 @@ mock_partial_clean_cfg () {
|
|||||||
if [ "$DELETE_LIST" != "" ]; then
|
if [ "$DELETE_LIST" != "" ]; then
|
||||||
rpm -e --nodeps $DELETE_LIST;
|
rpm -e --nodeps $DELETE_LIST;
|
||||||
fi'
|
fi'
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --chroot "bash -c '$CMD'" &>> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --chroot "bash -c '$CMD'" &>> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -916,8 +907,8 @@ mock_clean_cache_cfg () {
|
|||||||
|
|
||||||
clean_yum_cache_cfg $CFG
|
clean_yum_cache_cfg $CFG
|
||||||
|
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache" &> $TMP
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache" &> $TMP
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache &>> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=root-cache --scrub=yum-cache --scrub=cache &>> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -940,8 +931,8 @@ mock_clean_cache_all_cfg () {
|
|||||||
echo "=================================="
|
echo "=================================="
|
||||||
clean_yum_cache_cfg $CFG
|
clean_yum_cache_cfg $CFG
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --scrub=all
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --scrub=all
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -965,8 +956,8 @@ mock_clean_metadata_cfg () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CMD=$((cat $CFG; grep config_opts\\[\'yum.conf\'\\\] $CFG | sed 's#\\n#\n#g') | grep '^[[]' | grep -v main | sed 's/[][]//g' | sed 's#^#yum --enablerepo=#' | sed 's#$# clean metadata#' | sort -u | tr '\n' ';')
|
CMD=$((cat $CFG; grep config_opts\\[\'yum.conf\'\\\] $CFG | sed 's#\\n#\n#g') | grep '^[[]' | grep -v main | sed 's/[][]//g' | sed 's#^#yum --enablerepo=#' | sed 's#$# clean metadata#' | sort -u | tr '\n' ';')
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --chroot bash -c $CMD" &> $TMP
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --chroot "bash -c '($CMD)'" &>>$TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --chroot "bash -c '($CMD)'" &>>$TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
cat $TMP
|
cat $TMP
|
||||||
@ -1140,8 +1131,8 @@ mock_update_cfg () {
|
|||||||
echo "${FUNCNAME[0]}: $CFG"
|
echo "${FUNCNAME[0]}: $CFG"
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --update"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --update"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --update
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --update
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1150,8 +1141,8 @@ mock_init_cfg () {
|
|||||||
echo "${FUNCNAME[0]}: $CFG"
|
echo "${FUNCNAME[0]}: $CFG"
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --init"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --init"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --init
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --init
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1170,14 +1161,14 @@ mock_update_or_init_cfg () {
|
|||||||
if [ -d $ROOT_DIR/root ]; then
|
if [ -d $ROOT_DIR/root ]; then
|
||||||
echo "Updating the mock environment"
|
echo "Updating the mock environment"
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --update"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --update"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --update &> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --update &> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
else
|
else
|
||||||
echo "Init the mock environment"
|
echo "Init the mock environment"
|
||||||
set_mock_symlinks $CFG
|
set_mock_symlinks $CFG
|
||||||
echo "$MOCK --root $CFG --configdir $(dirname $CFG) --init"
|
echo "$MOCK -r $CFG --configdir $(dirname $CFG) --init"
|
||||||
trapwrap_n $CFG $MOCK --root $CFG --configdir $(dirname $CFG) --init &> $TMP
|
trapwrap_n $CFG $MOCK -r $CFG --configdir $(dirname $CFG) --init &> $TMP
|
||||||
RC=$?
|
RC=$?
|
||||||
fi
|
fi
|
||||||
if [ $RC -ne 0 ]; then
|
if [ $RC -ne 0 ]; then
|
||||||
@ -2068,40 +2059,21 @@ mock_clean_metadata
|
|||||||
echo
|
echo
|
||||||
echo "Building"
|
echo "Building"
|
||||||
|
|
||||||
recreate_repodata $BUILD_BASE/results/$BUILD_ENVIRONMENT_DIR
|
|
||||||
|
|
||||||
CMD_PREFIX=""
|
CMD_PREFIX=""
|
||||||
if [ -x /bin/ionice ]; then
|
if [ -x /bin/ionice ]; then
|
||||||
CMD_PREFIX="nice -n 20 ionice -c Idle /bin/ionice "
|
CMD_PREFIX="nice -n 20 ionice -c Idle /bin/ionice "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REAL_MOCKCHAIN=0
|
CMD_OPTIONS="-m --no-clean -m --no-cleanup-after"
|
||||||
MOCK_PASSTHROUGH=""
|
|
||||||
MOCKCHAIN="mock"
|
|
||||||
CHAIN_OPTION="--chain"
|
|
||||||
if file $(which mockchain) | grep -q 'Python script'; then
|
|
||||||
REAL_MOCKCHAIN=1
|
|
||||||
MOCK_PASSTHROUGH="-m"
|
|
||||||
MOCKCHAIN="mockchain"
|
|
||||||
CHAIN_OPTION=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
CMD_OPTIONS="$MOCK_PASSTHROUGH --no-clean $MOCK_PASSTHROUGH --no-cleanup-after"
|
|
||||||
if [ $CAREFUL -eq 1 ]; then
|
if [ $CAREFUL -eq 1 ]; then
|
||||||
CMD_OPTIONS="$MOCK_PASSTHROUGH --no-cleanup-after"
|
CMD_OPTIONS="-m --no-cleanup-after"
|
||||||
fi
|
|
||||||
if [ $REAL_MOCKCHAIN -eq 1 ]; then
|
|
||||||
CMD_OPTIONS+=" --log=$MOCKCHAIN_LOG"
|
|
||||||
fi
|
fi
|
||||||
echo "CAREFUL=$CAREFUL"
|
echo "CAREFUL=$CAREFUL"
|
||||||
echo "CMD_OPTIONS=$CMD_OPTIONS"
|
echo "CMD_OPTIONS=$CMD_OPTIONS"
|
||||||
|
|
||||||
CMD="$CMD_PREFIX $MOCKCHAIN --root $BUILD_CFG --localrepo $BUILD_BASE --recurse --tmp_prefix=$USER --addrepo=$LOCAL_URL --addrepo=$LOCAL_SRC_URL $MOCK_PASSTHROUGH --rootdir=$BUILD_BASE/mock/root $CMD_OPTIONS $MOCK_PASSTHROUGH --rebuild"
|
CMD="$CMD_PREFIX mockchain -r $BUILD_CFG -l $BUILD_BASE --recurse --log=$MOCKCHAIN_LOG --tmp_prefix=$USER --addrepo=$LOCAL_URL --addrepo=$LOCAL_SRC_URL -m --rootdir=$BUILD_BASE/mock/root $CMD_OPTIONS -m --rebuild $SRPMS_LIST"
|
||||||
CMD_BUILD_LIST="$CHAIN_OPTION $SRPMS_LIST"
|
echo "$CMD -m --define='_tis_dist .tis' -m --define='platform_release $PLATFORM_RELEASE'"
|
||||||
echo ""
|
trapwrap stdbuf -o0 $CMD -m --define='_tis_dist .tis' -m --define="platform_release $PLATFORM_RELEASE"
|
||||||
echo "$CMD $MOCK_PASSTHROUGH --define='_tis_dist .tis' $MOCK_PASSTHROUGH --define='platform_release $PLATFORM_RELEASE' $CMD_BUILD_LIST"
|
|
||||||
echo ""
|
|
||||||
trapwrap stdbuf -o0 $CMD $MOCK_PASSTHROUGH --define="_tis_dist .tis" $MOCK_PASSTHROUGH --define="platform_release $PLATFORM_RELEASE" $CMD_BUILD_LIST
|
|
||||||
MOCKCHAIN_RC=$?
|
MOCKCHAIN_RC=$?
|
||||||
|
|
||||||
echo $PLATFORM_RELEASE > $LAST_PLATFORM_RELEASE_FILE
|
echo $PLATFORM_RELEASE > $LAST_PLATFORM_RELEASE_FILE
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
# Here's the score, kids. There are a few different places from which we can
|
# Here's the score, kids. There are a few different places from which we can
|
||||||
# get packages. In priority order, they are:
|
# get packages. In priority order, they are:
|
||||||
#
|
#
|
||||||
@ -32,24 +26,18 @@
|
|||||||
# export/dist/report_deps.txt
|
# export/dist/report_deps.txt
|
||||||
#
|
#
|
||||||
|
|
||||||
CGTS_DEPS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
|
||||||
|
|
||||||
# Set REPOQUERY, REPOQUERY_SUB_COMMAND, REPOQUERY_RESOLVE and
|
|
||||||
# REPOQUERY_WHATPROVIDES_DELIM for our build environment.
|
|
||||||
source ${CGTS_DEPS_DIR}/../pkg-manager-utils.sh
|
|
||||||
|
|
||||||
# This function generates a simple file of dependencies we're trying to resolve
|
# This function generates a simple file of dependencies we're trying to resolve
|
||||||
function generate_dep_list {
|
function generate_dep_list {
|
||||||
TMP_RPM_DB=$(mktemp -d $(pwd)/tmp_rpm_db_XXXXXX)
|
TMP_RPM_DB=$(mktemp -d $(pwd)/tmp_rpm_db_XXXXXX)
|
||||||
mkdir -p $TMP_RPM_DB
|
mkdir -p $TMP_RPM_DB
|
||||||
rpm --initdb --dbpath $TMP_RPM_DB
|
rpm --initdb --dbpath $TMP_RPM_DB
|
||||||
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' > $DEPLISTFILE_NEW 2>&1
|
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' >> $DEPDETAILLISTFILE 2>&1
|
||||||
cat $DEPLISTFILE_NEW >> $DEPDETAILLISTFILE
|
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' 2>&1 \
|
||||||
cat $DEPLISTFILE_NEW \
|
| grep -v "error:" \
|
||||||
| grep -v -e "error:" -e "warning:" -e "Preparing..." \
|
| grep -v "warning:" \
|
||||||
-e "Verifying..." -e "installing package" \
|
| grep -v "Preparing..." \
|
||||||
| sed -e "s/ is needed by.*$//" -e "s/ >=.*$//" \
|
| grep -v "installing package" \
|
||||||
| sort -u > $DEPLISTFILE
|
| sed "s/ is needed by.*$//" | sed "s/ >=.*$//" | sort -u > $DEPLISTFILE
|
||||||
\rm -rf $TMP_RPM_DB
|
\rm -rf $TMP_RPM_DB
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,17 +79,8 @@ function install_deps {
|
|||||||
|
|
||||||
# go through each repo and convert deps to packages based on package name
|
# go through each repo and convert deps to packages based on package name
|
||||||
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
||||||
echo "TMPDIR=${TMP_DIR}"\
|
echo "TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch ${DEP_LIST} --qf='%{name}'"
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=$REPOID"\
|
TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --qf='%{name}' ${DEP_LIST} | sed "s/kernel-debug/kernel/g" >> $UNSORTED_PACKAGES
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
|
||||||
"${DEP_LIST} --qf='%{name}'"
|
|
||||||
|
|
||||||
TMPDIR=${TMP_DIR} \
|
|
||||||
${REPOQUERY} --config=${YUM} --repoid=$REPOID \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch \
|
|
||||||
--qf='%{name}' ${DEP_LIST} \
|
|
||||||
| sed "s/kernel-debug/kernel/g" >> $UNSORTED_PACKAGES
|
|
||||||
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
done
|
done
|
||||||
sort $UNSORTED_PACKAGES -u > $SORTED_PACKAGES
|
sort $UNSORTED_PACKAGES -u > $SORTED_PACKAGES
|
||||||
@ -121,24 +100,15 @@ function install_deps {
|
|||||||
\cp $SORTED_PACKAGES $UNSORTED_PACKAGES
|
\cp $SORTED_PACKAGES $UNSORTED_PACKAGES
|
||||||
while read DEP
|
while read DEP
|
||||||
do
|
do
|
||||||
DEP_LIST="${DEP_LIST}${REPOQUERY_WHATPROVIDES_DELIM}${DEP}"
|
DEP_LIST="${DEP_LIST} ${DEP}"
|
||||||
done < $UNRESOLVED_PACKAGES
|
done < $UNRESOLVED_PACKAGES
|
||||||
|
|
||||||
DEP_LIST=$(echo "$DEP_LIST" | sed "s/^${REPOQUERY_WHATPROVIDES_DELIM}//g")
|
DEP_LIST=$(echo "$DEP_LIST" | sed 's/^ //g')
|
||||||
if [ "$DEP_LIST" != "" ]; then
|
if [ "$DEP_LIST" != "" ]; then
|
||||||
|
|
||||||
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
||||||
echo "TMPDIR=${TMP_DIR}"\
|
echo "TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --whatprovides ${DEP_LIST} --qf='%{name}'"
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=${REPOID}"\
|
TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --qf='%{name}' --whatprovides ${DEP_LIST} | sed "s/kernel-debug/kernel/g" >> $UNSORTED_PACKAGES
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
|
||||||
"--qf='%{name}' --whatprovides ${DEP_LIST}"
|
|
||||||
|
|
||||||
TMPDIR=${TMP_DIR} \
|
|
||||||
${REPOQUERY} --config=${YUM} --repoid=${REPOID} \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch \
|
|
||||||
--qf='%{name}' --whatprovides "${DEP_LIST}" \
|
|
||||||
| sed "s/kernel-debug/kernel/g" >> $UNSORTED_PACKAGES
|
|
||||||
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -167,20 +137,8 @@ function install_deps {
|
|||||||
|
|
||||||
if [[ ! -z "${TARGETS// }" ]]; then
|
if [[ ! -z "${TARGETS// }" ]]; then
|
||||||
REPO_PATH=$(cat $YUM | sed -n "/^\[$REPOID\]\$/,\$p" | grep '^baseurl=' | head -n 1 | awk -F 'file://' '{print $2}' | sed 's:/$::')
|
REPO_PATH=$(cat $YUM | sed -n "/^\[$REPOID\]\$/,\$p" | grep '^baseurl=' | head -n 1 | awk -F 'file://' '{print $2}' | sed 's:/$::')
|
||||||
|
>&2 echo "TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf='%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}'"
|
||||||
>&2 echo "TMPDIR=${TMP_DIR}"\
|
TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf="%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}" | sort -r -V > $TMPFILE
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=${REPOID}"\
|
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
|
||||||
"--qf='%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}'"\
|
|
||||||
"${REPOQUERY_RESOLVE} ${TARGETS}"
|
|
||||||
|
|
||||||
TMPDIR=${TMP_DIR} \
|
|
||||||
${REPOQUERY} --config=${YUM} --repoid=${REPOID} \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch \
|
|
||||||
--qf="%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}" \
|
|
||||||
${REPOQUERY_RESOLVE} ${TARGETS} \
|
|
||||||
| sort -r -V > $TMPFILE
|
|
||||||
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
|
|
||||||
while read STR
|
while read STR
|
||||||
@ -199,11 +157,7 @@ function install_deps {
|
|||||||
cp $PKG_PATH .
|
cp $PKG_PATH .
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
>&2 echo " Here's what I have to work with..."
|
>&2 echo " Here's what I have to work with..."
|
||||||
>&2 echo " TMPDIR=${TMP_DIR}"\
|
>&2 echo " TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $PKG --qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\""
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=${REPOID}"\
|
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
|
||||||
"--qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\""\
|
|
||||||
"${REPOQUERY_RESOLVE} ${PKG}"
|
|
||||||
>&2 echo " PKG=$PKG PKG_FILE=$PKG_FILE REPO_PATH=$REPO_PATH PKG_REL_PATH=$PKG_REL_PATH PKG_PATH=$PKG_PATH"
|
>&2 echo " PKG=$PKG PKG_FILE=$PKG_FILE REPO_PATH=$REPO_PATH PKG_REL_PATH=$PKG_REL_PATH PKG_PATH=$PKG_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -218,8 +172,8 @@ function install_deps {
|
|||||||
echo " path $PKG_PATH" >> $BUILT_REPORT
|
echo " path $PKG_PATH" >> $BUILT_REPORT
|
||||||
FOUND_UNKNOWN=1
|
FOUND_UNKNOWN=1
|
||||||
fi
|
fi
|
||||||
done < $TMPFILE
|
done < $TMPFILE #<<< "$(TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\" | sort -r -V)"
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
TARGETS="$UNRESOLVED"
|
TARGETS="$UNRESOLVED"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -266,7 +220,6 @@ OUTPUT_DIR=$MY_WORKSPACE/export
|
|||||||
TMP_DIR=$MY_WORKSPACE/tmp
|
TMP_DIR=$MY_WORKSPACE/tmp
|
||||||
YUM=$OUTPUT_DIR/yum.conf
|
YUM=$OUTPUT_DIR/yum.conf
|
||||||
DEPLISTFILE=$OUTPUT_DIR/deps.txt
|
DEPLISTFILE=$OUTPUT_DIR/deps.txt
|
||||||
DEPLISTFILE_NEW=$OUTPUT_DIR/deps_new.txt
|
|
||||||
DEPDETAILLISTFILE=$OUTPUT_DIR/deps_detail.txt
|
DEPDETAILLISTFILE=$OUTPUT_DIR/deps_detail.txt
|
||||||
|
|
||||||
BUILT_REPORT=$OUTPUT_DIR/local.txt
|
BUILT_REPORT=$OUTPUT_DIR/local.txt
|
||||||
|
@ -1,29 +1,15 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CGTS_DEPS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
|
||||||
|
|
||||||
# Set REPOQUERY, REPOQUERY_SUB_COMMAND, REPOQUERY_RESOLVE and
|
|
||||||
# REPOQUERY_WHATPROVIDES_DELIM for our build environment.
|
|
||||||
source ${CGTS_DEPS_DIR}/../pkg-manager-utils.sh
|
|
||||||
|
|
||||||
function generate_dep_list {
|
function generate_dep_list {
|
||||||
TMP_RPM_DB=$(mktemp -d $(pwd)/tmp_rpm_db_XXXXXX)
|
TMP_RPM_DB=$(mktemp -d $(pwd)/tmp_rpm_db_XXXXXX)
|
||||||
mkdir -p $TMP_RPM_DB
|
mkdir -p $TMP_RPM_DB
|
||||||
rpm --initdb --dbpath $TMP_RPM_DB
|
rpm --initdb --dbpath $TMP_RPM_DB
|
||||||
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' > $DEPLISTFILE_NEW 2>&1
|
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' >> $DEPDETAILLISTFILE 2>&1
|
||||||
cat $DEPLISTFILE_NEW >> $DEPDETAILLISTFILE
|
rpm --dbpath $TMP_RPM_DB --test -Uvh --replacefiles '*.rpm' 2>&1 \
|
||||||
cat $DEPLISTFILE_NEW \
|
| grep -v "error:" \
|
||||||
| grep -v -e "error:" -e "warning:" -e "Preparing..." \
|
| grep -v "warning:" \
|
||||||
-e "Verifying..." -e "installing package" \
|
| grep -v "Preparing..." \
|
||||||
| sed -e "s/ is needed by.*$//" -e "s/ >=.*$//" \
|
| sed "s/ is needed by.*$//" | sed "s/ >=.*$//" | sort -u > $DEPLISTFILE
|
||||||
| sort -u > $DEPLISTFILE
|
rm -rf $TMP_RPM_DB
|
||||||
\rm -rf $TMP_RPM_DB
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_deps {
|
function install_deps {
|
||||||
@ -34,11 +20,9 @@ function install_deps {
|
|||||||
|
|
||||||
while read DEP
|
while read DEP
|
||||||
do
|
do
|
||||||
DEP_LIST="${DEP_LIST}${REPOQUERY_WHATPROVIDES_DELIM}${DEP}"
|
DEP_LIST="${DEP_LIST} ${DEP}"
|
||||||
done < $DEP_LIST_FILE
|
done < $DEP_LIST_FILE
|
||||||
|
|
||||||
DEP_LIST=$(echo "$DEP_LIST" | sed "s/^${REPOQUERY_WHATPROVIDES_DELIM}//g")
|
|
||||||
|
|
||||||
echo "Debug: List of deps to resolve: ${DEP_LIST}"
|
echo "Debug: List of deps to resolve: ${DEP_LIST}"
|
||||||
|
|
||||||
if [ -z "${DEP_LIST}" ]; then
|
if [ -z "${DEP_LIST}" ]; then
|
||||||
@ -46,17 +30,11 @@ function install_deps {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# go through each repo and convert deps to packages
|
# go through each repo and convert deps to packages
|
||||||
|
|
||||||
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
for REPOID in `grep '^[[].*[]]$' $YUM | grep -v '[[]main[]]' | awk -F '[][]' '{print $2 }'`; do
|
||||||
echo "TMPDIR=${TMP_DIR}"\
|
echo "TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --whatprovides ${DEP_LIST} --qf='%{name}'"
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=${REPOID}"\
|
TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --qf='%{name}' --whatprovides ${DEP_LIST} | sed "s/kernel-debug/kernel/g" >> $TMPFILE
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
"--qf='%{name}' --whatprovides ${DEP_LIST}"
|
|
||||||
TMPDIR=${TMP_DIR} \
|
|
||||||
${REPOQUERY} --config=${YUM} --repoid=${REPOID} \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch \
|
|
||||||
--qf='%{name}' --whatprovides ${DEP_LIST} \
|
|
||||||
| sed "s/kernel-debug/kernel/g" >> $TMPFILE
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
|
||||||
done
|
done
|
||||||
sort $TMPFILE -u > $TMPFILE1
|
sort $TMPFILE -u > $TMPFILE1
|
||||||
rm $TMPFILE
|
rm $TMPFILE
|
||||||
@ -77,19 +55,9 @@ function install_deps {
|
|||||||
|
|
||||||
if [[ ! -z "${TARGETS// }" ]]; then
|
if [[ ! -z "${TARGETS// }" ]]; then
|
||||||
REPO_PATH=$(cat $YUM | sed -n "/^\[$REPOID\]\$/,\$p" | grep '^baseurl=' | head -n 1 | awk -F 'file://' '{print $2}' | sed 's:/$::')
|
REPO_PATH=$(cat $YUM | sed -n "/^\[$REPOID\]\$/,\$p" | grep '^baseurl=' | head -n 1 | awk -F 'file://' '{print $2}' | sed 's:/$::')
|
||||||
>&2 echo "TMPDIR=${TMP_DIR}"\
|
>&2 echo "TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf='%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}'"
|
||||||
"${REPOQUERY} --config=${YUM} --repoid=${REPOID}"\
|
TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf="%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}" | sort -r -V >> $TMPFILE
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
"--qf='%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}'"\
|
|
||||||
"${REPOQUERY_RESOLVE} ${TARGETS}"
|
|
||||||
TMPDIR=${TMP_DIR} \
|
|
||||||
${REPOQUERY} --config=${YUM} --repoid=${REPOID} \
|
|
||||||
${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch \
|
|
||||||
--qf="%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}" \
|
|
||||||
${REPOQUERY_RESOLVE} ${TARGETS} \
|
|
||||||
| sort -r -V >> $TMPFILE
|
|
||||||
|
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
|
||||||
|
|
||||||
while read STR
|
while read STR
|
||||||
do
|
do
|
||||||
@ -107,11 +75,7 @@ function install_deps {
|
|||||||
cp $PKG_PATH .
|
cp $PKG_PATH .
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
>&2 echo " Here's what I have to work with..."
|
>&2 echo " Here's what I have to work with..."
|
||||||
>&2 echo " TMPDIR=${TMP_DIR}"\
|
>&2 echo " TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $PKG --qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\""
|
||||||
"${REPOQUERY} -c ${YUM} --repoid=${REPOID}"\
|
|
||||||
"${REPOQUERY_SUB_COMMAND} --arch=x86_64,noarch"\
|
|
||||||
"--qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\""\
|
|
||||||
"${REPOQUERY_RESOLVE} ${PKG}"
|
|
||||||
>&2 echo " PKG=$PKG PKG_FILE=$PKG_FILE REPO_PATH=$REPO_PATH PKG_REL_PATH=$PKG_REL_PATH PKG_PATH=$PKG_PATH"
|
>&2 echo " PKG=$PKG PKG_FILE=$PKG_FILE REPO_PATH=$REPO_PATH PKG_REL_PATH=$PKG_REL_PATH PKG_PATH=$PKG_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -127,9 +91,8 @@ function install_deps {
|
|||||||
echo " path $PKG_PATH" >> $BUILT_REPORT
|
echo " path $PKG_PATH" >> $BUILT_REPORT
|
||||||
FOUND_UNKNOWN=1
|
FOUND_UNKNOWN=1
|
||||||
fi
|
fi
|
||||||
done < $TMPFILE
|
done < $TMPFILE #<<< "$(TMPDIR=$TMP_DIR repoquery -c $YUM --repoid=$REPOID --arch=x86_64,noarch --resolve $TARGETS --qf=\"%{name} %{name}-%{version}-%{release}.%{arch}.rpm %{relativepath}\" | sort -r -V)"
|
||||||
|
\rm -rf $TMP_DIR/yum-$USER-*
|
||||||
\rm -rf $TMP_DIR/yum-$USER-*
|
|
||||||
TARGETS="$UNRESOLVED"
|
TARGETS="$UNRESOLVED"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -180,7 +143,6 @@ OUTPUT_DIR=${ROOT}/newDisk
|
|||||||
YUM=${ROOT}/yum.conf
|
YUM=${ROOT}/yum.conf
|
||||||
TMP_DIR=${ROOT}/tmp
|
TMP_DIR=${ROOT}/tmp
|
||||||
DEPLISTFILE=${ROOT}/deps.txt
|
DEPLISTFILE=${ROOT}/deps.txt
|
||||||
DEPLISTFILE_NEW=${ROOT}/deps_new.txt
|
|
||||||
DEPDETAILLISTFILE=${ROOT}/deps_detail.txt
|
DEPDETAILLISTFILE=${ROOT}/deps_detail.txt
|
||||||
INSTALLDIR=${ROOT}/newDisk/isolinux/Packages
|
INSTALLDIR=${ROOT}/newDisk/isolinux/Packages
|
||||||
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# set -x
|
# set -x
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
source "$SRC_BASE/build-tools/spec-utils"
|
source "$SRC_BASE/build-tools/spec-utils"
|
||||||
source "$SRC_BASE/build-tools/srpm-utils"
|
source "$SRC_BASE/build-tools/srpm-utils"
|
||||||
|
|
||||||
@ -201,14 +195,14 @@ fi
|
|||||||
|
|
||||||
if [ $TAR_NEEDED -gt 0 ]; then
|
if [ $TAR_NEEDED -gt 0 ]; then
|
||||||
echo "Creating tar file: $TAR_PATH ..."
|
echo "Creating tar file: $TAR_PATH ..."
|
||||||
echo "tar --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude='$SRC_DIR/$DISTRO' --exclude='pbr-*.egg' --transform 's,^$TRANSFORM,$TAR_NAME-$VERSION,' -czf $TAR_PATH $SRC_DIR"
|
echo "tar czf $TAR_PATH $SRC_DIR --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude='$SRC_DIR/$DISTRO' --exclude='pbr-*.egg' --transform 's,^$TRANSFORM,$TAR_NAME-$VERSION,'"
|
||||||
tar --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude="$SRC_DIR/$DISTRO" --exclude='pbr-*.egg' --transform "s,^$TRANSFORM,$TAR_NAME-$VERSION," -czf "$TAR_PATH" "$SRC_DIR"
|
tar czf $TAR_PATH $SRC_DIR --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude="$SRC_DIR/$DISTRO" --exclude='pbr-*.egg' --transform "s,^$TRANSFORM,$TAR_NAME-$VERSION,"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
if [ "x$STAGING" != "x" ]; then
|
if [ "x$STAGING" != "x" ]; then
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "ERROR: default_build_srpm (${LINENO}): failed to create tar file, cmd: tar --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude="$SRC_DIR/$DISTRO" --exclude='pbr-*.egg' --transform \"s,^$TRANSFORM,$TAR_NAME-$VERSION,\" -czf '$TAR_PATH' '$SRC_DIR'"
|
echo "ERROR: default_build_srpm (${LINENO}): failed to create tar file, cmd: tar czf $TAR_PATH $SRC_DIR --exclude '.git*' --exclude 'build' --exclude='.pc' --exclude='patches' --exclude="$SRC_DIR/$DISTRO" --exclude='pbr-*.egg' --transform \"s,^$TRANSFORM,$TAR_NAME-$VERSION,\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Created tar file: $TAR_PATH"
|
echo "Created tar file: $TAR_PATH"
|
||||||
|
@ -24,16 +24,10 @@ interpreter_path () {
|
|||||||
|
|
||||||
get__version__ () {
|
get__version__ () {
|
||||||
local path=${1}
|
local path=${1}
|
||||||
local var=""
|
|
||||||
if [ ! -f ${path} ]; then
|
if [ ! -f ${path} ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if file ${path} | grep -q 'Python script'; then
|
grep __VERSION__= ${path} | cut -d '=' -f 2 | sed 's/"//g'
|
||||||
ver=$(grep __VERSION__= ${path} | cut -d '=' -f 2 | sed 's/"//g')
|
|
||||||
else
|
|
||||||
ver=$(${path} --version 2> /dev/null)
|
|
||||||
fi
|
|
||||||
echo $ver
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VC_LESS_THAN=0
|
VC_LESS_THAN=0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -11,17 +11,6 @@
|
|||||||
# usage: modify-build-cfg [file.cfg] [<layer>]
|
# usage: modify-build-cfg [file.cfg] [<layer>]
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
MODIFY_BUILD_CFG_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
|
||||||
|
|
||||||
# Set PKG_MANAGER for our build environment.
|
|
||||||
source "${MODIFY_BUILD_CFG_DIR}/pkg-manager-utils.sh"
|
|
||||||
|
|
||||||
LAYER=${2:-$LAYER}
|
LAYER=${2:-$LAYER}
|
||||||
|
|
||||||
# For backward compatibility. Old repo location or new?
|
# For backward compatibility. Old repo location or new?
|
||||||
@ -34,13 +23,6 @@ if [ ! -d ${CENTOS_REPO} ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Preferred python
|
|
||||||
if rpm -q --whatprovides --quiet python3; then
|
|
||||||
PYTHON_PKG=python3
|
|
||||||
else
|
|
||||||
PYTHON_PKG=python2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Try to find a layer specific mock.cfg.proto
|
# Try to find a layer specific mock.cfg.proto
|
||||||
MOCK_CFG_PROTO="${CENTOS_REPO}/mock.cfg.${LAYER}.proto"
|
MOCK_CFG_PROTO="${CENTOS_REPO}/mock.cfg.${LAYER}.proto"
|
||||||
echo "==== Try MOCK_CFG_PROTO=$MOCK_CFG_PROTO ===="
|
echo "==== Try MOCK_CFG_PROTO=$MOCK_CFG_PROTO ===="
|
||||||
@ -136,21 +118,8 @@ if [ "containers" == "$BUILD_TYPE" ]; then
|
|||||||
NETWORK_PKGS="bind-utils"
|
NETWORK_PKGS="bind-utils"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_PKGS=''
|
grep -q "config_opts\['chroot_setup_cmd'\] = 'install @buildsys-build pigz lbzip2 yum $NETWORK_PKGS'" $FILE || \
|
||||||
if [ "${PKG_MANAGER}" == "yum" ]; then
|
echo "config_opts['chroot_setup_cmd'] = 'install @buildsys-build pigz lbzip2 yum $NETWORK_PKGS'" >> $FILE
|
||||||
BUILD_PKGS='@buildsys-build'
|
|
||||||
elif [ "${PKG_MANAGER}" == "dnf" ]; then
|
|
||||||
# buildsys-build group was dropped when Centos-8 switched to dnf.
|
|
||||||
# We must list all the members plus a few new ones (fedpkg-minimal, epel-rpm-macros).
|
|
||||||
BUILD_PKGS='bash bzip2 coreutils cpio diffutils epel-release epel-rpm-macros fedpkg-minimal findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config redhat-release rpm-build sed shadow-utils tar unzip util-linux which xz'
|
|
||||||
fi
|
|
||||||
|
|
||||||
STX_PKGS='pigz lbzip2 bash'
|
|
||||||
|
|
||||||
PKGS="${BUILD_PKGS} ${STX_PKGS} ${PKG_MANAGER} ${PYTHON_PKG} ${NETWORK_PKGS}"
|
|
||||||
|
|
||||||
grep -q "config_opts\['chroot_setup_cmd'\] = 'install ${PKGS}'" $FILE || \
|
|
||||||
echo "config_opts['chroot_setup_cmd'] = 'install ${PKGS}'" >> $FILE
|
|
||||||
|
|
||||||
# Special case for containers.
|
# Special case for containers.
|
||||||
# rpmbuild_networking is required for invoking helm commands within mock
|
# rpmbuild_networking is required for invoking helm commands within mock
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
#
|
|
||||||
# BASH utilities to select package manager
|
|
||||||
#
|
|
||||||
# Currently just sets some environmnet variables
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
# Yum vs DNF compatibility
|
|
||||||
YUM=$(which yum)
|
|
||||||
DNF=$(which dnf)
|
|
||||||
PKG_MANAGER=""
|
|
||||||
REPOQUERY=$(which repoquery)
|
|
||||||
REPOQUERY_SUB_COMMAND=""
|
|
||||||
REPOQUERY_RESOLVE="--resolve"
|
|
||||||
REPOQUERY_WHATPROVIDES_DELIM=" "
|
|
||||||
if [ ! -z ${DNF} ]; then
|
|
||||||
PKG_MANAGER="dnf"
|
|
||||||
REPOQUERY=${DNF}
|
|
||||||
REPOQUERY_SUB_COMMAND="repoquery --disable-modular-filtering"
|
|
||||||
REPOQUERY_RESOLVE=""
|
|
||||||
REPOQUERY_WHATPROVIDES_DELIM=","
|
|
||||||
elif [ ! -z ${YUM} ]; then
|
|
||||||
PKG_MANAGER="yum"
|
|
||||||
else
|
|
||||||
>&2 echo "ERROR: Couldn't find a supported package manager"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
mock.cfg.centos8.all.proto
|
|
58
build-tools/repo_files/mock.cfg.all.proto
Normal file
58
build-tools/repo_files/mock.cfg.all.proto
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
config_opts['root'] = 'BUILD_ENV/mock'
|
||||||
|
config_opts['target_arch'] = 'x86_64'
|
||||||
|
config_opts['legal_host_arches'] = ('x86_64',)
|
||||||
|
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
||||||
|
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
||||||
|
config_opts['releasever'] = '7'
|
||||||
|
config_opts['rpmbuild_networking'] = False
|
||||||
|
|
||||||
|
|
||||||
|
config_opts['yum.conf'] = """
|
||||||
|
[main]
|
||||||
|
keepcache=1
|
||||||
|
debuglevel=2
|
||||||
|
reposdir=/dev/null
|
||||||
|
logfile=/var/log/yum.log
|
||||||
|
retries=20
|
||||||
|
obsoletes=1
|
||||||
|
gpgcheck=0
|
||||||
|
assumeyes=1
|
||||||
|
syslog_ident=mock
|
||||||
|
syslog_device=
|
||||||
|
|
||||||
|
# repos
|
||||||
|
[local-std]
|
||||||
|
name=local-std
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-rt]
|
||||||
|
name=local-rt
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-installer]
|
||||||
|
name=local-installer
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[StxCentos7Distro]
|
||||||
|
name=Stx-Centos-7-Distro
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
exclude=kernel-devel libvirt-devel
|
||||||
|
|
||||||
|
[StxCentos7Distro-rt]
|
||||||
|
name=Stx-Centos-7-Distro-rt
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
|
||||||
|
"""
|
@ -1,58 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '7'
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos7Distro]
|
|
||||||
name=Stx-Centos-7-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
exclude=kernel-devel libvirt-devel
|
|
||||||
|
|
||||||
[StxCentos7Distro-rt]
|
|
||||||
name=Stx-Centos-7-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
|
|
||||||
"""
|
|
@ -1,58 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '7'
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos7Distro]
|
|
||||||
name=Stx-Centos-7-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
exclude=kernel-devel libvirt-devel
|
|
||||||
|
|
||||||
[StxCentos7Distro-rt]
|
|
||||||
name=Stx-Centos-7-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
|
|
||||||
"""
|
|
@ -1,57 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '7'
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos7Distro]
|
|
||||||
name=Stx-Centos-7-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
|
|
||||||
[StxCentos7Distro-rt]
|
|
||||||
name=Stx-Centos-7-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
|
|
||||||
"""
|
|
@ -1,63 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '8'
|
|
||||||
config_opts['package_manager'] = 'dnf'
|
|
||||||
config_opts['use_bootstrap'] = False
|
|
||||||
config_opts['use_bootstrap_image'] = False
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos8Distro]
|
|
||||||
name=Stx-Centos-8-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
exclude=kernel-devel libvirt-devel
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
[StxCentos8Distro-rt]
|
|
||||||
name=Stx-Centos-8-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
"""
|
|
@ -1,63 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '8'
|
|
||||||
config_opts['package_manager'] = 'dnf'
|
|
||||||
config_opts['use_bootstrap'] = False
|
|
||||||
config_opts['use_bootstrap_image'] = False
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos8Distro]
|
|
||||||
name=Stx-Centos-8-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
exclude=kernel-devel libvirt-devel
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
[StxCentos8Distro-rt]
|
|
||||||
name=Stx-Centos-8-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
"""
|
|
@ -1,62 +0,0 @@
|
|||||||
config_opts['root'] = 'BUILD_ENV/mock'
|
|
||||||
config_opts['target_arch'] = 'x86_64'
|
|
||||||
config_opts['legal_host_arches'] = ('x86_64',)
|
|
||||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
|
||||||
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
|
|
||||||
config_opts['releasever'] = '8'
|
|
||||||
config_opts['package_manager'] = 'dnf'
|
|
||||||
config_opts['use_bootstrap'] = False
|
|
||||||
config_opts['use_bootstrap_image'] = False
|
|
||||||
config_opts['rpmbuild_networking'] = False
|
|
||||||
|
|
||||||
|
|
||||||
config_opts['yum.conf'] = """
|
|
||||||
[main]
|
|
||||||
keepcache=1
|
|
||||||
debuglevel=2
|
|
||||||
reposdir=/dev/null
|
|
||||||
logfile=/var/log/yum.log
|
|
||||||
retries=20
|
|
||||||
obsoletes=1
|
|
||||||
gpgcheck=0
|
|
||||||
assumeyes=1
|
|
||||||
syslog_ident=mock
|
|
||||||
syslog_device=
|
|
||||||
|
|
||||||
# repos
|
|
||||||
[local-std]
|
|
||||||
name=local-std
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-rt]
|
|
||||||
name=local-rt
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[local-installer]
|
|
||||||
name=local-installer
|
|
||||||
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
metadata_expire=0
|
|
||||||
|
|
||||||
[StxCentos8Distro]
|
|
||||||
name=Stx-Centos-8-Distro
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
[StxCentos8Distro-rt]
|
|
||||||
name=Stx-Centos-8-Distro-rt
|
|
||||||
enabled=1
|
|
||||||
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
|
||||||
failovermethod=priority
|
|
||||||
module_hotfixes=1
|
|
||||||
|
|
||||||
"""
|
|
@ -1 +0,0 @@
|
|||||||
mock.cfg.centos8.distro.proto
|
|
58
build-tools/repo_files/mock.cfg.distro.proto
Normal file
58
build-tools/repo_files/mock.cfg.distro.proto
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
config_opts['root'] = 'BUILD_ENV/mock'
|
||||||
|
config_opts['target_arch'] = 'x86_64'
|
||||||
|
config_opts['legal_host_arches'] = ('x86_64',)
|
||||||
|
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
||||||
|
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
||||||
|
config_opts['releasever'] = '7'
|
||||||
|
config_opts['rpmbuild_networking'] = False
|
||||||
|
|
||||||
|
|
||||||
|
config_opts['yum.conf'] = """
|
||||||
|
[main]
|
||||||
|
keepcache=1
|
||||||
|
debuglevel=2
|
||||||
|
reposdir=/dev/null
|
||||||
|
logfile=/var/log/yum.log
|
||||||
|
retries=20
|
||||||
|
obsoletes=1
|
||||||
|
gpgcheck=0
|
||||||
|
assumeyes=1
|
||||||
|
syslog_ident=mock
|
||||||
|
syslog_device=
|
||||||
|
|
||||||
|
# repos
|
||||||
|
[local-std]
|
||||||
|
name=local-std
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-rt]
|
||||||
|
name=local-rt
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-installer]
|
||||||
|
name=local-installer
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[StxCentos7Distro]
|
||||||
|
name=Stx-Centos-7-Distro
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
exclude=kernel-devel libvirt-devel
|
||||||
|
|
||||||
|
[StxCentos7Distro-rt]
|
||||||
|
name=Stx-Centos-7-Distro-rt
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
|
||||||
|
"""
|
@ -1 +0,0 @@
|
|||||||
mock.cfg.centos8.proto
|
|
57
build-tools/repo_files/mock.cfg.proto
Normal file
57
build-tools/repo_files/mock.cfg.proto
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
config_opts['root'] = 'BUILD_ENV/mock'
|
||||||
|
config_opts['target_arch'] = 'x86_64'
|
||||||
|
config_opts['legal_host_arches'] = ('x86_64',)
|
||||||
|
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
||||||
|
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
|
||||||
|
config_opts['releasever'] = '7'
|
||||||
|
config_opts['rpmbuild_networking'] = False
|
||||||
|
|
||||||
|
|
||||||
|
config_opts['yum.conf'] = """
|
||||||
|
[main]
|
||||||
|
keepcache=1
|
||||||
|
debuglevel=2
|
||||||
|
reposdir=/dev/null
|
||||||
|
logfile=/var/log/yum.log
|
||||||
|
retries=20
|
||||||
|
obsoletes=1
|
||||||
|
gpgcheck=0
|
||||||
|
assumeyes=1
|
||||||
|
syslog_ident=mock
|
||||||
|
syslog_device=
|
||||||
|
|
||||||
|
# repos
|
||||||
|
[local-std]
|
||||||
|
name=local-std
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/std/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-rt]
|
||||||
|
name=local-rt
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/rt/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[local-installer]
|
||||||
|
name=local-installer
|
||||||
|
baseurl=LOCAL_BASE/MY_BUILD_DIR/installer/rpmbuild/RPMS
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
|
||||||
|
[StxCentos7Distro]
|
||||||
|
name=Stx-Centos-7-Distro
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
|
||||||
|
[StxCentos7Distro-rt]
|
||||||
|
name=Stx-Centos-7-Distro-rt
|
||||||
|
enabled=1
|
||||||
|
baseurl=LOCAL_BASE/MY_REPO_DIR/centos-repo/rt/Binary
|
||||||
|
failovermethod=priority
|
||||||
|
|
||||||
|
"""
|
Loading…
Reference in New Issue
Block a user