summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-06-13 04:34:29 +0000
committerJoonas Niilola <juippis@gentoo.org>2023-06-18 15:08:16 +0300
commitbc9f8762d2f2ff1a64ffec7b02909b31a23baac2 (patch)
treeefa69e1968973032c867711c7fd081ca8587cfb9 /sys-process
parentsys-block/cec: Fix type specifier missing, defaults to int (diff)
downloadgentoo-bc9f8762d2f2ff1a64ffec7b02909b31a23baac2.tar.gz
gentoo-bc9f8762d2f2ff1a64ffec7b02909b31a23baac2.tar.bz2
gentoo-bc9f8762d2f2ff1a64ffec7b02909b31a23baac2.zip
sys-process/daemontools-encore: Fix call to undeclared function sigblock
Closes: https://bugs.gentoo.org/898852 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31409 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/daemontools-encore/daemontools-encore-1.11-r2.ebuild58
-rw-r--r--sys-process/daemontools-encore/files/daemontools-encore-1.11-use-posix-complaint-functions.patch49
2 files changed, 107 insertions, 0 deletions
diff --git a/sys-process/daemontools-encore/daemontools-encore-1.11-r2.ebuild b/sys-process/daemontools-encore/daemontools-encore-1.11-r2.ebuild
new file mode 100644
index 000000000000..611a61497c33
--- /dev/null
+++ b/sys-process/daemontools-encore/daemontools-encore-1.11-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic qmail
+
+DESCRIPTION="Collection of tools for managing UNIX services"
+HOMEPAGE="https://untroubled.org/daemontools-encore/"
+SRC_URI="https://untroubled.org/daemontools-encore/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~x86"
+IUSE="selinux static"
+
+RDEPEND="
+ !app-doc/daemontools-man
+ !sys-process/daemontools
+ selinux? ( sec-policy/selinux-daemontools )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11-do-not-always-run-tests.patch
+ "${FILESDIR}"/${PN}-1.11-add-missing-setuser-man-page.patch
+ "${FILESDIR}"/${PN}-1.11-implicit-func-decl-clang16.patch
+ "${FILESDIR}"/${PN}-1.11-use-posix-complaint-functions.patch
+)
+
+src_compile() {
+ use static && append-ldflags -static
+ qmail_set_cc
+ emake
+}
+
+src_install() {
+ keepdir /service
+
+ echo "${ED}/usr/bin" > conf-bin || die
+ echo "${ED}/usr/share/man" > conf-man || die
+ dodir /usr/bin
+ dodir /usr/share/man
+ emake install
+
+ dodoc ChangeLog CHANGES CHANGES.djb README TODO
+
+ newinitd "${FILESDIR}"/svscan.init-2 svscan
+}
+
+pkg_postinst() {
+ einfo
+ einfo "You can run daemontools using the svscan init.d script,"
+ einfo "or you could run it through inittab."
+ einfo "To use inittab, emerge supervise-scripts and run:"
+ einfo "svscan-add-to-inittab"
+ einfo "Then you can hup init with the command telinit q"
+ einfo
+}
diff --git a/sys-process/daemontools-encore/files/daemontools-encore-1.11-use-posix-complaint-functions.patch b/sys-process/daemontools-encore/files/daemontools-encore-1.11-use-posix-complaint-functions.patch
new file mode 100644
index 000000000000..bc4c12fc366c
--- /dev/null
+++ b/sys-process/daemontools-encore/files/daemontools-encore-1.11-use-posix-complaint-functions.patch
@@ -0,0 +1,49 @@
+https://github.com/bruceg/daemontools-encore/pull/66
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Tue, 13 Jun 2023 04:27:36 +0000
+Subject: [PATCH] sig_block.c: use posix complaint functions on non glibc
+ systems
+
+This build error came while building on musl /w clang-16.
+In contrast to glibc, musl is not having the "legacy" BSD functions and only POSIX sigprocmask.
+
+The exact error was:
+sig_block.c:15:3: error: call to undeclared function 'sigblock'; ISO C99 and later do not
+ support implicit function declarations [-Wimplicit-function-declaration]
+ sigblock(1 << (sig - 1));
+ ^
+sig_block.c:15:3: note: did you mean 'sig_block'?
+sig_block.c:7:6: note: 'sig_block' declared here
+void sig_block(int sig)
+ ^
+1 warning generated.
+sig_block.c:27:3: error: call to undeclared function 'sigsetmask'; ISO C99 and later do not
+ support implicit function declarations [-Wimplicit-function-declaration]
+ sigsetmask(sigsetmask(~0) & ~(1 << (sig - 1)));
+ ^
+sig_block.c:38:3: error: call to undeclared function 'sigsetmask'; ISO C99 and later do not
+ support implicit function declarations [-Wimplicit-function-declaration]
+ sigsetmask(0);
+ ^
+
+This patch should fix the error
+
+Bug: https://bugs.gentoo.org/898852
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/sig_block.c
++++ b/sig_block.c
+@@ -4,6 +4,11 @@
+ #include "sig.h"
+ #include "hassgprm.h"
+
++// Use POSIX complaint functions when using non-Glibc system
++#ifndef __GLIBC__
++#define HASSIGPROCMASK 0
++#endif
++
+ void sig_block(int sig)
+ {
+ #ifdef HASSIGPROCMASK
+--
+2.41.0
+