From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.appriver.com (relay101b.appriver.com [207.97.230.15]) by mail.openembedded.org (Postfix) with ESMTP id 8B89778563 for ; Mon, 15 Jan 2018 15:23:29 +0000 (UTC) X-Note: This Email was scanned by AppRiver SecureTide X-Note-AR-ScanTimeLocal: 01/15/2018 10:20:28 AM X-Note: SecureTide Build: 12/19/2017 1:37:44 PM UTC (2.6.27.2) X-Note: Filtered by 10.238.11.162 X-Note-AR-Scan: None - PIPE Received: by relay.appriver.com (CommuniGate Pro PIPE 6.1.7) with PIPE id 282258119; Mon, 15 Jan 2018 10:20:28 -0500 Received: from [213.210.30.29] (HELO elite.brightsign) by relay.appriver.com (CommuniGate Pro SMTP 6.1.7) with ESMTPS id 282258092; Mon, 15 Jan 2018 10:20:27 -0500 Received: from chuckie.brightsign ([fd44:d8b8:cab5:cb01::19] helo=chuckie) by elite.brightsign with esmtp (Exim 4.89) (envelope-from ) id 1eb6bh-000FCx-6U; Mon, 15 Jan 2018 15:23:29 +0000 Received: from mac by chuckie with local (Exim 4.89) (envelope-from ) id 1eb6bh-00009V-5T; Mon, 15 Jan 2018 15:23:29 +0000 From: Mike Crowe To: openembedded-core@lists.openembedded.org Date: Mon, 15 Jan 2018 15:22:54 +0000 Message-Id: <20180115152254.447-1-mac@mcrowe.com> X-Mailer: git-send-email 2.11.0 X-Note: This Email was scanned by AppRiver SecureTide X-Note-AR-ScanTimeLocal: 01/15/2018 10:20:27 AM X-Note: SecureTide Build: 12/19/2017 1:37:44 PM UTC (2.6.27.2) X-Note: Filtered by 10.238.11.162 X-Policy: brightsign.biz X-Primary: brightsign.biz@brightsign.biz X-Virus-Scan: V- X-Note: ICH-CT/SI:0-0/SG:1 1/1/0001 12:00:00 AM X-Note-SnifferID: 0 X-Note: TCH-CT/SI:0-59/SG:1 1/15/2018 10:19:41 AM X-GBUdb-Analysis: 0, 213.210.30.29, Ugly c=0.457817 p=-0.929412 Source Normal X-Signature-Violations: 0-0-0-6576-c X-Note: Spam Tests Failed: X-Country-Path: ->->United Kingdom->United States X-Note-Sending-IP: 213.210.30.29 X-Note-Reverse-DNS: elite.brightsigndigital.co.uk X-Note-Return-Path: mcrowe@brightsign.biz X-Note: User Rule Hits: X-Note: Global Rule Hits: G298 G299 G300 G301 G305 G306 G438 X-Note: Encrypt Rule Hits: X-Note: Mail Class: VALID Cc: Mike Crowe Subject: [PATCH] rpm: backport configure fix for multiple users/groups with ID 0 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2018 15:23:31 -0000 Backport upstream configure fix for hosts that have multiple users with UID 0 or groups with GID 0. Signed-off-by: Mike Crowe --- ...ure-cope-with-multiple-users-groups-with-.patch | 40 ++++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_4.14.0.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch diff --git a/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch b/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch new file mode 100644 index 0000000000..077fae3ba8 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch @@ -0,0 +1,40 @@ +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/pull/377] + +From 68a7b60f89419e53a4bd3c412f816f0576ffd8c4 Mon Sep 17 00:00:00 2001 +From: Mike Crowe +Date: Thu, 4 Jan 2018 14:39:51 +0000 +Subject: [PATCH] Make configure cope with multiple users/groups with ID 0 + +If /etc/passwd contains multiple users with UID 0 then user_with_uid0 will +contain a line feed which results in config.h containing: + + #define UID_0_USER "root + +(i.e. without a closing quote.) + +The same problem occurs with /etc/group. + +Let's only emit the first match in each case so that there is only ever a +single result. +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ab8ca4f54..5259ad243 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -996,8 +996,8 @@ if test "$with_dmalloc" = yes ; then + LIBS="$LIBS -ldmalloc" + fi + +-user_with_uid0=$(awk -F: '$3==0 {print $1}' /etc/passwd) +-group_with_gid0=$(awk -F: '$3==0 {print $1}' /etc/group) ++user_with_uid0=$(awk -F: '$3==0 {print $1;exit}' /etc/passwd) ++group_with_gid0=$(awk -F: '$3==0 {print $1;exit}' /etc/group) + AC_DEFINE_UNQUOTED([UID_0_USER],["$user_with_uid0"],[Get the user name having userid 0]) + AC_DEFINE_UNQUOTED([GID_0_GROUP],["$group_with_gid0"],[Get the group name having groupid 0]) + +-- +2.11.0 + diff --git a/meta/recipes-devtools/rpm/rpm_4.14.0.bb b/meta/recipes-devtools/rpm/rpm_4.14.0.bb index e4e9c3e634..aa2579e3bf 100644 --- a/meta/recipes-devtools/rpm/rpm_4.14.0.bb +++ b/meta/recipes-devtools/rpm/rpm_4.14.0.bb @@ -40,6 +40,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \ file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ file://0001-perl-disable-auto-reqs.patch \ + file://0001-Make-configure-cope-with-multiple-users-groups-with-.patch \ " PE = "1" -- 2.11.0