From: Patrick Wicki <[email protected]> Integrate the upstream unit file into the recipe.
Signed-off-by: Patrick Wicki <[email protected]> --- meta-networking/recipes-daemons/squid/squid_6.5.bb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index 2641943fe..8d5d1a384 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -32,7 +32,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ " DEPENDS = "libtool" -inherit autotools pkgconfig useradd ptest perlnative +inherit autotools pkgconfig useradd ptest perlnative systemd LDFLAGS:append:mipsarch = " -latomic" LDFLAGS:append:powerpc = " -latomic" @@ -44,6 +44,7 @@ USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --she PACKAGECONFIG ??= "auth url-rewrite-helpers \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ " PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" @@ -53,6 +54,7 @@ PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" PACKAGES =+ " \ ${PN}-conf \ @@ -106,6 +108,12 @@ do_install_ptest() { 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 + sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service + + # 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 ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf @@ -125,6 +133,9 @@ do_install:append() { install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid } +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "squid.service" + FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" FILES:${PN}-dbg += "/usr/src/debug" FILES:${PN}-doc += "${datadir}/*.txt" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#107159): https://lists.openembedded.org/g/openembedded-devel/message/107159 Mute This Topic: https://lists.openembedded.org/mt/102886908/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
