public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jon Ciesla <limburgher@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/conman] epel10: Migrate to systemd.
Date: Wed, 12 Aug 2026 20:05:47 GMT [thread overview]
Message-ID: <178656514780.1.14350666676914463531.rpms-conman-129d57dbffe3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/conman
Branch : epel10
Commit : 129d57dbffe396cdb1cdbc91170fff51dc942c56
Author : Jon Ciesla <limburgher@gmail.com>
Date : 2012-04-17T12:37:08-05:00
Stats : +43/-14 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/conman/c/129d57dbffe396cdb1cdbc91170fff51dc942c56?branch=epel10
Log:
Migrate to systemd.
---
diff --git a/conman.service b/conman.service
new file mode 100644
index 0000000..2d9a34a
--- /dev/null
+++ b/conman.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ConMan Console Management Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/conmand -c /etc/conman.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/conman.spec b/conman.spec
index ee41a96..3f3ba1c 100644
--- a/conman.spec
+++ b/conman.spec
@@ -1,21 +1,20 @@
Name: conman
Version: 0.2.7
-Release: 0%{?dist}
+Release: 1%{?dist}
Summary: ConMan - The Console Manager
Group: Applications/System
License: GPLv2+
URL: http://home.gna.org/conman/
Source0: http://download.gna.org/%{name}/%{version}/%{name}-%{version}.tar.bz2
-Source1: %{name}.init
+Source1: %{name}.service
Source2: %{name}.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: logrotate
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
-Requires(postun): /sbin/service
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
BuildRequires: tcp_wrappers
%description
@@ -53,7 +52,8 @@ make %{?_smp_mflags}
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# put in our own initscript and logrotate
-install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
+install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
# make log directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
@@ -69,19 +69,35 @@ chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
rm -rf "$RPM_BUILD_ROOT"
%post
-/sbin/chkconfig --add conman
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
%preun
-if [ "$1" = 0 ]; then
- /sbin/service conman stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del conman
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable conman.service > /dev/null 2>&1 || :
+ /bin/systemctl stop conman.service > /dev/null 2>&1 || :
fi
%postun
-if [ "$1" -ge 1 ]; then
- /sbin/service conman condrestart >/dev/null 2>&1 || :
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart conman.service >/dev/null 2>&1 || :
fi
+%triggerun -- conman < 0.2.7-1
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply conman
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save conman >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del conman >/dev/null 2>&1 || :
+/bin/systemctl try-restart conman.service >/dev/null 2>&1 || :
+
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING FAQ NEWS
@@ -89,7 +105,7 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-%{_sysconfdir}/init.d/%{name}
+%{_unitdir}/%{name}.service
%{_localstatedir}/log/%{name}
%{_localstatedir}/log/%{name}.old
%{_bindir}/*
@@ -98,6 +114,9 @@ fi
%{_mandir}/*/*
%changelog
+* Tue Apr 17 2012 Jon Ciesla <limburgher@gmail.com> - 0.2.7-1
+- Migrate to systemd, BZ 771474.
+
* Sun Apr 15 2012 Steven M. Parrish <smparrish@gmail.com> - 0.2.7-0
- New upstream release
reply other threads:[~2026-08-12 20:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178656514780.1.14350666676914463531.rpms-conman-129d57dbffe3@fedoraproject.org \
--to=limburgher@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox