Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 887978 Details for
Bug 995753
koji-vm,koji-builder,koji-utils: add systemd unit files
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patches rebased to 1.9.0
koji-systemd-conversion.patch (text/plain), 16.08 KB, created by
Dan Horák
on 2014-04-20 21:25:06 UTC
(
hide
)
Description:
patches rebased to 1.9.0
Filename:
MIME Type:
Creator:
Dan Horák
Created:
2014-04-20 21:25:06 UTC
Size:
16.08 KB
patch
obsolete
>From f54a07eb406b8018764597c221c164eb67019930 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Sat, 10 Aug 2013 15:17:27 -0400 >Subject: [koji PATCH 1/3] replace sysvinit script for builder with systemd > unit file > >--- > builder/Makefile | 8 ++-- > builder/kojid.init | 99 ------------------------------------------------- > builder/kojid.service | 14 +++++++ > builder/kojid.sysconfig | 3 -- > koji.spec | 22 +++++------ > 5 files changed, 28 insertions(+), 118 deletions(-) > delete mode 100755 builder/kojid.init > create mode 100644 builder/kojid.service > delete mode 100644 builder/kojid.sysconfig > >diff --git a/builder/Makefile b/builder/Makefile >index 02bae11..b36f543 100644 >--- a/builder/Makefile >+++ b/builder/Makefile >@@ -1,6 +1,6 @@ >- > BINFILES = kojid > LIBEXECFILES = mergerepos >+SYSTEMDSYSTEMUNITDIR=$(shell pkg-config systemd --variable=systemdsystemunitdir) > > _default: > @echo "nothing to make. try make install" >@@ -23,11 +23,9 @@ install: > install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/kojid > > mkdir -p $(DESTDIR)/etc/mock/koji >- mkdir -p $(DESTDIR)/etc/rc.d/init.d >- install -p -m 755 kojid.init $(DESTDIR)/etc/rc.d/init.d/kojid > >- mkdir -p $(DESTDIR)/etc/sysconfig >- install -p -m 644 kojid.sysconfig $(DESTDIR)/etc/sysconfig/kojid >+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) >+ install -p -m 644 kojid.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) > > mkdir -p $(DESTDIR)/etc/kojid > install -p -m 644 kojid.conf $(DESTDIR)/etc/kojid/kojid.conf >diff --git a/builder/kojid.init b/builder/kojid.init >deleted file mode 100755 >index 691b77b..0000000 >--- a/builder/kojid.init >+++ /dev/null >@@ -1,99 +0,0 @@ >-#! /bin/sh >-# >-# kojid Start/Stop kojid >-# >-# chkconfig: 345 99 99 >-# description: kojid server >-# processname: kojid >- >-# This is an interactive program, we need the current locale >- >-# Source function library. >-. /etc/init.d/functions >- >-# Check that we're a priviledged user >-[ `id -u` = 0 ] || exit 0 >- >-[ -f /etc/sysconfig/kojid ] && . /etc/sysconfig/kojid >- >-prog="kojid" >- >-# Check that networking is up. >-if [ "$NETWORKING" = "no" ] >-then >- exit 0 >-fi >- >-[ -f /usr/sbin/kojid ] || exit 0 >- >-RETVAL=0 >- >-start() { >- echo -n $"Starting $prog: " >- cd / >- ARGS="" >- [ "$FORCE_LOCK" == "Y" ] && ARGS="$ARGS --force-lock" >- [ "$KOJID_DEBUG" == "Y" ] && ARGS="$ARGS --debug" >- [ "$KOJID_VERBOSE" == "Y" ] && ARGS="$ARGS --verbose" >- # XXX Fix for make download-checks in kernel builds >- # Remove once we're running the buildSRPMFromSCM task >- # as an unpriviledged user with their own environment >- export HOME="/root" >- daemon /usr/sbin/kojid $ARGS >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/kojid >- return $RETVAL >-} >- >-stop() { >- echo -n $"Stopping $prog: " >- killproc kojid >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/kojid >- return $RETVAL >-} >- >-restart() { >- stop >- start >-} >- >-graceful() { >- #SIGUSR1 initiates a graceful restart >- pid=$(pidofproc kojid) >- if test -z "$pid" >- then >- echo $"$prog not running" >- else >- kill -10 $pid >- fi >-} >- >-# See how we were called. >-case "$1" in >- start) >- start >- ;; >- stop) >- stop >- ;; >- status) >- status $prog >- ;; >- restart|reload|force-reload) >- restart >- ;; >- condrestart|try-restart) >- [ -f /var/lock/subsys/kojid ] && restart || : >- ;; >- graceful) >- graceful >- ;; >- *) >- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|graceful}" >- exit 1 >-esac >- >-exit $? >diff --git a/builder/kojid.service b/builder/kojid.service >new file mode 100644 >index 0000000..1886a44 >--- /dev/null >+++ b/builder/kojid.service >@@ -0,0 +1,14 @@ >+[Unit] >+Description=Koji build server >+Documentation=https://fedoraproject.org/wiki/Koji/ServerHowTo >+ >+After=network.target >+ >+[Service] >+ExecStart=/usr/sbin/kojid \ >+ --fg \ >+ --force-lock \ >+ --verbose >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/builder/kojid.sysconfig b/builder/kojid.sysconfig >deleted file mode 100644 >index 393aee9..0000000 >--- a/builder/kojid.sysconfig >+++ /dev/null >@@ -1,3 +0,0 @@ >-FORCE_LOCK=Y >-KOJID_DEBUG=N >-KOJID_VERBOSE=Y >diff --git a/koji.spec b/koji.spec >index 064f14a..f4a7be0 100644 >--- a/koji.spec >+++ b/koji.spec >@@ -23,6 +23,8 @@ Requires: rpm-python > Requires: pyOpenSSL > Requires: python-urlgrabber > BuildRequires: python >+BuildRequires: systemd >+BuildRequires: pkgconfig > > %description > Koji is a system for building and tracking RPMS. The base package >@@ -63,11 +65,10 @@ License: LGPLv2 and GPLv2+ > #mergerepos (from createrepo) is GPLv2+ > Requires: %{name} = %{version}-%{release} > Requires: mock >= 0.9.14 >-Requires(post): /sbin/chkconfig >-Requires(post): /sbin/service >-Requires(preun): /sbin/chkconfig >-Requires(preun): /sbin/service > Requires(pre): /usr/sbin/useradd >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd > Requires: /usr/bin/cvs > Requires: /usr/bin/svn > Requires: /usr/bin/git >@@ -190,8 +191,7 @@ rm -rf $RPM_BUILD_ROOT > %{_sbindir}/kojid > %dir %{_libexecdir}/kojid > %{_libexecdir}/kojid/mergerepos >-%{_initrddir}/kojid >-%config(noreplace) %{_sysconfdir}/sysconfig/kojid >+%{_unitdir}/kojid.service > %dir %{_sysconfdir}/kojid > %config(noreplace) %{_sysconfdir}/kojid/kojid.conf > %attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji >@@ -200,13 +200,13 @@ rm -rf $RPM_BUILD_ROOT > /usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: > > %post builder >-/sbin/chkconfig --add kojid >+%systemd_post kojid.service > > %preun builder >-if [ $1 = 0 ]; then >- /sbin/service kojid stop &> /dev/null >- /sbin/chkconfig --del kojid >-fi >+%systemd_preun kojid.service >+ >+%postun builder >+%systemd_postun kojid.service > > %files vm > %defattr(-,root,root) >-- >1.9.0 > > >From 1b72e7535bb958dc5a21c380a552690dfde618b9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Sat, 10 Aug 2013 15:54:22 -0400 >Subject: [koji PATCH 2/3] replace sysvinit script for vm builder with systemd > unit file > >--- > koji.spec | 20 +++++------ > vm/Makefile | 11 ++----- > vm/kojivmd.init | 93 ---------------------------------------------------- > vm/kojivmd.service | 14 ++++++++ > vm/kojivmd.sysconfig | 3 -- > 5 files changed, 26 insertions(+), 115 deletions(-) > delete mode 100755 vm/kojivmd.init > create mode 100644 vm/kojivmd.service > delete mode 100644 vm/kojivmd.sysconfig > >diff --git a/koji.spec b/koji.spec >index f4a7be0..fe9205b 100644 >--- a/koji.spec >+++ b/koji.spec >@@ -91,10 +91,9 @@ Summary: Koji virtual machine management daemon > Group: Applications/System > License: LGPLv2 > Requires: %{name} = %{version}-%{release} >-Requires(post): /sbin/chkconfig >-Requires(post): /sbin/service >-Requires(preun): /sbin/chkconfig >-Requires(preun): /sbin/service >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd > Requires: libvirt-python > Requires: libxml2-python > Requires: /usr/bin/virt-clone >@@ -213,19 +212,18 @@ rm -rf $RPM_BUILD_ROOT > %{_sbindir}/kojivmd > #dir %{_datadir}/kojivmd > %{_datadir}/kojivmd/kojikamid >-%{_initrddir}/kojivmd >-%config(noreplace) %{_sysconfdir}/sysconfig/kojivmd >+%{_unitdir}/kojivmd.service > %dir %{_sysconfdir}/kojivmd > %config(noreplace) %{_sysconfdir}/kojivmd/kojivmd.conf > > %post vm >-/sbin/chkconfig --add kojivmd >+%systemd_post kojivmd.service > > %preun vm >-if [ $1 = 0 ]; then >- /sbin/service kojivmd stop &> /dev/null >- /sbin/chkconfig --del kojivmd >-fi >+%systemd_preun kojivmd.service >+ >+%postun vm >+%systemd_postun kojivmd.service > > %post utils > /sbin/chkconfig --add kojira >diff --git a/vm/Makefile b/vm/Makefile >index 1dcab17..bb561fb 100644 >--- a/vm/Makefile >+++ b/vm/Makefile >@@ -1,6 +1,6 @@ >- > BINFILES = kojivmd > SHAREFILES = kojikamid >+SYSTEMDSYSTEMUNITDIR=$(shell pkg-config systemd --variable=systemdsystemunitdir) > > _default: > @echo "nothing to make. try make install" >@@ -24,13 +24,8 @@ install: kojikamid > mkdir -p $(DESTDIR)/usr/share/kojivmd > install -p -m 644 $(SHAREFILES) $(DESTDIR)/usr/share/kojivmd > >- mkdir -p $(DESTDIR)/etc/rc.d/init.d >- install -p -m 755 kojivmd.init $(DESTDIR)/etc/rc.d/init.d/kojivmd >- >- mkdir -p $(DESTDIR)/etc/sysconfig >- install -p -m 644 kojivmd.sysconfig $(DESTDIR)/etc/sysconfig/kojivmd >+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) >+ install -p -m 644 kojivmd.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) > > mkdir -p $(DESTDIR)/etc/kojivmd > install -p -m 644 kojivmd.conf $(DESTDIR)/etc/kojivmd/kojivmd.conf >- >- >diff --git a/vm/kojivmd.init b/vm/kojivmd.init >deleted file mode 100755 >index b0a6408..0000000 >--- a/vm/kojivmd.init >+++ /dev/null >@@ -1,93 +0,0 @@ >-#! /bin/sh >-# >-# kojivmd Start/Stop kojivmd >-# >-# chkconfig: - 99 99 >-# description: kojivmd server >-# processname: kojivmd >- >-# Source function library. >-. /etc/init.d/functions >- >-# Check that we're a priviledged user >-[ `id -u` = 0 ] || exit 1 >- >-[ -f /etc/sysconfig/kojivmd ] && . /etc/sysconfig/kojivmd >- >-prog="kojivmd" >- >-# Check that networking is up. >-if [ "$NETWORKING" = "no" ] >-then >- exit 0 >-fi >- >-[ -f /usr/sbin/kojivmd ] || exit 1 >- >-RETVAL=0 >- >-start() { >- echo -n $"Starting $prog: " >- cd / >- ARGS="" >- [ "$FORCE_LOCK" == "Y" ] && ARGS="$ARGS --force-lock" >- [ "$KOJIVMD_DEBUG" == "Y" ] && ARGS="$ARGS --debug" >- [ "$KOJIVMD_VERBOSE" == "Y" ] && ARGS="$ARGS --verbose" >- daemon /usr/sbin/kojivmd $ARGS >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/kojivmd >- return $RETVAL >-} >- >-stop() { >- echo -n $"Stopping $prog: " >- killproc kojivmd >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/kojivmd >- return $RETVAL >-} >- >-restart() { >- stop >- start >-} >- >-graceful() { >- #SIGUSR1 initiates a graceful restart >- pid=$(pidofproc kojivmd) >- if test -z "$pid" >- then >- echo $"$prog not running" >- else >- kill -10 $pid >- fi >-} >- >-# See how we were called. >-case "$1" in >- start) >- start >- ;; >- stop) >- stop >- ;; >- status) >- status $prog >- ;; >- restart|reload|force-reload) >- restart >- ;; >- condrestart|try-restart) >- [ -f /var/lock/subsys/kojivmd ] && restart || : >- ;; >- graceful) >- graceful >- ;; >- *) >- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|graceful}" >- exit 1 >-esac >- >-exit $? >diff --git a/vm/kojivmd.service b/vm/kojivmd.service >new file mode 100644 >index 0000000..a417fdb >--- /dev/null >+++ b/vm/kojivmd.service >@@ -0,0 +1,14 @@ >+[Unit] >+Description=Koji vm build server >+Documentation=https://fedoraproject.org/wiki/Koji/ServerHowTo >+ >+After=network.target >+ >+[Service] >+ExecStart=/usr/sbin/kojivmd \ >+ --fg \ >+ --force-lock \ >+ --verbose >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/vm/kojivmd.sysconfig b/vm/kojivmd.sysconfig >deleted file mode 100644 >index 1d7af4d..0000000 >--- a/vm/kojivmd.sysconfig >+++ /dev/null >@@ -1,3 +0,0 @@ >-FORCE_LOCK=Y >-KOJIVMD_DEBUG=N >-KOJIVMD_VERBOSE=Y >-- >1.9.0 > > >From c6a30044a5f06f6702ec171713346839b6c8918e Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Sat, 10 Aug 2013 16:05:31 -0400 >Subject: [koji PATCH 3/3] replace sysvinit script for kojira with systemd unit > file > >--- > koji.spec | 18 ++++++----- > util/Makefile | 8 ++--- > util/kojira.init | 85 --------------------------------------------------- > util/kojira.service | 14 +++++++++ > util/kojira.sysconfig | 4 --- > 5 files changed, 27 insertions(+), 102 deletions(-) > delete mode 100644 util/kojira.init > create mode 100644 util/kojira.service > delete mode 100644 util/kojira.sysconfig > >diff --git a/koji.spec b/koji.spec >index fe9205b..37f12a8 100644 >--- a/koji.spec >+++ b/koji.spec >@@ -109,6 +109,9 @@ Group: Applications/Internet > License: LGPLv2 > Requires: postgresql-python > Requires: %{name} = %{version}-%{release} >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd > > %description utils > Utilities for the Koji system >@@ -167,8 +170,7 @@ rm -rf $RPM_BUILD_ROOT > %files utils > %defattr(-,root,root) > %{_sbindir}/kojira >-%{_initrddir}/kojira >-%config(noreplace) %{_sysconfdir}/sysconfig/kojira >+%{_unitdir}/kojira.service > %dir %{_sysconfdir}/kojira > %config(noreplace) %{_sysconfdir}/kojira/kojira.conf > %{_sbindir}/koji-gc >@@ -226,13 +228,13 @@ rm -rf $RPM_BUILD_ROOT > %systemd_postun kojivmd.service > > %post utils >-/sbin/chkconfig --add kojira >-/sbin/service kojira condrestart &> /dev/null || : >+%systemd_post kojira.service >+ > %preun utils >-if [ $1 = 0 ]; then >- /sbin/service kojira stop &> /dev/null || : >- /sbin/chkconfig --del kojira >-fi >+%systemd_preun kojira.service >+ >+%postun utils >+%systemd_postun kojira.service > > %changelog > * Mon Mar 24 2014 Mike McLean <mikem at redhat.com> - 1.9.0-1 >diff --git a/util/Makefile b/util/Makefile >index 79ac64f..8438fd0 100644 >--- a/util/Makefile >+++ b/util/Makefile >@@ -1,4 +1,5 @@ > BINFILES = kojira koji-gc koji-shadow >+SYSTEMDSYSTEMUNITDIR=$(shell pkg-config systemd --variable=systemdsystemunitdir) > > _default: > @echo "nothing to make. try make install" >@@ -15,11 +16,8 @@ install: > mkdir -p $(DESTDIR)/usr/sbin > install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin > >- mkdir -p $(DESTDIR)/etc/rc.d/init.d >- install -p -m 755 kojira.init $(DESTDIR)/etc/rc.d/init.d/kojira >- >- mkdir -p $(DESTDIR)/etc/sysconfig >- install -p -m 644 kojira.sysconfig $(DESTDIR)/etc/sysconfig/kojira >+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) >+ install -p -m 644 kojira.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) > > mkdir -p $(DESTDIR)/etc/kojira > install -p -m 644 kojira.conf $(DESTDIR)/etc/kojira/kojira.conf >diff --git a/util/kojira.init b/util/kojira.init >deleted file mode 100644 >index 749773b..0000000 >--- a/util/kojira.init >+++ /dev/null >@@ -1,85 +0,0 @@ >-#! /bin/sh >-# >-# kojira Start/Stop kojira >-# >-# chkconfig: - 99 99 >-# description: koji repo administrator >-# processname: kojira >- >-# This is an interactive program, we need the current locale >- >-# Source function library. >-. /etc/init.d/functions >- >-# Check that we're a priviledged user >-[ `id -u` = 0 ] || exit 0 >- >-[ -f /etc/sysconfig/kojira ] && . /etc/sysconfig/kojira >- >-prog="kojira" >- >-# Check that networking is up. >-if [ "$NETWORKING" = "no" ] >-then >- exit 0 >-fi >- >-[ -f /usr/sbin/kojira ] || exit 0 >- >-RETVAL=0 >- >-start() { >- echo -n $"Starting $prog: " >- cd / >- ARGS="" >- [ "$FORCE_LOCK" == "Y" ] && ARGS="$ARGS --force-lock" >- [ "$KOJIRA_DEBUG" == "Y" ] && ARGS="$ARGS --debug" >- [ "$KOJIRA_VERBOSE" == "Y" ] && ARGS="$ARGS --verbose" >- if [ -n "$RUNAS" -a "$RUNAS" != "root" ]; then >- daemon --user "$RUNAS" /usr/sbin/kojira $ARGS >- else >- daemon /usr/sbin/kojira $ARGS >- fi >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/kojira >- return $RETVAL >-} >- >-stop() { >- echo -n $"Stopping $prog: " >- killproc kojira >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/kojira >- return $RETVAL >-} >- >-restart() { >- stop >- start >-} >- >-# See how we were called. >-case "$1" in >- start) >- start >- ;; >- stop) >- stop >- ;; >- status) >- status $prog >- ;; >- restart|reload|force-reload) >- restart >- ;; >- condrestart|try-restart) >- [ -f /var/lock/subsys/kojira ] && restart || : >- ;; >- *) >- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" >- exit 1 >-esac >- >-exit $? >diff --git a/util/kojira.service b/util/kojira.service >new file mode 100644 >index 0000000..beaea18 >--- /dev/null >+++ b/util/kojira.service >@@ -0,0 +1,14 @@ >+[Unit] >+Description=Koji repo administration >+Documentation=https://fedoraproject.org/wiki/Koji/ServerHowTo >+ >+After=network.target >+ >+[Service] >+ExecStart=/usr/sbin/kojira \ >+ --fg \ >+ --force-lock \ >+ --verbose >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/util/kojira.sysconfig b/util/kojira.sysconfig >deleted file mode 100644 >index 830c183..0000000 >--- a/util/kojira.sysconfig >+++ /dev/null >@@ -1,4 +0,0 @@ >-FORCE_LOCK=Y >-KOJIRA_DEBUG=N >-KOJIRA_VERBOSE=Y >-RUNAS=root >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 995753
:
785270
|
785271
|
785272
|
785279
|
785280
|
785281
|
785282
|
887978
|
888215
|
888216
|
888217