Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUSE: Remove System V initialization script #419

Open
basil opened this issue Jul 26, 2023 · 2 comments · May be fixed by #430
Open

SUSE: Remove System V initialization script #419

basil opened this issue Jul 26, 2023 · 2 comments · May be fixed by #430

Comments

@basil
Copy link
Member

basil commented Jul 26, 2023

Like #409, but for the SUSE package.

@philfry
Copy link
Contributor

philfry commented Sep 6, 2023

Hi @basil,

I took a look at the SuSE thingy and I think we could simply drop the SuSE specfile and adapt the rpm specfile like:

diff --git i/rpm/build/SPECS/jenkins.spec w/rpm/build/SPECS/jenkins.spec
index 7422efa..acacd6a 100644
--- i/rpm/build/SPECS/jenkins.spec
+++ w/rpm/build/SPECS/jenkins.spec
@@ -11,6 +11,10 @@ Source:		jenkins.war
 Source1:	jenkins.service
 Source2:	jenkins.sh
 Source3:	migrate.sh
+%if 0%{?suse_version} > 0
+Source4:	jenkins.repo
+Group:		Development/Tools/Building
+%endif
 URL:		@@HOMEPAGE@@
 License:	@@LICENSE@@
 BuildRoot:	%{_tmppath}/build-%{name}-%{version}
@@ -42,6 +46,9 @@ rm -rf "%{buildroot}"
 %__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_unitdir}/%{name}.service"
 %__install -D -m0755 "%{SOURCE2}" "%{buildroot}%{_bindir}/%{name}"
 %__install -D -m0755 "%{SOURCE3}" "%{buildroot}%{_datadir}/%{name}/migrate"
+%if 0%{?suse_version} > 0
+%__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/zypp/repos.d/%{name}.repo"
+%endif
 
 %pre
 /usr/bin/getent group %{name} &>/dev/null || /usr/sbin/groupadd -r %{name} &>/dev/null
@@ -74,6 +81,9 @@ fi
 %{_unitdir}/%{name}.service
 %{_bindir}/%{name}
 %{_datadir}/%{name}/migrate
+%if 0%{?suse_version} > 0
+%config(noreplace) /etc/zypp/repos.d/%{name}.repo
+%endif
 
 %changelog

I did a quick test on a SuSE Leap 15.5 and it seems to work fine. FWIW, the molecule test for opensuse-leap-15 also runs without errors.

Or, as the repofile for the rpm package was dropped due to https://issues.jenkins.io/browse/JENKINS-22690, maybe it could be dropped for the SuSE package, too? IMO, the reason the repofile for rpm was dropped applies to SuSE as well. In that case only the Makefile, `Jenkinsfile, molecule tests and such would need to be adapted.

@basil
Copy link
Member Author

basil commented Sep 6, 2023

That sounds great! Eliminating the extra complexity of a dedicated SUSE RPM would be a huge boon to the maintenance of this repository. And yes, I think the reason for the removal of the repofile in jenkinsci/jenkins#1202 also applies to the SUSE package, enabling us to have even less custom SUSE code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants