this is a very basic script, you may want to salt to taste. i've attached it, but i'm not sure how the list manager will handle my attachment so i also pasted it. beware bad carriage returns! --------------------------------------------------------------------------- [duncan@smallberries rpms]$ cat checkit #!/bin/bash # if no arguments were given, bitch and quit [ "$1" ] || echo "$0 [base_dir_with_rpms]" || exit 1 # this is a function that'll make a pretty printout of the package's information new_package() { # if this is the first time we're called, print out a little info [ -z "$new_package" ] && echo -e "new packages downloaded to $(pwd)\n" && new_package=true # use rpm to query the package for it's stats name=$(rpm -qp ${1} --queryformat %{NAME}) version=$(rpm -qp ${1} --queryformat %{VERSION}) release=$(rpm -qp ${1} --queryformat %{RELEASE}) summary=$(rpm -qp ${1} --queryformat %{SUMMARY}) # echo out our new package's name and basic info echo "${name}" echo " ver : ${version}" echo " rel : ${release}" echo " sum : ${summary}" echo } # go into the base directory where we'll find all of our rpms cd $1 # find out what we have before old_list=$(find . -name '*.rpm') # run our mirror apt-mirror # find out what we have after for i in $(find . -name '*.rpm') ; do # if this grep fails, then there's a new package, report it with new_package() echo $old_list | grep -q ${i} || new_package $i done [duncan@smallberries rpms]$ --------------------------------------------------------------------------- Guolin Cheng said: > Hi, > > > > Just have some crude thoughts about the method of packages upgrade for > our hundreds of Fedora Core 1 Linux boxes. Since it is quite awkward to > upgrade hundreds of clients through Internet(big burden on Internet > servers on the other side), I'd like to setup my own Master package > Master server for all my hundreds of clients. Clients will pull > packages from my Master server, while my Master server will sync upgrade > from Internet. Because we twist a lot packages to enable&disable > building options, we have to download source RPMs as well, so there > should have two places for upgrade packages. The first one is exactly > the same the one on Internet, while the second is different, it only > contains updated binary rpms we need for our own distribution, both > untouched, modified&rebuilt. So the steps to set up the above > infrastructure will be as the following: > > > > 1, Use rsync|ftpcopy to copy the FC1 updates tree from Internet to > master server, either through crontab or by hand manually, at last send > an email to system administrator about the difference. That difference > will contain info about new updated rpms. > > > > 2, Have a look of the new upgraded rpms, see if there is a need to > rebuild some of them. If so, install source rpms, then twist .spec > files, and rebuild to get customized binary rpms. > > > > 3, copy new upgrade binary rpms, either untouched or rebuilt at step 2, > to a place where all clients can reach by means of nfs|http|ftp. > > > > 4, on clients, through crontabs, use cfengine or customized scripts to > install the upgrade packages with the help of up2date|yum periodically. > > > > This way it should make the mass upgrade much easier and faster, while > at the same time save the Internet bandwidth at the server side for > other Fedora Core 1 amateurs. > > > > When the infrastructure is setup, we only need to read email from rsync > and maintain a Master server for package upgrade. > > > > Any ideas or suggestions? Thanks. > > > > --Guolin Cheng > > > > > > > > > > > > +( duncan brown : duncanbrown@xxxxxxxxxxxxxxxxx )+ +( linux "just works" : www.linuxadvocate.net )+ -------------------------------------------------- Understatement of the century: "Hello everybody out there using minix - I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones" - Linus Torvalds, August 1991 --------------------------------------------------
Attachment:
checkit
Description: Binary data