diff --git a/.gitignore b/.gitignore
index 445b6c04..d637b987 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,4 @@ generated
msi/build
venv/
-
+pkg.jenkins.io/
diff --git a/Jenkinsfile b/Jenkinsfile
index 794701db..57d1e222 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -31,7 +31,7 @@ podTemplate(yaml: readTrusted('KubernetesPod.yaml'), workingDir: '/home/jenkins/
stage('Build') {
sh 'make package && python3 -m pytest bin --junitxml target/junit.xml'
junit 'target/junit.xml'
- def results = '*.war, target/debian/*.deb, target/rpm/*.rpm, target/suse/*.rpm'
+ def results = '*.war, target/debian/*.deb, target/rpm/*.rpm'
stash includes: results, name: 'results'
archiveArtifacts results
}
diff --git a/Makefile b/Makefile
index e43d9c6c..89f00148 100644
--- a/Makefile
+++ b/Makefile
@@ -23,11 +23,11 @@ clean:
setup:
bash -ex -c 'for f in */setup.sh; do $$f; done'
-package: war deb rpm suse
+package: war deb rpm
-publish: war.publish deb.publish rpm.publish suse.publish
+publish: war.publish deb.publish rpm.publish
-test: deb.test rpm.test suse.test
+test: deb.test rpm.test
war: ${WAR}
war.publish: ${WAR}
@@ -49,12 +49,6 @@ ${RPM}: ${WAR} $(shell find rpm/build -type f)
rpm.publish: ${RPM} $(shell find rpm/publish -type f)
./rpm/publish/publish.sh
-suse: ${SUSE}
-${SUSE}: ${WAR} $(shell find suse/build -type f)
- ./suse/build/build.sh
-suse.publish: ${SUSE} $(shell find suse/publish -type f)
- ./suse/publish/publish.sh
-
msi.publish:
./msi/publish/publish.sh
diff --git a/README.md b/README.md
index fd021b7d..19698f36 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,8 @@ This repository contains scripts for packaging `jenkins.war` into various platfo
The following platforms are currently supported:
* Windows MSI: `msi/`
- * RedHat/CentOS RPM: `rpm/`
+ * RedHat/CentOS/openSUSE RPM: `rpm/`
* Debian/Ubuntu DEB: `deb/`
- * OpenSUSE RPM: `suse/`
# Pre-requisites
Running the main package script requires a Linux environment (currently Ubuntu, see [JENKINS-27744](https://issues.jenkins-ci.org/browse/JENKINS-27744).)
diff --git a/bin/branding.list b/bin/branding.list
index ec4e2aab..9d44cd48 100644
--- a/bin/branding.list
+++ b/bin/branding.list
@@ -13,7 +13,6 @@ ORGANIZATION
----------------------------------
RELEASELINE
RPM_URL
-SUSE_URL
DEB_URL
LICENSE_TEXT
LICENSE_TEXT_DEB
diff --git a/bin/indexGenerator.py b/bin/indexGenerator.py
index e0b17006..c58ba985 100755
--- a/bin/indexGenerator.py
+++ b/bin/indexGenerator.py
@@ -18,16 +18,11 @@ class IndexGenerator:
"template": "header.debian.html",
"web_url": os.getenv("DEB_URL"),
},
- "redhat": {
+ "rpm": {
"extension": ".rpm",
- "template": "header.redhat.html",
+ "template": "header.rpm.html",
"web_url": os.getenv("RPM_URL"),
},
- "opensuse": {
- "extension": ".rpm",
- "template": "header.opensuse.html",
- "web_url": os.getenv("SUSE_URL"),
- },
"war": {"extension": ".war", "template": "header.war.html", "web_url": "unset"},
"windows": {
"extension": ".msi",
@@ -38,7 +33,7 @@ class IndexGenerator:
HELP_MESSAGE = """
Generate header.html for package distribution site
- It supports debian, redhat and opensuse packages
+ It supports debian and rpm packages
indexGenerator.py
-d : Which package distribution to target
diff --git a/bin/test_branding.py b/bin/test_branding.py
index d1bd1751..7491ed5a 100644
--- a/bin/test_branding.py
+++ b/bin/test_branding.py
@@ -20,7 +20,6 @@
CHANGELOG_PAGE
----------------------------------
-SUSE_URL
# INVALID
DEB_URL
LICENSE_TEXT
@@ -56,7 +55,6 @@ def test_clean_lines(self):
"LICENSE",
"HOMEPAGE",
"CHANGELOG_PAGE",
- "SUSE_URL",
"DEB_URL",
"LICENSE_TEXT",
}
diff --git a/env/azure.mk b/env/azure.mk
index 51f6051b..ebf0998a 100644
--- a/env/azure.mk
+++ b/env/azure.mk
@@ -11,18 +11,15 @@ export SCP_OPTS=-P 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/nul
export WARDIR=/srv/releases/jenkins/war${RELEASELINE}
export MSIDIR=/srv/releases/jenkins/windows${RELEASELINE}
export DEBDIR=/srv/releases/jenkins/debian${RELEASELINE}/binary
-export RPMDIR=/srv/releases/jenkins/redhat${RELEASELINE}
-export SUSEDIR=/srv/releases/jenkins/opensuse${RELEASELINE}
+export RPMDIR=/srv/releases/jenkins/rpm${RELEASELINE}
# where to put repository index and other web contents
-export RPM_WEBDIR=/srv/releases/jenkins/redhat${RELEASELINE}
+export RPM_WEBDIR=/srv/releases/jenkins/rpm${RELEASELINE}
export MSI_WEBDIR=/srv/releases/jenkins/windows${RELEASELINE}
-export SUSE_WEBDIR=/srv/releases/jenkins/opensuse${RELEASELINE}
export DEB_WEBDIR=/srv/releases/jenkins/debian${RELEASELINE}
export WAR_WEBDIR=/srv/releases/jenkins/war${RELEASELINE}
# URL to the aforementioned webdir.
WEBSERVER=pkg.jenkins.io
-export RPM_URL=https://${WEBSERVER}/redhat${RELEASELINE}
-export SUSE_URL=https://${WEBSERVER}/opensuse${RELEASELINE}
+export RPM_URL=https://${WEBSERVER}/rpm${RELEASELINE}
export DEB_URL=https://${WEBSERVER}/debian${RELEASELINE}
diff --git a/env/release.mk b/env/release.mk
index 516420fd..d731109f 100644
--- a/env/release.mk
+++ b/env/release.mk
@@ -14,17 +14,14 @@ export SCP_OPTS=-P 22
export WARDIR=/srv/releases/jenkins/war${RELEASELINE}
export MSIDIR=/srv/releases/jenkins/windows${RELEASELINE}
export DEBDIR=/srv/releases/jenkins/debian${RELEASELINE}
-export RPMDIR=/srv/releases/jenkins/redhat${RELEASELINE}
-export SUSEDIR=/srv/releases/jenkins/opensuse${RELEASELINE}
+export RPMDIR=/srv/releases/jenkins/rpm${RELEASELINE}
# where to put repository index and other web contents
-export RPM_WEBDIR=/var/www/pkg.jenkins.io.staging/redhat${RELEASELINE}
-export SUSE_WEBDIR=/var/www/pkg.jenkins.io.staging/opensuse${RELEASELINE}
+export RPM_WEBDIR=/var/www/pkg.jenkins.io.staging/rpm${RELEASELINE}
export DEB_WEBDIR=/var/www/pkg.jenkins.io.staging/debian${RELEASELINE}
export WAR_WEBDIR=/var/www/pkg.jenkins.io.staging/war${RELEASELINE}
export MSI_WEBDIR=/var/www/pkg.jenkins.io.staging/windows${RELEASELINE}
# URL to the aforementioned webdir
-export RPM_URL=https://pkg.jenkins.io/redhat${RELEASELINE}
-export SUSE_URL=https://pkg.jenkins.io/opensuse${RELEASELINE}
+export RPM_URL=https://pkg.jenkins.io/rpm${RELEASELINE}
export DEB_URL=https://pkg.jenkins.io/debian${RELEASELINE}
diff --git a/env/test.mk b/env/test.mk
index 1841c5de..6c963f71 100644
--- a/env/test.mk
+++ b/env/test.mk
@@ -18,18 +18,15 @@ export TESTDIR=$(realpath .)/pkg.jenkins.io
export WARDIR=${TESTDIR}/war${RELEASELINE}
export MSIDIR=${TESTDIR}/windows${RELEASELINE}
export DEBDIR=${TESTDIR}/debian${RELEASELINE}/binary
-export RPMDIR=${TESTDIR}/redhat${RELEASELINE}
-export SUSEDIR=${TESTDIR}/opensuse${RELEASELINE}
+export RPMDIR=${TESTDIR}/rpm${RELEASELINE}
# where to put repository index and other web contents
-export RPM_WEBDIR=${TESTDIR}/redhat${RELEASELINE}
-export SUSE_WEBDIR=${TESTDIR}/opensuse${RELEASELINE}
+export RPM_WEBDIR=${TESTDIR}/rpm${RELEASELINE}
export DEB_WEBDIR=${TESTDIR}/debian${RELEASELINE}
export WAR_WEBDIR=${TESTDIR}/war${RELEASELINE}
export MSI_WEBDIR=${TESTDIR}/windows${RELEASELINE}
# URL to the aforementioned webdir.
WEBSERVER=pkg.jenkins.io
-export RPM_URL=https://${WEBSERVER}/redhat${RELEASELINE}
-export SUSE_URL=https://${WEBSERVER}/opensuse${RELEASELINE}
+export RPM_URL=https://${WEBSERVER}/rpm${RELEASELINE}
export DEB_URL=https://${WEBSERVER}/debian${RELEASELINE}
diff --git a/molecule/default/install-suse.yml b/molecule/default/install-suse.yml
index 5c92bd38..8066503b 100644
--- a/molecule/default/install-suse.yml
+++ b/molecule/default/install-suse.yml
@@ -16,7 +16,7 @@
state: present
key: /var/tmp/target/credentials/test.ascii.key
- find:
- paths: /var/tmp/target/suse
+ paths: /var/tmp/target/rpm
file_type: file
patterns: "*.rpm"
register: package_list
diff --git a/rpm/build/SOURCES/jenkins.repo b/rpm/build/SOURCES/jenkins.repo
index 968aa78e..482588b2 100644
--- a/rpm/build/SOURCES/jenkins.repo
+++ b/rpm/build/SOURCES/jenkins.repo
@@ -1,4 +1,6 @@
[@@ARTIFACTNAME@@]
name=@@PRODUCTNAME@@
baseurl=@@RPM_URL@@
+# TODO 'jenkins.io' {{ web_url }}/{{organization}}-2023.key
+gpgkey=@@RPM_URL@@/jenkins.io-2023.key
gpgcheck=1
diff --git a/rpm/build/SPECS/jenkins.spec b/rpm/build/SPECS/jenkins.spec
index 7422efab..7943c522 100644
--- a/rpm/build/SPECS/jenkins.spec
+++ b/rpm/build/SPECS/jenkins.spec
@@ -5,7 +5,7 @@
Name: @@ARTIFACTNAME@@
Version: %{ver}
-Release: 1.1
+Release: 1
Summary: @@SUMMARY@@
Source: jenkins.war
Source1: jenkins.service
@@ -73,6 +73,7 @@ fi
%ghost %{_localstatedir}/cache/%{name}
%{_unitdir}/%{name}.service
%{_bindir}/%{name}
+%dir %{_datadir}/%{name}
%{_datadir}/%{name}/migrate
%changelog
diff --git a/rpm/publish/publish.sh b/rpm/publish/publish.sh
index 7ec3d163..e72ace2d 100755
--- a/rpm/publish/publish.sh
+++ b/rpm/publish/publish.sh
@@ -7,7 +7,7 @@ set -euxo pipefail
: "${RPM_WEBDIR:?Require where to put index and other web contents}"
: "${RPM_URL:?Require rpm repository url}"
: "${RELEASELINE?Require rpm release line}"
-: "${BASE:? Required base directory}"
+: "${BASE:?Require base directory}"
# $$ Contains current pid
D="$AGENT_WORKDIR/$$"
@@ -21,10 +21,10 @@ function clean() {
function generateSite() {
gpg --export -a --output "$D/${ORGANIZATION}.key" "${GPG_KEYNAME}"
- echo "$(gpg --import-options show-only --import $D/${ORGANIZATION}.key)" >"$D/${ORGANIZATION}.key.info"
+ gpg --import-options show-only --import "$D/${ORGANIZATION}.key" >"$D/${ORGANIZATION}.key.info"
"$BASE/bin/indexGenerator.py" \
- --distribution redhat \
+ --distribution rpm \
--gpg-key-info-file "${D}/${ORGANIZATION}.key.info" \
--targetDir "$D"
@@ -36,16 +36,10 @@ function generateSite() {
[${ARTIFACTNAME}]
name=${PRODUCTNAME}${RELEASELINE}
baseurl=${RPM_URL}
+gpgkey=${RPM_URL}/${ORGANIZATION}-2023.key
gpgcheck=1
+repo_gpgcheck=1
EOF
-
- # generate index
- # locally
- # disable this for now, as it's currently now used and generate errors
- # createrepo --update -o "$RPM_WEBDIR" "$RPMDIR/"
- # on the server
- # shellcheck disable=SC2029
- ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'"
}
function skipIfAlreadyPublished() {
@@ -60,7 +54,6 @@ function init() {
mkdir -p "$D/RPMS/noarch"
mkdir -p "$RPMDIR/"
- # mkdir -p "$RPM_WEBDIR/" # May not be necessary
# shellcheck disable=SC2029
ssh "${SSH_OPTS[@]}" "$PKGSERVER" mkdir -p "'$RPMDIR/'"
}
@@ -83,7 +76,7 @@ function uploadPackage() {
-e "ssh ${SSH_OPTS[*]}" \
--ignore-existing \
--progress \
- "$RPM" "$PKGSERVER:${RPMDIR// /\\ }/"
+ "${RPM}" "$PKGSERVER:${RPMDIR// /\\ }/"
}
function show() {
@@ -99,17 +92,6 @@ function show() {
function uploadSite() {
pushd "$D"
- # Disable copy on local network storage
- #rsync \
- # --compress \
- # --recursive \
- # --verbose \
- # --exclude RPMS \
- # --exclude "HEADER.html" \
- # --exclude "FOOTER.html" \
- # --progress \
- # . "$RPM_WEBDIR/"
-
rsync \
--archive \
--compress \
@@ -121,6 +103,20 @@ function uploadSite() {
--progress \
. "$PKGSERVER:${RPM_WEBDIR// /\\ }/"
+ # generate index on the server
+ ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'"
+
+ ssh "${SSH_OPTS[@]}" "$PKGSERVER" "cat $RPMDIR/repodata/repomd.xml" | \
+ gpg \
+ --batch \
+ --pinentry-mode loopback \
+ -u "$GPG_KEYNAME" \
+ -a \
+ --detach-sign \
+ --passphrase-file "$GPG_PASSPHRASE_FILE" \
+ --yes | \
+ ssh "${SSH_OPTS[@]}" "$PKGSERVER" "cat > $RPMDIR/repodata/repomd.xml.asc"
+
# Following html need to be located inside the binary directory
rsync \
--compress \
@@ -146,7 +142,7 @@ function uploadSite() {
}
show
-## Disabling this function allow us to recreate and sign the RedHat repository.
+## Disabling this function allow us to recreate and sign the rpm repository.
# the rpm package won't be overrided as we use the parameter '--ignore-existing' when we upload it
#skipIfAlreadyPublished
init
diff --git a/setup.mk b/setup.mk
index 29b59bdf..2d05a669 100644
--- a/setup.mk
+++ b/setup.mk
@@ -19,10 +19,7 @@ export MSI_SHASUM:=${MSI}.sha256
export DEB=${TARGET}/debian/${ARTIFACTNAME}_${VERSION}_all.deb
# where to generate RHEL/CentOS RPM file?
-export RPM=${TARGET}/rpm/${ARTIFACTNAME}-${VERSION}-1.1.noarch.rpm
-
-# where to generate SUSE RPM file?
-export SUSE=${TARGET}/suse/${ARTIFACTNAME}-${VERSION}-1.2.noarch.rpm
+export RPM=${TARGET}/rpm/${ARTIFACTNAME}-${VERSION}-1.noarch.rpm
# anchored to the root of the repository
export BASE:=$(CURDIR)
diff --git a/suse/build/SOURCES/jenkins.init.in b/suse/build/SOURCES/jenkins.init.in
deleted file mode 100644
index 6c9119bb..00000000
--- a/suse/build/SOURCES/jenkins.init.in
+++ /dev/null
@@ -1,224 +0,0 @@
-#!/bin/sh
-#
-# SUSE system statup script for @@PRODUCTNAME@@
-# Copyright (C) 2007 Pascal Bleser
-#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or (at
-# your option) any later version.
-#
-# This library is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-# USA.
-#
-### BEGIN INIT INFO
-# Provides: @@ARTIFACTNAME@@
-# Required-Start: $local_fs $remote_fs $network $named
-# Should-Start: $time sendmail
-# Required-Stop: $local_fs $remote_fs $network $named
-# Should-Stop: $time sendmail
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: @@SUMMARY@@
-# Description: @@SUMMARY@@
-### END INIT INFO
-
-# Check for missing binaries (stale symlinks should not happen)
-JENKINS_WAR="~~WAR~~"
-test -r "$JENKINS_WAR" || {
- echo "$JENKINS_WAR not installed"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 5
- fi
-}
-
-# Check for existence of needed config file and read it
-JENKINS_CONFIG=/etc/sysconfig/@@ARTIFACTNAME@@
-test -r "$JENKINS_CONFIG" || {
- echo "$JENKINS_CONFIG not existing"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
-}
-
-JENKINS_PID_FILE="/var/run/@@ARTIFACTNAME@@.pid"
-JENKINS_USER="@@ARTIFACTNAME@@"
-JENKINS_NICE="0"
-
-# Read config
-. "$JENKINS_CONFIG"
-
-. /etc/rc.status
-rc_reset # Reset status of this service
-
-# Set up environment accordingly to the configuration settings
-[ -n "$JENKINS_HOME" ] || {
- echo "JENKINS_HOME not configured in $JENKINS_CONFIG"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
-}
-[ -d "$JENKINS_HOME" ] || {
- echo "JENKINS_HOME directory does not exist: $JENKINS_HOME"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 1
- fi
-}
-
-if [ -z "$JENKINS_JAVA_HOME" ]; then
- . /etc/profile.d/alljava.sh
- [ -n "$JAVA_HOME" ] || {
- echo "Failed to determine JAVA_HOME, set JENKINS_JAVA_HOME in $JENKINS_CONFIG"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
- }
-else
- JAVA_HOME="$JENKINS_JAVA_HOME"
-fi
-[ -d "$JAVA_HOME" ] || {
- echo "Invalid JENKINS_JAVA_HOME: directory does not exist: $JAVA_HOME"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
-}
-[ -e "$JAVA_HOME/bin/java" ] || {
- echo "Invalid JENKINS_JAVA_HOME: bin/java not found under $JAVA_HOME"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
-}
-export JAVA_HOME
-
-JAVA_CMD="$JAVA_HOME/bin/java $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
-PARAMS="--javaHome=$JAVA_HOME --logfile=/var/log/@@ARTIFACTNAME@@/@@ARTIFACTNAME@@.log --webroot=/var/cache/@@ARTIFACTNAME@@/war"
-[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
-[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL"
-[ -n "$JENKINS_ARGS" ] && PARAMS="$PARAMS $JENKINS_ARGS"
-
-if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then
- PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/@@ARTIFACTNAME@@/access_log"
-fi
-
-[ -z "$JENKINS_INIT_SHELL" -o -x "$JENKINS_INIT_SHELL" ] || {
- echo "JENKINS_INIT_SHELL does not refer to a shell: $JENKINS_INIT_SHELL"
- if [ "$1" = "stop" ]; then
- exit 0
- else
- exit 6
- fi
-}
-
-is_running() {
- JPROC=$(pgrep java -U "$JENKINS_USER")
- if [ -n "$JPROC" ]; then
- echo "$JPROC" >"$JENKINS_PID_FILE"
- return 0
- else
- return 1
- fi
-}
-
-case "$1" in
-start)
- echo -n "Starting @@PRODUCTNAME@@ "
- /sbin/checkproc -k -p "$JENKINS_PID_FILE" "$JAVA_HOME/bin/java" >/var/log/@@ARTIFACTNAME@@.rc 2>&1
- CHECK=$?
- if [ $CHECK -eq 7 ]; then
- rm -f "$JENKINS_PID_FILE"
- if [ -x "$JENKINS_INIT_SHELL" ]; then
- startproc -n $JENKINS_NICE -s -e -l /var/log/@@ARTIFACTNAME@@.rc -p "$JENKINS_PID_FILE" /bin/su -l -s "$JENKINS_INIT_SHELL" -c "$JAVA_CMD $PARAMS &" "$JENKINS_USER"
- else
- HOME=$JENKINS_HOME startproc -n $JENKINS_NICE -s -e -l /var/log/@@ARTIFACTNAME@@.rc -u "$JENKINS_USER" -p "$JENKINS_PID_FILE" $JAVA_CMD $PARAMS
- fi
- attempt=1
- is_started=false
- while [ $attempt -le 30 ]; do
- if is_running; then
- is_started=true
- break
- fi
- sleep 1
- attempt=$((attempt + 1))
- done
- if $is_started; then
- rc_status -v
- else
- rc_failed
- rc_status -v
- fi
- else
- rc_failed $CHECK
- rc_status -v
- fi
- ;;
-stop)
- echo -n "Shutting down @@PRODUCTNAME@@ "
- /sbin/killproc -p "$JENKINS_PID_FILE" "$JAVA_HOME/bin/java"
- rc_status -v
- ;;
-try-restart | condrestart)
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset # Not running is not a failure.
- fi
- rc_status
- ;;
-restart)
- $0 stop
- $0 start
- rc_status
- ;;
-force-reload)
- echo -n "Reload service @@PRODUCTNAME@@ "
- $0 try-restart
- rc_status
- ;;
-reload)
- rc_failed 3
- rc_status -v
- ;;
-status)
- echo -n "Checking for service @@PRODUCTNAME@@ "
- /sbin/checkproc -p "$JENKINS_PID_FILE" "$JAVA_HOME/bin/java"
- rc_status -v
- ;;
-probe)
- ## Optional: Probe for the necessity of a reload, print out the
- ## argument to this init script which is required for a reload.
- ## Note: probe is not (yet) part of LSB (as of 1.9)
-
- test "$JENKINS_CONFIG" -nt "$JENKINS_PID_FILE" && echo reload
- ;;
-*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
- exit 1
- ;;
-esac
-rc_exit
diff --git a/suse/build/SOURCES/jenkins.logrotate b/suse/build/SOURCES/jenkins.logrotate
deleted file mode 100644
index 74539337..00000000
--- a/suse/build/SOURCES/jenkins.logrotate
+++ /dev/null
@@ -1,11 +0,0 @@
-/var/log/@@ARTIFACTNAME@@/@@ARTIFACTNAME@@.log /var/log/@@ARTIFACTNAME@@/access_log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+4096k
- notifempty
- missingok
- create 644
- copytruncate
-}
diff --git a/suse/build/SOURCES/jenkins.repo b/suse/build/SOURCES/jenkins.repo
deleted file mode 100644
index c9093450..00000000
--- a/suse/build/SOURCES/jenkins.repo
+++ /dev/null
@@ -1,7 +0,0 @@
-[@@ARTIFACTNAME@@]
-name=@@PRODUCTNAME@@
-enabled=1
-autorefresh=0
-baseurl=@@SUSE_URL@@
-type=rpm-md
-keeppackages=0
diff --git a/suse/build/SOURCES/jenkins.sysconfig.in b/suse/build/SOURCES/jenkins.sysconfig.in
deleted file mode 100644
index 303dd7a9..00000000
--- a/suse/build/SOURCES/jenkins.sysconfig.in
+++ /dev/null
@@ -1,97 +0,0 @@
-## Path: Development/@@PRODUCTNAME@@
-## Description: @@SUMMARY@@
-## Type: string
-## Default: "~~HOME~~"
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Directory where Jenkins store its configuration and working
-# files (checkouts, build reports, artifacts, ...).
-#
-JENKINS_HOME="~~HOME~~"
-
-## Type: string
-## Default: "/bin/bash"
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Shell used to initialize the Jenkins server's environment.
-# Setting this option to the path of a shell executable allows
-# initialization of the Jenkins server environment using
-# standard shell startup scripts.
-# Disabling this option causes the Jenkins server to be run
-# with a minimal environment.
-#
-JENKINS_INIT_SHELL="/bin/bash"
-
-## Type: string
-## Default: ""
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Java runtime to run Jenkins
-# When left empty, the current system default JRE, as defined
-# by update-alternatives(8), is used.
-#
-JENKINS_JAVA_HOME=""
-
-## Type: string
-## Default: "@@ARTIFACTNAME@@"
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Unix user account that runs the Jenkins daemon
-# Be careful when you change this, as you need to update
-# permissions of $JENKINS_HOME and /var/log/@@ARTIFACTNAME@@,
-# and if you have already run Jenkins, potentially other
-# directories such as /var/cache/@@ARTIFACTNAME@@ .
-#
-JENKINS_USER="@@ARTIFACTNAME@@"
-
-## Type: integer(-20:20)
-## Default: 0
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# The nice level at which the Jenkins server (and its build jobs) run.
-#
-JENKINS_NICE="0"
-
-## Type: string
-## Default: "-Djava.awt.headless=true"
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Options to pass to java when running Jenkins.
-#
-JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
-
-## Type: integer(0:65535)
-## Default: @@PORT@@
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Port Jenkins is listening on.
-# Set to -1 to disable
-#
-JENKINS_PORT="@@PORT@@"
-
-
-## Type: integer(1:9)
-## Default: 5
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Debug level for logs -- the higher the value, the more verbose.
-# 5 is INFO.
-#
-JENKINS_DEBUG_LEVEL="5"
-
-## Type: yesno
-## Default: no
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Whether to enable access logging or not.
-#
-JENKINS_ENABLE_ACCESS_LOG="no"
-
-## Type: string
-## Default: ""
-## ServiceRestart: @@ARTIFACTNAME@@
-#
-# Pass arbitrary arguments to Jenkins.
-# Full option list: java -jar @@ARTIFACTNAME@@.war --help
-#
-JENKINS_ARGS=""
diff --git a/suse/build/SPECS/jenkins.spec b/suse/build/SPECS/jenkins.spec
deleted file mode 100644
index e2284009..00000000
--- a/suse/build/SPECS/jenkins.spec
+++ /dev/null
@@ -1,110 +0,0 @@
-# TODO:
-# - how to add to the trusted service of the firewall?
-
-%define workdir %{_var}/lib/@@ARTIFACTNAME@@
-
-Name: @@ARTIFACTNAME@@
-Version: %{ver}
-Release: 1.2
-Summary: @@SUMMARY@@
-Source: jenkins.war
-Source1: jenkins.init.in
-Source2: jenkins.sysconfig.in
-Source3: jenkins.logrotate
-Source4: jenkins.repo
-Source5: jenkins.service
-Source6: jenkins.sh
-Source7: migrate.sh
-URL: @@HOMEPAGE@@
-Group: Development/Tools/Building
-License: @@LICENSE@@
-BuildRoot: %{_tmppath}/build-%{name}-%{version}
-# Unfortunately the Oracle Java RPMs do not register as providing anything (including "java" or "jdk")
-# So either we make a hard requirement on the OpenJDK or none at all
-# Only workaround would be to use a java virtual package, see https://github.com/keystep/virtual-java-rpm
-# TODO: Fix the query for Java 11 if it is reenabled
-# Requires: java >= 1:1.8.0
-Requires: procps
-Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
-#PreReq: %{fillup_prereq}
-BuildArch: noarch
-
-%description
-@@DESCRIPTION_FILE@@
-
-
-
-
-Authors:
---------
- @@AUTHOR@@
-
-%prep
-%setup -q -T -c
-
-%build
-
-%install
-rm -rf "%{buildroot}"
-%__install -D -m0644 "%{SOURCE0}" "%{buildroot}%{_javadir}/%{name}.war"
-%__install -d "%{buildroot}%{workdir}"
-%__install -d "%{buildroot}%{workdir}/plugins"
-
-%__install -d "%{buildroot}/var/log/%{name}"
-%__install -d "%{buildroot}/var/cache/%{name}"
-
-%__install -D -m0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/%{name}"
-%__sed -i 's,~~WAR~~,%{_javadir}/%{name}.war,g' "%{buildroot}/etc/init.d/%{name}"
-%__install -d "%{buildroot}/usr/sbin"
-%__ln_s "../../etc/init.d/%{name}" "%{buildroot}/usr/sbin/rc%{name}"
-
-%__install -D -m0644 "%{SOURCE2}" "%{buildroot}/etc/sysconfig/%{name}"
-%__sed -i 's,~~HOME~~,%{workdir},g' "%{buildroot}/etc/sysconfig/%{name}"
-
-%__install -D -m0644 "%{SOURCE3}" "%{buildroot}/etc/logrotate.d/%{name}"
-
-%__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/zypp/repos.d/%{name}.repo"
-
-%__install -D -m0644 "%{SOURCE5}" "%{buildroot}%{_unitdir}/%{name}.service"
-%__install -D -m0755 "%{SOURCE6}" "%{buildroot}%{_bindir}/%{name}"
-%__install -d "%{buildroot}%{_datadir}/%{name}"
-%__install -D -m0755 "%{SOURCE7}" "%{buildroot}%{_datadir}/%{name}/migrate"
-
-%pre
-/usr/bin/getent group %{name} &>/dev/null || /usr/sbin/groupadd -r %{name} &>/dev/null
-# SUSE version had -o here, but in Fedora -o isn't allowed without -u
-/usr/bin/getent passwd %{name} &>/dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \
- -d "%{workdir}" %{name} &>/dev/null
-
-%post
-%{_datadir}/%{name}/migrate "/etc/sysconfig/%{name}" || true
-%systemd_post %{name}.service
-
-%preun
-%systemd_preun %{name}.service
-
-%postun
-%systemd_postun_with_restart %{name}.service
-
-%clean
-%__rm -rf "%{buildroot}"
-
-%files
-%defattr(-,root,root)
-%{_javadir}/%{name}.war
-%attr(0755,%{name},%{name}) %dir %{workdir}
-%attr(0750,%{name},%{name}) /var/log/%{name}
-%attr(0750,%{name},%{name}) /var/cache/%{name}
-%config(noreplace) /etc/logrotate.d/%{name}
-%config(noreplace) /etc/init.d/%{name}
-%config(noreplace) /etc/sysconfig/%{name}
-%config(noreplace) /etc/zypp/repos.d/%{name}.repo
-/usr/sbin/rc%{name}
-%{_unitdir}/%{name}.service
-%{_bindir}/%{name}
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/migrate
-
-%changelog
-* Wed Sep 28 2011 kk@kohsuke.org
-- See [@@CHANGELOG_PAGE@@] for complete details
diff --git a/suse/build/build.sh b/suse/build/build.sh
deleted file mode 100755
index b6c36833..00000000
--- a/suse/build/build.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash -eux
-
-# prepare fresh directories
-D=$(mktemp -d)
-trap 'rm -rf "${D}"' EXIT
-
-cp -R "$(dirname "$0")"/* "${D}"
-cp "${BASE}/systemd/jenkins.service" "${D}/SOURCES"
-cp "${BASE}/systemd/jenkins.sh" "${D}/SOURCES"
-cp "${BASE}/systemd/migrate.sh" "${D}/SOURCES"
-"${BASE}/bin/branding.py" "${D}"
-
-cp "${WAR}" "${D}/SOURCES/jenkins.war"
-
-pushd "${D}"
-mkdir -p BUILD RPMS SRPMS
-rpmbuild -ba --define="_topdir ${PWD}" --define="_tmppath ${PWD}/tmp" --define="ver ${VERSION}" SPECS/jenkins.spec
-
-# sign the results
-find RPMS -type f -name '*.rpm' -exec rpmsign --addsign '{}' \;
-find RPMS -type f -name '*.rpm' -exec rpm -qpi '{}' \;
-popd
-
-mkdir -p "$(dirname "${SUSE}")"
-mv "${D}"/RPMS/noarch/*.rpm "${SUSE}"
-
-exit 0
diff --git a/suse/publish/publish.sh b/suse/publish/publish.sh
deleted file mode 100755
index f1ff1e35..00000000
--- a/suse/publish/publish.sh
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/bin/bash
-
-set -euxo pipefail
-
-: "${AGENT_WORKDIR:=/tmp}"
-: "${GPG_KEYNAME:?Required valid gpg keyname}"
-: "${BASE:?Require base directory}"
-: "${SUSEDIR:? Require where to put binary files}"
-: "${SUSE_WEBDIR:? Require where to put repository index and other web contents}"
-
-# $$ Contains current pid
-D="$AGENT_WORKDIR/$$"
-
-# Convert string to array to correctly escape cli parameter
-SSH_OPTS=($SSH_OPTS)
-SCP_OPTS=($SCP_OPTS)
-
-function clean() {
- rm -rf $D
-}
-
-function generateSite() {
- "$BASE/bin/indexGenerator.py" \
- --distribution opensuse \
- --targetDir "${D}"
-
- gpg --export -a --output "$D/repodata/repomd.xml.key" "${GPG_KEYNAME}"
-
- "$BASE/bin/branding.py" $D
-
- cp "$SUSE" $D/RPMS/noarch
-}
-
-function init() {
- # where to put binary files
- mkdir -p "$SUSEDIR/" # Local
-
- # shellcheck disable=SC2029
- ssh "${SSH_OPTS[@]}" "$PKGSERVER" mkdir -p "'$SUSEDIR/'" # Remote
-
- # where to put repository index and other web contents
- mkdir -p "$SUSE_WEBDIR"
-
- mkdir -p $D/RPMS/noarch $D/repodata
-}
-
-function skipIfAlreadyPublished() {
- if ssh "${SSH_OPTS[@]}" "$PKGSERVER" "test -e ${SUSEDIR}/$(basename $SUSE)"; then
- echo "File already published, nothing else todo"
- exit 0
-
- fi
-}
-
-function show() {
- echo "Parameters:"
- echo "SUSE: $SUSE"
- echo "SUSEDIR: $SUSEDIR"
- echo "SUSE_WEBDIR: $SUSE_WEBDIR"
- echo "SSH_OPTS: ${SSH_OPTS[*]}"
- echo "PKGSERVER: $PKGSERVER"
- echo "GPG_KEYNAME: $GPG_KEYNAME"
- echo "---"
-}
-
-function uploadPackage() {
- rsync \
- --recursive \
- --verbose \
- --compress \
- --ignore-existing \
- --progress \
- "$SUSE" "$SUSEDIR/" # Local
-
- rsync \
- --archive \
- --verbose \
- --compress \
- --ignore-existing \
- --progress \
- -e "ssh ${SSH_OPTS[*]}" \
- "${SUSE}" "$PKGSERVER:${SUSEDIR// /\\ }" # Remote
-}
-
-function uploadSite() {
- pushd $D
- rsync \
- --recursive \
- --verbose \
- --compress \
- --progress \
- --exclude RPMS \
- --exclude "HEADER.html" \
- --exclude "FOOTER.html" \
- . "$SUSE_WEBDIR/" #Local
-
- # shellcheck disable=SC2029
- rsync \
- --archive \
- --verbose \
- --compress \
- --progress \
- -e "ssh ${SSH_OPTS[*]}" \
- --exclude RPMS \
- --exclude "HEADER.html" \
- --exclude "FOOTER.html" \
- . "$PKGSERVER:${SUSE_WEBDIR// /\\ }/" # Remote
-
- # generate index on the server
- # server needs 'createrepo' pacakge
- # Disable this for now as not critical
- # createrepc --update -o "$SUSE_WEBDIR" "$SUSEDIR/" #Local
- # cp "${SUSE_WEBDIR// /\\ }/repodata/repomd.xml" repodata/ # Local
-
- # shellcheck disable=SC2029
- ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo --update -o "'$SUSE_WEBDIR'" "'$SUSEDIR/'" # Remote
-
- scp \
- "${SCP_OPTS[@]}" \
- "$PKGSERVER:${SUSE_WEBDIR// /\\ }/repodata/repomd.xml" \
- repodata/ # Remote
-
- gpg \
- --batch \
- --pinentry-mode loopback \
- -u "$GPG_KEYNAME" \
- -a \
- --detach-sign \
- --passphrase-file "$GPG_PASSPHRASE_FILE" \
- --yes \
- repodata/repomd.xml
-
- scp \
- "${SCP_OPTS[@]}" \
- repodata/repomd.xml.asc \
- "$PKGSERVER:${SUSE_WEBDIR// /\\ }/repodata/"
-
- cp repodata/repomd.xml.asc "${SUSE_WEBDIR// /\\ }/repodata/"
-
- # Following html need to be located inside the binary directory
- rsync \
- --compress \
- --verbose \
- --recursive \
- --include "HEADER.html" \
- --include "FOOTER.html" \
- --exclude "*" \
- --progress \
- . "$SUSEDIR/"
-
- rsync \
- --archive \
- --compress \
- --verbose \
- -e "ssh ${SSH_OPTS[*]}" \
- --include "HEADER.html" \
- --include "FOOTER.html" \
- --exclude "*" \
- --progress \
- . "$PKGSERVER:${SUSEDIR// /\\ }/"
-
- popd
-}
-
-show
-## Disabling this function allow us to recreate and sign the Suse repository.
-# the rpm package won't be overrided as we use the parameter '--ignore-existing' when we upload it
-#skipIfAlreadyPublished
-init
-uploadPackage
-generateSite
-uploadSite
-clean
diff --git a/templates/header.opensuse.html b/templates/header.opensuse.html
deleted file mode 100644
index cb0e7d19..00000000
--- a/templates/header.opensuse.html
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "base.html" %}
-
-{% block distribution_instruction %}
-
-To use this repository, run the following command:
-
-
-
- sudo zypper addrepo -f {{web_url}}/ {{artifactName}}
-
-
-
-
-With that set up, the {{ product_name }} package can be installed with:
-
-
-
- zypper install dejavu-fonts fontconfig java-17-openjdk
- zypper install {{ artifactName }}
-
-
-
-{% endblock %}
-
-{% block individual_package_instruction %}
-If you need *.rpm for a specific version, use these.
-{% endblock %}
diff --git a/templates/header.redhat.html b/templates/header.redhat.html
deleted file mode 100644
index 9b5996f8..00000000
--- a/templates/header.redhat.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "base.html" %}
-
-{% block distribution_instruction %}
-
-
- To use this repository, run the following command:
-
-
-
- sudo wget -O /etc/yum.repos.d/{{artifactName}}.repo {{ web_url }}/{{artifactName}}.repo
- sudo rpm --import {{ web_url }}/{{organization}}-2023.key
-
-
-
- If you've previously imported the key from Jenkins, the rpm --import
will fail because
- you already have a key. Please ignore that and move on.
-
-
-
- yum install fontconfig tzdata-java java-17-openjdk
- yum install {{artifactName}}
-
-
-
- The rpm packages were signed using this key:
-
-
- {{ pub_key_info|trim }}
-
-
-{% endblock %}
-
-{% block individual_package_instruction %}
- If you need *.rpm for a specific version, use these.
-{% endblock %}
diff --git a/templates/header.rpm.html b/templates/header.rpm.html
new file mode 100644
index 00000000..f861f60f
--- /dev/null
+++ b/templates/header.rpm.html
@@ -0,0 +1,58 @@
+{% extends "base.html" %}
+
+{% block distribution_instruction %}
+
+ Red Hat and derivatives
+
+
+ To use this repository with Red Hat or derivatives, run the following command:
+
+
+
+ # el8 and up using dnf
+ sudo dnf config-manager --add-repo {{ web_url }}/{{artifactName}}.repo
+
+ # el7 using yum
+ sudo yum-config-manager --add-repo {{ web_url}}/{{artifactName}}.repo
+
+
+
+
+ # el8 and up using dnf
+ dnf install fontconfig tzdata-java java-17-openjdk
+ dnf install {{artifactName}}
+
+ # el7 using yum
+ yum install fontconfig tzdata-java java-17-openjdk
+ yum install {{artifactName}}
+
+
+
+ The rpm packages were signed using this key:
+
+
+ {{ pub_key_info|trim }}
+
+ openSUSE
+
+ To use this repository with openSUSE, run the following command:
+
+
+
+ sudo zypper addrepo -f {{web_url}}/ {{artifactName}}
+
+
+
+ With that set up, the {{ product_name }} package can be installed with:
+
+
+
+ zypper install dejavu-fonts fontconfig java-17-openjdk
+ zypper install {{ artifactName }}
+
+
+{% endblock %}
+
+{% block individual_package_instruction %}
+ If you need *.rpm for a specific version, use these.
+{% endblock %}