Skip to content

Commit

Permalink
Use apt-ftparchive
Browse files Browse the repository at this point in the history
Also, the sources file needs to be adapted since we do not have a
typical tree.

See: https://manpages.debian.org/bookworm/apt-utils/apt-ftparchive.1.en.html
  • Loading branch information
fauust committed Oct 24, 2023
1 parent 1cf040d commit f29743c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions master-galera/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,21 @@ for platform in all_platforms:

def dpkgDeb():
return ShellCommand(
name="dpkg-scanpackages/sources",
name="apt-ftparchive",
haltOnFailure=True,
command=[
"sh",
"bash",
"-xc",
util.Interpolate(
"""set -e
[[ -f /etc/apt/sources.list.d/galera-4.list ]] && sudo rm /etc/apt/sources.list.d/galera-4.list
sudo apt-get update && sudo apt-get -y install apt-utils
mkdir -p debs
find .. -maxdepth 1 -type f -exec cp {} debs/ \;
cd debs
( dpkg-scanpackages . /dev/null && dpkg-scanpackages --type ddeb . /dev/null )| gzip -9c > Packages.gz
dpkg-scansources . /dev/null | gzip -9c > Sources.gz
apt-ftparchive packages . >Packages
apt-ftparchive sources . >Sources
apt-ftparchive release . >Release
cd ..
find debs -type f -exec sha256sum {} \; | sort > sha256sums.txt
"""
Expand Down Expand Up @@ -290,12 +293,11 @@ f_deb_build.addStep(
&& cat << EOF > /packages/%(prop:branch)s/%(prop:revision)s/%(prop:buildername)s/galera.sources
X-Repolib-Name: Galera
Types: deb
URIs: %(kw:url)s/galera/%(prop:branch)s/%(prop:revision)s/%(prop:buildername)s
Suites: $VERSION_CODENAME
Components: main main/debug
URIs: %(kw:url)s/galera/%(prop:branch)s/%(prop:revision)s/%(prop:buildername)s/debs
Suites: ./
Trusted: yes
EOF
ln -s %(prop:branch)s/%(prop:revision)s/%(prop:buildername)s/galera.sources /packages/%(prop:branch)s-latest-%(prop:buildername)s.sources \
ln -sf %(prop:branch)s/%(prop:revision)s/%(prop:buildername)s/galera.sources /packages/%(prop:branch)s-latest-%(prop:buildername)s.sources \
&& sync /packages/%(prop:branch)s/%(prop:revision)s
""",
url=os.getenv("ARTIFACTS_URL", default="https://ci.mariadb.org"),
Expand Down

0 comments on commit f29743c

Please sign in to comment.