* Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) @ 2014-12-02 18:27 Peter Kjellerstedt 2014-12-02 18:44 ` Mark Hatle 0 siblings, 1 reply; 9+ messages in thread From: Peter Kjellerstedt @ 2014-12-02 18:27 UTC (permalink / raw) To: Paul Eggleton, Fabrice Coulon, OE Core (openembedded-core@lists.openembedded.org) Cc: Henning Heinold, Koen Kooi (koen@dominion.thruhere.net) [ I am moving this discussion to the OE-core list as I believe that is where it belongs. ] > -----Original Message----- > From: yocto-bounces@yoctoproject.org [mailto:yocto- > bounces@yoctoproject.org] On Behalf Of Paul Eggleton > Sent: den 2 december 2014 15:07 > To: Fabrice Coulon > Cc: yocto@yoctoproject.org > Subject: Re: [yocto] Export bitbake variables between recipes > > Hi Fabrice, > > On Tuesday 02 December 2014 14:07:40 Fabrice Coulon wrote: > > Is it possible to export one bitbake variable from one recipe > > and make it available from inside another recipe? For example: > > we want to export from our systemd_%.bbappend where the > > systemctl command has been installed, in order to, from another > > recipe depending on systemd, refer to the absolute path where > > systemctl was installed. Any ideas or suggestions on how to do > > that? > > There's no mechanism to do this, no. The only way for this kind of > thing to work is for it to be specified at the configuration level > (e.g. ${bindir} points to the subdirectory /usr/bin and this variable > would be used both when choosing where the executable should be > installed and finding it later - this would typically be how this > kind of problem would be solved since it would be unusual to have > systemctl installed somewhere other than ${bindir}). Actually, since the systemd recipe in Poky is configured in an extremely weird way (using --with-rootprefix=${base_prefix} and --with-rootlib=${base_libdir}), systemctl actually ends up in ${base_bindir} rather than ${bindir}. And this is the whole reason for our troubles since everything else we had prior to switching to Poky expected systemd to be installed in /usr... Can anyone please explain why OE-core installs systemd to / rather than /usr? Because I have traced the recipe all the way back to its introduction in OE classic, and I cannot find any rationale for this odd decision. And it is extra weird given the systemd authors' agenda that everything should be in /usr (and /etc)... > (Another alternative is pkg-config, but I don't think that really > applies in this situation.) Nope. > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre //Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-02 18:27 Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) Peter Kjellerstedt @ 2014-12-02 18:44 ` Mark Hatle 2014-12-03 15:36 ` Peter Kjellerstedt 0 siblings, 1 reply; 9+ messages in thread From: Mark Hatle @ 2014-12-02 18:44 UTC (permalink / raw) To: openembedded-core On 12/2/14, 12:27 PM, Peter Kjellerstedt wrote: > [ I am moving this discussion to the OE-core list as I believe > that is where it belongs. ] > >> -----Original Message----- >> From: yocto-bounces@yoctoproject.org [mailto:yocto- >> bounces@yoctoproject.org] On Behalf Of Paul Eggleton >> Sent: den 2 december 2014 15:07 >> To: Fabrice Coulon >> Cc: yocto@yoctoproject.org >> Subject: Re: [yocto] Export bitbake variables between recipes >> >> Hi Fabrice, >> >> On Tuesday 02 December 2014 14:07:40 Fabrice Coulon wrote: >>> Is it possible to export one bitbake variable from one recipe >>> and make it available from inside another recipe? For example: >>> we want to export from our systemd_%.bbappend where the >>> systemctl command has been installed, in order to, from another >>> recipe depending on systemd, refer to the absolute path where >>> systemctl was installed. Any ideas or suggestions on how to do >>> that? >> >> There's no mechanism to do this, no. The only way for this kind of >> thing to work is for it to be specified at the configuration level >> (e.g. ${bindir} points to the subdirectory /usr/bin and this variable >> would be used both when choosing where the executable should be >> installed and finding it later - this would typically be how this >> kind of problem would be solved since it would be unusual to have >> systemctl installed somewhere other than ${bindir}). > > Actually, since the systemd recipe in Poky is configured in an > extremely weird way (using --with-rootprefix=${base_prefix} and > --with-rootlib=${base_libdir}), systemctl actually ends up in > ${base_bindir} rather than ${bindir}. And this is the whole reason > for our troubles since everything else we had prior to switching > to Poky expected systemd to be installed in /usr... Because we support the split between / and /usr for embedded systems with multiple partitions/disks. If you set it to /usr, then technically you are violating the FHS, as you now require /usr in order to boot the system. What programs are expecting these things in a specific path? Why aren't they either using the PATH, or using a similar configuration mechanism via the recipes? > Can anyone please explain why OE-core installs systemd to / rather > than /usr? Because I have traced the recipe all the way back to its > introduction in OE classic, and I cannot find any rationale for > this odd decision. And it is extra weird given the systemd authors' > agenda that everything should be in /usr (and /etc)... It's only strange compared to Fedora. We're not Fedora.. and I've got systems that need to boot from a small '/' before mounting '/usr'. (In prior discussions we've made the decision to not fix every library or application, but there is a warning you can enable that will show you what libraries and applications live in '/' but have obvious linkage to '/usr'.) >> (Another alternative is pkg-config, but I don't think that really >> applies in this situation.) > > Nope. > >> Cheers, >> Paul >> >> -- >> >> Paul Eggleton >> Intel Open Source Technology Centre > > //Peter > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-02 18:44 ` Mark Hatle @ 2014-12-03 15:36 ` Peter Kjellerstedt 2014-12-03 15:46 ` Mark Hatle 0 siblings, 1 reply; 9+ messages in thread From: Peter Kjellerstedt @ 2014-12-03 15:36 UTC (permalink / raw) To: Mark Hatle, openembedded-core@lists.openembedded.org > -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > Mark Hatle > Sent: den 2 december 2014 19:45 > To: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] > Export bitbake variables between recipes) > > On 12/2/14, 12:27 PM, Peter Kjellerstedt wrote: > > [ I am moving this discussion to the OE-core list as I believe > > that is where it belongs. ] > > > >> -----Original Message----- > >> From: yocto-bounces@yoctoproject.org [mailto:yocto- > >> bounces@yoctoproject.org] On Behalf Of Paul Eggleton > >> Sent: den 2 december 2014 15:07 > >> To: Fabrice Coulon > >> Cc: yocto@yoctoproject.org > >> Subject: Re: [yocto] Export bitbake variables between recipes > >> > >> Hi Fabrice, > >> > >> On Tuesday 02 December 2014 14:07:40 Fabrice Coulon wrote: > >>> Is it possible to export one bitbake variable from one recipe > >>> and make it available from inside another recipe? For example: > >>> we want to export from our systemd_%.bbappend where the > >>> systemctl command has been installed, in order to, from another > >>> recipe depending on systemd, refer to the absolute path where > >>> systemctl was installed. Any ideas or suggestions on how to do > >>> that? > >> > >> There's no mechanism to do this, no. The only way for this kind of > >> thing to work is for it to be specified at the configuration level > >> (e.g. ${bindir} points to the subdirectory /usr/bin and this variable > >> would be used both when choosing where the executable should be > >> installed and finding it later - this would typically be how this > >> kind of problem would be solved since it would be unusual to have > >> systemctl installed somewhere other than ${bindir}). > > > > Actually, since the systemd recipe in Poky is configured in an > > extremely weird way (using --with-rootprefix=${base_prefix} and > > --with-rootlib=${base_libdir}), systemctl actually ends up in > > ${base_bindir} rather than ${bindir}. And this is the whole reason > > for our troubles since everything else we had prior to switching > > to Poky expected systemd to be installed in /usr... > > Because we support the split between / and /usr for embedded systems > with multiple partitions/disks. Hmm, ok. > If you set it to /usr, then technically you are violating the FHS, as > you now require /usr in order to boot the system. Ok. We have never split / and /usr in our products so that thought did not occur to me. > What programs are expecting these things in a specific path? Why > aren't they either using the PATH, or using a similar configuration > mechanism via the recipes? In the specific case it was a systemd unit file that wants to do ExecStartPost=/usr/bin/systemctl kill --signal HUP rsyslog.service and since paths in unit files must be absolute this caused problems for us when building with Poky since then systemctl is in /bin, but when building with our old build system it is in /usr/bin... Now it is no major problem to fix the specific unit file, because we can just do ExecStartPost=/bin/sh -c "systemctl kill ...", but the difference between our two build systems has caused us quite a lot of extra work. > > Can anyone please explain why OE-core installs systemd to / rather > > than /usr? Because I have traced the recipe all the way back to its > > introduction in OE classic, and I cannot find any rationale for > > this odd decision. And it is extra weird given the systemd authors' > > agenda that everything should be in /usr (and /etc)... > > It's only strange compared to Fedora. We're not Fedora.. and I've > got systems that need to boot from a small '/' before mounting '/usr'. Speaking of Fedora, would an official image feature, e.g., "unified-fs", be acceptable for OE-Core that sets up the file system with /bin, /sbin and /lib* as links to their /usr counterparts? That would alleviate our problems with the differences in how systemd is installed. > (In prior discussions we've made the decision to not fix every library > or application, but there is a warning you can enable that will show > you what libraries and applications live in '/' but have obvious > linkage to '/usr'.) > > >> (Another alternative is pkg-config, but I don't think that really > >> applies in this situation.) > > > > Nope. > > > >> Cheers, > >> Paul > >> > >> -- > >> > >> Paul Eggleton > >> Intel Open Source Technology Centre > > > > //Peter //Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-03 15:36 ` Peter Kjellerstedt @ 2014-12-03 15:46 ` Mark Hatle 2014-12-04 13:34 ` Peter Kjellerstedt 0 siblings, 1 reply; 9+ messages in thread From: Mark Hatle @ 2014-12-03 15:46 UTC (permalink / raw) To: Peter Kjellerstedt, openembedded-core@lists.openembedded.org On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: >>> Can anyone please explain why OE-core installs systemd to / rather >>> than /usr? Because I have traced the recipe all the way back to its >>> introduction in OE classic, and I cannot find any rationale for >>> this odd decision. And it is extra weird given the systemd authors' >>> agenda that everything should be in /usr (and /etc)... >> >> It's only strange compared to Fedora. We're not Fedora.. and I've >> got systems that need to boot from a small '/' before mounting '/usr'. > > Speaking of Fedora, would an official image feature, e.g., "unified-fs", > be acceptable for OE-Core that sets up the file system with /bin, /sbin > and /lib* as links to their /usr counterparts? That would alleviate our > problems with the differences in how systemd is installed. The system permits developers to set the paths for the various pieces. To get a Fedora like unified filesystem, you could do something like: * provide your own fs-perms.txt: /usr/bin link ${base_bindir} /usr/sbin link ${base_sbindir} /usr/lib link ${base_libdir} Then in your local.conf: bindir = "${base_bindir}" sbindir = "${base_sbindir}" libdir = "${base_libdir}" This will result in /usr/bin, sbin and lib being linked to /bin, /sbin, /lib -- and all of the package produced for your configuration will only reference '/'. This isn't that unusual of a configuration from what I've been told. --Mark >> (In prior discussions we've made the decision to not fix every library >> or application, but there is a warning you can enable that will show >> you what libraries and applications live in '/' but have obvious >> linkage to '/usr'.) >> >>>> (Another alternative is pkg-config, but I don't think that really >>>> applies in this situation.) >>> >>> Nope. >>> >>>> Cheers, >>>> Paul >>>> >>>> -- >>>> >>>> Paul Eggleton >>>> Intel Open Source Technology Centre >>> >>> //Peter > > //Peter > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-03 15:46 ` Mark Hatle @ 2014-12-04 13:34 ` Peter Kjellerstedt 2014-12-05 3:00 ` ChenQi 0 siblings, 1 reply; 9+ messages in thread From: Peter Kjellerstedt @ 2014-12-04 13:34 UTC (permalink / raw) To: Mark Hatle, openembedded-core@lists.openembedded.org > -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > Mark Hatle > Sent: den 3 december 2014 16:47 > To: Peter Kjellerstedt; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] > Export bitbake variables between recipes) > > On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: > >>> Can anyone please explain why OE-core installs systemd to / > >>> rather than /usr? Because I have traced the recipe all the > >>> way back to its introduction in OE classic, and I cannot > >>> find any rationale for this odd decision. And it is extra > >>> weird given the systemd authors' agenda that everything > >>> should be in /usr (and /etc)... > >> > >> It's only strange compared to Fedora. We're not Fedora.. and > >> I've got systems that need to boot from a small '/' before > >> mounting '/usr'. > > > > Speaking of Fedora, would an official image feature, e.g., > > "unified-fs", be acceptable for OE-Core that sets up the file > > system with /bin, /sbin and /lib* as links to their /usr > > counterparts? That would alleviate our problems with the > > differences in how systemd is installed. > > The system permits developers to set the paths for the various pieces. > To get a Fedora like unified filesystem, you could do something like: > > * provide your own fs-perms.txt: I had not noticed fs-perms.txt before. And it seems easy enough to extend via the FILESYSTEMS_PERMS_TABLES variable. :) > /usr/bin link ${base_bindir} > /usr/sbin link ${base_sbindir} > /usr/lib link ${base_libdir} > > Then in your local.conf: > > bindir = "${base_bindir}" > sbindir = "${base_sbindir}" > libdir = "${base_libdir}" I think you mean the opposite, i.e., that /bin should be a link to ${bindir} and ${base_bindir} should be set to ${bindir}, but I get your point. > This will result in /usr/bin, sbin and lib being linked to /bin, > /sbin, /lib -- and all of the package produced for your > configuration will only reference '/'. > > This isn't that unusual of a configuration from what I've been told. Which is why I think it warrants an official distro feature (an image feature, as I originally suggested, will of course not do if it is done the way you suggest since the packages' contents are modified). That way people would not have to invent the wheel over and over again (and somehow find out that there is such a thing as fs-perms.txt which up until now had eluded me). > --Mark //Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-04 13:34 ` Peter Kjellerstedt @ 2014-12-05 3:00 ` ChenQi 2014-12-05 3:46 ` Mark Hatle 2014-12-08 13:37 ` Peter Kjellerstedt 0 siblings, 2 replies; 9+ messages in thread From: ChenQi @ 2014-12-05 3:00 UTC (permalink / raw) To: openembedded-core On 12/04/2014 09:34 PM, Peter Kjellerstedt wrote: >> -----Original Message----- >> From: openembedded-core-bounces@lists.openembedded.org >> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of >> Mark Hatle >> Sent: den 3 december 2014 16:47 >> To: Peter Kjellerstedt; openembedded-core@lists.openembedded.org >> Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] >> Export bitbake variables between recipes) >> >> On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: >>>>> Can anyone please explain why OE-core installs systemd to / >>>>> rather than /usr? Because I have traced the recipe all the >>>>> way back to its introduction in OE classic, and I cannot >>>>> find any rationale for this odd decision. And it is extra >>>>> weird given the systemd authors' agenda that everything >>>>> should be in /usr (and /etc)... >>>> It's only strange compared to Fedora. We're not Fedora.. and >>>> I've got systems that need to boot from a small '/' before >>>> mounting '/usr'. >>> Speaking of Fedora, would an official image feature, e.g., >>> "unified-fs", be acceptable for OE-Core that sets up the file >>> system with /bin, /sbin and /lib* as links to their /usr >>> counterparts? That would alleviate our problems with the >>> differences in how systemd is installed. >> The system permits developers to set the paths for the various pieces. >> To get a Fedora like unified filesystem, you could do something like: >> >> * provide your own fs-perms.txt: > I had not noticed fs-perms.txt before. And it seems easy enough > to extend via the FILESYSTEMS_PERMS_TABLES variable. :) > >> /usr/bin link ${base_bindir} >> /usr/sbin link ${base_sbindir} >> /usr/lib link ${base_libdir} >> >> Then in your local.conf: >> >> bindir = "${base_bindir}" >> sbindir = "${base_sbindir}" >> libdir = "${base_libdir}" > I think you mean the opposite, i.e., that /bin should be a > link to ${bindir} and ${base_bindir} should be set to ${bindir}, > but I get your point. > >> This will result in /usr/bin, sbin and lib being linked to /bin, >> /sbin, /lib -- and all of the package produced for your >> configuration will only reference '/'. >> >> This isn't that unusual of a configuration from what I've been told. > Which is why I think it warrants an official distro feature (an > image feature, as I originally suggested, will of course not do > if it is done the way you suggest since the packages' contents > are modified). That way people would not have to invent the wheel > over and over again (and somehow find out that there is such a > thing as fs-perms.txt which up until now had eluded me). > >> --Mark > //Peter > Hi Peter, It's easy to link /usr/bin to /bin, /usr/sbin to /sbin and make things work in OE. But if we want the opposite to work, we might need several additional patches to OE. Several days ago, I tried to do /usr merge in OE (like what Fedora and Arch does). It turned out that we need to patch several packages to make things work. (I haven't sent out the patches because it's just some initial investigation and I'm not sure if people want this feature or not.) If you want this feature in OE, please open a bug/enhancement in bugzilla https://bugzilla.yoctoproject.org/ to see if the community wants it or not. Regards, Chen Qi ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-05 3:00 ` ChenQi @ 2014-12-05 3:46 ` Mark Hatle 2014-12-08 7:44 ` Adrian Freihofer 2014-12-08 13:37 ` Peter Kjellerstedt 1 sibling, 1 reply; 9+ messages in thread From: Mark Hatle @ 2014-12-05 3:46 UTC (permalink / raw) To: openembedded-core On 12/4/14, 9:00 PM, ChenQi wrote: > On 12/04/2014 09:34 PM, Peter Kjellerstedt wrote: >>> -----Original Message----- >>> From: openembedded-core-bounces@lists.openembedded.org >>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of >>> Mark Hatle >>> Sent: den 3 december 2014 16:47 >>> To: Peter Kjellerstedt; openembedded-core@lists.openembedded.org >>> Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] >>> Export bitbake variables between recipes) >>> >>> On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: >>>>>> Can anyone please explain why OE-core installs systemd to / >>>>>> rather than /usr? Because I have traced the recipe all the >>>>>> way back to its introduction in OE classic, and I cannot >>>>>> find any rationale for this odd decision. And it is extra >>>>>> weird given the systemd authors' agenda that everything >>>>>> should be in /usr (and /etc)... >>>>> It's only strange compared to Fedora. We're not Fedora.. and >>>>> I've got systems that need to boot from a small '/' before >>>>> mounting '/usr'. >>>> Speaking of Fedora, would an official image feature, e.g., >>>> "unified-fs", be acceptable for OE-Core that sets up the file >>>> system with /bin, /sbin and /lib* as links to their /usr >>>> counterparts? That would alleviate our problems with the >>>> differences in how systemd is installed. >>> The system permits developers to set the paths for the various pieces. >>> To get a Fedora like unified filesystem, you could do something like: >>> >>> * provide your own fs-perms.txt: >> I had not noticed fs-perms.txt before. And it seems easy enough >> to extend via the FILESYSTEMS_PERMS_TABLES variable. :) >> >>> /usr/bin link ${base_bindir} >>> /usr/sbin link ${base_sbindir} >>> /usr/lib link ${base_libdir} >>> >>> Then in your local.conf: >>> >>> bindir = "${base_bindir}" >>> sbindir = "${base_sbindir}" >>> libdir = "${base_libdir}" >> I think you mean the opposite, i.e., that /bin should be a >> link to ${bindir} and ${base_bindir} should be set to ${bindir}, >> but I get your point. >> >>> This will result in /usr/bin, sbin and lib being linked to /bin, >>> /sbin, /lib -- and all of the package produced for your >>> configuration will only reference '/'. >>> >>> This isn't that unusual of a configuration from what I've been told. >> Which is why I think it warrants an official distro feature (an >> image feature, as I originally suggested, will of course not do >> if it is done the way you suggest since the packages' contents >> are modified). That way people would not have to invent the wheel >> over and over again (and somehow find out that there is such a >> thing as fs-perms.txt which up until now had eluded me). >> >>> --Mark >> //Peter >> > > Hi Peter, > > It's easy to link /usr/bin to /bin, /usr/sbin to /sbin and make things > work in OE. > But if we want the opposite to work, we might need several additional > patches to OE. Exactly.. and going back to the FHS, the FHS says that '/' is required to boot, /usr is not. So /usr should be linked to / for those items. There is a fairly standard OE configuration some people do where they don't define a /usr at all. They just set the prefix (normally /usr) to '/'. That SHOULD be working still, at least it used to be a well tested configuration... > Several days ago, I tried to do /usr merge in OE (like what Fedora and > Arch does). It turned out that we need to patch several packages to make > things work. > > (I haven't sent out the patches because it's just some initial > investigation and I'm not sure if people want this feature or not.) > > If you want this feature in OE, please open a bug/enhancement in > bugzilla https://bugzilla.yoctoproject.org/ to see if the community > wants it or not. > > Regards, > Chen Qi > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-05 3:46 ` Mark Hatle @ 2014-12-08 7:44 ` Adrian Freihofer 0 siblings, 0 replies; 9+ messages in thread From: Adrian Freihofer @ 2014-12-08 7:44 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 4944 bytes --] On Thursday 04 December 2014 21.46:50 Mark Hatle wrote: > On 12/4/14, 9:00 PM, ChenQi wrote: > > On 12/04/2014 09:34 PM, Peter Kjellerstedt wrote: > >>> -----Original Message----- > >>> From: openembedded-core-bounces@lists.openembedded.org > >>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > >>> Mark Hatle > >>> Sent: den 3 december 2014 16:47 > >>> To: Peter Kjellerstedt; openembedded-core@lists.openembedded.org > >>> Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] > >>> Export bitbake variables between recipes) > >>> > >>> On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: > >>>>>> Can anyone please explain why OE-core installs systemd to / > >>>>>> rather than /usr? Because I have traced the recipe all the > >>>>>> way back to its introduction in OE classic, and I cannot > >>>>>> find any rationale for this odd decision. And it is extra > >>>>>> weird given the systemd authors' agenda that everything > >>>>>> should be in /usr (and /etc)... > >>>>> It's only strange compared to Fedora. We're not Fedora.. and > >>>>> I've got systems that need to boot from a small '/' before > >>>>> mounting '/usr'. > >>>> Speaking of Fedora, would an official image feature, e.g., > >>>> "unified-fs", be acceptable for OE-Core that sets up the file > >>>> system with /bin, /sbin and /lib* as links to their /usr > >>>> counterparts? That would alleviate our problems with the > >>>> differences in how systemd is installed. > >>> The system permits developers to set the paths for the various pieces. > >>> To get a Fedora like unified filesystem, you could do something like: > >>> > >>> * provide your own fs-perms.txt: > >> I had not noticed fs-perms.txt before. And it seems easy enough > >> to extend via the FILESYSTEMS_PERMS_TABLES variable. :) > >> > >>> /usr/bin link ${base_bindir} > >>> /usr/sbin link ${base_sbindir} > >>> /usr/lib link ${base_libdir} > >>> > >>> Then in your local.conf: > >>> > >>> bindir = "${base_bindir}" > >>> sbindir = "${base_sbindir}" > >>> libdir = "${base_libdir}" > >> I think you mean the opposite, i.e., that /bin should be a > >> link to ${bindir} and ${base_bindir} should be set to ${bindir}, > >> but I get your point. > >> > >>> This will result in /usr/bin, sbin and lib being linked to /bin, > >>> /sbin, /lib -- and all of the package produced for your > >>> configuration will only reference '/'. > >>> > >>> This isn't that unusual of a configuration from what I've been told. > >> Which is why I think it warrants an official distro feature (an > >> image feature, as I originally suggested, will of course not do > >> if it is done the way you suggest since the packages' contents > >> are modified). That way people would not have to invent the wheel > >> over and over again (and somehow find out that there is such a > >> thing as fs-perms.txt which up until now had eluded me). > >> > >>> --Mark > >> //Peter > >> > > > > Hi Peter, > > > > It's easy to link /usr/bin to /bin, /usr/sbin to /sbin and make things > > work in OE. > > But if we want the opposite to work, we might need several additional > > patches to OE. > > Exactly.. and going back to the FHS, the FHS says that '/' is required to boot, > /usr is not. So /usr should be linked to / for those items. > > There is a fairly standard OE configuration some people do where they don't > define a /usr at all. They just set the prefix (normally /usr) to '/'. > > That SHOULD be working still, at least it used to be a well tested configuration... > > > Several days ago, I tried to do /usr merge in OE (like what Fedora and > > Arch does). It turned out that we need to patch several packages to make > > things work. > > > > (I haven't sent out the patches because it's just some initial > > investigation and I'm not sure if people want this feature or not.) > > > > If you want this feature in OE, please open a bug/enhancement in > > bugzilla https://bugzilla.yoctoproject.org/ to see if the community > > wants it or not. > > > > Regards, > > Chen Qi > > > > > > Hi Mark Lennard Poettering and others have good arguments to have no /bin, /lib and /sbin folder at all. There is an interesting blog here: http://0pointer.net/blog/revisiting-how-we-put-together-linux-systems.html[1]. In short: The goal is to have one mount point (/usr) where all the read only binaries are in. Having /usr on a read only btrfs partition would allow to use the send receive feature (binary diff on filesystem level) of btrfs to deploy software updates to many devices. This approach could provide a generic, robust and optimized SW update procedure for embedded systems as well. Regards, Adrian -------------------- Adrian Freihofer Gschwaderweg 29 8610 Uster 043 497 84 01 -------- [1] http://0pointer.net/blog/revisiting-how-we-put-together-linux-systems.html [-- Attachment #2: Type: text/html, Size: 21409 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) 2014-12-05 3:00 ` ChenQi 2014-12-05 3:46 ` Mark Hatle @ 2014-12-08 13:37 ` Peter Kjellerstedt 1 sibling, 0 replies; 9+ messages in thread From: Peter Kjellerstedt @ 2014-12-08 13:37 UTC (permalink / raw) To: ChenQi, openembedded-core@lists.openembedded.org > -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > ChenQi > Sent: den 5 december 2014 04:01 > To: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] > Export bitbake variables between recipes) > > On 12/04/2014 09:34 PM, Peter Kjellerstedt wrote: > >> -----Original Message----- > >> From: openembedded-core-bounces@lists.openembedded.org > >> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf > Of > >> Mark Hatle > >> Sent: den 3 december 2014 16:47 > >> To: Peter Kjellerstedt; openembedded-core@lists.openembedded.org > >> Subject: Re: [OE-core] Why is systemd installed to / (was: [yocto] > >> Export bitbake variables between recipes) > >> > >> On 12/3/14, 9:36 AM, Peter Kjellerstedt wrote: > >>>>> Can anyone please explain why OE-core installs systemd to / > >>>>> rather than /usr? Because I have traced the recipe all the > >>>>> way back to its introduction in OE classic, and I cannot > >>>>> find any rationale for this odd decision. And it is extra > >>>>> weird given the systemd authors' agenda that everything > >>>>> should be in /usr (and /etc)... > >>>> It's only strange compared to Fedora. We're not Fedora.. and > >>>> I've got systems that need to boot from a small '/' before > >>>> mounting '/usr'. > >>> Speaking of Fedora, would an official image feature, e.g., > >>> "unified-fs", be acceptable for OE-Core that sets up the file > >>> system with /bin, /sbin and /lib* as links to their /usr > >>> counterparts? That would alleviate our problems with the > >>> differences in how systemd is installed. > >> The system permits developers to set the paths for the various > pieces. > >> To get a Fedora like unified filesystem, you could do something like: > >> > >> * provide your own fs-perms.txt: > > I had not noticed fs-perms.txt before. And it seems easy enough > > to extend via the FILESYSTEMS_PERMS_TABLES variable. :) > > > >> /usr/bin link ${base_bindir} > >> /usr/sbin link ${base_sbindir} > >> /usr/lib link ${base_libdir} > >> > >> Then in your local.conf: > >> > >> bindir = "${base_bindir}" > >> sbindir = "${base_sbindir}" > >> libdir = "${base_libdir}" > > I think you mean the opposite, i.e., that /bin should be a > > link to ${bindir} and ${base_bindir} should be set to ${bindir}, > > but I get your point. > > > >> This will result in /usr/bin, sbin and lib being linked to /bin, > >> /sbin, /lib -- and all of the package produced for your > >> configuration will only reference '/'. > >> > >> This isn't that unusual of a configuration from what I've been told. > > Which is why I think it warrants an official distro feature (an > > image feature, as I originally suggested, will of course not do > > if it is done the way you suggest since the packages' contents > > are modified). That way people would not have to invent the wheel > > over and over again (and somehow find out that there is such a > > thing as fs-perms.txt which up until now had eluded me). > > > >> --Mark > > //Peter > > > > Hi Peter, > > It's easy to link /usr/bin to /bin, /usr/sbin to /sbin and make things > work in OE. > But if we want the opposite to work, we might need several additional > patches to OE. > > Several days ago, I tried to do /usr merge in OE (like what Fedora and > Arch does). It turned out that we need to patch several packages to > make things work. > > (I haven't sent out the patches because it's just some initial > investigation and I'm not sure if people want this feature or not.) > > If you want this feature in OE, please open a bug/enhancement in > bugzilla https://bugzilla.yoctoproject.org/ to see if the community > wants it or not. > > Regards, > Chen Qi I have created a ticket for this now: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7040 //Peter ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-12-08 13:37 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-02 18:27 Why is systemd installed to / (was: [yocto] Export bitbake variables between recipes) Peter Kjellerstedt 2014-12-02 18:44 ` Mark Hatle 2014-12-03 15:36 ` Peter Kjellerstedt 2014-12-03 15:46 ` Mark Hatle 2014-12-04 13:34 ` Peter Kjellerstedt 2014-12-05 3:00 ` ChenQi 2014-12-05 3:46 ` Mark Hatle 2014-12-08 7:44 ` Adrian Freihofer 2014-12-08 13:37 ` Peter Kjellerstedt
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.