From 371e36aa6da5c54c051b516a19df2918093148bc Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Tue, 8 Mar 2022 02:57:59 -0500 Subject: [PATCH] autofs: add log service, fix patch --- srcpkgs/autofs/files/autofs/log/run | 2 ++ srcpkgs/autofs/files/autofs/run | 1 + srcpkgs/autofs/patches/musl.patch | 22 +++++++++++----------- srcpkgs/autofs/template | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 srcpkgs/autofs/files/autofs/log/run diff --git a/srcpkgs/autofs/files/autofs/log/run b/srcpkgs/autofs/files/autofs/log/run new file mode 100644 index 000000000000..a2abfe61e846 --- /dev/null +++ b/srcpkgs/autofs/files/autofs/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec vlogger -p daemon.info -t autofs diff --git a/srcpkgs/autofs/files/autofs/run b/srcpkgs/autofs/files/autofs/run index 14ee8daad0c8..6da6f9c3d404 100644 --- a/srcpkgs/autofs/files/autofs/run +++ b/srcpkgs/autofs/files/autofs/run @@ -1,2 +1,3 @@ #!/bin/sh +exec 2>&1 exec automount -f diff --git a/srcpkgs/autofs/patches/musl.patch b/srcpkgs/autofs/patches/musl.patch index 5cd45dd184ab..f81228ad740a 100644 --- a/srcpkgs/autofs/patches/musl.patch +++ b/srcpkgs/autofs/patches/musl.patch @@ -30,18 +30,18 @@ #include --- a/lib/log.c.orig 2019-03-30 10:49:52.965336128 +0100 +++ b/lib/log.c 2019-03-30 10:50:43.232710045 +0100 -@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons - char buffer[ATTEMPT_ID_SIZE + 1]; - char *prefixed_msg = NULL; +@@ -38,7 +38,11 @@ + char buffer[ATTEMPT_ID_SIZE + 1]; + char *prefixed_msg = NULL; -- attempt_id = pthread_getspecific(key_thread_attempt_id); -+ if (key_thread_attempt_id) { -+ attempt_id = pthread_getspecific(key_thread_attempt_id); -+ } else { -+ attempt_id = 0; -+ } - if (attempt_id) { - int len = sizeof(buffer) + 1 + strlen(msg) + 1; +- attempt_id = pthread_getspecific(key_thread_attempt_id); ++ if (key_thread_attempt_id) { ++ attempt_id = pthread_getspecific(key_thread_attempt_id); ++ } else { ++ attempt_id = 0; ++ } + if (attempt_id) { + int len = sizeof(buffer) + 1 + strlen(msg) + 1; --- a/include/hash.h 2021-01-31 09:22:19.668222263 +0100 +++ b/include/hash.h 2021-01-31 09:22:41.390327622 +0100 diff --git a/srcpkgs/autofs/template b/srcpkgs/autofs/template index 6ec782cccbb9..a9abc60e64e8 100644 --- a/srcpkgs/autofs/template +++ b/srcpkgs/autofs/template @@ -1,7 +1,7 @@ # Template file for 'autofs' pkgname=autofs version=5.1.8 -revision=1 +revision=2 build_style=gnu-configure make_build_args="DONTSTRIP=1" configure_args="--with-libtirpc --with-mapdir=/etc/autofs --sbindir=/usr/bin"