aboutsummaryrefslogtreecommitdiffstats
path: root/main/debootstrap/init-freedom-668001.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/debootstrap/init-freedom-668001.patch')
-rw-r--r--main/debootstrap/init-freedom-668001.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/debootstrap/init-freedom-668001.patch b/main/debootstrap/init-freedom-668001.patch
new file mode 100644
index 0000000000..c9c9eaef65
--- /dev/null
+++ b/main/debootstrap/init-freedom-668001.patch
@@ -0,0 +1,40 @@
+Apply init freedom patch since Debian's maintainer is obstructing a bugfix to honor exclude directive and allow people to avoid having systemd at early stage, see bug 668001 in Debian
+--- a/debootstrap
++++ b/debootstrap
+@@ -51,7 +51,7 @@
+ DEF_MIRROR="http://httpredir.debian.org/debian"
+ DEF_HTTPS_MIRROR="https://mirrors.kernel.org/debian"
+
+-export LANG USE_COMPONENTS
++export LANG USE_COMPONENTS EXCLUDE
+ umask 022
+
+ ###########################################################################
+--- a/functions
++++ b/functions
+@@ -1181,6 +1181,8 @@
+ perl -e '
+ $prevpkg = "";
+ @d = ();
++my %exclude;
++$exclude{$_} = 1 for split(" ", $ENV{"EXCLUDE"});
+ while (<STDIN>) {
+ chomp;
+ if (/^Package: (.*)$/) {
+@@ -1197,9 +1199,13 @@
+ $in = 0 if (/^$/);
+ if ($in and (/^Depends: (.*)$/ or /^Pre-Depends: (.*)$/)) {
+ for $d (split /\s*,\s*/, $1) {
+- $d =~ s/\s*[|].*$//;
+- $d =~ s/\s*[(].*[)]\s*//;
+- push @d, $d;
++ for $p (split /\s*\|\s*/, $d) {
++ $p =~ s/\s*[(].*[)]\s*//;
++ if (!$exclude{$p}) {
++ push @d, $p;
++ last;
++ }
++ }
+ }
+ }
+ }