[Neurodebian-users] Question about nd_* tools

Hänel Nikolaus Valentin valentin.haenel at epfl.ch
Sun May 6 17:27:19 UTC 2012


* Yury V. Zaytsev <yury at shurup.com> [2012-05-06]:
> On Sun, 2012-05-06 at 16:38 +0200, Hänel Nikolaus Valentin wrote:
> What I personally use is the approach that is described here in more
> details: https://wiki.ubuntu.com/PbuilderHowto . Basically, you create a
> smart ~/.pbuilderrc which automates the selection of the right keyring
> basing upon the DIST variable:
> 
> if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then 
> # Debian configuration
>     MIRRORSITE="http://$DEBIAN_MIRROR/debian/"
>     COMPONENTS="main contrib non-free"
>     DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
> elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
>     # Ubuntu configuration
>     MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/"
>     COMPONENTS="main restricted universe multiverse"
>     DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
> else
>     echo "Unknown distribution: $DIST"
>     exit 1
> fi
> 
> However, I don't know how this integrates with NeuroDebian tools, which
> I have never tried. 

I modified the .pbuilderrc as follows:

if env | grep -q debian; then
# Debian configuration
    DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
elif env  | grep -q ubuntu; then
    # Ubuntu configuration
    DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
else
    echo "Unknown distribution: $DIST"
    exit 1
fi

This works because the envirnoment (env) contains some variable which
contains either 'debian' or 'ubuntu' keyword. I know this ultra-fragile,
but right now, «it works for me»™. I can't remember what the variable
was, maybe something like SUDO_CMD?

Note also, that I could do this in the $HOME/.pbuilderrc of my regular
user, because Ubuntu (unlike Debian) has a sudo that does not reset the
environment.  But since it is ubuntu that I am working on that does not
matter.

Now i get:

SUMMARY:
 nd+debian-squeeze      exists
 nd+debian-wheezy       exists
 nd+debian-sid  ok
 nd+ubuntu-natty        exists
 nd+ubuntu-oneiric      exists
 nd+ubuntu-precise      failed
 debian-squeeze         exists
 debian-wheezy  exists
 debian-sid     exists

Guess the configuration for precise is missing, or did I misspell it?

Now on to build from *.dsc....

V-



More information about the Neurodebian-users mailing list