Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
From e4ef92852023f4e2f192d3c47220dc75930a615c Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Fri, 11 Sep 2015 16:41:31 -0300
|
||||
Subject: [PATCH] build: improve stack protector check
|
||||
|
||||
Testing a toolchain for proper -fstack-protector must go beyond ensuring
|
||||
the compiler and linker accept the option.
|
||||
If the test C program does nothing with the stack then guards aren't
|
||||
inserted and/or are optimized away giving the false impression that it
|
||||
works when in fact the libc might not support it.
|
||||
|
||||
Update the check to a program that uses the stack, hence making a link
|
||||
fail if proper support isn't available, for example in non-ssp enabled
|
||||
uclibc toolchains like this:
|
||||
|
||||
test.c:(.text.startup+0x64): undefined reference to `__stack_chk_fail'
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
---
|
||||
buildtools/wafsamba/samba_autoconf.py | 20 +++++++++++++++++---
|
||||
1 file changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
|
||||
index c5f132c..ef34b00 100644
|
||||
--- a/buildtools/wafsamba/samba_autoconf.py
|
||||
+++ b/buildtools/wafsamba/samba_autoconf.py
|
||||
@@ -657,9 +657,23 @@ def SAMBA_CONFIG_H(conf, path=None):
|
||||
if not IN_LAUNCH_DIR(conf):
|
||||
return
|
||||
|
||||
- if conf.CHECK_CFLAGS(['-fstack-protector']) and conf.CHECK_LDFLAGS(['-fstack-protector']):
|
||||
- conf.ADD_CFLAGS('-fstack-protector')
|
||||
- conf.ADD_LDFLAGS('-fstack-protector')
|
||||
+ # we need to build real code that can't be optimized away to test
|
||||
+ if conf.check(fragment='''
|
||||
+ #include <stdio.h>
|
||||
+
|
||||
+ int main(void)
|
||||
+ {
|
||||
+ char t[100000];
|
||||
+ while (fgets(t, sizeof(t), stdin));
|
||||
+ return 0;
|
||||
+ }
|
||||
+ ''',
|
||||
+ execute=0,
|
||||
+ ccflags='-fstack-protector',
|
||||
+ ldflags='-fstack-protector',
|
||||
+ msg='Checking if toolchain accepts -fstack-protector'):
|
||||
+ conf.ADD_CFLAGS('-fstack-protector')
|
||||
+ conf.ADD_LDFLAGS('-fstack-protector')
|
||||
|
||||
if Options.options.debug:
|
||||
conf.ADD_CFLAGS('-g', testflags=True)
|
||||
--
|
||||
2.4.6
|
||||
|
||||
@@ -6,7 +6,6 @@ comment "samba4 needs a toolchain w/ RPC, wchar, dynamic library, threads"
|
||||
|
||||
config BR2_PACKAGE_SAMBA4
|
||||
bool "samba4"
|
||||
depends on !BR2_PACKAGE_SAMBA
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_USE_WCHAR # e2fsprogs
|
||||
depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 5d0eb52e842832af922f7d57716eacff23192906ec3bdf6727e18ca24f1419d9 samba-4.3.4.tar.gz
|
||||
# Locally calculated
|
||||
sha256 b876ef2e63f66265490e80a122e66ef2d7616112b839df68f56ac2e1ce17a7bd samba-4.4.5.tar.gz
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SAMBA4_VERSION = 4.3.4
|
||||
SAMBA4_VERSION = 4.4.5
|
||||
SAMBA4_SITE = http://ftp.samba.org/pub/samba/stable
|
||||
SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
|
||||
SAMBA4_INSTALL_STAGING = YES
|
||||
SAMBA4_LICENSE = GPLv3+
|
||||
SAMBA4_LICENSE_FILES = COPYING
|
||||
SAMBA4_DEPENDENCIES = host-e2fsprogs host-heimdal e2fsprogs popt python zlib \
|
||||
SAMBA4_DEPENDENCIES = \
|
||||
host-e2fsprogs host-heimdal host-python \
|
||||
e2fsprogs popt python zlib \
|
||||
$(if $(BR2_PACKAGE_LIBAIO),libaio) \
|
||||
$(if $(BR2_PACKAGE_LIBBSD),libbsd) \
|
||||
$(if $(BR2_PACKAGE_LIBCAP),libcap) \
|
||||
$(if $(BR2_PACKAGE_READLINE),readline)
|
||||
@@ -30,13 +33,6 @@ else
|
||||
SAMBA4_CONF_OPTS += --disable-cups
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBAIO),y)
|
||||
SAMBA4_CONF_OPTS += --with-aio-support
|
||||
SAMBA4_DEPENDENCIES += libaio
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-aio-support
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
|
||||
SAMBA4_CONF_OPTS += --enable-avahi
|
||||
SAMBA4_DEPENDENCIES += avahi
|
||||
@@ -52,7 +48,6 @@ SAMBA4_CONF_OPTS += --without-fam
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GETTEXT),y)
|
||||
SAMBA4_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
|
||||
SAMBA4_DEPENDENCIES += gettext
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-gettext
|
||||
@@ -123,16 +118,6 @@ define SAMBA4_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
# Samba just installs .py files so the purge causes problems with some tools
|
||||
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
|
||||
define SAMBA4_BUILD_PYC_FILES
|
||||
PYTHONPATH="$(PYTHON_PATH)" \
|
||||
$(HOST_DIR)/usr/bin/python -c "import compileall; \
|
||||
compileall.compile_dir('$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/samba')"
|
||||
endef
|
||||
SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_BUILD_PYC_FILES
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC),)
|
||||
SAMBA4_CONF_OPTS += --without-ad-dc
|
||||
endif
|
||||
@@ -170,6 +155,9 @@ define SAMBA4_INSTALL_INIT_SYSTEMD
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/smb.service
|
||||
ln -sf ../../../../usr/lib/systemd/system/winbind.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/winbind.service
|
||||
$(INSTALL) -D -m 644 $(@D)/packaging/systemd/samba.conf.tmp \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
|
||||
printf "d /var/log/samba 755 root root\n" >>$(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
Reference in New Issue
Block a user