packages: bump to fix openssl 1.1

This commit is contained in:
LEAN-ESX 2019-10-28 07:55:33 -07:00
parent 6fc9b07140
commit be04f253b3
11 changed files with 363 additions and 204 deletions

View File

@ -3,7 +3,7 @@
# See /LICENSE for more information.
#
#
#
# Original Boost 1.51 Makefile by Mirko Vogt <mirko@openwrt.org>
# Dude, this "boost" is really one of the most crude stuff I ported yet.
#
@ -11,18 +11,23 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=boost
PKG_VERSION:=1.69.0
PKG_SOURCE_VERSION:=1_69_0
PKG_RELEASE:=3
PKG_VERSION:=1.71.0
PKG_SOURCE_VERSION:=1_71_0
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
PKG_HASH:=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE_1_0.txt
PKG_CPE_ID:=cpe:/a:boost:boost
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
PKG_HASH:=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
@ -33,37 +38,25 @@ define Package/boost/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Boost C++ source library
URL:=http://www.boost.org
URL:=https://www.boost.org
DEPENDS:=+libstdcpp +libpthread +librt
endef
define Package/boost/description
This package provides the Boost v1.69.0 libraries.
This package provides the Boost v1.71.0 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
-----------------------------------------------------------------------------
| Warning |
| In order to build all of the Boost Libraries, it is necessary |
| to use, at least, GCC version 5 (C++14 support) and, it is necessary to |
| compile the kernel with Full Language Support. |
| Without these requirerements, the following libs will not be available: |
| - Boost.Locale |
| - Boost.Coroutine2 (header-only library - requires C++11) |
| - Boost.Fiber (requires C++14) |
-----------------------------------------------------------------------------
This package provides the following run-time libraries:
- atomic
- chrono
- container
- context
- contract
- coroutine (Deprecated - use Coroutine2)
- - coroutine2 (Requires GCC v5 and up)
- contract
- coroutine and coroutine2 (Coroutine is deprecated - use Coroutine2)
- date_time
- exception
- filesystem
- fiber (Requires GCC v5 and up)
- fiber
- graph
- - graph-parallel
- iostreams
@ -84,7 +77,7 @@ This package provides the following run-time libraries:
- wave
There are many more header-only libraries supported by Boost.
See more at http://www.boost.org/doc/libs/1_69_0/
See more at http://www.boost.org/doc/libs/1_71_0/
endef
PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
@ -124,6 +117,22 @@ define Package/boost
endef
define Package/boost/config
# Invisible config dependency
config boost-context-exclude
bool
default y if (TARGET_arc700 || TARGET_archs38 || TARGET_octeon || TARGET_octeontx)
default n
config boost-coroutine-exclude
bool
default y if boost-context-exclude
default n
config boost-fiber-exclude
bool
default y if (TARGET_ar7 || TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || TARGET_lantiq_ase || TARGET_rb532 || mips32 || mips64 || boost-coroutine-exclude)
default n
menu "Select Boost Options"
depends on PACKAGE_boost
comment "Boost compilation options."
@ -142,17 +151,17 @@ define Package/boost/config
cannot be redefined by another shared library or executable. This mode is
not supported on some platforms, for example OS X.
-> Hidden:
- Hidden symbols are not exported from shared libraries and cannot be
- Hidden symbols are not exported from shared libraries and cannot be
redefined by a different shared library or executable loaded in a process.
In this mode, public symbols have to be explicitly marked in the source code
to be exported from shared libraries. This is the recommended mode.
config boost-compile-visibility-global
bool "Global"
config boost-compile-visibility-protected
bool "Protected"
config boost-compile-visibility-hidden
bool "Hidden"
endchoice
@ -171,10 +180,10 @@ define Package/boost/config
config boost-shared-libs
bool "Shared"
config boost-static-libs
bool "Static"
config boost-static-and-shared-libs
bool "Both"
endchoice
@ -189,18 +198,18 @@ define Package/boost/config
- Not available if Shared libs are to be built.
-> Use both runtimes.
- Not available if Shared libs are to be built.
- Two separate versions of Boost are built, linking each to a different runtime.
- Two separate versions of Boost are built, linking each to a different runtime.
- This option requires "Use tagged names" option to be active.
config boost-runtime-shared
bool "Shared"
config boost-runtime-static
depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
bool "Static"
depends on (!boost-shared-libs && !boost-static-and-shared-libs)
bool "Static"
config boost-runtime-static-and-shared
depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
depends on (boost-use-name-tags && !boost-shared-libs && !boost-static-and-shared-libs)
bool "Both"
endchoice
@ -211,7 +220,7 @@ define Package/boost/config
Chooses which boost variant should be selected:
-> Release: Optimizes Boost for release.
- Optimization: Speed; Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
-> Debug:
-> Debug:
- Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
-> Profile:
- Profiling: On; Debug Symbols: On.
@ -228,7 +237,7 @@ define Package/boost/config
config boost-use-name-tags
bool "Use tagged names."
help
help
Add name tags the lib files, to diferentiate each library version:
"-mt" for multi-threading.
"-d" for debugging.
@ -237,16 +246,16 @@ define Package/boost/config
default n
config boost-single-thread
depends on @boost-use-name-tags
depends on boost-use-name-tags
bool "Single thread Support."
help
help
Compile Boost libraries in single-thread mode.
default n
config boost-build-type-complete
depends on @boost-use-name-tags
depends on boost-use-name-tags
bool "Complete Boost Build."
help
help
Builds both release and debug libs. It will take much longer to compile.
default n
endmenu
@ -260,29 +269,17 @@ define Package/boost/config
default m if ALL
select PACKAGE_boost-libs
select boost-test-pkg
select boost-coroutine2
select boost-graph-parallel
# Invisible config dependency
config boost-fiber-exclude
bool
default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
config boost-test-pkg
bool "Boost test package."
default m if ALL
select PACKAGE_boost-test
config boost-coroutine2
depends on !@GCC_VERSION_4_8
bool "Boost couroutine2 support."
select PACKAGE_boost-coroutine
default n
config boost-graph-parallel
bool "Boost parallel graph support."
select PACKAGE_boost-graph
default n
default m if ALL
$(foreach lib,$(BOOST_LIBS), \
config PACKAGE_boost-$(lib)
@ -290,10 +287,11 @@ define Package/boost/config
default m if ALL
$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
$(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
$(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
$(if $(findstring fiber,$(lib)),depends on !boost-fiber-exclude,)\
$(if $(findstring context,$(lib)),depends on !boost-context-exclude,)
$(if $(findstring coroutine,$(lib)),depends on !boost-coroutine-exclude,)
)
endmenu
endef
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
@ -331,41 +329,46 @@ define DefineBoostLibrary
endef
endef
$(eval $(call DefineBoostLibrary,atomic,system,))
$(eval $(call DefineBoostLibrary,chrono,system,))
$(eval $(call DefineBoostLibrary,container,,))
$(eval $(call DefineBoostLibrary,context,chrono system thread,))
$(eval $(call DefineBoostLibrary,contract,system,))
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
$(eval $(call DefineBoostLibrary,date_time,,))
$(eval $(call DefineBoostLibrary,atomic,system))
$(eval $(call DefineBoostLibrary,chrono,system))
$(eval $(call DefineBoostLibrary,container))
$(eval $(call DefineBoostLibrary,context,chrono system,,!boost-context-exclude))
$(eval $(call DefineBoostLibrary,contract,system))
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,,!boost-coroutine-exclude))
$(eval $(call DefineBoostLibrary,date_time))
#$(eval $(call DefineBoostLibrary,exception,,))
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
$(eval $(call DefineBoostLibrary,filesystem,system))
$(eval $(call DefineBoostLibrary,graph,regex))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
$(eval $(call DefineBoostLibrary,math,,))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex))
$(eval $(call DefineBoostLibrary,math))
#$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
$(eval $(call DefineBoostLibrary,program_options,,))
$(eval $(call DefineBoostLibrary,program_options))
$(eval $(call DefineBoostLibrary,python,,,PACKAGE_python))
$(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
$(eval $(call DefineBoostLibrary,random,system,))
$(eval $(call DefineBoostLibrary,regex,,))
$(eval $(call DefineBoostLibrary,serialization,,))
$(eval $(call DefineBoostLibrary,wserialization,serialization,))
$(eval $(call DefineBoostLibrary,stacktrace,,))
$(eval $(call DefineBoostLibrary,system,,))
$(eval $(call DefineBoostLibrary,thread,system chrono atomic,))
$(eval $(call DefineBoostLibrary,random,system))
$(eval $(call DefineBoostLibrary,regex))
$(eval $(call DefineBoostLibrary,serialization))
$(eval $(call DefineBoostLibrary,wserialization,serialization))
$(eval $(call DefineBoostLibrary,stacktrace))
$(eval $(call DefineBoostLibrary,system))
$(eval $(call DefineBoostLibrary,thread,system chrono atomic))
$(eval $(call DefineBoostLibrary,timer,chrono))
$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread))
$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem))
include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
# b2 does not provide a configure-script nor a Makefile
( cd $(HOST_BUILD_DIR)/tools/build/src/engine ; ./build.sh gcc )
( cd $(HOST_BUILD_DIR) ; \
./bootstrap.sh --prefix=$(STAGING_DIR_HOSTPKG) \
--with-libraries=context,filesystem,program_options,regex,system ;\
./b2 --ignore-site-config install )
endef
CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
@ -374,7 +377,7 @@ TARGET_LDFLAGS += -pthread -lrt
TARGET_CFLAGS += \
$(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_USE_VERSION_5),-std=gnu++14,-std=gnu++17)
ifneq ($(findstring mips,$(ARCH)),)
BOOST_ABI = o32
@ -392,14 +395,14 @@ endif
comma := ,
define Build/Compile
$(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
$(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu type $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
( cd $(PKG_BUILD_DIR) ; \
echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
b2 \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
--toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-compile-visibility-global), visibility=global,) \
$(if $(CONFIG_boost-compile-visibility-protected), visibility=protected,) \
@ -435,14 +438,14 @@ define Build/Compile
-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
install ;\
$(if $(CONFIG_PACKAGE_boost-python), \
echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
tools/build/src/user-config.jam; \
b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
--toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-variant-release), variant=release,) \
$(if $(CONFIG_boost-variant-debug), variant=debug,) \
@ -461,14 +464,14 @@ define Build/Compile
install ;\
,) \
$(if $(CONFIG_PACKAGE_boost-python3), \
echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
tools/build/src/user-config.jam; \
b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
--toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-variant-release), variant=release,) \
$(if $(CONFIG_boost-variant-debug), variant=debug,) \
@ -499,13 +502,13 @@ define Build/InstallDev
# copies _all_ header files - independent of <--with-library>-argument above
$(INSTALL_DIR) $(1)/usr/lib
# copies all compiled archive and shared object files
$(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/ || :
# copies all cmake files, compiled archive and shared object files
$(CP) -v $(PKG_INSTALL_DIR)/lib/{*.{a,so*},cmake} $(1)/usr/lib/ || :
endef
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
$(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
$(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/b2 $(STAGING_DIR_HOSTPKG)/bin/
endef
define Package/boost/Default/install
@ -524,7 +527,7 @@ endef
define BuildBoostLibrary
define Package/boost-$(1)/install
$(call Package/boost/Default/install,$$(1),$(1))
$(call Package/boost/Default/install,$$(1),$(1))
endef
$$(eval $$(call BuildPackage,boost-$(1)))

View File

@ -0,0 +1,43 @@
--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -23,11 +23,11 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# include <asm/unistd.h>
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# include <sys/eventfd.h>
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
#include <boost/asio/detail/cstdint.hpp>
#include <boost/asio/detail/eventfd_select_interrupter.hpp>
#include <boost/asio/detail/throw_error.hpp>
@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele
void eventfd_select_interrupter::open_descriptors()
{
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
if (read_descriptor_ != -1)
{
::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
}
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
write_descriptor_ = read_descriptor_ =
::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de
::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
}
}
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
if (read_descriptor_ == -1)
{

View File

@ -0,0 +1,71 @@
From 83b989ecee478be083db8dc0cc7a5387615bd3cb Mon Sep 17 00:00:00 2001
From: Andrey Semashev <andrey.semashev@gmail.com>
Date: Wed, 31 Jul 2019 16:28:05 +0300
Subject: [PATCH] Added support for utimensat for better POSIX.1-2008
compliance.
POSIX.1-2008 marks utime as obsolete and replaces it with utimensat.
uClibc-ng has an option for removing utime, including the corresponding
header.
Closes https://github.com/boostorg/filesystem/pull/115.
---
libs/filesystem/src/operations.cpp | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/operations.cpp b/src/operations.cpp
index 9bba1cf7a..038109d35 100644
--- a/libs/filesystem/src/operations.cpp
+++ b/libs/filesystem/src/operations.cpp
@@ -62,7 +62,7 @@
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
+# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this
#endif
#include <boost/filesystem/operations.hpp>
@@ -119,7 +119,9 @@ using std::wstring;
# include <dirent.h>
# include <unistd.h>
# include <fcntl.h>
-# include <utime.h>
+# if _POSIX_C_SOURCE < 200809L
+# include <utime.h>
+# endif
# include "limits.h"
# else // BOOST_WINDOW_API
@@ -1451,6 +1453,22 @@ namespace detail
system::error_code* ec)
{
# ifdef BOOST_POSIX_API
+# if _POSIX_C_SOURCE >= 200809L
+
+ struct timespec times[2] = {};
+
+ // Keep the last access time unchanged
+ times[0].tv_nsec = UTIME_OMIT;
+
+ times[1].tv_sec = new_time;
+
+ if (BOOST_UNLIKELY(::utimensat(AT_FDCWD, p.c_str(), times, 0) != 0))
+ {
+ error(BOOST_ERRNO, p, ec, "boost::filesystem::last_write_time");
+ return;
+ }
+
+# else // _POSIX_C_SOURCE >= 200809L
struct stat path_stat;
if (error(::stat(p.c_str(), &path_stat)!= 0,
@@ -1462,6 +1480,8 @@ namespace detail
error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0,
p, ec, "boost::filesystem::last_write_time");
+# endif // _POSIX_C_SOURCE >= 200809L
+
# else
handle_wrapper hw(

View File

@ -0,0 +1,21 @@
--- a/boost/math/tools/roots.hpp
+++ b/boost/math/tools/roots.hpp
@@ -665,8 +665,8 @@ namespace detail
inline T discriminant(T const & a, T const & b, T const & c)
{
T w = 4*a*c;
- T e = std::fma(-c, 4*a, w);
- T f = std::fma(b, b, -w);
+ T e = fma(-c, 4*a, w);
+ T f = fma(b, b, -w);
return f + e;
}
}
@@ -674,7 +674,6 @@ namespace detail
template<class T>
auto quadratic_roots(T const& a, T const& b, T const& c)
{
- using std::copysign;
using std::sqrt;
if constexpr (std::is_integral<T>::value)
{

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libxml2
PKG_VERSION:=2.9.8
PKG_RELEASE:=4
PKG_VERSION:=2.9.9
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://xmlsoft.org/sources/
PKG_HASH:=0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732
PKG_HASH:=94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
@ -40,6 +40,34 @@ define Package/libxml2/description
A library for manipulating XML and HTML resources.
endef
define Package/libxml2-dev
SECTION:=devel
CATEGORY:=Development
SUBMENU:=Libraries
TITLE:=Development files for libxml2
URL:=http://xmlsoft.org/
DEPENDS:=+libxml2
endef
define Package/libxml2-dev/description
A library for manipulating XML and HTML resources.
This package contains the headers and xml2-config binary.
endef
define Package/libxml2-utils
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XML command line utilities (xmllint...)
URL:=http://xmlsoft.org/
DEPENDS:=+libxml2
endef
define Package/libxml2-utils/description
This package contains the binaries xmllint and xmlcatalog
from libxml2, a library for manipulating XML and HTML resources.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
@ -130,13 +158,35 @@ endef
define Package/libxml2/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
endef
define Host/Install
$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
$(call Host/Install/Default)
define Package/libxml2-dev/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
$(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
$(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
$(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
$(INSTALL_DIR) $(1)/usr/share/aclocal
$(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
endef
define Package/libxml2-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libxml2))
$(eval $(call BuildPackage,libxml2-dev))
$(eval $(call BuildPackage,libxml2-utils))

View File

@ -1,50 +0,0 @@
From 2240fbf5912054af025fb6e01e26375100275e74 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Mon, 30 Jul 2018 13:14:11 +0200
Subject: [PATCH 13/13] Fix infinite loop in LZMA decompression
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Check the liblzma error code more thoroughly to avoid infinite loops.
Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914
This is CVE-2018-9251 and CVE-2018-14567.
Thanks to Dongliang Mu and Simon Wörner for the reports.
---
xzlib.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/xzlib.c b/xzlib.c
index a839169e..0ba88cfa 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -562,6 +562,10 @@ xz_decomp(xz_statep state)
"internal error: inflate stream corrupt");
return -1;
}
+ /*
+ * FIXME: Remapping a couple of error codes and falling through
+ * to the LZMA error handling looks fragile.
+ */
if (ret == Z_MEM_ERROR)
ret = LZMA_MEM_ERROR;
if (ret == Z_DATA_ERROR)
@@ -587,6 +591,11 @@ xz_decomp(xz_statep state)
xz_error(state, LZMA_PROG_ERROR, "compression error");
return -1;
}
+ if ((state->how != GZIP) &&
+ (ret != LZMA_OK) && (ret != LZMA_STREAM_END)) {
+ xz_error(state, ret, "lzma error");
+ return -1;
+ }
} while (strm->avail_out && ret != LZMA_STREAM_END);
/* update available output and crc check value */
--
2.18.0

View File

@ -7,19 +7,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=aria2
PKG_VERSION:=1.34.0
PKG_RELEASE:=2
PKG_VERSION:=1.35.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
PKG_HASH:=3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3
PKG_HASH:=1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
Hsing-Wang Liao <kuoruan@gmail.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:tatsuhiro_tsujikawa:aria2
PKG_CONFIG_DEPENDS := \
CONFIG_ARIA2_NOSSL \

View File

@ -79,11 +79,11 @@ append_setting() {
append_header() {
local h="$1"
[ -n "$h" ] && \
echo "header=\"${h}\"" >>"$config_file_tmp"
echo "header=\"$h\"" >>"$config_file_tmp"
}
aria2_validate() {
uci_validate_section "$NAME" aria2 "$1" \
uci_load_validate "$NAME" aria2 "$1" "$2" \
'enabled:bool:0' \
'enable_logging:bool' \
'enable_proxy:bool' \
@ -94,6 +94,9 @@ aria2_validate() {
'all_proxy_user:string' \
'auto_save_interval:range(0,600)' \
'bt_enable_lpd:or("true","false")' \
'bt_detach_seed_only:or("true","false")' \
'bt_load_saved_metadata:or("true","false")' \
'bt_prioritize_piece:string' \
'bt_max_open_files:uinteger' \
'bt_max_peers:uinteger' \
'bt_remove_unselected_file:or("true","false")' \
@ -105,6 +108,7 @@ aria2_validate() {
'ca_certificate:file' \
'certificate:file' \
'check_certificate:or("true","false"):true' \
'check_integrity:or("true","false")' \
'connect_timeout:uinteger' \
'dht_listen_port:string' \
'dir:string' \
@ -154,39 +158,39 @@ aria2_validate() {
aria2_start() {
local section="$1"
aria2_validate "$section" || { _err "Validation failed."; return 1; }
[ "$2" = "0" ] || { _err "Validation failed."; return 1; }
[ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; }
[ -n "$dir" ] || { _err "Please set downlod dir."; return 1; }
[ -d "$dir" ] || { _err "Please create downlod dir first."; return 1; }
[ "$enabled" = "1" ] || { _info "Instance \"$section\" disabled."; return 1; }
[ -n "$dir" ] || { _err "Please set download dir."; return 1; }
[ -d "$dir" ] || { _err "Please create download dir first."; return 1; }
config_file="${config_dir}/${NAME}.conf.${section}"
config_file_tmp="${config_dir}/${NAME}.conf.tmp"
session_file="${config_dir}/${NAME}.session.${section}"
config_file="$config_dir/$NAME.conf.$section"
config_file_tmp="$config_dir/$NAME.conf.tmp"
session_file="$config_dir/$NAME.session.$section"
_make_dir "$config_dir" || {
_err "Can't create config dir: ${config_dir}"
_err "Can't create config dir: $config_dir"
return 1
}
_create_file "$session_file" "$config_file" "$config_file_tmp" || {
_err "Can't create files: ${session_file}, ${config_file}, ${config_file_tmp}"
_err "Can't create files: $session_file, $config_file, $config_file_tmp"
return 1
}
# create tmp file
cat >"$config_file_tmp" <<-EOF
# Auto generated file, changes to this file will lost.
# Auto generated file, changes to this file will be lost.
EOF
append_setting "dir=${dir}"
append_setting "dir=$dir"
append_setting "enable-rpc=true"
append_setting "rpc-allow-origin-all=true"
append_setting "rpc-listen-all=true"
append_setting "quiet=true"
append_setting "continue=true"
append_setting "input-file=${session_file}"
append_setting "save-session=${session_file}"
append_setting "input-file=$session_file"
append_setting "save-session=$session_file"
if [ -z "$enable_logging" ]; then
append_options "log" "log_level"
@ -197,14 +201,14 @@ aria2_start() {
log_dir="$(dirname "$log")"
_make_dir "$log_dir" || {
_err "Can't create log dir: ${log_dir}"
_err "Can't create log dir: $log_dir"
return 1
}
# create or clear log file
echo >"$log"
append_setting "log=${log}"
append_setting "log=$log"
append_options "log_level"
fi
@ -214,30 +218,30 @@ aria2_start() {
unset_auth_method() {
uci -q batch <<-EOF
set ${NAME}.${section}.rpc_auth_method=""
set $NAME.$section.rpc_auth_method=""
commit $NAME
EOF
}
if [ -z "$rpc_auth_method" ]; then
if [ -n "$rpc_secret" ]; then
append_setting "rpc-secret=${rpc_secret}"
append_setting "rpc-secret=$rpc_secret"
elif [ -n "$rpc_user" ]; then
append_setting "rpc-user=${rpc_user}"
append_setting "rpc-passwd=${rpc_passwd}"
append_setting "rpc-user=$rpc_user"
append_setting "rpc-passwd=$rpc_passwd"
else
_info "It is recommand to set RPC secret."
_info "It is recommended to set RPC secret."
fi
elif [ "$rpc_auth_method" = "token" ]; then
if [ -n "$rpc_secret" ]; then
append_setting "rpc-secret=${rpc_secret}"
append_setting "rpc-secret=$rpc_secret"
else
unset_auth_method
fi
elif [ "$rpc_auth_method" = "user_pass" ]; then
if [ -n "$rpc_user" ]; then
append_setting "rpc-user=${rpc_user}"
append_setting "rpc-passwd=${rpc_passwd}"
append_setting "rpc-user=$rpc_user"
append_setting "rpc-passwd=$rpc_passwd"
else
_info "Please set RPC user."
unset_auth_method
@ -257,25 +261,25 @@ aria2_start() {
fi
if [ ."$enable_dht" = ."true" ]; then
dht_file="${config_dir}/dht.dat.${section}"
dht_file="$config_dir/dht.dat.$section"
_create_file "$dht_file" || {
_err "Can't create DHT file: ${dht_file}"
_err "Can't create DHT file: $dht_file"
return 1
}
append_setting "enable-dht=true"
append_setting "dht-file-path=${dht_file}"
append_setting "dht-file-path=$dht_file"
fi
if [ ."$enable_dht6" = ."true" ] && [ ."$disable_ipv6" != ."true" ]; then
dht6_file="${config_dir}/dht6.dat.${section}"
dht6_file="$config_dir/dht6.dat.$section"
_create_file "$dht6_file" || {
_err "Can't create DHT6 file: ${dht6_file}"
_err "Can't create DHT6 file: $dht6_file"
return 1
}
append_setting "enable-dht6=true"
append_setting "dht-file-path6=${dht6_file}"
append_setting "dht-file-path6=$dht6_file"
fi
if [ -n "$bt_tracker" ]; then
@ -284,18 +288,20 @@ aria2_start() {
if [ -z "$bt_tracker_list" ]; then
bt_tracker_list="$t"
else
bt_tracker_list="${bt_tracker_list},${t}"
bt_tracker_list="$bt_tracker_list,$t"
fi
done
append_setting "bt-tracker=${bt_tracker_list}"
append_setting "bt-tracker=$bt_tracker_list"
fi
append_options "auto_save_interval" "bt_enable_lpd" "bt_max_open_files" "bt_max_peers" \
"bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_save_metadata" "bt_seed_unverified" \
"bt_stop_timeout" "certificate" "connect_timeout" "dht_listen_port" "disable_ipv6" "disk_cache" \
"enable_peer_exchange" "event_poll" "file_allocation" "follow_torrent" "force_save" "http_accept_gzip" \
"http_no_cache" "listen_port" "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
"bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_prioritize_piece" \
"bt_stop_timeout" "bt_detach_seed_only" "bt_save_metadata" "bt_load_saved_metadata" \
"bt_seed_unverified" "certificate" "check_integrity" "connect_timeout" "dht_listen_port" \
"disable_ipv6" "disk_cache" "enable_peer_exchange" "event_poll" "file_allocation" \
"follow_torrent" "force_save" "http_accept_gzip" "http_no_cache" "listen_port" \
"lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
"max_download_limit" "max_overall_download_limit" "max_overall_upload_limit" "max_tries" \
"max_upload_limit" "min_split_size" "pause" "pause_metadata" "peer_id_prefix" "private_key" \
"retry_wait" "rpc_listen_port" "save_session_interval" "seed_ratio" "seed_time" "split" "timeout" \
@ -312,19 +318,19 @@ aria2_start() {
if [ -n "$user" ]; then
if ( user_exists "$user" && _change_owner "$user" "$config_dir" "$log" ); then
_info "Aria2 will run with user '${user}'."
_info "Aria2 will run with user '$user'."
if [ "$user" != "root" ]; then
_info "Please make sure user '${user}' has write access to download dir: ${dir}"
_info "Please make sure user '$user' has write access to download dir: $dir"
fi
else
_info "Set run user to '${user}' failed, default user will be used."
_info "Setting run user to '$user' failed, default user will be used."
user=
fi
fi
procd_open_instance "${NAME}.${section}"
procd_open_instance "$NAME.$section"
procd_set_param command "$PROG"
procd_append_param command --conf-path="${config_file}"
procd_append_param command --conf-path="$config_file"
procd_set_param respawn
procd_set_param stdout 1
@ -334,7 +340,7 @@ aria2_start() {
[ -n "$user" ] && \
procd_set_param user "$user"
procd_add_jail "${NAME}.${section}" log
procd_add_jail "$NAME.$section" log
procd_add_jail_mount "$config_file"
procd_add_jail_mount_rw "$dir" "$config_dir" "$log"
procd_close_instance
@ -342,9 +348,10 @@ aria2_start() {
service_triggers() {
procd_add_reload_trigger "$NAME"
procd_add_validation aria2_validate
}
start_service() {
config_load "$NAME"
config_foreach aria2_start "aria2"
config_foreach aria2_validate "aria2" aria2_start
}

View File

@ -8,19 +8,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p11
PKG_RELEASE:=1
PKG_VERSION:=4.2.8p13
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
PKG_HASH:=f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e
PKG_HASH:=288772cecfcd9a53694ffab108d1825a31ba77f3a8466b0401baeca3bc232a38
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
PKG_CPE_ID:=cpe:/a:ntp:ntp
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
PKG_CHECK_FORMAT_SECURITY:=0
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
@ -31,7 +33,7 @@ define Package/ntpd/Default
TITLE:=ISC ntp
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
URL:=http://www.ntp.org/
DEPENDS:=+libopenssl +libpthread +libcap
DEPENDS:=+libopenssl +libpthread +libcap +libevent2-pthreads
endef
define Package/ntpd/Default/description
@ -78,7 +80,6 @@ endef
define Package/ntp-keygen
$(call Package/ntpd/Default)
TITLE+=keygen
DEPENDS+= +libevent2-core
endef
define Package/ntp-keygen/description

View File

@ -8,7 +8,7 @@ USE_PROCD=1
PROG=/sbin/ntpd
HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper
config_file=/var/run/ntpd.conf
config_file=/var/etc/ntpd.conf
trunc() {
echo -n "" > $config_file
@ -19,15 +19,15 @@ emit() {
}
validate_ntp_section() {
uci_validate_section system timeserver "${1}" \
uci_load_validate system timeserver "$1" "$2" \
'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' \
'interface:list(string)'
}
start_service() {
local server enabled enable_server interface intf
start_ntpd_instance() {
local intf i
validate_ntp_section ntp || {
[ "$2" = 0 ] || {
echo "validation failed"
return 1
}
@ -85,3 +85,12 @@ start_service() {
procd_set_param command $HOTPLUG_HELPER
procd_close_instance
}
start_service() {
validate_ntp_section ntp start_ntpd_instance
}
service_triggers() {
procd_add_reload_trigger "system"
procd_add_validation validate_ntp_section
}

View File

@ -3,7 +3,9 @@
START=60
STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
DEFAULT_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
CFG_SERVERS=$(uci -q get system.ntp.server)
STEP_SERVERS=${CFG_SERVERS:-$DEFAULT_SERVERS}
TIMEOUT="2" # in seconds
start() {