News for hackers. Stuff that matters.
Re:NetBSD 9.0 by xvilka on Saturday February 15, 2020 @12:34PM (#22336602)
I am waiting for NetBSD to be available in SourceHut CI[1]. We already use it for FreeBSD and OpenBSD jobs, missing only one major OS - NetBSD.

[1] https://man.sr.ht/builds.sr.ht/compatibility.md

Re:NetBSD 9.0 by ddevault on Saturday February 15, 2020 @01:49PM (#22337078)
Please help! The image is almost complete:

https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/...

But I need a NetBSD expert to come in and put on the finishing touch: making the filesystem resize to fill the available space on the qcow2. Without this, the image cannot build a new version of itself which isn't smaller than the host image, leading to image shrinkage over time and eventual breakitude.

Re:NetBSD 9.0 by cnst on Saturday February 15, 2020 @02:15PM (#22337256)
It should be doable with the following rc.d configuration:

  resize_disklabel=YES
  resize_root=YES
The second script is available by default, but the first one is somehow hidden from general availability:

* http://bxr.su/n/distrib/utils/embedded/files/resize_disklabe...

* http://bxr.su/n/etc/rc.d/resize_root

You can fetch it raw, it seems to work great:

  cd /etc/rc.d/
  ftp http://bxr.su/raw/NetBSD/distrib/utils/embedded/files/resize_disklabel
  chmod +x resize_disklabel
The `resize_disklabel` script does handle `fdisk`, too. If it doesn't work for your usecase, might want to provide the output of running `/etc/rc.d/resize_disklabel` manually, together with `fdisk` and `disklabel` outputs, too.

P.S. BTW, you probably don't want to run `resize_root onestart` once the system is running multiuser — it passes `-y` to `resize_ffs`, which causes temporary filesystem corruption if the filesystem is running in `rw` mode.

Re:NetBSD 9.0 by ddevault on Saturday February 15, 2020 @03:40PM (#22337820)
Aye, but that doesn't seem to work. Check out the genimg script - it's already trying to set up resize_root. I've also tried resize_disklabel without success. What this needs isn't another well-meaning HN comment trying to debug by proxy - I need someone who knows how NetBSD works to get their hands dirty and get it done.
Re:NetBSD 9.0 by cnst on Saturday February 15, 2020 @03:57PM (#22337917)
The resize_root script wouldn't do anything if the fdisk and disklabel aren't adjusted (provided it's not a raw filesystem file that's being resized as in http://wiki.netbsd.org/amazon_ec2/build_your_own_ami/ page), so it's kind of expected that it doesn't work all by itself, and that https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/... is wrong.
Re:NetBSD 9.0 by tedunangst on Saturday February 15, 2020 @05:14PM (#22338386)
You should be able to create a vnd that's larger than the host filesystem if you don't fill it.
Re:NetBSD 9.0 by rjsw on Saturday February 15, 2020 @12:39PM (#22336629)
Why ? What are the benefits of using that ?
Re:NetBSD 9.0 by xvilka on Saturday February 15, 2020 @01:03PM (#22336779)
radare2 [1] is a portable tool and should work everywhere, like you expect to do the same from GDB, for example.

[1] https://github.com/radareorg/radare2

Re:NetBSD 9.0 by rjsw on Saturday February 15, 2020 @05:37PM (#22338519)
There is a radare2 package in pkgsrc, I presume it works.
Re:NetBSD 9.0 by xvilka on Saturday February 15, 2020 @09:01PM (#22339370)
We run our tests on different platforms, for example the native debugging and emulation, where platform differences can play the role. And we run them on every commit, to prevent regressions.
Re:NetBSD 9.0 by rjsw on Sunday February 16, 2020 @08:26AM (#22341443)
You still haven't explained what you want to do and why I (as a NetBSD developer) should be interested.
Re:NetBSD 9.0 by yjftsjthsd-h on Sunday February 16, 2020 @06:00PM (#22344274)
Sourcehut makes it easy to run CI for a lot of platforms at once. Helping it support netbsd helps developers target netbsd easily.
Re:NetBSD 9.0 by xvilka on Monday February 17, 2020 @09:23AM (#22347862)
For example, the emulation and debugger depends on the platform, so running debugging tests on CI helps us to improve and refactor corresponding code without much hassle.