···236236237237### Staging branch {#submitting-changes-staging-branch}
238238239239-The `staging` branch is a development branch where mass-rebuilds go. It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
239239+The `staging` branch is a development branch where mass-rebuilds go. Mass rebuilds are commits that cause rebuilds for many packages, like more than 500 (or perhaps, if it's 'light' packages, 1000). It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
240240241241### Staging-next branch {#submitting-changes-staging-next-branch}
242242
···679679 </listitem>
680680 <listitem>
681681 <para>
682682+ <literal>openldap</literal> (and therefore the slapd LDAP
683683+ server) were updated to version 2.6.2. The project introduced
684684+ backwards-incompatible changes, namely the removal of the bdb,
685685+ hdb, ndb, and shell backends in slapd. Therefore before
686686+ updating, dump your database <literal>slapcat -n 1</literal>
687687+ in LDIF format, and reimport it after updating your
688688+ <literal>services.openldap.settings</literal>, which
689689+ represents your <literal>cn=config</literal>.
690690+ </para>
691691+ </listitem>
692692+ <listitem>
693693+ <para>
682694 <literal>openssh</literal> has been update to 8.9p1, changing
683695 the FIDO security key middleware interface.
684696 </para>
+2
nixos/doc/manual/release-notes/rl-2205.section.md
···240240241241- In the ncdns module, the default value of `services.ncdns.address` has been changed to the IPv6 loopback address (`::1`).
242242243243+- `openldap` (and therefore the slapd LDAP server) were updated to version 2.6.2. The project introduced backwards-incompatible changes, namely the removal of the bdb, hdb, ndb, and shell backends in slapd. Therefore before updating, dump your database `slapcat -n 1` in LDIF format, and reimport it after updating your `services.openldap.settings`, which represents your `cn=config`.
244244+243245- `openssh` has been update to 8.9p1, changing the FIDO security key middleware interface.
244246245247- `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`.
···2233stdenv.mkDerivation rec {
44 pname = "lean";
55- version = "3.42.0";
55+ version = "3.43.0";
6677 src = fetchFromGitHub {
88 owner = "leanprover-community";
···1111 # from. this is then used to check whether an olean file should be
1212 # rebuilt. don't use a tag as rev because this will get replaced into
1313 # src/githash.h.in in preConfigure.
1414- rev = "b35d4695da88139a9168f2ad7acf0782e66dc4f0";
1515- sha256 = "02rpigw6lnyjw8ccrlp2mcvswawkhl5y6kqa3zq76qp1fdjqjrbp";
1414+ rev = "bfce34363b0efe86e93e3fe75de76ab3740c772d";
1515+ sha256 = "100mb003zkgrv1wd2agbk41aipk3j78k8zcjbj7pv9ixh02c7ss8";
1616 };
17171818 nativeBuildInputs = [ cmake ];
···99 version ? package.version,
1010 }: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
1111 if output=$(${command} 2>&1); then
1212- grep -Fw "${version}" - <<< "$output"
1313- touch $out
1212+ if grep -Fw "${version}" - <<< "$output"; then
1313+ touch $out
1414+ else
1515+ echo "Version string '${version}' not found!" >&2
1616+ echo "The output was:" >&2
1717+ echo "$output" >&2
1818+ exit 1
1919+ fi
1420 else
1515- echo "$output" >&2 && exit 1
2121+ echo -n ${lib.escapeShellArg command} >&2
2222+ echo " returned a non-zero exit code." >&2
2323+ echo "$output" >&2
2424+ exit 1
1625 fi
1726 '';
1827
+13-3
pkgs/development/compilers/go/1.17.nix
···1818, buildPackages
1919, pkgsBuildTarget
2020, callPackage
2121+, threadsCross ? null # for MinGW
2122}:
2323+2424+# threadsCross is just for MinGW
2525+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
22262327let
2428 go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
···5054 # We need a target compiler which is still runnable at build time,
5155 # to handle the cross-building case where build != host == target
5256 targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
5757+5858+ isCross = stdenv.buildPlatform != stdenv.targetPlatform;
5359in
54605561stdenv.mkDerivation rec {
···7076 propagatedBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
71777278 depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ];
7979+8080+ depsBuildTarget = lib.optional isCross targetCC;
8181+8282+ depsTargetTarget = lib.optional (threadsCross != null) threadsCross;
73837484 hardeningDisable = [ "all" ];
7585···194204 # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
195205 # to be different from CC/CXX
196206 CC_FOR_TARGET =
197197- if (stdenv.buildPlatform != stdenv.targetPlatform) then
207207+ if isCross then
198208 "${targetCC}/bin/${targetCC.targetPrefix}cc"
199209 else
200210 null;
201211 CXX_FOR_TARGET =
202202- if (stdenv.buildPlatform != stdenv.targetPlatform) then
212212+ if isCross then
203213 "${targetCC}/bin/${targetCC.targetPrefix}c++"
204214 else
205215 null;
···223233224234 export PATH=$(pwd)/bin:$PATH
225235226226- ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) ''
236236+ ${lib.optionalString isCross ''
227237 # Independent from host/target, CC should produce code for the building system.
228238 # We only set it when cross-compiling.
229239 export CC=${buildPackages.stdenv.cc}/bin/cc
+13-3
pkgs/development/compilers/go/1.18.nix
···1818, buildPackages
1919, pkgsBuildTarget
2020, callPackage
2121+, threadsCross ? null # for MinGW
2122}:
2323+2424+# threadsCross is just for MinGW
2525+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
22262327let
2428 go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
···5054 # We need a target compiler which is still runnable at build time,
5155 # to handle the cross-building case where build != host == target
5256 targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
5757+5858+ isCross = stdenv.buildPlatform != stdenv.targetPlatform;
5359in
54605561stdenv.mkDerivation rec {
···7076 propagatedBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
71777278 depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ];
7979+8080+ depsBuildTarget = lib.optional isCross targetCC;
8181+8282+ depsTargetTarget = lib.optional (threadsCross != null) threadsCross;
73837484 hardeningDisable = [ "all" ];
7585···188198 # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
189199 # to be different from CC/CXX
190200 CC_FOR_TARGET =
191191- if (stdenv.buildPlatform != stdenv.targetPlatform) then
201201+ if isCross then
192202 "${targetCC}/bin/${targetCC.targetPrefix}cc"
193203 else
194204 null;
195205 CXX_FOR_TARGET =
196196- if (stdenv.buildPlatform != stdenv.targetPlatform) then
206206+ if isCross then
197207 "${targetCC}/bin/${targetCC.targetPrefix}c++"
198208 else
199209 null;
···217227218228 export PATH=$(pwd)/bin:$PATH
219229220220- ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) ''
230230+ ${lib.optionalString isCross ''
221231 # Independent from host/target, CC should produce code for the building system.
222232 # We only set it when cross-compiling.
223233 export CC=${buildPackages.stdenv.cc}/bin/cc
+71-51
pkgs/development/libraries/openldap/default.nix
···11-{ lib, stdenv, fetchurl, openssl, db, groff, libtool, libsodium
22-, withCyrusSasl ? true
11+{ lib
22+, stdenv
33+, fetchurl
44+55+# dependencies
36, cyrus_sasl
77+, db
88+, groff
99+, libsodium
1010+, libtool
1111+, openssl
1212+, systemdMinimal
413}:
514615stdenv.mkDerivation rec {
716 pname = "openldap";
88- version = "2.4.58";
1717+ version = "2.6.2";
9181019 src = fetchurl {
1120 url = "https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pname}-${version}.tgz";
1212- sha256 = "sha256-V7WSVL4V0L9qmrPVFMHAV3ewISMpFTMTSofJRGj49Hs=";
2121+ hash = "sha256-gdCTRSMutiSG7PWsrNLFbAxFtKbIwGZhLn9CGiOhz4c";
1322 };
14231524 # TODO: separate "out" and "bin"
1616- outputs = [ "out" "dev" "man" "devdoc" ];
2525+ outputs = [
2626+ "out"
2727+ "dev"
2828+ "man"
2929+ "devdoc"
3030+ ];
17311832 enableParallelBuilding = true;
19332020- nativeBuildInputs = [ groff ];
3434+ nativeBuildInputs = [
3535+ groff
3636+ ];
21372222- buildInputs = [ openssl cyrus_sasl db libsodium libtool ];
2323-2424- # Disable install stripping as it breaks cross-compiling.
2525- # We strip binaries anyway in fixupPhase.
2626- makeFlags= [
2727- "STRIP="
2828- "prefix=$(out)"
2929- "moduledir=$(out)/lib/modules"
3030- "CC=${stdenv.cc.targetPrefix}cc"
3838+ buildInputs = [
3939+ cyrus_sasl
4040+ db
4141+ libsodium
4242+ libtool
4343+ openssl
4444+ ] ++ lib.optionals (stdenv.isLinux) [
4545+ systemdMinimal
3146 ];
32473348 preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
···3550 '';
36513752 configureFlags = [
3838- "--enable-overlays"
3939- "--disable-dependency-tracking" # speeds up one-time build
4040- "--enable-modules"
4141- "--sysconfdir=/etc"
4242- "--localstatedir=/var"
5353+ "--enable-argon2"
4354 "--enable-crypt"
5555+ "--enable-modules"
5656+ "--enable-overlays"
4457 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
4558 "--with-yielding_select=yes"
4659 "ac_cv_func_memcmp_working=yes"
4747- ] ++ lib.optional (!withCyrusSasl) "--without-cyrus-sasl"
4848- ++ lib.optional stdenv.isFreeBSD "--with-pic";
6060+ ] ++ lib.optional stdenv.isFreeBSD "--with-pic";
6161+6262+ makeFlags= [
6363+ "CC=${stdenv.cc.targetPrefix}cc"
6464+ "STRIP=" # Disable install stripping as it breaks cross-compiling. We strip binaries anyway in fixupPhase.
6565+ "prefix=${placeholder "out"}"
6666+ "sysconfdir=${placeholder "out"}/etc"
6767+ "systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
6868+ # contrib modules require these
6969+ "moduledir=${placeholder "out"}/lib/modules"
7070+ "mandir=${placeholder "out"}/share/man"
7171+ ];
7272+7373+ extraContribModules = [
7474+ # https://git.openldap.org/openldap/openldap/-/tree/master/contrib/slapd-modules
7575+ "passwd/sha2"
7676+ "passwd/pbkdf2"
7777+ "passwd/totp"
7878+ ];
49795080 postBuild = ''
5151- make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/sha2
5252- make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/pbkdf2
5353- make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/argon2
8181+ for module in ${lib.concatStringsSep " " extraContribModules}; do
8282+ make $makeFlags CC=$CC -C contrib/slapd-modules/$module
8383+ done
5484 '';
55855656- doCheck = false; # needs a running LDAP server
8686+ preCheck = ''
8787+ substituteInPlace tests/scripts/all \
8888+ --replace "/bin/rm" "rm"
8989+ '';
57905858- installFlags = [
5959- "sysconfdir=$(out)/etc"
6060- "localstatedir=$(out)/var"
6161- "moduledir=$(out)/lib/modules"
6262- # The argon2 module hardcodes /usr/bin/install as the path for the
6363- # `install` binary, which is overridden here.
6464- "INSTALL=install"
6565- ];
9191+ doCheck = true;
66926767- # 1. Libraries left in the build location confuse `patchelf --shrink-rpath`
6868- # Delete these to let patchelf discover the right path instead.
6969- # FIXME: that one can be removed when https://github.com/NixOS/patchelf/pull/98
7070- # is in Nixpkgs patchelf.
7171- # 2. Fixup broken libtool for openssl and cyrus_sasl (if it is not disabled)
9393+ # The directory is empty and serve no purpose.
7294 preFixup = ''
7395 rm -r $out/var
7474- rm -r libraries/*/.libs
7575- rm -r contrib/slapd-modules/passwd/*/.libs
7676- for f in $out/lib/libldap.la $out/lib/libldap_r.la; do
7777- substituteInPlace "$f" --replace '-lssl' '-L${lib.getLib openssl}/lib -lssl'
7878- '' + lib.optionalString withCyrusSasl ''
7979- substituteInPlace "$f" --replace '-lsasl2' '-L${cyrus_sasl.out}/lib -lsasl2'
8080- '' + ''
8181- done
8296 '';
83979898+ installFlags = [
9999+ "prefix=${placeholder "out"}"
100100+ "moduledir=${placeholder "out"}/lib/modules"
101101+ "INSTALL=install"
102102+ ];
103103+84104 postInstall = ''
8585- make $installFlags install -C contrib/slapd-modules/passwd/sha2
8686- make $installFlags install -C contrib/slapd-modules/passwd/pbkdf2
8787- make $installFlags install-lib -C contrib/slapd-modules/passwd/argon2
105105+ for module in ${lib.concatStringsSep " " extraContribModules}; do
106106+ make $installFlags install -C contrib/slapd-modules/$module
107107+ done
88108 chmod +x "$out"/lib/*.{so,dylib}
89109 '';
90110···92112 homepage = "https://www.openldap.org/";
93113 description = "An open source implementation of the Lightweight Directory Access Protocol";
94114 license = licenses.openldap;
9595- maintainers = with maintainers; [ lovek323 ];
115115+ maintainers = with maintainers; [ ajs124 das_j hexa ];
96116 platforms = platforms.unix;
97117 };
98118}