Personal tools

Arch Linux/Arch Haskell Group Maintainership

From HaskellWiki

< Arch Linux(Difference between revisions)
Jump to: navigation, search
Line 33: Line 33:
 
* feed-cli
 
* feed-cli
  
<code>
+
-------------
#!/bin/sh
+
  
cd /tmp/
+
#!/bin/sh
set -e
+
  
project=`cabal2arch $* 2>&1 | tail -1 | sed 's/Created *//' | xargs basename | sed 's/\..*$//'`
+
cd /tmp/
echo $project
+
set -e
cd $project
+
build || exit 1
+
cd ..
+
echo "Uploading $project.tar.gz"
+
aurploader -k $project.tar.gz
+
  
# create meta files: update the package list and build success list
+
project=`cabal2arch $* 2>&1 | tail -1 | sed 's/Created *//' | xargs basename | sed 's/\..*$//'`
tail -1 ~/.cabal2arch.log | update-aur-log
+
echo $project
 +
cd $project
 +
build || exit 1
 +
cd ..
 +
echo "Uploading $project.tar.gz"
 +
aurploader -k $project.tar.gz
  
cp /home/dons/aur.xml /tmp/
+
# create meta files: update the package list and build success list
url=`/home/dons/bin/get-arch-url $project || cat /tmp/link`
+
tail -1 ~/.cabal2arch.log | update-aur-log
echo $url
+
 
feed-cli new-item -t`cat /tmp/title` --description-file=/tmp/desc -u/tmp/aur.xml -l"$url"
+
cp /home/dons/aur.xml /tmp/
rm /tmp/link
+
url=`/home/dons/bin/get-arch-url $project || cat /tmp/link`
rm /tmp/title
+
echo $url
rm /tmp/desc
+
feed-cli new-item -t`cat /tmp/title` --description-file=/tmp/desc -u/tmp/aur.xml -l"$url"
echo scp /tmp/aur.xml code.haskell.org:/srv/code/arch/
+
rm /tmp/link
cp /tmp/aur.xml /home/dons/
+
rm /tmp/title
 +
rm /tmp/desc
 +
echo scp /tmp/aur.xml code.haskell.org:/srv/code/arch/
 +
cp /tmp/aur.xml $HOME
  
</code>
 
  
 
And additional script does the work of building the package:
 
And additional script does the work of building the package:
  
<code>
 
set -e
 
  
pkg=`sed -n '/pkgname/{s/pkgname=//;p;q}' PKGBUILD`
+
set -e
 +
 
 +
pkg=`sed -n '/pkgname/{s/pkgname=//;p;q}' PKGBUILD`
 +
 
 +
if makepkg -f ; then
 +
    echo "$pkg True" >> $HOME/.build-all.log
 +
else
 +
    exit 1
 +
fi
  
if makepkg -f ; then
 
    echo "$pkg True" >> $HOME/.build-all.log
 
else
 
    exit 1
 
fi
 
</code>
 
  
 
== Package Quality Assurance ==
 
== Package Quality Assurance ==
 +
 +
One script generates this table from build success logs:
  
 
* http://www.galois.com/~dons/arch-haskell-status.html
 
* http://www.galois.com/~dons/arch-haskell-status.html
  
 
== Package Publication and Notification ==
 
== Package Publication and Notification ==
 +
 +
Another updates the RSS feed, so that packages are publicized:
  
 
* http://twitter.com/archhaskell
 
* http://twitter.com/archhaskell
 +
 +
== Mapping to Hackage ==
 +
 +
Yet another updates the distro mapping, so that AUR links are displayed on Hackage
 +
 +
* http://www.galois.com/~dons/cabalArchMap.txt

Revision as of 21:02, 14 August 2010

The Arch Haskell group maintains AUR packages for Haskell. The Arch Haskell packages make up around 10% of total AUR packages (~2000 packages).

To make the task of implementing the Arch Haskell policy of tracking AUR feasible, we take two approaches:

  • massive automation of Hackage to AUR regular conversion, via cabal2arch
  • group participation in updating packages.

The first step ensures a consistent user experience:

  • cabal2arch should be used to generate all Haskell AUR packages,
  • which ensures all naming conventions and other policies are followed,

The second point ensures the Arch Haskell project isn't vulernable to "bus errors" where a user burns out.

Contents

1 The job of an Arch Haskell group maintainer

The concern of an Arch Haskell maintainer is as follows.

  • Ensure AUR tracks Hackage versions of packages.

To do this, the following work is done:

  • Watch the Hackage RSS feed
  • When new packages appear, attempt to build and upload them, with the "build" script (below).

2 The "build" script

The "build" script is a shell program that wraps cabal2arch. You should always have the latest version of cabal2arch installed. The set of tools you need to run this script are:

  • The haskell-archlinux package.
  • cabal2arch
  • aurploader
  • feed-cli

#!/bin/sh
cd /tmp/
set -e
project=`cabal2arch $* 2>&1 | tail -1 | sed 's/Created *//' | xargs basename | sed 's/\..*$//'`
echo $project
cd $project
build || exit 1
cd ..
echo "Uploading $project.tar.gz"
aurploader -k $project.tar.gz
# create meta files: update the package list and build success list
tail -1 ~/.cabal2arch.log | update-aur-log
cp /home/dons/aur.xml /tmp/
url=`/home/dons/bin/get-arch-url $project || cat /tmp/link`
echo $url
feed-cli new-item -t`cat /tmp/title` --description-file=/tmp/desc -u/tmp/aur.xml -l"$url"
rm /tmp/link
rm /tmp/title
rm /tmp/desc
echo scp /tmp/aur.xml code.haskell.org:/srv/code/arch/
cp /tmp/aur.xml $HOME


And additional script does the work of building the package:


set -e
pkg=`sed -n '/pkgname/{s/pkgname=//;p;q}' PKGBUILD`
if makepkg -f ; then
    echo "$pkg True" >> $HOME/.build-all.log
else
    exit 1
fi


3 Package Quality Assurance

One script generates this table from build success logs:

4 Package Publication and Notification

Another updates the RSS feed, so that packages are publicized:

5 Mapping to Hackage

Yet another updates the distro mapping, so that AUR links are displayed on Hackage