diff options
Diffstat (limited to 'meta/recipes-support/serf')
6 files changed, 174 insertions, 35 deletions
diff --git a/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch new file mode 100644 index 0000000000..cec881ee1c --- /dev/null +++ b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch @@ -0,0 +1,27 @@ +From e51b4b37916dd20b13133cb7af16601b6bf3ace9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 3 Sep 2018 10:54:54 -0700 +Subject: [PATCH] SConstruct: Fix path quoting for .def generator + +Patch by: Martin Keller <m.keller{_AT_}codesys.com> +Upstream-Status: Backport +[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1807594&r2=1809132] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + SConstruct | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index 18a45fa..571bdce 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -160,7 +160,7 @@ env = Environment(variables=opts, + + env.Append(BUILDERS = { + 'GenDef' : +- Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', ++ Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,), + suffix='.def', src_suffix='.h') + }) + diff --git a/meta/recipes-support/serf/serf/0003-gen_def.patch b/meta/recipes-support/serf/serf/0003-gen_def.patch new file mode 100644 index 0000000000..0ea2cca9df --- /dev/null +++ b/meta/recipes-support/serf/serf/0003-gen_def.patch @@ -0,0 +1,27 @@ +From 98e793d9f2250e7c1f9f1eb5dfd616a6a8829e9a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 3 Sep 2018 11:12:27 -0700 +Subject: [PATCH] gen_def + +This is partial port because half of this patch is already present in our +patches + +Upstream-Status: Backport [https://github.com/apache/serf/commit/8f07c9626106873a594fd07e7c257e9080d8660b] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + SConstruct | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/SConstruct b/SConstruct +index 571bdce..877731e 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -158,6 +158,8 @@ env = Environment(variables=opts, + ENV = os.environ, + ) + ++gen_def_script = env.File('build/gen_def.py').rstr() ++ + env.Append(BUILDERS = { + 'GenDef' : + Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,), diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch new file mode 100644 index 0000000000..c8e6eddfec --- /dev/null +++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch @@ -0,0 +1,71 @@ +stop scons trying to create directories in hosts rootfs + +* since 1522f09a4d serf: cleanup recipe + serf.do_install fails in builds with multilib enabled (with + libdir=/usr/lib64 on host where /usr/lib64 doesn't exist) + +DEBUG: Executing shell function do_install +scons: Reading SConscript files ... +PermissionError: [Errno 13] Permission denied: '/usr/lib64': + File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158: + ENV = os.environ, + File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965: + variables.Update(self) + File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227: + option.validator(option.key, env.subst('${%s}'%option.key), env) + File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60: + return PathVariable.PathIsDirCreate(key, val, env) + File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101: + os.makedirs(val) + File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221: + mkdir(name, mode) +ERROR: scons install execution failed. + +* I don't know how exactly --install-sandbox is supposed to work but + in this case it's trying to mkdir /usr/lib64 on the host rootfs + which is clearly wrong and if I set LIBDIR together with + --install-sandbox then the install paths are prefixed with $D twice + in some cases (not for includedir and empty libdir at the end). + So in the end I think it was an issue caused by the custom path + validator in serf's SConstruct, removing that stops touching host + and the installed paths (including the paths inside libserf*.pc) + look correct + +Upstream-Status: Inappropriate [removes block of code rather than fixing the problem in that block] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- serf-1.3.9/SConstruct 2019-06-18 15:49:19.968961108 +0000 ++++ serf-1.3.9b/SConstruct 2019-06-18 18:53:21.412337151 +0000 +@@ -51,17 +51,6 @@ + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +-# Custom path validator, creates directory when a specified option is set. +-# To be used to ensure a PREFIX directory is only created when installing. +-def createPathIsDirCreateWithTarget(target): +- def my_validator(key, val, env): +- build_targets = (map(str, BUILD_TARGETS)) +- if target in build_targets: +- return PathVariable.PathIsDirCreate(key, val, env) +- else: +- return PathVariable.PathAccept(key, val, env) +- return my_validator +- + # default directories + if sys.platform == 'win32': + default_incdir='..' +@@ -77,11 +66,11 @@ + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, +- createPathIsDirCreateWithTarget('install')), ++ PathVariable.PathAccept), + PathVariable('LIBDIR', + 'Directory to install architecture dependent libraries under', + default_libdir, +- createPathIsDirCreateWithTarget('install')), ++ PathVariable.PathAccept), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_incdir, diff --git a/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch index 380f5d00d2..c392444f7b 100644 --- a/meta/recipes-support/serf/serf/norpath.patch +++ b/meta/recipes-support/serf/serf/norpath.patch @@ -5,11 +5,11 @@ Upstream-Status: Inappropriate RP 2014/7/17 -Index: serf-1.3.6/SConstruct +Index: serf-1.3.9/SConstruct =================================================================== ---- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000 -+++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000 -@@ -218,8 +218,7 @@ +--- serf-1.3.9.orig/SConstruct ++++ serf-1.3.9/SConstruct +@@ -224,8 +224,7 @@ if sys.platform != 'win32': else: LIBNAMESTATIC = 'serf-${MAJOR}' @@ -17,9 +17,9 @@ Index: serf-1.3.6/SConstruct - PDB='${TARGET.filebase}.pdb') +env.Append(PDB='${TARGET.filebase}.pdb') - #for i in env: - # print(str(env[i])) -@@ -371,12 +370,6 @@ + if sys.platform == 'darwin': + # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) +@@ -385,12 +384,6 @@ if gssapi and CALLOUT_OKAY: if sys.platform == 'win32': env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) @@ -32,8 +32,8 @@ Index: serf-1.3.6/SConstruct # Set up the construction of serf-*.pc pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), env.File('build/serf.pc.in'), -@@ -446,7 +439,6 @@ - ENV={'PATH' : os.environ['PATH']})) +@@ -461,7 +454,6 @@ else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] # Find the (dynamic) library in this directory -tenv.Replace(RPATH=thisdir) diff --git a/meta/recipes-support/serf/serf_1.3.10.bb b/meta/recipes-support/serf/serf_1.3.10.bb new file mode 100644 index 0000000000..c6b51452aa --- /dev/null +++ b/meta/recipes-support/serf/serf_1.3.10.bb @@ -0,0 +1,40 @@ +SUMMARY = "High-Performance Asynchronous HTTP Client Library" +DESCRIPTION = "The Apache Serf library is a C-based HTTP client library built upon the Apache \ +Portable Runtime (APR) library. It multiplexes connections, running the \ +read/write communication asynchronously. Memory copies and transformations are \ +kept to a minimum to provide high performance operation." +HOMEPAGE = "http://serf.apache.org/" +SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://norpath.patch \ + file://env.patch \ + file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \ + file://0003-gen_def.patch \ + file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \ + " + +SRC_URI[sha256sum] = "be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +inherit scons + +DEPENDS += " openssl apr apr-util util-linux expat" + +EXTRA_OESCONS = " \ + LIBDIR=${libdir} \ + --install-sandbox=${D} \ + CC="${CC}" \ + CFLAGS="${CFLAGS}" \ + LINKFLAGS="${LDFLAGS}" \ + APR=`which apr-1-config` \ + APU=`which apu-1-config` \ + OPENSSL="${STAGING_EXECPREFIXDIR}" \ + " + +# scons creates non-reproducible archives +do_install:append() { + rm ${D}/${libdir}/*.a +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb deleted file mode 100644 index 2be5a069c4..0000000000 --- a/meta/recipes-support/serf/serf_1.3.9.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "High-Performance Asynchronous HTTP Client Library" -SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://norpath.patch \ - file://env.patch" - -SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57" -SRC_URI[sha256sum] = "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -DEPENDS = "python-scons-native openssl apr apr-util util-linux expat" - -do_compile() { - ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \ - CC="${CC}" \ - APR=`which apr-1-config` APU=`which apu-1-config` \ - CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \ - OPENSSL="${STAGING_EXECPREFIXDIR}" -} - -do_install() { - ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install -} - -BBCLASSEXTEND = "native" |