rename cgcs-centos-repo to centos-repo
Story: 2006387 Task: 36912 Depends-On: https://review.opendev.org/749974 Depends-On: https://review.opendev.org/750041 Change-Id: I745a822e88aca68c207a92f14fb5370d6e3d0050 Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
9a188af410
commit
b827624e16
@ -29,7 +29,7 @@ DISTRO = SELECT["centos"]
|
||||
# Global variables
|
||||
USER = getpass.getuser()
|
||||
WORK = os.path.abspath("..")
|
||||
REPOS = os.path.join(WORK, "cgcs-root/stx/")
|
||||
REPOS = os.path.join(WORK, "root/stx/")
|
||||
MTOOLS = os.path.join(WORK, "stx-tools/centos-mirror-tools")
|
||||
|
||||
class PkgInfo:
|
||||
|
@ -127,7 +127,7 @@ RUN groupadd -g 751 cgts && \
|
||||
COPY toCOPY/finishSetup.sh /usr/local/bin
|
||||
COPY toCOPY/populate_downloads.sh /usr/local/bin
|
||||
COPY toCOPY/generate-local-repo.sh /usr/local/bin
|
||||
COPY toCOPY/generate-cgcs-centos-repo.sh /usr/local/bin
|
||||
COPY toCOPY/generate-centos-repo.sh /usr/local/bin
|
||||
COPY toCOPY/lst_utils.sh /usr/local/bin
|
||||
COPY toCOPY/.inputrc /home/$MYUNAME/
|
||||
COPY toCOPY/builder-constraints.txt /home/$MYUNAME/
|
||||
|
@ -164,7 +164,7 @@ Tweaks in the StarlingX build system.
|
||||
NOTE: You do not need to do the following step if you've synced the latest codebase.
|
||||
|
||||
Go into the StarlingX build system (i.e. *another* container that hosts the
|
||||
cgcs build system) and perform the following steps:
|
||||
build system) and perform the following steps:
|
||||
|
||||
Build packages/ISO creation
|
||||
---------------------------
|
||||
@ -293,16 +293,16 @@ Initialize the source tree.
|
||||
repo init -u https://opendev.org/starlingx/manifest.git -m default.xml
|
||||
repo sync
|
||||
|
||||
To generate cgcs-centos-repo
|
||||
To generate centos-repo
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The cgcs-centos-repo is a set of symbolic links to the packages in the
|
||||
The centos-repo is a set of symbolic links to the packages in the
|
||||
mirror and the mock configuration file. It is needed to create these
|
||||
links if this is the first build or the mirror has been updated.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
generate-cgcs-centos-repo.sh /import/mirrors/CentOS
|
||||
generate-centos-repo.sh /import/mirrors/CentOS
|
||||
|
||||
Where the argument to the script is the path of the mirror.
|
||||
|
||||
|
2
buildrc
2
buildrc
@ -74,7 +74,7 @@ export MY_BUILD_DIR=${LOCALDISK}/loadbuild/$MYUNAME/$PROJECT
|
||||
export MY_WORKSPACE=$MY_BUILD_DIR
|
||||
export MY_LOCAL_DISK=${LOCALDISK}/designer/$MYUNAME
|
||||
export MY_REPO_ROOT_DIR=$MY_LOCAL_DISK/$PROJECT
|
||||
export MY_REPO=$MY_REPO_ROOT_DIR/cgcs-root
|
||||
export MY_REPO=$MY_REPO_ROOT_DIR/root
|
||||
export MY_SRC_RPM_BUILD_DIR=$MY_BUILD_DIR/rpmbuild
|
||||
export MY_BUILD_CFG=$MY_WORKSPACE/$MY_BUILD_ENVIRONMENT_FILE
|
||||
export MY_BUILD_CFG_STD=$MY_WORKSPACE/std/${MY_BUILD_ENVIRONMENT_FILE_STD}
|
||||
|
@ -109,7 +109,7 @@ fi
|
||||
# The 2 categories we can divide the list of packages in the output directory:
|
||||
# - General hosted under "downloads" output directory.
|
||||
# - Puppet hosted under "downloads/puppet" output directory.
|
||||
# to be populated under $MY_REPO/addons/wr-cgcs/layers/cgcs/downloads/puppet
|
||||
# to be populated under $MY_REPO/downloads/puppet
|
||||
|
||||
export DL_MIRROR_LOG_DIR="${DL_MIRROR_LOG_DIR:-./logs}"
|
||||
export DL_MIRROR_OUTPUT_DIR="${DL_MIRROR_OUTPUT_DIR:-./output/stx/CentOS}"
|
||||
|
@ -90,11 +90,11 @@ source $STARLINGX_ADD_PKGS_DIR/../toCOPY/lst_utils.sh
|
||||
|
||||
STXTOOLS=${MY_REPO_ROOT_DIR}/stx-tools
|
||||
|
||||
CGCSREPO_PATH=$MY_REPO/cgcs-centos-repo/Binary
|
||||
TISREPO_PATH=$MY_WORKSPACE/std/rpmbuild/RPMS
|
||||
TISREPO_PATH_ARGS=
|
||||
if [ -e $TISREPO_PATH/repodata/repomd.xml ]; then
|
||||
TISREPO_PATH_ARGS="--repofrompath tis,$TISREPO_PATH"
|
||||
LOCALREPO_PATH=$MY_REPO/centos-repo/Binary
|
||||
STDREPO_PATH=$MY_WORKSPACE/std/rpmbuild/RPMS
|
||||
STDREPO_PATH_ARGS=
|
||||
if [ -e $STDREPO_PATH/repodata/repomd.xml ]; then
|
||||
STDREPO_PATH_ARGS="--repofrompath tis,$STDREPO_PATH"
|
||||
fi
|
||||
|
||||
RESULTS_LOG=downloaded.log
|
||||
@ -117,14 +117,14 @@ function show_usage {
|
||||
Usage:
|
||||
$(basename $0) [ -C <config_dir> ] [ -l <layer> ] [ -d <pkgname> ] ... [ <rpmfile> ] ...
|
||||
|
||||
This utility uses the cgcs-centos-repo repo, and optionally the rpmbuild/RPMS
|
||||
This utility uses the centos-repo repo, and optionally the rpmbuild/RPMS
|
||||
repo from \$MY_WORKSPACE/std, as a baseline, downloading packages required
|
||||
to support the list provided at command-line. The -d option allows the user to
|
||||
specify a package to download, or the user can specify a downloaded RPM file
|
||||
that has dependencies that must be downloaded.
|
||||
|
||||
The downloaded RPMs will be written to the appropriate location under the
|
||||
\$MY_REPO/cgcs-centos-repo directory. The user should be able to differentiate
|
||||
\$MY_REPO/centos-repo directory. The user should be able to differentiate
|
||||
the downloaded files versus symlinks pointing to a downloaded or shared mirror.
|
||||
|
||||
In addition, this utility will record a list of downloaded RPMs in the $RESULTS_LOG
|
||||
@ -200,7 +200,7 @@ REPOQUERY_STD_CMD="$REPOQUERY_CMD --quiet -c $REPOCFG_STD_MERGED"
|
||||
REPOQUERY_3RD_CMD="$REPOQUERY_CMD --quiet -c $REPOCFG_3RD_MERGED"
|
||||
REPOQUERY_LOWER_LAYER_CMD="$REPOQUERY_CMD --quiet -c $REPOCFG_LOWER_LAYER_MERGED"
|
||||
REPOQUERY_ALL_CMD="$REPOQUERY_CMD --quiet -c $REPOCFG_ALL_MERGED"
|
||||
REPOQUERY_LOCAL_CMD="$REPOQUERY_CMD --quiet --repofrompath cgcs,$CGCSREPO_PATH $TISREPO_PATH_ARGS"
|
||||
REPOQUERY_LOCAL_CMD="$REPOQUERY_CMD --quiet --repofrompath local,$LOCALREPO_PATH $STDREPO_PATH_ARGS"
|
||||
|
||||
|
||||
function rpmfile_requires {
|
||||
@ -268,7 +268,7 @@ function simplified_pkg {
|
||||
echo $pkg | sed 's/-[0-9]*:/-/'
|
||||
}
|
||||
|
||||
function pkg_in_cgcsrepo {
|
||||
function pkg_in_localrepo {
|
||||
#
|
||||
# Check whether the specified package is already in the downloaded (or built) repo
|
||||
#
|
||||
@ -331,7 +331,7 @@ function download_pkg {
|
||||
fi
|
||||
|
||||
echo "Downloading $url"
|
||||
rpm_path=$CGCSREPO_PATH/$arch/$(basename $relativepath)
|
||||
rpm_path=$LOCALREPO_PATH/$arch/$(basename $relativepath)
|
||||
wget -q -O $rpm_path $url
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -341,7 +341,7 @@ function download_pkg {
|
||||
fi
|
||||
|
||||
# Update repo
|
||||
pushd $CGCSREPO_PATH >/dev/null
|
||||
pushd $LOCALREPO_PATH >/dev/null
|
||||
createrepo -q -g comps.xml .
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "createrepo failed... Aborting" >&2
|
||||
@ -369,7 +369,7 @@ function download_rpm_dependencies {
|
||||
continue
|
||||
fi
|
||||
|
||||
pkg_in_cgcsrepo $pkg && continue
|
||||
pkg_in_localrepo $pkg && continue
|
||||
download_pkg $pkg
|
||||
done || exit $?
|
||||
}
|
||||
@ -383,7 +383,7 @@ if [ -n "$RPMLIST" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
pkg_in_cgcsrepo $pkg && continue
|
||||
pkg_in_localrepo $pkg && continue
|
||||
download_pkg $pkg
|
||||
|
||||
done || exit $?
|
||||
@ -392,7 +392,7 @@ fi
|
||||
|
||||
if [ -n "$DOWNLOAD_LIST" ]; then
|
||||
for df in $DOWNLOAD_LIST; do
|
||||
pkg_in_cgcsrepo $df && continue
|
||||
pkg_in_localrepo $df && continue
|
||||
download_pkg $df
|
||||
done
|
||||
fi
|
||||
|
@ -58,7 +58,7 @@ def load_manifest(name):
|
||||
|
||||
def load_context(name):
|
||||
# Extract the workspace path and git SHA for each repo
|
||||
# (cd ./cgcs-root/stx/stx-config && git checkout -f 22a60625f169202a68b524ac0126afb1d10921cd)\n
|
||||
# (cd ./root/stx/stx-config && git checkout -f 22a60625f169202a68b524ac0126afb1d10921cd)\n
|
||||
ctx = {}
|
||||
if "://" in name:
|
||||
# Open a URL
|
||||
|
@ -27,7 +27,7 @@ mkdir -p /localdisk/loadbuild/mock-cache
|
||||
sudo chmod 775 /localdisk/loadbuild/mock-cache
|
||||
sudo chown root:mock /localdisk/loadbuild/mock-cache
|
||||
### may need to add these later. once it works will try on clean localdisk setup
|
||||
# [builder@bavery-WS-DESK cgcs-root]$ history | grep mkdir
|
||||
# [builder@bavery-WS-DESK root]$ history | grep mkdir
|
||||
# 55 mkdir -p $MY_WORKSPACE/results
|
||||
# 66 mkdir -p $MY_WORKSPACE/std/results/$MY_BUILD_ENVIRONMENT-std
|
||||
# 78 mkdir -p $MY_WORKSPACE/rt/rpmbuild/RPMS
|
||||
|
@ -5,9 +5,9 @@
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
#
|
||||
|
||||
GENERATE_CGCS_CENTOS_REPO_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
GENERATE_CENTOS_REPO_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source $GENERATE_CGCS_CENTOS_REPO_DIR/lst_utils.sh
|
||||
source $GENERATE_CENTOS_REPO_DIR/lst_utils.sh
|
||||
|
||||
mirror_dir=""
|
||||
layer_dirs=""
|
||||
@ -76,8 +76,7 @@ if [ -z "$MY_REPO" ]; then
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
TEMP=$(getopt -o h --long help,config-dir:,distro:,layer:,layer-dir:,layer-inc-url:,layer-pkg-url:,layer-wheels-inc-url:,mirror-dir: -n 'generate-cgcs-centos-repo' -- "$@")
|
||||
TEMP=$(getopt -o h --long help,config-dir:,distro:,layer:,layer-dir:,layer-inc-url:,layer-pkg-url:,layer-wheels-inc-url:,mirror-dir: -n 'generate-centos-repo' -- "$@")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "getopt error"
|
||||
usage
|
||||
@ -123,12 +122,12 @@ echo
|
||||
echo "layer_wheels_inc_urls=${layer_wheels_inc_urls[@]}"
|
||||
echo
|
||||
|
||||
dest_dir=$MY_REPO/cgcs-centos-repo
|
||||
dest_dir=$MY_REPO/centos-repo
|
||||
timestamp="$(date +%F_%H%M)"
|
||||
mock_cfg_file=$MY_REPO/build-tools/repo_files/mock.cfg.proto
|
||||
comps_xml_file=$MY_REPO/build-tools/repo_files/comps.xml
|
||||
mock_cfg_dest_file=$MY_REPO/cgcs-centos-repo/mock.cfg.proto
|
||||
comps_xml_dest_file=$MY_REPO/cgcs-centos-repo/Binary/comps.xml
|
||||
mock_cfg_dest_file=$MY_REPO/centos-repo/mock.cfg.proto
|
||||
comps_xml_dest_file=$MY_REPO/centos-repo/Binary/comps.xml
|
||||
|
||||
TMP_LST_DIR=$(mktemp -d /tmp/tmp_lst_dir_XXXXXX)
|
||||
mkdir -p $TMP_LST_DIR
|
||||
@ -443,13 +442,13 @@ cp "$mock_cfg_file" "$mock_cfg_dest_file"
|
||||
cat ${lst_file_dir}/${other_lst_file} | grep -v "#" | while IFS=":" read targettype item extrafields; do
|
||||
if [ "${targettype}" == "folder" ]; then
|
||||
echo "Creating folder ${item}"
|
||||
mkdir -p $MY_REPO/cgcs-centos-repo/Binary/${item}
|
||||
mkdir -p $MY_REPO/centos-repo/Binary/${item}
|
||||
fi
|
||||
|
||||
if [ "${targettype}" == "file" ]; then
|
||||
mkdir -p $MY_REPO/cgcs-centos-repo/Binary/$(dirname ${item})
|
||||
echo "Creating symlink for $MY_REPO/cgcs-centos-repo/Binary/${item}"
|
||||
ln -sf ${mirror_dir}/Binary/${item} $MY_REPO/cgcs-centos-repo/Binary/${item}
|
||||
mkdir -p $MY_REPO/centos-repo/Binary/$(dirname ${item})
|
||||
echo "Creating symlink for $MY_REPO/centos-repo/Binary/${item}"
|
||||
ln -sf ${mirror_dir}/Binary/${item} $MY_REPO/centos-repo/Binary/${item}
|
||||
fi
|
||||
done
|
||||
|
@ -12,7 +12,7 @@ export PATH="${MY_REPO}/build-tools:${PATH}"
|
||||
|
||||
EXPORTS="$MY_WORKSPACE/export/mirrors/"
|
||||
DISTRO="CentOS"
|
||||
HEAD_FILE="${MY_REPO_ROOT_DIR}/.repo/projects/cgcs-root.git/HEAD"
|
||||
HEAD_FILE="${MY_REPO_ROOT_DIR}/.repo/projects/root.git/HEAD"
|
||||
STAT="$(stat -c %Y ${HEAD_FILE})"
|
||||
TIMESTAMP=$(date -d @$(stat -c %Y ${HEAD_FILE}) +%Y-%m-%dT%H:%M:%S)
|
||||
STD_PKG_DIR="${MY_WORKSPACE}/std/rpmbuild/RPMS"
|
||||
|
Loading…
Reference in New Issue
Block a user