Skip to contentSkip to conversation

squid: install systemd unit without executable bit

PATCH New [email protected] 1 participant 2 messages Oct 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 squid: install systemd unit without executable bit

From: Patrick Wicki <[email protected]>

install defaults to mode 0755, which makes systemd complain:

Configuration file /usr/lib/systemd/system/squid.service is marked executable. Please remove executable permission bits. Proceeding anyway.

---
 meta-networking/recipes-daemons/squid/squid_7.7.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/squid/squid_7.7.bb +1 -1
index b657197fd7..bda8f124cb 100644
@@ -117,7 +117,7 @@ do_install:append() {
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         # Install service unit file
         install -d ${D}/${systemd_unitdir}/system
-        install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system
+        install -m 0644 ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system
         sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service
 
         # Configure tmpfiles.d
Signature · 1 line
2.56.0
#1 lore raw

PATCH 2/2 squid: use /run instead of /var/run in tmpfiles.d

From: Patrick Wicki <[email protected]>

systemd-tmpfiles warns about the legacy path:

/etc/tmpfiles.d/squid.conf:1: Line references path below legacy directory /var/run/, updating /var/run/squid → /run/squid; please update the tmpfiles.d/ drop-in file accordingly.

---
 meta-networking/recipes-daemons/squid/squid_7.7.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/squid/squid_7.7.bb +1 -1
index bda8f124cb..7649342596 100644
@@ -122,7 +122,7 @@ do_install:append() {
 
         # Configure tmpfiles.d
         install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+        echo "d ${runtimedir}/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
         echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
     fi
 
Signature · 1 line
2.56.0