-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pbuilderrc
138 lines (127 loc) · 5.31 KB
/
.pbuilderrc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Codenames for Debian suites according to their alias. Update these when
# needed.
UNSTABLE_CODENAME="sid"
TESTING_CODENAME="stretch"
STABLE_CODENAME="jessie"
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
OLDSTABLE_CODENAME="wheezy"
OLDSTABLE_BACKPORTS_SUITE="$OLDSTABLE_CODENAME-backports"
#APTGETOPT=("--allow-unauthenticated")
APTCACHEHARDLINK=no #для tmpfs
# List of Debian suites.
DEBIAN_SUITES=("wheezy" "jessie" "stretch" "buster" "sid" )
# List of Ubuntu suites. Update these when needed.
UBUNTU_SUITES=("trusty" "precise" "xenial" "artful" "bionic")
# Mirrors to use. Update these to your preferred mirror.
#DEBIAN_MIRROR="ftp.us.debian.org"
#UBUNTU_MIRROR="mirrors.kernel.org"
UBUNTU_MIRROR="archive.ubuntu.com"
DEBIAN_MIRROR="ftp.debian.org"
#DEBIAN_MIRROR="ftp.ru.debian.org"
# Optionally use the changelog of a package to determine the suite to use if
# none set.
if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
DIST=$(dpkg-parsechangelog | awk '/^Distribution: / {print $2}')
# Use the unstable suite for certain suite values.
if $(echo "experimental UNRELEASED" | grep -q $DIST); then
DIST="$UNSTABLE_CODENAME"
fi
# Use the stable suite for stable-backports.
if $(echo "$STABLE_BACKPORTS_SUITE" | grep -q $DIST); then
DIST="$STABLE"
fi
fi
case ${DIST} in
precise) USERUNSHM=no ;;
*) USERUNSHM=yes ;;
esac
# Optionally set a default distribution if none is used. Note that you can set
# your own default (i.e. ${DIST:="unstable"}).
: ${DIST:="$(lsb_release --short --codename)"}
# Optionally change Debian release states in $DIST to their names.
case "$DIST" in
unstable)
DIST="$UNSTABLE_CODENAME"
;;
testing)
DIST="$TESTING_CODENAME"
;;
stable)
DIST="$STABLE_CODENAME"
;;
oldstable)
DIST="$OLDSTABLE_CODENAME"
;;
esac
# Optionally set the architecture to the host architecture if none set. Note
# that you can set your own default (i.e. ${ARCH:="i386"}).
: ${ARCH:="$(dpkg --print-architecture)"}
NAME="$DIST"
if [ -n "${ARCH}" ]; then
NAME="$NAME-$ARCH"
DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
fi
BASETGZ="${HOME}/pbuilder/$NAME-base.tgz"
# Optionally, set BASEPATH (and not BASETGZ) if using cowbuilder
# BASEPATH="/home/alex/pbuilder/$NAME/base.cow/"
DISTRIBUTION="$DIST"
BUILDRESULT="${HOME}/pbuilder/$NAME/result/"
APTCACHE="${HOME}/pbuilder/$NAME/aptcache/"
BUILDPLACE="${HOME}/pbuilder/build/"
#BINDMOUNTS="/var/cache/archive"
if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
# Debian configuration
MIRRORSITE="http://$DEBIAN_MIRROR/debian/"
COMPONENTS="main contrib non-free"
# This is for enabling backports for the Debian stable suite.
#if $(echo "squeeze" | grep -q $DIST); then
# #EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
# OTHERMIRROR="$OTHERMIRROR | deb http://backports.debian.org/debian-backports $OLDSTABLE_BACKPORTS_SUITE $COMPONENTS"
#fi
#if $(echo "squeeze" | grep -q $DIST); then
# EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
# OTHERMIRROR="$OTHERMIRROR | deb http://backports.debian.org/debian-backports $STABLE_BACKPORTS_SUITE $COMPONENTS"
#fi
if $(echo "wheezy" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES deb-multimedia-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.deb-multimedia.org $DIST main"
fi
if $(echo "stretch" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES deb-multimedia-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.deb-multimedia.org $DIST main"
fi
if $(echo "jessie" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES deb-multimedia-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.deb-multimedia.org $DIST main"
fi
if $(echo "sid" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES deb-multimedia-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.deb-multimedia.org $DIST main"
fi
if $(echo "buster" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES deb-multimedia-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.deb-multimedia.org $DIST main"
fi
elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
# Ubuntu configuration
MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/"
COMPONENTS="main restricted universe multiverse"
if $(echo "trusty" | grep -q $DIST); then
OTHERMIRROR="deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-updates $COMPONENTS | deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-backports $COMPONENTS"
fi
if $(echo "karmic" | grep -q $DIST); then
OTHERMIRROR="deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-updates $COMPONENTS | deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-backports $COMPONENTS"
fi
if $(echo "lucid" | grep -q $DIST); then
OTHERMIRROR="deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-updates $COMPONENTS | deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-backports $COMPONENTS"
fi
if $(echo "maverick" | grep -q $DIST); then
OTHERMIRROR="deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-updates $COMPONENTS | deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-backports $COMPONENTS"
fi
if $(echo "precise" | grep -q $DIST); then
OTHERMIRROR="deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-updates $COMPONENTS | deb http://$UBUNTU_MIRROR/ubuntu/ $DIST-backports $COMPONENTS"
fi
else
echo "Unknown distribution: $DIST"
exit 1
fi