Commit Graph
22 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 ca01d56c9d 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>
2026-11-22 22:01:30 +00:00
lotherk bfb8f1a32e source set: one tree, usr/src, the whole repository
The source medium carried six sets: NetBSD's src, gnusrc, syssrc and
sharesrc at /usr/src, xsrc at /usr/xsrc and msrc at /usr/msrc.  Makronix is
one tree, so there is one set now: src.tgz, unpacked to /usr/src, with the
repository as it is -- src/, xsrc/, ext/, pkgsrc/, mobile/, www/, docs/,
tools/, the root files, PINS, packages.list, distfiles.lst and distfiles/
(only the archives of the Makronix packages).

- makesrctars -m packs the staged tree as usr/src and skips the split sets.
  It keeps the modes and the links of the repository (pkgsrc and tools run
  their scripts directly); build.sh gets the directory as MAKROSRCDIR.
- tools/srctree-stage.sh replaces tools/msrc-stage.sh.  It copies git's file
  list of the root repository and of pkgsrc (tracked files plus the untracked
  Makronix recipes: AGENTS.md, wm/mcde, x11/mcde-motif,
  filesystems/afpfs-ng), stages the distfiles, and puts the pkgsrc patch
  names that ustar cannot store into pkgsrc-longnames.cpio.
- makesrctars removes source sets of the old layout from
  RELEASEDIR/source/sets before it writes, so no stale gnusrc/msrc/xsrc can
  travel on a medium.

Measured: tools/srctree-stage.sh -> 462655 entries, 11 GB, 214 names in
pkgsrc-longnames.cpio; make sourcesets verified distfiles.lst (2010 archives,
0 missing, 0 wrong hash) and wrote RELEASEDIR/source/sets/src.tgz
(build/logs/sourcesets-2026-11-15.log).

The installer side is not in this commit: it is being changed in the same
tree by the sysinst profile work (tasksd t0260) -- one SET_SRC, the long-name
extraction from /usr/src/pkgsrc, the messages and sysinst.8.
docs/OFFLINE-BUILD.md, docs/BUILD-VM.md, docs/LICENSES.md and GOAL.md
describe the one tree.
2026-11-15 21:45:20 +00:00
lotherkandClaude Sonnet 5.5 a9eb2d5e05 pkgsrc-cross.mk.conf: MCDE without docs and appbuilder in a cross build, the flex host settings; Makefile: KERNEL variable; the state the 0.99.10 image of 2026-11-15 02:11 was built from
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 04:42:12 +00:00
lotherk 021885cd9d cross: flex is built without NLS, and the installed .la files lose libtool's '=' buildlink paths
Two more stops from build/logs/userland-2026-11-14h.log:

- devel/flex linked stage1flex without libintl: its gnulib decides gettext is
  needed in a cross build but adds no library, 'undefined reference to gettext'
  (log:393-398).  The target's base has no libintl, and flex's messages do not
  need translating: PKG_OPTIONS.flex= -nls, which its own option turns into
  --disable-nls (verified with show-var: CONFIGURE_ARGS carries it).
- wm/mcde stopped linking ttdbck on libXm.la: libtool had recorded a
  sysroot-relative '=<workdir>/.buildlink/lib/libpng16.la' in dependency_libs, so
  the consumer looked for <sysroot>/<workdir>/... (log:5370ff).  pkgsrc rewrites
  dependency_libs (mk/buildlink3/bsd.buildlink3.mk:859ff) but not a path starting
  with '='.  The Motif recipe's post-install gives the installed .la files the
  target's path.
2026-11-14 06:29:56 +00:00
lotherk 3ee21a4e6f cross: flex's gnulib malloc/realloc answers, and MCDE's configure asks the host's OS
devel/flex stopped after the mk.conf-change clean: gnulib's configure cannot run
its malloc/realloc tests while cross-compiling, assumes them broken and wants
rpl_malloc/rpl_realloc, which the build does not compile ('implicit declaration
of function rpl_malloc', build/logs/userland-2026-11-14g.log:26-386).  The two
cache answers are given for the target, as the afpfs-ng recipe already does.

wm/mcde stopped in lib/tt/mini_isam: 'unknown type name u_short'.  MCDE's
configure picked its OS-specific macros from build_os -- the machine running
configure, linux-gnu here -- so the Linux branch added -D_POSIX_SOURCE, which
hides NetBSD's u_short (build/logs/userland-2026-11-14g.log:7124ff).  The OS that
decides the target's macros and sources is host_os; in a native build the two are
the same, so nothing changes there.
2026-11-14 06:21:15 +00:00
lotherk 78dddddb9b cross: lang/tcl names the target's system, not the build host's
tcl's configure asks uname which system it builds for and picks the link loader
from the answer: on this Linux host it took the Linux one
(tcl_cv_sys_version='Linux-7.1.3+deb14-amd64', DL_OBJS=tclLoadDl.o,
DL_LIBS=-ldl; the work directory's config.log:2572-2601) and the shared library
then stopped on '-ldl: No such file or directory', because the target keeps
dlopen in libc (build/logs/userland-2026-11-14f.log:9467).  wm/mcde depends on tcl
for dtksh.  configure honours tcl_cv_sys_version when it is preset
(configure:6363), so the target's system is named in the cross configuration;
the work directory was cleaned so the value takes effect (t0168).
2026-11-14 06:14:04 +00:00
lotherkandClaude Opus 5.5 b4fd7f76ce pkgsrc cross: cross-libtool-base with --with-sysroot -- shared libraries kept their X dependencies only on a NetBSD host
cross/cross-libtool-base keeps a dependency library of a shared library
only if it finds the file in the linker path (deplibs_check_method
match_pattern).  Without a sysroot it looked for -L=/usr/X11R7/lib on
this Linux host, found no X there and dropped them: libXm.so came out
without libXt, libX11, libXext, libXmu ("linker path does not have real
file for library -lXt", userland-2026-11-14e.log), and wm/mcde's
configure stopped with "no Motif (libXm) to link with"
(mcde-single-2026-11-14.log).  On a NetBSD host /usr/X11R7 exists, which
is why pkgsrc does not need this there.  libtool's answer for a cross
build is a sysroot; set for that one package here.

Measured: the rebuilt libtool has lt_sysroot=<destdir>; mcde-motif
rebuilt with it (motif-sysroot-2026-11-14.log, replace exit=0) -- libXm.so
NEEDED libXmu, libXt, libXft, libXrender, libXext, libX11 and the rest.
Libraries cross-built before this keep the old links until rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:57:14 +00:00
lotherk 3be03c2b9a cross: the tooldir's bin is on the package PATH -- ksh93 runs $CC by name
wm/mcde's dependency shells/ksh93 builds through its own bin/package, which
wants the compiler as a program: 'cc: not found -- set CC=C-compiler'
(build/logs/userland-2026-11-14c.log:5299).  pkgsrc's CC in a cross build is
x86_64--netbsd-gcc from the tooldir, which is not in the PATH pkgsrc assembles
for a package.  PREPEND_PATH adds it; every name in that directory is prefixed
(x86_64--netbsd-* or nb*, measured), so nothing there shadows the wrappers that
come earlier.
2026-11-14 00:11:15 +00:00
lotherk 4facdf5c9b userland cross: the target's X is reachable to the compiler, and libXft's missing prototype is brought in
fonts/Xft2 stopped at three X problems in a row (build/logs/userland-2026-11-13t.log,
build/logs/xft2-single*.log):

- x11-links builds a shadow tree from ${X11BASE}/<file> and /usr/<file>, both this
  host's paths in a cross build: it linked Debian's xorgproto headers and never
  Xrender.h.  For that one package X11BASE is now the sysroot's /usr/X11R7.
- mk/x11.buildlink3.mk:31 passes --x-includes=/usr/X11R7/include, and neither
  --sysroot nor the cwrappers make that resolve here (tested: plain gcc with
  --sysroot still fails; the wrapper rewrites the path into a shadow tree of the
  host's X).  GCC's sysroot-relative form works and the wrapper passes it
  through untouched (tested in a work directory): CPPFLAGS+= -I=${X11BASE}/include,
  LDFLAGS+= -L=${X11BASE}/lib.
- libXft 2.1.7 calls FT_GlyphSlot_Embolden with no declaration in scope and GCC
  14 errors on that; configure proves the symbol is in the library, the prototype
  is in <freetype/ftsynth.h>, so that header is included for the package.

fonts/Xft2 now builds and installs (build/logs/xft2-single4-2026-11-13.log
exit=0).  tools/userland.sh's comment records that a CFLAGS change in the
fragment needs a clean work directory.
2026-11-13 22:43:42 +00:00
lotherk fafd1d1d6b userland cross: fonts/Xft2 declares c++, and the sysroot's by-file index is repaired before the build
Two stops measured in build/logs/userland-2026-11-13r.log:

x11/mcde-motif died in its dependency fonts/Xft2: libXft 2.1.7 runs
AC_PROG_CXX although it is a C package, and pkgsrc puts its fail-wrapper in the
compiler path for every language a package does not ask for
(mk/compiler.mk:380).  The probe answered 'no', configure fell back to 'cpp' and
stopped with 'C++ preprocessor "cpp" fails sanity check' (log:1521; the call
with PKGSRC-WARNING in Xft2's config.log:314-318).  USE_LANGUAGES+= c++ for
PKGPATH fonts/Xft2 in tools/pkgsrc-cross.mk.conf -- pkgsrc/ is not patched
(pkgsrc/AGENTS.md), and the recipe fix for our own forks is in ext/.

wm/mcde and mcde-motif before that: pkg_add refused x11-links-1.37 with
'conflicting PLIST with x11-links-1.37: share/x11-links/include/EGL/eglext.h'.
The sysroot's pkgdb.byfile.db held 751 x11-links entries for a package the
pkgdb no longer knew (an interrupted pkg_add; pkg_add reads that index in
src/external/bsd/pkg_install/dist/add/perform.c:1125).  userland.sh now runs
pkg_admin rebuild on it before the cross stage.
2026-11-13 22:23:07 +00:00
lotherkandClaude Opus 5.5 175e4d29c4 X in the base again: build.sh -x -X xsrc, X11_TYPE=native; unpatched packages as NetBSD binaries
- Makefile: -x -X $(XSRC); build-stamp keys on xsrc/ too; PINS and
  makronix-pins.sh carry xsrc/BASE.
- pkgsrc-cross.mk.conf: X11_TYPE=native (pkgsrc uses the sysroot's /usr/X11R7).
- packages.list: no pkgsrc X any more (the X sets carry server, drivers,
  fonts, clients); built here only the forks of ext/ (MCDE, Motif,
  afpfs-ng) and flex; vim, git, samba, netatalk, sshfs, borg, pulseaudio,
  pavucontrol, cups, firefox, thunderbird and the games (RetroArch with
  all libretro cores, ScummVM with BASS and FOTAQ, Tux Racer) are the
  NetBSD project's binaries (kind fetch).
- pkg-binaries.sh: resolve by PKGPATH (samba4 is samba-4.x), an empty
  queue no longer trips set -u; cd3.sh top.list by PKGPATH as well.
- userland.sh: the host tools of the whole dependency closure.
- AGENTS.md, GOAL.md: the decision and why (measured: "The X-server can
  not be started on display :0").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:14:39 +00:00
lotherkandClaude Sonnet 5.5 efa96ca4f7 One package list: packages.list (kinds set/repo/fetch, @ARCH), read by tools/pkglist.sh; userland.sh detects cross or native and builds all of it; nothing is built in a VM any more
Removed: packages.{amd64,aarch64,binary*}.list, tools/packages.vm.list,
tools/vm-pkgbuild.sh, tools/vm-pkgcollect.sh, tools/vmbuild/, make binaries.
A package that fails no longer stops the others; they are named at the end.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 17:50:29 +00:00
lotherkandClaude Sonnet 5.5 5532f70f85 pkgsrc-cross: DISTDIR is the shared distfiles/ beside the tree when the live fragment is used; scripts ask bmake for ${DISTDIR:tA}
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 14:19:08 +00:00
lotherkandClaude Sonnet 5.5 15260ce07c AGENTS.md: short; the measurements and narratives moved to docs/reference; cross and native are one build, the VM only tests
NATIVE_CC for the cross build (devel/gmp CC_FOR_BUILD was empty).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 13:57:30 +00:00
lotherkandClaude Sonnet 5.5 5a3b7a4bae pkgsrc-cross: CC_FOR_BUILD is the host's gcc (devel/gmp did not configure)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 13:51:01 +00:00
lotherkandClaude Opus 5.5 57d89851de tools: pkgsrc accepts every licence
The user's decision (2026-11-11): cups-filters needs ghostscript-agpl,
which pkgsrc's default list refuses (build/logs/binaries-2026-11-10-a.log:
"unacceptable license condition: gnu-agpl-v3").  SKIP_LICENSE_CHECK=yes is
pkgsrc's own switch (mk/license.mk:285), in the cross configuration and in
the VM's mk.conf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:09:05 +00:00
lotherk 0d92091810 pkgsrc-cross: use the host tradcpp for modular-xorg-server's TOOL_DEPENDS 2026-11-09 23:47:59 +00:00
lotherk e7bd6d9407 tree: drop xsrc, track src, X from pkgsrc
- xsrc/ deleted; X11_TYPE=modular, Xorg and the X libraries come from pkgsrc
  (packages.list), in the cross configuration and the build VM.
- overlay/ and patches/ are gone; their content is in src/ (commit 64934f16).
- Makefile: no -x/-X, no overlay target, stamp no longer syncs an overlay.
- makronix-pins.sh: src/BASE + pkgsrc; msrc-stage: no .git/xsrc, src comes
  from the NetBSD source sets.
- AGENTS/GOAL/docs updated to the new model (src tracked, refs/ read-only).
- mobile: kernel source is refs/linux/7.0.0, patches stay in
  mobile/kernel/patches; fetch-kernel clones it locally and checks the pin.
2026-11-09 23:30:07 +00:00
lotherkandClaude Sonnet 5.5 6c714a0ea7 tools, Makefile, package lists: media (CD 2, CD 3), install tests, build VM, source sets, binary packages
make iso now also writes CD 2 (makronix set) and CD 3 (binary packages); make sourcesets/isosrc make the source sets and the DVD with them. tools: cd2.sh cd3.sh, install-simple.sh install-cgd.sh (end-to-end tests on the serial console), vmsh.sh devvm.sh (QEMU sessions, the kept build VM), vm-pkgbuild.sh vm-pkgcollect.sh (native pkgsrc builds), pkg-binaries.sh (the project's binary packages), host-nfs-setup.sh (NFS for the build VM; loopback-only through an nftables rule), makronix-distfiles.sh makronix-pins.sh msrc-stage.sh. Package lists: common, per platform, and binary.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:21 +00:00
makronix c923819a02 pkgsrc cross: NO_SKIP for the run-on-target tool check on a non-NetBSD host.
The tools it guards (awk:run, install-info:run) only ever see TARGET paths and
are never executed here; can-be-built-here.mk documents NO_SKIP for exactly
this case. Without it CDE stops before its first file is compiled.
2026-11-03 10:46:04 +00:00
Makronix Bot d642251347 pkgsrc: cross-build vim for the target, and give /usr/pkg its own set.
vim 9.2.1202 and vim-share build cross with the tree's toolchain
(x86_64--netbsd-gcc) and come out as NetBSD 11.99.9 ELF.  Two
configuration defects had to go first: bootstrap on a Linux host writes
PREFER_PKGSRC=yes, which made pkgsrc rebuild curses (devel/ncurses) for
the host and mix host and target in one build; and the fragment described
a target pkg_install that does not exist, since pkgtools/pkg_install
cannot cross-build.

The 'makronix' set is generated by tools/makronix-set.sh from what the
packages installed plus the METALOG records pkg_add does not write.
See AGENTS.md for the set, the bootstrap flag and where a Linux build
host stops.
2026-11-03 09:54:05 +00:00
lotherk 314f44dc90 pkgsrc: cross bootstrap against the tree's own toolchain.
The tree builds pkgsrc packages for NetBSD/amd64 with the tooldir and the
sysroot that build.sh produced; tools/pkgsrc-cross.mk.conf carries the whole
configuration as the bootstrap's mk-fragment.  Measured: devel/zlib comes out
"for NetBSD 11.99.9", installs into destdir.amd64/usr/pkg through pkgsrc's
bootstrap pkg_add with -p, and checkflist reports those files as extra until a
set lists them.

OPSYS_VERSION in the fragment was 119900900; bsd.prefs.mk computes it as
printf "%02d%02d%02d" of major/minor/patch, so 11.99.9 is 119909, and the
missing CROSS_LOWER_*/CROSS_OBJECT_FMT stop bsd.prefs.mk with "missing cross
variable settings".

Also: build/ is output and now ignored, the tick uses the absolute path to
hermes, and AGENTS.md names the import pins and how a build is gated.
2026-11-03 09:20:06 +00:00