You are not logged in.

#1 2012-07-17 21:25:50

89c51
Member
Registered: 2012-06-05
Posts: 741

Pacman and systemd offline updates.

I am reading through systemd documents lately (for the wrong reasons tongue) and i see that the systemd people implemented a feature for updating your system.

http://freedesktop.org/wiki/Software/sy … temUpdates

Could this work with pacman and be beneficial or it is against the Arch Way and the general Arch Linux philosophy.

Last edited by 89c51 (2012-07-17 21:49:01)

Offline

#2 2012-07-17 21:37:52

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

Re: Pacman and systemd offline updates.

This page does not exist yet. You can create a new empty page, or use one of the page templates.

Wat went wong?

Last edited by Awebb (2012-07-17 21:38:31)

Offline

#3 2012-07-17 21:49:24

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: Pacman and systemd offline updates.

Fixed the link sorry.

Offline

#4 2012-07-18 07:19:38

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

Re: Pacman and systemd offline updates.

First of all, the Arch Way explicitly states, that the user is in charge of his or her own system, therefore you are free to implement such an offline update, should you see the need arise.

Until a few days ago, I would have claimed, that there is no need for such a thing, but the recent /lib migration sheds a different light on the matter. However, this systemd solution looks a lot like another automation and since most Archers update their systems manually, most of the mechanisms here would be redundant.

Another thing that bugs me: On Windows, system critical updates are installed on shutdown. All the processes are gone, only the updater still remains active. It is ensured to be an offline update this way, without getting in the user's way during the next boot. That's what I always liked about Windows: download the updates, shut down and go to bed. Not: stand up in the morning and wait for updates to be done. One COULD turn on the computer and have breakfast first, indeed, but who turns on the computer as the first thing in the morning ;-)

Offline

#5 2012-07-18 07:56:37

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: Pacman and systemd offline updates.

I suppose there are going to be more migrations in the future so such a feature might prove useful.  I don't believe there are many that want to go through something like the /lib migration trouble that some had. Also i don't see it as an automated process. Of course you can do more in terms of automation but in arch i can see it work as: pacman -Syu >> Update available. Would you like to go in System update mode now [Y/n] >> reboot >> magic happens >>reboot in updated system. 

And maybe you can set it up to work on shutdown as you like. And one thing that is important is that it gives you the ability to rollback the system.

Offline

#6 2012-07-18 08:03:45

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,392
Website

Re: Pacman and systemd offline updates.

I doubt that will ever happen offically...  Given users the control of the system is what Arch is all about.   Of course, that means you are free to implement this yourself.

Offline

#7 2012-07-18 08:17:17

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Pacman and systemd offline updates.

Allan wrote:

I doubt that will ever happen offically...  Given users the control of the system is what Arch is all about.

I don't see the contradiction: Making it optional in the pacman.conf "systemd-offlineupdates=0/1" would not take away the user's control.

Even more if it was interactive: For example with the glibc update it would have still been very acceptable if pacman asked whether to do the upgrade interactively and if yes, ran a script that would do something like

for file in /lib/* if not file is owned by glibc {
    ask user: "do you want to move $file from /lib/ to /usr/lib? yes, all/yes, this time/no/never"
    if /usr/lib/$file exists {
        ask user: "overwrite /usr/lib/$file? yes, all/yes, this time/no/never"
    }
}

It could also just ask the user whether to do the systemd offline update in a similar way.
Maybe a "neverupdateinteractively=1" per default to retain same behaviour would be good.

I'm not saying, you should implement this.
I'm just saying how I think it does not necessarily conflict with the user being in control.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#8 2012-07-18 09:38:30

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: Pacman and systemd offline updates.

Allan wrote:

I doubt that will ever happen offically...  Given users the control of the system is what Arch is all about.   Of course, that means you are free to implement this yourself.

Just to be clear i didn't start this as a "you should implement this" or "hey make this official" topic but more as a discussion for the potential benefits (or drawbacks) that something like that might have.

I would like it if developers like yourself give their expert opinion on this. smile All opinions welcome of course.

Offline

#9 2012-07-18 10:55:21

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Pacman and systemd offline updates.

Personally I would dislike more things happening automagically, it's bad because you have no idea of what is going on and if the magic fails you are screwed since you have no idea what got broken so no idea of how to fix it.

The /lib update would have gone fine if people followed the instructions that were given and asked for help before doing crazy stuff.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2012-07-18 11:54:39

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Pacman and systemd offline updates.

Without looking into the details. It  think it would be trivial to implement an "pacman -Syu --offline" (or if we don't want it in pacman, even an "pacman-offline -Syu") feature.

Note that it would not have helped (much) with the /lib upgrade. The problem there were people having stuff in /lib that was either third-party or not under pacman's control at all.

What this _would_ be useful for is to avoid upgrading a running system, and hence weird stuff happening such as daemons crashing because the daemon in memory and the plugin/config file/whatever it tries to load (at runtime) from disk are not of the same version. Personally, I don't see this as a huge problem at the moment. And this is not the way I would have chosen to work around it [0]. However, if there is demand and patches for this i don't see why it could not be implemented one day.

[0]: the way I _would_ have solved the problem would be to rely on btrfs or another filesystem with snapshot features. Create a snapshot of your current rootfs, mount that to a temporary mount point, upgrade the snapshot (not touching the active rootfs), and configure your fs to mount the new rather than the old snapshot next time it is mounted. I tried this with btrfs and it was surprisingly simple (only a few lines of bash).

Offline

#11 2012-07-18 12:19:05

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Pacman and systemd offline updates.

Cdh wrote:
Allan wrote:

I doubt that will ever happen offically...  Given users the control of the system is what Arch is all about.

I don't see the contradiction: Making it optional in the pacman.conf "systemd-offlineupdates=0/1" would not take away the user's control.

Please keep sytemd out of my pacman.conf. Thank You wink

Offline

Board footer

Powered by FluxBB