2024/04/02

slackware local mirror copy

a work in progress ...
to make sure it is working, first do a full slackpkg update. 
create /data/mirror
then run this script, adapt to your needs:

MIRROR_HOST="ftp.slackware-brasil.com.br"
MIRROR_DIR="/data/mirror"
BWLIMIT=0
RSYNC_OPTS="-avPH --bwlimit=$BWLIMIT --delete --delete-excluded --progress "

rsync $RSYNC_OPTS \
--exclude source \
$MIRROR_HOST::slackware/slackware64-current/ $MIRROR_DIR/slackware64-current
echo "Done!" 



create a vhost inside /etc/httpd/extra/http-vhosts.conf
run/restart httpd
update mirrors in /etc/slackpkg to point to the new virtual web host
run slackpkg update
should give no error

 

update:

my latest update.sh:
 

#!/bin/bash
logger inicio update
MIRROR_HOST="ftp.slackware-brasil.com.br"
MIRROR_DIR="/data/mirror"
BWLIMIT=0

RSYNC_OPTS="-aPH --bwlimit=$BWLIMIT --delete --delete-excluded "

/usr/bin/rsync $RSYNC_OPTS \
--exclude source \
$MIRROR_HOST::slackware/slackware64-current/ $MIRROR_DIR/slackware64-current
logger resultado rsync: $?

and the script to run the updates:

root@rudy2:~/bin# cat goupdate.sh  
#!/bin/bash
slackpkg update
echo listo
read
slackpkg upgrade slackpkg
slackpkg upgrade aaa_glibc-solibs
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system

The "read" was placed just in case there is no updates to do since slackpkg only report 0 on success