Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] rpm: backport configure fix for multiple users/groups with ID 0
@ 2018-01-15 15:22 Mike Crowe
  2018-01-15 15:27 ` Alexander Kanavin
  2018-01-15 15:33 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Crowe @ 2018-01-15 15:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

Backport upstream configure fix for hosts that have multiple users with UID
0 or groups with GID 0.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 ...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 <mac@mcrowe.com>
+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




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] rpm: backport configure fix for multiple users/groups with ID 0
  2018-01-15 15:22 [PATCH] rpm: backport configure fix for multiple users/groups with ID 0 Mike Crowe
@ 2018-01-15 15:27 ` Alexander Kanavin
  2018-01-15 17:10   ` Mike Crowe
  2018-01-15 15:33 ` ✗ patchtest: failure for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Kanavin @ 2018-01-15 15:27 UTC (permalink / raw)
  To: Mike Crowe, openembedded-core

On 01/15/2018 05:22 PM, Mike Crowe wrote:
> +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/pull/377]

If this is merged by upstream, you should point to the commit. If you 
merely made a submission, then the status should say Submitted.

Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for rpm: backport configure fix for multiple users/groups with ID 0
  2018-01-15 15:22 [PATCH] rpm: backport configure fix for multiple users/groups with ID 0 Mike Crowe
  2018-01-15 15:27 ` Alexander Kanavin
@ 2018-01-15 15:33 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-01-15 15:33 UTC (permalink / raw)
  To: Mike Crowe; +Cc: openembedded-core

== Series Details ==

Series: rpm: backport configure fix for multiple users/groups with ID 0
Revision: 1
URL   : https://patchwork.openembedded.org/series/10544/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rpm: backport configure fix for multiple users/groups with ID 0
  2018-01-15 15:27 ` Alexander Kanavin
@ 2018-01-15 17:10   ` Mike Crowe
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2018-01-15 17:10 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

On Monday 15 January 2018 at 17:27:19 +0200, Alexander Kanavin wrote:
> On 01/15/2018 05:22 PM, Mike Crowe wrote:
> > +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/pull/377]
> 
> If this is merged by upstream, you should point to the commit. If you merely
> made a submission, then the status should say Submitted.

The fix was merged. I used the pull request URL because it was shorter, but
I will change it to the commit URL instead.

Thanks.

Mike.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-15 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 15:22 [PATCH] rpm: backport configure fix for multiple users/groups with ID 0 Mike Crowe
2018-01-15 15:27 ` Alexander Kanavin
2018-01-15 17:10   ` Mike Crowe
2018-01-15 15:33 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox