From patchwork Fri Nov 22 01:25:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179945 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp4407542ilf; Thu, 21 Nov 2019 17:25:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzk4lM659akZWyXt0cc/F11/jWv9oxGFmcIk5IqFixOEiH7G6d1vPM2ZlJr+kw9SzwvvxU0 X-Received: by 2002:a17:902:8e86:: with SMTP id bg6mr11654137plb.138.1574385954793; Thu, 21 Nov 2019 17:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574385954; cv=none; d=google.com; s=arc-20160816; b=bN51BfqVL1oA5C5BunYSYbYkRgB+baaS3w9Jh1By5DC7W+NsJ7mF6rhAl0pg3IfX6O g4fSAqUDv+z/0w/V5V02lwSehxOC3hDfKqZe2mFKEOR2PKc0yuDxuvex8uilYShSJJ0Y VmBWfyq67fLd3mlvPYCCzApmbb0B2erLiMGwLOfaZCXC9yg88qwot6wI1HHRFI341yjw dH3o8hfPOgPc4KwAb3Zgh7rJVX5jHBvaJQSGI0QvfFAuNTRqm6qWCcvIJbadS07V9L6Q 3nSnw9wMBfflECc+skWHoAH4XsxyGB6vss9UMYgIMObFcxVI51X7Vo/1dhNn4FYOVdSC Df2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=qCDXivk4wzgS13D+7irU10Uvx0rL5c1599Y4GVW31yc=; b=UYCfCL7WevsrAoAxJkv9TDL956WFAbMn6zxDchuqghYVhVuPVl1iCPf9EvfTtQQStf KPlvd3OnB1H3SLkXfDbizD1/mTTtEWrKV67HBUoiDDvW1K2Txu4rUvuN5I/p6iyZzqTe LPxnLsrgVMYFNq4SNosSGyqS4i9X0e6tcbItmuTmtQLBEqo9Rw8iYYutydRFGouqSWpr zUxtUoq2SsldGmXMi6BlYkG0/u5HWwCjv9olGj5FiY0nZeItVUwlt5A7lj375MRzjo3E wK5EoyZJhIUjWkpUkVxEE8CZSxHrjGvsSMLZ/UGCEnrvlAhFZPiqdOyLhZPSGCcrsIUz 5K3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=XQX5mj8C; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id z16si1458056pgh.2.2019.11.21.17.25.54; Thu, 21 Nov 2019 17:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=XQX5mj8C; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 6A4BC7FCA7; Fri, 22 Nov 2019 01:25:51 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mail.openembedded.org (Postfix) with ESMTP id 7F04D7FC91 for ; Fri, 22 Nov 2019 01:25:39 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id a16so2305990pjs.13 for ; Thu, 21 Nov 2019 17:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2D3JkjYCEEsdI1RvJIurp3bRrZ3d55qpzAZUFdFDF0U=; b=XQX5mj8CHcXAAeq30FCp+nwonmDilXII8XE2K2CB2WVGmLKZRqml5lETVhZdFlYRX2 E9j/RUsqF0drW3Lb04AFFXtAJ1vTNz22Nf1tFCVoBUT/ceyL71VKTYzXR7zN/GzSLWPK NKDwKDrTYSSzsxpHicZUs+YhFK+QTBtEgYdZjTmrdwWFeysDLDKrwJLLmJRU20xFWASe 1MMWYQ7quneiRkxuQhyADIfieOAidcxEkKImTmX0X4x4OJb/MLSbmASPBqGE20tJM/7Z 7TICqA5FU5nO4EYwH85UhH35kDWoxtzmUUOrA/wPSCxPjoUBLBP2LkTzI3lfhJfAOdop IdMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2D3JkjYCEEsdI1RvJIurp3bRrZ3d55qpzAZUFdFDF0U=; b=hIFsov+YheuK08Pu6SedZxWAAwXO/eZVqVPev+XnLPwxWJuQD08YaIq8XLUX7VuFxH kOHNwMPUHrElW1Ft1KVjncAzYQt8grPShfhV9oPn/L5kuCA5MuSATWLOh1ILaD3ULhLk I2JyqKvZdIFe2JRQAxeV+GzWhyxOP6QgY0ENcJyK4NYWf5QdqjNOzrKD61F1zgMfly58 dROcl4iRZp4XRnEW8AdrDgEFTCcSoKQkw1E+ZRxcJaPekOleoj2bMjCHZdXV/2atSDwz Kldxv11OVw1icboYBXk3x7HX/EKZKHJ1IS6uDWrgnXX4E9c2UsItIZC+VfhN/TFMnMbi osYw== X-Gm-Message-State: APjAAAV6Q7qbCTKQzjtCT3G9Gk5uXamb5KTVWao2v983qkmnxuO1VwYG T6cFWkpGFCAswzzYniJGAqaH3PpyW28= X-Received: by 2002:a17:90a:3808:: with SMTP id w8mr15477079pjb.143.1574385940198; Thu, 21 Nov 2019 17:25:40 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::d61]) by smtp.gmail.com with ESMTPSA id 82sm4953635pfa.115.2019.11.21.17.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 17:25:39 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Thu, 21 Nov 2019 17:25:27 -0800 Message-Id: <20191122012527.3260265-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122012527.3260265-1-raj.khem@gmail.com> References: <20191122012527.3260265-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 2/2] sanlock: Replace cp -a with cp -R --no-dereference X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org helps to stop leaking builder's UID into sstate cache Fixes Exception: KeyError: 'getpwuid(): uid not found: 6000' Signed-off-by: Khem Raj --- ...cp-a-with-cp-R-no-dereference-preser.patch | 51 +++++++++++++++++++ .../recipes-extended/sanlock/sanlock_3.8.0.bb | 4 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel 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 0000000000..a0b721c466 --- /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 @@ +From 78a9cffb1c760466933bbbcbae7ecb9b30a3e6a5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Nov 2019 13:47:42 -0800 +Subject: [PATCH] sanlock: Replace "cp -a" with "cp -R --no-dereference + --preserve=mode, links" + +Using "cp -a" leaks UID of user running the builds + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/Makefile | 8 ++++---- + wdmd/Makefile | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 533dd79..2fc9ba5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -127,9 +127,9 @@ install: all + $(INSTALL) -c -m 755 $(LIBSO_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(LIBPC_ENTIRE_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig + $(INSTALL) -c -m 644 $(LIBPC_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig +- cp -a $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) + $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/ +diff --git a/wdmd/Makefile b/wdmd/Makefile +index 5849efc..4894517 100644 +--- a/wdmd/Makefile ++++ b/wdmd/Makefile +@@ -68,7 +68,7 @@ install: all + $(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8 + $(INSTALL) -c -m 755 $(CMD_TARGET) $(DESTDIR)/$(BINDIR) + $(INSTALL) -c -m 755 $(SHLIB_TARGET) $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) + $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8 +-- +2.24.0 + 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 8e411e4969..bf7eaf4111 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" LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" -SRC_URI = "git://pagure.io/sanlock.git;protocol=http" +SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ + file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ + " SRCREV = "7afe0e66f5c7f24894896fad20ffa6f39733d80f" S = "${WORKDIR}/git"