This file is indexed.

/usr/bin/nd_adddist is in neurodebian-dev 0.37.2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash

family=$1
dist=$2

set -e

if [ -z "$family" ]; then
  echo "You need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the NeuroDebian repository."
  exit 1
fi

if [ -z "$dist" ]; then
  echo "You need to provide a distribution codename (e.g. 'lenny', 'squeeze')."
  exit 1
fi


. /etc/neurodebian/cmdsettings.sh

# common options
opts="--distribution $dist --debootstrap debootstrap --aptcache $aptcache"

if echo $family | grep -q ubuntu; then
    # Use ubuntu's keyring since otherwise debootstrap would fail
    opts+=" --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg"
fi

if echo $family | grep -q debian; then
    # Use debian keyring since otherwise debootstrap would fail (on Ubuntu)
    opts+=" --debootstrapopts --keyring=/usr/share/keyrings/debian-archive-keyring.gpg"
fi

mkdir -p ${cowbuilderroot}/cow

for a in i386 amd64; do
  echo "Building $a base path..."
  cow="${cowbuilderroot}/cow/${family}-${dist}-${a}.cow"
  if [ -d "$cow" ]; then
    echo "${cow} exists. Ignoring arch."
    continue
  fi
  if [ "${family:0:3}" = "nd+" ]; then
  echo "Including NeuroDebian repository..."
    # If it has updates -- enable them
    if wget -q -O/dev/null $mirror/dists/$dist-updates; then
      updates_apt="deb $mirror $dist-updates $components |"
      updates_apt+="#deb-src $mirror $dist-updates $components |"
    else
      updates_apt=""
    fi
    cowbuilder --create --basepath ${cow} $opts \
               --components "$components" \
               --mirror "$mirror" \
               --debootstrapopts --arch=$a \
               --othermirror "${updates_apt}deb http://neuro.debian.net/debian $dist main contrib non-free | deb http://neuro.debian.net/debian data main contrib non-free"
    # deploy our key manually since archive with package is not yet
    # available at this point
    mkdir -p ${cow}/etc/apt/trusted.gpg.d
    cp --preserve=mode {,${cow}}/etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg
    # Old ubuntus might not have capability to read from that key yet,
    # so we would need to manually add it
    if [ $dist = 'karmic' ] || [ $dist = 'hardy' ]; then
        chroot ${cow} bash -c "apt-get install -y --force-yes gnupg \
        && /usr/bin/apt-key add /etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg \
        && /usr/bin/apt-get update"
    fi
  else
    cowbuilder --create --basepath ${cow} $opts \
               --components "$components" \
               --mirror "$mirror" \
               --debootstrapopts --arch=$a
  fi
done