Re: Using mmap(2) in sort(1) instead of temp files

2024-04-04 Thread Martin Husemann
On Thu, Apr 04, 2024 at 12:02:30PM +, Ice Cream wrote: > Given the issues about using mmap, can anybody suggest how > I should proceed with the implementation, or if I should at all? There are two potential ways where mmap(2) could help improve the speed of sort: - If you know the input

Re: sysinst username length limit

2024-04-03 Thread Martin Husemann
On Wed, Apr 03, 2024 at 10:53:58AM +0200, Hauke Fath wrote: > > The limit still exists if you use NIS to manage passwords. > > It does? My YP master says > > % awk -F: '{ if (length($1) > 8) { print $1 }}' < /etc/passwd | wc -l > 18 > % > > The linux and freebsd clients seem to be fine

Re: sysinst username length limit

2024-04-02 Thread Martin Husemann
On Wed, Apr 03, 2024 at 05:34:21AM +, Charlotte Koch wrote: > The 8 character limit is probably some historical thing, and besides, > it's completely bogus. I create accounts called 'charlotte' (9 chars) > all the time, with and without sysinst. The limit still exists if you use NIS to manage

Re: numpy failure on netbsd-9, rintl

2023-11-16 Thread Martin Husemann
On Thu, Nov 16, 2023 at 09:03:22AM -0500, Greg Troxel wrote: > +#ifndef __HAVE_LONG_DOUBLE > +__strong_alias(_frexpl, frexp) > +__weak_alias(frexpl, _frexpl) > +#endif That is exactly the right thing to do (and we have added such aliases to several functions already, but not done a systematic

Re: new certificate stuff

2023-08-28 Thread Martin Husemann
On Sun, Aug 27, 2023 at 10:53:58PM +, Taylor R Campbell wrote: > Currently, if /etc/openssl/certs.conf doesn't exist, `certctl rehash' > (the crux of `postinstall fix opensslcerts') will print an error > message and then exit with status 0. This combination is a bug -- > need to think a bit

Re: Android-like NetBSD

2023-08-21 Thread Martin Husemann
On Mon, Aug 21, 2023 at 05:57:31AM -0400, Greg Troxel wrote: > But interesting point about not having a proper destdir, and the > presence of stub libraries. That part is pretty simple: just download the comp.tgz set for the target and extract only a few paths from it, like: ./lib/

Re: Architecture neutral packages (mozilla-rootcerts-openssl)

2023-08-04 Thread Martin Husemann
On Thu, Aug 03, 2023 at 02:31:39PM +, John Klos wrote: > How it ultimately happens is up to people who understand things better than > I do, but what whould be lovely to see would be: > > 1) a way to install rootcerts in sysinst > > 2) a way to install them post-install, and/or update them >

Re: sed(1) and LC_CTYPE

2023-07-26 Thread Martin Husemann
On Wed, Jul 26, 2023 at 12:19:39PM -0400, Mouse wrote: > > $ export LC_CTYPE=fr_FR.ISO8859-15 > > > $ echo "éé" | sed 's/é/\/g' > > sed: 1: "s/é/\/g": RE error: trailing backslash (\) > > I agree that's broken. > > > Since, to my knowledge, we do not support anything via iconv or > > whatever,

Re: DRM/KMS

2023-07-07 Thread Martin Husemann
On Fri, Jul 07, 2023 at 03:08:25PM +0100, David Brownlee wrote: > So far some good changes (cribbing shamelessly from other suggestions) might > be: > - Implement "boot -D" (or similar) to boot with all DRM disabled, to > make it easier for hardware with issues That should be quite easy. > -

Re: DRM/KMS

2023-07-07 Thread Martin Husemann
On Fri, Jul 07, 2023 at 02:30:14PM +0100, David Brownlee wrote: > drm/kms definitely is hugely complicated, overly Linux focussed, and > difficult to maintain and update. A lot of effort has been put into > getting it to run on NetBSD (and updating from previous versions), but > it's currently the

Re: Trivial program size inflation

2023-07-03 Thread Martin Husemann
On Sun, Jul 02, 2023 at 10:53:31PM +, Emmanuel Dreyfus wrote: > On Sun, Jul 02, 2023 at 11:16:12PM +0200, Joerg Sonnenberger wrote: > > > At least in 9.3, dlopen() in a static binary does not work. Try using > > > a NSS module from a statically lunked binary to check that. > > > > It does

Re: Trivial program size inflation

2023-07-02 Thread Martin Husemann
On Sun, Jul 02, 2023 at 01:49:57PM -0400, Mouse wrote: > Why? If I'm looking at overhead size, I am most interested in just the > overhead size, which is exactly what a no-op program gives. If I want > to look at the overhead of printf, or malloc, or something, I'd use a > program that just

Re: Trivial program size inflation

2023-07-02 Thread Martin Husemann
On Sun, Jul 02, 2023 at 12:34:25PM +0200, tlaro...@polynum.com wrote: > It is curious that you react this way in a thread where, you as others, > have had your jaw drop seeing the size of a literally do_nothing > executable. This was unseen precisely because few use static linking. I'm not sure

Re: printf(1), sh(1), POSIX.2 and octal escape sequences

2023-06-28 Thread Martin Husemann
On Wed, Jun 28, 2023 at 05:59:10PM +0200, tlaro...@polynum.com wrote: > "\ddd", where ddd is a one, two, or three-digit octal number, shall be > written as a byte with the numeric value specified by the octal number." > > ? Because I parse it as: an octal escape sequence can be \d, or \dd or >

Re: printf(1), sh(1), POSIX.2 and octal escape sequences

2023-06-28 Thread Martin Husemann
On Wed, Jun 28, 2023 at 05:01:46PM +0200, tlaro...@polynum.com wrote: > But you can't: from the syntax given, \777 is a perfectly valid \77 > octal sequence followed by the character '7'. No, from the Posix text you quoted it clearly is a three digit ocatl sequence, and its value is out of range.

Re: vi(1) one line crasher

2023-06-22 Thread Martin Husemann
On Thu, Jun 22, 2023 at 08:52:12PM +0200, Martin Husemann wrote: > env EXINIT='set nu showmatch ts=8 wl=72' vi /tmp/vi_crasher.txt > > does crash for me when typing $ #2 0x009a54da in vs_paint (sp=sp@entry=0x6fb6f40de000, flags=flags@entry=3) at /work/src/external/bsd/nv

Re: vi(1) one line crasher

2023-06-22 Thread Martin Husemann
On Thu, Jun 22, 2023 at 08:46:44PM +0200, tlaro...@polynum.com wrote: > So wl=72 and ts=8 may reproduce for you? Yes! env EXINIT='set nu showmatch ts=8 wl=72' vi /tmp/vi_crasher.txt does crash for me when typing $ Martin

Re: vi(1) one line crasher

2023-06-22 Thread Martin Husemann
On Thu, Jun 22, 2023 at 06:22:42PM +0200, tlaro...@polynum.com wrote: > If one opens this one line script in vi, in an xterm with default size, > using the dollar '$' to go to the end of the line crashes vi(1). I can't reproduce this. Which version of NetBSD? The in-tree vi? What is your $TERM?

Re: style, sysexits(3), and man RETURN VALUES for sys programs

2023-06-03 Thread Martin Husemann
On Sat, Jun 03, 2023 at 01:45:44PM +0200, tlaro...@polynum.com wrote: > Furthermore, I'm adding a RETURN VALUES section to inetd.8 and I think > it should be standard practice for sys programs. That is for functions returning a value, the proper .Sh here would be EXIT STATUS. Martin

Re: NetBSD 10 and NetBSD 11...

2023-05-17 Thread Martin Husemann
On Wed, May 17, 2023 at 08:47:33PM +0200, tlaro...@polynum.com wrote: > But the fact that the advertised list of changes for 10 stops at > February 2023 is probably something the webmaster(s) should look > at: it's a bit confusing/disturbing... Where do you see that? Martin

Re: NetBSD 10 and NetBSD 11...

2023-05-17 Thread Martin Husemann
On Wed, May 17, 2023 at 11:29:43AM -0700, Jason Thorpe wrote: > There have been a steady stream of bug fixes from the trunk being > pulled into the netbsd-10 release branch. I don't have knowledge of > releng@'s plans vis a vis a release date. You can find details about the 10.0 release state at

Re: using gas/gld from devel/binutils

2023-05-17 Thread Martin Husemann
On Wed, May 17, 2023 at 11:17:28AM +0200, Edgar Fuß wrote: > What Version of binutils do -9, -10 and -current use? Are there patches in > base that are missing in pkgsrc? 2.31, 2.34 and 2.39 respectively. And probably yes (but I wouldn't expect anything relevant for amd64). Martin

Re: split(1): add '-c' to continue creating files

2023-02-14 Thread Martin Husemann
On Sun, Feb 12, 2023 at 04:05:20PM -0500, Jan Schaumann wrote: > The attached diff adds a flag "-c" (mnemonic "create, > don't overwrite" or "continue where you left off"): > > $ split file; ls > xaa xab xac xad > $ split -c second-file; ls > xaa xab xac xad xae xaf xag xah xai xaj I think this

Re: tcsh as csh default

2022-10-21 Thread Martin Husemann
On Fri, Oct 21, 2022 at 03:06:41PM +0200, Havard Eidnes wrote: > There's a definite size difference between csh and tcsh, > approximately 2x -- this is on NetBSD/amd64 9.x, and I include > /bin/sh for comparison: > > $ ls -lf /usr/pkg/bin/tcsh /bin/csh /bin/sh > -rwxr-xr-x 1 root wheel 408688

Re: tcsh as csh default

2022-10-21 Thread Martin Husemann
On Fri, Oct 21, 2022 at 07:51:14AM +, Emmanuel Dreyfus wrote: > On Fri, Oct 21, 2022 at 07:39:45AM +0200, Martin Husemann wrote: > [csh] > > Or just remove it... > > It would be a bad joke for anyone that has set it as root shell. Oh, I did not mean to suggest marki

Re: tcsh as csh default

2022-10-20 Thread Martin Husemann
On Thu, Oct 20, 2022 at 11:57:52PM +, Bruno Melo wrote: > Any good reason to not update /bin/csh to tcsh as default csh like > FreeBSD and Dragonfly did? I think no one expect csh scripts > performance and use csh specially for interactive usage, so I can't see > a reason for not replacing to

Re: grep -r: add default "."

2022-09-03 Thread Martin Husemann
On Sat, Sep 03, 2022 at 11:26:18AM +0200, Roland Illig wrote: > What about importing the current GNU grep, instead of patching the 2004 > version of it? That has a bad license. How about fixing the bsd version we have in tree instead? Maybe FreeBSD or OpenBSD already did that and we can borrwo?

Re: [Christos Zoulas] CVS commit: src/usr.bin/ftp

2022-09-02 Thread Martin Husemann
On Fri, Sep 02, 2022 at 06:23:48PM +0300, Christos Zoulas wrote: > I think we should be installing the anchors by default. I also think > that people think that https gets validated by default. I agree. The problem is that we need to suply anchors now with new installations and have a way to keep

Re: sh(1) and ksh(1) default PATH

2022-08-14 Thread Martin Husemann
On Sun, Aug 14, 2022 at 07:36:17AM +, nia wrote: > Display managers do not create login shells, and xdm was used. Adapt the default /etc/X11/xdm/Xsession instead? Maybe make it extract PATH from /etc/sh.rc ? Martin

Re: /rescue/tar needing liblzma.so.2

2022-07-04 Thread Martin Husemann
On Mon, Jul 04, 2022 at 06:58:39PM +, Emmanuel Dreyfus wrote: > On Mon, Jul 04, 2022 at 08:32:02PM +0200, Martin Husemann wrote: > > Try with PATH=/rescue, that should avoid the issue. > > Shouldn't /rescue binaries have /rescue prepended to their PATH? Tricky - isn't that

Re: /rescue/tar needing liblzma.so.2

2022-07-04 Thread Martin Husemann
On Mon, Jul 04, 2022 at 07:43:41PM +0200, Edgar Fuß wrote: > So why does something in /rescue need a shared library? It doesn't, but it exec's gzip via $PATH and finds /usr/bin/gzip - and that needs /usr/lib/liblzma.so.2. Try with PATH=/rescue, that should avoid the issue. Martin

Re: cmake core dumps in -6 emulation

2022-07-01 Thread Martin Husemann
On Fri, Jul 01, 2022 at 02:20:02PM +0200, Edgar Fuß wrote: > > Ktrace it > As mentioned, that doesn't work (well, it works, which is the problem). > > > there are 3 err() calls in pthread__init() > > Starting with > #8 0x71b551460ac0 in err () from /usr/lib/libc.so.12 > #9

Re: cmake core dumps in -6 emulation

2022-06-30 Thread Martin Husemann
On Thu, Jun 30, 2022 at 07:29:18PM +0200, Edgar Fuß wrote: > #8 0x77a601860ac0 in err () from /usr/lib/libc.so.12 > #9 0x77a60280c47b in pthread__init () from /usr/lib/libpthread.so.1 Ktrace it - there are 3 err() calls in pthread__init(), one after sysctl hw.ncpu failed, one if

Re: sysupgrade in src?

2022-04-15 Thread Martin Husemann
On Fri, Apr 15, 2022 at 08:21:00AM +, nia wrote: > There's been a few discussions over the years about the need for a > usable-over-ssh binary upgrade tool for NetBSD, but they haven't gone > very far. I don't object to your idea (and I have never used it). My own prefered method requires

Re: Checking whether an rc.d script was invoked from rc

2022-04-12 Thread Martin Husemann
On Tue, Apr 12, 2022 at 12:53:00PM +0200, Edgar Fuß wrote: > > Make the script require CRITLOCALMOUNTED (in -current, or mountcritlocal > > in older versions)? > I don't get that. That wouldn't mount /usr, no? Duh, right - I have /usr in critical_filesystems_local on all machines where it is a

Re: Checking whether an rc.d script was invoked from rc

2022-04-12 Thread Martin Husemann
On Tue, Apr 12, 2022 at 12:09:40PM +0200, Edgar Fuß wrote: > Alternatively, I could copy na6 to /local/bin (or whatever). It only needs > libc, libpcap and libm, which are all in /lib, but ldd say the binary > references /usr/lib. How do I change that? Make the script require CRITLOCALMOUNTED

Re: ZFS - mounting filesystems (Was CVS commit: src/etc)

2022-03-17 Thread Martin Husemann
On Thu, Mar 17, 2022 at 12:52:03PM +, Taylor R Campbell wrote: > Does anyone actually do this -- have local mounts on top of remote > mounts? I do, but all machines affected have / on NFS which makes the setup trivial. Martin

Re: inetd tests failing

2022-03-17 Thread Martin Husemann
On Thu, Mar 17, 2022 at 04:58:56PM +1030, Brett Lymn wrote: > Perhaps a shim program that manages a socket between it and the > underlying daemon - the shim can talk to inetd to coordinate the handoff > of an incoming connection and also being put back onto the idle pool > when the connection

Re: inetd tests failing

2022-03-16 Thread Martin Husemann
On Wed, Mar 16, 2022 at 07:53:09AM +1030, Brett Lymn wrote: > They wait on stdin, they don't need to signal done. How does inetd replace their stdin once the connection is established? Many deamons will do socket operations (e.g. querying the peer) early on startup - that would fail (or deliver

Re: ZFS - mounting filesystems (Was CVS commit: src/etc)

2022-03-15 Thread Martin Husemann
On Tue, Mar 15, 2022 at 08:30:11AM -0400, Greg Troxel wrote: > I still don't understand and object to this "zfs is special" notion. It is special because it just does not use /etc/fstab (usually). I don't like this part either, but we probably don't want to make our ZFS different from others (or

Re: crypt_r()?

2022-02-16 Thread Martin Husemann
On Wed, Feb 16, 2022 at 10:27:08AM -0500, Mouse wrote: > That sounds like a recipe for disaster. It is a complete fail for > heterogenous environments where the same hash needs to be checkable on > widely disparate hardware, where a small machine may not have the > resources to perform the check

Re: installboot: Old BPB too big, use -f (may invalidate filesystem)

2022-02-14 Thread Martin Husemann
On Mon, Feb 14, 2022 at 09:20:45PM +0100, Edgar Fuß wrote: > > If you are trying to setup the machine for NetBSD only use > It's NetBSD only. > > > - if you are UEFI booting from a FAT partition > No, it's plain old BIOS boot (the server is from 2005). > > > - if you really want ffsv1 boot

Re: installboot: Old BPB too big, use -f (may invalidate filesystem)

2022-02-14 Thread Martin Husemann
On Mon, Feb 14, 2022 at 07:25:37PM +0100, Edgar Fuß wrote: > What does > installboot: Old BPB too big, use -f (may invalidate filesystem) > mean? > > I have a RAIDframe level 1 RAID consisting of /dev/sd0e and /dev/sd1e. > Now, sd0 failed. I replaced the disc, fdisk'ed and disklabel'ed it

Re: brandelf(1)

2022-01-17 Thread Martin Husemann
On Mon, Jan 17, 2022 at 12:28:51PM +0100, Manuel Bouyer wrote: > Hello, > so, to be able to run linux binaries with don't have the Linux type > in its ELF header, I have ported FreeBSD's brandelf(1): > https://www.unix.com/man-page/freebsd/1/brandelf/ > brandelf -- mark an ELF binary for a

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-12-04 Thread Martin Husemann
On Sat, Dec 04, 2021 at 11:20:26AM +0100, Havard Eidnes wrote: > > Joerg Sonnenberger wrote in > > : > > |On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: > > |> DNS queries (via UDP) are limited to max 512, as that is what the > > |> protocol always required, so can be handled by

Re: possible bug in fseek of buffered files shared between processes (example uses stdin)

2021-11-02 Thread Martin Husemann
On Tue, Nov 02, 2021 at 10:53:55AM -0700, Carlo Arenas wrote: > Note that the failure in this case can be "fixed" by instead calling > lseek directly, removing the buffer or skipping this early return in > src/lib/libc/stdio/fseeko.c (lines 210 to 228), and that I am showing > below (might be

Re: openssl 3

2021-09-30 Thread Martin Husemann
On Thu, Sep 30, 2021 at 09:18:23AM -0400, Greg Troxel wrote: > The real question is what kind of pace of update is best, as maintained > upstreams are going to make releases that work with openssl3, and not > being first makes life easier. > > I suspect in a few weeks we'll have a better idea. I

Re: openssl 3

2021-09-30 Thread Martin Husemann
On Thu, Sep 30, 2021 at 08:44:22AM -0400, Greg Troxel wrote: > What are people thinking about > > updating openssl to 3.0.0 in current Yes, someone(tm) should do that! Early to catch fallout quickly, but we'd need commitment from the pkgsrc team to make pkgsrc usefull with that. I don't think

Re: [PATCH 1/3] gcc: Add missing parentheses around ternary operator

2021-08-29 Thread Martin Husemann
On Sun, Aug 29, 2021 at 01:42:22PM +1000, Damien Zammit wrote: > --- a/external/gpl3/gcc/dist/libcpp/files.c > +++ b/external/gpl3/gcc/dist/libcpp/files.c > @@ -233,7 +233,7 @@ open_file (_cpp_file *file) > } >else > file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY > -

Re: Fwd: Release Maintenance Policy

2021-08-08 Thread Martin Husemann
On Sun, Aug 08, 2021 at 09:16:08AM -0400, matthew sporleder wrote: > FYI we need to pull up a newer version of OpenLDAP More important: we need a new version in HEAD before we branch for netbsd-10 (and it better be 2.6 already). We can not pull up a new release if a major bump of the library is

Re: possible opendir bug?

2021-07-11 Thread Martin Husemann
On Sun, Jul 11, 2021 at 12:47:53AM -0400, Mouse wrote: > I'm not sure to what extent use of uninitialized memory is considered a > bug when, as here, the code is correct regardless of what value it > contains. It is a bug (and should be detected in builds with proper -fsanitize= compiler options

Re: Strange pthread_self() return value

2021-06-11 Thread Martin Husemann
On Fri, Jun 11, 2021 at 04:41:51PM +, nia wrote: > However, this value comes from the return value of pthread_self(): You did not link with -pthread (so you get the libc stub of pthread_self()). Martin

Re: Adding ?

2021-05-13 Thread Martin Husemann
On Thu, May 13, 2021 at 12:51:45PM +0200, Jaromír Dole?ek wrote: > On the contrary, Linux explicitely #undefs alloca(), then > #define alloca() as __builtin_alloca(), so it always works, regardless > which -std. But isn't that obviously wrong and our version the correct one? (Well, maybe we

Re: text layout in sysinst

2021-02-06 Thread Martin Husemann
On Fri, Feb 05, 2021 at 09:12:32PM +0100, Roland Illig wrote: > When I start sysinst from an installed system though, the language > selection is skipped completely (which I didn't understand from reading > the code) This means the message catalog files have not been found - I thought I fixed

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-16 Thread Martin Husemann
On Sat, Jan 16, 2021 at 01:21:21PM +0100, Kamil Rytarowski wrote: > Can we overload the ENOSYS return value and return it for CPUs without > hardware assisted random number generator? You mean: with not enough entropy available? The availablility of a hardware random number generator does not

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-15 Thread Martin Husemann
On Fri, Jan 15, 2021 at 03:04:21PM +0100, Reinoud Zandijk wrote: > Can we create a random stream for all such situations instead of a file? Say > open a TCP/IP connection to some NetBSD server that spits out a X number of > random bytes by its random generator and then closes the stream? You want

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-15 Thread Martin Husemann
On Fri, Jan 15, 2021 at 12:12:05AM +, Taylor R Campbell wrote: > > On Mon, Jan 11, 2021 at 01:25:36AM +, Taylor R Campbell wrote: > > > We might also do something similar with the motd -- add a single line, > > > citing entropy(7) for more details, if there's not enough entropy. > > > >

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-15 Thread Martin Husemann
On Fri, Jan 15, 2021 at 09:25:41AM +0100, Manuel Bouyer wrote: > > If a machine doesn't have any unpredictable inputs, well, there's no > > magic we can do -- you can copy a seed over from another machine (on a > > Yes. I just want to make sure this will remain an option. > For this to work the

Re: tolower()/islower() and char

2021-01-14 Thread Martin Husemann
On Thu, Jan 14, 2021 at 12:28:57PM +0100, Manuel Bouyer wrote: > Does the standard explicitely state that the value should either be > EOF or >= 0 ? Yes, Section 7.4 paragrah 1 second sentence (ISO C 2018): > In all cases the argument is an int, the value of which shall be > representable as an

Re: tolower()/islower() and char

2021-01-14 Thread Martin Husemann
On Thu, Jan 14, 2021 at 12:14:28PM +0100, Manuel Bouyer wrote: > Any comment about this ? I'm not familiar with these details ... man ctype and search for CAVEATS Martin

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-14 Thread Martin Husemann
On Thu, Jan 14, 2021 at 10:15:41AM +, nia wrote: > I don't think more options should be added to the installer (it has > too many things that are confusing to a new user already), This is the thinking that gets us to fully automated no choice tools like the auto resizing usb images that I

Re: Waiting for Randot (or: nia and maya were right and I was wrong)

2021-01-11 Thread Martin Husemann
On Mon, Jan 11, 2021 at 01:25:36AM +, Taylor R Campbell wrote: > We might also do something similar with the motd -- add a single line, > citing entropy(7) for more details, if there's not enough entropy. Please don't - that is one of the least usefull places to put such a note. I still

Re: vndconfig vs mount_cd9660

2020-12-29 Thread Martin Husemann
On Tue, Dec 29, 2020 at 11:35:15AM +0100, Thomas Klausner wrote: > That did the trick: > > # vnconfig vnd0 file.iso 2048/1/1/1 > # mount_udf -o ro /dev/vnd0a /mnt > >

Re: vndconfig vs mount_cd9660

2020-12-28 Thread Martin Husemann
On Mon, Dec 28, 2020 at 10:43:10PM +0100, Thomas Klausner wrote: > I wanted to mount an ISO image (on 9.99.77/amd64), so I did, following the > guide: > > # vnconfig -c vnd0 file.iso > # mount -t cd9660 /dev/vnd0a /mnt > mount_cd9660: /dev/vnd0a on /mnt: Invalid argument May this image contain

Re: wsmoused broken since 9.1

2020-12-26 Thread Martin Husemann
On Sat, Dec 26, 2020 at 08:49:22AM -0500, Mouse wrote: > > I have to admit I only ever use it to shut up stupid USB mice from > > reconnecting every minute on setups where I boot with serial console > > How does it affect that? There's a 9.1 system at work where (certain) > USB mice will

Re: wsmoused broken since 9.1

2020-12-26 Thread Martin Husemann
On Sat, Dec 26, 2020 at 08:50:22AM +, RVP wrote: > I'm surprised that nobody's noticed this breakage since Aug 2007. > Is console + wsmoused so little used? ;) I have to admit I only ever use it to shut up stupid USB mice from reconnecting every minute on setups where I boot with serial

Re: wsmoused broken since 9.1

2020-12-23 Thread Martin Husemann
On Wed, Dec 23, 2020 at 06:56:31AM +, RVP wrote: > /usr/sbin/wsmoused has been non-working since slightly > before 9.1 was released. Specifically, any button click > or release generates: Can you narrow down the pullup that broke it? Is it still broken in -current? I see nothing obvious in

Re: Summary of man-page formatting

2020-11-14 Thread Martin Husemann
On Sun, Nov 15, 2020 at 03:10:08AM +0100, Kamil Rytarowski wrote: > 1. NetBSD base ships with two programs that can format manual pages from > base and most 3rd party software: BSD mandoc (newest) and GPLv2 groff > 1.19.2 (old, from 2005). Ignoring pkgsrc and most parts of what you listed in the

Re: 9.1: nested functions crash

2020-10-23 Thread Martin Husemann
On Fri, Oct 23, 2020 at 10:56:50AM -0400, Mouse wrote: > Presumably this is NetBSD trying to break execute-out-of-the-stack > malware. This is not an unreasonable default, but, for this use case, > it's a crippling misfeature. How do I disable it? sysctl -a output > contains nothing promising

Re: recent changes to pthread_fork.c:fork() cause static linking to fail if the app provides its own malloc()

2020-07-13 Thread Martin Husemann
On Tue, Jul 14, 2020 at 02:49:00AM +0200, Joerg Sonnenberger wrote: > Replacing malloc is just as invalid from a strict standard compliance > perspective, so *shrug* Why is that? We have e.g. shells/standalone-tcsh that does it. Is it broken now? Martin

Re: Weekday abbreviations in output of cal(1)

2020-06-30 Thread Martin Husemann
On Tue, Jun 30, 2020 at 11:24:51AM +0200, Michael Siegel wrote: > Well, how would you use date(1) to return the number of days in any > given month, for example? Good example, slightly complex but still close to cal|wc ;-) Martin --8<-- #! /bin/sh YEAR=2020 MONTH=6 if [ $MONTH -lt 12 ]; then

Re: Weekday abbreviations in output of cal(1)

2020-06-30 Thread Martin Husemann
On Tue, Jun 30, 2020 at 10:53:38AM +0200, Michael Siegel wrote: > Also, to the best of my knowledge, parsing the output of cal(1) is about > the only method to get certain calendar information in Unix shell > scripts. Now that makes me curious - can you give an example? I think almost always

Re: mountcritlocal rcorder (Was: Restrict mtree to specific directories)

2020-06-07 Thread Martin Husemann
I implemented the split and it works nicely for me. I can now just add things like "populate_var" into rc.d which REQUIRE: mountcritlocal and have BEFORE: MOUNTCRITLOCAL to fill the /var tmpfs that has just been mounted. While there I found that random_seed play special tricks and we might

mountcritlocal rcorder (Was: Restrict mtree to specific directories)

2020-06-03 Thread Martin Husemann
On Thu, Jun 04, 2020 at 05:48:34AM +0700, Robert Elz wrote: > And of course, I should have really read mtree(1) before replying, > so the suggested method would just be > > grep whatever original-spec-file [ | grep otherstuff ] | mtree I ended up not using mtree for this, as it was getting

Re: Restrict mtree to specific directories

2020-06-03 Thread Martin Husemann
On Tue, Jun 02, 2020 at 04:14:20PM +0200, Martin Husemann wrote: > So in above example I could create a "onlyfile" containing something like: > > ./var > ./var/* > ./var/*/* > ./var/*/*/* > ./var/*/*/*/* > ./var/*/*/*/*/* >

Restrict mtree to specific directories

2020-06-02 Thread Martin Husemann
I have a small issue with mtree(8), that I am not quite sure how to fix best. I would like to create directory hierachies from mtree spec files, but restrict this to selected hierachies (where the mtree files contain a bit more). Example: mkdir /tmp/test && cd /tmp/test && mtree -f

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-25 Thread Martin Husemann
On Tue, May 26, 2020 at 01:37:41AM +0200, Kamil Rytarowski wrote: > I agree here with Joerg. > > At this point it's good to just add a wrapper as in the proposed patch. > Once we will bump libc major, we can rename the syscall and remove > pollts references. > > Weak alias would still be nicer,

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-25 Thread Martin Husemann
On Mon, May 25, 2020 at 03:09:09PM +0530, Apurva Nandan wrote: > I meant that I can't create a __weak_alias ppoll(2) to pollts(2) in libc as > pollts(2) has its definition in sys/sys. But yes the resulting weak alias > symbol works from everywhere. The syscall stabs are generated code, but we

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-25 Thread Martin Husemann
On Mon, May 25, 2020 at 11:24:14AM +0200, Joerg Sonnenberger wrote: > On Mon, May 25, 2020 at 10:06:22AM +0200, Martin Husemann wrote: > > On Mon, May 25, 2020 at 12:20:53PM +0530, Apurva Nandan wrote: > > > The problem with __weak_alias is that they only work inside the

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-25 Thread Martin Husemann
On Mon, May 25, 2020 at 10:22:12AM +0200, Kamil Rytarowski wrote: > This is a non-standard extension, but everybody mainstream (except > macosx that lacks it?) settled on the name ppoll. ... which is probably the worst name anyone could come up with. Can you explain what alias issues you have?

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-25 Thread Martin Husemann
On Mon, May 25, 2020 at 12:20:53PM +0530, Apurva Nandan wrote: > The problem with __weak_alias is that they only work inside the same C file > where the original symbol is defined, and don't work outside that file for > that symbol. That is not true. > I have created _ppoll internal function in

Re: Addition of ppoll(2), a wrapper around pollts(2)

2020-05-24 Thread Martin Husemann
On Mon, May 25, 2020 at 04:32:14AM +0530, Apurva Nandan wrote: > Hi all, > I have added ppoll(2) implementation to libc/sys, which is a wrapper around > pollts(2) function (basically, pollts(2) and ppoll(2) are aliases, and > NetBSD has pollts(2)). Why not just add a weak alias for the function?

Re: getrandom and getentropy

2020-05-14 Thread Martin Husemann
On Thu, May 14, 2020 at 03:12:13PM +0200, Joerg Sonnenberger wrote: > I'd strongly argue that the only category where it really matters > potentially are long term key generators. I would at the same time > consider creating the ssh host keys as part of sysinst, but that's > already setting up the

Re: getrandom and getentropy

2020-05-12 Thread Martin Husemann
On Tue, May 12, 2020 at 10:00:20AM +0300, Andreas Gustafsson wrote: > we have entropy when we don't. Adding more sources could mean > reintroducing some timing based sources after careful analysis, but > also things like having the installer install an initial random seed > on the target machine

Re: PATCH libatomic

2020-05-08 Thread Martin Husemann
On Fri, May 08, 2020 at 10:24:43PM +, m...@netbsd.org wrote: > The indirection only applies to the first call. The magic is within > rtld. You are comparing PLT calls with ifunc (where even normal PLT calls have initial resolution overhead, but very tiny - while ifuncs may have arbitrary

Re: PATCH libatomic

2020-05-08 Thread Martin Husemann
On Fri, May 08, 2020 at 02:26:45PM +0200, Kamil Rytarowski wrote: > With _Atomic() we can mark any arbitrary struct to have serialized > accesses. As I said, with your attitude we shall remove FPU support (and > softfloat) as they are not async safe, not safe in virtualization for > MMU accesses

Re: PATCH libatomic

2020-05-06 Thread Martin Husemann
On Thu, May 07, 2020 at 05:43:02AM +0200, Kamil Rytarowski wrote: > I propose the following patch: > > http://netbsd.org/~kamil/patch-00250-libatomic.txt +__inline static int +__futex(volatile uint32_t *uaddr, int op, int val, const struct timespec *timeout, +volatile uint32_t *uaddr2,

Re: posix_spawnp() and PATH - change code or manual ?

2020-05-06 Thread Martin Husemann
On Wed, May 06, 2020 at 02:51:28PM +0200, Joerg Sonnenberger wrote: > The environment is under the control of the user, the code isn't. Ok, but you can set PATH to : or something. Martin

Re: posix_spawnp() and PATH - change code or manual ?

2020-05-06 Thread Martin Husemann
On Wed, May 06, 2020 at 02:29:07PM +0200, Joerg Sonnenberger wrote: > I'm not sure. There is normally no way to force an empty environment > variable, so if you want to not use PATH, the behavior of the current > code is more useful. But you can then just use posix_spawn() instead. Martin

Re: posix_spawnp() and PATH - change code or manual ?

2020-05-06 Thread Martin Husemann
On Wed, May 06, 2020 at 02:33:41PM +0700, Robert Elz wrote: > Either of those is fine with POSIX - but we should really have one consistent > policy. Changing either the manual or the code to match the other is also > easy. What is not so easy is to decide which of the two (or perhaps >

Re: getrandom and getentropy

2020-05-02 Thread Martin Husemann
On Sat, May 02, 2020 at 12:22:20PM +, m...@netbsd.org wrote: > Having compat shims in libc is as good as having compat shims in syscall > because it isn't possible to share raw syscall code between NetBSD and > other operating systems -- our calling convention is different. I can't parse that

Re: package build failures on netbsd-8 using nbtar, pax, bsdtar

2020-03-09 Thread Martin Husemann
On Mon, Mar 09, 2020 at 08:10:04PM -0400, Greg Troxel wrote: > The package is /usr/pkgsrc/textproc/py-sphinxcontrib-serializinghtml > which was recently updated to 1.1.4. The 1.1.3 tarball looks fine with > NetBSD's /bin/tar but the 1.1.4 throws lots of: I think this pkg needs:

Re: Expose max_align_t unconditionally

2020-03-09 Thread Martin Husemann
On Mon, Mar 09, 2020 at 08:28:58PM +0100, Micha? Górny wrote: > ATF-C++ forces -std=gnu++98. We could remove that but then we fail > on deprecated auto_ptr use. We should fix that, independently of the issue at hand. Martin

Re: Expose max_align_t unconditionally

2020-03-09 Thread Martin Husemann
On Mon, Mar 09, 2020 at 02:49:23PM -0400, Greg Troxel wrote: > I am not really following the issue, but I don't understand why what the > default C++ sublanguage is matters. It would seem that behavior should > be correct for any --std passed to compilers, per that sublanguages's > specification,

Re: Expose max_align_t unconditionally

2020-03-09 Thread Martin Husemann
Stupid question: if that libc+++ is only designed to be C++11 and newer, in what real world scenarios does it require exposing max_align_t? For sure you can easily compile the libc++.so* itself with proper standard flags passed to the compiler, so it must be something else - or I'm missing

Re: pam_krb5.c - -Werror=format-overflow

2020-02-06 Thread Martin Husemann
On Thu, Feb 06, 2020 at 05:39:53AM -0500, Santhosh Raju wrote: > Alright the solution would be to 'fix gcc' I suppose? :P It might be a makefile bug passing different options to this build step (unintendely). > Will wait for other opinions (to see if there are any). If not will > add the flag to

Re: pam_krb5.c - -Werror=format-overflow

2020-02-06 Thread Martin Husemann
On Thu, Feb 06, 2020 at 05:16:05AM -0500, Santhosh Raju wrote: > I am guessing the build cluster does not run with MKLIBCSANITIZER=yes > in the build.sh? No, but why would that make a difference here? If it does, it sounds like a gcc bug. Martin

Re: pam_krb5.c - -Werror=format-overflow

2020-02-06 Thread Martin Husemann
On Thu, Feb 06, 2020 at 05:01:55AM -0500, Santhosh Raju wrote: > --- dependall-pam_krb5 --- > /home/fox/projects/netbsd/obj-wip/destdir.amd64/usr/include/security/pam_modules.h: > In function 'pam_sm_setcred': > /home/fox/projects/netbsd/src-wip/lib/libpam/modules/pam_krb5/pam_krb5.c:489:6: >

Re: Solving the syslogd problem

2020-01-29 Thread Martin Husemann
On Wed, Jan 29, 2020 at 11:33:22AM +0100, Joerg Sonnenberger wrote: > On Tue, Jan 28, 2020 at 09:21:23PM +, Roy Marples wrote: > > To fix this, I suggest that we split syslogd into syslogd and > > syslogd-network. > > We could also do a much simpler and more radical decision and stop >

Re: Leak Sanitizer - how to suppress leaks

2019-09-13 Thread Martin Husemann
On Fri, Sep 13, 2019 at 08:33:31AM +0200, Thomas Klausner wrote: > I'm sorry, I totally do not get it the problem with -- in general -- > writing the code in such a way that it properly frees any allocations > it made. > > I suspect there will be corner cases where it will be really hard, and >

  1   2   >