libsemanage: remove Blackfin patch
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 5 Apr 2018 19:50:33 +0000 (21:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 15 Apr 2018 20:05:41 +0000 (22:05 +0200)
And renumber the remaining patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libsemanage/0001-libsemanage-build-follow-standard-semantics-for-DESTD.patch [new file with mode: 0644]
package/libsemanage/0001-workaround-blackfin-issue.patch [deleted file]
package/libsemanage/0002-libsemanage-build-follow-standard-semantics-for-DESTD.patch [deleted file]

diff --git a/package/libsemanage/0001-libsemanage-build-follow-standard-semantics-for-DESTD.patch b/package/libsemanage/0001-libsemanage-build-follow-standard-semantics-for-DESTD.patch
new file mode 100644 (file)
index 0000000..47ac6bd
--- /dev/null
@@ -0,0 +1,118 @@
+libsemanage: build: follow standard semantics for DESTDIR and PREFIX
+
+This patch solves the following issues:
+- DESTDIR is needed during compile time to compute library and header paths which it should not.
+- Installing with both DESTDIR and PREFIX set gives us odd paths
+- Make usage of DESTDIR and PREFIX more standard
+
+Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
+
+diff -durN libsemanage.orig/include/Makefile libsemanage/include/Makefile
+--- libsemanage.orig/include/Makefile  2018-01-12 12:42:30.915376458 +0100
++++ libsemanage/include/Makefile       2018-01-12 10:04:18.632144240 +0100
+@@ -1,6 +1,6 @@
+ # Installation directories.
+-PREFIX ?= $(DESTDIR)/usr
+-INCDIR ?= $(PREFIX)/include/semanage
++PREFIX ?= /usr
++INCDIR ?= $(DESTDIR)$(PREFIX)/include/semanage
+ all:
+diff -durN libsemanage.orig/man/Makefile libsemanage/man/Makefile
+--- libsemanage.orig/man/Makefile      2018-01-12 12:42:30.915376458 +0100
++++ libsemanage/man/Makefile   2018-01-12 10:04:18.632144240 +0100
+@@ -1,6 +1,7 @@
+ # Installation directories.
+-MAN3DIR ?= $(DESTDIR)/usr/share/man/man3
+-MAN5DIR ?= $(DESTDIR)/usr/share/man/man5
++PREFIX ?= /usr
++MAN3DIR ?= $(DESTDIR)$(PREFIX)/share/man/man3
++MAN5DIR ?= $(DESTDIR)$(PREFIX)/share/man/man5
+ all:
+diff -durN libsemanage.orig/src/libsemanage.pc.in libsemanage/src/libsemanage.pc.in
+--- libsemanage.orig/src/libsemanage.pc.in     2018-01-12 12:42:30.918709792 +0100
++++ libsemanage/src/libsemanage.pc.in  2018-01-12 10:04:18.632144240 +0100
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/@libdir@
++libdir=@libdir@
+ includedir=@includedir@
+ Name: libsemanage
+diff -durN libsemanage.orig/src/Makefile libsemanage/src/Makefile
+--- libsemanage.orig/src/Makefile      2018-01-12 12:42:30.918709792 +0100
++++ libsemanage/src/Makefile   2018-01-12 10:04:18.632144240 +0100
+@@ -8,10 +8,10 @@
+ PKG_CONFIG ?= pkg-config
+ # Installation directories.
+-PREFIX ?= $(DESTDIR)/usr
++PREFIX ?= /usr
+ LIBDIR ?= $(PREFIX)/lib
+-SHLIBDIR ?= $(DESTDIR)/lib
+ INCLUDEDIR ?= $(PREFIX)/include
++LIBINSTALL = $(DESTDIR)$(LIBDIR)
+ PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
+ PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
+ PYSITEDIR ?= $(DESTDIR)$(shell $(PYTHON) -c 'import site; print(site.getsitepackages()[0])')
+@@ -20,8 +20,6 @@
+ RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
+ RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
+-LIBBASE=$(shell basename $(LIBDIR))
+-
+ DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf
+ ifeq ($(DEBUG),1)
+@@ -95,7 +93,7 @@
+       ln -sf $@ $(TARGET)
+ $(LIBPC): $(LIBPC).in ../VERSION
+-      sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
++      sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
+ semanageswig_python_exception.i: ../include/semanage/semanage.h
+       bash -e exception.sh > $@ || (rm -f $@ ; false)
+@@ -136,13 +134,13 @@
+       $(SWIG) $<
+ install: all 
+-      test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
+-      install -m 644 $(LIBA) $(LIBDIR)
+-      install -m 755 $(LIBSO) $(LIBDIR)
+-      test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
+-      install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
++      test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
++      install -m 644 $(LIBA) $(LIBINSTALL)
++      install -m 755 $(LIBSO) $(LIBINSTALL)
++      test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
++      install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
+       test -f $(DEFAULT_SEMANAGE_CONF_LOCATION) || install -m 644 -D semanage.conf $(DEFAULT_SEMANAGE_CONF_LOCATION)
+-      cd $(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
++      cd $(LIBINSTALL) && ln -sf $(LIBSO) $(TARGET)
+ install-pywrap: pywrap 
+       test -d $(PYSITEDIR) || install -m 755 -d $(PYSITEDIR)
+@@ -155,7 +153,7 @@
+       install -m 755 $(SWIGRUBYSO) $(RUBYINSTALL)/semanage.so
+ relabel:
+-      /sbin/restorecon $(LIBDIR)/$(LIBSO)
++      /sbin/restorecon $(LIBINSTALL)/$(LIBSO)
+ clean: 
+       -rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(SWIGRUBYSO) $(TARGET) conf-parse.c conf-parse.h conf-scan.c *.o *.lo *~
+diff -durN libsemanage.orig/tests/Makefile libsemanage/tests/Makefile
+--- libsemanage.orig/tests/Makefile    2018-01-12 12:42:30.922043125 +0100
++++ libsemanage/tests/Makefile 2018-01-12 10:04:18.632144240 +0100
+@@ -1,6 +1,3 @@
+-PREFIX ?= $(DESTDIR)/usr
+-LIBDIR ?= $(PREFIX)/lib
+-
+ # Add your test source files here:
+ SOURCES = $(sort $(wildcard *.c))
diff --git a/package/libsemanage/0001-workaround-blackfin-issue.patch b/package/libsemanage/0001-workaround-blackfin-issue.patch
deleted file mode 100644 (file)
index 7ce9606..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Do not make symbols hidden on Blackfin
-
-The libselinux logic to hide internal symbols from the DSO doesn't
-work properly on Blackfin due to the USER_LABEL_PREFIX not being
-handled properly. A real fix is not that simple, so this patch simply
-disables the internal symbol hiding mechanism. This means that those
-symbols are visible in the final DSO, which is not a problem for
-proper execution, it just isn't as clean.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Adam Duskett <Aduskett@gmail.com>
-
-Index: b/src/dso.h
-===================================================================
---- a/src/dso.h
-+++ b/src/dso.h
-@@ -1,7 +1,7 @@
- #ifndef _SEPOL_DSO_H
- #define _SEPOL_DSO_H  1
--#ifdef SHARED
-+#if defined(SHARED) && !defined(__bfin__)
- # define hidden __attribute__ ((visibility ("hidden")))
- # define hidden_proto(fct) __hidden_proto (fct, fct##_internal)
- # define __hidden_proto(fct, internal)        \
diff --git a/package/libsemanage/0002-libsemanage-build-follow-standard-semantics-for-DESTD.patch b/package/libsemanage/0002-libsemanage-build-follow-standard-semantics-for-DESTD.patch
deleted file mode 100644 (file)
index 47ac6bd..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-libsemanage: build: follow standard semantics for DESTDIR and PREFIX
-
-This patch solves the following issues:
-- DESTDIR is needed during compile time to compute library and header paths which it should not.
-- Installing with both DESTDIR and PREFIX set gives us odd paths
-- Make usage of DESTDIR and PREFIX more standard
-
-Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
-
-diff -durN libsemanage.orig/include/Makefile libsemanage/include/Makefile
---- libsemanage.orig/include/Makefile  2018-01-12 12:42:30.915376458 +0100
-+++ libsemanage/include/Makefile       2018-01-12 10:04:18.632144240 +0100
-@@ -1,6 +1,6 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--INCDIR ?= $(PREFIX)/include/semanage
-+PREFIX ?= /usr
-+INCDIR ?= $(DESTDIR)$(PREFIX)/include/semanage
- all:
-diff -durN libsemanage.orig/man/Makefile libsemanage/man/Makefile
---- libsemanage.orig/man/Makefile      2018-01-12 12:42:30.915376458 +0100
-+++ libsemanage/man/Makefile   2018-01-12 10:04:18.632144240 +0100
-@@ -1,6 +1,7 @@
- # Installation directories.
--MAN3DIR ?= $(DESTDIR)/usr/share/man/man3
--MAN5DIR ?= $(DESTDIR)/usr/share/man/man5
-+PREFIX ?= /usr
-+MAN3DIR ?= $(DESTDIR)$(PREFIX)/share/man/man3
-+MAN5DIR ?= $(DESTDIR)$(PREFIX)/share/man/man5
- all:
-diff -durN libsemanage.orig/src/libsemanage.pc.in libsemanage/src/libsemanage.pc.in
---- libsemanage.orig/src/libsemanage.pc.in     2018-01-12 12:42:30.918709792 +0100
-+++ libsemanage/src/libsemanage.pc.in  2018-01-12 10:04:18.632144240 +0100
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- exec_prefix=${prefix}
--libdir=${exec_prefix}/@libdir@
-+libdir=@libdir@
- includedir=@includedir@
- Name: libsemanage
-diff -durN libsemanage.orig/src/Makefile libsemanage/src/Makefile
---- libsemanage.orig/src/Makefile      2018-01-12 12:42:30.918709792 +0100
-+++ libsemanage/src/Makefile   2018-01-12 10:04:18.632144240 +0100
-@@ -8,10 +8,10 @@
- PKG_CONFIG ?= pkg-config
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
-+PREFIX ?= /usr
- LIBDIR ?= $(PREFIX)/lib
--SHLIBDIR ?= $(DESTDIR)/lib
- INCLUDEDIR ?= $(PREFIX)/include
-+LIBINSTALL = $(DESTDIR)$(LIBDIR)
- PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
- PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
- PYSITEDIR ?= $(DESTDIR)$(shell $(PYTHON) -c 'import site; print(site.getsitepackages()[0])')
-@@ -20,8 +20,6 @@
- RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
- RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
--LIBBASE=$(shell basename $(LIBDIR))
--
- DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf
- ifeq ($(DEBUG),1)
-@@ -95,7 +93,7 @@
-       ln -sf $@ $(TARGET)
- $(LIBPC): $(LIBPC).in ../VERSION
--      sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
-+      sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
- semanageswig_python_exception.i: ../include/semanage/semanage.h
-       bash -e exception.sh > $@ || (rm -f $@ ; false)
-@@ -136,13 +134,13 @@
-       $(SWIG) $<
- install: all 
--      test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
--      install -m 644 $(LIBA) $(LIBDIR)
--      install -m 755 $(LIBSO) $(LIBDIR)
--      test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
--      install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
-+      test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
-+      install -m 644 $(LIBA) $(LIBINSTALL)
-+      install -m 755 $(LIBSO) $(LIBINSTALL)
-+      test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
-+      install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
-       test -f $(DEFAULT_SEMANAGE_CONF_LOCATION) || install -m 644 -D semanage.conf $(DEFAULT_SEMANAGE_CONF_LOCATION)
--      cd $(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
-+      cd $(LIBINSTALL) && ln -sf $(LIBSO) $(TARGET)
- install-pywrap: pywrap 
-       test -d $(PYSITEDIR) || install -m 755 -d $(PYSITEDIR)
-@@ -155,7 +153,7 @@
-       install -m 755 $(SWIGRUBYSO) $(RUBYINSTALL)/semanage.so
- relabel:
--      /sbin/restorecon $(LIBDIR)/$(LIBSO)
-+      /sbin/restorecon $(LIBINSTALL)/$(LIBSO)
- clean: 
-       -rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(SWIGRUBYSO) $(TARGET) conf-parse.c conf-parse.h conf-scan.c *.o *.lo *~
-diff -durN libsemanage.orig/tests/Makefile libsemanage/tests/Makefile
---- libsemanage.orig/tests/Makefile    2018-01-12 12:42:30.922043125 +0100
-+++ libsemanage/tests/Makefile 2018-01-12 10:04:18.632144240 +0100
-@@ -1,6 +1,3 @@
--PREFIX ?= $(DESTDIR)/usr
--LIBDIR ?= $(PREFIX)/lib
--
- # Add your test source files here:
- SOURCES = $(sort $(wildcard *.c))