* [PATCH 1/6] systemd: move bash completion into separate package
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-08 10:20 ` Tanu Kaskinen
2016-02-08 10:09 ` [PATCH 2/6] systemd: realign packages list Maciej Borzecki
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
Add systemd-bash package that ships bash completion files
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index a110f0cdeaac7e46b5691a89aea237974e4114b3..8e3cb6047588b286df728ff28423e469d0b0745d 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -238,7 +238,7 @@ python populate_packages_prepend (){
PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
- ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh ${PN}-xorg-xinitrc"
+ ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-bash ${PN}-zsh ${PN}-xorg-xinitrc"
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
@@ -271,6 +271,11 @@ FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
+FILES_${PN}-bash = " \
+ ${datadir}/bash-completion \
+ ${sysconfdir}/bash_completion.d/ \
+ "
+
FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
@@ -290,13 +295,11 @@ CONFFILES_${PN} = "${sysconfdir}/machine-id \
${sysconfdir}/systemd/user.conf"
FILES_${PN} = " ${base_bindir}/* \
- ${datadir}/bash-completion \
${datadir}/dbus-1/services \
${datadir}/dbus-1/system-services \
${datadir}/polkit-1 \
${datadir}/${BPN} \
${datadir}/factory \
- ${sysconfdir}/bash_completion.d/ \
${sysconfdir}/dbus-1/ \
${sysconfdir}/machine-id \
${sysconfdir}/modules-load.d/ \
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 1/6] systemd: move bash completion into separate package
2016-02-08 10:09 ` [PATCH 1/6] systemd: move bash completion into separate package Maciej Borzecki
@ 2016-02-08 10:20 ` Tanu Kaskinen
2016-02-08 10:33 ` Maciek Borzecki
0 siblings, 1 reply; 16+ messages in thread
From: Tanu Kaskinen @ 2016-02-08 10:20 UTC (permalink / raw)
To: Maciej Borzecki, openembedded-core, Enrico Jorns, Roy Li,
Khem Raj, Christopher Larson, Ross Burton
Cc: Maciek Borzecki
On Mon, 2016-02-08 at 11:09 +0100, Maciej Borzecki wrote:
> Add systemd-bash package that ships bash completion files
>
> Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> ---
> meta/recipes-core/systemd/systemd_228.bb | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
> index a110f0cdeaac7e46b5691a89aea237974e4114b3..8e3cb6047588b286df728ff28423e469d0b0745d 100644
> --- a/meta/recipes-core/systemd/systemd_228.bb
> +++ b/meta/recipes-core/systemd/systemd_228.bb
> @@ -238,7 +238,7 @@ python populate_packages_prepend (){
> PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
>
> PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
> - ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh ${PN}-xorg-xinitrc"
> + ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-bash ${PN}-zsh ${PN}-xorg-xinitrc"
>
> SYSTEMD_PACKAGES = "${PN}-binfmt"
> SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
> @@ -271,6 +271,11 @@ FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
>
> FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
>
> +FILES_${PN}-bash = " \
> + ${datadir}/bash-completion \
> + ${sysconfdir}/bash_completion.d/ \
> + "
Note that we have the bash-completion class. It can be used to take
care of packaging the bash completion files. It doesn't take files from
sysconfdir, though. Does systemd really install bash completion files
under sysconfdir, or is that just unnecessary cruft originating from
older systemd versions?
--
Tanu
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 1/6] systemd: move bash completion into separate package
2016-02-08 10:20 ` Tanu Kaskinen
@ 2016-02-08 10:33 ` Maciek Borzecki
0 siblings, 0 replies; 16+ messages in thread
From: Maciek Borzecki @ 2016-02-08 10:33 UTC (permalink / raw)
To: Tanu Kaskinen, openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
On pon, 2016-02-08 at 12:20 +0200, Tanu Kaskinen wrote:
> On Mon, 2016-02-08 at 11:09 +0100, Maciej Borzecki wrote:
> > Add systemd-bash package that ships bash completion files
> >
> > Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> > ---
> > meta/recipes-core/systemd/systemd_228.bb | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-
> > core/systemd/systemd_228.bb
> > index
> > a110f0cdeaac7e46b5691a89aea237974e4114b3..8e3cb6047588b286df728ff28423e469d0b0745d
> > 100644
> > --- a/meta/recipes-core/systemd/systemd_228.bb
> > +++ b/meta/recipes-core/systemd/systemd_228.bb
> > @@ -238,7 +238,7 @@ python populate_packages_prepend (){
> > PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
> >
> > PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-
> > kernel-install \
> > - ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh ${PN}-xorg-xinitrc"
> > + ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-bash ${PN}-zsh ${PN}-xorg-
> > xinitrc"
> >
> > SYSTEMD_PACKAGES = "${PN}-binfmt"
> > SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
> > @@ -271,6 +271,11 @@ FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
> >
> > FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
> >
> > +FILES_${PN}-bash = " \
> > + ${datadir}/bash-completion \
> > + ${sysconfdir}/bash_completion.d/ \
> > + "
>
> Note that we have the bash-completion class. It can be used to take
> care of packaging the bash completion files. It doesn't take files from
> sysconfdir, though. Does systemd really install bash completion files
> under sysconfdir, or is that just unnecessary cruft originating from
> older systemd versions?
>
Thanks for the tip. Now that I've looked at it inherit bash-completion looks like the most
sensible way. I guess it also makes sense to have an equivalent zsh completion class.
--
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079
Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.
This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/6] systemd: realign packages list
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
2016-02-08 10:09 ` [PATCH 1/6] systemd: move bash completion into separate package Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-08 10:09 ` [PATCH 3/6] systemd: extend PACKAGECONFIG flags Maciej Borzecki
` (3 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
Reformat list of built packages to a package per line format. Makes
easier to cope with subsequent changes.
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index 8e3cb6047588b286df728ff28423e469d0b0745d..2be77deefeb265259b1c269b81e015738f780475 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -237,8 +237,19 @@ python populate_packages_prepend (){
}
PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
- ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-bash ${PN}-zsh ${PN}-xorg-xinitrc"
+PACKAGES =+ "\
+ ${PN}-gui \
+ ${PN}-vconsole-setup \
+ ${PN}-initramfs \
+ ${PN}-analyze \
+ ${PN}-kernel-install \
+ ${PN}-rpm-macros \
+ ${PN}-binfmt \
+ ${PN}-pam \
+ ${PN}-bash \
+ ${PN}-zsh \
+ ${PN}-xorg-xinitrc \
+"
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 3/6] systemd: extend PACKAGECONFIG flags
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
2016-02-08 10:09 ` [PATCH 1/6] systemd: move bash completion into separate package Maciej Borzecki
2016-02-08 10:09 ` [PATCH 2/6] systemd: realign packages list Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-08 10:21 ` Andreas Müller
2016-02-08 10:09 ` [PATCH 4/6] systemd: use sysusers for setting up required users/groups Maciej Borzecki
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
We currently ship a rather full-blown setup of system. Very few
configuration knobs are actually exposed through PACKAGECONFIG
flags. This patch adds new PACKAGECONFIG flags for some finer tuning of
systemd's functionality. By default most of functionality is disabled,
with exeception of:
- sysusers - systemd needs to setup some of required users
- binfmt - so that package systemd-binfmt can be built
- randomseed
- rfkill (only if wifi is enabled in DISTRO_FEATURES)
- efi (only if efi is present in MACHINE_FEATURES)
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 43 +++++++++++++++++++++++++++-----
1 file changed, 37 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index 2be77deefeb265259b1c269b81e015738f780475..f4cab27ba590901230f30229d54636d019f541d6 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -64,6 +64,11 @@ PACKAGECONFIG ??= "compat xz ldconfig \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
+ sysusers \
+ binfmt \
+ randomseed \
"
PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
# Sign the journal for anti-tampering
@@ -76,12 +81,35 @@ PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicroht
PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
+PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
+PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
+PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
+PACKAGECONFIG[bootchart] = "--enable-bootchart,--disable-bootchart"
+PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
+PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
+PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
+PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
+PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
+PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
+PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
+PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
+PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
+PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
+PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
+PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
# importd requires curl/xz/zlib/bzip2/gcrypt
PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
# Verify keymaps on locale change
PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
# Update NAT firewall rules
@@ -186,17 +214,20 @@ do_install() {
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
- # Create symlinks for systemd-update-utmp-runlevel.service
install -d ${D}${systemd_unitdir}/system/graphical.target.wants
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
install -d ${D}${systemd_unitdir}/system/reboot.target.wants
install -d ${D}${systemd_unitdir}/system/rescue.target.wants
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+ fi
# Enable journal to forward message to syslog daemon
sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 3/6] systemd: extend PACKAGECONFIG flags
2016-02-08 10:09 ` [PATCH 3/6] systemd: extend PACKAGECONFIG flags Maciej Borzecki
@ 2016-02-08 10:21 ` Andreas Müller
2016-02-08 10:44 ` Maciek Borzecki
0 siblings, 1 reply; 16+ messages in thread
From: Andreas Müller @ 2016-02-08 10:21 UTC (permalink / raw)
To: Maciej Borzecki
Cc: Christopher Larson,
Patches and discussions about the oe-core layer, Maciek Borzecki
On Mon, Feb 8, 2016 at 11:09 AM, Maciej Borzecki
<maciej.borzecki@open-rnd.pl> wrote:
> We currently ship a rather full-blown setup of system. Very few
> configuration knobs are actually exposed through PACKAGECONFIG
> flags. This patch adds new PACKAGECONFIG flags for some finer tuning of
> systemd's functionality. By default most of functionality is disabled,
> with exeception of:
By disabling all those you kill huge amount of functionality by
default - which at least my images need. Could you choose default as
is and cut down your images please.
Andreas
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/6] systemd: extend PACKAGECONFIG flags
2016-02-08 10:21 ` Andreas Müller
@ 2016-02-08 10:44 ` Maciek Borzecki
2016-02-08 11:07 ` Andreas Müller
0 siblings, 1 reply; 16+ messages in thread
From: Maciek Borzecki @ 2016-02-08 10:44 UTC (permalink / raw)
To: Andreas Müller
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
On pon, 2016-02-08 at 11:21 +0100, Andreas Müller wrote:
> On Mon, Feb 8, 2016 at 11:09 AM, Maciej Borzecki
> <maciej.borzecki@open-rnd.pl> wrote:
> > We currently ship a rather full-blown setup of system. Very few
> > configuration knobs are actually exposed through PACKAGECONFIG
> > flags. This patch adds new PACKAGECONFIG flags for some finer tuning of
> > systemd's functionality. By default most of functionality is disabled,
> > with exeception of:
> By disabling all those you kill huge amount of functionality by
> default - which at least my images need. Could you choose default as
> is and cut down your images please.
The default built pretty much everything, including machined, backlight helpers and all
the other cruft. It would be great if we could come up with a sensible list of defaults
and let people extend it as they see fit.
Since it's the first version of the patchset, the intention was to gather feedback, see
what people use, and update the flags in v2 accordingly.
Can you list the features you need?
--
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079
Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.
This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/6] systemd: extend PACKAGECONFIG flags
2016-02-08 10:44 ` Maciek Borzecki
@ 2016-02-08 11:07 ` Andreas Müller
2016-02-08 11:10 ` Maciek Borzecki
0 siblings, 1 reply; 16+ messages in thread
From: Andreas Müller @ 2016-02-08 11:07 UTC (permalink / raw)
To: Maciej Borzecki
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
On Mon, Feb 8, 2016 at 11:44 AM, Maciek Borzecki
<maciej.borzecki@open-rnd.pl> wrote:
> On pon, 2016-02-08 at 11:21 +0100, Andreas Müller wrote:
>> On Mon, Feb 8, 2016 at 11:09 AM, Maciej Borzecki
>> <maciej.borzecki@open-rnd.pl> wrote:
>> > We currently ship a rather full-blown setup of system. Very few
>> > configuration knobs are actually exposed through PACKAGECONFIG
>> > flags. This patch adds new PACKAGECONFIG flags for some finer tuning of
>> > systemd's functionality. By default most of functionality is disabled,
>> > with exeception of:
>> By disabling all those you kill huge amount of functionality by
>> default - which at least my images need. Could you choose default as
>> is and cut down your images please.
>
> The default built pretty much everything, including machined, backlight helpers and all
> the other cruft. It would be great if we could come up with a sensible list of defaults
> and let people extend it as they see fit.
>
> Since it's the first version of the patchset, the intention was to gather feedback, see
> what people use, and update the flags in v2 accordingly.
>
> Can you list the features you need?
From a quick glance firstboot / logind / bootchart / machined
But to be honest: I am not willing to spend huge testing efforts for
you saving a few megabytes. Don't misunderstand me: adding
PACKAGACONFIG knobs is fine but changing defaults totally is not.
Andreas
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/6] systemd: extend PACKAGECONFIG flags
2016-02-08 11:07 ` Andreas Müller
@ 2016-02-08 11:10 ` Maciek Borzecki
0 siblings, 0 replies; 16+ messages in thread
From: Maciek Borzecki @ 2016-02-08 11:10 UTC (permalink / raw)
To: Andreas Müller
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
On pon, 2016-02-08 at 12:07 +0100, Andreas Müller wrote:
> On Mon, Feb 8, 2016 at 11:44 AM, Maciek Borzecki
> <maciej.borzecki@open-rnd.pl> wrote:
> > On pon, 2016-02-08 at 11:21 +0100, Andreas Müller wrote:
> > > On Mon, Feb 8, 2016 at 11:09 AM, Maciej Borzecki
> > > <maciej.borzecki@open-rnd.pl> wrote:
> > > > We currently ship a rather full-blown setup of system. Very few
> > > > configuration knobs are actually exposed through PACKAGECONFIG
> > > > flags. This patch adds new PACKAGECONFIG flags for some finer tuning of
> > > > systemd's functionality. By default most of functionality is disabled,
> > > > with exeception of:
> > > By disabling all those you kill huge amount of functionality by
> > > default - which at least my images need. Could you choose default as
> > > is and cut down your images please.
> >
> > The default built pretty much everything, including machined, backlight helpers and
> > all
> > the other cruft. It would be great if we could come up with a sensible list of
> > defaults
> > and let people extend it as they see fit.
> >
> > Since it's the first version of the patchset, the intention was to gather feedback,
> > see
> > what people use, and update the flags in v2 accordingly.
> >
> > Can you list the features you need?
> From a quick glance firstboot / logind / bootchart / machined
>
> But to be honest: I am not willing to spend huge testing efforts for
> you saving a few megabytes. Don't misunderstand me: adding
> PACKAGACONFIG knobs is fine but changing defaults totally is not.
>
Fair point. I'll fix that in v2.
--
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079
Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.
This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 4/6] systemd: use sysusers for setting up required users/groups
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
` (2 preceding siblings ...)
2016-02-08 10:09 ` [PATCH 3/6] systemd: extend PACKAGECONFIG flags Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-08 10:09 ` [PATCH 5/6] systemd: move some tools into systemd-extra-utils package Maciej Borzecki
2016-02-08 10:09 ` [PATCH 6/6] systemd: remove unnecessary code Maciej Borzecki
5 siblings, 0 replies; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
Use sysusers functionality of systemd allows setting up necessary user
accounts during startup. This functionality is already partially used
for journald and networkd (as we ship the default systemd.conf). The
patch removes useradd class in favor of the native systemd mechanism.
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index f4cab27ba590901230f30229d54636d019f541d6..74abe39761bfb22eb9ed442b26c0233394503453 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -22,7 +22,7 @@ DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl rea
SECTION = "base/shell"
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
+inherit pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
SRCREV = "dd050decb6ad131ebdeabb71c4f9ecb4733269c0"
@@ -244,6 +244,14 @@ do_install() {
echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
fi
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+ if ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', 'true', 'false', d)}; then
+ echo 'u systemd-journal-gateway - -' >> ${D}${libdir}/sysusers.d/systemd.conf
+ fi
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', 'true', 'false', d)}; then
+ echo 'u systemd-timesync - -' >> ${D}${libdir}/sysusers.d/systemd.conf
+ fi
+ echo 'g lock - -' >> ${D}${libdir}/sysusers.d/systemd.conf
}
do_install_ptest () {
@@ -285,10 +293,6 @@ PACKAGES =+ "\
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-
FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 5/6] systemd: move some tools into systemd-extra-utils package
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
` (3 preceding siblings ...)
2016-02-08 10:09 ` [PATCH 4/6] systemd: use sysusers for setting up required users/groups Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-08 10:09 ` [PATCH 6/6] systemd: remove unnecessary code Maciej Borzecki
5 siblings, 0 replies; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
This patch attempts to split some of the extra functionality delivered
by systemd utilities from the main package into a separate package. This
allows for trimming the size of a default systemd installation down to
~7MB with all configuration features disabled. The new
systemd-extra-utils package is added to RRECOMMENDS so that by default
it will get installed into the target image.
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 47 ++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index 74abe39761bfb22eb9ed442b26c0233394503453..40ed81a37e78c67bae13f7ee7018d85efa2f6b7d 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -288,6 +288,7 @@ PACKAGES =+ "\
${PN}-bash \
${PN}-zsh \
${PN}-xorg-xinitrc \
+ ${PN}-extra-utils \
"
SYSTEMD_PACKAGES = "${PN}-binfmt"
@@ -333,6 +334,51 @@ RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+FILES_${PN}-extra-utils = "\
+ ${base_bindir}/systemd-escape \
+ ${base_bindir}/systemd-inhibit \
+ ${bindir}/systemd-detect-virt \
+ ${bindir}/systemd-path \
+ ${bindir}/systemd-run \
+ ${bindir}/systemd-cat \
+ ${bindir}/systemd-delta \
+ ${bindir}/systemd-cgls \
+ ${bindir}/systemd-cgtop \
+ ${bindir}/systemd-stdio-bridge \
+ ${base_bindir}/systemd-ask-password \
+ ${base_bindir}/systemd-tty-ask-password-agent \
+ ${systemd_unitdir}/system/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/systemd-ask-password-console.service \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+ ${rootlibexecdir}/systemd/systemd-resolve-host \
+ ${rootlibexecdir}/systemd/systemd-ac-power \
+ ${rootlibexecdir}/systemd/systemd-activate \
+ ${bindir}/systemd-nspawn \
+ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+ ${systemd_unitdir}/system/systemd-nspawn@.service \
+ ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+ ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+ ${rootlibexecdir}/systemd/systemd-reply-password \
+ ${rootlibexecdir}/systemd/systemd-sleep \
+ ${rootlibexecdir}/systemd/system-sleep \
+ ${systemd_unitdir}/system/systemd-hibernate.service \
+ ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+ ${systemd_unitdir}/system/systemd-suspend.service \
+ ${systemd_unitdir}/system/sleep.target \
+ ${rootlibexecdir}/systemd/systemd-initctl \
+ ${systemd_unitdir}/system/systemd-initctl.service \
+ ${systemd_unitdir}/system/systemd-initctl.socket \
+ ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+ ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+ ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
CONFFILES_${PN} = "${sysconfdir}/machine-id \
${sysconfdir}/systemd/coredump.conf \
${sysconfdir}/systemd/journald.conf \
@@ -387,6 +433,7 @@ RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
RDEPENDS_${PN} += "volatile-binds update-rc.d"
RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
+ systemd-extra-utils \
systemd-compat-units udev-hwdb \
util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6/6] systemd: remove unnecessary code
2016-02-08 10:09 [PATCH 0/6] systemd cleanup & package split Maciej Borzecki
` (4 preceding siblings ...)
2016-02-08 10:09 ` [PATCH 5/6] systemd: move some tools into systemd-extra-utils package Maciej Borzecki
@ 2016-02-08 10:09 ` Maciej Borzecki
2016-02-09 14:56 ` Randy MacLeod
2016-02-09 15:19 ` Khem Raj
5 siblings, 2 replies; 16+ messages in thread
From: Maciej Borzecki @ 2016-02-08 10:09 UTC (permalink / raw)
To: openembedded-core, Enrico Jorns, Roy Li, Khem Raj,
Christopher Larson, Ross Burton
Cc: Maciek Borzecki
Remove unnecessary chown on journal file.
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
meta/recipes-core/systemd/systemd_228.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index 40ed81a37e78c67bae13f7ee7018d85efa2f6b7d..03434ff9d5ff19fe043332b0b53a4fa96ab2b120 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -209,7 +209,7 @@ do_install() {
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
fi
- chown root:systemd-journal ${D}/${localstatedir}/log/journal
+ # chown root:systemd-journal ${D}/${localstatedir}/log/journal
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
--
2.5.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 6/6] systemd: remove unnecessary code
2016-02-08 10:09 ` [PATCH 6/6] systemd: remove unnecessary code Maciej Borzecki
@ 2016-02-09 14:56 ` Randy MacLeod
2016-02-09 15:19 ` Khem Raj
1 sibling, 0 replies; 16+ messages in thread
From: Randy MacLeod @ 2016-02-09 14:56 UTC (permalink / raw)
To: openembedded-core, maciej.borzecki
On 2016-02-08 05:09 AM, Maciej Borzecki wrote:
> Remove unnecessary chown on journal file.
I assume that it's unnecessary because the ownership bits
are fine. Could you state whether the default ownership
is root:systemd-journal or that's it's not root:systemd-journal
but it doesn't matter for some reason.
>
> Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> ---
> meta/recipes-core/systemd/systemd_228.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
> index 40ed81a37e78c67bae13f7ee7018d85efa2f6b7d..03434ff9d5ff19fe043332b0b53a4fa96ab2b120 100644
> --- a/meta/recipes-core/systemd/systemd_228.bb
> +++ b/meta/recipes-core/systemd/systemd_228.bb
> @@ -209,7 +209,7 @@ do_install() {
> sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
> fi
>
> - chown root:systemd-journal ${D}/${localstatedir}/log/journal
> + # chown root:systemd-journal ${D}/${localstatedir}/log/journal
If it's not needed, remove it rather than comment it out.
>
> # Delete journal README, as log can be symlinked inside volatile.
> rm -f ${D}/${localstatedir}/log/README
>
Thanks for this and the other commits to allow us to trim down the
systemd footprint. Reducing the image size by a few MB does matter
to some people!
--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,
Canada, K2K 2W5
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 6/6] systemd: remove unnecessary code
2016-02-08 10:09 ` [PATCH 6/6] systemd: remove unnecessary code Maciej Borzecki
2016-02-09 14:56 ` Randy MacLeod
@ 2016-02-09 15:19 ` Khem Raj
2016-02-09 15:50 ` Maciek Borzecki
1 sibling, 1 reply; 16+ messages in thread
From: Khem Raj @ 2016-02-09 15:19 UTC (permalink / raw)
To: Maciej Borzecki
Cc: Christopher Larson,
Patches and discussions about the oe-core layer, Maciek Borzecki
On Mon, Feb 8, 2016 at 2:09 AM, Maciej Borzecki
<maciej.borzecki@open-rnd.pl> wrote:
> Remove unnecessary chown on journal file.
>
> Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> ---
> meta/recipes-core/systemd/systemd_228.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
> index 40ed81a37e78c67bae13f7ee7018d85efa2f6b7d..03434ff9d5ff19fe043332b0b53a4fa96ab2b120 100644
> --- a/meta/recipes-core/systemd/systemd_228.bb
> +++ b/meta/recipes-core/systemd/systemd_228.bb
> @@ -209,7 +209,7 @@ do_install() {
> sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
> fi
>
> - chown root:systemd-journal ${D}/${localstatedir}/log/journal
> + # chown root:systemd-journal ${D}/${localstatedir}/log/journal
>
journald requires these perms on this directory. Can you describe the
issue it fixes ?
> # Delete journal README, as log can be symlinked inside volatile.
> rm -f ${D}/${localstatedir}/log/README
> --
> 2.5.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 6/6] systemd: remove unnecessary code
2016-02-09 15:19 ` Khem Raj
@ 2016-02-09 15:50 ` Maciek Borzecki
0 siblings, 0 replies; 16+ messages in thread
From: Maciek Borzecki @ 2016-02-09 15:50 UTC (permalink / raw)
To: Khem Raj
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
On wto, 2016-02-09 at 07:19 -0800, Khem Raj wrote:
> On Mon, Feb 8, 2016 at 2:09 AM, Maciej Borzecki
> <maciej.borzecki@open-rnd.pl> wrote:
> > Remove unnecessary chown on journal file.
> >
> > Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> > ---
> > meta/recipes-core/systemd/systemd_228.bb | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-
> > core/systemd/systemd_228.bb
> > index
> > 40ed81a37e78c67bae13f7ee7018d85efa2f6b7d..03434ff9d5ff19fe043332b0b53a4fa96ab2b120
> > 100644
> > --- a/meta/recipes-core/systemd/systemd_228.bb
> > +++ b/meta/recipes-core/systemd/systemd_228.bb
> > @@ -209,7 +209,7 @@ do_install() {
> > sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd%
> > ${D}${sysconfdir}/init.d/systemd-udevd
> > fi
> >
> > - chown root:systemd-journal ${D}/${localstatedir}/log/journal
> > + # chown root:systemd-journal ${D}/${localstatedir}/log/journal
> >
>
> journald requires these perms on this directory. Can you describe the
> issue it fixes ?
>
I should use non-root user a bit more often. Apparently journalctl becomes useless without
systemd-journal chown on /var/log/journal. I'll revise this and the other useradd/sysusers
patch. Thanks for catching this.
--
Maciej Borzęcki
Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
^ permalink raw reply [flat|nested] 16+ messages in thread