1

systemd megathread (#2632) · Issues · postmarketOS / pmaports · GitLab

 6 months ago
source link: https://gitlab.com/postmarketOS/pmaports/-/issues/2632
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

systemd megathread

Open Issue created 5 days ago by Caleb Connolly @calebccff

Read before commenting: https://postmarketos.org/blog/2024/03/05/adding-systemd/

Demo images

Demo images are currently located here: https://mirror.postmarketos.org/temp.fdcc091b56f5/

There are plenty of known issues with these demo builds, and no doubt plenty more unknown. Let's discuss them as well as other architectural/technical stuff here.

How to build your own systemd-based postmarketOS images

Currently you can build your own images as follows. Expect bugs.

  • Clone pmbootstrap from git
  • Switch to the systemd branch
  • Go to your local pmaports.git clone, do git fetch and git checkout systemd
  • Run pmbootstrap init and select that you want to use systemd
  • Run pmbootstrap repo_bootstrap systemd --arch=x86_64 (adjust arch as necessary)
  • Run pmbootstrap install as usually

Next steps for integrating systemd into postmarketOS

  • pmbootstrap (systemd branch): support pmb:systemd-never option in postmarketos-ui-* packages for UIs where maintainers don't support systemd (e.g. Sxmo)
  • pmbootstrap: make MR, get current patches from systemd branch reviewed and merged into master
  • pmaports (systemd branch): add pmb:systemd to all KDE and GNOME based UIs, add pmb:systemd-never to Sxmo's UI packages
  • bpo: do pmbootstrap repo_bootstrap systemd before building any package, if the branch contains the postmarketos-base-systemd package and make it so that all bootstrapped packages get uploaded and added to the new repository at once (usually only one package at a time)
  • bpo: create a systemd staging repository (with systemd + rest of pmaports combined as intermediate step)
  • pmbootstrap: extend to build the systemd dir of pmaports separate from the main postmarketOS binary package repository
  • bpo: extend to build the systemd dir of pmaports separate from the main postmarketOS binary package repository
  • pmaports (master_staging_systemd branch): clean up
  • pmaports: add systemd versions of custom services for devices in main/community that build systemd based images
  • pmaports: make MR, get current patches from systemd branch reviewed and merged into master
  • pmaports: remove master_staging_systemd branch, which in turn removes the staging repository
  • bpo: build the systemd binary repository
  • bpo: build the first edge images with systemd for GNOME and KDE

Afterwards:

  • Lots of bug fixes
  • v24.06 will branch from current master as usually, and will have systemd for KDE and GNOME based UIs
0 of 13 checklist items completed · Edited 4 days ago by Caleb Connolly
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information

Child items

0
Show labels

No child items are currently assigned. Use child items to break down this issue into smaller parts.

Linked items

Link issues together to show that they're related or that one is blocking others. Learn more.

Related merge requests

Activity

  • Oliver Smith changed title from (currently confidential) systemd demo images megathread to (currently confidential) systemd megathread 4 days ago
  • Oliver Smith changed the description 4 days ago
  • Caleb Connolly made the issue visible to everyone 4 days ago
  • Caleb Connolly changed title from (currently confidential) systemd megathread to systemd megathread 4 days ago
  • pmbootstrap (systemd branch): support pmb:systemd-never option in postmarketos-ui-* packages for UIs where maintainers don't support systemd (e.g. Sxmo)

    If systemd is an explicit dependency of other packages that explicitly require it, you don't need special considerations for non-systemd images.

    Re: https://gitlab.com/postmarketOS/pmaports/-/blob/52f833c4/main/postmarketos-base-ui/APKBUILD#L122

    You probably want to add `conflicts="systemd-logind" to package "elogind".

  • I suggest adding install_if="postmarketos-base systemd" to the systemd-services package instead of making it an explicit dependency of postmarketos-base too. This will facilitate minimal images without it (e.g.: for sxmo).

    • I followed the instructions but I get the below:

    • Did you try rebasing the systemd branch onto the current master branch?

      At least that's what i did and i built it successfully right now.

      Edited 3 days ago by Alexander Martinz
    • Please register or sign in to reply
    • Resolved 2 days ago by Sam Day

      @calebccff @Justin_Zobel @amartinz @WhyNotHugo @craftyguy @kailueke @ollieparanoid @Arnavion @Minecrell : open letter from a freedom lover to PostmarketOS devs :

      open letter

      Me and my two friends, who got the Pinephone for privacy/security reasons, are all using PostmarketOS. Why? Because no SystemD. SystemD, being a 1.5 million lines of code begemoth, is written with little respect for security - as you could see by Pwnie "award" and plenty of CVEs. Therefore the security-minded people who choose a Pinephone despite its worse usability compared to the ordinary Android phones, also tend to avoid SystemD.

      Currently, the primary distinguishing feature of PostmarketOS - is that, being based on Alpine, it doesn't have SystemD. However, by artificially switching this Alpine-based distro to SystemD, you are losing this competitive advantage and your priorly-outstanding distro won't be unique anymore.

      One of my "Pinephone friends" (who btw uses Artix Linux on his desktop for the same no-SystemD reason) - really loves PostmarketOS (even contributed a couple of patches), and last week he told me that he is going to make a significant donation to PostmarketOS when he gets his next paycheck. But I have just made a phone call to him - and, after getting the news about that SystemD switch, he doesn't want his hard-earned money to fund the SystemD work

      You really are shooting yourself in the foot with this SystemD madness, please stop before its too late and you become yet-another-soulless-non-unique-distro.

      P.S. sorry for my emojis above, but lets see if you have a freedom of speech there...

      Edited 2 days ago by clayton craft
    • Last reply by Sam Day 2 days ago
  • I'm following the steps to build a systemd image for my samsung-gt510.

    The pmbootstrap repo_bootstrap systemd --arch=aarch64 step seems extraordinarily slow. I'm building on a machine with a 7950X3D.

    Click to expand

    I've heard the fans spin up once or twice to do some actual work, but otherwise my load avg has been sitting at around 3. Is this expected or am I missing some pmbootstrap config? Or perhaps some of the newly packaged stuff is missing a -j$(nproc) flag?

    Edited 2 days ago by Sam Day
  • Managed to build a systemd image for samsung-gt510 and flash it. It doesn't boot past bootsplash though.

    Further, I can't SSH in to debug. The USB network is coming up, but the SSH server isn't listening.

    I enabled initramfs telnet and poked around. I think the systemd-services package is missing from my install?

    I manually dropped /usr/lib/systemd/system-sshd.service + /usr/lib/systemd/system-sshdgenkeys.service in place and symlinked them to /usr/lib/systemd/system/multi-user.target.wants/ and now SSH is available again.

    • Resolved 22 hours ago by Justin Zobel

      I would like to test the new branch for oneplus-fajita, but i cant because i dont have the option to repo_bootstrap as mentioned above:

      pmbootstrap repo_bootstrap systemd --arch=aarch64 usage: pmbootstrap [-h] [-V] [-c CONFIG] [--config-channels CONFIG_CHANNELS] [-mp URL] [-m URL] [-j JOBS] [-E EXTRA_SPACE] [-B BOOT_SIZE] [-p APORTS] [-t TIMEOUT] [-w WORK] [-y] [--as-root] [-o] [--no-ccache] [--no-cross] [-l LOG] [--details-to-stdout] [-v] [-q] {init,shutdown,index,work_migrate,repo_missing,kconfig,export,sideload,netboot,flasher,initfs,qemu,pkgrel_bump,aportupgrade,newapkbuild,lint,status,ci,log,zap,stats,update,build_init,chroot,install,checksum,aportgen,build,deviceinfo_parse,apkbuild_parse,apkindex_parse,config,bootimg_analyze,pull} ... pmbootstrap: error: argument action: invalid choice: 'repo_bootstrap' (choose from 'init', 'shutdown', 'index', 'work_migrate', 'repo_missing', 'kconfig', 'export', 'sideload', 'netboot', 'flasher', 'initfs', 'qemu', 'pkgrel_bump', 'aportupgrade', 'newapkbuild', 'lint', 'status', 'ci', 'log', 'zap', 'stats', 'update', 'build_init', 'chroot', 'install', 'checksum', 'aportgen', 'build', 'deviceinfo_parse', 'apkbuild_parse', 'apkindex_parse', 'config', 'bootimg_analyze', 'pull')

      I did checkout the systemd-Branch for pmbootstrap/aports ... if that is correct. At least it seems like correct for me... Because it has the same contents as mentioned here: https://gitlab.com/postmarketOS/pmaports . But still no "repo_bootstrap"-command for me :( . What do i do wrong?

    • Last reply by Justin Zobel 22 hours ago
    • Good day everyone! Although I haven't contributed for a long time, I am a passionate user of PostmarketOS and hopefully my opinion could matter something, so just my two cents:

      • Actually @qmastery16 has a good point: it will be beneficial to continue providing those "OpenRC ISOs", even if they will be 'less featured' (in this case, accompany with a note regarding the shortcomings). There is clearly a group of people (disclaimer: I am one of them) who prefers the alternative init systems for various reasons - and providing the OpenRC ISOs will certainly help the postmarketOS popularity
      • Is it possible to set up some crowdfunding (Patreon or whatever) - to reward those particular people like @funderscore who are doing the OpenRC-related work at postmarketOS - for the "OpenRC branch"?
      Edited 23 hours ago by Mike Banon
    • I don't believe OpenRC images are going anywhere from the blog post. The only thing that's changing is they're adding an option to use systemd.

      As for funding, postmarketOS already has https://opencollective.com/postmarketos for raising funds for the development of postmarketOS and support of its contributors.

    • I don't believe OpenRC images are going anywhere from the blog post

      @Justin_Zobel , this blog post implies that the OpenRC images will be gone and the people will have to build their own - if that's not the case, please update the blog post to clarify this

      postmarketOS already has https://opencollective.com/postmarketos for raising funds

      Yes, but it does not allow those who does not like systemd to avoid financially supporting it. Please add a new funding option there that will be called "OpenRC maintenance" or something, the funds of which will go to OpenRC maintainers specifically

    • his blog post implies that the OpenRC images will be gone and the people will have to build their own

      The blog post specifically has a section about this, it's the first entry in the Q&A section:

      So pre-built images of Sxmo will continue to be OpenRC based

      I don't think the blog post can get any clearer than that.

      If you're concerned that non-Sxmo OpenRC images will no longer be produced/published... Well, I think that's the whole point. The reason to introduce systemd is to make it the default experience for Gnome/KDE UI spins, because it's anticipated that this will result in a better experience and require less maintenance.

      Yes, but it does not allow those who does not like systemd to avoid financially supporting it. Please add a new funding option there that will be called "OpenRC maintenance" or something, the funds of which will go to OpenRC maintainers specifically

      I was hesitant to suggest this earlier since it might be interpreted as inflammatory and/or fracturing to the pmOS community, but given these kinds of ideas are popping up now, I think it might be worth saying: perhaps the people who feel strongly enough against systemd should consider forking pmOS. Artix Linux as a non-systemd fork of Arch has already been mentioned in this thread.

      Of course it'd be a bummer to lose mindshare and maintainer energy from pmOS to arbitraryidealogyOS (there I've already named your fork for you, you're welcome!), but it might be better than dealing with constant noise from detractors that have nothing to contribute other than "systemd bad! because reasons that only barely made sense 10 years ago!"

    • But also, just so I don't seem like I'm being completely negative and flame-baity, might I suggest that if you really care so much about OpenRC and don't want to throw any dollars to the filthy systemd heathens that are doing most of the work to make pmOS a reality, perhaps you could approach the people(s) maintaining Sxmo packaging for pmOS and ask them to start up their own OpenCollective/Patreon/Github sponsorship, if they don't have it available already?

    • Yes, but it does not allow those who does not like systemd to avoid financially supporting it. Please add a new funding option there that will be called "OpenRC maintenance" or something, the funds of which will go to OpenRC maintainers specifically

      Just to be clear, the money does currently not go to paying any full-time developers as it is not enough for that.

    • Please register or sign in to reply
Please register or sign in to reply

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK