Re: [leaf-devel] etc.local

2008-02-25 Thread Erich Titl
Hi Eric

Eric Spakman wrote:
 Hi Erich,
 
 I understand your proposal, but it doesn't work reliable. The reason is
 that other packages explicitly include specific files in those
 directories. Adding a rule in etc.local to include all files could confuse
 the backup logic.

I can understand this, although scheduling a file/directory twice for 
backup should definitely _not_ confuse the backup logic. What if someone 
erroneously places something in local.local which is already backed up 
by a specific package.local. Will this confuse the backup logic? If so, 
then I consider this a bug, as adding anything in local.local is 
legitimate :-(

Of course I could not resist to test this, and added etc/network to 
local.local, here is the result

gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
etc/network/handle_routes
etc/network/if-down.d/del_routes
etc/network/if-up.d/add_routes
etc/network/interfaces
etc/network/routes

This actully looks pretty OK to me, modifying etc.local accordingly yields

gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
etc/network/handle_routes
etc/network/if-down.d/del_routes
etc/network/if-up.d/add_routes
etc/network/interfaces
etc/network/routes

and having it in both files

gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
etc/network/handle_routes
etc/network/if-down.d/del_routes
etc/network/if-up.d/add_routes
etc/network/interfaces
etc/network/routes

So apparently with a pretty recent config package the proposed change 
does not break functionality.

 
 A better way is to include those files in local.local (local.lrp), that's
 where that package is meant for. Or to have a specific package with the
 added files and a .local file.

That is the way I do it right now, my local.local file is constantly 
growing though.

cheers

Erich



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] etc.local

2008-02-25 Thread Eric Spakman
Hi Erich,


 I understand your proposal, but it doesn't work reliable. The reason is
  that other packages explicitly include specific files in those
 directories. Adding a rule in etc.local to include all files could
 confuse the backup logic.

 I can understand this, although scheduling a file/directory twice for
 backup should definitely _not_ confuse the backup logic. What if someone
 erroneously places something in local.local which is already backed up by
 a specific package.local. Will this confuse the backup logic? If so, then
 I consider this a bug, as adding anything in local.local is
 legitimate :-(

 Of course I could not resist to test this, and added etc/network to
 local.local, here is the result

 gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
 etc/network/handle_routes etc/network/if-down.d/del_routes
 etc/network/if-up.d/add_routes etc/network/interfaces etc/network/routes

 This actully looks pretty OK to me, modifying etc.local accordingly
 yields

 gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
 etc/network/handle_routes etc/network/if-down.d/del_routes
 etc/network/if-up.d/add_routes etc/network/interfaces etc/network/routes

 and having it in both files

 gatekeeper# tar tzf /CF/gatekeep.lrp | grep network
 etc/network/handle_routes etc/network/if-down.d/del_routes
 etc/network/if-up.d/add_routes etc/network/interfaces etc/network/routes

 So apparently with a pretty recent config package the proposed change
 does not break functionality.

The problem is that the sha1sums are calculated multiple times, it
should work but gives some overhead and is not very clean. The config
system is designed to explicitly list files you want to backup and only
use directories if you are sure only a specific package uses it. See also
the following document: http://leaf.sourceforge.net/doc/buci-apkg3.html


 A better way is to include those files in local.local (local.lrp),
 that's where that package is meant for. Or to have a specific package
 with the added files and a .local file.

 That is the way I do it right now, my local.local file is constantly
 growing though.

Or just add the etc/network to local.local

 cheers

 Erich


Cheers,

Eric


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] etc.local

2008-02-25 Thread Erich Titl
Hi Eric

Eric Spakman wrote:
 Hi Erich,

...


 The problem is that the sha1sums are calculated multiple times, it
 should work but gives some overhead and is not very clean. 

I see, the sha1sum files appear to be claculated on the contents of 
package.list, not on package.local, which holds files and 
directories to be backed up. So this should not hurt, or does it?

The config
 system is designed to explicitly list files you want to backup and only
 use directories if you are sure only a specific package uses it. See also
 the following document: http://leaf.sourceforge.net/doc/buci-apkg3.html
 
 A better way is to include those files in local.local (local.lrp),
 that's where that package is meant for. Or to have a specific package
 with the added files and a .local file.
 That is the way I do it right now, my local.local file is constantly
 growing though.

 Or just add the etc/network to local.local

Which would also break the above mentioned principles :-)
It also contains stuff not yet packaged for logrotate.d, e.t.c

cheers

Erich


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] etc.local

2008-02-25 Thread Erich Titl
Sorry just an attempt to correct

Erich Titl wrote:
 Hi Eric
 
 Eric Spakman wrote:
 Hi Erich,
 ...
 
 The problem is that the sha1sums are calculated multiple times, it
 should work but gives some overhead and is not very clean. 
 
 I see, the sha1sum files appear to be claculated on the contents of 
 package.list, not on package.local, which holds files and 
 directories to be backed up. So this should not hurt, or does it?

I meant package.conf not package.list



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] etc.local

2008-02-25 Thread Eric Spakman
Hi Erich,


 The problem is that the sha1sums are calculated multiple times, it
 should work but gives some overhead and is not very clean.

 I see, the sha1sum files appear to be claculated on the contents of
 package.list, not on package.local, which holds files and
 directories to be backed up. So this should not hurt, or does it?

I don't understand your question. This is the logic used to calculate the
sha1sums (this is part of the package install logic in linuxrc):

#Calculate sha1sum
if [ -f $PFX/$f.local ] ; then
cat $PFX/$f.local | while read x ; do
[ -e $x ]  find $x -type f | xargs sha1sum  $PFX/$f.sha1
done
fi

So package.local is used, not package.list

 The config

 system is designed to explicitly list files you want to backup and only
  use directories if you are sure only a specific package uses it. See
 also the following document:
 http://leaf.sourceforge.net/doc/buci-apkg3.html


 A better way is to include those files in local.local (local.lrp),
 that's where that package is meant for. Or to have a specific
 package with the added files and a .local file.
 That is the way I do it right now, my local.local file is constantly
 growing though.

 Or just add the etc/network to local.local


 Which would also break the above mentioned principles :-)

True, but at least it's your responsibility ;-))

 It also contains stuff not yet packaged for logrotate.d, e.t.c


 cheers

 Erich

Cheers,

Eric



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] etc.local

2008-02-25 Thread Eric Spakman
Hi Erich,

 The problem is that the sha1sums are calculated multiple times, it
 should work but gives some overhead and is not very clean.

 I see, the sha1sum files appear to be claculated on the contents of
 package.list, not on package.local, which holds files and
 directories to be backed up. So this should not hurt, or does it?

 I meant package.conf not package.list

Nope, it's really package.local. Using package.conf would not cover
all files that might change.

Eric


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel