diff --git a/bsp/buildroot/CHANGES b/bsp/buildroot/CHANGES index 5fedca19..d8b369fe 100644 --- a/bsp/buildroot/CHANGES +++ b/bsp/buildroot/CHANGES @@ -1,3 +1,85 @@ +2017.02.3, Released June 2nd, 2017 + + Important / security related fixes. + + Download: -source-check fixed for packages from git. + + External toolchain: musl dynamic linker symlink for mips-sf + corrected. + + Updated/fixed packages: armadillo, audiofile, bash, + bluez_utils, cppcms, dbus, dhcp, dropbear, efibootmgr, efl, + elfutils, faketime, fbgrab, flashrom, ftop, gdb, git, + google-breakpad, gpsd, hans, kvm-unit-tests, kyua, libev, + libmicrohttpd, libminiupnpc, libtasn1, libubox, ltp-testsuite, + lua, madplay, mariadb, mono, mosquitto, mxml, ntp, + nvidia-driver, openblas, openvpn, oracle-mysql, picocom, popt, + postgresql, pulseview, qt5base, qwt, rabbitmq-c, redis, + rpcbind, rtmpdump, samba4, strongswan, sudo, vlc + + Issues resolved (http://bugs.buildroot.org): + + #9796: source-check broken for Git downloads + #9871: fbgrab 1.3 won't build with BR2_REPRODUCIBLE set + +2017.02.2, Released May 1st, 2017 + + Important / security related fixes. + + Use HTTPS for the Codesourcery external toolchains as the HTTP + URLs no longer work. + + Updated/fixed packages: bind, busybox, dovecot, freetype, + ghostscript, glibc, granite, hiredis, icu, imagemagick, + gst-plugins-base, gst1-plugins-base, libcroco, libcurl, libnl, + libnspr, libnss, libsamplerate, libsndfile, libunwind, + minicom, mplayer, mpv, nodejs, python-django, python-pyyaml, + python-web2py, samba4, syslinux, systemd, tiff, trinity, + uboot, wireshark, xen + + Issues resolved (http://bugs.buildroot.org): + + #9791: Python searches for packages in the user site directory + +2017.02.1, Released April 4th, 2017 + + Important / security related fixes. + + Fix a variable clashing issue in the mkusers script with + internal bash variables. + + Improve external toolchain version detection. + + Correct permissions for /dev/pts/ptmx when systemd is used + with recent glibc versions. + + Fix python module name clash for graph-depends. + + Fakeroot now links against libacl to fix issues on + distributions using acls. + + Ensure that the git download infrastructure creates GNU format + tar files. + + br2-external: Improve error reporting. + + Updated/fixed packages: acl, apr, audiofile, busybox, cairo, + dbus-cpp, dbus-glib, dbus-triggerd, domoticz, elfutils, + fakeroot, filemq, fmc, gdb, git, gnutls, gst-ffmpeg, + gst1-plygins-bad, harfbuzz, htop, imagemagick, jasper, libcec, + libiio, libplatform, librsvg, libselinux, libsidplay2, libsoc, + libwebsockets, libxkbcommon, linux-firmware, logrotate, + lpt-testsuite, lttng-libust, mariadb, mbedtls, memcached, + mesa3d, mpd, mplayer, nbd, ncftp, ntp, openssh, opentyrian, + pcre, perl-gd, python, qt5base, rpi-userland, rpm, samba4, + skalibs, slang, sngrep, squashfs, syslog-ng, taglib, + tcpreplay, tor, upmpdcli, wget, wireshark, + xdriver_xf86-video-vmware, xlib_libXv, zmqpp + + Issues resolved (http://bugs.buildroot.org): + + #9456: mkusers script bash errors + 2017.02, Released February 28th, 2017 Minor fixes, mainly fixing autobuilder issues. diff --git a/bsp/buildroot/Makefile b/bsp/buildroot/Makefile index 67f4b980..8a2bd816 100644 --- a/bsp/buildroot/Makefile +++ b/bsp/buildroot/Makefile @@ -86,9 +86,9 @@ else # umask / $(CURDIR) / $(O) all: # Set and export the version string -export BR2_VERSION := 2017.02 +export BR2_VERSION := 2017.02.3 # Actual time the release is cut (for reproducible builds) -BR2_VERSION_EPOCH = 1488315000 +BR2_VERSION_EPOCH = 1496390000 # Save running make version since it's clobbered by the make package RUNNING_MAKE_VERSION := $(MAKE_VERSION) diff --git a/bsp/buildroot/VERSION b/bsp/buildroot/VERSION index cc95ad21..b71a2ac6 100644 --- a/bsp/buildroot/VERSION +++ b/bsp/buildroot/VERSION @@ -1 +1 @@ -buildroot 2017_02 +buildroot 2017_03 diff --git a/bsp/buildroot/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch b/bsp/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch similarity index 66% rename from bsp/buildroot/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch rename to bsp/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch index 2df67665..633d996e 100644 --- a/bsp/buildroot/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch +++ b/bsp/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch @@ -1,16 +1,19 @@ -commit e5f2b577ded109291c9632dacb6eaa621d8a59fe -Author: Sylvain Gault -Date: Tue Sep 29 02:38:25 2015 +0200 +From da5cbd1a3b248f2d32281a1766a3d1414c0e8e03 Mon Sep 17 00:00:00 2001 +From: Sylvain Gault +Date: Tue, 29 Sep 2015 02:38:25 +0200 +Subject: [PATCH] bios: Fix alignment change with gcc 5 - bios: Fix alignment change with gcc 5 - - The section aligment specified in the ld scripts have to be greater or - equal to those in the .o files generated by gcc. - - Signed-off-by: Sylvain Gault - Tested-by: poma - Signed-off-by: Paulo Alcantara - Signed-off-by: Frank Hunleth +The section aligment specified in the ld scripts have to be greater or +equal to those in the .o files generated by gcc. + +Signed-off-by: Sylvain Gault +Tested-by: poma +Signed-off-by: Paulo Alcantara +Signed-off-by: Frank Hunleth +--- + core/i386/syslinux.ld | 6 +++--- + core/x86_64/syslinux.ld | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld index 7b4e012..7390451 100644 @@ -74,3 +77,6 @@ index 1057112..bf815c4 100644 __bss_vma = .; __bss_lma = .; /* Dummy */ .bss (NOLOAD) : AT (__bss_lma) { +-- +2.7.4 + diff --git a/bsp/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch b/bsp/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch new file mode 100644 index 00000000..64a08b85 --- /dev/null +++ b/bsp/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch @@ -0,0 +1,30 @@ +From 250bf2c921713434627dc7bc8b0918fa0841f9b7 Mon Sep 17 00:00:00 2001 +From: Graham Inggs +Date: Wed, 5 Apr 2017 22:03:12 +0200 +Subject: [PATCH] Disable PIE to avoid FTBFS on amd64 + +gcc 6.x has PIE support enabled by default, which causes a build issue +with syslinux. This patch disables PIE support in the relevant +syslinux Makefile. + +Signed-off-by: Ryan Coe +--- + gpxe/src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gpxe/src/Makefile b/gpxe/src/Makefile +index cc91d78..077af64 100644 +--- a/gpxe/src/Makefile ++++ b/gpxe/src/Makefile +@@ -4,7 +4,7 @@ + # + + CLEANUP := +-CFLAGS := ++CFLAGS := -fno-PIE + ASFLAGS := + LDFLAGS := + MAKEDEPS := Makefile +-- +2.7.4 + diff --git a/bsp/buildroot/boot/syslinux/0002-disable-pie.patch b/bsp/buildroot/boot/syslinux/0002-disable-pie.patch deleted file mode 100644 index b31b622c..00000000 --- a/bsp/buildroot/boot/syslinux/0002-disable-pie.patch +++ /dev/null @@ -1,22 +0,0 @@ -Description: Disable PIE to avoid FTBFS on amd64 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1579023 -Author: Graham Inggs -Last-Update: 2016-05-06 - -gcc 6.x has PIE support enabled by default, which causes a build issue -with syslinux. This patch disables PIE support in the relevant -syslinux Makefile. - -Signed-off-by: Ryan Coe - ---- a/gpxe/src/Makefile -+++ b/gpxe/src/Makefile -@@ -4,7 +4,7 @@ - # - - CLEANUP := --CFLAGS := -+CFLAGS := -fno-PIE - ASFLAGS := - LDFLAGS := - MAKEDEPS := Makefile diff --git a/bsp/buildroot/boot/syslinux/0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch b/bsp/buildroot/boot/syslinux/0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch new file mode 100644 index 00000000..83a87ee0 --- /dev/null +++ b/bsp/buildroot/boot/syslinux/0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch @@ -0,0 +1,35 @@ +From 61de7762389d460da7ffdd644f50c60175cce23b Mon Sep 17 00:00:00 2001 +From: Steve McIntyre <93sam@debian.org> +Date: Wed, 5 Apr 2017 22:09:37 +0200 +Subject: [PATCH] Fix 'ldlinux.elf: Not enough room for program headers, try + linking with -N' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix for https://bugs.debian.org/846679: syslinux: FTBFS: ld: +ldlinux.elf: Not enough room for program headers, try linking with -N + +https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=846679;filename=syslinux_6.03%2Bdfsg-14.1.debdiff;msg=10 + +Signed-off-by: Benoît Allard +--- + core/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/Makefile b/core/Makefile +index ad0acb5..58a3545 100644 +--- a/core/Makefile ++++ b/core/Makefile +@@ -165,7 +165,7 @@ LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld + + %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) + $(LD) $(LDFLAGS) -Bsymbolic $(LD_PIE) -E --hash-style=gnu -T $(LDSCRIPT) -M -o $@ $< \ +- --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \ ++ --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group --no-dynamic-linker \ + > $(@:.elf=.map) + $(OBJDUMP) -h $@ > $(@:.elf=.sec) + $(PERL) $(SRC)/lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst) +-- +2.7.4 + diff --git a/bsp/buildroot/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch b/bsp/buildroot/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch new file mode 100644 index 00000000..4eedf497 --- /dev/null +++ b/bsp/buildroot/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch @@ -0,0 +1,32 @@ +From c0287594239d5af2082cac20817f8e8b11a4b1b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Wed, 5 Apr 2017 14:18:09 +0200 +Subject: [PATCH] memdisk: Force ld output format to 32-bits +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On toolchains where the default output is x86_64, we need to be +consistent with the other .o files + +Signed-off-by: Benoît Allard +--- + memdisk/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memdisk/Makefile b/memdisk/Makefile +index e6557d8..06613ff 100644 +--- a/memdisk/Makefile ++++ b/memdisk/Makefile +@@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm + $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< + + memdisk_%.o: memdisk_%.bin +- $(LD) -r -b binary -o $@ $< ++ $(LD) --oformat elf32-i386 -r -b binary -o $@ $< + + memdisk16.elf: $(OBJS16) + $(LD) -Ttext 0 -o $@ $^ +-- +2.7.4 + diff --git a/bsp/buildroot/boot/syslinux/0005-utils-Use-the-host-toolchain-to-build.patch b/bsp/buildroot/boot/syslinux/0005-utils-Use-the-host-toolchain-to-build.patch new file mode 100644 index 00000000..e091a3a8 --- /dev/null +++ b/bsp/buildroot/boot/syslinux/0005-utils-Use-the-host-toolchain-to-build.patch @@ -0,0 +1,60 @@ +From e000251144056c99e390a2a4449d06cbd2a19c0a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Wed, 5 Apr 2017 14:25:02 +0200 +Subject: [PATCH] utils: Use the host toolchain to build. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The utilities are meant to run on the host machine, hence must be built using +the host toolchain. + +Signed-off-by: Benoît Allard +--- + utils/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/utils/Makefile b/utils/Makefile +index dfe6259..ac91aaa 100644 +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -17,8 +17,8 @@ + VPATH = $(SRC) + include $(MAKEDIR)/syslinux.mk + +-CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) +-LDFLAGS = -O2 ++CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) ++LDFLAGS = $(LDFLAGS_FOR_BUILD) -O2 + + C_TARGETS = isohybrid gethostip memdiskfind + SCRIPT_TARGETS = mkdiskimage +@@ -35,7 +35,7 @@ ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \ + all: $(TARGETS) + + %.o: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< + + mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl + $(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat $(SRC)/mkdiskimage.in - > $@ +@@ -51,13 +51,13 @@ isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl + $(PERL) $(SRC)/isohdpfxarray.pl $(ISOHDPFX) > $@ + + isohybrid: isohybrid.o isohdpfx.o +- $(CC) $(LDFLAGS) -o $@ $^ -luuid ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ -luuid + + gethostip: gethostip.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + memdiskfind: memdiskfind.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + tidy dist: + rm -f *.o .*.d isohdpfx.c +-- +2.1.4 + diff --git a/bsp/buildroot/boot/syslinux/0006-lzo-Use-the-host-toolchain-for-prepcore.patch b/bsp/buildroot/boot/syslinux/0006-lzo-Use-the-host-toolchain-for-prepcore.patch new file mode 100644 index 00000000..c6fa7feb --- /dev/null +++ b/bsp/buildroot/boot/syslinux/0006-lzo-Use-the-host-toolchain-for-prepcore.patch @@ -0,0 +1,44 @@ +From 83e1f00990c25554723609bb549e18b987034317 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Thu, 6 Apr 2017 09:43:46 +0200 +Subject: [PATCH] lzo: Use the host toolchain for prepcore +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Benoît Allard +--- + lzo/Makefile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/lzo/Makefile b/lzo/Makefile +index 29f1fa6..c016e5a 100644 +--- a/lzo/Makefile ++++ b/lzo/Makefile +@@ -11,10 +11,13 @@ + ## ----------------------------------------------------------------------- + + VPATH = $(SRC) +-include $(MAKEDIR)/build.mk ++include $(MAKEDIR)/syslinux.mk + + INCLUDES += -I$(SRC)/include + ++%.o: %.c ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS_FOR_BUILD) $(INCLUDES) -c -o $@ $< ++ + LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(wildcard $(SRC)/src/*.c))) + LIB = lzo.a + BINS = prepcore +@@ -30,7 +33,7 @@ $(LIB) : $(LIBOBJS) + $(RANLIB) $@ + + prepcore : prepcore.o $(LIB) +- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $^ $(LIBS) + + tidy dist clean spotless: + rm -f $(BINS) +-- +2.1.4 + diff --git a/bsp/buildroot/boot/syslinux/Config.in b/bsp/buildroot/boot/syslinux/Config.in index 6067e9ce..299a559f 100644 --- a/bsp/buildroot/boot/syslinux/Config.in +++ b/bsp/buildroot/boot/syslinux/Config.in @@ -1,12 +1,13 @@ config BR2_TARGET_SYSLINUX bool "syslinux" depends on BR2_i386 || BR2_x86_64 - select BR2_HOSTARCH_NEEDS_IA32_COMPILER # Make sure at least one of the flavors is installed select BR2_TARGET_SYSLINUX_ISOLINUX \ if !BR2_TARGET_SYSLINUX_PXELINUX && \ !BR2_TARGET_SYSLINUX_MBR && \ !BR2_TARGET_SYSLINUX_EFI + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux. diff --git a/bsp/buildroot/boot/syslinux/syslinux.mk b/bsp/buildroot/boot/syslinux/syslinux.mk index 82890c5d..a88885bc 100644 --- a/bsp/buildroot/boot/syslinux/syslinux.mk +++ b/bsp/buildroot/boot/syslinux/syslinux.mk @@ -13,7 +13,7 @@ SYSLINUX_LICENSE_FILES = COPYING SYSLINUX_INSTALL_IMAGES = YES -SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx +SYSLINUX_DEPENDENCIES = host-nasm host-upx util-linux ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y) SYSLINUX_TARGET += bios @@ -51,21 +51,36 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP # and the internal zlib should take precedence so -I shouldn't # be used. define SYSLINUX_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ - AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET) + $(TARGET_MAKE_ENV) $(MAKE1) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + NASM="$(HOST_DIR)/usr/bin/nasm" \ + CC_FOR_BUILD="$(HOSTCC)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET) endef # While the actual bootloader is compiled for the target, several # utilities for installing the bootloader are meant for the host. # Repeat the target, otherwise syslinux will try to build everything -# Repeat CC and AR, since syslinux really wants to check them at -# install time +# Repeat LD (and CC) as it happens that some binaries are linked at +# install-time. define SYSLINUX_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ - AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \ + $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ -C $(@D) $(SYSLINUX_TARGET) install endef +# That 'syslinux' binary is an installer actually built for the target. +# However, buildroot makes no usage of it, so better delete it than have it +# installed at the wrong place +define SYSLINUX_POST_INSTALL_CLEANUP + rm -rf $(HOST_DIR)/usr/bin/syslinux +endef +SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP + SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_MBR) += bios/mbr/mbr.bin diff --git a/bsp/buildroot/boot/uboot/uboot.mk b/bsp/buildroot/boot/uboot/uboot.mk index 6b9d5445..782609a5 100644 --- a/bsp/buildroot/boot/uboot/uboot.mk +++ b/bsp/buildroot/boot/uboot/uboot.mk @@ -293,7 +293,7 @@ endif # UBOOT_BOARD_NAME else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG)),) -$(error No board defconfig name specified, check your BR2_TARGET_UBOOT_DEFCONFIG setting) +$(error No board defconfig name specified, check your BR2_TARGET_UBOOT_BOARD_DEFCONFIG setting) endif # qstrip BR2_TARGET_UBOOT_BOARD_DEFCONFIG endif # BR2_TARGET_UBOOT_USE_DEFCONFIG ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) diff --git a/bsp/buildroot/docs/manual/manual.html b/bsp/buildroot/docs/manual/manual.html index 28a3b3be..73463349 100644 --- a/bsp/buildroot/docs/manual/manual.html +++ b/bsp/buildroot/docs/manual/manual.html @@ -1,6 +1,6 @@ -The Buildroot user manual

The Buildroot user manual


Table of Contents

I. Getting started
1. About Buildroot
2. System requirements
2.1. Mandatory packages
2.2. Optional packages
3. Getting Buildroot
4. Buildroot quick start
5. Community resources
II. User guide
6. Buildroot configuration
6.1. Cross-compilation toolchain
6.2. /dev management
6.3. init system
7. Configuration of other components
8. General Buildroot usage
8.1. make tips
8.2. Understanding when a full rebuild is necessary
8.3. Understanding how to rebuild packages
8.4. Offline builds
8.5. Building out-of-tree
8.6. Environment variables
8.7. Dealing efficiently with filesystem images
8.8. Graphing the dependencies between packages
8.9. Graphing the build duration
8.10. Graphing the filesystem size contribution of packages
8.11. Integration with Eclipse
8.12. Advanced usage
9. Project-specific customization
9.1. Recommended directory structure
9.2. Keeping customizations outside of Buildroot
9.3. Storing the Buildroot configuration
9.4. Storing the configuration of other components
9.5. Customizing the generated target filesystem
9.6. Adding custom user accounts
9.7. Customization after the images have been created
9.8. Adding project-specific patches
9.9. Adding project-specific packages
9.10. Quick guide to storing your project-specific customizations
10. Frequently Asked Questions & Troubleshooting
10.1. The boot hangs after Starting network…
10.2. Why is there no compiler on the target?
10.3. Why are there no development files on the target?
10.4. Why is there no documentation on the target?
10.5. Why are some packages not visible in the Buildroot config menu?
10.6. Why not use the target directory as a chroot directory?
10.7. Why doesn’t Buildroot generate binary packages (.deb, .ipkg…)?
10.8. How to speed-up the build process?
11. Known issues
12. Legal notice and licensing
12.1. Complying with open source licenses
12.2. License abbreviations
12.3. Complying with the Buildroot license
13. Beyond Buildroot
13.1. Boot the generated images
13.2. Chroot
III. Developer guide
14. How Buildroot works
15. Coding style
15.1. Config.in file
15.2. The .mk file
15.3. The documentation
16. Adding support for a particular board
17. Adding new packages to Buildroot
17.1. Package directory
17.2. Config files
17.3. The .mk file
17.4. The .hash file
17.5. Infrastructure for packages with specific build systems
17.6. Infrastructure for autotools-based packages
17.7. Infrastructure for CMake-based packages
17.8. Infrastructure for Python packages
17.9. Infrastructure for LuaRocks-based packages
17.10. Infrastructure for Perl/CPAN packages
17.11. Infrastructure for virtual packages
17.12. Infrastructure for packages using kconfig for configuration files
17.13. Infrastructure for rebar-based packages
17.14. Infrastructure for Waf-based packages
17.15. Infrastructure for packages building kernel modules
17.16. Infrastructure for asciidoc documents
17.17. Infrastructure specific to the Linux kernel package
17.18. Hooks available in the various build steps
17.19. Gettext integration and interaction with packages
17.20. Tips and tricks
17.21. Conclusion
18. Patching a package
18.1. Providing patches
18.2. How patches are applied
18.3. Format and licensing of the package patches
18.4. Integrating patches found on the Web
19. Download infrastructure
20. Debugging Buildroot
21. Contributing to Buildroot
21.1. Reproducing, analyzing and fixing bugs
21.2. Analyzing and fixing autobuild failures
21.3. Reviewing and testing patches
21.4. Work on items from the TODO list
21.5. Submitting patches
21.6. Reporting issues/bugs or getting help
22. DEVELOPERS file and get-developers
IV. Appendix
23. Makedev syntax documentation
24. Makeusers syntax documentation
25. Converting old br2-external trees

Buildroot 2017.02 manual generated on 2017-02-28 -21:03:45 UTC from git revision 083c0735e

The Buildroot manual is written by the Buildroot developers. +The Buildroot user manual

The Buildroot user manual


Table of Contents

I. Getting started
1. About Buildroot
2. System requirements
2.1. Mandatory packages
2.2. Optional packages
3. Getting Buildroot
4. Buildroot quick start
5. Community resources
II. User guide
6. Buildroot configuration
6.1. Cross-compilation toolchain
6.2. /dev management
6.3. init system
7. Configuration of other components
8. General Buildroot usage
8.1. make tips
8.2. Understanding when a full rebuild is necessary
8.3. Understanding how to rebuild packages
8.4. Offline builds
8.5. Building out-of-tree
8.6. Environment variables
8.7. Dealing efficiently with filesystem images
8.8. Graphing the dependencies between packages
8.9. Graphing the build duration
8.10. Graphing the filesystem size contribution of packages
8.11. Integration with Eclipse
8.12. Advanced usage
9. Project-specific customization
9.1. Recommended directory structure
9.2. Keeping customizations outside of Buildroot
9.3. Storing the Buildroot configuration
9.4. Storing the configuration of other components
9.5. Customizing the generated target filesystem
9.6. Adding custom user accounts
9.7. Customization after the images have been created
9.8. Adding project-specific patches
9.9. Adding project-specific packages
9.10. Quick guide to storing your project-specific customizations
10. Frequently Asked Questions & Troubleshooting
10.1. The boot hangs after Starting network…
10.2. Why is there no compiler on the target?
10.3. Why are there no development files on the target?
10.4. Why is there no documentation on the target?
10.5. Why are some packages not visible in the Buildroot config menu?
10.6. Why not use the target directory as a chroot directory?
10.7. Why doesn’t Buildroot generate binary packages (.deb, .ipkg…)?
10.8. How to speed-up the build process?
11. Known issues
12. Legal notice and licensing
12.1. Complying with open source licenses
12.2. License abbreviations
12.3. Complying with the Buildroot license
13. Beyond Buildroot
13.1. Boot the generated images
13.2. Chroot
III. Developer guide
14. How Buildroot works
15. Coding style
15.1. Config.in file
15.2. The .mk file
15.3. The documentation
16. Adding support for a particular board
17. Adding new packages to Buildroot
17.1. Package directory
17.2. Config files
17.3. The .mk file
17.4. The .hash file
17.5. Infrastructure for packages with specific build systems
17.6. Infrastructure for autotools-based packages
17.7. Infrastructure for CMake-based packages
17.8. Infrastructure for Python packages
17.9. Infrastructure for LuaRocks-based packages
17.10. Infrastructure for Perl/CPAN packages
17.11. Infrastructure for virtual packages
17.12. Infrastructure for packages using kconfig for configuration files
17.13. Infrastructure for rebar-based packages
17.14. Infrastructure for Waf-based packages
17.15. Infrastructure for packages building kernel modules
17.16. Infrastructure for asciidoc documents
17.17. Infrastructure specific to the Linux kernel package
17.18. Hooks available in the various build steps
17.19. Gettext integration and interaction with packages
17.20. Tips and tricks
17.21. Conclusion
18. Patching a package
18.1. Providing patches
18.2. How patches are applied
18.3. Format and licensing of the package patches
18.4. Integrating patches found on the Web
19. Download infrastructure
20. Debugging Buildroot
21. Contributing to Buildroot
21.1. Reproducing, analyzing and fixing bugs
21.2. Analyzing and fixing autobuild failures
21.3. Reviewing and testing patches
21.4. Work on items from the TODO list
21.5. Submitting patches
21.6. Reporting issues/bugs or getting help
22. DEVELOPERS file and get-developers
IV. Appendix
23. Makedev syntax documentation
24. Makeusers syntax documentation
25. Converting old br2-external trees

Buildroot 2017.02.3 manual generated on 2017-06-02 +09:15:16 UTC from git revision cae46d7b8d

The Buildroot manual is written by the Buildroot developers. It is licensed under the GNU General Public License, version 2. Refer to the COPYING file in the Buildroot sources for the full text of this license.

Copyright © 2004-2017 The Buildroot developers

logo.png

Part I. Getting started

Chapter 1. About Buildroot

Buildroot is a tool that simplifies and automates the process of @@ -16,8 +16,8 @@ processors everyone is used to having in his PC. They can be PowerPC processors, MIPS processors, ARM processors, etc.

Buildroot supports numerous processors and their variants; it also comes with default configurations for several boards available off-the-shelf. Besides this, a number of third-party projects are based on, -or develop their BSP [1] or -SDK [2] on top of Buildroot.



[1] BSP: Board Support Package

[2] SDK: Software Development Kit

Chapter 2. System requirements

Buildroot is designed to run on Linux systems.

While Buildroot itself will build most host packages it needs for the +or develop their BSP [1] or +SDK [2] on top of Buildroot.



[1] BSP: Board Support Package

[2] SDK: Software Development Kit

Chapter 2. System requirements

Buildroot is designed to run on Linux systems.

While Buildroot itself will build most host packages it needs for the compilation, certain standard Linux utilities are expected to be already installed on the host system. Below you will find an overview of the mandatory and optional packages (note that package names may vary @@ -272,7 +272,7 @@ processor. Under most Linux systems, the compilation toolchain uses the GNU libc (glibc) as the C standard library. This compilation toolchain is called the "host compilation toolchain". The machine on which it is running, and on which you’re working, is called the "host -system" [3].

The compilation toolchain is provided by your distribution, and +system" [3].

The compilation toolchain is provided by your distribution, and Buildroot has nothing to do with it (other than using it to build a cross-compilation toolchain and other tools that are run on the development host).

As said above, the compilation toolchain that comes with your system @@ -551,7 +551,7 @@ The third solution is systemd. http://www.freedesktop.org/wiki/Software/systemd.

The solution recommended by Buildroot developers is to use the BusyBox init as it is sufficient for most embedded -systems. systemd can be used for more complex situations.



[3] This terminology differs from what is used by GNU +systems. systemd can be used for more complex situations.



[3] This terminology differs from what is used by GNU configure, where the host is the machine on which the application will run (which is usually the same as target)

Chapter 7. Configuration of other components

Before attempting to modify any of the components below, make sure you have already configured Buildroot itself, and have enabled the @@ -2673,7 +2673,7 @@ flags. The argument to be given to LIBFOO_CONFIG_SCRIPTS is the file name(s) of the shell script(s) needing fixing. All these names are relative to $(STAGING_DIR)/usr/bin and if needed multiple names can be given.

In addition, the scripts listed in LIBFOO_CONFIG_SCRIPTS are removed -from $(TARGET_DIR)/usr/bin, since they are not needed on the target.

Example 17.1. Config script: divine package

Package divine installs shell script $(STAGING_DIR)/usr/bin/divine-config.

So its fixup would be:

DIVINE_CONFIG_SCRIPTS = divine-config

Example 17.2. Config script: imagemagick package:

Package imagemagick installs the following scripts: +from $(TARGET_DIR)/usr/bin, since they are not needed on the target.

Example 17.1. Config script: divine package

Package divine installs shell script $(STAGING_DIR)/usr/bin/divine-config.

So its fixup would be:

DIVINE_CONFIG_SCRIPTS = divine-config

Example 17.2. Config script: imagemagick package:

Package imagemagick installs the following scripts: $(STAGING_DIR)/usr/bin/{Magick,Magick++,MagickCore,MagickWand,Wand}-config

So it’s fixup would be:

IMAGEMAGICK_CONFIG_SCRIPTS = \
    Magick-config Magick++-config \
    MagickCore-config MagickWand-config Wand-config

On line 14, we specify the list of dependencies this package relies @@ -4598,7 +4598,7 @@ large number of commits in the series;

  • deep impact of the changes in the rest of the project;
  • -RFC [4]; +RFC [4];
  • whenever you feel it will help presenting your work, your choices, the review process, etc. @@ -4680,7 +4680,7 @@ pastebin service. Note that not all available pastebin services will preserve Unix-style line terminators when downloading raw pastes. Following pastebin services are known to work correctly: - https://gist.github.com/ -- http://code.bulix.org/



  • [4] RFC: (Request for comments) change proposal

    Chapter 22. DEVELOPERS file and get-developers

    The main Buildroot directory contains a file named DEVELOPERS that +- http://code.bulix.org/



    [4] RFC: (Request for comments) change proposal

    Chapter 22. DEVELOPERS file and get-developers

    The main Buildroot directory contains a file named DEVELOPERS that lists the developers involved with various areas of Buildroot. Thanks to this file, the get-developer tool allows to:

    • Calculate the list of developers to whom patches should be sent, by diff --git a/bsp/buildroot/docs/manual/manual.pdf b/bsp/buildroot/docs/manual/manual.pdf index 3c63d0a0..a0278771 100644 Binary files a/bsp/buildroot/docs/manual/manual.pdf and b/bsp/buildroot/docs/manual/manual.pdf differ diff --git a/bsp/buildroot/docs/manual/manual.text b/bsp/buildroot/docs/manual/manual.text index 0cabaded..8d2c6771 100644 --- a/bsp/buildroot/docs/manual/manual.text +++ b/bsp/buildroot/docs/manual/manual.text @@ -155,8 +155,8 @@ List of Examples --------------------------------------------------------------------- -Buildroot 2017.02 manual generated on 2017-02-28 21:03:51 UTC from -git revision 083c0735e +Buildroot 2017.02.3 manual generated on 2017-06-02 09:15:20 UTC from +git revision cae46d7b8d The Buildroot manual is written by the Buildroot developers. It is licensed under the GNU General Public License, version 2. Refer to diff --git a/bsp/buildroot/fs/iso9660/Config.in b/bsp/buildroot/fs/iso9660/Config.in index 2482e44e..d162586f 100644 --- a/bsp/buildroot/fs/iso9660/Config.in +++ b/bsp/buildroot/fs/iso9660/Config.in @@ -3,7 +3,7 @@ config BR2_TARGET_ROOTFS_ISO9660 depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL depends on BR2_TARGET_GRUB || \ - BR2_TARGET_GRUB2 || \ + BR2_TARGET_GRUB2_I386_PC || \ BR2_TARGET_SYSLINUX_ISOLINUX select BR2_LINUX_KERNEL_INSTALL_TARGET \ if (!BR2_TARGET_ROOTFS_ISO9660_INITRD && !BR2_TARGET_ROOTFS_INITRAMFS) @@ -33,7 +33,7 @@ config BR2_TARGET_ROOTFS_ISO9660_GRUB config BR2_TARGET_ROOTFS_ISO9660_GRUB2 bool "grub2" - depends on BR2_TARGET_GRUB2 + depends on BR2_TARGET_GRUB2_I386_PC help Use Grub 2 as the bootloader for the ISO9660 image. Make sure to enable the 'iso9660' module in @@ -82,7 +82,7 @@ config BR2_TARGET_ROOTFS_ISO9660_HYBRID endif -comment "iso image needs a Linux kernel and one of grub, grub2 or isolinux to be built" +comment "iso image needs a Linux kernel and one of grub, grub2 i386-pc or isolinux to be built" depends on BR2_i386 || BR2_x86_64 depends on !BR2_LINUX_KERNEL || \ - !(BR2_TARGET_GRUB || BR2_TARGET_GRUB2 || BR2_TARGET_SYSLINUX_ISOLINUX) + !(BR2_TARGET_GRUB || BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_SYSLINUX_ISOLINUX) diff --git a/bsp/buildroot/package/acl/acl.mk b/bsp/buildroot/package/acl/acl.mk index cbe5e939..e1462b60 100644 --- a/bsp/buildroot/package/acl/acl.mk +++ b/bsp/buildroot/package/acl/acl.mk @@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL # While the configuration system uses autoconf, the Makefiles are # hand-written and do not use automake. Therefore, we have to hack -# around their deficiencies by passing installation paths. +# around their deficiencies by: +# - explicitly passing CFLAGS (LDFLAGS are passed on from configure, +# CFLAGS are not). +# - explicitly passing the installation prefix, not using DESTDIR. + +ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)" + ACL_INSTALL_STAGING_OPTS = \ prefix=$(STAGING_DIR)/usr \ exec_prefix=$(STAGING_DIR)/usr \ @@ -37,4 +43,15 @@ endef ACL_POST_INSTALL_STAGING_HOOKS += ACL_FIX_LIBTOOL_LA_LIBDIR +HOST_ACL_DEPENDENCIES = host-attr +HOST_ACL_CONF_OPTS = --enable-gettext=no +HOST_ACL_MAKE_ENV = CFLAGS="$(HOST_CFLAGS)" +HOST_ACL_INSTALL_OPTS = \ + prefix=$(HOST_DIR)/usr \ + exec_prefix=$(HOST_DIR)/usr \ + PKG_DEVLIB_DIR=$(HOST_DIR)/usr/lib \ + install-dev install-lib +# For the host, libacl.la is correct, no fixup needed. + $(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/bsp/buildroot/package/apr/apr.mk b/bsp/buildroot/package/apr/apr.mk index 361a79f9..f09f9436 100644 --- a/bsp/buildroot/package/apr/apr.mk +++ b/bsp/buildroot/package/apr/apr.mk @@ -22,6 +22,7 @@ APR_CONF_ENV = \ apr_cv_mutex_robust_shared=no \ apr_cv_tcp_nodelay_with_cork=yes \ ac_cv_sizeof_struct_iovec=8 \ + ac_cv_sizeof_pid_t=4 \ ac_cv_struct_rlimit=yes \ ac_cv_o_nonblock_inherited=no \ apr_cv_mutex_recursive=yes diff --git a/bsp/buildroot/package/armadillo/armadillo.mk b/bsp/buildroot/package/armadillo/armadillo.mk index 813a41bd..00ba08a1 100644 --- a/bsp/buildroot/package/armadillo/armadillo.mk +++ b/bsp/buildroot/package/armadillo/armadillo.mk @@ -5,7 +5,9 @@ ################################################################################ ARMADILLO_VERSION = 6.500.4 -ARMADILLO_SITE = http://downloads.sourceforge.net/project/arma +# upstream removed tarball from +# http://downloads.sourceforge.net/project/arma +ARMADILLO_SITE = https://ftp.fau.de/macports/distfiles/armadillo ARMADILLO_DEPENDENCIES = clapack ARMADILLO_INSTALL_STAGING = YES ARMADILLO_LICENSE = MPLv2.0 diff --git a/bsp/buildroot/package/audiofile/0003-Always-check-the-number-of-coefficients.patch b/bsp/buildroot/package/audiofile/0003-Always-check-the-number-of-coefficients.patch new file mode 100644 index 00000000..5c99c3cd --- /dev/null +++ b/bsp/buildroot/package/audiofile/0003-Always-check-the-number-of-coefficients.patch @@ -0,0 +1,36 @@ +From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 12:51:22 +0100 +Subject: [PATCH] Always check the number of coefficients + +When building the library with NDEBUG, asserts are eliminated +so it's better to always check that the number of coefficients +is inside the array range. + +This fixes the 00191-audiofile-indexoob issue in #41 + +Signed-off-by: Peter Korsgaard +--- + libaudiofile/WAVE.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 0e81cf7..61f9541 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + + /* numCoefficients should be at least 7. */ + assert(numCoefficients >= 7 && numCoefficients <= 255); ++ if (numCoefficients < 7 || numCoefficients > 255) ++ { ++ _af_error(AF_BAD_HEADER, ++ "Bad number of coefficients"); ++ return AF_FAIL; ++ } + + m_msadpcmNumCoefficients = numCoefficients; + +-- +2.11.0 + diff --git a/bsp/buildroot/package/audiofile/0004-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch b/bsp/buildroot/package/audiofile/0004-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch new file mode 100644 index 00000000..21f899a4 --- /dev/null +++ b/bsp/buildroot/package/audiofile/0004-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch @@ -0,0 +1,39 @@ +From 25eb00ce913452c2e614548d7df93070bf0d066f Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:02:31 +0100 +Subject: [PATCH] clamp index values to fix index overflow in IMA.cpp + +This fixes #33 +(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981 +and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/) + +Signed-off-by: Peter Korsgaard +--- + libaudiofile/modules/IMA.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp +index 7476d44..df4aad6 100644 +--- a/libaudiofile/modules/IMA.cpp ++++ b/libaudiofile/modules/IMA.cpp +@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded) + if (encoded[1] & 0x80) + m_adpcmState[c].previousValue -= 0x10000; + +- m_adpcmState[c].index = encoded[2]; ++ m_adpcmState[c].index = clamp(encoded[2], 0, 88); + + *decoded++ = m_adpcmState[c].previousValue; + +@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded) + predictor -= 0x10000; + + state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16); +- state.index = encoded[1] & 0x7f; ++ state.index = clamp(encoded[1] & 0x7f, 0, 88); + encoded += 2; + + for (int n=0; n +Date: Mon, 6 Mar 2017 13:54:52 +0100 +Subject: [PATCH] Check for multiplication overflow in sfconvert + +Checks that a multiplication doesn't overflow when +calculating the buffer size, and if it overflows, +reduce the buffer size instead of failing. + +This fixes the 00192-audiofile-signintoverflow-sfconvert case +in #41 + +Signed-off-by: Peter Korsgaard +--- + sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- + 1 file changed, 32 insertions(+), 2 deletions(-) + +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 80a1bc4..970a3e4 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -45,6 +45,33 @@ void printusage (void); + void usageerror (void); + bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ + int main (int argc, char **argv) + { + if (argc == 2) +@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) + { + int frameSize = afGetVirtualFrameSize(infile, trackid, 1); + +- const int kBufferFrameCount = 65536; +- void *buffer = malloc(kBufferFrameCount * frameSize); ++ int kBufferFrameCount = 65536; ++ int bufferSize; ++ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) ++ kBufferFrameCount /= 2; ++ void *buffer = malloc(bufferSize); + + AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); + AFframecount totalFramesWritten = 0; +-- +2.11.0 + diff --git a/bsp/buildroot/package/audiofile/0006-Actually-fail-when-error-occurs-in-parseFormat.patch b/bsp/buildroot/package/audiofile/0006-Actually-fail-when-error-occurs-in-parseFormat.patch new file mode 100644 index 00000000..0c6be2a2 --- /dev/null +++ b/bsp/buildroot/package/audiofile/0006-Actually-fail-when-error-occurs-in-parseFormat.patch @@ -0,0 +1,42 @@ +From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:59:26 +0100 +Subject: [PATCH] Actually fail when error occurs in parseFormat + +When there's an unsupported number of bits per sample or an invalid +number of samples per block, don't only print an error message using +the error handler, but actually stop parsing the file. + +This fixes #35 (also reported at +https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and +https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/ +) + +Signed-off-by: Peter Korsgaard +--- + libaudiofile/WAVE.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 0e81cf7..d762249 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -326,6 +326,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_NOT_IMPLEMENTED, + "IMA ADPCM compression supports only 4 bits per sample"); ++ return AF_FAIL; + } + + int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount; +@@ -333,6 +334,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_CODEC_CONFIG, + "Invalid samples per block for IMA ADPCM compression"); ++ return AF_FAIL; + } + + track->f.sampleWidth = 16; +-- +2.11.0 + diff --git a/bsp/buildroot/package/audiofile/0007-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch b/bsp/buildroot/package/audiofile/0007-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch new file mode 100644 index 00000000..5411f13b --- /dev/null +++ b/bsp/buildroot/package/audiofile/0007-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch @@ -0,0 +1,122 @@ +From beacc44eb8cdf6d58717ec1a5103c5141f1b37f9 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 13:43:53 +0100 +Subject: [PATCH] Check for multiplication overflow in MSADPCM decodeSample + +Check for multiplication overflow (using __builtin_mul_overflow +if available) in MSADPCM.cpp decodeSample and return an empty +decoded block if an error occurs. + +This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 + +Signed-off-by: Peter Korsgaard +--- + libaudiofile/modules/BlockCodec.cpp | 5 ++-- + libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- + 2 files changed, 46 insertions(+), 6 deletions(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 45925e8..4731be1 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -52,8 +52,9 @@ void BlockCodec::runPull() + // Decompress into m_outChunk. + for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, +- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); ++ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, ++ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) ++ break; + + framesRead += m_framesPerPacket; + } +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index 8ea3c85..ef9c38c 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = + 768, 614, 512, 409, 307, 230, 230, 230 + }; + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ ++ + // Compute a linear PCM value from the given differential coded value. + static int16_t decodeSample(ms_adpcm_state &state, +- uint8_t code, const int16_t *coefficient) ++ uint8_t code, const int16_t *coefficient, bool *ok=NULL) + { + int linearSample = (state.sample1 * coefficient[0] + + state.sample2 * coefficient[1]) >> 8; ++ int delta; + + linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; + + linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); + +- int delta = (state.delta * adaptationTable[code]) >> 8; ++ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) ++ { ++ if (ok) *ok=false; ++ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); ++ return 0; ++ } ++ delta >>= 8; + if (delta < 16) + delta = 16; + + state.delta = delta; + state.sample2 = state.sample1; + state.sample1 = linearSample; ++ if (ok) *ok=true; + + return static_cast(linearSample); + } +@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) + { + uint8_t code; + int16_t newSample; ++ bool ok; + + code = *encoded >> 4; +- newSample = decodeSample(*state[0], code, coefficient[0]); ++ newSample = decodeSample(*state[0], code, coefficient[0], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + code = *encoded & 0x0f; +- newSample = decodeSample(*state[1], code, coefficient[1]); ++ newSample = decodeSample(*state[1], code, coefficient[1], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + encoded++; +-- +2.11.0 + diff --git a/bsp/buildroot/package/audiofile/0008-CVE-2015-7747.patch b/bsp/buildroot/package/audiofile/0008-CVE-2015-7747.patch new file mode 100644 index 00000000..13256123 --- /dev/null +++ b/bsp/buildroot/package/audiofile/0008-CVE-2015-7747.patch @@ -0,0 +1,161 @@ +Description: fix buffer overflow when changing both sample format and + number of channels +Origin: https://github.com/mpruett/audiofile/pull/25 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/audiofile/+bug/1502721 +Bug-Debian: https://bugs.debian.org/801102 + +Downloaded from +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/audiofile/files/audiofile-0.3.6-CVE-2015-7747.patch + +Signed-off-by: Bernd Kuhls + +--- a/libaudiofile/modules/ModuleState.cpp ++++ b/libaudiofile/modules/ModuleState.cpp +@@ -402,7 +402,7 @@ status ModuleState::arrange(AFfilehandle + addModule(new Transform(outfc, in.pcm, out.pcm)); + + if (in.channelCount != out.channelCount) +- addModule(new ApplyChannelMatrix(infc, isReading, ++ addModule(new ApplyChannelMatrix(outfc, isReading, + in.channelCount, out.channelCount, + in.pcm.minClip, in.pcm.maxClip, + track->channelMatrix)); +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -26,6 +26,7 @@ TESTS = \ + VirtualFile \ + floatto24 \ + query2 \ ++ sixteen-stereo-to-eight-mono \ + sixteen-to-eight \ + testchannelmatrix \ + testdouble \ +@@ -139,6 +140,7 @@ printmarkers_SOURCES = printmarkers.c + printmarkers_LDADD = $(LIBAUDIOFILE) -lm + + sixteen_to_eight_SOURCES = sixteen-to-eight.c TestUtilities.cpp TestUtilities.h ++sixteen_stereo_to_eight_mono_SOURCES = sixteen-stereo-to-eight-mono.c TestUtilities.cpp TestUtilities.h + + testchannelmatrix_SOURCES = testchannelmatrix.c TestUtilities.cpp TestUtilities.h + +--- /dev/null ++++ b/test/sixteen-stereo-to-eight-mono.c +@@ -0,0 +1,118 @@ ++/* ++ Audio File Library ++ ++ Copyright 2000, Silicon Graphics, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++*/ ++ ++/* ++ sixteen-stereo-to-eight-mono.c ++ ++ This program tests the conversion from 2-channel 16-bit integers to ++ 1-channel 8-bit integers. ++*/ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "TestUtilities.h" ++ ++int main (int argc, char **argv) ++{ ++ AFfilehandle file; ++ AFfilesetup setup; ++ int16_t frames16[] = {14298, 392, 3923, -683, 958, -1921}; ++ int8_t frames8[] = {28, 6, -2}; ++ int i, frameCount = 3; ++ int8_t byte; ++ AFframecount result; ++ ++ setup = afNewFileSetup(); ++ ++ afInitFileFormat(setup, AF_FILE_WAVE); ++ ++ afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16); ++ afInitChannels(setup, AF_DEFAULT_TRACK, 2); ++ ++ char *testFileName; ++ if (!createTemporaryFile("sixteen-to-eight", &testFileName)) ++ { ++ fprintf(stderr, "Could not create temporary file.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ file = afOpenFile(testFileName, "w", setup); ++ if (file == AF_NULL_FILEHANDLE) ++ { ++ fprintf(stderr, "could not open file for writing\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ afFreeFileSetup(setup); ++ ++ afWriteFrames(file, AF_DEFAULT_TRACK, frames16, frameCount); ++ ++ afCloseFile(file); ++ ++ file = afOpenFile(testFileName, "r", AF_NULL_FILESETUP); ++ if (file == AF_NULL_FILEHANDLE) ++ { ++ fprintf(stderr, "could not open file for reading\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 8); ++ afSetVirtualChannels(file, AF_DEFAULT_TRACK, 1); ++ ++ for (i=0; i +Date: Sat, 27 May 2017 17:53:33 +0200 +Subject: [PATCH 1/1] Fix static linking with libsndfile + +libsndfile and audiofile both contain mixXX functions in their alac +code which lead to symbol name clashes when apps like mpd try to +statically link to both audiofile and libsndfile at the same time. + +This patch renames these functions to avoid the problem which was +detected by the buildroot autobuilders: +http://autobuild.buildroot.net/results/799/7997ccd698f03885f98d00bd150dc3a578e4b161/ + +Patch sent upstream: https://github.com/mpruett/audiofile/pull/45 + +Signed-off-by: Bernd Kuhls +--- + libaudiofile/alac/ALACEncoder.cpp | 28 ++++++++++++++-------------- + libaudiofile/alac/matrix_enc.c | 8 ++++---- + libaudiofile/alac/matrixlib.h | 8 ++++---- + 3 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/libaudiofile/alac/ALACEncoder.cpp b/libaudiofile/alac/ALACEncoder.cpp +index da922c2..3d088cc 100644 +--- a/libaudiofile/alac/ALACEncoder.cpp ++++ b/libaudiofile/alac/ALACEncoder.cpp +@@ -332,19 +332,19 @@ int32_t ALACEncoder::EncodeStereo( BitBuffer * bitstream, void * inputBuffer, ui + switch ( mBitDepth ) + { + case 16: +- mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, mixBits, mixRes ); ++ audiofile_alac_mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, mixBits, mixRes ); + break; + case 20: +- mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, mixBits, mixRes ); ++ audiofile_alac_mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, mixBits, mixRes ); + break; + case 24: + // includes extraction of shifted-off bytes +- mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, ++ audiofile_alac_mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + case 32: + // includes extraction of shifted-off bytes +- mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, ++ audiofile_alac_mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples/dilate, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + } +@@ -379,19 +379,19 @@ int32_t ALACEncoder::EncodeStereo( BitBuffer * bitstream, void * inputBuffer, ui + switch ( mBitDepth ) + { + case 16: +- mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); ++ audiofile_alac_mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); + break; + case 20: +- mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); ++ audiofile_alac_mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); + break; + case 24: + // also extracts the shifted off bytes into the shift buffers +- mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, ++ audiofile_alac_mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + case 32: + // also extracts the shifted off bytes into the shift buffers +- mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, ++ audiofile_alac_mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + } +@@ -605,19 +605,19 @@ int32_t ALACEncoder::EncodeStereoFast( BitBuffer * bitstream, void * inputBuffer + switch ( mBitDepth ) + { + case 16: +- mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); ++ audiofile_alac_mix16( (int16_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); + break; + case 20: +- mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); ++ audiofile_alac_mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, mixBits, mixRes ); + break; + case 24: + // also extracts the shifted off bytes into the shift buffers +- mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, ++ audiofile_alac_mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + case 32: + // also extracts the shifted off bytes into the shift buffers +- mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, ++ audiofile_alac_mix32( (int32_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, + mixBits, mixRes, mShiftBufferUV, bytesShifted ); + break; + } +@@ -756,7 +756,7 @@ int32_t ALACEncoder::EncodeStereoEscape( BitBuffer * bitstream, void * inputBuff + break; + case 20: + // mix20() with mixres param = 0 means de-interleave so use it to simplify things +- mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, 0, 0 ); ++ audiofile_alac_mix20( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, 0, 0 ); + for ( index = 0; index < numSamples; index++ ) + { + BitBufferWrite( bitstream, mMixBufferU[index], 20 ); +@@ -765,7 +765,7 @@ int32_t ALACEncoder::EncodeStereoEscape( BitBuffer * bitstream, void * inputBuff + break; + case 24: + // mix24() with mixres param = 0 means de-interleave so use it to simplify things +- mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, 0, 0, mShiftBufferUV, 0 ); ++ audiofile_alac_mix24( (uint8_t *) inputBuffer, stride, mMixBufferU, mMixBufferV, numSamples, 0, 0, mShiftBufferUV, 0 ); + for ( index = 0; index < numSamples; index++ ) + { + BitBufferWrite( bitstream, mMixBufferU[index], 24 ); +diff --git a/libaudiofile/alac/matrix_enc.c b/libaudiofile/alac/matrix_enc.c +index e194330..8abd556 100644 +--- a/libaudiofile/alac/matrix_enc.c ++++ b/libaudiofile/alac/matrix_enc.c +@@ -57,7 +57,7 @@ + + // 16-bit routines + +-void mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ) ++void audiofile_alac_mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ) + { + int16_t * ip = in; + int32_t j; +@@ -95,7 +95,7 @@ void mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t num + // 20-bit routines + // - the 20 bits of data are left-justified in 3 bytes of storage but right-aligned for input/output predictor buffers + +-void mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ) ++void audiofile_alac_mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ) + { + int32_t l, r; + uint8_t * ip = in; +@@ -140,7 +140,7 @@ void mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t num + // 24-bit routines + // - the 24 bits of data are right-justified in the input/output predictor buffers + +-void mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, ++void audiofile_alac_mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ) + { + int32_t l, r; +@@ -240,7 +240,7 @@ void mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t num + // - otherwise, the calculations might overflow into the 33rd bit and be lost + // - therefore, these routines deal with the specified "unused lower" bytes in the "shift" buffers + +-void mix32( int32_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, ++void audiofile_alac_mix32( int32_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ) + { + int32_t * ip = in; +diff --git a/libaudiofile/alac/matrixlib.h b/libaudiofile/alac/matrixlib.h +index 0a4f371..5728b6d 100644 +--- a/libaudiofile/alac/matrixlib.h ++++ b/libaudiofile/alac/matrixlib.h +@@ -38,17 +38,17 @@ extern "C" { + #endif + + // 16-bit routines +-void mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ); ++void audiofile_alac_mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ); + void unmix16( int32_t * u, int32_t * v, int16_t * out, uint32_t stride, int32_t numSamples, int32_t mixbits, int32_t mixres ); + + // 20-bit routines +-void mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ); ++void audiofile_alac_mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres ); + void unmix20( int32_t * u, int32_t * v, uint8_t * out, uint32_t stride, int32_t numSamples, int32_t mixbits, int32_t mixres ); + + // 24-bit routines + // - 24-bit data sometimes compresses better by shifting off the bottom byte so these routines deal with + // the specified "unused lower bytes" in the combined "shift" buffer +-void mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, ++void audiofile_alac_mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ); + void unmix24( int32_t * u, int32_t * v, uint8_t * out, uint32_t stride, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ); +@@ -57,7 +57,7 @@ void unmix24( int32_t * u, int32_t * v, uint8_t * out, uint32_t stride, int32_t + // - note that these really expect the internal data width to be < 32-bit but the arrays are 32-bit + // - otherwise, the calculations might overflow into the 33rd bit and be lost + // - therefore, these routines deal with the specified "unused lower" bytes in the combined "shift" buffer +-void mix32( int32_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, ++void audiofile_alac_mix32( int32_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ); + void unmix32( int32_t * u, int32_t * v, int32_t * out, uint32_t stride, int32_t numSamples, + int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted ); +-- +2.11.0 + diff --git a/bsp/buildroot/package/bash/bash.mk b/bsp/buildroot/package/bash/bash.mk index 090cf522..0f42fd16 100644 --- a/bsp/buildroot/package/bash/bash.mk +++ b/bsp/buildroot/package/bash/bash.mk @@ -9,7 +9,7 @@ BASH_SITE = $(BR2_GNU_MIRROR)/bash # Build after since bash is better than busybox shells BASH_DEPENDENCIES = ncurses readline host-bison \ $(if $(BR2_PACKAGE_BUSYBOX),busybox) -BASH_CONF_OPTS = --with-installed-readline +BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc BASH_LICENSE = GPLv3+ BASH_LICENSE_FILES = COPYING @@ -24,7 +24,7 @@ BASH_CONF_ENV += \ # The static build needs some trickery ifeq ($(BR2_STATIC_LIBS),y) -BASH_CONF_OPTS += --enable-static-link --without-bash-malloc +BASH_CONF_OPTS += --enable-static-link # bash wants to redefine the getenv() function. To check whether this is # possible, AC_TRY_RUN is used which is not possible in # cross-compilation. diff --git a/bsp/buildroot/package/bind/bind.hash b/bsp/buildroot/package/bind/bind.hash index 780e43b9..8d44d996 100644 --- a/bsp/buildroot/package/bind/bind.hash +++ b/bsp/buildroot/package/bind/bind.hash @@ -1,2 +1,2 @@ -# Verified from http://ftp.isc.org/isc/bind9/9.11.0-P3/bind-9.11.0-P3.tar.gz.sha256.asc -sha256 0feee0374bcbdee73a9d4277f3c5007622279572d520d7c27a4b64015d8ca9e9 bind-9.11.0-P3.tar.gz +# Verified from http://ftp.isc.org/isc/bind9/9.11.0-P5/bind-9.11.0-P5.tar.gz.sha256.asc +sha256 1e283f0567b484687dfd7b936e26c9af4f64043daf73cbd8f3eb1122c9fb71f5 bind-9.11.0-P5.tar.gz diff --git a/bsp/buildroot/package/bind/bind.mk b/bsp/buildroot/package/bind/bind.mk index 860ee9d5..2903a316 100644 --- a/bsp/buildroot/package/bind/bind.mk +++ b/bsp/buildroot/package/bind/bind.mk @@ -4,7 +4,7 @@ # ################################################################################ -BIND_VERSION = 9.11.0-P3 +BIND_VERSION = 9.11.0-P5 BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION) # bind does not support parallel builds. BIND_MAKE = $(MAKE1) @@ -29,7 +29,6 @@ BIND_CONF_OPTS = \ --enable-epoll \ --with-libtool \ --with-gssapi=no \ - --enable-rrl \ --enable-filter-aaaa ifeq ($(BR2_PACKAGE_ZLIB),y) diff --git a/bsp/buildroot/package/bluez_utils/0004-test-add-missing-header.patch b/bsp/buildroot/package/bluez_utils/0004-test-add-missing-header.patch new file mode 100644 index 00000000..c74afb83 --- /dev/null +++ b/bsp/buildroot/package/bluez_utils/0004-test-add-missing-header.patch @@ -0,0 +1,34 @@ +From d3c098c2fde55ddf0c7d56eae56925103d35da73 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 13 May 2017 18:56:51 +0200 +Subject: [PATCH] test: add missing header + +test/attest.c: In function 'at_command': +test/attest.c:43:2: error: unknown type name 'fd_set' + fd_set rfds; + ^ + +Fixes: +http://autobuild.buildroot.net/results/06c/06c930d9c5299b79500d018ac3fb2861ce834c7c/ + +Signed-off-by: Romain Naour +--- + test/attest.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/attest.c b/test/attest.c +index 12ba682..2626cf1 100644 +--- a/test/attest.c ++++ b/test/attest.c +@@ -35,6 +35,8 @@ + #include + #include + ++#include ++ + #include + #include + +-- +2.9.3 + diff --git a/bsp/buildroot/package/bluez_utils/0005-test-avoid-conflict-with-encrypt-function.patch b/bsp/buildroot/package/bluez_utils/0005-test-avoid-conflict-with-encrypt-function.patch new file mode 100644 index 00000000..438da97c --- /dev/null +++ b/bsp/buildroot/package/bluez_utils/0005-test-avoid-conflict-with-encrypt-function.patch @@ -0,0 +1,107 @@ +From d8056252d0c99bfb2482f0a420dcf9a36019ddf8 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 13 May 2017 18:58:51 +0200 +Subject: [PATCH] test: avoid conflict with encrypt function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With a musl based toolchain: + +test/l2test.c:110:12: error: ‘encrypt’ redeclared as different kind of symbol + static int encrypt = 0; + ^ +In file included from test/l2test.c:34:0: +[...]/sysroot/usr/include/unistd.h:145:6: note: previous declaration of ‘encrypt’ was here + void encrypt(char *, int); + ^ + +Signed-off-by: Romain Naour +--- + test/l2test.c | 8 ++++---- + test/rctest.c | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/test/l2test.c b/test/l2test.c +index f66486d..9ef6faf 100644 +--- a/test/l2test.c ++++ b/test/l2test.c +@@ -107,7 +107,7 @@ static char *filename = NULL; + static int rfcmode = 0; + static int master = 0; + static int auth = 0; +-static int encrypt = 0; ++static int _encrypt = 0; + static int secure = 0; + static int socktype = SOCK_SEQPACKET; + static int linger = 0; +@@ -340,7 +340,7 @@ static int do_connect(char *svr) + opt |= L2CAP_LM_MASTER; + if (auth) + opt |= L2CAP_LM_AUTH; +- if (encrypt) ++ if (_encrypt) + opt |= L2CAP_LM_ENCRYPT; + if (secure) + opt |= L2CAP_LM_SECURE; +@@ -475,7 +475,7 @@ static void do_listen(void (*handler)(int sk)) + opt |= L2CAP_LM_MASTER; + if (auth) + opt |= L2CAP_LM_AUTH; +- if (encrypt) ++ if (_encrypt) + opt |= L2CAP_LM_ENCRYPT; + if (secure) + opt |= L2CAP_LM_SECURE; +@@ -1407,7 +1407,7 @@ int main(int argc, char *argv[]) + break; + + case 'E': +- encrypt = 1; ++ _encrypt = 1; + break; + + case 'S': +diff --git a/test/rctest.c b/test/rctest.c +index 4d7c90a..7ad5a0b 100644 +--- a/test/rctest.c ++++ b/test/rctest.c +@@ -79,7 +79,7 @@ static char *filename = NULL; + + static int master = 0; + static int auth = 0; +-static int encrypt = 0; ++static int _encrypt = 0; + static int secure = 0; + static int socktype = SOCK_STREAM; + static int linger = 0; +@@ -200,7 +200,7 @@ static int do_connect(const char *svr) + opt |= RFCOMM_LM_MASTER; + if (auth) + opt |= RFCOMM_LM_AUTH; +- if (encrypt) ++ if (_encrypt) + opt |= RFCOMM_LM_ENCRYPT; + if (secure) + opt |= RFCOMM_LM_SECURE; +@@ -291,7 +291,7 @@ static void do_listen(void (*handler)(int sk)) + opt |= RFCOMM_LM_MASTER; + if (auth) + opt |= RFCOMM_LM_AUTH; +- if (encrypt) ++ if (_encrypt) + opt |= RFCOMM_LM_ENCRYPT; + if (secure) + opt |= RFCOMM_LM_SECURE; +@@ -701,7 +701,7 @@ int main(int argc, char *argv[]) + break; + + case 'E': +- encrypt = 1; ++ _encrypt = 1; + break; + + case 'S': +-- +2.9.3 + diff --git a/bsp/buildroot/package/bluez_utils/Config.in b/bsp/buildroot/package/bluez_utils/Config.in index 38481626..86c9085e 100644 --- a/bsp/buildroot/package/bluez_utils/Config.in +++ b/bsp/buildroot/package/bluez_utils/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_BLUEZ_UTILS depends on BR2_USE_WCHAR # libglib2 depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 depends on BR2_USE_MMU # dbus, libglib2 + select BR2_PACKAGE_CHECK select BR2_PACKAGE_DBUS select BR2_PACKAGE_LIBGLIB2 help diff --git a/bsp/buildroot/package/bluez_utils/bluez_utils.mk b/bsp/buildroot/package/bluez_utils/bluez_utils.mk index 1c93f2e5..bd12cd55 100644 --- a/bsp/buildroot/package/bluez_utils/bluez_utils.mk +++ b/bsp/buildroot/package/bluez_utils/bluez_utils.mk @@ -8,7 +8,7 @@ BLUEZ_UTILS_VERSION = 4.101 BLUEZ_UTILS_SOURCE = bluez-$(BLUEZ_UTILS_VERSION).tar.xz BLUEZ_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth BLUEZ_UTILS_INSTALL_STAGING = YES -BLUEZ_UTILS_DEPENDENCIES = dbus libglib2 +BLUEZ_UTILS_DEPENDENCIES = host-pkgconf check dbus libglib2 BLUEZ_UTILS_CONF_OPTS = --enable-test --enable-tools BLUEZ_UTILS_AUTORECONF = YES BLUEZ_UTILS_LICENSE = GPLv2+, LGPLv2.1+ diff --git a/bsp/buildroot/package/busybox/mdev.conf b/bsp/buildroot/package/busybox/mdev.conf index 241c1c27..eaece1b7 100644 --- a/bsp/buildroot/package/busybox/mdev.conf +++ b/bsp/buildroot/package/busybox/mdev.conf @@ -23,17 +23,17 @@ ttyS[0-9]* root:root 660 ttyUSB[0-9]* root:root 660 # alsa sound devices -pcm.* root:audio 660 =snd/ -control.* root:audio 660 =snd/ -midi.* root:audio 660 =snd/ -seq root:audio 660 =snd/ -timer root:audio 660 =snd/ +snd/pcm.* root:audio 660 +snd/control.* root:audio 660 +snd/midi.* root:audio 660 +snd/seq root:audio 660 +snd/timer root:audio 660 # input stuff -event[0-9]+ root:root 640 =input/ -mice root:root 640 =input/ -mouse[0-9] root:root 640 =input/ -ts[0-9] root:root 600 =input/ +input/event[0-9]+ root:root 640 +input/mice root:root 640 +input/mouse[0-9] root:root 640 +input/ts[0-9] root:root 600 # load modules $MODALIAS=.* root:root 660 @modprobe "$MODALIAS" diff --git a/bsp/buildroot/package/cairo/cairo.mk b/bsp/buildroot/package/cairo/cairo.mk index 761c6f4d..ac91a56f 100644 --- a/bsp/buildroot/package/cairo/cairo.mk +++ b/bsp/buildroot/package/cairo/cairo.mk @@ -6,8 +6,8 @@ CAIRO_VERSION = 1.14.8 CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz -CAIRO_LICENSE = LGPLv2.1+ -CAIRO_LICENSE_FILES = COPYING +CAIRO_LICENSE = LGPLv2.1 or MPLv1.1 (library) +CAIRO_LICENSE_FILES = COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 CAIRO_SITE = http://cairographics.org/releases CAIRO_INSTALL_STAGING = YES CAIRO_AUTORECONF = YES diff --git a/bsp/buildroot/package/cppcms/cppcms.mk b/bsp/buildroot/package/cppcms/cppcms.mk index 611020c5..d908d7ba 100644 --- a/bsp/buildroot/package/cppcms/cppcms.mk +++ b/bsp/buildroot/package/cppcms/cppcms.mk @@ -11,6 +11,10 @@ CPPCMS_LICENSE_FILES = COPYING.TXT CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION) CPPCMS_INSTALL_STAGING = YES +# disable rpath to avoid getting /usr/lib added to the link search +# path +CPPCMS_CONF_OPTS = -DCMAKE_SKIP_RPATH=ON + CPPCMS_DEPENDENCIES = zlib pcre libgcrypt ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y) diff --git a/bsp/buildroot/package/dbus-cpp/0002-cross-compile-tools.patch b/bsp/buildroot/package/dbus-cpp/0002-cross-compile-tools.patch new file mode 100644 index 00000000..39eff314 --- /dev/null +++ b/bsp/buildroot/package/dbus-cpp/0002-cross-compile-tools.patch @@ -0,0 +1,34 @@ +tools: just do proper cross-compile + +Those tools are not used during the build; besides, they are installed. + +So they don't need to not be cross-compiled. + +Signed-off-by: "Yann E. MORIN" + +--- +Upstream status: not submitted, upstream is dead. + +diff -durN dbus-cpp-0.9.0.orig/tools/Makefile.am dbus-cpp-0.9.0/tools/Makefile.am +--- dbus-cpp-0.9.0.orig/tools/Makefile.am 2017-03-21 21:48:57.013409423 +0100 ++++ dbus-cpp-0.9.0/tools/Makefile.am 2017-03-21 21:49:35.329979798 +0100 +@@ -1,7 +1,3 @@ +-# hacky, but ... +- +-CXX = $(CXX_FOR_BUILD) +- + AM_CPPFLAGS = \ + $(dbus_CFLAGS) \ + $(xml_CFLAGS) \ +@@ -9,11 +3,7 @@ + -I$(top_builddir)/include \ + -Wall + +-if CROSS_COMPILING +-libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la +-else + libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la +-endif + + bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect + diff --git a/bsp/buildroot/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch b/bsp/buildroot/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch deleted file mode 100644 index fefb9690..00000000 --- a/bsp/buildroot/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch +++ /dev/null @@ -1,32 +0,0 @@ -Use CXXFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for the tools since expat -may not be living in the default include & library path. - -Signed-off-by: Gustavo Zacarias - -diff -Nura libdbus-c++-0.9.0.orig/configure.ac libdbus-c++-0.9.0/configure.ac ---- libdbus-c++-0.9.0.orig/configure.ac 2014-01-05 15:28:03.653886567 -0300 -+++ libdbus-c++-0.9.0/configure.ac 2014-01-05 15:44:32.571172225 -0300 -@@ -65,7 +65,11 @@ - AC_PROG_CXX - - CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}} -+CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} -+LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} - AC_SUBST(CXX_FOR_BUILD) -+AC_SUBST(CXXFLAGS_FOR_BUILD) -+AC_SUBST(LDFLAGS_FOR_BUILD) - - AM_PROG_LIBTOOL - -diff -Nura libdbus-c++-0.9.0.orig/tools/Makefile.am libdbus-c++-0.9.0/tools/Makefile.am ---- libdbus-c++-0.9.0.orig/tools/Makefile.am 2014-01-05 15:28:03.652886535 -0300 -+++ libdbus-c++-0.9.0/tools/Makefile.am 2014-01-05 15:44:42.071482390 -0300 -@@ -1,6 +1,8 @@ - # hacky, but ... - - CXX = $(CXX_FOR_BUILD) -+CXXFLAGS = $(CXXFLAGS_FOR_BUILD) -+LDFLAGS = $(LDFLAGS_FOR_BUILD) - - AM_CPPFLAGS = \ - $(dbus_CFLAGS) \ diff --git a/bsp/buildroot/package/dbus-glib/dbus-glib.mk b/bsp/buildroot/package/dbus-glib/dbus-glib.mk index 4a1e4b40..5a6f5a08 100644 --- a/bsp/buildroot/package/dbus-glib/dbus-glib.mk +++ b/bsp/buildroot/package/dbus-glib/dbus-glib.mk @@ -7,7 +7,7 @@ DBUS_GLIB_VERSION = 0.108 DBUS_GLIB_SITE = http://dbus.freedesktop.org/releases/dbus-glib DBUS_GLIB_INSTALL_STAGING = YES -DBUS_GLIB_LICENSE = AFLv2.1, GPLv2+ +DBUS_GLIB_LICENSE = AFLv2.1 or GPLv2+ DBUS_GLIB_LICENSE_FILES = COPYING DBUS_GLIB_CONF_ENV = \ diff --git a/bsp/buildroot/package/dbus-triggerd/dbus-triggerd.mk b/bsp/buildroot/package/dbus-triggerd/dbus-triggerd.mk index 48d5fb29..0d693b48 100644 --- a/bsp/buildroot/package/dbus-triggerd/dbus-triggerd.mk +++ b/bsp/buildroot/package/dbus-triggerd/dbus-triggerd.mk @@ -7,6 +7,7 @@ DBUS_TRIGGERD_VERSION = ba3dbec805cb707c94c54de21666bf18b79bcc09 DBUS_TRIGGERD_SITE = git://rg42.org/dbustriggerd.git DBUS_TRIGGERD_LICENSE = GPLv2+ +DBUS_TRIGGERD_LICENSE_FILES = dbus-triggerd.c DBUS_TRIGGERD_DEPENDENCIES = host-pkgconf dbus define DBUS_TRIGGERD_BUILD_CMDS diff --git a/bsp/buildroot/package/dbus/dbus.mk b/bsp/buildroot/package/dbus/dbus.mk index 2d1583e5..66b90bca 100644 --- a/bsp/buildroot/package/dbus/dbus.mk +++ b/bsp/buildroot/package/dbus/dbus.mk @@ -82,7 +82,7 @@ define DBUS_REMOVE_VAR_LIB_DBUS rm -rf $(TARGET_DIR)/var/lib/dbus endef -DBUS_POST_BUILD_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS +DBUS_PRE_INSTALL_TARGET_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS define DBUS_REMOVE_DEVFILES rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0 diff --git a/bsp/buildroot/package/dhcp/dhcp.mk b/bsp/buildroot/package/dhcp/dhcp.mk index 4d2cb063..45cae087 100644 --- a/bsp/buildroot/package/dhcp/dhcp.mk +++ b/bsp/buildroot/package/dhcp/dhcp.mk @@ -102,6 +102,7 @@ define DHCP_INSTALL_INIT_SYSTEMD ln -sf ../../../../usr/lib/systemd/system/dhcpd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service + mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d echo "d /var/lib/dhcp 0755 - - - -" > \ $(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf echo "f /var/lib/dhcp/dhcpd.leases - - - - -" >> \ diff --git a/bsp/buildroot/package/domoticz/domoticz.mk b/bsp/buildroot/package/domoticz/domoticz.mk index f43dbda4..48cdbc41 100644 --- a/bsp/buildroot/package/domoticz/domoticz.mk +++ b/bsp/buildroot/package/domoticz/domoticz.mk @@ -18,6 +18,21 @@ DOMOTICZ_DEPENDENCIES = \ sqlite \ zlib +# Fixes: +# http://autobuild.buildroot.org/results/454c0ea393615bae2d1b44be9920f25b5c49fc33 +# There is an issue with powerpc64le and boost::uuids::random_generator on the +# following line of code (from include/boost/uuid/seed_rng.hpp): +# sha.process_bytes( (unsigned char const*)&std::rand, sizeof( void(*)() ) ) +# This line "inspects the first couple bytes (here eight) of the std::rand +# function to seed some rng. Due to the implementation of process_bytes and +# inlining happening, it seems that one of the loops therein uses &rand-1 as +# some boundary, compiling with -O0 makes that reloc come out as 'rand + 0' and +# the link will succeed." +# See: https://bugzilla.suse.com/show_bug.cgi?id=955832#c7 +ifeq ($(BR2_powerpc64le),y) +DOMOTICZ_CXXFLAGS += -O0 +endif + # Due to the dependency on mosquitto, domoticz depends on # !BR2_STATIC_LIBS so set USE_STATIC_BOOST to OFF DOMOTICZ_CONF_OPTS += -DUSE_STATIC_BOOST=OFF @@ -27,7 +42,8 @@ DOMOTICZ_CONF_OPTS += -DUSE_STATIC_BOOST=OFF DOMOTICZ_CONF_OPTS += \ -DUSE_BUILTIN_LUA=OFF \ -DUSE_BUILTIN_SQLITE=OFF \ - -DUSE_BUILTIN_MQTT=OFF + -DUSE_BUILTIN_MQTT=OFF \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) $(DOMOTICZ_CXXFLAGS)" ifeq ($(BR2_PACKAGE_LIBUSB),y) DOMOTICZ_DEPENDENCIES += libusb diff --git a/bsp/buildroot/package/dovecot/dovecot.hash b/bsp/buildroot/package/dovecot/dovecot.hash index e7b9c337..46e7c5aa 100644 --- a/bsp/buildroot/package/dovecot/dovecot.hash +++ b/bsp/buildroot/package/dovecot/dovecot.hash @@ -1,2 +1,2 @@ # Locally computed after checking signature -sha256 897f92a87cda4b27b243f8149ce0ba7b7e71a2be8fb7994eb0a025e54cde18e9 dovecot-2.2.27.tar.gz +sha256 ccfa9ffb7eb91e9e87c21c108324b911250c9ffa838bffb64b1caafadcb0f388 dovecot-2.2.29.1.tar.gz diff --git a/bsp/buildroot/package/dovecot/dovecot.mk b/bsp/buildroot/package/dovecot/dovecot.mk index fe0afa50..36a64948 100644 --- a/bsp/buildroot/package/dovecot/dovecot.mk +++ b/bsp/buildroot/package/dovecot/dovecot.mk @@ -5,7 +5,7 @@ ################################################################################ DOVECOT_VERSION_MAJOR = 2.2 -DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).27 +DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).29.1 DOVECOT_SITE = http://www.dovecot.org/releases/$(DOVECOT_VERSION_MAJOR) DOVECOT_INSTALL_STAGING = YES DOVECOT_LICENSE = LGPLv2.1 diff --git a/bsp/buildroot/package/dropbear/dropbear.hash b/bsp/buildroot/package/dropbear/dropbear.hash index 88f3e6ed..98776e71 100644 --- a/bsp/buildroot/package/dropbear/dropbear.hash +++ b/bsp/buildroot/package/dropbear/dropbear.hash @@ -1,2 +1,2 @@ # From https://matt.ucc.asn.au/dropbear/releases/SHA256SUM.asc -sha256 2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891 dropbear-2016.74.tar.bz2 +sha256 6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c dropbear-2017.75.tar.bz2 diff --git a/bsp/buildroot/package/dropbear/dropbear.mk b/bsp/buildroot/package/dropbear/dropbear.mk index 743d5247..144619f2 100644 --- a/bsp/buildroot/package/dropbear/dropbear.mk +++ b/bsp/buildroot/package/dropbear/dropbear.mk @@ -4,7 +4,7 @@ # ################################################################################ -DROPBEAR_VERSION = 2016.74 +DROPBEAR_VERSION = 2017.75 DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2 DROPBEAR_LICENSE = MIT, BSD-2c-like, BSD-2c diff --git a/bsp/buildroot/package/efibootmgr/efibootmgr.hash b/bsp/buildroot/package/efibootmgr/efibootmgr.hash index f71dced5..3f934bad 100644 --- a/bsp/buildroot/package/efibootmgr/efibootmgr.hash +++ b/bsp/buildroot/package/efibootmgr/efibootmgr.hash @@ -1,2 +1,3 @@ # locally computed hash sha256 3f260491e2c62e93cb6347ea6f21aaa5f93152e9e7f0269d314623769d82e473 efibootmgr-14.tar.gz +sha256 8e91f16927d296ffebd4f7fafda2f84c0f6201aba089a35e8090abd5aacdc58e 3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch diff --git a/bsp/buildroot/package/efibootmgr/efibootmgr.mk b/bsp/buildroot/package/efibootmgr/efibootmgr.mk index 487c8ca6..7f5f4940 100644 --- a/bsp/buildroot/package/efibootmgr/efibootmgr.mk +++ b/bsp/buildroot/package/efibootmgr/efibootmgr.mk @@ -6,6 +6,9 @@ EFIBOOTMGR_VERSION = 14 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION)) +# Patch fixes the build with gcc 6.x. +EFIBOOTMGR_PATCH = \ + https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch EFIBOOTMGR_LICENSE = GPLv2+ EFIBOOTMGR_LICENSE_FILES = COPYING EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext) diff --git a/bsp/buildroot/package/efl/Config.in b/bsp/buildroot/package/efl/Config.in index 5e89af60..a91609d5 100644 --- a/bsp/buildroot/package/efl/Config.in +++ b/bsp/buildroot/package/efl/Config.in @@ -179,12 +179,14 @@ config BR2_PACKAGE_EFL_WAYLAND depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # Evas DRM Engine depends on BR2_PACKAGE_EFL_EEZE # efl drm depends on BR2_PACKAGE_EFL_OPENGLES # OpenGL ES with EGL support only + depends on BR2_ENABLE_LOCALE # efl-drm <- efl-elput <- libinput select BR2_PACKAGE_EFL_DRM -comment "Wayland support needs udev /dev management (eeze) and OpenGL ES w/ EGL, threads" +comment "Wayland support needs udev /dev management (eeze), OpenGL ES w/ EGL, threads, locales" depends on BR2_PACKAGE_WAYLAND depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL \ - || !BR2_PACKAGE_EFL_OPENGLES || !BR2_PACKAGE_EFL_EEZE + || !BR2_PACKAGE_EFL_OPENGLES || !BR2_PACKAGE_EFL_EEZE \ + || !BR2_ENABLE_LOCALE choice bool "OpenGL support" @@ -216,6 +218,7 @@ endchoice # OpenGL support config BR2_PACKAGE_EFL_ELPUT bool "Elput" + depends on BR2_ENABLE_LOCALE # libinput depends on BR2_PACKAGE_EFL_EEZE select BR2_PACKAGE_LIBINPUT select BR2_PACKAGE_LIBXKBCOMMON @@ -225,23 +228,24 @@ config BR2_PACKAGE_EFL_ELPUT ecore_drm, etc) to handle interfacing with libinput without having to duplicate the code in each subsystem. -comment "Elput support needs udev /dev management (eeze)" - depends on !BR2_PACKAGE_EFL_EEZE +comment "Elput support needs udev /dev management (eeze), locales" + depends on !BR2_PACKAGE_EFL_EEZE || !BR2_ENABLE_LOCALE config BR2_PACKAGE_EFL_DRM bool "Evas DRM Engine" depends on BR2_PACKAGE_EFL_EEZE depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # require libgbm from mesa3d + depends on BR2_ENABLE_LOCALE # efl-elput <- libinput select BR2_PACKAGE_EFL_ELPUT select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_LIBXKBCOMMON help This option enable building support for the Evas DRM Engine. -comment "Evas DRM Engine needs udev /dev management (eeze) and mesa3d w/ EGL support, threads" +comment "Evas DRM Engine needs udev /dev management (eeze), mesa3d w/ EGL support, threads, locales" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL \ - || !BR2_PACKAGE_EFL_EEZE + || !BR2_PACKAGE_EFL_EEZE || !BR2_ENABLE_LOCALE comment "libevas loaders" diff --git a/bsp/buildroot/package/elfutils/0002-disable-progs.patch b/bsp/buildroot/package/elfutils/0002-disable-progs.patch index ea6b934d..3f80fe60 100644 --- a/bsp/buildroot/package/elfutils/0002-disable-progs.patch +++ b/bsp/buildroot/package/elfutils/0002-disable-progs.patch @@ -1,4 +1,7 @@ -Add a --{enable,disable}-progs configure option +From dfea82b761b2ea4708fbf9370a5467ae4be525ca Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 May 2017 23:03:48 +0300 +Subject: [PATCH] Add a --{enable,disable}-progs configure option Add a --{enable,disable}-progs configuration option to elfutils. This allows to selectively disable the compilation of the elfutils programs @@ -13,26 +16,15 @@ Based on the former patch by Thomas Petazzoni. Signed-off-by: Thomas Petazzoni Signed-off-by: Vicente Olivert Riera +--- + Makefile.am | 6 +++++- + configure.ac | 6 ++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) -diff -rup a/configure.ac b/configure.ac ---- a/configure.ac 2016-03-31 09:48:08.000000000 +0100 -+++ b/configure.ac 2016-06-17 14:47:03.561704498 +0100 -@@ -253,6 +253,12 @@ AC_SUBST([LIBEBL_SUBDIR]) - AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR") - AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.]) - -+AC_ARG_ENABLE([progs], -+ AS_HELP_STRING([--enable-progs], [enable progs]), -+ enable_progs=$enableval, -+ enable_progs=yes) -+AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) -+ - dnl zlib is mandatory. - save_LIBS="$LIBS" - LIBS= -diff -rup a/Makefile.am b/Makefile.am ---- a/Makefile.am 2016-01-12 12:49:19.000000000 +0000 -+++ b/Makefile.am 2016-06-17 14:48:02.585861468 +0100 +diff --git a/Makefile.am b/Makefile.am +index 2ff444e7bf1d..70443abb4fb6 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -26,9 +26,13 @@ AM_MAKEFLAGS = --no-print-directory pkginclude_HEADERS = version.h @@ -48,3 +40,23 @@ diff -rup a/Makefile.am b/Makefile.am EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ COPYING COPYING-GPLV2 COPYING-LGPLV3 +diff --git a/configure.ac b/configure.ac +index c2c1d90b2133..7b4c38381cca 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -259,6 +259,12 @@ AC_SUBST([LIBEBL_SUBDIR]) + AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR") + AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.]) + ++AC_ARG_ENABLE([progs], ++ AS_HELP_STRING([--enable-progs], [enable progs]), ++ enable_progs=$enableval, ++ enable_progs=yes) ++AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) ++ + dnl zlib is mandatory. + save_LIBS="$LIBS" + LIBS= +-- +2.11.0 + diff --git a/bsp/buildroot/package/elfutils/0003-fts.patch b/bsp/buildroot/package/elfutils/0003-fts.patch index 0131b750..cf5ba25c 100644 --- a/bsp/buildroot/package/elfutils/0003-fts.patch +++ b/bsp/buildroot/package/elfutils/0003-fts.patch @@ -1,4 +1,7 @@ -Add an implementation of the fts_*() functions +From 098760f7eac1fb86b3f6871d5bb10f9f44468f2d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 May 2017 23:08:05 +0300 +Subject: [PATCH] Add an implementation of the fts_*() functions The fts_*() functions are optional in uClibc, and not compiled in our default configuration. The best option would be to migrate this @@ -28,11 +31,21 @@ Based on the former patch by Thomas Petazzoni. Signed-off-by: Thomas Petazzoni Signed-off-by: Vicente Olivert Riera +--- + configure.ac | 4 + + libdwfl/Makefile.am | 3 + + libdwfl/fts.c | 1095 ++++++++++++++++++++++++++++++++++++++++ + libdwfl/fts_.h | 131 +++++ + libdwfl/linux-kernel-modules.c | 4 + + 5 files changed, 1237 insertions(+) + create mode 100644 libdwfl/fts.c + create mode 100644 libdwfl/fts_.h -diff -Nrup a/configure.ac b/configure.ac ---- a/configure.ac 2016-06-17 14:47:03.561704498 +0100 -+++ b/configure.ac 2016-06-17 14:52:35.038200412 +0100 -@@ -259,6 +259,10 @@ AC_ARG_ENABLE([progs], +diff --git a/configure.ac b/configure.ac +index 7b4c38381cca..bcebb05fa532 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -265,6 +265,10 @@ AC_ARG_ENABLE([progs], enable_progs=yes) AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) @@ -43,9 +56,25 @@ diff -Nrup a/configure.ac b/configure.ac dnl zlib is mandatory. save_LIBS="$LIBS" LIBS= -diff -Nrup a/libdwfl/fts.c b/libdwfl/fts.c ---- a/libdwfl/fts.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/libdwfl/fts.c 2016-06-17 14:57:26.649912084 +0100 +diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am +index 89ca92ed8110..a5a5615c5f94 100644 +--- a/libdwfl/Makefile.am ++++ b/libdwfl/Makefile.am +@@ -77,6 +77,9 @@ endif + if LZMA + libdwfl_a_SOURCES += lzma.c + endif ++if !HAVE_FTS ++libdwfl_a_SOURCES += fts.c ++endif + + libdwfl = $(libdw) + libdw = ../libdw/libdw.so +diff --git a/libdwfl/fts.c b/libdwfl/fts.c +new file mode 100644 +index 000000000000..f34cc03bd963 +--- /dev/null ++++ b/libdwfl/fts.c @@ -0,0 +1,1095 @@ +/*- + * Copyright (c) 1990, 1993, 1994 @@ -1142,9 +1171,11 @@ diff -Nrup a/libdwfl/fts.c b/libdwfl/fts.c + errno = oerrno; + return (ret); +} -diff -Nrup a/libdwfl/fts_.h b/libdwfl/fts_.h ---- a/libdwfl/fts_.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/libdwfl/fts_.h 2016-06-17 14:58:42.003387566 +0100 +diff --git a/libdwfl/fts_.h b/libdwfl/fts_.h +new file mode 100644 +index 000000000000..0a070ba8dce5 +--- /dev/null ++++ b/libdwfl/fts_.h @@ -0,0 +1,131 @@ +/* + * Copyright (c) 1989, 1993 @@ -1277,31 +1308,25 @@ diff -Nrup a/libdwfl/fts_.h b/libdwfl/fts_.h +__END_DECLS + +#endif /* fts.h */ -diff -Nrup a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c ---- a/libdwfl/linux-kernel-modules.c 2016-03-02 16:25:38.000000000 +0000 -+++ b/libdwfl/linux-kernel-modules.c 2016-06-17 14:59:50.267724089 +0100 -@@ -29,7 +29,11 @@ - /* We include this before config.h because it can't handle _FILE_OFFSET_BITS. - Everything we need here is fine if its declarations just come first. */ - +diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c +index 9d0fef2cf260..47f0e3892294 100644 +--- a/libdwfl/linux-kernel-modules.c ++++ b/libdwfl/linux-kernel-modules.c +@@ -31,10 +31,14 @@ + Everything we need here is fine if its declarations just come first. + Also, include sys/types.h before fts. On some systems fts.h is not self + contained. */ +#ifdef HAVE_FTS_H - #include + #ifdef BAD_FTS + #include + #include + #endif +#else +#include +#endif #include - -diff -Nrup a/libdwfl/Makefile.am b/libdwfl/Makefile.am ---- a/libdwfl/Makefile.am 2016-01-12 12:49:19.000000000 +0000 -+++ b/libdwfl/Makefile.am 2016-06-17 15:01:03.492157569 +0100 -@@ -77,6 +77,9 @@ endif - if LZMA - libdwfl_a_SOURCES += lzma.c - endif -+if !HAVE_FTS -+libdwfl_a_SOURCES += fts.c -+endif - - libdwfl = $(libdw) - libdw = ../libdw/libdw.so + #include +-- +2.11.0 + diff --git a/bsp/buildroot/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch b/bsp/buildroot/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch index aa4d12d6..a7017d6e 100644 --- a/bsp/buildroot/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch +++ b/bsp/buildroot/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch @@ -1,4 +1,7 @@ -Really make -Werror conditional to BUILD_WERROR +From 1d8f27d73df6369b19ddd6732960df0d4fdec338 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Mon, 29 May 2017 23:24:42 +0300 +Subject: [PATCH] Really make -Werror conditional to BUILD_WERROR Otherwise it will fail with an error message like this one: @@ -12,15 +15,22 @@ cc1: all warnings being treated as errors Signed-off-by: "Yann E. MORIN" Signed-off-by: Vicente Olivert Riera +--- + config/eu.am | 1 - + 1 file changed, 1 deletion(-) -diff -rup a/config/eu.am b/config/eu.am ---- a/config/eu.am 2016-03-02 16:25:38.000000000 +0000 -+++ b/config/eu.am 2016-06-17 15:05:08.270974835 +0100 -@@ -65,7 +65,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W +diff --git a/config/eu.am b/config/eu.am +index 8fe1e259f9e2..c5a6209a4e04 100644 +--- a/config/eu.am ++++ b/config/eu.am +@@ -71,7 +71,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ -Wold-style-definition -Wstrict-prototypes \ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ - $(NULL_DEREFERENCE_WARNING) \ + $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ - $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) +-- +2.11.0 + diff --git a/bsp/buildroot/package/elfutils/Config.in b/bsp/buildroot/package/elfutils/Config.in index 0419e279..7db84724 100644 --- a/bsp/buildroot/package/elfutils/Config.in +++ b/bsp/buildroot/package/elfutils/Config.in @@ -22,7 +22,7 @@ config BR2_PACKAGE_ELFUTILS Note that this option only installs the libraries, and not the programs. - https://fedorahosted.org/elfutils + https://sourceware.org/elfutils/ if BR2_PACKAGE_ELFUTILS diff --git a/bsp/buildroot/package/elfutils/elfutils.hash b/bsp/buildroot/package/elfutils/elfutils.hash index 9fa9403f..76b6dc64 100644 --- a/bsp/buildroot/package/elfutils/elfutils.hash +++ b/bsp/buildroot/package/elfutils/elfutils.hash @@ -1,2 +1,2 @@ -# Locally calculated -sha256 3c056914c8a438b210be0d790463b960fc79d234c3f05ce707cbff80e94cba30 elfutils-0.166.tar.bz2 +# From https://sourceware.org/elfutils/ftp/0.169/sha512.sum +sha512 0a81a20bb2aff533d035d6b76f1403437b2e11bce390db57e34b8c26e4b9b3150346d83dddcbfbbdc58063f046ca3223508dba35c6ce88e375d201e7a777a8b9 elfutils-0.169.tar.bz2 diff --git a/bsp/buildroot/package/elfutils/elfutils.mk b/bsp/buildroot/package/elfutils/elfutils.mk index 566e0bf8..ed5cf772 100644 --- a/bsp/buildroot/package/elfutils/elfutils.mk +++ b/bsp/buildroot/package/elfutils/elfutils.mk @@ -4,9 +4,9 @@ # ################################################################################ -ELFUTILS_VERSION = 0.166 +ELFUTILS_VERSION = 0.169 ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2 -ELFUTILS_SITE = https://fedorahosted.org/releases/e/l/elfutils/$(ELFUTILS_VERSION) +ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION) ELFUTILS_INSTALL_STAGING = YES ELFUTILS_LICENSE = GPLv2+ or LGPLv3+ (library) ELFUTILS_LICENSE_FILES = COPYING-GPLV2 COPYING-LGPLV3 @@ -20,11 +20,9 @@ HOST_ELFUTILS_AUTORECONF = YES # Pass a custom program prefix to avoid a naming conflict between # elfutils binaries and binutils binaries. ELFUTILS_CONF_OPTS += \ - --disable-werror \ --program-prefix="eu-" HOST_ELFUTILS_CONF_OPTS = \ - --disable-werror \ --with-bzlib \ --with-lzma \ --disable-progs diff --git a/bsp/buildroot/package/fakeroot/fakeroot.mk b/bsp/buildroot/package/fakeroot/fakeroot.mk index 168cd13a..731b06a5 100644 --- a/bsp/buildroot/package/fakeroot/fakeroot.mk +++ b/bsp/buildroot/package/fakeroot/fakeroot.mk @@ -7,6 +7,8 @@ FAKEROOT_VERSION = 1.20.2 FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2 FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20141005T221953Z/pool/main/f/fakeroot + +HOST_FAKEROOT_DEPENDENCIES = host-acl # Force capabilities detection off # For now these are process capabilities (faked) rather than file # so they're of no real use diff --git a/bsp/buildroot/package/faketime/0001-Disable-the-non-null-compare-warning-error.patch b/bsp/buildroot/package/faketime/0001-Disable-the-non-null-compare-warning-error.patch new file mode 100644 index 00000000..f8c74844 --- /dev/null +++ b/bsp/buildroot/package/faketime/0001-Disable-the-non-null-compare-warning-error.patch @@ -0,0 +1,32 @@ +From e85a157b51b1276c91c736d8624d9f3e876e9189 Mon Sep 17 00:00:00 2001 +From: Andreas Rammhold +Date: Tue, 20 Dec 2016 19:25:32 +0100 +Subject: [PATCH] Disable the non-null compare warning/error. + +We rely on the provided local library definitions for the hooked +functions which in some cases (GCC >6) carry a non-null-attribute flag +which causes compile errors on `!= NULL` checks. + +[Romain: rebase on 0.9.6] +(cherry picked from commit 47e958b753fc15098a2b7d0e9ef26b83ee255874) +Signed-off-by: Romain Naour +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 51634b0..bbbd476 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -67,7 +67,7 @@ INSTALL ?= install + PREFIX ?= /usr/local + LIBDIRNAME ?= /lib/faketime + +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' ++CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' + LIB_LDFLAGS += -shared + LDFLAGS += -Wl,--version-script=libfaketime.map -lpthread + LDADD += -ldl -lm -lrt +-- +2.9.3 + diff --git a/bsp/buildroot/package/fbgrab/fbgrab.mk b/bsp/buildroot/package/fbgrab/fbgrab.mk index 44554231..5cdf0282 100644 --- a/bsp/buildroot/package/fbgrab/fbgrab.mk +++ b/bsp/buildroot/package/fbgrab/fbgrab.mk @@ -11,7 +11,7 @@ FBGRAB_LICENSE = GPLv2 FBGRAB_LICENSE_FILES = COPYING define FBGRAB_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) fbgrab endef define FBGRAB_INSTALL_TARGET_CMDS diff --git a/bsp/buildroot/package/filemq/filemq.mk b/bsp/buildroot/package/filemq/filemq.mk index d57208ec..62ddfaf4 100644 --- a/bsp/buildroot/package/filemq/filemq.mk +++ b/bsp/buildroot/package/filemq/filemq.mk @@ -11,8 +11,8 @@ FILEMQ_AUTORECONF = YES FILEMQ_CONF_ENV = filemq_have_asciidoc=no FILEMQ_INSTALL_STAGING = YES FILEMQ_DEPENDENCIES = czmq openssl zeromq -FILEMQ_LICENSE = LGPLv3+ with exceptions -FILEMQ_LICENSE_FILES = COPYING COPYING.LESSER +FILEMQ_LICENSE = MPLv2.0 +FILEMQ_LICENSE_FILES = LICENSE define FILEMQ_CREATE_CONFIG_DIR mkdir -p $(@D)/config diff --git a/bsp/buildroot/package/flashrom/0002-sys-io.h.patch b/bsp/buildroot/package/flashrom/0002-sys-io.h.patch deleted file mode 100644 index 8d990c6f..00000000 --- a/bsp/buildroot/package/flashrom/0002-sys-io.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -hwaccess: sys/io.h is not specific to glibc - -Under Linux, sys/io.h provides inb and outb, so we really need it. -However, its inclusion is conditional to the _GLIBC_ define. This is -usually OK under Linux, since both glibc and uClibc define it (uclibc -fakes being glibc). - -But the musl C library does not impersonate glibc, so we're missing -including sys/io.h in this case. - -Change the include from checking _GLIBC_ to checking whether this is -Linux, looking for the __linux__ define. - -Signed-off-by: "Yann E. MORIN" - -diff -durN flashrom-0.9.8.orig/hwaccess.h flashrom-0.9.8/hwaccess.h ---- flashrom-0.9.8.orig/hwaccess.h 2015-02-10 09:03:10.000000000 +0100 -+++ flashrom-0.9.8/hwaccess.h 2015-10-28 20:01:54.259202484 +0100 -@@ -27,7 +27,7 @@ - #include "platform.h" - - #if IS_X86 --#if defined(__GLIBC__) -+#if defined(__linux__) - #include - #endif - #endif diff --git a/bsp/buildroot/package/flashrom/flashrom.hash b/bsp/buildroot/package/flashrom/flashrom.hash index a2168699..64b67b99 100644 --- a/bsp/buildroot/package/flashrom/flashrom.hash +++ b/bsp/buildroot/package/flashrom/flashrom.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 13dc7c895e583111ecca370363a3527d237d178a134a94b20db7df177c05f934 flashrom-0.9.8.tar.bz2 +sha256 cb3156b0f63eb192024b76c0814135930297aac41f80761a5d293de769783c45 flashrom-0.9.9.tar.bz2 diff --git a/bsp/buildroot/package/flashrom/flashrom.mk b/bsp/buildroot/package/flashrom/flashrom.mk index 7e0fcf27..7ebda338 100644 --- a/bsp/buildroot/package/flashrom/flashrom.mk +++ b/bsp/buildroot/package/flashrom/flashrom.mk @@ -4,7 +4,7 @@ # ################################################################################ -FLASHROM_VERSION = 0.9.8 +FLASHROM_VERSION = 0.9.9 FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2 FLASHROM_SITE = http://download.flashrom.org/releases FLASHROM_DEPENDENCIES = pciutils libusb libusb-compat libftdi host-pkgconf diff --git a/bsp/buildroot/package/fmc/fmc.hash b/bsp/buildroot/package/fmc/fmc.hash index 24028318..13d9d77e 100644 --- a/bsp/buildroot/package/fmc/fmc.hash +++ b/bsp/buildroot/package/fmc/fmc.hash @@ -1,2 +1,2 @@ -# Locally Computed -sha256sum a91e0c9b7c7f238634c64a755c05671f33f2acdb6ae2d09cad4d683b364ee8e4 fmc-fsl-sdk-v2.0.tar.gz +# Locally calculated +sha256 a91e0c9b7c7f238634c64a755c05671f33f2acdb6ae2d09cad4d683b364ee8e4 fmc-fsl-sdk-v2.0.tar.gz diff --git a/bsp/buildroot/package/freetype/0001-psaux-Better-protect-flex-handling.patch b/bsp/buildroot/package/freetype/0001-psaux-Better-protect-flex-handling.patch new file mode 100644 index 00000000..a59f5b34 --- /dev/null +++ b/bsp/buildroot/package/freetype/0001-psaux-Better-protect-flex-handling.patch @@ -0,0 +1,47 @@ +From f958c48ee431bef8d4d466b40c9cb2d4dbcb7791 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Fri, 24 Mar 2017 09:15:10 +0100 +Subject: [PATCH] [psaux] Better protect `flex' handling. + +Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 + +* src/psaux/t1decode.c (t1_decoder_parse_charstrings) +: Since there is not a single flex operator but a +series of subroutine calls, malformed fonts can call arbitrary other +operators after the start of a flex, possibly adding points. For +this reason we have to check the available number of points before +inserting a point. + +Fixes CVE-2017-8105 + +Signed-off-by: Peter Korsgaard +--- +diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c +index af7b465e..7dd45135 100644 +--- a/src/psaux/t1decode.c ++++ b/src/psaux/t1decode.c +@@ -780,10 +780,19 @@ + /* point without adding any point to the outline */ + idx = decoder->num_flex_vectors++; + if ( idx > 0 && idx < 7 ) ++ { ++ /* in malformed fonts it is possible to have other */ ++ /* opcodes in the middle of a flex (which don't */ ++ /* increase `num_flex_vectors'); we thus have to */ ++ /* check whether we can add a point */ ++ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) ) ++ goto Syntax_Error; ++ + t1_builder_add_point( builder, + x, + y, + (FT_Byte)( idx == 3 || idx == 6 ) ); ++ } + } + break; + +-- +2.11.0 + diff --git a/bsp/buildroot/package/freetype/0002-src-psaux-psobjs.c-t1_builder_close_contour-Add-safe.patch b/bsp/buildroot/package/freetype/0002-src-psaux-psobjs.c-t1_builder_close_contour-Add-safe.patch new file mode 100644 index 00000000..1b9d90a7 --- /dev/null +++ b/bsp/buildroot/package/freetype/0002-src-psaux-psobjs.c-t1_builder_close_contour-Add-safe.patch @@ -0,0 +1,35 @@ +From 3774fc08b502c3e685afca098b6e8a195aded6a0 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Sun, 26 Mar 2017 08:32:09 +0200 +Subject: [PATCH] * src/psaux/psobjs.c (t1_builder_close_contour): Add safety + guard. + +Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 + +Fixes CVE-2017-8287 + +Signed-off-by: Peter Korsgaard +diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c +index d18e821a..0baf8368 100644 +--- a/src/psaux/psobjs.c ++++ b/src/psaux/psobjs.c +@@ -1718,6 +1718,14 @@ + first = outline->n_contours <= 1 + ? 0 : outline->contours[outline->n_contours - 2] + 1; + ++ /* in malformed fonts it can happen that a contour was started */ ++ /* but no points were added */ ++ if ( outline->n_contours && first == outline->n_points ) ++ { ++ outline->n_contours--; ++ return; ++ } ++ + /* We must not include the last point in the path if it */ + /* is located on the first point. */ + if ( outline->n_points > 1 ) +-- +2.11.0 + diff --git a/bsp/buildroot/package/freetype/freetype.mk b/bsp/buildroot/package/freetype/freetype.mk index 94847587..fce94d27 100644 --- a/bsp/buildroot/package/freetype/freetype.mk +++ b/bsp/buildroot/package/freetype/freetype.mk @@ -10,7 +10,7 @@ FREETYPE_SITE = http://download.savannah.gnu.org/releases/freetype FREETYPE_INSTALL_STAGING = YES FREETYPE_MAKE_OPTS = CCexe="$(HOSTCC)" FREETYPE_LICENSE = Dual FTL/GPLv2+ -FREETYPE_LICENSE_FILES = docs/FTL.TXT docs/GPLv2.TXT +FREETYPE_LICENSE_FILES = docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT FREETYPE_DEPENDENCIES = host-pkgconf FREETYPE_CONFIG_SCRIPTS = freetype-config diff --git a/bsp/buildroot/package/ftop/Config.in b/bsp/buildroot/package/ftop/Config.in index 1f5ebbbb..aefe4f51 100644 --- a/bsp/buildroot/package/ftop/Config.in +++ b/bsp/buildroot/package/ftop/Config.in @@ -5,4 +5,4 @@ config BR2_PACKAGE_FTOP Ftop is to files what top is to processes. The progress of all open files and file systems can be monitored. - https://code.google.com/p/ftop/ + https://sourceforge.net/projects/ftop/ diff --git a/bsp/buildroot/package/ftop/ftop.hash b/bsp/buildroot/package/ftop/ftop.hash index 06f2fb1f..ca8dc827 100644 --- a/bsp/buildroot/package/ftop/ftop.hash +++ b/bsp/buildroot/package/ftop/ftop.hash @@ -1,2 +1,5 @@ -# From https://code.google.com/p/ftop/downloads/detail?name=ftop-1.0.tar.gz&can=2&q= -sha1 a0523862dd63ed3bec14846b6e05afcfdebb15c2 ftop-1.0.tar.gz +# From https://sourceforge.net/projects/ftop/files/ftop/1.0/ +md5 57c68b6e7431f4219d9eddaebcb395da ftop-1.0.tar.bz2 +sha1 d3ef1b74825f50c7c442d299b29d23c2478f199b ftop-1.0.tar.bz2 +# Locally computed +sha256 3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82 ftop-1.0.tar.bz2 diff --git a/bsp/buildroot/package/ftop/ftop.mk b/bsp/buildroot/package/ftop/ftop.mk index c8d0f93b..a7515609 100644 --- a/bsp/buildroot/package/ftop/ftop.mk +++ b/bsp/buildroot/package/ftop/ftop.mk @@ -5,7 +5,8 @@ ################################################################################ FTOP_VERSION = 1.0 -FTOP_SITE = http://ftop.googlecode.com/files +FTOP_SOURCE = ftop-$(FTOP_VERSION).tar.bz2 +FTOP_SITE = https://sourceforge.net/projects/ftop/files/ftop/$(FTOP_VERSION) FTOP_DEPENDENCIES = ncurses FTOP_LICENSE = GPLv3+ FTOP_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch b/bsp/buildroot/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch new file mode 100644 index 00000000..ee9add53 --- /dev/null +++ b/bsp/buildroot/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch @@ -0,0 +1,34 @@ +From 4c6367c99461fdd7bd5613483f2582d7f08fba87 Mon Sep 17 00:00:00 2001 +From: Vlad Zakharov +Date: Tue, 28 Feb 2017 17:41:11 +0300 +Subject: [PATCH] arc: define _REENTRANT when -pthread is passed + +The compiler is supposed to have the builtin defined _REENTRANT defined +when -pthread is passed, which wasn't done on the ARC architecture. + +When _REENTRANT is not passed, the C library will not use reentrant +functions, and the latest version of ax_pthread.m4 from the +autoconf-archive will no longer detect that thread support is +available (see https://savannah.gnu.org/patch/?8186). + +Signed-off-by: Vlad Zakharov +Signed-off-by: Thomas Petazzoni +--- + gcc/config/arc/arc.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h +index 611ef54..fdd4b5d 100644 +--- a/gcc/config/arc/arc.h ++++ b/gcc/config/arc/arc.h +@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see + %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \ + %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \ + %{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \ ++%{pthread:-D_REENTRANT} \ + %{mcpu=nps400:-D__NPS400__}" + + #define CC1_SPEC "\ +-- +2.7.4 + diff --git a/bsp/buildroot/package/gdb/gdb.mk b/bsp/buildroot/package/gdb/gdb.mk index 606f1f96..d8299900 100644 --- a/bsp/buildroot/package/gdb/gdb.mk +++ b/bsp/buildroot/package/gdb/gdb.mk @@ -67,13 +67,6 @@ GDB_DISABLE_BINUTILS_CONF_OPTS = \ --disable-ld \ --disable-gas -# Starting with gdb 7.11, the bundled gnulib tries to use -# rpl_gettimeofday (gettimeofday replacement) due to the code being -# unable to determine if the replacement function should be used or -# not when cross-compiling with uClibc or musl as C libraries. So use -# gl_cv_func_gettimeofday_clobber=no to not use rpl_gettimeofday, -# assuming musl and uClibc have a properly working gettimeofday -# implementation. GDB_CONF_ENV = \ ac_cv_type_uintptr_t=yes \ gt_cv_func_gettext_libintl=yes \ @@ -83,8 +76,20 @@ GDB_CONF_ENV = \ bash_cv_must_reinstall_sighandlers=no \ bash_cv_func_sigsetjmp=present \ bash_cv_have_mbstate_t=yes \ - gdb_cv_func_sigsetjmp=yes \ - gl_cv_func_gettimeofday_clobber=no + gdb_cv_func_sigsetjmp=yes + +# Starting with gdb 7.11, the bundled gnulib tries to use +# rpl_gettimeofday (gettimeofday replacement) due to the code being +# unable to determine if the replacement function should be used or +# not when cross-compiling with uClibc or musl as C libraries. So use +# gl_cv_func_gettimeofday_clobber=no to not use rpl_gettimeofday, +# assuming musl and uClibc have a properly working gettimeofday +# implementation. It needs to be passed to GDB_CONF_ENV to build +# gdbserver only but also to GDB_MAKE_ENV, because otherwise it does +# not get passed to the configure script of nested packages while +# building gdbserver with full debugger. +GDB_CONF_ENV += gl_cv_func_gettimeofday_clobber=no +GDB_MAKE_ENV = gl_cv_func_gettimeofday_clobber=no # The shared only build is not supported by gdb, so enable static build for # build-in libraries with --enable-static. diff --git a/bsp/buildroot/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch b/bsp/buildroot/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch new file mode 100644 index 00000000..becdc660 --- /dev/null +++ b/bsp/buildroot/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch @@ -0,0 +1,33 @@ +From 4f83478c88c2e05d6e8d79ca4557eb039354d2f3 Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Thu, 27 Apr 2017 13:03:33 +0100 +Subject: [PATCH] Bug 697799: have .eqproc check its parameters + +The Ghostscript custom operator .eqproc was not check the number or type of +the parameters it was given. + +Signed-off-by: Peter Korsgaard +--- + psi/zmisc3.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/psi/zmisc3.c b/psi/zmisc3.c +index 54b304246..37293ff4b 100644 +--- a/psi/zmisc3.c ++++ b/psi/zmisc3.c +@@ -56,6 +56,12 @@ zeqproc(i_ctx_t *i_ctx_p) + ref2_t stack[MAX_DEPTH + 1]; + ref2_t *top = stack; + ++ if (ref_stack_count(&o_stack) < 2) ++ return_error(gs_error_stackunderflow); ++ if (!r_is_array(op - 1) || !r_is_array(op)) { ++ return_error(gs_error_typecheck); ++ } ++ + make_array(&stack[0].proc1, 0, 1, op - 1); + make_array(&stack[0].proc2, 0, 1, op); + for (;;) { +-- +2.11.0 + diff --git a/bsp/buildroot/package/ghostscript/0004-Bug-697799-have-.rsdparams-check-its-parameters.patch b/bsp/buildroot/package/ghostscript/0004-Bug-697799-have-.rsdparams-check-its-parameters.patch new file mode 100644 index 00000000..9ba170b3 --- /dev/null +++ b/bsp/buildroot/package/ghostscript/0004-Bug-697799-have-.rsdparams-check-its-parameters.patch @@ -0,0 +1,62 @@ +From 04b37bbce174eed24edec7ad5b920eb93db4d47d Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Thu, 27 Apr 2017 13:21:31 +0100 +Subject: [PATCH] Bug 697799: have .rsdparams check its parameters + +The Ghostscript internal operator .rsdparams wasn't checking the number or +type of the operands it was being passed. Do so. + +Signed-off-by: Peter Korsgaard +--- + psi/zfrsd.c | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/psi/zfrsd.c b/psi/zfrsd.c +index 191107d8a..950588d69 100644 +--- a/psi/zfrsd.c ++++ b/psi/zfrsd.c +@@ -49,13 +49,20 @@ zrsdparams(i_ctx_t *i_ctx_p) + ref *pFilter; + ref *pDecodeParms; + int Intent = 0; +- bool AsyncRead; ++ bool AsyncRead = false; + ref empty_array, filter1_array, parms1_array; + uint i; +- int code; ++ int code = 0; ++ ++ if (ref_stack_count(&o_stack) < 1) ++ return_error(gs_error_stackunderflow); ++ if (!r_has_type(op, t_dictionary) && !r_has_type(op, t_null)) { ++ return_error(gs_error_typecheck); ++ } + + make_empty_array(&empty_array, a_readonly); +- if (dict_find_string(op, "Filter", &pFilter) > 0) { ++ if (r_has_type(op, t_dictionary) ++ && dict_find_string(op, "Filter", &pFilter) > 0) { + if (!r_is_array(pFilter)) { + if (!r_has_type(pFilter, t_name)) + return_error(gs_error_typecheck); +@@ -94,12 +101,13 @@ zrsdparams(i_ctx_t *i_ctx_p) + return_error(gs_error_typecheck); + } + } +- code = dict_int_param(op, "Intent", 0, 3, 0, &Intent); ++ if (r_has_type(op, t_dictionary)) ++ code = dict_int_param(op, "Intent", 0, 3, 0, &Intent); + if (code < 0 && code != gs_error_rangecheck) /* out-of-range int is ok, use 0 */ + return code; +- if ((code = dict_bool_param(op, "AsyncRead", false, &AsyncRead)) < 0 +- ) +- return code; ++ if (r_has_type(op, t_dictionary)) ++ if ((code = dict_bool_param(op, "AsyncRead", false, &AsyncRead)) < 0) ++ return code; + push(1); + op[-1] = *pFilter; + if (pDecodeParms) +-- +2.11.0 + diff --git a/bsp/buildroot/package/git/git.hash b/bsp/buildroot/package/git/git.hash index 07ed47bd..4782dcbe 100644 --- a/bsp/buildroot/package/git/git.hash +++ b/bsp/buildroot/package/git/git.hash @@ -1,2 +1,2 @@ # From: https://www.kernel.org/pub/software/scm/git/sha256sums.asc -sha256 c0a779cae325d48a1d5ba08b6ee1febcc31d0657a6da01fd1dec1c6e10976415 git-2.11.1.tar.xz +sha256 016124c54ce2db7a4c2bd26b0de21fbf8f6bcaee04842aa221c7243141df4e42 git-2.12.3.tar.xz diff --git a/bsp/buildroot/package/git/git.mk b/bsp/buildroot/package/git/git.mk index 1c157400..04cd5778 100644 --- a/bsp/buildroot/package/git/git.mk +++ b/bsp/buildroot/package/git/git.mk @@ -4,13 +4,17 @@ # ################################################################################ -GIT_VERSION = 2.11.1 +GIT_VERSION = 2.12.3 GIT_SOURCE = git-$(GIT_VERSION).tar.xz GIT_SITE = https://www.kernel.org/pub/software/scm/git GIT_LICENSE = GPLv2, LGPLv2.1+ GIT_LICENSE_FILES = COPYING LGPL-2.1 GIT_DEPENDENCIES = zlib host-gettext +ifeq ($(BR2_PACKAGE_GETTEXT),y) +GIT_DEPENDENCIES += gettext +endif + ifeq ($(BR2_PACKAGE_OPENSSL),y) GIT_DEPENDENCIES += openssl GIT_CONF_OPTS += --with-openssl @@ -19,8 +23,8 @@ else GIT_CONF_OPTS += --without-openssl endif -ifeq ($(BR2_PACKAGE_PERL),y) -GIT_DEPENDENCIES += perl +ifeq ($(BR2_PACKAGE_PCRE),y) +GIT_DEPENDENCIES += pcre GIT_CONF_OPTS += --with-libpcre else GIT_CONF_OPTS += --without-libpcre diff --git a/bsp/buildroot/package/glibc/2.23/0005-sh-Fix-building-with-gcc5-6.patch b/bsp/buildroot/package/glibc/2.23/0005-sh-Fix-building-with-gcc5-6.patch new file mode 100644 index 00000000..fa43add3 --- /dev/null +++ b/bsp/buildroot/package/glibc/2.23/0005-sh-Fix-building-with-gcc5-6.patch @@ -0,0 +1,56 @@ +From dbb9ecfaac8db022292791936733e0841a0aa447 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Feb 2017 16:00:57 -0200 +Subject: [PATCH] sh: Fix building with gcc5/6 + +Build glibc for sh4-unknown-linux-gnu currently fails if one's +using GCC5/6: in dl-conflict.c, the elf_machine_rela() function +is called with NULL as its 3rd argument, sym. The implementation +of that function in sysdeps/sh/dl-machine.h dereferences that pointer: + +const Elf32_Sym *const refsym = sym; +... +if (map == &GL(dl_rtld_map)) + value -= map->l_addr + refsym->st_value + reloc->r_addend; + +GCC discovers a null pointer dereference, and in accordance with +-fdelete-null-pointer-checks (which is enabled in -O2) replaces this +code with a trap - which, as SH does not implement a trap pattern in +GCC, evaluates to an abort() call. This abort() call pulls many more +objects from libc_nonshared.a, eventually resulting in link failure +due to multiple definitions for a number of symbols. + +As far as I see, the conditional before this code is always false in +rtld: _dl_resolve_conflicts() is called with main_map as the first +argument, not GL(_dl_rtld_map), but since that call is in yet another +compilation unit, GCC does not know about it. Patch that wraps this +conditional into !defined RESOLVE_CONFLICT_FIND_MAP attached. + + * sysdeps/sh/dl-machine.h (elf_machine_rela): The condition + in R_SH_DIR32 case is always false when inlined from + dl-conflict.c. Ifdef out to prevent GCC from insertin an + abort() call. + +[Waldemar: backport of +https://sourceware.org/git/?p=glibc.git;a=commit;h=d40dbe722f004f999b589de776f7e57e564dda01.] +Signed-off-by: Waldemar Brodkorb +--- + sysdeps/sh/dl-machine.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h +index 5bb37d0..6509055 100644 +--- a/sysdeps/sh/dl-machine.h ++++ b/sysdeps/sh/dl-machine.h +@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + break; + case R_SH_DIR32: + { +-#ifndef RTLD_BOOTSTRAP ++#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + /* This is defined in rtld.c, but nowhere in the static + libc.a; make the reference weak so static programs can + still link. This declaration cannot be done when +-- +2.7.4 + diff --git a/bsp/buildroot/package/glibc/2.24/0001-sh-Fix-building-with-gcc5-6.patch b/bsp/buildroot/package/glibc/2.24/0001-sh-Fix-building-with-gcc5-6.patch new file mode 100644 index 00000000..821f2c65 --- /dev/null +++ b/bsp/buildroot/package/glibc/2.24/0001-sh-Fix-building-with-gcc5-6.patch @@ -0,0 +1,56 @@ +From 98cadd4b9fa8e32d1d0dea8e46b5ba829af4e8a2 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Feb 2017 16:00:57 -0200 +Subject: [PATCH] sh: Fix building with gcc5/6 + +Build glibc for sh4-unknown-linux-gnu currently fails if one's +using GCC5/6: in dl-conflict.c, the elf_machine_rela() function +is called with NULL as its 3rd argument, sym. The implementation +of that function in sysdeps/sh/dl-machine.h dereferences that pointer: + +const Elf32_Sym *const refsym = sym; +... +if (map == &GL(dl_rtld_map)) + value -= map->l_addr + refsym->st_value + reloc->r_addend; + +GCC discovers a null pointer dereference, and in accordance with +-fdelete-null-pointer-checks (which is enabled in -O2) replaces this +code with a trap - which, as SH does not implement a trap pattern in +GCC, evaluates to an abort() call. This abort() call pulls many more +objects from libc_nonshared.a, eventually resulting in link failure +due to multiple definitions for a number of symbols. + +As far as I see, the conditional before this code is always false in +rtld: _dl_resolve_conflicts() is called with main_map as the first +argument, not GL(_dl_rtld_map), but since that call is in yet another +compilation unit, GCC does not know about it. Patch that wraps this +conditional into !defined RESOLVE_CONFLICT_FIND_MAP attached. + + * sysdeps/sh/dl-machine.h (elf_machine_rela): The condition + in R_SH_DIR32 case is always false when inlined from + dl-conflict.c. Ifdef out to prevent GCC from insertin an + abort() call. + +[Waldemar: backport of +https://sourceware.org/git/?p=glibc.git;a=commit;h=d40dbe722f004f999b589de776f7e57e564dda01.] +Signed-off-by: Waldemar Brodkorb +--- + sysdeps/sh/dl-machine.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h +index 5bb37d0..6509055 100644 +--- a/sysdeps/sh/dl-machine.h ++++ b/sysdeps/sh/dl-machine.h +@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + break; + case R_SH_DIR32: + { +-#ifndef RTLD_BOOTSTRAP ++#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + /* This is defined in rtld.c, but nowhere in the static + libc.a; make the reference weak so static programs can + still link. This declaration cannot be done when +-- +2.7.4 + diff --git a/bsp/buildroot/package/gnutls/gnutls.hash b/bsp/buildroot/package/gnutls/gnutls.hash index 121f75a7..64b86d75 100644 --- a/bsp/buildroot/package/gnutls/gnutls.hash +++ b/bsp/buildroot/package/gnutls/gnutls.hash @@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 0e97f243ae72b70307d684b84c7fe679385aa7a7a0e37e5be810193dcc17d4ff gnutls-3.5.8.tar.xz +sha256 af443e86ba538d4d3e37c4732c00101a492fe4b56a55f4112ff0ab39dbe6579d gnutls-3.5.10.tar.xz diff --git a/bsp/buildroot/package/gnutls/gnutls.mk b/bsp/buildroot/package/gnutls/gnutls.mk index 4fab8128..be1cf00e 100644 --- a/bsp/buildroot/package/gnutls/gnutls.mk +++ b/bsp/buildroot/package/gnutls/gnutls.mk @@ -5,7 +5,7 @@ ################################################################################ GNUTLS_VERSION_MAJOR = 3.5 -GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).8 +GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).10 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR) GNUTLS_LICENSE = LGPLv2.1+ (core library), GPLv3+ (gnutls-openssl library) diff --git a/bsp/buildroot/package/google-breakpad/google-breakpad.mk b/bsp/buildroot/package/google-breakpad/google-breakpad.mk index 7a11c72c..68ff853a 100644 --- a/bsp/buildroot/package/google-breakpad/google-breakpad.mk +++ b/bsp/buildroot/package/google-breakpad/google-breakpad.mk @@ -23,14 +23,14 @@ define HOST_GOOGLE_BREAKPAD_LSS $(HOST_DIR)/usr/include/linux_syscall_support.h \ $(@D)/src/third_party/lss/linux_syscall_support.h endef -HOST_GOOGLE_BREAKPAD_POST_EXTRACT_HOOKS += HOST_GOOGLE_BREAKPAD_LSS +HOST_GOOGLE_BREAKPAD_PRE_CONFIGURE_HOOKS += HOST_GOOGLE_BREAKPAD_LSS define GOOGLE_BREAKPAD_LSS $(INSTALL) -D -m 0644 \ $(STAGING_DIR)/usr/include/linux_syscall_support.h \ $(@D)/src/third_party/lss/linux_syscall_support.h endef -GOOGLE_BREAKPAD_POST_EXTRACT_HOOKS += GOOGLE_BREAKPAD_LSS +GOOGLE_BREAKPAD_PRE_CONFIGURE_HOOKS += GOOGLE_BREAKPAD_LSS define GOOGLE_BREAKPAD_EXTRACT_SYMBOLS $(EXTRA_ENV) package/google-breakpad/gen-syms.sh $(STAGING_DIR) \ diff --git a/bsp/buildroot/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch b/bsp/buildroot/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch new file mode 100644 index 00000000..9e91a02e --- /dev/null +++ b/bsp/buildroot/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch @@ -0,0 +1,41 @@ +From 777cb3737ae85b13642fff48eabb601c4d40f527 Mon Sep 17 00:00:00 2001 +From: James Knight +Date: Tue, 16 Feb 2016 23:51:08 -0500 +Subject: [PATCH] do not interact with systemctl when cross-compiling + +The installation process for GPSd on a systemd environment will attempt +to reload systemd's manager configuration (systemctl daemon-reload). +This is to allow the system to take advantage of the newly installed +GPSd services. When cross-compiling, the installation process should not +attempt to interact with the build environment's systemd instance (if +any). The following change checks if the build is not cross compiling +(via 'not env["sysroot"]') before attempting to do a systemd reload. + +Signed-off-by: James Knight +[yann.morin.1998@free.fr: tweak to apply on 3.16] +Signed-off-by: "Yann E. MORIN" +--- + SConstruct | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index c3bfd0d1..97c1b3a9 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1909,10 +1909,12 @@ udev_install = Utility('udev-install', 'install', [ + ] + hotplug_wrapper_install) + + if env['systemd']: ++ env.Requires(udev_install, systemd_install) ++ ++if env['systemd'] and not env["sysroot"]: + systemctl_daemon_reload = Utility('systemctl-daemon-reload', '', [ 'systemctl daemon-reload || true']) + env.AlwaysBuild(systemctl_daemon_reload) + env.Precious(systemctl_daemon_reload) +- env.Requires(udev_install, systemd_install) + env.Requires(systemctl_daemon_reload, systemd_install) + env.Requires(udev_install, systemctl_daemon_reload) + +-- +2.11.0 + diff --git a/bsp/buildroot/package/granite/granite.hash b/bsp/buildroot/package/granite/granite.hash index 3c896851..e073307d 100644 --- a/bsp/buildroot/package/granite/granite.hash +++ b/bsp/buildroot/package/granite/granite.hash @@ -1,4 +1,4 @@ # From https://launchpad.net/granite/0.4/0.4.0.1/+download/granite-0.4.0.1.tar.xz/+md5 -md5 db41150ca6e77162392362686e848086 granite-0.3.1.tar.xz +md5 db41150ca6e77162392362686e848086 granite-0.4.0.1.tar.xz # Calculated based on the hash above sha256 95a142a8befeedc35a089d638e759b657905508dc3007036d6c1fa3efe94c4dd granite-0.4.0.1.tar.xz diff --git a/bsp/buildroot/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk b/bsp/buildroot/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk index b1d8f8bd..3992fdf3 100644 --- a/bsp/buildroot/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +++ b/bsp/buildroot/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk @@ -80,6 +80,12 @@ else GST_FFMPEG_CONF_EXTRA_OPTS += --disable-altivec endif +# libav configure script misdetects the VIS optimizations as being +# available, so forcefully disable them. +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-vis +endif + ifeq ($(BR2_STATIC_LIBS),) GST_FFMPEG_CONF_EXTRA_OPTS += --enable-pic endif diff --git a/bsp/buildroot/package/gstreamer/gst-plugins-base/gst-plugins-base.mk b/bsp/buildroot/package/gstreamer/gst-plugins-base/gst-plugins-base.mk index 51c22a90..1c2f9acd 100644 --- a/bsp/buildroot/package/gstreamer/gst-plugins-base/gst-plugins-base.mk +++ b/bsp/buildroot/package/gstreamer/gst-plugins-base/gst-plugins-base.mk @@ -14,9 +14,9 @@ GST_PLUGINS_BASE_LICENSE_FILES = COPYING COPYING.LIB # freetype is only used by examples, but if it is not found # and the host has a freetype-config script, then the host # include dirs are added to the search path causing trouble -GST_PLUGINS_BASE_CONF_ENV = - FT2_CONFIG=/bin/false \ - ac_cv_header_stdint_t="stdint.h" +GST_PLUGINS_BASE_CONF_ENV = \ + FT2_CONFIG=/bin/false \ + ac_cv_header_stdint_t="stdint.h" GST_PLUGINS_BASE_CONF_OPTS = \ --disable-examples \ diff --git a/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/Config.in b/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/Config.in index 6bec362d..1db51877 100644 --- a/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/Config.in +++ b/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/Config.in @@ -112,6 +112,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND default y depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW comment "wayland needs the egl platform and the wayland package" @@ -686,6 +687,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND bool "wayland" depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS default y help Wayland Video Sink diff --git a/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index 00add02a..c6a151a6 100644 --- a/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/bsp/buildroot/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -121,7 +121,7 @@ endif ifneq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND)$(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND),) GST1_PLUGINS_BAD_CONF_OPTS += --enable-wayland -GST1_PLUGINS_BAD_DEPENDENCIES += wayland +GST1_PLUGINS_BAD_DEPENDENCIES += wayland wayland-protocols else GST1_PLUGINS_BAD_CONF_OPTS += --disable-wayland endif diff --git a/bsp/buildroot/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/bsp/buildroot/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk index 6ab63a35..cb5da04b 100644 --- a/bsp/buildroot/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +++ b/bsp/buildroot/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -11,13 +11,6 @@ GST1_PLUGINS_BASE_INSTALL_STAGING = YES GST1_PLUGINS_BASE_LICENSE_FILES = COPYING.LIB GST1_PLUGINS_BASE_LICENSE = LGPLv2+, LGPLv2.1+ -# freetype is only used by examples, but if it is not found -# and the host has a freetype-config script, then the host -# include dirs are added to the search path causing trouble -GST1_PLUGINS_BASE_CONF_ENV = - FT2_CONFIG=/bin/false \ - ac_cv_header_stdint_t="stdint.h" - # gio_unix_2_0 is only used for tests GST1_PLUGINS_BASE_CONF_OPTS = \ --disable-examples \ diff --git a/bsp/buildroot/package/hans/hans.mk b/bsp/buildroot/package/hans/hans.mk index 5111d46b..c10ae654 100644 --- a/bsp/buildroot/package/hans/hans.mk +++ b/bsp/buildroot/package/hans/hans.mk @@ -10,7 +10,7 @@ HANS_LICENSE = GPLv3+ HANS_LICENSE_FILES = LICENSE define HANS_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) GCC="$(TARGET_CC)" GPP="$(TARGET_CXX)" -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE1) GCC="$(TARGET_CC)" GPP="$(TARGET_CXX)" -C $(@D) endef define HANS_INSTALL_TARGET_CMDS diff --git a/bsp/buildroot/package/harfbuzz/harfbuzz.hash b/bsp/buildroot/package/harfbuzz/harfbuzz.hash index 6bf5bee1..b7da64b4 100644 --- a/bsp/buildroot/package/harfbuzz/harfbuzz.hash +++ b/bsp/buildroot/package/harfbuzz/harfbuzz.hash @@ -1,2 +1,2 @@ -# From http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.2.tar.bz2.sha256 -sha256 8f234dcfab000fdec24d43674fffa2fdbdbd654eb176afbde30e8826339cb7b3 harfbuzz-1.4.2.tar.bz2 +# From https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.4.tar.bz2.sha256 +sha256 35d2f8ca476cbbec64ee824eca6b0209ff8db0334990b9f5af893b94f119d255 harfbuzz-1.4.4.tar.bz2 diff --git a/bsp/buildroot/package/harfbuzz/harfbuzz.mk b/bsp/buildroot/package/harfbuzz/harfbuzz.mk index 458b072a..64644809 100644 --- a/bsp/buildroot/package/harfbuzz/harfbuzz.mk +++ b/bsp/buildroot/package/harfbuzz/harfbuzz.mk @@ -4,8 +4,8 @@ # ################################################################################ -HARFBUZZ_VERSION = 1.4.2 -HARFBUZZ_SITE = http://www.freedesktop.org/software/harfbuzz/release +HARFBUZZ_VERSION = 1.4.4 +HARFBUZZ_SITE = https://www.freedesktop.org/software/harfbuzz/release HARFBUZZ_SOURCE = harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 HARFBUZZ_LICENSE = MIT, ISC (ucdn library) HARFBUZZ_LICENSE_FILES = COPYING src/hb-ucdn/COPYING diff --git a/bsp/buildroot/package/hiredis/hiredis.mk b/bsp/buildroot/package/hiredis/hiredis.mk index cd406f14..598e0147 100644 --- a/bsp/buildroot/package/hiredis/hiredis.mk +++ b/bsp/buildroot/package/hiredis/hiredis.mk @@ -4,7 +4,8 @@ # ################################################################################ -HIREDIS_VERSION = v0.13.3 +HIREDIS_VERSION_MAJOR = 0.13 +HIREDIS_VERSION = v$(HIREDIS_VERSION_MAJOR).3 HIREDIS_SITE = $(call github,redis,hiredis,$(HIREDIS_VERSION)) HIREDIS_LICENSE = BSD-3c HIREDIS_LICENSE_FILES = COPYING @@ -30,6 +31,26 @@ endef HIREDIS_INCLUDE_DIR = $(STAGING_DIR)/usr/include/hiredis +ifeq ($(BR2_SHARED_LIBS),) +define HIREDIS_INSTALL_STAGING_STATIC_LIB + $(INSTALL) -D -m 0755 $(@D)/libhiredis.a \ + $(STAGING_DIR)/usr/lib/libhiredis.a +endef +endif + +ifeq ($(BR2_STATIC_LIBS),) +define HIREDIS_INSTALL_STAGING_SHARED_LIB + $(INSTALL) -D -m 0755 $(@D)/libhiredis.so \ + $(STAGING_DIR)/usr/lib/libhiredis.so.$(HIREDIS_VERSION_MAJOR) + ln -sf libhiredis.so.$(HIREDIS_VERSION_MAJOR) $(STAGING_DIR)/usr/lib/libhiredis.so +endef +define HIREDIS_INSTALL_TARGET_SHARED_LIB + $(INSTALL) -D -m 0755 $(@D)/libhiredis.so \ + $(TARGET_DIR)/usr/lib/libhiredis.so.$(HIREDIS_VERSION_MAJOR) + ln -sf libhiredis.so.$(HIREDIS_VERSION_MAJOR) $(TARGET_DIR)/usr/lib/libhiredis.so +endef +endif + # Do not call make install as this target will build shared and static libraries define HIREDIS_INSTALL_STAGING_CMDS mkdir -p $(HIREDIS_INCLUDE_DIR) @@ -37,12 +58,12 @@ define HIREDIS_INSTALL_STAGING_CMDS $(@D)/adapters $(HIREDIS_INCLUDE_DIR) $(INSTALL) -D -m 0644 $(@D)/hiredis.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/hiredis.pc - $(INSTALL) -m 0644 -t $(STAGING_DIR)/usr/lib $(@D)/libhiredis* + $(HIREDIS_INSTALL_STAGING_STATIC_LIB) + $(HIREDIS_INSTALL_STAGING_SHARED_LIB) endef define HIREDIS_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/lib - $(INSTALL) -m 0644 -t $(TARGET_DIR)/usr/lib $(@D)/libhiredis* + $(HIREDIS_INSTALL_TARGET_SHARED_LIB) endef $(eval $(generic-package)) diff --git a/bsp/buildroot/package/htop/htop.mk b/bsp/buildroot/package/htop/htop.mk index 9451d159..dd3bed41 100644 --- a/bsp/buildroot/package/htop/htop.mk +++ b/bsp/buildroot/package/htop/htop.mk @@ -8,7 +8,7 @@ HTOP_VERSION = 2.0.2 HTOP_SITE = http://hisham.hm/htop/releases/$(HTOP_VERSION) HTOP_DEPENDENCIES = ncurses # Prevent htop build system from searching the host paths -HTOP_CONF_ENV = HTOP_NCURSES_CONFIG_SCRIPT=$(STAGING_DIR)/usr/bin/ncurses5-config +HTOP_CONF_ENV = HTOP_NCURSES_CONFIG_SCRIPT=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) HTOP_LICENSE = GPLv2 HTOP_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/icu/0006-utext-problems-with-handling-of-bad-utf8.patch b/bsp/buildroot/package/icu/0006-utext-problems-with-handling-of-bad-utf8.patch new file mode 100644 index 00000000..a4e51aef --- /dev/null +++ b/bsp/buildroot/package/icu/0006-utext-problems-with-handling-of-bad-utf8.patch @@ -0,0 +1,173 @@ +ticket:12888 UText, problems with handling of bad UTF-8 + +Fixes: + +CVE-2017-7867 - International Components for Unicode (ICU) for C/C++ before +2017-02-13 has an out-of-bounds write caused by a heap-based buffer overflow +related to the utf8TextAccess function in common/utext.cpp and the +utext_setNativeIndex* function. + +CVE-2017-7868 - International Components for Unicode (ICU) for C/C++ before +2017-02-13 has an out-of-bounds write caused by a heap-based buffer overflow +related to the utf8TextAccess function in common/utext.cpp and the +utext_moveIndex32* function. + +Upstream: http://bugs.icu-project.org/trac/changeset/39671 + +Signed-off-by: Peter Korsgaard + +Index: /trunk/icu4c/source/common/utext.cpp +=================================================================== +--- icu4c/source/common/utext.cpp (revision 39670) ++++ icu4c/source/common/utext.cpp (revision 39671) +@@ -848,7 +848,13 @@ + + // Chunk size. +-// Must be less than 85, because of byte mapping from UChar indexes to native indexes. +-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes +-// to two UChars.) ++// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes. ++// Worst case there are six UTF-8 bytes per UChar. ++// obsolete 6 byte form fd + 5 trails maps to fffd ++// obsolete 5 byte form fc + 4 trails maps to fffd ++// non-shortest 4 byte forms maps to fffd ++// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit ++// mapToUChars array size must allow for the worst case, 6. ++// This could be brought down to 4, by treating fd and fc as pure illegal, ++// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros. + // + enum { UTF8_TEXT_CHUNK_SIZE=32 }; +@@ -890,5 +896,5 @@ + // one for a supplementary starting in the last normal position, + // and one for an entry for the buffer limit position. +- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to ++ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to + // correspoding offset in filled part of buf. + int32_t align; +@@ -1033,4 +1039,5 @@ + u8b = (UTF8Buf *)ut->p; // the current buffer + mapIndex = ix - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + return TRUE; +@@ -1299,4 +1306,8 @@ + // If index is at the end, there is no character there to look at. + if (ix != ut->b) { ++ // Note: this function will only move the index back if it is on a trail byte ++ // and there is a preceding lead byte and the sequence from the lead ++ // through this trail could be part of a valid UTF-8 sequence ++ // Otherwise the index remains unchanged. + U8_SET_CP_START(s8, 0, ix); + } +@@ -1312,5 +1323,8 @@ + uint8_t *mapToNative = u8b->mapToNative; + uint8_t *mapToUChars = u8b->mapToUChars; +- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1); ++ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1; ++ // Note that toUCharsMapStart can be negative. Happens when the remaining ++ // text from current position to the beginning is less than the buffer size. ++ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry. + int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region + // at end of buffer to leave room +@@ -1339,4 +1353,5 @@ + // Special case ASCII range for speed. + buf[destIx] = (UChar)c; ++ U_ASSERT(toUCharsMapStart <= srcIx); + mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx; + mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart); +@@ -1368,4 +1383,5 @@ + mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx; + } while (sIx >= srcIx); ++ U_ASSERT(toUCharsMapStart <= (srcIx+1)); + + // Set native indexing limit to be the current position. +@@ -1542,4 +1558,5 @@ + U_ASSERT(index<=ut->chunkNativeLimit); + int32_t mapIndex = index - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + U_ASSERT(offset>=0 && offset<=ut->chunkLength); +Index: /trunk/icu4c/source/test/intltest/utxttest.cpp +=================================================================== +--- icu4c/source/test/intltest/utxttest.cpp (revision 39670) ++++ icu4c/source/test/intltest/utxttest.cpp (revision 39671) +@@ -68,4 +68,6 @@ + case 7: name = "Ticket12130"; + if (exec) Ticket12130(); break; ++ case 8: name = "Ticket12888"; ++ if (exec) Ticket12888(); break; + default: name = ""; break; + } +@@ -1584,2 +1586,62 @@ + utext_close(&ut); + } ++ ++// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal, ++// six byte utf-8 forms. Original implementation had an assumption that ++// there would be at most three utf-8 bytes per UTF-16 code unit. ++// The five and six byte sequences map to a single replacement character. ++ ++void UTextTest::Ticket12888() { ++ const char *badString = ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"; ++ ++ UErrorCode status = U_ZERO_ERROR; ++ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status)); ++ TEST_SUCCESS(status); ++ for (;;) { ++ UChar32 c = utext_next32(ut.getAlias()); ++ if (c == U_SENTINEL) { ++ break; ++ } ++ } ++ int32_t endIdx = utext_getNativeIndex(ut.getAlias()); ++ if (endIdx != (int32_t)strlen(badString)) { ++ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx); ++ return; ++ } ++ ++ for (int32_t prevIndex = endIdx; prevIndex>0;) { ++ UChar32 c = utext_previous32(ut.getAlias()); ++ int32_t currentIndex = utext_getNativeIndex(ut.getAlias()); ++ if (c != 0xfffd) { ++ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n", ++ __FILE__, __LINE__, 0xfffd, c, currentIndex); ++ break; ++ } ++ if (currentIndex != prevIndex - 6) { ++ errln("%s:%d: wrong index. Expected, actual = %d, %d", ++ __FILE__, __LINE__, prevIndex - 6, currentIndex); ++ break; ++ } ++ prevIndex = currentIndex; ++ } ++} +Index: /trunk/icu4c/source/test/intltest/utxttest.h +=================================================================== +--- icu4c/source/test/intltest/utxttest.h (revision 39670) ++++ icu4c/source/test/intltest/utxttest.h (revision 39671) +@@ -39,4 +39,5 @@ + void Ticket10983(); + void Ticket12130(); ++ void Ticket12888(); + + private: diff --git a/bsp/buildroot/package/icu/icu.mk b/bsp/buildroot/package/icu/icu.mk index b9e42de9..a435e471 100644 --- a/bsp/buildroot/package/icu/icu.mk +++ b/bsp/buildroot/package/icu/icu.mk @@ -8,7 +8,7 @@ ICU_VERSION = 58.2 ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION) ICU_LICENSE = ICU License -ICU_LICENSE_FILES = license.html +ICU_LICENSE_FILES = LICENSE ICU_DEPENDENCIES = host-icu ICU_INSTALL_STAGING = YES diff --git a/bsp/buildroot/package/imagemagick/0001-https-github.com-ImageMagick-ImageMagick-issues-415.patch b/bsp/buildroot/package/imagemagick/0001-https-github.com-ImageMagick-ImageMagick-issues-415.patch new file mode 100644 index 00000000..943679ed --- /dev/null +++ b/bsp/buildroot/package/imagemagick/0001-https-github.com-ImageMagick-ImageMagick-issues-415.patch @@ -0,0 +1,52 @@ +From b218117cad34d39b9ffb587b45c71c5a49b12bde Mon Sep 17 00:00:00 2001 +From: Cristy +Date: Fri, 31 Mar 2017 15:24:33 -0400 +Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/415 + +Fixes CVE-2017-7606 + +Signed-off-by: Peter Korsgaard +--- + coders/pnm.c | 2 +- + coders/rle.c | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/coders/pnm.c b/coders/pnm.c +index 9a1221d79..c525ebb8f 100644 +--- a/coders/pnm.c ++++ b/coders/pnm.c +@@ -1979,7 +1979,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image, + pixel=ScaleQuantumToChar(GetPixelRed(image,p)); + else + pixel=ScaleQuantumToAny(GetPixelRed(image,p), +- max_value); ++ max_value); + } + q=PopCharPixel((unsigned char) pixel,q); + p+=GetPixelChannels(image); +diff --git a/coders/rle.c b/coders/rle.c +index 2318901ec..ec071dc7b 100644 +--- a/coders/rle.c ++++ b/coders/rle.c +@@ -271,7 +271,8 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) + p=colormap; + for (i=0; i < (ssize_t) number_colormaps; i++) + for (x=0; x < (ssize_t) map_length; x++) +- *p++=(unsigned char) ScaleShortToQuantum(ReadBlobLSBShort(image)); ++ *p++=(unsigned char) ScaleQuantumToChar(ScaleShortToQuantum( ++ ReadBlobLSBShort(image))); + } + if ((flags & 0x08) != 0) + { +@@ -476,7 +477,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) + for (x=0; x < (ssize_t) number_planes; x++) + { + ValidateColormapValue(image,(size_t) (x*map_length+ +- (*p & mask)),&index,exception); ++ (*p & mask)),&index,exception); + *p=colormap[(ssize_t) index]; + p++; + } +-- +2.11.0 + diff --git a/bsp/buildroot/package/imagemagick/0001-png.c-unbreak-build-without-JPEG-support.patch b/bsp/buildroot/package/imagemagick/0001-png.c-unbreak-build-without-JPEG-support.patch deleted file mode 100644 index 00a1045b..00000000 --- a/bsp/buildroot/package/imagemagick/0001-png.c-unbreak-build-without-JPEG-support.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5d0e9c53f49022df5154eb3c04900f48b1c6448e Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Mon, 6 Feb 2017 17:39:31 +0100 -Subject: [PATCH] png.c: unbreak build without JPEG support - -Since commit a9e228f8ac26 (Implemented a private PNG caNv (canvas) chunk), -PNGsLong gets called unconditionally, but it is only defined if JPEG -support is enabled (which defines JNG_SUPPORTED), breaking the build: - -MagickCore/.libs/libMagickCore-7.Q16HDRI.a(MagickCore_libMagickCore_7_Q16HDRI_la-png.o): In function `WriteOnePNGImage': -png.c:(.text+0x748d): undefined reference to `PNGsLong' -png.c:(.text+0x74b7): undefined reference to `PNGsLong' - -For build log, see: -http://autobuild.buildroot.net/results/d20/d20eecec8e7b947759185f77a6c8e610dd7393f3/build-end.log - -Fix it by unconditionally defining the helper function. - -Submitted-upstream: https://github.com/ImageMagick/ImageMagick/pull/373 -Signed-off-by: Peter Korsgaard ---- - coders/png.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/coders/png.c b/coders/png.c -index aebe59281..1328b1aab 100644 ---- a/coders/png.c -+++ b/coders/png.c -@@ -1229,7 +1229,6 @@ static void PNGLong(png_bytep p,png_uint_32 value) - *p++=(png_byte) (value & 0xff); - } - --#if defined(JNG_SUPPORTED) - static void PNGsLong(png_bytep p,png_int_32 value) - { - *p++=(png_byte) ((value >> 24) & 0xff); -@@ -1237,7 +1236,6 @@ static void PNGsLong(png_bytep p,png_int_32 value) - *p++=(png_byte) ((value >> 8) & 0xff); - *p++=(png_byte) (value & 0xff); - } --#endif - - static void PNGShort(png_bytep p,png_uint_16 value) - { --- -2.11.0 - diff --git a/bsp/buildroot/package/imagemagick/imagemagick.hash b/bsp/buildroot/package/imagemagick/imagemagick.hash index 90e1db53..ff7b24a9 100644 --- a/bsp/buildroot/package/imagemagick/imagemagick.hash +++ b/bsp/buildroot/package/imagemagick/imagemagick.hash @@ -1,2 +1,2 @@ # From http://www.imagemagick.org/download/releases/digest.rdf -sha256 1ee004740b7ab47fff3c92ae4a89dcbd0181c4d5f31fcb7e3697412ea384a0da ImageMagick-7.0.4-6.tar.xz +sha256 4a1dde5bdfec0fc549955a051be25b7ff96dfb192060997699e43c7ce0f06ab2 ImageMagick-7.0.5-4.tar.xz diff --git a/bsp/buildroot/package/imagemagick/imagemagick.mk b/bsp/buildroot/package/imagemagick/imagemagick.mk index a9172973..9bef6f78 100644 --- a/bsp/buildroot/package/imagemagick/imagemagick.mk +++ b/bsp/buildroot/package/imagemagick/imagemagick.mk @@ -4,7 +4,7 @@ # ################################################################################ -IMAGEMAGICK_VERSION = 7.0.4-6 +IMAGEMAGICK_VERSION = 7.0.5-4 IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.xz IMAGEMAGICK_SITE = http://www.imagemagick.org/download/releases IMAGEMAGICK_LICENSE = Apache-2.0 diff --git a/bsp/buildroot/package/jasper/0002-Fixed-bugs-due-to-uninitialized-data-in-the-JP2-deco.patch b/bsp/buildroot/package/jasper/0002-Fixed-bugs-due-to-uninitialized-data-in-the-JP2-deco.patch new file mode 100644 index 00000000..be847205 --- /dev/null +++ b/bsp/buildroot/package/jasper/0002-Fixed-bugs-due-to-uninitialized-data-in-the-JP2-deco.patch @@ -0,0 +1,286 @@ +From e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d Mon Sep 17 00:00:00 2001 +From: Michael Adams +Date: Sat, 4 Mar 2017 14:43:24 -0800 +Subject: [PATCH] Fixed bugs due to uninitialized data in the JP2 decoder. + Also, added some comments marking I/O stream interfaces that probably need to + be changed (in the long term) to fix integer overflow problems. + +Signed-off-by: Peter Korsgaard +--- + src/libjasper/base/jas_stream.c | 18 +++++++++++++++++ + src/libjasper/jp2/jp2_cod.c | 44 ++++++++++++++++++++++++++++------------- + 2 files changed, 48 insertions(+), 14 deletions(-) + +diff --git a/src/libjasper/base/jas_stream.c b/src/libjasper/base/jas_stream.c +index 327ee57..d70408f 100644 +--- a/src/libjasper/base/jas_stream.c ++++ b/src/libjasper/base/jas_stream.c +@@ -664,6 +664,7 @@ int jas_stream_ungetc(jas_stream_t *stream, int c) + return 0; + } + ++/* FIXME integral type */ + int jas_stream_read(jas_stream_t *stream, void *buf, int cnt) + { + int n; +@@ -690,6 +691,7 @@ int jas_stream_read(jas_stream_t *stream, void *buf, int cnt) + return n; + } + ++/* FIXME integral type */ + int jas_stream_write(jas_stream_t *stream, const void *buf, int cnt) + { + int n; +@@ -742,6 +744,7 @@ int jas_stream_puts(jas_stream_t *stream, const char *s) + return 0; + } + ++/* FIXME integral type */ + char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize) + { + int c; +@@ -765,6 +768,7 @@ char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize) + return buf; + } + ++/* FIXME integral type */ + int jas_stream_gobble(jas_stream_t *stream, int n) + { + int m; +@@ -783,6 +787,7 @@ int jas_stream_gobble(jas_stream_t *stream, int n) + return n; + } + ++/* FIXME integral type */ + int jas_stream_pad(jas_stream_t *stream, int n, int c) + { + int m; +@@ -885,6 +890,7 @@ long jas_stream_tell(jas_stream_t *stream) + * Buffer initialization code. + \******************************************************************************/ + ++/* FIXME integral type */ + static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, + int bufsize) + { +@@ -1060,6 +1066,7 @@ static int jas_strtoopenmode(const char *s) + return openmode; + } + ++/* FIXME integral type */ + int jas_stream_copy(jas_stream_t *out, jas_stream_t *in, int n) + { + int all; +@@ -1085,6 +1092,7 @@ int jas_stream_copy(jas_stream_t *out, jas_stream_t *in, int n) + return 0; + } + ++/* FIXME integral type */ + long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt) + { + int old; +@@ -1094,6 +1102,7 @@ long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt) + return old; + } + ++/* FIXME integral type */ + int jas_stream_display(jas_stream_t *stream, FILE *fp, int n) + { + unsigned char buf[16]; +@@ -1168,6 +1177,7 @@ long jas_stream_length(jas_stream_t *stream) + * Memory stream object. + \******************************************************************************/ + ++/* FIXME integral type */ + static int mem_read(jas_stream_obj_t *obj, char *buf, int cnt) + { + ssize_t n; +@@ -1209,6 +1219,7 @@ static int mem_resize(jas_stream_memobj_t *m, size_t bufsize) + return 0; + } + ++/* FIXME integral type */ + static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt) + { + size_t n; +@@ -1264,6 +1275,7 @@ static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt) + return ret; + } + ++/* FIXME integral type */ + static long mem_seek(jas_stream_obj_t *obj, long offset, int origin) + { + jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; +@@ -1310,6 +1322,7 @@ static int mem_close(jas_stream_obj_t *obj) + * File stream object. + \******************************************************************************/ + ++/* FIXME integral type */ + static int file_read(jas_stream_obj_t *obj, char *buf, int cnt) + { + jas_stream_fileobj_t *fileobj; +@@ -1318,6 +1331,7 @@ static int file_read(jas_stream_obj_t *obj, char *buf, int cnt) + return read(fileobj->fd, buf, cnt); + } + ++/* FIXME integral type */ + static int file_write(jas_stream_obj_t *obj, char *buf, int cnt) + { + jas_stream_fileobj_t *fileobj; +@@ -1326,6 +1340,7 @@ static int file_write(jas_stream_obj_t *obj, char *buf, int cnt) + return write(fileobj->fd, buf, cnt); + } + ++/* FIXME integral type */ + static long file_seek(jas_stream_obj_t *obj, long offset, int origin) + { + jas_stream_fileobj_t *fileobj; +@@ -1352,6 +1367,7 @@ static int file_close(jas_stream_obj_t *obj) + * Stdio file stream object. + \******************************************************************************/ + ++/* FIXME integral type */ + static int sfile_read(jas_stream_obj_t *obj, char *buf, int cnt) + { + FILE *fp; +@@ -1367,6 +1383,7 @@ static int sfile_read(jas_stream_obj_t *obj, char *buf, int cnt) + return result; + } + ++/* FIXME integral type */ + static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt) + { + FILE *fp; +@@ -1377,6 +1394,7 @@ static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt) + return (n != JAS_CAST(size_t, cnt)) ? (-1) : cnt; + } + ++/* FIXME integral type */ + static long sfile_seek(jas_stream_obj_t *obj, long offset, int origin) + { + FILE *fp; +diff --git a/src/libjasper/jp2/jp2_cod.c b/src/libjasper/jp2/jp2_cod.c +index 7f3608a..8d98a2c 100644 +--- a/src/libjasper/jp2/jp2_cod.c ++++ b/src/libjasper/jp2/jp2_cod.c +@@ -183,15 +183,28 @@ jp2_boxinfo_t jp2_boxinfo_unk = { + * Box constructor. + \******************************************************************************/ + +-jp2_box_t *jp2_box_create(int type) ++jp2_box_t *jp2_box_create0() + { + jp2_box_t *box; +- jp2_boxinfo_t *boxinfo; +- + if (!(box = jas_malloc(sizeof(jp2_box_t)))) { + return 0; + } + memset(box, 0, sizeof(jp2_box_t)); ++ box->type = 0; ++ box->len = 0; ++ // Mark the box data as never having been constructed ++ // so that we will not errantly attempt to destroy it later. ++ box->ops = &jp2_boxinfo_unk.ops; ++ return box; ++} ++ ++jp2_box_t *jp2_box_create(int type) ++{ ++ jp2_box_t *box; ++ jp2_boxinfo_t *boxinfo; ++ if (!(box = jp2_box_create0())) { ++ return 0; ++ } + box->type = type; + box->len = 0; + if (!(boxinfo = jp2_boxinfolookup(type))) { +@@ -248,14 +261,9 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) + box = 0; + tmpstream = 0; + +- if (!(box = jas_malloc(sizeof(jp2_box_t)))) { ++ if (!(box = jp2_box_create0())) { + goto error; + } +- +- // Mark the box data as never having been constructed +- // so that we will not errantly attempt to destroy it later. +- box->ops = &jp2_boxinfo_unk.ops; +- + if (jp2_getuint32(in, &len) || jp2_getuint32(in, &box->type)) { + goto error; + } +@@ -263,10 +271,12 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) + box->info = boxinfo; + box->len = len; + JAS_DBGLOG(10, ( +- "preliminary processing of JP2 box: type=%c%s%c (0x%08x); length=%d\n", ++ "preliminary processing of JP2 box: " ++ "type=%c%s%c (0x%08x); length=%"PRIuFAST32"\n", + '"', boxinfo->name, '"', box->type, box->len + )); + if (box->len == 1) { ++ JAS_DBGLOG(10, ("big length\n")); + if (jp2_getuint64(in, &extlen)) { + goto error; + } +@@ -382,6 +392,7 @@ static int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in) + { + jp2_bpcc_t *bpcc = &box->data.bpcc; + unsigned int i; ++ bpcc->bpcs = 0; + bpcc->numcmpts = box->datalen; + if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) { + return -1; +@@ -462,6 +473,7 @@ static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in) + jp2_cdef_t *cdef = &box->data.cdef; + jp2_cdefchan_t *chan; + unsigned int channo; ++ cdef->ents = 0; + if (jp2_getuint16(in, &cdef->numchans)) { + return -1; + } +@@ -518,7 +530,9 @@ int jp2_box_put(jp2_box_t *box, jas_stream_t *out) + } + + if (dataflag) { +- if (jas_stream_copy(out, tmpstream, box->len - JP2_BOX_HDRLEN(false))) { ++ if (jas_stream_copy(out, tmpstream, box->len - ++ JP2_BOX_HDRLEN(false))) { ++ jas_eprintf("cannot copy box data\n"); + goto error; + } + jas_stream_close(tmpstream); +@@ -777,6 +791,7 @@ static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in) + jp2_cmap_t *cmap = &box->data.cmap; + jp2_cmapent_t *ent; + unsigned int i; ++ cmap->ents = 0; + + cmap->numchans = (box->datalen) / 4; + if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) { +@@ -835,6 +850,7 @@ static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in) + int_fast32_t x; + + pclr->lutdata = 0; ++ pclr->bpc = 0; + + if (jp2_getuint16(in, &pclr->numlutents) || + jp2_getuint8(in, &pclr->numchans)) { +@@ -869,9 +885,9 @@ static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out) + #if 0 + jp2_pclr_t *pclr = &box->data.pclr; + #endif +-/* Eliminate warning about unused variable. */ +-box = 0; +-out = 0; ++ /* Eliminate warning about unused variable. */ ++ box = 0; ++ out = 0; + return -1; + } + +-- +2.11.0 + diff --git a/bsp/buildroot/package/jasper/0003-Added-a-check-in-the-JP2-encoder-to-ensure-that-the-.patch b/bsp/buildroot/package/jasper/0003-Added-a-check-in-the-JP2-encoder-to-ensure-that-the-.patch new file mode 100644 index 00000000..16a3e75b --- /dev/null +++ b/bsp/buildroot/package/jasper/0003-Added-a-check-in-the-JP2-encoder-to-ensure-that-the-.patch @@ -0,0 +1,30 @@ +From 58ba0365d911b9f9dd68e9abf826682c0b4f2293 Mon Sep 17 00:00:00 2001 +From: Michael Adams +Date: Mon, 6 Mar 2017 08:06:54 -0800 +Subject: [PATCH] Added a check in the JP2 encoder to ensure that the image to + be coded has at least one component. + +Signed-off-by: Peter Korsgaard +--- + src/libjasper/jp2/jp2_enc.c | 5 +++++ + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/src/libjasper/jp2/jp2_enc.c b/src/libjasper/jp2/jp2_enc.c +index 9a5e106..af4d9a4 100644 +--- a/src/libjasper/jp2/jp2_enc.c ++++ b/src/libjasper/jp2/jp2_enc.c +@@ -115,6 +115,11 @@ int jp2_encode(jas_image_t *image, jas_stream_t *out, const char *optstr) + iccstream = 0; + iccprof = 0; + ++ if (jas_image_numcmpts(image) < 1) { ++ jas_eprintf("image must have at least one component\n"); ++ goto error; ++ } ++ + allcmptssame = 1; + sgnd = jas_image_cmptsgnd(image, 0); + prec = jas_image_cmptprec(image, 0); +-- +2.11.0 + diff --git a/bsp/buildroot/package/kvm-unit-tests/0001-x86-hyperv_clock-be-explicit-about-mul-instruction-d.patch b/bsp/buildroot/package/kvm-unit-tests/0001-x86-hyperv_clock-be-explicit-about-mul-instruction-d.patch new file mode 100644 index 00000000..c8ee6b1a --- /dev/null +++ b/bsp/buildroot/package/kvm-unit-tests/0001-x86-hyperv_clock-be-explicit-about-mul-instruction-d.patch @@ -0,0 +1,35 @@ +From 022ae220d6e7b5bd064bc8698c271dca4dac7d8c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 8 May 2017 22:27:25 +0200 +Subject: [PATCH] x86/hyperv_clock: be explicit about mul instruction data size + +With gcc 4.7.2, the build fails with: + +x86/hyperv_clock.c: Assembler messages: +x86/hyperv_clock.c:21: Error: no instruction mnemonic suffix given and no register operands; can't size instruction + +In order to avoid this, make the mul instruction data size explicit by +adding the appropriate suffix. It operates on 64-bit data, so use +"mulq". + +Signed-off-by: Thomas Petazzoni +--- + x86/hyperv_clock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/x86/hyperv_clock.c b/x86/hyperv_clock.c +index 8b1deba..6c4dd56 100644 +--- a/x86/hyperv_clock.c ++++ b/x86/hyperv_clock.c +@@ -19,7 +19,7 @@ static inline u64 scale_delta(u64 delta, u64 mul_frac) + u64 product, unused; + + __asm__ ( +- "mul %3" ++ "mulq %3" + : "=d" (product), "=a" (unused) : "1" (delta), "rm" ((u64)mul_frac) ); + + return product; +-- +2.7.4 + diff --git a/bsp/buildroot/package/kyua/Config.in b/bsp/buildroot/package/kyua/Config.in index 4f887b0e..4fc5e098 100644 --- a/bsp/buildroot/package/kyua/Config.in +++ b/bsp/buildroot/package/kyua/Config.in @@ -3,6 +3,7 @@ config BR2_PACKAGE_KYUA depends on BR2_INSTALL_LIBSTDCPP depends on BR2_PACKAGE_HAS_LUAINTERPRETER # lutok depends on !BR2_PACKAGE_LUAJIT # lutok + depends on !BR2_STATIC_LIBS # lutok depends on BR2_USE_MMU # atf select BR2_PACKAGE_ATF select BR2_PACKAGE_LUTOK @@ -16,7 +17,7 @@ config BR2_PACKAGE_KYUA https://github.com/jmmv/kyua -comment "kyua needs a toolchain w/ C++ and full Lua" - depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT +comment "kyua needs a toolchain w/ C++, dynamic library and full Lua" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT || BR2_STATIC_LIBS depends on BR2_PACKAGE_HAS_LUAINTERPRETER depends on BR2_USE_MMU diff --git a/bsp/buildroot/package/libcec/libcec.hash b/bsp/buildroot/package/libcec/libcec.hash index 5416c20f..377f343a 100644 --- a/bsp/buildroot/package/libcec/libcec.hash +++ b/bsp/buildroot/package/libcec/libcec.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 b8b8dd31f3ebdd5472f03ab7d401600ea0d959b1288b9ca24bf457ef60e2ba27 libcec-4.0.2.tar.gz +sha256 0f29d5a2d155b507807ba896bc3b3e50a0ab56bf8f543a2bf5c2798c790292b5 libcec-2c675dac48387c48c7f43c5d2547ef0c4ef5c7dd.tar.gz diff --git a/bsp/buildroot/package/libcec/libcec.mk b/bsp/buildroot/package/libcec/libcec.mk index f00e10f5..c9a05a5f 100644 --- a/bsp/buildroot/package/libcec/libcec.mk +++ b/bsp/buildroot/package/libcec/libcec.mk @@ -4,8 +4,8 @@ # ################################################################################ -LIBCEC_VERSION = 4.0.2 -LIBCEC_SITE = $(call github,Pulse-Eight,libcec,libcec-$(LIBCEC_VERSION)) +LIBCEC_VERSION = 2c675dac48387c48c7f43c5d2547ef0c4ef5c7dd +LIBCEC_SITE = $(call github,Pulse-Eight,libcec,$(LIBCEC_VERSION)) LIBCEC_LICENSE = GPLv2+ LIBCEC_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/libcroco/0001-input-check-end-of-input-before-reading-a-byte.patch b/bsp/buildroot/package/libcroco/0001-input-check-end-of-input-before-reading-a-byte.patch new file mode 100644 index 00000000..831b1a74 --- /dev/null +++ b/bsp/buildroot/package/libcroco/0001-input-check-end-of-input-before-reading-a-byte.patch @@ -0,0 +1,62 @@ +From 898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Sun, 16 Apr 2017 13:13:43 +0200 +Subject: [PATCH] input: check end of input before reading a byte + +Fixes CVE-2017-7960 + +When reading bytes we weren't check that the index wasn't +out of bound and this could produce an invalid read which +could deal to a security bug. + +Signed-off-by: Peter Korsgaard +--- + src/cr-input.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/cr-input.c b/src/cr-input.c +index 49000b1..3b63a88 100644 +--- a/src/cr-input.c ++++ b/src/cr-input.c +@@ -256,7 +256,7 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc) + *we should free buf here because it's own by CRInput. + *(see the last parameter of cr_input_new_from_buf(). + */ +- buf = NULL ; ++ buf = NULL; + } + + cleanup: +@@ -404,6 +404,8 @@ cr_input_get_nb_bytes_left (CRInput const * a_this) + enum CRStatus + cr_input_read_byte (CRInput * a_this, guchar * a_byte) + { ++ gulong nb_bytes_left = 0; ++ + g_return_val_if_fail (a_this && PRIVATE (a_this) + && a_byte, CR_BAD_PARAM_ERROR); + +@@ -413,6 +415,12 @@ cr_input_read_byte (CRInput * a_this, guchar * a_byte) + if (PRIVATE (a_this)->end_of_input == TRUE) + return CR_END_OF_INPUT_ERROR; + ++ nb_bytes_left = cr_input_get_nb_bytes_left (a_this); ++ ++ if (nb_bytes_left < 1) { ++ return CR_END_OF_INPUT_ERROR; ++ } ++ + *a_byte = PRIVATE (a_this)->in_buf[PRIVATE (a_this)->next_byte_index]; + + if (PRIVATE (a_this)->nb_bytes - +@@ -477,7 +485,6 @@ cr_input_read_char (CRInput * a_this, guint32 * a_char) + if (*a_char == '\n') { + PRIVATE (a_this)->end_of_line = TRUE; + } +- + } + + return status; +-- +2.11.0 + diff --git a/bsp/buildroot/package/libcroco/0002-tknzr-support-only-max-long-rgb-values.patch b/bsp/buildroot/package/libcroco/0002-tknzr-support-only-max-long-rgb-values.patch new file mode 100644 index 00000000..1a9bcd94 --- /dev/null +++ b/bsp/buildroot/package/libcroco/0002-tknzr-support-only-max-long-rgb-values.patch @@ -0,0 +1,46 @@ +From 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Sun, 16 Apr 2017 13:56:09 +0200 +Subject: [PATCH] tknzr: support only max long rgb values + +Fixes CVE-2017-7961 + +This fixes a possible out of bound when reading rgbs which +are longer than the support MAXLONG + +Signed-off-by: Peter Korsgaard +--- + src/cr-tknzr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/cr-tknzr.c b/src/cr-tknzr.c +index 1a7cfeb..1548c35 100644 +--- a/src/cr-tknzr.c ++++ b/src/cr-tknzr.c +@@ -1279,6 +1279,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + red = num->val; + cr_num_destroy (num); + num = NULL; +@@ -1298,6 +1303,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + PEEK_BYTE (a_this, 1, &next_bytes[0]); + if (next_bytes[0] == '%') { + SKIP_CHARS (a_this, 1); +-- +2.11.0 + diff --git a/bsp/buildroot/package/libcurl/libcurl.hash b/bsp/buildroot/package/libcurl/libcurl.hash index 72cae81c..f8885e04 100644 --- a/bsp/buildroot/package/libcurl/libcurl.hash +++ b/bsp/buildroot/package/libcurl/libcurl.hash @@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 b2345a8bef87b4c229dedf637cb203b5e21db05e20277c8e1094f0d4da180801 curl-7.53.0.tar.bz2 +sha256 f50ebaf43c507fa7cc32be4b8108fa8bbd0f5022e90794388f3c7694a302ff06 curl-7.54.0.tar.bz2 diff --git a/bsp/buildroot/package/libcurl/libcurl.mk b/bsp/buildroot/package/libcurl/libcurl.mk index b5dcb377..6f4803e0 100644 --- a/bsp/buildroot/package/libcurl/libcurl.mk +++ b/bsp/buildroot/package/libcurl/libcurl.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBCURL_VERSION = 7.53.0 +LIBCURL_VERSION = 7.54.0 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2 LIBCURL_SITE = https://curl.haxx.se/download LIBCURL_DEPENDENCIES = host-pkgconf \ diff --git a/bsp/buildroot/package/libev/libev.mk b/bsp/buildroot/package/libev/libev.mk index 02bc72cb..8925a626 100644 --- a/bsp/buildroot/package/libev/libev.mk +++ b/bsp/buildroot/package/libev/libev.mk @@ -5,7 +5,7 @@ ################################################################################ LIBEV_VERSION = 4.22 -LIBEV_SITE = http://dist.schmorp.de/libev +LIBEV_SITE = http://dist.schmorp.de/libev/Attic LIBEV_INSTALL_STAGING = YES LIBEV_LICENSE = BSD-2c or GPLv2+ LIBEV_LICENSE_FILES = LICENSE diff --git a/bsp/buildroot/package/libiio/libiio.mk b/bsp/buildroot/package/libiio/libiio.mk index 89776109..aaa6c706 100644 --- a/bsp/buildroot/package/libiio/libiio.mk +++ b/bsp/buildroot/package/libiio/libiio.mk @@ -14,6 +14,7 @@ LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \ -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \ -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \ -DWITH_MATLAB_BINDINGS_API=OFF \ + -DMATLAB_BINDINGS=OFF \ -DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \ -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ -DWITH_DOC=OFF diff --git a/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.hash b/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.hash index 5c15b9df..a1460fd7 100644 --- a/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.hash +++ b/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 54797f6e763d417627f89f60e4ae0a431dab0523f92f83def23ea02d0defafea libmicrohttpd-0.9.52.tar.gz +sha256 0c1cab8dc9f2588bd3076a28f77a7f8de9560cbf2d80e53f9a8696ada80ed0f8 libmicrohttpd-0.9.55.tar.gz diff --git a/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.mk b/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.mk index 83791b34..8828eb54 100644 --- a/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.mk +++ b/bsp/buildroot/package/libmicrohttpd/libmicrohttpd.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBMICROHTTPD_VERSION = 0.9.52 +LIBMICROHTTPD_VERSION = 0.9.55 LIBMICROHTTPD_SITE = $(BR2_GNU_MIRROR)/libmicrohttpd LIBMICROHTTPD_LICENSE_FILES = COPYING LIBMICROHTTPD_INSTALL_STAGING = YES diff --git a/bsp/buildroot/package/libminiupnpc/0001-miniupnpc-Fix-CVE-2017-8798.patch b/bsp/buildroot/package/libminiupnpc/0001-miniupnpc-Fix-CVE-2017-8798.patch new file mode 100644 index 00000000..25591fc4 --- /dev/null +++ b/bsp/buildroot/package/libminiupnpc/0001-miniupnpc-Fix-CVE-2017-8798.patch @@ -0,0 +1,59 @@ +From f0f1f4b22d6a98536377a1bb07e7c20e4703d229 Mon Sep 17 00:00:00 2001 +From: Thomas Bernard +Date: Tue, 9 May 2017 12:00:47 +0200 +Subject: [PATCH] miniupnpc: Fix CVE-2017-8798 + +Thanks to tin/Team OSTStrom + +[Peter: drop Changelog.txt modification, convert to -p1 format] +Signed-off-by: Peter Korsgaard +--- + miniupnpc/miniwget.c | 12 +++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/miniwget.c b/miniwget.c +index 37cb47b7..1eda57c5 100644 +--- a/miniwget.c ++++ b/miniwget.c +@@ -284,11 +284,12 @@ getHTTPResponse(int s, int * size, int * status_code) + goto end_of_stream; + } + } +- bytestocopy = ((int)chunksize < (n - i))?chunksize:(unsigned int)(n - i); ++ /* it is guaranteed that (n >= i) */ ++ bytestocopy = (chunksize < (unsigned int)(n - i))?chunksize:(unsigned int)(n - i); + if((content_buf_used + bytestocopy) > content_buf_len) + { + char * tmp; +- if(content_length >= (int)(content_buf_used + bytestocopy)) { ++ if((content_length >= 0) && ((unsigned int)content_length >= (content_buf_used + bytestocopy))) { + content_buf_len = content_length; + } else { + content_buf_len = content_buf_used + bytestocopy; +@@ -313,14 +314,15 @@ getHTTPResponse(int s, int * size, int * status_code) + { + /* not chunked */ + if(content_length > 0 +- && (int)(content_buf_used + n) > content_length) { ++ && (content_buf_used + n) > (unsigned int)content_length) { + /* skipping additional bytes */ + n = content_length - content_buf_used; + } + if(content_buf_used + n > content_buf_len) + { + char * tmp; +- if(content_length >= (int)(content_buf_used + n)) { ++ if(content_length >= 0 ++ && (unsigned int)content_length >= (content_buf_used + n)) { + content_buf_len = content_length; + } else { + content_buf_len = content_buf_used + n; +@@ -340,7 +342,7 @@ getHTTPResponse(int s, int * size, int * status_code) + } + } + /* use the Content-Length header value if available */ +- if(content_length > 0 && (int)content_buf_used >= content_length) ++ if(content_length > 0 && content_buf_used >= (unsigned int)content_length) + { + #ifdef DEBUG + printf("End of HTTP content\n"); diff --git a/bsp/buildroot/package/libnl/libnl.hash b/bsp/buildroot/package/libnl/libnl.hash index 2f1a3cb1..eafba4a3 100644 --- a/bsp/buildroot/package/libnl/libnl.hash +++ b/bsp/buildroot/package/libnl/libnl.hash @@ -1,2 +1,3 @@ # From https://github.com/thom311/libnl/releases/download/libnl3_2_27/libnl-3.2.27.tar.gz.sha256sum sha256 4bbbf92b3c78a90f423cf96260bf419a28b75db8cced47051217a56795f58ec6 libnl-3.2.27.tar.gz +sha256 b7bb929194eefc56c786a7e1ae5176b54713f9013ccec63760f232742ae80361 3e18948f17148e6a3c4255bdeaaf01ef6081ceeb.patch diff --git a/bsp/buildroot/package/libnl/libnl.mk b/bsp/buildroot/package/libnl/libnl.mk index 85c0db86..af28382d 100644 --- a/bsp/buildroot/package/libnl/libnl.mk +++ b/bsp/buildroot/package/libnl/libnl.mk @@ -11,6 +11,8 @@ LIBNL_LICENSE_FILES = COPYING LIBNL_INSTALL_STAGING = YES LIBNL_DEPENDENCIES = host-bison host-flex +LIBNL_PATCH = https://github.com/thom311/libnl/commit/3e18948f17148e6a3c4255bdeaaf01ef6081ceeb.patch + ifeq ($(BR2_PACKAGE_LIBNL_TOOLS),y) LIBNL_CONF_OPTS += --enable-cli else diff --git a/bsp/buildroot/package/libnspr/0001-nios2.patch b/bsp/buildroot/package/libnspr/0001-nios2.patch index 22cacd72..e10e7e9a 100644 --- a/bsp/buildroot/package/libnspr/0001-nios2.patch +++ b/bsp/buildroot/package/libnspr/0001-nios2.patch @@ -3,14 +3,15 @@ Add Nios-II support [Gustavo: update for nspr 4.10.9] Signed-off-by: Ezequiel Garcia -diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg ---- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:43.229387215 -0300 -+++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:55.277798841 -0300 +Index: b/nspr/pr/include/md/_linux.cfg +=================================================================== +--- a/nspr/pr/include/md/_linux.cfg ++++ b/nspr/pr/include/md/_linux.cfg @@ -1017,6 +1017,51 @@ #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 -+#elif defined(nios2) ++#elif defined(__nios2__) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN @@ -58,14 +59,15 @@ diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/in #else #error "Unknown CPU architecture" -diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h ---- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:11:43.229387215 -0300 -+++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:12:22.474728003 -0300 +Index: b/nspr/pr/include/md/_linux.h +=================================================================== +--- a/nspr/pr/include/md/_linux.h ++++ b/nspr/pr/include/md/_linux.h @@ -57,6 +57,8 @@ #define _PR_SI_ARCHITECTURE "m32r" #elif defined(__or1k__) #define _PR_SI_ARCHITECTURE "or1k" -+#elif defined(nios2) ++#elif defined(__nios2__) +#define _PR_SI_ARCHITECTURE "nios2" #else #error "Unknown CPU architecture" diff --git a/bsp/buildroot/package/libnspr/0002-microblaze.patch b/bsp/buildroot/package/libnspr/0002-microblaze.patch index f1416e7e..7cf1f0df 100644 --- a/bsp/buildroot/package/libnspr/0002-microblaze.patch +++ b/bsp/buildroot/package/libnspr/0002-microblaze.patch @@ -3,9 +3,10 @@ Add Microblaze support [Gustavo: update for nspr 4.10.9] Signed-off-by: Spenser Gilliland -diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg ---- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:11.845414714 -0300 -+++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:20.435708195 -0300 +Index: b/nspr/pr/include/md/_linux.cfg +=================================================================== +--- a/nspr/pr/include/md/_linux.cfg ++++ b/nspr/pr/include/md/_linux.cfg @@ -1062,6 +1062,56 @@ #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 @@ -63,18 +64,16 @@ diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/in #else #error "Unknown CPU architecture" -diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h ---- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:13:11.845414714 -0300 -+++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:14:53.351882603 -0300 -@@ -57,8 +57,11 @@ +Index: b/nspr/pr/include/md/_linux.h +=================================================================== +--- a/nspr/pr/include/md/_linux.h ++++ b/nspr/pr/include/md/_linux.h +@@ -57,6 +57,8 @@ #define _PR_SI_ARCHITECTURE "m32r" #elif defined(__or1k__) #define _PR_SI_ARCHITECTURE "or1k" +#elif defined(__microblaze__) +#define _PR_SI_ARCHITECTURE "microblaze" - #elif defined(nios2) + #elif defined(__nios2__) #define _PR_SI_ARCHITECTURE "nios2" -+#elif defined(nios2) #else - #error "Unknown CPU architecture" - #endif diff --git a/bsp/buildroot/package/libnspr/libnspr.hash b/bsp/buildroot/package/libnspr/libnspr.hash index a4b19b7f..9111a32c 100644 --- a/bsp/buildroot/package/libnspr/libnspr.hash +++ b/bsp/buildroot/package/libnspr/libnspr.hash @@ -1,2 +1,2 @@ -# From https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.13.1/src/SHA256SUMS -sha256 5e4c1751339a76e7c772c0c04747488d7f8c98980b434dc846977e43117833ab nspr-4.13.1.tar.gz +# From https://ftp.mozilla.org/pub/nspr/releases/v4.14/src/SHA256SUMS +sha256 64fc18826257403a9132240aa3c45193d577a84b08e96f7e7770a97c074d17d5 nspr-4.14.tar.gz diff --git a/bsp/buildroot/package/libnspr/libnspr.mk b/bsp/buildroot/package/libnspr/libnspr.mk index d95f9709..f891bb3b 100644 --- a/bsp/buildroot/package/libnspr/libnspr.mk +++ b/bsp/buildroot/package/libnspr/libnspr.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBNSPR_VERSION = 4.13.1 +LIBNSPR_VERSION = 4.14 LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src LIBNSPR_SUBDIR = nspr diff --git a/bsp/buildroot/package/libnss/0001-cross-compile.patch b/bsp/buildroot/package/libnss/0001-cross-compile.patch deleted file mode 100644 index 31de71bc..00000000 --- a/bsp/buildroot/package/libnss/0001-cross-compile.patch +++ /dev/null @@ -1,48 +0,0 @@ -This patch allows us to set a value for the cross compiler via TARGETCC without -setting CC on the command line. CC is used for host tools as well as cross -compiled code so we cannot define it on the command line without breaking -the host tools build. - -[Gustavo: update for nss 3.16.1] -[baruch: add OPTIMIZER handling] -Signed-off-by: Will Newton - -diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk ---- nss-3.16.1-orig/nss/coreconf/Linux.mk 2014-05-02 06:27:18.000000000 +0300 -+++ nss-3.16.1/nss/coreconf/Linux.mk 2014-07-01 02:38:18.701480512 +0300 -@@ -16,9 +16,13 @@ - IMPL_STRATEGY = _PTH - endif - --CC = gcc --CCC = g++ --RANLIB = ranlib -+TARGETCC = gcc -+TARGETCCC = g++ -+TARGETRANLIB = ranlib -+ -+CC = $(TARGETCC) -+CCC = $(TARGETCCC) -+RANLIB = $(TARGETRANLIB) - - DEFAULT_COMPILER = gcc - -@@ -125,6 +129,7 @@ - endif - endif - -+OPTIMIZER = $(TARGET_OPTIMIZER) - - ifeq ($(USE_PTHREADS),1) - OS_PTHREAD = -lpthread -diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile ---- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile 2014-05-02 06:27:18.000000000 +0300 -+++ nss-3.16.1/nss/coreconf/nsinstall/Makefile 2014-07-01 02:38:48.102185011 +0300 -@@ -31,6 +31,7 @@ - - ifdef NATIVE_FLAGS - OS_CFLAGS=$(NATIVE_FLAGS) -+OPTIMIZER= - endif - - include $(DEPTH)/coreconf/rules.mk diff --git a/bsp/buildroot/package/libnss/0002-uclibc.patch b/bsp/buildroot/package/libnss/0001-uclibc.patch similarity index 100% rename from bsp/buildroot/package/libnss/0002-uclibc.patch rename to bsp/buildroot/package/libnss/0001-uclibc.patch diff --git a/bsp/buildroot/package/libnss/0003-it-uninitialized-fix.patch b/bsp/buildroot/package/libnss/0003-it-uninitialized-fix.patch deleted file mode 100644 index 7736c6a9..00000000 --- a/bsp/buildroot/package/libnss/0003-it-uninitialized-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User catdesk -# Date 1477710600 -7200 -# Sat Oct 29 05:10:00 2016 +0200 -# Node ID b9ef971b94ab110302d49255339077bc1b4aed7f -# Parent eb8c96563cd70aa69d48b01516085f7d2fb46178 -Bug 1313846 - Declare 'it = NULL' earlier. r=franziskus - -[Thomas: patch taken from upstream mercurial repository, revision -12791.] -Signed-off-by: Thomas Petazzoni - -diff -r eb8c96563cd7 -r b9ef971b94ab lib/jar/jarfile.c ---- a/nss/lib/jar/jarfile.c Mon Oct 31 17:31:20 2016 +0100 -+++ b/nss/lib/jar/jarfile.c Sat Oct 29 05:10:00 2016 +0200 -@@ -657,7 +657,7 @@ - jar_listzip(JAR *jar, JAR_FILE fp) - { - ZZLink *ent; -- JAR_Item *it; -+ JAR_Item *it = NULL; - JAR_Physical *phy = NULL; - struct ZipLocal *Local = PORT_ZNew(struct ZipLocal); - struct ZipCentral *Central = PORT_ZNew(struct ZipCentral); diff --git a/bsp/buildroot/package/libnss/libnss.hash b/bsp/buildroot/package/libnss/libnss.hash index 975e52d2..7be7e48a 100644 --- a/bsp/buildroot/package/libnss/libnss.hash +++ b/bsp/buildroot/package/libnss/libnss.hash @@ -1,2 +1,2 @@ -# From https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_2_RTM/src/SHA256SUMS -sha256 dc8ac8524469d0230274fd13a53fdcd74efe4aa67205dde1a4a92be87dc28524 nss-3.27.2.tar.gz +# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_30_2_RTM/src/SHA256SUMS +sha256 0d4a77ff26bcee79fa8afe0125e0df6ae9e798b6b36782fa29e28febf7cfce24 nss-3.30.2.tar.gz diff --git a/bsp/buildroot/package/libnss/libnss.mk b/bsp/buildroot/package/libnss/libnss.mk index 76532e81..3c38bb0c 100644 --- a/bsp/buildroot/package/libnss/libnss.mk +++ b/bsp/buildroot/package/libnss/libnss.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBNSS_VERSION = 3.27.2 +LIBNSS_VERSION = 3.30.2 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src LIBNSS_DISTDIR = dist @@ -33,9 +33,6 @@ LIBNSS_BUILD_VARS = \ NSS_USE_SYSTEM_SQLITE=1 \ NSS_ENABLE_ECC=1 \ NATIVE_CC="$(HOSTCC)" \ - TARGETCC="$(TARGET_CC)" \ - TARGETCCC="$(TARGET_CXX)" \ - TARGETRANLIB="$(TARGET_RANLIB)" \ OS_ARCH="Linux" \ OS_RELEASE="2.6" \ OS_TEST="$(ARCH)" @@ -55,17 +52,16 @@ endif endif define LIBNSS_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/nss coreconf \ + $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/nss coreconf \ SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ DIST=$(@D)/$(LIBNSS_DISTDIR) \ CHECKLOC= \ $(LIBNSS_BUILD_VARS) - $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/nss lib/dbm all \ + $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/nss lib/dbm all \ SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ DIST=$(@D)/$(LIBNSS_DISTDIR) \ CHECKLOC= \ - $(LIBNSS_BUILD_VARS) TARGET_OPTIMIZER="$(TARGET_CFLAGS)" \ - NATIVE_FLAGS="$(HOST_CFLAGS)" + $(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS)" endef define LIBNSS_INSTALL_STAGING_CMDS diff --git a/bsp/buildroot/package/libplatform/0001-p8-platform-config-fix-lookup-paths.patch b/bsp/buildroot/package/libplatform/0001-p8-platform-config-fix-lookup-paths.patch deleted file mode 100644 index d487fd94..00000000 --- a/bsp/buildroot/package/libplatform/0001-p8-platform-config-fix-lookup-paths.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 01b5478638c705af29f09ad4ed70289f70a21dcf Mon Sep 17 00:00:00 2001 -From: "Yann E. MORIN" -Date: Mon, 6 Feb 2017 14:04:47 +0100 -Subject: [PATCH] p8-platform-config: fix lookup paths - -Use the proper methods to find the headers and the library. - -Signed-off-by: Samuel Martin -Signed-off-by: "Yann E. MORIN" ---- - p8-platform-config.cmake.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/p8-platform-config.cmake.in b/p8-platform-config.cmake.in -index 47f30f1..f59418d 100644 ---- a/p8-platform-config.cmake.in -+++ b/p8-platform-config.cmake.in -@@ -10,7 +10,7 @@ - # - # propagate these properties from one build system to the other - set (p8-platform_VERSION "@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@") --set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) -+find_path (p8-platform_INCLUDE_DIRS p8-platform/os.h) - set (p8-platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") - set (p8-platform_LINKER_FLAGS "@p8-platform_LINKER_FLAGS@") - set (p8-platform_CONFIG_VARS "@p8-platform_CONFIG_VARS@") -@@ -19,7 +19,7 @@ set (p8-platform_CONFIG_VARS "@p8-platform_CONFIG_VARS@") - if(WIN32) - set (p8-platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/p8-platform.lib") - else(WIN32) -- set (p8-platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform") -+ find_library (p8-platform_LIBRARY p8-platform) - endif(WIN32) - set (p8-platform_LIBRARIES ${p8-platform_LIBRARY} "@p8-platform_LIBRARIES@") - mark_as_advanced (p8-platform_LIBRARY) --- -2.7.4 - diff --git a/bsp/buildroot/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch b/bsp/buildroot/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch new file mode 100644 index 00000000..89f35bdb --- /dev/null +++ b/bsp/buildroot/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch @@ -0,0 +1,40 @@ +From 65ba437ed5514dd5762a796d349ed5db49e40fe7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 29 Jul 2015 21:26:16 +0200 +Subject: [PATCH] platform-config.cmake: fix paths for cross-compilation + +Headers and library paths in platform-config.cmake must take into +account ${CMAKE_FIND_ROOT_PATH} to work in cross-compilation. + +Signed-off-by: Thomas Petazzoni +--- + platform-config.cmake.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/platform-config.cmake.in b/platform-config.cmake.in +index 7fe35fe..78b5085 100644 +--- a/platform-config.cmake.in ++++ b/platform-config.cmake.in +@@ -10,16 +10,16 @@ + # + # propagate these properties from one build system to the other + set (platform_VERSION "@platform_VERSION_MAJOR@.@platform_VERSION_MINOR@") +-set (platform_INCLUDE_DIRS @platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) ++set (platform_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/@platform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/include) + set (platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") + set (platform_LINKER_FLAGS "@platform_LINKER_FLAGS@") + set (platform_CONFIG_VARS "@platform_CONFIG_VARS@") + + # libraries come from the build tree where this file was generated + if(WIN32) +- set (platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib") ++ set (platform_LIBRARY "${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib") + else(WIN32) +- set (platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform") ++ set (platform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform") + endif(WIN32) + set (platform_LIBRARIES ${platform_LIBRARY} "@platform_LIBRARIES@") + mark_as_advanced (platform_LIBRARY) +-- +2.5.0 + diff --git a/bsp/buildroot/package/libplatform/libplatform.hash b/bsp/buildroot/package/libplatform/libplatform.hash index e3d5ed5a..8975dfd8 100644 --- a/bsp/buildroot/package/libplatform/libplatform.hash +++ b/bsp/buildroot/package/libplatform/libplatform.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 88711f1b949285867538a0b2e4189532778e1515325dfa1851eae9d18b6affd9 libplatform-2.1.0.tar.gz +sha256 3603ead8b16a48cb35b1e6dea330a693f10552b1a6ea036c5db9ec248cd8baf5 libplatform-feafe68e3e0b02c3261aefb3d711863ef6fadd38.tar.gz diff --git a/bsp/buildroot/package/libplatform/libplatform.mk b/bsp/buildroot/package/libplatform/libplatform.mk index d9cd582f..6d549151 100644 --- a/bsp/buildroot/package/libplatform/libplatform.mk +++ b/bsp/buildroot/package/libplatform/libplatform.mk @@ -4,10 +4,10 @@ # ################################################################################ -LIBPLATFORM_VERSION = 2.1.0 -LIBPLATFORM_SITE = $(call github,Pulse-Eight,platform,p8-platform-$(LIBPLATFORM_VERSION)) -LIBPLATFORM_LICENSE = GPLv2+ -LIBPLATFORM_LICENSE_FILES = src/os.h +LIBPLATFORM_VERSION = feafe68e3e0b02c3261aefb3d711863ef6fadd38 +LIBPLATFORM_SITE = $(call github,Pulse-Eight,platform,$(LIBPLATFORM_VERSION)) +LIBPLATFORM_LICENSE = GPLv2+, PHP license v3.01 +LIBPLATFORM_LICENSE_FILES = src/os.h src/util/fstrcmp.c LIBPLATFORM_INSTALL_STAGING = YES $(eval $(cmake-package)) diff --git a/bsp/buildroot/package/librsvg/librsvg.mk b/bsp/buildroot/package/librsvg/librsvg.mk index b711de47..db571934 100644 --- a/bsp/buildroot/package/librsvg/librsvg.mk +++ b/bsp/buildroot/package/librsvg/librsvg.mk @@ -9,7 +9,7 @@ LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).16 LIBRSVG_SITE = http://ftp.gnome.org/pub/gnome/sources/librsvg/$(LIBRSVG_VERSION_MAJOR) LIBRSVG_SOURCE = librsvg-$(LIBRSVG_VERSION).tar.xz LIBRSVG_INSTALL_STAGING = YES -LIBRSVG_CONF_OPTS = --disable-tools --enable-introspection=no +LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools --enable-introspection=no HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf libcroco libglib2 libxml2 pango \ $(if $(BR2_PACKAGE_LIBGTK3),libgtk3) diff --git a/bsp/buildroot/package/libsamplerate/libsamplerate.hash b/bsp/buildroot/package/libsamplerate/libsamplerate.hash index a495108d..a303f0bc 100644 --- a/bsp/buildroot/package/libsamplerate/libsamplerate.hash +++ b/bsp/buildroot/package/libsamplerate/libsamplerate.hash @@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06 libsamplerate-0.1.8.tar.gz +sha256 0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1 libsamplerate-0.1.9.tar.gz diff --git a/bsp/buildroot/package/libsamplerate/libsamplerate.mk b/bsp/buildroot/package/libsamplerate/libsamplerate.mk index 28fd644f..802b5b14 100644 --- a/bsp/buildroot/package/libsamplerate/libsamplerate.mk +++ b/bsp/buildroot/package/libsamplerate/libsamplerate.mk @@ -4,12 +4,12 @@ # ################################################################################ -LIBSAMPLERATE_VERSION = 0.1.8 +LIBSAMPLERATE_VERSION = 0.1.9 LIBSAMPLERATE_SITE = http://www.mega-nerd.com/SRC LIBSAMPLERATE_INSTALL_STAGING = YES LIBSAMPLERATE_DEPENDENCIES = host-pkgconf LIBSAMPLERATE_CONF_OPTS = --disable-fftw --program-transform-name='' -LIBSAMPLERATE_LICENSE = Dual GPLv2+ / libsamplerate commercial use license +LIBSAMPLERATE_LICENSE = BSD-2c LIBSAMPLERATE_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) diff --git a/bsp/buildroot/package/libselinux/libselinux.mk b/bsp/buildroot/package/libselinux/libselinux.mk index 44120c4d..6bf1b432 100644 --- a/bsp/buildroot/package/libselinux/libselinux.mk +++ b/bsp/buildroot/package/libselinux/libselinux.mk @@ -46,12 +46,10 @@ HOST_LIBSELINUX_DEPENDENCIES = \ ifeq ($(BR2_PACKAGE_PYTHON3),y) HOST_LIBSELINUX_DEPENDENCIES += host-python3 -HOST_LIBSELINUX_PYTHONLIBDIR = -L$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ HOST_LIBSELINUX_PYINC = -I$(HOST_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m/ HOST_LIBSELINUX_PYLIBVER = python$(PYTHON3_VERSION_MAJOR) else HOST_LIBSELINUX_DEPENDENCIES += host-python -HOST_LIBSELINUX_PYTHONLIBDIR = -L$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/ HOST_LIBSELINUX_PYINC = -I$(HOST_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/ HOST_LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR) endif @@ -60,8 +58,7 @@ HOST_LIBSELINUX_MAKE_OPTS = \ $(HOST_CONFIGURE_OPTS) \ LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread" \ PYINC="$(HOST_LIBSELINUX_PYINC)" \ - PYTHONLIBDIR="$(HOST_LIBSELINUX_PYTHONLIBDIR)" \ - PYLIBVER="$(HOST_LIBSELINUX_PYLIBVER)" \ + PYSITEDIR="$(HOST_DIR)/usr/lib/$(HOST_LIBSELINUX_PYLIBVER)/site-packages" \ SWIG_LIB="$(HOST_DIR)/usr/share/swig/$(SWIG_VERSION)/" define HOST_LIBSELINUX_BUILD_CMDS diff --git a/bsp/buildroot/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch b/bsp/buildroot/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch index 3f766440..7c6813bb 100644 --- a/bsp/buildroot/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch +++ b/bsp/buildroot/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch @@ -1,93 +1,30 @@ -Various fixes to compile libsidplay2 with newer gcc compilers +From 38493fceb39ac33e12c9c69d78f5584413b479f4 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Wed, 1 Mar 2017 10:03:40 +0100 +Subject: [PATCH] Various fixes to compile libsidplay2 with newer gcc compilers Downloaded from http://tsubasa.googlecode.com/svn/trunk/tsubasa/sidplay2-libs/sidplay2-libs-2.1.1.diff Signed-off-by: Bernd Kuhls +[Thomas: adjusted to avoid the need to autoreconf, which doesn't work +properly on this package.] +Signed-off-by: Thomas Petazzoni +--- + builders/hardsid-builder/src/hardsid-builder.cpp | 1 + + builders/resid-builder/src/resid-builder.cpp | 1 + + builders/resid-builder/src/resid.cpp | 1 + + configure | 2 +- + libsidplay/configure | 5 +++-- + libsidplay/include/sidplay/SmartPtr.h | 28 ++++++++++++------------ + libsidplay/include/sidplay/sidendian.h | 18 +++++++++------ + libsidutils/include/sidplay/utils/SidUsage.h | 2 +- + 8 files changed, 33 insertions(+), 25 deletions(-) ---- sidplay-libs-2.1.1.orig/Makefile.in -+++ sidplay-libs-2.1.1/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.8.4 from Makefile.am. -+# Makefile.in generated by automake 1.8.5 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -253,7 +253,7 @@ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ -- test -f $$subdir/TAGS && \ -+ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ -@@ -264,7 +264,7 @@ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -- test -z "$$unique" && unique=$$empty_fix; \ -+ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi ---- sidplay-libs-2.1.1.orig/aclocal.m4 -+++ sidplay-libs-2.1.1/aclocal.m4 -@@ -1,4 +1,4 @@ --# generated automatically by aclocal 1.8.4 -*- Autoconf -*- -+# generated automatically by aclocal 1.8.5 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 - # Free Software Foundation, Inc. -@@ -40,7 +40,7 @@ - # Call AM_AUTOMAKE_VERSION so it can be traced. - # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -- [AM_AUTOMAKE_VERSION([1.8.4])]) -+ [AM_AUTOMAKE_VERSION([1.8.5])]) - - # AM_AUX_DIR_EXPAND - ---- sidplay-libs-2.1.1.orig/builders/Makefile.in -+++ sidplay-libs-2.1.1/builders/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.8.4 from Makefile.am. -+# Makefile.in generated by automake 1.8.5 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -130,9 +130,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu builders/Makefile'; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign builders/Makefile'; \ - cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu builders/Makefile -+ $(AUTOMAKE) --foreign builders/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -234,7 +234,7 @@ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ -- test -f $$subdir/TAGS && \ -+ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ -@@ -245,7 +245,7 @@ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -- test -z "$$unique" && unique=$$empty_fix; \ -+ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi ---- sidplay-libs-2.1.1.orig/builders/hardsid-builder/src/hardsid-builder.cpp -+++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp +diff --git a/builders/hardsid-builder/src/hardsid-builder.cpp b/builders/hardsid-builder/src/hardsid-builder.cpp +index f54d0a9..9375e40 100644 +--- a/builders/hardsid-builder/src/hardsid-builder.cpp ++++ b/builders/hardsid-builder/src/hardsid-builder.cpp @@ -47,6 +47,7 @@ ***************************************************************************/ @@ -96,8 +33,10 @@ Signed-off-by: Bernd Kuhls #include "config.h" #ifdef HAVE_EXCEPTIONS ---- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid-builder.cpp -+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp +diff --git a/builders/resid-builder/src/resid-builder.cpp b/builders/resid-builder/src/resid-builder.cpp +index e6e4eaa..4c7650f 100644 +--- a/builders/resid-builder/src/resid-builder.cpp ++++ b/builders/resid-builder/src/resid-builder.cpp @@ -37,6 +37,7 @@ ***************************************************************************/ @@ -106,8 +45,10 @@ Signed-off-by: Bernd Kuhls #include "config.h" #ifdef HAVE_EXCEPTIONS ---- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid.cpp -+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp +diff --git a/builders/resid-builder/src/resid.cpp b/builders/resid-builder/src/resid.cpp +index 8c27850..d3123c5 100644 +--- a/builders/resid-builder/src/resid.cpp ++++ b/builders/resid-builder/src/resid.cpp @@ -16,6 +16,7 @@ * * ***************************************************************************/ @@ -116,9 +57,11 @@ Signed-off-by: Bernd Kuhls #include "config.h" #ifdef HAVE_EXCEPTIONS ---- sidplay-libs-2.1.1.orig/configure.ac -+++ sidplay-libs-2.1.1/configure.ac -@@ -2,7 +2,7 @@ +diff --git a/configure b/configure +index 1200eaf..77948b4 100755 +--- a/configure ++++ b/configure +@@ -1227,7 +1227,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #Variables pwd=`pwd` @@ -126,19 +69,28 @@ Signed-off-by: Bernd Kuhls +builders='${libdir}'/ ac_configure_args="$ac_configure_args --disable-library-checks" - AC_CONFIG_AUX_DIR(unix) -@@ -11,7 +11,7 @@ - - hardsid=false - case "$host" in -- *linux*) hardsid=true -+ *linux*|*-k*bsd*-gnu) hardsid=true - ;; - esac - AM_CONDITIONAL(HARDSID, test x$hardsid = xtrue) ---- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/SmartPtr.h -+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h -@@ -17,16 +17,16 @@ + ac_aux_dir= +diff --git a/libsidplay/configure b/libsidplay/configure +index 05a8ea6..3d93956 100755 +--- a/libsidplay/configure ++++ b/libsidplay/configure +@@ -23466,8 +23466,9 @@ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include +- #include ++#include ++ #include ++ using namespace std; + int + main () + { +diff --git a/libsidplay/include/sidplay/SmartPtr.h b/libsidplay/include/sidplay/SmartPtr.h +index c0cbb1a..15efd10 100644 +--- a/libsidplay/include/sidplay/SmartPtr.h ++++ b/libsidplay/include/sidplay/SmartPtr.h +@@ -17,16 +17,16 @@ class SmartPtrBase_sidtt doFree = bufOwner; if ( bufferLen >= 1 ) { @@ -162,7 +114,7 @@ Signed-off-by: Bernd Kuhls } } -@@ -211,16 +211,16 @@ +@@ -211,16 +211,16 @@ class SmartPtr_sidtt : public SmartPtrBase_sidtt { if ( bufferLen >= 1 ) { @@ -186,8 +138,10 @@ Signed-off-by: Bernd Kuhls } } }; ---- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/sidendian.h -+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/sidendian.h +diff --git a/libsidplay/include/sidplay/sidendian.h b/libsidplay/include/sidplay/sidendian.h +index 9fa8582..6115282 100644 +--- a/libsidplay/include/sidplay/sidendian.h ++++ b/libsidplay/include/sidplay/sidendian.h @@ -16,6 +16,10 @@ ***************************************************************************/ /*************************************************************************** @@ -199,7 +153,7 @@ Signed-off-by: Bernd Kuhls * Revision 1.5 2001/07/03 22:44:13 s_a_white * Added endian_16 to convert a 16 bit value to an array of 8s. * -@@ -141,7 +145,7 @@ +@@ -141,7 +145,7 @@ inline void endian_16swap8 (uint_least16_t &word) // Convert high-byte and low-byte to 16-bit word. inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo) { @@ -208,7 +162,7 @@ Signed-off-by: Bernd Kuhls endian_16lo8 (word, lo); endian_16hi8 (word, hi); return word; -@@ -165,7 +169,7 @@ +@@ -165,7 +169,7 @@ inline void endian_16 (uint8_t ptr[2], uint_least16_t word) inline void endian_16 (char ptr[2], uint_least16_t word) { @@ -217,7 +171,7 @@ Signed-off-by: Bernd Kuhls } // Convert high-byte and low-byte to 16-bit little endian word. -@@ -334,7 +338,7 @@ +@@ -334,7 +338,7 @@ inline void endian_32swap16 (uint_least32_t &dword) // Swap word endian. inline void endian_32swap8 (uint_least32_t &dword) { @@ -226,7 +180,7 @@ Signed-off-by: Bernd Kuhls lo = endian_32lo16 (dword); hi = endian_32hi16 (dword); endian_16swap8 (lo); -@@ -346,8 +350,8 @@ +@@ -346,8 +350,8 @@ inline void endian_32swap8 (uint_least32_t &dword) // Convert high-byte and low-byte to 32-bit word. inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo) { @@ -237,7 +191,7 @@ Signed-off-by: Bernd Kuhls endian_32lo8 (dword, lo); endian_32hi8 (dword, hi); endian_16lo8 (word, hilo); -@@ -374,7 +378,7 @@ +@@ -374,7 +378,7 @@ inline void endian_little32 (uint8_t ptr[4], uint_least32_t dword) defined(SID_WORDS_LITTLEENDIAN) *((uint_least32_t *) ptr) = dword; #else @@ -246,7 +200,7 @@ Signed-off-by: Bernd Kuhls ptr[0] = endian_32lo8 (dword); ptr[1] = endian_32hi8 (dword); word = endian_32hi16 (dword); -@@ -401,7 +405,7 @@ +@@ -401,7 +405,7 @@ inline void endian_big32 (uint8_t ptr[4], uint_least32_t dword) defined(SID_WORDS_BIGENDIAN) *((uint_least32_t *) ptr) = dword; #else @@ -255,72 +209,11 @@ Signed-off-by: Bernd Kuhls word = endian_32hi16 (dword); ptr[1] = endian_16lo8 (word); ptr[0] = endian_16hi8 (word); ---- sidplay-libs-2.1.1.orig/libsidplay/unix/config.h.in -+++ sidplay-libs-2.1.1/libsidplay/unix/config.h.in -@@ -72,22 +72,22 @@ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - --/* The size of a `char', as computed by sizeof. */ -+/* The size of `char', as computed by sizeof. */ - #undef SIZEOF_CHAR - --/* The size of a `int', as computed by sizeof. */ -+/* The size of `int', as computed by sizeof. */ - #undef SIZEOF_INT - - /* The number of bytes in type long */ - #undef SIZEOF_LONG - --/* The size of a `long int', as computed by sizeof. */ -+/* The size of `long int', as computed by sizeof. */ - #undef SIZEOF_LONG_INT - - /* The number of bytes in type short */ - #undef SIZEOF_SHORT - --/* The size of a `short int', as computed by sizeof. */ -+/* The size of `short int', as computed by sizeof. */ - #undef SIZEOF_SHORT_INT - - /* The number of bytes in type void* */ ---- sidplay-libs-2.1.1.orig/libsidplay/unix/my_macros.m4 -+++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4 -@@ -105,8 +105,9 @@ - AC_CACHE_VAL(test_cv_have_ios_openmode, - [ - AC_TRY_COMPILE( -- [#include -- #include ], -+ [#include -+ #include -+ using namespace std;], - [ios::openmode myTest = ios::in;], - [test_cv_have_ios_openmode=yes], - [test_cv_have_ios_openmode=no] ---- sidplay-libs-2.1.1.orig/libsidplay/unix/sidint.h -+++ sidplay-libs-2.1.1/libsidplay/unix/sidint.h -@@ -0,0 +1,17 @@ -+#ifndef _UNIX_SIDINT_H -+#define _UNIX_SIDINT_H 1 -+#ifndef _GENERATED_STDINT_H -+#define _GENERATED_STDINT_H "libsidplay 2.1.1" -+/* generated using a gnu compiler version gcc (Debian 4.3-20080219-1) 4.3.0 20080219 (prerelease) [gcc-4_3-branch revision 132456] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ -+ -+#include -+ -+ -+/* system headers have good uint64_t */ -+#ifndef _HAVE_UINT64_T -+#define _HAVE_UINT64_T -+#endif -+ -+ /* once */ -+#endif -+#endif ---- sidplay-libs-2.1.1.orig/libsidutils/include/sidplay/utils/SidUsage.h -+++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h -@@ -33,7 +33,7 @@ +diff --git a/libsidutils/include/sidplay/utils/SidUsage.h b/libsidutils/include/sidplay/utils/SidUsage.h +index 2afb0f3..0496eea 100755 +--- a/libsidutils/include/sidplay/utils/SidUsage.h ++++ b/libsidutils/include/sidplay/utils/SidUsage.h +@@ -33,7 +33,7 @@ struct sid2_usage_t: public sid_usage_t uint_least16_t length; // usage scan length // Copy common parts of basic usage to extended usage. @@ -329,3 +222,6 @@ Signed-off-by: Bernd Kuhls { *((sid_usage_t *) this) = usage; return *this; +-- +2.7.4 + diff --git a/bsp/buildroot/package/libsidplay2/libsidplay2.mk b/bsp/buildroot/package/libsidplay2/libsidplay2.mk index b2949643..cf440689 100644 --- a/bsp/buildroot/package/libsidplay2/libsidplay2.mk +++ b/bsp/buildroot/package/libsidplay2/libsidplay2.mk @@ -9,7 +9,6 @@ LIBSIDPLAY2_SOURCE = sidplay-libs-$(LIBSIDPLAY2_VERSION).tar.gz LIBSIDPLAY2_SITE = http://downloads.sourceforge.net/project/sidplay2/sidplay2/sidplay-libs-$(LIBSIDPLAY2_VERSION) LIBSIDPLAY2_LICENSE = GPLv2+ LIBSIDPLAY2_LICENSE_FILES = libsidplay/COPYING -LIBSIDPLAY2_AUTORECONF = YES LIBSIDPLAY2_INSTALL_STAGING = YES $(eval $(autotools-package)) diff --git a/bsp/buildroot/package/libsndfile/0001-srconly.patch b/bsp/buildroot/package/libsndfile/0001-srconly.patch deleted file mode 100644 index 417e3407..00000000 --- a/bsp/buildroot/package/libsndfile/0001-srconly.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: libsndfile-1.0.18/Makefile.in -=================================================================== ---- libsndfile-1.0.18.orig/Makefile.in -+++ libsndfile-1.0.18/Makefile.in -@@ -260,7 +260,7 @@ - top_srcdir = @top_srcdir@ - DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror - @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave --SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs -+SUBDIRS = src - DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs - EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Mingw-make-dist.sh - pkgconfigdir = $(libdir)/pkgconfig diff --git a/bsp/buildroot/package/libsndfile/libsndfile.hash b/bsp/buildroot/package/libsndfile/libsndfile.hash index a87b7c30..31500cd9 100644 --- a/bsp/buildroot/package/libsndfile/libsndfile.hash +++ b/bsp/buildroot/package/libsndfile/libsndfile.hash @@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 a391952f27f4a92ceb2b4c06493ac107896ed6c76be9a613a4731f076d30fac0 libsndfile-1.0.27.tar.gz +sha256 1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9 libsndfile-1.0.28.tar.gz diff --git a/bsp/buildroot/package/libsndfile/libsndfile.mk b/bsp/buildroot/package/libsndfile/libsndfile.mk index c5cd1de1..0d152a7b 100644 --- a/bsp/buildroot/package/libsndfile/libsndfile.mk +++ b/bsp/buildroot/package/libsndfile/libsndfile.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBSNDFILE_VERSION = 1.0.27 +LIBSNDFILE_VERSION = 1.0.28 LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files LIBSNDFILE_INSTALL_STAGING = YES LIBSNDFILE_LICENSE = LGPLv2.1+ @@ -13,6 +13,7 @@ LIBSNDFILE_LICENSE_FILES = COPYING LIBSNDFILE_CONF_OPTS = \ --disable-sqlite \ --disable-alsa \ - --disable-external-libs + --disable-external-libs \ + --disable-full-suite $(eval $(autotools-package)) diff --git a/bsp/buildroot/package/libsoc/libsoc.mk b/bsp/buildroot/package/libsoc/libsoc.mk index 03bef043..9bc2a9b8 100644 --- a/bsp/buildroot/package/libsoc/libsoc.mk +++ b/bsp/buildroot/package/libsoc/libsoc.mk @@ -10,6 +10,7 @@ LIBSOC_LICENSE = LGPLv2.1 LIBSOC_LICENSE_FILES = LICENCE LIBSOC_AUTORECONF = YES LIBSOC_INSTALL_STAGING = YES +LIBSOC_DEPENDENCIES = host-pkgconf # Install Python 2 bindings ifeq ($(BR2_PACKAGE_PYTHON),y) diff --git a/bsp/buildroot/package/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch b/bsp/buildroot/package/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch deleted file mode 100644 index 387ba7aa..00000000 --- a/bsp/buildroot/package/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch +++ /dev/null @@ -1,28 +0,0 @@ -From dd091c8af163213e12aa92f61bc4916e0f102633 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Tue, 26 Jul 2016 08:45:33 +0200 -Subject: [PATCH] configure: don't add -Werror to build flags - -Signed-off-by: Gustavo Zacarias ---- -Patch status: upstream - - configure.ac | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7a14e04..066f5fe 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings], - ) - - if test "$gl_gcc_warnings" = yes; then -- gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) -- - nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings - nw="$nw -Wc++-compat" # We don't care strongly about C++ compilers - nw="$nw -Wtraditional" # Warns on #elif which we use often --- -2.7.3 - diff --git a/bsp/buildroot/package/libtasn1/libtasn1.hash b/bsp/buildroot/package/libtasn1/libtasn1.hash index 5b2100e8..699c1405 100644 --- a/bsp/buildroot/package/libtasn1/libtasn1.hash +++ b/bsp/buildroot/package/libtasn1/libtasn1.hash @@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920 libtasn1-4.9.tar.gz +sha256 6753da2e621257f33f5b051cc114d417e5206a0818fe0b1ecfd6153f70934753 libtasn1-4.12.tar.gz diff --git a/bsp/buildroot/package/libtasn1/libtasn1.mk b/bsp/buildroot/package/libtasn1/libtasn1.mk index ac99868a..8d3daca1 100644 --- a/bsp/buildroot/package/libtasn1/libtasn1.mk +++ b/bsp/buildroot/package/libtasn1/libtasn1.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBTASN1_VERSION = 4.9 +LIBTASN1_VERSION = 4.12 LIBTASN1_SITE = $(BR2_GNU_MIRROR)/libtasn1 LIBTASN1_DEPENDENCIES = host-bison LIBTASN1_LICENSE = GPLv3+ (tests, tools), LGPLv2.1+ (library) @@ -12,7 +12,5 @@ LIBTASN1_LICENSE_FILES = COPYING COPYING.LIB LIBTASN1_INSTALL_STAGING = YES # 'missing' fallback logic botched so disable it completely LIBTASN1_CONF_ENV = MAKEINFO="true" -# For 0001-configure-don-t-add-Werror-to-build-flags.patch -LIBTASN1_AUTORECONF = YES $(eval $(autotools-package)) diff --git a/bsp/buildroot/package/libubox/libubox.mk b/bsp/buildroot/package/libubox/libubox.mk index 00392c31..2bde25f4 100644 --- a/bsp/buildroot/package/libubox/libubox.mk +++ b/bsp/buildroot/package/libubox/libubox.mk @@ -13,7 +13,7 @@ LIBUBOX_DEPENDENCIES = $(if $(BR2_PACKAGE_JSON_C),json-c) ifeq ($(BR2_USE_MMU)$(BR2_PACKAGE_LUA_5_1),yy) LIBUBOX_DEPENDENCIES += lua LIBUBOX_CONF_OPTS += -DBUILD_LUA=ON \ - -DLUAPATH=$(STAGING_DIR)/usr/lib/lua/5.1 \ + -DLUAPATH=/usr/lib/lua/5.1 \ -DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include else LIBUBOX_CONF_OPTS += -DBUILD_LUA=OFF diff --git a/bsp/buildroot/package/libunwind/Config.in b/bsp/buildroot/package/libunwind/Config.in index 5527a2bc..9007ce51 100644 --- a/bsp/buildroot/package/libunwind/Config.in +++ b/bsp/buildroot/package/libunwind/Config.in @@ -15,7 +15,7 @@ config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS BR2_mips64el || BR2_powerpc || BR2_sh || BR2_i386 || BR2_x86_64) default y if BR2_TOOLCHAIN_USES_UCLIBC && \ (((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \ - BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips || BR2_mipsel || \ BR2_mips64 || BR2_mips64el || BR2_x86_64) default y if BR2_TOOLCHAIN_USES_MUSL && \ (((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \ diff --git a/bsp/buildroot/package/libwebsockets/libwebsockets.hash b/bsp/buildroot/package/libwebsockets/libwebsockets.hash index cbd1101d..7976a697 100644 --- a/bsp/buildroot/package/libwebsockets/libwebsockets.hash +++ b/bsp/buildroot/package/libwebsockets/libwebsockets.hash @@ -1,2 +1,3 @@ # Locally computed: -sha256 bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66 libwebsockets-v2.1.0.tar.gz +sha256 96183cbdfcd6e6a3d9465e854a924b7bfde6c8c6d3384d6159ad797c2e823b4d libwebsockets-v2.1.1.tar.gz +sha256 49ae9f959394686d469f960951ece3ad1101655afe64df28ea5b1a61c1d124f0 f9f5a5760782b68fba190fb46d306f7c08f027c0.patch diff --git a/bsp/buildroot/package/libwebsockets/libwebsockets.mk b/bsp/buildroot/package/libwebsockets/libwebsockets.mk index bf46291a..74b6b2b3 100644 --- a/bsp/buildroot/package/libwebsockets/libwebsockets.mk +++ b/bsp/buildroot/package/libwebsockets/libwebsockets.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBWEBSOCKETS_VERSION = v2.1.0 +LIBWEBSOCKETS_VERSION = v2.1.1 LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,$(LIBWEBSOCKETS_VERSION)) LIBWEBSOCKETS_LICENSE = LGPLv2.1 with exceptions LIBWEBSOCKETS_LICENSE_FILES = LICENSE @@ -12,6 +12,8 @@ LIBWEBSOCKETS_DEPENDENCIES = zlib LIBWEBSOCKETS_INSTALL_STAGING = YES LIBWEBSOCKETS_CONF_OPTS = -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON +LIBWEBSOCKETS_PATCH = https://github.com/warmcat/libwebsockets/commit/f9f5a5760782b68fba190fb46d306f7c08f027c0.patch + # If LWS_MAX_SMP=1, then there is no code related to pthreads compiled # in the library. If unset, LWS_MAX_SMP defaults to 32 and a small # amount of pthread mutex code is built into the library. diff --git a/bsp/buildroot/package/libxkbcommon/libxkbcommon.mk b/bsp/buildroot/package/libxkbcommon/libxkbcommon.mk index c39a7c0c..60118144 100644 --- a/bsp/buildroot/package/libxkbcommon/libxkbcommon.mk +++ b/bsp/buildroot/package/libxkbcommon/libxkbcommon.mk @@ -11,6 +11,7 @@ LIBXKBCOMMON_LICENSE = MIT/X11 LIBXKBCOMMON_LICENSE_FILES = LICENSE LIBXKBCOMMON_INSTALL_STAGING = YES LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex +LIBXKBCOMMON_CONF_OPTS = --disable-wayland # uses C99 features LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99" diff --git a/bsp/buildroot/package/linux-firmware/linux-firmware.hash b/bsp/buildroot/package/linux-firmware/linux-firmware.hash index e8ee2b72..16460394 100644 --- a/bsp/buildroot/package/linux-firmware/linux-firmware.hash +++ b/bsp/buildroot/package/linux-firmware/linux-firmware.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 256378564e36b8f222adb8fbe746529e73413c6cbe2b0e5574f41dfd62d92577 linux-firmware-6d3bc8886517d171068fd1263176b8b5c51df204.tar.gz +sha256 1cd14477a392fe8c7c44e62623b85466df90ed72a55ae213b637e1c4335739fd linux-firmware-6d3bc8886517d171068fd1263176b8b5c51df204.tar.gz diff --git a/bsp/buildroot/package/linux-headers/Config.in.host b/bsp/buildroot/package/linux-headers/Config.in.host index ee02a45d..3d778466 100644 --- a/bsp/buildroot/package/linux-headers/Config.in.host +++ b/bsp/buildroot/package/linux-headers/Config.in.host @@ -214,15 +214,15 @@ endchoice config BR2_DEFAULT_KERNEL_HEADERS string - default "3.2.85" if BR2_KERNEL_HEADERS_3_2 + default "3.2.88" if BR2_KERNEL_HEADERS_3_2 default "3.4.113" if BR2_KERNEL_HEADERS_3_4 default "3.10.105" if BR2_KERNEL_HEADERS_3_10 - default "3.12.70" if BR2_KERNEL_HEADERS_3_12 - default "3.18.48" if BR2_KERNEL_HEADERS_3_18 + default "3.12.74" if BR2_KERNEL_HEADERS_3_12 + default "3.18.55" if BR2_KERNEL_HEADERS_3_18 default "3.19.8" if BR2_KERNEL_HEADERS_3_19 default "4.0.9" if BR2_KERNEL_HEADERS_4_0 - default "4.1.38" if BR2_KERNEL_HEADERS_4_1 - default "4.4.52" if BR2_KERNEL_HEADERS_4_4 + default "4.1.40" if BR2_KERNEL_HEADERS_4_1 + default "4.4.70" if BR2_KERNEL_HEADERS_4_4 default "4.8.17" if BR2_KERNEL_HEADERS_4_8 - default "4.9.13" if BR2_KERNEL_HEADERS_4_9 + default "4.9.30" if BR2_KERNEL_HEADERS_4_9 default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION diff --git a/bsp/buildroot/package/logrotate/Config.in b/bsp/buildroot/package/logrotate/Config.in index 8528361b..2b1ae643 100644 --- a/bsp/buildroot/package/logrotate/Config.in +++ b/bsp/buildroot/package/logrotate/Config.in @@ -6,7 +6,7 @@ config BR2_PACKAGE_LOGROTATE help A simple program to rotate logs. - https://fedorahosted.org/logrotate/ + https://github.com/logrotate/logrotate comment "logrotate needs a toolchain w/ wchar" depends on BR2_USE_MMU diff --git a/bsp/buildroot/package/ltp-testsuite/Config.in b/bsp/buildroot/package/ltp-testsuite/Config.in index 274b03e4..60e19228 100644 --- a/bsp/buildroot/package/ltp-testsuite/Config.in +++ b/bsp/buildroot/package/ltp-testsuite/Config.in @@ -5,7 +5,7 @@ comment "ltp-testsuite needs specific uClibc options, see help" config BR2_PACKAGE_LTP_TESTSUITE bool "ltp-testsuite" depends on BR2_USE_MMU # fork() - depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on !BR2_TOOLCHAIN_USES_MUSL select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC # does not build, cachectl.h issue @@ -22,7 +22,7 @@ config BR2_PACKAGE_LTP_TESTSUITE http://linux-test-project.github.io -comment "ltp-testsuite needs a glibc or uClibc toolchain w/ threads" +comment "ltp-testsuite needs a glibc or uClibc toolchain w/ NPTL" depends on !BR2_nios2 depends on BR2_USE_MMU - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_TOOLCHAIN_USES_MUSL diff --git a/bsp/buildroot/package/ltp-testsuite/ltp-testsuite.mk b/bsp/buildroot/package/ltp-testsuite/ltp-testsuite.mk index 9d82087f..29f374be 100644 --- a/bsp/buildroot/package/ltp-testsuite/ltp-testsuite.mk +++ b/bsp/buildroot/package/ltp-testsuite/ltp-testsuite.mk @@ -9,8 +9,16 @@ LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz LTP_TESTSUITE_SITE = https://github.com/linux-test-project/ltp/releases/download/$(LTP_TESTSUITE_VERSION) LTP_TESTSUITE_LICENSE = GPLv2, GPLv2+ LTP_TESTSUITE_LICENSE_FILES = COPYING + +# Do not enable Open POSIX testsuite as it doesn't cross-compile +# properly: t0 program is built for the host machine. Notice that due +# to a bug, --without-open-posix-testsuite actually enables the test +# suite. +# See https://github.com/linux-test-project/ltp/issues/143 (invalid +# autoconf test) and +# https://github.com/linux-test-project/ltp/issues/144 (Open POSIX +# testsuite not cross-compiling). LTP_TESTSUITE_CONF_OPTS += \ - --with-open-posix-testsuite \ --with-realtime-testsuite ifeq ($(BR2_LINUX_KERNEL),y) diff --git a/bsp/buildroot/package/lttng-libust/0003-Validate-the-presence-of-dlmopen-at-configure-time.patch b/bsp/buildroot/package/lttng-libust/0003-Validate-the-presence-of-dlmopen-at-configure-time.patch new file mode 100644 index 00000000..699f1e03 --- /dev/null +++ b/bsp/buildroot/package/lttng-libust/0003-Validate-the-presence-of-dlmopen-at-configure-time.patch @@ -0,0 +1,130 @@ +From 42330adcefcd1830dad89e2a960c93d8dd1da125 Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte +Date: Tue, 21 Feb 2017 16:00:27 -0500 +Subject: [PATCH] Validate the presence of dlmopen at configure time + +Signed-off-by: Michael Jeanson +Signed-off-by: Jonathan Rajotte +Signed-off-by: Mathieu Desnoyers +[Backport from upstream commit 42330adcefcd1830dad89e2a960c93d8dd1da125.] +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 8 ++++++++ + liblttng-ust-dl/lttng-ust-dl.c | 8 ++++++++ + liblttng-ust-dl/ust_dl.h | 2 ++ + 3 files changed, 18 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 450b43b..023cfd4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,15 +125,23 @@ AS_IF([test "x${ax_cv_sys_weak_alias}" = "xno"], [ + # Checks for libraries. + AC_CHECK_LIB([dl], [dlopen], [ + have_libdl=yes ++ libdl_name=dl + ], [ + #libdl not found, check for dlopen in libc. + AC_CHECK_LIB([c], [dlopen], [ + have_libc_dl=yes ++ libdl_name=c + ], [ + AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.]) + ]) + ]) + ++# Check if libdl has dlmopen support. ++AH_TEMPLATE([HAVE_DLMOPEN], ["Define to 1 if dlmopen is available."]) ++AC_CHECK_LIB([$libdl_name], [dlmopen], ++ [AC_DEFINE([HAVE_DLMOPEN], [1])] ++) ++ + AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBDL], [test "x$have_libdl" = "xyes"]) + AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"]) + +diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c +index b0737b6..ce2ae0e 100644 +--- a/liblttng-ust-dl/lttng-ust-dl.c ++++ b/liblttng-ust-dl/lttng-ust-dl.c +@@ -38,8 +38,10 @@ + #include "ust_dl.h" + + static void *(*__lttng_ust_plibc_dlopen)(const char *filename, int flags); ++#ifdef HAVE_DLMOPEN + static void *(*__lttng_ust_plibc_dlmopen)(Lmid_t nsid, const char *filename, + int flags); ++#endif + static int (*__lttng_ust_plibc_dlclose)(void *handle); + + static +@@ -55,6 +57,7 @@ void *_lttng_ust_dl_libc_dlopen(const char *filename, int flags) + return __lttng_ust_plibc_dlopen(filename, flags); + } + ++#ifdef HAVE_DLMOPEN + static + void *_lttng_ust_dl_libc_dlmopen(Lmid_t nsid, const char *filename, + int flags) +@@ -68,6 +71,7 @@ void *_lttng_ust_dl_libc_dlmopen(Lmid_t nsid, const char *filename, + } + return __lttng_ust_plibc_dlmopen(nsid, filename, flags); + } ++#endif + + static + int _lttng_ust_dl_libc_dlclose(void *handle) +@@ -143,6 +147,7 @@ end: + return; + } + ++#ifdef HAVE_DLMOPEN + static + void lttng_ust_dl_dlmopen(void *so_base, Lmid_t nsid, const char *so_name, + int flags, void *ip) +@@ -203,6 +208,7 @@ end: + lttng_ust_elf_destroy(elf); + return; + } ++#endif + + void *dlopen(const char *filename, int flags) + { +@@ -223,6 +229,7 @@ void *dlopen(const char *filename, int flags) + return handle; + } + ++#ifdef HAVE_DLMOPEN + void *dlmopen(Lmid_t nsid, const char *filename, int flags) + { + void *handle; +@@ -243,6 +250,7 @@ void *dlmopen(Lmid_t nsid, const char *filename, int flags) + return handle; + + } ++#endif + + int dlclose(void *handle) + { +diff --git a/liblttng-ust-dl/ust_dl.h b/liblttng-ust-dl/ust_dl.h +index b8cfe82..afa8e84 100644 +--- a/liblttng-ust-dl/ust_dl.h ++++ b/liblttng-ust-dl/ust_dl.h +@@ -51,6 +51,7 @@ TRACEPOINT_EVENT(lttng_ust_dl, dlopen, + ) + ) + ++#ifdef HAVE_DLMOPEN + TRACEPOINT_EVENT(lttng_ust_dl, dlmopen, + TP_ARGS(void *, ip, void *, baddr, Lmid_t, nsid, + const char *, path, int, flags, +@@ -66,6 +67,7 @@ TRACEPOINT_EVENT(lttng_ust_dl, dlmopen, + ctf_integer(uint8_t, has_debug_link, has_debug_link) + ) + ) ++#endif + + TRACEPOINT_EVENT(lttng_ust_dl, build_id, + TP_ARGS( +-- +2.7.4 + diff --git a/bsp/buildroot/package/lttng-libust/0004-Fix-include-config.h-to-resolve-HAVE_DLMOPEN.patch b/bsp/buildroot/package/lttng-libust/0004-Fix-include-config.h-to-resolve-HAVE_DLMOPEN.patch new file mode 100644 index 00000000..734d3c4c --- /dev/null +++ b/bsp/buildroot/package/lttng-libust/0004-Fix-include-config.h-to-resolve-HAVE_DLMOPEN.patch @@ -0,0 +1,30 @@ +From 0b2253f5c9af73904d49da32085036c16b9d2d75 Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte +Date: Tue, 21 Feb 2017 18:10:11 -0500 +Subject: [PATCH] Fix: include config.h to resolve HAVE_DLMOPEN + +Fixes commit 42330adcefcd1830dad89e2a960c93d8dd1da125 + +Signed-off-by: Jonathan Rajotte +Signed-off-by: Mathieu Desnoyers +[Backported from upstream commit 0b2253f5c9af73904d49da32085036c16b9d2d75.] +Signed-off-by: Thomas Petazzoni +--- + liblttng-ust-dl/ust_dl.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/liblttng-ust-dl/ust_dl.h b/liblttng-ust-dl/ust_dl.h +index afa8e84..c8a0695 100644 +--- a/liblttng-ust-dl/ust_dl.h ++++ b/liblttng-ust-dl/ust_dl.h +@@ -33,6 +33,7 @@ extern "C" { + + #include + #include ++#include + + #define LTTNG_UST_DL_PROVIDER + #include +-- +2.7.4 + diff --git a/bsp/buildroot/package/lttng-libust/lttng-libust.mk b/bsp/buildroot/package/lttng-libust/lttng-libust.mk index 5667abb8..f8c4c118 100644 --- a/bsp/buildroot/package/lttng-libust/lttng-libust.mk +++ b/bsp/buildroot/package/lttng-libust/lttng-libust.mk @@ -13,6 +13,7 @@ LTTNG_LIBUST_INSTALL_STAGING = YES LTTNG_LIBUST_DEPENDENCIES = liburcu util-linux LTTNG_LIBUST_CONF_OPTS += --disable-man-pages # 0002-doc-examples-Makefile.am-define-C-and-C-compilers-fo.patch +# 0003-Validate-the-presence-of-dlmopen-at-configure-time.patch LTTNG_LIBUST_AUTORECONF = YES ifeq ($(BR2_PACKAGE_PYTHON),y) diff --git a/bsp/buildroot/package/lua/lua.mk b/bsp/buildroot/package/lua/lua.mk index 5ef61e03..bc0a9d45 100644 --- a/bsp/buildroot/package/lua/lua.mk +++ b/bsp/buildroot/package/lua/lua.mk @@ -70,6 +70,7 @@ define LUA_BUILD_CMDS CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ CFLAGS="$(TARGET_CFLAGS) $(LUA_CFLAGS)" \ MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \ + MYLDFLAGS="$(TARGET_LDFLAGS)" \ BUILDMODE=$(LUA_BUILDMODE) \ PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all endef diff --git a/bsp/buildroot/package/madplay/0002-buildroot-libtool-v1.5.patch.patch b/bsp/buildroot/package/madplay/0002-buildroot-libtool-v1.5.patch.patch new file mode 100644 index 00000000..2be33638 --- /dev/null +++ b/bsp/buildroot/package/madplay/0002-buildroot-libtool-v1.5.patch.patch @@ -0,0 +1,109 @@ +From ce661985c098635965573aac8fc983a72f60d396 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 30 May 2017 16:42:34 +0200 +Subject: [PATCH] buildroot-libtool-v1.5.patch + +Apply buildroot-libtool-v1.5.patch rebased on libtool 1.5.2 used +in madplay and fixing all conflicts. + +Signed-off-by: Romain Naour +--- + ltmain.sh | 40 ++++++++++++++++++++++++++++++---------- + 1 file changed, 30 insertions(+), 10 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 4b9f940..0b71220 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -164,6 +164,11 @@ do + arg="$1" + shift + ++ # Make -static behave as -all-static ++ case $arg in ++ -static) arg="-all-static" ;; ++ esac ++ + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; +@@ -549,8 +554,9 @@ if test -z "$show_help"; then + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" +- $echo "$modename: specify a tag with \`--tag'" 1>&2 +- exit 1 ++ $echo "$modename: defaulting to \`CC'" ++ $echo "$modename: if this is not correct, specify a tag with \`--tag'" ++# exit 1 + # else + # $echo "$modename: using $tagname tagged configuration" + fi +@@ -1228,7 +1234,8 @@ EOF + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" +@@ -2135,8 +2142,14 @@ EOF + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + else + dir="$ladir/$objdir" +@@ -2261,7 +2274,7 @@ EOF + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes ++ need_relink=no + fi + # This is a shared library + +@@ -5146,6 +5159,10 @@ fi\ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` +@@ -5464,10 +5481,13 @@ relink_command=\"$relink_command\"" + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit 1 +- fi ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # if test "$inst_prefix_dir" = "$destdir"; then ++ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++ # exit 1 ++ # fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +-- +2.9.4 + diff --git a/bsp/buildroot/package/mariadb/mariadb.hash b/bsp/buildroot/package/mariadb/mariadb.hash index 3d6520f3..580fe987 100644 --- a/bsp/buildroot/package/mariadb/mariadb.hash +++ b/bsp/buildroot/package/mariadb/mariadb.hash @@ -1,5 +1,2 @@ -# From https://downloads.mariadb.org/mariadb/10.1.21/ -sha1 f9ccaa9881b98eeef68f4dbcf5ab9653c903819f mariadb-10.1.21.tar.gz - -# Locally computed -sha256 5a816355781ea22a6c65a436d8162f19bd292ec90e2b7d9499c031ae4a659490 mariadb-10.1.21.tar.gz +# From https://downloads.mariadb.org/mariadb/10.1.23/ +sha256 54d8114e24bfa5e3ebdc7d69e071ad1471912847ea481b227d204f9d644300bf mariadb-10.1.23.tar.gz diff --git a/bsp/buildroot/package/mariadb/mariadb.mk b/bsp/buildroot/package/mariadb/mariadb.mk index aa4afc5b..e171e0ef 100644 --- a/bsp/buildroot/package/mariadb/mariadb.mk +++ b/bsp/buildroot/package/mariadb/mariadb.mk @@ -4,10 +4,12 @@ # ################################################################################ -MARIADB_VERSION = 10.1.21 +MARIADB_VERSION = 10.1.23 MARIADB_SITE = https://downloads.mariadb.org/interstitial/mariadb-$(MARIADB_VERSION)/source MARIADB_LICENSE = GPLv2 (server), GPLv2 with FLOSS exception (GPL client library), LGPLv2 (LGPL client library) -MARIADB_LICENSE_FILES = README COPYING COPYING.LESSER +# Tarball no longer contains LGPL license text +# https://jira.mariadb.org/browse/MDEV-12297 +MARIADB_LICENSE_FILES = README COPYING MARIADB_INSTALL_STAGING = YES MARIADB_PROVIDES = mysql diff --git a/bsp/buildroot/package/mbedtls/mbedtls.hash b/bsp/buildroot/package/mbedtls/mbedtls.hash index 5f9786c2..70a0dc50 100644 --- a/bsp/buildroot/package/mbedtls/mbedtls.hash +++ b/bsp/buildroot/package/mbedtls/mbedtls.hash @@ -1,2 +1,2 @@ -# From https://tls.mbed.org/tech-updates/releases/mbedtls-2.3.0-2.1.5-and-1.3.17-released -sha256 c1c3559ed39f7a1b1550c4cf4ccb918bf239301a3311d98dda92bed8a25b7f0d mbedtls-2.4.0-apache.tgz +# From https://tls.mbed.org/tech-updates/releases/mbedtls-2.4.2-2.1.7-and-1.3.19-released +sha256 17dd98af7478aadacc480c7e4159e447353b5b2037c1b6d48ed4fd157fb1b018 mbedtls-2.4.2-apache.tgz diff --git a/bsp/buildroot/package/mbedtls/mbedtls.mk b/bsp/buildroot/package/mbedtls/mbedtls.mk index 198879da..a571ed0e 100644 --- a/bsp/buildroot/package/mbedtls/mbedtls.mk +++ b/bsp/buildroot/package/mbedtls/mbedtls.mk @@ -5,7 +5,7 @@ ################################################################################ MBEDTLS_SITE = https://tls.mbed.org/code/releases -MBEDTLS_VERSION = 2.4.0 +MBEDTLS_VERSION = 2.4.2 MBEDTLS_SOURCE = mbedtls-$(MBEDTLS_VERSION)-apache.tgz MBEDTLS_CONF_OPTS = \ -DENABLE_PROGRAMS=$(if $(BR2_PACKAGE_MBEDTLS_PROGRAMS),ON,OFF) \ diff --git a/bsp/buildroot/package/memcached/memcached.hash b/bsp/buildroot/package/memcached/memcached.hash index 11cac3a5..f9f68d53 100644 --- a/bsp/buildroot/package/memcached/memcached.hash +++ b/bsp/buildroot/package/memcached/memcached.hash @@ -1,4 +1,4 @@ -# From http://www.memcached.org/files/memcached-1.4.34.tar.gz.sha1 -sha1 7c7214f5183c6e20c22b243e21ed1ffddb91497e memcached-1.4.34.tar.gz +# From http://www.memcached.org/files/memcached-1.4.36.tar.gz.sha1 +sha1 519b417515206b0b95ff9bf14106a891f6a2252e memcached-1.4.36.tar.gz # Calculated based on the hash above -sha256 5064c87f91a37d822dfeab8768490c55fe686a742f07f67c7121101e48d87c79 memcached-1.4.34.tar.gz +sha256 773b6bb20bf80223ca6a15d75f570fbab346ad11ec98595e5af5e33f54bd82d8 memcached-1.4.36.tar.gz diff --git a/bsp/buildroot/package/memcached/memcached.mk b/bsp/buildroot/package/memcached/memcached.mk index caebe028..4de1bf64 100644 --- a/bsp/buildroot/package/memcached/memcached.mk +++ b/bsp/buildroot/package/memcached/memcached.mk @@ -4,7 +4,7 @@ # ################################################################################ -MEMCACHED_VERSION = 1.4.34 +MEMCACHED_VERSION = 1.4.36 MEMCACHED_SITE = http://www.memcached.org/files MEMCACHED_DEPENDENCIES = libevent MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' diff --git a/bsp/buildroot/package/mesa3d/mesa3d.mk b/bsp/buildroot/package/mesa3d/mesa3d.mk index 0c68dedf..bf2ab6e4 100644 --- a/bsp/buildroot/package/mesa3d/mesa3d.mk +++ b/bsp/buildroot/package/mesa3d/mesa3d.mk @@ -177,6 +177,13 @@ else MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2 endif +ifeq ($(BR2_PACKAGE_LM_SENSORS),y) +MESA3D_CONF_OPTS += --enable-lmsensors +MESA3D_DEPENDENCIES += lm-sensors +else +MESA3D_CONF_OPTS += --disable-lmsensors +endif + # Avoid automatic search of llvm-config MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin diff --git a/bsp/buildroot/package/minicom/minicom.hash b/bsp/buildroot/package/minicom/minicom.hash index 33ba4ef1..ca308716 100644 --- a/bsp/buildroot/package/minicom/minicom.hash +++ b/bsp/buildroot/package/minicom/minicom.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4 minicom-2.7.tar.gz +sha256 532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1 minicom-2.7.1.tar.gz diff --git a/bsp/buildroot/package/minicom/minicom.mk b/bsp/buildroot/package/minicom/minicom.mk index 94a46286..3aa11ed9 100644 --- a/bsp/buildroot/package/minicom/minicom.mk +++ b/bsp/buildroot/package/minicom/minicom.mk @@ -4,8 +4,8 @@ # ################################################################################ -MINICOM_VERSION = 2.7 -MINICOM_SITE = https://alioth.debian.org/frs/download.php/file/3977 +MINICOM_VERSION = 2.7.1 +MINICOM_SITE = https://alioth.debian.org/frs/download.php/file/4215 MINICOM_LICENSE = GPLv2+ MINICOM_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/mono/mono.mk b/bsp/buildroot/package/mono/mono.mk index 20b92056..4f39c0fd 100644 --- a/bsp/buildroot/package/mono/mono.mk +++ b/bsp/buildroot/package/mono/mono.mk @@ -18,9 +18,7 @@ MONO_INSTALL_STAGING = YES MONO_AUTORECONF = YES # Disable managed code (mcs folder) from building -MONO_CONF_OPTS = --disable-gtk-doc \ - --with-mcs-docs=no \ - --with-moonlight=no \ +MONO_CONF_OPTS = --with-mcs-docs=no \ --with-ikvm-native=no \ --enable-minimal=profiler,debug \ --disable-mcs-build \ @@ -31,7 +29,6 @@ MONO_CONF_OPTS = --disable-gtk-doc \ define MONO_INSTALL_LIBS rsync -av --exclude=*.so --exclude=*.mdb \ $(HOST_DIR)/usr/lib/mono $(TARGET_DIR)/usr/lib/ - rsync -av $(HOST_DIR)/etc/mono $(TARGET_DIR)/etc endef MONO_POST_INSTALL_TARGET_HOOKS += MONO_INSTALL_LIBS @@ -44,9 +41,7 @@ MONO_DEPENDENCIES += host-mono ## Mono managed -HOST_MONO_CONF_OPTS = --disable-gtk-doc \ - --with-mcs-docs=no \ - --with-moonlight=no \ +HOST_MONO_CONF_OPTS = --with-mcs-docs=no \ --disable-libraries \ --with-ikvm-native=no \ --enable-minimal=profiler,debug \ diff --git a/bsp/buildroot/package/mosquitto/mosquitto.hash b/bsp/buildroot/package/mosquitto/mosquitto.hash index b0b860f9..6c102eba 100644 --- a/bsp/buildroot/package/mosquitto/mosquitto.hash +++ b/bsp/buildroot/package/mosquitto/mosquitto.hash @@ -1,2 +1,2 @@ -# From https://www.eclipse.org/downloads/download.php?file=/mosquitto/source/mosquitto-1.4.10.tar.gz -sha512 fe5d6d7196a137a496ba6881c77d852396baefb4f0b83ccd9a22175fc05b09e48a09ea249e30ec7db966e11de134ebcc4e2e9b1fd40b31dc59fb0fa2f60b75a1 mosquitto-1.4.10.tar.gz +# Locally computed: +sha512 75e6105498869ab13265df7a0bea6052c014d59d0c0efb61162d8257d34c0153fce32130e84c28e99fd494f374949aac5e01c19f7439c2eea575b52ef1179c3c mosquitto-1.4.12.tar.gz diff --git a/bsp/buildroot/package/mosquitto/mosquitto.mk b/bsp/buildroot/package/mosquitto/mosquitto.mk index 96607f32..98535493 100644 --- a/bsp/buildroot/package/mosquitto/mosquitto.mk +++ b/bsp/buildroot/package/mosquitto/mosquitto.mk @@ -4,7 +4,7 @@ # ################################################################################ -MOSQUITTO_VERSION = 1.4.10 +MOSQUITTO_VERSION = 1.4.12 MOSQUITTO_SITE = http://mosquitto.org/files/source MOSQUITTO_LICENSE = EPLv1.0 or EDLv1.0 MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v10 edl-v10 @@ -17,6 +17,13 @@ MOSQUITTO_MAKE_OPTS = \ WITH_WRAP=no \ WITH_DOCS=no +# adns uses getaddrinfo_a +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes +else +MOSQUITTO_MAKE_OPTS += WITH_ADNS=no +endif + ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) MOSQUITTO_MAKE_OPTS += WITH_THREADING=yes else diff --git a/bsp/buildroot/package/mpd/Config.in b/bsp/buildroot/package/mpd/Config.in index 8eabbbc7..0c73548f 100644 --- a/bsp/buildroot/package/mpd/Config.in +++ b/bsp/buildroot/package/mpd/Config.in @@ -8,6 +8,8 @@ menuconfig BR2_PACKAGE_MPD # 0.19.x could be built with GCC 4.6, but for simplicity we require # the same toolchain dependencies for all versions. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 + # ARC toolchain issue + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC select BR2_PACKAGE_BOOST select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG) @@ -339,3 +341,4 @@ comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.9" depends on BR2_TOOLCHAIN_HAS_ATOMIC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC diff --git a/bsp/buildroot/package/mplayer/0006-musl-ldt.patch b/bsp/buildroot/package/mplayer/0006-musl-ldt.patch new file mode 100644 index 00000000..8165f6f5 --- /dev/null +++ b/bsp/buildroot/package/mplayer/0006-musl-ldt.patch @@ -0,0 +1,22 @@ +Fixes musl build error + +loader/ldt_keeper.o: In function `Setup_LDT_Keeper': +ldt_keeper.c:(.text+0xab): undefined reference to `modify_ldt' + +Downloaded from +https://github.com/dimkr/rlsd2/blob/master/rules/mplayer/musl.patch + +Signed-off-by: Bernd Kuhls + +diff -rup MPlayer-1.1.1-orig/loader/ldt_keeper.c MPlayer-1.1.1/loader/ldt_keeper.c +--- MPlayer-1.1.1-orig/loader/ldt_keeper.c 2015-04-23 15:07:09.580805888 +0300 ++++ MPlayer-1.1.1/loader/ldt_keeper.c 2015-04-23 15:08:07.736807270 +0300 +@@ -47,7 +47,7 @@ + #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)) + _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount ); + #else +-int modify_ldt(int func, void *ptr, unsigned long bytecount); ++#define modify_ldt(func, ptr, bytecount) syscall(__NR_modify_ldt, func, ptr, bytecount) + #endif + #else + #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) diff --git a/bsp/buildroot/package/mplayer/0007-fixmmx.patch b/bsp/buildroot/package/mplayer/0007-fixmmx.patch new file mode 100644 index 00000000..9634a3b6 --- /dev/null +++ b/bsp/buildroot/package/mplayer/0007-fixmmx.patch @@ -0,0 +1,77 @@ +fix compilation failure with MMX + +Fixes +libmpcodecs/vf_fspp.c: In function 'column_fidct_c': +libmpcodecs/vf_fspp.c:750:5: error: unknown type name 'int_simd16_t' +libmpcodecs/vf_fspp.c:751:5: error: unknown type name 'int_simd16_t' +libmpcodecs/vf_fspp.c:752:5: error: unknown type name 'int_simd16_t' +libmpcodecs/vf_fspp.c:753:5: error: unknown type name 'int_simd16_t' +libmpcodecs/vf_fspp.c:789:18: error: 'FIX_0_707106781' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:789:18: note: each undeclared identifier is reported only once for each function it appears in +libmpcodecs/vf_fspp.c:804:21: error: 'FIX_1_414213562_A' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:817:18: error: 'FIX_0_382683433' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:818:18: error: 'FIX_0_541196100' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:819:18: error: 'FIX_1_306562965' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:844:21: error: 'FIX_1_414213562' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:845:21: error: 'FIX_1_847759065' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:846:21: error: 'FIX_1_082392200' undeclared (first use in this function) +libmpcodecs/vf_fspp.c:847:21: error: 'FIX_2_613125930' undeclared (first use in this function) + +found using this defconfig after fixing the original bug: +http://autobuild.buildroot.net/results/642/6422adeef19ec547c7bc3f8ad3b0d51702015240/ + +Downloaded from upstream mailinglist: +http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2016-May/073488.html + +Signed-off-by: Bernd Kuhls + +diff -uNr MPlayer-1.3.0.org/libmpcodecs/vf_fspp.c MPlayer-1.3.0/libmpcodecs/vf_fspp.c +--- MPlayer-1.3.0.org/libmpcodecs/vf_fspp.c 2015-10-17 21:44:31.000000000 +0200 ++++ MPlayer-1.3.0/libmpcodecs/vf_fspp.c 2017-04-10 21:26:57.771819064 +0200 +@@ -173,7 +173,6 @@ + #define store_slice_s store_slice_c + #define store_slice2_s store_slice2_c + #define mul_thrmat_s mul_thrmat_c +-#define column_fidct_s column_fidct_c + #define row_idct_s row_idct_c + #define row_fdct_s row_fdct_c + +@@ -393,7 +392,6 @@ + ); + } + +-static void column_fidct_mmx(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt); + static void row_idct_mmx(int16_t* workspace, + int16_t* output_adr, int output_stride, int cnt); + static void row_fdct_mmx(int16_t *data, const uint8_t *pixels, int line_size, int cnt); +@@ -401,11 +399,18 @@ + #define store_slice_s store_slice_mmx + #define store_slice2_s store_slice2_mmx + #define mul_thrmat_s mul_thrmat_mmx +-#define column_fidct_s column_fidct_mmx + #define row_idct_s row_idct_mmx + #define row_fdct_s row_fdct_mmx + #endif // HAVE_MMX_INLINE + ++#if !HAVE_MMXEXT_INLINE ++static void column_fidct_c(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt); ++#define column_fidct_s column_fidct_c ++#else ++static void column_fidct_mmx(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt); ++#define column_fidct_s column_fidct_mmx ++#endif ++ + static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, + int dst_stride, int src_stride, + int width, int height, +@@ -728,7 +733,9 @@ + DECLARE_ASM_CONST(8, uint64_t, MM_DESCALE_RND)=C64(4); + DECLARE_ASM_CONST(8, uint64_t, MM_2)=C64(2); + +-#else /* !HAVE_MMXEXT_INLINE */ ++#endif /* !HAVE_MMX_INLINE */ ++ ++#if !HAVE_MMX_INLINE || !HAVE_MMXEXT_INLINE + + typedef int32_t int_simd16_t; + static const int16_t FIX_0_382683433=FIX(0.382683433, 14); diff --git a/bsp/buildroot/package/mplayer/mplayer.mk b/bsp/buildroot/package/mplayer/mplayer.mk index 07307ced..38452abd 100644 --- a/bsp/buildroot/package/mplayer/mplayer.mk +++ b/bsp/buildroot/package/mplayer/mplayer.mk @@ -224,6 +224,12 @@ else MPLAYER_CONF_OPTS += --disable-gif endif +# We intentionally don't pass --enable-pulse, to let the +# autodetection find which library to link with. +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +MPLAYER_DEPENDENCIES += pulseaudio +endif + # We intentionally don't pass --enable-librtmp to let autodetection # find which library to link with. ifeq ($(BR2_PACKAGE_RTMPDUMP),y) @@ -297,9 +303,9 @@ MPLAYER_CONF_OPTS += \ endif ifeq ($(BR2_X86_CPU_HAS_SSE),y) -MPLAYER_CONF_OPTS += --enable-sse +MPLAYER_CONF_OPTS += --enable-mmxext --enable-sse else -MPLAYER_CONF_OPTS += --disable-sse +MPLAYER_CONF_OPTS += --disable-mmxext --disable-sse endif ifeq ($(BR2_X86_CPU_HAS_SSE2),y) diff --git a/bsp/buildroot/package/mpv/mpv.mk b/bsp/buildroot/package/mpv/mpv.mk index 5b83b6d9..25b54e5e 100644 --- a/bsp/buildroot/package/mpv/mpv.mk +++ b/bsp/buildroot/package/mpv/mpv.mk @@ -23,6 +23,7 @@ MPV_CONF_OPTS = \ --disable-cdda \ --disable-cocoa \ --disable-coreaudio \ + --disable-cuda-hwaccel \ --disable-libv4l2 \ --disable-opensles \ --disable-rpi \ diff --git a/bsp/buildroot/package/mxml/mxml.mk b/bsp/buildroot/package/mxml/mxml.mk index f36c75ca..1ed5eb97 100644 --- a/bsp/buildroot/package/mxml/mxml.mk +++ b/bsp/buildroot/package/mxml/mxml.mk @@ -5,7 +5,7 @@ ################################################################################ MXML_VERSION = 2.10 -MXML_SITE = http://www.msweet.org/files/project3 +MXML_SITE = https://github.com/michaelrsweet/mxml/releases/download/release-$(MXML_VERSION) MXML_LICENSE = LGPLv2+ with exceptions MXML_LICENSE_FILES = COPYING MXML_INSTALL_STAGING = YES diff --git a/bsp/buildroot/package/nbd/nbd.mk b/bsp/buildroot/package/nbd/nbd.mk index d91c2d71..a763d83d 100644 --- a/bsp/buildroot/package/nbd/nbd.mk +++ b/bsp/buildroot/package/nbd/nbd.mk @@ -19,14 +19,14 @@ NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no endif ifneq ($(BR2_NBD_CLIENT),y) -NBD_TOREMOVE += nbd-client +NBD_TOREMOVE += /usr/sbin/nbd-client endif ifneq ($(BR2_NBD_SERVER),y) -NBD_TOREMOVE += nbd-server +NBD_TOREMOVE += /usr/bin/nbd-server endif define NBD_CLEANUP_AFTER_INSTALL - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(NBD_TOREMOVE)) + rm -f $(addprefix $(TARGET_DIR), $(NBD_TOREMOVE)) endef NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL diff --git a/bsp/buildroot/package/ncftp/ncftp.mk b/bsp/buildroot/package/ncftp/ncftp.mk index 5c88556a..11bfccaa 100644 --- a/bsp/buildroot/package/ncftp/ncftp.mk +++ b/bsp/buildroot/package/ncftp/ncftp.mk @@ -12,6 +12,7 @@ NCFTP_LICENSE = Clarified Artistic License NCFTP_LICENSE_FILES = doc/LICENSE.txt NCFTP_DEPENDENCIES = host-autoconf +NCFTP_CONF_OPTS = --disable-ccdv # The bundled configure script is generated by autoconf 2.13 and doesn't # detect cross-compilation correctly. Therefore, we have to regenerate it. diff --git a/bsp/buildroot/package/ncurses/ncurses.mk b/bsp/buildroot/package/ncurses/ncurses.mk index 9d1b75d6..bc0ea290 100644 --- a/bsp/buildroot/package/ncurses/ncurses.mk +++ b/bsp/buildroot/package/ncurses/ncurses.mk @@ -28,11 +28,6 @@ NCURSES_CONF_OPTS = \ $(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \ --without-manpages -# Install after busybox for the full-blown versions -ifeq ($(BR2_PACKAGE_BUSYBOX),y) -NCURSES_DEPENDENCIES += busybox -endif - ifeq ($(BR2_STATIC_LIBS),y) NCURSES_CONF_OPTS += --without-shared --with-normal else ifeq ($(BR2_SHARED_LIBS),y) diff --git a/bsp/buildroot/package/nodejs/Config.in b/bsp/buildroot/package/nodejs/Config.in index b8c45f5d..ad5ca050 100644 --- a/bsp/buildroot/package/nodejs/Config.in +++ b/bsp/buildroot/package/nodejs/Config.in @@ -43,7 +43,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS config BR2_PACKAGE_NODEJS_VERSION_STRING string - default "6.9.4" if BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS + default "6.10.2" if BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS default "0.10.48" config BR2_PACKAGE_NODEJS_NPM diff --git a/bsp/buildroot/package/nodejs/nodejs.hash b/bsp/buildroot/package/nodejs/nodejs.hash index 8c8c5a3c..4c63f589 100644 --- a/bsp/buildroot/package/nodejs/nodejs.hash +++ b/bsp/buildroot/package/nodejs/nodejs.hash @@ -1,5 +1,5 @@ # From upstream URL: http://nodejs.org/dist/v0.10.48/SHASUMS256.txt sha256 365a93d9acc076a0d93f087d269f376abeebccad599a9dab72f2f6ed96c8ae6e node-v0.10.48.tar.xz -# From upstream URL: http://nodejs.org/dist/v6.9.4/SHASUMS256.txt -sha256 c51d7c61db40455d57428abcadc7eb0f0a08a8878cb1d8ea3c1e211c54532c35 node-v6.9.4.tar.xz +# From upstream URL: http://nodejs.org/dist/v6.10.2/SHASUMS256.txt +sha256 80aa11333da99813973a99646e2113c6be5b63f665c0731ed14ecb94cbe846b6 node-v6.10.2.tar.xz diff --git a/bsp/buildroot/package/ntp/0003-ntpq-fpic.patch b/bsp/buildroot/package/ntp/0003-ntpq-fpic.patch new file mode 100644 index 00000000..6e05a677 --- /dev/null +++ b/bsp/buildroot/package/ntp/0003-ntpq-fpic.patch @@ -0,0 +1,23 @@ +ntpq/Makefile.am: add NTP_HARD_CFLAGS + +Pass NTP_HARD_CFLAGS when building ntpq, like in all other ntp +modules, to make sure -fPIC is passed. + +Originally taken from +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494143c3b4921a5c8b8596d58f2c8b98296bf688. + +Signed-off-by: Thomas Petazzoni + +Index: b/ntpq/Makefile.am +=================================================================== +--- a/ntpq/Makefile.am ++++ b/ntpq/Makefile.am +@@ -23,7 +23,7 @@ + ntpq_LDADD += $(LDADD_NTP) + noinst_HEADERS= ntpq.h + noinst_LIBRARIES= libntpq.a +-libntpq_a_CFLAGS= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB ++libntpq_a_CFLAGS= $(NTP_HARD_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB + CLEANFILES= + DISTCLEANFILES= .version version.c config.log $(man_MANS) + ETAGS_ARGS= Makefile.am diff --git a/bsp/buildroot/package/ntp/ntp.hash b/bsp/buildroot/package/ntp/ntp.hash index c6838d81..d8b7083c 100644 --- a/bsp/buildroot/package/ntp/ntp.hash +++ b/bsp/buildroot/package/ntp/ntp.hash @@ -1,4 +1,4 @@ -# From http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz.md5 -md5 857452b05f5f2e033786f77ade1974ed ntp-4.2.8p9.tar.gz +# From https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p10.tar.gz.md5 +md5 745384ed0dedb3f66b33fe84d66466f9 ntp-4.2.8p10.tar.gz # Calculated based on the hash above -sha256 b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72 ntp-4.2.8p9.tar.gz +sha256 ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f ntp-4.2.8p10.tar.gz diff --git a/bsp/buildroot/package/ntp/ntp.mk b/bsp/buildroot/package/ntp/ntp.mk index edbf1c86..24403cf4 100644 --- a/bsp/buildroot/package/ntp/ntp.mk +++ b/bsp/buildroot/package/ntp/ntp.mk @@ -5,8 +5,8 @@ ################################################################################ NTP_VERSION_MAJOR = 4.2 -NTP_VERSION = $(NTP_VERSION_MAJOR).8p9 -NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR) +NTP_VERSION = $(NTP_VERSION_MAJOR).8p10 +NTP_SITE = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR) NTP_DEPENDENCIES = host-pkgconf libevent openssl $(if $(BR2_PACKAGE_BUSYBOX),busybox) NTP_LICENSE = ntp license NTP_LICENSE_FILES = COPYRIGHT @@ -21,8 +21,15 @@ NTP_CONF_OPTS = \ --with-crypto # 0002-ntp-syscalls-fallback.patch +# 0003-ntpq-fpic.patch NTP_AUTORECONF = YES +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) +NTP_CONF_OPTS += --with-locfile=linux +else +NTP_CONF_OPTS += --with-locfile=default +endif + ifeq ($(BR2_PACKAGE_LIBCAP),y) NTP_CONF_OPTS += --enable-linuxcaps NTP_DEPENDENCIES += libcap diff --git a/bsp/buildroot/package/nvidia-driver/nvidia-driver.mk b/bsp/buildroot/package/nvidia-driver/nvidia-driver.mk index cb9b7fae..20beec89 100644 --- a/bsp/buildroot/package/nvidia-driver/nvidia-driver.mk +++ b/bsp/buildroot/package/nvidia-driver/nvidia-driver.mk @@ -6,7 +6,7 @@ NVIDIA_DRIVER_VERSION = 375.20 NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64) -NVIDIA_DRIVER_SITE = ftp://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION) +NVIDIA_DRIVER_SITE = http://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION) NVIDIA_DRIVER_SOURCE = NVIDIA-Linux-x86$(NVIDIA_DRIVER_SUFFIX)-$(NVIDIA_DRIVER_VERSION).run NVIDIA_DRIVER_LICENSE = NVIDIA Software License NVIDIA_DRIVER_LICENSE_FILES = LICENSE diff --git a/bsp/buildroot/package/openblas/Config.in b/bsp/buildroot/package/openblas/Config.in index de26ab3b..bc628960 100644 --- a/bsp/buildroot/package/openblas/Config.in +++ b/bsp/buildroot/package/openblas/Config.in @@ -31,7 +31,8 @@ config BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET default "SICORTEX" if BR2_MIPS_CPU_MIPS64 # I6400 is built with MSA support which is only available in Codescape toolchains default "I6400" if BR2_mips_i6400 && BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS - default "SPARC" if BR2_sparc + # OpenBLAS assumes SPARC=Sparc v9 + default "SPARC" if BR2_sparc_v9 # Cortex-A15 always have a VFPv4 default "CORTEXA15" if (BR2_cortex_a15 && BR2_ARM_EABIHF) # Cortex-A9 have an optional VFPv3, so we need to make sure it diff --git a/bsp/buildroot/package/openssh/openssh.hash b/bsp/buildroot/package/openssh/openssh.hash index 09010d3b..3685bc0d 100644 --- a/bsp/buildroot/package/openssh/openssh.hash +++ b/bsp/buildroot/package/openssh/openssh.hash @@ -1,3 +1,2 @@ -# Locally calculated after checking pgp signature -# Also from http://www.openssh.com/txt/release-7.4 -sha256 1b1fc4a14e2024293181924ed24872e6f2e06293f3e8926a376b8aec481f19d1 openssh-7.4p1.tar.gz +# From http://www.openssh.com/txt/release-7.5 (base64 encoded) +sha256 9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0 openssh-7.5p1.tar.gz diff --git a/bsp/buildroot/package/openssh/openssh.mk b/bsp/buildroot/package/openssh/openssh.mk index ce37ee7f..ba48770a 100644 --- a/bsp/buildroot/package/openssh/openssh.mk +++ b/bsp/buildroot/package/openssh/openssh.mk @@ -4,7 +4,7 @@ # ################################################################################ -OPENSSH_VERSION = 7.4p1 +OPENSSH_VERSION = 7.5p1 OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable OPENSSH_LICENSE = BSD-3c, BSD-2c, Public Domain OPENSSH_LICENSE_FILES = LICENCE diff --git a/bsp/buildroot/package/opentyrian/opentyrian.mk b/bsp/buildroot/package/opentyrian/opentyrian.mk index 6efbe4ee..c6b19d2a 100644 --- a/bsp/buildroot/package/opentyrian/opentyrian.mk +++ b/bsp/buildroot/package/opentyrian/opentyrian.mk @@ -24,7 +24,7 @@ define OPENTYRIAN_BUILD_CMDS CC="$(TARGET_CC)" \ STRIP="/bin/true" \ SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ - LDFLAGS="-lm" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm" \ WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ -C $(@D) release endef diff --git a/bsp/buildroot/package/openvpn/Config.in b/bsp/buildroot/package/openvpn/Config.in index 5fa191d9..0a167557 100644 --- a/bsp/buildroot/package/openvpn/Config.in +++ b/bsp/buildroot/package/openvpn/Config.in @@ -14,6 +14,13 @@ config BR2_PACKAGE_OPENVPN if BR2_PACKAGE_OPENVPN +config BR2_PACKAGE_OPENVPN_LZ4 + bool "LZ4 compression" + default y + select BR2_PACKAGE_LZ4 + help + Enable LZ4 compression. + config BR2_PACKAGE_OPENVPN_LZO bool "LZO compression" default y diff --git a/bsp/buildroot/package/openvpn/openvpn.hash b/bsp/buildroot/package/openvpn/openvpn.hash index 600c2507..fe054e96 100644 --- a/bsp/buildroot/package/openvpn/openvpn.hash +++ b/bsp/buildroot/package/openvpn/openvpn.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 6f23ba49a1dbeb658f49c7ae17d9ea979de6d92c7357de3d55cd4525e1b2f87e openvpn-2.4.0.tar.xz +sha256 df5c4f384b7df6b08a2f6fa8a84b9fd382baf59c2cef1836f82e2a7f62f1bff9 openvpn-2.4.2.tar.xz diff --git a/bsp/buildroot/package/openvpn/openvpn.mk b/bsp/buildroot/package/openvpn/openvpn.mk index 5e3df59f..34b0e4be 100644 --- a/bsp/buildroot/package/openvpn/openvpn.mk +++ b/bsp/buildroot/package/openvpn/openvpn.mk @@ -4,7 +4,7 @@ # ################################################################################ -OPENVPN_VERSION = 2.4.0 +OPENVPN_VERSION = 2.4.2 OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz OPENVPN_SITE = http://swupdate.openvpn.net/community/releases OPENVPN_DEPENDENCIES = host-pkgconf openssl @@ -22,8 +22,7 @@ OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \ ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y) OPENVPN_CONF_OPTS += \ --enable-small \ - --disable-plugins \ - --disable-eurephia + --disable-plugins endif # BusyBox 1.21+ places the ip applet in the "correct" place @@ -36,6 +35,12 @@ else OPENVPN_CONF_ENV += IPROUTE=/sbin/ip endif +ifeq ($(BR2_PACKAGE_OPENVPN_LZ4),y) +OPENVPN_DEPENDENCIES += lz4 +else +OPENVPN_CONF_OPTS += --disable-lz4 +endif + ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y) OPENVPN_DEPENDENCIES += lzo else diff --git a/bsp/buildroot/package/oracle-mysql/0008-fix-type-conversion.patch b/bsp/buildroot/package/oracle-mysql/0008-fix-type-conversion.patch new file mode 100644 index 00000000..65babf4f --- /dev/null +++ b/bsp/buildroot/package/oracle-mysql/0008-fix-type-conversion.patch @@ -0,0 +1,22 @@ +Fix type conversion + +Fixes the following build error with gcc 6.x: + +protocol.cc:27:40: error: narrowing conversion of ''\37777777776'' from 'char' to 'uchar {aka unsigned char}' inside { } [-Wnarrowing] + static uchar eof_buff[1]= { (char) 254 }; /* Marker for end of fields */ + +Signed-off-by: Thomas Petazzoni + +Index: b/server-tools/instance-manager/protocol.cc +=================================================================== +--- a/server-tools/instance-manager/protocol.cc ++++ b/server-tools/instance-manager/protocol.cc +@@ -24,7 +24,7 @@ + #include + + +-static uchar eof_buff[1]= { (char) 254 }; /* Marker for end of fields */ ++static uchar eof_buff[1]= { (uchar) 254 }; /* Marker for end of fields */ + static const char ERROR_PACKET_CODE= (char) 255; + + diff --git a/bsp/buildroot/package/pcre/0003-CVE-2017-6004.patch b/bsp/buildroot/package/pcre/0003-CVE-2017-6004.patch new file mode 100644 index 00000000..d0b6d51b --- /dev/null +++ b/bsp/buildroot/package/pcre/0003-CVE-2017-6004.patch @@ -0,0 +1,21 @@ +Description: CVE-2017-6004: crafted regular expression may cause denial of service +Origin: upstream, https://vcs.pcre.org/pcre/code/trunk/pcre_jit_compile.c?r1=1676&r2=1680&view=patch +Bug: https://bugs.exim.org/show_bug.cgi?id=2035 +Bug-Debian: https://bugs.debian.org/855405 +Forwarded: not-needed +Author: Salvatore Bonaccorso +Last-Update: 2017-02-17 + +Signed-off-by: Baruch Siach + +--- a/pcre_jit_compile.c ++++ b/pcre_jit_compile.c +@@ -8111,7 +8111,7 @@ if (opcode == OP_COND || opcode == OP_SC + + if (*matchingpath == OP_FAIL) + stacksize = 0; +- if (*matchingpath == OP_RREF) ++ else if (*matchingpath == OP_RREF) + { + stacksize = GET2(matchingpath, 1); + if (common->currententry == NULL) diff --git a/bsp/buildroot/package/pcre/0004-CVE-2017-7186.patch b/bsp/buildroot/package/pcre/0004-CVE-2017-7186.patch new file mode 100644 index 00000000..980923ae --- /dev/null +++ b/bsp/buildroot/package/pcre/0004-CVE-2017-7186.patch @@ -0,0 +1,60 @@ +Description: Upstream fix for CVE-2017-7186 (Upstream rev 1688) + Fix Unicode property crash for 32-bit characters greater than 0x10ffff. +Author: Matthew Vernon +X-Dgit-Generated: 2:8.39-3 c4c2c7c4f74d53b263af2471d8e11db88096bd13 + +Signed-off-by: Baruch Siach +--- + +--- pcre3-8.39.orig/pcre_internal.h ++++ pcre3-8.39/pcre_internal.h +@@ -2772,6 +2772,9 @@ extern const pcre_uint8 PRIV(ucd_stage1 + extern const pcre_uint16 PRIV(ucd_stage2)[]; + extern const pcre_uint32 PRIV(ucp_gentype)[]; + extern const pcre_uint32 PRIV(ucp_gbtable)[]; ++#ifdef COMPILE_PCRE32 ++extern const ucd_record PRIV(dummy_ucd_record)[]; ++#endif + #ifdef SUPPORT_JIT + extern const int PRIV(ucp_typerange)[]; + #endif +@@ -2780,9 +2783,15 @@ extern const int PRIV(ucp_typera + /* UCD access macros */ + + #define UCD_BLOCK_SIZE 128 +-#define GET_UCD(ch) (PRIV(ucd_records) + \ ++#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ + PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ + UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) ++ ++#ifdef COMPILE_PCRE32 ++#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) ++#else ++#define GET_UCD(ch) REAL_GET_UCD(ch) ++#endif + + #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype + #define UCD_SCRIPT(ch) GET_UCD(ch)->script +--- pcre3-8.39.orig/pcre_ucd.c ++++ pcre3-8.39/pcre_ucd.c +@@ -38,6 +38,20 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { + const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0}; + #else + ++/* If the 32-bit library is run in non-32-bit mode, character values ++greater than 0x10ffff may be encountered. For these we set up a ++special record. */ ++ ++#ifdef COMPILE_PCRE32 ++const ucd_record PRIV(dummy_ucd_record)[] = {{ ++ ucp_Common, /* script */ ++ ucp_Cn, /* type unassigned */ ++ ucp_gbOther, /* grapheme break property */ ++ 0, /* case set */ ++ 0, /* other case */ ++ }}; ++#endif ++ + /* When recompiling tables with a new Unicode version, please check the + types in this structure definition from pcre_internal.h (the actual + field names will be different): diff --git a/bsp/buildroot/package/pcre/pcre.mk b/bsp/buildroot/package/pcre/pcre.mk index 211e2359..e302ed7d 100644 --- a/bsp/buildroot/package/pcre/pcre.mk +++ b/bsp/buildroot/package/pcre/pcre.mk @@ -5,7 +5,7 @@ ################################################################################ PCRE_VERSION = 8.40 -PCRE_SITE = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre +PCRE_SITE = https://ftp.pcre.org/pub/pcre PCRE_SOURCE = pcre-$(PCRE_VERSION).tar.bz2 PCRE_LICENSE = BSD-3c PCRE_LICENSE_FILES = LICENCE diff --git a/bsp/buildroot/package/perl-gd/perl-gd.mk b/bsp/buildroot/package/perl-gd/perl-gd.mk index ea8fd5cd..2ad966c1 100644 --- a/bsp/buildroot/package/perl-gd/perl-gd.mk +++ b/bsp/buildroot/package/perl-gd/perl-gd.mk @@ -12,6 +12,11 @@ PERL_GD_LICENSE = Artistic or GPLv1+ PERL_GD_LICENSE_FILES = LICENSE PERL_GD_PREFER_INSTALLER = EUMM +define PERL_GD_MOVE_XS + mv $(@D)/lib/GD.xs $(@D)/GD.xs +endef +PERL_GD_POST_PATCH_HOOKS += PERL_GD_MOVE_XS + PERL_GD_CONF_OPTS = \ -options=FT,PNG \ -lib_gd_path=$(STAGING_DIR)/usr \ diff --git a/bsp/buildroot/package/picocom/picocom.mk b/bsp/buildroot/package/picocom/picocom.mk index 59a749fb..e0e817ea 100644 --- a/bsp/buildroot/package/picocom/picocom.mk +++ b/bsp/buildroot/package/picocom/picocom.mk @@ -10,7 +10,8 @@ PICOCOM_LICENSE = GPLv2+ PICOCOM_LICENSE_FILES = LICENSE.txt define PICOCOM_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) endef define PICOCOM_INSTALL_TARGET_CMDS diff --git a/bsp/buildroot/package/pkg-generic.mk b/bsp/buildroot/package/pkg-generic.mk index 6339a1af..d545cf6c 100644 --- a/bsp/buildroot/package/pkg-generic.mk +++ b/bsp/buildroot/package/pkg-generic.mk @@ -683,6 +683,7 @@ $(1)-legal-source: $$($(2)_TARGET_ACTUAL_SOURCE) endif # actual sources != sources endif # actual sources != "" +$(1)-source-check: PKG=$(2) $(1)-source-check: $$(foreach p,$$($(2)_ALL_DOWNLOADS),$$(call SOURCE_CHECK,$$(p))$$(sep)) diff --git a/bsp/buildroot/package/pkg-python.mk b/bsp/buildroot/package/pkg-python.mk index 38bc45ff..52c33f87 100644 --- a/bsp/buildroot/package/pkg-python.mk +++ b/bsp/buildroot/package/pkg-python.mk @@ -28,6 +28,7 @@ PKG_PYTHON_DISTUTILS_ENV = \ LDFLAGS="$(TARGET_LDFLAGS)" \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ + PYTHONNOUSERSITE=1 \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr @@ -43,7 +44,8 @@ PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \ # Host distutils-based packages HOST_PKG_PYTHON_DISTUTILS_ENV = \ - PATH=$(BR_PATH) + PATH=$(BR_PATH) \ + PYTHONNOUSERSITE=1 HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \ --prefix=$(HOST_DIR)/usr @@ -52,6 +54,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \ PKG_PYTHON_SETUPTOOLS_ENV = \ PATH=$(BR_PATH) \ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ + PYTHONNOUSERSITE=1 \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr @@ -70,7 +73,8 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \ # Host setuptools-based packages HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH=$(BR_PATH) + PATH=$(BR_PATH) \ + PYTHONNOUSERSITE=1 HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \ --prefix=$(HOST_DIR)/usr diff --git a/bsp/buildroot/package/popt/popt.mk b/bsp/buildroot/package/popt/popt.mk index 863a47a6..3ab53880 100644 --- a/bsp/buildroot/package/popt/popt.mk +++ b/bsp/buildroot/package/popt/popt.mk @@ -21,6 +21,7 @@ POPT_CONF_ENV = ac_cv_va_copy=yes ifeq ($(BR2_PACKAGE_LIBICONV),y) POPT_CONF_ENV += am_cv_lib_iconv=yes POPT_CONF_OPTS += --with-libiconv-prefix=$(STAGING_DIR)/usr +POPT_DEPENDENCIES += libiconv endif $(eval $(autotools-package)) diff --git a/bsp/buildroot/package/postgresql/postgresql.hash b/bsp/buildroot/package/postgresql/postgresql.hash index 900a55a7..c65edf71 100644 --- a/bsp/buildroot/package/postgresql/postgresql.hash +++ b/bsp/buildroot/package/postgresql/postgresql.hash @@ -1,2 +1,2 @@ -# From https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.bz2.sha256 -sha256 e5101e0a49141fc12a7018c6dad594694d3a3325f5ab71e93e0e51bd94e51fcd postgresql-9.6.1.tar.bz2 +# From https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2.sha256 +sha256 1645b3736901f6d854e695a937389e68ff2066ce0cde9d73919d6ab7c995b9c6 postgresql-9.6.3.tar.bz2 diff --git a/bsp/buildroot/package/postgresql/postgresql.mk b/bsp/buildroot/package/postgresql/postgresql.mk index bc2bf47e..62b41cbe 100644 --- a/bsp/buildroot/package/postgresql/postgresql.mk +++ b/bsp/buildroot/package/postgresql/postgresql.mk @@ -4,7 +4,7 @@ # ################################################################################ -POSTGRESQL_VERSION = 9.6.1 +POSTGRESQL_VERSION = 9.6.3 POSTGRESQL_SOURCE = postgresql-$(POSTGRESQL_VERSION).tar.bz2 POSTGRESQL_SITE = http://ftp.postgresql.org/pub/source/v$(POSTGRESQL_VERSION) POSTGRESQL_LICENSE = PostgreSQL diff --git a/bsp/buildroot/package/pulseview/0003-CMakeLists.txt-Avoid-fext-numeric-literals-not-suppo.patch b/bsp/buildroot/package/pulseview/0003-CMakeLists.txt-Avoid-fext-numeric-literals-not-suppo.patch new file mode 100644 index 00000000..89137f2a --- /dev/null +++ b/bsp/buildroot/package/pulseview/0003-CMakeLists.txt-Avoid-fext-numeric-literals-not-suppo.patch @@ -0,0 +1,28 @@ +From 6ad4d7a6f17edecc3523a7ab3d627f9a70dbacc1 Mon Sep 17 00:00:00 2001 +From: Uwe Hermann +Date: Wed, 17 May 2017 11:00:44 +0200 +Subject: [PATCH] CMakeLists.txt: Avoid -fext-numeric-literals, (not supported + by clang). + +This (re-)fixes bug #863. + +Signed-off-by: Bartosz Golaszewski +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e8bc79f..e7e4432 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -395,6 +395,7 @@ add_definitions(${QT_DEFINITIONS} -DQT_NO_KEYWORDS) + add_definitions(-D__STDC_LIMIT_MACROS) + add_definitions(-Wall -Wextra) + add_definitions(-std=c++11) ++add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1) + + if(ENABLE_DECODE) + add_definitions(-DENABLE_DECODE) +-- +2.9.3 + diff --git a/bsp/buildroot/package/python-django/python-django.hash b/bsp/buildroot/package/python-django/python-django.hash index 38b303bb..09be1844 100644 --- a/bsp/buildroot/package/python-django/python-django.hash +++ b/bsp/buildroot/package/python-django/python-django.hash @@ -1,3 +1,3 @@ # md5 from https://pypi.python.org/pypi/django/json, sha256 locally computed -md5 5342e77374b2acd2eafa86d2bb68f8c9 Django-1.10.2.tar.gz -sha256 e127f12a0bfb34843b6e8c82f91e26fff6445a7ca91d222c0794174cf97cbce1 Django-1.10.2.tar.gz +md5 693dfeabad62c561cb205900d32c2a98 Django-1.10.7.tar.gz +sha256 593d779dbc2350a245c4f76d26bdcad58a39895e87304fe6d725bbdf84b5b0b8 Django-1.10.7.tar.gz diff --git a/bsp/buildroot/package/python-django/python-django.mk b/bsp/buildroot/package/python-django/python-django.mk index 2a502314..5bb76556 100644 --- a/bsp/buildroot/package/python-django/python-django.mk +++ b/bsp/buildroot/package/python-django/python-django.mk @@ -4,10 +4,10 @@ # ################################################################################ -PYTHON_DJANGO_VERSION = 1.10.2 +PYTHON_DJANGO_VERSION = 1.10.7 PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz # The official Django site has an unpractical URL -PYTHON_DJANGO_SITE = https://pypi.python.org/packages/57/9e/59444485f092b6ed4f1931e7d2e13b67fdab967c041d02f58a0d1dab8c23 +PYTHON_DJANGO_SITE = https://pypi.python.org/packages/15/b4/d4bb7313e02386bd23a60e1eb5670321313fb67289c6f36ec43bce747aff PYTHON_DJANGO_LICENSE = BSD-3c PYTHON_DJANGO_LICENSE_FILES = LICENSE PYTHON_DJANGO_SETUP_TYPE = setuptools diff --git a/bsp/buildroot/package/python-pyyaml/python-pyyaml.mk b/bsp/buildroot/package/python-pyyaml/python-pyyaml.mk index 0509a7ad..beeaf88e 100644 --- a/bsp/buildroot/package/python-pyyaml/python-pyyaml.mk +++ b/bsp/buildroot/package/python-pyyaml/python-pyyaml.mk @@ -8,7 +8,7 @@ PYTHON_PYYAML_VERSION = 3.12 PYTHON_PYYAML_SOURCE = PyYAML-$(PYTHON_PYYAML_VERSION).tar.gz PYTHON_PYYAML_SITE = https://pypi.python.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a PYTHON_PYYAML_SETUP_TYPE = distutils -PYTHON_PYYAML_LICENSE = Python software foundation license v2 +PYTHON_PYYAML_LICENSE = MIT PYTHON_PYYAML_LICENSE_FILES = LICENSE PYTHON_PYYAML_DEPENDENCIES = libyaml diff --git a/bsp/buildroot/package/python-web2py/python-web2py.hash b/bsp/buildroot/package/python-web2py/python-web2py.hash index 3de8dbf4..9c1de904 100644 --- a/bsp/buildroot/package/python-web2py/python-web2py.hash +++ b/bsp/buildroot/package/python-web2py/python-web2py.hash @@ -1,2 +1,2 @@ # sha256 locally computed -sha256 7e22a5624d8d2909e165110f0bec6b43ee36ff6834d689f4027e06dece662031 python-web2py-R-2.12.3.tar.gz +sha256 6079aeaa352ec51e0da5e6abc71fa74cdb3a781e06a311b5826618624362a7b2 python-web2py-R-2.14.6.tar.gz diff --git a/bsp/buildroot/package/python-web2py/python-web2py.mk b/bsp/buildroot/package/python-web2py/python-web2py.mk index 38faabc5..af13e69c 100644 --- a/bsp/buildroot/package/python-web2py/python-web2py.mk +++ b/bsp/buildroot/package/python-web2py/python-web2py.mk @@ -4,7 +4,7 @@ # ################################################################################ -PYTHON_WEB2PY_VERSION = R-2.12.3 +PYTHON_WEB2PY_VERSION = R-2.14.6 PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,$(PYTHON_WEB2PY_VERSION)) PYTHON_WEB2PY_LICENSE = LGPLv3 PYTHON_WEB2PY_LICENSE_FILES = LICENSE diff --git a/bsp/buildroot/package/python/python.mk b/bsp/buildroot/package/python/python.mk index 281130c6..8eb82b2a 100644 --- a/bsp/buildroot/package/python/python.mk +++ b/bsp/buildroot/package/python/python.mk @@ -60,6 +60,10 @@ HOST_PYTHON_DEPENDENCIES = host-expat host-zlib PYTHON_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_GETTEXT),y) +PYTHON_DEPENDENCIES += gettext +endif + ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y) PYTHON_DEPENDENCIES += readline endif diff --git a/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-QAtomic-pass-explicit-failure-mode-to-std-atomic-com.patch b/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-QAtomic-pass-explicit-failure-mode-to-std-atomic-com.patch new file mode 100644 index 00000000..3a43584e --- /dev/null +++ b/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-QAtomic-pass-explicit-failure-mode-to-std-atomic-com.patch @@ -0,0 +1,65 @@ +From c5d7425f8ad391112758db161e3e08f18dc9d299 Mon Sep 17 00:00:00 2001 +From: Marc Mutz +Date: Thu, 26 May 2016 08:30:26 +0200 +Subject: [PATCH] QAtomic: pass explicit failure mode to + std::atomic::compare_exchange_strong + +... in an attempt to avoid GCC 4.8 errors such as + + bits/atomic_base.h:577:70: error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange' + return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); + ^ + +as seen on Android. + +Change-Id: If046e735888cf331d2d6506d8d5ca9aa7402f9ad +[Bug report: https://bugreports.qt.io/browse/QTBUG-59399 + Patch sent upstream: https://codereview.qt-project.org/#/c/187980/] +Signed-off-by: Vicente Olivert Riera +--- + src/corelib/arch/qatomic_cxx11.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/corelib/arch/qatomic_cxx11.h b/src/corelib/arch/qatomic_cxx11.h +index bb49aae..d6731ec 100644 +--- a/src/corelib/arch/qatomic_cxx11.h ++++ b/src/corelib/arch/qatomic_cxx11.h +@@ -153,7 +153,7 @@ template struct QAtomicOps + template + static bool testAndSetRelaxed(std::atomic &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW + { +- bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed); ++ bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed, std::memory_order_relaxed); + if (currentValue) + *currentValue = expectedValue; + return tmp; +@@ -162,7 +162,7 @@ template struct QAtomicOps + template + static bool testAndSetAcquire(std::atomic &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW + { +- bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire); ++ bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire, std::memory_order_acquire); + if (currentValue) + *currentValue = expectedValue; + return tmp; +@@ -171,7 +171,7 @@ template struct QAtomicOps + template + static bool testAndSetRelease(std::atomic &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW + { +- bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release); ++ bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release, std::memory_order_relaxed); + if (currentValue) + *currentValue = expectedValue; + return tmp; +@@ -180,7 +180,7 @@ template struct QAtomicOps + template + static bool testAndSetOrdered(std::atomic &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW + { +- bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel); ++ bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel, std::memory_order_acquire); + if (currentValue) + *currentValue = expectedValue; + return tmp; +-- +1.7.10.4 + diff --git a/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-eglfs-fix-x11-header-related-compile-failure.patch b/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-eglfs-fix-x11-header-related-compile-failure.patch new file mode 100644 index 00000000..0e8bcffa --- /dev/null +++ b/bsp/buildroot/package/qt5/qt5base/5.8.0/0003-eglfs-fix-x11-header-related-compile-failure.patch @@ -0,0 +1,36 @@ +From 8902f4d7b7c532592d1a34ad117698d3e380e9e1 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Fri, 10 Mar 2017 22:23:06 +0100 +Subject: [PATCH] eglfs: fix x11 header related compile failure + +Add egl config and QT_EGL_NO_X11 define (as all other eglfs project +files do). + +Task-number: QTBUG-59427 +Change-Id: Ifbb11eae0fdf0e58c0b7feecb9a7914a889c8f77 + +Upstream: https://codereview.qt-project.org/188158 +Signed-off-by: Peter Seiderer +--- + src/plugins/platforms/eglfs/eglfs-plugin.pro | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/plugins/platforms/eglfs/eglfs-plugin.pro b/src/plugins/platforms/eglfs/eglfs-plugin.pro +index cf4863975a..ec229796e5 100644 +--- a/src/plugins/platforms/eglfs/eglfs-plugin.pro ++++ b/src/plugins/platforms/eglfs/eglfs-plugin.pro +@@ -2,6 +2,11 @@ TARGET = qeglfs + + QT += eglfsdeviceintegration-private + ++CONFIG += egl ++ ++# Avoid X11 header collision, use generic EGL native types ++DEFINES += QT_EGL_NO_X11 ++ + SOURCES += $$PWD/qeglfsmain.cpp + + OTHER_FILES += $$PWD/eglfs.json +-- +2.11.0 + diff --git a/bsp/buildroot/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch b/bsp/buildroot/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch new file mode 100644 index 00000000..148ced80 --- /dev/null +++ b/bsp/buildroot/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch @@ -0,0 +1,42 @@ +From fe8a9bacf781fcf290e04a08f2b8e37d881d58bb Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 27 Apr 2017 22:41:28 +0200 +Subject: [PATCH] examples: fix compile without gui module + +Fixes: + + Project ERROR: Could not find feature opengl. + +Signed-off-by: Peter Seiderer +--- + examples/gui/gui.pro | 2 +- + examples/widgets/widgets.pro | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro +index a4d960d3f5..b8080c2075 100644 +--- a/examples/gui/gui.pro ++++ b/examples/gui/gui.pro +@@ -6,5 +6,5 @@ CONFIG += no_docs_target + + SUBDIRS += analogclock + SUBDIRS += rasterwindow +-qtConfig(opengl): \ ++qtHaveModule(gui):qtConfig(opengl): \ + SUBDIRS += openglwindow +diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro +index 513ddc91f2..cef4936d32 100644 +--- a/examples/widgets/widgets.pro ++++ b/examples/widgets/widgets.pro +@@ -22,7 +22,7 @@ SUBDIRS = \ + tutorials \ + widgets + +-qtConfig(opengl): \ ++qtHaveModule(gui):qtConfig(opengl): \ + SUBDIRS += windowcontainer + + contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows +-- +2.11.0 + diff --git a/bsp/buildroot/package/qt5/qt5base/qt5base.mk b/bsp/buildroot/package/qt5/qt5base/qt5base.mk index 7a335736..10203489 100644 --- a/bsp/buildroot/package/qt5/qt5base/qt5base.mk +++ b/bsp/buildroot/package/qt5/qt5base/qt5base.mk @@ -200,6 +200,9 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFSDeviceIntegration +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFsKmsSupport +endif else QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglDeviceIntegration endif diff --git a/bsp/buildroot/package/qwt/qwt.mk b/bsp/buildroot/package/qwt/qwt.mk index d1bb5245..043bc3f3 100644 --- a/bsp/buildroot/package/qwt/qwt.mk +++ b/bsp/buildroot/package/qwt/qwt.mk @@ -41,6 +41,12 @@ else QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' endif +ifeq ($(BR2_STATIC_LIBS),y) +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' +else +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' +endif + define QWT_CONFIGURE_CMDS $(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri (cd $(@D); $(TARGET_MAKE_ENV) $(QWT_QMAKE)) diff --git a/bsp/buildroot/package/rabbitmq-c/rabbitmq-c.mk b/bsp/buildroot/package/rabbitmq-c/rabbitmq-c.mk index 1ca35ad0..eef09ec0 100644 --- a/bsp/buildroot/package/rabbitmq-c/rabbitmq-c.mk +++ b/bsp/buildroot/package/rabbitmq-c/rabbitmq-c.mk @@ -21,14 +21,20 @@ else ifeq ($(BR2_SHARED_LIBS),y) RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) +# CMake OpenSSL detection is buggy, and doesn't properly use +# pkg-config, so it fails when statically linking. See +# https://gitlab.kitware.com/cmake/cmake/issues/16885. +ifeq ($(BR2_PACKAGE_OPENSSL):$(BR2_STATIC_LIBS),y:) RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=ON RABBITMQ_C_DEPENDENCIES += openssl else RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=OFF endif -ifeq ($(BR2_PACKAGE_POPT), y) +# Popt is sometimes linked against libintl, but CMake doesn't know +# about that, and there's no way to tell manually CMake to link +# against an additional library. +ifeq ($(BR2_PACKAGE_POPT):$(BR2_STATIC_LIBS),y:) RABBITMQ_C_CONF_OPTS += -DBUILD_TOOLS=ON RABBITMQ_C_DEPENDENCIES += popt else diff --git a/bsp/buildroot/package/redis/redis.mk b/bsp/buildroot/package/redis/redis.mk index 8ab6e726..c16bd238 100644 --- a/bsp/buildroot/package/redis/redis.mk +++ b/bsp/buildroot/package/redis/redis.mk @@ -13,17 +13,22 @@ define REDIS_USERS redis -1 redis -1 * /var/lib/redis /bin/false - Redis Server endef -# Uses __atomic_fetch_add_4 +# Uses __atomic_fetch_add_4. Adding -latomic to LDFLAGS does not work, +# because LDFLAGS is used before the list of object files. We need to +# add -latomic to FINAL_LIBS to provide -latomic at the correct place +# in the linking command. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -REDIS_LIBATOMIC = -latomic +define REDIS_FIX_MAKEFILE + $(SED) 's/FINAL_LIBS=-lm/FINAL_LIBS=-lm -latomic/' $(@D)/src/Makefile +endef +REDIS_POST_PATCH_HOOKS = REDIS_FIX_MAKEFILE endif # Redis doesn't support DESTDIR (yet, see # https://github.com/antirez/redis/pull/609). We set PREFIX # instead. REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \ - LDFLAGS="$(TARGET_LDFLAGS) $(REDIS_LIBATOMIC)" \ - PREFIX=$(TARGET_DIR)/usr MALLOC=libc \ + PREFIX=$(TARGET_DIR)/usr MALLOC=libc define REDIS_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) diff --git a/bsp/buildroot/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/bsp/buildroot/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch new file mode 100644 index 00000000..130e5d77 --- /dev/null +++ b/bsp/buildroot/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch @@ -0,0 +1,231 @@ +From 093bf65c79af417cffa09d6475f58923540eebcc Mon Sep 17 00:00:00 2001 +From: Doran Moppert +Date: Thu, 11 May 2017 11:42:54 -0400 +Subject: [PATCH] rpcbind: pair all svc_getargs() calls with svc_freeargs() to + avoid memory leak + +This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed +at [1], [2], [3]. The last link suggests this issue is actually a bug +in rpcbind, which led me here. + +The leak caused by the reproducer at [4] appears to come from +rpcb_service_4(), in the case where svc_getargs() returns false and the +function had an early return, rather than passing through the cleanup +path at done:, as would otherwise occur. + +It also addresses a couple of other locations where the same fault seems +to exist, though I haven't been able to exercise those. I hope someone +more intimate with rpc(3) can confirm my understanding is correct, and +that I haven't introduced any new bugs. + +Without this patch, using the reproducer (and variants) repeatedly +against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof +rpcbind)/status reports VmSize increase of 976564 kB each call, and +VmRSS increase of around 260 kB every 33 calls - the specific numbers +are probably an artifact of my rhel/glibc version. With the patch, +there is a small (~50 kB) VmSize increase with the first message, but +thereafter both VmSize and VmRSS remain steady. + +[1]: http://seclists.org/oss-sec/2017/q2/209 +[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124 +[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html +[4]: https://github.com/guidovranken/rpcbomb/ + +Signed-off-by: Doran Moppert +Signed-off-by: Steve Dickson +(cherry picked from commit 7ea36eeece56b59f98e469934e4c20b4da043346) +[Peter: unconditionally include syslog.h for LOG_DEBUG] +Signed-off-by: Peter Korsgaard +--- + src/pmap_svc.c | 58 ++++++++++++++++++++++++++++++++++++++++++++---------- + src/rpcb_svc.c | 2 +- + src/rpcb_svc_4.c | 2 +- + src/rpcb_svc_com.c | 8 ++++++++ + 4 files changed, 58 insertions(+), 12 deletions(-) + +diff --git a/src/pmap_svc.c b/src/pmap_svc.c +index ad28b93..f730bed 100644 +--- a/src/pmap_svc.c ++++ b/src/pmap_svc.c +@@ -53,8 +53,8 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro"; + #include + #include + #include +-#ifdef RPCBIND_DEBUG + #include ++#ifdef RPCBIND_DEBUG + #include + #endif + #include "rpcbind.h" +@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + long ans; + uid_t uid; + char uidbuf[32]; ++ int rc = TRUE; + + /* + * Can't use getpwnam here. We might end up calling ourselves +@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + #ifdef RPCBIND_DEBUG + if (debugging) +@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return (FALSE); ++ rc = (FALSE); ++ goto done; + } + + rpcbreg.r_prog = reg.pm_prog; +@@ -258,7 +261,16 @@ done_change: + rpcbs_set(RPCBVERS_2_STAT, ans); + else + rpcbs_unset(RPCBVERS_2_STAT, ans); +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + /* ARGSUSED */ +@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + #ifdef RPCBIND_DEBUG + char *uaddr; + #endif ++ int rc = TRUE; + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + #ifdef RPCBIND_DEBUG +@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + pmap_ipprot2netid(reg.pm_prot) ?: "", + port ? udptrans : ""); + +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + /* ARGSUSED */ + static bool_t + pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + { ++ int rc = TRUE; ++ + if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, +@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + rpcbind_abort(); + } + } +- return (TRUE); ++ ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + int pmap_netid2ipprot(const char *netid) +diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c +index bd92201..0c22a9d 100644 +--- a/src/rpcb_svc.c ++++ b/src/rpcb_svc.c +@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c +index b673452..3e37b54 100644 +--- a/src/rpcb_svc_4.c ++++ b/src/rpcb_svc_4.c +@@ -220,7 +220,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index ff9ce6b..98ede61 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -931,6 +931,14 @@ error: + if (call_msg.rm_xid != 0) + (void) free_slot_by_xid(call_msg.rm_xid); + out: ++ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } + if (local_uaddr) + free(local_uaddr); + if (buf_alloc) +-- +2.11.0 + diff --git a/bsp/buildroot/package/rpi-userland/0006-host-apps-dtoverlay-don-t-install-script-in-random-l.patch b/bsp/buildroot/package/rpi-userland/0006-host-apps-dtoverlay-don-t-install-script-in-random-l.patch new file mode 100644 index 00000000..2900eb74 --- /dev/null +++ b/bsp/buildroot/package/rpi-userland/0006-host-apps-dtoverlay-don-t-install-script-in-random-l.patch @@ -0,0 +1,45 @@ +From a5a4e361c8116ca9228a896f672102c02be56bb7 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Tue, 7 Mar 2017 22:01:39 +0100 +Subject: [PATCH] host-apps/dtoverlay: don't install script in random location + +Currently, we add a custom command that installs the dtoverlay pre/post +scripts in ${CMAKE_BINARY_DIR}/../../bin + +However: + + - this points outside of the package directory.; it even points two + directories higher; + + - when doing cross-compilation, this is definitely not the place where + the /bin directory really is; + + - the scripts are already properly installed without this code. + +Remove that code, it serves no purpose and breaks for cross-compilation. + +Signed-off-by: "Yann E. MORIN" +--- + host_applications/linux/apps/dtoverlay/CMakeLists.txt | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/host_applications/linux/apps/dtoverlay/CMakeLists.txt b/host_applications/linux/apps/dtoverlay/CMakeLists.txt +index 9009200..dd48d83 100755 +--- a/host_applications/linux/apps/dtoverlay/CMakeLists.txt ++++ b/host_applications/linux/apps/dtoverlay/CMakeLists.txt +@@ -22,12 +22,4 @@ add_custom_command(TARGET dtoverlay POST_BUILD COMMAND ln;-sf;dtoverlay;dtparam) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin) + + set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post) +-foreach(_script ${DTOVERLAY_SCRIPTS}) +- add_custom_command( +- TARGET dtoverlay +- COMMAND ${CMAKE_COMMAND} +- -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${_script} +- ${CMAKE_BINARY_DIR}/../../bin/${_script} +- ) +-endforeach() + install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin) +-- +2.7.4 + diff --git a/bsp/buildroot/package/rpm/rpm.hash b/bsp/buildroot/package/rpm/rpm.hash index c9c4d659..fd77d33f 100644 --- a/bsp/buildroot/package/rpm/rpm.hash +++ b/bsp/buildroot/package/rpm/rpm.hash @@ -1,5 +1,5 @@ -# From http://rpm.org/wiki/Releases/4.13.0 -sha1 c6ce4f879ca6a75340921093105e5ef9d33381d3 rpm-4.13.0.tar.bz2 +# From http://rpm.org/wiki/Releases/4.13.0.1 +sha1 9566f95f38fcb214e439c552f378c2f64ba0aff9 rpm-4.13.0.1.tar.bz2 # Locally computed sha256 a3e5568d721737a24141737e6036bb39ba9dfbeaa03fa4a51cc7881a243e0c5d b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch sha256 7ab0e08e143bb2d43d5b0553ee22ea34da15a611c597860a6110745467d20fa8 c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch diff --git a/bsp/buildroot/package/rpm/rpm.mk b/bsp/buildroot/package/rpm/rpm.mk index 2e829d75..1c03f2ea 100644 --- a/bsp/buildroot/package/rpm/rpm.mk +++ b/bsp/buildroot/package/rpm/rpm.mk @@ -4,9 +4,10 @@ # ################################################################################ -RPM_VERSION = 4.13.0 +RPM_VERSION_MAJOR = 4.13 +RPM_VERSION = $(RPM_VERSION_MAJOR).0.1 RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2 -RPM_SITE = https://github.com/rpm-software-management/rpm/releases/download/rpm-$(RPM_VERSION)-release +RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib RPM_LICENSE = GPLv2 or LGPLv2 (library only) RPM_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/rtmpdump/rtmpdump.mk b/bsp/buildroot/package/rtmpdump/rtmpdump.mk index 2e3428f1..eb2d8107 100644 --- a/bsp/buildroot/package/rtmpdump/rtmpdump.mk +++ b/bsp/buildroot/package/rtmpdump/rtmpdump.mk @@ -4,7 +4,7 @@ # ################################################################################ -RTMPDUMP_VERSION = a107cef9b392616dff54fabfd37f985ee2190a6f +RTMPDUMP_VERSION = fa8646daeb19dfd12c181f7d19de708d623704c0 RTMPDUMP_SITE = git://git.ffmpeg.org/rtmpdump RTMPDUMP_INSTALL_STAGING = YES # Note that rtmpdump is GPLv2 but librtmp has its own license and since we only diff --git a/bsp/buildroot/package/samba4/samba4.hash b/bsp/buildroot/package/samba4/samba4.hash index 4fec55dd..a16d8347 100644 --- a/bsp/buildroot/package/samba4/samba4.hash +++ b/bsp/buildroot/package/samba4/samba4.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 bff02762b3e4ee030f02266c6e24a0b888248b387246219b7fbe3e1758ef2184 samba-4.5.5.tar.gz +sha256 7cb753f5f6d5527ef40d4c1f47dacafb7c876cb304b4906ccb390c6a18477714 samba-4.5.10.tar.gz diff --git a/bsp/buildroot/package/samba4/samba4.mk b/bsp/buildroot/package/samba4/samba4.mk index f64b684b..0ad4b64f 100644 --- a/bsp/buildroot/package/samba4/samba4.mk +++ b/bsp/buildroot/package/samba4/samba4.mk @@ -4,7 +4,7 @@ # ################################################################################ -SAMBA4_VERSION = 4.5.5 +SAMBA4_VERSION = 4.5.10 SAMBA4_SITE = https://download.samba.org/pub/samba/stable SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz SAMBA4_INSTALL_STAGING = YES diff --git a/bsp/buildroot/package/skalibs/0001-No-runtime-tests-for-endianness.patch b/bsp/buildroot/package/skalibs/0001-No-runtime-tests-for-endianness.patch index 4390d449..5f763c42 100644 --- a/bsp/buildroot/package/skalibs/0001-No-runtime-tests-for-endianness.patch +++ b/bsp/buildroot/package/skalibs/0001-No-runtime-tests-for-endianness.patch @@ -1,6 +1,6 @@ -From 1e6f0b094c6ce6454be572704b866d2ce0962e59 Mon Sep 17 00:00:00 2001 +From 6754b208e7ec3bd1d4265db18fa4c0e7961a77bf Mon Sep 17 00:00:00 2001 From: Eric Le Bihan -Date: Sun, 4 Dec 2016 19:10:40 +0100 +Date: Mon, 20 Mar 2017 20:05:00 +0100 Subject: [PATCH] No runtime tests for endianness Replace build and execution of runtime test programs for determining @@ -12,8 +12,8 @@ Signed-off-by: Eric Le Bihan --- configure | 15 +++++++++++---- src/sysdeps/trybigendian.c | 16 ++++++++++++++++ - src/sysdeps/trylittleendian.c | 16 ++++++++++++++++ - 3 files changed, 43 insertions(+), 4 deletions(-) + src/sysdeps/trylittleendian.c | 19 +++++++++++++++++++ + 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 src/sysdeps/trybigendian.c create mode 100644 src/sysdeps/trylittleendian.c @@ -70,16 +70,19 @@ index 0000000..d857572 +} diff --git a/src/sysdeps/trylittleendian.c b/src/sysdeps/trylittleendian.c new file mode 100644 -index 0000000..eba065a +index 0000000..68b93c1 --- /dev/null +++ b/src/sysdeps/trylittleendian.c -@@ -0,0 +1,16 @@ +@@ -0,0 +1,19 @@ +#if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN) || \ + defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \ + defined(__LITTLE_ENDIAN) || \ + defined(__ARMEL__) || \ + defined(__THUMBEL__) || \ + defined(__AARCH64EL__) || \ ++ defined(__i386) || defined(__i386__) || \ ++ defined(__amd64) || defined(__amd64__) || \ ++ defined(__x86_64) || defined(__x86_64__) || \ + defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) +#define YEAH +#else @@ -91,5 +94,5 @@ index 0000000..eba065a + return 0; +} -- -2.5.5 +2.1.4 diff --git a/bsp/buildroot/package/skeleton/skeleton.mk b/bsp/buildroot/package/skeleton/skeleton.mk index 1000161c..99409443 100644 --- a/bsp/buildroot/package/skeleton/skeleton.mk +++ b/bsp/buildroot/package/skeleton/skeleton.mk @@ -203,10 +203,12 @@ define SKELETON_BIN_SH rm -f $(TARGET_DIR)/bin/sh endef else +ifneq ($(SKELETON_TARGET_GENERIC_BIN_SH),) define SKELETON_BIN_SH ln -sf $(SKELETON_TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh endef endif +endif TARGET_FINALIZE_HOOKS += SKELETON_BIN_SH ifeq ($(BR2_TARGET_GENERIC_GETTY),y) diff --git a/bsp/buildroot/package/slang/slang.mk b/bsp/buildroot/package/slang/slang.mk index 9078bf29..e6abdeeb 100644 --- a/bsp/buildroot/package/slang/slang.mk +++ b/bsp/buildroot/package/slang/slang.mk @@ -40,7 +40,7 @@ endif ifeq ($(BR2_PACKAGE_NCURSES),y) SLANG_DEPENDENCIES += ncurses -SLANG_CONF_ENV += ac_cv_path_nc5config=$(STAGING_DIR)/usr/bin/ncurses5-config +SLANG_CONF_ENV += ac_cv_path_nc5config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) else SLANG_CONF_OPTS += ac_cv_path_nc5config=no endif @@ -49,7 +49,7 @@ ifeq ($(BR2_PACKAGE_READLINE),y) SLANG_CONF_OPTS += --with-readline=gnu SLANG_DEPENDENCIES += readline ifeq ($(BR2_STATIC_LIBS),y) -SLANG_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/ncurses5-config --libs`" +SLANG_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) --libs`" endif endif diff --git a/bsp/buildroot/package/sngrep/0001-src-Makefile.am-don-t-use-VPATH.patch b/bsp/buildroot/package/sngrep/0001-src-Makefile.am-don-t-use-VPATH.patch new file mode 100644 index 00000000..3d982034 --- /dev/null +++ b/bsp/buildroot/package/sngrep/0001-src-Makefile.am-don-t-use-VPATH.patch @@ -0,0 +1,43 @@ +From b6dcae8ec4334e2436cfa19a8052c3473f57a586 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 4 Mar 2017 15:02:43 +0100 +Subject: [PATCH 1/2] src/Makefile.am: don't use VPATH + +VPATH is a mechanism used to allow out-of-tree build, not to use source +code from a different directory. For this purpose, one should simply use +the "subdir-objects" AUTOMAKE_OPTIONS, and reference the source code of +the sub-directory in the _SOURCES variable. + +Signed-off-by: Thomas Petazzoni +Upstream-status: https://github.com/irontec/sngrep/pull/176 +--- + src/Makefile.am | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 931ee06..961f4a0 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,5 +1,5 @@ ++AUTOMAKE_OPTIONS=subdir-objects + bin_PROGRAMS=sngrep +-VPATH=curses + sngrep_SOURCES=capture.c + if USE_EEP + sngrep_SOURCES+=capture_eep.c +@@ -12,8 +12,8 @@ sngrep_SOURCES+=capture_openssl.c + endif + sngrep_SOURCES+=address.c packet.c sip.c sip_call.c sip_msg.c sip_attr.c main.c + sngrep_SOURCES+=option.c group.c filter.c keybinding.c media.c setting.c rtp.c +-sngrep_SOURCES+=util.c hash.c vector.c ui_panel.c scrollbar.c +-sngrep_SOURCES+=ui_manager.c ui_call_list.c ui_call_flow.c ui_call_raw.c +-sngrep_SOURCES+=ui_stats.c ui_filter.c ui_save.c ui_msg_diff.c +-sngrep_SOURCES+=ui_column_select.c ui_settings.c ++sngrep_SOURCES+=util.c hash.c vector.c curses/ui_panel.c curses/scrollbar.c ++sngrep_SOURCES+=curses/ui_manager.c curses/ui_call_list.c curses/ui_call_flow.c curses/ui_call_raw.c ++sngrep_SOURCES+=curses/ui_stats.c curses/ui_filter.c curses/ui_save.c curses/ui_msg_diff.c ++sngrep_SOURCES+=curses/ui_column_select.c curses/ui_settings.c + +-- +2.7.4 + diff --git a/bsp/buildroot/package/sngrep/0002-configure.ac-switch-to-pkg-config-to-find-openssl.patch b/bsp/buildroot/package/sngrep/0002-configure.ac-switch-to-pkg-config-to-find-openssl.patch new file mode 100644 index 00000000..b51581f5 --- /dev/null +++ b/bsp/buildroot/package/sngrep/0002-configure.ac-switch-to-pkg-config-to-find-openssl.patch @@ -0,0 +1,75 @@ +From 22b08ab1a45eb3773b3c90dc37a31a7574520daa Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 4 Mar 2017 14:56:53 +0100 +Subject: [PATCH 2/2] configure.ac: switch to pkg-config to find openssl + +Using AC_CHECK_LIB() doesn't work properly for static linking, because +it doesn't return information on transitive dependencies of +libraries. For example, if library A internally uses library B, then +with dynamic linking, doing -lA is sufficient. However, with static +linking, one must do -lA -lB, and AC_CHECK_LIB() will only give the -lA +information. This for example causes a build failure when building +sngrep statically with openssl enabled: + +checking for SSL_new in -lssl... no +configure: error: You need to have libssl installed to compile sngrep + +due to undefined symbols in the OpenSSL library. + +The proper solution for this is to discover the library using +pkg-config, because pkg-config properly returns the list of necessary +libraries, as it understands the concept of "list of libraries needed +when dynamic linking" and "list of libraries needed for static linking". + +Signed-off-by: Thomas Petazzoni +Upstream-status: https://github.com/irontec/sngrep/pull/176 +--- + configure.ac | 9 +-------- + src/Makefile.am | 4 ++++ + 2 files changed, 5 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 42e00e9..9f8e6d2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,14 +129,7 @@ AS_IF([test "x$WITH_OPENSSL" == "xyes"], [ + AS_IF([test "x$WITH_GNUTLS" == "xyes"], [ + AC_MSG_ERROR([ GnuTLS and OpenSSL can not be enabled at the same time ]) + ], []) +- +- AC_CHECK_LIB([ssl], [SSL_new], [], [ +- AC_MSG_ERROR([ You need to have libssl installed to compile sngrep]) +- ]) +- +- AC_CHECK_LIB([crypto], [EVP_get_cipherbyname], [], [ +- AC_MSG_ERROR([ You need to have libcrypto installed to compile sngrep]) +- ]) ++ PKG_CHECK_MODULES([SSL], [libssl libcrypto]) + AC_DEFINE([WITH_OPENSSL],[],[Compile With Openssl compatibility]) + ], []) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 961f4a0..3a471b7 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,6 +1,8 @@ + AUTOMAKE_OPTIONS=subdir-objects + bin_PROGRAMS=sngrep + sngrep_SOURCES=capture.c ++sngrep_CFLAGS= ++sngrep_LDADD= + if USE_EEP + sngrep_SOURCES+=capture_eep.c + endif +@@ -9,6 +11,8 @@ sngrep_SOURCES+=capture_gnutls.c + endif + if WITH_OPENSSL + sngrep_SOURCES+=capture_openssl.c ++sngrep_CFLAGS+=$(SSL_CFLAGS) ++sngrep_LDADD+=$(SSL_LIBS) + endif + sngrep_SOURCES+=address.c packet.c sip.c sip_call.c sip_msg.c sip_attr.c main.c + sngrep_SOURCES+=option.c group.c filter.c keybinding.c media.c setting.c rtp.c +-- +2.7.4 + diff --git a/bsp/buildroot/package/sngrep/sngrep.mk b/bsp/buildroot/package/sngrep/sngrep.mk index b82d8cef..1e0e0514 100644 --- a/bsp/buildroot/package/sngrep/sngrep.mk +++ b/bsp/buildroot/package/sngrep/sngrep.mk @@ -9,7 +9,7 @@ SNGREP_SITE = $(call github,irontec,sngrep,$(SNGREP_VERSION)) SNGREP_LICENSE = GPLv3+ SNGREP_LICENSE_FILES = LICENSE SNGREP_AUTORECONF = YES -SNGREP_DEPENDENCIES = libpcap ncurses +SNGREP_DEPENDENCIES = libpcap ncurses host-pkgconf SNGREP_CONF_ENV += \ $(if $(BR2_STATIC_LIBS),LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --libs`") diff --git a/bsp/buildroot/package/squashfs/squashfs.hash b/bsp/buildroot/package/squashfs/squashfs.hash index eb456be3..74fdb443 100644 --- a/bsp/buildroot/package/squashfs/squashfs.hash +++ b/bsp/buildroot/package/squashfs/squashfs.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 e807202ab4dcfeea214df49d3a728b9a85644a7e7262fc6fcd875a0def99d4ed squashfs-9c1db6d13a51a2e009f0027ef336ce03624eac0d.tar.gz +sha256 2c49392816615b73bf5d6cdce9776cb66a01f5a1494b1d9af580667e32bab001 squashfs-3de1687d7432ea9b302c2db9521996f506c140a3.tar.gz diff --git a/bsp/buildroot/package/strongswan/0001-af_alg-fix-crypt-definition-conflict.patch b/bsp/buildroot/package/strongswan/0001-af_alg-fix-crypt-definition-conflict.patch new file mode 100644 index 00000000..442e53eb --- /dev/null +++ b/bsp/buildroot/package/strongswan/0001-af_alg-fix-crypt-definition-conflict.patch @@ -0,0 +1,55 @@ +From 0b906cb025a506be1b73e5b485179585d1a90be2 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 11 May 2017 14:04:47 +0300 +Subject: [PATCH] af_alg: fix crypt() definition conflict + +Rename the crypt() method to avoid conflict with POSIX crypt(). Fixes the +following build failure with musl libc: + +In file included from ../../../../src/libstrongswan/utils/utils.h:53:0, + from ../../../../src/libstrongswan/library.h:101, + from af_alg_ops.h:24, + from af_alg_ops.c:16: +af_alg_ops.c:110:22: error: conflicting types for 'crypt' + METHOD(af_alg_ops_t, crypt, bool, + ^ +../../../../src/libstrongswan/utils/utils/object.h:99:13: note: in definition of macro 'METHOD' + static ret name(union {iface *_public; this;} \ + ^ +In file included from af_alg_ops.c:18:0: +.../host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/unistd.h:144:7: note: previous declaration of 'crypt' was here + char *crypt(const char *, const char *); + ^ + +Signed-off-by: Baruch Siach +--- +Upstream status: https://github.com/strongswan/strongswan/pull/72 + + src/libstrongswan/plugins/af_alg/af_alg_ops.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libstrongswan/plugins/af_alg/af_alg_ops.c b/src/libstrongswan/plugins/af_alg/af_alg_ops.c +index 331d1e8010aa..452cd1ac30c9 100644 +--- a/src/libstrongswan/plugins/af_alg/af_alg_ops.c ++++ b/src/libstrongswan/plugins/af_alg/af_alg_ops.c +@@ -107,7 +107,7 @@ METHOD(af_alg_ops_t, hash, bool, + return TRUE; + } + +-METHOD(af_alg_ops_t, crypt, bool, ++METHOD(af_alg_ops_t, crypt_, bool, + private_af_alg_ops_t *this, u_int32_t type, chunk_t iv, chunk_t data, + char *out) + { +@@ -224,7 +224,7 @@ af_alg_ops_t *af_alg_ops_create(char *type, char *alg) + .public = { + .hash = _hash, + .reset = _reset, +- .crypt = _crypt, ++ .crypt = _crypt_, + .set_key = _set_key, + .destroy = _destroy, + }, +-- +2.11.0 + diff --git a/bsp/buildroot/package/strongswan/strongswan.hash b/bsp/buildroot/package/strongswan/strongswan.hash index 97fb1998..cbc4e385 100644 --- a/bsp/buildroot/package/strongswan/strongswan.hash +++ b/bsp/buildroot/package/strongswan/strongswan.hash @@ -2,3 +2,6 @@ md5 9d7c77b0da9b69f859624897e5e9ebbf strongswan-5.4.0.tar.bz2 # Calculated based on the hash above sha256 f8288faaea6a9cd8a7d413c0b76b7922be5da3dfcd01fd05cb30d2c55d3bbe89 strongswan-5.4.0.tar.bz2 +# Locally calculated +sha256 f5ba7f46cf7ae81dd81bc86f9e4cfa0c5c7c6987149b3bc9c0b8bf08598a1063 strongswan-4.4.0-5.5.2_gmp_mpz_powm_sec.patch +sha256 03db8c7a4133e877e8992e155c046dd27ec4810d50f239abf55595f0280caf31 strongswan-5.0.0-5.5.2_asn1_choice.patch diff --git a/bsp/buildroot/package/strongswan/strongswan.mk b/bsp/buildroot/package/strongswan/strongswan.mk index 36b51485..99862fd2 100644 --- a/bsp/buildroot/package/strongswan/strongswan.mk +++ b/bsp/buildroot/package/strongswan/strongswan.mk @@ -7,6 +7,9 @@ STRONGSWAN_VERSION = 5.4.0 STRONGSWAN_SOURCE = strongswan-$(STRONGSWAN_VERSION).tar.bz2 STRONGSWAN_SITE = http://download.strongswan.org +STRONGSWAN_PATCH = \ + $(STRONGSWAN_SITE)/patches/21_gmp_mpz_powm_sec_patch/strongswan-4.4.0-5.5.2_gmp_mpz_powm_sec.patch \ + $(STRONGSWAN_SITE)/patches/22_asn1_choice_patch/strongswan-5.0.0-5.5.2_asn1_choice.patch STRONGSWAN_LICENSE = GPLv2+ STRONGSWAN_LICENSE_FILES = COPYING LICENSE STRONGSWAN_DEPENDENCIES = host-pkgconf diff --git a/bsp/buildroot/package/sudo/0001-fix-CVE-2017-1000367.patch b/bsp/buildroot/package/sudo/0001-fix-CVE-2017-1000367.patch new file mode 100644 index 00000000..6e44399c --- /dev/null +++ b/bsp/buildroot/package/sudo/0001-fix-CVE-2017-1000367.patch @@ -0,0 +1,264 @@ +Downloaded from upstream: https://www.sudo.ws/repos/sudo/raw-rev/b5460cbbb11b + +# HG changeset patch +# User Todd C. Miller +# Date 1496089973 21600 +# Node ID b5460cbbb11bbf9d92ffcc6798a686cf4125efd3 +# Parent c303e6eecc7841e2f891d70613e80fcf27fa6e86 +Fix for CVE-2017-1000367, parsing of /proc/pid/stat on Linux when +the process name contains spaces. Since the user has control over +the command name this could be used by a user with sudo access to +overwrite an arbitrary file. +Thanks to Qualys for investigating and reporting this bug. + +Also stop performing a breadth-first traversal of /dev when looking +for the device. Only the directories specified in search_devs[] +are checked. + +Signed-off-by: Peter Korsgaard +diff -r c303e6eecc78 -r b5460cbbb11b src/ttyname.c +--- a/src/ttyname.c Tue May 23 13:26:54 2017 -0600 ++++ b/src/ttyname.c Mon May 29 14:32:53 2017 -0600 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012-2016 Todd C. Miller ++ * Copyright (c) 2012-2017 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above +@@ -145,20 +145,22 @@ + } + #elif defined(HAVE_STRUCT_PSINFO_PR_TTYDEV) || defined(HAVE_PSTAT_GETPROC) || defined(__linux__) + /* +- * Devices to search before doing a breadth-first scan. ++ * Device nodes and directories to search before searching all of /dev + */ + static char *search_devs[] = { + "/dev/console", +- "/dev/wscons", +- "/dev/pts/", +- "/dev/vt/", +- "/dev/term/", +- "/dev/zcons/", ++ "/dev/pts/", /* POSIX pty */ ++ "/dev/vt/", /* Solaris virtual console */ ++ "/dev/term/", /* Solaris serial ports */ ++ "/dev/zcons/", /* Solaris zone console */ ++ "/dev/pty/", /* HP-UX old-style pty */ + NULL + }; + ++/* ++ * Device nodes to ignore when searching all of /dev ++ */ + static char *ignore_devs[] = { +- "/dev/fd/", + "/dev/stdin", + "/dev/stdout", + "/dev/stderr", +@@ -166,16 +168,18 @@ + }; + + /* +- * Do a breadth-first scan of dir looking for the specified device. ++ * Do a scan of a directory looking for the specified device. ++ * Does not descend into subdirectories. + * Returns name on success and NULL on failure, setting errno. + */ + static char * +-sudo_ttyname_scan(const char *dir, dev_t rdev, bool builtin, char *name, size_t namelen) ++sudo_ttyname_scan(const char *dir, dev_t rdev, char *name, size_t namelen) + { +- size_t sdlen, num_subdirs = 0, max_subdirs = 0; +- char pathbuf[PATH_MAX], **subdirs = NULL; ++ size_t sdlen; ++ char pathbuf[PATH_MAX]; + char *ret = NULL; + struct dirent *dp; ++ struct stat sb; + unsigned int i; + DIR *d = NULL; + debug_decl(sudo_ttyname_scan, SUDO_DEBUG_UTIL) +@@ -187,6 +191,18 @@ + if ((d = opendir(dir)) == NULL) + goto done; + ++ if (fstat(dirfd(d), &sb) == -1) { ++ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO, ++ "unable to fstat %s", dir); ++ goto done; ++ } ++ if ((sb.st_mode & S_IWOTH) != 0) { ++ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO, ++ "ignoring world-writable directory %s", dir); ++ errno = ENOENT; ++ goto done; ++ } ++ + sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, + "scanning for dev %u in %s", (unsigned int)rdev, dir); + +@@ -224,18 +240,6 @@ + } + if (ignore_devs[i] != NULL) + continue; +- if (!builtin) { +- /* Skip entries in search_devs; we already checked them. */ +- for (i = 0; search_devs[i] != NULL; i++) { +- len = strlen(search_devs[i]); +- if (search_devs[i][len - 1] == '/') +- len--; +- if (d_len == len && strncmp(pathbuf, search_devs[i], len) == 0) +- break; +- } +- if (search_devs[i] != NULL) +- continue; +- } + # if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(DTTOIF) + /* + * Avoid excessive stat() calls by checking dp->d_type. +@@ -248,39 +252,14 @@ + if (stat(pathbuf, &sb) == -1) + continue; + break; +- case DT_DIR: +- /* Directory, no need to stat() it. */ +- sb.st_mode = DTTOIF(dp->d_type); +- sb.st_rdev = 0; /* quiet ccc-analyzer false positive */ +- break; + default: +- /* Not a character device, link or directory, skip it. */ ++ /* Not a character device or link, skip it. */ + continue; + } + # else + if (stat(pathbuf, &sb) == -1) + continue; + # endif +- if (S_ISDIR(sb.st_mode)) { +- if (!builtin) { +- /* Add to list of subdirs to search. */ +- if (num_subdirs + 1 > max_subdirs) { +- char **new_subdirs; +- +- new_subdirs = reallocarray(subdirs, max_subdirs + 64, +- sizeof(char *)); +- if (new_subdirs == NULL) +- goto done; +- subdirs = new_subdirs; +- max_subdirs += 64; +- } +- subdirs[num_subdirs] = strdup(pathbuf); +- if (subdirs[num_subdirs] == NULL) +- goto done; +- num_subdirs++; +- } +- continue; +- } + if (S_ISCHR(sb.st_mode) && sb.st_rdev == rdev) { + sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, + "resolved dev %u as %s", (unsigned int)rdev, pathbuf); +@@ -296,16 +275,9 @@ + } + } + +- /* Search subdirs if we didn't find it in the root level. */ +- for (i = 0; ret == NULL && i < num_subdirs; i++) +- ret = sudo_ttyname_scan(subdirs[i], rdev, false, name, namelen); +- + done: + if (d != NULL) + closedir(d); +- for (i = 0; i < num_subdirs; i++) +- free(subdirs[i]); +- free(subdirs); + debug_return_str(ret); + } + +@@ -324,7 +296,7 @@ + debug_decl(sudo_ttyname_dev, SUDO_DEBUG_UTIL) + + /* +- * First check search_devs for common tty devices. ++ * First check search_devs[] for common tty devices. + */ + for (sd = search_devs; (devname = *sd) != NULL; sd++) { + len = strlen(devname); +@@ -349,7 +321,7 @@ + "comparing dev %u to %s: no", (unsigned int)rdev, buf); + } else { + /* Traverse directory */ +- ret = sudo_ttyname_scan(devname, rdev, true, name, namelen); ++ ret = sudo_ttyname_scan(devname, rdev, name, namelen); + if (ret != NULL || errno == ENOMEM) + goto done; + } +@@ -367,9 +339,9 @@ + } + + /* +- * Not found? Do a breadth-first traversal of /dev/. ++ * Not found? Check all device nodes in /dev. + */ +- ret = sudo_ttyname_scan(_PATH_DEV, rdev, false, name, namelen); ++ ret = sudo_ttyname_scan(_PATH_DEV, rdev, name, namelen); + + done: + debug_return_str(ret); +@@ -493,28 +465,35 @@ + len = getline(&line, &linesize, fp); + fclose(fp); + if (len != -1) { +- /* Field 7 is the tty dev (0 if no tty) */ +- char *cp = line; +- char *ep = line; +- const char *errstr; +- int field = 0; +- while (*++ep != '\0') { +- if (*ep == ' ') { +- *ep = '\0'; +- if (++field == 7) { +- dev_t tdev = strtonum(cp, INT_MIN, INT_MAX, &errstr); +- if (errstr) { +- sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO, +- "%s: tty device %s: %s", path, cp, errstr); ++ /* ++ * Field 7 is the tty dev (0 if no tty). ++ * Since the process name at field 2 "(comm)" may include spaces, ++ * start at the last ')' found. ++ */ ++ char *cp = strrchr(line, ')'); ++ if (cp != NULL) { ++ char *ep = cp; ++ const char *errstr; ++ int field = 1; ++ ++ while (*++ep != '\0') { ++ if (*ep == ' ') { ++ *ep = '\0'; ++ if (++field == 7) { ++ dev_t tdev = strtonum(cp, INT_MIN, INT_MAX, &errstr); ++ if (errstr) { ++ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO, ++ "%s: tty device %s: %s", path, cp, errstr); ++ } ++ if (tdev > 0) { ++ errno = serrno; ++ ret = sudo_ttyname_dev(tdev, name, namelen); ++ goto done; ++ } ++ break; + } +- if (tdev > 0) { +- errno = serrno; +- ret = sudo_ttyname_dev(tdev, name, namelen); +- goto done; +- } +- break; ++ cp = ep + 1; + } +- cp = ep + 1; + } + } + } + diff --git a/bsp/buildroot/package/sudo/sudo.mk b/bsp/buildroot/package/sudo/sudo.mk index bb0a2b5e..7f0b1325 100644 --- a/bsp/buildroot/package/sudo/sudo.mk +++ b/bsp/buildroot/package/sudo/sudo.mk @@ -40,6 +40,13 @@ endif ifeq ($(BR2_PACKAGE_OPENLDAP),y) SUDO_DEPENDENCIES += openldap SUDO_CONF_OPTS += --with-ldap +# If we are building sudo statically and openldap was linked with openssl, then +# when we link sudo with openldap we need to specify the openssl libs, otherwise +# it will fail with "undefined reference" errors. +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy) +SUDO_DEPENDENCIES += host-pkgconf +SUDO_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" +endif else SUDO_CONF_OPTS += --without-ldap endif diff --git a/bsp/buildroot/package/syslog-ng/syslog-ng.conf b/bsp/buildroot/package/syslog-ng/syslog-ng.conf index 0b4a860c..a3384eeb 100644 --- a/bsp/buildroot/package/syslog-ng/syslog-ng.conf +++ b/bsp/buildroot/package/syslog-ng/syslog-ng.conf @@ -1,4 +1,4 @@ -@version: 3.7 +@version: 3.9 source s_sys { file("/proc/kmsg" program_override("kernel")); diff --git a/bsp/buildroot/package/systemd/Config.in b/bsp/buildroot/package/systemd/Config.in index aaed7dc0..ac8175c3 100644 --- a/bsp/buildroot/package/systemd/Config.in +++ b/bsp/buildroot/package/systemd/Config.in @@ -22,6 +22,7 @@ menuconfig BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_UTIL_LINUX_BINARIES select BR2_PACKAGE_UTIL_LINUX_MOUNT select BR2_PACKAGE_UTIL_LINUX_NOLOGIN + select BR2_PACKAGE_UTIL_LINUX_FSCK select BR2_PACKAGE_KMOD select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools select BR2_PACKAGE_KMOD_TOOLS @@ -61,6 +62,11 @@ menuconfig BR2_PACKAGE_SYSTEMD - libgcrypt package will add support for journal sealing and DNSSEC verification in resolved. + Notice that systemd selects the fsck wrapper from util-linux + but no particular fsck. is selected. You must choose + the apropriate ones (e.g. e2fsck, from the e2fsprogs package) + according to the system configuration. + http://freedesktop.org/wiki/Software/systemd if BR2_PACKAGE_SYSTEMD diff --git a/bsp/buildroot/package/taglib/Config.in b/bsp/buildroot/package/taglib/Config.in index 6521d48c..a95f332a 100644 --- a/bsp/buildroot/package/taglib/Config.in +++ b/bsp/buildroot/package/taglib/Config.in @@ -8,7 +8,7 @@ config BR2_PACKAGE_TAGLIB and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack and TrueAudio files. - http://taglib.github.com + http://taglib.org/ if BR2_PACKAGE_TAGLIB diff --git a/bsp/buildroot/package/taglib/taglib.mk b/bsp/buildroot/package/taglib/taglib.mk index f47c4ba4..58bb889f 100644 --- a/bsp/buildroot/package/taglib/taglib.mk +++ b/bsp/buildroot/package/taglib/taglib.mk @@ -7,7 +7,7 @@ TAGLIB_VERSION = 1.11.1 TAGLIB_SITE = http://taglib.github.io/releases TAGLIB_INSTALL_STAGING = YES -TAGLIB_LICENSE = LGPLv2.1, MPL +TAGLIB_LICENSE = LGPLv2.1 or MPL-1.1 TAGLIB_LICENSE_FILES = COPYING.LGPL COPYING.MPL ifeq ($(BR2_PACKAGE_ZLIB),y) diff --git a/bsp/buildroot/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch b/bsp/buildroot/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch new file mode 100644 index 00000000..233b6d95 --- /dev/null +++ b/bsp/buildroot/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch @@ -0,0 +1,44 @@ +From d689d14dbcd768c028eab2fb378d849e543dcfe9 Mon Sep 17 00:00:00 2001 +From: Fred Klassen +Date: Sun, 26 Feb 2017 20:45:59 -0800 +Subject: [PATCH] #278 fail if capture has a packet that is too large (#286) + +* #278 fail if capture has a packet that is too large + +[baruch: remove the CHANGELOG update] +Signed-off-by: Baruch Siach +--- +Upstream status: upstream commit d689d14db + +diff --git a/src/tcpcapinfo.c b/src/tcpcapinfo.c +index 775f1625b00f..96928820fe94 100644 +--- a/src/tcpcapinfo.c ++++ b/src/tcpcapinfo.c +@@ -281,6 +281,15 @@ main(int argc, char *argv[]) + caplen = pcap_ph.caplen; + } + ++ if (caplentoobig) { ++ printf("\n\nCapture file appears to be damaged or corrupt.\n" ++ "Contains packet of size %u, bigger than snap length %u\n", ++ caplen, pcap_fh.snaplen); ++ ++ close(fd); ++ break; ++ } ++ + /* check to make sure timestamps don't go backwards */ + if (last_sec > 0 && last_usec > 0) { + if ((pcap_ph.ts.tv_sec == last_sec) ? +@@ -306,7 +315,7 @@ main(int argc, char *argv[]) + } + + close(fd); +- continue; ++ break; + } + + /* print the frame checksum */ +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0001-libtiff-tif_read.c-libtiff-tiffiop.h-fix-uint32-over.patch b/bsp/buildroot/package/tiff/0001-libtiff-tif_read.c-libtiff-tiffiop.h-fix-uint32-over.patch new file mode 100644 index 00000000..9df4577e --- /dev/null +++ b/bsp/buildroot/package/tiff/0001-libtiff-tif_read.c-libtiff-tiffiop.h-fix-uint32-over.patch @@ -0,0 +1,46 @@ +From 438274f938e046d33cb0e1230b41da32ffe223e1 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Fri, 2 Dec 2016 21:56:56 +0000 +Subject: [PATCH] * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow + in TIFFReadEncodedStrip() that caused an integer division by zero. Reported + by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2596 + +Fixes CVE-2016-10266 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_read.c | 2 +- + libtiff/tiffiop.h | 4 ++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c +index c26c55f4..52bbf507 100644 +--- a/libtiff/tif_read.c ++++ b/libtiff/tif_read.c +@@ -346,7 +346,7 @@ TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) + rowsperstrip=td->td_rowsperstrip; + if (rowsperstrip>td->td_imagelength) + rowsperstrip=td->td_imagelength; +- stripsperplane=((td->td_imagelength+rowsperstrip-1)/rowsperstrip); ++ stripsperplane= TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); + stripinplane=(strip%stripsperplane); + plane=(uint16)(strip/stripsperplane); + rows=td->td_imagelength-stripinplane*rowsperstrip; +diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h +index ffbb647b..cb59460a 100644 +--- a/libtiff/tiffiop.h ++++ b/libtiff/tiffiop.h +@@ -250,6 +250,10 @@ struct tiff { + #define TIFFhowmany_32(x, y) (((uint32)x < (0xffffffff - (uint32)(y-1))) ? \ + ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \ + 0U) ++/* Variant of TIFFhowmany_32() that doesn't return 0 if x close to MAXUINT. */ ++/* Caution: TIFFhowmany_32_maxuint_compat(x,y)*y might overflow */ ++#define TIFFhowmany_32_maxuint_compat(x, y) \ ++ (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0)) + #define TIFFhowmany8_32(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) + #define TIFFroundup_32(x, y) (TIFFhowmany_32(x,y)*(y)) + #define TIFFhowmany_64(x, y) ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y))) +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0002-libtiff-tif_ojpeg.c-make-OJPEGDecode-early-exit-in-c.patch b/bsp/buildroot/package/tiff/0002-libtiff-tif_ojpeg.c-make-OJPEGDecode-early-exit-in-c.patch new file mode 100644 index 00000000..d99b9007 --- /dev/null +++ b/bsp/buildroot/package/tiff/0002-libtiff-tif_ojpeg.c-make-OJPEGDecode-early-exit-in-c.patch @@ -0,0 +1,53 @@ +From 43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec Mon Sep 17 00:00:00 2001 +From: erouault +Date: Sat, 3 Dec 2016 11:15:18 +0000 +Subject: [PATCH] * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case + of failure in OJPEGPreDecode(). This will avoid a divide by zero, and + potential other issues. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2611 + +Fixes CVE-2016-10267 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_ojpeg.c | 8 ++++++++ + 1 files changed, 15 insertions(+) + +diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c +index 1ccc3f9b..f19e8fd0 100644 +--- a/libtiff/tif_ojpeg.c ++++ b/libtiff/tif_ojpeg.c +@@ -244,6 +244,7 @@ typedef enum { + + typedef struct { + TIFF* tif; ++ int decoder_ok; + #ifndef LIBJPEG_ENCAP_EXTERNAL + JMP_BUF exit_jmpbuf; + #endif +@@ -722,6 +723,7 @@ OJPEGPreDecode(TIFF* tif, uint16 s) + } + sp->write_curstrile++; + } ++ sp->decoder_ok = 1; + return(1); + } + +@@ -784,8 +786,14 @@ OJPEGPreDecodeSkipScanlines(TIFF* tif) + static int + OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) + { ++ static const char module[]="OJPEGDecode"; + OJPEGState* sp=(OJPEGState*)tif->tif_data; + (void)s; ++ if( !sp->decoder_ok ) ++ { ++ TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized"); ++ return 0; ++ } + if (sp->libjpeg_jpeg_query_style==0) + { + if (OJPEGDecodeRaw(tif,buf,cc)==0) +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0003-libtiff-tif_pixarlog.c-libtiff-tif_luv.c-fix-heap-ba.patch b/bsp/buildroot/package/tiff/0003-libtiff-tif_pixarlog.c-libtiff-tif_luv.c-fix-heap-ba.patch new file mode 100644 index 00000000..290834ec --- /dev/null +++ b/bsp/buildroot/package/tiff/0003-libtiff-tif_pixarlog.c-libtiff-tif_luv.c-fix-heap-ba.patch @@ -0,0 +1,110 @@ +From 1044b43637fa7f70fb19b93593777b78bd20da86 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Fri, 2 Dec 2016 23:05:51 +0000 +Subject: [PATCH] * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based + buffer overflow on generation of PixarLog / LUV compressed files, with + ColorMap, TransferFunction attached and nasty plays with bitspersample. The + fix for LUV has not been tested, but suffers from the same kind of issue of + PixarLog. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2604 + +Fixes CVE-2016-10269 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_luv.c | 18 ++++++++++++++---- + libtiff/tif_pixarlog.c | 17 +++++++++++++++-- + 2 files changed, 39 insertions(+), 6 deletions(-) + +diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c +index f68a9b13..e6783db5 100644 +--- a/libtiff/tif_luv.c ++++ b/libtiff/tif_luv.c +@@ -158,6 +158,7 @@ + typedef struct logLuvState LogLuvState; + + struct logLuvState { ++ int encoder_state; /* 1 if encoder correctly initialized */ + int user_datafmt; /* user data format */ + int encode_meth; /* encoding method */ + int pixel_size; /* bytes per pixel */ +@@ -1552,6 +1553,7 @@ LogLuvSetupEncode(TIFF* tif) + td->td_photometric, "must be either LogLUV or LogL"); + break; + } ++ sp->encoder_state = 1; + return (1); + notsupported: + TIFFErrorExt(tif->tif_clientdata, module, +@@ -1563,19 +1565,27 @@ notsupported: + static void + LogLuvClose(TIFF* tif) + { ++ LogLuvState* sp = (LogLuvState*) tif->tif_data; + TIFFDirectory *td = &tif->tif_dir; + ++ assert(sp != 0); + /* + * For consistency, we always want to write out the same + * bitspersample and sampleformat for our TIFF file, + * regardless of the data format being used by the application. + * Since this routine is called after tags have been set but + * before they have been recorded in the file, we reset them here. ++ * Note: this is really a nasty approach. See PixarLogClose + */ +- td->td_samplesperpixel = +- (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; +- td->td_bitspersample = 16; +- td->td_sampleformat = SAMPLEFORMAT_INT; ++ if( sp->encoder_state ) ++ { ++ /* See PixarLogClose. Might avoid issues with tags whose size depends ++ * on those below, but not completely sure this is enough. */ ++ td->td_samplesperpixel = ++ (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; ++ td->td_bitspersample = 16; ++ td->td_sampleformat = SAMPLEFORMAT_INT; ++ } + } + + static void +diff --git a/libtiff/tif_pixarlog.c b/libtiff/tif_pixarlog.c +index d1246c3d..aa99bc92 100644 +--- a/libtiff/tif_pixarlog.c ++++ b/libtiff/tif_pixarlog.c +@@ -1233,8 +1233,10 @@ PixarLogPostEncode(TIFF* tif) + static void + PixarLogClose(TIFF* tif) + { ++ PixarLogState* sp = (PixarLogState*) tif->tif_data; + TIFFDirectory *td = &tif->tif_dir; + ++ assert(sp != 0); + /* In a really sneaky (and really incorrect, and untruthful, and + * troublesome, and error-prone) maneuver that completely goes against + * the spirit of TIFF, and breaks TIFF, on close, we covertly +@@ -1243,8 +1245,19 @@ PixarLogClose(TIFF* tif) + * readers that don't know about PixarLog, or how to set + * the PIXARLOGDATFMT pseudo-tag. + */ +- td->td_bitspersample = 8; +- td->td_sampleformat = SAMPLEFORMAT_UINT; ++ ++ if (sp->state&PLSTATE_INIT) { ++ /* We test the state to avoid an issue such as in ++ * http://bugzilla.maptools.org/show_bug.cgi?id=2604 ++ * What appends in that case is that the bitspersample is 1 and ++ * a TransferFunction is set. The size of the TransferFunction ++ * depends on 1<td_bitspersample = 8; ++ td->td_sampleformat = SAMPLEFORMAT_UINT; ++ } + } + + static void +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0004-libtiff-tif_dirread.c-modify-ChopUpSingleUncompresse.patch b/bsp/buildroot/package/tiff/0004-libtiff-tif_dirread.c-modify-ChopUpSingleUncompresse.patch new file mode 100644 index 00000000..a24d5d84 --- /dev/null +++ b/bsp/buildroot/package/tiff/0004-libtiff-tif_dirread.c-modify-ChopUpSingleUncompresse.patch @@ -0,0 +1,107 @@ +From 9a72a69e035ee70ff5c41541c8c61cd97990d018 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Sat, 3 Dec 2016 11:02:15 +0000 +Subject: [PATCH] * libtiff/tif_dirread.c: modify + ChopUpSingleUncompressedStrip() to instanciate compute ntrips as + TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a logic based on + the total size of data. Which is faulty is the total size of data is not + sufficient to fill the whole image, and thus results in reading outside of + the StripByCounts/StripOffsets arrays when using TIFFReadScanline(). Reported + by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2608. + +* libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips() done +for http://bugzilla.maptools.org/show_bug.cgi?id=2587 / CVE-2016-9273 since +the above change is a better fix that makes it unnecessary. + +Fixes CVE-2016-10270 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_dirread.c | 22 ++++++++++------------ + libtiff/tif_strip.c | 9 --------- + 2 files changed, 25 insertions(+), 21 deletions(-) + +diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c +index 3eec79c9..570d0c32 100644 +--- a/libtiff/tif_dirread.c ++++ b/libtiff/tif_dirread.c +@@ -5502,8 +5502,7 @@ ChopUpSingleUncompressedStrip(TIFF* tif) + uint64 rowblockbytes; + uint64 stripbytes; + uint32 strip; +- uint64 nstrips64; +- uint32 nstrips32; ++ uint32 nstrips; + uint32 rowsperstrip; + uint64* newcounts; + uint64* newoffsets; +@@ -5534,18 +5533,17 @@ ChopUpSingleUncompressedStrip(TIFF* tif) + return; + + /* +- * never increase the number of strips in an image ++ * never increase the number of rows per strip + */ + if (rowsperstrip >= td->td_rowsperstrip) + return; +- nstrips64 = TIFFhowmany_64(bytecount, stripbytes); +- if ((nstrips64==0)||(nstrips64>0xFFFFFFFF)) /* something is wonky, do nothing. */ +- return; +- nstrips32 = (uint32)nstrips64; ++ nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); ++ if( nstrips == 0 ) ++ return; + +- newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips32, sizeof (uint64), ++ newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), + "for chopped \"StripByteCounts\" array"); +- newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips32, sizeof (uint64), ++ newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), + "for chopped \"StripOffsets\" array"); + if (newcounts == NULL || newoffsets == NULL) { + /* +@@ -5562,18 +5560,18 @@ ChopUpSingleUncompressedStrip(TIFF* tif) + * Fill the strip information arrays with new bytecounts and offsets + * that reflect the broken-up format. + */ +- for (strip = 0; strip < nstrips32; strip++) { ++ for (strip = 0; strip < nstrips; strip++) { + if (stripbytes > bytecount) + stripbytes = bytecount; + newcounts[strip] = stripbytes; +- newoffsets[strip] = offset; ++ newoffsets[strip] = stripbytes ? offset : 0; + offset += stripbytes; + bytecount -= stripbytes; + } + /* + * Replace old single strip info with multi-strip info. + */ +- td->td_stripsperimage = td->td_nstrips = nstrips32; ++ td->td_stripsperimage = td->td_nstrips = nstrips; + TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); + + _TIFFfree(td->td_stripbytecount); +diff --git a/libtiff/tif_strip.c b/libtiff/tif_strip.c +index 4c46ecf5..1676e47d 100644 +--- a/libtiff/tif_strip.c ++++ b/libtiff/tif_strip.c +@@ -63,15 +63,6 @@ TIFFNumberOfStrips(TIFF* tif) + TIFFDirectory *td = &tif->tif_dir; + uint32 nstrips; + +- /* If the value was already computed and store in td_nstrips, then return it, +- since ChopUpSingleUncompressedStrip might have altered and resized the +- since the td_stripbytecount and td_stripoffset arrays to the new value +- after the initial affectation of td_nstrips = TIFFNumberOfStrips() in +- tif_dirread.c ~line 3612. +- See http://bugzilla.maptools.org/show_bug.cgi?id=2587 */ +- if( td->td_nstrips ) +- return td->td_nstrips; +- + nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 : + TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip)); + if (td->td_planarconfig == PLANARCONFIG_SEPARATE) +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0005-tools-tiffcp.c-error-out-cleanly-in-cpContig2Separat.patch b/bsp/buildroot/package/tiff/0005-tools-tiffcp.c-error-out-cleanly-in-cpContig2Separat.patch new file mode 100644 index 00000000..c93be89e --- /dev/null +++ b/bsp/buildroot/package/tiff/0005-tools-tiffcp.c-error-out-cleanly-in-cpContig2Separat.patch @@ -0,0 +1,74 @@ +From 5c080298d59efa53264d7248bbe3a04660db6ef7 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 19:25:44 +0000 +Subject: [PATCH] * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow + and cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based + overflow. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and + http://bugzilla.maptools.org/show_bug.cgi?id=2657 + +Fixes CVE-2017-5225 + +Signed-off-by: Peter Korsgaard +--- + tools/tiffcp.c | 24 ++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +diff --git a/tools/tiffcp.c b/tools/tiffcp.c +index bdf754c3..8bbcd52f 100644 +--- a/tools/tiffcp.c ++++ b/tools/tiffcp.c +@@ -591,7 +591,7 @@ static copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, uint16); + static int + tiffcp(TIFF* in, TIFF* out) + { +- uint16 bitspersample, samplesperpixel = 1; ++ uint16 bitspersample = 1, samplesperpixel = 1; + uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK; + copyFunc cf; + uint32 width, length; +@@ -1067,6 +1067,16 @@ DECLAREcpFunc(cpContig2SeparateByRow) + register uint32 n; + uint32 row; + tsample_t s; ++ uint16 bps = 0; ++ ++ (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); ++ if( bps != 8 ) ++ { ++ TIFFError(TIFFFileName(in), ++ "Error, can only handle BitsPerSample=8 in %s", ++ "cpContig2SeparateByRow"); ++ return 0; ++ } + + inbuf = _TIFFmalloc(scanlinesizein); + outbuf = _TIFFmalloc(scanlinesizeout); +@@ -1120,6 +1130,16 @@ DECLAREcpFunc(cpSeparate2ContigByRow) + register uint32 n; + uint32 row; + tsample_t s; ++ uint16 bps = 0; ++ ++ (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); ++ if( bps != 8 ) ++ { ++ TIFFError(TIFFFileName(in), ++ "Error, can only handle BitsPerSample=8 in %s", ++ "cpSeparate2ContigByRow"); ++ return 0; ++ } + + inbuf = _TIFFmalloc(scanlinesizein); + outbuf = _TIFFmalloc(scanlinesizeout); +@@ -1784,7 +1804,7 @@ pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel) + uint32 w, l, tw, tl; + int bychunk; + +- (void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv); ++ (void) TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv); + if (shortv != config && bitspersample != 8 && samplesperpixel > 1) { + fprintf(stderr, + "%s: Cannot handle different planar configuration w/ bits/sample != 8\n", +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0006-libtiff-tif_getimage.c-add-explicit-uint32-cast-in-p.patch b/bsp/buildroot/package/tiff/0006-libtiff-tif_getimage.c-add-explicit-uint32-cast-in-p.patch new file mode 100644 index 00000000..b3d8a40b --- /dev/null +++ b/bsp/buildroot/package/tiff/0006-libtiff-tif_getimage.c-add-explicit-uint32-cast-in-p.patch @@ -0,0 +1,31 @@ +From 48780b4fcc425cddc4ef8ffdf536f96a0d1b313b Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 16:38:26 +0000 +Subject: [PATCH] libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to + avoid UndefinedBehaviorSanitizer warning. + Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 + +Fixes CVE-2017-7592 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_getimage.c | 2 +- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c +index fed31f1f..2fa1775c 100644 +--- a/libtiff/tif_getimage.c ++++ b/libtiff/tif_getimage.c +@@ -1302,7 +1302,7 @@ DECLAREContigPutFunc(putagreytile) + while (h-- > 0) { + for (x = w; x-- > 0;) + { +- *cp++ = BWmap[*pp][0] & (*(pp+1) << 24 | ~A1); ++ *cp++ = BWmap[*pp][0] & ((uint32)*(pp+1) << 24 | ~A1); + pp += samplesperpixel; + } + cp += toskew; +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0007-libtiff-tiffiop.h-tif_unix.c-tif_win32.c-tif_vms.c-a.patch b/bsp/buildroot/package/tiff/0007-libtiff-tiffiop.h-tif_unix.c-tif_win32.c-tif_vms.c-a.patch new file mode 100644 index 00000000..ec45bbe1 --- /dev/null +++ b/bsp/buildroot/package/tiff/0007-libtiff-tiffiop.h-tif_unix.c-tif_win32.c-tif_vms.c-a.patch @@ -0,0 +1,88 @@ +From d60332057b9575ada4f264489582b13e30137be1 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 19:02:49 +0000 +Subject: [PATCH] * libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add + _TIFFcalloc() + +* libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero +initialize tif_rawdata. +Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 + +Fixes CVE-2017-7593 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_read.c | 4 +++- + libtiff/tif_unix.c | 8 ++++++++ + libtiff/tif_win32.c | 8 ++++++++ + libtiff/tiffio.h | 1 + + 4 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c +index 277fdd69..4535ccb3 100644 +--- a/libtiff/tif_read.c ++++ b/libtiff/tif_read.c +@@ -985,7 +985,9 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size) + "Invalid buffer size"); + return (0); + } +- tif->tif_rawdata = (uint8*) _TIFFmalloc(tif->tif_rawdatasize); ++ /* Initialize to zero to avoid uninitialized buffers in case of */ ++ /* short reads (http://bugzilla.maptools.org/show_bug.cgi?id=2651) */ ++ tif->tif_rawdata = (uint8*) _TIFFcalloc(1, tif->tif_rawdatasize); + tif->tif_flags |= TIFF_MYBUFFER; + } + if (tif->tif_rawdata == NULL) { +diff --git a/libtiff/tif_unix.c b/libtiff/tif_unix.c +index 7c7bc961..89dd32e8 100644 +--- a/libtiff/tif_unix.c ++++ b/libtiff/tif_unix.c +@@ -316,6 +316,14 @@ _TIFFmalloc(tmsize_t s) + return (malloc((size_t) s)); + } + ++void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) ++{ ++ if( nmemb == 0 || siz == 0 ) ++ return ((void *) NULL); ++ ++ return calloc((size_t) nmemb, (size_t)siz); ++} ++ + void + _TIFFfree(void* p) + { +diff --git a/libtiff/tif_win32.c b/libtiff/tif_win32.c +index d730b3ab..3e9001b7 100644 +--- a/libtiff/tif_win32.c ++++ b/libtiff/tif_win32.c +@@ -360,6 +360,14 @@ _TIFFmalloc(tmsize_t s) + return (malloc((size_t) s)); + } + ++void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) ++{ ++ if( nmemb == 0 || siz == 0 ) ++ return ((void *) NULL); ++ ++ return calloc((size_t) nmemb, (size_t)siz); ++} ++ + void + _TIFFfree(void* p) + { +diff --git a/libtiff/tiffio.h b/libtiff/tiffio.h +index 732da17f..fbd9171f 100644 +--- a/libtiff/tiffio.h ++++ b/libtiff/tiffio.h +@@ -293,6 +293,7 @@ extern TIFFCodec* TIFFGetConfiguredCODECs(void); + */ + + extern void* _TIFFmalloc(tmsize_t s); ++extern void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz); + extern void* _TIFFrealloc(void* p, tmsize_t s); + extern void _TIFFmemset(void* p, int v, tmsize_t c); + extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c); +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0008-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch b/bsp/buildroot/package/tiff/0008-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch new file mode 100644 index 00000000..418a3d69 --- /dev/null +++ b/bsp/buildroot/package/tiff/0008-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch @@ -0,0 +1,43 @@ +From 2ea32f7372b65c24b2816f11c04bf59b5090d05b Mon Sep 17 00:00:00 2001 +From: erouault +Date: Thu, 12 Jan 2017 19:23:20 +0000 +Subject: [PATCH] * libtiff/tif_ojpeg.c: fix leak in + OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable and + OJPEGReadHeaderInfoSecTablesAcTable + +Fixes CVE-2017-7594 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_ojpeg.c | 6 ++++++ + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c +index b92f0ebd..5f6c684c 100644 +--- a/libtiff/tif_ojpeg.c ++++ b/libtiff/tif_ojpeg.c +@@ -1790,7 +1790,10 @@ OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif) + TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); + p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64); + if (p!=64) ++ { ++ _TIFFfree(ob); + return(0); ++ } + sp->qtable[m]=ob; + sp->sof_tq[m]=m; + } +@@ -1854,7 +1857,10 @@ OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif) + rb[sizeof(uint32)+5+n]=o[n]; + p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); + if (p!=q) ++ { ++ _TIFFfree(rb); + return(0); ++ } + sp->dctable[m]=rb; + sp->sos_tda[m]=(m<<4); + } +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0009-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch b/bsp/buildroot/package/tiff/0009-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch new file mode 100644 index 00000000..a1aae2dc --- /dev/null +++ b/bsp/buildroot/package/tiff/0009-libtiff-tif_ojpeg.c-fix-leak-in-OJPEGReadHeaderInfoS.patch @@ -0,0 +1,36 @@ +From 8283e4d1b7e53340684d12932880cbcbaf23a8c1 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Thu, 12 Jan 2017 17:43:25 +0000 +Subject: [PATCH] libtiff/tif_ojpeg.c: fix leak in + OJPEGReadHeaderInfoSecTablesAcTable when read fails. + Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes CVE-2017-7594 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_ojpeg.c | 3 +++ + 1 file changed, 10 insertions(+) + +diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c +index f19e8fd0..b92f0ebd 100644 +--- a/libtiff/tif_ojpeg.c ++++ b/libtiff/tif_ojpeg.c +@@ -1918,7 +1918,10 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif) + rb[sizeof(uint32)+5+n]=o[n]; + p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); + if (p!=q) ++ { ++ _TIFFfree(rb); + return(0); ++ } + sp->actable[m]=rb; + sp->sos_tda[m]=(sp->sos_tda[m]|m); + } +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0010-libtiff-tif_jpeg.c-avoid-integer-division-by-zero-in.patch b/bsp/buildroot/package/tiff/0010-libtiff-tif_jpeg.c-avoid-integer-division-by-zero-in.patch new file mode 100644 index 00000000..862aae2a --- /dev/null +++ b/bsp/buildroot/package/tiff/0010-libtiff-tif_jpeg.c-avoid-integer-division-by-zero-in.patch @@ -0,0 +1,35 @@ +From 47f2fb61a3a64667bce1a8398a8fcb1b348ff122 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 12:15:01 +0000 +Subject: [PATCH] * libtiff/tif_jpeg.c: avoid integer division by zero in + JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2653 + +Fixes CVE-2017-7595 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_jpeg.c | 7 +++++++ + 1 file changed, 13 insertions(+) + +diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c +index 38595f98..6c17c388 100644 +--- a/libtiff/tif_jpeg.c ++++ b/libtiff/tif_jpeg.c +@@ -1626,6 +1626,13 @@ JPEGSetupEncode(TIFF* tif) + case PHOTOMETRIC_YCBCR: + sp->h_sampling = td->td_ycbcrsubsampling[0]; + sp->v_sampling = td->td_ycbcrsubsampling[1]; ++ if( sp->h_sampling == 0 || sp->v_sampling == 0 ) ++ { ++ TIFFErrorExt(tif->tif_clientdata, module, ++ "Invalig horizontal/vertical sampling value"); ++ return (0); ++ } ++ + /* + * A ReferenceBlackWhite field *must* be present since the + * default value is inappropriate for YCbCr. Fill in the +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0011-libtiff-tif_dirread.c-avoid-division-by-floating-poi.patch b/bsp/buildroot/package/tiff/0011-libtiff-tif_dirread.c-avoid-division-by-floating-poi.patch new file mode 100644 index 00000000..c0c94291 --- /dev/null +++ b/bsp/buildroot/package/tiff/0011-libtiff-tif_dirread.c-avoid-division-by-floating-poi.patch @@ -0,0 +1,47 @@ +From 3cfd62d77c2a7e147a05bd678524c345fa9c2bb8 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 13:28:01 +0000 +Subject: [PATCH] * libtiff/tif_dirread.c: avoid division by floating point 0 + in TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), + and return 0 in that case (instead of infinity as before presumably) + Apparently some sanitizers do not like those divisions by zero. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2644 + +Fixes CVE-2017-7598 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_dirread.c | 10 ++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c +index 570d0c32..8a1e42aa 100644 +--- a/libtiff/tif_dirread.c ++++ b/libtiff/tif_dirread.c +@@ -2872,7 +2872,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedRational(TIFF* tif, TIFFD + m.l = direntry->tdir_offset.toff_long8; + if (tif->tif_flags&TIFF_SWAB) + TIFFSwabArrayOfLong(m.i,2); +- if (m.i[0]==0) ++ /* Not completely sure what we should do when m.i[1]==0, but some */ ++ /* sanitizers do not like division by 0.0: */ ++ /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ ++ if (m.i[0]==0 || m.i[1]==0) + *value=0.0; + else + *value=(double)m.i[0]/(double)m.i[1]; +@@ -2900,7 +2903,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSrational(TIFF* tif, TIFF + m.l=direntry->tdir_offset.toff_long8; + if (tif->tif_flags&TIFF_SWAB) + TIFFSwabArrayOfLong(m.i,2); +- if ((int32)m.i[0]==0) ++ /* Not completely sure what we should do when m.i[1]==0, but some */ ++ /* sanitizers do not like division by 0.0: */ ++ /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ ++ if ((int32)m.i[0]==0 || m.i[1]==0) + *value=0.0; + else + *value=(double)((int32)m.i[0])/(double)m.i[1]; +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0012-libtiff-tif_jpeg.c-validate-BitsPerSample-in-JPEGSet.patch b/bsp/buildroot/package/tiff/0012-libtiff-tif_jpeg.c-validate-BitsPerSample-in-JPEGSet.patch new file mode 100644 index 00000000..4f46d9bb --- /dev/null +++ b/bsp/buildroot/package/tiff/0012-libtiff-tif_jpeg.c-validate-BitsPerSample-in-JPEGSet.patch @@ -0,0 +1,35 @@ +From 0a76a8c765c7b8327c59646284fa78c3c27e5490 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 16:13:50 +0000 +Subject: [PATCH] * libtiff/tif_jpeg.c: validate BitsPerSample in + JPEGSetupEncode() to avoid undefined behaviour caused by invalid shift + exponent. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 + +Fixes CVE-2017-7601 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_jpeg.c | 7 +++++++ + 1 file changed, 13 insertions(+) + +diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c +index 6c17c388..192989a9 100644 +--- a/libtiff/tif_jpeg.c ++++ b/libtiff/tif_jpeg.c +@@ -1632,6 +1632,13 @@ JPEGSetupEncode(TIFF* tif) + "Invalig horizontal/vertical sampling value"); + return (0); + } ++ if( td->td_bitspersample > 16 ) ++ { ++ TIFFErrorExt(tif->tif_clientdata, module, ++ "BitsPerSample %d not allowed for JPEG", ++ td->td_bitspersample); ++ return (0); ++ } + + /* + * A ReferenceBlackWhite field *must* be present since the +-- +2.11.0 + diff --git a/bsp/buildroot/package/tiff/0013-libtiff-tif_read.c-avoid-potential-undefined-behavio.patch b/bsp/buildroot/package/tiff/0013-libtiff-tif_read.c-avoid-potential-undefined-behavio.patch new file mode 100644 index 00000000..d049b130 --- /dev/null +++ b/bsp/buildroot/package/tiff/0013-libtiff-tif_read.c-avoid-potential-undefined-behavio.patch @@ -0,0 +1,56 @@ +From 66e7bd59520996740e4df5495a830b42fae48bc4 Mon Sep 17 00:00:00 2001 +From: erouault +Date: Wed, 11 Jan 2017 16:33:34 +0000 +Subject: [PATCH] * libtiff/tif_read.c: avoid potential undefined behaviour on + signed integer addition in TIFFReadRawStrip1() in isMapped() case. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2650 + +Fixes CVE-2017-7602 + +Signed-off-by: Peter Korsgaard +--- + libtiff/tif_read.c | 27 ++++++++++++++++++--------- + 1 file changed, 24 insertions(+), 9 deletions(-) + +diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c +index 52bbf507..b7aacbda 100644 +--- a/libtiff/tif_read.c ++++ b/libtiff/tif_read.c +@@ -420,16 +420,25 @@ TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size, + return ((tmsize_t)(-1)); + } + } else { +- tmsize_t ma,mb; ++ tmsize_t ma; + tmsize_t n; +- ma=(tmsize_t)td->td_stripoffset[strip]; +- mb=ma+size; +- if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size)) +- n=0; +- else if ((mbtif->tif_size)) +- n=tif->tif_size-ma; +- else +- n=size; ++ if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)|| ++ ((ma=(tmsize_t)td->td_stripoffset[strip])>tif->tif_size)) ++ { ++ n=0; ++ } ++ else if( ma > TIFF_TMSIZE_T_MAX - size ) ++ { ++ n=0; ++ } ++ else ++ { ++ tmsize_t mb=ma+size; ++ if (mb>tif->tif_size) ++ n=tif->tif_size-ma; ++ else ++ n=size; ++ } + if (n!=size) { + #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFErrorExt(tif->tif_clientdata, module, +-- +2.11.0 + diff --git a/bsp/buildroot/package/tor/tor.hash b/bsp/buildroot/package/tor/tor.hash index 470fc482..d14db040 100644 --- a/bsp/buildroot/package/tor/tor.hash +++ b/bsp/buildroot/package/tor/tor.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 33325d2b250fd047ba2ddc5d11c2190c4e2951f4b03ec48ebd8bf0666e990d43 tor-0.2.9.9.tar.gz +sha256 d611283e1fb284b5f884f8c07e7d3151016851848304f56cfdf3be2a88bd1341 tor-0.2.9.10.tar.gz diff --git a/bsp/buildroot/package/tor/tor.mk b/bsp/buildroot/package/tor/tor.mk index bb0fbb16..9ccde799 100644 --- a/bsp/buildroot/package/tor/tor.mk +++ b/bsp/buildroot/package/tor/tor.mk @@ -4,7 +4,7 @@ # ################################################################################ -TOR_VERSION = 0.2.9.9 +TOR_VERSION = 0.2.9.10 TOR_SITE = https://dist.torproject.org TOR_LICENSE = BSD-3c TOR_LICENSE_FILES = LICENSE diff --git a/bsp/buildroot/package/trinity/trinity.hash b/bsp/buildroot/package/trinity/trinity.hash index e290a409..5bf9992d 100644 --- a/bsp/buildroot/package/trinity/trinity.hash +++ b/bsp/buildroot/package/trinity/trinity.hash @@ -1,2 +1,3 @@ # Locally calculated sha256 3ef7ae05dba14f8bb626121983a08bb09d1d51a19de38bd9a8e0f29b11d9e3c9 trinity-v1.6.tar.gz +sha256 5601474b10973b99f6f4ecc67c8ac54000754d7110553cc81c7648bd7e73c810 b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d.patch diff --git a/bsp/buildroot/package/trinity/trinity.mk b/bsp/buildroot/package/trinity/trinity.mk index 7596e92b..ee00d782 100644 --- a/bsp/buildroot/package/trinity/trinity.mk +++ b/bsp/buildroot/package/trinity/trinity.mk @@ -9,6 +9,8 @@ TRINITY_SITE = $(call github,kernelslacker,trinity,$(TRINITY_VERSION)) TRINITY_LICENSE = GPLv2 TRINITY_LICENSE_FILES = COPYING +TRINITY_PATCH = https://github.com/kernelslacker/trinity/commit/b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d.patch + define TRINITY_CONFIGURE_CMDS (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.sh) endef diff --git a/bsp/buildroot/package/upmpdcli/upmpdcli.mk b/bsp/buildroot/package/upmpdcli/upmpdcli.mk index 83efa053..a9b057d8 100644 --- a/bsp/buildroot/package/upmpdcli/upmpdcli.mk +++ b/bsp/buildroot/package/upmpdcli/upmpdcli.mk @@ -12,7 +12,7 @@ UPMPDCLI_DEPENDENCIES = host-pkgconf libmpdclient libupnpp libmicrohttpd jsoncpp # Upmpdcli only runs if user upmpdcli exists define UPMPDCLI_USERS - upmpdcli -1 upmpdcli -1 * - - - Upmpdcli MPD UPnP Renderer Front-End + upmpdcli -1 upmpdcli -1 * - - audio Upmpdcli MPD UPnP Renderer Front-End endef define UPMPDCLI_INSTALL_INIT_SYSV diff --git a/bsp/buildroot/package/vlc/vlc.hash b/bsp/buildroot/package/vlc/vlc.hash index efd4e27e..0f1b6dcc 100644 --- a/bsp/buildroot/package/vlc/vlc.hash +++ b/bsp/buildroot/package/vlc/vlc.hash @@ -1,2 +1,6 @@ -# From http://download.videolan.org/pub/videolan/vlc/2.2.3/vlc-2.2.3.tar.xz.sha256 -sha256 1632e91d2a0087e0ef4c3fb4c95c3c2890f7715a9d1d43ffd46329f428cf53be vlc-2.2.4.tar.xz +# From http://get.videolan.org/vlc/2.2.5.1/vlc-2.2.5.1.tar.xz.md5 +md5 7ab63964ffec4c92a54deb018f23318b vlc-2.2.5.1.tar.xz +# From http://get.videolan.org/vlc/2.2.5.1/vlc-2.2.5.1.tar.xz.sha1 +sha1 042962dba68e1414aa563883b0172ee121cf9555 vlc-2.2.5.1.tar.xz +# From http://get.videolan.org/vlc/2.2.5.1/vlc-2.2.5.1.tar.xz.sha256 +sha256 b28b8a28f578c0c6cb1ebed293aca2a3cd368906cf777d1ab599e2784ddda1cc vlc-2.2.5.1.tar.xz diff --git a/bsp/buildroot/package/vlc/vlc.mk b/bsp/buildroot/package/vlc/vlc.mk index 583edf36..7f0c4f59 100644 --- a/bsp/buildroot/package/vlc/vlc.mk +++ b/bsp/buildroot/package/vlc/vlc.mk @@ -4,7 +4,7 @@ # ################################################################################ -VLC_VERSION = 2.2.4 +VLC_VERSION = 2.2.5.1 VLC_SITE = http://get.videolan.org/vlc/$(VLC_VERSION) VLC_SOURCE = vlc-$(VLC_VERSION).tar.xz VLC_LICENSE = GPLv2+, LGPLv2.1+ diff --git a/bsp/buildroot/package/wget/0001-Fix-CRLF-injection-in-Wget-host-part.patch b/bsp/buildroot/package/wget/0001-Fix-CRLF-injection-in-Wget-host-part.patch new file mode 100644 index 00000000..380b0752 --- /dev/null +++ b/bsp/buildroot/package/wget/0001-Fix-CRLF-injection-in-Wget-host-part.patch @@ -0,0 +1,40 @@ +From 4d729e322fae359a1aefaafec1144764a54e8ad4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= +Date: Mon, 6 Mar 2017 10:04:22 +0100 +Subject: [PATCH] Fix CRLF injection in Wget host part + +* src/url.c (url_parse): Reject control characters in host part of URL + +Reported-by: Orange Tsai +Signed-off-by: Baruch Siach +--- +Patch status: upstream commit 4d729e322fae35 + + src/url.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/url.c b/src/url.c +index 8f8ff0b881af..7d36b27d7b92 100644 +--- a/src/url.c ++++ b/src/url.c +@@ -925,6 +925,17 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode) + url_unescape (u->host); + host_modified = true; + ++ /* check for invalid control characters in host name */ ++ for (p = u->host; *p; p++) ++ { ++ if (c_iscntrl(*p)) ++ { ++ url_free(u); ++ error_code = PE_INVALID_HOST_NAME; ++ goto error; ++ } ++ } ++ + /* Apply IDNA regardless of iri->utf8_encode status */ + if (opt.enable_iri && iri) + { +-- +2.11.0 + diff --git a/bsp/buildroot/package/which/Config.in b/bsp/buildroot/package/which/Config.in index db090ea8..0dc31b22 100644 --- a/bsp/buildroot/package/which/Config.in +++ b/bsp/buildroot/package/which/Config.in @@ -4,4 +4,4 @@ config BR2_PACKAGE_WHICH help The standard 'which' utility. - http://www.xs4all.nl/~carlo17/which/ + http://carlowood.github.io/which/index.html diff --git a/bsp/buildroot/package/wireshark/wireshark.hash b/bsp/buildroot/package/wireshark/wireshark.hash index e3eeef33..09f6573a 100644 --- a/bsp/buildroot/package/wireshark/wireshark.hash +++ b/bsp/buildroot/package/wireshark/wireshark.hash @@ -1,2 +1,2 @@ -# From: https://www.wireshark.org/download/src/all-versions/SIGNATURES-2.2.4.txt -sha256 42a7fb35eed5a32478153e24601a284bb50148b7ba919c3e8452652f4c2a3911 wireshark-2.2.4.tar.bz2 +# From: https://www.wireshark.org/download/src/all-versions/SIGNATURES-2.2.6.txt +sha256 f627d51eda85f5ae5f5c8c9fc1f6539ffc2a270dd7500dc7f67490a8534ca849 wireshark-2.2.6.tar.bz2 diff --git a/bsp/buildroot/package/wireshark/wireshark.mk b/bsp/buildroot/package/wireshark/wireshark.mk index edd830d8..fee6a817 100644 --- a/bsp/buildroot/package/wireshark/wireshark.mk +++ b/bsp/buildroot/package/wireshark/wireshark.mk @@ -4,7 +4,7 @@ # ################################################################################ -WIRESHARK_VERSION = 2.2.4 +WIRESHARK_VERSION = 2.2.6 WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2 WIRESHARK_SITE = https://www.wireshark.org/download/src/all-versions WIRESHARK_LICENSE = wireshark license diff --git a/bsp/buildroot/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk b/bsp/buildroot/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk index ef262f89..1b2066d2 100644 --- a/bsp/buildroot/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk +++ b/bsp/buildroot/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk @@ -11,4 +11,11 @@ XDRIVER_XF86_VIDEO_VMWARE_LICENSE = MIT XDRIVER_XF86_VIDEO_VMWARE_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES = mesa3d xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xineramaproto xproto_xproto +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_VIDEO_VMWARE_CONF_OPTS += --with-libudev +XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES += udev +else +XDRIVER_XF86_VIDEO_VMWARE_CONF_OPTS += --without-libudev +endif + $(eval $(autotools-package)) diff --git a/bsp/buildroot/package/x11r7/xlib_libXv/xlib_libXv.mk b/bsp/buildroot/package/x11r7/xlib_libXv/xlib_libXv.mk index 26f8badc..0e02439f 100644 --- a/bsp/buildroot/package/x11r7/xlib_libXv/xlib_libXv.mk +++ b/bsp/buildroot/package/x11r7/xlib_libXv/xlib_libXv.mk @@ -7,7 +7,7 @@ XLIB_LIBXV_VERSION = 1.0.11 XLIB_LIBXV_SOURCE = libXv-$(XLIB_LIBXV_VERSION).tar.bz2 XLIB_LIBXV_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXV_LICENSE = MIT +XLIB_LIBXV_LICENSE = ISC-like XLIB_LIBXV_LICENSE_FILES = COPYING XLIB_LIBXV_INSTALL_STAGING = YES XLIB_LIBXV_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_videoproto xproto_xproto diff --git a/bsp/buildroot/package/xen/xen.hash b/bsp/buildroot/package/xen/xen.hash index c3df2431..2143f466 100644 --- a/bsp/buildroot/package/xen/xen.hash +++ b/bsp/buildroot/package/xen/xen.hash @@ -1,2 +1,2 @@ # Locally computed -sha256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe xen-4.7.1.tar.gz +sha256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 xen-4.7.2.tar.gz diff --git a/bsp/buildroot/package/xen/xen.mk b/bsp/buildroot/package/xen/xen.mk index 7d32e527..9ff1b402 100644 --- a/bsp/buildroot/package/xen/xen.mk +++ b/bsp/buildroot/package/xen/xen.mk @@ -4,7 +4,7 @@ # ################################################################################ -XEN_VERSION = 4.7.1 +XEN_VERSION = 4.7.2 XEN_SITE = http://bits.xensource.com/oss-xen/release/$(XEN_VERSION) XEN_LICENSE = GPLv2 XEN_LICENSE_FILES = COPYING diff --git a/bsp/buildroot/package/zmqpp/zmqpp.mk b/bsp/buildroot/package/zmqpp/zmqpp.mk index 18da7096..3e35fd75 100644 --- a/bsp/buildroot/package/zmqpp/zmqpp.mk +++ b/bsp/buildroot/package/zmqpp/zmqpp.mk @@ -8,7 +8,7 @@ ZMQPP_VERSION = 4.1.2 ZMQPP_SITE = $(call github,zeromq,zmqpp,$(ZMQPP_VERSION)) ZMQPP_INSTALL_STAGING = YES ZMQPP_DEPENDENCIES = zeromq -ZMQPP_LICENSE = MIT +ZMQPP_LICENSE = MPLv2.0 ZMQPP_LICENSE_FILES = LICENSE ZMQPP_MAKE_OPTS = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr ZMQPP_LDFLAGS = $(TARGET_LDFLAGS) -lpthread diff --git a/bsp/buildroot/support/download/git b/bsp/buildroot/support/download/git index 79214118..056057c7 100755 --- a/bsp/buildroot/support/download/git +++ b/bsp/buildroot/support/download/git @@ -94,6 +94,8 @@ popd >/dev/null # Generate the archive, sort with the C locale so that it is reproducible find "${basename}" -not -type d >"${basename}.list" LC_ALL=C sort <"${basename}.list" >"${basename}.list.sorted" -tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" \ +# Create GNU-format tarballs, since that's the format of the tarballs on +# sources.buildroot.org and used in the *.hash files +tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" --format=gnu \ -T "${basename}.list.sorted" >"${output}.tar" gzip -n <"${output}.tar" >"${output}" diff --git a/bsp/buildroot/support/scripts/br2-external b/bsp/buildroot/support/scripts/br2-external index 26bcac8a..7e816081 100755 --- a/bsp/buildroot/support/scripts/br2-external +++ b/bsp/buildroot/support/scripts/br2-external @@ -40,6 +40,9 @@ main() { exec >"${ofile}" + # Trap any unexpected error to generate a meaningful error message + trap "error 'unexpected error while generating ${ofile}\n'" ERR + do_validate ${@//:/ } do_${ofmt} diff --git a/bsp/buildroot/support/scripts/pkgutil.py b/bsp/buildroot/support/scripts/brpkgutil.py similarity index 100% rename from bsp/buildroot/support/scripts/pkgutil.py rename to bsp/buildroot/support/scripts/brpkgutil.py diff --git a/bsp/buildroot/support/scripts/graph-depends b/bsp/buildroot/support/scripts/graph-depends index fbd59170..b258c565 100755 --- a/bsp/buildroot/support/scripts/graph-depends +++ b/bsp/buildroot/support/scripts/graph-depends @@ -26,7 +26,7 @@ import subprocess import argparse from fnmatch import fnmatch -import pkgutil +import brpkgutil # Modes of operation: MODE_FULL = 1 # draw full dependency graph for all selected packages @@ -102,13 +102,13 @@ else: transitive = args.transitive if args.direct: - get_depends_func = pkgutil.get_depends + get_depends_func = brpkgutil.get_depends arrow_dir = "forward" else: if mode == MODE_FULL: sys.stderr.write("--reverse needs a package\n") sys.exit(1) - get_depends_func = pkgutil.get_rdepends + get_depends_func = brpkgutil.get_rdepends arrow_dir = "back" # Get the colours: we need exactly three colours, @@ -330,7 +330,7 @@ if check_only: sys.exit(0) dict_deps = remove_extra_deps(dict_deps) -dict_version = pkgutil.get_version([pkg for pkg in allpkgs +dict_version = brpkgutil.get_version([pkg for pkg in allpkgs if pkg != "all" and not pkg.startswith("root")]) # Print the attributes of a node: label and fill-color diff --git a/bsp/buildroot/support/scripts/mkusers b/bsp/buildroot/support/scripts/mkusers index d8345787..2ac76f98 100755 --- a/bsp/buildroot/support/scripts/mkusers +++ b/bsp/buildroot/support/scripts/mkusers @@ -359,7 +359,7 @@ add_one_user() { main() { local username uid group gid passwd home shell groups comment local line - local -a LINES + local -a ENTRIES # Some sanity checks if [ ${MIN_UID} -le 0 ]; then @@ -371,7 +371,7 @@ main() { # Read in all the file in memory, exclude empty lines and comments while read line; do - LINES+=( "${line}" ) + ENTRIES+=( "${line}" ) done < <( sed -r -e 's/#.*//; /^[[:space:]]*$/d;' "${USERS_TABLE}" ) # We first create groups whose gid is not -1, and then we create groups @@ -380,14 +380,14 @@ main() { # used, rather than a different automatic gid is computed. # First, create all the main groups which gid is *not* automatic - for line in "${LINES[@]}"; do + for line in "${ENTRIES[@]}"; do read username uid group gid passwd home shell groups comment <<<"${line}" [ ${gid} -ge 0 ] || continue # Automatic gid add_one_group "${group}" "${gid}" done # Then, create all the main groups which gid *is* automatic - for line in "${LINES[@]}"; do + for line in "${ENTRIES[@]}"; do read username uid group gid passwd home shell groups comment <<<"${line}" [ ${gid} -eq -1 ] || continue # Non-automatic gid add_one_group "${group}" "${gid}" @@ -396,7 +396,7 @@ main() { # Then, create all the additional groups # If any additional group is already a main group, we should use # the gid of that main group; otherwise, we can use any gid - for line in "${LINES[@]}"; do + for line in "${ENTRIES[@]}"; do read username uid group gid passwd home shell groups comment <<<"${line}" if [ "${groups}" != "-" ]; then for g in ${groups//,/ }; do @@ -411,7 +411,7 @@ main() { # uid be generated. # Now, add users whose uid is *not* automatic - for line in "${LINES[@]}"; do + for line in "${ENTRIES[@]}"; do read username uid group gid passwd home shell groups comment <<<"${line}" [ "${username}" != "-" ] || continue # Magic string to skip user creation [ ${uid} -ge 0 ] || continue # Automatic uid @@ -420,7 +420,7 @@ main() { done # Finally, add users whose uid *is* automatic - for line in "${LINES[@]}"; do + for line in "${ENTRIES[@]}"; do read username uid group gid passwd home shell groups comment <<<"${line}" [ "${username}" != "-" ] || continue # Magic string to skip user creation [ ${uid} -eq -1 ] || continue # Non-automatic uid diff --git a/bsp/buildroot/system/Config.in b/bsp/buildroot/system/Config.in index 3ddf8433..b47ae438 100644 --- a/bsp/buildroot/system/Config.in +++ b/bsp/buildroot/system/Config.in @@ -298,7 +298,6 @@ endchoice # /bin/sh config BR2_SYSTEM_BIN_SH string - default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX default "bash" if BR2_SYSTEM_BIN_SH_BASH default "dash" if BR2_SYSTEM_BIN_SH_DASH default "mksh" if BR2_SYSTEM_BIN_SH_MKSH diff --git a/bsp/buildroot/system/skeleton/etc/fstab b/bsp/buildroot/system/skeleton/etc/fstab index 2b418a0e..169054b7 100644 --- a/bsp/buildroot/system/skeleton/etc/fstab +++ b/bsp/buildroot/system/skeleton/etc/fstab @@ -1,7 +1,7 @@ # /dev/root / ext2 rw,noauto 0 1 proc /proc proc defaults 0 0 -devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 tmpfs /dev/shm tmpfs mode=0777 0 0 tmpfs /tmp tmpfs mode=1777 0 0 tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 diff --git a/bsp/buildroot/toolchain/Config.in b/bsp/buildroot/toolchain/Config.in index de015856..92a49263 100644 --- a/bsp/buildroot/toolchain/Config.in +++ b/bsp/buildroot/toolchain/Config.in @@ -28,7 +28,7 @@ config BR2_TOOLCHAIN_USES_MUSL select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG select BR2_TOOLCHAIN_HAS_THREADS_NPTL - select BR2_TOOLCHAIN_SUPPORTS_PIE + select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS choice prompt "Toolchain type" diff --git a/bsp/buildroot/toolchain/helpers.mk b/bsp/buildroot/toolchain/helpers.mk index 72e72923..922c8215 100644 --- a/bsp/buildroot/toolchain/helpers.mk +++ b/bsp/buildroot/toolchain/helpers.mk @@ -132,22 +132,12 @@ check_kernel_headers_version = \ # $1: path to gcc # $2: expected gcc version # -# Some details about the sed expression: -# - 1!d -# - delete if not line 1 -# -# - s/^[^)]+\) ([^[:space:]]+).*/\1/ -# - eat all until the first ')' character followed by a space -# - match as many non-space chars as possible -# - eat all the remaining chars on the line -# - replace by the matched expression -# check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ exit 0 ; \ fi; \ - real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;'` ; \ + real_version=`$(1) -dumpversion` ; \ if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \ printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \ "$${expected_version}" "$${real_version}" ; \ diff --git a/bsp/buildroot/toolchain/toolchain-external/pkg-toolchain-external.mk b/bsp/buildroot/toolchain/toolchain-external/pkg-toolchain-external.mk index 11a1bf5e..653ec87a 100644 --- a/bsp/buildroot/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/bsp/buildroot/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -480,6 +480,8 @@ ifeq ($(BR2_i386),y) MUSL_ARCH = i386 else ifeq ($(BR2_ARM_EABIHF),y) MUSL_ARCH = armhf +else ifeq ($(BR2_mips):$(BR2_SOFT_FLOAT),y:y) +MUSL_ARCH = mips-sf else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y) MUSL_ARCH = mipsel-sf else ifeq ($(BR2_sh),y) diff --git a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk index bc58c44c..e320d3d3 100644 --- a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk +++ b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk @@ -4,7 +4,7 @@ # ################################################################################ -TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION = 2014.11-95 TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SOURCE = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_ACTUAL_SOURCE_TARBALL = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 diff --git a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk index f96a0e0b..f15a50c4 100644 --- a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk +++ b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk @@ -6,7 +6,7 @@ TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION = 2014.05-29 -TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SOURCE = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_ACTUAL_SOURCE_TARBALL = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 diff --git a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk index 5117d475..94fbbff5 100644 --- a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk +++ b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk @@ -6,7 +6,7 @@ TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION = 2016.05-8 -TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SOURCE = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_ACTUAL_SOURCE_TARBALL = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 diff --git a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk index 7381061c..dcca94f0 100644 --- a/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk +++ b/bsp/buildroot/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk @@ -6,7 +6,7 @@ TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2016.11-32 -TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SOURCE = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_ACTUAL_SOURCE_TARBALL = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 diff --git a/bsp/buildroot/toolchain/toolchain/toolchain.mk b/bsp/buildroot/toolchain/toolchain/toolchain.mk index b16db015..68babc3d 100644 --- a/bsp/buildroot/toolchain/toolchain/toolchain.mk +++ b/bsp/buildroot/toolchain/toolchain/toolchain.mk @@ -21,8 +21,10 @@ TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO # IFF_DORMANT and IFF_ECHO, add another macro to suppress them in the # kernel header, and avoid macro/enum conflict. # +# Kernel version 3.12 introduced the libc-compat.h header. +# # [1] http://www.openwall.com/lists/musl/2015/10/08/2 -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12),yy) define TOOLCHAIN_MUSL_KERNEL_HEADERS_COMPATIBILITY_HACK $(SED) 's/^#if defined(__GLIBC__)$$/#if 1/' \ $(STAGING_DIR)/usr/include/linux/libc-compat.h