Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -0,0 +1,109 @@
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

View File

@@ -1,48 +0,0 @@
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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Index: b/src/Makefile
===================================================================
diff --git a/src/Makefile b/src/Makefile
index db6c2ba..0006285 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -30,8 +30,12 @@ LOBJS += $(sort $(patsubst %.c,%.lo,$(wildcard $(CILDIR)/src/*.c) $(CIL_GENERATE
override CFLAGS += -I$(CILDIR)/include
endif
+ALL_TARGETS = $(LIBA) $(LIBPC)
+ifeq ($(STATIC),)
+ALL_TARGETS += $(LIBSO)
+endif
-all: $(LIBA) $(LIBSO) $(LIBPC)
+all: $(ALL_TARGETS)
$(LIBA): $(OBJS)
@@ -66,11 +70,13 @@
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
+ifeq ($(STATIC),)
+ test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
+ install -m 755 $(LIBSO) $(SHLIBDIR)
ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
+endif
relabel:
/sbin/restorecon $(SHLIBDIR)/$(LIBSO)

View File

@@ -1,24 +0,0 @@
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" <yann.morin.1998@free.fr>
diff -durN a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -77,7 +77,7 @@
ifeq ($(STATIC),)
test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
install -m 755 $(LIBSO) $(SHLIBDIR)
- ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
+ cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET)
endif
relabel:

View File

@@ -0,0 +1,45 @@
From 2140db697c7f1da2a0a3f7bbcb14c1a0dade84e5 Mon Sep 17 00:00:00 2001
From: Adam Duskett <Adamduskett@outlook.com>
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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
---
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)

View File

@@ -0,0 +1,27 @@
From 16b2b0e21e10727065042a1baabd1a887757c65c Mon Sep 17 00:00:00 2001
From: Adam Duskett <Adamduskett@outlook.com>
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" <yann.morin.1998@free.fr>
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)

View File

@@ -1,7 +1,11 @@
config BR2_PACKAGE_LIBSEPOL
bool "libsepol"
depends on BR2_TOOLCHAIN_HAS_THREADS # pthread
help
Libsepol is the binary policy manipulation library. It doesn't
depend upon or use any of the other SELinux components.
http://selinuxproject.org/page/Main_Page
comment "libsepol needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -1,2 +1,2 @@
# From https://github.com/SELinuxProject/selinux/wiki/Releases
sha256 d856d6506054f52abeaa3543ea2f2344595a3dc05d0d873ed7f724f7a16b1874 libsepol-2.6.tar.gz
# From: https://github.com/SELinuxProject/selinux/wiki/Releases
sha256 d69d3bd8ec901a3bd5adf2be2fb47fb1a685ed73066ab482e7e505371a48f9e7 libsepol-2.7.tar.gz

View File

@@ -4,9 +4,9 @@
#
################################################################################
LIBSEPOL_VERSION = 2.6
LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20161014
LIBSEPOL_LICENSE = LGPLv2.1+
LIBSEPOL_VERSION = 2.7
LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
LIBSEPOL_LICENSE = LGPL-2.1+
LIBSEPOL_LICENSE_FILES = COPYING
LIBSEPOL_INSTALL_STAGING = YES
@@ -20,9 +20,7 @@ LIBSEPOL_MAKE_FLAGS += STATIC=1
endif
define LIBSEPOL_BUILD_CMDS
# DESTDIR is needed during the compile to compute library and
# header paths.
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR)
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS)
endef
define LIBSEPOL_INSTALL_STAGING_CMDS
@@ -33,15 +31,17 @@ define LIBSEPOL_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(TARGET_DIR)
endef
HOST_LIBSEPOL_MAKE_ENV = \
$(HOST_MAKE_ENV) \
PREFIX=$(HOST_DIR)
define HOST_LIBSEPOL_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
endef
define HOST_LIBSEPOL_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib
(cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
-rmdir $(HOST_DIR)/lib
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS)
ln -sf libsepol.so.1 $(HOST_DIR)/lib/libsepol.so
endef
$(eval $(generic-package))