You are not logged in.

#1 2007-06-10 16:11:29

Grnch
Member
Registered: 2007-06-10
Posts: 7

Arch trashes config files in /etc?

Hi everyone, I just installed Arch today in a virtual machine to get a feel for it (trying to get away from the grind of Gentoo), and ran into the first obstacle...

I installed joe with "pacman -S joe", then I edited /etc/joe/joerc. That's when it occurred to me to check how Arch handles config file upgrades, so I just reinstalled joe with the same command, and to my amazement, all modifications from /etc/joe/joerc were gone and there was no backup in sight. Pacman simply overwrote the files in /etc/joe. yikes

I was perusing the Wiki while downloading the CD image and the information there suggested that Pacman would save a backup copy of the previous config file, instead of just blindly overwriting. So, am I doing anything wrong? Does it put the backups in some different directory? Or is this feature not yet implemented? I'm really stuck on this, any help would be really appreciated.

If it helps, the CD version I downloaded is Archlinux-i686-2007.05-Duke-Linuxtag2007.current.iso, also during installation I selected only the "base" package set, and after installation I pointed the "current" repository in /etc/pacman.conf to the CD, so I could try out package management without waiting for packages to download.


P.S. The forum registration form is a bit broken, when it checks if you are a bot by asking the name of the distribution, it refused the answer "Arch Linux" and called me a bot. smile I obviously got past it, but still, it should accept "Arch Linux" because that is the name on the main web page and in the titles of all sub pages.

Offline

#2 2007-06-10 16:49:16

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Arch trashes config files in /etc?

Sounds like a bug in the joe package. Do "pacman -Qii joe" and see what's in the backup list. The backup list is what tells pacman whether a file is normally user-edited so it can preserve it.

You can add things to the list by putting them in NoUpgrade in pacman.conf.

Offline

#3 2007-06-10 17:08:15

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

Oh, I see. You are right, the backup files section is empty, thanks.

This presents few more questions:

1) In your experience, are the packages in Arch generally sloppy like this when it comes to handling config files, or was this just bad luck to have a rare bug in my first ever installed Arch package?

2) Isn't this kind of handling of config files fragile? It would really suck to be toiling all night over some complex config file, only to have your hard work blown away on next upgrade because the packager made a typo in the list of backup files.

3) Would it be better to have a global option somewhere to specify whole directory trees as protected user-edited config files, instead of each package trying (and sometimes failing, obviously) to specify everything? Can you specify whole of /etc/* with the NoUpgrade option you mentioned, instead of each file one by one?

Offline

#4 2007-06-10 17:20:01

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

Not to sound all negative though, I'm absolutely impressed with Arch so far! The ability to install a fairly minimal distro, an easy install process that still keeps you informed what's going on, the --recursive and --cascade options when removing packages with Pacman (how many times I needed something like that in Gentoo or Debian), and much more.

It's just this config file handling issue that is bugging me, the files in /etc and /home are basically the most important files on a typical Linux machine, almost everything else you can simply reinstall. I will setup a cron script to make hourly backups of /etc if I must, but I'd rather not have to.

Last edited by Grnch (2007-06-10 17:22:38)

Offline

#5 2007-06-10 18:35:19

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: Arch trashes config files in /etc?

If it's just a few files you can tell pacman to keep the files with NoUpgrade=/etc/joe/joerc in pacman.conf.
The important packages don't overwrite changes. And I only had to do this myself for timidity, because I think it doesn't have a /home/*/ file.

Offline

#6 2007-06-10 18:40:52

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

Gilneas wrote:

The important packages don't overwrite changes.

OK, that's reassuring.

Offline

#7 2007-06-10 19:06:01

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Arch trashes config files in /etc?

Grnch wrote:

1) In your experience, are the packages in Arch generally sloppy like this when it comes to handling config files, or was this just bad luck to have a rare bug in my first ever installed Arch package?

I think this is the worst luck I have seen for sometime...the odds of this happening must be tiny...except amongst die-hard joe users.  I would have thought this would have been spotted and reported by another joe user sometime ago.

I've had a quick look and I can see that etc/{jmacsrc,joerc,jpicorc,jstarrc,rjoerc} are all backed up...but none of them are there anymore, they're all in /etc/joe.

You must be the only person using joe I guess!

Did you submit a bug report for the package?

Offline

#8 2007-06-10 19:17:07

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

dtw wrote:

You must be the only person using joe I guess!

Old habits die hard... big_smile

dtw wrote:

Did you submit a bug report for the package?

No, I'm still finding my way around the site, but I'll do it tonight definitely if someone doesn't beat me to it.

I'm relieved this is just an isolated bug, because I'm really starting to get into Arch.

Offline

#9 2007-06-10 23:44:28

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Arch trashes config files in /etc?

Can you use a per user config for joe ~/.joerc? That definitely won't be overwritten, and is probably what other joe users have done.

Offline

#10 2007-06-11 08:30:31

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

Yes, that's what I'd usually do. But I wanted same joe settings when I "su" as different users (the nature of the project I'm working on requires it) and syncing the config everywhere is a chore.

Offline

#11 2007-06-11 08:56:58

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: Arch trashes config files in /etc?

just fixed the package, try joe 3.5-2


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#12 2007-06-11 09:46:36

Grnch
Member
Registered: 2007-06-10
Posts: 7

Re: Arch trashes config files in /etc?

Thanks for the quick response, but it still seems incomplete. I just upgraded and it trashed my wordwrap customizations in /etc/joe/ftyperc. Perhaps all of the files directly under /etc/joe should be added, and maybe even those under /etc/joe/syntax (I've tweaked those too in the past, but not lately).

Offline

Board footer

Powered by FluxBB