##// END OF EJS Templates
Correction 11-apt.sh
vidal -
r729:2cf5a41bac99
parent child
Show More
@@ -1,69 +1,63
1 #
1 #
2 # Setup APT repositories
2 # Setup APT repositories
3 #
3 #
4
4
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 # Install and setup APT proxy configuration
8 # Install and setup APT proxy configuration
9 if [ -z "$APT_PROXY" ] ; then
9 if [ -z "$APT_PROXY" ] ; then
10 install_readonly files/apt/10proxy "${ETC_DIR}/apt/apt.conf.d/10proxy"
10 install_readonly files/apt/10proxy "${ETC_DIR}/apt/apt.conf.d/10proxy"
11 sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy"
11 sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy"
12 fi
12 fi
13
13
14 if [ "$BUILD_KERNEL" = false ] ; then
14 if [ "$BUILD_KERNEL" = false ] ; then
15 # Install APT pinning configuration for flash-kernel package
15 # Install APT pinning configuration for flash-kernel package
16 install_readonly files/apt/flash-kernel "${ETC_DIR}/apt/preferences.d/flash-kernel"
16 install_readonly files/apt/flash-kernel "${ETC_DIR}/apt/preferences.d/flash-kernel"
17
17
18 # Install APT sources.list
18 # Install APT sources.list
19 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
19 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
20 echo "deb ${COLLABORA_URL} ${RELEASE} rpi2" >> "${ETC_DIR}/apt/sources.list"
20 echo "deb ${COLLABORA_URL} ${RELEASE} rpi2" >> "${ETC_DIR}/apt/sources.list"
21
21
22 # Upgrade collabora package index and install collabora keyring
22 # Upgrade collabora package index and install collabora keyring
23 chroot_exec apt-get -qq -y update
23 chroot_exec apt-get -qq -y update
24 # Removed --allow-unauthenticated as suggested after modification on _apt privileges
24 # Removed --allow-unauthenticated as suggested after modification on _apt privileges
25 chroot_exec apt-get -qq -y install collabora-obs-archive-keyring
25 chroot_exec apt-get -qq -y install collabora-obs-archive-keyring
26 else # BUILD_KERNEL=true
26 else # BUILD_KERNEL=true
27 # Install APT sources.list
27 # Install APT sources.list
28 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
28 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
29
29
30 # Use specified APT server and release
30 # Use specified APT server and release
31 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
31 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
32 sed -i "s/ jessie/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
33 fi
34
35
36 # Use specified APT server and release
37 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
38
32
39 #Fix for changing path for security updates in testing
33 #Fix for changing path for security updates in testing
40 if [ "$RELEASE" = "testing" ] ; then
34 if [ "$RELEASE" = "testing" ] ; then
41 sed -i "s,buster\\/updates,testing-security," "${ETC_DIR}/apt/sources.list"
35 sed -i "s,buster\\/updates,testing-security," "${ETC_DIR}/apt/sources.list"
42 sed -i "s/ buster/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
36 sed -i "s/ buster/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
43 fi
37 fi
44
38
45 if [ -z "$RELEASE" ] ; then
39 if [ -z "$RELEASE" ] ; then
46 # Change release in sources list
40 # Change release in sources list
47 sed -i "s/ buster/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
41 sed -i "s/ buster/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
48 fi
42 fi
49
43
50 # Upgrade package index and update all installed packages and changed dependencies
44 # Upgrade package index and update all installed packages and changed dependencies
51 chroot_exec apt-get -qq -y update
45 chroot_exec apt-get -qq -y update
52 chroot_exec apt-get -qq -y -u dist-upgrade
46 chroot_exec apt-get -qq -y -u dist-upgrade
53
47
54 # Install additional packages
48 # Install additional packages
55 if [ "$APT_INCLUDES_LATE" ] ; then
49 if [ "$APT_INCLUDES_LATE" ] ; then
56 chroot_exec apt-get -qq -y install $(echo "$APT_INCLUDES_LATE" |tr , ' ')
50 chroot_exec apt-get -qq -y install $(echo "$APT_INCLUDES_LATE" |tr , ' ')
57 fi
51 fi
58
52
59 # Install Debian custom packages
53 # Install Debian custom packages
60 if [ -d packages ] ; then
54 if [ -d packages ] ; then
61 for package in packages/*.deb ; do
55 for package in packages/*.deb ; do
62 cp "$package" "${R}"/tmp
56 cp "$package" "${R}"/tmp
63 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
57 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
64 done
58 done
65 fi
59 fi
66
60
67 chroot_exec apt-get -qq -y -f install
61 chroot_exec apt-get -qq -y -f install
68
62
69 chroot_exec apt-get -qq -y check
63 chroot_exec apt-get -qq -y check
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant