Re: [lfs-dev] Significant changes to LFS
On 09/29/2018 08:51 PM, Ken Moffat wrote: On Sat, Sep 29, 2018 at 07:23:40PM -0500, DJ Lucas wrote: Last thing for these changes is whether or not to add fstrim and uuidd bootscripts to the lfs bootscripts tarball for SysV book. The fstrim bootscript is fairly obvious in its purpose, but I've no idea the real world purpose for uuidd. For systemd, these are installed by the util-linux package but not enabled. For uuidd, no idea if a bootscript is sensible. But for fstrim, after looking at the manpage, I can't see the point. I happen to use 'discard' in fstab so I have no reason to use fstrim[¹], but the manpage suggests that running it weekly per mountpoint will often be sufficient. So I assume that people who use fstrim, at least on sysv, put it in a cron job. 1. I did forget to add it to fstab on one system, and had to run it manually after I noticed that repeated runs of an SBU build were getting slower and slower. "The uuidd daemon is used by the UUID library to generate universally unique identifiers (UUIDs), especially time-based UUIDs, in a secure and guaranteed-unique fashion, even in the face of large numbers of threads running on different CPUs trying to grab UUIDs. " I believe that the most frequent use if UUIDs is in databases as keys, although they are used in a GUID Partition Table (GPT) and in ext based partition superblocks. uuidd is not needed if only a few UUIDs are needed or their generation is infrequent. I do not think the uuidd daemon is useful for most LFS based systems. The reason most distros have it available is because they have a one-size-fits-all approach. -- Bruce P.S. See, for instance, https://www.scribd.com/document/275520308/1391070-Linux-UUID-Solutions -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Significant changes to LFS
On 09/29/2018 08:51 PM, Ken Moffat wrote: On Sat, Sep 29, 2018 at 07:23:40PM -0500, DJ Lucas wrote: Last thing for these changes is whether or not to add fstrim and uuidd bootscripts to the lfs bootscripts tarball for SysV book. The fstrim bootscript is fairly obvious in its purpose, but I've no idea the real world purpose for uuidd. For systemd, these are installed by the util-linux package but not enabled. For uuidd, no idea if a bootscript is sensible. But for fstrim, after looking at the manpage, I can't see the point. I happen to use 'discard' in fstab so I have no reason to use fstrim[¹], but the manpage suggests that running it weekly per mountpoint will often be sufficient. So I assume that people who use fstrim, at least on sysv, put it in a cron job. 1. I did forget to add it to fstab on one system, and had to run it manually after I noticed that repeated runs of an SBU build were getting slower and slower. ĸen Cool cool, thanks Ken. I shall now return to my quiet corner...well until I get around to runnit or similar. :-) --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Multilib patch
On 08/14/2018 05:54 AM, Thomas Trepl wrote: Hi, for those who are interested in doing {,B}LFS with multilib support, here is a patch on the LFS book adding some instructions to build the LFS core system with multilib support. Updates to this based on Thomas's work at https://io.ax.lt/. This is still very much experimental but coming together nicely. I've been working on jhalfs support. I also have a current patch for trunk (also for Thomas's branch to allow building with jhalfs) and rendered copies for both sysv and systemd in my homedir if anybody would like to take a look: http://www.linuxfromscratch.org/~dj/Multilib/ Thomas, when you are available, please note the changes WRT separating the lib32 and libx32 with separate s. This is required for jhalfs to parse the files correctly. As to the other changes, in additon to -m32/-mx32, I've tried to ensure that we use appropriate -march flags where --host is invalid. None of this is tested thoroughly as of yet, but my ultimate real world goal, in addition to being able to run x86 binaries needed for various tasks, is to be able to build x86 java without a full x86 LFS build handy. As of now, jhalfs builds to completion on Systemd. I don't believe that I've made any changes that would affect SysV, but I haven't tested sysv-multilib just yet. HTH --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Significant changes to LFS
On Sat, Sep 29, 2018 at 07:23:40PM -0500, DJ Lucas wrote: > > Last thing for these changes is whether or not to add fstrim and uuidd > bootscripts to the lfs bootscripts tarball for SysV book. The fstrim > bootscript is fairly obvious in its purpose, but I've no idea the real world > purpose for uuidd. For systemd, these are installed by the util-linux > package but not enabled. > For uuidd, no idea if a bootscript is sensible. But for fstrim, after looking at the manpage, I can't see the point. I happen to use 'discard' in fstab so I have no reason to use fstrim[¹], but the manpage suggests that running it weekly per mountpoint will often be sufficient. So I assume that people who use fstrim, at least on sysv, put it in a cron job. 1. I did forget to add it to fstab on one system, and had to run it manually after I noticed that repeated runs of an SBU build were getting slower and slower. ĸen -- Well grubbed , old mole! -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Significant changes to LFS
On 09/29/2018 11:36 AM, Bruce Dubbs wrote: I don't have a problem restoring util-linux in Chaoter 5 and restoring the needed symlinks for both books. It's unclear to me what other changes are needed. Sorry all, I had inadvertently replied off-list. This has been sorted locally. It's a tiny bit cumbersome, but doesn't mess up Bruce's cleanups. What I've done is put back chapter5 util-linux only for the systemd book, moved util-linux and e2fsprogs after procps-ng for both books, and then set PKG_CONFIG_PATH to find the headers and created the library symlinks for the build of systemd (as was done with xsltproc on the systemd page previously - I did not remove the library links as they are replaced when the next package is installed anyway). Last thing for these changes is whether or not to add fstrim and uuidd bootscripts to the lfs bootscripts tarball for SysV book. The fstrim bootscript is fairly obvious in its purpose, but I've no idea the real world purpose for uuidd. For systemd, these are installed by the util-linux package but not enabled. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Sanity checks for LFS
On 09/28/2018 02:57 PM, Bruce Dubbs wrote: As I observe students building LFS, I see them make a lot of mistakes. This is not necessarily bad as making and correcting errors is a good part of the learning process. What I would like to do though is to provide sanity checks during Chapters 5 and 6 to try to catch mistakes earlier in the build process. I've seen students progress well into Chapter 6 when they've made some errors in Chapter 5 and they then need to go back and restart Chapter 5. One problem that seems to pop up a lot is students running make and then forgetting make install. What I have thought about is to produce a simple list of files of critical directories at appropriate times where a comparison to a reference list could highlight missing files. I've created a static html page to address this issue. http://anduin.linuxfromscratch.org/~bdubbs/sanity.html Note that missing make install is not the only error. Sometimes new users do not read the output of commands and miss a flagged error. Usually this is caught fairly quickly, but not always. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Sanity checks for LFS
On 09/28/2018 05:45 PM, Akira Urushibata wrote: One problem that seems to pop up a lot is students running make and then forgetting make install. What I have thought about is to produce a simple list of files of critical directories at appropriate times where a comparison to a reference list could highlight missing files. A student of shell operations should try to create the reference list by himself. I posted a solution to this list recently: for file in *html do echo -n $file; sed -n -r '/Installed [Pp]rograms?:/,/<\/span>/p' $file |\ sed -e 's//>\n/g' |\ grep -v '^<.*>$' | tr -s '\n' ' ' echo; echo done | sed 's/(.[^(]*)//g' I observe some discrepancies between what this list produces and what is actually installed. Is the content of "installed programs" actually checked with each update of the LFS Book? There is also the possibility that installation of a small number of programs is architecture dependent. What you suggest is a bit of overkill for a simple sanity check. Generally speaking, we can trust the install procedures if the main packages are in place. Checking after every package would quickly get to be fairly onerous. Please note that we do have automated procedures that tells us the installed files for every page in Chapter 6. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Significant changes to LFS
On 09/29/2018 01:34 AM, DJ Lucas wrote: On 09/20/2018 12:36 PM, Bruce Dubbs wrote: I have made some reasonably significant changes to LFS. In addition to five package updates I have done the following. 1. Removed util-linux from Chapter 5. 2. Removed the associated symlinks from Chapter 6, Creating Essential Files and Symlinks 3. Moved the System V specific packages in Chapter 6 (Sysvinit, Sysklogd, and Eudev) to be the last packages in Chapter 6. 4. Moved the systemd specific packages (systemd and dbus) to the end of Chapter 6 with the exception of procps which is now at the end of the chapter due to being dependent on libsystemd. 5. Reordered eudev and util-linux in Chapter 6 to avoid the need for LD_LIBRARY_PATH, config.cache, and LIBRARY_PATH in e2fsprogs. This reordering of packages simplifies the build and makes the build order of Chapter 6 identical for both versions of LFS until the user gets to the last three packages. There are still some differences in the build instructions of acl, attr, createfiles, glibc, man-db, procps and util-linux as well as text differences in a few other files. I've built both versions of LFS and they both build cleanly but have not proceeded into BLFS. I'd appreciate any feedback about these changes, especially if you see any issues I've missed. The updated LFS html files have been rendered on the web site. Thanks, -- Bruce So how big of a pain in the rear is it to undo these changes? None of the util-linux binaries know about the systemd-journal. Nothing actually links to libsystemd, but it does pull in the headers if systemd support is requested (I do not see a dlopen call, so I don't know exactly how it works, maybe just message formatting). I suspect that there is a better way to handle this than undoing the changes, but I'll be damned if I can find it ATM. We can build util-linux in chapter 5 only in the systemd book to fix the reciprocal dependency for systemd, that's easy enough, but the order is the problem now (util-linux(ch5) -> systemd -> e2fsprogs -> util-linux, where evdev does not suffer from the reciprocal for lib{mount,uuid,blkid}). So things I've eliminated thus far just trying to render the book... You can't use the revision attribute in an xi:include - it's just ignored AFAICT - results in multiple defines for all of the index entries. You also cannot use phrase as a child of chapter - get a long validation error about order (content does not follow the DTD). I tried stubbing them out, but no dice as you can only include one child - we have multiple sect2 but need to filter revision on sect1 and can't dump them a layer deeper or we break jhalfs. chapter06/util-linux.xml:27: parser error : Extra content at the end of the document ^ chapter06/util-linux-sysv.xml:23: element include: XInclude error : could not load chapter06/util-linux.xml, and no fallback was found One gigantic sect2 with bridgeheads does not work either (again would break jhalfs). Short of having duplicates of util-linux.xml and e2fsprogs.xml, I can't find a creative way to fix it other than putting util-linux back into chapter 5 and putting the order as it was. Thoughts? I don't have a problem restoring util-linux in Chaoter 5 and restoring the needed symlinks for both books. It's unclear to me what other changes are needed. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page