summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups
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:34 +0000
commit31ce0271e66e17d981fec1a372b531af5f2d021e (patch)
treef13ea62930e6eaf22e1fd535e5ee020763399b25 /meta/recipes-extended/cups
parenta4b48c26c5c011f8568537fa63521106067ab0c2 (diff)
downloadpoky-31ce0271e66e17d981fec1a372b531af5f2d021e.tar.gz
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. (From OE-Core rev: 39912b5f7b40210aefb8b248ab1a8643b61dfcbc) Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cups')
-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 \
7 file://use_echo_only_in_init.patch \ 7 file://use_echo_only_in_init.patch \
8 file://0001-don-t-try-to-run-generated-binaries.patch \ 8 file://0001-don-t-try-to-run-generated-binaries.patch \
9 file://cups_serverbin.patch \ 9 file://cups_serverbin.patch \
10 file://cups.socket \
11 file://cups.path \
12 file://cups.service \
13 " 10 "
14 11
15UPSTREAM_CHECK_URI = "http://www.cups.org/software.php" 12UPSTREAM_CHECK_URI = "http://www.cups.org/software.php"
@@ -24,13 +21,15 @@ inherit autotools-brokensep binconfig useradd systemd
24USERADD_PACKAGES = "${PN}" 21USERADD_PACKAGES = "${PN}"
25GROUPADD_PARAM_${PN} = "--system lpadmin" 22GROUPADD_PARAM_${PN} = "--system lpadmin"
26 23
27SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" 24SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service"
28 25
29PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ 26PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
27 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
30 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" 28 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
31PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" 29PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
32PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" 30PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
33PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" 31PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
32PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
34PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" 33PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
35 34
36EXTRA_OECONF = " \ 35EXTRA_OECONF = " \
@@ -78,13 +77,6 @@ do_install () {
78 rm -rf ${D}${sysconfdir}/init.d/ 77 rm -rf ${D}${sysconfdir}/init.d/
79 rm -rf ${D}${sysconfdir}/rc* 78 rm -rf ${D}${sysconfdir}/rc*
80 fi 79 fi
81
82 # Install systemd unit files
83 install -d ${D}${systemd_unitdir}/system
84 install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
85 install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
86 install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
87 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
88} 80}
89 81
90python do_package_append() { 82python 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 @@
1[Unit]
2Description=CUPS Printer Service Spool
3
4[Path]
5PathExistsGlob=/var/spool/cups/d*
6
7[Install]
8WantedBy=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 @@
1[Unit]
2Description=CUPS Printing Service
3
4[Service]
5ExecStart=@SBINDIR@/cupsd -f
6PrivateTmp=true
7
8[Install]
9Also=cups.socket cups.path
10WantedBy=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 @@
1[Unit]
2Description=CUPS Printing Service Sockets
3
4[Socket]
5ListenStream=/var/run/cups/cups.sock
6
7[Install]
8WantedBy=sockets.target