Skip to content

Commit

Permalink
Support Debian 12 packages
Browse files Browse the repository at this point in the history
Fixes #251
  • Loading branch information
treydock committed Oct 13, 2023
1 parent f4528f4 commit f82303c
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- el9
- ubuntu-20.04
- ubuntu-22.04
- debian-12
- amzn2023
arch:
- x86_64
Expand Down Expand Up @@ -186,6 +187,7 @@ jobs:
dist:
- ubuntu-20.04
- ubuntu-22.04
- debian-12
arch:
- x86_64
- aarch64
Expand Down Expand Up @@ -258,6 +260,7 @@ jobs:
- el9
- ubuntu-20.04
- ubuntu-22.04
- debian-12
- amzn2023
arch:
- x86_64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- amzn2023
- ubuntu-20.04
- ubuntu-22.04
- debian-12
arch:
- x86_64
- aarch64
Expand Down
10 changes: 6 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build-image:
- OOD_PACKAGING_DIST: [el7, el8]
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_DIST: [el9, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
Expand All @@ -50,7 +50,8 @@ build-ondemand-release:
- bundle exec rake ood_packaging:package:ondemand-release
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023, ubuntu-20.04, ubuntu-22.04]
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, debian-12]
artifacts:
paths:
- tmp/output
Expand All @@ -67,7 +68,8 @@ build-ondemand-release-latest:
- bundle exec rake ood_packaging:package:ondemand-release-latest
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023, ubuntu-20.04, ubuntu-22.04]
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, debian-12]
artifacts:
paths:
- tmp/output
Expand Down Expand Up @@ -128,7 +130,7 @@ build-passenger:
- OOD_PACKAGING_DIST: [el7, el8]
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_DIST: [el9, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ood_packaging (0.12.1)
ood_packaging (0.13.0)
rake (~> 13.0.1)

GEM
Expand Down
4 changes: 3 additions & 1 deletion lib/ood_packaging/build_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ class OodPackaging::BuildBox
'el9' => 'almalinux:9',
'ubuntu-20.04' => 'ubuntu:20.04',
'ubuntu-22.04' => 'ubuntu:22.04',
'debian-12' => 'debian:12',
'amzn2023' => 'amazonlinux:2023'
}.freeze

CODENAMES = {
'ubuntu-20.04' => 'focal',
'ubuntu-22.04' => 'jammy'
'ubuntu-22.04' => 'jammy',
'debian-12' => 'bookworm'
}.freeze

ARCH_PLATFORMS = {
Expand Down
5 changes: 4 additions & 1 deletion lib/ood_packaging/build_box/docker-image/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ FROM --platform=<%= platform %> <%= base_image %>
ENV ARCH=<%= arch %>
MAINTAINER Trey Dockendorf <tdockendorf@osc.edu>
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV LC_CTYPE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV USER=<%= ctr_user %>
ENV GEM_PATH=<%= ctr_gems_dir %>:
<% if dist == 'el7' -%>
Expand Down Expand Up @@ -33,7 +35,8 @@ RUN dnf install -y --allowerasing systemd ruby nodejs sudo which wget \
<% elsif dist =~ /^ubuntu|debian/ -%>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y && apt clean all -y
RUN apt update -y && apt install -y locales && locale-gen $LANG && \
RUN apt update -y && apt install -y locales && \
echo "en_US UTF-8" >> /etc/locale.gen && locale-gen $LANG && \
apt clean all -y
RUN apt update -y && apt install -y apt-transport-https ca-certificates \
init debhelper devscripts dh-make build-essential apt-cudf lintian equivs \
Expand Down
2 changes: 1 addition & 1 deletion lib/ood_packaging/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Version code for OodPackaging
module OodPackaging
VERSION = '0.12.1'
VERSION = '0.13.0'
PACKAGE_VERSION = {
'ondemand-release' => {
'(ubuntu|debian)' => '3.1.0',
Expand Down
4 changes: 4 additions & 0 deletions packages/ondemand-release-latest/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ override_dh_auto_install:
mkdir -p $(WEB_DESTDIR)/etc/apt/trusted.gpg.d
echo "deb https://apt.osc.edu/ondemand/latest/web/apt $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/ondemand-web.list
install -m 644 -D $(CURDIR)/ondemand.gpg $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/ondemand-web.gpg
# Debian 12 (bookworm) has NodeJS 18 in OS repos
ifeq ($(CODENAME),"bookworm")
else
echo "deb https://deb.nodesource.com/$(NODEREPO) $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg
endif

override_dh_builddeb:
dh_builddeb -- -Zgzip
2 changes: 1 addition & 1 deletion packages/ondemand-release-latest/deb/debian/source/format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0 (native)
3.0 (quilt)
4 changes: 4 additions & 0 deletions packages/ondemand-release/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ override_dh_auto_install:
mkdir -p $(WEB_DESTDIR)/etc/apt/trusted.gpg.d
echo "deb https://apt.osc.edu/ondemand/$(REPO)/web/apt $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/ondemand-web.list
install -m 644 -D $(CURDIR)/ondemand.gpg $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/ondemand-web.gpg
# Debian 12 (bookworm) has NodeJS 18 in OS repos
ifeq ($(CODENAME),"bookworm")
else
echo "deb https://deb.nodesource.com/$(NODEREPO) $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg
endif

override_dh_builddeb:
dh_builddeb -- -Zgzip
2 changes: 1 addition & 1 deletion packages/ondemand-release/deb/debian/source/format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0 (native)
3.0 (quilt)
1 change: 1 addition & 0 deletions release-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ondemand-release:
# deb package
- '{major}.0-focal'
- '{major}.0-jammy'
- '{major}.0-bookworm'

# web
cjose:
Expand Down
1 change: 1 addition & 0 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'ubuntu-18.04': 'bionic',
'ubuntu-20.04': 'focal',
'ubuntu-22.04': 'jammy',
'debian-12': 'bookworm',
}
PROJ_ROOT = os.path.dirname(os.path.realpath(__file__))

Expand Down
3 changes: 3 additions & 0 deletions repo-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ LOCK_FILE="/var/lib/oodpkg/repo-update-${LOCK_NAME}.lock"
gpg --default-key ${GPG_KEY} --detach-sign --passphrase-file ${GPGPASS} --pinentry-mode loopback --batch --yes --no-tty --armor repodata/repomd.xml
else
case "${DIST}" in
debian-12|bookworm)
DIST="bookworm"
;;
ubuntu-22.04|jammy)
DIST="jammy"
;;
Expand Down
6 changes: 4 additions & 2 deletions sync-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
'el9',
'amzn2023',
'ubuntu-20.04',
'ubuntu-22.04'
'ubuntu-22.04',
'debian-12'
]
EL_RELEASES = [
'el7',
Expand All @@ -32,7 +33,8 @@
]
DEB_CODENAMES = [
'focal',
'jammy'
'jammy',
'bookworm'
]
SKIP = [
'bionic'
Expand Down

0 comments on commit f82303c

Please sign in to comment.