Merge "Add debian snapshot and CENGN mirror into sources.list of builder"

This commit is contained in:
Zuul 2022-04-18 18:22:00 +00:00 committed by Gerrit Code Review
commit a006b32511
4 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,7 @@ proxyport = 8080
buildbranch = master
manifest = default.xml
ostree_osname = debian
debian_snapshot = http://snapshot.debian.org/archive/debian/20220331T000000Z
[builder]
uid = 1000

View File

@ -87,6 +87,7 @@ class HandleControlTask:
deblist = self.config.get('repomgr', 'deblist')
dsclist = self.config.get('repomgr', 'dsclist')
ostree_osname = self.config.get('project', 'ostree_osname')
debian_snapshot = self.config.get('project', 'debian_snapshot')
if sourceslist:
if not (deblist or dsclist):
self.logger.warning('*************************************\
@ -159,6 +160,7 @@ stx-pkgbuilder/configmap/')
line = line.replace("@CENGNURL@", cengnurl)
line = line.replace("@CENGNSTRATEGY@", cengnstrategy)
line = line.replace("@OSTREE_OSNAME@", ostree_osname)
line = line.replace("@DEBIAN_SNAPSHOT@", debian_snapshot)
line = line.replace("@MAX_CPUS@", max_cpus)
if sourceslist:
line = line.replace("@fetch@", "true")

View File

@ -55,4 +55,6 @@ export BUILDER_URL=http://@PROJECT@-stx-pkgbuilder:8080/pkgbuilder/
export OSTREE_OSNAME=@OSTREE_OSNAME@
export DEBIAN_SNAPSHOT=@DEBIAN_SNAPSHOT@
export MAX_CPUS=@MAX_CPUS@

View File

@ -4,6 +4,8 @@
REPOMGR=aptly
if [ "$REPOMGR" == "aptly" ]; then
CENGN_MIRROR="${CENGNURL}/debian/debian/deb.debian.org/debian/bullseye-11.3 bullseye main"
REPO_SNAPSHOT="[check-valid-until=no] ${DEBIAN_SNAPSHOT} bullseye main"
REPO_BIN="deb [trusted=yes] ${REPOMGR_DEPLOY_URL}deb-local-binary bullseye main"
REPO_SRC="deb-src [trusted=yes] ${REPOMGR_DEPLOY_URL}deb-local-source bullseye main"
ret=`grep 'deb-local-binary' /etc/apt/sources.list`
@ -14,6 +16,16 @@ if [ "$REPOMGR" == "aptly" ]; then
if [ "x$ret" == "x" ]; then
sed -i "1i\\${REPO_SRC}" /etc/apt/sources.list
fi
ret=`grep ${DEBIAN_SNAPSHOT} /etc/apt/sources.list`
if [ "x$ret" == "x" ]; then
sed -i "1i\\deb ${REPO_SNAPSHOT}" /etc/apt/sources.list
sed -i "1i\\deb-src ${REPO_SNAPSHOT}" /etc/apt/sources.list
fi
ret=`grep ${CENGNURL} /etc/apt/sources.list`
if [ "x$ret" == "x" ]; then
sed -i "1i\\deb ${CENGN_MIRROR}" /etc/apt/sources.list
sed -i "1i\\deb-src ${CENGN_MIRROR}" /etc/apt/sources.list
fi
fi
addgroup -gid 751 cgts > /dev/null 2>&1