diff options
author | Patrick Wicki <patrick.wicki@siemens.com> | 2023-11-30 03:55:29 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-29 22:25:05 -0800 |
commit | 501e5aa4b56eb681004894549cea06f33d111e4d (patch) | |
tree | 17b863a9b25f2af07cf3db5c1df8151e6aecebb1 /meta-networking | |
parent | a7275d4c1e90bb35e9082608a37e1cd6c470655f (diff) | |
download | meta-openembedded-501e5aa4b56eb681004894549cea06f33d111e4d.tar.gz |
squid: add systemd service
Integrate the upstream unit file into the recipe.
Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-daemons/squid/squid_6.5.bb | 13 |
1 files changed, 12 insertions, 1 deletions
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 \ | |||
32 | " | 32 | " |
33 | DEPENDS = "libtool" | 33 | DEPENDS = "libtool" |
34 | 34 | ||
35 | inherit autotools pkgconfig useradd ptest perlnative | 35 | inherit autotools pkgconfig useradd ptest perlnative systemd |
36 | 36 | ||
37 | LDFLAGS:append:mipsarch = " -latomic" | 37 | LDFLAGS:append:mipsarch = " -latomic" |
38 | LDFLAGS:append:powerpc = " -latomic" | 38 | LDFLAGS:append:powerpc = " -latomic" |
@@ -44,6 +44,7 @@ USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --she | |||
44 | 44 | ||
45 | PACKAGECONFIG ??= "auth url-rewrite-helpers \ | 45 | PACKAGECONFIG ??= "auth url-rewrite-helpers \ |
46 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | 46 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ |
47 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | ||
47 | " | 48 | " |
48 | 49 | ||
49 | PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" | 50 | PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" |
@@ -53,6 +54,7 @@ PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" | |||
53 | PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" | 54 | PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" |
54 | PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" | 55 | PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" |
55 | PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," | 56 | PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," |
57 | PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" | ||
56 | 58 | ||
57 | PACKAGES =+ " \ | 59 | PACKAGES =+ " \ |
58 | ${PN}-conf \ | 60 | ${PN}-conf \ |
@@ -106,6 +108,12 @@ do_install_ptest() { | |||
106 | 108 | ||
107 | do_install:append() { | 109 | do_install:append() { |
108 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 110 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
111 | # Install service unit file | ||
112 | install -d ${D}/${systemd_unitdir}/system | ||
113 | install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system | ||
114 | sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service | ||
115 | |||
116 | # Configure tmpfiles.d | ||
109 | install -d ${D}${sysconfdir}/tmpfiles.d | 117 | install -d ${D}${sysconfdir}/tmpfiles.d |
110 | echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | 118 | echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
111 | echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | 119 | echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
@@ -125,6 +133,9 @@ do_install:append() { | |||
125 | install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid | 133 | install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid |
126 | } | 134 | } |
127 | 135 | ||
136 | SYSTEMD_AUTO_ENABLE = "disable" | ||
137 | SYSTEMD_SERVICE:${PN} = "squid.service" | ||
138 | |||
128 | FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" | 139 | FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" |
129 | FILES:${PN}-dbg += "/usr/src/debug" | 140 | FILES:${PN}-dbg += "/usr/src/debug" |
130 | FILES:${PN}-doc += "${datadir}/*.txt" | 141 | FILES:${PN}-doc += "${datadir}/*.txt" |