1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00
Files
ports/sysutils/debootstrap/files/patch-scripts_debian-common
Petteri Valkonen 100487855b sysutils/debootstrap: Update to 1.0.128+nmu2+deb12u2
- This version fixes a problem where debootstrap would fail to
  install the previously removed usr-is-merged package on
  Trixie/Sid: E: Couldn't find these debs: usr-is-merged
- Depend on devel/pcre2 instead of devel/pcre:
  - devel/pcre doesn't support the E switch.
  - devel/pcre is EOLed by upstream.
- Fix "Failed to take /etc/passwd lock: Invalid argument" error.
- Pet portfmt.

PR:                 289349
Approved by:        nc@ (maintainer-timeout)
2026-01-10 18:53:45 -04:00

41 lines
1.7 KiB
Plaintext

--- scripts/debian-common.orig 2025-08-27 14:48:00 UTC
+++ scripts/debian-common
@@ -220,10 +220,24 @@ echo \"Warning: Fake start-stop-daemon called, doing n
predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps")
# XXX: progress is tricky due to how dpkg_progress works
# -- cjwatson 2009-07-29
+ # This step sometimes fails due to some missing functionality in Linuxulator. Just ignore it.
+ set +e
p; smallyes '' |
in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep)
+ rc=$?
base=$(without "$base" "$predep")
done_predeps="$done_predeps $predep"
+
+ if [ $rc != 0 ]; then
+ warning FREEBSD_00 "Applying FreeBSD-specific workaround..."
+ # ... for "Failed to mount /etc/machine-id: Bad address" with Focal.
+ in_target truncate -s0 /var/lib/dpkg/info/systemd.postinst
+ # Fix "Failed to take /etc/passwd lock: Invalid argument" error
+ # See: https://github.com/microsoft/WSL/issues/10397#issuecomment-1780132430
+ in_target ln -sf /bin/echo /bin/systemd-sysusers
+ in_target dpkg --configure systemd
+ fi
+ set -e
done
if [ -n "$base" ]; then
@@ -242,6 +256,12 @@ echo \"Warning: Fake start-stop-daemon called, doing n
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
rm -f "$TARGET/usr/sbin/policy-rc.d"
+
+ echo \
+"# Workaround for Linuxulator missing mremap(2) support; without it,
+# apt(8) fails like this:
+# E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start.
+APT::Cache-Start 251658240;" >> "$TARGET/etc/apt/apt.conf.d/00freebsd"
progress $bases $bases CONFBASE "Configuring base system"
info BASESUCCESS "Base system installed successfully."