* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
@ 2015-09-01 22:55 Yann E. MORIN
2015-09-02 4:54 ` Baruch Siach
` (2 more replies)
0 siblings, 3 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-01 22:55 UTC (permalink / raw)
To: buildroot
systemd is incresaingly expected things to live in /usr/bin or
/usr/sbin.
However, a lot of packages stil install stuff directly into /bin or
/sbin.
Add an option so that /bin and /sbin be symlinks to /usr/bin and
/usr/sbin. Ditto for .lib for consistency.
That option is forcibly enabled when the init system is systemd.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/skeleton/skeleton.mk | 17 ++++++++++++++++-
system/Config.in | 13 +++++++++++++
system/skeleton/bin/.empty | 0
system/skeleton/lib/.empty | 0
system/skeleton/sbin/.empty | 0
5 files changed, 29 insertions(+), 1 deletion(-)
delete mode 100644 system/skeleton/bin/.empty
delete mode 100644 system/skeleton/lib/.empty
delete mode 100644 system/skeleton/sbin/.empty
diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index 48e7085..173b485 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -19,14 +19,29 @@ else
SKELETON_PATH = system/skeleton
endif
+ifeq ($(BR2_ROOTFS_USR_SYMLINKS),y)
+define SKELETON_USR_SYMLINKS
+ ln -snf usr/bin $(TARGET_DIR)/bin
+ ln -snf usr/sbin $(TARGET_DIR)/sbin
+ ln -snf usr/lib $(TARGET_DIR)/lib
+endef
+else
+define SKELETON_NO_USR_SYMLINKS
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/bin
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/sbin
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib
+endef
+endif
+
define SKELETON_INSTALL_TARGET_CMDS
rsync -a --ignore-times $(SYNC_VCS_EXCLUSIONS) \
--chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
$(SKELETON_PATH)/ $(TARGET_DIR)/
+ $(SKELETON_NO_USR_SYMLINKS)
+ $(SKELETON_USR_SYMLINKS)
$(INSTALL) -m 0644 support/misc/target-dir-warning.txt \
$(TARGET_DIR_WARNING_FILE)
ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
- mkdir -p $(TARGET_DIR)/usr
ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
endef
diff --git a/system/Config.in b/system/Config.in
index fad829d..96860d1 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+ select BR2_ROOTFS_USR_SYMLINKS
select BR2_PACKAGE_SYSTEMD
comment 'systemd needs an (e)glibc toolchain, headers >= 3.10'
@@ -178,6 +179,18 @@ endif
if BR2_ROOTFS_SKELETON_DEFAULT
+config BR2_ROOTFS_USR_SYMLINKS
+ bool "Use symlinks to /usr for /bin, /sbin and /lib"
+ help
+ If you say 'n' here, then /bin /sbin and /lib and their
+ counterparts in /usr will be separate directories. This
+ is the traditional UNIX way. In this case, /usr can be a
+ partition separate from / .
+
+ If you say 'y' here, then /bin /sbin and /lib will be symlinks
+ to their counterparts in /usr. This is the new systemd way. In
+ this case, /usr has to be on the / partition.
+
config BR2_TARGET_ENABLE_ROOT_LOGIN
bool "Enable root login with password"
default y
diff --git a/system/skeleton/bin/.empty b/system/skeleton/bin/.empty
deleted file mode 100644
index e69de29..0000000
diff --git a/system/skeleton/lib/.empty b/system/skeleton/lib/.empty
deleted file mode 100644
index e69de29..0000000
diff --git a/system/skeleton/sbin/.empty b/system/skeleton/sbin/.empty
deleted file mode 100644
index e69de29..0000000
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-01 22:55 Yann E. MORIN
@ 2015-09-02 4:54 ` Baruch Siach
2015-09-02 7:10 ` Thomas Petazzoni
2015-09-02 20:59 ` Arnout Vandecappelle
2 siblings, 0 replies; 34+ messages in thread
From: Baruch Siach @ 2015-09-02 4:54 UTC (permalink / raw)
To: buildroot
Hi Yann,
On Wed, Sep 02, 2015 at 12:55:13AM +0200, Yann E. MORIN wrote:
> systemd is incresaingly expected things to live in /usr/bin or
> /usr/sbin.
s/expected/expecting/
Can you be more specific? What actually breaks?
baruch
>
> However, a lot of packages stil install stuff directly into /bin or
> /sbin.
>
> Add an option so that /bin and /sbin be symlinks to /usr/bin and
> /usr/sbin. Ditto for .lib for consistency.
>
> That option is forcibly enabled when the init system is systemd.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-01 22:55 Yann E. MORIN
2015-09-02 4:54 ` Baruch Siach
@ 2015-09-02 7:10 ` Thomas Petazzoni
2015-09-02 13:50 ` Mike Williams
2015-09-02 20:59 ` Arnout Vandecappelle
2 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2015-09-02 7:10 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Wed, 2 Sep 2015 00:55:13 +0200, Yann E. MORIN wrote:
> systemd is incresaingly expected things to live in /usr/bin or
> /usr/sbin.
>
> However, a lot of packages stil install stuff directly into /bin or
> /sbin.
>
> Add an option so that /bin and /sbin be symlinks to /usr/bin and
> /usr/sbin. Ditto for .lib for consistency.
>
> That option is forcibly enabled when the init system is systemd.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
But do we actually need this? Vicente sent a patch to fix the systemd
issues that were discussed on the list:
[PATCH] systemd: override the path for kill, sulogin, mount and umount
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 7:10 ` Thomas Petazzoni
@ 2015-09-02 13:50 ` Mike Williams
2015-09-02 14:04 ` Thomas Petazzoni
0 siblings, 1 reply; 34+ messages in thread
From: Mike Williams @ 2015-09-02 13:50 UTC (permalink / raw)
To: buildroot
On Wed, Sep 2, 2015 at 3:10 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Dear Yann E. MORIN,
>
> On Wed, 2 Sep 2015 00:55:13 +0200, Yann E. MORIN wrote:
> > systemd is incresaingly expected things to live in /usr/bin or
> > /usr/sbin.
> >
> > However, a lot of packages stil install stuff directly into /bin or
> > /sbin.
> >
> > Add an option so that /bin and /sbin be symlinks to /usr/bin and
> > /usr/sbin. Ditto for .lib for consistency.
> >
> > That option is forcibly enabled when the init system is systemd.
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> But do we actually need this? Vicente sent a patch to fix the systemd
> issues that were discussed on the list:
>
> [PATCH] systemd: override the path for kill, sulogin, mount and umount
>
It's not just what systemd expects, many packages by default install their
systemd-related items to /lib, etc. instead of /usr/lib, so we either have
manual fixes to the .mk files for those packages or inconsistencies in
where those items go. As an example, I believe rsyslog is passed a special
flag setting its systemd install location to /usr/lib, and gpsd is still
just installing to /lib/systemd/system.
It wouldn't surprise me if most of our systemd users had already merged
their directories in their skeleton; I will probably do so soon as well.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150902/aa8dc4b1/attachment.html>
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 13:50 ` Mike Williams
@ 2015-09-02 14:04 ` Thomas Petazzoni
2015-09-02 14:05 ` Mike Williams
2015-09-02 14:07 ` Vicente Olivert Riera
0 siblings, 2 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2015-09-02 14:04 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Wed, 2 Sep 2015 09:50:34 -0400, Mike Williams wrote:
> It's not just what systemd expects, many packages by default install their
> systemd-related items to /lib, etc. instead of /usr/lib, so we either have
> manual fixes to the .mk files for those packages or inconsistencies in
> where those items go. As an example, I believe rsyslog is passed a special
> flag setting its systemd install location to /usr/lib, and gpsd is still
> just installing to /lib/systemd/system.
>
> It wouldn't surprise me if most of our systemd users had already merged
> their directories in their skeleton; I will probably do so soon as well.
Hum, right, I see. Then maybe Yann's patch is the right answer. In fact
what I'd like to see in Buildroot is a group of people taking care of
the systemd-related issues. So if you're willing (with others) to
tackle that, it would be very useful. If you agree with Yann's patch,
can you please test it and give your formal Tested-by/Reviewed-by?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:04 ` Thomas Petazzoni
@ 2015-09-02 14:05 ` Mike Williams
2015-09-02 14:28 ` Yann E. MORIN
2015-09-02 14:07 ` Vicente Olivert Riera
1 sibling, 1 reply; 34+ messages in thread
From: Mike Williams @ 2015-09-02 14:05 UTC (permalink / raw)
To: buildroot
On Wed, Sep 2, 2015 at 10:04 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Dear Mike Williams,
>
> On Wed, 2 Sep 2015 09:50:34 -0400, Mike Williams wrote:
>
> > It's not just what systemd expects, many packages by default install
> their
> > systemd-related items to /lib, etc. instead of /usr/lib, so we either
> have
> > manual fixes to the .mk files for those packages or inconsistencies in
> > where those items go. As an example, I believe rsyslog is passed a
> special
> > flag setting its systemd install location to /usr/lib, and gpsd is still
> > just installing to /lib/systemd/system.
> >
> > It wouldn't surprise me if most of our systemd users had already merged
> > their directories in their skeleton; I will probably do so soon as well.
>
> Hum, right, I see. Then maybe Yann's patch is the right answer. In fact
> what I'd like to see in Buildroot is a group of people taking care of
> the systemd-related issues. So if you're willing (with others) to
> tackle that, it would be very useful. If you agree with Yann's patch,
> can you please test it and give your formal Tested-by/Reviewed-by?
>
> Thanks,
>
> Thomas
>
Sure, I'll get it tested tomorrow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150902/fcd11db5/attachment.html>
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:04 ` Thomas Petazzoni
2015-09-02 14:05 ` Mike Williams
@ 2015-09-02 14:07 ` Vicente Olivert Riera
2015-09-02 14:11 ` Yann E. MORIN
2015-09-02 14:12 ` Thomas Petazzoni
1 sibling, 2 replies; 34+ messages in thread
From: Vicente Olivert Riera @ 2015-09-02 14:07 UTC (permalink / raw)
To: buildroot
Dear Thomas Petazzoni,
On 09/02/2015 03:04 PM, Thomas Petazzoni wrote:
> Dear Mike Williams,
>
> On Wed, 2 Sep 2015 09:50:34 -0400, Mike Williams wrote:
>
>> It's not just what systemd expects, many packages by default install their
>> systemd-related items to /lib, etc. instead of /usr/lib, so we either have
>> manual fixes to the .mk files for those packages or inconsistencies in
>> where those items go. As an example, I believe rsyslog is passed a special
>> flag setting its systemd install location to /usr/lib, and gpsd is still
>> just installing to /lib/systemd/system.
>>
>> It wouldn't surprise me if most of our systemd users had already merged
>> their directories in their skeleton; I will probably do so soon as well.
>
> Hum, right, I see. Then maybe Yann's patch is the right answer. In fact
> what I'd like to see in Buildroot is a group of people taking care of
> the systemd-related issues. So if you're willing (with others) to
> tackle that, it would be very useful. If you agree with Yann's patch,
> can you please test it and give your formal Tested-by/Reviewed-by?
>
> Thanks,
>
> Thomas
>
and what about also selecting BR2_ROOTFS_USR_SYMLINKS in systemd's
Config.in?
Regards,
Vincent.
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:07 ` Vicente Olivert Riera
@ 2015-09-02 14:11 ` Yann E. MORIN
2015-09-02 14:12 ` Thomas Petazzoni
1 sibling, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-02 14:11 UTC (permalink / raw)
To: buildroot
Vincent, All,
On 2015-09-02 15:07 +0100, Vicente Olivert Riera spake thusly:
> On 09/02/2015 03:04 PM, Thomas Petazzoni wrote:
> > Dear Mike Williams,
> >
> > On Wed, 2 Sep 2015 09:50:34 -0400, Mike Williams wrote:
> >
> >> It's not just what systemd expects, many packages by default install their
> >> systemd-related items to /lib, etc. instead of /usr/lib, so we either have
> >> manual fixes to the .mk files for those packages or inconsistencies in
> >> where those items go. As an example, I believe rsyslog is passed a special
> >> flag setting its systemd install location to /usr/lib, and gpsd is still
> >> just installing to /lib/systemd/system.
> >>
> >> It wouldn't surprise me if most of our systemd users had already merged
> >> their directories in their skeleton; I will probably do so soon as well.
> >
> > Hum, right, I see. Then maybe Yann's patch is the right answer. In fact
> > what I'd like to see in Buildroot is a group of people taking care of
> > the systemd-related issues. So if you're willing (with others) to
> > tackle that, it would be very useful. If you agree with Yann's patch,
> > can you please test it and give your formal Tested-by/Reviewed-by?
> >
> > Thanks,
> >
> > Thomas
> >
>
> and what about also selecting BR2_ROOTFS_USR_SYMLINKS in systemd's
> Config.in?
It's already done by BR2_INIT_SYSTEMD.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:07 ` Vicente Olivert Riera
2015-09-02 14:11 ` Yann E. MORIN
@ 2015-09-02 14:12 ` Thomas Petazzoni
2015-09-02 14:13 ` Vicente Olivert Riera
1 sibling, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2015-09-02 14:12 UTC (permalink / raw)
To: buildroot
Dear Vicente Olivert Riera,
On Wed, 2 Sep 2015 15:07:57 +0100, Vicente Olivert Riera wrote:
> and what about also selecting BR2_ROOTFS_USR_SYMLINKS in systemd's
> Config.in?
From Yann's patch:
@@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+ select BR2_ROOTFS_USR_SYMLINKS
select BR2_PACKAGE_SYSTEMD
Isn't that enough?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:12 ` Thomas Petazzoni
@ 2015-09-02 14:13 ` Vicente Olivert Riera
0 siblings, 0 replies; 34+ messages in thread
From: Vicente Olivert Riera @ 2015-09-02 14:13 UTC (permalink / raw)
To: buildroot
Dear all,
On 09/02/2015 03:12 PM, Thomas Petazzoni wrote:
> Dear Vicente Olivert Riera,
>
> On Wed, 2 Sep 2015 15:07:57 +0100, Vicente Olivert Riera wrote:
>
>> and what about also selecting BR2_ROOTFS_USR_SYMLINKS in systemd's
>> Config.in?
>
> From Yann's patch:
>
> @@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
> depends on BR2_USE_MMU
> depends on !BR2_STATIC_LIBS
> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> + select BR2_ROOTFS_USR_SYMLINKS
> select BR2_PACKAGE_SYSTEMD
>
> Isn't that enough?
Shame on me. I missed that part of the patch, sorry.
Regards,
Vincent.
> Thomas
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 14:05 ` Mike Williams
@ 2015-09-02 14:28 ` Yann E. MORIN
0 siblings, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-02 14:28 UTC (permalink / raw)
To: buildroot
Mike, All,
On 2015-09-02 10:05 -0400, Mike Williams spake thusly:
> On Wed, Sep 2, 2015 at 10:04 AM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com> wrote:
> > Dear Mike Williams,
> > On Wed, 2 Sep 2015 09:50:34 -0400, Mike Williams wrote:
> > > It's not just what systemd expects, many packages by default install
> > their
> > > systemd-related items to /lib, etc. instead of /usr/lib, so we either
> > have
> > > manual fixes to the .mk files for those packages or inconsistencies in
> > > where those items go. As an example, I believe rsyslog is passed a
> > special
> > > flag setting its systemd install location to /usr/lib, and gpsd is still
> > > just installing to /lib/systemd/system.
> > >
> > > It wouldn't surprise me if most of our systemd users had already merged
> > > their directories in their skeleton; I will probably do so soon as well.
> >
> > Hum, right, I see. Then maybe Yann's patch is the right answer. In fact
> > what I'd like to see in Buildroot is a group of people taking care of
> > the systemd-related issues. So if you're willing (with others) to
> > tackle that, it would be very useful. If you agree with Yann's patch,
> > can you please test it and give your formal Tested-by/Reviewed-by?
>
> Sure, I'll get it tested tomorrow.
Great, thanks! If you can think of a better commit log to suggest, then
that would be great, too! ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-01 22:55 Yann E. MORIN
2015-09-02 4:54 ` Baruch Siach
2015-09-02 7:10 ` Thomas Petazzoni
@ 2015-09-02 20:59 ` Arnout Vandecappelle
2015-09-02 21:17 ` Arnout Vandecappelle
2015-09-02 22:07 ` Yann E. MORIN
2 siblings, 2 replies; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-02 20:59 UTC (permalink / raw)
To: buildroot
On 02-09-15 00:55, Yann E. MORIN wrote:
> systemd is incresaingly expected things to live in /usr/bin or
increasingly
> /usr/sbin.
>
> However, a lot of packages stil install stuff directly into /bin or
still
> /sbin.
>
> Add an option so that /bin and /sbin be symlinks to /usr/bin and
be -> are
> /usr/sbin. Ditto for .lib for consistency.
.lib -> /lib
In reality, this option is only tangentially related to systemd. Rather, it's a
Fedora feature [1] that was taken over by Lennart P. and therefore by systemd
[2]. A better name for the feature is "merged /usr".
> That option is forcibly enabled when the init system is systemd.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> package/skeleton/skeleton.mk | 17 ++++++++++++++++-
> system/Config.in | 13 +++++++++++++
> system/skeleton/bin/.empty | 0
> system/skeleton/lib/.empty | 0
> system/skeleton/sbin/.empty | 0
> 5 files changed, 29 insertions(+), 1 deletion(-)
> delete mode 100644 system/skeleton/bin/.empty
> delete mode 100644 system/skeleton/lib/.empty
> delete mode 100644 system/skeleton/sbin/.empty
>
> diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
> index 48e7085..173b485 100644
> --- a/package/skeleton/skeleton.mk
> +++ b/package/skeleton/skeleton.mk
> @@ -19,14 +19,29 @@ else
> SKELETON_PATH = system/skeleton
> endif
>
> +ifeq ($(BR2_ROOTFS_USR_SYMLINKS),y)
> +define SKELETON_USR_SYMLINKS
> + ln -snf usr/bin $(TARGET_DIR)/bin
> + ln -snf usr/sbin $(TARGET_DIR)/sbin
> + ln -snf usr/lib $(TARGET_DIR)/lib
> +endef
> +else
> +define SKELETON_NO_USR_SYMLINKS
I would define only a single variable: SKELETON_USR_SYMLINKS_OR_DIRECTORIES.
> + $(INSTALL) -d -m 0755 $(TARGET_DIR)/bin
> + $(INSTALL) -d -m 0755 $(TARGET_DIR)/sbin
> + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib
> +endef
> +endif
> +
> define SKELETON_INSTALL_TARGET_CMDS
> rsync -a --ignore-times $(SYNC_VCS_EXCLUSIONS) \
> --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
> $(SKELETON_PATH)/ $(TARGET_DIR)/
> + $(SKELETON_NO_USR_SYMLINKS)
> + $(SKELETON_USR_SYMLINKS)
> $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \
> $(TARGET_DIR_WARNING_FILE)
> ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
> - mkdir -p $(TARGET_DIR)/usr
> ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
> endef
>
> diff --git a/system/Config.in b/system/Config.in
> index fad829d..96860d1 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
> depends on BR2_USE_MMU
> depends on !BR2_STATIC_LIBS
> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> + select BR2_ROOTFS_USR_SYMLINKS
> select BR2_PACKAGE_SYSTEMD
>
> comment 'systemd needs an (e)glibc toolchain, headers >= 3.10'
> @@ -178,6 +179,18 @@ endif
>
> if BR2_ROOTFS_SKELETON_DEFAULT
>
> +config BR2_ROOTFS_USR_SYMLINKS
> + bool "Use symlinks to /usr for /bin, /sbin and /lib"
I like this summary!
> + help
> + If you say 'n' here, then /bin /sbin and /lib and their
> + counterparts in /usr will be separate directories. This
> + is the traditional UNIX way. In this case, /usr can be a
> + partition separate from / .
> +
> + If you say 'y' here, then /bin /sbin and /lib will be symlinks
If you say 'y' here, then /bin, /sbin and /lib will be merged to their
counterparts in /usr and replaced by symlinks.
> + to their counterparts in /usr. This is the new systemd way. In
There's not much point to refer to systemd here, since it is forcibly selected
in the systemd case.
> + this case, /usr has to be on the / partition.
/usr cannot be a separate filesystem.
BTW I wouldn't mind if this option would default to y eventually. I've been
doing this (using a custom skeleton) for quite a while now.
Regards,
Arnout
> +
> config BR2_TARGET_ENABLE_ROOT_LOGIN
> bool "Enable root login with password"
> default y
> diff --git a/system/skeleton/bin/.empty b/system/skeleton/bin/.empty
> deleted file mode 100644
> index e69de29..0000000
> diff --git a/system/skeleton/lib/.empty b/system/skeleton/lib/.empty
> deleted file mode 100644
> index e69de29..0000000
> diff --git a/system/skeleton/sbin/.empty b/system/skeleton/sbin/.empty
> deleted file mode 100644
> index e69de29..0000000
>
[1] https://fedoraproject.org/wiki/Features/UsrMove
[2] http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 20:59 ` Arnout Vandecappelle
@ 2015-09-02 21:17 ` Arnout Vandecappelle
2015-09-02 22:09 ` Yann E. MORIN
2015-09-02 22:07 ` Yann E. MORIN
1 sibling, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-02 21:17 UTC (permalink / raw)
To: buildroot
On 02-09-15 22:59, Arnout Vandecappelle wrote:
> On 02-09-15 00:55, Yann E. MORIN wrote:
>> systemd is incresaingly expected things to live in /usr/bin or
>
> increasingly
>
>> /usr/sbin.
>>
>> However, a lot of packages stil install stuff directly into /bin or
>
> still
>
>> /sbin.
>>
>> Add an option so that /bin and /sbin be symlinks to /usr/bin and
>
> be -> are
>
>> /usr/sbin. Ditto for .lib for consistency.
>
> .lib -> /lib
One more thing: it would be good to mention explicitly in the commit log that
/lib64 (or /lib32 or /libx32) doesn't need to be handled because that is already
a symlink to lib.
Regards,
Arnout
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 20:59 ` Arnout Vandecappelle
2015-09-02 21:17 ` Arnout Vandecappelle
@ 2015-09-02 22:07 ` Yann E. MORIN
1 sibling, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:07 UTC (permalink / raw)
To: buildroot
Arnout, All,
On 2015-09-02 22:59 +0200, Arnout Vandecappelle spake thusly:
> On 02-09-15 00:55, Yann E. MORIN wrote:
> > systemd is incresaingly expected things to live in /usr/bin or
> increasingly
Yup, as noted by Baruch.
> > /usr/sbin.
> >
> > However, a lot of packages stil install stuff directly into /bin or
> still
Yup.
> > /sbin.
> >
> > Add an option so that /bin and /sbin be symlinks to /usr/bin and
> be -> are
Nope, this is subjunctive. ;-)
https://en.wikipedia.org/wiki/Subjunctive_mood
Subjunctives occur most often, although not exclusively, in
subordinate clauses, particularly that-clauses. Examples of subjunctive
use can be found in the English sentences "I suggest that you be
careful" [...]
> > /usr/sbin. Ditto for .lib for consistency.
> .lib -> /lib
Yup.
> In reality, this option is only tangentially related to systemd. Rather, it's a
> Fedora feature [1] that was taken over by Lennart P. and therefore by systemd
> [2]. A better name for the feature is "merged /usr".
ACK, thanks for the history lesson. :-)
/me has laways been pretty bad in history.
/me is ready to trade history lessons for grammatical lessons. But not
ortograph, as it seems, nor typing lessons. ;-)
[--SNIP--]
> > +ifeq ($(BR2_ROOTFS_USR_SYMLINKS),y)
> > +define SKELETON_USR_SYMLINKS
> > + ln -snf usr/bin $(TARGET_DIR)/bin
> > + ln -snf usr/sbin $(TARGET_DIR)/sbin
> > + ln -snf usr/lib $(TARGET_DIR)/lib
> > +endef
> > +else
> > +define SKELETON_NO_USR_SYMLINKS
>
> I would define only a single variable: SKELETON_USR_SYMLINKS_OR_DIRECTORIES.
Yeah, I wandered between the two options: a single variable or two.
Since I could not find a good name for the single-variable solution, I
went for two variables.
I'll switch (and maybe rename the variable to SKELETON_USR_SYMLINKS_OR_DIRS.
[--SNIP--]
> > @@ -178,6 +179,18 @@ endif
> >
> > if BR2_ROOTFS_SKELETON_DEFAULT
> >
> > +config BR2_ROOTFS_USR_SYMLINKS
> > + bool "Use symlinks to /usr for /bin, /sbin and /lib"
>
> I like this summary!
Thanks! ;-)
> > + help
> > + If you say 'n' here, then /bin /sbin and /lib and their
> > + counterparts in /usr will be separate directories. This
> > + is the traditional UNIX way. In this case, /usr can be a
> > + partition separate from / .
> > +
> > + If you say 'y' here, then /bin /sbin and /lib will be symlinks
>
> If you say 'y' here, then /bin, /sbin and /lib will be merged to their
> counterparts in /usr and replaced by symlinks.
It's not that they will be merged, since we do not install things in
/bin and /sbin, and them merge the two; they are one from the beginning.
So, I'm a bit uneasy at using 'merge' in this case.
> > + to their counterparts in /usr. This is the new systemd way. In
>
> There's not much point to refer to systemd here, since it is forcibly selected
> in the systemd case.
After reading what you said above: ACK.
> > + this case, /usr has to be on the / partition.
>
> /usr cannot be a separate filesystem.
ACK.
> BTW I wouldn't mind if this option would default to y eventually. I've been
> doing this (using a custom skeleton) for quite a while now.
Well, I certainly know some caes where /usr is a separate partition, and
defaulting that option to 'y' would break the unsuspecting users.
I'd rather we keep it 'n' at least for the foreseeable future (1 year?)
> [1] https://fedoraproject.org/wiki/Features/UsrMove
> [2] http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge
Thanks! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 21:17 ` Arnout Vandecappelle
@ 2015-09-02 22:09 ` Yann E. MORIN
2015-09-03 14:46 ` Mike Williams
0 siblings, 1 reply; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:09 UTC (permalink / raw)
To: buildroot
Arnout, All,
On 2015-09-02 23:17 +0200, Arnout Vandecappelle spake thusly:
> On 02-09-15 22:59, Arnout Vandecappelle wrote:
> > On 02-09-15 00:55, Yann E. MORIN wrote:
> >> systemd is incresaingly expected things to live in /usr/bin or
> >> /usr/sbin.
> >>
> >> However, a lot of packages stil install stuff directly into /bin or
> >> /sbin.
> >>
> >> Add an option so that /bin and /sbin be symlinks to /usr/bin and
> >> /usr/sbin. Ditto for .lib for consistency.
>
> One more thing: it would be good to mention explicitly in the commit log that
> /lib64 (or /lib32 or /libx32) doesn't need to be handled because that is already
> a symlink to lib.
Yeah, I almost mentionned them, but refrained from doing so, as I thought
it was already well-known that they were synlinks already.
But I'll add this before I resubmit.
Thanks! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-02 22:09 ` Yann E. MORIN
@ 2015-09-03 14:46 ` Mike Williams
2015-09-03 15:12 ` Vicente Olivert Riera
0 siblings, 1 reply; 34+ messages in thread
From: Mike Williams @ 2015-09-03 14:46 UTC (permalink / raw)
To: buildroot
Yann,
On Wed, Sep 2, 2015 at 6:09 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Arnout, All,
>
> On 2015-09-02 23:17 +0200, Arnout Vandecappelle spake thusly:
> > On 02-09-15 22:59, Arnout Vandecappelle wrote:
> > > On 02-09-15 00:55, Yann E. MORIN wrote:
> > >> systemd is incresaingly expected things to live in /usr/bin or
> > >> /usr/sbin.
> > >>
> > >> However, a lot of packages stil install stuff directly into /bin or
> > >> /sbin.
> > >>
> > >> Add an option so that /bin and /sbin be symlinks to /usr/bin and
> > >> /usr/sbin. Ditto for .lib for consistency.
> >
> > One more thing: it would be good to mention explicitly in the commit log that
> > /lib64 (or /lib32 or /libx32) doesn't need to be handled because that is already
> > a symlink to lib.
>
> Yeah, I almost mentionned them, but refrained from doing so, as I thought
> it was already well-known that they were synlinks already.
>
> But I'll add this before I resubmit.
The systemd build failed for me unless I modified systemd.mk as such:
-- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -28,7 +28,6 @@ endif
SYSTEMD_CONF_OPTS += \
--with-rootprefix= \
- --with-rootlibdir=/lib \
--enable-static=no \
--disable-manpages \
--disable-selinux \
@@ -37,7 +36,6 @@ SYSTEMD_CONF_OPTS += \
--with-dbuspolicydir=/etc/dbus-1/system.d \
--with-dbussessionservicedir=/usr/share/dbus-1/services \
--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
- --enable-split-usr \
--disable-efi \
--disable-gnuefi \
--disable-tests \
Once those changes were made everything worked fine so feel free to
add my Tested-by: Mike Williams <mike@mikebwilliams.com> if your next
patch spin includes them.
Mike
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-03 14:46 ` Mike Williams
@ 2015-09-03 15:12 ` Vicente Olivert Riera
2015-09-03 15:57 ` Yann E. MORIN
0 siblings, 1 reply; 34+ messages in thread
From: Vicente Olivert Riera @ 2015-09-03 15:12 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On 09/03/2015 03:46 PM, Mike Williams wrote:
> Yann,
>
> On Wed, Sep 2, 2015 at 6:09 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>>
>> Arnout, All,
>>
>> On 2015-09-02 23:17 +0200, Arnout Vandecappelle spake thusly:
>>> On 02-09-15 22:59, Arnout Vandecappelle wrote:
>>>> On 02-09-15 00:55, Yann E. MORIN wrote:
>>>>> systemd is incresaingly expected things to live in /usr/bin or
>>>>> /usr/sbin.
>>>>>
>>>>> However, a lot of packages stil install stuff directly into /bin or
>>>>> /sbin.
>>>>>
>>>>> Add an option so that /bin and /sbin be symlinks to /usr/bin and
>>>>> /usr/sbin. Ditto for .lib for consistency.
>>>
>>> One more thing: it would be good to mention explicitly in the commit log that
>>> /lib64 (or /lib32 or /libx32) doesn't need to be handled because that is already
>>> a symlink to lib.
>>
>> Yeah, I almost mentionned them, but refrained from doing so, as I thought
>> it was already well-known that they were synlinks already.
>>
>> But I'll add this before I resubmit.
>
>
> The systemd build failed for me unless I modified systemd.mk as such:
same problem here:
mv:
`/home/ldap/vriera/git-clones/buildroot-1/output/target/usr/lib/libsystemd.so.0'
and
`/home/ldap/vriera/git-clones/buildroot-1/output/target/lib/libsystemd.so.0'
are the same file
mv:
`/home/ldap/vriera/git-clones/buildroot-1/output/target/usr/lib/libsystemd.so.0.8.0'
and
`/home/ldap/vriera/git-clones/buildroot-1/output/target/lib/libsystemd.so.0.8.0'
are the same file
make[5]: *** [libsystemd-install-hook] Error 1
> -- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -28,7 +28,6 @@ endif
>
> SYSTEMD_CONF_OPTS += \
> --with-rootprefix= \
> - --with-rootlibdir=/lib \
> --enable-static=no \
> --disable-manpages \
> --disable-selinux \
> @@ -37,7 +36,6 @@ SYSTEMD_CONF_OPTS += \
> --with-dbuspolicydir=/etc/dbus-1/system.d \
> --with-dbussessionservicedir=/usr/share/dbus-1/services \
> --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
> - --enable-split-usr \
> --disable-efi \
> --disable-gnuefi \
> --disable-tests \
>
> Once those changes were made everything worked fine so feel free to
> add my Tested-by: Mike Williams <mike@mikebwilliams.com> if your next
> patch spin includes them.
But I only needed to remove the "--with-rootlibdir=/lib \" line to make
it build fine.
Regards,
Vincent.
> Mike
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-03 15:12 ` Vicente Olivert Riera
@ 2015-09-03 15:57 ` Yann E. MORIN
0 siblings, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-03 15:57 UTC (permalink / raw)
To: buildroot
Mike, Vincent, All,
On 2015-09-03 16:12 +0100, Vicente Olivert Riera spake thusly:
> On 09/03/2015 03:46 PM, Mike Williams wrote:
> > On Wed, Sep 2, 2015 at 6:09 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >>>> On 02-09-15 00:55, Yann E. MORIN wrote:
> >>>>> systemd is incresaingly expected things to live in /usr/bin or
> >>>>> /usr/sbin.
> >>>>>
> >>>>> However, a lot of packages stil install stuff directly into /bin or
> >>>>> /sbin.
> >>>>>
> >>>>> Add an option so that /bin and /sbin be symlinks to /usr/bin and
> >>>>> /usr/sbin. Ditto for .lib for consistency.
> >
> > The systemd build failed for me unless I modified systemd.mk as such:
>
> same problem here:
>
> mv:
> `/home/ldap/vriera/git-clones/buildroot-1/output/target/usr/lib/libsystemd.so.0'
> and
> `/home/ldap/vriera/git-clones/buildroot-1/output/target/lib/libsystemd.so.0'
> are the same file
> mv:
> `/home/ldap/vriera/git-clones/buildroot-1/output/target/usr/lib/libsystemd.so.0.8.0'
> and
> `/home/ldap/vriera/git-clones/buildroot-1/output/target/lib/libsystemd.so.0.8.0'
> are the same file
> make[5]: *** [libsystemd-install-hook] Error 1
>
> > -- a/package/systemd/systemd.mk
> > +++ b/package/systemd/systemd.mk
> > @@ -28,7 +28,6 @@ endif
> >
> > SYSTEMD_CONF_OPTS += \
> > --with-rootprefix= \
> > - --with-rootlibdir=/lib \
> > --enable-static=no \
> > --disable-manpages \
> > --disable-selinux \
> > @@ -37,7 +36,6 @@ SYSTEMD_CONF_OPTS += \
> > --with-dbuspolicydir=/etc/dbus-1/system.d \
> > --with-dbussessionservicedir=/usr/share/dbus-1/services \
> > --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
> > - --enable-split-usr \
> > --disable-efi \
> > --disable-gnuefi \
> > --disable-tests \
> >
> > Once those changes were made everything worked fine so feel free to
> > add my Tested-by: Mike Williams <mike@mikebwilliams.com> if your next
> > patch spin includes them.
>
> But I only needed to remove the "--with-rootlibdir=/lib \" line to make
> it build fine.
Well, since we're effectively ditching the split-usr case, there's no
reason to keep the --enable-split-usr configure option, is there?
Anyway, thanks both for testing! :-)
Mike, I won't carry your reviewd and tested tags, since I've made quite
some changes after all the comments, so that would not be fair to list a
review and test which would not have been conducted on the new code.
However, that's much appreciated! :-) Do not hesitate to retest the new
version when I send it (soonish). Thanks! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
@ 2015-09-03 23:47 Yann E. MORIN
2015-09-04 7:48 ` Vicente Olivert Riera
2015-09-04 8:11 ` Thomas Petazzoni
0 siblings, 2 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-03 23:47 UTC (permalink / raw)
To: buildroot
systemd is increasingly expecting things to live in /usr/bin or
/usr/sbin. It has inherited those expectations from a Fedora change:
https://fedoraproject.org/wiki/Features/UsrMove
Note however, that systemd does support /usr being on a separate
filesystem; it just expects an initramfs to mount it before the final
switchroot over to the actual rootfs.
But the traditional use-case for Buildroot is not to boot with an
initramfs; although that is totally feasible, that's probably not what
is commonly done in the vast majority of cases.
However, a lot of packages still install stuff directly into /bin or
/sbin, which systemd may need early-on in the boot process, even before
it may have a chance to mount /usr. Even though we can tell systemd, at
configure-time, where it should expect programs to be at runtime, it
does not make sense to go head-first against an upstream wa^Hill.
Add an option so that /bin and /sbin be symlinks to /usr/bin and
/usr/sbin. Ditto for /lib for consistency. That option is forcibly
enabled when the init system is systemd.
Furthermore, this means we're no longer supporting a split-usr setup, so
the corresponding configure options have been removed as well for
systemd and, when using a merged /usr, for eudev as well.
Note: we need not handle /lib32 or /lib64, as they already are symlinks
to /lib, which means they will automatically be redirected to /usr/lib.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Mike Williams <mike@mikebwilliams.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
package/eudev/eudev.mk | 2 --
package/skeleton/skeleton.mk | 20 +++++++++++++++++---
package/systemd/systemd.mk | 2 --
system/Config.in | 13 +++++++++++++
system/skeleton/bin/.empty | 0
system/skeleton/lib/.empty | 0
system/skeleton/sbin/.empty | 0
7 files changed, 30 insertions(+), 7 deletions(-)
delete mode 100644 system/skeleton/bin/.empty
delete mode 100644 system/skeleton/lib/.empty
delete mode 100644 system/skeleton/sbin/.empty
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 1aa74b3..24fe4ed 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -22,11 +22,9 @@ EUDEV_CONF_ENV += LIBS=-lrt
EUDEV_CONF_OPTS = \
--disable-manpages \
--sbindir=/sbin \
- --with-rootlibdir=/lib \
--libexecdir=/lib \
--with-firmware-path=/lib/firmware \
--disable-introspection \
- --enable-split-usr \
--enable-libkmod
EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index 48e7085..920d3b4 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -19,15 +19,29 @@ else
SKELETON_PATH = system/skeleton
endif
+ifeq ($(BR2_ROOTFS_MERGED_USR),y)
+define SKELETON_USR_SYMLINKS_OR_DIRS
+ ln -snf usr/bin $(TARGET_DIR)/bin
+ ln -snf usr/sbin $(TARGET_DIR)/sbin
+ ln -snf usr/lib $(TARGET_DIR)/lib
+endef
+else
+define SKELETON_USR_SYMLINKS_OR_DIRS
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/bin
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/sbin
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib
+endef
+endif
+
define SKELETON_INSTALL_TARGET_CMDS
rsync -a --ignore-times $(SYNC_VCS_EXCLUSIONS) \
--chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
$(SKELETON_PATH)/ $(TARGET_DIR)/
- $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \
- $(TARGET_DIR_WARNING_FILE)
+ $(SKELETON_USR_SYMLINKS_OR_DIRS)
ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
- mkdir -p $(TARGET_DIR)/usr
ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
+ $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \
+ $(TARGET_DIR_WARNING_FILE)
endef
SKELETON_TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index b62fc08..59ab103 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -28,7 +28,6 @@ endif
SYSTEMD_CONF_OPTS += \
--with-rootprefix= \
- --with-rootlibdir=/lib \
--enable-static=no \
--disable-manpages \
--disable-selinux \
@@ -37,7 +36,6 @@ SYSTEMD_CONF_OPTS += \
--with-dbuspolicydir=/etc/dbus-1/system.d \
--with-dbussessionservicedir=/usr/share/dbus-1/services \
--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
- --enable-split-usr \
--disable-efi \
--disable-gnuefi \
--disable-tests \
diff --git a/system/Config.in b/system/Config.in
index fad829d..735ad62 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+ select BR2_ROOTFS_MERGED_USR
select BR2_PACKAGE_SYSTEMD
comment 'systemd needs an (e)glibc toolchain, headers >= 3.10'
@@ -178,6 +179,18 @@ endif
if BR2_ROOTFS_SKELETON_DEFAULT
+config BR2_ROOTFS_MERGED_USR
+ bool "Use symlinks to /usr for /bin, /sbin and /lib"
+ help
+ If you say 'n' here, then /bin, /sbin and /lib and their
+ counterparts in /usr will be separate directories. This
+ is the historical UNIX way. In this case, /usr can be a
+ filesystem on a partition separate from / .
+
+ If you say 'y' here, then /bin, /sbin and /lib will be symlinks
+ to their counterparts in /usr. In this case, /usr can not be a
+ separate filesystem.
+
config BR2_TARGET_ENABLE_ROOT_LOGIN
bool "Enable root login with password"
default y
diff --git a/system/skeleton/bin/.empty b/system/skeleton/bin/.empty
deleted file mode 100644
index e69de29..0000000
diff --git a/system/skeleton/lib/.empty b/system/skeleton/lib/.empty
deleted file mode 100644
index e69de29..0000000
diff --git a/system/skeleton/sbin/.empty b/system/skeleton/sbin/.empty
deleted file mode 100644
index e69de29..0000000
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-03 23:47 [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr Yann E. MORIN
@ 2015-09-04 7:48 ` Vicente Olivert Riera
2015-09-04 8:16 ` Arnout Vandecappelle
2015-09-04 16:12 ` Yann E. MORIN
2015-09-04 8:11 ` Thomas Petazzoni
1 sibling, 2 replies; 34+ messages in thread
From: Vicente Olivert Riera @ 2015-09-04 7:48 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
I think you forgot to add "v2" to the subject prefix and also list the
changes between v1 and v2.
On 09/04/2015 12:47 AM, Yann E. MORIN wrote:
> Furthermore, this means we're no longer supporting a split-usr setup, so
> the corresponding configure options have been removed as well for
> systemd and, when using a merged /usr, for eudev as well.
taking the last line of that comment into account...
> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> index 1aa74b3..24fe4ed 100644
> --- a/package/eudev/eudev.mk
> +++ b/package/eudev/eudev.mk
> @@ -22,11 +22,9 @@ EUDEV_CONF_ENV += LIBS=-lrt
> EUDEV_CONF_OPTS = \
> --disable-manpages \
> --sbindir=/sbin \
> - --with-rootlibdir=/lib \
> --libexecdir=/lib \
> --with-firmware-path=/lib/firmware \
> --disable-introspection \
> - --enable-split-usr \
> --enable-libkmod
>
> EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
shouldn't you do that _ONLY_ when BR2_ROOTFS_MERGED_USR is selected?
Regards,
Vincent.
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-03 23:47 [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr Yann E. MORIN
2015-09-04 7:48 ` Vicente Olivert Riera
@ 2015-09-04 8:11 ` Thomas Petazzoni
2015-09-04 8:19 ` Arnout Vandecappelle
1 sibling, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2015-09-04 8:11 UTC (permalink / raw)
To: buildroot
Yann,
On Fri, 4 Sep 2015 01:47:42 +0200, Yann E. MORIN wrote:
> +config BR2_ROOTFS_MERGED_USR
> + bool "Use symlinks to /usr for /bin, /sbin and /lib"
Shouldn't we make this a blind option? I.e just do merged usr for
systemd always, and never do it for !systemd.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 7:48 ` Vicente Olivert Riera
@ 2015-09-04 8:16 ` Arnout Vandecappelle
2015-09-04 16:29 ` Yann E. MORIN
2015-09-04 16:12 ` Yann E. MORIN
1 sibling, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-04 8:16 UTC (permalink / raw)
To: buildroot
On 04-09-15 09:48, Vicente Olivert Riera wrote:
> Dear Yann E. MORIN,
>
> I think you forgot to add "v2" to the subject prefix and also list the
> changes between v1 and v2.
>
> On 09/04/2015 12:47 AM, Yann E. MORIN wrote:
>> Furthermore, this means we're no longer supporting a split-usr setup, so
>> the corresponding configure options have been removed as well for
>> systemd and, when using a merged /usr, for eudev as well.
>
> taking the last line of that comment into account...
>
>> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
>> index 1aa74b3..24fe4ed 100644
>> --- a/package/eudev/eudev.mk
>> +++ b/package/eudev/eudev.mk
>> @@ -22,11 +22,9 @@ EUDEV_CONF_ENV += LIBS=-lrt
>> EUDEV_CONF_OPTS = \
>> --disable-manpages \
>> --sbindir=/sbin \
>> - --with-rootlibdir=/lib \
>> --libexecdir=/lib \
>> --with-firmware-path=/lib/firmware \
>> --disable-introspection \
>> - --enable-split-usr \
>> --enable-libkmod
>>
>> EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
>
> shouldn't you do that _ONLY_ when BR2_ROOTFS_MERGED_USR is selected?
In addition, are --sbindir and --libexecdir still needed?
[snip]
>> diff --git a/system/Config.in b/system/Config.in
>> index fad829d..735ad62 100644
>> --- a/system/Config.in
>> +++ b/system/Config.in
>> @@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
>> depends on BR2_USE_MMU
>> depends on !BR2_STATIC_LIBS
>> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
>> + select BR2_ROOTFS_MERGED_USR
Wouldn't it be more appropriate to move this to package/systemd/Config.in,
which already has all the other selects?
OTOH, this is a system option while package/systemd/Config.in selects only
packages.
I think we should reason as follows: if we would ever support building the
systemd package without BR2_INIT_SYSTEMD, would we want to select
BR2_ROOTFS_MERGED_USR? Perhaps the answer is yes, because the systemd package
will simply not work in a split /usr unless --enable-split-usr is passed - which
we don't.
Anyway, it's probably bikeshedding. But perhaps you can put a rationale in the
commit message for future reference. After all, your commit message is a bit
short at the moment :-P
Regards,
Arnout
>> select BR2_PACKAGE_SYSTEMD
>
> Regards,
>
> Vincent.
>
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 8:11 ` Thomas Petazzoni
@ 2015-09-04 8:19 ` Arnout Vandecappelle
2015-09-04 16:31 ` Yann E. MORIN
0 siblings, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-04 8:19 UTC (permalink / raw)
To: buildroot
On 04-09-15 10:11, Thomas Petazzoni wrote:
> Yann,
>
> On Fri, 4 Sep 2015 01:47:42 +0200, Yann E. MORIN wrote:
>
>> +config BR2_ROOTFS_MERGED_USR
>> + bool "Use symlinks to /usr for /bin, /sbin and /lib"
>
> Shouldn't we make this a blind option? I.e just do merged usr for
> systemd always, and never do it for !systemd.
I will always turn this option on, even in non-systemd, because it makes for a
better environment. See the Fedora document for a long explanation why split
/usr is just legacy baggage. Other parts of your system will also work better
when this option is turned on - no more confusion between busybox installing
something in /bin and the full package putting it in /usr/bin. No more worries
about a shebang being correct.
So no, I don't want this to be hidden.
Regards,
Arnout
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 7:48 ` Vicente Olivert Riera
2015-09-04 8:16 ` Arnout Vandecappelle
@ 2015-09-04 16:12 ` Yann E. MORIN
1 sibling, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-04 16:12 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2015-09-04 08:48 +0100, Vicente Olivert Riera spake thusly:
> I think you forgot to add "v2" to the subject prefix and also list the
> changes between v1 and v2.
Yup. I rushed that submission. That's bad on my part. Sorry.
> On 09/04/2015 12:47 AM, Yann E. MORIN wrote:
> > Furthermore, this means we're no longer supporting a split-usr setup, so
> > the corresponding configure options have been removed as well for
> > systemd and, when using a merged /usr, for eudev as well.
>
> taking the last line of that comment into account...
>
> > diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> > index 1aa74b3..24fe4ed 100644
> > --- a/package/eudev/eudev.mk
> > +++ b/package/eudev/eudev.mk
> > @@ -22,11 +22,9 @@ EUDEV_CONF_ENV += LIBS=-lrt
> > EUDEV_CONF_OPTS = \
> > --disable-manpages \
> > --sbindir=/sbin \
> > - --with-rootlibdir=/lib \
> > --libexecdir=/lib \
> > --with-firmware-path=/lib/firmware \
> > --disable-introspection \
> > - --enable-split-usr \
> > --enable-libkmod
> >
> > EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
>
> shouldn't you do that _ONLY_ when BR2_ROOTFS_MERGED_USR is selected?
Yeah. I forgot to git-add before I git-commit --amend.
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 8:16 ` Arnout Vandecappelle
@ 2015-09-04 16:29 ` Yann E. MORIN
2015-09-04 19:05 ` Arnout Vandecappelle
0 siblings, 1 reply; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-04 16:29 UTC (permalink / raw)
To: buildroot
Arnout, All,
On 2015-09-04 10:16 +0200, Arnout Vandecappelle spake thusly:
[--SNIP--]
> >> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> >> index 1aa74b3..24fe4ed 100644
> >> --- a/package/eudev/eudev.mk
> >> +++ b/package/eudev/eudev.mk
> >> @@ -22,11 +22,9 @@ EUDEV_CONF_ENV += LIBS=-lrt
> >> EUDEV_CONF_OPTS = \
> >> --disable-manpages \
> >> --sbindir=/sbin \
> >> - --with-rootlibdir=/lib \
> >> --libexecdir=/lib \
> >> --with-firmware-path=/lib/firmware \
> >> --disable-introspection \
> >> - --enable-split-usr \
> >> --enable-libkmod
> >>
> >> EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
> >
> > shouldn't you do that _ONLY_ when BR2_ROOTFS_MERGED_USR is selected?
>
> In addition, are --sbindir and --libexecdir still needed?
Dunno... Will test.
> >> diff --git a/system/Config.in b/system/Config.in
> >> index fad829d..735ad62 100644
> >> --- a/system/Config.in
> >> +++ b/system/Config.in
> >> @@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
> >> depends on BR2_USE_MMU
> >> depends on !BR2_STATIC_LIBS
> >> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> >> + select BR2_ROOTFS_MERGED_USR
>
> Wouldn't it be more appropriate to move this to package/systemd/Config.in,
> which already has all the other selects?
>
> OTOH, this is a system option while package/systemd/Config.in selects only
> packages.
Well, I don't care. In fact, BR2_INIT_SYSTEMD and BR2_PACKAGE_SYSTEMD
are in effect synonyms. So, it's completely arbiotrary where we put the
selects.
I would have favoured pacakge dependencies, like libs and support stuff,
to be selected by the package, while system-related dependencies would
have been handled by the init sytem.
But as you say, this is a fringe case. After all, systemd *does* support
a separate /usr, it's just that we in Buildroot decided (with this
patch) not to support that case.
> I think we should reason as follows: if we would ever support building the
> systemd package without BR2_INIT_SYSTEMD,
But does that question even make sense to start with? systemd *is* an
init system and nothing more, so there's no reason we would ever build
systemd stand-alone.
At least, in the current state of affairs, for the foreseeable future,
there's almost no chance we build systemd standalone.
> Anyway, it's probably bikeshedding. But perhaps you can put a rationale in the
> commit message for future reference.
Like:
In Buildroot, we decided not to support a split-usr when systemd
is used as an init system. This is not a systemd issue, this is a
deign decision. Thus the select is with BR2_INIT_SYSTEMD rather
than with BR2_PACKAGE_SYSTEMD.
> After all, your commit message is a bit
> short at the moment :-P
I'll take that as an incitation at expanding it even more. The four
lines above will make it! ;-p
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 8:19 ` Arnout Vandecappelle
@ 2015-09-04 16:31 ` Yann E. MORIN
2015-09-14 21:12 ` Peter Korsgaard
0 siblings, 1 reply; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-04 16:31 UTC (permalink / raw)
To: buildroot
Thomas, Arnout, All,
On 2015-09-04 10:19 +0200, Arnout Vandecappelle spake thusly:
> On 04-09-15 10:11, Thomas Petazzoni wrote:
> > On Fri, 4 Sep 2015 01:47:42 +0200, Yann E. MORIN wrote:
> >
> >> +config BR2_ROOTFS_MERGED_USR
> >> + bool "Use symlinks to /usr for /bin, /sbin and /lib"
> >
> > Shouldn't we make this a blind option? I.e just do merged usr for
> > systemd always, and never do it for !systemd.
>
> I will always turn this option on, even in non-systemd, because it makes for a
> better environment. See the Fedora document for a long explanation why split
> /usr is just legacy baggage. Other parts of your system will also work better
> when this option is turned on - no more confusion between busybox installing
> something in /bin and the full package putting it in /usr/bin. No more worries
> about a shebang being correct.
>
> So no, I don't want this to be hidden.
Ditto, I do not want this to be hidden. I want to have the choice of
using a merged-usr even without systemd (and I even have a use-case in
my head for that).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 16:29 ` Yann E. MORIN
@ 2015-09-04 19:05 ` Arnout Vandecappelle
0 siblings, 0 replies; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-04 19:05 UTC (permalink / raw)
To: buildroot
On 04-09-15 18:29, Yann E. MORIN wrote:
> Arnout, All,
>
> On 2015-09-04 10:16 +0200, Arnout Vandecappelle spake thusly:
[snip]
>>>> diff --git a/system/Config.in b/system/Config.in
>>>> index fad829d..735ad62 100644
>>>> --- a/system/Config.in
>>>> +++ b/system/Config.in
>>>> @@ -88,6 +88,7 @@ config BR2_INIT_SYSTEMD
>>>> depends on BR2_USE_MMU
>>>> depends on !BR2_STATIC_LIBS
>>>> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
>>>> + select BR2_ROOTFS_MERGED_USR
>>
>> Wouldn't it be more appropriate to move this to package/systemd/Config.in,
>> which already has all the other selects?
>>
>> OTOH, this is a system option while package/systemd/Config.in selects only
>> packages.
>
> Well, I don't care. In fact, BR2_INIT_SYSTEMD and BR2_PACKAGE_SYSTEMD
> are in effect synonyms. So, it's completely arbiotrary where we put the
> selects.
>
> I would have favoured pacakge dependencies, like libs and support stuff,
> to be selected by the package, while system-related dependencies would
> have been handled by the init sytem.
Indeed.
> But as you say, this is a fringe case. After all, systemd *does* support
> a separate /usr, it's just that we in Buildroot decided (with this
> patch) not to support that case.
>
>> I think we should reason as follows: if we would ever support building the
>> systemd package without BR2_INIT_SYSTEMD,
>
> But does that question even make sense to start with? systemd *is* an
> init system and nothing more, so there's no reason we would ever build
> systemd stand-alone.
>
> At least, in the current state of affairs, for the foreseeable future,
> there's almost no chance we build systemd standalone.
Yeah, you're right, not a good idea to design for things that may not happen.
>> Anyway, it's probably bikeshedding. But perhaps you can put a rationale in the
>> commit message for future reference.
>
> Like:
>
> In Buildroot, we decided not to support a split-usr when systemd
> is used as an init system. This is not a systemd issue, this is a
> deign decision. Thus the select is with BR2_INIT_SYSTEMD rather
> than with BR2_PACKAGE_SYSTEMD.
Perfect!
Regards,
Arnout
>
>> After all, your commit message is a bit
>> short at the moment :-P
>
> I'll take that as an incitation at expanding it even more. The four
> lines above will make it! ;-p
>
> Regards,
> Yann E. MORIN.
>
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-04 16:31 ` Yann E. MORIN
@ 2015-09-14 21:12 ` Peter Korsgaard
2015-09-14 21:23 ` Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 34+ messages in thread
From: Peter Korsgaard @ 2015-09-14 21:12 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
Hi,
>> I will always turn this option on, even in non-systemd, because it makes for a
>> better environment. See the Fedora document for a long explanation why split
>> /usr is just legacy baggage. Other parts of your system will also work better
>> when this option is turned on - no more confusion between busybox installing
>> something in /bin and the full package putting it in /usr/bin. No more worries
>> about a shebang being correct.
>>
>> So no, I don't want this to be hidden.
> Ditto, I do not want this to be hidden. I want to have the choice of
> using a merged-usr even without systemd (and I even have a use-case in
> my head for that).
And as explained, we might even want to default it to y in the future,
just because it is simpler when you have a single rootfs.
Is there any reason why we explicitly add the symlinks for /bin / /sbin
and /lib and don't just do:
ln -sf . usr
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-14 21:12 ` Peter Korsgaard
@ 2015-09-14 21:23 ` Yann E. MORIN
2015-09-14 21:26 ` Arnout Vandecappelle
2015-09-14 21:32 ` Thomas Petazzoni
2 siblings, 0 replies; 34+ messages in thread
From: Yann E. MORIN @ 2015-09-14 21:23 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2015-09-14 23:12 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> >> I will always turn this option on, even in non-systemd, because it makes for a
> >> better environment. See the Fedora document for a long explanation why split
> >> /usr is just legacy baggage. Other parts of your system will also work better
> >> when this option is turned on - no more confusion between busybox installing
> >> something in /bin and the full package putting it in /usr/bin. No more worries
> >> about a shebang being correct.
> >>
> >> So no, I don't want this to be hidden.
>
> > Ditto, I do not want this to be hidden. I want to have the choice of
> > using a merged-usr even without systemd (and I even have a use-case in
> > my head for that).
>
> And as explained, we might even want to default it to y in the future,
> just because it is simpler when you have a single rootfs.
>
> Is there any reason why we explicitly add the symlinks for /bin / /sbin
> and /lib and don't just do:
>
> ln -sf . usr
Well, for one, I would not like to have that, otherwise, we would have
an infinite hierarchy:
cd /usr/usr/usr/usr/usr/
and that's ugly... :-(
Also, I'd like we do not diverge too much from what distros are doing,
and they are doing the /{bin,sbin,lib} symlink dance.
Finally, fundamentally, things are now to be put into /usr rather than /
so it makes more sense to have the symlinks that way rather than the
other way around as you suggest.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-14 21:12 ` Peter Korsgaard
2015-09-14 21:23 ` Yann E. MORIN
@ 2015-09-14 21:26 ` Arnout Vandecappelle
2015-09-14 21:39 ` Peter Korsgaard
2015-09-14 21:32 ` Thomas Petazzoni
2 siblings, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-09-14 21:26 UTC (permalink / raw)
To: buildroot
On 14-09-15 23:12, Peter Korsgaard wrote:
>>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>
> Hi,
>
>>> I will always turn this option on, even in non-systemd, because it makes for a
> >> better environment. See the Fedora document for a long explanation why split
> >> /usr is just legacy baggage. Other parts of your system will also work better
> >> when this option is turned on - no more confusion between busybox installing
> >> something in /bin and the full package putting it in /usr/bin. No more worries
> >> about a shebang being correct.
> >>
> >> So no, I don't want this to be hidden.
>
> > Ditto, I do not want this to be hidden. I want to have the choice of
> > using a merged-usr even without systemd (and I even have a use-case in
> > my head for that).
>
> And as explained, we might even want to default it to y in the future,
> just because it is simpler when you have a single rootfs.
>
> Is there any reason why we explicitly add the symlinks for /bin / /sbin
> and /lib and don't just do:
>
> ln -sf . usr
Well, in Fedora I think the idea was that / could be an initramfs and /usr
would be mounted read-only. But since we don't directly support that use case,
making /usr a symlink would indeed be an option.
However, I'm not really in favour of it. I don't see that it brings a lot of
benefit, other than reducing the number of symlinks from 3 to 1. But it does
create /share and /local which looks weird could potentially conflict with
existing user directories (e.g. a mountpoint for windows shares...). Also it
makes it more complicated for the user to implement a fedora-like mounted /usr.
Regards,
Arnout
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-14 21:12 ` Peter Korsgaard
2015-09-14 21:23 ` Yann E. MORIN
2015-09-14 21:26 ` Arnout Vandecappelle
@ 2015-09-14 21:32 ` Thomas Petazzoni
2 siblings, 0 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2015-09-14 21:32 UTC (permalink / raw)
To: buildroot
Peter,
On Mon, 14 Sep 2015 23:12:59 +0200, Peter Korsgaard wrote:
> >> I will always turn this option on, even in non-systemd, because it makes for a
> >> better environment. See the Fedora document for a long explanation why split
> >> /usr is just legacy baggage. Other parts of your system will also work better
> >> when this option is turned on - no more confusion between busybox installing
> >> something in /bin and the full package putting it in /usr/bin. No more worries
> >> about a shebang being correct.
> >>
> >> So no, I don't want this to be hidden.
>
> > Ditto, I do not want this to be hidden. I want to have the choice of
> > using a merged-usr even without systemd (and I even have a use-case in
> > my head for that).
>
> And as explained, we might even want to default it to y in the future,
> just because it is simpler when you have a single rootfs.
>
> Is there any reason why we explicitly add the symlinks for /bin / /sbin
> and /lib and don't just do:
>
> ln -sf . usr
Then you have /share, /local and so on?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-14 21:26 ` Arnout Vandecappelle
@ 2015-09-14 21:39 ` Peter Korsgaard
2015-10-07 16:19 ` Mike Williams
0 siblings, 1 reply; 34+ messages in thread
From: Peter Korsgaard @ 2015-09-14 21:39 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
>> Is there any reason why we explicitly add the symlinks for /bin / /sbin
>> and /lib and don't just do:
>>
>> ln -sf . usr
> Well, in Fedora I think the idea was that / could be an initramfs and /usr
> would be mounted read-only. But since we don't directly support that use case,
> making /usr a symlink would indeed be an option.
> However, I'm not really in favour of it. I don't see that it brings
> a lot of benefit, other than reducing the number of symlinks from 3
> to 1. But it does create /share and /local which looks weird could
> potentially conflict with existing user directories (e.g. a
> mountpoint for windows shares...). Also it makes it more complicated
> for the user to implement a fedora-like mounted /usr.
Ok - fine, having 1 or 3 symlinks isn't really a big deal. Just symlinking /usr
seemed the simplest possible solution.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-09-14 21:39 ` Peter Korsgaard
@ 2015-10-07 16:19 ` Mike Williams
2015-10-07 22:03 ` Arnout Vandecappelle
0 siblings, 1 reply; 34+ messages in thread
From: Mike Williams @ 2015-10-07 16:19 UTC (permalink / raw)
To: buildroot
All,
> However, I'm not really in favour of it. I don't see that it brings
> > a lot of benefit, other than reducing the number of symlinks from 3
> > to 1. But it does create /share and /local which looks weird could
> > potentially conflict with existing user directories (e.g. a
> > mountpoint for windows shares...). Also it makes it more complicated
> > for the user to implement a fedora-like mounted /usr.
>
> Ok - fine, having 1 or 3 symlinks isn't really a big deal. Just symlinking
> /usr
> seemed the simplest possible solution.
>
Any reason this wasn't committed? Just reviewing my list of out-of-tree
patches...
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151007/bd96b48b/attachment.html>
^ permalink raw reply [flat|nested] 34+ messages in thread
* [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr
2015-10-07 16:19 ` Mike Williams
@ 2015-10-07 22:03 ` Arnout Vandecappelle
0 siblings, 0 replies; 34+ messages in thread
From: Arnout Vandecappelle @ 2015-10-07 22:03 UTC (permalink / raw)
To: buildroot
On 07-10-15 17:19, Mike Williams wrote:
> All,
>
> > However, I'm not really in favour of it. I don't see that it brings
> > a lot of benefit, other than reducing the number of symlinks from 3
> > to 1. But it does create /share and /local which looks weird could
> > potentially conflict with existing user directories (e.g. a
> > mountpoint for windows shares...). Also it makes it more complicated
> > for the user to implement a fedora-like mounted /usr.
>
> Ok - fine, having 1 or 3 symlinks isn't really a big deal. Just symlinking /usr
> seemed the simplest possible solution.
>
>
> Any reason this wasn't committed? Just reviewing my list of out-of-tree patches...
Because it is a non-trivial change, and we don't have runtime testing to give
Peter sufficient trust to just commit it, so he will want to look at the patch
in detail before committing. And by now it got snowed under by other patches...
So it's good that you push for it ;-).
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2015-10-07 22:03 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-03 23:47 [Buildroot] [PATCH] system: add options for /bin /sbin and /lib to be symlinks into /usr Yann E. MORIN
2015-09-04 7:48 ` Vicente Olivert Riera
2015-09-04 8:16 ` Arnout Vandecappelle
2015-09-04 16:29 ` Yann E. MORIN
2015-09-04 19:05 ` Arnout Vandecappelle
2015-09-04 16:12 ` Yann E. MORIN
2015-09-04 8:11 ` Thomas Petazzoni
2015-09-04 8:19 ` Arnout Vandecappelle
2015-09-04 16:31 ` Yann E. MORIN
2015-09-14 21:12 ` Peter Korsgaard
2015-09-14 21:23 ` Yann E. MORIN
2015-09-14 21:26 ` Arnout Vandecappelle
2015-09-14 21:39 ` Peter Korsgaard
2015-10-07 16:19 ` Mike Williams
2015-10-07 22:03 ` Arnout Vandecappelle
2015-09-14 21:32 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2015-09-01 22:55 Yann E. MORIN
2015-09-02 4:54 ` Baruch Siach
2015-09-02 7:10 ` Thomas Petazzoni
2015-09-02 13:50 ` Mike Williams
2015-09-02 14:04 ` Thomas Petazzoni
2015-09-02 14:05 ` Mike Williams
2015-09-02 14:28 ` Yann E. MORIN
2015-09-02 14:07 ` Vicente Olivert Riera
2015-09-02 14:11 ` Yann E. MORIN
2015-09-02 14:12 ` Thomas Petazzoni
2015-09-02 14:13 ` Vicente Olivert Riera
2015-09-02 20:59 ` Arnout Vandecappelle
2015-09-02 21:17 ` Arnout Vandecappelle
2015-09-02 22:09 ` Yann E. MORIN
2015-09-03 14:46 ` Mike Williams
2015-09-03 15:12 ` Vicente Olivert Riera
2015-09-03 15:57 ` Yann E. MORIN
2015-09-02 22:07 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox