Debian: pkgbuilder: adjust apt key and repositories of sbuild

Without related apt key, `apt update` on related repository will lead
to warning messages as below, add apt key to avoid it:
W: GPG error: http://stx-stx-repomgr:80/deb-local-binary bullseye
InRelease: The following signatures couldn't be verified because the
public key is not available: NO_PUBKEY FAAD0555200D6582

There are duplicate repositories in apt sources list, remove one of
them to avoid warning messages as below:
W: Target Packages (main/binary-amd64/Packages) is configured multiple
times in /etc/apt/sources.list:1 and
/etc/apt/sources.list.d/sbuild-extra-repositories.list:1
...

Test Plan:
PASS: ./stx-init-env --rebuild
PASS: build-pkgs -a; build-image
PASS: No such warning message any more

Story: 2010643
Task: 47639

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Change-Id: Ia4907fa92a92afeeca73abc35dfb712ea6ae8cb4
This commit is contained in:
Zhang Xiao 2023-03-13 21:01:28 +08:00
parent 3692f411db
commit 0f1d695379
2 changed files with 3 additions and 3 deletions

View File

@ -57,8 +57,8 @@ COPY stx/toCOPY/pkgbuilder/schrootspool.py /opt/
COPY stx/toCOPY/pkgbuilder/setup.sh /opt/
COPY stx/toCOPY/pkgbuilder/debbuilder.conf /etc/sbuild/sbuild.conf
COPY stx/toCOPY/pkgbuilder/pubkey.rsa /root
RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
COPY stx/toCOPY/pkgbuilder/pubkey.rsa /opt/
RUN apt-key add /opt/pubkey.rsa
# Add vimrc
RUN mkdir -p /etc/vim

View File

@ -25,7 +25,7 @@ $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-binary @DEBIAN_DISTRIBUTION@ main'];
$extra_repository_keys = ['/opt/pubkey.rsa'];
$log_colour = 1;
$build_environment = {
'OSTREE_OSNAME' => '@OSTREE_OSNAME@'