All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8
@ 2018-09-16 18:45 Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 2/8] libsepol: " Fabrice Fontaine
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:45 UTC (permalink / raw)
  To: buildroot

- Remove second patch (already in version), see
  https://github.com/SELinuxProject/selinux/commit/b24980ec07af66c4b419f8053aa65e97b36e558d
- Update third patch
- Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
  $(PREFIX)/lib (with PREFIX=/usr)
- Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-follow-standard-semantics-for-DESTD.patch | 137 ------------------
 ...ve.patch => 0002-revert-ln-relative.patch} |  14 +-
 ...break-around-__atomic_-with-GCC-4.7.patch} |   0
 package/libselinux/libselinux.hash            |   5 +-
 package/libselinux/libselinux.mk              |   7 +-
 5 files changed, 16 insertions(+), 147 deletions(-)
 delete mode 100644 package/libselinux/0002-libselinux-build-follow-standard-semantics-for-DESTD.patch
 rename package/libselinux/{0003-revert-ln-relative.patch => 0002-revert-ln-relative.patch} (55%)
 rename package/libselinux/{0004-Fix-build-break-around-__atomic_-with-GCC-4.7.patch => 0003-Fix-build-break-around-__atomic_-with-GCC-4.7.patch} (100%)

diff --git a/package/libselinux/0002-libselinux-build-follow-standard-semantics-for-DESTD.patch b/package/libselinux/0002-libselinux-build-follow-standard-semantics-for-DESTD.patch
deleted file mode 100644
index 089eef414e..0000000000
--- a/package/libselinux/0002-libselinux-build-follow-standard-semantics-for-DESTD.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-libselinux: build: follow standard semantics for DESTDIR and PREFIX
-
-This patch solves the following issues:
-- The pkg-config files generates odd paths when using DESTDIR without PREFIX
-- 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 libselinux.orig/include/Makefile libselinux/include/Makefile
---- libselinux.orig/include/Makefile	2018-01-12 12:42:30.898709792 +0100
-+++ libselinux/include/Makefile	2018-01-12 10:02:57.745478435 +0100
-@@ -1,6 +1,6 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--INCDIR ?= $(PREFIX)/include/selinux
-+PREFIX ?= /usr
-+INCDIR = $(DESTDIR)$(PREFIX)/include/selinux
- 
- all:
- 
-diff -durN libselinux.orig/man/Makefile libselinux/man/Makefile
---- libselinux.orig/man/Makefile	2018-01-12 12:42:30.898709792 +0100
-+++ libselinux/man/Makefile	2018-01-12 10:02:57.745478435 +0100
-@@ -1,7 +1,8 @@
- # Installation directories.
--MAN8DIR ?= $(DESTDIR)/usr/share/man/man8
--MAN5DIR ?= $(DESTDIR)/usr/share/man/man5
--MAN3DIR ?= $(DESTDIR)/usr/share/man/man3
-+PREFIX	?= /usr
-+MAN8DIR ?= $(DESTDIR)$(PREFIX)/share/man/man8
-+MAN5DIR ?= $(DESTDIR)$(PREFIX)/share/man/man5
-+MAN3DIR ?= $(DESTDIR)$(PREFIX)/share/man/man3
- 
- all:
- 
-diff -durN libselinux.orig/src/libselinux.pc.in libselinux/src/libselinux.pc.in
---- libselinux.orig/src/libselinux.pc.in	2018-01-12 12:42:30.905376458 +0100
-+++ libselinux/src/libselinux.pc.in	2018-01-12 10:02:57.745478435 +0100
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- exec_prefix=${prefix}
--libdir=${exec_prefix}/@libdir@
-+libdir=@libdir@
- includedir=@includedir@
- 
- Name: libselinux
-diff -durN libselinux.orig/src/Makefile libselinux/src/Makefile
---- libselinux.orig/src/Makefile	2018-01-12 12:42:30.902043126 +0100
-+++ libselinux/src/Makefile	2018-01-12 10:02:57.745478435 +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])')
-@@ -19,8 +19,6 @@
- RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]')
- 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))
--LIBSEPOLA ?= $(LIBDIR)/libsepol.a
- 
- VERSION = $(shell cat ../VERSION)
- LIBVERSION = 1
-@@ -148,7 +146,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):' < $< > $@
- 
- selinuxswig_python_exception.i: ../include/selinux/selinux.h
- 	bash -e exception.sh > $@ || (rm -f $@ ; false)
-@@ -156,8 +154,8 @@
- $(AUDIT2WHYLOBJ): audit2why.c
- 	$(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
- 
--$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA)
--	$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(PYLIBS)
-+$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(PYLIBS) -l:libsepol.a
- 
- %.o:  %.c policy.h
- 	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
-@@ -177,13 +175,13 @@
- 	$(SWIG) $<
- 
- install: all 
--	test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
--	install -m 644 $(LIBA) $(LIBDIR)
--	test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
--	install -m 755 $(LIBSO) $(SHLIBDIR)
--	test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
--	install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
--	ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
-+	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
-+	install -m 644 $(LIBA) $(LIBINSTALL)
-+	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
-+	install -m 755 $(LIBSO) $(LIBINSTALL)
-+	test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
-+	install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
-+	ln -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET)
- 
- install-pywrap: pywrap
- 	test -d $(PYSITEDIR)/selinux || install -m 755 -d $(PYSITEDIR)/selinux
-@@ -196,7 +194,7 @@
- 	install -m 755 $(SWIGRUBYSO) $(RUBYINSTALL)/selinux.so
- 
- relabel:
--	/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
-+	/sbin/restorecon $(LIBINSTALL)/$(LIBSO)
- 
- clean-pywrap:
- 	-rm -f $(SWIGLOBJ) $(SWIGSO) $(AUDIT2WHYLOBJ) $(AUDIT2WHYSO)
-diff -durN libselinux.orig/utils/Makefile libselinux/utils/Makefile
---- libselinux.orig/utils/Makefile	2018-01-12 12:42:30.905376458 +0100
-+++ libselinux/utils/Makefile	2018-01-12 10:02:57.745478435 +0100
-@@ -1,8 +1,6 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--LIBDIR ?= $(PREFIX)/lib
--SBINDIR ?= $(PREFIX)/sbin
--INCLUDEDIR ?= $(PREFIX)/include
-+PREFIX ?= /usr
-+SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
- 
- OS ?= $(shell uname)
- 
diff --git a/package/libselinux/0003-revert-ln-relative.patch b/package/libselinux/0002-revert-ln-relative.patch
similarity index 55%
rename from package/libselinux/0003-revert-ln-relative.patch
rename to package/libselinux/0002-revert-ln-relative.patch
index f72afa1b0a..f7beab2697 100644
--- a/package/libselinux/0003-revert-ln-relative.patch
+++ b/package/libselinux/0002-revert-ln-relative.patch
@@ -9,16 +9,18 @@ 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" <yann.morin.1998@free.fr>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Update for 2.8 (with assumption that SHLIBDIR=LIBDIR)]
 
 diff -durNw libselinux-2.7.orig/src/Makefile libselinux-2.7/src/Makefile
 --- libselinux-2.7.orig/src/Makefile	2018-01-15 20:53:50.168525700 +0100
 +++ libselinux-2.7/src/Makefile	2018-01-15 20:55:27.061858005 +0100
 @@ -181,7 +181,7 @@
- 	install -m 755 $(LIBSO) $(LIBINSTALL)
- 	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)
+	install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR)
+	test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
+	install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
+-	ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
++	cd $(DESTDIR)$(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
  
  install-pywrap: pywrap
- 	test -d $(PYSITEDIR)/selinux || install -m 755 -d $(PYSITEDIR)/selinux
+	test -d $(DESTDIR)$(PYTHONLIBDIR)/selinux || install -m 755 -d $(DESTDIR)$(PYTHONLIBDIR)/selinux
diff --git a/package/libselinux/0004-Fix-build-break-around-__atomic_-with-GCC-4.7.patch b/package/libselinux/0003-Fix-build-break-around-__atomic_-with-GCC-4.7.patch
similarity index 100%
rename from package/libselinux/0004-Fix-build-break-around-__atomic_-with-GCC-4.7.patch
rename to package/libselinux/0003-Fix-build-break-around-__atomic_-with-GCC-4.7.patch
diff --git a/package/libselinux/libselinux.hash b/package/libselinux/libselinux.hash
index 3c60d5111d..fb8e350434 100644
--- a/package/libselinux/libselinux.hash
+++ b/package/libselinux/libselinux.hash
@@ -1,2 +1,5 @@
 # From: https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 d0fec0769b3ad60aa7baf9b9a4b7a056827769dc2dadda0dc0eb59b3d1c18c57 libselinux-2.7.tar.gz
+sha256 31db96ec7643ce10912b3c3f98506a08a9116dcfe151855fd349c3fda96187e1 libselinux-2.8.tar.gz
+
+# Hash for license file
+sha256 86657b4c0fe868d7cbd977cb04c63b6c667e08fa51595a7bc846ad4bed8fc364 LICENSE
diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
index b3d48f7105..15f28e180a 100644
--- a/package/libselinux/libselinux.mk
+++ b/package/libselinux/libselinux.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBSELINUX_VERSION = 2.7
-LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+LIBSELINUX_VERSION = 2.8
+LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 LIBSELINUX_LICENSE = Public Domain
 LIBSELINUX_LICENSE_FILES = LICENSE
 
@@ -18,7 +18,8 @@ LIBSELINUX_MAKE_OPTS = \
 	$(TARGET_CONFIGURE_OPTS) \
 	CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
 	LDFLAGS="$(TARGET_LDFLAGS) -lpcre -lpthread" \
-	ARCH=$(KERNEL_ARCH)
+	ARCH=$(KERNEL_ARCH) \
+	SHLIBDIR=/usr/lib
 
 LIBSELINUX_MAKE_INSTALL_TARGETS = install
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-19 14:24   ` Matthew Weber
  2018-09-16 18:46 ` [Buildroot] [PATCH 3/8] libsemanage: " Fabrice Fontaine
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

- Remove first patch (already in version):
  https://github.com/SELinuxProject/selinux/commit/f8532f17731c82df9956aa1c92f7fb08bd65bf05
- Update second and third patch
- Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
  $(PREFIX)/lib (with PREFIX=/usr)
- Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-follow-standard-semantics-for-DESTD.patch | 109 ------------------
 ...y.patch => 0001-support-static-only.patch} |  16 +--
 ...ve.patch => 0002-revert-ln-relative.patch} |  10 +-
 package/libsepol/libsepol.hash                |   5 +-
 package/libsepol/libsepol.mk                  |  10 +-
 5 files changed, 25 insertions(+), 125 deletions(-)
 delete mode 100644 package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
 rename package/libsepol/{0002-support-static-only.patch => 0001-support-static-only.patch} (68%)
 rename package/libsepol/{0003-revert-ln-relative.patch => 0002-revert-ln-relative.patch} (68%)

diff --git a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch b/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
deleted file mode 100644
index 1daf7206d3..0000000000
--- a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-libsepol: build: follow standard semantics for DESTDIR and PREFIX
-
-This patch solves the following issues:
-- The pkg-config files generates odd paths when using DESTDIR without PREFIX
-- 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 libsepol.orig/include/Makefile libsepol/include/Makefile
---- libsepol.orig/include/Makefile	2018-01-12 12:42:30.908709792 +0100
-+++ libsepol/include/Makefile	2018-01-12 09:58:04.322148228 +0100
-@@ -1,6 +1,6 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--INCDIR ?= $(PREFIX)/include/sepol
-+PREFIX ?= /usr
-+INCDIR = $(DESTDIR)$(PREFIX)/include/sepol
- CILDIR ?= ../cil
- 
- all:
-diff -durN libsepol.orig/man/Makefile libsepol/man/Makefile
---- libsepol.orig/man/Makefile	2018-01-12 12:42:30.912043126 +0100
-+++ libsepol/man/Makefile	2018-01-12 09:58:04.322148228 +0100
-@@ -1,6 +1,7 @@
- # Installation directories.
--MAN8DIR ?= $(DESTDIR)/usr/share/man/man8
--MAN3DIR ?= $(DESTDIR)/usr/share/man/man3
-+PREFIX ?= /usr
-+MAN8DIR ?= $(DESTDIR)$(PREFIX)/share/man/man8
-+MAN3DIR ?= $(DESTDIR)$(PREFIX)/share/man/man3
- 
- all:
- 
-diff -durN libsepol.orig/src/libsepol.pc.in libsepol/src/libsepol.pc.in
---- libsepol.orig/src/libsepol.pc.in	2018-01-12 12:42:30.912043126 +0100
-+++ libsepol/src/libsepol.pc.in	2018-01-12 09:58:04.322148228 +0100
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- exec_prefix=${prefix}
--libdir=${exec_prefix}/@libdir@
-+libdir=@libdir@
- includedir=@includedir@
- 
- Name: libsepol
-diff -durN libsepol.orig/src/Makefile libsepol/src/Makefile
---- libsepol.orig/src/Makefile	2018-01-12 12:42:30.912043126 +0100
-+++ libsepol/src/Makefile	2018-01-12 09:58:04.322148228 +0100
-@@ -1,11 +1,10 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
-+PREFIX ?= /usr
- INCLUDEDIR ?= $(PREFIX)/include
- LIBDIR ?= $(PREFIX)/lib
--SHLIBDIR ?= $(DESTDIR)/lib
- RANLIB ?= ranlib
--LIBBASE ?= $(shell basename $(LIBDIR))
- CILDIR ?= ../cil
-+LIBINSTALL = $(DESTDIR)$(LIBDIR)
- 
- VERSION = $(shell cat ../VERSION)
- LIBVERSION = 1
-@@ -52,7 +51,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):' < $< > $@
- 
- $(LIBMAP): $(LIBMAP).in
- ifneq ($(DISABLE_CIL),y)
-@@ -80,16 +79,16 @@
- 	$(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
- 
- install: all
--	test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
--	install -m 644 $(LIBA) $(LIBDIR)
--	test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
--	install -m 755 $(LIBSO) $(SHLIBDIR)
--	test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
--	install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
--	$(LN) -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
-+	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
-+	install -m 644 $(LIBA) $(LIBINSTALL)
-+	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
-+	install -m 755 $(LIBSO) $(LIBINSTALL)
-+	test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
-+	install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
-+	$(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET)
- 
- relabel:
--	/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
-+	/sbin/restorecon $(LIBINSTALL)/$(LIBSO)
- 
- clean: 
- 	-rm -f $(LIBPC) $(LIBMAP) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) $(CIL_GENERATED)
-diff -durN libsepol.orig/utils/Makefile libsepol/utils/Makefile
---- libsepol.orig/utils/Makefile	2018-01-12 12:42:30.915376458 +0100
-+++ libsepol/utils/Makefile	2018-01-12 09:58:04.322148228 +0100
-@@ -1,6 +1,6 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--BINDIR ?= $(PREFIX)/bin
-+PREFIX ?= /usr
-+BINDIR ?= $(DESTDIR)$(PREFIX)/bin
- 
- CFLAGS ?= -Wall -Werror
- override CFLAGS += -I../include
diff --git a/package/libsepol/0002-support-static-only.patch b/package/libsepol/0001-support-static-only.patch
similarity index 68%
rename from package/libsepol/0002-support-static-only.patch
rename to package/libsepol/0001-support-static-only.patch
index 8cf9a180ff..f475dcad18 100644
--- a/package/libsepol/0002-support-static-only.patch
+++ b/package/libsepol/0001-support-static-only.patch
@@ -11,6 +11,8 @@ does not have support for shared libraries.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Update for 2.8]
 ---
  src/Makefile | 13 ++++++++++---
  1 file changed, 10 insertions(+), 3 deletions(-)
@@ -34,12 +36,12 @@ diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile
  $(LIBA):  $(OBJS)
 @@ -81,8 +86,10 @@
  install: all
- 	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
- 	install -m 644 $(LIBA) $(LIBINSTALL)
+	test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR)
+	install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR)
 +ifeq ($(STATIC),)
- 	test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
- 	install -m 755 $(LIBSO) $(LIBINSTALL)
+	test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR)
+	install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR)
 +endif
- 	test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
- 	install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
- 	$(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET)
+	test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
+	install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
+	$(LN) -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
diff --git a/package/libsepol/0003-revert-ln-relative.patch b/package/libsepol/0002-revert-ln-relative.patch
similarity index 68%
rename from package/libsepol/0003-revert-ln-relative.patch
rename to package/libsepol/0002-revert-ln-relative.patch
index 9d1553ed97..acac908be0 100644
--- a/package/libsepol/0003-revert-ln-relative.patch
+++ b/package/libsepol/0002-revert-ln-relative.patch
@@ -12,16 +12,18 @@ 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" <yann.morin.1998@free.fr>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Update for 2.8 (with assumption that SHLIBDIR=LIBDIR)]
 
 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)
+	test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
+	install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
+-	$(LN) -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
++	cd $(DESTDIR)$(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
  
  relabel:
  	/sbin/restorecon $(LIBINSTALL)/$(LIBSO)
diff --git a/package/libsepol/libsepol.hash b/package/libsepol/libsepol.hash
index 08e2bf97a4..599133c116 100644
--- a/package/libsepol/libsepol.hash
+++ b/package/libsepol/libsepol.hash
@@ -1,2 +1,5 @@
 # From: https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 d69d3bd8ec901a3bd5adf2be2fb47fb1a685ed73066ab482e7e505371a48f9e7  libsepol-2.7.tar.gz
+sha256 3ad6916a8352bef0bad49acc8037a5f5b48c56f94e4cb4e1959ca475fa9d24d6  libsepol-2.8.tar.gz
+
+# Hash for license file
+sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3  COPYING
diff --git a/package/libsepol/libsepol.mk b/package/libsepol/libsepol.mk
index 5932ca1464..a6c0d4a51a 100644
--- a/package/libsepol/libsepol.mk
+++ b/package/libsepol/libsepol.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBSEPOL_VERSION = 2.7
-LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+LIBSEPOL_VERSION = 2.8
+LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 LIBSEPOL_LICENSE = LGPL-2.1+
 LIBSEPOL_LICENSE_FILES = COPYING
 
@@ -24,11 +24,13 @@ define LIBSEPOL_BUILD_CMDS
 endef
 
 define LIBSEPOL_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR)
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) \
+		DESTDIR=$(STAGING_DIR) SHLIBDIR=/usr/lib
 endef
 
 define LIBSEPOL_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(TARGET_DIR)
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) \
+		DESTDIR=$(TARGET_DIR) SHLIBDIR=/usr/lib
 endef
 
 HOST_LIBSEPOL_MAKE_ENV = \
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/8] libsemanage: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 2/8] libsepol: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 4/8] checkpolicy: " Fabrice Fontaine
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

- Remove patch (already in version), see:
  https://github.com/SELinuxProject/selinux/commit/e15f61e5d2fe74c6e7c0a5f81083a93b508c35f7
- Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-follow-standard-semantics-for-DESTD.patch | 118 ------------------
 package/libsemanage/libsemanage.hash          |   5 +-
 package/libsemanage/libsemanage.mk            |   4 +-
 3 files changed, 6 insertions(+), 121 deletions(-)
 delete mode 100644 package/libsemanage/0001-libsemanage-build-follow-standard-semantics-for-DESTD.patch

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
deleted file mode 100644
index 47ac6bded5..0000000000
--- a/package/libsemanage/0001-libsemanage-build-follow-standard-semantics-for-DESTD.patch
+++ /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))
- 
diff --git a/package/libsemanage/libsemanage.hash b/package/libsemanage/libsemanage.hash
index c386571591..5315514003 100644
--- a/package/libsemanage/libsemanage.hash
+++ b/package/libsemanage/libsemanage.hash
@@ -1,2 +1,5 @@
 # From: https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 07e9477714ce6a4557a1fe924ea4cb06501b62d0fa0e3c0dc32a2cf47cb8d476 libsemanage-2.7.tar.gz
+sha256 1c0de8d2c51e5460926c21e371105c84a39087dfd8f8e9f0cc1d017e4cbea8e2 libsemanage-2.8.tar.gz
+
+# Hash for license file
+sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING
diff --git a/package/libsemanage/libsemanage.mk b/package/libsemanage/libsemanage.mk
index b6e50e2848..6c3564916e 100644
--- a/package/libsemanage/libsemanage.mk
+++ b/package/libsemanage/libsemanage.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBSEMANAGE_VERSION = 2.7
-LIBSEMANAGE_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+LIBSEMANAGE_VERSION = 2.8
+LIBSEMANAGE_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 LIBSEMANAGE_LICENSE = LGPL-2.1+
 LIBSEMANAGE_LICENSE_FILES = COPYING
 LIBSEMANAGE_DEPENDENCIES = host-bison host-flex audit libselinux ustr bzip2
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 4/8] checkpolicy: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 2/8] libsepol: " Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 3/8] libsemanage: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 5/8] restorecond: " Fabrice Fontaine
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/checkpolicy/checkpolicy.hash | 5 ++++-
 package/checkpolicy/checkpolicy.mk   | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/package/checkpolicy/checkpolicy.hash b/package/checkpolicy/checkpolicy.hash
index 7397393a76..cf38d6e2f4 100644
--- a/package/checkpolicy/checkpolicy.hash
+++ b/package/checkpolicy/checkpolicy.hash
@@ -1,2 +1,5 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 5413479f1dcde866c19896b4dbfec315d822aa431606e1d03c944408984c3201  checkpolicy-2.7.tar.gz
+sha256 9dec811c24b88e58c3bf741365eacf1dbb945531a2fcb8f284aacf68098194c8  checkpolicy-2.8.tar.gz
+
+# Hash for license file
+sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994  COPYING
diff --git a/package/checkpolicy/checkpolicy.mk b/package/checkpolicy/checkpolicy.mk
index 52f816098d..7143b2d7d2 100644
--- a/package/checkpolicy/checkpolicy.mk
+++ b/package/checkpolicy/checkpolicy.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-CHECKPOLICY_VERSION = 2.7
-CHECKPOLICY_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+CHECKPOLICY_VERSION = 2.8
+CHECKPOLICY_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 CHECKPOLICY_LICENSE = GPL-2.0
 CHECKPOLICY_LICENSE_FILES = COPYING
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 5/8] restorecond: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (2 preceding siblings ...)
  2018-09-16 18:46 ` [Buildroot] [PATCH 4/8] checkpolicy: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 6/8] policycoreutils: " Fabrice Fontaine
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/restorecond/restorecond.hash | 5 ++++-
 package/restorecond/restorecond.mk   | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/package/restorecond/restorecond.hash b/package/restorecond/restorecond.hash
index f52bbd2161..d171c50524 100644
--- a/package/restorecond/restorecond.hash
+++ b/package/restorecond/restorecond.hash
@@ -1,2 +1,5 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 cb8e0a8d706cb2c1f105125f3514dffffefcbcfb49199183a7f91ab0bdf1f24d restorecond-2.7.tar.gz
+sha256 323cab1128e5308cd85fea0e5c98e3c8973e1ada0b659f2fce76187e192271bf restorecond-2.8.tar.gz
+
+# Hash for license file
+sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
diff --git a/package/restorecond/restorecond.mk b/package/restorecond/restorecond.mk
index aaa59b3351..7e43d9c8df 100644
--- a/package/restorecond/restorecond.mk
+++ b/package/restorecond/restorecond.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-RESTORECOND_VERSION = 2.7
-RESTORECOND_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+RESTORECOND_VERSION = 2.8
+RESTORECOND_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 RESTORECOND_LICENSE = GPL-2.0
 RESTORECOND_LICENSE_FILES = COPYING
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 6/8] policycoreutils: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (3 preceding siblings ...)
  2018-09-16 18:46 ` [Buildroot] [PATCH 5/8] restorecond: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 7/8] selinux-python: " Fabrice Fontaine
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

Update first and second patch

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-all-paths-that-use-an-absolute-path.patch |  8 +++--
 .../0002-Add-PREFIX-to-host-paths.patch       | 33 ++++++-------------
 package/policycoreutils/policycoreutils.hash  |  2 +-
 package/policycoreutils/policycoreutils.mk    |  4 +--
 4 files changed, 18 insertions(+), 29 deletions(-)

diff --git a/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch b/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch
index 3c0ddcc54b..4cfe969a40 100644
--- a/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch
+++ b/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch
@@ -13,6 +13,8 @@ accomodate version 2.5
 Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
 Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
 Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Update for 2.8]
 ---
  setfiles/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -22,11 +24,11 @@ index c08e2dd..36c0638 100644
 --- a/setfiles/Makefile
 +++ b/setfiles/Makefile
 @@ -3,7 +3,7 @@ PREFIX ?= $(DESTDIR)/usr
- SBINDIR ?= $(DESTDIR)/sbin
+ PREFIX ?= /usr
+ SBINDIR ?= /sbin
  MANDIR = $(PREFIX)/share/man
- LIBDIR ?= $(PREFIX)/lib
 -AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
-+AUDITH ?= $(shell test -f $(DESTDIR)/include/libaudit.h && echo y)
++AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y)
  
  ABORT_ON_ERRORS=$(shell grep "^\#define ABORT_ON_ERRORS" setfiles.c | awk -S '{ print $$3 }')
  
diff --git a/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch b/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch
index 32d2ae92e6..0b53044180 100644
--- a/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch
+++ b/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch
@@ -11,25 +11,14 @@ Updated to work with version 2.5
 Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
 Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
 Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Update for 2.8]
 ---
  load_policy/Makefile | 2 +-
  newrole/Makefile     | 6 +++---
  run_init/Makefile    | 6 +++---
  3 files changed, 7 insertions(+), 7 deletions(-)
 
-diff --git a/load_policy/Makefile b/load_policy/Makefile
-index b85833c..6a45f31 100644
---- a/load_policy/Makefile
-+++ b/load_policy/Makefile
-@@ -2,7 +2,7 @@
- PREFIX ?= $(DESTDIR)/usr
- SBINDIR ?= $(DESTDIR)/sbin
- MANDIR ?= $(PREFIX)/share/man
--LOCALEDIR ?= /usr/share/locale
-+LOCALEDIR ?= $(PREFIX)/share/locale
- 
- CFLAGS ?= -Werror -Wall -W
- override CFLAGS += $(LDFLAGS) -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
 diff --git a/newrole/Makefile b/newrole/Makefile
 index 196af92..896708f 100644
 --- a/newrole/Makefile
@@ -37,13 +26,12 @@ index 196af92..896708f 100644
 @@ -3,9 +3,9 @@ PREFIX ?= $(DESTDIR)/usr
  BINDIR ?= $(PREFIX)/bin
  MANDIR ?= $(PREFIX)/share/man
- ETCDIR ?= $(DESTDIR)/etc
--LOCALEDIR = /usr/share/locale
+ ETCDIR ?= /etc
+ LOCALEDIR = $(DESTDIR)$(PREFIX)/share/locale
 -PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y)
 -AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
-+LOCALEDIR = $(PREFIX)/share/locale
-+PAMH ?= $(shell test -f $(PREFIX)/include/security/pam_appl.h && echo y)
-+AUDITH ?= $(shell test -f $(PREFIX)/include/libaudit.h && echo y)
++PAMH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/security/pam_appl.h && echo y)
++AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y)
  # Enable capabilities to permit newrole to generate audit records.
  # This will make newrole a setuid root program.
  # The capabilities used are: CAP_AUDIT_WRITE.
@@ -54,13 +42,12 @@ index 921f0b0..e1566fc 100644
 @@ -4,9 +4,9 @@ PREFIX ?= $(DESTDIR)/usr
  SBINDIR ?= $(PREFIX)/sbin
  MANDIR ?= $(PREFIX)/share/man
- ETCDIR ?= $(DESTDIR)/etc
--LOCALEDIR ?= /usr/share/locale
+ ETCDIR ?= /etc
+ LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale
 -PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y)
 -AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
-+LOCALEDIR ?= $(PREFIX)/share/locale
-+PAMH ?= $(shell test -f $(PREFIX)/include/security/pam_appl.h && echo y)
-+AUDITH ?= $(shell test -f $(PREFIX)/include/libaudit.h && echo y)
++PAMH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/security/pam_appl.h && echo y)
++AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y)
  
  CFLAGS ?= -Werror -Wall -W
  override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
diff --git a/package/policycoreutils/policycoreutils.hash b/package/policycoreutils/policycoreutils.hash
index 241905ca22..b6367b4bf4 100644
--- a/package/policycoreutils/policycoreutils.hash
+++ b/package/policycoreutils/policycoreutils.hash
@@ -1,3 +1,3 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 0a1b8a4a323b854981c6755ff025fe98a0f1cff307f109abb260f0490f13e4f4 policycoreutils-2.7.tar.gz
+sha256 986553a235f27bee7ad7c2b7c35ea51eb2ee68e2cf03b661b1585de101bc1099 policycoreutils-2.8.tar.gz
 sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
diff --git a/package/policycoreutils/policycoreutils.mk b/package/policycoreutils/policycoreutils.mk
index 21c5470cec..abd70e16c8 100644
--- a/package/policycoreutils/policycoreutils.mk
+++ b/package/policycoreutils/policycoreutils.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-POLICYCOREUTILS_VERSION = 2.7
-POLICYCOREUTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+POLICYCOREUTILS_VERSION = 2.8
+POLICYCOREUTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 POLICYCOREUTILS_LICENSE = GPL-2.0
 POLICYCOREUTILS_LICENSE_FILES = COPYING
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 7/8] selinux-python: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (4 preceding siblings ...)
  2018-09-16 18:46 ` [Buildroot] [PATCH 6/8] policycoreutils: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-16 18:46 ` [Buildroot] [PATCH 8/8] semodule-utils: " Fabrice Fontaine
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

- Remove first patch (alread in version), see:
  https://github.com/SELinuxProject/selinux/commit/11aaf180ef128551d9f8d65dbd32961e99670914
- Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-follow-standard-semantics-for-DESTD.patch | 117 ------------------
 package/selinux-python/selinux-python.hash    |   5 +-
 package/selinux-python/selinux-python.mk      |   4 +-
 3 files changed, 6 insertions(+), 120 deletions(-)
 delete mode 100644 package/selinux-python/0001-python-build-follow-standard-semantics-for-DESTD.patch

diff --git a/package/selinux-python/0001-python-build-follow-standard-semantics-for-DESTD.patch b/package/selinux-python/0001-python-build-follow-standard-semantics-for-DESTD.patch
deleted file mode 100644
index 156701a818..0000000000
--- a/package/selinux-python/0001-python-build-follow-standard-semantics-for-DESTD.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-python: build: follow standard semantics for DESTDIR and PREFIX
-
-Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
-
-diff -durN python.orig/audit2allow/Makefile python/audit2allow/Makefile
---- python.orig/audit2allow/Makefile	2017-08-04 15:31:00.000000000 +0200
-+++ python/audit2allow/Makefile	2018-01-17 09:44:35.659573123 +0100
-@@ -1,19 +1,17 @@
- PYTHON ?= python
- 
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--BINDIR ?= $(PREFIX)/bin
--LIBDIR ?= $(PREFIX)/lib
--MANDIR ?= $(PREFIX)/share/man
--LOCALEDIR ?= /usr/share/locale
--INCLUDEDIR ?= $(PREFIX)/include
--LIBSEPOLA ?= $(LIBDIR)/libsepol.a
-+PREFIX ?= /usr
-+BINDIR ?= $(DESTDIR)$(PREFIX)/bin
-+LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
-+MANDIR ?= $(DESTDIR)$(PREFIX)/share/man
- 
- CFLAGS ?= -Werror -Wall -W
- 
- all: audit2why sepolgen-ifgen-attr-helper
- 
--sepolgen-ifgen-attr-helper: sepolgen-ifgen-attr-helper.o $(LIBSEPOLA)
-+sepolgen-ifgen-attr-helper: sepolgen-ifgen-attr-helper.o
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -l:libsepol.a
- 
- audit2why:
- 	ln -sf audit2allow audit2why
-diff -durN python.orig/chcat/Makefile python/chcat/Makefile
---- python.orig/chcat/Makefile	2017-08-04 15:31:00.000000000 +0200
-+++ python/chcat/Makefile	2018-01-17 09:44:35.659573123 +0100
-@@ -1,8 +1,8 @@
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--BINDIR ?= $(PREFIX)/bin
--MANDIR ?= $(PREFIX)/share/man
--LOCALEDIR ?= $(PREFIX)/share/locale
-+PREFIX ?= /usr
-+BINDIR ?= $(DESTDIR)$(PREFIX)/bin
-+MANDIR ?= $(DESTDIR)$(PREFIX)/share/man
-+LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale
- 
- .PHONY: all
- all: chcat
-diff -durN python.orig/semanage/Makefile python/semanage/Makefile
---- python.orig/semanage/Makefile	2017-08-04 15:31:00.000000000 +0200
-+++ python/semanage/Makefile	2018-01-17 09:44:43.676239705 +0100
-@@ -1,13 +1,12 @@
- PYTHON ?= python
- 
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--LIBDIR ?= $(PREFIX)/lib
--SBINDIR ?= $(PREFIX)/sbin
--MANDIR = $(PREFIX)/share/man
--PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(1))")
-+PREFIX ?= /usr
-+SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
-+MANDIR = $(DESTDIR)$(PREFIX)/share/man
-+PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))")
- PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)
--BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
-+BASHCOMPLETIONDIR ?= $(DESTDIR)$(PREFIX)/share/bash-completion/completions
- 
- TARGETS=semanage
- 
-diff -durN python.orig/sepolgen/src/sepolgen/Makefile python/sepolgen/src/sepolgen/Makefile
---- python.orig/sepolgen/src/sepolgen/Makefile	2017-08-04 15:31:00.000000000 +0200
-+++ python/sepolgen/src/sepolgen/Makefile	2018-01-17 09:44:35.659573123 +0100
-@@ -1,5 +1,6 @@
-+PREFIX ?= /usr
- PYTHON ?= python
--PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(1))")
-+PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))")
- PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/sepolgen
- 
- all:
-diff -durN python.orig/sepolicy/Makefile python/sepolicy/Makefile
---- python.orig/sepolicy/Makefile	2017-08-04 15:31:00.000000000 +0200
-+++ python/sepolicy/Makefile	2018-01-17 09:44:35.659573123 +0100
-@@ -1,14 +1,14 @@
- PYTHON ?= python
- 
- # Installation directories.
--PREFIX ?= $(DESTDIR)/usr
--LIBDIR ?= $(PREFIX)/lib
--BINDIR ?= $(PREFIX)/bin
--DATADIR ?= $(PREFIX)/share
--MANDIR ?= $(PREFIX)/share/man
--LOCALEDIR ?= /usr/share/locale
--BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
--SHAREDIR ?= $(PREFIX)/share/sandbox
-+PREFIX ?= /usr
-+LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
-+BINDIR ?= $(DESTDIR)$(PREFIX)/bin
-+DATADIR ?= $(DESTDIR)$(PREFIX)/share
-+MANDIR ?= $(DESTDIR)$(PREFIX)/share/man
-+LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale
-+BASHCOMPLETIONDIR ?= $(DESTDIR)$(PREFIX)/share/bash-completion/completions
-+SHAREDIR ?= $(DESTDIR)$(PREFIX)/share/sandbox
- CFLAGS ?= -Wall -Werror -Wextra -W
- override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared
- 
-@@ -30,7 +30,7 @@
- 	@$(PYTHON) test_sepolicy.py -v
- 
- install:
--	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
-+	$(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
- 	[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
- 	install -m 755 sepolicy.py $(BINDIR)/sepolicy
- 	(cd $(BINDIR); ln -sf sepolicy sepolgen)
diff --git a/package/selinux-python/selinux-python.hash b/package/selinux-python/selinux-python.hash
index 42fe575e7b..99965004fc 100644
--- a/package/selinux-python/selinux-python.hash
+++ b/package/selinux-python/selinux-python.hash
@@ -1,2 +1,5 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 4217cb965ecda96c91e15ffcc2e7ddd13ecc2bf5631100f3cd072a7616f140ed selinux-python-2.7.tar.gz
+sha256 e69f5e24820cb247a3d881a9c90efba1e64d76af863c82fb81bc3b87ed71e238 selinux-python-2.8.tar.gz
+
+# Hash for license file
+sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
diff --git a/package/selinux-python/selinux-python.mk b/package/selinux-python/selinux-python.mk
index 25a2d04105..2de55f33cb 100644
--- a/package/selinux-python/selinux-python.mk
+++ b/package/selinux-python/selinux-python.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-SELINUX_PYTHON_VERSION = 2.7
-SELINUX_PYTHON_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+SELINUX_PYTHON_VERSION = 2.8
+SELINUX_PYTHON_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 SELINUX_PYTHON_LICENSE = GPL-2.0
 SELINUX_PYTHON_LICENSE_FILES = COPYING
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 8/8] semodule-utils: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (5 preceding siblings ...)
  2018-09-16 18:46 ` [Buildroot] [PATCH 7/8] selinux-python: " Fabrice Fontaine
@ 2018-09-16 18:46 ` Fabrice Fontaine
  2018-09-19 13:45 ` [Buildroot] [PATCH 1/8] libselinux: " Thomas Petazzoni
  2018-09-19 15:03 ` Marcus Folkesson
  8 siblings, 0 replies; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-16 18:46 UTC (permalink / raw)
  To: buildroot

Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/semodule-utils/semodule-utils.hash | 5 ++++-
 package/semodule-utils/semodule-utils.mk   | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/package/semodule-utils/semodule-utils.hash b/package/semodule-utils/semodule-utils.hash
index 18c8217ca6..be40918de6 100644
--- a/package/semodule-utils/semodule-utils.hash
+++ b/package/semodule-utils/semodule-utils.hash
@@ -1,2 +1,5 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 90c98b3362a43b4da2a51a9176820a56f3e615225e23e3395bc566c4490786ba semodule-utils-2.7.tar.gz
+sha256 44f59c13070c637440b143ceab4dfe1efb9018b1e47828dd8789def74c1ccadf semodule-utils-2.8.tar.gz
+
+# Hash for license file
+sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
diff --git a/package/semodule-utils/semodule-utils.mk b/package/semodule-utils/semodule-utils.mk
index 8f07fa0a81..480e157c6d 100644
--- a/package/semodule-utils/semodule-utils.mk
+++ b/package/semodule-utils/semodule-utils.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-SEMODULE_UTILS_VERSION = 2.7
-SEMODULE_UTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
+SEMODULE_UTILS_VERSION = 2.8
+SEMODULE_UTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524
 SEMODULE_UTILS_LICENSE = GPL-2.0
 SEMODULE_UTILS_LICENSE_FILES = COPYING
 SEMODULE_UTILS_DEPENDENCIES = libsepol
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (6 preceding siblings ...)
  2018-09-16 18:46 ` [Buildroot] [PATCH 8/8] semodule-utils: " Fabrice Fontaine
@ 2018-09-19 13:45 ` Thomas Petazzoni
  2018-09-19 13:54   ` Matthew Weber
  2018-09-19 15:03 ` Marcus Folkesson
  8 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2018-09-19 13:45 UTC (permalink / raw)
  To: buildroot

Adam, Matt,

On Sun, 16 Sep 2018 20:45:59 +0200, Fabrice Fontaine wrote:
> - Remove second patch (already in version), see
>   https://github.com/SELinuxProject/selinux/commit/b24980ec07af66c4b419f8053aa65e97b36e558d
> - Update third patch
> - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
>   $(PREFIX)/lib (with PREFIX=/usr)
> - Add hash for license file
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Since you are among the users of the SELinux support in Buildroot, it
would be great if you could give a test to this patch series.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8
  2018-09-19 13:45 ` [Buildroot] [PATCH 1/8] libselinux: " Thomas Petazzoni
@ 2018-09-19 13:54   ` Matthew Weber
  0 siblings, 0 replies; 16+ messages in thread
From: Matthew Weber @ 2018-09-19 13:54 UTC (permalink / raw)
  To: buildroot

Thomas,

On Wed, Sep 19, 2018 at 8:46 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Adam, Matt,
>
> On Sun, 16 Sep 2018 20:45:59 +0200, Fabrice Fontaine wrote:
> > - Remove second patch (already in version), see
> >   https://github.com/SELinuxProject/selinux/commit/b24980ec07af66c4b419f8053aa65e97b36e558d
> > - Update third patch
> > - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
> >   $(PREFIX)/lib (with PREFIX=/usr)
> > - Add hash for license file
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> Since you are among the users of the SELinux support in Buildroot, it
> would be great if you could give a test to this patch series.
>

Will do.

Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-16 18:46 ` [Buildroot] [PATCH 2/8] libsepol: " Fabrice Fontaine
@ 2018-09-19 14:24   ` Matthew Weber
  2018-09-19 15:01     ` Fabrice Fontaine
  2018-09-19 15:04     ` Marcus Folkesson
  0 siblings, 2 replies; 16+ messages in thread
From: Matthew Weber @ 2018-09-19 14:24 UTC (permalink / raw)
  To: buildroot

Fabrice,

On Sun, Sep 16, 2018 at 1:46 PM Fabrice Fontaine
<fontaine.fabrice@gmail.com> wrote:
>
> - Remove first patch (already in version):
>   https://github.com/SELinuxProject/selinux/commit/f8532f17731c82df9956aa1c92f7fb08bd65bf05
> - Update second and third patch
> - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
>   $(PREFIX)/lib (with PREFIX=/usr)
> - Add hash for license file

Thank you for this bump!

>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-follow-standard-semantics-for-DESTD.patch | 109 ------------------
>  ...y.patch => 0001-support-static-only.patch} |  16 +--
>  ...ve.patch => 0002-revert-ln-relative.patch} |  10 +-
>  package/libsepol/libsepol.hash                |   5 +-
>  package/libsepol/libsepol.mk                  |  10 +-
>  5 files changed, 25 insertions(+), 125 deletions(-)
>  delete mode 100644 package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
>  rename package/libsepol/{0002-support-static-only.patch => 0001-support-static-only.patch} (68%)
>  rename package/libsepol/{0003-revert-ln-relative.patch => 0002-revert-ln-relative.patch} (68%)
>
> diff --git a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch b/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> deleted file mode 100644
> index 1daf7206d3..0000000000
> --- a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> +++ /dev/null
> @@ -1,109 +0,0 @@
> -libsepol: build: follow standard semantics for DESTDIR and PREFIX

When building libsepol as a host package, it looks like the
prefix/destdir stuff isn't quite right with this update.  I get the
following attempt of host-libsepol installing the library in my host
system.

2018-09-19T09:18:57 test -d /lib || install -m 755 -d /lib
2018-09-19T09:18:57 install -m 755 libsepol.so.1 /lib
2018-09-19T09:18:57 install: cannot create regular file
'/lib/libsepol.so.1': Permission denied
2018-09-19T09:18:57 Makefile:87: recipe for target 'install' failed
2018-09-19T09:18:57 make[3]: *** [install] Error 1
2018-09-19T09:18:57 Makefile:10: recipe for target 'install' failed
2018-09-19T09:18:57 make[2]: *** [install] Error 2
2018-09-19T09:18:57 package/pkg-generic.mk:233: recipe for target
'/home/gitlab-runner/builds/target_build/build/host-libsepol-2.8/.stamp_host_installed'
failed

Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-19 14:24   ` Matthew Weber
@ 2018-09-19 15:01     ` Fabrice Fontaine
  2018-09-19 15:23       ` Thomas Petazzoni
  2018-09-19 15:04     ` Marcus Folkesson
  1 sibling, 1 reply; 16+ messages in thread
From: Fabrice Fontaine @ 2018-09-19 15:01 UTC (permalink / raw)
  To: buildroot

Dear Matt,

Le mer. 19 sept. 2018 ? 16:24, Matthew Weber <
matthew.weber@rockwellcollins.com> a ?crit :

> Fabrice,
>
> On Sun, Sep 16, 2018 at 1:46 PM Fabrice Fontaine
> <fontaine.fabrice@gmail.com> wrote:
> >
> > - Remove first patch (already in version):
> >
> https://github.com/SELinuxProject/selinux/commit/f8532f17731c82df9956aa1c92f7fb08bd65bf05
> > - Update second and third patch
> > - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR
> is set to
> >   $(PREFIX)/lib (with PREFIX=/usr)
> > - Add hash for license file
>
> Thank you for this bump!
>
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  ...-follow-standard-semantics-for-DESTD.patch | 109 ------------------
> >  ...y.patch => 0001-support-static-only.patch} |  16 +--
> >  ...ve.patch => 0002-revert-ln-relative.patch} |  10 +-
> >  package/libsepol/libsepol.hash                |   5 +-
> >  package/libsepol/libsepol.mk                  |  10 +-
> >  5 files changed, 25 insertions(+), 125 deletions(-)
> >  delete mode 100644
> package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> >  rename package/libsepol/{0002-support-static-only.patch =>
> 0001-support-static-only.patch} (68%)
> >  rename package/libsepol/{0003-revert-ln-relative.patch =>
> 0002-revert-ln-relative.patch} (68%)
> >
> > diff --git
> a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> b/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> > deleted file mode 100644
> > index 1daf7206d3..0000000000
> > ---
> a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> > +++ /dev/null
> > @@ -1,109 +0,0 @@
> > -libsepol: build: follow standard semantics for DESTDIR and PREFIX
>
> When building libsepol as a host package, it looks like the
> prefix/destdir stuff isn't quite right with this update.  I get the
> following attempt of host-libsepol installing the library in my host
> system.
>
Indeed, you're right, this is probably the same issue of SHLIBDIR being set
by default to /lib. I will repoduce the issue, fix it and send a v2. Thanks
for your tests.

>
> 2018-09-19T09:18:57 test -d /lib || install -m 755 -d /lib
> 2018-09-19T09:18:57 install -m 755 libsepol.so.1 /lib
> 2018-09-19T09:18:57 install: cannot create regular file
> '/lib/libsepol.so.1': Permission denied
> 2018-09-19T09:18:57 Makefile:87: recipe for target 'install' failed
> 2018-09-19T09:18:57 make[3]: *** [install] Error 1
> 2018-09-19T09:18:57 Makefile:10: recipe for target 'install' failed
> 2018-09-19T09:18:57 make[2]: *** [install] Error 2
> 2018-09-19T09:18:57 package/pkg-generic.mk:233: recipe for target
>
> '/home/gitlab-runner/builds/target_build/build/host-libsepol-2.8/.stamp_host_installed'
> failed
>
> Matt
>
Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180919/a0dba7e6/attachment.html>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8
  2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
                   ` (7 preceding siblings ...)
  2018-09-19 13:45 ` [Buildroot] [PATCH 1/8] libselinux: " Thomas Petazzoni
@ 2018-09-19 15:03 ` Marcus Folkesson
  8 siblings, 0 replies; 16+ messages in thread
From: Marcus Folkesson @ 2018-09-19 15:03 UTC (permalink / raw)
  To: buildroot

Hi,

On Sun, Sep 16, 2018 at 08:45:59PM +0200, Fabrice Fontaine wrote:
> - Remove second patch (already in version), see
>   https://github.com/SELinuxProject/selinux/commit/b24980ec07af66c4b419f8053aa65e97b36e558d
> - Update third patch
> - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
>   $(PREFIX)/lib (with PREFIX=/usr)
> - Add hash for license file
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---

Thanks for doing this this bump!

It has been while since I was messing around with the build system for
SELinux, hopefully it got better.

I think you can omit the DESTDIR from the compilation
step for all these packages (semodule-utils and checkpolicy still use
it, even with this patchset).

Best regards,
Marcus Folkesson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180919/00e53801/attachment.asc>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-19 14:24   ` Matthew Weber
  2018-09-19 15:01     ` Fabrice Fontaine
@ 2018-09-19 15:04     ` Marcus Folkesson
  1 sibling, 0 replies; 16+ messages in thread
From: Marcus Folkesson @ 2018-09-19 15:04 UTC (permalink / raw)
  To: buildroot

Hi,

On Wed, Sep 19, 2018 at 09:24:28AM -0500, Matthew Weber wrote:
> Fabrice,
> 
> On Sun, Sep 16, 2018 at 1:46 PM Fabrice Fontaine
> <fontaine.fabrice@gmail.com> wrote:
> >
> > - Remove first patch (already in version):
> >   https://github.com/SELinuxProject/selinux/commit/f8532f17731c82df9956aa1c92f7fb08bd65bf05
> > - Update second and third patch
> > - Pass SHLIBDIR=/usr/lib because by default it is set to /lib and LIBDIR is set to
> >   $(PREFIX)/lib (with PREFIX=/usr)
> > - Add hash for license file
> 
> Thank you for this bump!
> 
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  ...-follow-standard-semantics-for-DESTD.patch | 109 ------------------
> >  ...y.patch => 0001-support-static-only.patch} |  16 +--
> >  ...ve.patch => 0002-revert-ln-relative.patch} |  10 +-
> >  package/libsepol/libsepol.hash                |   5 +-
> >  package/libsepol/libsepol.mk                  |  10 +-
> >  5 files changed, 25 insertions(+), 125 deletions(-)
> >  delete mode 100644 package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> >  rename package/libsepol/{0002-support-static-only.patch => 0001-support-static-only.patch} (68%)
> >  rename package/libsepol/{0003-revert-ln-relative.patch => 0002-revert-ln-relative.patch} (68%)
> >
> > diff --git a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch b/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> > deleted file mode 100644
> > index 1daf7206d3..0000000000
> > --- a/package/libsepol/0001-libsepol-build-follow-standard-semantics-for-DESTD.patch
> > +++ /dev/null
> > @@ -1,109 +0,0 @@
> > -libsepol: build: follow standard semantics for DESTDIR and PREFIX
> 
> When building libsepol as a host package, it looks like the
> prefix/destdir stuff isn't quite right with this update.  I get the
> following attempt of host-libsepol installing the library in my host
> system.
> 
> 2018-09-19T09:18:57 test -d /lib || install -m 755 -d /lib
> 2018-09-19T09:18:57 install -m 755 libsepol.so.1 /lib
> 2018-09-19T09:18:57 install: cannot create regular file
> '/lib/libsepol.so.1': Permission denied
> 2018-09-19T09:18:57 Makefile:87: recipe for target 'install' failed
> 2018-09-19T09:18:57 make[3]: *** [install] Error 1
> 2018-09-19T09:18:57 Makefile:10: recipe for target 'install' failed
> 2018-09-19T09:18:57 make[2]: *** [install] Error 2
> 2018-09-19T09:18:57 package/pkg-generic.mk:233: recipe for target
> '/home/gitlab-runner/builds/target_build/build/host-libsepol-2.8/.stamp_host_installed'
> failed
> 
> Matt

I think that DESTDIR should be provided in the installation step here.

Best regards
Marcus Folkesson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180919/1d5c6c07/attachment.asc>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-19 15:01     ` Fabrice Fontaine
@ 2018-09-19 15:23       ` Thomas Petazzoni
  2018-09-19 16:28         ` Matthew Weber
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2018-09-19 15:23 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 19 Sep 2018 17:01:35 +0200, Fabrice Fontaine wrote:

> > When building libsepol as a host package, it looks like the
> > prefix/destdir stuff isn't quite right with this update.  I get the
> > following attempt of host-libsepol installing the library in my host
> > system.
> >  
> Indeed, you're right, this is probably the same issue of SHLIBDIR being set
> by default to /lib. I will repoduce the issue, fix it and send a v2. Thanks
> for your tests.

Another thing that would be great would be to have a runtime test for
SELinux, in the support/testing/ infrastructure. This would help to
easily test if a bump of the SELinux stack continues to build/work as
expected.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/8] libsepol: bump to version 2.8
  2018-09-19 15:23       ` Thomas Petazzoni
@ 2018-09-19 16:28         ` Matthew Weber
  0 siblings, 0 replies; 16+ messages in thread
From: Matthew Weber @ 2018-09-19 16:28 UTC (permalink / raw)
  To: buildroot

Thomas,

On Wed, Sep 19, 2018 at 10:24 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Wed, 19 Sep 2018 17:01:35 +0200, Fabrice Fontaine wrote:
>
> > > When building libsepol as a host package, it looks like the
> > > prefix/destdir stuff isn't quite right with this update.  I get the
> > > following attempt of host-libsepol installing the library in my host
> > > system.
> > >
> > Indeed, you're right, this is probably the same issue of SHLIBDIR being set
> > by default to /lib. I will repoduce the issue, fix it and send a v2. Thanks
> > for your tests.
>
> Another thing that would be great would be to have a runtime test for
> SELinux, in the support/testing/ infrastructure. This would help to
> easily test if a bump of the SELinux stack continues to build/work as
> expected.
>

Still on my todo list to convert this old patch over to a unittest.
If anyone else starts to look at it first, let me know and I'll gladly
test.
https://patchwork.ozlabs.org/patch/686671/

Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-09-19 16:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-16 18:45 [Buildroot] [PATCH 1/8] libselinux: bump to version 2.8 Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 2/8] libsepol: " Fabrice Fontaine
2018-09-19 14:24   ` Matthew Weber
2018-09-19 15:01     ` Fabrice Fontaine
2018-09-19 15:23       ` Thomas Petazzoni
2018-09-19 16:28         ` Matthew Weber
2018-09-19 15:04     ` Marcus Folkesson
2018-09-16 18:46 ` [Buildroot] [PATCH 3/8] libsemanage: " Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 4/8] checkpolicy: " Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 5/8] restorecond: " Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 6/8] policycoreutils: " Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 7/8] selinux-python: " Fabrice Fontaine
2018-09-16 18:46 ` [Buildroot] [PATCH 8/8] semodule-utils: " Fabrice Fontaine
2018-09-19 13:45 ` [Buildroot] [PATCH 1/8] libselinux: " Thomas Petazzoni
2018-09-19 13:54   ` Matthew Weber
2018-09-19 15:03 ` Marcus Folkesson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.