Created attachment 591016 [details] Archive containing modified ebuilds that fix this bug Whenever you try to use Catalyst to build bootable media, it always installs app-misc/livecd-tools, which, unnecessarily, tries to smuggle in openrc and, by extension, sysvinit whether you want it or not. That's a problem if you're working off of a systemd base and especially if you're looking to install a modern desktop system ― this may be the very reason why the current LiveDVD is from way back in 2016. For this reason, I'm submitting a series of modified ebuilds (attached to this bug) that fix the problem by conditionally depending on openrc ONLY if the sysv-utils USE flag, while also conditionally depending on systemd if the systemd USE flag is set. This should have been done a long time ago.
A tarball full of ebuilds is very difficult to review. Please submit a patch generated via "git format-patch".
Created attachment 591092 [details, diff] Requested patch per Mike Gilbert Done as Mike requested ― here's the patch that changes the ebuild dependencies from hard-depends on openrc to USE-conditional dependencies that check whether the sysv-utils or systemd USE flag is set before proceeding.
Created attachment 591096 [details, diff] Oops, forgot to add the flags to IUSE Fixing error that failure to add the systemd and sysv-utils flags to IUSE introduced when attempting to build the manifest
Updated title to more accurately reflect the problem that my patch (which unfortunately still hasn’t been reviewed) is meant to fix.
Per my patches — this should have been the case the whole time across all ebuilds: IUSE="at-most-one-of ( sysv-utils systemd )" RDEPEND=“ ... sysv-utils? ( >=sys-apps/openrc-0.8.2-r1 ) systemd? ( sys-apps/systemd ) ... “ The fact that there’s a hard dependency instead of a USE-conditional dependency is making Catalyst fail on systemd tarballs.
Reviewing the livecd-tools ebuild, it only installs a few things: 1. Some OpenRC init scripts. Clearly useless without OpenRC. 2. /usr/sbin/net-setup Generates /etc/conf.d/net, so useless without OpenRC / netifrc. 3. /sbin/livecd-functions.sh Sources /etc/init.d/functions.sh, so useless without OpenRC. Given that livecd-tools relies heavily on OpenRC to do anything useful at all, I don't really understand your proposed changes. Perhaps you would be better off changing catalyst to not install livecd-tools.
Catalyst tries to install livecd-tools whether the user wants to or not — there’s no way to prevent it in the .spec files.
For those on the Catalyst team ― the dependency of livecd-tools on OpenRC is creating a dependency blocking conflict when a systemd-based live media build is attempted. Remove livecd-tools from the dependency tree.
Was able to find a temporary workaround: adding “!(app-misc/livecd-tools)” to the “livecd/packages” section of the .spec file seems to have done the trick.
FYI we're hard depending on livecd-tools because it provides the autologin on ttys. We can try to work on making this also work on systemd, but it doesn't yet. I'm curious how your systemd livecd login works without the livecd-tools "fixinittab" script.
I’m trying to make a GNOME LiveDVD — that’s why it works, because I can just add the following lines to /etc/gdm/custom.conf to enable autologin (assuming I’ve provided a root password of course): [daemon] AutomaticLoginEnable=true AutomaticLogin=root For a KDE Plasma LiveDVD you can do something similar with /etc/sddm.conf: [Autologin] MinimumUid=0 User=root Session=plasma.desktop Granted, this won’t work if your LiveDVD is just a console, but it will definitely work if you’ve got a DE on it.
Oops, made a mistake with the KDE Plasma example (/etc/sddm.conf): [Users] MinimumUid=0 [Autologin] User=root Session=plasma.desktop And just for reiteration, here’s the GNOME example that I’m actually using (/etc/gdm/custom.conf): [daemon] AutomaticLoginEnable=true AutomaticLogin=root
In addition to modifying the GDM configuration files in my fsscript (using sed), I’m also pulling in app-admin/calamares in the “livecd/packages” section of my spec file — for improving the installation process.
Here’s the lines of my fsscript that get root login enabled: #Automatic Login sed -i “3a AutomaticLoginEnable=true” /etc/gdm/custom.conf sed -i “4a AutomaticLogin=root” /etc/gdm/custom.conf
Created attachment 591248 [details] Stage 1 specfile
Created attachment 591250 [details] Stage 2 specfile
Created attachment 591252 [details] fsscript
Created attachment 591254 [details] catalystrc Added all files that my temporary workaround entails.
Created attachment 591256 [details] Updated fsscript
So as you can see from all those spec files and/or scripts, I’m trying to make my live image as easy to install as possible — especially on UEFI-based systems, which are a pain to install GRUB on using the traditional console-based installation method.
The only problem I’m having at this point is that emerging dev-lang/spidermonkey within the liveCD chroot is causing an OOM condition.
The Arch wiki has some examples for tty auto-login using drop-in files to override ExecStart in getty@.service. https://wiki.archlinux.org/index.php/Getty#Automatic_login_to_virtual_console
Update: It seems that even blocking app-misc/livecd-tools didn't do the trick, so I had to run this instead: sudo sed -i "45d" /usr/lib64/python3.6/site-packages/catalyst/targets/livecd_stage1.py Once I did that, the build became completely flawless, up to and including the live login as I explained earlier with the display manager configuration file manipulation lines in my fsscript.
To the Catalyst team: If removing livecd-tools from the hard dependencies is not possible, then at least make a systemd port of livecd-tools. That shouldn’t be hard to do at all.
Also as Mike pointed out and per the Arch wiki, console autologin is definitely easy to accomplish via Getty config file editing.
Created attachment 591540 [details] Build automation utility In case there is any lingering doubt that livecd-tools is not necessary on systemd targets, here's a utility I created to automate how I did it (which also includes bundled .spec files).
Comment on attachment 591540 [details] Build automation utility Flagging this as obsolete; going to post an updated automation utility that fixes a few issues with this one after I post a screenshot of the LiveCD desktop. Perfect timing: today is October 4, 2019, which means that Gentoo is 20 years old. Too bad there’s no official 20th anniversary edition out there
Created attachment 591800 [details] Wrapper script Script I created to temporarily work around this bug until it is actually fixed
Created attachment 591802 [details] fsscript The script that is loaded in the "livecd/fsscript" section of my specfile
Created attachment 591804 [details] fsscript
Created attachment 591806 [details] Script to resolve keyword issues because Catalyst fails to Although unrelated to this in particular, the inability to specify "livecd/keywords:" in the .spec files is a problem. So I wrote a shell script to work around it.
Created attachment 591808 [details] livecd-stage1.spec
Created attachment 591810 [details] Kernel configuration
Created attachment 591812 [details] livecd-stage2.spec Okay, I just reattached all the files necessary to actually make Catalyst work in its current state. Feel free to read through them, because the changes required are indeed extensive.
(In reply to Kenneth G. Strawn from comment #31) > Created attachment 591806 [details] > Script to resolve keyword issues because Catalyst fails to > > Although unrelated to this in particular, the inability to specify > "livecd/keywords:" in the .spec files is a problem. So I wrote a shell > script to work around it. You're supposed to use portage_confdir for that. This bug report is quickly getting out of control with custom hacks attached, I think we need to focus on exactly what changes to livecd-tools & catalyst you propose, with real patches.
Created attachment 591814 [details, diff] Remove hard-coded livecd-tools
Created attachment 591816 [details, diff] Remove hard-coded livecd-tools Added Closes: tag to commit message.
If we make this change, we're going to have to add this in specs for a lot of different builds & arches in releng.git. This is doable but we need to make it a high priority or things will go haywire.
Created attachment 591818 [details, diff] Add app-misc/livecd-tools to all livecd-stage1 specs
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/releng.git/commit/?id=17e58eb7e5ca9b3a80a84aaeddb62233eb9a1623 commit 17e58eb7e5ca9b3a80a84aaeddb62233eb9a1623 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2019-10-04 15:33:11 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2019-10-11 15:56:53 +0000 Add app-misc/livecd-tools to all livecd-stage1 specs Bug: https://bugs.gentoo.org/695616 Signed-off-by: Mike Gilbert <floppym@gentoo.org> releases/weekly/specs/alpha/installcd-stage1.spec | 1 + releases/weekly/specs/amd64/hardened/admincd-stage1-selinux.spec | 1 + releases/weekly/specs/amd64/hardened/admincd-stage1.spec | 1 + releases/weekly/specs/amd64/installcd-stage1.spec | 1 + releases/weekly/specs/amd64/livecd-stage1.spec | 1 + releases/weekly/specs/amd64/livedvd-stage1.spec | 1 + releases/weekly/specs/hppa/installcd-stage1.spec | 1 + releases/weekly/specs/ia64/installcd-stage1.spec | 1 + releases/weekly/specs/ppc/ppc32/installcd-stage1.spec | 1 + releases/weekly/specs/sparc/sparc64/installcd-stage1.spec | 1 + releases/weekly/specs/x86/hardened/admincd-stage1.spec | 1 + releases/weekly/specs/x86/hardened/installcd-stage1.spec | 1 + releases/weekly/specs/x86/i686/livecd-stage1.spec | 1 + releases/weekly/specs/x86/i686/livedvd-stage1.spec | 1 + releases/weekly/specs/x86/installcd-stage1.spec | 1 + 15 files changed, 15 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e21da9dbef8bcf7795223727a1e71c3e83872436 commit e21da9dbef8bcf7795223727a1e71c3e83872436 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2019-10-04 14:49:54 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2019-10-11 16:02:06 +0000 livecd_stage1.py: drop hard-coded app-misc/livecd-tools This belongs in the spec file if needed. Closes: https://bugs.gentoo.org/695616 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Ben Kohler <bkohler@gentoo.org> catalyst/targets/livecd_stage1.py | 1 - 1 file changed, 1 deletion(-)