The presence of the debug , iso , and os subdirectories indicates that this is the directory we're looking for.

Armed with that information, create a script, /usr/local/bin/rawhide-rsync , on a stable (non-Rawhide) system with 10 GB or more free storage space:

#!/bin/bash

#

# rawhide-rsync :: script to mirror the Fedora rawhide repo locally

#

MAILTO= alert # Person/alias to receive reports

DIR= /var/www/html/rawhide # Mirror directory

URI=rsync:// mirrorhost/directory / # Rsync URI

if tty -s # If being run interactively, show progress

then

 XCMD='tee /dev/tty'

else

 XCMD='cat'

fi

(

 cd $DIR || exit 2 # Abort if the cd fails (important!)

 rsync --recursive --delete -v $URI . 2>&1

 echo

)|$XCMD|mail $MAILTO -s 'Rawhide Rsync Report'

Ensure that httpd and rsync are installed on the target system, and create a directory to hold the development mirror (replace user with the name of the non- root user account that you will be using to run the rawhide-repo script):

# mkdir -p /var/www/html/rawhide/

# chown user /var/www/html/rawhide

# chmod a+rx /var/www/html/rawhide  

Finally, run the script:

$ rawhide-rsync

Welcome to MUUG Online Network Access, courtesy of the

Manitoba Unix User Group.

For any questions, problems, or concerns about this site,

please send e-mail to: <[email protected]>.

Look under the /pub directory and subdirectories for files to download.

We are now also maintaining a mirror of selected sites (or a subset

thereof), in the /mirror directory. Look at the README file there

for details on what is being mirrored.

receiving file list ... done

debug/ElectricFence-debuginfo-2.2.2-20.2.2.i386.rpm

debug/ElectricFence-debuginfo-2.2.2-20.2.i386.rpm

debug/GConf2-debuginfo-2.14.0-2.1.i386.rpm

...(Lines snipped)...

os/repodata/repoview/zsh-html-0-4.2.5-1.2.2.html

os/repodata/repoview/zulu-support.group.html

sent 15296418 bytes received 706808440 bytes 166633.17 bytes/sec

total size is 8112656832 speedup is 11.23

The server and the local rsync program will compare notes and modify the files and directories on the local system to match the server. The first time the script is run, it will transfer the entire repository, and the speedup value will be 1.0 . In subsequent runs, the speedup value will indicate the amount of time saved over transferring the entire repository (the preceding example indicates that the transfer took 1/11.23 of the time that a full transfer would take). 

There is a high rate of change in the development repository, and from time to time, most or all of the repository will be freshly rebuilt, resulting in very large transfers. If you have a transfer-limited or capped Internet account and run the rawhide-rsync script often, be careful that you don't accidentally exceed your transfer limits.

You can now automate the rsync process by adding a crontab entry. Using the non-root account that will be performing the mirroring, edit the crontab :

$ crontab -e  

Modify the crontab file to start the rawhide-rsync script at a convenient time:

# Update the local rawhide repo

0 5 * * * /usr/local/bin/rawhide-rsync

The rawhide-rsync reports will be mailed to you on a daily basis.  

The rawhide-rsync reports are each over half a megabyte! Consider deleting them after reviewing the end of each report for errors. 

To verify that the local mirror is accessible through HTTP, connect with a browser. For example, if the host containing the mirror were bluesky , you'd point your browser to http://bluesky/rawhide , on which you would see the Fedora , iso , and image directories.

9.4.1.4. Using a local Rawhide mirror

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату