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 888215 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]
koji-builder sysvinit → systemd
0001-Add-systemd-unit-file-for-kojid.patch (text/plain), 5.05 KB, created by
Zbigniew Jędrzejewski-Szmek
on 2014-04-21 19:32:31 UTC
(
hide
)
Description:
koji-builder sysvinit → systemd
Filename:
MIME Type:
Creator:
Zbigniew Jędrzejewski-Szmek
Created:
2014-04-21 19:32:31 UTC
Size:
5.05 KB
patch
obsolete
>From 5c6748188af1d1c81dbfc5eb097342856628b730 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: [PATCH 1/3] Add systemd unit file for kojid > >--- > Makefile | 3 ++- > builder/Makefile | 19 +++++++++++++------ > builder/kojid.service | 14 ++++++++++++++ > koji.spec | 39 +++++++++++++++++++++++++++++++++++++-- > 4 files changed, 66 insertions(+), 9 deletions(-) > create mode 100644 builder/kojid.service > >diff --git a/Makefile b/Makefile >index b9c23bf..d5e9b77 100644 >--- a/Makefile >+++ b/Makefile >@@ -105,6 +105,7 @@ force-tag:: > # @$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" > > DESTDIR ?= / >+TYPE = systemd > install: > @if [ "$(DESTDIR)" = "" ]; then \ > echo " "; \ >@@ -115,4 +116,4 @@ install: > mkdir -p $(DESTDIR) > > for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` \ >- -C $$d install; [ $$? = 0 ] || exit 1; done >+ -C $$d install TYPE=$(TYPE); [ $$? = 0 ] || exit 1; done >diff --git a/builder/Makefile b/builder/Makefile >index 02bae11..1de0a9c 100644 >--- a/builder/Makefile >+++ b/builder/Makefile >@@ -1,6 +1,7 @@ >- > BINFILES = kojid > LIBEXECFILES = mergerepos >+SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir) >+TYPE = systemd > > _default: > @echo "nothing to make. try make install" >@@ -9,7 +10,7 @@ clean: > rm -f *.o *.so *.pyc *~ > > >-install: >+_install: > @if [ "$(DESTDIR)" = "" ]; then \ > echo " "; \ > echo "ERROR: A destdir is required"; \ >@@ -23,13 +24,19 @@ install: > install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/kojid > > mkdir -p $(DESTDIR)/etc/mock/koji >+ >+ mkdir -p $(DESTDIR)/etc/kojid >+ install -p -m 644 kojid.conf $(DESTDIR)/etc/kojid/kojid.conf >+ >+install-systemd: _install >+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) >+ install -p -m 644 kojid.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) >+ >+install-sysv: _install > 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)/etc/kojid >- install -p -m 644 kojid.conf $(DESTDIR)/etc/kojid/kojid.conf >- >- >+install: install-$(TYPE) >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/koji.spec b/koji.spec >index 064f14a..a0bd397 100644 >--- a/koji.spec >+++ b/koji.spec >@@ -1,5 +1,12 @@ > %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} > >+%if 0%{?fedora} >= 21 || 0%{?redhat} >= 7 >+%global use_systemd 1 >+%else >+%global use_systemd 0 >+%global install_opt TYPE=sysv >+%endif >+ > %define baserelease 1 > #build with --define 'testbuild 1' to have a timestamp appended to release > %if "x%{?testbuild}" == "x1" >@@ -23,6 +30,10 @@ Requires: rpm-python > Requires: pyOpenSSL > Requires: python-urlgrabber > BuildRequires: python >+%if %{use_systemd} >+BuildRequires: systemd >+BuildRequires: pkgconfig >+%endif > > %description > Koji is a system for building and tracking RPMS. The base package >@@ -63,11 +74,17 @@ License: LGPLv2 and GPLv2+ > #mergerepos (from createrepo) is GPLv2+ > Requires: %{name} = %{version}-%{release} > Requires: mock >= 0.9.14 >+Requires(pre): /usr/sbin/useradd >+%if %{use_systemd} >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd >+%else > Requires(post): /sbin/chkconfig > Requires(post): /sbin/service > Requires(preun): /sbin/chkconfig > Requires(preun): /sbin/service >-Requires(pre): /usr/sbin/useradd >+%endif > Requires: /usr/bin/cvs > Requires: /usr/bin/svn > Requires: /usr/bin/git >@@ -135,7 +152,7 @@ koji-web is a web UI to the Koji system. > > %install > rm -rf $RPM_BUILD_ROOT >-make DESTDIR=$RPM_BUILD_ROOT install >+make DESTDIR=$RPM_BUILD_ROOT %{?install_opt} install > > %clean > rm -rf $RPM_BUILD_ROOT >@@ -190,8 +207,12 @@ rm -rf $RPM_BUILD_ROOT > %{_sbindir}/kojid > %dir %{_libexecdir}/kojid > %{_libexecdir}/kojid/mergerepos >+%if %{use_systemd} >+%{_unitdir}/kojid.service >+%else > %{_initrddir}/kojid > %config(noreplace) %{_sysconfdir}/sysconfig/kojid >+%endif > %dir %{_sysconfdir}/kojid > %config(noreplace) %{_sysconfdir}/kojid/kojid.conf > %attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji >@@ -199,6 +220,19 @@ rm -rf $RPM_BUILD_ROOT > %pre builder > /usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: > >+%if %{use_systemd} >+ >+%post builder >+%systemd_post kojid.service >+ >+%preun builder >+%systemd_preun kojid.service >+ >+%postun builder >+%systemd_postun kojid.service >+ >+%else >+ > %post builder > /sbin/chkconfig --add kojid > >@@ -207,6 +241,7 @@ if [ $1 = 0 ]; then > /sbin/service kojid stop &> /dev/null > /sbin/chkconfig --del kojid > fi >+%endif > > %files vm > %defattr(-,root,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