summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/squid/squid_6.5.bb
diff options
context:
space:
mode:
authorPatrick Wicki <patrick.wicki@siemens.com>2023-11-30 03:55:29 +0100
committerKhem Raj <raj.khem@gmail.com>2023-11-29 22:25:05 -0800
commit501e5aa4b56eb681004894549cea06f33d111e4d (patch)
tree17b863a9b25f2af07cf3db5c1df8151e6aecebb1 /meta-networking/recipes-daemons/squid/squid_6.5.bb
parenta7275d4c1e90bb35e9082608a37e1cd6c470655f (diff)
downloadmeta-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/recipes-daemons/squid/squid_6.5.bb')
-rw-r--r--meta-networking/recipes-daemons/squid/squid_6.5.bb13
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 "
33DEPENDS = "libtool" 33DEPENDS = "libtool"
34 34
35inherit autotools pkgconfig useradd ptest perlnative 35inherit autotools pkgconfig useradd ptest perlnative systemd
36 36
37LDFLAGS:append:mipsarch = " -latomic" 37LDFLAGS:append:mipsarch = " -latomic"
38LDFLAGS:append:powerpc = " -latomic" 38LDFLAGS:append:powerpc = " -latomic"
@@ -44,6 +44,7 @@ USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --she
44 44
45PACKAGECONFIG ??= "auth url-rewrite-helpers \ 45PACKAGECONFIG ??= "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
49PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" 50PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
@@ -53,6 +54,7 @@ PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2"
53PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" 54PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl"
54PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" 55PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl"
55PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," 56PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers,"
57PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
56 58
57PACKAGES =+ " \ 59PACKAGES =+ " \
58 ${PN}-conf \ 60 ${PN}-conf \
@@ -106,6 +108,12 @@ do_install_ptest() {
106 108
107do_install:append() { 109do_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
136SYSTEMD_AUTO_ENABLE = "disable"
137SYSTEMD_SERVICE:${PN} = "squid.service"
138
128FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" 139FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
129FILES:${PN}-dbg += "/usr/src/debug" 140FILES:${PN}-dbg += "/usr/src/debug"
130FILES:${PN}-doc += "${datadir}/*.txt" 141FILES:${PN}-doc += "${datadir}/*.txt"