build: the userland builds in a chroot on Makronix; release gains the userland step; set list, mxupgrade, installimage and pins follow

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
lotherkandClaude Sonnet 5.5 committed 2026-11-22 22:01:30 +00:00
1 parent 08f37a293b
commit ca01d56c9d
16 files changed
+2091 -1505

No files matched your search

+34 -20
View File
@@ -9,34 +9,43 @@
# ARCH is the name a person types (amd64, sparc64, evbarm); MACHINE is
# NetBSD's internal name for the same thing. When the host is NetBSD and ARCH
# is not given, the host decides; otherwise amd64.
#
# This file is NetBSD make (make(1), bmake on other systems; Konrad,
# 2026-11-19: "bmake natuerlich"). GNU make does not read it.
TOP := $(CURDIR)
TOP := ${.CURDIR}
SRC := $(TOP)/src
# X for the base, as NetBSD builds it (build.sh -x -X, src/BUILDING): imported
# like src/, its upstream commit in xsrc/BASE (Konrad, 2026-11-13).
XSRC := $(TOP)/xsrc
OBJ := $(TOP)/build/obj
JOBS ?= $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)
# sysctl(8) is in /sbin, which a non-login shell's PATH may lack.
.if !defined(JOBS)
JOBS != nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || \
/sbin/sysctl -n hw.ncpu 2>/dev/null || echo 2
.endif
ARCH ?= $(shell uname -m 2>/dev/null | sed -e 's/x86_64/amd64/' -e 's/aarch64/evbarm/' || echo amd64)
.if !defined(ARCH)
ARCH != uname -m 2>/dev/null | sed -e 's/x86_64/amd64/' -e 's/aarch64/evbarm/' || echo amd64
.endif
# build.sh wants NetBSD's machine name. For the architectures where the two
# names differ, this is the mapping; everything else is passed through.
MACHINE := $(ARCH)
ifeq ($(ARCH),amd64)
.if ${ARCH} == "amd64"
MACHINE := amd64
endif
ifeq ($(ARCH),i386)
.elif ${ARCH} == "i386"
MACHINE := i386
endif
.endif
BUILD_SH := cd $(SRC) && ./build.sh \
-U -u -j $(JOBS) -m $(MACHINE) \
-M $(OBJ) -O $(OBJ) -x -X $(XSRC)
# The recursive make for cdtest. Not spelled $(MAKE): GNU make runs a recipe
# that contains $(MAKE) even with -n, and the rest of the cdtest line would
# start a VM; MAKE_CMD is only printed.
# The recursive make for cdtest and release. With -n, make(1) runs a command
# only for a .MAKE target or a line starting with `+' (make(1), -n), so `make -n
# cdtest' prints the line and starts no VM. MAKE_CMD keeps it that way should
# the recipe ever be marked .MAKE.
MAKE_CMD := $(MAKE)
.PHONY: all build release install tools kernel clean-sanity stamp test compress \
@@ -62,20 +71,25 @@ stamp:
build:
@tools/build-lock.sh 'tools/build-stamp.sh && $(BUILD_SH) distribution'
# A release is everything: the sets and kernels (build.sh release), the signed
# source set, the installation CD/DVD images and the USB image, in this order
# and in one lock (the lock is re-entrant; iso and usb check the build stamp
# with -c and package what this run built). Konrad, 2026-11-18: "make release
# A release is everything: the packages of the makronix set (tools/userland.sh
# fills destdir/usr/pkg and src/distrib/sets/lists/makronix/mi -- without it
# checkflist stops on every /usr/pkg file, measured 2026-11-19: 11,817
# missing), the sets and kernels (build.sh release), the signed source set,
# the installation CD/DVD images and the USB image, in this order and in one
# lock (the lock is re-entrant; iso and usb check the build stamp with -c and
# package what this run built). Konrad, 2026-11-18: "make release
# heisst ein RELEASE, ein RELEASE enthaelt natuerlich ALLES".
# Each step announces itself with the time, and the last line says which step
# failed or that the release is complete.
release:
@tools/build-lock.sh 'step() { echo; echo "==> make release [$$(date +%T)] $$*"; }; \
step "1/5 build stamp (tools/build-stamp.sh)" && tools/build-stamp.sh && \
step "2/5 sets and kernels (build.sh release)" && ( $(BUILD_SH) release ) && \
step "3/5 source set (make sourcesets)" && $(MAKE_CMD) -C $(TOP) sourcesets ARCH=$(ARCH) && \
step "4/5 CD/DVD images (make iso)" && $(MAKE_CMD) -C $(TOP) iso ARCH=$(ARCH) && \
step "5/5 USB image (make usb)" && $(MAKE_CMD) -C $(TOP) usb ARCH=$(ARCH) && \
step "1/7 build stamp (tools/build-stamp.sh)" && tools/build-stamp.sh && \
step "2/7 userland (tools/userland.sh)" && tools/userland.sh && \
step "3/7 sets and kernels (build.sh release)" && ( $(BUILD_SH) release ) && \
step "4/7 archives of the source set (tools/makronix-distfiles.sh fetch)" && tools/makronix-distfiles.sh fetch && \
step "5/7 source set (make sourcesets)" && $(MAKE_CMD) -C $(TOP) sourcesets ARCH=$(ARCH) && \
step "6/7 CD/DVD images (make iso)" && $(MAKE_CMD) -C $(TOP) iso ARCH=$(ARCH) && \
step "7/7 USB image (make usb)" && $(MAKE_CMD) -C $(TOP) usb ARCH=$(ARCH) && \
step "done: the release is in $(OBJ)/releasedir" || \
{ rc=$$?; step "FAILED (exit $$rc) -- the step above did not finish"; exit $$rc; }'
@@ -175,7 +189,7 @@ install:
@uname -s | grep -qx NetBSD || { \
echo "make install: this installs over the running system,"; \
echo "make install: which only makes sense on Makronix/NetBSD."; \
echo "make install: on $(shell uname -s), build with 'make' instead."; \
echo "make install: on $$(uname -s), build with 'make' instead."; \
exit 1; }
@tools/build-lock.sh '$(BUILD_SH) install=/'
+27 -9
View File
@@ -1,4 +1,5 @@
archivers/brotli brotli/brotli-1.2.1.tar.gz 646598 460591287d428c8b5a8a2766b5b424d14501fcda12c7118b8f3cc4bfae44b90ac75ca156557f07b6e22542612724d904533e5f70019be07dbbb604c46f03ab69
archivers/gtar-base tar-1.35.tar.xz 2317208 8b84ed661e6c878fa33eb5c1808d20351e6f40551ac63f96014fb0d0b9c72d5d94d8865d39e36bcb184fd250f84778a3b271bbd8bd2ceb69eece0c3568577510
archivers/libzip libzip-1.12.1.tar.xz 813384 acc848242e8c0fc85c7e7984f633d898443156024cb67ee4facb657c80dd397b01326e5c32bc3955eba7ffcecdc39bebabfd27ea2d38e80603dae15581cf00e1
archivers/lz4 lz4-1.10.0.tar.gz 387114 8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28
archivers/lzo lzo-2.10.tar.gz 600622 a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4
@@ -35,7 +36,6 @@ converters/help2man help2man-1.49.3.tar.xz 228472 5f19fad1e38b0572b63ed8bfd146b7
converters/libiconv libiconv-1.19.tar.gz 5921103 1e8150f9bca907579330cd9c44ebbee46a260271fbe8f50d5ee24a39ef29c8d254505e85c3409324f7440596da711a8bd49e89f848a6be0cb3238a58c24aaecd
converters/p5-JSON JSON-4.11.tar.gz 92419 45ff2c020074e9279f6f98da819af4079ce2dec07c4e908ccd9af9f66b38e451dfa3edec30ef00d43c00b926e304380e602979acf8becb73ac3f7e9497276558
converters/p5-MIME-Base32 MIME-Base32-1.303.tar.gz 14121 48c2541d08976fba154816d4f803cc20d8d51f8a7e4084cd85e23f7559868611adcce133f7dd8728cb21bbec67c325a99e68e36149b4ae3bfae97a6e57f4b806
converters/p5-Unicode-EastAsianWidth Unicode-EastAsianWidth-12.0.tar.gz 52302 ec11d12b86d9e3676cf612c40f8e75ce1efdd302b5a6fe5d594306cffcf94f91855b5ee979f7646762605453d08d4b6b47f556e56f01b47d8ca1da8455dc138d
converters/py-charset-normalizer charset_normalizer-3.5.2.tar.gz 172659 342e94ae5b4a3d378860aab316d76947e67cc26d62529e2a9c0e062766ed2c48e4641497b0277c9e291a7ba40fe6861c5b6d4814f38c0775fad59a3b761468d3
cross/cross-libtool-base libtool-2.4.7.tar.gz 1938886 27acef46d9eb67203d708b57d80b853f76fa4b9c2720ff36ec161e6cdf702249e7982214ddf60bae75511aa79bc7d92aa27e3eab7ef9c0f5c040e8e42e76a385
databases/db4 db-4.8.30.tar.gz 22887305 d1a3c52b0ab54ae3fd6792e6396c9f74d25f36b2eb9e853b67ef9c872508a58c784c7818108d06d184f59601b70cc877916e67dfea6f0ee1ca2b07468c1041f1
@@ -50,6 +50,7 @@ devel/argp argp-standalone-1.5.0.tar.gz 65889 fa2eb61ea00f7a13385e5c1e579dd88471
devel/at-spi2-core at-spi2-core-2.62.0.1.tar.xz 599704 8e1ec042c0534d275037ba3c1ade04578a893b2adc540135ac86121deae89a266a1a7878498ba5bf3d77399c3a4aaff68ba1c3d07224af8b55672101a85d33a5
devel/autoconf autoconf-2.73.tar.gz 2183815 e9f68c75e2d7a1fa84b172180621f90bccc6ef77f923be6312de621692327ef8a2ebaeb953a4545fec8d33e28efc925f1908a17d3202280113b2826aee79e70e
devel/automake automake-1.19.tar.xz 1682600 98b0ceb15a1009d72502346cd1f0ca3fbc6c161471d82e184a2cce4907c76a7368146805d3a31fa8990b833b53f662e02b72d00bf8a5d02c767abc238cca5fc3
devel/bison bison-3.8.2.tar.xz 2817324 d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444
devel/boost-headers boost_1_92_0.tar.bz2 199030664 408d1d96996e576d74dabfa43b01c94d46c1eff7452015c4c4eb75e89b70502bb29fea0c08b54a64dd24cc14ffe50cf30f423279524f4a820e864f5da9a8331c
devel/boost-jam boost_1_92_0.tar.bz2 199030664 408d1d96996e576d74dabfa43b01c94d46c1eff7452015c4c4eb75e89b70502bb29fea0c08b54a64dd24cc14ffe50cf30f423279524f4a820e864f5da9a8331c
devel/boost-libs boost_1_92_0.tar.bz2 199030664 408d1d96996e576d74dabfa43b01c94d46c1eff7452015c4c4eb75e89b70502bb29fea0c08b54a64dd24cc14ffe50cf30f423279524f4a820e864f5da9a8331c
@@ -551,14 +552,13 @@ devel/glib2 glib-2.90.1.tar.xz 5871112 d2d76deaad64e307034b09635c64a60537b0d625d
devel/glib2-introspection glib-2.90.1.tar.xz 5871112 d2d76deaad64e307034b09635c64a60537b0d625d1695b314bc33e9e3c9b20284270d2105333474eb1fbe5afcaa814d4c52ded3a1c2a46b4b2652f7b66a211c3
devel/glib2-tools glib-2.90.1.tar.xz 5871112 d2d76deaad64e307034b09635c64a60537b0d625d1695b314bc33e9e3c9b20284270d2105333474eb1fbe5afcaa814d4c52ded3a1c2a46b4b2652f7b66a211c3
devel/glibmm2.68 glibmm-2.90.0.tar.xz 10274364 ac5972b9f42972aac36064a2aa2d9fd085b25836d91b3c8b06bc0fb6f6d600366d0e2d24be7d8e88fd7984c6d51b5ae4546463b502d0b73676de50931ad065f9
devel/gmake make-4.4.1.tar.gz 2348200 145260cbd6a8226cef3dfef0c8baba31847beaebc7e6b65d39d02715fd4f4cab9b139b6c3772e550088d4f9ae80c6d3ed20b9a7664c693644dfb96b4cb60e67c
devel/gmp gmp-6.3.0.tar.bz2 2643888 3b684c9bcb9ede2b7e54d0ba4c9764bfa17c20d4f3000017c553b6f1e135b536949580ff37341680c25dc236cfe0ba1db8cfdfe619ce013656189ef0871b89f8
devel/gobject-introspection gobject-introspection-1.86.0.tar.xz 1083172 a9d2edbe1cea710e10ef1ea8059a45cf5689bace43b5d2a6861809e863a6de7114b4763db8df3916ad6202c9967f48f7997acd0810a86e5e88dea7e0be88b585
devel/googletest googletest-1.18.0.tar.gz 894741 ba0f5769ccf34acf1bc72d1f7e9ffb8202176d02b64f6f3d9047accfc0cf9026ff5a653d24935e2705fff8709566676452616c93ca0ca6277f1e21d79b58a10a
devel/gperf gperf-3.3.tar.gz 1831294 246b75b8ce7d77d6a8725cd15f1cf2e68da404812573af1d5bf32dbe6ad4228f48757baefc77bcb1f5597c2397043c04d31d8a04ab507bfa7a80f85e1ab6045f
devel/gtexinfo texinfo-7.3.tar.xz 6940392 fb1a16df67f870e79c31f4b96d8431d9c944eb84e5aa71e9d94890417ce63047918d55620fa63bd582232c47e9b412a6f95a11a2479f53f40e92e49bc018d926
devel/imake imake-1.0.11.tar.xz 157524 fc432aeec91ec6f8bf5fedfb794da500f312fbf377226d93c9e0dfac4e339feab9c538b2a97d8c973ce38ef392865e5f56aed695d2746bb706a302470b1af451
devel/iniparser iniparser-3.1.tar.gz 39097 8fd8324c5629fdc3e3eff00afb5f0832402ccc760c5b92db82aa29b340ec891419ca2c4fee3a4d4d67cf9bc51c76b095bc0c458e087c2b8e72ac36867c47ae86
devel/libatomic_ops libatomic_ops-7.10.0.tar.gz 543312 22f6b5253b4756cce1687015849558c3391593b8298bddc8ef1a2c037847f633fe1291c013034b1f720dafd599787d545fba473325561179e9eb1bbcd24eee61
devel/libbstring bstring-1.1.1.tar.xz 121988 a1883b5ed43bee142c35a6de271a251ad73df1be60815a6d9829dcd18dc9b5b260848b1a21f55201cd8d62d64a32f0d3592c13da84a3d031acb89ad18096d9d6
devel/libcbor libcbor-0.14.0.tar.gz 317101 e580543d9cb567d484e14c3057c5c1672f012879abe3f04ead64bf0f14b95b986fcc26602b0ffc2b247e9bfbd8a914d676c25d4f62230ac8fd5a6727f7d34595
devel/libdaemon libdaemon-0.14.tar.gz 340474 a96b25c09bd63cc192c1c5f8b5bf34cc6ad0c32d42ac14b520add611423b6ad3d64091a47e0c7ab9a94476a5e645529abccea3ed6b23596567163fba88131ff2
@@ -575,6 +575,7 @@ devel/libusb1 libusb-1.0.30.tar.bz2 656112 b14241bc499cdf353bb7fe02cea9a754b011f
devel/libuuid util-linux-2.42.3.tar.xz 10716216 2a307943d4fbb34ac02131e10ff7260f181dd706b21e68a891d25d6eb30476a612bcc19b674bb2256283c9c716146e0d79909f37324efc9aa9d45a44e0d58988
devel/libuv libuv-1.53.0.tar.gz 1400202 8f26c14b016368a8e382539026e1fa3cf187a7cc8bd8b50498a9b26003e9da3e48a89f4d2032694e5f152cd4177386e259b85e8280cf814153ab58950d205014
devel/lld llvm-project-22.1.8.src.tar.xz 167061596 2615b20ba08534f83ab8ecc7b5ba43b5f1dfcf9cdb2534a32fcdbf0ccdd9a008b46276e45ef26ed9377f65b5e4ae89ea798f3863fd034484b5715140f3a7b35c
devel/m4 m4-1.4.21.tar.gz 3558201 4d573245d31e14a1b2856abf7cd16f82ec01036956bb2c9ee09e6d9d3fcca518cf77d6864c915d4defa07771bf8503241017b37ce9027dcf4fafdd0fb20db582
devel/meson meson-1.12.1.tar.gz 5091918 0cc8434dbdfb2e32dd98277ca37c221c1e720dfc2922d49c749e0c70ec0a5e23bf4e15378814e2f17b1dc65ec6ec93d23df5ec31b2f7ed995a4ae36f4522c24a
devel/mm-common mm-common-1.0.8.tar.xz 283552 302bea8b5b66d53e52a6f2ce2b999de228e86c74c1aa262687ab229cbc618f017dd94d1910e59dd205ede190bd0988767935dbdd3dadbda0b044b0fe9e76a344
devel/nasm nasm-3.02.tar.xz 1531636 dc80d8a9a582423e62703da3cc3f37ee57735939b975faa8a72d061a8b596f763d206c7cc3e48c32d2ad726f38e430dc3b85cffd0c3b32e71e20ad9cc24f4804
@@ -1480,8 +1481,6 @@ emulators/qemu qemu-11.1.3.tar.xz 141819712 6bcade0af849e6a7f124e2b07d07e8a6e1fd
emulators/retroarch retroarch-1.9.0/retroarch-assets.tar.gz 159084018 ba31152fa526b23f44aead13d8d3975c480b9748443233b2fa7501b697a7b49bf00de8a16669858124f511a1c1fd8ae6f1f8f019c68b3c08e687be6404717f9c
emulators/retroarch retroarch-1.9.0/retroarch.tar.gz 39152024 228312424325fae12f5647e8774fb546e9a379d7a61a831d84e4c45b0a8ad9c3a2c2d0fd6442347842a71f39be2e0ef9d4302900279fe7e61d5def2966b636c3
filesystems/fuse-sshfs sshfs-3.7.5.tar.xz 51604 c76d8d725c4f8ef8b95c699ae25407fd6789cd5ce94b36d241a6754e4e6d8cae9729bbe9b1e21e421f6148bf822c9441cf6626206ec7540e7b26d298e2616929
fonts/Xft2 libXft-2.1.7.tar.bz2 237056 51c4395a04a9434b21c26b9eb8bda8c4e2926d74774581d81c162b7dd1918e3aca57d2d6cf370f410757130edc7ca31c36fb06be965f3695442e398f4d4e26f6
fonts/bdftopcf bdftopcf-1.1.2.tar.xz 146188 b3dde8d73084b7ec23ea47491321d12fa8f4a0a9ce0f61f2f89460fdc98f05d135ba11d8588d9debb8c2639ac68a7434a0cf80d9d548cd7328cbcb2339b4c0a6
fonts/font-adobe-100dpi font-adobe-100dpi-1.0.4.tar.xz 886528 fedb86672c3b9cb624ee5d74d1d710f21d92c2d48a1fcf0a45b54b3f992f6f5599fc271d38a7e25ef123b64d405fa60a3d46883fe7a9d71ebad83c9b418f8383
fonts/font-adobe-75dpi font-adobe-75dpi-1.0.4.tar.xz 735140 4e63c268525f21c03525870129c8d42cbd17a03d86d9c88bebdccb5094a1093acef1d2b6d4dde221559cb19f047b86baf58fa8ad65d28d4cb6c3064ec164836a
fonts/font-util font-util-1.4.2.tar.xz 152764 3def5f08bcb30ec3e0008f648478ebe1f65127d03e821613de550e95247812751b4ff31383739ad120123b2f69c87d819c18d44d1edee2ca51075a3c031e3a6f
@@ -1906,7 +1905,6 @@ math/mpdecimal mpdecimal-4.0.1.tar.gz 316268 431fa8ab90d6b8cdecc38b1618fd89d0401
math/py-roman_numerals roman_numerals-4.1.0.tar.gz 9077 18541ec1a66e2b72d61baed44a90ef13b74e76ed29fecaeeff57cf48309c09daf6c052cc3e973ee33e69c1138dd284cd9d425b34b731280e6b679e43d8e2c945
misc/getopt getopt-1.1.6.tar.gz 58926 aa5476e729f33ddd3f32f38b2565da319fdfe034f11549218d5d9953e70dad764e0d9a82bb10efe4043c86ae87f944619b8a2f29a197f592bd855699961d8e10
misc/libcdio libcdio-2.4.0.tar.bz2 1721595 fd7d397298ab8a8c8e8d2aab5e63d2a7da5b6bb39ab1a6176afe994f56967a0e0bd80b1ad3c8479063a6f49fc706269a76f14cee52e42b1ae5570764b4c7a148
misc/p5-Locale-libintl libintl-perl-1.37.tar.gz 583792 86591b61b05a54a9cbfdd0f040afb0f5a80b0d80fb5953298b764019a153ff7966a2d5479be9d43bd3b4d5797572da93faa738f730a59824cee300bd8f65153a
misc/py-installer installer-1.1.0.tar.gz 481257 0dab0a9d01c1bf7e001b1a41b8380a56ec6df22db6916e919bcb3063adfe3fdbbabae7fc4000915b93c704d5251d976beecdf2cc026eb9d18b6e798d9bbe0979
misc/py-trove-classifiers trove_classifiers-2026.9.21.13.tar.gz 17085 38cc0c21213a765d32ccf833d16d3056a47a1c9802b3f36ebcff392997106d1707d3dbee84b55b04b65d608c8beb7400ec3e586970b01778871be795207325d6
misc/rhash rhash-1.4.6.tar.gz 461244 c125b71ec36cce2ec31057239cac8b987555f5e3b152dacb6386b905f8cc4d449c1de5b53e5a5206a2d87975681225c9b54e5826c10ffd91b3440f8595d22b15
@@ -1937,9 +1935,7 @@ net/avahi avahi-0.8.tar.gz 1591458 c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0a
net/libIDL libIDL-0.8.14.tar.gz 499807 5c687e77a25a6af825da6f0d965f6b6b539ad3329c6d86bda1ba87be34017fc461bdb01b8a05396f0cfe24a17673d73ba96ab415f1805ff4ed1afc2c1aa67dd5
net/libcares c-ares-1.34.9.tar.gz 1083895 f4be5818d14cec48e96cc66d3f7dea3de60e3ae3d990972cf2e055140ad995a3bbf38f2a6ffd5c671f04b5f105f28ef022af721477a2d126be0803355c7c297a
net/libiscsi libiscsi-1.20.3.tar.gz 327211 3ce33c028dc92b902d08e30dd6ec71ca7eff9f729c7a62fd463d687286a10b068327ddc9a929b0102fcd0483a755370d2194af6f7ba65e66d17ac571b44b4ae9
net/libpcap libpcap-1.11.0.tar.gz 1052416 6a29b24afe8fc5fe7761871b2067dba1df69624c4eb263765e4da0c6a5a8915e0b32ec6767e190b2459f8b2a691b1ac5d9867c3a2a9c8234ff9b623b5a84414b
net/libslirp libslirp-4.9.3.tar.xz 132968 0a4d7e977d9877cc59298a05df58d285e58e0d9e80ccdcc4c95c5984e177b5642319d54b07fa650317c5a1c2a1a16d11a26cbd1e9b165724607b428d05c34a15
net/mDNSResponder mDNSResponder-2559.1.1.tar.gz 3362635 1112d78e3a46115ffdae4849d847a6cfe1052d6e4a6af3afa6058eb900ac7f7c8fee20874b479ff3d40af2da95a371241f2c821a193f148f844bf9efc06fcc79
net/miniupnpc miniupnpc-2.2.4.tar.gz 102932 f6515bda86405114016474fef6332c0c09a56b9293cf4391113f549444bab67e7d031af7b94dacff5e7c96d6508527204498c00fb67d6067685ef606b2152595
net/netatalk4 netatalk-4-6-1.tar.gz 2222038 f547f7dc5717979afa141c8c72b139f1dba0410a315c7c9b9c943419b29f251e25746f4f4730147d496ad1f927f13a8f6b337385d0faaddddbfebd4a171531f7
net/ngtcp2 ngtcp2-1.26.0.tar.xz 733792 3f4ecf8720d3b43034b120111e804e453044d159fe1a69134a599260be80f6c600810679b2d285c271321e9e88b3ce127c6793d5c142a746278038d807208bbf
@@ -1978,6 +1974,27 @@ security/p11-kit p11-kit-0.26.5.tar.xz 1082584 180d8bfd07332aeb31b3008c6bf68492a
security/pinentry pinentry-1.3.3.tar.bz2 620687 3562d6a83af01ab9c12fb3e4710e3233078296c1275a69c6ac5ebe7461e95404d6504c4fde82f501f861b3ae960b7d13052bcb359a62dfc078ade29e08b86735
security/py-certifi certifi-2026.10.23.tar.gz 136225 0ea25800d79530c297a9bcea5febfb4e790baacaf19283aa66e5272ce947ab464670328eb3cbb8c49dfecbc31074534d7136bc79bb55e2e857819c032d9bf9d7
security/signify signify-20250520.tar.xz 79832 daa5a7b1d223d6e2c39d9d46c112afb17997bb9cbb4b08458e7030ded6815cf7f401c9fa1edabb137d6a56d6d2aa8d10ab6b8b3627c071a197110ea1909ef0a1
shells/bash bash-5.3/bash-5.3.tar.gz 11355854 426702c8b0fb9e0c9956259973ce5b657890fd47f4f807a64febf20077bb48d0b91474ed6e843d2ef277186b46c5fffa79b808da9b48d4ec027d5e2de1b28ed8
shells/bash bash-5.3/bash53-001 1531 66d0987f1a8951974c3a707a1980ef391a1f2a2938f0fa46adb77fcdcef6a3ca49e67182b9640ece3e59bb289e5b4a17eb870aa2a525a03e829a7be158d020a6
shells/bash bash-5.3/bash53-002 2635 05caea1c1f5a3d27f2aa351c24f324f9d544ded89db4183ae2872e0283dde62dd6166ca4e780304398935b4aa3fb4db77ecf57acd0f0e295d279ffe40b772158
shells/bash bash-5.3/bash53-003 2683 3d4004653cb3f2cba984e67b8e7ae54c19351e176b62bb415f88fdd482ae04be063dacf6303c8343ab6c8bf4f2388026c1742ac603a5cd5c330db22a4b76f4cb
shells/bash bash-5.3/bash53-004 1266 d3c7c83ae0742f2a4e1bc96e8fdb3f05c8c0a7e631d3473922ac245f83194925ae443e761269fa6a519298b1123ee4008bcbcdaf9180dff0a0df7fbe5e029bbb
shells/bash bash-5.3/bash53-005 1072 e81b43b084c1e9d59acd174d0792a93053780bdef61e7f4072d90b425d99a3fb7d35ef4c0ab79c4fb24bb6b38a8d9e99aad2fceac6efddf723a2cd123b32f0ea
shells/bash bash-5.3/bash53-006 1346 f7e303405571635e20c26507c46f9ae0a61ea1328fa0492f2eba2095d398f799e62c1dbf0c07b440c290244f2c54186691ef4aaa2d65f2de101f9888386e2391
shells/bash bash-5.3/bash53-007 1437 5f9419b34c759b92a29f25d97e5da3f02603b3138afc11523c7bd304139db0cd02ff82a093cf78a338a7f9d88cb50a880fa6a105be83f8ca85ea8ff7d5c5d80b
shells/bash bash-5.3/bash53-008 5717 094b7dc2abe6fc41c62494c6b69640fbd8c6bd93e7cde0618504bb8589fc51fec2fb1686b2729c37e430d336d93ec174233d78f23c82026aca49a240a00477c1
shells/bash bash-5.3/bash53-009 2468 07f37cee118e510ae58ea408f9d97b942017e1378532d4e3cd5a4d7405994ddadaba5d3ddb4bbda6b375760967faa51add7f46914ba919a27c14e7036f64f3be
shells/bash bash-5.3/bash53-010 1457 976e23a734fbc38b8bf705b36d74c1861e5d69e3f3fbde683210ad93b1c14f59c014b3fcd4aea0b0f5b1f35bc23770abb5a741a7a25a2081816ee22da7bdedad
shells/bash bash-5.3/bash53-011 2251 10da4ad156c83a18ce023845339399fd60f627292af15345612c88764a98259231f7f3a75f9d7820beea34ba6b25cb151d2abca8ce871d07e29e32dcee8adb64
shells/bash bash-5.3/bash53-012 2378 e178cd27f1db5d7607ec90bb4305059d996cf95486a1e5e3b4d76f37811a0320433a2a2900e50c5704b199fae946280edb50daedb8ab8aabed9ec83dc2540d2b
shells/bash bash-5.3/bash53-013 1467 a973b7d9c37dc1b271fe1efa3afe3b700c1bebbf9f72e6e4e6a72a8d1f50f7875d82ee26af335e26d20883376d89c78f14b1901a0a70a8f9a9b2418df40f71fc
shells/bash bash-5.3/bash53-014 2229 7beb4a1c39b126189a94deb12d5065b571196f27abdd8ae9c9b340ffccc1f52ed9fec31a475b72fed661097d081b1a93d088fabe53c45c8b2cc286b831c16977
shells/bash bash-5.3/bash53-015 2151 812fbffd1b755cc9bbf730a4632f68a573351c4eeb5a4f495fa8f2f4dd7dbe1587dd22aed0f9c4d5c941130489ecc3def96068c77cc142680326ba8785862432
shells/bash bash-5.3/bash53-016 4185 e18aed683aca1af8a92f955a0ad32a23ee22f982e1bec9ea4c078a8523b30e4848fd9dc4d863cb14d1fce25bf9fdbde2473d9c0686e8be25be113cb5a36cb462
shells/bash bash-5.3/bash53-017 2229 608245b580267e33ffa3ed02de7173a07594a9831e3b6a505bc6fa68570e3839663bad39552744ec61421179b000dc2584f48cbadb232fc2c1427871c899a1ad
shells/bash bash-5.3/bash53-018 2660 5a15dfb3dafddea9a62ef5d552660d425d0658a8254adabeed5c993264b6ac59f670e6a47e6847ef6598d60e553e834a08e09dfca3734ae119dcd7d36dca97d1
shells/bash bash-5.3/bash53-019 5061 fecb787bf5b0c6589d5c891c8df205e39a83330e36dcb685a01ff1e117074db5288b22e7dfd3d4e9096267cc80decefd16d6837e4dd99bae26fdf3b6f9814c7c
shells/bash bash-5.3/bash53-020 1591 64e34979fb20cab2e6b38bcd9ec470cb917de3ef2d53db7c96c71fb5245083e37d9c65a6c2935164da2b6dc97116e4210366b8253bdd7a201f618770a44135ab
shells/ksh93 ksh93-1.0.10.tar.gz 2019536 055bd2cf188c825ed684e6f95991a70f8b672e31a94a2294b8791de96be7d9dbf49e2d1eddb3490559c15736a2e0f40839529253481f1217e5e134f046cbe41f
sysutils/coreutils coreutils-9.12.tar.xz 6704996 f25514cf02fd25365252d9a8f6fc5f8ed063fffdcb11c7eff380e3fa632741105d11b45ded332a2af5e913f77a143b68a2bd1fbdca0085e127fb17c80c35279b
sysutils/dbus dbus-1.16.2.tar.xz 1115644 5c26f52d85984bb9ae1dde8d7e73921eacbdf020a61ff15f00a4c240cb38a121553ee04bd66e62b28425ff9bc50f4f5e15135166573ac0888332a01a0db1faa2
@@ -1997,6 +2014,7 @@ textproc/docbook-xml docbook-xml-4.4.zip 96107 7df5af4df24e4618b09814e4e20c147c7
textproc/docbook-xml docbook-xml-4.5.zip 98497 1ee282fe86c9282610ee72c0e1d1acfc03f1afb9dc67166f438f2703109046479edb6329313ecb2949db27993077e077d111501c10b8769ebb20719eb6213d27
textproc/docbook-xsl docbook-xsl-nons-1.79.2.tar.bz2 23400667 d19aad5ae91c7f9a9690836bd472ec6e01a29eaeac6b1838b5c9ea54e2ef4cc90f515d7b6640fe94e909a5a51eee80cd32e2ccbee457de6f0c6652ea43325d7d
textproc/enca enca-1.22.tar.gz 808055 eedd2ccb08ddf1f8f57d835cfc794400c6226a4af7b17eb9fef60f9366aed4f5a678d52fb7cd8ee6d906691e7afc604d5db6b217106e97f22fdc75518ef7b1ea
textproc/gsed sed-4.10.tar.xz 1732800 20224df834b363ca1357024234bb93df3929c252c40c7ef3d23e78fc05177c7986e3145a5049d63db746a4dc2c97befb0324a87ea081507292ff6cd5383ee9db
textproc/icu icu4c-78.3-sources.tgz 27977255 04a49455e1489030c520a4bfd2664fa2171e7938d08f2acdbbcb1fda976639fd8b1f0704f2eec89ba59a7b6d118ceaab6ec5a096e40d9085a0895d91ce225245
textproc/intltool intltool-0.51.0.tar.gz 162286 4c93cb26592ed0b1622d3b7800b5d6622ffa36f58ac73f2ef0bddfab522565fdfb8fa73d81914b9a202f1d62bc995a08960f8adb9f62c86918e75498e85fbfdf
textproc/iso-codes iso-codes-v4.16.0.tar.bz2 9262670 9d8b9243f13886809f0bbbde47a568f00e14c82ce8f0c79fdf656cdfbd45afa67aca23d501fa79a982d535b97bb32c6ad3d3e44343c13aae61c4917144690cb5
@@ -2007,7 +2025,6 @@ textproc/libxml2 libxml2-2.15.4.tar.xz 3177444 e162ed16ad6fb6c6ef1c40c6bed66a5f7
textproc/libxslt libxslt-1.1.45.tar.xz 1519992 8f0608aad7250ccfe62808169d464a1641535b41a73b4fbbc1eeec9c9e785bbd8f4860d571eb567ee1e7abbd89ac3d707a5f3e3a9e836ecaf38155793ce47d78
textproc/opensp OpenSP-1.5.2.tar.gz 1521390 a7dcc246ba7f58969ecd6d107c7b82dede811e65f375b7aa3e683621f2c6ff3e7dccefdd79098fcadad6cca8bb94c2933c63f4701be2c002f9a56f1bbe6b047e
textproc/p5-Encode-Locale Encode-Locale-1.05.tar.gz 8355 68ed5732fd3645eca2ea54080067677a48f90fc5a594a1b453a322f3127e67a984d539cb5fd41ac63a03b9dab693c070b65e3c70a2a677dc61b4634f3e212d06
textproc/p5-Text-Unidecode Text-Unidecode-1.30.tar.gz 137977 194f8aba0dcdc7a53338b86370b7cfb6c60d4a8982ada6084f0eb0ccd66ce461b831b6daf04932f039ff1b983dc3cd0c0ced1e8b455955d2699c36120b41a526
textproc/p5-XML-Parser XML-Parser-2.59.tar.gz 472643 395ad365ae6209827737448711d5d5f61daf013380d196d26a5c7a88c0aa353baa09c775e6086622b491e515824b957022f4c119264559127fdb97f4cbe22381
textproc/py-alabaster alabaster-1.0.0.tar.gz 24210 097755d8d5f8c818288f2bdea5ecb9217f4bbfbab238fb4e8f2e135d9a7777bb9a6056decabf709f8a255495d4269d92233bcdf73c6c9ec82e79f52d65849955
textproc/py-docutils docutils-0.23.tar.gz 2303823 566edfec1a52dc16deae5dd1fd70f682a9f6ba44319a08c66280b2e1199768d52a2558f5031d35fbe2cd46d845443ff45390d1c2008ce0bc7b149cd024dc1c15
@@ -2053,6 +2070,7 @@ www/py-urllib3 urllib3-2.8.0.tar.gz 458972 3104f0b89b9d7421b0b13ff34c9e68a315772
x11/gtk3 gtk-3.24.52.tar.xz 13578032 20c119cf1a8c390c9d572729f36215fe034731d9e741a0a30c96671f4606ef8b7cdbe5d5ebe986f6f6c9ac03b3ba5cddd8d63da0ebfc5341d179ec9dea5e82eb
x11/gtk4 gtk-4.24.1.tar.xz 17655236 0e088442279c67a8f4c29bba979efe7e68bb1885a26da292035efc86425c462d1894476ea0e8bb4a08b5ad884f3eb3980782540a1cba89af5773852109af0ceb
x11/gtkmm4 gtkmm-4.24.0.tar.xz 18023436 a8ce7ba774e9d0f729cfc094df02b3f3ea76b77653f989126befa7a62130f25e56f349758f646604fc502636ca27fe247301e74690d49a8b844cee6b515b4db9
x11/libXft libXft-2.3.9.tar.xz 313852 493e4475c0eeab04a510819446eaa871ba9e1695e42d05bb7791d2ed59f7faff31e910dae95efa4b0ac4a7a2da38614b5740a4ca9388134bea80d348e9ad57e5
x11/libXt libXt-1.3.1.tar.xz 691200 c220292f60b0f53134cf9364831a32bbaa9fa6bbb3a7143e917920957b7a48c616e946042747089f29ea9d8a18ecd64de620bcaf56d82462e7107de906f5db38
x11/libxkbcommon xkbcommon-1.13.2.tar.gz 1243485 261af9e02ad533bb6560e2711171812c7d92094db8b54eaa19b477ab68270e6d62b315e18d42527ca9c944e87f36f063d003d74aeb4829b21ecb96ab1b0c1ce7
x11/xorg-cf-files xorg-cf-files-1.0.9.tar.xz 174740 124a3bd523f37bc196f548587b2b353aa518426bdd72ad1ea0642baeff45f555495304b77f96a7ae91d7bedcef043759cf2da92615612a4ae72d0553c530ead2
+7 -1
View File
@@ -26,7 +26,13 @@ INSTIMAGEMB= 3072
# Rust ... about 5 GB of distfiles; Konrad), which no DVD holds.
# A stick without /source is not a Makronix stick (tasksd t0047): build the
# source sets (make sourcesets) after make release, before this image.
.if !exists(${RELEASEDIR}/source/sets)
#
# The check names the targets that build the image, not every target: bsd.subdir
# parses this file for obj and release too, and an unconditional .error stopped
# `build.sh release` on a tree whose source sets did not exist yet -- before
# anything was built (t0581, measured 2026-11-19).
.if !exists(${RELEASEDIR}/source/sets) && \
(make(install_image) || make(install_image-bios))
.error "installimage: missing ${RELEASEDIR}/source/sets (run 'make sourcesets' after 'make release')"
.endif
MD_IMGDIR_EXTRA+= ${RELEASEDIR}/source source
File diff suppressed because it is too large. Load diff
+17
View File
@@ -104,6 +104,23 @@ fi
[ "$(id -u)" = 0 ] || die "only root can upgrade the system"
command -v "$SYSUPGRADE" >/dev/null 2>&1 || die "$SYSUPGRADE is not installed"
# sysupgrade(8) refuses to run without its configuration file ("Configuration
# file /usr/pkg/etc/sysupgrade.conf does not exist", measured 2026-11-21 on the
# MacBook, where the upgrade then stopped before it began). What this script
# needs it takes from the command line, but sysupgrade reads KERNEL, SETS and
# POSTINSTALL_AUTOFIX from that file: the defaults are written where the
# sysupgrade that runs looks for them.
for c in "$CONF" /usr/pkg/etc/sysupgrade.conf; do
[ -f "$c" ] && continue
mkdir -p "${c%/*}" 2>/dev/null || continue
cat > "$c" <<'MXCONF' || die "cannot write $c"
# written by mxupgrade(8): the defaults sysupgrade(8) needs
KERNEL=AUTO
SETS=AUTO
POSTINSTALL_AUTOFIX="obsolete"
MXCONF
done
if [ "$yes" != yes ]; then
printf 'Upgrade now? [y/N] '
read -r a
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
# ccache-cc -- the target compiler of the build, behind ccache.
#
# The root Makefile hands this to build.sh as CC (MAKEFLAGS='CC=...': a make
# command-line variable beats the CC= of share/mk/bsd.own.mk, which the
# environment, -V and mk.conf do not). A wrapper script and not
# `CC="ccache gcc"', because MAKEFLAGS splits at blanks. TOOLDIR is in the
# environment of every command nbmake runs (src/build.sh makeenv).
: "${TOOLDIR:?ccache-cc: TOOLDIR not set; run through make}"
for cc in "$TOOLDIR"/bin/*--netbsd*-gcc; do
[ -x "$cc" ] && exec ccache "$cc" "$@"
done
echo "ccache-cc: no target gcc in $TOOLDIR/bin" >&2
exit 1
+22 -4
View File
@@ -39,6 +39,24 @@ fi
DISTDIR=${DISTDIR:-$TOP/build/distfiles}
DIGEST=${DIGEST:-$TOP/build/pkg/bin/digest}
command -v "$DIGEST" > /dev/null 2>&1 || DIGEST=digest
HAVE_DIGEST=
command -v "$DIGEST" > /dev/null 2>&1 && HAVE_DIGEST=yes
# A digest value, from pkgsrc's digest(1) if it is there, else from cksum(1)
# on NetBSD. Never write an empty line: pkgsrc reads "BLAKE2s (...) = " as no
# checksum at all and refuses the package with "No checksum recorded"
# (measured 2026-11-20, the forks are packed before pkgtools/digest exists).
digest_of()
{
what=$1; file=$2
if [ "$HAVE_DIGEST" = yes ]; then
"$DIGEST" "$what" "$file" | sed 's/.* = //'
return
fi
case $what in
SHA512) cksum -a sha512 "$file" | awk '{ print $NF }' ;;
esac
}
# The lock is held by the userland run that calls this script: it serializes
# the whole run, so do not take it again (and do not remove the parent's lock
@@ -83,13 +101,13 @@ if [ "$DISTDIR" != "$MXDIST" ]; then
fi
size=$(wc -c < "$OUT" | tr -d ' ')
b2s=$("$DIGEST" BLAKE2s "$OUT" | sed 's/.* = //')
sha=$("$DIGEST" SHA512 "$OUT" | sed 's/.* = //')
b2s=$(digest_of BLAKE2s "$OUT")
sha=$(digest_of SHA512 "$OUT")
{
echo '$NetBSD$'
echo
echo "BLAKE2s ($NAME.tar.gz) = $b2s"
echo "SHA512 ($NAME.tar.gz) = $sha"
[ -n "$b2s" ] && echo "BLAKE2s ($NAME.tar.gz) = $b2s"
[ -n "$sha" ] && echo "SHA512 ($NAME.tar.gz) = $sha"
echo "Size ($NAME.tar.gz) = $size bytes"
} > "$RECIPE/distinfo"
+7 -4
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""fti2xpm.py -- raster the IRIX .fti vector icons into 32x32 XPM.
"""fti2xpm.py -- raster the IRIX .fti vector icons into an XPM (32x32 default, or the size given).
The format is the GL-style one of the Foundation icon files: color(N),
bgnpolygon/endpolygon (filled), bgnoutlinepolygon/bgnclosedline/bgnline
@@ -37,7 +37,9 @@ def colour_char(n):
return 'm'
def main(path, out):
def main(path, out, size=32):
global W, H
W = H = size
txt = open(path, errors='replace').read()
px = [['.'] * W for _ in range(H)]
col = 'm'
@@ -104,7 +106,8 @@ def main(path, out):
verts.append((float(m.group(1)), float(m.group(2))))
lines = ['/* XPM */',
'/* MCDE: %s, from the IRIX Foundation icon (fti2xpm.py) */' % os.path.basename(out),
'static char *icon[] = {',
'static char *%s[] = {' % re.sub(r'[^A-Za-z0-9_]', '_',
os.path.basename(out)),
'"%d %d 8 1 0 0",' % (W, H)]
for ch, c in PALETTE.items():
lines.append('"%s c %s",' % (ch, c))
@@ -116,4 +119,4 @@ def main(path, out):
if __name__ == '__main__':
main(sys.argv[1], sys.argv[2])
main(sys.argv[1], sys.argv[2], int(sys.argv[3]) if len(sys.argv) > 3 else 32)
+15 -6
View File
@@ -27,8 +27,8 @@ emit()
printf 'src %s\n' "$(sed -e '1q' "$TOP/src/BASE")"
[ -f "$TOP/xsrc/BASE" ] || die "no xsrc/BASE"
printf 'xsrc %s\n' "$(sed -e '1q' "$TOP/xsrc/BASE")"
c=$(git -C "$TOP/pkgsrc" rev-parse HEAD 2>/dev/null) ||
die "pkgsrc is not a git repository"
c=$(git --git-dir="$TOP/pkgsrc/.git" rev-parse HEAD 2>/dev/null) ||
die "pkgsrc is not a git repository (no pkgsrc/.git; the source set carries it without one)"
printf 'pkgsrc %s\n' "$c"
}
@@ -45,12 +45,21 @@ write)
;;
check)
[ -f "$PINS" ] || die "no PINS; run: $0 write"
grep -v '^#' "$PINS" > "${TMPDIR:-/tmp}/pins.$$"
if emit | cmp -s - "${TMPDIR:-/tmp}/pins.$$"; then
rm -f "${TMPDIR:-/tmp}/pins.$$"
want="${TMPDIR:-/tmp}/pins.want.$$"
have="${TMPDIR:-/tmp}/pins.have.$$"
grep -v '^#' "$PINS" > "$want"
# emit in a file, not in a pipe: a die inside a pipeline would only end
# the pipeline's subshell and the comparison would report "differs" on
# top of the real reason.
if ! emit > "$have"; then
rm -f "$want" "$have"
exit 1
fi
if cmp -s "$have" "$want"; then
rm -f "$want" "$have"
echo "makronix-pins: PINS matches"
else
rm -f "${TMPDIR:-/tmp}/pins.$$"
rm -f "$want" "$have"
die "PINS differs; run: $0 write (and say why in the commit)"
fi
;;
+33 -2
View File
@@ -188,10 +188,16 @@ mkdir -p "${LISTDIR}"
# rebuilds x11-links against its own /usr/X11R7.
#
./etc/mtree/set.makronix makronix-sys-root
./usr/pkg makronix-sys-root
HEADER
} > "${tmp}/list"
: > "${tmp}/metalog"
# The prefix itself belongs to no package, so +CONTENTS never names it -- but
# every entry of the set is below it, and nbmtree wants a directory record
# before anything under it: "nbmtree: ./usr/pkg: missing directory in
# specification" stopped build.sh release at the distribution step
# (measured 2026-11-20 on makronix-build).
printf './usr/pkg type=dir uname=root gname=wheel mode=0755\n' > "${tmp}/metalog"
# Collect entries from +CONTENTS of all selected packages.
LC_ALL=C sort -u "${tmp}/pkgs" | while IFS= read -r pkg; do
@@ -372,8 +378,33 @@ awk '
cat "${tmp}/metalog.dirs" >> "${tmp}/metalog"
# Replace the /usr/pkg part of METALOG, leave every other set's records alone.
grep -v '^\./usr/pkg/' "${METALOG}" > "${tmp}/metalolog" || true
grep -v '^\./usr/pkg' "${METALOG}" > "${tmp}/metalolog" || true
cat "${tmp}/metalog" >> "${tmp}/metalolog"
mv "${tmp}/metalolog" "${METALOG}"
# The set is the whole truth about /usr/pkg. A file the package tools left
# there that the set does not name is not shipped -- and checkflist counts it
# as an extra file. Measured 2026-11-20 on makronix-build: a chroot build
# installs its build tools (perl, autoconf, ...) to build the set, the prune
# above deregisters them, and 526 of their files stayed (perl's cpan, perldoc,
# its man pages) together with pkgdb.refcount, the index the package tools
# keep beside the database. What the set does not name, is removed.
LC_ALL=C sed -n 's/^\(\.\/usr\/pkg[^ ]*\)[ ].*/\1/p' "${tmp}/metalog" |
LC_ALL=C sort -u > "${tmp}/ship"
(cd "${DESTDIR}" && find ./usr/pkg \
! -path './usr/pkg/pkgdb*' ! -path './usr/pkg/share/x11-links*') |
LC_ALL=C sort -u > "${tmp}/there"
LC_ALL=C comm -13 "${tmp}/ship" "${tmp}/there" > "${tmp}/extra"
n_extra=0
sort -r "${tmp}/extra" | while IFS= read -r f; do
[ "$f" = "./usr/pkg" ] && continue
if [ -d "${DESTDIR}/$f" ]; then
rmdir "${DESTDIR}/$f" 2>/dev/null || true
else
rm -f "${DESTDIR}/$f"
fi
done
[ -s "${tmp}/extra" ] &&
echo "makronix-set: $(wc -l < "${tmp}/extra") entries not in the set, removed from the sysroot"
echo "makronix-set: $(wc -l < "${LIST}") list entries, $(wc -l < "${tmp}/metalog") METALOG records"
+72 -1
View File
@@ -137,14 +137,68 @@ fi
# 'libMcdeSound.la' to a directory not ending in /usr/local/lib" (measured
# 2026-11-22). The build tree below build/ keeps its own; these excludes only
# keep the source tree's out of it.
#
# The endings are not enough. A generated file usually has no telling name:
# Xsession is made from Xsession.src by tradcpp, Xconfig from Xconfig.src, the
# catalogue and the dtlogin resources the same way, and they are not .o or
# .la. Measured 2026-11-22: an in-tree build from a run with another prefix
# left Xsession with DT_BINPATH=/usr/local/bin in it; copied along it was newer
# than Xsession.src, so make kept it, the package shipped it, and the session
# of the installed desktop came up as a bare xterm -- greeter and login fine,
# no dtwm and no front panel.
#
# The rule is the tree's own convention: a file that has a .src next to it is
# generated, never source. That covers Xsession, Xconfig, Xstartup, Xsetup,
# Xreset, Xfailsafe, the dtlogin resources, the catalogues and every other
# cpp-derived file of the desktop -- all of them without an ending that says
# so. A file without a .src is copied as it is; one that is left behind
# instead would only be regenerated if it looked older than its source, and an
# obsolete copy does not.
mkdir -p "$B" || finish 1
rsync -a --exclude=/pkgsrc --exclude=/pkgsrc-* \
GEN=$B/.mcde-debian-generated
(cd "$SRC" && find . -path ./pkgsrc -prune -o -type f -name '*.src' -print) |
sed -e 's,\.src$,,;s,^\./,/,' > "$GEN"
rsync -a --exclude=/pkgsrc --exclude=/pkgsrc-* --exclude-from="$GEN" \
--exclude='*.o' --exclude='*.lo' --exclude='*.la' --exclude='*.so' \
--exclude='*.so.*' --exclude='*.a' --exclude=.libs/ --exclude=.deps/ \
--exclude=/libtool --exclude=config.status --exclude=config.log \
--exclude=config.cache --exclude='stamp-h*' \
"$SRC/" "$B/" || finish 1
# The CDE paths in the source, the step the pkgsrc recipe does before its
# configure (pre-configure) and tools/mcde-host.sh copies: CDE has /usr/dt,
# /etc/dt and /usr/bin/X11 written into its scripts and its programs, and a
# tree that keeps them builds a desktop that looks for dtsession in
# /usr/local/bin. Measured 2026-11-22 on the installed package: dtlogin
# started Xsession, Xsession read DT_BINPATH=/usr/local/bin, found no
# dtsession and fell back to xterm -- the greeter and the login were fine, the
# desktop was a bare terminal.
#
# /etc/dt -> the package's own configuration directory; /usr/mdt is the
# prefix configure uses, so a file that already says /usr/dt (none does) would
# only be rewritten once. A Makefile.am that changed gets .mcde-debian-regen,
# the same marker mcde-host.sh uses: autogen.sh has to run afterwards.
(cd "$B" && grep -rlI -e /usr/dt -e /etc/dt -e /usr/bin/X11 . \
--exclude-dir=pkgsrc --exclude-dir=pkgsrc-motif \
--exclude=configure --exclude=Makefile.in --exclude=aclocal.m4 \
--exclude-dir=.git) > "$B/.mcde-debian-subst" || finish 1
: > "$B/.mcde-debian-regen"
while IFS= read -r f; do
f=${f#./}
out=$B/$f.subst
cp -p "$B/$f" "$out" || finish 1
sed -e "s:/usr/bin/X11:/usr/bin:g" -e "s:/usr/dt:$PREFIX:g" \
-e "s:/etc/dt:$SYSCONF:g" "$B/$f" > "$out" || finish 1
if cmp -s "$out" "$B/$f"; then
rm -f "$out"
else
mv "$out" "$B/$f" || finish 1
case $f in
*Makefile.am) : > "$B/.mcde-debian-regen" ;;
esac
fi
done < "$B/.mcde-debian-subst"
# motif/'s Makefile.in, configure and aclocal.m4 were generated by automake
# 1.15 and autoconf of 2017, and their Makefiles name those programs
# (`missing aclocal-1.15'). This host has automake 1.19: a Makefile.am newer
@@ -187,6 +241,23 @@ if [ ! -f config.status ] ||
fi
nice -n 19 make -j"$JOBS" || finish $?
# The substitution above has to have reached the tree that gets installed.
# Without it Xsession says /usr/local/bin and the desktop is a bare xterm;
# that costs a flash and a login to notice, so it is checked here. Only the
# desktop's own path variables: /usr/local/bin inside a PATH list is a normal
# entry and not a sign that CDE_INSTALLATION_TOP was missed.
if [ -f "$B/programs/dtlogin/config/Xsession" ]; then
bad=$(sed -n 's/^[[:space:]]*\(DT_BINPATH\|DT_INSTALL\|DT_INSTALL_CONFIG\|DT_CONFIG\)=\(.*\)$/\1=\2/p' \
"$B/programs/dtlogin/config/Xsession" | grep '/usr/local')
if [ -n "$bad" ]; then
echo "${0##*/}: programs/dtlogin/config/Xsession still points at" >&2
echo " /usr/local -- the CDE paths were not substituted, the desktop" >&2
echo " would start without dtwm and without the front panel:" >&2
printf ' %s\n' $bad >&2
finish 1
fi
fi
# --- the installation -------------------------------------------------------
rm -rf "$STAGE" || finish 1
make install DESTDIR="$STAGE" >"$B/.install.log" 2>&1 ||
+22 -4
View File
@@ -44,6 +44,24 @@ fi
DISTDIR=${DISTDIR:-$TOP/build/distfiles}
DIGEST=${DIGEST:-$TOP/build/pkg/bin/digest}
command -v "$DIGEST" > /dev/null 2>&1 || DIGEST=digest
HAVE_DIGEST=
command -v "$DIGEST" > /dev/null 2>&1 && HAVE_DIGEST=yes
# A digest value, from pkgsrc's digest(1) if it is there, else from cksum(1)
# on NetBSD. Never write an empty line: pkgsrc reads "BLAKE2s (...) = " as no
# checksum at all and refuses the package with "No checksum recorded"
# (measured 2026-11-20, the forks are packed before pkgtools/digest exists).
digest_of()
{
what=$1; file=$2
if [ "$HAVE_DIGEST" = yes ]; then
"$DIGEST" "$what" "$file" | sed 's/.* = //'
return
fi
case $what in
SHA512) cksum -a sha512 "$file" | awk '{ print $NF }' ;;
esac
}
# respect the shared userland lock: do not overwrite a dist others are using.
# The userland run that calls this script holds it (MX_USERLAND_LOCK): it
@@ -106,14 +124,14 @@ if [ "$DISTDIR" != "$MXDIST" ]; then
fi
size=$(wc -c < "$OUT" | tr -d ' ')
b2s=$("$DIGEST" BLAKE2s "$OUT" | sed 's/.* = //')
sha=$("$DIGEST" SHA512 "$OUT" | sed 's/.* = //')
b2s=$(digest_of BLAKE2s "$OUT")
sha=$(digest_of SHA512 "$OUT")
{
echo '$NetBSD$'
echo
echo "BLAKE2s ($NAME.tar.gz) = $b2s"
echo "SHA512 ($NAME.tar.gz) = $sha"
[ -n "$b2s" ] && echo "BLAKE2s ($NAME.tar.gz) = $b2s"
[ -n "$sha" ] && echo "SHA512 ($NAME.tar.gz) = $sha"
echo "Size ($NAME.tar.gz) = $size bytes"
} > "$RECIPE/distinfo"
# the other recipes of the same archive (pkgsrc-motif: x11/mcde-motif)
+32 -4
View File
@@ -63,6 +63,33 @@ aarch64) PARCH=aarch64 ;;
esac
[ -x "$PKGADMIN" ] || die "no pkg_admin at $PKGADMIN (the pkgsrc bootstrap, AGENTS.md)"
# sha256 of stdin: sha256sum on Linux, cksum(1) on NetBSD (no sha256sum there)
sha256_in()
{
if command -v sha256sum > /dev/null 2>&1; then
sha256sum | cut -d' ' -f1
else
cksum -a sha256 | awk '{ print $NF }'
fi
}
# the newest of the package names on stdin, by pkgsrc's own version rules
# (pkg_admin pmatch "name>version"). `sort -V' did this before; NetBSD's
# sort(1) has no -V, the pipe gave nothing and every package counted as "not
# published" while the script still ended with 0 (measured 2026-11-20).
newest()
{
nbest=
while read -r ncand; do
[ -n "$ncand" ] || continue
if [ -z "$nbest" ] ||
"$PKGADMIN" pmatch "${nbest%-*}>${nbest##*-}" "$ncand" 2>/dev/null; then
nbest=$ncand
fi
done
[ -z "$nbest" ] || echo "$nbest"
}
REPO=$BASE/$PARCH/$BRANCH/All
OUT=$TOP/build/packages/$ARCH
mkdir -p "$OUT/All" || exit 1
@@ -77,9 +104,9 @@ SUMMARY=$OUT/pkg_summary.repo.gz
# last good fetch, and every file still there with its size: nothing to do.
# Resolving the closure again cost about two minutes of every make userland
# (some 1100 awk passes over the index, no download; measured 2026-11-17).
fetchkey=$( { echo "$ARCH $BRANCH $REPO"; sha256sum < "$SUMMARY"
fetchkey=$( { echo "$ARCH $BRANCH $REPO"; sha256_in < "$SUMMARY"
"$TOP/tools/pkglist.sh" fetch; "$TOP/tools/pkglist.sh" games
"$TOP/tools/pkglist.sh" museum; } | sha256sum | cut -d' ' -f1)
"$TOP/tools/pkglist.sh" museum; } | sha256_in)
if [ "$CMD" = fetch ] && [ -s "$OUT/All/pkg_summary.gz" ] &&
[ -s "$OUT/.fetch-files" ] &&
[ "$(cat "$OUT/.fetch-key" 2>/dev/null)" = "$fetchkey" ]; then
@@ -119,7 +146,7 @@ best()
awk -F'\t' -v b="$b" '{ n = $1; sub(/-[0-9].*/, "", n); if (n == b) print $1 }' "$tmp/index" |
while read -r cand; do
"$PKGADMIN" pmatch "$1" "$cand" 2>/dev/null && echo "$cand"
done | LC_ALL=C sort -V | tail -1
done | newest
}
# the wanted packages, by PKGPATH: the name of a package is not the last part
@@ -128,7 +155,7 @@ best()
: > "$tmp/want"
for p in $("$TOP/tools/pkglist.sh" fetch; "$TOP/tools/pkglist.sh" games; "$TOP/tools/pkglist.sh" museum); do
n=$(awk -F'\t' -v p="$p" '$5 == p { print $1 }' "$tmp/index" |
LC_ALL=C sort -V | tail -1)
newest)
if [ -n "$n" ]; then echo "$n" >> "$tmp/want"; else echo "${p##*/}" >> "$tmp/want"; fi
done
[ -s "$tmp/want" ] || die "no packages named (packages.list: fetch)"
@@ -155,6 +182,7 @@ while [ -n "$queue" ]; do
queue="$queue $deps"
done
sort -u "$tmp/done" > "$tmp/pkgs"
[ -s "$tmp/pkgs" ] || die "none of the wanted packages found in $REPO/pkg_summary.gz"
total=0
while read -r p; do
+146
View File
@@ -0,0 +1,146 @@
#!/bin/sh
# Build pkgsrc packages inside the target sysroot (build/obj/destdir.<arch>),
# the way NetBSD builds its own packages: chroot into the target system, build
# with its compiler, its libraries and its package tools, install into its
# /usr/pkg. Nothing of the build host ends up in the package.
#
# License: CNCL 1.0 (see LICENSE at the root of the tree)
set -eu
# mount(8), umount(8) and chroot(8) live in /sbin and /usr/sbin; a build
# started from cron or over ssh may come with a PATH that has neither
PATH=$PATH:/sbin:/usr/sbin
export PATH
TOP=$(cd "$(dirname "$0")/.." && pwd)
ARCH=${ARCH:-amd64}
D=$TOP/build/obj/destdir.$ARCH
SB=$TOP/build/sandbox
MNT=$D/mnt
umount_all()
{
# NetBSD's mount(8) prints "source on target type fs (local)": the target is
# the field after "on", not $2. Unmounting a parent before its children
# leaves mounts on a detached tree, and a second mount on the same target
# stacks -- lookups then find the bottom layer, an empty old directory.
# So: deepest first (reverse mount order), repeatedly, until nothing is left.
targets=$(mount |
awk -v p=" on $D/" 'index($0, p) {
sub(/^.* on /, ""); sub(/ type .*/, ""); print
}' | sed -n '1!G;h;$p')
for t in $targets; do
while mount | awk -v x=" on $t type" 'index($0, x)' | grep -q .; do
umount "$t" || break
done
done
}
sandbox_mount()
{
# A mount that outlived its directory shows an empty tree (the null mount
# keeps the vnode of the old one): start from nothing, every time.
umount_all
mkdir -p "$SB/work" "$TOP/build/packages"
# The sysroot's /dev belongs to the sets and must stay as they describe it.
# The build needs working device nodes, so it gets a tmpfs that is thrown
# away afterwards (the nodes come from the sysroot's own MAKEDEV).
if ! mount | grep -q " on $D/dev "; then
cp -p "$D/dev/MAKEDEV" "$SB/MAKEDEV"
cp -p "$D/dev/MAKEDEV.local" "$SB/MAKEDEV.local" 2>/dev/null || true
mount -t tmpfs tmpfs "$D/dev"
cp -p "$SB/MAKEDEV" "$D/dev/MAKEDEV"
cp -p "$SB/MAKEDEV.local" "$D/dev/MAKEDEV.local" 2>/dev/null || true
if ! chroot "$D" /bin/sh -c 'cd /dev && ./MAKEDEV all' >/dev/null 2>&1; then
echo "pkgchroot: MAKEDEV failed in the sysroot" >&2
fi
fi
mount | grep -q " on $MNT " || {
mount -t tmpfs tmpfs "$MNT"
mkdir -p "$MNT/pkgsrc" "$MNT/distfiles" "$MNT/work" \
"$MNT/packages" "$MNT/tmp"
}
mount | grep -q " on $MNT/pkgsrc " ||
mount -t null "$TOP/pkgsrc" "$MNT/pkgsrc"
mount | grep -q " on $MNT/distfiles " ||
mount -t null "${DISTFILES:-$TOP/distfiles}" "$MNT/distfiles"
trap 'umount_all' EXIT INT TERM HUP
mount | grep -q " on $MNT/work " ||
mount -t null "$SB/work" "$MNT/work"
# the binary packages go where the cross build puts them, so tools/make_repo
# and the sysinst repository see one directory on either host
mount | grep -q " on $MNT/packages " ||
mount -t null "$TOP/build/packages" "$MNT/packages"
}
# The base bmake does not read MAKECONF, and a mk.conf in the sysroot's /etc
# would be an extra file for checkflist: the settings travel as make arguments,
# which every sub-make inherits. `install' builds the package and installs it
# into /usr/pkg -- which, inside the chroot, is the sysroot's /usr/pkg.
sandbox_run()
{
c=$1
p=${1%/*}
mkdir -p "$SB/work/$p"
# docbook's stylesheets are local: without the catalog libxslt resolves the
# URL in the stylesheet PI and stops with "failed to load external entity
# http://docbook.sourceforge.net/..." when the build host has no route to it
# (measured 2026-11-21: xmlto, a dependency of wm/mcde, on the MacBook).
catalog=/usr/pkg/share/xsl/docbook/catalog.xml
[ -f "$D$catalog" ] || catalog=
chroot "$D" /usr/bin/env -i \
PATH=/usr/sbin:/usr/bin:/sbin:/bin \
HOME=/mnt/work \
TMPDIR=/mnt/tmp \
XML_CATALOG_FILES=$catalog \
/usr/bin/make -C "/mnt/pkgsrc/$c" \
WRKOBJDIR=/mnt/work \
PACKAGES=/mnt/packages \
DISTDIR=/mnt/distfiles \
"${2:-install}"
}
# Programs the packages run while they are installed write state into the
# sysroot: fontconfig's cache (a font tool runs), MCDE's /var/dt (dtappgather
# at install) and the temporary files of the guide build. None of it is part
# of a set, and checkflist counts every one of them as an extra file (602 on
# 2026-11-20); none of these three paths is in a base set.
sandbox_clean()
{
rm -rf "$D/var/cache" "$D/var/dt" "$D/var/spool/calendar"
# the refcount index the package tools keep beside the database: no
# record of it is in METALOG, so checkflist counts it as an extra file
rm -rf "$D/usr/pkg/pkgdb.refcount"
rm -rf "$D"/tmp/dtinfogen-* "$D"/tmp/style_sheet.*
}
case ${1:-} in
umount) umount_all ;;
mount) sandbox_mount; echo "pkgchroot: mounted" ;;
build)
shift
sandbox_mount
for p in "$@"; do
echo "=== pkgchroot: $p"
sandbox_run "$p" install
done
sandbox_clean
echo "pkgchroot: packages in build/packages/All"
;;
force)
# the recipe changed but the version did not: `install' sees the package
# already recorded and does nothing, so the work directory is thrown away
# and the package installed again (measured 2026-11-21: the System
# Settings change went into no build at all)
shift
sandbox_mount
for p in "$@"; do
echo "=== pkgchroot (force): $p"
sandbox_run "$p" clean
sandbox_run "$p" reinstall
done
sandbox_clean
echo "pkgchroot: packages in build/packages/All"
;;
*) echo "usage: $0 mount|umount|build|force <pkgsrc/path>..." >&2; exit 2 ;;
esac
+72 -7
View File
@@ -79,12 +79,12 @@ X11_TYPE= native
PREFER_PKGSRC=
PREFER_NATIVE= yes
# Archives live outside the repository (AGENTS.md); work directories are build
# output and stay under build/ so a package build never dirties pkgsrc/.
# The archives: the Makronix-only set of them (tools/makronix-distfiles.sh) --
# distfiles/ at the top of the tree when the source set was unpacked, else the
# shared distfiles/ beside the tree (AGENTS.md: archives live outside), else
# build/distfiles where `makronix-distfiles.sh fetch' puts them.
# The archives are part of the repository: distfiles/ at the top of the tree,
# the Makronix-only set of them (tools/makronix-distfiles.sh, AGENTS.md).
# Work directories are build output and stay under build/ so a package build
# never dirties pkgsrc/. The fallbacks -- a shared distfiles/ beside the
# tree, else build/distfiles where `makronix-distfiles.sh fetch' puts them --
# are for a tree that does not carry the archives.
.if exists(${MAKRONIX_TOP}/distfiles)
DISTDIR= ${MAKRONIX_TOP}/distfiles
.elif exists(${MAKRONIX_TOP}/../distfiles)
@@ -165,7 +165,16 @@ CONFIGURE_ARGS+= --with-sysroot=${CROSS_DESTDIR}
# /usr/include, build/logs/userland-2026-11-13t.log:155). Pointed at the
# sysroot it finds the target's X, as it would on a NetBSD host, where
# /usr/X11R7 *is* the native X.
.if ${PKGPATH} == "pkgtools/x11-links"
#
# Only where the host has no X of its own. On Makronix the override doubled
# the sysroot: x11-links includes the file list of an X package only when
# USE_BUILTIN is yes, and the builtin checks put _CROSS_DESTDIR in front of
# X11BASE again (destdir/destdir/usr/X11R7) -- libX11, libXrender, xorgproto
# came out "not builtin", their files were not linked, and x11/libXft stopped
# with "Package 'x11' not found" (measured 2026-11-20 on makronix-build).
# There /usr/X11R7 is the native X the comment above means, and the links point
# where the target has the files.
.if ${PKGPATH} == "pkgtools/x11-links" && !exists(/usr/X11R7/include/X11/X.h)
X11BASE= ${CROSS_DESTDIR}/usr/X11R7
.endif
@@ -177,6 +186,40 @@ X11BASE= ${CROSS_DESTDIR}/usr/X11R7
# x86_64--netbsd- or nb), so it cannot shadow a wrapper that comes before it.
PREPEND_PATH+= ${TOOLDIR}/bin
# The tools the build host RUNS (autoreconf/libtoolize, flex, bison, the docbook
# tools) are built into the bootstrap prefix by tools/userland.sh host_tools().
# They have to be found by name: on NetBSD the bootstrap's bin was not on the
# path of the target build and autoreconf stopped with "Can't exec libtoolize"
# (measured 2026-11-20, wm/mcde on makronix-build). One place names them.
HOST_TOOLS_BIN= ${MAKRONIX_TOP}/build/pkg/bin
PREPEND_PATH+= ${HOST_TOOLS_BIN}
# The X of the build HOST, for the tools that are built and run here (makestrs,
# wml, wmldbcreate, autoreconf helpers). PREFIX is the target's /usr/pkg, so it
# cannot answer this. A host with its own X (Makronix) uses it; a Linux host
# has none and uses the stub tree the bootstrap's X packages put under PREFIX.
# Recipes name these two variables and ask nothing about the host themselves.
.if exists(/usr/X11R7/include/X11/Xos.h)
HOST_X11BASE= /usr/X11R7
HOST_X11_LIBS= /usr/X11R7/lib/libXt.a /usr/X11R7/lib/libX11.a \
/usr/X11R7/lib/libSM.a /usr/X11R7/lib/libICE.a
HOST_FL_A= /usr/lib/libfl.a
.else
HOST_X11BASE= ${PREFIX}
HOST_X11_LIBS= ${MAKRONIX_TOP}/build/pkg/lib/libXt.a \
${MAKRONIX_TOP}/build/pkg/lib/libX11.a \
${MAKRONIX_TOP}/build/pkg/lib/libSM.a \
${MAKRONIX_TOP}/build/pkg/lib/libICE.a
HOST_FL_A= ${MAKRONIX_TOP}/build/pkg/lib/libfl.a
.endif
# Flags for programs the build host runs (makestrs, wml, tradcpp, ...). gcc on
# NetBSD links PIE by default and pkgsrc asks for -pie, so a host object built
# without -fPIE stops the link ("relocation R_X86_64_32 ... can not be used
# when making a PIE object", tradcpp in wm/mcde, measured 2026-11-20). The
# dialect is the fork's 1990s C, not the host compiler's C23 default.
HOST_BUILD_CFLAGS= -O2 -std=gnu17 -fPIE
# lang/tcl (a dependency of wm/mcde: dtksh, tclsh) asks uname which system it
# builds for -- the build HOST. On this Linux host configure chose the Linux
# link loader (tcl_cv_sys_version='Linux-7.1.3+deb14-amd64', DL_OBJS=tclLoadDl.o,
@@ -228,7 +271,29 @@ MAKE_FLAGS+= stage1flex_CFLAGS=-std=gnu99
# include), and the wrapper passes it through untouched (measured 2026-11-13 in
# a work directory: ./cwrapper/bin/cc -c -I=/usr/X11R7/include compiles).
CPPFLAGS+= -I=${X11BASE}/include
# /usr/pkg/lib before the base X: a library pkgsrc builds because the base's is
# too old must be the one a package links. Measured 2026-11-20 on
# makronix-build: the base freetype is 2.10.4, pkgsrc wants >=2.13 and builds
# libfreetype.so.6, but fontconfig was linked against the base's
# libfreetype.so.19 through -L=/usr/X11R7/lib, and the next link stopped with
# "libfreetype.so.19, needed by libfontconfig.so.1.17.0, not found". Where
# pkgsrc builds nothing, /usr/pkg/lib has nothing and the base is found as
# before. rpath-link lets the linker follow NEEDED entries inside the sysroot.
LDFLAGS+= -L=/usr/pkg/lib
LDFLAGS+= -L=${X11BASE}/lib
# The cross libtool writes every .la dependency as "=$libdir/name"
# (cross-libtool-base, ltmain: newdependency_libs " ${lt_sysroot:+=}$libdir/
# $name"), so one taken from the buildlink tree ends up in the installed .la as
# "=<work>/.buildlink/lib/libpng16.la". pkgsrc's unwrap rule maps the
# buildlink tree back to LOCALBASE only without the "=", the path stayed, and
# the next package stopped with "libtool: error: '.../.buildlink/lib/
# libpng16.la' is not a valid libtool archive" (libfreetype.la, libgcrypt.la;
# measured 2026-11-20 on makronix-build). The same rule for the "=" form; the
# wrappers compare it as a prefix of the whole entry (cwrappers
# fixup-libtool.c).
_CWRAPPERS_UNWRAP+= =${BUILDLINK_DIR}:=${CROSS_LOCALBASE}
LDFLAGS+= -Wl,-rpath-link,${CROSS_DESTDIR}/usr/pkg/lib
LDFLAGS+= -Wl,-rpath-link,${CROSS_DESTDIR}/usr/X11R7/lib
# MCDE's documentation (man pages, help volumes, guides) is made by programs the
# build runs itself (instant, dtdocbook2infolib, the dthelp parsers): built for
+110 -18
View File
@@ -36,9 +36,30 @@ export MAKRONIX_TOP=$TOP
ARCH=amd64
PKGSRC=$TOP/pkgsrc
case $(uname -s) in
NetBSD) MODE=native; BMAKE=${BMAKE:-/usr/pkg/bin/bmake} ;;
*) MODE=cross; BMAKE=$TOP/build/pkg/bin/bmake ;;
# How the packages of the set are built. Both paths fill the same sysroot
# (build/obj/destdir.$ARCH, PREFIX /usr/pkg) and both end in the same makronix
# set; the difference is only how this host can build a Makronix program:
#
# chroot this host IS Makronix: chroot into the sysroot and build there with
# its compiler, its libraries and its package tools
# (tools/pkgchroot.sh). NetBSD builds its own packages this way.
# cross the host is not Makronix (Linux): pkgsrc cross-builds for the
# sysroot with this tree's toolchain (tools/pkgsrc-cross.mk.conf).
#
# Measured 2026-11-20: the cross path is what made x11-links, the cross
# libtool, freetype and the host X tools fail one after the other on
# makronix-build; in the chroot they build with no case for the host at all.
# USERLAND_MODE=native keeps the old branch for packages of the running host.
MODE=${USERLAND_MODE:-}
[ -n "$MODE" ] || case $(uname -s) in
NetBSD) MODE=chroot ;;
*) MODE=cross ;;
esac
case $MODE in
native) BMAKE=${BMAKE:-/usr/pkg/bin/bmake} ;;
chroot) BMAKE=$TOP/build/pkg/bin/bmake ;; # -V queries only; the build runs in the chroot
cross) BMAKE=$TOP/build/pkg/bin/bmake ;;
*) echo "userland: unknown USERLAND_MODE=$MODE" >&2; exit 1 ;;
esac
die()
@@ -47,6 +68,29 @@ die()
exit 1
}
# sha256 on Linux and on NetBSD (cksum(1) there; there is no sha256sum),
# the same helper tools/build-stamp.sh and tools/makronix-distfiles.sh carry.
# Without it every key here came out empty and the fork archives got no
# distinfo entry ("checksum: No checksum recorded" in pkgsrc/x11/mcde-motif,
# measured 2026-11-19 on makronix-build).
sha256_in()
{
if command -v sha256sum > /dev/null 2>&1; then
sha256sum | cut -d' ' -f1
else
cksum -a sha256 | awk '{ print $NF }'
fi
}
sha256_of()
{
if command -v sha256sum > /dev/null 2>&1; then
sha256sum "$1" | cut -d' ' -f1
else
cksum -a sha256 "$1" | awk '{ print $NF }'
fi
}
# serialize runs: another userland (or a dist invocation) holding the lock
# makes this one stop instead of overwriting shared distfiles (tasksd t0229)
LOCK=$TOP/build/.userland.lock
@@ -94,10 +138,11 @@ ensure_mkconf()
# and build/pkg/etc/mk-host.conf (if present), like the per-fork recipe key.
ensure_mk_key()
{
[ $MODE = cross ] || return 0
hc=$TOP/build/pkg/etc/mk-host.conf
kf=$TOP/build/pkgsrc-work/.makronix-mk-key
key=$( (cat "$TOP/tools/pkgsrc-cross.mk.conf"; [ -f "$hc" ] && cat "$hc") \
| sha256sum | cut -d" " -f1)
| sha256_in)
[ "$(cat "$kf" 2>/dev/null)" = "$key" ] && return 0
echo "userland: mk.conf changed, cleaning package work directories"
# every package that has a work directory for the target, not only the ones
@@ -120,6 +165,7 @@ ensure_mk_key()
# (tools/pkgsrc-cross.mk.conf, AGENTS.md "Third-party packages").
ensure_bootstrap()
{
[ $MODE = cross ] || return 0
[ -x "$BMAKE" ] && return 0
[ $MODE = cross ] || die "no $BMAKE (pkgsrc bootstrap, AGENTS.md)"
echo "=== pkgsrc bootstrap ($MODE)"
@@ -207,6 +253,16 @@ make_repo()
host_tools()
{
hc=$TOP/build/pkg/etc/mk-host.conf
# the archives: distfiles/ of the tree (they are part of the repository
# since 2026-11-19), else the shared directory beside it
HOSTDIST=$TOP/distfiles
[ -d "$HOSTDIST" ] || HOSTDIST=$TOP/../distfiles
# the awk of the bootstrap where it made one (a Linux host), else the
# system's: a bootstrap on NetBSD installs no nawk, and pointing at the
# missing file stopped every dependency check ("build/pkg/bin/nawk: not
# found", measured 2026-11-20 on the MacBook)
HOSTAWK=
[ -x "$TOP/build/pkg/bin/nawk" ] && HOSTAWK="TOOLS_PLATFORM.awk?= $TOP/build/pkg/bin/nawk"
cat > "$hc" <<CONF
# written by tools/userland.sh: pkgsrc for THIS host (no cross settings)
.ifdef BSD_PKG_MK
@@ -222,10 +278,10 @@ PKGMANDIR= man
PREFER_NATIVE= yes
X11_TYPE= modular
SKIP_LICENSE_CHECK= yes
DISTDIR= $TOP/../distfiles
DISTDIR= $HOSTDIST
WRKOBJDIR= $TOP/build/pkgsrc-work-host
PACKAGES= $TOP/build/packages-host
TOOLS_PLATFORM.awk?= $TOP/build/pkg/bin/nawk
$HOSTAWK
.endif
CONF
# Looking the tools up costs 38 s (84 package directories, two bmake runs
@@ -233,7 +289,7 @@ CONF
# the pkgsrc pin and this configuration are the same: keyed, and the key
# is written only after a run in which every tool was there or got built.
htkey=$( { "$TOP/tools/pkglist.sh" built; git -C "$PKGSRC" rev-parse HEAD
cat "$hc"; } | sha256sum | cut -d' ' -f1)
cat "$hc"; } | sha256_in)
htkf=$TOP/build/pkg/.makronix-host-tools-key
if [ "$(cat "$htkf" 2>/dev/null)" = "$htkey" ]; then
echo "userland: host tools unchanged"
@@ -286,7 +342,7 @@ fetch_binaries()
[ -d "$repo" ] || die "no binary packages in ${repo#$TOP/}"
dest=/usr/pkg
db=/usr/pkg/pkgdb
if [ $MODE = cross ]; then
if [ $MODE != native ]; then
dest=$TOP/build/obj/destdir.$ARCH/usr/pkg
db=$dest/pkgdb
fi
@@ -305,7 +361,7 @@ fetch_binaries()
# ksh93: "missing required library: /usr/lib/libc.so.12"
# (build/logs/pkg-add-ksh93.log, 2026-11-14), and wm/mcde, which
# needs it, failed again building it from source
if [ $MODE = cross ]; then
if [ $MODE != native ]; then
set -- -P "$TOP/build/obj/destdir.$ARCH" -K /usr/pkg/pkgdb
else
set -- -K "$db"
@@ -349,13 +405,41 @@ fork_reconfigure()
ensure_bootstrap
echo "userland: $MODE build on $(uname -s)"
if [ $MODE = cross ]; then
ensure_mkconf
ensure_pkgdb
fi
[ $MODE = cross ] && ensure_mkconf
# both paths install into the sysroot; a pkg_add that died leaves its by-file
# index pointing at files nobody owns, and the next install of that package
# stops with "conflicting PLIST" (see ensure_pkgdb)
[ $MODE != native ] && ensure_pkgdb
# the time of each step in the log: where a run spends its minutes
phase() { echo "userland: [$(date +%T)] $*"; }
# Every package in the sysroot was built the same way, and its .la files say
# which way: a cross build writes "=/usr/pkg/lib/..." and a path into its
# work tree, a native one writes the plain path. Mixing both does not link --
# measured 2026-11-21: the MacBook kept the cross libgcrypt.la (pkg_add sees
# the same version already installed) and xmlto stopped with "'/usr/pkg/lib/
# libintl.la' is not a valid libtool archive". A change of way starts from an
# empty /usr/pkg; the old tree stays under build/ for inspection.
sf=$TOP/build/.sysroot-mode
pkgdir=$TOP/build/obj/destdir.$ARCH/usr/pkg
if [ -d "$pkgdir" ] && [ -n "$(ls -A "$pkgdir" 2>/dev/null)" ] &&
[ "$(cat "$sf" 2>/dev/null)" != "$MODE" ]; then
old=$TOP/build/usr-pkg.$(cat "$sf" 2>/dev/null || echo unknown)-$(date +%Y%m%d-%H%M)
mv "$pkgdir" "$old" ||
die "could not move the sysroot's /usr/pkg aside"
echo "userland: /usr/pkg was built as $(cat "$sf" 2>/dev/null || echo another way), this run is $MODE -- kept as ${old#$TOP/}"
mkdir -p "$pkgdir"
# the work directories belong to the same way: a cross work directory
# keeps its .depends_done and would install a package whose dependencies
# this sysroot no longer has
if [ -d "$TOP/build/sandbox/work" ] && [ -n "$(ls -A "$TOP/build/sandbox/work" 2>/dev/null)" ]; then
mv "$TOP/build/sandbox/work" "$old-work" ||
die "could not move the work directories aside"
fi
fi
mkdir -p "$pkgdir"
printf '%s\n' "$MODE" > "$sf"
phase "archives of the forks"
ext_prepare
phase "binary packages"
@@ -364,6 +448,13 @@ phase "host tools"
[ $MODE = cross ] && host_tools
ensure_mk_key
failed=
if [ $MODE = chroot ]; then
for p in $("$TOP/tools/pkglist.sh" built); do
phase "package $p"
echo "=== chroot: $p"
"$TOP/tools/pkgchroot.sh" build "$p" || failed="$failed $p"
done
else
for p in $("$TOP/tools/pkglist.sh" built); do
# a fork of ext/ starts from a clean work directory when its recipe
# changed -- otherwise pkgsrc keeps the old configure. A new archive
@@ -375,7 +466,7 @@ for p in $("$TOP/tools/pkglist.sh" built); do
forkclean=
case " $(echo $FORKS) " in
*" $p "*)
key=$(cd "$PKGSRC/$p" && find . -type f ! -name distinfo ! -name PLIST | sort | xargs cat | sha256sum | cut -d" " -f1)
key=$(cd "$PKGSRC/$p" && find . -type f ! -name distinfo ! -name PLIST | sort | xargs cat | sha256_in)
kf=$TOP/build/pkgsrc-work/$p/.makronix-recipe-key
if [ "$(cat "$kf" 2>/dev/null)" != "$key" ]; then
fork_reconfigure "$p"
@@ -387,7 +478,7 @@ for p in $("$TOP/tools/pkglist.sh" built); do
fi
# the PLIST changed: install and package again, nothing else
pk=$TOP/build/pkgsrc-work/$p/.makronix-plist-key
pkey=$(sha256sum < "$PKGSRC/$p/PLIST" | cut -d" " -f1)
pkey=$(sha256_in < "$PKGSRC/$p/PLIST")
if [ "$(cat "$pk" 2>/dev/null)" != "$pkey" ]; then
w=$(ls -d "$TOP/build/pkgsrc-work/$p"/work.* 2>/dev/null | head -1)
[ -z "$w" ] || rm -f "$w/.install_done" "$w"/.PLIST*
@@ -418,7 +509,7 @@ for p in $("$TOP/tools/pkglist.sh" built); do
if [ -n "$pn" ] && "$TOP/build/pkg/sbin/pkg_info" \
-K "$TOP/build/obj/destdir.$ARCH/usr/pkg/pkgdb" -e "$pn" > /dev/null 2>&1; then
# idempotent: only reinstall when the recipe, archive or distinfo changed
cand="$key:$(sha256sum "$archive" 2>/dev/null | cut -d' ' -f1)"
cand="$key:$(sha256_of "$archive" 2>/dev/null)"
if [ "$(cat "$TOP/build/pkgsrc-work/$p/.installed-key" 2>/dev/null)" != "$cand" ]; then
"$TOP/build/pkg/sbin/pkg_delete" -f -P "$TOP/build/obj/destdir.$ARCH" \
-K /usr/pkg/pkgdb "$pn" > "$TOP/build/logs/pkg-delete-$pn.log" 2>&1 ||
@@ -458,6 +549,7 @@ for p in $("$TOP/tools/pkglist.sh" built); do
fi ;;
esac
done
fi
phase "set and repository"
if [ $MODE != native ] && [ -z "$failed" ]; then
@@ -465,8 +557,8 @@ if [ $MODE != native ] && [ -z "$failed" ]; then
# wml ...) must be a binary of this host; one built for the target stops
# a cross build far from the cause (tasksd t0197). Measured ok on
# build/logs/userland-2026-11-15a.log.
"$TOP/tools/check-buildtools.sh" ||
die "a build tool of a fork was built for the target (check-buildtools above)"
[ $MODE = cross ] && { "$TOP/tools/check-buildtools.sh" ||
die "a build tool of a fork was built for the target (check-buildtools above)"; }
"$TOP/tools/makronix-set.sh"
fi
make_repo