diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 74cc7c7..8cdb04b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -4,6 +4,8 @@ on: push: branches: [main] pull_request: + schedule: + - cron: '0 4 * * *' jobs: buildbox: @@ -21,6 +23,14 @@ jobs: arch: - x86_64 - aarch64 + - ppc64le + exclude: + - dist: amzn2023 + arch: ppc64le + - dist: ubuntu-20.04 + arch: ppc64le + - dist: ubuntu-22.04 + arch: ppc64le runs-on: ${{ matrix.os }} name: Buildbox tests steps: @@ -61,6 +71,7 @@ jobs: arch: - x86_64 - aarch64 + - ppc64le package: - ondemand-release - ondemand-release-latest @@ -102,6 +113,12 @@ jobs: package: ondemand-release-latest - arch: aarch64 package: ondemand-compute + - arch: ppc64le + package: ondemand-release + - arch: ppc64le + package: ondemand-release-latest + - arch: ppc64le + package: ondemand-compute # Times out because very slow - dist: amzn2023 arch: aarch64 @@ -110,6 +127,8 @@ jobs: - dist: amzn2023 arch: aarch64 package: turbovnc + - dist: amzn2023 + arch: ppc64le runs-on: ${{ matrix.os }} name: Package test package=${{ matrix.package }} dist=${{ matrix.dist }} arch=${{ matrix.arch }} steps: @@ -134,11 +153,12 @@ jobs: env: OOD_PACKAGING_DEBUG: 'true' - name: arch distro + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} run: | DISTRO=$(echo "${{ matrix.os }}" | sed 's|\-||g') echo "DISTRO=${DISTRO}" >> $GITHUB_ENV - name: Build package - if: matrix.arch != 'x86_64' + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} uses: uraimo/run-on-arch-action@v2 with: arch: ${{ matrix.arch }} @@ -202,11 +222,12 @@ jobs: env: OOD_PACKAGING_DEBUG: 'true' - name: arch distro + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} run: | DISTRO=$(echo "${{ matrix.os }}" | sed 's|\-||g') echo "DISTRO=${DISTRO}" >> $GITHUB_ENV - name: Build package - if: matrix.arch != 'x86_64' + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} uses: uraimo/run-on-arch-action@v2 with: arch: ${{ matrix.arch }} @@ -241,6 +262,7 @@ jobs: arch: - x86_64 - aarch64 + - ppc64le package: - ondemand include: @@ -256,6 +278,15 @@ jobs: arch: x86_64 os: ubuntu-22.04 package: bc_osc_rstudio_server + exclude: + - dist: amzn2023 + arch: aarch64 + - dist: amzn2023 + arch: ppc64le + - dist: ubuntu-20.04 + arch: ppc64le + - dist: ubuntu-22.04 + arch: ppc64le runs-on: ${{ matrix.os }} name: Package ${{ matrix.package }} dist=${{ matrix.dist }} arch=${{ matrix.arch }} steps: @@ -282,11 +313,12 @@ jobs: if: matrix.arch == 'x86_64' run: ./bin/ood_packaging -w ./tmp/work -o ./tmp/output -d ${{ matrix.dist }} -a ${{ matrix.arch }} -V v3.1.0 -T --debug $(pwd)/tmp/${{ matrix.package }} - name: arch distro + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} run: | DISTRO=$(echo "${{ matrix.os }}" | sed 's|\-||g') echo "DISTRO=${DISTRO}" >> $GITHUB_ENV - name: Build ${{ matrix.package }} package - if: matrix.arch != 'x86_64' + if: ${{ matrix.arch != 'x86_64' && github.event_name == 'schedule' }} uses: uraimo/run-on-arch-action@v2 with: arch: ${{ matrix.arch }} @@ -302,6 +334,7 @@ jobs: run: | git config --global --add safe.directory $GITHUB_WORKSPACE bundle install + git config --global --add safe.directory $GITHUB_WORKSPACE/tmp/${{ matrix.package }} ./bin/ood_packaging -w ./tmp/work -o ./tmp/output -d ${{ matrix.dist }} -a ${{ matrix.arch }} -V v3.1.0 -T --debug $(pwd)/tmp/${{ matrix.package }} env: | OOD_PACKAGING_DEBUG: 'true' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2f6ff67..e1e0e04 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,6 +20,7 @@ jobs: arch: - x86_64 - aarch64 + - ppc64le name: Release buildbox runs-on: ubuntu-latest steps: @@ -49,8 +50,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Set version - id: version - run: echo ::set-output name=version::${GITHUB_REF#refs/*/v} + run: | + VERSION=${GITHUB_REF#refs/*/v} + echo "VERSION=${VERSION}" >> $GITHUB_ENV - name: checkout uses: actions/checkout@v3 - name: Setup Ruby using Bundler @@ -71,4 +73,4 @@ jobs: - name: Publish gem run: | bundle exec rake build - gem push pkg/ood_packaging-${{ steps.version.outputs.version }}.gem + gem push pkg/ood_packaging-${{ env.VERSION }}.gem diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5d130f..000315d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,9 +30,13 @@ build-image: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - - OOD_PACKAGING_DIST: [el9, amzn2023, ubuntu-20.04, ubuntu-22.04] + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] + - OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04] + OOD_PACKAGING_ARCH: [x86_64, aarch64] + - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] build-ondemand-release: @@ -81,8 +85,10 @@ build-ondemand-runtime: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] - OOD_PACKAGING_DIST: [el9, amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] artifacts: @@ -120,9 +126,11 @@ build-passenger: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - - OOD_PACKAGING_DIST: [el9, ubuntu-20.04, ubuntu-22.04] + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] + - OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04] OOD_PACKAGING_ARCH: [x86_64, aarch64] - OOD_PACKAGING_DIST: [amzn2023] # Amazon aarch64 takes hours so build by hand for now @@ -146,7 +154,7 @@ build-sqlite: parallel: matrix: - OOD_PACKAGING_DIST: el7 - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec timeout: 2h artifacts: @@ -166,7 +174,7 @@ build-cjose: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] @@ -187,7 +195,7 @@ build-mod_auth_openidc: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] @@ -208,9 +216,11 @@ build-ondemand_exporter: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - - OOD_PACKAGING_DIST: [el9, amzn2023] + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] + - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] artifacts: paths: @@ -227,6 +237,7 @@ build-ondemand-compute: script: - bundle exec rake ood_packaging:package:ondemand-compute[$DIST] - cp -r tmp/output/$OOD_PACKAGING_DIST-x86_64 tmp/output/$OOD_PACKAGING_DIST-aarch64 + - cp -r tmp/output/$OOD_PACKAGING_DIST-x86_64 tmp/output/$OOD_PACKAGING_DIST-ppc64le parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] @@ -249,9 +260,11 @@ build-python-websockify: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - - OOD_PACKAGING_DIST: [el9, amzn2023] + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] + - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] artifacts: paths: @@ -270,9 +283,11 @@ build-turbovnc: parallel: matrix: - OOD_PACKAGING_DIST: [el7, el8] - OOD_PACKAGING_ARCH: [x86_64, aarch64] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec - - OOD_PACKAGING_DIST: [el9, amzn2023] + - OOD_PACKAGING_DIST: [el9] + OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le] + - OOD_PACKAGING_DIST: [amzn2023] OOD_PACKAGING_ARCH: [x86_64, aarch64] timeout: 3h artifacts: diff --git a/Gemfile.lock b/Gemfile.lock index 8d150bc..e6eb711 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ood_packaging (0.9.0) + ood_packaging (0.10.0) rake (~> 13.0.1) GEM diff --git a/lib/ood_packaging/build.rb b/lib/ood_packaging/build.rb index e56a714..23f53d1 100644 --- a/lib/ood_packaging/build.rb +++ b/lib/ood_packaging/build.rb @@ -39,7 +39,10 @@ def gpg_sign? end def version - ENV['VERSION'] + ver = ENV['VERSION'] + return nil if ver == '' + + ver end def rpm_version @@ -47,6 +50,8 @@ def rpm_version end def rpm_release + return nil if version.nil? + v = version.split('-', 2) return '1' if v.size < 2 @@ -64,9 +69,10 @@ def deb_chlog_version end def rpm_defines - defines = ["--define 'git_tag #{version}'"] - defines.concat ["--define 'package_version #{rpm_version}'"] - defines.concat ["--define 'package_release #{rpm_release}'"] + defines = [] + defines.concat ["--define 'git_tag #{version}'"] unless version.nil? + defines.concat ["--define 'package_version #{rpm_version}'"] unless rpm_version.nil? + defines.concat ["--define 'package_release #{rpm_release}'"] unless rpm_release.nil? defines.concat ["--define 'scl #{config[:scl]}'"] if config[:scl] defines end diff --git a/lib/ood_packaging/build_box.rb b/lib/ood_packaging/build_box.rb index b9ac114..5441a5f 100644 --- a/lib/ood_packaging/build_box.rb +++ b/lib/ood_packaging/build_box.rb @@ -11,7 +11,7 @@ class OodPackaging::BuildBox BASE_IMAGES = { 'el7' => 'centos:7', - 'el8' => 'rockylinux/rockylinux:8', + 'el8' => 'almalinux:8', 'el9' => 'almalinux:9', 'ubuntu-20.04' => 'ubuntu:20.04', 'ubuntu-22.04' => 'ubuntu:22.04', @@ -25,7 +25,8 @@ class OodPackaging::BuildBox ARCH_PLATFORMS = { 'x86_64' => 'linux/amd64', - 'aarch64' => 'linux/arm64' + 'aarch64' => 'linux/arm64', + 'ppc64le' => 'linux/ppc64le' }.freeze def initialize(config = {}) diff --git a/lib/ood_packaging/build_box/docker-image/Dockerfile.erb b/lib/ood_packaging/build_box/docker-image/Dockerfile.erb index cba922c..2a77b35 100644 --- a/lib/ood_packaging/build_box/docker-image/Dockerfile.erb +++ b/lib/ood_packaging/build_box/docker-image/Dockerfile.erb @@ -17,7 +17,7 @@ RUN head -n 13 /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo >> /etc/yum.repos.d/Cent RUN rm -f /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo /etc/yum.repos.d/CentOS-SCLo-scl.repo <% elsif dnf? -%> RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf/* -RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-all-langpacks && dnf clean all && rm -rf /var/cache/dnf/* +RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-langpack-en && dnf clean all && rm -rf /var/cache/dnf/* <% if dist == 'el8' -%> RUN dnf config-manager --set-enabled powertools && dnf clean all && rm -rf /var/cache/dnf/* RUN dnf module enable -y ruby:<%= ruby_version %> nodejs:<%= nodejs_version %> && dnf clean all && rm -rf /var/cache/dnf/* @@ -37,8 +37,10 @@ RUN apt update -y && apt install -y apt-transport-https ca-certificates \ init debhelper devscripts dh-make build-essential apt-cudf lintian equivs \ sudo rake wget curl ruby bundler && \ apt clean all -y +<% if arch != 'ppc64le' %> RUN echo "deb https://deb.nodesource.com/node_<%= nodejs_version %>.x <%= codename %> main" > /etc/apt/sources.list.d/nodesource.list RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nodesource.gpg +<% end %> <% end -%> COPY . /build RUN /bin/bash /build/install.sh diff --git a/lib/ood_packaging/package.rb b/lib/ood_packaging/package.rb index cb63fd8..01830f0 100644 --- a/lib/ood_packaging/package.rb +++ b/lib/ood_packaging/package.rb @@ -248,7 +248,20 @@ def tar! end end + # Unused but left in case useful in future + # def handle_signals + # ['QUIT', 'TERM', 'INT'].each do |signal| + # Signal.trap(signal) do + # puts "Caught signal #{signal}, proceeding to kill container".red + # container_kill! + # exit 1 + # end + # end + # end + + # rubocop:disable Metrics/AbcSize def run! + # handle_signals if tar_only? tar! return @@ -259,6 +272,10 @@ def run! container_start! container_exec!(exec_rake) puts "Build SUCCESS: package=#{package} dist=#{build_box.dist}".green + rescue SignalException => e + puts "Caught signal #{e}, proceeding to kill container".red + container_kill! + exit 1 rescue RuntimeError puts "Build FAILED package=#{package} dist=#{build_box.dist}".red raise @@ -266,6 +283,7 @@ def run! container_attach! if attach? container_kill! if container_running? && !attach? end + # rubocop:enable Metrics/AbcSize def container_running? cmd = "#{container_runtime} inspect #{container_name} 2>/dev/null 1>/dev/null" diff --git a/lib/ood_packaging/version.rb b/lib/ood_packaging/version.rb index 6f7f072..7cbbda3 100644 --- a/lib/ood_packaging/version.rb +++ b/lib/ood_packaging/version.rb @@ -2,7 +2,7 @@ # Version code for OodPackaging module OodPackaging - VERSION = '0.9.0' + VERSION = '0.10.0' PACKAGE_VERSION = { 'ondemand-release' => { '(ubuntu|debian)' => '3.1.0', diff --git a/packages/ondemand-release-latest/deb/debian/postinst b/packages/ondemand-release-latest/deb/debian/postinst new file mode 100644 index 0000000..ade94b7 --- /dev/null +++ b/packages/ondemand-release-latest/deb/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ "$(uname -p)" = "ppc64le" ]; then + rm -f /etc/apt/sources.list.d/nodesource.list + rm -f /etc/apt/trusted.gpg.d/nodesource.gpg +fi diff --git a/packages/ondemand-release/deb/debian/postinst b/packages/ondemand-release/deb/debian/postinst new file mode 100644 index 0000000..ade94b7 --- /dev/null +++ b/packages/ondemand-release/deb/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ "$(uname -p)" = "ppc64le" ]; then + rm -f /etc/apt/sources.list.d/nodesource.list + rm -f /etc/apt/trusted.gpg.d/nodesource.gpg +fi diff --git a/packages/ondemand_exporter/rpm/ondemand_exporter.spec b/packages/ondemand_exporter/rpm/ondemand_exporter.spec index d5af9de..f2a22b1 100644 --- a/packages/ondemand_exporter/rpm/ondemand_exporter.spec +++ b/packages/ondemand_exporter/rpm/ondemand_exporter.spec @@ -14,6 +14,9 @@ %ifarch aarch64 %define platform arm64 %endif +%ifarch ppc64le +%define platform ppc64le +%endif Name: ondemand_exporter Version: %{package_version} diff --git a/packages/passenger/deb/debian/rules b/packages/passenger/deb/debian/rules index d7e98f8..db883af 100755 --- a/packages/passenger/deb/debian/rules +++ b/packages/passenger/deb/debian/rules @@ -41,8 +41,13 @@ export MFLAG = "-march=armv8-a" else export MFALG = "-m64" endif +ifeq ($(ARCH),ppc64le) +export MTUNE = "-mcpu=powerpc64le" +else +export MTUNE = "-mtune=generic" +endif -export BASE_CCOPTS=-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches $(MFALG) -mtune=generic +export BASE_CCOPTS=-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches $(MFALG) $(MTUNE) export NGINX_CCOPTS=-O2 $(BASE_CCOPTS) export PASSENGER_CCOPTS=$(BASE_CCOPTS) -Wno-deprecated export LDOPTS=-Wl,-z,relro -Wl,-E diff --git a/packages/passenger/rpm/passenger.spec b/packages/passenger/rpm/passenger.spec index e7a9997..05071fb 100644 --- a/packages/passenger/rpm/passenger.spec +++ b/packages/passenger/rpm/passenger.spec @@ -30,6 +30,11 @@ %else %define mflag "-m64" %endif +%ifarch ppc64le +%define mtune "-mcpu=powerpc64le" +%else +%define mtune "-mtune=generic" +%endif Name: %{?scl_prefix}passenger Version: %{passenger_version} @@ -118,8 +123,8 @@ export LC_ALL=en_US.UTF-8 # nginx # TODO %optflags on EL8 caused some very odd problems so only pull in what's absolutely necessary %if 0%{?rhel} >= 8 -export EXTRA_CFLAGS="${CFLAGS} %{mflag} -mtune=generic -fPIC" -export EXTRA_CXXFLAGS="${CXXFLAGS} %{mflag} -mtune=generic -fPIC" +export EXTRA_CFLAGS="${CFLAGS} %{mflag} %{mtune} -fPIC" +export EXTRA_CXXFLAGS="${CXXFLAGS} %{mflag} %{mtune} -fPIC" %else export EXTRA_CFLAGS="${CFLAGS:-%optflags} -Wno-deprecated" export EXTRA_CXXFLAGS="${CXXFLAGS:-%optflags} -Wno-deprecated" diff --git a/repo-update.sh b/repo-update.sh index 54fb4f9..05ff652 100755 --- a/repo-update.sh +++ b/repo-update.sh @@ -120,6 +120,9 @@ LOCK_FILE="/var/lib/oodpkg/repo-update-${LOCK_NAME}.lock" aarch64) ARCH="arm64" ;; + ppc64le) + ARCH="ppc64el" + ;; *) echo "Unrecognized ARCH" exit 1 @@ -139,7 +142,7 @@ Label: OnDemand Suite: stable Codename: ${DIST} Version: ${REPO} -Architectures: ${ARCH} +Architectures: amd64 arm64 ppc64el Components: main Description: OnDemand repository Date: $(date -Ru) diff --git a/sync-release.py b/sync-release.py index c275962..04ece64 100755 --- a/sync-release.py +++ b/sync-release.py @@ -37,6 +37,17 @@ SKIP = [ 'bionic' ] +COMPUTE_DISTS = [ + 'el7', + 'el8', + 'el9', + 'amzn2023', +] +ARCHES = [ + 'x86_64', + 'aarch64', + 'ppc64le', +] def get_rpm_info(rpm_file): ts = rpm.ts() @@ -151,7 +162,7 @@ def main(): if not os.path.islink(rel_l): logger.info("ln -s %s %s", rel, rel_l) os.symlink(rel, rel_l) - for arch in ['SRPMS', 'x86_64', 'aarch64']: + for arch in ['SRPMS', 'x86_64', 'aarch64', 'ppc64le']: d = os.path.join(release_dir, t, rel, arch) if not os.path.isdir(d): logger.info("mkdir -p %s", d) @@ -161,7 +172,7 @@ def main(): if not os.path.isdir(rel_d): logger.info("mkdir -p %s", rel_d) os.makedirs(rel_d, 0o755) - for arch in ['SRPMS', 'x86_64', 'aarch64']: + for arch in ['SRPMS', 'x86_64', 'aarch64', 'ppc64le']: d = os.path.join(release_dir, t, rel, arch) if not os.path.isdir(d): logger.info("mkdir -p %s", d) @@ -171,7 +182,7 @@ def main(): if not os.path.isdir(pool_d): logger.info("mkdir -p %s", pool_d) os.makedirs(pool_d, 0o755) - for arch in ['binary-amd64', 'binary-arm64']: + for arch in ['binary-amd64', 'binary-arm64', 'binary-ppc64el']: rel_d = os.path.join(release_dir, t, 'apt/dists', rel, 'main', arch) if not os.path.isdir(rel_d): logger.info("mkdir -p %s", rel_d) @@ -282,18 +293,36 @@ def main(): os.remove(f) for dist in DISTS: - logger.info("repo-update.sh -r %s -d %s", args.release, dist) - repo_update_cmd = [ - os.path.join(PROJ_ROOT, 'repo-update.sh'), - '-r', args.release, - '-d', dist, - ] - process = subprocess.Popen(repo_update_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - exit_code = process.returncode - if exit_code != 0: - logger.error("OUTPUT: %s", out) - logger.error("ERROR: %s", err) + for arch in ARCHES: + logger.info("repo-update.sh -r %s -d %s -a %s", args.release, dist, arch) + repo_update_cmd = [ + os.path.join(PROJ_ROOT, 'repo-update.sh'), + '-r', args.release, + '-d', dist, + '-a', arch, + ] + process = subprocess.Popen(repo_update_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = process.communicate() + exit_code = process.returncode + if exit_code != 0: + logger.error("OUTPUT: %s", out) + logger.error("ERROR: %s", err) + if dist not in COMPUTE_DISTS: + continue + logger.info("repo-update.sh -r %s -d %s -a %s -t compute", args.release, dist, arch) + repo_update_cmd = [ + os.path.join(PROJ_ROOT, 'repo-update.sh'), + '-r', args.release, + '-d', dist, + '-a', arch, + '-t', 'compute', + ] + process = subprocess.Popen(repo_update_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = process.communicate() + exit_code = process.returncode + if exit_code != 0: + logger.error("OUTPUT: %s", out) + logger.error("ERROR: %s", err) if __name__ == '__main__': main()