fix: avahi remove /run directory
This commit is contained in:
parent
962301fdca
commit
68903e4de8
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
for d in src/*; do
|
|
||||||
echo "migrating ${d}..."
|
|
||||||
mp-migrate "${d}"
|
|
||||||
done
|
|
51
src/avahi/avahi-0.8-ipv6_race_condition_fix-1.patch
Normal file
51
src/avahi/avahi-0.8-ipv6_race_condition_fix-1.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
|
||||||
|
Date: 2020-10-19
|
||||||
|
Initial Package Version: 0.8
|
||||||
|
Upstream Status: PR, not applied
|
||||||
|
Origin: Upstream PR (github.com/lathiat/avahi/pull/309)
|
||||||
|
Description: Fixes a race condition when multiple NICs are in use
|
||||||
|
when IPv6 is enabled. This will exhibit behavior where
|
||||||
|
messages about withdrawing address records, registering
|
||||||
|
access records, and new hostname announcements are
|
||||||
|
spammed to the log every second.
|
||||||
|
|
||||||
|
diff -Naurp avahi-0.8.orig/avahi-core/server.c avahi-0.8/avahi-core/server.c
|
||||||
|
--- avahi-0.8.orig/avahi-core/server.c 2020-02-16 21:41:24.939967558 -0600
|
||||||
|
+++ avahi-0.8/avahi-core/server.c 2020-10-19 11:07:22.054861721 -0500
|
||||||
|
@@ -193,7 +193,7 @@ static void withdraw_rrset(AvahiServer *
|
||||||
|
withdraw_entry(s, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface *i) {
|
||||||
|
+static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface *i, int from_local_iface) {
|
||||||
|
AvahiEntry *e, *n;
|
||||||
|
int ours = 0, won = 0, lost = 0;
|
||||||
|
|
||||||
|
@@ -210,7 +210,7 @@ static void incoming_probe(AvahiServer *
|
||||||
|
if (e->dead)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- if ((cmp = avahi_record_lexicographical_compare(e->record, record)) == 0) {
|
||||||
|
+ if ((cmp = avahi_record_lexicographical_compare(e->record, record)) == 0 || from_local_iface) {
|
||||||
|
ours = 1;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
@@ -639,7 +639,7 @@ static void handle_query_packet(AvahiSer
|
||||||
|
if (!avahi_key_is_pattern(record->key)) {
|
||||||
|
if (!from_local_iface)
|
||||||
|
reflect_probe(s, i, record);
|
||||||
|
- incoming_probe(s, record, i);
|
||||||
|
+ incoming_probe(s, record, i, from_local_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
avahi_record_unref(record);
|
||||||
|
@@ -961,8 +961,7 @@ static void dispatch_packet(AvahiServer
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* We don't want to reflect local traffic, so we check if this packet is generated locally. */
|
||||||
|
- if (s->config.enable_reflector)
|
||||||
|
- from_local_iface = originates_from_local_iface(s, iface, src_address, port);
|
||||||
|
+ from_local_iface = originates_from_local_iface(s, iface, src_address, port);
|
||||||
|
|
||||||
|
if (avahi_dns_packet_check_valid_multicast(p) < 0) {
|
||||||
|
avahi_log_debug("Received invalid packet.");
|
@ -1,27 +1,33 @@
|
|||||||
NAME="avahi"
|
NAME="avahi"
|
||||||
DESC="System which facilitates service discovery on a local network"
|
DESC="System which facilitates service discovery on a local network"
|
||||||
VERSION="0.8"
|
VERSION="0.8"
|
||||||
|
|
||||||
FILES=(
|
FILES=(
|
||||||
"https://github.com/lathiat/avahi/releases/download/v$VERSION/avahi-$VERSION.tar.gz"
|
"https://github.com/lathiat/avahi/releases/download/v${VERSION}/avahi-${VERSION}.tar.gz"
|
||||||
"https://www.linuxfromscratch.org/patches/blfs/12.0/avahi-$VERSION-ipv6_race_condition_fix-1.patch"
|
"avahi-${VERSION}-ipv6_race_condition_fix-1.patch"
|
||||||
)
|
)
|
||||||
HASHES=(
|
HASHES=(
|
||||||
"229c6aa30674fc43c202b22c5f8c2be7"
|
"229c6aa30674fc43c202b22c5f8c2be7"
|
||||||
"218c909581d0ca2c86c8145bb0797050d987a6b0ae3417949dbe2a6d55c49360"
|
"218c909581d0ca2c86c8145bb0797050d987a6b0ae3417949dbe2a6d55c49360"
|
||||||
)
|
)
|
||||||
DEPENDS=("glib" "gtk2" "gtk3" "libdaemon" "libglade" "qt5")
|
|
||||||
|
DEPENDS=(
|
||||||
|
"glib" "gtk3" "libdaemon"
|
||||||
|
"libglade" "qt5" "libcap"
|
||||||
|
)
|
||||||
|
BUILD=("doxygen" "gobject-introspection" "graphviz" "libevent")
|
||||||
|
|
||||||
PACKAGE() {
|
PACKAGE() {
|
||||||
tar xf $NAME-$VERSION.tar.gz
|
tar xf "${NAME}-${VERSION}.tar.gz"
|
||||||
cd $NAME-$VERSION
|
cd "${NAME}-${VERSION}"
|
||||||
|
|
||||||
patch -Np1 -i ../avahi-$VERSION-ipv6_race_condition_fix-1.patch
|
patch -Np1 -i "../avahi-${VERSION}-ipv6_race_condition_fix-1.patch"
|
||||||
sed -i '426a if (events & AVAHI_WATCH_HUP) { \
|
sed -i '426a if (events & AVAHI_WATCH_HUP) { \
|
||||||
client_free(c); \
|
client_free(c); \
|
||||||
return; \
|
return; \
|
||||||
}' avahi-daemon/simple-protocol.c
|
}' avahi-daemon/simple-protocol.c
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
@ -35,7 +41,10 @@ return; \
|
|||||||
--enable-core-docs \
|
--enable-core-docs \
|
||||||
--with-distro=none \
|
--with-distro=none \
|
||||||
--with-dbus-system-address='unix:path=/run/dbus/system_bus_socket'
|
--with-dbus-system-address='unix:path=/run/dbus/system_bus_socket'
|
||||||
make && make DESTDIR="$ROOTDIR" install
|
|
||||||
|
|
||||||
cd .. && rm -r $NAME-$VERSION
|
make
|
||||||
|
make DESTDIR="${ROOTDIR}" install
|
||||||
|
rm -rf "${ROOTDIR}/run" # for some reason install scripts creates an empty /run directory
|
||||||
|
|
||||||
|
cd .. && rm -r "${NAME}-${VERSION}"
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ PACKAGE() {
|
|||||||
cp "${ROOTDIR}/mozconfig" .
|
cp "${ROOTDIR}/mozconfig" .
|
||||||
|
|
||||||
export MOZ_DEBUG_FLAGS=" "
|
export MOZ_DEBUG_FLAGS=" "
|
||||||
export CFLAGS+=" -g0"
|
export CFLAGS+=" -g0 -std=gnu89"
|
||||||
export CXXFLAGS+=" -g0"
|
export CXXFLAGS+=" -g0 -std=gnu89"
|
||||||
export RUSTFLAGS="-Cdebuginfo=0"
|
export RUSTFLAGS="-Cdebuginfo=0"
|
||||||
|
|
||||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none
|
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none
|
||||||
@ -43,7 +43,7 @@ PACKAGE() {
|
|||||||
ulimit -n 4096
|
ulimit -n 4096
|
||||||
|
|
||||||
python3 ./mach configure
|
python3 ./mach configure
|
||||||
python3 ./mach build
|
python3 ./mach build --verbose
|
||||||
DESTDIR="${ROOTDIR}" python3 ./mach install
|
DESTDIR="${ROOTDIR}" python3 ./mach install
|
||||||
|
|
||||||
unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH
|
unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
NAME="nodejs"
|
NAME="nodejs"
|
||||||
DESC="JavaScript runtime built on Chrome's V8 JavaScript engine"
|
DESC="JavaScript runtime built on Chrome's V8 JavaScript engine"
|
||||||
VERSION="18.17.1"
|
VERSION="20.11.1"
|
||||||
FILES=("https://nodejs.org/dist/v$VERSION/node-v$VERSION.tar.xz")
|
|
||||||
HASHES=("cfadecca2649bb74daba89d60fbd02e5")
|
FILES=("https://nodejs.org/dist/v${VERSION}/node-v${VERSION}.tar.xz")
|
||||||
DEPENDS=("which" "c-ares" "icu" "libuv" "nghttp2")
|
HASHES=("3b2fe4d7a4c8dadb58563d822de6c4f4")
|
||||||
|
|
||||||
|
DEPENDS=(
|
||||||
|
"brotli" "c-ares" "icu"
|
||||||
|
"nghttp2" "libuv" "openssl"
|
||||||
|
"zlib"
|
||||||
|
)
|
||||||
|
BUILD=("procps-ng" "python3")
|
||||||
|
|
||||||
PACKAGE() {
|
PACKAGE() {
|
||||||
tar xf node-v$VERSION.tar.xz
|
tar xf "node-v${VERSION}.tar.xz"
|
||||||
cd node-v$VERSION
|
cd "node-v${VERSION}"
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--shared-cares \
|
--shared-cares \
|
||||||
@ -16,8 +23,8 @@ PACKAGE() {
|
|||||||
--shared-nghttp2 \
|
--shared-nghttp2 \
|
||||||
--shared-zlib \
|
--shared-zlib \
|
||||||
--with-intl=system-icu
|
--with-intl=system-icu
|
||||||
make && make DESTDIR="$ROOTDIR" install
|
make && make DESTDIR="${ROOTDIR}" install
|
||||||
ln -sf node "$ROOTDIR/usr/share/doc/node-$VERSION"
|
ln -sf node "${ROOTDIR}/usr/share/doc/node-${VERSION}"
|
||||||
|
|
||||||
cd .. && rm -r node-v$VERSION
|
cd .. && rm -r "node-v${VERSION}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user