This commit is contained in:
Mateusz Gruszczyński committed 2026-10-22 16:10:02 +02:00
1 parent 1f0daa0679
commit f86a62b8b1
19 files changed
+389 -73

No files matched your search

+55
View File
@@ -239,6 +239,17 @@ deb:
type: origin
YAML
# The SUSE flavor keeps the RPM name/version identical but uses native
# dependencies and an isolated Python launcher for Leap/SLES 15 systems.
# SUSE may ship /usr/bin/python3 older than the separately installed python311.
install -D -m 0755 "$BUILDER_ROOT/packaging/suse-python3" \
"$PKG/payload/usr/libexec/$PACKAGE_NAME/python3"
mkdir -p "$PKG/payload/usr/lib/systemd/system/${PACKAGE_NAME}.service.d"
cat > "$PKG/payload/usr/lib/systemd/system/${PACKAGE_NAME}.service.d/50-suse-python.conf" <<SUSE_UNIT
[Service]
Environment=PATH=/usr/libexec/${PACKAGE_NAME}:/usr/local/bin:/usr/bin:/bin
SUSE_UNIT
cat > "$PKG/nfpm-rpm.yaml" <<YAML
name: $NAME_Q
arch: amd64
@@ -270,3 +281,47 @@ rpm:
signature:
key_file: $GPG_KEY_Q
YAML
# SUSE Linux Enterprise, openSUSE Leap and Tumbleweed use shadow (not
# RHEL's shadow-utils). Versioned Python enables Leap/SLES 15 installations.
# Compression gzip is understood by older rpm clients as well as current ones.
cat > "$PKG/nfpm-suse.yaml" <<YAML
name: $NAME_Q
arch: amd64
platform: linux
version: $VERSION_Q
release: "$PACKAGE_RELEASE"
section: net
priority: optional
maintainer: $MAINTAINER_Q
description: $DESC_Q
license: $LICENSE_Q
homepage: $HOMEPAGE_Q
vendor: $NAME_Q
contents:
$(cat "$CONTENTS_FILE")
- src: $(yaml_quote "$PKG/payload/usr/libexec/$PACKAGE_NAME/python3")
dst: /usr/libexec/$PACKAGE_NAME/python3
file_info:
mode: 0755
- src: $(yaml_quote "$PKG/payload/usr/lib/systemd/system/${PACKAGE_NAME}.service.d/50-suse-python.conf")
dst: /usr/lib/systemd/system/${PACKAGE_NAME}.service.d/50-suse-python.conf
file_info:
mode: 0644
depends:
- ca-certificates
- 'glibc >= 2.34'
- gzip
- logrotate
- shadow
- systemd
- '((python310 and python310-pip) or (python311 and python311-pip) or (python312 and python312-pip) or (python313 and python313-pip) or (python314 and python314-pip) or (python3 >= 3.10 and python3-pip))'
scripts:
postinstall: "$PKG/scripts/rpm-postinstall.sh"
preremove: "$PKG/scripts/rpm-preremove.sh"
postremove: "$PKG/scripts/rpm-postremove.sh"
rpm:
compression: gzip
signature:
key_file: $GPG_KEY_Q
YAML