[systemd-devel] systemd-network-wait-online symlinks to systemd-networkd

Colin Guthrie gmane at colin.guthr.ie
Wed Jun 11 08:58:54 PDT 2014


'Twas brillig, and Dave Reisner at 10/06/14 18:10 did gyre and gimble:
> Traditional configuration files have their own content. They can be
> hashed and tracked by your package manager. On upgrade, you can make an
> intelligent decision about what to do with the new file (replace,
> ignore, merge) based on the original and current hash of the existing
> file, and the has of the incoming file.
> 
> Symlinks are more of a binary decision -- either they exist, or they
> don't. But, they're still configuration in this context. There's no way
> to track this on/off "bit", so distros (well, speaking of Arch) simply
> nuke the symlinks and add back what they see as "sane defaults" during
> installation (explicitly leaving the symlinks untracked).

Yeah, this can be a pain. For us in RPM, we have to recreate the new
symlinks that have been added with a conditional trigger (i.e. "when
upgrading from a version older an X, then add this new symlink" but also
duplicate the symlink creation for the "fresh install" case too - here a
preset file would be useful, but special care would need to be taken
when doing version upgrades to make sure any changes to the presets were
properly factored into the version-conditional triggers too).

>> > I mean, ideally we'd just invoke "systemctl preset" for these things,
>> > but for the sake of cross-compilation we can avoid this easily. 
>> >
>> > We probably should ship make sure to ship the very same symlinks we
>> > create with "make install" with a preset file though...

Sadly reapplying a preset on upgrade isn't really an option as it will
restore things users have specifically removed.

Is there some magic RPM trick I'm missing here? I mean we don't
"package" these symlinks as such, they are all created in %post... I
think that's how it's done in Fedora too right? As mentioned above the
preset would be useful for the "fresh install" scenario, but upgrades
still have to be handled quite carefully and explicitly.

Don't get me wrong, it's not thaaaaat much effort, but it's still a
gotcha to worry about!

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list