Merge "pkgbuilder: disconnect with Debian upstream"

This commit is contained in:
Zuul 2022-07-07 17:16:38 +00:00 committed by Gerrit Code Review
commit c2484868b1
6 changed files with 17 additions and 12 deletions

View File

@ -9,6 +9,7 @@ buildbranch = master
manifest = default.xml
ostree_osname = debian
debian_distribution = bullseye
debian_version = 11.3
# These URLs must contain snapshots of debian & debian-security repos.
# We will append debian_snapshot_timestamp to each of them when creating

View File

@ -101,6 +101,7 @@ class HandleControlTask:
'/' + \
self.config.get('project', 'debian_snapshot_timestamp')
debian_distribution = self.config.get('project', 'debian_distribution')
debian_version = self.config.get('project', 'debian_version')
if sourceslist:
if not (deblist or dsclist):
self.logger.warning('*************************************\
@ -175,6 +176,7 @@ stx-pkgbuilder/configmap/')
line = line.replace("@DEBIAN_SNAPSHOT@", debian_snapshot)
line = line.replace("@DEBIAN_SECURITY_SNAPSHOT@", debian_security_snapshot)
line = line.replace("@DEBIAN_DISTRIBUTION@", debian_distribution)
line = line.replace("@DEBIAN_VERSION@", debian_version)
line = line.replace("@MAX_CPUS@", max_cpus)
if sourceslist:
line = line.replace("@fetch@", "true")

View File

@ -63,4 +63,6 @@ export DEBIAN_SECURITY_SNAPSHOT="@DEBIAN_SECURITY_SNAPSHOT@"
export DEBIAN_DISTRIBUTION="@DEBIAN_DISTRIBUTION@"
export DEBIAN_VERSION="@DEBIAN_VERSION@"
export MAX_CPUS=@MAX_CPUS@

View File

@ -4,10 +4,10 @@
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"
CENGN_MIRROR="${CENGNURL}/debian/debian/deb.debian.org/debian/${DEBIAN_DISTRIBUTION}-${DEBIAN_VERSION} ${DEBIAN_DISTRIBUTION} main"
REPO_SNAPSHOT="[check-valid-until=no] ${DEBIAN_SNAPSHOT} ${DEBIAN_DISTRIBUTION} main"
REPO_BIN="deb [trusted=yes] ${REPOMGR_DEPLOY_URL}deb-local-binary ${DEBIAN_DISTRIBUTION} main"
REPO_SRC="deb-src [trusted=yes] ${REPOMGR_DEPLOY_URL}deb-local-source ${DEBIAN_DISTRIBUTION} main"
ret=`grep 'deb-local-binary' /etc/apt/sources.list`
if [ "x$ret" == "x" ]; then
sed -i "1i\\${REPO_BIN}" /etc/apt/sources.list

View File

@ -24,8 +24,8 @@ $lintian_require_success = 0;
$run_piuparts = 0;
$purge_build_deps = 'always';
$purge_build_directory = 'always';
$extra_repositories = ['deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-build bullseye main',
'deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-binary bullseye main'];
$extra_repositories = ['deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-build @DEBIAN_DISTRIBUTION@ main',
'deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-binary @DEBIAN_DISTRIBUTION@ main'];
$log_colour = 1;
$build_environment = {
'OSTREE_OSNAME' => '@OSTREE_OSNAME@'
@ -33,10 +33,10 @@ $build_environment = {
$external_commands = {
"chroot-setup-commands" => [
'cp /etc/apt/sources.list tmp.list',
'sed -i "1 i\deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-binary bullseye main" tmp.list',
'sed -i "1 i\deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-build bullseye main" tmp.list',
'echo "deb http://deb.debian.org/debian bullseye main" >> tmp.list',
'echo "deb-src http://deb.debian.org/debian bullseye main" >> tmp.list',
'sed -i "1 i\deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-binary @DEBIAN_DISTRIBUTION@ main" tmp.list',
'sed -i "1 i\deb [trusted=yes] http://stx-stx-repomgr:80/deb-local-build @DEBIAN_DISTRIBUTION@ main" tmp.list',
'echo "deb @CENGNURL@/debian/debian/deb.debian.org/debian/@DEBIAN_DISTRIBUTION@-@DEBIAN_VERSION@ @DEBIAN_DISTRIBUTION@ main" >> tmp.list',
'echo "deb-src @CENGNURL@/debian/debian/deb.debian.org/debian/@DEBIAN_DISTRIBUTION@-@DEBIAN_VERSION@ @DEBIAN_DISTRIBUTION@ main" >> tmp.list',
'awk \'!a[$0]++\' tmp.list > new.list && mv -f new.list /etc/apt/sources.list',
'echo "Package: *" > /etc/apt/preferences.d/local_repos',
'echo "Pin: origin stx-stx-repomgr" >> /etc/apt/preferences.d/local_repos',

View File

@ -22,7 +22,7 @@ BUILD_ENGINE = 'sbuild'
DEBDIST = 'bullseye'
STX_LOCALRC = '/usr/local/bin/stx/stx-localrc'
SBUILD_CONF = '/etc/sbuild/sbuild.conf'
ENVIRON_VARS = ['OSTREE_OSNAME']
ENVIRON_VARS = ['OSTREE_OSNAME', 'CENGNURL', 'DEBIAN_DISTRIBUTION', 'DEBIAN_VERSION']
class Debbuilder:
@ -77,7 +77,7 @@ class Debbuilder:
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True, shell=True)
outs, errs = process.communicate()
value = outs.strip().split("\n")[0]
value = outs.strip().split("\n")[0].strip('"')
if value:
cmd = "sed -ie 's#@%s@#%s#g' %s" % (var, value, SBUILD_CONF)
process = subprocess.Popen(cmd, shell=True, stdout=self.ctlog, stderr=self.ctlog)