* [PATCH 1/2] systemd 216: add postinsts for hostname and machine nss modules
@ 2014-09-27 7:22 Koen Kooi
2014-09-27 7:22 ` [PATCH 2/2] systemd 216: add system user factory files to CONFFILES Koen Kooi
0 siblings, 1 reply; 7+ messages in thread
From: Koen Kooi @ 2014-09-27 7:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
The external recipe has postinsts so to make this a true replacement add
them here as well.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/recipes-core/systemd/systemd_216.bb | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 331da99..3e572e8 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -369,6 +369,28 @@ pkg_prerm_udev-hwdb () {
rm -f ${sysconfdir}/udev/hwdb.bin
}
+# Do not activate libnss-resolve by default, that needs more thought
+
+pkg_postinst_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+
+ sed -e '/^hosts:/s/\s*\<mymachine\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mymachine \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e '/^hosts:/s/\s*myhostname//' \
+ -i $D${sysconfdir}/nsswitch.conf
+
+ sed -e '/^hosts:/s/\s*\<mymachine\>//' \
+ -e '/^hosts:/s/\s*mymachine//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
# that we don't build both udev and systemd in world builds.
python () {
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-27 7:22 [PATCH 1/2] systemd 216: add postinsts for hostname and machine nss modules Koen Kooi
@ 2014-09-27 7:22 ` Koen Kooi
2014-09-29 20:59 ` Colin Walters
0 siblings, 1 reply; 7+ messages in thread
From: Koen Kooi @ 2014-09-27 7:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
These generate passwd and group files, so keeping user changes is very
important.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/recipes-core/systemd/systemd_216.bb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 3e572e8..97af897 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -220,7 +220,10 @@ RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
${sysconfdir}/systemd/logind.conf \
${sysconfdir}/systemd/system.conf \
- ${sysconfdir}/systemd/user.conf"
+ ${sysconfdir}/systemd/user.conf \
+ ${libdir}/sysusers.d/systemd.conf \
+ ${libdir}/sysusers.d/basic.conf \
+ "
FILES_${PN} = " ${base_bindir}/* \
${datadir}/bash-completion \
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-27 7:22 ` [PATCH 2/2] systemd 216: add system user factory files to CONFFILES Koen Kooi
@ 2014-09-29 20:59 ` Colin Walters
2014-09-30 7:39 ` Koen Kooi
0 siblings, 1 reply; 7+ messages in thread
From: Colin Walters @ 2014-09-29 20:59 UTC (permalink / raw)
To: openembedded-core
On Sat, Sep 27, 2014, at 03:22 AM, Koen Kooi wrote:
> + ${libdir}/sysusers.d/systemd.conf \
> + ${libdir}/sysusers.d/basic.conf \
Admins aren't expected to edit these - instead you override in /etc. Or
change /etc/passwd after the user has been created, and your changes
will be respected.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-29 20:59 ` Colin Walters
@ 2014-09-30 7:39 ` Koen Kooi
2014-09-30 8:51 ` Richard Purdie
2014-09-30 9:36 ` Burton, Ross
0 siblings, 2 replies; 7+ messages in thread
From: Koen Kooi @ 2014-09-30 7:39 UTC (permalink / raw)
To: Colin Walters; +Cc: openembedded-core
Op 29 sep. 2014, om 22:59 heeft Colin Walters <walters@verbum.org> het volgende geschreven:
>
>
> On Sat, Sep 27, 2014, at 03:22 AM, Koen Kooi wrote:
>
>> + ${libdir}/sysusers.d/systemd.conf \
>> + ${libdir}/sysusers.d/basic.conf \
>
> Admins aren't expected to edit these - instead you override in /etc. Or
> change /etc/passwd after the user has been created, and your changes
> will be respected.
The real question is: do we want to keep changes to these files on package upgrade or wipe them out?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-30 7:39 ` Koen Kooi
@ 2014-09-30 8:51 ` Richard Purdie
2014-09-30 9:36 ` Burton, Ross
1 sibling, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2014-09-30 8:51 UTC (permalink / raw)
To: Koen Kooi; +Cc: openembedded-core
On Tue, 2014-09-30 at 09:39 +0200, Koen Kooi wrote:
> Op 29 sep. 2014, om 22:59 heeft Colin Walters <walters@verbum.org> het volgende geschreven:
>
> >
> >
> > On Sat, Sep 27, 2014, at 03:22 AM, Koen Kooi wrote:
> >
> >> + ${libdir}/sysusers.d/systemd.conf \
> >> + ${libdir}/sysusers.d/basic.conf \
> >
> > Admins aren't expected to edit these - instead you override in /etc. Or
> > change /etc/passwd after the user has been created, and your changes
> > will be respected.
>
> The real question is: do we want to keep changes to these files on package upgrade or wipe them out?
or should we encourage users to edit the files that are supposed to be
edited?
You could argue this for every file on the system, binaries and all :/.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-30 7:39 ` Koen Kooi
2014-09-30 8:51 ` Richard Purdie
@ 2014-09-30 9:36 ` Burton, Ross
2014-09-30 13:26 ` Colin Walters
1 sibling, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2014-09-30 9:36 UTC (permalink / raw)
To: Koen Kooi; +Cc: OE-core
On 30 September 2014 08:39, Koen Kooi <koen@dominion.thruhere.net> wrote:
> The real question is: do we want to keep changes to these files on package upgrade or wipe them out?
They're in /usr, so they get overwritten.
Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] systemd 216: add system user factory files to CONFFILES
2014-09-30 9:36 ` Burton, Ross
@ 2014-09-30 13:26 ` Colin Walters
0 siblings, 0 replies; 7+ messages in thread
From: Colin Walters @ 2014-09-30 13:26 UTC (permalink / raw)
To: Burton, Ross, Koen Kooi; +Cc: OE-core
On Tue, Sep 30, 2014, at 05:36 AM, Burton, Ross wrote:
> On 30 September 2014 08:39, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > The real question is: do we want to keep changes to these files on package upgrade or wipe them out?
>
> They're in /usr, so they get overwritten.
The reason I mention this is in the OSTree model at least, /usr is
*always* a readonly bind mount, and mutation is not permitted by admins.
If something is insufficient with the handling of /etc here, let's get
that fixed in upstream systemd.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-09-30 13:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-27 7:22 [PATCH 1/2] systemd 216: add postinsts for hostname and machine nss modules Koen Kooi
2014-09-27 7:22 ` [PATCH 2/2] systemd 216: add system user factory files to CONFFILES Koen Kooi
2014-09-29 20:59 ` Colin Walters
2014-09-30 7:39 ` Koen Kooi
2014-09-30 8:51 ` Richard Purdie
2014-09-30 9:36 ` Burton, Ross
2014-09-30 13:26 ` Colin Walters
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.