Saturday, August 31, 2024

UPDATE: QEMU - elf_aux_info()

Convert over to using elf_aux_info().


Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.242
diff -u -p -u -p -r1.242 Makefile
--- Makefile 26 Jul 2024 11:49:01 -0000 1.242
+++ Makefile 1 Sep 2024 04:31:43 -0000
@@ -8,6 +8,7 @@ COMMENT-ga= QEMU guest agent

VERSION= 9.0.2
DISTNAME= qemu-${VERSION}
+REVISION= 0
CATEGORIES= emulators
SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz
Index: patches/patch-meson_build
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-meson_build,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 patch-meson_build
--- patches/patch-meson_build 28 May 2024 13:57:37 -0000 1.13
+++ patches/patch-meson_build 1 Sep 2024 04:31:43 -0000
@@ -1,3 +1,6 @@
+- util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
+ 27fca0a0d560ae704457c5f89e0be658afef034d
+
- localstatedir does not belong under prefix
- Remove hardcoding of optimization

@@ -13,7 +16,22 @@ Index: meson.build
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))

-@@ -4226,9 +4226,6 @@ else
+@@ -2743,6 +2743,14 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_
+ return getauxval(AT_HWCAP) == 0;
+ }'''))
+
++config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(gnu_source_prefix + '''
++ #include <sys/auxv.h>
++ int main(void) {
++ unsigned long hwcap = 0;
++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
++ return hwcap;
++ }'''))
++
+ config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles('''
+ #include <linux/usbdevice_fs.h>
+
+@@ -4226,9 +4234,6 @@ else
summary_info += {'Objective-C compiler': false}
endif
option_cflags = (get_option('debug') ? ['-g'] : [])
Index: patches/patch-util_cpuinfo-aarch64_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-util_cpuinfo-aarch64_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-util_cpuinfo-aarch64_c
--- patches/patch-util_cpuinfo-aarch64_c 15 Jul 2024 11:13:29 -0000 1.1
+++ patches/patch-util_cpuinfo-aarch64_c 1 Sep 2024 04:31:43 -0000
@@ -1,14 +1,22 @@
-util/cpuinfo-aarch64: Add OpenBSD support
-ab089908b42f22e7edfa0d40db963c136ab35419
+- util/cpuinfo-aarch64: Add OpenBSD support
+ ab089908b42f22e7edfa0d40db963c136ab35419
+- util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
+ 27fca0a0d560ae704457c5f89e0be658afef034d

Index: util/cpuinfo-aarch64.c
--- util/cpuinfo-aarch64.c.orig
+++ util/cpuinfo-aarch64.c
-@@ -20,6 +20,12 @@
+@@ -17,9 +17,18 @@
+ # define HWCAP2_BTI 0 /* added in glibc 2.32 */
+ # endif
+

Re: UPDATE: net/crawley-v1.7.8

> Did you by any chance write
>
> If you did, then I think that's the problem. Everything after the colon are
> prerequisites (dependencies) to the target (do-test), see here[1].
> Prerequisites are simply other targets you'd want executed *before* the
> do-test target. So in this case make tries to execute the 'cd' target which
> doesn't exist.
>
> [1] https://man.openbsd.org/make#DEPENDENCY_LINES
>

It was a slightly different error of my own personal creation with
similarly disastrous results. Somehow, when I pasted from Edd's example,
my editor turned tabs into spaces and things broke as demonstrated.

That mistake has already been corrected in the TGZ of the updated port
which I submitted for approval.

All of that said, thank you for the nudge towards the man pages for a
better understanding of why it broke. :)

-R

Re: How to configure fastcgi with httpd?

• Omar Polo [2024-08-31 17:16]:
> On 2024/08/31 21:32:45 +0800, Sadeep Madurange <sadeep@asciimx.com> wrote:
>> Hello,
>>
>> I have a python script (flask.py) with the following content on an
>> OpenBSD 7.5 server:
>>
>> #! /usr/local/bin/python3
>> print("hello, world!")
>
> This doesn't look like a flask app.
>
>> I ran the following command to install it:
>>
>> # install -o www -g www -m 0500 flask.py /var/www/cgi-bin
>>
>> Then I added the following config to /etc/httpd.conf:
>>
>> server "localhost" {
>> listen on * port 8080
>> location "/*" {
>> fastcgi { param SCRIPT_FILENAME "/cgi-bin/flask.py" }
>> }
>> }
>>
>> restarted httpd, and executed the following curl request:
>
> Notice that this is OpenBSD httpd and not Apache httpd.
>
>> $ curl http://localhost:8080/
>>
>> However, I keep getting 500 internal server error. Not sure what I'm
>> doing wrong, so any help is much appreciated.
>
> FastCGI is a binary protocol. You're expected to have your program
> listening on a socket or on a local port, then configure httpd to talk
> to it.
>
> slowcgi(8) is a way to wrap cgi scripts over fastcgi.
>
> I wouldn't reccomend to run python stuff as a CGI script. Setting up
> the chroot is hard and there's little gain.
>
> I don't work with python, but it seems that flask (assuming you intend to
> use it) has some fastcgi support, see
>
> https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/
fastcgi support in flask is coming from flup:

pkg_add py3-flup

> in particular the part where it specifies the address to bind the
> UNIX-domain socket.
>
>> WSGIServer(application, bindAddress='/path/to/fcgi.sock').run()

a more complete example, with getting rid of any stale sockets and using
more suitable permissions:

#!/usr/local/bin/python3

from flask import Flask
app = Flask(__name__)
# more flask stuff here

if __name__ == '__main__':
from flup.server.fcgi import WSGIServer
sock = pathlib.Path('/var/www/run/wwwrun/foo.sock').resolve()
try:
sock.unlink()
except:
pass
WSGIServer(app, bindAddress=str(sock), umask=0o007).run()

make sure that the python scripts is run as a daemon when the system starts.

note that the script will not run in a chroot, but have access to the
entire system, not just what is present in /var/www. beware.

> If you're usign a UNIX-domain socket, you have to put it somewhere
> inside the /var/www chroot; for example /var/www/run/<your-app>/fcgi.sock
> and then instructs httpd to talk to it
>
> fastcgi {
> # note that this is relative to the /var/www chroot
> socket "/run/<your-app>/fcgi.sock"
> }
>
>
> HTH

Re: how accurate or helpful is scan-build-16 in clang-16 in identifying bugs / issues in code at build time ?

On Tue, Aug 27, 2024 at 04:27:47PM +0200, Florian Obser wrote:
> On 2024-08-27 15:35 +02, Janne Johansson <icepic.dz@gmail.com> wrote:
> > Den mån 26 aug. 2024 kl 00:14 skrev Tom Smyth <tom.smyth@wirelessconnect.eu>:
> >> Folks,
> >> Im just wondering what other porters experience of scan-build for the projects that you are maintaining ?
> >> has it been useful in identifying bugs?... or is the analysis engine too basic or shallow to properly analyse code ?
> >
> > When I run it on "openbsd" code, the things it finds are often super
> > deep, requiring 37 steps and that syscalls or libc calls return 0 when
>
> yeah, everything that's more than 10 deep is probably BS. Things that
> are 5 or less deep are actionable in my experience.
>
> [...]
>
> > It does find trivial things like
> > http://c66.it.su.se:8080/obsd/2019-10-25/scan-build-2019-10-25-192004-30128-1/report-36d1ed.html#EndPath
>
> I like to look at dead stores, they are either there for symmetry
> reasons or they indicate that something was not quite thought through.
>
> In both cases just removing the dead store and sending a patch is
> wrong. In the first case you are destroying the symmetry and you are
> just creating noise, and in the 2nd case you didn't put in the effort to
> figure out how that whole function could be written better.
>
> I think scan-build can guide someone who has dabbled in C before where
> to look.
>
> scan-build guidance is not always well received.
>
> Story time: I once considered using and contributing to a project, so
> first step was to run it through scan-build to get a feel for the
> structure of the code and have some ideas where the skeletons are
> buried or where someone was sloppy. So I carefully analysed the reports
> and submitted some patches. They were all happily accepted.
>
> I never mentioned that this came out of scan-build, because it was 99%
> my work anyway. So by patch 10 or 11 I write something like, hey,
> scan-build pointed me at this other thing, it technically can not happen
> because you get lucky all the way over there, but it is a pretty well
> aimed foot gun, and this should be written more defensive over
> here. Patch attached.
>
> Their (only!) response: Yeah, we are not interested in scan-build
> reports.
>
> OK then, good luck to you I guess...

Some years back I spent quite some time reviewing hundreds of scan-build
reports against Got. in the end there were 6 patches I could commit, all
of which fixed minor issues which either wouldn't ever have mattered or
might have bitten someone eventually, with an obvious diagnosis and fix
(NULL pointer derefts in error cases and such). The tool did not manage to
find any of the important bugs that were eventually found in other ways
over the next few years.

I had to wade through hundreds of false positives because scan-build is not
clever enough to see when variables are initialized across function calls.
This happens all the time in Got because, by convention, callees initialize
output arguments for callers. This alone made the reports much too noisy.
I'd have to check each such report to verify that it was indeed a false
postiive ("oh right, the scanner made this mistake *again*"), which felt
like a waste of my time.

I recall you managed to find a few more issues when you went through the
same process some other time, and more fixes were committed. I'm grateful
for that. Having done it once I wouldn't have the energy to wade through
hundreds of scan-build results myself anymore.

Maybe scan-build works better with other code bases which use a different
style. Though I recently looked at a few results from nsh's code base and
noticed that the scanner is still making the same mistake.

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

On Sat, Aug 31, 2024 at 9:16 AM Mihai Popescu <mihscu@gmail.com> wrote:
>
> Hello,
>
> If your intention is/was to help a new OpenBSD user to install
> packages, then my feedback is a simple no. This article is far from
> helping a beginner to easily install packages.
>

Peter's explanation is no more complicated than those given in
Michael Lucas' excellent book "Absolute OpenBSD".

Re: [update] math/z3: update to 4.13.0

31.08.2024 18:10, Kirill A. Korinsky пишет:
> not sure that this :Q is required. If I run it with :Q z3 complains as:
>
> (error "line 1 column 1: unexpected character")
> (error "line 1 column 19: unexpected token used as datatype name")
> (error "line 1 column 20: unexpected character")
>
> because it makes a command line like:
>
> echo \'\(declare-datatype\)\' |
>
> which produces an invalid input for z3.

You're right, :Q remained from an earlier iteration.
I dropped it, yielding correct commands now, thanks.

Re: UPDATE: cad/kicad

> +CPPFLAGS+= -D_LIBCXXABI_FORGIVING_DYNAMIC_CAST

Got curious why OpenBSD platform needs some modifications for most of
the things in C/C++.
And found this [1], with a copious explanation as a comment, then the
code implementation.
I don't understant it but I am happy I don't have to work in this high
programming language.
Sorry for hijacking the thread.

Out of curiosity again, is anyone among the OpenBSD devs who can fully
understand this?

[1] https://github.com/llvm-mirror/libcxxabi/blob/master/src/private_typeinfo.cpp

Re: emacs/w3m cannot retrieve url

Hi

I can get to https://lobste.rs/ on OpenBSD 7.5 without any
issues.

But I installed emacs-29.4-gtk2 instead of the gtk3 package.
The gtk3 package has issues on my machine.


On Sat, Aug 31, 2024 at 02:02:06PM -0400, Jon Fineman wrote:
>In emacs when I try and browse https://lobste.rs via M-x
>w3m-browse-url I get the below error in emacs/w3m:
>
>Location: https://lobste.rs/
>Cannot retrieve URL: https://lobste.rs
>/usr/local/bin/w3m exits with the code 11
>Something seems to be wrong with URL or this system.
>
>If I try https://news.ycombinator.com it works. Several other urls
>fail like google duckduckgo.
>
>If I try it via the shell command line using w3m it works fine.
>
>The same tests work on alpine, so this is why I am asking here first
>rather than emacs/w3m.
>
>OpenBSD 7.6 GENERIC.MP#299 amd64
>emacs GNU Emacs 29.4
>emacs w3m: w3m-20240712.248
>OpenBSD w3m: w3m version w3m/0.5.3+git20230718, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark
>
>
>Alpine 6.6.42-0-lts #1-Alpine SMP PREEMPT_DYNAMIC 2024-07-25 10:49:31 x86_64 Linux
>emacs GNU Emacs 29.4
>Alpine w3m: w3m version w3m/0.5.3+git20230718, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,gopher,ipv6,alarm,mark
>
>In this area my init.el files are the same.
>
>Any thoughts on how to go about finding out what is wrong?
>
>Thanks.
>
>Jon
>

--
csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

On Sat, Aug 31, 2024 at 3:26 AM Peter N. M. Hansteen <peter@bsdly.net> wrote:
>
> After answering some too-basic questions about installing packages on
> OpenBSD earlier earlier here, I remembered that back in 2013 I wrote a
> piece about ports and packages that looks like it is still mostly usable.
>

It's very well written Peter. I use OpenBSD, as a desktop, to run my brick and
mortar store. That being so I use mostly packages.

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

On Sat, Aug 31, 2024 at 4:55 PM Peter N. M. Hansteen <peter@bsdly.net> wrote:
>
> On Sat, Aug 31, 2024 at 03:01:22PM +0300, Mihai Popescu wrote:
> > If your intention is/was to help a new OpenBSD user to install
> > packages, then my feedback is a simple no. This article is far from
> > helping a beginner to easily install packages.
>
> After offering https://marc.info/?l=openbsd-misc&m=172503305621176&w=2,
>
> I remembered writing that slightly longer piece, which offers some explanation
> of how things work in addition to copy-pasteable material.
>
> There is room for both approaches.
>
> --
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

I didn't say anything about HOWTOs nor copy/paste in my feedback email.
Is it me or is it too hot outside, cause i think mails on @misc are
skidding away too often ...

emacs/w3m cannot retrieve url

In emacs when I try and browse https://lobste.rs via M-x
w3m-browse-url I get the below error in emacs/w3m:

Location: https://lobste.rs/
Cannot retrieve URL: https://lobste.rs
/usr/local/bin/w3m exits with the code 11
Something seems to be wrong with URL or this system.

If I try https://news.ycombinator.com it works. Several other urls
fail like google duckduckgo.

If I try it via the shell command line using w3m it works fine.

The same tests work on alpine, so this is why I am asking here first
rather than emacs/w3m.

OpenBSD 7.6 GENERIC.MP#299 amd64
emacs GNU Emacs 29.4
emacs w3m: w3m-20240712.248
OpenBSD w3m: w3m version w3m/0.5.3+git20230718, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark


Alpine 6.6.42-0-lts #1-Alpine SMP PREEMPT_DYNAMIC 2024-07-25 10:49:31 x86_64 Linux
emacs GNU Emacs 29.4
Alpine w3m: w3m version w3m/0.5.3+git20230718, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,gopher,ipv6,alarm,mark

In this area my init.el files are the same.

Any thoughts on how to go about finding out what is wrong?

Thanks.

Jon

Re: UPDATE: cad/kicad

Hi Stefan, Hi KiCad users,

Tanks for testing. I was able to trace the error down to our libcxxabi.
Something is wrong here. If you want/have to work with kicad 8.0.4, here
is a workaround:

$ cd /usr/src && patch -p1 -E < ~/patches/libcxxabi.diff
$ cd gnu/lib/libcxxabi && make clean && make && doas make install

diff --git a/gnu/lib/libcxxabi/Makefile b/gnu/lib/libcxxabi/Makefile
index 81673e86a2b..692ab7cc72e 100644
--- a/gnu/lib/libcxxabi/Makefile
+++ b/gnu/lib/libcxxabi/Makefile
@@ -54,6 +54,7 @@ CPPFLAGS+= -Wall -I${SHDRDIR} -I${HDRDIR} -I${UHDRDIR} \
CPPFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY
CPPFLAGS+= -D_LIBCXXABI_BUILDING_LIBRARY
CPPFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
+CPPFLAGS+= -D_LIBCXXABI_FORGIVING_DYNAMIC_CAST
CPPFLAGS+= -DNDEBUG
CFLAGS+= -nostdlib -funwind-tables
CXXFLAGS+= -nostdlib -nostdinc++ -funwind-tables

In the end i suspect we don't want this in base.

The full journey you can read here:
https://gitlab.com/kicad/code/kicad/-/issues/18621

Rafael


On Sun Aug 18, 2024 at 09:52:59PM GMT, Stefan Hagen wrote:
> Rafael Sadowski wrote (2024-08-15 07:52 CEST):
> > Please find below a kicad 8.0.4 update diff (inline) and attached
> > kicad-share.diff (which is simple an make update-plist diff).
> >
> > Here are some customisations and I would like to explain them:
> >
> > - Enable i18n translation by default.
> > - Remove Git dependency to build it
> > - Set NANODBC_ENABLE_UNICODE to unbreak the build (conflicts with system
> > libs)
> > - Remove CMAKE_BUILD_TYPE=Release, it's our default target.
> > - Disable auto updates for kicad
> >
> > - When you open a project, the message 'Configuration Global Footprint
> > Library Table' is shown with 3 options. The default recommended option
> > leads in crashes in my tests.
> >
> > Creating an empty global fingerprint footprint table works properly,
> > so I decided to chance option recommendations. (See
> > patch-common_dialogs_dialog_global_lib_table_config_cpp)
> >
> > I played a little bit with the system templates.
> >
> > OK to update kicad?
>
> Hi Rafael,
>
> Importing settings from an older kicad version leads to crashes. I had
> to rm -rf .config/kicad .local/share/kicad after that to be able to open
> the pcb editor on a demo project.
>
> However, clicking around there makes it crash again and it doesn't recover
> when started again.
>
> To reproduce:
> 1. Open the first demo project (complex hierarchy)
> 2. Open the schematic editor by clicking on the pcb file
> 3. Choose empty global fingerprint footprint table as recommended
> 4. Open the footprint editor from the schematic editor
>
> Video: https://ptrace.org/kicad_trial.mp4
>
> I didn't look at the changes, but I noticed that a build log file
> snuck into the diff:
>
> > diff --git a/cad/kicad-share/packages3D/_ok_configure.pbh b/cad/kicad-share/packages3D/_ok_configure.pbh
> > new file mode 100644
> > index 00000000000..bd6da5b8a4a
> > --- /dev/null
> > +++ b/cad/kicad-share/packages3D/_ok_configure.pbh
> > @@ -0,0 +1,13 @@
> > +===> Building from scratch kicad-packages3D-8.0.4
> > +===> kicad-packages3D-8.0.4 depends on: cmake-* -> cmake-3.30.1v1
> > +===> kicad-packages3D-8.0.4 depends on: ninja-* -> ninja-1.11.1p0v0
> > +===> kicad-packages3D-8.0.4 depends on: bzip2-* -> bzip2-1.0.8p0
> > +===> Checking files for kicad-packages3D-8.0.4
> > +`/usr/ports/distfiles/kicad-packages3D-8.0.4.tar.bz2' is up to date.
> > +>> (SHA256) kicad-packages3D-8.0.4.tar.bz2: OK
> > +===> Extracting for kicad-packages3D-8.0.4
> > +
> > +Signal caught, cleaning up.
> > +*** Signal SIGINT in . (do-extract)
> > +*** Signal SIGINT in . (/usr/ports/pobj/kicad-packages3D-8.0.4/.extract_done)
> > +*** Error 1 in /home/rsadowski/wip-ports/cad/kicad-share/packages3D (/usr/ports/infrastructure/mk/bsd.port.mk:2704 'configure': @lock=kicad-...)
>
> Best regards,
> Stefan
>

Re: How to configure fastcgi with httpd?

On 2024/08/31 21:32:45 +0800, Sadeep Madurange <sadeep@asciimx.com> wrote:
> Hello,
>
> I have a python script (flask.py) with the following content on an
> OpenBSD 7.5 server:
>
> #! /usr/local/bin/python3
> print("hello, world!")

This doesn't look like a flask app.

> I ran the following command to install it:
>
> # install -o www -g www -m 0500 flask.py /var/www/cgi-bin
>
> Then I added the following config to /etc/httpd.conf:
>
> server "localhost" {
> listen on * port 8080
> location "/*" {
> fastcgi { param SCRIPT_FILENAME "/cgi-bin/flask.py" }
> }
> }
>
> restarted httpd, and executed the following curl request:

Notice that this is OpenBSD httpd and not Apache httpd.

> $ curl http://localhost:8080/
>
> However, I keep getting 500 internal server error. Not sure what I'm
> doing wrong, so any help is much appreciated.

FastCGI is a binary protocol. You're expected to have your program
listening on a socket or on a local port, then configure httpd to talk
to it.

slowcgi(8) is a way to wrap cgi scripts over fastcgi.

I wouldn't reccomend to run python stuff as a CGI script. Setting up
the chroot is hard and there's little gain.

I don't work with python, but it seems that flask (assuming you intend to
use it) has some fastcgi support, see

https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/

in particular the part where it specifies the address to bind the
UNIX-domain socket.

> WSGIServer(application, bindAddress='/path/to/fcgi.sock').run()

If you're usign a UNIX-domain socket, you have to put it somewhere
inside the /var/www chroot; for example /var/www/run/<your-app>/fcgi.sock
and then instructs httpd to talk to it

fastcgi {
# note that this is relative to the /var/www chroot
socket "/run/<your-app>/fcgi.sock"
}


HTH

Re: [update] math/z3: update to 4.13.0

On Sat, 31 Aug 2024 16:03:30 +0200,
Klemens Nanni <kn@openbsd.org> wrote:
>
> 31.08.2024 16:35, Klemens Nanni пишет:
> > 30.08.2024 22:17, Kirill A. Korinsky пишет:
> >> On Tue, 27 Aug 2024 21:59:25 +0200,
> >> Klemens Nanni <kn@openbsd.org> wrote:
> >>>
> >>> New diff including all the feedback above, you can now hack on the port and
> >>> iterate over 'make retest' until it no longer crashes (or you give up) ;-)
> >>>
> >>
> >> Here an updated version based on yours. Changes:
> >> - improved testing to use smt2 models from examples;
> >
> > Sounds good. Do those strictly supersede the reproducers from the issue,
> > or would it make sense to run both in post-test?
> >

Yes, they are. They crashed z3 which is built by clang with the same stacktrace.

> > I also noticed that our -DZ3_ENABLE_EXAMPLE_TARGETS=ON is already the default
> > and =OFF results in less targets being built without PLIST change or effect
> > on your tests, so I think we can spare a few cycles and avoid building
> > whatever isn't used, anyway.
> >
> > Plus, -DZ3_INCLUDE_GIT_HASH=OFF implies -DZ3_INCLUDE_GIT_DESCRIBE=OFF, so
> > the latter can be dropped as well.
> >
> >> By some reason gcc produces z3 which works quite stable.
> >
> > Switching COMPILER makes /usr/src/lib/check_sym report removal of dynamically
> > exported symbols, so a major bump to 5.0 would be in order.
> >
> > Good find, perhaps we can narrow it down further!
> >

Quite possible that this is triggered by clang bug similar to
https://github.com/llvm/llvm-project/issues/55844

> +.for _repro in \
> + '(declare-datatype)' \
> + '(declare-datatype a)' \
> + '(declare-const p Bool)'
> + -echo ${_repro:Q} | (cd ${WRKBUILD} && ./z3 -in)

not sure that this :Q is required. If I run it with :Q z3 complains as:

(error "line 1 column 1: unexpected character")
(error "line 1 column 19: unexpected token used as datatype name")
(error "line 1 column 20: unexpected character")

because it makes a command line like:

echo \'\(declare-datatype\)\' |

which produces an invalid input for z3.

--
wbr, Kirill

Re: How to configure fastcgi with httpd?

On 8/31/24 8:32 AM, Sadeep Madurange wrote:
> Hello,
>
> I have a python script (flask.py) with the following content on an
> OpenBSD 7.5 server:
>
> #! /usr/local/bin/python3
> print("hello, world!")
. . .
> Then I added the following config to /etc/httpd.conf:
>
> server "localhost" {
> listen on * port 8080
> location "/*" {
> fastcgi { param SCRIPT_FILENAME "/cgi-bin/flask.py" }
> }
> }
>
> restarted httpd, and executed the following curl request:
>
> $ curl http://localhost:8080/
>
> However, I keep getting 500 internal server error. Not sure what I'm
> doing wrong, so any help is much appreciated.

First, it looks like your script is written with the expectation of
behaving like a CGI script: a process spawned by the web server and
configured so that stdout of the script is the body of the HTTP
response. That's not how FastCGI works.

Since your httpd.conf doesn't specify a socket, httpd(8) is looking for
a Unix domain socket at /var/www/run/slowcgi.sock, created and managed
by an external program (like your Python script) to speak FastCGI over.
You probably want/need an existing Python3 FastCGI server to handle
those details; I'm not a big Python developer but it seems like flup-py3
is what you want for that.

That might be enough to get you started, or point you in the right
direction.

Matthew

Re: Tor Browser on -current dies with SIGILL

On Sat, Jul 13, 2024 at 07:43:58PM +0200, Caspar Schutijser wrote:
> On Tue, Jul 09, 2024 at 07:20:35PM +0200, Matthias Schmidt wrote:
> > Hi Caspar,
> >
> > * Caspar Schutijser wrote:
> > > Hi Matthias,
> > >
> > > On Mon, Jul 08, 2024 at 07:54:09PM +0200, Matthias Schmidt wrote:
> > > > Hi Caspar,
> > > >
> > > > * Caspar Schutijser wrote:
> > > > > Hi,
> > > > >
> > > > > I found the following piece of diff while I was reading through
> > > > > the diff between 13.0.16 and 13.5.
> > > > >
> > > > > $ git diff tor-browser-115.12.0esr-13.0-1-build1..tor-browser-115.12.0esr-13.5-1-build3
> > > > > from https://gitlab.torproject.org/tpo/applications/tor-browser.git:
> > > > > diff --git a/mozconfig-linux-x86_64 b/mozconfig-linux-x86_64
> > > > > index 06cf6e75b14f..7d96d5aaa734 100644
> > > > > --- a/mozconfig-linux-x86_64
> > > > > +++ b/mozconfig-linux-x86_64
> > > > > @@ -1,9 +1,13 @@
> > > > > . $topsrcdir/browser/config/mozconfigs/tor-browser
> > > > >
> > > > > -ac_add_options --enable-default-toolkit=cairo-gtk3
> > > > > +# Moz switched to lld for all Linux targets in Bug 1839739.
> > > > > +ac_add_options --enable-linker=lld
> > > > >
> > > > > ac_add_options --disable-strip
> > > > > ac_add_options --disable-install-strip
> > > > >
> > > > >
> > > > > In the diff below I reverted that part. Warning: I have not
> > > > > build-tested it myself yet, nor have I looked into what it is supposed
> > > > > to do exactly (will do that later).
> > > > >
> > > > > Is it possible for you to test diffs? If so, can you try the diff below
> > > > > and report back?
> > > >
> > > > Sorry for the late response. I've never build the Tor Browser before, I
> > > > can build up something next weekend. Also happy to try any package that
> > > > you can build up before that.
> > >
> > > I built a package and I put it here:
> > > https://temp.schutijser.com/~caspar/tb-browser-13.5p0.tgz
> > >
> > > Built on
> > > kern.version=OpenBSD 7.5-current (GENERIC.MP) #162: Mon Jul 1 02:13:07 MDT 2024
> > > deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > , I hope that's recent enough.
> > >
> > > You can probably install it with something like
> > > # pkg_add -Dunsigned ./tb-browser-13.5p0.tgz
> > >
> > > Let me know how it goes!
> >
> > I can confirm that your package fixes the problem I saw. Thanks a lot
> > for figuring it out and providing a package for me to test!
>
> Okay, good to know. I committed this now. I'm not yet sure why this
> actually works but I'll figure that out later.

Hi,

A recent commit from landry@ to mail/mozilla-thunderbird showed me that
a similar problem existed in other Mozilla ports. The solution landry@
committed is better so I'd like to have it in Tor Browser too.
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/mozilla-thunderbird/Makefile?rev=1.464&content-type=text/x-cvsweb-markup

The diff below reverts the workaround that I committed earlier, and
adopts the same fix as the other Mozilla ports. I can not test this
myself however, since I don't have the appropriate hardware.

Matthias, are you willing to test this diff to see if Tor Browser
still works with this approach? You can also try the following package
if you want:
https://temp.schutijser.com/~caspar/tb-browser-13.5.2p0.tgz

Comments or OKs?

Thanks,
Caspar


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/Makefile,v
diff -u -p -r1.149 Makefile
--- Makefile 10 Aug 2024 15:16:44 -0000 1.149
+++ Makefile 31 Aug 2024 14:32:12 -0000
@@ -12,6 +12,7 @@ EXTRACT_SUFX = .tar.xz

PKGNAME = ${TB_PREFIX}-browser-${TB_VERSION:S/a/alpha/}
DISTNAME = src-firefox-tor-browser-115.14.0esr-13.5-1-build2
+REVISION = 0

FIX_EXTRACT_PERMISSIONS = Yes
DISTFILES += ${DISTNAME}.tar.xz \
@@ -64,7 +65,7 @@ CONFIGURE_STYLE = simple
CONFIGURE_SCRIPT = ${MODPY_BIN} ${WRKSRC}/configure.py
CONFIGURE_ARGS += --prefix=${PREFIX}
MAKE_ENV += BUILD_VERBOSE_LOG="1" CARGOFLAGS="-j${MAKE_JOBS}"
-CONFIGURE_ENV += LDFLAGS=-Wl,--threads=${MAKE_JOBS}
+CONFIGURE_ENV += LDFLAGS="-Wl,--threads=${MAKE_JOBS} --ld-path=${WRKDIR}/bin/ld"

# app-name etc. for tor-browser
CONFIGURE_ARGS += --with-app-name=${BROWSER_NAME} \
Index: patches/patch-mozconfig-linux-x86_64
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-mozconfig-linux-x86_64,v
diff -u -p -r1.2 patch-mozconfig-linux-x86_64
--- patches/patch-mozconfig-linux-x86_64 13 Jul 2024 17:41:23 -0000 1.2
+++ patches/patch-mozconfig-linux-x86_64 31 Aug 2024 14:32:12 -0000
@@ -1,5 +1,3 @@
-Repair USE_NOBTCFI (not sure why it works, that still needs to be figured out).
-
Encrypted Media Extensions is not supported on OpenBSD. Apparently this also
means we can not pass --disable-eme to configure so comment that out.
Also see
@@ -8,17 +6,10 @@ https://gitlab.torproject.org/tpo/applic
Index: mozconfig-linux-x86_64
--- mozconfig-linux-x86_64.orig
+++ mozconfig-linux-x86_64
-@@ -1,13 +1,7 @@
- . $topsrcdir/browser/config/mozconfigs/tor-browser
-
--# Moz switched to lld for all Linux targets in Bug 1839739.
--ac_add_options --enable-linker=lld
--
- ac_add_options --disable-strip
- ac_add_options --disable-install-strip
+@@ -8,6 +8,3 @@ ac_add_options --disable-install-strip

ac_add_options --enable-default-toolkit=cairo-gtk3
--
+
-# Let's make sure no preference is enabling either Adobe's or Google's CDM.
-ac_add_options --disable-eme
-
+-

Re: [update] math/z3: update to 4.13.0

31.08.2024 16:35, Klemens Nanni пишет:
> 30.08.2024 22:17, Kirill A. Korinsky пишет:
>> On Tue, 27 Aug 2024 21:59:25 +0200,
>> Klemens Nanni <kn@openbsd.org> wrote:
>>>
>>> New diff including all the feedback above, you can now hack on the port and
>>> iterate over 'make retest' until it no longer crashes (or you give up) ;-)
>>>
>>
>> Here an updated version based on yours. Changes:
>> - improved testing to use smt2 models from examples;
>
> Sounds good. Do those strictly supersede the reproducers from the issue,
> or would it make sense to run both in post-test?
>
> I also noticed that our -DZ3_ENABLE_EXAMPLE_TARGETS=ON is already the default
> and =OFF results in less targets being built without PLIST change or effect
> on your tests, so I think we can spare a few cycles and avoid building
> whatever isn't used, anyway.
>
> Plus, -DZ3_INCLUDE_GIT_HASH=OFF implies -DZ3_INCLUDE_GIT_DESCRIBE=OFF, so
> the latter can be dropped as well.
>
>> By some reason gcc produces z3 which works quite stable.
>
> Switching COMPILER makes /usr/src/lib/check_sym report removal of dynamically
> exported symbols, so a major bump to 5.0 would be in order.
>
> Good find, perhaps we can narrow it down further!
>
>> I suggest to keep it that way.
>
> For your example tests: post-test runs in the ports dir, so you should ensure
> that z3 runs somewhere, where _pbuild is allowed to dump core.
>
> update-patches regen'ed a file and update-plist added some python dir
> after we dropped the RDEP on it -- unimportant changes really, but always
> good to rerun those targets to avoid churn.
>
>
> I'll soon commit with those tweaks, unless someone objects.

Oops, update-patches churn was actually picking up SUBST_CMD changes.
To fix, I moved that into post-extract, such that it runs before patch.

I also switched to DIST_TUPLE for brevity, WRKDIST can thus be dropped, too.

> -+ SO_EXT = '.so.${LIBz3_VERSION}'
> ++ SO_EXT = '.so.4.1'

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/z3/Makefile,v
diff -u -p -r1.33 Makefile
--- Makefile 6 May 2024 12:23:45 -0000 1.33
+++ Makefile 31 Aug 2024 14:03:10 -0000
@@ -1,16 +1,9 @@
COMMENT = Z3 theorem prover

-VERSION = 4.12.2
-REVISION = 1
+DIST_TUPLE = github Z3Prover z3 z3-4.13.0 .
+PKGNAME = ${DISTNAME:S/z3-//}

-GH_ACCOUNT = Z3Prover
-GH_PROJECT = z3
-GH_TAGNAME = ${GH_PROJECT}-${VERSION}
-
-DISTNAME = ${GH_TAGNAME}
-PKGNAME = ${DISTNAME:L}
-
-SHARED_LIBS = z3 4.0 # 4.10
+SHARED_LIBS = z3 5.0

CATEGORIES = math

@@ -19,25 +12,39 @@ WANTLIB += c m pthread ${COMPILER_LIBCXX
# MIT
PERMIT_PACKAGE = Yes

-# c++11
-COMPILER = base-clang ports-gcc
+# C++17, clang leads to segfaults
+# See: https://github.com/Z3Prover/z3/issues/6902
+COMPILER = ports-gcc

MODULES = devel/cmake \
lang/python

-CONFIGURE_ARGS += -DZ3_ENABLE_EXAMPLE_TARGETS=ON \
+MODPY_RUNDEP = No
+
+CONFIGURE_ARGS = -DZ3_BUILD_PYTHON_BINDINGS=ON \
+ -DZ3_ENABLE_EXAMPLE_TARGETS=OFF \
-DZ3_INCLUDE_GIT_HASH=OFF \
- -DZ3_INCLUDE_GIT_DESCRIBE=OFF \
- -DZ3_BUILD_PYTHON_BINDINGS=ON \
-DZ3_USE_LIB_GMP=OFF

DEBUG_PACKAGES = ${BUILD_PACKAGES}

-WRKDIST = ${WRKDIR}/z3-${DISTNAME}
-
-NO_TEST = Yes
-
-pre-configure:
+post-extract:
${SUBST_CMD} ${WRKSRC}/scripts/mk_util.py
+
+post-test:
+ # with clang:
+ # 4.12.2 segfaults on 1,2,3
+ # 4.13.0 segfaults on 2,3 and warns on 1
+.for _repro in \
+ '(declare-datatype)' \
+ '(declare-datatype a)' \
+ '(declare-const p Bool)'
+ -echo ${_repro:Q} | (cd ${WRKBUILD} && ./z3 -in)
+ @echo
+.endfor
+ # run example models for good measure as well
+ cd ${WRKBUILD} && \
+ find ${WRKSRC}/examples/SMT-LIB2/ -type f -name '*.smt2' \
+ -exec echo \; -print -exec ./z3 {} \;

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/z3/distinfo,v
diff -u -p -r1.14 distinfo
--- distinfo 12 Aug 2023 13:31:09 -0000 1.14
+++ distinfo 31 Aug 2024 13:54:29 -0000
@@ -1,2 +1,2 @@
-SHA256 (z3-4.12.2.tar.gz) = n1jzcQvSCUCFlRp1eRVQ9UeQPXX+fi/LNzxfA/x2G48=
-SIZE (z3-4.12.2.tar.gz) = 5401038
+SHA256 (Z3Prover-z3-z3-4.13.0.tar.gz) = AbzGHINi43u4n9JDD34zheht95FQGb0s5F3p2b2TRQI=
+SIZE (Z3Prover-z3-z3-4.13.0.tar.gz) = 5520232
Index: patches/patch-cmake_cxx_compiler_flags_overrides_cmake
===================================================================
RCS file: /cvs/ports/math/z3/patches/patch-cmake_cxx_compiler_flags_overrides_cmake,v
diff -u -p -r1.2 patch-cmake_cxx_compiler_flags_overrides_cmake
--- patches/patch-cmake_cxx_compiler_flags_overrides_cmake 11 Mar 2022 19:36:33 -0000 1.2
+++ patches/patch-cmake_cxx_compiler_flags_overrides_cmake 30 Aug 2024 21:28:52 -0000
@@ -1,3 +1,5 @@
+Removed hardcoded optimizations
+
Index: cmake/cxx_compiler_flags_overrides.cmake
--- cmake/cxx_compiler_flags_overrides.cmake.orig
+++ cmake/cxx_compiler_flags_overrides.cmake
Index: patches/patch-scripts_mk_util_py
===================================================================
RCS file: /cvs/ports/math/z3/patches/patch-scripts_mk_util_py,v
diff -u -p -r1.10 patch-scripts_mk_util_py
--- patches/patch-scripts_mk_util_py 9 Feb 2023 06:53:56 -0000 1.10
+++ patches/patch-scripts_mk_util_py 31 Aug 2024 13:58:06 -0000
@@ -1,7 +1,11 @@
+- Remove hardcoded optimizations
+- Fix .so versioning
+- use -fPIC to build shared libs on all archs
+
Index: scripts/mk_util.py
--- scripts/mk_util.py.orig
+++ scripts/mk_util.py
-@@ -2607,7 +2607,6 @@ def mk_config():
+@@ -2609,7 +2609,6 @@ def mk_config():
EXAMP_DEBUG_FLAG = '-g'
CPPFLAGS = '%s -DZ3DEBUG -D_DEBUG' % CPPFLAGS
else:
@@ -9,7 +13,7 @@ Index: scripts/mk_util.py
if GPROF:
CXXFLAGS += '-fomit-frame-pointer'
CPPFLAGS = '%s -DNDEBUG -D_EXTERNAL_RELEASE' % CPPFLAGS
-@@ -2632,7 +2631,7 @@ def mk_config():
+@@ -2634,7 +2633,7 @@ def mk_config():
SO_EXT = '.so'
SLIBFLAGS = '-shared'
elif sysname == 'OpenBSD':
@@ -18,15 +22,12 @@ Index: scripts/mk_util.py
SLIBFLAGS = '-shared'
elif sysname == 'SunOS':
SO_EXT = '.so'
-@@ -2648,9 +2647,8 @@ def mk_config():
+@@ -2650,7 +2649,7 @@ def mk_config():
LIB_EXT = '.lib'
else:
raise MKException('Unsupported platform: %s' % sysname)
- if is64():
-- if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
-- CXXFLAGS = '%s -fPIC' % CXXFLAGS
-+ if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
-+ CXXFLAGS = '%s -fPIC' % CXXFLAGS
++ if true:
+ if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
+ CXXFLAGS = '%s -fPIC' % CXXFLAGS
elif not LINUX_X64:
- CXXFLAGS = '%s -m32' % CXXFLAGS
- LDFLAGS = '%s -m32' % LDFLAGS
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/math/z3/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- pkg/PLIST 11 Mar 2022 19:36:33 -0000 1.9
+++ pkg/PLIST 31 Aug 2024 12:43:27 -0000
@@ -1,4 +1,4 @@
-@conflict py3-z3-solver-*
+@conflict ${MODPY_PY_PREFIX}z3-solver-*
@bin bin/z3
include/z3++.h
include/z3.h
@@ -22,6 +22,8 @@ lib/cmake/z3/Z3Targets${MODCMAKE_BUILD_S
lib/cmake/z3/Z3Targets.cmake
@lib lib/libz3.so.${LIBz3_VERSION}
lib/pkgconfig/z3.pc
+lib/python${MODPY_VERSION}/
+lib/python${MODPY_VERSION}/site-packages/
lib/python${MODPY_VERSION}/site-packages/z3/
lib/python${MODPY_VERSION}/site-packages/z3/__init__.py
lib/python${MODPY_VERSION}/site-packages/z3/z3.py

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

On Sat, Aug 31, 2024 at 03:01:22PM +0300, Mihai Popescu wrote:
> If your intention is/was to help a new OpenBSD user to install
> packages, then my feedback is a simple no. This article is far from
> helping a beginner to easily install packages.

After offering https://marc.info/?l=openbsd-misc&m=172503305621176&w=2,

I remembered writing that slightly longer piece, which offers some explanation
of how things work in addition to copy-pasteable material.

There is room for both approaches.

--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Re: [update] math/z3: update to 4.13.0

30.08.2024 22:17, Kirill A. Korinsky пишет:
> On Tue, 27 Aug 2024 21:59:25 +0200,
> Klemens Nanni <kn@openbsd.org> wrote:
>>
>> New diff including all the feedback above, you can now hack on the port and
>> iterate over 'make retest' until it no longer crashes (or you give up) ;-)
>>
>
> Here an updated version based on yours. Changes:
> - improved testing to use smt2 models from examples;

Sounds good. Do those strictly supersede the reproducers from the issue,
or would it make sense to run both in post-test?

I also noticed that our -DZ3_ENABLE_EXAMPLE_TARGETS=ON is already the default
and =OFF results in less targets being built without PLIST change or effect
on your tests, so I think we can spare a few cycles and avoid building
whatever isn't used, anyway.

Plus, -DZ3_INCLUDE_GIT_HASH=OFF implies -DZ3_INCLUDE_GIT_DESCRIBE=OFF, so
the latter can be dropped as well.

> By some reason gcc produces z3 which works quite stable.

Switching COMPILER makes /usr/src/lib/check_sym report removal of dynamically
exported symbols, so a major bump to 5.0 would be in order.

Good find, perhaps we can narrow it down further!

> I suggest to keep it that way.

For your example tests: post-test runs in the ports dir, so you should ensure
that z3 runs somewhere, where _pbuild is allowed to dump core.

update-patches regen'ed a file and update-plist added some python dir
after we dropped the RDEP on it -- unimportant changes really, but always
good to rerun those targets to avoid churn.


I'll soon commit with those tweaks, unless someone objects.

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/z3/Makefile,v
diff -u -p -r1.33 Makefile
--- Makefile 6 May 2024 12:23:45 -0000 1.33
+++ Makefile 31 Aug 2024 13:34:39 -0000
@@ -1,16 +1,12 @@
COMMENT = Z3 theorem prover

-VERSION = 4.12.2
-REVISION = 1
-
GH_ACCOUNT = Z3Prover
GH_PROJECT = z3
-GH_TAGNAME = ${GH_PROJECT}-${VERSION}
+GH_TAGNAME = ${GH_PROJECT}-4.13.0

DISTNAME = ${GH_TAGNAME}
-PKGNAME = ${DISTNAME:L}

-SHARED_LIBS = z3 4.0 # 4.10
+SHARED_LIBS = z3 5.0

CATEGORIES = math

@@ -19,25 +15,41 @@ WANTLIB += c m pthread ${COMPILER_LIBCXX
# MIT
PERMIT_PACKAGE = Yes

-# c++11
-COMPILER = base-clang ports-gcc
+# C++17, clang leads to segfaults
+# See: https://github.com/Z3Prover/z3/issues/6902
+COMPILER = ports-gcc

MODULES = devel/cmake \
lang/python

-CONFIGURE_ARGS += -DZ3_ENABLE_EXAMPLE_TARGETS=ON \
+MODPY_RUNDEP = No
+
+CONFIGURE_ARGS = -DZ3_BUILD_PYTHON_BINDINGS=ON \
+ -DZ3_ENABLE_EXAMPLE_TARGETS=OFF \
-DZ3_INCLUDE_GIT_HASH=OFF \
- -DZ3_INCLUDE_GIT_DESCRIBE=OFF \
- -DZ3_BUILD_PYTHON_BINDINGS=ON \
-DZ3_USE_LIB_GMP=OFF

DEBUG_PACKAGES = ${BUILD_PACKAGES}

WRKDIST = ${WRKDIR}/z3-${DISTNAME}

-NO_TEST = Yes
-
pre-configure:
${SUBST_CMD} ${WRKSRC}/scripts/mk_util.py
+
+post-test:
+ # with clang:
+ # 4.12.2 segfaults on 1,2,3
+ # 4.13.0 segfaults on 2,3 and warns on 1
+.for _repro in \
+ '(declare-datatype)' \
+ '(declare-datatype a)' \
+ '(declare-const p Bool)'
+ -echo ${_repro:Q} | (cd ${WRKBUILD} && ./z3 -in)
+ @echo
+.endfor
+ # run example models for good measure as well
+ cd ${WRKBUILD} && \
+ find ${WRKSRC}/examples/SMT-LIB2/ -type f -name '*.smt2' \
+ -exec echo \; -print -exec ./z3 {} \;

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/z3/distinfo,v
diff -u -p -r1.14 distinfo
--- distinfo 12 Aug 2023 13:31:09 -0000 1.14
+++ distinfo 30 Aug 2024 21:28:52 -0000
@@ -1,2 +1,2 @@
-SHA256 (z3-4.12.2.tar.gz) = n1jzcQvSCUCFlRp1eRVQ9UeQPXX+fi/LNzxfA/x2G48=
-SIZE (z3-4.12.2.tar.gz) = 5401038
+SHA256 (z3-4.13.0.tar.gz) = AbzGHINi43u4n9JDD34zheht95FQGb0s5F3p2b2TRQI=
+SIZE (z3-4.13.0.tar.gz) = 5520232
\ No newline at end of file
Index: patches/patch-cmake_cxx_compiler_flags_overrides_cmake
===================================================================
RCS file: /cvs/ports/math/z3/patches/patch-cmake_cxx_compiler_flags_overrides_cmake,v
diff -u -p -r1.2 patch-cmake_cxx_compiler_flags_overrides_cmake
--- patches/patch-cmake_cxx_compiler_flags_overrides_cmake 11 Mar 2022 19:36:33 -0000 1.2
+++ patches/patch-cmake_cxx_compiler_flags_overrides_cmake 30 Aug 2024 21:28:52 -0000
@@ -1,3 +1,5 @@
+Removed hardcoded optimizations
+
Index: cmake/cxx_compiler_flags_overrides.cmake
--- cmake/cxx_compiler_flags_overrides.cmake.orig
+++ cmake/cxx_compiler_flags_overrides.cmake
Index: patches/patch-scripts_mk_util_py
===================================================================
RCS file: /cvs/ports/math/z3/patches/patch-scripts_mk_util_py,v
diff -u -p -r1.10 patch-scripts_mk_util_py
--- patches/patch-scripts_mk_util_py 9 Feb 2023 06:53:56 -0000 1.10
+++ patches/patch-scripts_mk_util_py 30 Aug 2024 21:29:02 -0000
@@ -1,7 +1,11 @@
+- Remove hardcoded optimizations
+- Fix .so versioning
+- use -fPIC to build shared libs on all archs
+
Index: scripts/mk_util.py
--- scripts/mk_util.py.orig
+++ scripts/mk_util.py
-@@ -2607,7 +2607,6 @@ def mk_config():
+@@ -2609,7 +2609,6 @@ def mk_config():
EXAMP_DEBUG_FLAG = '-g'
CPPFLAGS = '%s -DZ3DEBUG -D_DEBUG' % CPPFLAGS
else:
@@ -9,24 +13,21 @@ Index: scripts/mk_util.py
if GPROF:
CXXFLAGS += '-fomit-frame-pointer'
CPPFLAGS = '%s -DNDEBUG -D_EXTERNAL_RELEASE' % CPPFLAGS
-@@ -2632,7 +2631,7 @@ def mk_config():
+@@ -2634,7 +2633,7 @@ def mk_config():
SO_EXT = '.so'
SLIBFLAGS = '-shared'
elif sysname == 'OpenBSD':
- SO_EXT = '.so'
-+ SO_EXT = '.so.${LIBz3_VERSION}'
++ SO_EXT = '.so.4.1'
SLIBFLAGS = '-shared'
elif sysname == 'SunOS':
SO_EXT = '.so'
-@@ -2648,9 +2647,8 @@ def mk_config():
+@@ -2650,7 +2649,7 @@ def mk_config():
LIB_EXT = '.lib'
else:
raise MKException('Unsupported platform: %s' % sysname)
- if is64():
-- if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
-- CXXFLAGS = '%s -fPIC' % CXXFLAGS
-+ if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
-+ CXXFLAGS = '%s -fPIC' % CXXFLAGS
++ if true:
+ if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'):
+ CXXFLAGS = '%s -fPIC' % CXXFLAGS
elif not LINUX_X64:
- CXXFLAGS = '%s -m32' % CXXFLAGS
- LDFLAGS = '%s -m32' % LDFLAGS
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/math/z3/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- pkg/PLIST 11 Mar 2022 19:36:33 -0000 1.9
+++ pkg/PLIST 31 Aug 2024 12:43:27 -0000
@@ -1,4 +1,4 @@
-@conflict py3-z3-solver-*
+@conflict ${MODPY_PY_PREFIX}z3-solver-*
@bin bin/z3
include/z3++.h
include/z3.h
@@ -22,6 +22,8 @@ lib/cmake/z3/Z3Targets${MODCMAKE_BUILD_S
lib/cmake/z3/Z3Targets.cmake
@lib lib/libz3.so.${LIBz3_VERSION}
lib/pkgconfig/z3.pc
+lib/python${MODPY_VERSION}/
+lib/python${MODPY_VERSION}/site-packages/
lib/python${MODPY_VERSION}/site-packages/z3/
lib/python${MODPY_VERSION}/site-packages/z3/__init__.py
lib/python${MODPY_VERSION}/site-packages/z3/z3.py

How to configure fastcgi with httpd?

Hello,

I have a python script (flask.py) with the following content on an
OpenBSD 7.5 server:

#! /usr/local/bin/python3
print("hello, world!")

I ran the following command to install it:

# install -o www -g www -m 0500 flask.py /var/www/cgi-bin

Then I added the following config to /etc/httpd.conf:

server "localhost" {
listen on * port 8080
location "/*" {
fastcgi { param SCRIPT_FILENAME "/cgi-bin/flask.py" }
}
}

restarted httpd, and executed the following curl request:

$ curl http://localhost:8080/

However, I keep getting 500 internal server error. Not sure what I'm
doing wrong, so any help is much appreciated.

--
Sadeep Madurange
PGP: 103BF9E3E750BF7E

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

Den lör 31 aug. 2024 kl 14:05 skrev Mihai Popescu <mihscu@gmail.com>:
> If your intention is/was to help a new OpenBSD user to install
> packages, then my feedback is a simple no. This article is far from
> helping a beginner to easily install packages.

I think Peter knows that OpenBSD frowns upon mindless "blindly type
this in a terminal and 100% success will be yours" HOWTOs and decided
to write about ports and packages to let people know what they are and
somewhat how to move around the ports tree and so forth, and with
links to the official guides on making ports/packages which is where
you should get your "I need bash on this newly installed obsd machine
and I have never used bsd" help, not from random third party sites.

--
May the most significant bit of your life be positive.

Re: CodeChecker 6.24 on fresh 7.6 OpenBSD amd 64 platfrom

Thank you! Happy I could help :)

On Fri, Aug 30, 2024 at 09:05:27PM GMT, Tom Smyth wrote:
> Thanks Tobias,  
>
> I have tried, while Stefan has delivered about 11-13 bug fixes arising out of
> the test and the results you published, 
>
> Thanks for that ... 
>
> On Tue, 27 Aug 2024 at 16:51, Tom Smyth <tom.smyth@wirelessconnect.eu> wrote:
>
> Thanks Tobias, 
>
> your steps worked for me I do appreciate it ... 
>
> I have started (trying to fix) the issues highlighted... prioritising
> Severity of the issue and shortness of path to create the issue 
>
> Much obliged and thanks for helping ... 
>
>
>
>
> On Sun, 25 Aug 2024 at 23:42, Tobias Heider <tobias.heider@stusta.de>
> wrote:
>
> On Sat, Aug 24, 2024 at 09:52:06PM +0100, Tom Smyth wrote:
> > Folks,
> >
> > i Installed 6.24 Codechecker  package on a fresh OpenBSD7.6 current
> system
> > on todays or yesterdays snapshot
> >
> >
> > and im still getting that platform not recognized  error...
> >
> > Thanks
> >
> > Tom Smyth
>
> Sorry for the late reply, I haven't seen the error you are getting
> before.
>
> One problem I see with nsh specifically is that codechecker doesn't
> manage
> to generate a compile_commands.json so I had to resort to clang's
> built-in solution:
> intercept-build-16 --override-compiler --append make CC=/usr/local/
> llvm16/libexec/intercept-cc
>
> After that the following commands run the analysis and generate html
> output:
> codechecker analyze ./compile_commands.json --ctu --output reports
> codechecker parse --export html --output /tmp/nsh_html ./reports
>
> You can have a look at the result at tobhe.de/files/nsh_html
>
>
> >
> >
> > On Wed, 21 Aug 2024 at 18:13, Tom Smyth <tom.smyth@wirelessconnect.eu
> >
> > wrote:
> >
> > > I have tried removing python2, python3
> > > adding them back
> > > removing codechecker and removing llvm16 and re-installing
> codechecker...
> > >
> > > running pkg_check and reinstalling py3-setup-tools
> > >
> > > Thanks
> > >
> > > Tom Smyth
> > >
> > >
> > > On Wed, 21 Aug 2024 at 16:56, Tom Smyth <
> tom.smyth@wirelessconnect.eu>
> > > wrote:
> > >
> > >> Folks
> > >>
> > >> running OpenBSD current  on amd64
> > >> using codechecker 6.24.0
> > >> trying to run codechecker against nsh and im getting an error
> > >>
> > >> when running codechecker check -b "cd/home/tom/nsh-1.3.3 && make"
> -o
> > >> nshreports
> > >> saying
> > >> starting build
> > >> unrecognised platform  open a github issue for further guidance...
> > >>
> > >>
> > >>
> > >> i have tried uninstalling codechecker and
> > >>
> > >> i have installed py3-saif-tools py3-jsonpath-ng
> > >>
> > >> Ill keep digging
> > >>
> > >> --
> > >> Kindest regards,
> > >> Tom Smyth.
> > >>
> > >
> > >
> > > --
> > > Kindest regards,
> > > Tom Smyth.
> > >
> >
> >
> > --
> > Kindest regards,
> > Tom Smyth.
>
>
>
> --
> Kindest regards,
> Tom Smyth.
>
>
>
> --
> Kindest regards,
> Tom Smyth.

Re: I wrote this about packages and ports in 2023, hopefully still useful to some who come here

Hello,

If your intention is/was to help a new OpenBSD user to install
packages, then my feedback is a simple no. This article is far from
helping a beginner to easily install packages.

Re: Can't load install75.img

On 2024-08-30, Lukáš Fiala <luki.fi@seznam.cz> wrote:
>
> Hello, I'm new to openBSD. I wanted to install it on my pc (CPU: AMD ryzen=
> 5
> 7600x, MB: Asus tuf gaming B650-plus wifi, NVME: kingston NV2 1T, GPU: asu=
> s
> dual radeon rx 6700XT 12gb, RAM: 32gb, dual boot with arch using refind). =

I'm not sure what the problem you're seeing is (suspect some kind
of hardware incompatibility) but I would advise against dual boot
until you're more familiar with OpenBSD (at least if you have anything
precious on the existing OS install).


--
Please keep replies on the mailing list.

arm bulk build report

bulk build on armv7.ports.openbsd.org
started on Thu Aug 1 12:51:19 MDT 2024
finished at Sat Aug 31 03:19:59 MDT 2024
lasted 29D14h28m
done with kern.version=OpenBSD 7.5-current (GENERIC) #231: Wed Jul 31 23:10:31 MDT 2024

built packages:8275
Aug 1:2184
Aug 2:2761
Aug 3:2686
Aug 4:381
Aug 5:29
Aug 7:56
Aug 8:154
Aug 9:23
Aug 10:272
Aug 11:170
Aug 12:82
Aug 13:90
Aug 14:196
Aug 15:111
Aug 16:183
Aug 17:256
Aug 18:247
Aug 19:203
Aug 20:221
Aug 21:303
Aug 22:212
Aug 23:314
Aug 24:241
Aug 25:154
Aug 26:175
Aug 27:334
Aug 28:257
Aug 29:303
Aug 30:2095
Aug 31:563


critical path missing pkgs: http://build-failures.rhaalovely.net/arm/2024-08-01/summary.log

build failures: 80
http://build-failures.rhaalovely.net/arm/2024-08-01/audio/cplay.log
http://build-failures.rhaalovely.net/arm/2024-08-01/audio/curseradio.log
http://build-failures.rhaalovely.net/arm/2024-08-01/audio/puddletag.log
http://build-failures.rhaalovely.net/arm/2024-08-01/audio/py-discogs-client,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/audio/rgain.log
http://build-failures.rhaalovely.net/arm/2024-08-01/benchmarks/netperf-wrapper,-gui.log
http://build-failures.rhaalovely.net/arm/2024-08-01/databases/pgbackrest.log
http://build-failures.rhaalovely.net/arm/2024-08-01/databases/postgresql-odbc.log
http://build-failures.rhaalovely.net/arm/2024-08-01/databases/py-odbc,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/databases/sqlite3-odbc.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/arm-none-eabi/gcc,aarch64.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/boost.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/coccigrep.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/libfirm.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/libgusb.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/liboil.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/libvirt-glib.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/libvmime.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/p5-Params-Validate.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/py-buildbot/buildbot.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/py-jsonschema-spec,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/py-unicorn,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/remake.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/spyder/spyder,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/xsd.log
http://build-failures.rhaalovely.net/arm/2024-08-01/devel/xtensa-elf/gcc.log
http://build-failures.rhaalovely.net/arm/2024-08-01/editors/novelwriter.log
http://build-failures.rhaalovely.net/arm/2024-08-01/emulators/dgen-sdl.log
http://build-failures.rhaalovely.net/arm/2024-08-01/emulators/libchdr.log
http://build-failures.rhaalovely.net/arm/2024-08-01/games/orthorobot.log
http://build-failures.rhaalovely.net/arm/2024-08-01/games/solarus/roth.log
http://build-failures.rhaalovely.net/arm/2024-08-01/games/stockfish.log
http://build-failures.rhaalovely.net/arm/2024-08-01/geo/mapproxy.log
http://build-failures.rhaalovely.net/arm/2024-08-01/geo/py-supermercado,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/geo/pygeoapi.log
http://build-failures.rhaalovely.net/arm/2024-08-01/graphics/babl.log
http://build-failures.rhaalovely.net/arm/2024-08-01/graphics/gprof2dot.log
http://build-failures.rhaalovely.net/arm/2024-08-01/graphics/py-seaborn,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/graphics/tesseract/tesseract.log
http://build-failures.rhaalovely.net/arm/2024-08-01/lang/STk.log
http://build-failures.rhaalovely.net/arm/2024-08-01/lang/hashlink.log
http://build-failures.rhaalovely.net/arm/2024-08-01/lang/racket-minimal.log
http://build-failures.rhaalovely.net/arm/2024-08-01/mail/bogofilter,db4.log
http://build-failures.rhaalovely.net/arm/2024-08-01/math/lean.log
http://build-failures.rhaalovely.net/arm/2024-08-01/misc/osinfo/libosinfo.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/kismet.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/poco.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/py-junos-eznc,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/py-ncclient,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/py-netmiko,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/py-txtorcon,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/net/ucspi-tools.log
http://build-failures.rhaalovely.net/arm/2024-08-01/news/py-sabctools,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/plan9/drawterm.log
http://build-failures.rhaalovely.net/arm/2024-08-01/print/ocrmypdf.log
http://build-failures.rhaalovely.net/arm/2024-08-01/print/printrun.log
http://build-failures.rhaalovely.net/arm/2024-08-01/print/texinfo.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/boringssl/head.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/foremost.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/knockpy.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/nuclei.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/plaso.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/py-axolotl,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/py-in-toto,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/security/vault.log
http://build-failures.rhaalovely.net/arm/2024-08-01/shells/py-qtconsole,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/ansible.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/autossh.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/firmware/apple-boot.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/login_krb5.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/opam.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/py-ansible-compat,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/rancid.log
http://build-failures.rhaalovely.net/arm/2024-08-01/sysutils/ugrep.log
http://build-failures.rhaalovely.net/arm/2024-08-01/telephony/kamailio.log
http://build-failures.rhaalovely.net/arm/2024-08-01/www/ephemetoot.log
http://build-failures.rhaalovely.net/arm/2024-08-01/www/kiwix/libkiwix.log
http://build-failures.rhaalovely.net/arm/2024-08-01/www/py-openapi-core,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/www/py-treq,python3.log
http://build-failures.rhaalovely.net/arm/2024-08-01/x11/gnustep/base.log

recurrent failures
failures/databases/pgbackrest.log
failures/devel/boost.log
failures/devel/libfirm.log
failures/devel/liboil.log
failures/devel/libvirt-glib.log
failures/devel/py-unicorn,python3.log
failures/devel/remake.log
failures/devel/xsd.log
failures/devel/xtensa-elf/gcc.log
failures/emulators/dgen-sdl.log
failures/emulators/libchdr.log
failures/games/stockfish.log
failures/graphics/babl.log
failures/lang/STk.log
failures/lang/hashlink.log
failures/lang/racket-minimal.log
failures/mail/bogofilter,db4.log
failures/math/lean.log
failures/misc/osinfo/libosinfo.log
failures/net/ucspi-tools.log
failures/plan9/drawterm.log
failures/security/foremost.log
failures/security/nuclei.log
failures/security/vault.log
failures/sysutils/autossh.log
failures/sysutils/login_krb5.log
failures/sysutils/rancid.log
failures/sysutils/ugrep.log
failures/www/kiwix/libkiwix.log
failures/x11/gnustep/base.log
new failures
+++ ls-failures Sat Aug 31 03:21:01 2024
+failures/audio/cplay.log
+failures/audio/curseradio.log
+failures/audio/puddletag.log
+failures/audio/py-discogs-client,python3.log
+failures/audio/rgain.log
+failures/benchmarks/netperf-wrapper,-gui.log
+failures/databases/postgresql-odbc.log
+failures/databases/py-odbc,python3.log
+failures/databases/sqlite3-odbc.log
+failures/devel/arm-none-eabi/gcc,aarch64.log
+failures/devel/coccigrep.log
+failures/devel/libgusb.log
+failures/devel/libvmime.log
+failures/devel/p5-Params-Validate.log
+failures/devel/py-buildbot/buildbot.log
+failures/devel/py-jsonschema-spec,python3.log
+failures/devel/spyder/spyder,python3.log
+failures/editors/novelwriter.log
+failures/games/orthorobot.log
+failures/games/solarus/roth.log
+failures/geo/mapproxy.log
+failures/geo/py-supermercado,python3.log
+failures/geo/pygeoapi.log
+failures/graphics/gprof2dot.log
+failures/graphics/py-seaborn,python3.log
+failures/graphics/tesseract/tesseract.log
+failures/net/kismet.log
+failures/net/poco.log
+failures/net/py-junos-eznc,python3.log
+failures/net/py-ncclient,python3.log
+failures/net/py-netmiko,python3.log
+failures/net/py-txtorcon,python3.log
+failures/news/py-sabctools,python3.log
+failures/print/ocrmypdf.log
+failures/print/printrun.log
+failures/print/texinfo.log
+failures/security/boringssl/head.log
+failures/security/knockpy.log
+failures/security/plaso.log
+failures/security/py-axolotl,python3.log
+failures/security/py-in-toto,python3.log
+failures/shells/py-qtconsole,python3.log
+failures/sysutils/ansible.log
+failures/sysutils/firmware/apple-boot.log
+failures/sysutils/opam.log
+failures/sysutils/py-ansible-compat,python3.log
+failures/telephony/kamailio.log
+failures/www/ephemetoot.log
+failures/www/py-openapi-core,python3.log
+failures/www/py-treq,python3.log
resolved failures
--- ../old/arm/last//ls-failures Mon Jul 22 10:44:05 2024
-failures/archivers/snappy.log
-failures/audio/opus.log
-failures/devel/abseil-cpp.log
-failures/devel/arm-none-eabi/gcc,arm.log
-failures/devel/dyncall.log
-failures/devel/jsonrpc-glib.log
-failures/devel/libgit2/libgit2-glib.log
-failures/devel/llvm/16.log
-failures/devel/llvm/17.log
-failures/devel/or1k-elf/gcc.log
-failures/devel/riscv-elf/gcc.log
-failures/devel/riscv32-esp-elf/gcc.log
-failures/games/hyperrogue.log
-failures/lang/gambit.log
-failures/lang/rakudo.log
-failures/misc/magicpoint.log
-failures/net/rpki-data.log
-failures/net/tdlib.log
-failures/security/libbde.log
-failures/security/openssl/3.1.log
-failures/security/openssl/3.2.log
-failures/security/openssl/3.3.log
-failures/security/openssl/quictls.log

I wrote this about packages and ports in 2023, hopefully still useful to some who come here

After answering some too-basic questions about installing packages on
OpenBSD earlier earlier here, I remembered that back in 2013 I wrote a
piece about ports and packages that looks like it is still mostly usable.

Now available untracked as
https://nxdomain.no/~peter/youve_installed_it_now_what_packages.html
or prettified and G-tracked as
https://bsdly.blogspot.com/2013/04/youve-installed-it-now-what-packages.html

Comments and corrections welcome, of course there may be parts where things could
have happened in the space of 11 years and some months.

All the best,
Peter

--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Re: UPDATE: net/crawley-v1.7.8

2024-08-30T20:20:25Z Russ Sharek <bsdclown@disroot.org>:

>> Instead of setting MODGO_TEST_TARGET, it would be more
>> ports-idiomatic/clearer
>> to use a `do-test` target like:
>>
>> ```
>> do-test:
>>     cd ${WRKSRC} && CGO_ENABLED=1 ${MODGO_CMD} test -count 1 -v \
>>         -tags=test -coverprofile="cover.out" ./...
>> ```
>>
>> Tests are passing like this, so if you are alright with it, I think we
>> can
>> commit this.
>
> I'm thrilled to get some help on this, because I'm out of my depth.
>
> That said, `make test` with that do-test change failed for me here:
>
> make: don't know how to make cd (prerequisite of: do-test)
> Stop in .
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3090
> '/usr/ports/pobj/crawley-1.7.8/build-amd64/.test_done': @cd
> /usr/ports/mystu...)
> *** Error 2 in /usr/ports/mystuff/net/crawley
> (/usr/ports/infrastructure/mk/bsd.port.mk:2704 'test':
> @lock=crawley-1.7.8;  export _LOCKS_HEL...)
>
> Tell me what I did wrong, so we can commit the *redacted* thing. :)
>
> -R

Did you by any chance write

do-test: cd ${WRKSRC} && ...

instead of

do-test:
    cd ${WRKSRC} && ...

If you did, then I think that's the problem. Everything after the colon
are prerequisites (dependencies) to the target (do-test), see here[1].
Prerequisites are simply other targets you'd want executed *before* the
do-test target. So in this case make tries to execute the 'cd' target
which doesn't exist.

[1] https://man.openbsd.org/make#DEPENDENCY_LINES

Re: anyone want to network for OpenBSD/riscv32?

Hello,

On 8/11/24 1:13 PM, Peter Philipp wrote:
> I have a Pine64 Ox64 (64 MB RAM)

I also own an Ox64 and would be interested in OpenBSD/riscv32.

Don't know how much time I will find, though.

regards,
chris

Re: lang/guile3 update to 3.0.10

I'll hold off from committing this update for a while. It seems that it
is broken on various 32 bit arches:

https://buildd.debian.org/status/package.php?p=guile%2d3%2e0

On 2024/08/25 12:23:32 +0200, Omar Polo <op@omarpolo.com> wrote:
> A bit overdue, but here's the update. I'm leaving the description of
> the change to upstream anonunce mail:
>
> https://lists.gnu.org/archive/html/info-gnu/2024-06/msg00008.html
>
> port-wise:
>
> - spawn works without patching. the TL;DR is that guile decided to
> switch to the posix_spawn api^W madness a few releases ago. The
> problem is that they really wanted closefrom(2) but there's no
> posix_spawn version of it so they rolled it badly. It is still
> bad, but at least it works. (unless there are threads involved,
> which is funny because they switched to posix_madness for that.)
> If we provide posixx_spawn_file_actions_closfrom() or whatever
> is called guile would start using it.
>
> - i'm tweaking the changes to the regress. It is fully passing, but I
> had to disable a few tests.
> In particular one test that tries to run a nonexistent binary fails
> and I'm not sure how to interpret the backtrace, but will look into
> it. I don't consider it a blocker since the rest of the regress is
> happy.
>
> - another interesting failure is (getsockopt sock IPPROTO_TCP TCP_NODELAY)
> that returns 4 while the regress expected exactly 1. I've tweaked
> the test.
>
>
> I plan to commit this next week, but testing and oks are appreciated :)
>
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/lang/guile3/Makefile,v
> diff -u -p -r1.7 Makefile
> --- Makefile 26 Sep 2023 12:02:01 -0000 1.7
> +++ Makefile 8 Aug 2024 07:09:10 -0000
> @@ -6,7 +6,7 @@ DPB_PROPERTIES = parallel
>
> COMMENT= GNU's Ubiquitous Intelligent Language for Extension
>
> -VERSION= 3.0.9
> +VERSION= 3.0.10
> DISTNAME= guile-${VERSION}
> PKGNAME= guile3-${VERSION}
> V= ${VERSION:R}
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/lang/guile3/distinfo,v
> diff -u -p -r1.2 distinfo
> --- distinfo 3 Feb 2023 08:27:31 -0000 1.2
> +++ distinfo 8 Aug 2024 07:09:24 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (guile-3.0.9.tar.gz) = GFJQea0poNRtFcdlgbXZHIcCMBv9ghZm0uHRNyYWKBE=
> -SIZE (guile-3.0.9.tar.gz) = 9734735
> +SHA256 (guile-3.0.10.tar.gz) = Lb28l1mLL68xATVk77SOT+1EEx0o6ZbCar6KWyO1bCo=
> +SIZE (guile-3.0.10.tar.gz) = 9738824
> Index: patches/patch-libguile_posix_c
> ===================================================================
> RCS file: patches/patch-libguile_posix_c
> diff -N patches/patch-libguile_posix_c
> --- patches/patch-libguile_posix_c 3 Feb 2023 08:27:31 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,29 +0,0 @@
> -fix close_inherited_fds_slow
> -
> -The intent of close_inherited_fds_slow is to mimick closefrom() in the
> -posix_spawn API, i.e. schedule the closing of all fds >= 3 after fork().
> -
> -However, the way this is implemented in non-linux OSes is to schedule
> -the closing of 3..1023. This fails due to EBADF in posix_spawn after
> -the fork() and makes it exit(127).
> -
> -see: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61095
> -
> -Index: libguile/posix.c
> ---- libguile/posix.c.orig
> -+++ libguile/posix.c
> -@@ -1325,8 +1325,12 @@ SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0,
> - static void
> - close_inherited_fds_slow (posix_spawn_file_actions_t *actions, int max_fd)
> - {
> -- while (--max_fd > 2)
> -- posix_spawn_file_actions_addclose (actions, max_fd);
> -+ struct stat sb;
> -+ max_fd = getdtablecount();
> -+ while (--max_fd > 2) {
> -+ if (fstat(max_fd, &sb) != -1)
> -+ posix_spawn_file_actions_addclose (actions, max_fd);
> -+ }
> - }
> -
> - static void
> Index: patches/patch-test-suite_tests_00-socket_test
> ===================================================================
> RCS file: patches/patch-test-suite_tests_00-socket_test
> diff -N patches/patch-test-suite_tests_00-socket_test
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-test-suite_tests_00-socket_test 25 Aug 2024 10:07:57 -0000
> @@ -0,0 +1,32 @@
> +- disable a test that tries to make an "abstract" socket
> +- getsockopt(TCP_NODELAY) returns nonzero, non exactly 1
> +- disable more tests on abstract sockets
> +
> +Index: test-suite/tests/00-socket.test
> +--- test-suite/tests/00-socket.test.orig
> ++++ test-suite/tests/00-socket.test
> +@@ -133,6 +133,7 @@
> + (let ((sa (make-socket-address AF_UNIX "/tmp/unix-socket")))
> + (and (= (sockaddr:fam sa) AF_UNIX)
> + (string=? (sockaddr:path sa) "/tmp/unix-socket"))))
> ++ #;
> + (pass-if "AF_UNIX abstract"
> + (let ((sa (make-socket-address AF_UNIX "\x00/tmp/abstract-socket")))
> + (and (= (sockaddr:fam sa) AF_UNIX)
> +@@ -147,7 +148,7 @@
> + (pass-if "IPPROTO_TCP TCP_NODELAY"
> + (let ((sock (socket AF_INET SOCK_STREAM 0)))
> + (setsockopt sock IPPROTO_TCP TCP_NODELAY 1)
> +- (eqv? 1 (getsockopt sock IPPROTO_TCP TCP_NODELAY))))))
> ++ (not (eqv? 0 (getsockopt sock IPPROTO_TCP TCP_NODELAY)))))))
> +
> +
> + ;;;
> +@@ -326,6 +327,7 @@
> +
> + ;; testing `bind', `listen' and `connect' on abstract stream-oriented sockets
> +
> ++ #;
> + (let ((server-socket (socket AF_UNIX SOCK_STREAM 0))
> + (server-bound? #f)
> + (server-listening? #f)
> Index: patches/patch-test-suite_tests_posix_test
> ===================================================================
> RCS file: /home/cvs/ports/lang/guile3/patches/patch-test-suite_tests_posix_test,v
> diff -u -p -r1.1 patch-test-suite_tests_posix_test
> --- patches/patch-test-suite_tests_posix_test 3 Feb 2023 08:27:31 -0000 1.1
> +++ patches/patch-test-suite_tests_posix_test 25 Aug 2024 10:04:50 -0000
> @@ -1,11 +1,12 @@
> - wc pads the result with blanks, trim its output
> - - use "seq 3" rather than assuming /proc is available
> + - disable test that fails since there's no /proc fs
> + - disable a test that fails (not sure why yet)
> - fix nonsensical crypt invocation, use examples from manpage
>
> Index: test-suite/tests/posix.test
> --- test-suite/tests/posix.test.orig
> +++ test-suite/tests/posix.test
> -@@ -411,7 +411,7 @@
> +@@ -426,7 +426,7 @@
> (display "Hello world.\n" (cdr a+b))
> (close-port (cdr a+b))
>
> @@ -14,36 +15,23 @@ Index: test-suite/tests/posix.test
> (close-port (car c+d))
> (waitpid pid)
> str)))
> -@@ -428,18 +428,16 @@
> - (waitpid pid)
> - str)))
> +@@ -449,6 +449,7 @@
> + (string-drop str (+ 1 (string-index str #\newline)))
> + str))))
>
> -- (pass-if-equal "ls /proc/self/fd"
> -- "0\n1\n2\n3\n" ;fourth FD is for /proc/self/fd
> -- (if (file-exists? "/proc/self/fd") ;Linux
> -- (let* ((input+output (pipe))
> -- (pid (spawn "ls" '("ls" "/proc/self/fd")
> -- #:output (cdr input+output))))
> -- (close-port (cdr input+output))
> -- (let ((str (get-string-all (car input+output))))
> -- (close-port (car input+output))
> -- (waitpid pid)
> -- str))
> -- (throw 'unresolved)))
> -+ (pass-if-equal "seq 3"
> -+ "1\n2\n3\n"
> -+ (let* ((input+output (pipe))
> -+ (pid (spawn "seq" '("seq" "3")
> -+ #:output (cdr input+output))))
> -+ (close-port (cdr input+output))
> -+ (let ((str (get-string-all (car input+output))))
> -+ (close-port (car input+output))
> -+ (waitpid pid)
> -+ str)))
> ++ #;
> + (pass-if-equal "ls /proc/self/fd"
> + "0\n1\n2\n3\n" ;fourth FD is for /proc/self/fd
> + (if (file-exists? "/proc/self/fd") ;Linux
> +@@ -462,6 +463,7 @@
> + str))
> + (throw 'unresolved)))
>
> ++ #;
> (pass-if-equal "file not found"
> ENOENT
> -@@ -459,7 +457,8 @@
> + (catch 'system-error
> +@@ -480,7 +482,8 @@
> (pass-if "basic usage"
> (if (not (defined? 'crypt))
> (throw 'unsupported)
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/lang/guile3/pkg/PLIST,v
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 3 Feb 2023 08:27:31 -0000 1.3
> +++ pkg/PLIST 8 Aug 2024 16:57:26 -0000
> @@ -135,8 +135,19 @@ include/guile/${V}/libguile/weak-set.h
> include/guile/${V}/libguile/weak-table.h
> include/guile/${V}/libguile/weak-vector.h
> include/guile/${V}/readline.h
> -@info info/guile.info
> -@info info/r5rs.info
> +info/guile.info
> +info/guile.info-1
> +info/guile.info-10
> +info/guile.info-11
> +info/guile.info-2
> +info/guile.info-3
> +info/guile.info-4
> +info/guile.info-5
> +info/guile.info-6
> +info/guile.info-7
> +info/guile.info-8
> +info/guile.info-9
> +info/r5rs.info
> lib/guile/
> lib/guile/${V}/
> lib/guile/${V}/ccache/
> @@ -153,6 +164,7 @@ lib/guile/${V}/ccache/ice-9/common-list.
> lib/guile/${V}/ccache/ice-9/control.go
> lib/guile/${V}/ccache/ice-9/copy-tree.go
> lib/guile/${V}/ccache/ice-9/curried-definitions.go
> +lib/guile/${V}/ccache/ice-9/custom-ports.go
> lib/guile/${V}/ccache/ice-9/deprecated.go
> lib/guile/${V}/ccache/ice-9/documentation.go
> lib/guile/${V}/ccache/ice-9/eval-string.go
> @@ -209,6 +221,7 @@ lib/guile/${V}/ccache/ice-9/scm-style-re
> lib/guile/${V}/ccache/ice-9/serialize.go
> lib/guile/${V}/ccache/ice-9/session.go
> lib/guile/${V}/ccache/ice-9/slib.go
> +lib/guile/${V}/ccache/ice-9/soft-ports.go
> lib/guile/${V}/ccache/ice-9/stack-catch.go
> lib/guile/${V}/ccache/ice-9/streams.go
> lib/guile/${V}/ccache/ice-9/string-fun.go
> @@ -241,14 +254,17 @@ lib/guile/${V}/ccache/language/cps/dump.
> lib/guile/${V}/ccache/language/cps/effects-analysis.go
> lib/guile/${V}/ccache/language/cps/elide-arity-checks.go
> lib/guile/${V}/ccache/language/cps/graphs.go
> +lib/guile/${V}/ccache/language/cps/guile-vm/
> +lib/guile/${V}/ccache/language/cps/guile-vm.go
> +lib/guile/${V}/ccache/language/cps/guile-vm/loop-instrumentation.go
> +lib/guile/${V}/ccache/language/cps/guile-vm/lower-primcalls.go
> +lib/guile/${V}/ccache/language/cps/guile-vm/reify-primitives.go
> lib/guile/${V}/ccache/language/cps/intmap.go
> lib/guile/${V}/ccache/language/cps/intset.go
> lib/guile/${V}/ccache/language/cps/licm.go
> -lib/guile/${V}/ccache/language/cps/loop-instrumentation.go
> lib/guile/${V}/ccache/language/cps/optimize.go
> lib/guile/${V}/ccache/language/cps/peel-loops.go
> lib/guile/${V}/ccache/language/cps/prune-top-level-scopes.go
> -lib/guile/${V}/ccache/language/cps/reify-primitives.go
> lib/guile/${V}/ccache/language/cps/renumber.go
> lib/guile/${V}/ccache/language/cps/return-types.go
> lib/guile/${V}/ccache/language/cps/rotate-loops.go
> @@ -298,6 +314,7 @@ lib/guile/${V}/ccache/language/tree-il/c
> lib/guile/${V}/ccache/language/tree-il/compile-cps.go
> lib/guile/${V}/ccache/language/tree-il/cps-primitives.go
> lib/guile/${V}/ccache/language/tree-il/debug.go
> +lib/guile/${V}/ccache/language/tree-il/demux-lambda.go
> lib/guile/${V}/ccache/language/tree-il/effects.go
> lib/guile/${V}/ccache/language/tree-il/eta-expand.go
> lib/guile/${V}/ccache/language/tree-il/fix-letrec.go
> @@ -310,6 +327,9 @@ lib/guile/${V}/ccache/language/tree-il/r
> lib/guile/${V}/ccache/language/tree-il/spec.go
> lib/guile/${V}/ccache/language/value/
> lib/guile/${V}/ccache/language/value/spec.go
> +lib/guile/${V}/ccache/language/wisp/
> +lib/guile/${V}/ccache/language/wisp.go
> +lib/guile/${V}/ccache/language/wisp/spec.go
> lib/guile/${V}/ccache/oop/
> lib/guile/${V}/ccache/oop/goops/
> lib/guile/${V}/ccache/oop/goops.go
> @@ -535,6 +555,7 @@ share/guile/${V}/ice-9/common-list.scm
> share/guile/${V}/ice-9/control.scm
> share/guile/${V}/ice-9/copy-tree.scm
> share/guile/${V}/ice-9/curried-definitions.scm
> +share/guile/${V}/ice-9/custom-ports.scm
> share/guile/${V}/ice-9/deprecated.scm
> share/guile/${V}/ice-9/documentation.scm
> share/guile/${V}/ice-9/eval-string.scm
> @@ -597,6 +618,7 @@ share/guile/${V}/ice-9/scm-style-repl.sc
> share/guile/${V}/ice-9/serialize.scm
> share/guile/${V}/ice-9/session.scm
> share/guile/${V}/ice-9/slib.scm
> +share/guile/${V}/ice-9/soft-ports.scm
> share/guile/${V}/ice-9/stack-catch.scm
> share/guile/${V}/ice-9/streams.scm
> share/guile/${V}/ice-9/string-fun.scm
> @@ -629,14 +651,17 @@ share/guile/${V}/language/cps/dump.scm
> share/guile/${V}/language/cps/effects-analysis.scm
> share/guile/${V}/language/cps/elide-arity-checks.scm
> share/guile/${V}/language/cps/graphs.scm
> +share/guile/${V}/language/cps/guile-vm/
> +share/guile/${V}/language/cps/guile-vm.scm
> +share/guile/${V}/language/cps/guile-vm/loop-instrumentation.scm
> +share/guile/${V}/language/cps/guile-vm/lower-primcalls.scm
> +share/guile/${V}/language/cps/guile-vm/reify-primitives.scm
> share/guile/${V}/language/cps/intmap.scm
> share/guile/${V}/language/cps/intset.scm
> share/guile/${V}/language/cps/licm.scm
> -share/guile/${V}/language/cps/loop-instrumentation.scm
> share/guile/${V}/language/cps/optimize.scm
> share/guile/${V}/language/cps/peel-loops.scm
> share/guile/${V}/language/cps/prune-top-level-scopes.scm
> -share/guile/${V}/language/cps/reify-primitives.scm
> share/guile/${V}/language/cps/renumber.scm
> share/guile/${V}/language/cps/return-types.scm
> share/guile/${V}/language/cps/rotate-loops.scm
> @@ -686,6 +711,7 @@ share/guile/${V}/language/tree-il/compil
> share/guile/${V}/language/tree-il/compile-cps.scm
> share/guile/${V}/language/tree-il/cps-primitives.scm
> share/guile/${V}/language/tree-il/debug.scm
> +share/guile/${V}/language/tree-il/demux-lambda.scm
> share/guile/${V}/language/tree-il/effects.scm
> share/guile/${V}/language/tree-il/eta-expand.scm
> share/guile/${V}/language/tree-il/fix-letrec.scm
> @@ -698,6 +724,9 @@ share/guile/${V}/language/tree-il/resolv
> share/guile/${V}/language/tree-il/spec.scm
> share/guile/${V}/language/value/
> share/guile/${V}/language/value/spec.scm
> +share/guile/${V}/language/wisp/
> +share/guile/${V}/language/wisp.scm
> +share/guile/${V}/language/wisp/spec.scm
> share/guile/${V}/oop/
> share/guile/${V}/oop/goops/
> share/guile/${V}/oop/goops.scm