Re: installer: support encryption with key disks

2023-10-18 Thread Andrew Hewus Fresh
On Mon, Oct 16, 2023 at 07:46:10PM +, Klemens Nanni wrote: > On Mon, Sep 04, 2023 at 09:57:40PM +, Klemens Nanni wrote: > > Extend the yes/no question to no/passphrase/keydisk and have users pick an > > existing, preformated RAID partition; no support (yet) for creating one. > > > >

Re: better fix for Term::Cap

2023-10-18 Thread Andrew Hewus Fresh
On Wed, Oct 18, 2023 at 10:25:59AM +0200, Marc Espie wrote: > Instead of an archaic limit, just keep track of tc's. > This is actually slightly faster, because the termcap links is a tree, > not a list. I like it, but I don't want to carry this patch against upstream. I will happily pull in this

Re: pkg_add: No progress meter: failed termcap loop

2023-10-17 Thread Andrew Hewus Fresh
On Tue, Oct 17, 2023 at 06:34:58PM -0700, Andrew Hewus Fresh wrote: > On Tue, Oct 17, 2023 at 06:13:30PM -0700, Andrew Hewus Fresh wrote: > > On Tue, Oct 17, 2023 at 05:10:44PM -0700, Greg Steuck wrote: > > > I just got myself a fresh snapshot with libncurses.so.15.0: > &g

Re: pkg_add: No progress meter: failed termcap loop

2023-10-17 Thread Andrew Hewus Fresh
On Tue, Oct 17, 2023 at 06:34:58PM -0700, Andrew Hewus Fresh wrote: > On Tue, Oct 17, 2023 at 06:13:30PM -0700, Andrew Hewus Fresh wrote: > > On Tue, Oct 17, 2023 at 05:10:44PM -0700, Greg Steuck wrote: > > > I just got myself a fresh snapshot with libncurses.so.15.0: > &g

Re: pkg_add: No progress meter: failed termcap loop

2023-10-17 Thread Andrew Hewus Fresh
On Tue, Oct 17, 2023 at 06:13:30PM -0700, Andrew Hewus Fresh wrote: > On Tue, Oct 17, 2023 at 05:10:44PM -0700, Greg Steuck wrote: > > I just got myself a fresh snapshot with libncurses.so.15.0: > > OpenBSD 7.4-current (GENERIC.MP) #1409: Tue Oct 17 17:08:49 MDT 2023 >

Re: pkg_add: No progress meter: failed termcap loop

2023-10-17 Thread Andrew Hewus Fresh
On Tue, Oct 17, 2023 at 05:10:44PM -0700, Greg Steuck wrote: > I just got myself a fresh snapshot with libncurses.so.15.0: > OpenBSD 7.4-current (GENERIC.MP) #1409: Tue Oct 17 17:08:49 MDT 2023 > > I get some unhappiness now: > # pkg_add -ui > No progress meter: failed termcap loop > quirks-6.161

Re: Don't lock package db if fw_update(8) is not installing firmware

2023-10-14 Thread Andrew Hewus Fresh
On Sat, Oct 14, 2023 at 09:02:41PM +0200, Marc Espie wrote: > On Sat, Oct 14, 2023 at 11:24:08AM -0700, Andrew Hewus Fresh wrote: > > While testing another patch, I noticed that fw_update will lock the > > package database even if it's just downloading and not touching the > &g

Re: Improve fw_update(8) output on errors somewhat

2023-10-14 Thread Andrew Hewus Fresh
Here's the latest iteration of the fw_update output cleanup. The big change here is improved output if running fw_update while the package database is locked, pkg_add -u in one shell and fw_update in another. I'll be testing this a bit more and hoping to commit it after snapshots start rolling

Don't lock package db if fw_update(8) is not installing firmware

2023-10-14 Thread Andrew Hewus Fresh
While testing another patch, I noticed that fw_update will lock the package database even if it's just downloading and not touching the installed packages. Currently we do _read_ the existing firmware as part of detecting what we might need to download or upgrade without locking. I'm unsure if

Re: Improve fw_update(9) output on errors somewhat

2023-10-01 Thread Andrew Hewus Fresh
I have not gotten nearly enough positive feedback for the previous iterations of this to be really comfortable this close to release. This version doesn't solve any of the less common failure cases, but it makes the normal "fw_update" when there is no network look nicer. I can look at bringing

Re: Improve fw_update(9) output on errors somewhat

2023-09-30 Thread Andrew Hewus Fresh
Here's the next iteration. I'll probably commit it later this weekend unless someone finds issues with it. Here we trap errors from `ftp` unless we're using the verbose modes with progress bars. We then parse those to guess whether we might be able to find a different firmware (currently only

Re: Improve fw_update(9) output on errors somewhat

2023-09-27 Thread Andrew Hewus Fresh
Here's a slightly simpler try suggested by deraadt@. I capture ftp's STDERR and move it to the special "WARN_FD" that groups errors without confusing the status line. I also strip the "name" off the error as it looks a bit nicer than repeating it everywhere. If the fetch fails, we return 1 if

Improve fw_update(9) output on errors somewhat

2023-09-27 Thread Andrew Hewus Fresh
I did commit a few other fw_update fixes, so if you see any problems with it, let me know soon, although I probably won't have time to look until this weekend. Theo rightly complained that the output from fw_update when the network isn't available isn't very good. $ doas fw_update

Re: fw_update throwing exit 1 on successful install when passed a driver by name

2023-09-22 Thread Andrew Hewus Fresh
On Fri, Sep 22, 2023 at 01:05:17PM -0500, Brian Conway wrote: > Greetings. I noticed the above behavior with the latest 7.4-beta when > scripting some fw_update runs. Perhaps a corner case was missed in the > recent work? Steps below, let me know if more information is required > to reproduce.

make install in firmware ports doesn't mark @option firmware

2023-09-02 Thread Andrew Hewus Fresh
While testing some other stuff, job@ noticed that fw_update(8) kept reinstalling the bwfm firmware. After some research it turns out that fw_update ignores installed packages that aren't marked "@option firmware" and it does that too hard. I'll likely commit the below patch to at least warn

Re: fw_update lock_db should exit when parent exits

2023-08-24 Thread Andrew Hewus Fresh
On Thu, Aug 24, 2023 at 06:53:27AM -0600, Todd C. Miller wrote: > On Wed, 23 Aug 2023 18:23:40 -0700, Andrew Hewus Fresh wrote: > > > I would have to see an example of doing that between ksh and perl. > > Standard output should already be a pipe in the perl process by > virt

Re: fw_update lock_db should exit when parent exits

2023-08-23 Thread Andrew Hewus Fresh
On Wed, Aug 23, 2023 at 08:42:03AM -0600, Todd C. Miller wrote: > On Tue, 22 Aug 2023 19:55:56 -0700, Andrew Hewus Fresh wrote: > > > I noticed this when testing how signal handling worked in fw_update, it > > turns out that if you `pkill -KILL -f fw_update` it may leave behind

fw_update lock_db should exit when parent exits

2023-08-22 Thread Andrew Hewus Fresh
I noticed this when testing how signal handling worked in fw_update, it turns out that if you `pkill -KILL -f fw_update` it may leave behind a perl process that is locking the package database. Instead of just waiting to be killed, we can have that process check to see if its parent is still

Re: Have sysupgrade run fw_update -vv

2023-08-20 Thread Andrew Hewus Fresh
On Sat, Aug 19, 2023 at 03:11:46PM -0700, Andrew Hewus Fresh wrote: > On Sun, Aug 13, 2023 at 04:42:49PM -0600, Theo de Raadt wrote: > > Stuart Henderson wrote: > > > > > On 2023/08/13 11:44, Andrew Hewus Fresh wrote: > > > > My laptop doesn't have the fast

Re: Have sysupgrade run fw_update -vv

2023-08-19 Thread Andrew Hewus Fresh
On Sun, Aug 13, 2023 at 04:42:49PM -0600, Theo de Raadt wrote: > Stuart Henderson wrote: > > > On 2023/08/13 11:44, Andrew Hewus Fresh wrote: > > > My laptop doesn't have the fastest wifi and sysupgrade already uses a > > > progress bar to show what it's doing, so I

Re: installer: proper disk crypto passphrase prompt loop

2023-08-15 Thread Andrew Hewus Fresh
On Tue, Aug 15, 2023 at 09:08:44AM +, Klemens Nanni wrote: > On Wed, Aug 02, 2023 at 11:51:09AM +, Klemens Nanni wrote: > > An alternative approach could be a new bioctl(8)) flag > > -K Keep prompting until new and re-typed passphrases match. > > to repeat the prompt (during

Have sysupgrade run fw_update -vv

2023-08-13 Thread Andrew Hewus Fresh
My laptop doesn't have the fastest wifi and sysupgrade already uses a progress bar to show what it's doing, so I'd really like to provide more feedback on what it is doing: $ doas fw_update -d intel fw_update: deleted intel $ time doas fw_update fw_update: added intel; updated none; kept

Re: Stop using direct syscall(2) from perl(1)

2023-08-03 Thread Andrew Hewus Fresh
On Sun, Jul 09, 2023 at 01:29:58PM -0700, Andrew Hewus Fresh wrote: > Here is a patch to replace perl(1)'s use of syscall(2) with a dispatcher > that will call the libc function instead. > > I have to do some work on style before this is ready to commit, but it > should be ready f

Re: Stop using direct syscall(2) from perl(1)

2023-07-20 Thread Andrew Hewus Fresh
{ int sys_getlogin_r(char *namebuf, u_int namelen); } /usr/include/unistd.h:intgetlogin_r(char *, size_t) On Thu, Jul 13, 2023 at 07:38:22AM +0100, Stuart Henderson wrote: > On 2023/07/13 00:57, George Koehler wrote: > > On Sun, 9 Jul 2023 13:29:58 -0700 > > Andrew Hew

Stop using direct syscall(2) from perl(1)

2023-07-09 Thread Andrew Hewus Fresh
erl/gen_syscall_emulator.pl --- /dev/null 1 Jan 1970 00:00:00 - +++ gnu/usr.bin/perl/gen_syscall_emulator.pl9 Jul 2023 19:42:50 - @@ -0,0 +1,354 @@ +#!/usr/bin/perl +# $OpenBSD$ # +use v5.36; + +# Copyright (c) 2023 Andrew Hewus Fresh +# +# Permission to use, copy,

Re: OpenBSD::MkTemp vs Devel::Cover

2023-07-09 Thread Andrew Hewus Fresh
On Sat, Jul 08, 2023 at 12:09:01PM -0700, Andrew Hewus Fresh wrote: > On Sat, Jul 08, 2023 at 11:18:00AM +0200, Marc Espie wrote: > > Hey, Philip, you wrote this a long time ago. > > > > Now, I'm trying to get some coverage out of Devel::Cover on pkg_add, > > and

Re: OpenBSD::MkTemp vs Devel::Cover

2023-07-08 Thread Andrew Hewus Fresh
On Sat, Jul 08, 2023 at 11:18:00AM +0200, Marc Espie wrote: > Hey, Philip, you wrote this a long time ago. > > Now, I'm trying to get some coverage out of Devel::Cover on pkg_add, > and somehow, it gets in the way. > > # perl -MDevel::Cover=+select,OpenBSD/.* /usr/sbin/pkg_add random_run >

Re: OpenBSD perl 5.36.1 - Call for Testing

2023-07-06 Thread Andrew Hewus Fresh
On Thu, Jul 06, 2023 at 11:47:02AM +0300, Alexander Bluhm wrote: > I think you should commit 5.36.1, we will see fallout in regress > test. Sigh. I realized I haven't built a release with this patch recently. I don't expect failure but don't want to commit without doing that. I'll see if it's

Re: pkg-config tweaks

2023-05-22 Thread Andrew Hewus Fresh
On Mon, May 22, 2023 at 09:33:48AM +0200, Marc Espie wrote: > - move to 5.36: signatures + prototypes mostly everywhere > Not used for Getopt::Long, because the calling conventions are somewhat > too verbose. > - use constant for the mode{libs} and mode{cflags} values > - remove two completely

Re: installer: arm64: better disk variable handling

2023-04-05 Thread Andrew Hewus Fresh
On Sat, Mar 25, 2023 at 07:13:13PM +, Klemens Nanni wrote: > On Sat, Mar 25, 2023 at 07:02:24PM +, Klemens Nanni wrote: > > Call the function argument `_disk' and construct full device paths where > > needed, so that other code can reuse the mnemonic variable. > > > > This matches

Re: [installer] default answer to "Is the disk partition already mounted?"

2023-04-05 Thread Andrew Hewus Fresh
On Wed, Apr 05, 2023 at 11:11:12AM +, Klemens Nanni wrote: > 04.04.2023 19:58, Mikhail пишет: > > In conversation with Klemens (kn@) new iteration has been born, it > > follows to what Omar (op@) has suggested - we're not trying to change > > the default answer for all cases, since no one

Re: installer: apple arm64: simplify firmware copy

2023-03-26 Thread Andrew Hewus Fresh
On Sat, Mar 25, 2023 at 06:38:56PM +, Klemens Nanni wrote: > Less duplicate code, simpler to cope with newer firmware. > Same idiom is used in install.sub already. > > OK? While unlikely to fail, I do prefer `cd ... && ...` as a general rule. However, this definitely makes it easier to tell

Re: installer: simplify MAKEDEV invocation

2023-03-25 Thread Andrew Hewus Fresh
On Sat, Mar 25, 2023 at 04:17:06PM +, Klemens Nanni wrote: > The script takes multiple arguments and loops over them on its own, > so no reason to handroll the loop. > > OK? This makes sense to me. I wonder if MAKEDEV changed to allow multiple arguments or if the original author didn't

Improve fw_update(8) in nonexistent dir

2023-03-16 Thread Andrew Hewus Fresh
In a private mail it was noticed that tar(1) doesn't like if you remove the directory out from under it. $ mkdir -p /tmp/x && cd $_ && rm -rf $_ && tar -C / -f /nonexistent (null): Can't open current working directory.: No such file or directory While that's not really a supported configuration,

Small tweak to simplify vlan suggestion in installer

2023-02-19 Thread Andrew Hewus Fresh
Instead of looking at vlans and adding one to the last, which if someone did manual configuration could be inaccurate as ifconfig returns vlans in the order they were created. (oops, just noticed the extra newline, will fix that) Comments, OK? Index: install.sub

Update share/locale/ctype/en_US.UTF-8.src to Unicode 14.0.0

2023-02-14 Thread Andrew Hewus Fresh
With the perl update, we get a new version of unicode available to update this file as well. This was just running the script with the new perl version. OK? Index: share/locale/ctype/en_US.UTF-8.src === RCS file:

OpenBSD perl 5.36.0 - Call for Testing

2023-01-25 Thread Andrew Hewus Fresh
Good news! I got all our patches updated for perl 5.36.0. To skip the summary of new features, jump down to the bottom for details on how you can help test it. I missed 5.34 due to non-computer projects that got in the way, but that means this update has twice the cool newness. Skip to the end

Re: perl: fix build with clang 15

2022-12-26 Thread Andrew Hewus Fresh
On Tue, Dec 27, 2022 at 02:22:43AM +0100, Jeremie Courreges-Anglas wrote: > > MD5.xs:375:21: error: mixing declarations and code is incompatible with > standards before C99 [-Werror,-Wdeclaration-after-statement] > unsigned char *buf = (unsigned char *)(SvPV(ST(2), len)); > > The

Re: Configure interface by lladdr during install

2022-12-20 Thread Andrew Hewus Fresh
On Fri, Dec 16, 2022 at 04:00:40PM -0800, Andrew Hewus Fresh wrote: > On Wed, Dec 07, 2022 at 07:35:53PM -0800, Andrew Hewus Fresh wrote: > > On Wed, Dec 07, 2022 at 09:51:51AM -0800, Andrew Hewus Fresh wrote: > > > On Wed, Dec 07, 2022 at 10:28:05AM +, Stuart Henderson wrot

Re: Configure interface by lladdr during install

2022-12-16 Thread Andrew Hewus Fresh
On Wed, Dec 07, 2022 at 07:35:53PM -0800, Andrew Hewus Fresh wrote: > On Wed, Dec 07, 2022 at 09:51:51AM -0800, Andrew Hewus Fresh wrote: > > On Wed, Dec 07, 2022 at 10:28:05AM +, Stuart Henderson wrote: > > > On 2022/12/06 19:57, Andrew Hewus Fresh wrote: > > > &g

Re: Switch priority of hostname.if lladdr over name

2022-12-15 Thread Andrew Hewus Fresh
On Thu, Dec 15, 2022 at 06:31:40AM +, Klemens Nanni wrote: > On Sun, Dec 11, 2022 at 01:05:13PM -0800, Andrew Hewus Fresh wrote: > > This would be the diff to swap priority of name/lladdr as some folks > > wanted to see. I still don't recommend having both as you can still >

Re: netstart: do not try to create physical interfaces

2022-12-14 Thread Andrew Hewus Fresh
OK afresh1@, I would have to dig for a device to actually test it with, but my reading of the code makes me think it's correct. I do wonder if moving the ifcreate logic into vifscreate would allow for a friendlier message from `-n`. (untested diff follows, also missing the deletion of ifcreate)

Re: hostname.if(5): lladdr tweaks

2022-12-14 Thread Andrew Hewus Fresh
On Mon, Dec 12, 2022 at 06:48:36AM +, Jason McIntyre wrote: > On Fri, Dec 09, 2022 at 09:32:13PM +, Jason McIntyre wrote: > > hi. > > > > two points about the recent ability to use lladdr: > > > > - the example of "bridge0" made sense when bridge was regarded as a > > separate entity

Switch priority of hostname.if lladdr over name

2022-12-11 Thread Andrew Hewus Fresh
This would be the diff to swap priority of name/lladdr as some folks wanted to see. I still don't recommend having both as you can still have surprising outcomes with more complex configurations. The install.sub includes an "if_name_to_lladdr" function from the diff to support creating a

Re: Configure interface by lladdr during install

2022-12-07 Thread Andrew Hewus Fresh
On Wed, Dec 07, 2022 at 09:51:51AM -0800, Andrew Hewus Fresh wrote: > On Wed, Dec 07, 2022 at 10:28:05AM +, Stuart Henderson wrote: > > On 2022/12/06 19:57, Andrew Hewus Fresh wrote: > > > Which interface do you wish to configure? (name, lladdr, '?', or 'done') > > &g

Re: Configure interface by lladdr during install

2022-12-07 Thread Andrew Hewus Fresh
On Wed, Dec 07, 2022 at 10:28:05AM +, Stuart Henderson wrote: > On 2022/12/06 19:57, Andrew Hewus Fresh wrote: > > Which interface do you wish to configure? (name, lladdr, '?', or 'done') > > [vio0] ? > > Available network interfaces are: vio0 vlan0. > > vio

Re: Configure interface by lladdr during install

2022-12-06 Thread Andrew Hewus Fresh
On Tue, Dec 06, 2022 at 06:11:33PM -0800, Andrew Hewus Fresh wrote: > Here's an initial draft of a diff to allow configuring by lladdr in the > installer. I'm not a super fan of how it works, but could use some > feedback from folks trying it and suggesting improvements. > > It'

Configure interface by lladdr during install

2022-12-06 Thread Andrew Hewus Fresh
Here's an initial draft of a diff to allow configuring by lladdr in the installer. I'm not a super fan of how it works, but could use some feedback from folks trying it and suggesting improvements. It's a larger diff than I first expected since I didn't want to include the lladdrs in the

Re: lladdr support for netstart/hostname.if

2022-12-01 Thread Andrew Hewus Fresh
How about this adjustment to the man page? Index: share/man/man5/hostname.if.5 === RCS file: /cvs/src/share/man/man5/hostname.if.5,v retrieving revision 1.79 diff -u -p -r1.79 hostname.if.5 --- share/man/man5/hostname.if.526

Re: lladdr support for netstart/hostname.if

2022-11-26 Thread Andrew Hewus Fresh
On Sat, Nov 26, 2022 at 07:12:12PM +, Klemens Nanni wrote: > On Sat, Nov 26, 2022 at 10:44:05AM -0800, Andrew Hewus Fresh wrote: > > I think this is the complete diff, with the man page bits mostly from > > Martijn. Now that the ifconfig -M bits are in, this should be easier

Re: lladdr support for netstart/hostname.if

2022-11-26 Thread Andrew Hewus Fresh
I think this is the complete diff, with the man page bits mostly from Martijn. Now that the ifconfig -M bits are in, this should be easier to test. I was able to test the installer bits, and they worked for me. Index: etc/netstart

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Andrew Hewus Fresh
I think this is the bits the installer needs. I might adjust /etc/netstart to use this glob or this to use *:*, still thinking on it. It's a bit simpler because I figured the installer could be quieter so I could just return instead of printing errors first. I haven't tested this yet. We'll

Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Andrew Hewus Fresh
On Wed, Nov 23, 2022 at 05:28:35PM -0800, Andrew Hewus Fresh wrote: > On Tue, Nov 22, 2022 at 08:09:11AM -0700, Theo de Raadt wrote: > > Florian Obser wrote: > > > ifconfig(8) already knows about these (see -C option). Which made me > > > think, it might be ea

Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Andrew Hewus Fresh
On Tue, Nov 22, 2022 at 08:09:11AM -0700, Theo de Raadt wrote: > Florian Obser wrote: > > ifconfig(8) already knows about these (see -C option). Which made me > > think, it might be easier to just ask ifconfig(8). > > I've done it as -M With `ifconfig -M $lladdr` support, and ignoring the

Re: lladdr support for netstart/hostname.if

2022-11-22 Thread Andrew Hewus Fresh
On Tue, Nov 22, 2022 at 03:37:20PM +, Klemens Nanni wrote: > On Tue, Nov 22, 2022 at 08:09:11AM -0700, Theo de Raadt wrote: > > Florian Obser wrote: > > > ifconfig(8) already knows about these (see -C option). Which made me > > > think, it might be easier to just ask ifconfig(8). > > > > > >

Re: lladdr support for netstart/hostname.if (was: Re: Locking network card configuration)

2022-11-21 Thread Andrew Hewus Fresh
On Mon, Nov 21, 2022 at 04:56:07PM +0100, Martijn van Duren wrote: > On Sun, 2022-11-20 at 19:35 -0700, Theo de Raadt wrote: > > Steve Litt wrote: > > > > > Vitaliy Makkoveev said on Mon, 21 Nov 2022 03:48:21 +0300 > > > > > > > > On 20 Nov 2022, at 18:06, Odd Martin Baanrud > > > > > wrote: >

Re: match recent Intel CPUs in fw_update(8)

2022-08-05 Thread Andrew Hewus Fresh
On Tue, Jun 21, 2022 at 02:58:46PM +1000, Jonathan Gray wrote: > Intel CPUs used to have strings like > cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) 1.20 > GHz > cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.61 MHz, 06-3d-04 > recent CPUs use > cpu0: 11th Gen

Re: include cpuid 0 string in dmesg for fw_update

2022-08-02 Thread Andrew Hewus Fresh
On Wed, Jul 27, 2022 at 06:47:56AM -0700, Andrew Hewus Fresh wrote: > On Wed, Jul 27, 2022 at 11:06:39AM +0200, Alexander Hall wrote: > > I think replacing '*' with '*([![:cntrl:]])' can be the droid your looking > > for. > > As I was falling asleep last night I was try

Re: include cpuid 0 string in dmesg for fw_update

2022-07-27 Thread Andrew Hewus Fresh
On Wed, Jul 27, 2022 at 11:06:39AM +0200, Alexander Hall wrote: > I think replacing '*' with '*([![:cntrl:]])' can be the droid your looking > for. As I was falling asleep last night I was trying to figure out how to get '*([!$_nl])' into the match and couldn't think of a good one. Your

Re: include cpuid 0 string in dmesg for fw_update

2022-07-26 Thread Andrew Hewus Fresh
On Sun, Jul 24, 2022 at 10:34:04AM -0700, Andrew Hewus Fresh wrote: > On Sun, Jul 24, 2022 at 09:14:30AM -0700, Andrew Hewus Fresh wrote: > > On Sun, Jul 24, 2022 at 10:01:26AM -0600, Theo de Raadt wrote: > > > Jonathan Gray wrote: > > > > > > > On Sun, Ju

Re: include cpuid 0 string in dmesg for fw_update

2022-07-24 Thread Andrew Hewus Fresh
On Sun, Jul 24, 2022 at 10:34:04AM -0700, Andrew Hewus Fresh wrote: > I'll try to think about whether I can build a sed program that will > spit out matches. Unfortunately the sed version seems to be even slower than matching one line at a time. Just building the patterns for sed is

Re: include cpuid 0 string in dmesg for fw_update

2022-07-24 Thread Andrew Hewus Fresh
On Sun, Jul 24, 2022 at 09:14:30AM -0700, Andrew Hewus Fresh wrote: > On Sun, Jul 24, 2022 at 10:01:26AM -0600, Theo de Raadt wrote: > > Jonathan Gray wrote: > > > > > On Sun, Jul 24, 2022 at 08:05:26AM -0600, Theo de Raadt wrote: > > > > Why not match on cpu0

Re: include cpuid 0 string in dmesg for fw_update

2022-07-24 Thread Andrew Hewus Fresh
On Sun, Jul 24, 2022 at 10:01:26AM -0600, Theo de Raadt wrote: > Jonathan Gray wrote: > > > On Sun, Jul 24, 2022 at 08:05:26AM -0600, Theo de Raadt wrote: > > > Why not match on cpu0: .*Intel > > > > I sent a diff a month ago with ^cpu0:*Intel(R) > > > > semarie mentioned false positives as it

Re: sysupgrade(8): Pick correct firmware directory

2022-03-01 Thread Andrew Hewus Fresh
On Tue, Mar 01, 2022 at 10:06:10AM +0100, Stefan Hagen wrote: > Stefan Hagen wrote (2022-02-28 22:16 CET): > > Theo de Raadt wrote (2022-02-28 18:02 CET): > > > When you run sysupgrade, you want the firmwares matching what you are > > > installing. > > > > > > The system you are running right now

Re: sysupgrade(8): Pick correct firmware directory

2022-02-28 Thread Andrew Hewus Fresh
On Mon, Feb 28, 2022 at 05:28:19PM +0100, Stefan Hagen wrote: > Andrew Hewus Fresh wrote (2022-02-28 15:40 CET): > > On Mon, Feb 28, 2022 at 02:47:24PM +0100, Stefan Hagen wrote: > > > But now I see that NEXT_VERSION is set earlier and this should fix it: > > > > >

Re: sysupgrade(8): Pick correct firmware directory

2022-02-28 Thread Andrew Hewus Fresh
On Mon, Feb 28, 2022 at 02:47:24PM +0100, Stefan Hagen wrote: > But now I see that NEXT_VERSION is set earlier and this should fix it: > > -if $RELEASE && [[ ${_KERNV[1]} == '-beta' ]]; then > +if $RELEASE || [[ ${_KERNV[1]} == '-beta' ]]; then It would fix this particular case, but this code is

Re: sysupgrade(8): Pick correct firmware directory

2022-02-28 Thread Andrew Hewus Fresh
On Mon, Feb 28, 2022 at 08:27:13AM +0100, Florian Obser wrote: > On 2022-02-27 21:33 -08, Andrew Hewus Fresh > wrote: > > So, sdk@ noticed that sysupgrade didn't get updated for the new logic in > > the firmware directories. Specifically that the only time we use > &g

fw_update: improve 'kept' messaging

2022-02-20 Thread Andrew Hewus Fresh
One of the things on my TODO list has been to improve the "kept" messaging from fw_update. For example, deleting a firmware doesn't list what was kept and if you specified a firmware to install on the command-line the "kept" list only included the specified firmware. Instead, we only keep track

Show none in fw_update when none are detected

2022-02-19 Thread Andrew Hewus Fresh
In the case where no firmware are detected/installed fw_update is too quiet. This should fix things to show "none" in that case: # fw_update fw_update: added none; updated none; kept none Is that what folks would expect? This patch does not include the extra level of indentation that

Re: fw_update perl glue tweaks

2022-02-14 Thread Andrew Hewus Fresh
On Mon, Feb 14, 2022 at 11:37:55AM +0100, Marc Espie wrote: > - you don't need to call unlock_db. When the process dies, the fd dies with > it, and the lock. Makes sense. it probably doesn't need the $SIG{TERM} handler if we don't need to trigger the END block anymore either. > - I've

fw_update(8): lock pkg database while running

2022-02-09 Thread Andrew Hewus Fresh
I was reminded that fw_update(8) updates the package database without locking currently. That can cause issues when running it concurrently with pkg_add, for example starting `pkg_add -u` in one terminal and `sysupgrade` in another. This diff checks to see if perl is available and if so starts a

Re: perl clang -Wcompound-token-split-by-macro

2022-02-07 Thread Andrew Hewus Fresh
On Mon, Feb 07, 2022 at 08:11:55PM +0100, Alexander Bluhm wrote: > On Tue, Jan 25, 2022 at 12:26:05PM -0800, Andrew Hewus Fresh wrote: > > On Tue, Jan 25, 2022 at 09:20:55PM +0100, Alexander Bluhm wrote: > > > On Tue, Jan 25, 2022 at 12:05:48PM -0800, Andrew Hewus Fresh wrote: &

Re: perl clang -Wcompound-token-split-by-macro

2022-02-03 Thread Andrew Hewus Fresh
On Tue, Jan 25, 2022 at 09:20:55PM +0100, Alexander Bluhm wrote: > Plans for new Perl are good to hear. Thanks for updating it regualry. One thing that's blocking me on that is the "vendorlib" patch over on tech@[1] and the related patch on ports@[2]. I think it's a good idea, but haven't

Re: perl clang -Wcompound-token-split-by-macro

2022-01-25 Thread Andrew Hewus Fresh
On Tue, Jan 25, 2022 at 09:20:55PM +0100, Alexander Bluhm wrote: > On Tue, Jan 25, 2022 at 12:05:48PM -0800, Andrew Hewus Fresh wrote: > > On Tue, Jan 25, 2022 at 06:45:12PM +0100, Alexander Bluhm wrote: > > > On Tue, Jan 25, 2022 at 05:13:01PM +0100, Alexander Bluhm wrote: >

Re: perl clang -Wcompound-token-split-by-macro

2022-01-25 Thread Andrew Hewus Fresh
On Tue, Jan 25, 2022 at 06:45:12PM +0100, Alexander Bluhm wrote: > On Tue, Jan 25, 2022 at 05:13:01PM +0100, Alexander Bluhm wrote: > > On Sat, Jan 22, 2022 at 02:24:51AM +0100, Marc Espie wrote: > > > Or we can automate this with something like this: > > > > Our Devel::PPPort is too old. We

Re: fw_update: unregister firmware that has moved to base

2022-01-23 Thread Andrew Hewus Fresh
On Sun, Jan 23, 2022 at 06:01:44PM -0800, Andrew Hewus Fresh wrote: > This patch will "unregister" a firmware package if we detect that it has > moved into the base system by removing the package files in /var/db/pkg > and leaving the files in /etc/firmware alone. > > T

fw_update: unregister firmware that has moved to base

2022-01-23 Thread Andrew Hewus Fresh
This patch will "unregister" a firmware package if we detect that it has moved into the base system by removing the package files in /var/db/pkg and leaving the files in /etc/firmware alone. This situation is detected with a special entry in the firmware_patterns file where the "pattern" is

Re: fw_update(8) Redownload files that fail validation

2022-01-21 Thread Andrew Hewus Fresh
Here's an updated patch that applies after recent commits. I'll commit this sometime this weekend unless someone has other ideas. On Sat, Jan 08, 2022 at 08:30:09PM -0800, Andrew Hewus Fresh wrote: > That last patch I committed made it so that if you specify a local path > to instal

Re: perl clang -Wcompound-token-split-by-macro

2022-01-21 Thread Andrew Hewus Fresh
On Sat, Jan 22, 2022 at 02:24:51AM +0100, Marc Espie wrote: > Or we can automate this with something like this: I didn't try this, but it seems OK to me. I'll leave the final OK to sthen though as I would think it most likely to break things for him. (AFAIU new versions are not supposed to

Re: perl clang -Wcompound-token-split-by-macro

2022-01-21 Thread Andrew Hewus Fresh
On Fri, Jan 21, 2022 at 04:34:13PM +0100, Marc Espie wrote: > On Fri, Jan 21, 2022 at 02:12:25PM +0100, Alexander Bluhm wrote: > > Hi, > > > > Since clang 13 each Perl or Perl XS module compile spits out a lot > > of -Wcompound-token-split-by-macro warnings. E.g. p5-Net-SSLeay > > produces 3882

Re: Add versioned lib to system perl's @INC for non-packaged modules

2022-01-11 Thread Andrew Hewus Fresh
considering removing the installperl patch and creating the directory in Makefile.bsd-wraapper for fewer local patches to maintain. Comments, test results, OK? On Fri, Jul 30, 2021 at 05:34:40PM -0700, Andrew Hewus Fresh wrote: > Below is the corrected patch for this, but it's not quite ready

fw_update(8) minor fixes

2022-01-10 Thread Andrew Hewus Fresh
I pulled some fixes out of the verbose patch so hopefully I can get them in while folks are trying out the more complex patch. Plus one change to usage from jmc@. His other option was to move the [-F | -d] into the man page, but we can just complain more specifically if they try to use

fw_update(8) Redownload files that fail validation

2022-01-08 Thread Andrew Hewus Fresh
That last patch I committed made it so that if you specify a local path to install from with -p, while it will look in the SHA256.sig file for the filename it didn't actually verify the checksum. In any case, this patch means we verify the checksum unless someone specified a local filename on the

Re: fw_update(8) Avoid downloading SHA256.sig unless we need it

2022-01-06 Thread Andrew Hewus Fresh
On Thu, Jan 06, 2022 at 06:13:33PM -0800, Andrew Hewus Fresh wrote: > deraadt@ noticed that if you install a list of local files fw_update > still tries to download the SHA256.sig and will fail if it can't. That > doesn't make sense, so instead only download it if we're goi

fw_update(8) Avoid downloading SHA256.sig unless we need it

2022-01-06 Thread Andrew Hewus Fresh
deraadt@ noticed that if you install a list of local files fw_update still tries to download the SHA256.sig and will fail if it can't. That doesn't make sense, so instead only download it if we're going to use it and it doesn't exist. It does continue to attempt to update the SHA256.sig if we're

fw_update(8) improve verbose output

2022-01-05 Thread Andrew Hewus Fresh
After getting fw_update(8) into a state where it could get some testing, I found that the man page indicated that -v should indicate different levels of verbosity and I currently only had one. This was useful as I didn't really like the output anyway. Now one -v prints out an additional line

Re: new site.8: document site*.tgz and /{upgrade,install}.site

2021-11-05 Thread Andrew Hewus Fresh
I like it, some comments in-line but overall I think this would have helped me get started with siteXX stuff, so OK afresh1@ On Fri, Nov 05, 2021 at 03:19:03PM +, Klemens Nanni wrote: > On Wed, Oct 27, 2021 at 07:35:28PM -0500, Aaron Poffenberger wrote: > > Looks good. Nice to see this moving

Re: Fix vi(1) recovery - new method

2021-10-31 Thread Andrew Hewus Fresh
In my quick test, this works a lot better than what we have now. At least I get back more of the file I was working on. I also haven't been able to reproduce the annoying segfault and half the original file disappearing, although that was infrequent before so could just be luck. User experience

Re: Add versioned lib to system perl's @INC for non-packaged modules

2021-07-30 Thread Andrew Hewus Fresh
it didn't work right. But, this should apply and let you play with it if you like. Once we have a path forward with the ports fallout, I'll be looking for more comments and maybe OKs. On Sun, May 16, 2021 at 03:30:39PM -0700, Andrew Hewus Fresh wrote: > This patch is should make it eas

Add versioned lib to system perl's @INC for non-packaged modules

2021-05-16 Thread Andrew Hewus Fresh
This patch is should make it easier to recover from problems that happen when installing perl modules outside of the package system. You might recognize the "loadable library and perl binaries are mismatched" error. Adding a versioned subdirectory for cpan modules means that when the perl

Update en_US.UTF-8.src to Unicode Version 13.0.0

2021-03-09 Thread Andrew Hewus Fresh
With the update to perl v5.32, we get Unicode 13 in base, which means we can update the table. This is the mechanical change from running the gen_ctype_utf8.l script. https://www.unicode.org/versions/Unicode13.0.0 Comments, OK? Index: share/locale/ctype/gen_ctype_utf8.pl

install smtpd-filters(7)?

2021-02-27 Thread Andrew Hewus Fresh
It would be nice to have this reference installed, would this be the right place to do that? (ok, mostly I want to link https://man.openbsd.org/smtpd-filter.7 from https://github.com/afresh1/OpenSMTPd-Filter/) Comments, OK? Index: usr.sbin/smtpd/smtpd/Makefile

Re: OpenBSD perl 5.32.1 - Call for Testing

2021-02-26 Thread Andrew Hewus Fresh
On Sat, Feb 20, 2021 at 02:11:45PM -0800, Andrew Hewus Fresh wrote: > I've probably missed making it in for 6.9, but it is again time for > testing a perl update so it can become /usr/bin/perl It was pointed out that there is still time to get this in for 6.9, and sthen@ says it lo

OpenBSD perl 5.32.1 - Call for Testing

2021-02-20 Thread Andrew Hewus Fresh
I've probably missed making it in for 6.9, but it is again time for testing a perl update so it can become /usr/bin/perl Several good changes this time: https://metacpan.org/pod/distribution/perl/pod/perl5320delta.pod https://metacpan.org/pod/release/SHAY/perl-5.32.1/pod/perldelta.pod * A new

Document vi range

2020-05-18 Thread Andrew Hewus Fresh
It took me far too long to figure out how to do this, and I seem to have found this patch when trying to figure it out again but a year later I've forgotten how I figured it out. I'm sure I messed up the formatting terribly, but being able to remember `:.,'cs/foo/bar/` by looking in the manual

Re: Remove some customization from our perl build

2020-05-17 Thread Andrew Hewus Fresh
https://github.com/Perl/perl5/pull/17750 This patch does miss `rm gnu/usr.bin/perl/DynaLoader.sed` that we no longer need, not sure which cvs diff flag I missed on that. Other than that, as described in my original email: On Fri, Apr 10, 2020 at 06:17:33PM -0700, Andrew Hewus Fresh wrote

Reenable json_pp in perl build

2020-05-17 Thread Andrew Hewus Fresh
With the advent of more things speaking JSON, I thought perhaps we might want to re-enable the json_pp script that normally ships with perl, but OpenBSD doesn't install. It's not terribly useful as it is mostly just a "pretty printer", although it does also allow converting to Data::Dumper format

Re: Remove some customization from our perl build

2020-04-12 Thread Andrew Hewus Fresh
On Fri, Apr 10, 2020 at 07:34:21PM -0600, Todd C. Miller wrote: > On Fri, 10 Apr 2020 18:17:33 -0700, Andrew Hewus Fresh wrote: > > > Recently it was pointed out that we don't link /usr/lib/libperl.so.* to > > libm the way is expected for code that also links to libperl. Tha

Remove some customization from our perl build

2020-04-10 Thread Andrew Hewus Fresh
Recently it was pointed out that we don't link /usr/lib/libperl.so.* to libm the way is expected for code that also links to libperl. That led me to go digging again into the customization we have around the perl build and getting terribly confused. That did somewhat clear up after reading more

OpenBSD perl 5.30.2 - Call for Testing

2020-04-05 Thread Andrew Hewus Fresh
There's a minor update for perl 5.30.2 out, mostly just some bugfixes, but also documentation updates because the main repository and bug tracker for perl has moved to GitHub. The full perldeltas are here the main one for for 5.30.0, and 5.30.1 that we have in-tree now and the smaller bugfixes in

  1   2   >