diff --git a/.gitignore b/.gitignore index 0a47c577..445b6c04 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ generated *.orig msi/build +venv/ + diff --git a/README.md b/README.md index 1ec5a3ed..fd021b7d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Run `make setup` to install (most of the) necessary tools. Alternatively you ca * debhelper * rpm * expect -* createrepo +* createrepo-c * ruby * net-sftp (`gem install net-sftp`) * maven diff --git a/deb/build/debian/rules b/deb/build/debian/rules index 2d33f6ac..24555460 100755 --- a/deb/build/debian/rules +++ b/deb/build/debian/rules @@ -2,3 +2,8 @@ %: dh $@ + +# debian doesn't support the zstd compression which is the default on Ubuntu +# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892664 +override_dh_builddeb: + dh_builddeb -- -Zxz diff --git a/rpm/build/SPECS/jenkins.spec b/rpm/build/SPECS/jenkins.spec index fc87674d..b9c6f8fc 100644 --- a/rpm/build/SPECS/jenkins.spec +++ b/rpm/build/SPECS/jenkins.spec @@ -24,7 +24,7 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version} # TODO: If re-enable, fix the matcher for Java 11 # Requires: java >= 1:1.8.0 Requires: procps -PreReq: /usr/sbin/groupadd /usr/sbin/useradd +Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd BuildArch: noarch %description @@ -64,10 +64,10 @@ rm -rf "%{buildroot}" %__install -D -m0755 "%{SOURCE6}" "%{buildroot}%{_datadir}/%{name}/migrate" %pre -/usr/sbin/groupadd -r %{name} &>/dev/null || : +/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/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \ - -d "%{workdir}" %{name} &>/dev/null || : +/usr/bin/getent passwd %{name} &>/dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \ + -d "%{workdir}" %{name} &>/dev/null # Used to decide later if we should perform a chown in case JENKINS_INSTALL_SKIP_CHOWN is false # Check if a previous installation exists, if so check the JENKINS_HOME value and existing owners of work, log and cache dir, need to to this check diff --git a/rpm/publish/publish.sh b/rpm/publish/publish.sh index 7ec3d163..4ae3a1d2 100755 --- a/rpm/publish/publish.sh +++ b/rpm/publish/publish.sh @@ -42,10 +42,10 @@ EOF # generate index # locally # disable this for now, as it's currently now used and generate errors - # createrepo --update -o "$RPM_WEBDIR" "$RPMDIR/" + # createrepo_c --update -o "$RPM_WEBDIR" "$RPMDIR/" # on the server # shellcheck disable=SC2029 - ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'" + ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo_c --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'" } function skipIfAlreadyPublished() { diff --git a/rpm/setup.sh b/rpm/setup.sh index 00a1e9bb..deff74e8 100755 --- a/rpm/setup.sh +++ b/rpm/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -eux -sudo apt-get install -y rpm expect createrepo || true +sudo apt-get install -y rpm expect createrepo-c || true exit 0 diff --git a/suse/build/SPECS/jenkins.spec b/suse/build/SPECS/jenkins.spec index 763dca21..e2284009 100644 --- a/suse/build/SPECS/jenkins.spec +++ b/suse/build/SPECS/jenkins.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version} # TODO: Fix the query for Java 11 if it is reenabled # Requires: java >= 1:1.8.0 Requires: procps -PreReq: /usr/sbin/groupadd /usr/sbin/useradd +Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd #PreReq: %{fillup_prereq} BuildArch: noarch @@ -71,10 +71,10 @@ rm -rf "%{buildroot}" %__install -D -m0755 "%{SOURCE7}" "%{buildroot}%{_datadir}/%{name}/migrate" %pre -/usr/sbin/groupadd -r %{name} &>/dev/null || : +/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/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \ - -d "%{workdir}" %{name} &>/dev/null || : +/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 diff --git a/suse/publish/publish.sh b/suse/publish/publish.sh index 22b3e4fc..422b8d34 100755 --- a/suse/publish/publish.sh +++ b/suse/publish/publish.sh @@ -107,13 +107,13 @@ function uploadSite() { . "$PKGSERVER:${SUSE_WEBDIR// /\\ }/" # Remote # generate index on the server - # server needs 'createrepo' pacakge + # server needs 'createrepo_c' pacakge # Disable this for now as not critical - # createrepo --update -o "$SUSE_WEBDIR" "$SUSEDIR/" #Local + # createrepo_c --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 + ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo_c --update -o "'$SUSE_WEBDIR'" "'$SUSEDIR/'" # Remote scp \ "${SCP_OPTS[@]}" \