From 43cd431b443c2df4b1be9247083a2bcb8d6540fd Mon Sep 17 00:00:00 2001 From: Tethys Svensson Date: Sun, 13 Sep 2020 12:33:47 +0200 Subject: [PATCH 1/2] fetchgitlab: Escape a few more characters in the revision --- pkgs/build-support/fetchgitlab/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix index f1850fbaa1ea..77512510a7c6 100644 --- a/pkgs/build-support/fetchgitlab/default.nix +++ b/pkgs/build-support/fetchgitlab/default.nix @@ -12,7 +12,7 @@ let ((optional (group != null) group) ++ [ owner repo ]); escapedSlug = replaceStrings ["." "/"] ["%2E" "%2F"] slug; - escapedRev = replaceStrings ["+"] ["%2B"] rev; + escapedRev = replaceStrings ["+" "%" "/"] ["%2B" "%25" "%2F"] rev; in fetchzip ({ From a9597f957371cd5b191f5e456f939dfb8cc94c2f Mon Sep 17 00:00:00 2001 From: Tethys Svensson Date: Sun, 13 Sep 2020 11:30:39 +0200 Subject: [PATCH 2/2] busybox: Use git to fetch debian.script from debian Debian has yanked the upstream tarball we use to get default.script. We could simply bump the version number to get the new tarball, but to avoid the problem in the future, we should instead fetch it from git. --- pkgs/os-specific/linux/busybox/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index 728d2d491187..599754129b43 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildPackages, fetchurl, fetchzip +{ stdenv, lib, buildPackages, fetchurl, fetchFromGitLab , enableStatic ? false , enableMinimal ? false # Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping: @@ -32,12 +32,18 @@ let CONFIG_FEATURE_WTMP n ''; - debianName = "busybox_1.30.1-5"; - debianTarball = fetchzip { - url = "http://deb.debian.org/debian/pool/main/b/busybox/${debianName}.debian.tar.xz"; - sha256 = "03m4rvs2pd0hj0mdkdm3r4m1gh0bgwr0cvnqds297xnkfi5s01nx"; + # The debian version lacks behind the upstream version and also contains + # a debian-specific suffix. We only fetch the debian repository to get the + # default.script + debianVersion = "1.30.1-6"; + debianSource = fetchFromGitLab { + domain = "salsa.debian.org"; + owner = "installer-team"; + repo = "busybox"; + rev = "debian/1%${debianVersion}"; + sha256 = "sha256-6r0RXtmqGXtJbvLSD1Ma1xpqR8oXL2bBKaUE/cSENL8="; }; - debianDispatcherScript = "${debianTarball}/tree/udhcpc/etc/udhcpc/default.script"; + debianDispatcherScript = "${debianSource}/debian/tree/udhcpc/etc/udhcpc/default.script"; outDispatchPath = "$out/default.script"; in