[pacman-dev] Add rsync vcs support to makepkg

Mark Constable markc at renta.net
Tue Sep 23 02:17:19 EDT 2008

Plus a couple of other minor points. Qt daily snapshots are only
available via rsync (and tarballs) so I added _rsyncroot and
_rsyncmod awareness to makepkg.

elif [ ! -z ${_rsyncroot} ] && [ ! -z ${_rsyncmod} ] ; then               
    [ $(type -p rsync) ] || return 0                                  
    msg "$(gettext "Determining latest rsync revision...")"           
    newpkgver=$(date -u +%Y%m%d%H)                                    

The date format is per hour so multiple updates per day are possible
and the -u is UTC so the the timestamp is universal worldwide. Whilst
submitting a patch I thought I'd throw in this option for consideration
which is to use the pkgrel variable as the VCS version field rather
than pkgver.

if [ "$USE_PKGREL" != "" ]; then
    msg2 "$(gettext "Package release version found: %s")" "$newpkgver"
    msg2 "$(gettext "Version found: %s")" "$newpkgver"

It requires a new USE_PKGREL argument (see attached diff). It makes
it easier to offer packages called qt-snaphot-4.4.1-2008092301 and

And finally, this minor tweak ensures that a pkgver=$(date) or
pkgver=$EXPORTED_GLOBAL_VAR will not be overwritten...

- sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
+ sed -i "s/^pkgver=[^\( |\$\)]*/pkgver=$newpkgver/" ./$BUILDSCRIPT

-------------- next part --------------
A non-text attachment was scrubbed...
Name: makepkg-rsync.patch
Type: text/x-patch
Size: 2521 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080923/21620a20/attachment.bin>

More information about the pacman-dev mailing list