diff options
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi_0.8.bb')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi_0.8.bb | 121 |
1 files changed, 66 insertions, 55 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb b/meta/recipes-connectivity/avahi/avahi_0.8.bb index c8a3f876aa..1f18d4491d 100644 --- a/meta/recipes-connectivity/avahi/avahi_0.8.bb +++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb | |||
@@ -5,35 +5,47 @@ with no specific configuration. This tool implements IPv4LL, "Dynamic Configurat | |||
5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ | 5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ |
6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ | 6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ |
7 | server.' | 7 | server.' |
8 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
9 | HOMEPAGE = "http://avahi.org" | 8 | HOMEPAGE = "http://avahi.org" |
10 | BUGTRACKER = "https://github.com/lathiat/avahi/issues" | 9 | BUGTRACKER = "https://github.com/avahi/avahi/issues" |
11 | SECTION = "network" | 10 | SECTION = "network" |
12 | 11 | ||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | 12 | # major part is under LGPL-2.1-or-later, but several .dtd, .xsl, initscripts and |
14 | # python scripts are under GPLv2+ | 13 | # python scripts are under GPL-2.0-or-later |
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | 14 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
16 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
17 | file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \ | 16 | file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \ |
18 | file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \ | 17 | file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \ |
19 | file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ | 18 | file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ |
20 | file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" | 19 | file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" |
21 | 20 | ||
22 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \ | 21 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \ |
23 | file://00avahi-autoipd \ | 22 | file://00avahi-autoipd \ |
24 | file://99avahi-autoipd \ | 23 | file://99avahi-autoipd \ |
25 | file://initscript.patch \ | 24 | file://initscript.patch \ |
26 | file://0001-Fix-opening-etc-resolv.conf-error.patch \ | 25 | file://0001-Fix-opening-etc-resolv.conf-error.patch \ |
26 | file://handle-hup.patch \ | ||
27 | file://local-ping.patch \ | ||
28 | file://invalid-service.patch \ | ||
29 | file://CVE-2023-1981.patch \ | ||
30 | file://CVE-2023-38469-1.patch \ | ||
31 | file://CVE-2023-38469-2.patch \ | ||
32 | file://CVE-2023-38470-1.patch \ | ||
33 | file://CVE-2023-38470-2.patch \ | ||
34 | file://CVE-2023-38471-1.patch \ | ||
35 | file://CVE-2023-38471-2.patch \ | ||
36 | file://CVE-2023-38472.patch \ | ||
37 | file://CVE-2023-38473.patch \ | ||
27 | " | 38 | " |
28 | 39 | ||
29 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" | 40 | GITHUB_BASE_URI = "https://github.com/avahi/avahi/releases/" |
30 | SRC_URI[md5sum] = "229c6aa30674fc43c202b22c5f8c2be7" | ||
31 | SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" | 41 | SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" |
32 | 42 | ||
33 | DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native" | 43 | CVE_STATUS[CVE-2021-26720] = "not-applicable-platform: Issue only affects Debian/SUSE" |
44 | |||
45 | DEPENDS = "expat libcap libdaemon glib-2.0 glib-2.0-native" | ||
34 | 46 | ||
35 | # For gtk related PACKAGECONFIGs: gtk, gtk3 | 47 | # For gtk related PACKAGECONFIGs: gtk, gtk3 |
36 | AVAHI_GTK ?= "gtk3" | 48 | AVAHI_GTK ?= "" |
37 | 49 | ||
38 | PACKAGECONFIG ??= "dbus ${@bb.utils.contains_any('DISTRO_FEATURES','x11 wayland','${AVAHI_GTK}','',d)}" | 50 | PACKAGECONFIG ??= "dbus ${@bb.utils.contains_any('DISTRO_FEATURES','x11 wayland','${AVAHI_GTK}','',d)}" |
39 | PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" | 51 | PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" |
@@ -43,7 +55,7 @@ PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus" | |||
43 | PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent" | 55 | PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent" |
44 | PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase" | 56 | PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase" |
45 | 57 | ||
46 | inherit autotools pkgconfig gettext gobject-introspection | 58 | inherit autotools pkgconfig gettext gobject-introspection github-releases |
47 | 59 | ||
48 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ | 60 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ |
49 | --disable-stack-protector \ | 61 | --disable-stack-protector \ |
@@ -62,23 +74,22 @@ EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ | |||
62 | 74 | ||
63 | # The distro choice determines what init scripts are installed | 75 | # The distro choice determines what init scripts are installed |
64 | EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}" | 76 | EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}" |
65 | EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}" | 77 | EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_system_unitdir}/','--without-systemdsystemunitdir',d)}" |
66 | 78 | ||
67 | do_configure_prepend() { | 79 | do_configure:prepend() { |
68 | # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes | 80 | # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes |
69 | rm "${S}/common/introspection.m4" || true | 81 | rm "${S}/common/introspection.m4" || true |
70 | } | 82 | } |
71 | 83 | ||
72 | do_compile_prepend() { | 84 | do_compile:prepend() { |
73 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" | 85 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" |
74 | } | 86 | } |
75 | 87 | ||
76 | RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns" | 88 | RRECOMMENDS:${PN}:append:libc-glibc = " libnss-mdns" |
77 | 89 | ||
78 | do_install() { | 90 | do_install() { |
79 | autotools_do_install | 91 | autotools_do_install |
80 | rm -rf ${D}/run | 92 | rm -rf ${D}/run |
81 | rm -rf ${D}${datadir}/dbus-1/interfaces | ||
82 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 | 93 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 |
83 | rm -rf ${D}${libdir}/avahi | 94 | rm -rf ${D}${libdir}/avahi |
84 | 95 | ||
@@ -90,88 +101,88 @@ do_install() { | |||
90 | 101 | ||
91 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}" | 102 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}" |
92 | 103 | ||
93 | FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*" | 104 | FILES:libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*" |
94 | 105 | ||
95 | RPROVIDES_libavahi-compat-libdnssd = "libdns-sd" | 106 | RPROVIDES:libavahi-compat-libdnssd = "libdns-sd" |
96 | 107 | ||
97 | inherit update-rc.d systemd useradd | 108 | inherit update-rc.d systemd useradd |
98 | 109 | ||
99 | PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui" | 110 | PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui" |
100 | 111 | ||
101 | FILES_avahi-ui = "${libdir}/libavahi-ui*.so.*" | 112 | FILES:avahi-ui = "${libdir}/libavahi-ui*.so.*" |
102 | FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \ | 113 | FILES:avahi-discover = "${datadir}/applications/avahi-discover.desktop \ |
103 | ${datadir}/avahi/interfaces/avahi-discover.ui \ | 114 | ${datadir}/avahi/interfaces/avahi-discover.ui \ |
104 | ${bindir}/avahi-discover-standalone \ | 115 | ${bindir}/avahi-discover-standalone \ |
105 | " | 116 | " |
106 | 117 | ||
107 | LICENSE_libavahi-gobject = "LGPLv2.1+" | 118 | LICENSE:libavahi-gobject = "LGPL-2.1-or-later" |
108 | LICENSE_avahi-daemon = "LGPLv2.1+" | 119 | LICENSE:avahi-daemon = "LGPL-2.1-or-later" |
109 | LICENSE_libavahi-common = "LGPLv2.1+" | 120 | LICENSE:libavahi-common = "LGPL-2.1-or-later" |
110 | LICENSE_libavahi-core = "LGPLv2.1+" | 121 | LICENSE:libavahi-core = "LGPL-2.1-or-later" |
111 | LICENSE_libavahi-client = "LGPLv2.1+" | 122 | LICENSE:libavahi-client = "LGPL-2.1-or-later" |
112 | LICENSE_avahi-dnsconfd = "LGPLv2.1+" | 123 | LICENSE:avahi-dnsconfd = "LGPL-2.1-or-later" |
113 | LICENSE_libavahi-glib = "LGPLv2.1+" | 124 | LICENSE:libavahi-glib = "LGPL-2.1-or-later" |
114 | LICENSE_avahi-autoipd = "LGPLv2.1+" | 125 | LICENSE:avahi-autoipd = "LGPL-2.1-or-later" |
115 | LICENSE_avahi-utils = "LGPLv2.1+" | 126 | LICENSE:avahi-utils = "LGPL-2.1-or-later" |
116 | 127 | ||
117 | # As avahi doesn't put any files into PN, clear the files list to avoid problems | 128 | # As avahi doesn't put any files into PN, clear the files list to avoid problems |
118 | # if extra libraries appear. | 129 | # if extra libraries appear. |
119 | FILES_${PN} = "" | 130 | FILES:${PN} = "" |
120 | FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ | 131 | FILES:avahi-autoipd = "${sbindir}/avahi-autoipd \ |
121 | ${sysconfdir}/avahi/avahi-autoipd.action \ | 132 | ${sysconfdir}/avahi/avahi-autoipd.action \ |
122 | ${sysconfdir}/dhcp/*/avahi-autoipd \ | 133 | ${sysconfdir}/dhcp/*/avahi-autoipd \ |
123 | ${sysconfdir}/udhcpc.d/00avahi-autoipd \ | 134 | ${sysconfdir}/udhcpc.d/00avahi-autoipd \ |
124 | ${sysconfdir}/udhcpc.d/99avahi-autoipd" | 135 | ${sysconfdir}/udhcpc.d/99avahi-autoipd" |
125 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | 136 | FILES:libavahi-common = "${libdir}/libavahi-common.so.*" |
126 | FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib" | 137 | FILES:libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib" |
127 | FILES_avahi-daemon = "${sbindir}/avahi-daemon \ | 138 | FILES:avahi-daemon = "${sbindir}/avahi-daemon \ |
128 | ${sysconfdir}/avahi/avahi-daemon.conf \ | 139 | ${sysconfdir}/avahi/avahi-daemon.conf \ |
129 | ${sysconfdir}/avahi/hosts \ | 140 | ${sysconfdir}/avahi/hosts \ |
130 | ${sysconfdir}/avahi/services \ | 141 | ${sysconfdir}/avahi/services \ |
131 | ${sysconfdir}/dbus-1 \ | 142 | ${sysconfdir}/dbus-1 \ |
132 | ${sysconfdir}/init.d/avahi-daemon \ | 143 | ${sysconfdir}/init.d/avahi-daemon \ |
133 | ${datadir}/avahi/introspection/*.introspect \ | 144 | ${datadir}/dbus-1/interfaces \ |
134 | ${datadir}/avahi/avahi-service.dtd \ | 145 | ${datadir}/avahi/avahi-service.dtd \ |
135 | ${datadir}/avahi/service-types \ | 146 | ${datadir}/avahi/service-types \ |
136 | ${datadir}/dbus-1/system-services" | 147 | ${datadir}/dbus-1/system-services" |
137 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | 148 | FILES:libavahi-client = "${libdir}/libavahi-client.so.*" |
138 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | 149 | FILES:avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ |
139 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ | 150 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ |
140 | ${sysconfdir}/init.d/avahi-dnsconfd" | 151 | ${sysconfdir}/init.d/avahi-dnsconfd" |
141 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | 152 | FILES:libavahi-glib = "${libdir}/libavahi-glib.so.*" |
142 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" | 153 | FILES:libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" |
143 | FILES_avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*" | 154 | FILES:avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*" |
144 | 155 | ||
145 | RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" | 156 | DEV_PKG_DEPENDENCY = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" |
146 | RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" | 157 | DEV_PKG_DEPENDENCY += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" |
147 | RDEPENDS_${PN}-dnsconfd = "${PN}-daemon" | 158 | RDEPENDS:${PN}-dnsconfd = "${PN}-daemon" |
148 | 159 | ||
149 | RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns" | 160 | RRECOMMENDS:avahi-daemon:append:libc-glibc = " libnss-mdns" |
150 | 161 | ||
151 | CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | 162 | CONFFILES:avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" |
152 | 163 | ||
153 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | 164 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" |
154 | USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \ | 165 | USERADD_PARAM:avahi-daemon = "--system --home /run/avahi-daemon \ |
155 | --no-create-home --shell /bin/false \ | 166 | --no-create-home --shell /bin/false \ |
156 | --user-group avahi" | 167 | --user-group avahi" |
157 | 168 | ||
158 | USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \ | 169 | USERADD_PARAM:avahi-autoipd = "--system --home /run/avahi-autoipd \ |
159 | --no-create-home --shell /bin/false \ | 170 | --no-create-home --shell /bin/false \ |
160 | --user-group \ | 171 | --user-group \ |
161 | -c \"Avahi autoip daemon\" \ | 172 | -c \"Avahi autoip daemon\" \ |
162 | avahi-autoipd" | 173 | avahi-autoipd" |
163 | 174 | ||
164 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" | 175 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" |
165 | INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" | 176 | INITSCRIPT_NAME:avahi-daemon = "avahi-daemon" |
166 | INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" | 177 | INITSCRIPT_PARAMS:avahi-daemon = "defaults 21 19" |
167 | INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd" | 178 | INITSCRIPT_NAME:avahi-dnsconfd = "avahi-dnsconfd" |
168 | INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19" | 179 | INITSCRIPT_PARAMS:avahi-dnsconfd = "defaults 22 19" |
169 | 180 | ||
170 | SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd" | 181 | SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd" |
171 | SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service" | 182 | SYSTEMD_SERVICE:${PN}-daemon = "avahi-daemon.service" |
172 | SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service" | 183 | SYSTEMD_SERVICE:${PN}-dnsconfd = "avahi-dnsconfd.service" |
173 | 184 | ||
174 | do_install_append() { | 185 | do_install:append() { |
175 | install -d ${D}${sysconfdir}/udhcpc.d | 186 | install -d ${D}${sysconfdir}/udhcpc.d |
176 | install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d | 187 | install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
177 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d | 188 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
@@ -179,7 +190,7 @@ do_install_append() { | |||
179 | 190 | ||
180 | # At the time the postinst runs, dbus might not be setup so only restart if running | 191 | # At the time the postinst runs, dbus might not be setup so only restart if running |
181 | # Don't exit early, because update-rc.d needs to run subsequently. | 192 | # Don't exit early, because update-rc.d needs to run subsequently. |
182 | pkg_postinst_avahi-daemon () { | 193 | pkg_postinst:avahi-daemon () { |
183 | if [ -z "$D" ]; then | 194 | if [ -z "$D" ]; then |
184 | killall -q -HUP dbus-daemon || true | 195 | killall -q -HUP dbus-daemon || true |
185 | fi | 196 | fi |