Merge pull request #330069 from rhelmot/freebsd-14.1

freebsd: 14.0 -> 14.1
This commit is contained in:
John Ericson 2024-07-28 23:24:38 -05:00 committed by GitHub
commit 18cb69fb9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 188 additions and 65 deletions

View File

@ -3,7 +3,7 @@
generateSplicesForMkScope,
callPackage,
attributePathToSplice ? [ "freebsd" ],
branch ? "release/14.0.0",
branch ? "release/14.1.0",
}:
let

View File

@ -0,0 +1,18 @@
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index 3757ed062ba5..584ada116386 100644
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -375,11 +375,8 @@ checkfs(const char *pvfstype, const char *spec, const char *mntpt,
_exit(0);
/* Go find an executable. */
- execvP(execbase, _PATH_SYSPATH, __DECONST(char * const *, argv));
- if (spec)
- warn("exec %s for %s in %s", execbase, spec, _PATH_SYSPATH);
- else
- warn("exec %s in %s", execbase, _PATH_SYSPATH);
+ execvp(execbase, __DECONST(char * const *, argv));
+ warn("exec %s not found", execbase);
_exit(1);
/* NOTREACHED */

View File

@ -17,12 +17,12 @@ index 2d3723b49f5b..6bbff732b9d7 100644
+++ b/lib/libc/locale/collate.h
@@ -36,6 +36,7 @@
#ifndef _COLLATE_H_
#define _COLLATE_H_
#define _COLLATE_H_
+#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <limits.h>
#include "xlocale_private.h"
diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c
index 44b7e3292eae..79c30b7cf372 100644
--- a/usr.bin/localedef/charmap.c

View File

@ -41,9 +41,12 @@ mkDerivation {
"sys/rpc/types.h"
]
++ lib.optionals (versionData.major == 14) [ "sys/sys/bitcount.h" ]
++ lib.optionals (versionData.major == 14) [
"sys/sys/bitcount.h"
"sys/sys/linker_set.h"
"sys/sys/module.h"
]
++ [
# Listed in Makekfile as INC
"include/mpool.h"
"include/ndbm.h"
@ -64,7 +67,7 @@ mkDerivation {
]
++ [
# Listed in Makekfile as SYSINC
# Listed in Makefile as SYSINCS
"sys/sys/capsicum.h"
"sys/sys/caprights.h"

View File

@ -1,6 +1,7 @@
{
lib,
mkDerivation,
versionData,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
@ -17,7 +18,7 @@ mkDerivation {
extraPaths = [
"lib/Makefile.inc"
"lib/libc/include/libc_private.h"
];
] ++ lib.optionals (versionData.major == 14) [ "sys/sys/param.h" ];
nativeBuildInputs = [
bsdSetupHook
freebsdSetupHook

View File

@ -1,5 +1,7 @@
{ mkDerivation }:
{ lib, mkDerivation }:
mkDerivation {
path = "sbin/fsck";
extraPaths = [ "sbin/mount" ];
meta.platforms = lib.platforms.freebsd;
}

View File

@ -0,0 +1,13 @@
{
lib,
mkDerivation,
libufs,
}:
mkDerivation {
path = "sbin/fsck_ffs";
extraPaths = [ "sbin/mount" ];
buildInputs = [ libufs ];
meta.platforms = lib.platforms.freebsd;
}

View File

@ -0,0 +1,10 @@
{ lib, mkDerivation }:
mkDerivation {
path = "sbin/fsck_msdosfs";
extraPaths = [
"sbin/mount"
"sbin/fsck"
];
meta.platforms = lib.platforms.freebsd;
}

View File

@ -0,0 +1,15 @@
{
mkDerivation,
libelf,
compatIfNeeded,
}:
mkDerivation {
path = "usr.sbin/kldxref";
buildInputs = [ libelf ] ++ compatIfNeeded;
# We symlink in our modules, make it follow symlinks
postPatch = ''
sed -i 's/FTS_PHYSICAL/FTS_LOGICAL/' $BSDSRCDIR/usr.sbin/kldxref/kldxref.c
'';
}

View File

@ -187,7 +187,7 @@ mkDerivation {
find . \( -type f -o -type l \) -exec cp -pr \{} $out/\{} \;
popd
mkdir $BSDSRCDIR/lib/libcompiler_rt/i386
mkdir $BSDSRCDIR/lib/libcompiler_rt/i386 $BSDSRCDIR/lib/libcompiler_rt/cpu_model
make -C $BSDSRCDIR/lib/libcompiler_rt $makeFlags
make -C $BSDSRCDIR/lib/libcompiler_rt $makeFlags install
@ -195,7 +195,7 @@ mkDerivation {
make -C $BSDSRCDIR/lib/libgcc_eh $makeFlags install
ln -s $BSDSRCDIR/lib/libc/libc.so.7 $BSDSRCDIR/lib/libc/libc.so # not sure
mkdir $BSDSRCDIR/lib/libgcc_s/i386
mkdir $BSDSRCDIR/lib/libgcc_s/i386 $BSDSRCDIR/lib/libgcc_s/cpu_model
make -C $BSDSRCDIR/lib/libgcc_s $makeFlags
make -C $BSDSRCDIR/lib/libgcc_s $makeFlags install

View File

@ -1,6 +1,6 @@
{
stdenv,
mkDerivation,
lib,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
@ -16,7 +16,6 @@ mkDerivation {
"sys/sys/elf64.h"
"sys/sys/elf_common.h"
];
buildInputs = [ ];
nativeBuildInputs = [
bsdSetupHook
freebsdSetupHook
@ -25,5 +24,5 @@ mkDerivation {
m4
];
meta.platforms = lib.platforms.freebsd;
BOOTSTRAPPING = !stdenv.hostPlatform.isFreeBSD;
}

View File

@ -1,8 +1,8 @@
{
lib,
mkDerivation,
libutil,
libxo,
...
}:
mkDerivation {
path = "sbin/mount";
@ -10,4 +10,6 @@ mkDerivation {
libutil
libxo
];
meta.platforms = lib.platforms.freebsd;
}

View File

@ -1,6 +1,12 @@
{ mkDerivation, libkiconv }:
{
lib,
mkDerivation,
libkiconv,
}:
mkDerivation {
path = "sbin/mount_msdosfs";
extraPaths = [ "sbin/mount" ];
buildInputs = [ libkiconv ];
meta.platforms = lib.platforms.freebsd;
}

View File

@ -9,6 +9,7 @@
id,
protect,
mount,
fsck,
}:
let
rcDepsPath = lib.makeBinPath [
@ -20,16 +21,24 @@ let
id
mount
protect
fsck
];
in
mkDerivation {
path = "libexec/rc";
MK_TESTS = "no";
outputs = [
"out"
"services"
];
postPatch =
''
substituteInPlace "$BSDSRCDIR/libexec/rc/rc.d/Makefile" "$BSDSRCDIR/libexec/rc/Makefile" --replace-fail /etc $out/etc
substituteInPlace "$BSDSRCDIR/libexec/rc/rc.d/Makefile" --replace-fail /var $out/var
substituteInPlace "$BSDSRCDIR/libexec/rc/Makefile" --replace-fail /etc $out/etc
substituteInPlace "$BSDSRCDIR/libexec/rc/rc.d/Makefile" \
--replace-fail /etc $services/etc \
--replace-fail /var $services/var
''
+ (
let

View File

@ -21,6 +21,7 @@ mkDerivation {
"lib/libc"
"lib/liblua"
"libexec/flua"
"lib/flua"
"stand"
"sys"
];

View File

@ -21,6 +21,7 @@
file2c,
bintrans,
xargs-j,
kldxref,
}:
let
hostArchBsd = freebsd-lib.mkBsdArch stdenv;
@ -83,6 +84,7 @@ mkDerivation rec {
file2c
bintrans
xargs-j
kldxref
];
# --dynamic-linker /red/herring is used when building the kernel.
@ -98,7 +100,10 @@ mkDerivation rec {
];
# hardeningDisable = stackprotector doesn't seem to be enough, put it in cflags too
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
NIX_CFLAGS_COMPILE = [
"-fno-stack-protector"
"-Wno-unneeded-internal-declaration" # some openzfs code trips this
];
inherit env;
passthru.env = env;

View File

@ -1,15 +1,15 @@
{
"main": {
"hash": "sha256-3aUsD2yRqVvb12z2XPmhE5/u4d9bqyD2ZHH3xNmwYwU=",
"hash": "sha256-jQpuNjo7n5b4yXGgXR9ggTkrb4r4pFPXdunBipetw+c=",
"ref": "main",
"refType": "branch",
"rev": "aa34b1d20e44141749ffdecf16908fc1e5db4db6",
"rev": "82283cad12a417abfb1469d899b2d7cfb1d38f77",
"supported": false,
"version": {
"branch": "CURRENT",
"major": 15,
"minor": 0,
"reldate": "1500018",
"reldate": "1500021",
"release": "15.0-CURRENT",
"revision": "15.0",
"type": "FreeBSD",
@ -106,6 +106,24 @@
"version": "FreeBSD 14.0-RELEASE"
}
},
"release/14.1.0": {
"hash": "sha256-k4Bs5zR17wHPYrL04aUyPswYGdCWVcRYZOTCDp2VTfk=",
"ref": "release/14.1.0",
"refType": "tag",
"rev": "10e31f0946d820d53adc58b7d013b969e4a9a8ed",
"supported": false,
"version": {
"branch": "RELEASE",
"major": 14,
"minor": 1,
"patch": 0,
"reldate": "1401000",
"release": "14.1-RELEASE",
"revision": "14.1",
"type": "FreeBSD",
"version": "FreeBSD 14.1-RELEASE"
}
},
"releng/13.0": {
"hash": "sha256-7PrqTb2o21IQgQ2N+zjavlzX/ju60Rw+MXjMRICmQi0=",
"ref": "releng/13.0",
@ -143,91 +161,109 @@
}
},
"releng/13.2": {
"hash": "sha256-KN508aIe02Ue4TjlonO6TmAQ7DmiOOSOYrZfg5HP9AM=",
"hash": "sha256-1awVV7Zm3GfgZvefoLKrKhIOu1559mBCakmRo+oVAGA=",
"ref": "releng/13.2",
"refType": "branch",
"rev": "f5ac4e174fdd3497749e351c27aafb34171c5730",
"supported": true,
"rev": "f0cf0b8266eef39b13917f7bed808daf6d6a2d3e",
"supported": false,
"version": {
"branch": "RELEASE-p11",
"branch": "RELEASE-p12",
"major": 13,
"minor": 2,
"patch": "11",
"patch": "12",
"reldate": "1302001",
"release": "13.2-RELEASE-p11",
"release": "13.2-RELEASE-p12",
"revision": "13.2",
"type": "FreeBSD",
"version": "FreeBSD 13.2-RELEASE-p11"
"version": "FreeBSD 13.2-RELEASE-p12"
}
},
"releng/13.3": {
"hash": "sha256-g3i9q9XihesdfQxGy3oC7IMGtbWaLNwFlNzbdvS/4ng=",
"hash": "sha256-jvXIrlNmaGe4gyYCK/3wjm9JWBQOU0sD1LPxWykNddI=",
"ref": "releng/13.3",
"refType": "branch",
"rev": "be4f1894ef399f421bab451e8cf8557e27e5a948",
"rev": "deb948cd8dc2efb341ce96e1b7a56c9fbc662ba1",
"supported": true,
"version": {
"branch": "RELEASE-p2",
"branch": "RELEASE-p4",
"major": 13,
"minor": 3,
"patch": "2",
"patch": "4",
"reldate": "1303001",
"release": "13.3-RELEASE-p2",
"release": "13.3-RELEASE-p4",
"revision": "13.3",
"type": "FreeBSD",
"version": "FreeBSD 13.3-RELEASE-p2"
"version": "FreeBSD 13.3-RELEASE-p4"
}
},
"releng/14.0": {
"hash": "sha256-15B9Nglshniokju88dEKj3BIffZ6L28L+ZuhAC3UqOI=",
"hash": "sha256-kQ3r/bnBiOZ6kpnouFLKWdpSiJe3FGWJ/XA6VRNFzEc=",
"ref": "releng/14.0",
"refType": "branch",
"rev": "d338712beb16ad7740bbd00bd93299a131a68045",
"rev": "5e23806790ef4825ac09b458d3df941748599fbb",
"supported": true,
"version": {
"branch": "RELEASE-p6",
"branch": "RELEASE-p8",
"major": 14,
"minor": 0,
"patch": "6",
"patch": "8",
"reldate": "1400097",
"release": "14.0-RELEASE-p6",
"release": "14.0-RELEASE-p8",
"revision": "14.0",
"type": "FreeBSD",
"version": "FreeBSD 14.0-RELEASE-p6"
"version": "FreeBSD 14.0-RELEASE-p8"
}
},
"releng/14.1": {
"hash": "sha256-rURDGcnMzUhz2I873d5ro+wGY+i8IOmiPJ5T+w4TcPA=",
"ref": "releng/14.1",
"refType": "branch",
"rev": "dcdea9e8623e83e3aef15fff0d6ead05382ad138",
"supported": true,
"version": {
"branch": "RELEASE-p2",
"major": 14,
"minor": 1,
"patch": "2",
"reldate": "1401000",
"release": "14.1-RELEASE-p2",
"revision": "14.1",
"type": "FreeBSD",
"version": "FreeBSD 14.1-RELEASE-p2"
}
},
"stable/13": {
"hash": "sha256-ItC8haDdxMSZt1thpCrn8p0xxvs7Uqh/uNo1OwMalj8=",
"hash": "sha256-kbz6dpkCVYrTcPNJtKvX0TVQ4qULaOJ/WzCeQ4MYrFU=",
"ref": "stable/13",
"refType": "branch",
"rev": "825cb4c850f2b97cfd1b24ed421d7938bf37eee7",
"supported": true,
"version": {
"branch": "STABLE",
"major": 13,
"minor": 3,
"reldate": "1303503",
"release": "13.3-STABLE",
"revision": "13.3",
"type": "FreeBSD",
"version": "FreeBSD 13.3-STABLE"
}
},
"stable/14": {
"hash": "sha256-iAj75IXJi4Oium6BqFvsyQipDP2crBZIGg0Dac8Zf1g=",
"ref": "stable/14",
"refType": "branch",
"rev": "a3b8266f5420601e231bc08c5402d9a4929fbdc0",
"rev": "8d87e47b8d1093a264ca954620b9e58b81fb9b34",
"supported": true,
"version": {
"branch": "PRERELEASE",
"major": 13,
"minor": 4,
"reldate": "1303503",
"release": "13.4-PRERELEASE",
"revision": "13.4",
"type": "FreeBSD",
"version": "FreeBSD 13.4-PRERELEASE"
}
},
"stable/14": {
"hash": "sha256-ImSKU2m2Ecss1A4uTGvh0Z4ZyhN2jem0If9jlan9tM0=",
"ref": "stable/14",
"refType": "branch",
"rev": "2c75d993783ca4b0d1bf8dcdf424643781326e4b",
"supported": true,
"version": {
"branch": "STABLE",
"major": 14,
"minor": 1,
"reldate": "1400511",
"release": "14.1-PRERELEASE",
"reldate": "1401501",
"release": "14.1-STABLE",
"revision": "14.1",
"type": "FreeBSD",
"version": "FreeBSD 14.1-PRERELEASE"
"version": "FreeBSD 14.1-STABLE"
}
}
}

View File

@ -21,7 +21,7 @@ let
mkExtraBuildCommands0 = cc: ''
rsrc="$out/resource-root"
mkdir "$rsrc"
ln -s "${lib.getLib cc}/lib/clang/16/include" "$rsrc"
ln -s "${lib.getLib cc}/lib/clang/${lib.versions.major cc.version}/include" "$rsrc"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'';
mkExtraBuildCommands =
@ -87,7 +87,8 @@ let
"bin/clang++"
"bin/cpp"
];
version = "16";
# SYNCME: this version number must be synced with the one in make-bootstrap-tools.nix
version = "18";
};
libunwind = linkBootstrap {
name = "libunwind";

View File

@ -48,6 +48,8 @@
'';
bootstrap-tools = tar-all "bootstrap-tools.tar.xz" (
with pkgs;
# SYNCME: this version number must be synced with the one in default.nix
let llvmPackages = llvmPackages_18; in
[
(runCommand "bsdcp" { } "mkdir -p $out/bin; cp ${freebsd.cp}/bin/cp $out/bin/bsdcp")
coreutils

View File

@ -15974,7 +15974,7 @@ with pkgs;
# assumption is that or any later version is good.
choose = platform:
/**/ if platform.isDarwin then 16
else if platform.isFreeBSD then 16
else if platform.isFreeBSD then 18
else if platform.isOpenBSD then 18
else if platform.isAndroid then 12
else if platform.isLinux then 18