public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/autossh] epel10: Patch from Ville Skyttä for bug 1320539
@ 2026-10-11 14:41 Fabio Alessandro Locati
  0 siblings, 0 replies; only message in thread
From: Fabio Alessandro Locati @ 2026-10-11 14:41 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/autossh
Branch : epel10
Commit : 7140a2c665cd22c7add3b6d26cd88aaae1c69903
Author : Fabio Alessandro Locati <fabio@locati.cc>
Date   : 2016-03-26T18:04:22+00:00
Stats  : +34/-2 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/autossh/c/7140a2c665cd22c7add3b6d26cd88aaae1c69903?branch=epel10

Log:
Patch from Ville Skyttä for bug 1320539

---
diff --git a/autossh.spec b/autossh.spec
index f704dcb..aea768d 100644
--- a/autossh.spec
+++ b/autossh.spec
@@ -1,14 +1,19 @@
 Summary: Utility to autorestart SSH tunnels
 Name: autossh
 Version: 1.4e
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Group: Applications/Internet
 URL: http://www.harding.motd.ca/autossh/index.html
 Source0: http://www.harding.motd.ca/autossh/autossh-1.4e.tgz
+Source1: autossh@.service
+Source2: README.service
 # Sent upstream 2011-10-30
 Patch0: autossh-1.4c-ldflags.patch
 BuildRequires: /usr/bin/ssh
+BuildRequires: systemd
+%{?systemd_requires}
+Requires(pre): shadow-utils
 Requires: /usr/bin/ssh
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -19,6 +24,7 @@ dies or stops passing traffic, autossh will automatically restart it.
 %prep
 %setup -q
 %patch0 -p1
+cp -p %{SOURCE2} .
 
 %build
 %configure
@@ -28,7 +34,9 @@ make %{?_smp_mflags}
 rm -rf $RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/autossh
 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
 mkdir -p examples
 
 cp -p autossh.host rscreen examples
@@ -37,17 +45,41 @@ chmod 0644 examples/*
 install -m 0755 -p autossh $RPM_BUILD_ROOT%{_bindir}
 cp -p autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
+install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+getent group autossh >/dev/null || groupadd -r autossh
+getent passwd autossh >/dev/null || \
+    useradd -r -g autossh -d %{_sysconfdir}/autossh -s %{_sbindir}/nologin \
+    -c "autossh service account" autossh
+exit 0
+
+%post
+%systemd_post "autossh@*.service"
+
+%preun
+%systemd_preun "autossh@*.service"
+
+%postun
+%systemd_postun_with_restart "autossh@*.service"
+
+
 %files
 %defattr(-, root, root)
-%doc CHANGES README
+%doc CHANGES README README.service
 %doc examples
 %{_bindir}/*
+%attr(750,autossh,autossh) %dir %{_sysconfdir}/autossh/
 %{_mandir}/man1/*
+%{_unitdir}/*
 
 %changelog
+* Wed Mar 23 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.4e-3
+- Add systemd service
+
 * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4e-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-11 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 14:41 [rpms/autossh] epel10: Patch from Ville Skyttä for bug 1320539 Fabio Alessandro Locati

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox