* [PATCH 0/1] Revert cleaning of users/groups
@ 2016-04-12 13:04 Peter Kjellerstedt
2016-04-12 13:04 ` [PATCH 1/1] Revert "useradd.bbclass: remove user/group created by the package in clean* task" Peter Kjellerstedt
0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2016-04-12 13:04 UTC (permalink / raw)
To: openembedded-core
About a week ago the "solution" to
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9262 was accepted
into OE-Core. This is supposed to solve the problem that users/groups
are not removed from the sysroot when the recipe is cleansstated. The
solution, however, totally fails to handle the case where multiple
recipes have installed the same user/group causing the build to fail
all over the place.
We have a lot of recipes that installs users and groups, many of which
are created by multiple recipes. An example of how this change broke
for us:
Recipe libwsd creates the wsd group. Recipe wsd creates the wsd group
and the wsd user which has the wsd group as it primary group. When the
libwsd recipe needs to be rebuilt the following error occurs:
groupdel: cannot remove the primary group of user 'wsd'
and the build aborts.
If a solution like this is supposed to be implemented it needs to keep
track of all recipes that install a particular user/group and only
when all of them have been removed can the user/group be removed.
Until that has been solved, the current solution needs to be
reverted...
//Peter
The following changes since commit 5602f64ab8c3654737273c0e7ac1c966fa8afb6a:
archiver: Fix ASSUME_PROVIDED issues (2016-04-11 09:03:58 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/clean_users
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/clean_users
Peter Kjellerstedt (1):
Revert "useradd.bbclass: remove user/group created by the package in
clean* task"
meta/classes/sstate.bbclass | 5 -----
meta/classes/useradd.bbclass | 29 -----------------------------
2 files changed, 34 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] Revert "useradd.bbclass: remove user/group created by the package in clean* task"
2016-04-12 13:04 [PATCH 0/1] Revert cleaning of users/groups Peter Kjellerstedt
@ 2016-04-12 13:04 ` Peter Kjellerstedt
0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2016-04-12 13:04 UTC (permalink / raw)
To: openembedded-core
Removal of users/group when cleansstating a recipe as implemented here
totally breaks when multiple recipes install the samer user/groups.
This reverts commit b5304ce438666a7418746f4ddd32703ae3188089.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/sstate.bbclass | 5 -----
meta/classes/useradd.bbclass | 29 -----------------------------
2 files changed, 34 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 8c62327..4a4269c 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -51,7 +51,6 @@ SSTATEPREINSTFUNCS = ""
SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
SSTATEPOSTINSTFUNCS = ""
EXTRA_STAGING_FIXMES ?= ""
-SSTATECLEANFUNCS = ""
# Check whether sstate exists for tasks that support sstate and are in the
# locked signatures file.
@@ -451,10 +450,6 @@ def sstate_clean(ss, d):
stfile.endswith(rm_nohash):
oe.path.remove(stfile)
- # Removes the users/groups created by the package
- for cleanfunc in (d.getVar('SSTATECLEANFUNCS', True) or '').split():
- bb.build.exec_func(cleanfunc, d)
-
sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX"
CLEANFUNCS += "sstate_cleanall"
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index ee402ac..0a6f2be 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -127,35 +127,6 @@ useradd_sysroot_sstate () {
fi
}
-userdel_sysroot_sstate () {
-if test "x${STAGING_DIR_TARGET}" != "x"; then
- if [ "${BB_CURRENTTASK}" = "configure" -o "${BB_CURRENTTASK}" = "clean" ]; then
- export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
- OPT="--root ${STAGING_DIR_TARGET}"
-
- # Remove groups and users defined for package
- GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
- USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
-
- if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
- user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
- perform_userdel "${STAGING_DIR_TARGET}" "$OPT $user"
- fi
-
- if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
- group=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
- perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $group"
- fi
-
- fi
-fi
-}
-
-SSTATECLEANFUNCS = "userdel_sysroot_sstate"
-SSTATECLEANFUNCS_class-cross = ""
-SSTATECLEANFUNCS_class-native = ""
-SSTATECLEANFUNCS_class-nativesdk = ""
-
do_install[prefuncs] += "${SYSROOTFUNC}"
SYSROOTFUNC = "useradd_sysroot"
SYSROOTFUNC_class-cross = ""
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-12 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12 13:04 [PATCH 0/1] Revert cleaning of users/groups Peter Kjellerstedt
2016-04-12 13:04 ` [PATCH 1/1] Revert "useradd.bbclass: remove user/group created by the package in clean* task" Peter Kjellerstedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox