summaryrefslogtreecommitdiff
path: root/sys-libs/libnih
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-libs/libnih
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-libs/libnih')
-rw-r--r--sys-libs/libnih/Manifest8
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch40
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch56
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-signal-race.patch60
-rw-r--r--sys-libs/libnih/libnih-1.0.3-r3.ebuild49
-rw-r--r--sys-libs/libnih/metadata.xml11
6 files changed, 224 insertions, 0 deletions
diff --git a/sys-libs/libnih/Manifest b/sys-libs/libnih/Manifest
new file mode 100644
index 000000000000..3294fcead719
--- /dev/null
+++ b/sys-libs/libnih/Manifest
@@ -0,0 +1,8 @@
+AUX libnih-1.0.3-optional-dbus.patch 1162 SHA256 93e81914a402ebc512c7df46e00f85b54ed073a66fcf9fe465cb58d757546abf SHA512 bd979f8e9d27d775e12b3a93082084b8837bc9eb4f48476c3356aa4b4f865eda517e6fcf90f5575686dbcdc0fef4a21c640e413d9d3611bb1f1077bfa9fd8c86 WHIRLPOOL 2eb2421f74c9ced344791ab3477035b5e71516962ebfc886f4a21837977854092aec28e68ba81345305f06ee00cf8e466bb5d3863c75d0291c0a9992aba17a6a
+AUX libnih-1.0.3-pkg-config.patch 2491 SHA256 cefe32c74c2c23f991e78bb8eaf97da8bcd1b4f252c1aed334e75027568f24d7 SHA512 b99d580f4487cf3d25fa37f3f7b62ce32d9df80c6c0b01ad04b6850215ec0cc24cfea48aaf8ff89afe28db239b5ed212f139e86353d9991152d488c6edce5017 WHIRLPOOL e6a6f4c2d88e4e2da3cbdba8f4b2a43f608ba7e0042f63c6b881653d23a51527d2061bea56924bb624bee5751bea69f4bdc4a206aa32ad62abcf29ea3c6999bc
+AUX libnih-1.0.3-signal-race.patch 2081 SHA256 e7c67f06c0812cabf4f2af05f8d66ecd8819278416f29e7dd6122d9091b6368e SHA512 5367cb0c6382004cc2a829b9b71f0c02a09e4983940afac90c4c5c0bfbda53fb36a6cc7e38ede7a895ce28f99a4f69e89392ebaadefdc536eb7efa90c2426ff8 WHIRLPOOL 2435627ed636ffff2e45b5a2708999a20b88525f438f3382a9acaa08c1ca4b81a7b4d926a6b7930add8c5b692f5790b52af8145cd8a0f8cac8b7f069a7ef4046
+DIST libnih-1.0.3.tar.gz 1187624 SHA256 897572df7565c0a90a81532671e23c63f99b4efde2eecbbf11e7857fbc61f405 SHA512 fce40d2445b28c27b8838631681ca3206a4f053b2dd4fc488fc9ef98bbd3d933e3d62b82cf346be2ef1677f6457f692cf5544cd915a6bb1e5c618f98ffa101b4 WHIRLPOOL da001ba05111d3a654e6800cf283e11b5508e53d6d91b37ed277df5a889a1138e90ae13161e0af81bdcac929b105bf889e4dcdc443789f28417c6e3f61530d8c
+EBUILD libnih-1.0.3-r3.ebuild 1483 SHA256 95c11d6f8d8ed90d225143744082ba4a85c74b26a75346dcb4d893c5fb14ee19 SHA512 e4986f22dd8460c14604cc3d7caba029ba8cb17d38593c5bc4f044613ccd1590b1cafab8c7593c8e3efb96b17597bcb3437b3993d7abb5296c131bdddbb20fba WHIRLPOOL c02c7f140db5a4d28406ed584bc740cba1ff6e7e4133057f312e373800b673b0078c400b9d433246906bab85b381ab00594df81d40a5419180cbe0e8fa0c8610
+MISC ChangeLog 4544 SHA256 e878c4735432e6e2c98c006b610bed9f2bb678b1657a0cdfbf064c52df9315ac SHA512 cec37c31c9f56f0fab6aa6b6272ee7b3df1b7e93e02cb0d7c77df09e0b6b679e8dad9b53f1d9988dafa3eb79d6dd8b2084ba05843fd22acc8773805444fe6abe WHIRLPOOL 4fe869f3982e66b81adb65385370dd0091d74421609222b74934949a7083e404667c10d65be378674b1ec4e63b3a228883e6b94b557c431d65af07a6cf8b50ec
+MISC ChangeLog-2015 1319 SHA256 8a3331765ca6aa2bf6f762377b07f96cd81bd6191d7be48d013afe62992fd9f0 SHA512 688f83b3d22960c4048fbd834b052f4f2975dd71745b24df1ca9f82999bb90cea7eb7d4cab1b7824d9d4659c8057660bd5555efd70359154b3240a49dc4ac57f WHIRLPOOL af96b664b92ad80649247f9751822e5f0869e77f419697129420bcce4e87755eb2f41310f43070c82679d44ca3199edd07414363c23d908e24465949a9f8f66d
+MISC metadata.xml 357 SHA256 b2b2590a099343e5a92652941311b719c648b1dd33325e9d19d3298e5a213bf7 SHA512 c9748a867960a45077282ebfbb48051e3995bee6648f14547ac5385b8baddcd36f927bfd94dfcd1656342de935ee97a2f376e687470720ea761e035c7c5feddd WHIRLPOOL d4e69e09195bbca0713c2c13c5d107560d0854ec1f6d545a84b529e518ec20e76ec89d25b6b3d33cb2f5bd32ac2ecf36fe89074408d39567a4ddc3fca4800c31
diff --git a/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch b/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch
new file mode 100644
index 000000000000..afe43749b6b0
--- /dev/null
+++ b/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch
@@ -0,0 +1,40 @@
+--- libnih-1.0.1/configure.ac
++++ libnih-1.0.1/configure.ac
+@@ -23,12 +23,21 @@
+ PKG_PROG_PKG_CONFIG([0.22])
+
+ # Checks for libraries.
+-PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
+-AC_CHECK_LIB([expat], [XML_ParserCreate],
++AC_ARG_WITH([dbus],
++ [AS_HELP_STRING([--without-dbus],
++ [disable support for dbus])],
++ [],
++ [with_dbus=yes])
++
++AS_IF([test "x$with_dbus" != xno],[
++ PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
++ AC_CHECK_LIB([expat], [XML_ParserCreate],
+ [AC_CHECK_LIB([expat], [XML_StopParser],
+ [AC_SUBST([EXPAT_LIBS], [-lexpat])],
+ [AC_MSG_ERROR([expat >= 2.0.0 required])])],
+- [AC_MSG_ERROR([expat library not found])])
++ [AC_MSG_ERROR([expat library not found])])])
++
++AM_CONDITIONAL([DBUS_SUPPORT], [test "x$with_dbus" != xno])
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([valgrind/valgrind.h])
+--- libnih-1.0.1.orig/Makefile.am
++++ libnih-1.0.1/Makefile.am
+@@ -1,6 +1,9 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = m4 intl nih nih-dbus nih-dbus-tool po
++SUBDIRS = m4 intl nih po
++if DBUS_SUPPORT
++SUBDIRS += nih-dbus nih-dbus-tool
++endif
+
+ EXTRA_DIST = HACKING
+
diff --git a/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch b/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch
new file mode 100644
index 000000000000..979e363f2157
--- /dev/null
+++ b/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch
@@ -0,0 +1,56 @@
+# Bazaar merge directive format 2 (Bazaar 0.90)
+# revision_id: vapier@gentoo.org-20111019170935-fheqs03szv6mhh3o
+# target_branch: http://bazaar.launchpad.net/~scott/libnih/trunk/
+# testament_sha1: 84b368e08fdd9f8276611cdfe97d34f51cd90598
+# timestamp: 2011-10-19 13:13:52 -0400
+# base_revision_id: scott@netsplit.com-20110901184103-d2xbvc5hbt0vqxf0
+#
+# Begin patch
+=== modified file 'nih-dbus/Makefile.am'
+--- nih-dbus/Makefile.am 2009-11-21 21:44:23 +0000
++++ nih-dbus/Makefile.am 2011-10-19 17:09:35 +0000
+@@ -49,7 +49,7 @@
+ test_dbus.h
+
+
+-pkgconfigdir = $(prefix)/lib/pkgconfig
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libnih-dbus.pc
+
+
+
+=== modified file 'nih/Makefile.am'
+--- nih/Makefile.am 2009-11-21 21:44:23 +0000
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wgnc03YlpZF9eBKQsUJi4gRvOhwmO
+XzuHW8qzc+JojHueBjZGJRiZQktKmJFoSD3k4+SOEue4uOh88jC0uRC8zDtbDCuz1fd6m5nsBrXh
+4KCGR5mWo4953Ie6CdWVops43mZdcboGGpUVirZZC+SPwwvwVSDuTAzASyFMevBBdbmdy3y0L0Y2
+oqRD3LY5+RqPM9R4/XEkdVuXmAxvF7GgrzRSIuDsTD2MANhmBxuF+EEbTKN/ciAzAUxnOdie1hol
+lqAkHxA44ja0WMKzYlmGU28kSdqB1i6h4nLevOVCnK+WtEKLpuOy6eZFThX5IsRrjenja/BSN2iu
+FFE+cHoYwJzGRI9yFKvpRUQ+H0qqaIoI5lP18lEqsPiBhRHMkpPIHqMuoiGiZyQxSXC0ynqSTYNX
+80VoGbTVLspApI9vo8XZBOScj6oHLR6qkjlnhkwwNQ8/wZdSfNBI0NSKLNasgKl6LF7FVbx4MCcj
+jYREWWzVEEVd81rloiAfu+h8H33/8DPhciqmx3QHdcdLEOKQ1mHIp8NQLYDAhQjJPmRA4hvGfSG+
+dwTBj1rKUFKGB7BYiKJ+C3dZ91NewHQ8kxHGlS0rSLioLvwrlwNSrRgtyZzWVFTWB8C7kinChIdW
+BZS4
diff --git a/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch b/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch
new file mode 100644
index 000000000000..4cba5ae4ded3
--- /dev/null
+++ b/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch
@@ -0,0 +1,60 @@
+https://bugs.launchpad.net/libnih/+bug/518921
+
+fix race in signal processing leading to lost signals
+
+The current loop will walk all signals one by one and run the handler
+for it if any signals were pending. Then it clears the array. But if
+a signal comes in for an earlier checked signal, it will get clobbered
+when the final clear runs.
+
+Change the logic so that we only clear entries for signals whose handler
+we explicitly call. If a different signal comes in, we'll process it
+the next time around.
+
+This was discovered & triaged by Jeffy Chen from Rockchip.
+
+=== modified file 'nih/signal.c'
+--- nih/signal.c 2009-06-23 09:29:37 +0000
++++ nih/signal.c 2015-05-21 08:12:11 +0000
+@@ -337,17 +337,37 @@
+
+ nih_signal_init ();
+
++ /* Since this poller runs w/out signals masked, we do not want to try
++ * and clear any other signals (like zeroing the caught array at the
++ * end). If we do that, we open a race:
++ * - Walk the list of signals.
++ * - First one is not set so we move on to the second one.
++ * - First signal comes in while processing second and increments the
++ * caught array entry.
++ * - Finish walking the whole list.
++ * - Zero out the whole list and thus throw away the first signal.
++ * Since the signal handlers can take any length of time, this race
++ * can be open for a variable amount of time.
++ */
++
+ NIH_LIST_FOREACH_SAFE (nih_signals, iter) {
+ NihSignal *signal = (NihSignal *)iter;
+
+ if (! signals_caught[signal->signum])
+ continue;
+
++ /* Now that we know we're going to process this signal, clear
++ * out all pending counts for it. There is a slight race here
++ * where the same signal can come in, but the API has never
++ * guaranteed exact coverage since POSIX does not provide it --
++ * more than one signal can be collapsed into one event. All
++ * we can guarantee is that we'll notice signals that come in
++ * once the handler runs.
++ */
++ signals_caught[signal->signum] = 0;
++
+ signal->handler (signal->data, signal);
+ }
+-
+- for (s = 0; s < NUM_SIGNALS; s++)
+- signals_caught[s] = 0;
+ }
+
+
+
diff --git a/sys-libs/libnih/libnih-1.0.3-r3.ebuild b/sys-libs/libnih/libnih-1.0.3-r3.ebuild
new file mode 100644
index 000000000000..5d3f7fd41060
--- /dev/null
+++ b/sys-libs/libnih/libnih-1.0.3-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit versionator eutils autotools toolchain-funcs multilib flag-o-matic
+
+DESCRIPTION="Light-weight 'standard library' of C functions"
+HOMEPAGE="https://launchpad.net/libnih"
+SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="+dbus nls static-libs +threads"
+
+# The configure phase will check for valgrind headers, and the tests will use
+# that header, but only to do dynamic valgrind detection. The tests aren't
+# run directly through valgrind, only by developers directly. So don't bother
+# depending on valgrind here. #559830
+RDEPEND="dbus? ( dev-libs/expat >=sys-apps/dbus-1.2.16 )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.3-optional-dbus.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-pkg-config.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-signal-race.patch
+ eautoreconf
+}
+
+src_configure() {
+ append-lfs-flags
+ econf \
+ $(use_with dbus) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_enable threads) \
+ $(use_enable threads threading)
+}
+
+src_install() {
+ default
+
+ # we need to be in / because upstart needs libnih
+ gen_usr_ldscript -a nih $(use dbus && echo nih-dbus)
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.la
+}
diff --git a/sys-libs/libnih/metadata.xml b/sys-libs/libnih/metadata.xml
new file mode 100644
index 000000000000..a889a8646dfc
--- /dev/null
+++ b/sys-libs/libnih/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vapier@gentoo.org</email>
+ <description>feel free to update however you like</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">libnih</remote-id>
+ </upstream>
+</pkgmetadata>