A guy, a blog and the internet
Archive for September, 2008
Debian Mirror – HowTo
Sep 30th
I was reading on Debian News how Ravishankar Haranath setup his mirror, and therefore decided to share how I did mine, (I’m not trying to say my way is better, but it does suite my needs and is easily extendable)
To download the mirrors I use this script:
<script sync_mirror.sh>
#!/bin/bash
OPTIONS="--nosource --progress --postcleanup --ignore-release-gpg --ignore-small-errors --pdiff=none";
MIRROR=`basename ${0} | cut -f2 -d "_"`
DEST="/home/debian-mirror"
case "${MIRROR}" in
"debian" )
METHOD="--method=http"
HOST="--host=ftp.de.debian.org"
ROOT="--root=debian"
DIST="--dist=etch,etch-proposed-updates"
ARCH="--arch=i386"
SECTION="--section=main,contrib,non-free"
DEST="${DEST}/debian/"
;;
"security" )
METHOD="--method=ftp"
HOST="--host=security.debian.org"
ROOT="--root=/debian-security/"
DIST="--dist=etch/updates"
ARCH="--arch=i386"
SECTION="--section=main,contrib,non-free"
DEST="${DEST}/debian-security/"
;;
"volatile" )
METHOD="--method=http"
HOST="--host=volatile.debian.org"
ROOT="--root=debian-volatile"
DIST="--dist=etch/volatile"
ARCH="--arch=i386"
SECTION="--section=main,contrib,non-free"
DEST="${DEST}/debian-volatile/"
;;
"multimedia" )
METHOD="--method=http"
HOST="--host=www.debian-multimedia.org"
ROOT="--root=/"
DIST="--dist=etch"
ARCH="--arch=i386"
SECTION="--section=main"
DEST="${DEST}/debian-multimedia/"
;;
"backports" )
METHOD="--method=http"
HOST="--host=www.backports.org"
ROOT="--root=debian"
DIST="--dist=etch-backports"
ARCH="--arch=i386"
SECTION="--section=main,contrib,non-free"
DEST="${DEST}/debian-backports/"
;;
* )
echo "${0} called incorrectly"
exit
;;
esac
debmirror ${OPTIONS} ${METHOD} ${HOST} ${ROOT} ${DIST} ${ARCH} ${SECTION} ${DEST}
</script sync_mirror.sh>
To setup the permissions I use this script:
<script permissions.sh>
#!/bin/bash
MIRROR=`basename ${0} | cut -f2 -d "_"`
DEST="/home/debian-mirror"
case "${MIRROR}" in
"debian" )
DEST="${DEST}/debian/"
;;
"security" )
DEST="${DEST}/debian-security/"
;;
"volatile" )
DEST="${DEST}/debian-volatile/"
;;
"multimedia" )
DEST="${DEST}/debian-multimedia/"
;;
"backports" )
DEST="${DEST}/debian-backports/"
;;
* )
echo "${0} called incorrectly"
exit
;;
esac
echo "Setting Ownership"
chown -R www-data:www-data ${DEST}
echo "Setting File Permissions"
chmod -R 660 ${DEST}
echo "Setting Folder Permissions"
find ${DEST} -type d -exec chmod 770 {} \;
</script permissions.sh>
And then to pull it all together I have thefollowing directory structure (mirrors left out as it’s a ling list of files)
/home/debian-mirror/
|-- debian
|-- debian-backports
|-- debian-multimedia
|-- debian-security
|-- debian-volatile
|-- scripts
| |-- permissions.sh
| `-- sync_mirror.sh
`-- scripts.d
|-- mirror_backports -> ../scripts/sync_mirror.sh
|-- mirror_debian -> ../scripts/sync_mirror.sh
|-- mirror_multimedia -> ../scripts/sync_mirror.sh
|-- mirror_security -> ../scripts/sync_mirror.sh
|-- mirror_volatile -> ../scripts/sync_mirror.sh
|-- permissions_backports -> ../scripts/permissions.sh
|-- permissions_debian -> ../scripts/permissions.sh
|-- permissions_multimedia -> ../scripts/permissions.sh
|-- permissions_security -> ../scripts/permissions.sh
`-- permissions_volatile -> ../scripts/permissions.sh
And then I just setup a cronjob:
0 0 * * 0 root /bin/run-parts --verbose /home/debian-mirror/scripts.d | /usr/bin/mailx -s "`uname -n` - Debian mirror sync completed" root
This was to disable the mirroring of one of the repositories I just need to remove the symlink from the scripts.d folder
The Germans are invading
Sep 29th
Ok so it’s not actual Germans but rather German Measels, and it’s Catelyn that has them.
Well she’s home early from creche and sleeping, hopefully she gets better soon…
Installing Jabber on Debian Etch
Sep 26th
Well I just finished getting Jabber installed and working on my local network.
Basically I just followed the first link to get the server up, and the second to get a web client running.
I did have a couple of issues with the web client, but I will try to document them at another date… (well I need to reinstall the server soon)
Now just to get jabber to talk to the outside world
Washing day blues
Sep 26th
So silly (or stupid) me goes and leaves my phone (Nokia E51) in my pyjama pants and they ended up going through the wash…
Thankfully I have insurance, but what an annoying inconvenience…
oh and luckely I managed to save the Sim card, and I have a spare phone…
sigh… that is all…
Happenings in Cape Town
Sep 22nd
Cecilia just sent out an email with the latest news, and so I don’t get anything wrong I’m gonna paste it here:
Hi All Just a quick email to let all the family/friends know what is happening on this side. 1. Clifford and myself are still going to get married, and have decided that we want a big wedding with all our family and friends. Wedding will be next year and definately late in the year, around September or October 2009. Once we have decided on a date later this year, we will inform most of the people that is from Jhb, so they can tell us if they will be able to fly down to Cpt. We want to get married on a beautiful wine farm and have already started looking for some venues. 2. We have decided to put the plans for the UK on hold first. We first want to get married, pay debt ect. It definately is still there, just put it on hold first. 3. Another reason for point number 2 above here. We have decided to first "study" a little more so that we can have more behind our name. Lucky me are first in line. I'm going to start probably beginning on October with a course through Intec so that I can obtain my Hotel Management Diploma. They say it usually takes up to three years to study, but if I put about three hours or more a day into my studying, I can do it in just over a year. So please be patient with me for the next year, I will probably be spending more time behind the books than anything else. At least I can say it for the best. Well that the only news currently I can think of. Other than my birthday is in exactly one week, and I am looking forward to having a quiet and relaxing birthday. Hope all are well and enjoying the strange weather. Love, Cecilia, Clifford and Catelyn xxxx
And for those of you that don’t know, Cecilia’s birthday is the 29th September. And if you want to know which year, it’s every year :p
Taking a stand to promote OpenID
Sep 22nd
I’ve been using OpenID for a while now, and have it enabled it on this site…
I was reading a post on Planet Debian and that is why I’m writing this
As Aaron B. Hockley said in this blogentry: It’s a win for the blog owner, since it means the comments have a “real” identity behind them.
I’ve been quite happy so far with it, it also helps with usernames, for example I only need to remember one URL and a password, no more trying to think of new usernames when the one you always use is taken.
If more websites would start using OpenID the world would be a better place, well my world at least :p
Well if you need help setting up an OpenID account drop me a message
Farewell Cara
Sep 18th
New Harddrive
Sep 12th
So I’ve now gotten a new HDD, it’s an Toshiba External 500GiB drive, and connects via USB…
Thank you Cecilia
Well hopefully gonna get the rest of the Debian mirror (maybe also Ubuntu, but I dunno…) copied onto it in the next couple of weeks. Lucky for me, Johann Spies from the University of Stellenbosch, has agreed to help me get the initial mirror setup. This will save _alot_ of bandwidth, for both me and the mirror I am going to mirror from in the future.
Well more on that later, just need to try sort out where I’m going to put it, and how it’s going to be used. Mostly NFS, but I will probably have to share it via SAMBA as well, since Cecilia’s laptop has windows on it, blegh…
Machine names
Sep 12th
Not that I’m on any of the planets I read (Planet Debian, Planet Ubuntu), but there was a MEME about the names you give machines.
Well the company I currently work for, I’ve named all the machines after greek gods. zeus, ares, apollo (more to come we hope)
And at home I’ve started naming machines after TTMNT (The teenage mutant ninja turtles) and other characters. bebop, shredder (more to come, as I have the names for proposed machines, these machines already exist). and then there are the personal machines wich are just called mainuser-machinetype. eg clifford-laptop. I know it’s unoriginal, but anyways… :p



