summaryrefslogtreecommitdiff
path: root/libre/debootstrap/trisquel
diff options
context:
space:
mode:
Diffstat (limited to 'libre/debootstrap/trisquel')
-rw-r--r--libre/debootstrap/trisquel84
1 files changed, 26 insertions, 58 deletions
diff --git a/libre/debootstrap/trisquel b/libre/debootstrap/trisquel
index e98f94177..b3d9bdcc7 100644
--- a/libre/debootstrap/trisquel
+++ b/libre/debootstrap/trisquel
@@ -18,29 +18,22 @@ fi
case $ARCH in
alpha|ia64) LIBC="libc6.1" ;;
- kfreebsd-*) LIBC="libc0.1" ;;
- hurd-*) LIBC="libc0.3" ;;
*) LIBC="libc6" ;;
esac
work_out_debs () {
required="$(get_debs Priority: required)"
- if doing_variant - || doing_variant fakechroot; then
+ if doing_variant -; then
#required="$required $(get_debs Priority: important)"
# ^^ should be getting debconf here somehow maybe
base="$(get_debs Priority: important)"
elif doing_variant buildd; then
- base="apt build-essential"
- elif doing_variant minbase; then
+ base="$(get_debs Build-Essential: yes)"
+ elif doing_variant fakechroot || doing_variant minbase; then
base="apt"
fi
- if doing_variant fakechroot; then
- # ldd.fake needs binutils
- required="$required binutils"
- fi
-
case $MIRRORS in
https://*)
base="$base apt-transport-https ca-certificates"
@@ -49,18 +42,6 @@ work_out_debs () {
}
first_stage_install () {
- case "$CODENAME" in
- # "merged-usr" blacklist for past releases
- robur|dwyn|awen|taranis|slaine|dagda|brigantia|toutatis|belenos|flidas)
- [ -z "$MERGED_USR" ] && MERGED_USR="no"
- ;;
- *)
- # see https://bugs.debian.org/838388
- EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
- ;;
- esac
-
- setup_merged_usr
extract $required
mkdir -p "$TARGET/var/lib/dpkg"
@@ -75,34 +56,25 @@ first_stage_install () {
setup_devices
- if doing_variant fakechroot || [ "$CONTAINER" = "docker" ]; then
- setup_proc_symlink
- fi
-}
-
-second_stage_install () {
- in_target /bin/true
-
- setup_dynamic_devices
-
x_feign_install () {
local pkg="$1"
local deb="$(debfor $pkg)"
- local ver="$(in_target dpkg-deb -f "$deb" Version)"
+ local ver="$(extract_deb_field "$TARGET/$deb" Version)"
mkdir -p "$TARGET/var/lib/dpkg/info"
echo \
"Package: $pkg
Version: $ver
-Maintainer: unknown
Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
}
x_feign_install dpkg
+}
+second_stage_install () {
x_core_install () {
smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
}
@@ -111,7 +83,9 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
baseprog="$(($baseprog + ${1:-1}))"
}
- if ! doing_variant fakechroot; then
+ if doing_variant fakechroot; then
+ setup_proc_fakechroot
+ else
setup_proc
in_target /sbin/ldconfig
fi
@@ -134,7 +108,7 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
x_core_install dpkg
if [ ! -e "$TARGET/etc/localtime" ]; then
- ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime"
fi
if doing_variant fakechroot; then
@@ -161,19 +135,16 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
info UNPACKREQ "Unpacking required packages..."
- exec 7>&1
-
smallyes '' |
(repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \
- dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
- dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
+ dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1
info CONFREQ "Configuring required packages..."
- if doing_variant fakechroot && [ -e "$TARGET/var/lib/dpkg/info/initscripts.postinst" ]
- then
- # fix initscripts postinst (no mounting possible, and wrong if condition)
- sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' "$TARGET/var/lib/dpkg/info/initscripts.postinst"
+ if doing_variant fakechroot; then
+ # fix initscripts postinst (no mounting possible, and wrong if condition)
+ sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' "$TARGET/var/lib/dpkg/info/initscripts.postinst"
fi
echo \
@@ -202,8 +173,8 @@ echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
smallyes '' |
(in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \
- dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) |
- dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING
+ dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1
baseprog=0
bases="$(set -- $base; echo $#)"
@@ -224,24 +195,21 @@ echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
done_predeps="$done_predeps $predep"
done
- if [ -n "$base" ]; then
- smallyes '' |
- (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
- dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
- dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING
+ smallyes '' |
+ (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
+ dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1
- info CONFBASE "Configuring the base system..."
+ info CONFBASE "Configuring the base system..."
- smallyes '' |
- (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \
- dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
- dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING
- fi
+ smallyes '' |
+ (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \
+ dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1
if [ -x "$TARGET/sbin/initctl.REAL" ]; then
mv "$TARGET/sbin/initctl.REAL" "$TARGET/sbin/initctl"
fi
-
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
rm -f "$TARGET/usr/sbin/policy-rc.d"