Re: locale thread support

2020-05-22 Thread Marc Espie
On Fri, May 22, 2020 at 02:31:38PM +0200, Mark Kettenis wrote: > > Date: Fri, 22 May 2020 13:50:44 +0200 > > From: Marc Espie > > > > I've had to neuter some setlocale() in mlt, since our code is > > definitely NOT thread-safe. No biggie, since we do not have su

Re: pkg_add.1

2020-06-26 Thread Marc Espie
On Wed, Jun 24, 2020 at 05:32:57PM +0100, Jason McIntyre wrote: > On Tue, Jun 23, 2020 at 07:28:09PM -0400, sven falempin wrote: > > Dear readers, > > > > It may not be very obvious that 'dry run' mode of pkg_add > > actually downloads packages. > > It is a good feature and maybe the pkg_add man

Re: [PATCH] [xenocara] app/xenodm/config/Xsetup_0 - reduce the number of lines

2020-06-16 Thread Marc Espie
On Tue, Jun 16, 2020 at 08:43:02PM +0100, Raf Czlonka wrote: > Ping. > > CC'ing espie@ as he committed the initial code. > > Cheers, > > Raf > > On Sun, Jun 07, 2020 at 07:30:39PM BST, Raf Czlonka wrote: > > Hi all, > > > > I've been running openbsd-backgrounds on all of my desktop machines

Re: improve pkg_add bandwidth usage with some mirrors

2020-06-18 Thread Marc Espie
On Wed, Jun 17, 2020 at 11:34:20AM +0200, Solene Rapenne wrote: > I propose a small diff for pkg_add when using http/https mirrors. > Don't wait 30 seconds for the ftp process to stop when closing > file handler, send SIGHUP immediately after closing the file handler. > > Running pkg_add -u

Re: code style questions

2020-06-10 Thread Marc Espie
On Tue, Jun 09, 2020 at 08:19:53PM -0700, jo...@armadilloaerospace.com wrote: > Also, style(9) says that prototypes should not have variable names > associated with the types. I try to use good names in the headers > for documentation purposes; what is the thinking behind the rule? function

Re: code style questions

2020-06-10 Thread Marc Espie
On Wed, Jun 10, 2020 at 05:38:36PM +1000, Jonathan Gray wrote: > On Wed, Jun 10, 2020 at 09:19:47AM +0200, Martin Pieuchot wrote: > > On 09/06/20(Tue) 20:19, jo...@armadilloaerospace.com wrote: > > > Looking for some guidance to avoid proposing any unpopular diffs. > > > > > > Style(9) says not

Re: userland clock_gettime proof of concept

2020-06-11 Thread Marc Espie
On Thu, Jun 11, 2020 at 01:13:07PM +0300, Paul Irofti wrote: > On 2020-06-11 02:46, Christian Weisgerber wrote: > > Paul Irofti: > > > > > This iteration of the diff adds bounds checking for tk_user and moves > > > the usertc.c stub to every arch in libc as recommanded by deraadt@. > > > It also

Re: userland clock_gettime proof of concept

2020-06-11 Thread Marc Espie
On Thu, Jun 11, 2020 at 03:42:27PM +0300, Paul Irofti wrote: > On Thu, Jun 11, 2020 at 02:05:44PM +0200, Marc Espie wrote: > > On Thu, Jun 11, 2020 at 01:13:07PM +0300, Paul Irofti wrote: > > > On 2020-06-11 02:46, Christian Weisgerber wrote: > > > > Paul Irofti: >

Re: userland clock_gettime proof of concept

2020-06-11 Thread Marc Espie
On Thu, Jun 11, 2020 at 07:55:44AM -0600, Theo de Raadt wrote: > I think this conversation about major numbers, and now minor numbers, > is incredibly silly. > > Do we have a major number on the open(2) system call? No, and the main > reason is because the code isn't a draft, it was completed. >

Re: make.1: sync variable substitution bits with NetBSD

2020-12-30 Thread Marc Espie
I do think we want to write something specific for .for loop variables which are actually very special compared to the rest. I'm not incredibly happy with the way netbsd explains it, not surprisingly.

Re: emutls and dlopen(3) problem - Re: patch: make ld.so aware of pthread_key_create destructor - Re: multimedia/mpv debug vo=gpu crash on exit

2021-05-09 Thread Marc Espie
So, is there a way to get a work-around ? or should we push for proper tls sooner than later ? It always made me queasy having all those programs segfaulting on exit. Not sure it's exploitable, but giving people the impression it's okay to segfault. I thought it might be bad code in the

Re: Thread Local Storage in clang

2021-05-28 Thread Marc Espie
On Fri, May 28, 2021 at 07:55:39AM -0700, Chris Cappuccio wrote: > I tried to compile librdkafka on OpenBSD 6.5 (clang 7.0.1) and clang compiled > the __thread parts with some built-in mechanism. I upgraded the system to > OpenBSD 6.9 and TLS is no longer supported by the in-tree clang. Was this >

Re: Thread Local Storage in clang

2021-05-28 Thread Marc Espie
On Fri, May 28, 2021 at 06:56:42PM +0200, Marc Espie wrote: > On Fri, May 28, 2021 at 07:55:39AM -0700, Chris Cappuccio wrote: > > I tried to compile librdkafka on OpenBSD 6.5 (clang 7.0.1) and clang > > compiled > > the __thread parts with some built-in mechanism.

Re: shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
On Fri, Apr 30, 2021 at 12:03:00PM +0100, Raf Czlonka wrote: > Hi Mark, > > You and me both ;^) > > Until recently, I thought that getopt(1) was POSIX, whereas it is > in fact getopts(1), and it is not a shell built-in there, but a > utility[0]. Nope, it is a shell built-in... the "wording" of

shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
Until a patch from naddy, I wasn't even aware of getopts in sh(1) Unless I made some mistakes, this translates the example in getopt(1) manpage. It's likely some stronger wording might be adequate, I suspect some of the BUGS section in getopt(1) does not apply to the sh(1) built-in. Index:

Re: shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
On Fri, Apr 30, 2021 at 03:28:42PM +0100, Jason McIntyre wrote: > my argument boils down to: sh(1) is small and has no examples. adding > them changes the (deliberate) nature of the page. ksh(1) is what you > read when you can;t get to sleep. > > why is it wrong to add your example to ksh(1)? why

Re: shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
On Fri, Apr 30, 2021 at 03:28:42PM +0100, Jason McIntyre wrote: > On Fri, Apr 30, 2021 at 04:07:55PM +0200, Marc Espie wrote: > > On Fri, Apr 30, 2021 at 02:44:01PM +0100, Jason McIntyre wrote: > > > On Fri, Apr 30, 2021 at 11:54:16AM +0200, Marc Espie wrote: > > > &g

Re: shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
On Fri, Apr 30, 2021 at 02:44:01PM +0100, Jason McIntyre wrote: > On Fri, Apr 30, 2021 at 11:54:16AM +0200, Marc Espie wrote: > > Until a patch from naddy, I wasn't even aware of getopts in sh(1) > > > > Unless I made some mistakes, this translates the example in

Re: shell manpage tweaks wrt getopt

2021-04-30 Thread Marc Espie
On Fri, Apr 30, 2021 at 04:54:57PM +0200, Christian Weisgerber wrote: > Marc Espie: > > > Until a patch from naddy, I wasn't even aware of getopts in sh(1) > > Let's start the discussion with this instead. > > This puts the deprecation notice in getopt.1 in a pro

patch: split off some port-modules(5) documentation

2021-02-24 Thread Marc Espie
@@ -0,0 +1,122 @@ +.\"$OpenBSD$ +.\" +.\" Copyright (c) 2008 Marc Espie +.\" +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\&quo

Re: Exit status of pkg_add

2021-10-21 Thread Marc Espie
On Tue, Oct 19, 2021 at 10:42:04AM +0900, Yuichiro NAITO wrote: > Following patch changes pkg_add to return a error code, > if a package name is wrong. > > diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm > b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm > index 7a968cbf05d..39bee874ff1 100644 > ---

Re: locale in expr(1)

2021-11-15 Thread Marc Espie
On Mon, Nov 15, 2021 at 05:58:38PM +0100, Ingo Schwarze wrote: > I don't know. A fairly reliable way to create security risks is > complexity. Apart from the erratic run time behaviour that is likely to > trip up sysadmins - LC_COLLATE can change the collation sequence even > among ASCII

Re: locale in expr(1)

2021-11-15 Thread Marc Espie
On Mon, Nov 15, 2021 at 03:43:47PM +0100, Jan Stary wrote: > Here's a try (see below); > one sentence one line while here. > > I would also replace 'results' with 'result' everywhere, > but I am not a native speaker. > > Jan > > > On Nov 10 18:46:08, h...@stare.cz wrote: > > On Nov 10

PATCH: make pkg_delete a bit more finicky

2021-10-30 Thread Marc Espie
We disabled the checksum check because it was rather expensive, but actually we also store timestamps in packing-lists This is a first draft at a better check. What this does: - compare the fs timestamp with the packing-list timestamp. This should be very cheap in most cases, since we're already

Re: atomic read write

2022-03-11 Thread Marc Espie
I've been reading the newer C standard (n2310.pdf to be specific). That thing is scary. I believe that, in the long haul, we will have to use the Atomic types stuff that's apparently part of the C standard now. Yeah, the switch to multi-threading made the standard way more complicated. Sequence

Re: PATCH: speed up pkg_add

2022-03-16 Thread Marc Espie
I got a new slightly different one. Specifically, the old one has a "fun" failure mode in case an old package got broken and is missing files. The heuristics correctly deduces that the files are not there, so it extracts in-place... then pkg_delete promptly deletes what it believes to be files

PATCH: speed up pkg_add

2022-03-15 Thread Marc Espie
I've changed pkg_add for updates and tied files a while back, which resulted in creating a lot of temp files. The logic was complicated, and I didn't want to make it more complex at the time until most of the issues were fixed. Then we got tags, so that most packing-lists are innocuous these

Re: A program compiled with '-pg' option always gets SEGV on its execution.

2022-02-21 Thread Marc Espie
On Mon, Feb 21, 2022 at 05:36:16PM +0900, Yuichiro NAITO wrote: > Of course, all programs compiled without '-pg' work fine for me. > I found this issue when I profile my application with gprof(1). > For example, following example C source code fails to execute on OpenBSD 7.0. Profile is partly

Re: fw_update perl glue tweaks

2022-02-14 Thread Marc Espie
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. > > - I've committed glue to PackageInfo.pm to make lock_db self-contained > (it will pull BaseState in on an "as neede

fw_update perl glue tweaks

2022-02-14 Thread Marc Espie
- you don't need to call unlock_db. When the process dies, the fd dies with it, and the lock. - I've committed glue to PackageInfo.pm to make lock_db self-contained (it will pull BaseState in on an "as needed" basis, which also comes in handy for other locks prior to having a state) Index:

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

2022-02-08 Thread Marc Espie
On Tue, Feb 08, 2022 at 01:59:51PM +, Stuart Henderson wrote: > > > I think we should start updating Devel::PPPort in base. Then we > > > can regenerate other ppport.h in base and ports. Note that some ports > > > need newer Devel::PPPort than we have now. So updating seems > > >

Re: fw_update(8): lock pkg database while running

2022-02-09 Thread Marc Espie
On Wed, Feb 09, 2022 at 07:30:46PM -0800, Andrew Hewus Fresh wrote: > 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`

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

2022-01-21 Thread Marc Espie
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 warnings generated. You cannot spot anything useful. > The problem is

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

2022-01-21 Thread Marc Espie
Or we can automate this with something like this: Index: perl.port.mk === RCS file: /cvs/ports/infrastructure/mk/perl.port.mk,v retrieving revision 1.32 diff -u -p -r1.32 perl.port.mk --- perl.port.mk12 Dec 2021 19:25:39

Re: kbd -l error message

2022-04-14 Thread Marc Espie
On Thu, Apr 14, 2022 at 04:28:37PM +0200, Alexander Bluhm wrote: > Hi, > > When kbd -l is executed as regular user, it fails silently. > > $ kbd -l > $ echo $? > 0 > > Error handling is a bit tricky. We want the first error if no > device is available. > > $ ./kbd -l > kbd: open

Re: unifdef HAS_INLINES in make(1)

2023-09-05 Thread Marc Espie
On Tue, Sep 05, 2023 at 11:51:34AM +1000, Jonathan Gray wrote: > On Mon, Sep 04, 2023 at 11:51:33PM +0200, Marc Espie wrote: > > On Tue, Sep 05, 2023 at 12:04:24AM +1000, Jonathan Gray wrote: > > > inline is part of gnu89 and c99 > > &

Re: PATCH: remove "dead code" in make

2023-09-03 Thread Marc Espie
On Thu, Aug 31, 2023 at 08:59:53AM +0200, Marc Espie wrote: > A long time ago, I tried to host our fork of make, in the hope it would get > picked up by other systems. > > Accordingly, some features were added to mimic netbsd's extensions, hidden > behind FEATURES macros.

ps.1/kvm documentation

2023-09-11 Thread Marc Espie
I was reading through ps.1, which has two slightly different options -H Also display information about kernel visible threads. -k Also display information about kernel threads. It's not at all obvious what the difference between these options might be. >From the log:

path: speed-up pkg-config

2023-09-11 Thread Marc Espie
Not to pkgconf levels, but still way faster than what we had Updated patch from what I've shown to people, turns out the second grep wasn't quite working. This does cache the set_variables_from_env shennanigans, speeding up large processing of recursive files by a large factor (since we keep a

Re: ps.1/kvm documentation

2023-09-11 Thread Marc Espie
t; > -- > Sent from a phone, apologies for poor formatting. > > On 11 September 2023 10:02:32 Marc Espie wrote: > > > I was reading through ps.1, which has two slightly different options > > -H Also display information about kernel visible threads. > >

Re: ps.1/kvm documentation

2023-09-11 Thread Marc Espie
On Mon, Sep 11, 2023 at 12:10:17PM +0200, Claudio Jeker wrote: > On Mon, Sep 11, 2023 at 11:02:00AM +0200, Marc Espie wrote: > > I was reading through ps.1, which has two slightly different options > > -H Also display information about kernel visible threads. > &

PATCH: unify VAR!=cmd and other command execution

2023-08-28 Thread Marc Espie
Turns out the exec in cmd_exec.c has absolutely zero reason to be different from what engine does. This small patch moves a bit of code around, so that all execv() consumers benefit from the same optimisation (namely, no extra shell when not needed). The only visible change should be that now,

Re: path: speed-up pkg-config

2023-09-12 Thread Marc Espie
On Mon, Sep 11, 2023 at 09:55:53AM +0200, Marc Espie wrote: > Not to pkgconf levels, but still way faster than what we had > > Updated patch from what I've shown to people, turns out the second grep > wasn't quite working. > > This does cache the set_variables_from_env shennan

PATCH: remove "dead code" in make

2023-08-31 Thread Marc Espie
A long time ago, I tried to host our fork of make, in the hope it would get picked up by other systems. Accordingly, some features were added to mimic netbsd's extensions, hidden behind FEATURES macros. Turns out that, for better or for worse, FreeBSD decided to go with NetBSD's fork of bmake,

Re: unifdef HAS_INLINES in make(1)

2023-09-04 Thread Marc Espie
On Tue, Sep 05, 2023 at 12:04:24AM +1000, Jonathan Gray wrote: > inline is part of gnu89 and c99 > > Index: defines.h > === > RCS file: /cvs/src/usr.bin/make/defines.h,v > retrieving revision 1.15 > diff -u -p -r1.15 defines.h > ---

Re: Buffer overflow in /usr/bin/deroff

2023-09-19 Thread Marc Espie
On Tue, Sep 19, 2023 at 09:48:25AM -0300, Crystal Kolipe wrote: > deroff chokes when given lines > 2048 bytes, and produces non-deterministic > output on little endian archs. > > Reproducer: > > $ jot -s '' -b blah 513 > /tmp/blah > $ for i in 1 2 3 4 ; do deroff /tmp/blah | md5 ; done >

Termp/Cap

2023-10-18 Thread Marc Espie
The max approach is bogus. It happens because the terminal uses tc, and then tc again. The proper approach, especially in perl, is to actually detect a loop, which should be fairly easy by saving the tc that have already been done in a hash.

better fix for Term::Cap

2023-10-18 Thread Marc Espie
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. Please test. Index: Cap.pm === RCS file: /cvs/src/gnu/usr.bin/perl/cpan/Term-Cap/Cap.pm,v

Term::Cap full revamp

2023-10-20 Thread Marc Espie
I guess i will probably leave it alone after this. This does quite a few things compared to my former patches. - totally get rid of eval, it doen't make sense anymore - declare variables before they get used, which tends to simplify things. - change quaint formatting to something more BSD like -

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

2023-10-14 Thread Marc Espie
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 > installed packages. > > Currently we do _read_ the existing firmware as part of

POC: variable length in make

2023-08-22 Thread Marc Espie
We've run into a few errors due to very long variable expansion in bsd.port.mk that overflows execve(2) I would consider adding a modifier to give the length of a variable, so that significant tests can be done, along the lines of .if ${VARIABLE:len} > 20 ERRORS += "Fatal: variable may

Re: coping with large shell commands in make(1)

2023-08-26 Thread Marc Espie
On Sat, Aug 26, 2023 at 02:25:19PM -0600, Theo de Raadt wrote: > I did not point you in this direction, not at all. Oh you did. It was not intentional. But I was focused on make variables instead of trying to catch the error, and you redirected me towards execv proper. > I said make execve

coping with large shell commands in make(1)

2023-08-26 Thread Marc Espie
Theo pointed me in another direction Proof of concept that appears to work just fine (very minimal error checking so far) Of course, if we end up running a command on somethin too large, thi will fail as usual, but much to my surprise, make show=_FULL_FETCH_LIST in sysutils/telegraf worked with

Re: PATCH: unify VAR!=cmd and other command execution

2023-08-28 Thread Marc Espie
On Mon, Aug 28, 2023 at 08:42:50PM +0200, Marc Espie wrote: > Turns out the exec in cmd_exec.c has absolutely zero reason to be > different from what engine does. > > This small patch moves a bit of code around, so that all execv() consumers > benefit from the same optimisation (n

Re: PATCH: unify VAR!=cmd and other command execution

2023-08-29 Thread Marc Espie
On Mon, Aug 28, 2023 at 10:03:46PM +0200, Theo Buehler wrote: > On Mon, Aug 28, 2023 at 09:18:40PM +0200, Marc Espie wrote: > > On Mon, Aug 28, 2023 at 08:42:50PM +0200, Marc Espie wrote: > > > Turns out the exec in cmd_exec.c has absolutely zero reason to be > > > diff

Re: Picky, but much more efficient arc4random_uniform!

2022-05-15 Thread Marc Espie
Random generators have been analyzed for years. Pick up "Concrete mathematics" by Don E. Knuth, read it, then come back with actual science.

Re: [PATCH] xenocara: change xterm ProcGetCWD to get cwd via sysctl instead of procfs

2022-05-16 Thread Marc Espie
On Sun, May 15, 2022 at 08:46:00PM -0600, Theo de Raadt wrote: > You'll turn into a smurf before you finish auditing xterm perfectly. Should be in fortune ;)

Re: Picky, but much more efficient arc4random_uniform!

2022-05-21 Thread Marc Espie
On Sat, May 21, 2022 at 07:47:40AM -0500, Luke Small wrote: > Perhaps it was rude sending off list stuff to the list. Your email sounded > "less than friendly" and more of a professional challenge that you were > definitely in the works to produce; much like Damien Miller’s challenge to > prove

some package oddities

2022-05-30 Thread Marc Espie
Due to some slowdown in updating texlive, I've looked up duplicate files inside packages. Most packages are okay, a few are not... The following list shows the maximum number of times a file appears in a given package (just looking at its checksum) Note sdcc, which stores a crazy number of

ports tree FULLPATH convention

2022-07-05 Thread Marc Espie
This is something I added in 2011 (I think) to bsd.port.subdir.mk if FULLPATH=Yes, a FULLPKGPATH like SUBDIR=cat/location will give you the EMPTY flavor for that location instead of the DEFAULT flavor. I'm now questionning whether this actually makes senses considering the changes I was making

pkg_create tweak for PORTSDIR_PATH

2022-06-28 Thread Marc Espie
As noticed by landry, going to the ports tree for dependencies can fail hilariously in case of a PORTSDIR_PATH. Most specifically, assuming you are building something like firefox-102 in one of your ports directory, when building the debug package, dependency look-up in pkg_create is going to

m4: gnu-m4 compat draft

2022-06-08 Thread Marc Espie
Naddy told me about an app that wants a gnu-m4 extension that requires >9 arguments to macros. I wrote a very quick patch that seems to do the work. There are probably lots of kinks to work out, it's been very lightly tested. (in particular, I haven't looked at stuff like $* and friends yet,

@extraunexec usage in pkg_add

2022-06-07 Thread Marc Espie
I've conducted a quick audit of the 300 or so uses of @extraunexec in pkg_add. All but 5 are actually glorified versions of rm -rf I propose eventually replacing them with @extraglob pattern with several advantages: - we have file names that we know - perl itself can expand the glob and

Re: m4: gnu-m4 compat draft

2022-06-15 Thread Marc Espie
On Wed, Jun 08, 2022 at 09:44:19PM +0200, Marc Espie wrote: > Naddy told me about an app that wants a gnu-m4 extension that > requires >9 arguments to macros. > > I wrote a very quick patch that seems to do the work. There are probably > lots of kinks to work out, it's been v

Re: clang-local.1: document support for source-based code coverage

2022-05-04 Thread Marc Espie
On Wed, May 04, 2022 at 07:43:35AM -0400, Bryan Steele wrote: > On Wed, May 04, 2022 at 01:20:10PM +0200, Frederic Cambus wrote: > > Hi tech@, > > > > The base system includes the compiler-rt profile library for > > source-based code coverage. > > > > So here is a diff to document support in

pkg_add: better correspondence of file names

2022-05-05 Thread Marc Espie
In the old pkg_add model (prior to 7.1), we create tmp files anyway, so the code is fine. 7.1 and later, we try to avoid creating temp files, so a better name matching correspondence would be cool What this patch does: the old code creates a simple hash where we associate ONE packing-list

Re: wc(1): add -L flag to write length of longest line

2022-10-01 Thread Marc Espie
On Fri, Sep 30, 2022 at 02:22:34AM +0200, Joerg Sonnenberger wrote: > On Thu, Sep 29, 2022 at 08:39:16PM +1000, Jonathan Gray wrote: > > wc counts items in files. Finding the longest item indeed sounds > > like a task better suited to awk. > > Finding outliers, means and counting are all parts

Re: malloc: prep for immutable pages

2022-10-05 Thread Marc Espie
On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > A note on why this chance is coming. > > malloc.c (as it is today), does mprotects back and forth between RW and > R, to protect an internal object. This object is in bss, it is not > allocated with mmap. With the upcoming

Re: malloc: prep for immutable pages

2022-10-06 Thread Marc Espie
On Wed, Oct 05, 2022 at 07:54:41AM -0600, Theo de Raadt wrote: > Marc Espie wrote: > > > On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > > > A note on why this chance is coming. > > > > > > malloc.c (as it is today), does mprotect

Re: run-regress-* targets in bsd.regress.mk

2022-12-02 Thread Marc Espie
On Fri, Dec 02, 2022 at 02:08:33PM +0100, Theo Buehler wrote: > On Fri, Dec 02, 2022 at 01:52:43PM +0100, Marc Espie wrote: > > On Fri, Dec 02, 2022 at 12:59:02PM +0100, Theo Buehler wrote: > > > I wanted to override some of the default run-regress-* targets by > > >

Re: games: add dots and boxes game

2022-12-14 Thread Marc Espie
On Tue, Dec 13, 2022 at 02:29:22PM +, Stuart Henderson wrote: > On 2022/12/13 14:27, Stuart Henderson wrote: > > On 2022/12/13 14:13, Janne Johansson wrote: > > > Den tis 13 dec. 2022 kl 14:11 skrev Alireza Arzehgar > > > : > > > > I implemented an interesting game. I thought this game is cool

Re: run-regress-* targets in bsd.regress.mk

2022-12-02 Thread Marc Espie
On Fri, Dec 02, 2022 at 12:59:02PM +0100, Theo Buehler wrote: > I wanted to override some of the default run-regress-* targets by > declaring them in regress Makefiles. Many tests already do that and > it happens to work as expected. > > However, this relies on behavior in the BUGS section of

Re: Preferred TERM for pkg_add

2023-01-29 Thread Marc Espie
Actual patches to pkg_add (if need be) welcome The switch to not using full term length was actually done at Theo's request. I don't remember the details, but Theo's rationale was quite reasonable and made lots of sense. (specifically, using the full line length would be cool, but there were

Re: OpenBSD perl 5.36.0 - Call for Testing

2023-01-29 Thread Marc Espie
One thing that's going to be very useful IMO is newer function bindings. Us perlers don't really care, matching $@ after the sub is cool. But having off-the-mill function "declarations" that look a lot like function declarations in other more common languages (e.g. sub f($a, $b) ) might help

non regression tests for some packaging scripts

2022-11-14 Thread Marc Espie
I'd like to add some non-regression tests for some scripts, most notably register-plist, which is... let's say not perfect at the moment. I believe ${PORTSDIR}/regress is probably the simplest least disturbing way to do that. Since the manpages already exist under src, I could also (somehow) put

tweak to dependency checking

2022-11-03 Thread Marc Espie
I'd like to add a special construct to dependencies, "=" to mean the exact version of the package we're depending on. The patch is trivial: Index: OpenBSD/PackingElement.pm === RCS file:

PKU ?

2023-01-31 Thread Marc Espie
I'm curious about the new enforcement strategies. Unfortunately I'm a bit lost in the 1000+ pages of the intel manual. Could someone point me to the document that describes PKU, specifically ?

Re: pax: GNU tar base-256 size field support

2023-04-22 Thread Marc Espie
On Tue, Apr 18, 2023 at 08:10:06PM -0600, Todd C. Miller wrote: > I recently ran into a problem with busybox tar generating archives > where the size field is base-256 encoded for files larger than 8GB. > Apparently this is a GNU tar extension. > > Do we want to support this in pax? Below is an

Re: spurious error message from signify

2023-04-22 Thread Marc Espie
On Sat, Apr 22, 2023 at 11:02:23AM +0200, Marc Espie wrote: > Well, sdk stumbled upon it > (see docbooks-dsssl-1.79.tgz in snapshots right now) > > Turns out that, if the archive is *exactly* a multiple of 64KB, > we will error out at EOF. > > I believe keeping the

spurious error message from signify

2023-04-22 Thread Marc Espie
Well, sdk stumbled upon it (see docbooks-dsssl-1.79.tgz in snapshots right now) Turns out that, if the archive is *exactly* a multiple of 64KB, we will error out at EOF. I believe keeping the check for short reads and exiting as well for files that do not match 64KB lengths is the right thing to

Re: pkg_add optional behavior "like syspatch"

2023-07-02 Thread Marc Espie
On Sun, Jul 02, 2023 at 06:06:28PM +0100, Stuart Henderson wrote: > On 2023/07/02 16:49, Solène Rapenne wrote: > > On Sun, 2023-07-02 at 15:51 +0200, Marc Espie wrote: > > > Use-case: some people want to branch automated installs based on > > > whether > > >

Re: pkg_add optional behavior "like syspatch"

2023-07-02 Thread Marc Espie
On Sun, Jul 02, 2023 at 04:49:41PM +0200, Solène Rapenne wrote: > On Sun, 2023-07-02 at 15:51 +0200, Marc Espie wrote: > > Use-case: some people want to branch automated installs based on > > whether > > pkg_add -u (or some other variation) actually did something. > &

Re: Diff for evaluation (WACOM tablet driver)

2023-07-03 Thread Marc Espie
On Mon, Jul 03, 2023 at 03:20:33PM +0300, Matthieu Herrb wrote: > > Index: dev/usb/usbdevs.h > > === > > RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v > > retrieving revision 1.769 > > diff -u -p -r1.769 usbdevs.h > > ---

Re: Diff for evaluation (WACOM tablet driver)

2023-07-03 Thread Marc Espie
I hope Vladimir will find the time to complete this answer. As far as Vlad's work goes, he did a presentation last week-end: https://www.lre.epita.fr/news_content/SS_summer_week_pres/Vladimir_Driver_OpenBSD.pptx (sorry for the medium, fortunately we have libreoffice) In the mean time, here is

Re: Icky test patches for Devel::Cover and pkg_add

2023-07-08 Thread Marc Espie
real worlds problems :( On Sat, Jul 8, 2023 at 11:27 AM Marc Espie wrote: > > Contrary to the NYT profiler, which works like a charm > Devel::Cover is a tricky beast. > > Right now, I've isolated two issues: > - OpenBSD::MkTemp (subject to a separate mail) > - identity chan

Icky test patches for Devel::Cover and pkg_add

2023-07-08 Thread Marc Espie
Contrary to the NYT profiler, which works like a charm Devel::Cover is a tricky beast. Right now, I've isolated two issues: - OpenBSD::MkTemp (subject to a separate mail) - identity changes on the fly. Even with looseperms, Devel::Cover doesn't cope too well with multiple processes and multiple

OpenBSD::MkTemp vs Devel::Cover

2023-07-08 Thread Marc Espie
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 Selecting packages matching: OpenBSD/.* Ignoring packages matching:

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

2023-07-19 Thread Marc Espie
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 for some testing.

Re: Diff for evaluation (WACOM tablet driver)

2023-07-05 Thread Marc Espie
On Tue, Jul 04, 2023 at 07:20:51PM -0400, Thomas Frohwein wrote: > Thanks, I built a kernel with this and no issues observed. I have a > Wacom Bamboo (CTH-470, product id 0x00de) that doesn't attach yet, but > this can be left for future work. I don't see anything glaring. hid.c > could probably

pkg_*: the road forward

2023-07-10 Thread Marc Espie
I spent some time during the last hackathon, talking to various people over where we're going. I'm a bit afraid that people are going to see the ports/package framework as "not invited" (because some of the subsystems of OpenBSD are not exactly oustide friendly) Right now, I got one student

Re: OpenBSD::MkTemp vs Devel::Cover

2023-07-10 Thread Marc Espie
Tl;Dr: I'm not trying too hard to use Devel::Cover but so far it fails abysmally with BOTH pkg_add and dpb. I'll admit that both are playing "fun" games with identity but seriously, Devel::NYTProf didn't care at all ! I've spent a few hours trying to figure out options (loose_perms won't help)

Re: pkg-config tweaks

2023-05-26 Thread Marc Espie
There was a small typo which broke xenocara, as noticed by tb@ (sidenote: I hate this shitty configure stuff that can't even give you the warning messages from tools that ran. *OF COURSE* it's because so much of that shit talks incessantly even when things are fine) Index: pkg-config

Re: pkg-config tweaks

2023-06-05 Thread Marc Espie
A bit more pkg-config tweaks. - I missed two anonymous subs. - somehow I did mangle the flags with respect to --libs-only-other - so I added regress tests for those. - I found out that stuff like --libs-only-l will tend to prepend a space like -lalpha2 turns out the glib2 version of pkg-config

pkg-config tweaks

2023-05-22 Thread Marc Espie
- 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 unneeded [] in regexps - fix indentation and parentheses in a few

make: slightly better diagnostic

2023-05-28 Thread Marc Espie
Turns out that, due to the search rules we use, make is mostly silent in case it couldn't read a Makefile The following patch lets it track the makefilenames that do exist, but that it wasn't able to open, so that a post-mortem can include these. Not sure if other use-cases could also use the

Re: make: slightly better diagnostic

2023-05-28 Thread Marc Espie
On Sun, May 28, 2023 at 04:44:37PM +0200, Omar Polo wrote: > On 2023/05/28 13:16:34 +0200, Marc Espie wrote: > > Turns out that, due to the search rules we use, make > > is mostly silent in case it couldn't read a Makefile > > > > The following patch lets it track th

Re: make: slightly better diagnostic

2023-05-28 Thread Marc Espie
Here's a slightly more specific diff avoiding useless stat(2) Index: engine.c === RCS file: /cvs/src/usr.bin/make/engine.c,v retrieving revision 1.70 diff -u -p -r1.70 engine.c --- engine.c25 Oct 2021 19:54:29 - 1.70 +++

plans for DISTFILES/MASTER_SITES

2023-08-10 Thread Marc Espie
Now that we got .VARIABLES in make, this is going to be put to great use in bsd.port.mk. Namely, instead of the currently (very clunky) DISTFILES = sometarball:0 MASTER_SITES0 = where to get this I propose we do something like: DISTFILES.site = sometarball MASTER_SITES.site = where to get this

Re: Diff for evaluation (WACOM tablet driver)

2023-08-12 Thread Marc Espie
On Sat, Aug 12, 2023 at 08:00:48AM +, Miod Vallat wrote: > I have had a look at your diff and I think it's decent enough to go in > after some polishing. > > Can Wacom tablet users try this cleaned up diff? Works on the target tablet here (Wacom Intuos S)

Re: Diff for evaluation (WACOM tablet driver)

2023-08-12 Thread Marc Espie
On Sat, Aug 12, 2023 at 05:22:38PM +0200, Peter J. Philipp wrote: > On Sat, Aug 12, 2023 at 02:27:13PM +, Miod Vallat wrote: > > Third time's (hopefully) the charm. How about that diff? Too much things > > have been removed in uwacom. > > partial success! The wacom driver is recognized, no

<    1   2   3   4   5   6   7   >