summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <andrew.shadura@collabora.co.uk>2016-01-18 14:43:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 17:37:23 +0000
commit39912b5f7b40210aefb8b248ab1a8643b61dfcbc (patch)
tree3f901440584a835b9514347a65431708868089f9
parent025c348d0f12be9405a8d14e9ef6787e37ee7a23 (diff)
downloadopenembedded-core-39912b5f7b40210aefb8b248ab1a8643b61dfcbc.tar.gz
openembedded-core-39912b5f7b40210aefb8b248ab1a8643b61dfcbc.tar.bz2
openembedded-core-39912b5f7b40210aefb8b248ab1a8643b61dfcbc.zip
cups: update systemd support
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> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-extended/cups/cups.inc14
-rw-r--r--meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--meta/recipes-extended/cups/cups/cups.socket8
4 files changed, 3 insertions, 37 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 5aa365d095..3f81e2c39b 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 \
"
UPSTREAM_CHECK_URI = "http://www.cups.org/software.php"
@@ -24,13 +21,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 = " \
@@ -78,13 +77,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 de8cc57c27..0000000000
--- 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 7d3e839867..0000000000
--- 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 33148705d6..0000000000
--- 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