git: only hardcode path to ssh binary on full build

Requirement for #146702
This commit is contained in:
Sandro Jäckel 2022-03-30 01:14:27 +02:00
parent a459707011
commit cae8d1a2ed
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
4 changed files with 20 additions and 9 deletions

View file

@ -477,6 +477,15 @@
the FIDO security key middleware interface. the FIDO security key middleware interface.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<literal>git</literal> no longer hardcodes the path to
openssh ssh binary to reduce the amount of rebuilds. If you
are using git with ssh remotes and do not have a ssh binary in
your enviroment consider adding <literal>openssh</literal> to
it or switching to <literal>gitFull</literal>.
</para>
</listitem>
<listitem> <listitem>
<para> <para>
<literal>services.k3s.enable</literal> no longer implies <literal>services.k3s.enable</literal> no longer implies

View file

@ -154,6 +154,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- `openssh` has been update to 8.9p1, changing the FIDO security key middleware interface. - `openssh` has been update to 8.9p1, changing the FIDO security key middleware interface.
- `git` no longer hardcodes the path to openssh' ssh binary to reduce the amount of rebuilds. If you are using git with ssh remotes and do not have a ssh binary in your enviroment consider adding `openssh` to it or switching to `gitFull`.
- `services.k3s.enable` no longer implies `systemd.enableUnifiedCgroupHierarchy = false`, and will default to the 'systemd' cgroup driver when using `services.k3s.docker = true`. - `services.k3s.enable` no longer implies `systemd.enableUnifiedCgroupHierarchy = false`, and will default to the 'systemd' cgroup driver when using `services.k3s.docker = true`.
This change may require a reboot to take effect, and k3s may not be able to run if the boot cgroup hierarchy does not match its configuration. This change may require a reboot to take effect, and k3s may not be able to run if the boot cgroup hierarchy does not match its configuration.
The previous behavior may be retained by explicitly setting `systemd.enableUnifiedCgroupHierarchy = false` in your configuration. The previous behavior may be retained by explicitly setting `systemd.enableUnifiedCgroupHierarchy = false` in your configuration.

View file

@ -18,6 +18,7 @@
, withLibsecret ? false , withLibsecret ? false
, pkg-config, glib, libsecret , pkg-config, glib, libsecret
, gzip # needed at runtime by gitweb.cgi , gzip # needed at runtime by gitweb.cgi
, withSsh ? false
}: }:
assert osxkeychainSupport -> stdenv.isDarwin; assert osxkeychainSupport -> stdenv.isDarwin;
@ -27,7 +28,6 @@ assert svnSupport -> perlSupport;
let let
version = "2.35.1"; version = "2.35.1";
svn = subversionClient.override { perlBindings = perlSupport; }; svn = subversionClient.override { perlBindings = perlSupport; };
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
in in
@ -49,28 +49,27 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
## Patch
patches = [ patches = [
./docbook2texi.patch ./docbook2texi.patch
./git-sh-i18n.patch ./git-sh-i18n.patch
./ssh-path.patch
./git-send-email-honor-PATH.patch ./git-send-email-honor-PATH.patch
./installCheck-path.patch ./installCheck-path.patch
] ++ lib.optionals withSsh [
./ssh-path.patch
]; ];
postPatch = '' postPatch = ''
for x in connect.c git-gui/lib/remote_add.tcl ; do
substituteInPlace "$x" \
--subst-var-by ssh "${openssh}/bin/ssh"
done
# Fix references to gettext introduced by ./git-sh-i18n.patch # Fix references to gettext introduced by ./git-sh-i18n.patch
substituteInPlace git-sh-i18n.sh \ substituteInPlace git-sh-i18n.sh \
--subst-var-by gettext ${gettext} --subst-var-by gettext ${gettext}
# ensure we are using the correct shell when executing the test scripts # ensure we are using the correct shell when executing the test scripts
patchShebangs t/*.sh patchShebangs t/*.sh
'' + lib.optionalString withSsh ''
for x in connect.c git-gui/lib/remote_add.tcl ; do
substituteInPlace "$x" \
--subst-var-by ssh "${openssh}/bin/ssh"
done
''; '';
nativeBuildInputs = [ gettext perlPackages.perl makeWrapper ] nativeBuildInputs = [ gettext perlPackages.perl makeWrapper ]

View file

@ -26150,6 +26150,7 @@ with pkgs;
svnSupport = true; svnSupport = true;
guiSupport = true; guiSupport = true;
sendEmailSupport = true; sendEmailSupport = true;
withSsh = true;
withLibsecret = !stdenv.isDarwin; withLibsecret = !stdenv.isDarwin;
}; };