shadow: add runtime-shell.patch

This gets the right shell in the closure.

By default, shadow wants to pull in the bash we are building it with,
while we would prefer it used the runtime bash.

authored by Matthew Bauer and committed by Milan fbb26ab5 9e4a925c

+19 -1
+6 -1
pkgs/os-specific/linux/shadow/default.nix
··· 1 { lib, stdenv, nixosTests, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt 2 - , libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison 3 , pam ? null, glibcCross ? null 4 }: 5 ··· 38 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 39 ./respect-xml-catalog-files-var.patch 40 dots_in_usernames 41 ]; 42 43 # The nix daemon often forbids even creating set[ug]id files. 44 postPatch = 45 ''sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am ··· 76 mkdir -p $su/bin 77 mv $out/bin/su $su/bin 78 ''; 79 80 meta = with lib; { 81 homepage = "https://github.com/shadow-maint";
··· 1 { lib, stdenv, nixosTests, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt 2 + , libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison, runtimeShell 3 , pam ? null, glibcCross ? null 4 }: 5 ··· 38 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 39 ./respect-xml-catalog-files-var.patch 40 dots_in_usernames 41 + ./runtime-shell.patch 42 ]; 43 44 + RUNTIME_SHELL = runtimeShell; 45 + 46 # The nix daemon often forbids even creating set[ug]id files. 47 postPatch = 48 ''sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am ··· 79 mkdir -p $su/bin 80 mv $out/bin/su $su/bin 81 ''; 82 + 83 + disallowedReferences = lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) stdenv.shellPackage; 84 85 meta = with lib; { 86 homepage = "https://github.com/shadow-maint";
+13
pkgs/os-specific/linux/shadow/runtime-shell.patch
···
··· 1 + diff --git a/configure.ac b/configure.ac 2 + index e4c6aaec..03883ad7 100644 3 + --- a/configure.ac 4 + +++ b/configure.ac 5 + @@ -682,7 +682,7 @@ if test "$enable_utmpx" = "yes"; then 6 + [Define if utmpx should be used]) 7 + fi 8 + 9 + -AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.]) 10 + +AC_DEFINE_UNQUOTED(SHELL, ["$RUNTIME_SHELL"], [The runtime shell.]) 11 + 12 + AM_GNU_GETTEXT_VERSION(0.16) 13 + AM_GNU_GETTEXT([external], [need-ngettext])