diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-11-21 13:50:44 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-11-21 17:52:26 -0800 |
commit | 80d4d7538a85123603eea3d87542c1c0433febb7 (patch) | |
tree | 80f40a150ceb299bdeed6feed8dfd54d2d3a4aa5 /meta-oe/recipes-extended | |
parent | 8de5a24311ae8b3b5042996b4271c4f713f15082 (diff) | |
download | meta-openembedded-80d4d7538a85123603eea3d87542c1c0433febb7.tar.gz |
sanlock: Replace cp -a with cp -R --no-dereference
helps to stop leaking builder's UID into sstate cache
Fixes
Exception: KeyError: 'getpwuid(): uid not found: 6000'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r-- | meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch | 51 | ||||
-rw-r--r-- | meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb | 4 |
2 files changed, 54 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch b/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch new file mode 100644 index 000000000..a0b721c46 --- /dev/null +++ b/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 78a9cffb1c760466933bbbcbae7ecb9b30a3e6a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Nov 2019 13:47:42 -0800 | ||
4 | Subject: [PATCH] sanlock: Replace "cp -a" with "cp -R --no-dereference | ||
5 | --preserve=mode, links" | ||
6 | |||
7 | Using "cp -a" leaks UID of user running the builds | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/Makefile | 8 ++++---- | ||
14 | wdmd/Makefile | 4 ++-- | ||
15 | 2 files changed, 6 insertions(+), 6 deletions(-) | ||
16 | |||
17 | diff --git a/src/Makefile b/src/Makefile | ||
18 | index 533dd79..2fc9ba5 100644 | ||
19 | --- a/src/Makefile | ||
20 | +++ b/src/Makefile | ||
21 | @@ -127,9 +127,9 @@ install: all | ||
22 | $(INSTALL) -c -m 755 $(LIBSO_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR) | ||
23 | $(INSTALL) -c -m 644 $(LIBPC_ENTIRE_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig | ||
24 | $(INSTALL) -c -m 644 $(LIBPC_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig | ||
25 | - cp -a $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
26 | - cp -a $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
27 | - cp -a $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
28 | - cp -a $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
29 | + cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
30 | + cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
31 | + cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
32 | + cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
33 | $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) | ||
34 | $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/ | ||
35 | diff --git a/wdmd/Makefile b/wdmd/Makefile | ||
36 | index 5849efc..4894517 100644 | ||
37 | --- a/wdmd/Makefile | ||
38 | +++ b/wdmd/Makefile | ||
39 | @@ -68,7 +68,7 @@ install: all | ||
40 | $(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8 | ||
41 | $(INSTALL) -c -m 755 $(CMD_TARGET) $(DESTDIR)/$(BINDIR) | ||
42 | $(INSTALL) -c -m 755 $(SHLIB_TARGET) $(DESTDIR)/$(LIBDIR) | ||
43 | - cp -a $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
44 | - cp -a $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
45 | + cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) | ||
46 | + cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) | ||
47 | $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) | ||
48 | $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8 | ||
49 | -- | ||
50 | 2.24.0 | ||
51 | |||
diff --git a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb index 8e411e496..bf7eaf411 100644 --- a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb +++ b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb | |||
@@ -11,7 +11,9 @@ SECTION = "utils" | |||
11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" | 11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
12 | LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" | 12 | LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" |
13 | 13 | ||
14 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http" | 14 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ |
15 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ | ||
16 | " | ||
15 | SRCREV = "7afe0e66f5c7f24894896fad20ffa6f39733d80f" | 17 | SRCREV = "7afe0e66f5c7f24894896fad20ffa6f39733d80f" |
16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
17 | 19 | ||