All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Shadura <andrew.shadura@collabora.co.uk>
To: OE Core <openembedded-core@lists.openembedded.org>
Subject: [PATCH v2] cups: update systemd support
Date: Thu, 22 Oct 2015 16:00:27 +0200	[thread overview]
Message-ID: <11321f065e34ca094a0aff494291662852f05805.1445522417.git.andrew.shadura@collabora.co.uk> (raw)
In-Reply-To: <c64105ff4adca9a4e05280aa52644919d646d660.1445449278.git.andrew.shadura@collabora.co.uk>

Add PACKAGECONFIG for systemd, enable it when systemd is enabled
in DISTRO_FEATURES. Pass the correct path to systemd units,
ensure they're installed into the package.

Drop custom systemd unit files, use those shipped by the upstream
instead.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
---
 meta/recipes-extended/cups/cups.inc          | 14 +++-----------
 meta/recipes-extended/cups/cups/cups.path    |  8 --------
 meta/recipes-extended/cups/cups/cups.service | 10 ----------
 meta/recipes-extended/cups/cups/cups.socket  |  8 --------
 4 files changed, 3 insertions(+), 37 deletions(-)
 delete mode 100644 meta/recipes-extended/cups/cups/cups.path
 delete mode 100644 meta/recipes-extended/cups/cups/cups.service
 delete mode 100644 meta/recipes-extended/cups/cups/cups.socket

diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 2c34da9..ac2abf5 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -7,9 +7,6 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
            file://use_echo_only_in_init.patch \
            file://0001-don-t-try-to-run-generated-binaries.patch \
            file://cups_serverbin.patch \
-           file://cups.socket \
-           file://cups.path \
-           file://cups.service \
 	  "
 
 LEAD_SONAME = "libcupsdriver.so"
@@ -21,13 +18,15 @@ inherit autotools-brokensep binconfig useradd systemd
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "--system lpadmin"
 
-SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
+SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
 PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
 PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
 PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
 PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
 
 EXTRA_OECONF = " \
@@ -75,13 +74,6 @@ do_install () {
 	    rm -rf ${D}${sysconfdir}/init.d/
 	    rm -rf ${D}${sysconfdir}/rc*
 	fi
-
-	# Install systemd unit files
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
 }
 
 python do_package_append() {
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
deleted file mode 100644
index de8cc57..0000000
--- a/meta/recipes-extended/cups/cups/cups.path
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printer Service Spool
-
-[Path]
-PathExistsGlob=/var/spool/cups/d*
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
deleted file mode 100644
index 7d3e839..0000000
--- a/meta/recipes-extended/cups/cups/cups.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=CUPS Printing Service
-
-[Service]
-ExecStart=@SBINDIR@/cupsd -f
-PrivateTmp=true
-
-[Install]
-Also=cups.socket cups.path
-WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
deleted file mode 100644
index 3314870..0000000
--- a/meta/recipes-extended/cups/cups/cups.socket
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printing Service Sockets
-
-[Socket]
-ListenStream=/var/run/cups/cups.sock
-
-[Install]
-WantedBy=sockets.target
-- 
2.1.4



  reply	other threads:[~2015-10-22 14:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 17:41 [PATCH] cups: explicitly configure with systemd when needed Andrew Shadura
2015-10-22 10:59 ` Burton, Ross
2015-10-22 11:06   ` Andrew Shadura
2015-10-22 11:20     ` Burton, Ross
2015-10-22 14:00       ` Andrew Shadura [this message]
2015-11-02 14:47         ` [PATCH v2] cups: update systemd support Andrew Shadura
     [not found]         ` <562EAA43.8020604@collabora.co.uk>
2015-11-20 13:48           ` Andrew Shadura
2015-12-11 21:39         ` Burton, Ross
2015-12-30 10:53           ` Andrew Shadura
2016-01-08 15:34             ` Martin Jansa
2016-01-08 15:37               ` Andrew Shadura
2016-01-18 14:44                 ` Burton, Ross

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=11321f065e34ca094a0aff494291662852f05805.1445522417.git.andrew.shadura@collabora.co.uk \
    --to=andrew.shadura@collabora.co.uk \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.