Re: Poor man's solution to /etc when upgrading system?

2015-11-03 Thread Greg Troxel

> (What is etcmanage? Different from etcupdate?)

Yes.  It aims to be fully automatic and to never change a human-changed
file.  See pkgsrc/sysutils/etcmanage, unpack and read the README.

etcupdate asks the user many questions, and was in my experience
unsuitable for unattended upgrades of 20 machines.



signature.asc
Description: PGP signature


Re: Poor man's solution to /etc when upgrading system?

2015-11-03 Thread Greg Troxel

Johnny Billquist  writes:

> On 2015-11-03 14:14, Greg Troxel wrote:
>>
>>> (What is etcmanage? Different from etcupdate?)
>>
>> Yes.  It aims to be fully automatic and to never change a human-changed
>> file.  See pkgsrc/sysutils/etcmanage, unpack and read the README.
>>
>> etcupdate asks the user many questions, and was in my experience
>> unsuitable for unattended upgrades of 20 machines.
>
> So how do etcmanage deal with human modified fails. Just leaves them
> alone? For, that is one of the good points of etcupdate, however I
> recognize that it requires manual work. But files that I have modified
> in /etc are also sometimes updates in the distribution, and I want
> some kind of merging of those changes sometimes.

Yes, it leaves them alone.  I then deal with merging by hand, reading
the list of files that don't match upstream and thinking about them.

The big point for me is that "do an update" is totally automatic, and
then I can deal with merge/cleanup when/if I want.

I have been running this code on several systems for over 10 years and
it has been a good experience.  The biggest hand merging issues has been
master.passwd and group for new system users/groups.

On one system, I have 37 files that differ from upstream, and some of
those are log files


signature.asc
Description: PGP signature


Re: Poor man's solution to /etc when upgrading system?

2015-11-03 Thread Johnny Billquist

On 2015-11-03 14:14, Greg Troxel wrote:



(What is etcmanage? Different from etcupdate?)


Yes.  It aims to be fully automatic and to never change a human-changed
file.  See pkgsrc/sysutils/etcmanage, unpack and read the README.

etcupdate asks the user many questions, and was in my experience
unsuitable for unattended upgrades of 20 machines.


So how do etcmanage deal with human modified fails. Just leaves them 
alone? For, that is one of the good points of etcupdate, however I 
recognize that it requires manual work. But files that I have modified 
in /etc are also sometimes updates in the distribution, and I want some 
kind of merging of those changes sometimes.


  Johnny



Re: Poor man's solution to /etc when upgrading system?

2015-11-02 Thread Greg Troxel

Ottavio Caruso  writes:

> following up from the multiple recent thread regarding best way to
> upgrade the system and etcmanage, I wonder if a quicker and better
> solution could be the following:
>
> 1) Insert installation cd/usb and boot
> 2) mount the installed system and mv /etc to /etc.old
> 3) Upgrade all sets, including etc
> 4) Copy/restore individual files from /etc.old if/when needed
>
> Alternatively, I remember (but memory may fail) that old Slackware
> versions came with a script to rename all copies of /etc files with a
> .new suffix.
>
> Maybe one could write a script to detect if a file exists, and if so,
> install a new file with a .new extension.
>
> I am not sure if etcmanage already does that.

etcmanage essentially does this.  it  unpacks the new etc (and xetc) in
/usr/netbsd-etc, and then it syncs all the files into /etc in the case
when the old file is registered as automatically managed and not changed
From upstream.  Once you are set up you just run "INSTALL-NetBSD
install" from a releasedir and it all happens automatically, usually
entirely correctly.

So rather than reinvent the wheel I would suggest that you read the
etcmanage README (in the source and in the binary pacakge).  It would be
great if someone turned the README into a man page.


signature.asc
Description: PGP signature


Re: Poor man's solution to /etc when upgrading system?

2015-11-02 Thread Mayuresh
On Mon, Nov 02, 2015 at 06:40:29PM +, Ottavio Caruso wrote:
> following up from the multiple recent thread regarding best way to
> upgrade the system and etcmanage, I wonder if a quicker and better
> solution could be the following:
> 
> 1) Insert installation cd/usb and boot
> 2) mount the installed system and mv /etc to /etc.old
> 3) Upgrade all sets, including etc
> 4) Copy/restore individual files from /etc.old if/when needed
> 
> Alternatively, I remember (but memory may fail) that old Slackware
> versions came with a script to rename all copies of /etc files with a
> .new suffix.
> 
> Maybe one could write a script to detect if a file exists, and if so,
> install a new file with a .new extension.
> 
> I am not sure if etcmanage already does that.

I skip etc set when upgrading and later on update using "etcupdate".
Worked for me so far.

(What is etcmanage? Different from etcupdate?)

Mayuresh