You are not logged in.

#1 2014-09-01 08:18:10

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Next steps with systemd?

Hi!

I have been wondering what the plans wrt. the new systemd features are in Arch Linux.

Systemd is in the process of introducing factory reset. For that to fully work there should be a /usr/lib/factory (or was it /usr/share/factory?) with the default configuration files (if needed). That is not visible in my Arch yet. The pacman DB should also move to /usr for that to work as /var will get wiped on factory reset.

Then there are the topics brought up in http://0pointer.net/blog/revisiting-how … stems.html : Will those happen on Arch?

What is the right place to discuss these issues with the developers? How can I help with the process?

PS: I already have moved pacman DB into /usr on my systems to faciliate my own image creation/distribution setup (based on ostree though). I basically do an automated Arch install of all my machines, VMs and containers each night and just reboot into those new images if there were updates I care about (or need to reboot for whatever reason). If the update goes wrong I just reboot back into the previous image.

Being able to use more distro-provided functionality for that would be so nice:-)

Offline

#2 2014-09-01 08:25:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Next steps with systemd?

As with all Arch packages, upstream features will become available in Arch when they are included in the upstream project's stable release. If systemd is only "in the process of" introducing something, then clearly it doesn't meet that requirement.

Once these features are released, the corresponding systemd update will be packaged and placed in Arch's testing repo, which is the answer to "How can I help?". If you want to get your hands dirty before that, there's a systemd-git package in the AUR maintained by the same Arch dev who takes care of the core systemd package. And if that's still not enough for you, get on to the systemd-devel mailing list for all the latest news and views.

Last edited by tomk (2014-09-01 08:26:01)

Offline

#3 2014-09-01 08:35:13

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

tomk: Well, this goes beyond having a new systemd package.

* Having system users created by files in /usr/lib/sysusers.d/ needs all packages requiring those users to actually create files there. The systemd users are already there:-)
* Factory reset requires all packages to put their default configuration into /usr/whatever/factory and pick them up from there. That will most likely require tweaking to the build time configuration of the packages for a long time.
* Moving the pacman db into /usr is not done by installing a systemd package either:-) And again: That needs to happen for factory reset to work.
* The whole process of image based installations will also require significant work on all parts of the distribution to be useful.

Systemd is pretty invasive;-) It does need quite a bit of distribution-wide effort to make it work as intended.

Basically I do want to know *Archs* plans to implement (or ignore) certain features that are discussed on the systemd-development list (which I follow for a while, no worry). Even though I do use Arch for a while I have not found out how to find out what that distro actually wants to do:-)

Last edited by t_hunger (2014-09-01 08:39:07)

Offline

#4 2014-09-01 09:09:18

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Next steps with systemd?

OK, join the arch-general and arch-dev-public lists as well.

Offline

#5 2014-09-01 17:11:58

cedeel
Member
From: ~
Registered: 2009-08-25
Posts: 176
Website

Re: Next steps with systemd?

t_hunger wrote:

* The whole process of image based installations will also require significant work on all parts of the distribution to be useful.

I doubt you'll see an image based installation of Arch as the official way of installing it.

Offline

#6 2014-09-02 19:57:15

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

cedeel: I do not expect image based installation to be the default for arch, but I would definitely like to see that as one option that works without too much magic:-)

I do use image based setup for a couple of month now based on arch. Basically I do a fresh install each night, commit that into ostree, deploy it to my hard drive, and then reboot into the new image. Works really well for my servers and I only need my git repo to completely rebuild the server from scratch with everything set up properly. Having this systemd-image-thing would make my setup so much easier to maintain!

Offline

#7 2014-09-02 20:37:51

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

tomk wrote:

OK, join the arch-general and arch-dev-public lists as well.

I follow arch-dev-public for a while now and am now on arch-general.

Both do not allow for much insight into what is planned though. There must be some planning and discussions going on, where does that happen? Is that in private mailing lists or IRC channels?

Offline

#8 2014-09-03 03:47:00

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Next steps with systemd?

t_hunger wrote:
tomk wrote:

OK, join the arch-general and arch-dev-public lists as well.

I follow arch-dev-public for a while now and am now on arch-general.

Both do not allow for much insight into what is planned though. There must be some planning and discussions going on, where does that happen? Is that in private mailing lists or IRC channels?

SUPER-DIRTY-LITTLE-SECRET-HIDDEN-SPOILER: Outside work on pacman, Arch "development" mostly consists of packaging software for the repos and (to a lesser extent) keeping the AUR running. Hence, discussion on arch-dev-public mostly consists of how updates to certain packages might affect the distribution as a whole. The vast majority of executive decisions go soemthing like this:

Dev A: Hey, everybody, Unless there are any objections, I'll be taking measure 'x' to  deal with build problem 'y'. I'd also like to drop package 'z' from [extra] to the AUR, since I don't see the point of officially supporting it anymore.
Devs B-Q: Sure, go for it.
Dev A: Cool, I'll get to it tomorrow.

Not to diminish the very real effort the developers put into this fine distribution, but judging by your systemd questions you seem to think they take a more proactive role in crafting some unique, ready-made operating system. They don't really; Arch isn't so much a Linux-based operating system as it is a distribution platform for GNU/Linux software. As long as the distribution system works, the devs just keep packages up-to-date and leave it at that. There are discussions on a private developers' mailing list, but I've been under the impression that those are mostly for internal dev team matters rather than actual "Deciding the Fate of Arch Linux" matters.

Offline

#9 2014-09-03 07:08:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Next steps with systemd?

t_hunger, it's quite OK to start the discussion yourself - feel free to raise whatever questions you want. Various Arch devs contribute to systemd regularly - you've probably seen them on systemd-devel, whether you recognised them or not. It is highly unlikely that they are unaware of upcoming developments in the area, so if they're not discussing them yet, I can only guess that they don't feel it necessary for the moment.

Offline

#10 2014-09-03 07:24:20

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Next steps with systemd?

Arch factory reset? How would that work? How does systemd know, what packages to include in that factory state? You want to move data that clearly belongs in /var to /usr, because of a feature that assumes package manager based configuration of software?

EDIT:

Eeww, reading through all this (especially this) made me realize, that it is not that clear after all, what should be in /var and what in /usr.

Last edited by Awebb (2014-09-03 08:00:41)

Online

#11 2014-09-03 10:44:37

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

Awebb wrote:

Arch factory reset? How would that work? How does systemd know, what packages to include in that factory state? You want to move data that clearly belongs in /var to /usr, because of a feature that assumes package manager based configuration of software?

The pre-requisite to factory reset is to have the pacman DB in /usr somewhere (which is actually just one configuration setting you need to change) and having packages populate /usr/share/factory/etc with sane defaults or just defaulting to sane values if no configuration is in /etc at all.

With that in place a systemd factory reset is basically "wipe /etc and /var". All the packages that were installed stay since the pacman DB was moved into /usr and the configuration is reset to whatever it is arch shipped.

If you want to have your admin-foo stick around for users after a factory resest, then you change the files in /usr/share/factory/etc.

Offline

#12 2014-09-04 01:45:16

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Next steps with systemd?

There seems to be a big fuss with systemd right now that RHEL is going to implement it.  I don't quite understand what the problem is myself.  The Arch implementation seems to work.

Last edited by nomorewindows (2014-09-04 01:46:38)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#13 2014-09-04 16:42:11

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Next steps with systemd?

nomorewindows wrote:

There seems to be a big fuss with systemd right now that RHEL is going to implement it.  I don't quite understand what the problem is myself.  The Arch implementation seems to work.

The first crest of the bitching-and-moaning wave hit rolling-release distributions and Fedora first a couple years ago. Now it's finally reaching the "We only update once per decade" crowd. It's just the natural progression of this sort of thing.

Offline

#14 2014-09-04 17:43:15

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Next steps with systemd?

IMO the reluctance of the 'update once per decade' crowd to embrace systemd is quite different to the b&m that we're familiar with. Last I heard, lots of them hadn't even warmed up to ext4 yet.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#15 2014-09-05 07:23:39

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Next steps with systemd?

t_hunger wrote:

The pre-requisite to factory reset is to have the pacman DB in /usr somewhere (which is actually just one configuration setting you need to change) and having packages populate /usr/share/factory/etc with sane defaults or just defaulting to sane values if no configuration is in /etc at all.

There is no sane default. You cannot assume that every installed package is part of the default (pacman db in /usr would assume that). What is a sane default selection of packages? The only way around this is creating a tool that helps the user to decide, what's in the default selection. This would leave the pacman DB where it is (and belongs to!) and allow the user to have his personal factory reset. Just removing anything but base/base-devel does not cut it.

Online

#16 2014-09-05 10:25:57

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Next steps with systemd?

If you followed the systemd proposal, you'd have to split pacman into at least two parts.

  • package manager with the local database in /usr (the rest of the configuration can be somewhere else)
    you can do that even if /usr is read-only in your production environment, since you have to make it writable for updates.
    -> see the local database as a description of the arch installation, then it makes more sense.

  • configuration manager with database on /etc to manage updates of configuration files from /usr/.../factory

  • maybe do /var in the same way as /etc

Last edited by progandy (2014-09-05 10:30:54)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#17 2014-09-06 06:51:34

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Next steps with systemd?

Again, only the "default set of packages" is allowed to be in /usr for the factory reset, not the entire database, because all the packages not considered "factory default" would be removed from the system. The database is fine in /var, there is nothing wrong with it. Now we need a way to let the user create a list of packages for the respective "default", a tool to define the current state as factory state - like a snapshot - or a tool with a config file that creates the minimal pacman database in /usr and if the user does not set it up, it defaults to base+base-devel.

Online

#18 2014-09-06 13:29:10

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: Next steps with systemd?

I thought the factory reset mostly applied to the system settings. So it would nuke your /etc/ folder, which in this model is purely for user configuration which overwrites the vendor default in /usr/lib. I already noticed that the nvidia package installs the nouveau blacklist to /usr/lib/modprobe.d and not /etc/modprobe.d anymore.

Offline

#19 2014-09-06 13:37:29

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: Next steps with systemd?

That was my understanding as well. Awebb's theory would mean a lot more work for distribution developers. e.g. "non-default" packages would have to be removed by pacman before the wipe, or else there'd be a load of untracked files floating around in /usr/bin /usr/share, etc.

Personally, I have little interest in either scenario, but it will be interesting to see how it turns out.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#20 2014-09-07 18:38:31

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

Awebb wrote:
t_hunger wrote:

The pre-requisite to factory reset is to have the pacman DB in /usr somewhere (which is actually just one configuration setting you need to change) and having packages populate /usr/share/factory/etc with sane defaults or just defaulting to sane values if no configuration is in /etc at all.

There is no sane default. You cannot assume that every installed package is part of the default (pacman db in /usr would assume that). What is a sane default selection of packages? The only way around this is creating a tool that helps the user to decide, what's in the default selection. This would leave the pacman DB where it is (and belongs to!) and allow the user to have his personal factory reset. Just removing anything but base/base-devel does not cut it.

The set of packages that the user installed is the sane default selection of packages. Factory reset is about undoing any (mis-)configurations, not about reinstalling packages.

The pacman DB is something that goes with the installed software in /usr and makes no sense whatsoever without that. So why not have it in /usr? /usr needs to be writable anyway whenever the pacman DB is going to get updated.

Offline

#21 2014-09-07 18:43:34

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

progandy wrote:

If you followed the systemd proposal, you'd have to split pacman into at least two parts.

  • package manager with the local database in /usr (the rest of the configuration can be somewhere else)
    you can do that even if /usr is read-only in your production environment, since you have to make it writable for updates.
    -> see the local database as a description of the arch installation, then it makes more sense.

  • configuration manager with database on /etc to manage updates of configuration files from /usr/.../factory

  • maybe do /var in the same way as /etc

Yeap, the pacman DB needs to move to /usr. I have mine in /usr/lib/pacman/db right now.

I do not understand what the configuration manager in /etc is supposed to do. You would need a copy of pacman.conf and pacman.d/mirrorlist in /usr with the other default /etc files. That would be copied to /etc on factory reset.

The rest (package cache, repository dbs, etc.) can stay in /var (with a tempfiles.d entry to create the directories pacman won't start without).

At least that seems to work here, even though I am doing more of a image-based installation than a proper factory reset:-)

Offline

#22 2014-09-07 18:52:22

t_hunger
Member
Registered: 2014-09-01
Posts: 9

Re: Next steps with systemd?

I just filed https://bugs.archlinux.org/task/41863 about factory reset and atomic upgrades with pacman. Let's see how this develops.

Offline

#23 2014-09-07 19:44:24

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Next steps with systemd?

I do not understand what the configuration manager in /etc is supposed to do. You would need a copy of pacman.conf and pacman.d/mirrorlist in /usr with the other default /etc files. That would be copied to /etc on factory reset.

Well, pacman has some rules for pacnew files. I figured that should be available as a second tool, maybe merge it with pacdiff.  Something like:

       old-factory=X, etc=X, factory=X
           Do nothing
       old-factory=X, etc=X, factory=Y
           copy new factory settings to /etc
       old-factory=X, etc=Y, factory=X
           do nothing
       old-factory=X, etc=Y, factory=Y
           do nothing
       old-factory=X, etc=Y, factory=Z
           warn user, optionally pacdiff dialog

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#24 2014-10-04 00:05:02

STUART
Member
From: Seattle, WA
Registered: 2010-08-19
Posts: 52
Website

Re: Next steps with systemd?

I think the architecture Lennart suggests has its merits, beyond just factory reset. Although it's clearly unworkable for distros in its current state, it's not impossible to tweak it in a way that would be partially compatible with his envisioned pattern, while still working for the way Arch already works.

It seems to me this is how you'd do it for Arch:

root:whatever:org.archlinux:x86_64

That's the `root` layer with /etc and /var as described in the post.

Unlike most distros, rather than being based on a `usr` snapshot, a `root` for Arch would describe its /usr entirely via Arch-maintained `runtime` snapshots for each package, which are then loaded at boot (possibly via some kind of `archboot` stub `app` snapshot).

Alternately, each `root` snapshot in Arch could have a corresponding writable `usr` snapshot that gets packages installed into it normally. (A root could also have two `usr` snapshots, with updates being installed into the other `usr` with a chroot'ed `pacman -Syu` for ChromeOS-style two-image updates.) The package database for the repos can still be in `/etc` (much as the cache would still be in /var), but `/usr` would have a separate database that only describes *installed* packages.

(It also might be possible to mix these two approaches, having `usr` snapshots that dictate `runtime` package snapshots to mount.)

runtime:org.archlinux.core.PACKAGE:x86_64:VERSION
runtime:org.archlinux.extra.PACKAGE:x86_64:VERSION
runtime:org.archlinux.community.PACKAGE:x86_64:VERSION

This is how you do every Pacman package. The utopic theoretical idea is that `app` and `runtime`/`framework` snapshots provided by upstream can eventually replace packages provided by the distro, but until that happens (I'll believe it when I see it), Arch continues its packaging effort.

If an upstream project wants to try making a self-contained `app` snapshot that relies on upstream-contained `runtime` snapshots, it can, and it would be compatible with this model (insofar as it ever could be).

home:stuart:1000:1000

Self-explanatory, see Lennart's original blog entry.

Last edited by STUART (2014-10-04 00:17:25)

Offline

#25 2014-10-04 09:37:54

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: Next steps with systemd?

I'll just leave this here...

Offline

Board footer

Powered by FluxBB