FYI: Script I wrote- Fedorasync.sh

Patrick fedora at puzzled.xs4all.nl
Mon May 3 12:05:01 UTC 2004


On Mon, 2004-05-03 at 07:26, Chris Kloiber wrote:
> For those who don't know rsync or mkisofs well, but want to make daily
> dvd isos of rawhide, and as a side benefit have a local yum repo, I
> wrote a script for you.
> 
> ftp://people.redhat.com/ckloiber/FedoraSync.sh
> 
> Usage: FedoraSync.sh <options> <arch> <source_repo> <local_directory>
>  
> Options:
>  
> -live     No changes are made to the local copy without this.
> -del      Passes --delete to rsync, files not existing at the
>           source are removed in the local tree.
> -paranoid 'touch' all local files, makes rsync verify them
>           and avoids corruption. Takes a little longer, but
>           I highly recommend it.
>  
> -iso      After rsync is complete, create a dvd iso from the
>           local tree.
> *Note:    -iso enables -live, -del, and -paranoid
>  
> -ssh      Passes -e ssh to rsync, so you can use rsync over
>           ssh connections.
>  
> arch is one of: i386, x86_64, or ppc (ppc untested)
>  
> Options can now be given in any order, or ommitted to use
> built-in defaults.
> 
> I recommend you start by copying your latest CD's or DVD to
> /var/ftp/pub/rawhide/$ARCH, (as that is the default local directory my
> script uses) then run the script to update that copy to save on
> bandwidth a bit.
> 
> Enjoy, but please use an rsync mirror near you. As configured it will
> use rsync://mirror.linux.duke.edu/fedora-linux-core-development but we
> don't want to overload that mirror. Other rsync mirrors can be found at:
> 
> http://fedora.redhat.com/download/mirrors.html
> 
> You may have to hunt a bit for the right path at first. When you get it
> right, running it with just -del will show which old files will be
> deleted, and which will be created. You should not see the arch in the
> path of any output. You will see Fedora, isolinux, headers, etc at the
> beginning of the test output. Running with -live (or -live -del
> -paranoid) will update the local tree, but not make an iso. Using -iso
> will enable -live -del and -paranoid automatically, and build an iso
> suitable for booting (Yes, it works for me on both i386 and x86_64).
> Speaking of x86_64 you can override the arch of the system running the
> script to download and burn an x86_64 iso. You might be able to make an
> iso for ppc, however I doubt it will boot unless isolinux is supported
> there as well. (I have not tested ppc at all as I don't have one. If you
> make it work, send patches!)
> 
> As a side benefit to all this, the yum headers get downloaded and placed
> in your anonymous ftp tree, as well as on the DVD iso. You can then use
> either as a local yum repository, further saving bandwidth if you have
> many machines to update. 
> 
> Have fun, I am. :)
> 
> -- 
> Chris Kloiber
> 
> 

Hi Chris,

Your script works like a charm. Thanks! There is one thing though... If
I run the script as a plain user with the repository in
/home/patrick/rawhide, it always fails at the mkisofs stage. If I run it
as root it works as advertised. The command I use is:
cd /home/patrick/
./FedoraSync.sh -live -del -paranoid -iso i386

The error message I get as a plain user is:
Size of boot image is 4 sectors -> No emulation
mkisofs: Permission denied. Error opening boot image file
'./isolinux/isolinux.bin' for update.

In the current rawhide tree isolinux.bin is 444 and mkisofs needs 644 to
do it's thing successfully.

Is changing isolinux.bin from 444 to 644 something that needs to be done
in the rawhide tree or do I just work around this "feature" by changing
isolinux.bin from 444 to 644 in the script just before the mkisofs
command is issued and afterwards change it back?

Thanks,
Patrick





More information about the test mailing list