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

Re: IDEA to SERIOUSLY reduce download times!


On Thu, 8 Jul 1999, Daniel Burrows wrote:
> On Thu, Jul 08, 1999 at 12:57:02AM -0400, Fabien Ninoles was heard to say:
> > How do you handle configuration files? You should put them directly in
> > shipping. Do you also check for change in permission, etc? That's an
> > important part of security updates. [Sorry, I don't have too much time
> > for checking your scripts. You have made a great work just by designing
> > this. I'm pretty sure my suggestions will be easy to implement if not already
> > there :) ]
>   Yes, the configuration files are put directly into shipping.  I overlooked
> file permissions, thanks for pointing that out :-)  I may have to switch to
> a real programming language for this, unless I can find a program to copy
> one file's permissions to another.

Its near: man chmod

CHMOD(1)                       FSF                       CHMOD(1)
              use RFILE's mode instead of MODE values

>   I'm also trying to come up with a clever way of detecting when files simply
> moved [to avoid including the whole file in the patch].  No luck so far :)

No luck with checksumming? Assuming you have the contents of both packages
in ./old and ./new, do a "md5sum `find . -type f` | sort" and look for the
first field, if it is equal, the second filed, if one file is below /old
and the other below /new. If so, you might want to double check with
cmp(1) if they _are_ equal. I did that yesterday in one line ~200
caracters (without the cmp and for one directory only): (from my mind)

md5sum `find -type f` | sort | ( 
   osum=""; ofile="";
   while read sum file;
     if [ "$osum" = "$sum" ]; then
       echo "Files are equal: $ofile $file";
     osum="$sum"; ofile="$file";

But I would consider switching to a higer level language, if you want to
do more things like this.

I have one more consideration about the space the patches would occupy. if
you are updating your distribution on a regular basis you don't get into
problems. But if you miss some updates, the servers have to keep all
patches online and you have to figure out if you should download the
patches ro the full archive. 

  c.   Stimm gegen SPAM! Vote against SPAM! Votez contre le SPAM!
 (`)              Vota contro lo SPAM! Stem tegen SPAM!
 _<                http://www.politik-digital.de/spam/
Spam, Spam, Spam, Spam, Spam, Spam, Spam, Spam, Spam, Spam, Spam, Spam,...
					-- Monty Pythons Flying Circus

Reply to: