cups: set rundir to /run/cups if systemd is used
PATCH 1/1 cups: set rundir to /run/cups if systemd is used
When running under systemd, cups needs to be configured with '--with-rundir=/run/cups', as systemd takes an exception to the activation socket being under /var/run and relocates it.
This leads to fd duplication in cupsd and an inadvertent closure of the activation socket when the daemon exits due to inactivity, so that the daemon cannot be activated again.
[YOCTO #14152]
--- meta/recipes-extended/cups/cups.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-extended/cups/cups.inc +5 -0
@@ -56,8 +56,11 @@ EXTRA_OECONF = " \ --enable-libusb \ --with-domainsocket=/run/cups/cups.sock \ DSOFLAGS='${LDFLAGS}' \ + ${EXTRA_OECONF_SYSTEMD} \ " +EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}" + EXTRA_AUTORECONF += "--exclude=autoheader" do_compile () {
@@ -105,6 +108,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', FILES_${PN} += "${libexecdir}/cups/ \ " +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/run/cups/certs', '', d)}" + FILES_${PN}-lib = "${libdir}/libcups.so.*" FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
Signature · 1 line
2.25.1
Kai -
Could you please verify and confirm the fix is correct?
Quoted 40 lines · Oleksandr Kravchuk
When running under systemd, cups needs to be configured with '--with-rundir=/run/cups', as systemd takes an exception to the activation socket being under
/var/runand relocates it.This leads to fd duplication in cupsd and an inadvertent closure of the activation socket when the daemon exits due to inactivity, so that the daemon cannot be activated again.
[YOCTO #14152]
Signed-off-by Oleksandr Kravchuk <[email protected]>--- meta/recipes-extended/cups/cups.inc | 5 +++++ 1 file changed, 5 insertions(+)meta/recipes-extended/cups/cups.inc +5
-0@@ -56,8 +56,11 @@ EXTRA_OECONF = " \ --enable-libusb \ --with-domainsocket=/run/cups/cups.sock \ DSOFLAGS='${LDFLAGS}' \ + ${EXTRA_OECONF_SYSTEMD} \ " +EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}" + EXTRA_AUTORECONF += "--exclude=autoheader" do_compile () {@@ -105,6 +108,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', FILES_${PN} += "${libexecdir}/cups/ \ " +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/run/cups/certs', '', d)}" + FILES_${PN}-lib = "${libdir}/libcups.so.*" FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
Quoted 3 lines · Oleksandr Kravchuk
Kai -
Could you please verify and confirm the fix is correct?
OK. I'll test the v2 patch.
Regards,
Kai
Quoted 39 lines · Oleksandr Kravchuk
Quoted 37 lines
When running under systemd, cups needs to be configured with '--with-rundir=/run/cups', as systemd takes an exception to the activation socket being under
/var/runand relocates it.This leads to fd duplication in cupsd and an inadvertent closure of the activation socket when the daemon exits due to inactivity, so that the daemon cannot be activated again.
[YOCTO #14152]
Signed-off-by Oleksandr Kravchuk <[email protected]>---
meta/recipes-extended/cups/cups.inc | 5 +++++1 file changed, 5 insertions(+)meta/recipes-extended/cups/cups.inc +1
-0@@ -56,8 +56,11 @@ EXTRA_OECONF = " \ --enable-libusb \ --with-domainsocket=/run/cups/cups.sock \ DSOFLAGS='${LDFLAGS}' \ + ${EXTRA_OECONF_SYSTEMD} \"
+EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}" +
EXTRA_AUTORECONF+= "--exclude=autoheader"
do_compile() {meta/recipes-extended/cups/cups.inc +0
-0@@ -105,6 +108,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', FILES_${PN} += "${libexecdir}/cups/ \"
+FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/run/cups/certs', '', d)}" +
FILES_${PN}-lib = "${libdir}/libcups.so.*"
FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
Signature · 2 lines
Kai Kang Wind River Linux
Quoted 33 lines · Oleksandr Kravchuk
When running under systemd, cups needs to be configured with '--with-rundir=/run/cups', as systemd takes an exception to the activation socket being under
/var/runand relocates it.This leads to fd duplication in cupsd and an inadvertent closure of the activation socket when the daemon exits due to inactivity, so that the daemon cannot be activated again.
[YOCTO #14152]
Signed-off-by Oleksandr Kravchuk <[email protected]>--- meta/recipes-extended/cups/cups.inc | 5 +++++ 1 file changed, 5 insertions(+)meta/recipes-extended/cups/cups.inc +3
-0@@ -56,8 +56,11 @@ EXTRA_OECONF = " \ --enable-libusb \ --with-domainsocket=/run/cups/cups.sock \ DSOFLAGS='${LDFLAGS}' \ + ${EXTRA_OECONF_SYSTEMD} \ " +EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}" + EXTRA_AUTORECONF += "--exclude=autoheader" do_compile () {
meta/recipes-extended/cups/cups.inc RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', · line 112
Quoted 5 lines
meta/recipes-extended/cups/cups.inc +2
-0@@ -105,6 +108,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', FILES_${PN} += "${libexecdir}/cups/ \ " +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/run/cups/certs', '', d)}" +
/run dir is created/populated during runtime. you can use tmpfile fragment in do_install something like
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /run/cups/cert 0755 - - - -" >${D}${sysconfdir}/tmpfiles.d/cups.conf
fi
Quoted 9 lines
meta/recipes-extended/cups/cups.inc +0
-1FILES_${PN}-lib = "${libdir}/libcups.so.*" FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" --2.25.1