summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-libs/libnih/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-libs/libnih/files')
-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
3 files changed, 156 insertions, 0 deletions
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
++++ nih/Makefile.am 2011-10-19 17:09:35 +0000
+@@ -71,7 +71,7 @@
+ test_hash.h
+
+
+-pkgconfigdir = $(prefix)/lib/pkgconfig
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libnih.pc
+
+
+
+# Begin bundle
+IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWerAspcAAhZfgAAQVGf/93Mi
+DAC/7//wUASW8VttRtyKRaUhJU00ZTUab1GBT9JpNNqeiAADEEpDUwp5Gk9KeiZAANAAABIo0hE9
+GTTJJ5AMo8oB6IwmmMNDQAAAaAAAAAEkgQBGTCGmmoZQPSIxoCJYV1m4Z59VmltTEiVlNBLfEBWL
+DPUvZdcke3iHe+YuVhuGNtnl+0Xxmwcuy+RkTlRw9Ct83uYaZ7PH3vOd/AqYc6mhoKnwOCJD7ej5
+jS/rj7FmeOwxohzIMw9Ftarf11sHFhfFyWQEWL15gMctp9IL8d5sOYp0YoMOIw5htiy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OKQ1mHIp8NQLYDAhQjJPmRA4hvGfSG+
+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;
+ }
+
+
+