diff options
-rw-r--r-- | meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch | 71 | ||||
-rw-r--r-- | meta/recipes-support/serf/serf_1.3.9.bb | 1 |
2 files changed, 72 insertions, 0 deletions
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..91640d6044 --- /dev/null +++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | stop scons trying to create directories in hosts rootfs | ||
2 | |||
3 | * since 1522f09a4d serf: cleanup recipe | ||
4 | serf.do_install fails in builds with multilib enabled (with | ||
5 | libdir=/usr/lib64 on host where /usr/lib64 doesn't exist) | ||
6 | |||
7 | DEBUG: Executing shell function do_install | ||
8 | scons: Reading SConscript files ... | ||
9 | PermissionError: [Errno 13] Permission denied: '/usr/lib64': | ||
10 | File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158: | ||
11 | ENV = os.environ, | ||
12 | 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: | ||
13 | variables.Update(self) | ||
14 | 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: | ||
15 | option.validator(option.key, env.subst('${%s}'%option.key), env) | ||
16 | File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60: | ||
17 | return PathVariable.PathIsDirCreate(key, val, env) | ||
18 | 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: | ||
19 | os.makedirs(val) | ||
20 | File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221: | ||
21 | mkdir(name, mode) | ||
22 | ERROR: scons install execution failed. | ||
23 | |||
24 | * I don't know how exactly --install-sandbox is supposed to work but | ||
25 | in this case it's trying to mkdir /usr/lib64 on the host rootfs | ||
26 | which is clearly wrong and if I set LIBDIR together with | ||
27 | --install-sandbox then the install paths are prefixed with $D twice | ||
28 | in some cases (not for includedir and empty libdir at the end). | ||
29 | So in the end I think it was an issue caused by the custom path | ||
30 | validator in serf's SConstruct, removing that stops touching host | ||
31 | and the installed paths (including the paths inside libserf*.pc) | ||
32 | look correct | ||
33 | |||
34 | Upstream-Status: Pending | ||
35 | |||
36 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
37 | |||
38 | --- serf-1.3.9/SConstruct 2019-06-18 15:49:19.968961108 +0000 | ||
39 | +++ serf-1.3.9b/SConstruct 2019-06-18 18:53:21.412337151 +0000 | ||
40 | @@ -51,17 +51,6 @@ | ||
41 | """ | ||
42 | return (key, '%s' % (help), default, None, lambda val: _converter(val)) | ||
43 | |||
44 | -# Custom path validator, creates directory when a specified option is set. | ||
45 | -# To be used to ensure a PREFIX directory is only created when installing. | ||
46 | -def createPathIsDirCreateWithTarget(target): | ||
47 | - def my_validator(key, val, env): | ||
48 | - build_targets = (map(str, BUILD_TARGETS)) | ||
49 | - if target in build_targets: | ||
50 | - return PathVariable.PathIsDirCreate(key, val, env) | ||
51 | - else: | ||
52 | - return PathVariable.PathAccept(key, val, env) | ||
53 | - return my_validator | ||
54 | - | ||
55 | # default directories | ||
56 | if sys.platform == 'win32': | ||
57 | default_incdir='..' | ||
58 | @@ -77,11 +66,11 @@ | ||
59 | PathVariable('PREFIX', | ||
60 | 'Directory to install under', | ||
61 | default_prefix, | ||
62 | - createPathIsDirCreateWithTarget('install')), | ||
63 | + PathVariable.PathAccept), | ||
64 | PathVariable('LIBDIR', | ||
65 | 'Directory to install architecture dependent libraries under', | ||
66 | default_libdir, | ||
67 | - createPathIsDirCreateWithTarget('install')), | ||
68 | + PathVariable.PathAccept), | ||
69 | PathVariable('APR', | ||
70 | "Path to apr-1-config, or to APR's install area", | ||
71 | default_incdir, | ||
diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb index 92cd5ca061..dd4133a45c 100644 --- a/meta/recipes-support/serf/serf_1.3.9.bb +++ b/meta/recipes-support/serf/serf_1.3.9.bb | |||
@@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ | |||
6 | file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \ | 6 | file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \ |
7 | file://0003-gen_def.patch \ | 7 | file://0003-gen_def.patch \ |
8 | file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \ | 8 | file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \ |
9 | file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \ | ||
9 | " | 10 | " |
10 | 11 | ||
11 | SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57" | 12 | SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57" |