Re: Location of the pacman database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Sep 15, 2014 at 9:04 AM, Yamakaky <yamakaky@xxxxxxxxxxxx> wrote:
> Let divide the problem, with a package containing /var/lib/prog/ and
> /etc/prog/conf created by tmpfiles :
>
> - If the program wrote to /var, then there is no problem, as pacman does
> not remove a non empty dir anyway.
> - If it doesn't, there is a problem as /var/lib/prog will not be deleted.
> - The config file will not be deleted by pacman anyway.
>
> I can't find a solution now, I will think at it.

I actually do not even see the problem:-)

tempfiles.d for files in /etc are a bandaid in the first place: They
are meant to work around daemons that absolutely insist on having a
configuration file and do not fall back gracefully to a default
configuration without one.

A tempfiles.d for /var is more permanent since daemons will need to
have directories set up for their use (with proper permissions, etc.).

But even when a packge ships those tempfiles.d snippets, those will
only take effect if the files/directories are *missing*. Nobody will
mess with either /etc nor /var up to the point where you screwed up
your system yourself by deleting things that are actually needed. So
nothing prevents having /var/lib/whatever and /etc/whatever.conf in
the pacman package and shipping a tempfiles.d snippet to create those
if they ever go missing.

Nobody will muck around in your /etc nor /var (at least as long as
your system is sane;-), pacman -Qo /var/whatever will just work as
well, even after a factory reset.

If the user uninstalls the package, then the tmpfiles.d snippet will
also be gone, so no problem there.

> Being able to just delete /etc/<package> and reboot/restart the program
> to reset its config isn't "only useful in special situations". As Tobias
> said, arch is configured by users who can make mistakes. Factory reset
> isn't only for the entire system. And it doesn't harm the other users.

Well, I would not delete /etc/<package> and then reboot, I would just
cp /usr/lib/factory/etc/<package> /etc/<package> and restart the
service:-)

Having a directory with the pristine distro-provided configuration is
a really nice thing. Just being able to run a simple diff to see all
the changes you ever did to /etc is really nice. Currently that is
severely limited in a default arch setup by the factory being almost
empty though:-)

Best Regards,
Tobias


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux