Paul's Blog Entries for February 2009

Monday 2nd February 2009

Fedora Project

Local Packages

Tuesday 3rd February 2009

Fedora Project

Made an effort to get my milter SELinux policy backported from upstream into Fedora, as it's needed (particularly in Fedora 10) just to make spamass-milter work. Fortunately, Rawhide has already moved to an upstream version that includes the milter policy, so that just left F-9 and F-10. I made patches against the selinux-policy packages in CVS and raised Bug #483849 to get these patches applied; it's already got Dan Walsh's blessing so hopefully it will happen soon.

Wednesday 4th February 2009

Local Packages

Thursday 5th February 2009

Local Packages

Monday 9th February 2009

Local Packages

Wednesday 11th February 2009

Local Packages

Fedora Project

Thursday 12th February 2009

Local Packages

Friday 13th February 2009

Fedora Project

Local Packages

Monday 16th February 2009

Local Packages

Tuesday 17th February 2009

Fedora Project

Local Packages

Creating a Local Mirror of a WebDAV Site

I have over the years helped to maintain the Manchester City Supporters' website in conjunction with Svenn Hanssen at the University of Tromsø. This has been an ongoing project since 1994 and our methodologies reflect that - Svenn does most of the maintenance and I keep a local mirror of the site and push my updates after I've made them.

I used to use the traditional mirror script to pull my local copy from the site's FTP server, and later switched to using lftp, still using FTP. However, late last year the site moved over to using WebDAV rather than FTP for upload access, and this proved to be a problem for lftp; although there is support in lftp for WebDAV, it appears to use index pages served out by the web server rather than the WebDAV indexes, and thus doesn't see the whole site (and gets very confused by broken links but I need to fix those anyway). So I've been using cadaver to upload my files and not resyncing back Svenn's changes for a while.

Today I tried a different approach, and it works very nicely. I used davfs2 to mount the remote site as a local filesystem and then used rsync to update my local mirror. Not only does it work well, it's much faster than my old lftp approach :-)

I made fuse-davfs2 packages for Fedora 9, 10, and Rawhide based on some old packages from Dag's repository. Having installed that, I then set up the configuration files I needed, namely an entry in /etc/fstab for the mount:

https://webdav.example.com/ /home/paul/webdav.example.com davfs noauto,user 0 0

and a credentials file ~/.davfs2/secrets:

/home/paul/webdav.example.com username password

The ~/.davfs2/ directory is mode 0700 and the file ~/.davfs2/secrets is mode 0600.

I then added my account paul to the davfs2 group:

# usermod -a -G davfs2 paul

I could then use this script to update my local copy of the site:

#!/bin/bash

# Exit on failure
set -e

echo Mounting WebDAV filesystem
mount /home/paul/webdav.example.com

if [ ! -s /home/paul/webdav.example.com/index.html ]; then
        echo "sitesync: index.html missing from remote filesystem - aborting" 1>&2
        exit 1
fi

echo Syncing data from WebDAV filesystem to local copy
rsync -av --delete /home/paul/webdav.example.com/ /home/paul/mymirror

echo Unmounting WebDAV filesystem
umount /home/paul/webdav.example.com

{i} Since writing this article, I have renamed the fuse-davfs2 package to davfs2, as that is what the software is known as upstream and, as of March 2009, in Fedora.

Thursday 19th February 2009

Fedora Project

Local Packages

Friday 20th February 2009

Fedora Project

Local Packages

I've also tweaked my build scripts to generate .586 packages rather than .i386 packages for Fedora 11 onwards, as per Fedora itself.

Sunday 22nd February 2009

Fedora Project

Monday 23rd February 2009

Local Packages

Tuesday 24th February 2009

Fedora Project

Wednesday 25th February 2009

Fedora Project

RPM Fusion Project

Local Packages

Thursday 26th February 2009

Fedora Project

Local Packages

Friday 27th February 2009

Fedora Project

Local Packages

Previous Month: January 2009
Next Month: March 2009