Skip to content

Commit 093cd72

Browse files
authored
add terminfo-db to FreeBSD package requirements (#7588)
* add terminfo-db to FreeBSD package requirements * runtime can use terminfo under FreeBSD but only with this additional package * from feedback: dotnet/runtime#55152 (comment) * fix typo, bump FreeBSD12, remove lttng-ust from it lttng-ust removable depends on dotnet/runtime#56435 merge * lttng-ust needs to stay * add FreeBSD13, add support for FreeBSD ABI also: use -j $JOBS during build while we are here
1 parent ce7357e commit 093cd72

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

eng/common/cross/build-rootfs.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ usage()
77
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
88
echo "BuildArch can be: arm(default), armel, arm64, x86"
99
echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
10-
echo " for FreeBSD can be: freebsd11 or freebsd12."
10+
echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13"
1111
echo " for illumos can be: illumos."
12-
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD"
12+
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
1313
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
1414
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
1515
exit 1
@@ -60,13 +60,15 @@ __AlpinePackages+=" krb5-dev"
6060
__AlpinePackages+=" openssl-dev"
6161
__AlpinePackages+=" zlib-dev"
6262

63-
__FreeBSDBase="12.1-RELEASE"
63+
__FreeBSDBase="12.2-RELEASE"
6464
__FreeBSDPkg="1.12.0"
65+
__FreeBSDABI="12"
6566
__FreeBSDPackages="libunwind"
6667
__FreeBSDPackages+=" icu"
6768
__FreeBSDPackages+=" libinotify"
6869
__FreeBSDPackages+=" lttng-ust"
6970
__FreeBSDPackages+=" krb5"
71+
__FreeBSDPackages+=" terminfo-db"
7072

7173
__IllumosPackages="icu-64.2nb2"
7274
__IllumosPackages+=" mit-krb5-1.16.2nb4"
@@ -208,12 +210,20 @@ while :; do
208210
;;
209211
freebsd11)
210212
__FreeBSDBase="11.3-RELEASE"
213+
__FreeBSDABI="11"
211214
;&
212215
freebsd12)
213216
__CodeName=freebsd
214217
__BuildArch=x64
215218
__SkipUnmount=1
216219
;;
220+
freebsd13)
221+
__CodeName=freebsd
222+
__FreeBSDBase="13.0-RELEASE"
223+
__FreeBSDABI="13"
224+
__BuildArch=x64
225+
__SkipUnmount=1
226+
;;
217227
illumos)
218228
__CodeName=illumos
219229
__BuildArch=x64
@@ -291,17 +301,17 @@ if [[ "$__CodeName" == "alpine" ]]; then
291301
rm -r $__ApkToolsDir
292302
elif [[ "$__CodeName" == "freebsd" ]]; then
293303
mkdir -p $__RootfsDir/usr/local/etc
304+
JOBS="$(getconf _NPROCESSORS_ONLN)"
294305
wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
295-
# For now, ask for 11 ABI even on 12. This can be revisited later.
296-
echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
306+
echo "ABI = \"FreeBSD:${__FreeBSDABI}:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
297307
echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf
298308
mkdir -p $__RootfsDir/tmp
299309
# get and build package manager
300310
wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf -
301311
cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
302312
# needed for install to succeed
303313
mkdir -p $__RootfsDir/host/etc
304-
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install
314+
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make -j "$JOBS" && make install
305315
rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
306316
# install packages we need.
307317
INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update

0 commit comments

Comments
 (0)