From: Thomas Petazzoni Date: Thu, 5 Apr 2018 19:50:34 +0000 (+0200) Subject: libsepol: remove Blackfin patch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31e5b10ea895eb1260388833dbfec7dd549996c2;p=buildroot.git libsepol: remove Blackfin patch And renumber remaining patches. Signed-off-by: Thomas Petazzoni --- diff --git a/package/libsepol/0002-support-static-only.patch b/package/libsepol/0002-support-static-only.patch new file mode 100644 index 0000000000..8cf9a180ff --- /dev/null +++ b/package/libsepol/0002-support-static-only.patch @@ -0,0 +1,45 @@ +From 2140db697c7f1da2a0a3f7bbcb14c1a0dade84e5 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Mon, 9 Oct 2017 16:28:12 -0400 +Subject: [PATCH] Add support for static-only build + +Instead of unconditionally building shared libraries, this patch +improves the libsepol build system with a "STATIC" variable, which +when defined to some non-empty value, will disable the build of shared +libraries. It allows to support cases where the target architecture +does not have support for shared libraries. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Adam Duskett +--- + src/Makefile | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile +--- libsepol-2.7.orig/src/Makefile 2018-01-15 21:07:51.285183415 +0100 ++++ libsepol-2.7/src/Makefile 2018-01-15 21:08:56.515182717 +0100 +@@ -39,7 +39,12 @@ + LN=gln + endif + +-all: $(LIBA) $(LIBSO) $(LIBPC) ++ALL_TARGETS = $(LIBA) $(LIBPC) ++ifeq ($(STATIC),) ++ALL_TARGETS += $(LIBSO) ++endif ++ ++all: $(ALL_TARGETS) + + + $(LIBA): $(OBJS) +@@ -81,8 +86,10 @@ + install: all + test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL) + install -m 644 $(LIBA) $(LIBINSTALL) ++ifeq ($(STATIC),) + test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL) + install -m 755 $(LIBSO) $(LIBINSTALL) ++endif + test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig + install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig + $(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET) diff --git a/package/libsepol/0002-workaround-blackfin-issue.patch b/package/libsepol/0002-workaround-blackfin-issue.patch deleted file mode 100644 index 3c3bd4827f..0000000000 --- a/package/libsepol/0002-workaround-blackfin-issue.patch +++ /dev/null @@ -1,26 +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 -Signed-off-by: Adam Duskett - -Index: b/src/dso.h -=================================================================== ---- a/src/dso.h -+++ b/src/dso.h -@@ -5,7 +5,7 @@ - #define DISABLE_SYMVER 1 - #endif - --#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/libsepol/0003-revert-ln-relative.patch b/package/libsepol/0003-revert-ln-relative.patch new file mode 100644 index 0000000000..9d1553ed97 --- /dev/null +++ b/package/libsepol/0003-revert-ln-relative.patch @@ -0,0 +1,27 @@ +From 16b2b0e21e10727065042a1baabd1a887757c65c Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Mon, 9 Oct 2017 16:29:36 -0400 +Subject: [PATCH] Makefile: revert libsepol: use ln --relative to create .so symlinks + +This reverts 71393a181d63c9baae5fe8dcaeb9411d1f253998 + +ln --relative is too recent to be available in all distributions, +especially enterprise-grade distros that can stick around as long as +they are maintained (up to 10 years in some cases?). + +For the sake of Buildroot, revert the upstream patch. + +Signed-off-by: "Yann E. MORIN" + +diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile +--- libsepol-2.7.orig/src/Makefile 2018-01-15 21:37:12.821831315 +0100 ++++ libsepol-2.7/src/Makefile 2018-01-15 21:38:03.838497434 +0100 +@@ -92,7 +92,7 @@ + endif + test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig + install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig +- $(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET) ++ cd $(LIBINSTALL) && ln -sf $(LIBSO) $(TARGET) + + relabel: + /sbin/restorecon $(LIBINSTALL)/$(LIBSO) diff --git a/package/libsepol/0003-support-static-only.patch b/package/libsepol/0003-support-static-only.patch deleted file mode 100644 index 8cf9a180ff..0000000000 --- a/package/libsepol/0003-support-static-only.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2140db697c7f1da2a0a3f7bbcb14c1a0dade84e5 Mon Sep 17 00:00:00 2001 -From: Adam Duskett -Date: Mon, 9 Oct 2017 16:28:12 -0400 -Subject: [PATCH] Add support for static-only build - -Instead of unconditionally building shared libraries, this patch -improves the libsepol build system with a "STATIC" variable, which -when defined to some non-empty value, will disable the build of shared -libraries. It allows to support cases where the target architecture -does not have support for shared libraries. - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Adam Duskett ---- - src/Makefile | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile ---- libsepol-2.7.orig/src/Makefile 2018-01-15 21:07:51.285183415 +0100 -+++ libsepol-2.7/src/Makefile 2018-01-15 21:08:56.515182717 +0100 -@@ -39,7 +39,12 @@ - LN=gln - endif - --all: $(LIBA) $(LIBSO) $(LIBPC) -+ALL_TARGETS = $(LIBA) $(LIBPC) -+ifeq ($(STATIC),) -+ALL_TARGETS += $(LIBSO) -+endif -+ -+all: $(ALL_TARGETS) - - - $(LIBA): $(OBJS) -@@ -81,8 +86,10 @@ - install: all - test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL) - install -m 644 $(LIBA) $(LIBINSTALL) -+ifeq ($(STATIC),) - test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL) - install -m 755 $(LIBSO) $(LIBINSTALL) -+endif - test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig - install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig - $(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET) diff --git a/package/libsepol/0004-revert-ln-relative.patch b/package/libsepol/0004-revert-ln-relative.patch deleted file mode 100644 index 9d1553ed97..0000000000 --- a/package/libsepol/0004-revert-ln-relative.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 16b2b0e21e10727065042a1baabd1a887757c65c Mon Sep 17 00:00:00 2001 -From: Adam Duskett -Date: Mon, 9 Oct 2017 16:29:36 -0400 -Subject: [PATCH] Makefile: revert libsepol: use ln --relative to create .so symlinks - -This reverts 71393a181d63c9baae5fe8dcaeb9411d1f253998 - -ln --relative is too recent to be available in all distributions, -especially enterprise-grade distros that can stick around as long as -they are maintained (up to 10 years in some cases?). - -For the sake of Buildroot, revert the upstream patch. - -Signed-off-by: "Yann E. MORIN" - -diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile ---- libsepol-2.7.orig/src/Makefile 2018-01-15 21:37:12.821831315 +0100 -+++ libsepol-2.7/src/Makefile 2018-01-15 21:38:03.838497434 +0100 -@@ -92,7 +92,7 @@ - endif - test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig - install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig -- $(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET) -+ cd $(LIBINSTALL) && ln -sf $(LIBSO) $(TARGET) - - relabel: - /sbin/restorecon $(LIBINSTALL)/$(LIBSO)