Re: httpd: request rewrite reliably causes 500 internal server error

2024-07-13 Thread Crystal Kolipe
On Sat, Jul 13, 2024 at 08:48:56PM +1000, Paul W. Rankin wrote:
> Hello,
> 
> I’m trying to get a basic URL rewrite working with httpd but, alas, it 
> seems broken.

It's not broken :-).

> 
> My goal:
> 
>   /~USER -> /htdocs/u/USER

root "/htdocs/u"
location match "/~(.*)" {
request rewrite "/%1"
}

> To debug this, in case the “~” character was throwing something off, I 
> simply tried to achieve:
> 
>   /u/USER -> /htdocs/u/USER

root "/htdocs/u"
location match "/u/(.*)" {
request rewrite "/%1"
}

> I’m aware this can be achieved with request strip, but this is for 
> purposes of demonstrating the bug.

It's not a bug :-)

Try accessing specific files such as:

http://example.com/~my_user/my_file

and it works.

You are probably expecting _auto indexing_, which doesn't happen for rewritten
requests.

Depending on your use case you might want to a couple of extra location match
directives such as this:

location match "/~(.*)/" {
request rewrite "/%1/index.html"
}
location match "/~(.*)$" {
request rewrite "/%1/index.html"
}

...which will redirect such requests to an index.html file.



Re: openbsd console

2024-07-13 Thread Crystal Kolipe
On Sat, Jul 13, 2024 at 02:12:35PM +0200, Erling Westenvik wrote:
> It is my understanding that OpenBSD requires X for any practical, productive
> and meaningful terminal usage.

That is completely untrue.

> As for your question the FAQ briefly describes some trickery that may or may
> not be applicable:
> 
> https://www.openbsd.org/faq/faq7.html#Size80x50

That's nothing to do with changing the resolution of the framebuffer console.



Re: vi: How to display German umlauts?

2024-07-13 Thread rfabris

Dear Crystal

Am 2024-07-11 07:09, schrieb Crystal Kolipe:

Regarding the OP's specific question - if the files being edited only
contain those specific UTF-8 sequences and are otherwise plain ASCII 
text,

then a simple work-around might be a script that replaces each two-byte
sequence with the corresponding ISO-8859-1 character, writes that to a
temporary file, invokes vi for editing the temporary file, then 
converts

it back to UTF-8 afterwards.


Thanks a lot for your suggestion. Indeed, my vi-files contain those 6
specific UTF-8 sequences only.

I have seen these 6 sequences are displayed as umlauts when I open
the vi files in LibreOffice, and when I convert the vi files to html
via asciidoctor.

Therefore, I consider it merely a "cosmetical" problem in vi and can do
without a script and without nvi - and stick a bit closer to the
OpenBSD base install :)

Best regards

Rolf



httpd: request rewrite reliably causes 500 internal server error

2024-07-13 Thread Paul W. Rankin
Hello,

I’m trying to get a basic URL rewrite working with httpd but, alas, it 
seems broken.

My goal:

/~USER -> /htdocs/u/USER

To debug this, in case the “~” character was throwing something off, I 
simply tried to achieve:

/u/USER -> /htdocs/u/USER

I’m aware this can be achieved with request strip, but this is for 
purposes of demonstrating the bug.

Here is my httpd.conf, which will reliably result in a 500 internal 
server error:

types {
include "/usr/share/misc/mime.types"
}

server "blip.town" {
alias "www.blip.town"
listen on * port 80
log style combined
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI;
}
}

server "blip.town" {
alias "www.blip.town"
listen on * tls port 443
root "/htdocs/u"
log style combined
tls {
certificate "/etc/ssl/blip.town.fullchain.pem"
key "/etc/ssl/private/blip.town.key"
}
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location match "/u/(.*)" {
request rewrite "/%1"
}
}

Any input would be much appreciated.

--
Paul W. Rankin
https://rnkn.xyz



Re: openbsd console

2024-07-13 Thread Erling Westenvik
On Sat, Jul 13, 2024 at 02:09:20AM GMT, Gustavo Rios wrote:
> Hi folks!
> 
> How to change my console resolution to 1920x1080 ? What is the command ?

It is my understanding that OpenBSD requires X for any practical, productive 
and meaningful terminal usage.

If you want non-English letters or -- God forbid! -- graphic/line-drawing 
characters in console, then don't be surprised if you're told that you're doing 
it wrong and that you should ssh into your system from some graphical 
environment.

In this regard OpenBSD is more "modern" than even Linux.

Rant aside: What I'd give if I could use my old HP ZR30w's attached to my 
workstations in high resolution unicode console mode... Not to mention my 
server consoles. And laptops! What a bliss...

As for your question the FAQ briefly describes some trickery that may or may 
not be applicable:

https://www.openbsd.org/faq/faq7.html#Consoles

and

https://www.openbsd.org/faq/faq7.html#Size80x50


Cheers,

Erling

> 
> Thanks.
> 
> -- 
> The lion and the tiger may be more powerful, but the wolves do not perform
> in the circus



Re: vi: How to display German umlauts?

2024-07-13 Thread rfabris

Am 2024-07-11 05:25, schrieb ropers:

Dear Ian

What vi(1) displays there are (the hex equivalents of) UTF-8 code 
units.
Whenever old vi(1) Can't Even, it will barf hex, but treat each 
hex-barf
byte as a separate character, even when--as here--the two bytes are but 
one

character. Dunning-Kruger applies: Old vi(1) is ignorant of UTF-8
multi-byte characters and unaware of it.

In case you are not familiar with the difference between code points 
and

code units, and how to convert from the former to the latter (and vice
versa), Graham Douglas has you covered. This page is an excellent 
resource

and might help you wrap your head around that:
http://www.readytext.co.uk/?p=1284


Thanky you very much for your explanations and the link. Much
appreciated!


If there's something like an open mike at
EuroBSDcon, and IFF they let me in without signing over my firstborn,
perhaps that might be a good place to raise such an issue anyway?


And, by the way, your writing style is a pleasure to read :)


They were all just the chars in some 256-character charset. However,
you're prolly not in Kansas, and they're not identical in most
Unicode formats anymore.


Sorry, but I don't understand the meaning of "However, you're
[probably] not in Kansas".

Best regards

Rolf



Re: Running OpenBSD on a VPS.

2024-07-13 Thread Janne Johansson
> address and things like that. Contabo at least offers to setup a VPS
> with custom iso images providing VLC console access and such. From a

I think you mean a VNC console, not the road-cone media player.
I could bear the mistake once, but now it looks like a pattern, hence
the nitpicking about this detail.

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



Re: vi: How to display German umlauts?

2024-07-13 Thread Crystal Kolipe
On Thu, Jul 11, 2024 at 06:34:00PM +0100, ropers wrote:
> On Thu, 11 Jul 2024 at 06:09, Crystal Kolipe 
> wrote:
> 
> > On Thu, Jul 11, 2024 at 04:25:33AM +0100, ropers wrote:
> > > It's long been a secret wishlist item for me to solicit/reach agreement
> > on
> > > which 256 (possibly 512) code points might merit inclusion in a minimal
> >
> > There is already preliminary support for propper UTF-8 handling in the
> > framebuffer console on OpenBSD.  It's still buggy, but work is on-going.
> >
> 
> Thank you very much. That's great news.
> 
> It would be really nice if agreement could reached between all the BSDs
> (and possibly other Unix-likes) on which characters to include in a
> minimalist 256--or 512--character subset of Unicode.

Why?  This makes absolutely no sense to me.

Talking about a 512 character subset, your thinking seems to be influenced
by either VGA hardware or the linux framebuffer console, neither of which is
relevant for our purposes.

> This would NOT mean OpenBSD's framebuffer console switching to CP1252 or
> even adopting CP1252 -- no, OpenBSD would still be adopting UTF-8 and UTF-8
> only,

There are several different issues at play here.

The wsfont and rasops subsystems already support fonts with > 256 characters.
This is the 'graphical' side of things, support for drawing those glyphs.

Right now today, you can create a console font with 100,000 glyphs and load
it in to the wscons subsystem.

Of course, displaying ASCII text will never touch those glyphs, because the
only displayable characters are 32 - 126.

The framebuffer console is most commonly configured for ISO-8859-1.  Try
running:

$ echo "\0377" # Octal representation of 0xff.

and you get y with diaeresis.

You can switch to a different NRCS, (National Replacement Character Set),
which will pull in characters from beyond codepoint 127 and put them in the
7-bit ASCII range.

On a real DEC terminal these glyphs were remapped from 8-bit positions in the
proprietary DEC MCS, (which is similar to but not identical to ISO-8859-1).

On OpenBSD, the translation to UCS codepoints is handled by tables defined in
wsemul_vt100_chars.c.

All of the mappings for regular alphabetical characters fall within the 8-bit
ISO-8859-1 range, so even at this point you're not needing to go beyond 256.

Some of the line-drawing and other graphics characters found in the DEC
technical and special graphics sets are mapped to codepoints > 255 on OpenBSD.

As a result, with the default spleen font, you won't see these glyphs.  But
if you add appropriate glyphs and re-compile the kernel, it'll work.

For direct access to glyphs past 255, the OpenBSD wscons console provides
UTF-8 emulation.

For many years that support was broken and nobody noticed, which already
suggests to me that interest is limited for using anything more than ASCII or
at most ISO-8859-1 on the framebuffer console.

https://marc.info/?l=openbsd-tech=167734639712745

That bug has been fixed.  Others still exist.  Work is on-going.

But OpenBSD already supports ISO-8859-1 on the framebuffer console.

If you have a desire to create your own 8-bit character set to cater for
a particular niche case, it's not particularly difficult.  You could just add
a new control sequence and a new translation table, or modify an existing one.

But the future is UTF-8.

> however on the question of which of the hundreds of thousands of
> Unicode characters might get one of the 256 limited-edition tickets to
> "supported on console" prominence,

There is no such limitation on OpenBSD.

> It is my understanding that going for 512-character framebuffer console
> charsets would require forgoing broader compatibility and the possible use
> of 16 colours (512-character VGA framebuffer consoles can only do 8
> colours.) Thus limiting the subset to 256 characters seems advisable.

This is a VGA hardware limitation.  The framebuffer console is capable of
pure 24-bit operation.  I published patches last year to make it possible to
use 256 colours with TERM=xterm-256color, and in fact the machine I am writing
this email on has this set right now.

> It would be possible to just put the C0 Control Pictures (
> enwp.org/Control_Pictures) there, which might make the plaintext column in
> (suitably patched) hex editors slightly more informative (fewer dots, more
> identifiable characters)

Hexdump in base calls isprint() to decide whether to print the actual character
or replace it with a dot.  You can see fewer dots today with the following
trivial patch:

--- display.c.dist  Wed Aug 24 04:13:45 2016
+++ display.c   Sat Jul 13 09:15:03 2024
@@ -166,7 +166,7 @@
}
break;
case F_P:
-   (void)printf(pr->fmt, isprint(*bp) ? *bp : '.');
+   (void)printf(pr->fmt, ((*bp & 0x7f) >= 32 && (*bp != 0x7f)) ? 
*bp : '.');
break;
case F_STR:
(void)printf(pr->fmt, (char *)bp);


> One character I strongly feel should be 

Re: Running OpenBSD on a VPS.

2024-07-12 Thread Crystal Kolipe
On Sat, Jul 13, 2024 at 02:16:12AM +0200, Christian Schulte wrote:
> There is no security with those kind of setups and we
> all know it. I am just glad I can run OpenBSD there.

But if you want to run internet-facing servers without exposing access to them
to the VPS hosting provider, you can still make use of inexpensive VPS
services running OpenBSD to tunnel connections back to a server on a home
broadband connection, (which might not have a static IP, might lack IPv6, or
might not allow inbound connections).

As long as you control the keys and certs on the machine which is physically
under your control, and you are using appropriate algorithms for
authentication, then access to the upstream VPS by the provider, (or anyone
else), can't be used to man-in-the-middle your connections, (without being
detected).



openbsd console

2024-07-12 Thread Gustavo Rios
Hi folks!

How to change my console resolution to 1920x1080 ? What is the command ?

Thanks.

-- 
The lion and the tiger may be more powerful, but the wolves do not perform
in the circus


Re: Running OpenBSD on a VPS.

2024-07-12 Thread Christian Schulte




On 11.07.24 12:11, Kirill A. Korinsky wrote:

On Thu, 11 Jul 2024 03:10:43 +0100,
Christian Schulte  wrote:


Running OpenBSD since then personally. Never had a chance to install it
to a server, because the providers did not support it. Now they do.


Not all of them. Special in case like Hetzner, online.net and similar one.

But they allow to load the server from rescue mode with some linux, what
opens a kind of backdoor where you run QEMU to install OpenBSD :)

You may achive some kind of semi-automatic installation with answer files,
but QEMU uses only tftp-server-name which support was removed at 7.0, so,
semi-automatic installation via QEMU works for OpenBSD up to 6.9.



Does not make much sense discussing this here. Even if OpenBSD would 
encrypt the vmm layer as well, there is no way to setup OpenBSD with 
such a provider in a way not risking someone to be able to break 
security. Moved away from very stressful Alfahosting to Contabo. 
Alfahosting once thought it would be cool to just assign a new IP 
address and things like that. Contabo at least offers to setup a VPS 
with custom iso images providing VLC console access and such. From a 
security point of view, this makes no sense at all discussing this here. 
There is no security with those kind of setups and we all know it. I am 
just glad I can run OpenBSD there.


Regards,
--
Christian



Re: [solved]: vi: How to display German umlauts?

2024-07-12 Thread Страхиња Радић
Дана 24/07/13 02:18AM, Pontus Stenetorp написа:
> I take it you have that function for cases where the number of files 
> is very large and would not fit the buffer for your shell?

Actually, now that I think of it, that might be the reason why I wrote 
that function using find more than two years ago. For most 
repositories, there is no difference between using it and plain `wc -l` 
with a long list of arguments, but if there are a lot of *.c and *.h 
files in subdirectories of $HOME:

$ cd
$ wc -l $(find . -name '*.[ch]')
E: /bin/mksh: /usr/bin/wc: Argument list too long

and it is not shell-specific; it depends on the system variable 
ARG_MAX, which is on OpenBSD:

$ getconf ARG_MAX
524288

More on this:

https://www.in-ulm.de/~mascheck/various/argmax/



Re: [solved]: vi: How to display German umlauts?

2024-07-12 Thread Страхиња Радић
Дана 24/07/12 08:50PM, Страхиња Радић написа:
> No, I use the version I listed because I can format the output as I see 
> fit, and it gives per-file statistics.

Also, I just now realize this is a case of a "useless use of awk"; I 
have no idea why I overlooked that

wc -l *.c

also gives the "total" line and the per-file statistics, and made an 
awk script to process the wc output. Huh. ¯\_(ツ)_/¯



Re: [solved]: vi: How to display German umlauts?

2024-07-12 Thread Страхиња Радић
Дана 24/07/13 02:18AM, Pontus Stenetorp написа:
> Always used:
> 
>   wc -l $(find vim90 -name '*.[ch]')
> 
> Which gives roughly the same *rough* estimate: 516,321.
> 
> I take it you have that function for cases where the number of files 
> is very large and would not fit the buffer for your shell?

No, I use the version I listed because I can format the output as I see 
fit, and it gives per-file statistics.


> You can also 
> group your wc(1) calls by using + as your terminator instead of \;.

I know of that. Directories I run this function in usually don't have 
that many files for the "overhead" of exec'ing another wc is 
significant.



Re: webcam detected but image capture shows green/black screen

2024-07-12 Thread Sandeep Gupta
That fixed it. Thanks so much.

On Fri, Jul 12, 2024 at 1:10 PM Crystal Kolipe 
wrote:

> On Fri, Jul 12, 2024 at 01:04:10PM +0530, Sandeep Gupta wrote:
> > I have a non-mainstream laptop (company name: chuwi). Working great so
> far
> > but not the webcam. I did a `dd if=/dev/video0 of=webcam_data.bin bs=1024
> > count=10` and all i am getting is the stream of 0s.
>
> Is sysctl kern.video.record enabled?
>


Re: [solved]: vi: How to display German umlauts?

2024-07-12 Thread Pontus Stenetorp
On Tue 09 Jul 2024, Страхиња Радић wrote:
> 
>   sourcesize()
>   {
>   find . -name '*.[ch]' -exec wc -l {} \; |
>   awk '{
>   size = $1
>   f = $2
>   sum += size
>   printf "%10d %s\n", size, f
>   }
>   END{
>   printf "%10d total\n", sum
>   }'
>   }
> 
> gives
> 
> 550599 total
> 
> when run in the root of Vim's repository. Aside from being a rough
> estimate (it doesn't distinguish comment lines from real code), that
> includes X11 code and various other features which could be opted out.

Always used:

wc -l $(find vim90 -name '*.[ch]')

Which gives roughly the same *rough* estimate: 516,321.

I take it you have that function for cases where the number of files is very 
large and would not fit the buffer for your shell? You can also group your 
wc(1) calls by using + as your terminator instead of \;.



(Fork) "IP rights" bullshit, philosophy & OpenBSD compatibility with this

2024-07-12 Thread Anon Loli
(This thread is a fork of "Re: [solved]: vi: How to display German umlauts?")


On Thu, Jul 11, 2024 at 01:46:55PM +0200, Michael Hekeler wrote:
> Dear Anon Loli:
> 
> > (...)
> > software should be free, and non-personal information should be free,
> > too, without any IP or a requirement for a file "LICENSE".. those are
> > just my 2 cents..
> 
> if you don't say something about using or redisributing your software or
> code then nobody knows and noone can be sure if its allowed to do this
> or that.
> Just to make it clear for everyone you can give a statement about these
> topics.
> A good place for this statement is to include a file and call it
> LICENSE.

Yeah, a statement indeed, but I'm not sure how I feel about copyright itself
like I don't feel that taking someone's code and not giving them credit for it
is stealing or something like that.. no one can own code, they can just come up
with a cool combination of code, but that shouldn't mean that everyone HAS TO
credit them (if not more) or else they get removed from an platform or sued.

For example a couple of years ago I predicted that an A.I. will be invented
that comes up with combinations of code, and checks for copyright (how does it
do that? IDK) and if it doesn't exists, then it licenses it for a few dollars,
and does this until everyone is legally forced to pay to have any
functionality (this is as far as I understand it would play out).

Like a year ago when A.I. became popular, someone made a bot that helps
programmers with code and stuff.. someone else made an A.I. that can write
code based on the input (is not ChatGPT or MS' A.I. capable of doing this?)

Even if such mass-licensing is say forbidden, I still don't feel like
someone should get credit if their code is out there, let alone asked if their
code can be used or not.. this is how I feel because I would feel the same if
someone did this to me.
If you don't want your code out there, then don't publish it.. it's better than
this evil capitalistic and selfish "code sharing", which is more
bullshit+licensing evil than it is good, in my opinion.

When I'm selfish like that, for example with my current projects, I just don't
publish the source code, because I feel like someone else would work on the
code instea dof me... and I want to be the one fulfilling ... LIVING my wishes
:)


> > (...), would you use a open source peace of software that in the README
> > says "you can use it for whatever you want with no strings attached,
> > and that's it
> 
> In the end it is your decision. Whether you want to hide the text
> down in the README or something else. 
> If you are the creator, it's your work and your rules apply.

Yeah, but at the same time I'm not sure I want to create something that only 3
people in the world will use XD
I wonder how OpenBSD stands with using code that has a weak disclaimer like
"You're free to use this for whatever you want with 0 conditions because I'm
not evil or annoying" in it's README, and for code that I "borrowed"(xD) from
someone else and/or modified, I could maybe, just maybe put a disclaimer or
something but even that is a big pain in my cunny...

Because like ideally I want to be like suckless.org guys...
BUT I also like OpenBSD and wouldn't mind one day for OpenBSD to perhaps use
some code for something, even if it's just 1 line


> > I'm not sure about the license thought... as I despise licenses and even 
> > having
> > a copyleft license like CC is getting on my nerves, ...
> 
> creative commons (CC) recommend against using their licenses
> for software.
> Very similar to most Creative Commons licenses are Permissive software
> licenses (e.g. Apache 2.0 License or MIT License)
> But here again: if it is your work then you decide the ways share your work.  

I meant CC0 specifically
Intellectual Property is such a evil that it affects humanity as a whole
Wasn't like 3D printing a huge patent for like 70 decades?
I think that you get the drift :)



Re: webcam detected but image capture shows green/black screen

2024-07-12 Thread Crystal Kolipe
On Fri, Jul 12, 2024 at 01:04:10PM +0530, Sandeep Gupta wrote:
> I have a non-mainstream laptop (company name: chuwi). Working great so far
> but not the webcam. I did a `dd if=/dev/video0 of=webcam_data.bin bs=1024
> count=10` and all i am getting is the stream of 0s.

Is sysctl kern.video.record enabled?



Re: webcam detected but image capture shows green/black screen

2024-07-12 Thread Peter Hessler
I've had that when the video lock switch was enabled, and when
sysctl kern.video.record=0.  Make sure to enable the sysctl, and check
that you flipped the switch to enable the video.


On 2024 Jul 12 (Fri) at 13:04:10 +0530 (+0530), Sandeep Gupta wrote:
:I have a non-mainstream laptop (company name: chuwi). Working great so far
:but not the webcam. I did a `dd if=/dev/video0 of=webcam_data.bin bs=1024
:count=10` and all i am getting is the stream of 0s.
:
:I checked the bios, couldn't find anything useful to tweak there. Is this
:some hardware issue with the laptop that is beyond the os/driver stack.



webcam detected but image capture shows green/black screen

2024-07-12 Thread Sandeep Gupta
I have a non-mainstream laptop (company name: chuwi). Working great so far
but not the webcam. I did a `dd if=/dev/video0 of=webcam_data.bin bs=1024
count=10` and all i am getting is the stream of 0s.

I checked the bios, couldn't find anything useful to tweak there. Is this
some hardware issue with the laptop that is beyond the os/driver stack.


Intel X710 VF lost network connection after nvm update

2024-07-11 Thread Oliver Schweger

Hello,

I wanted to report an issue with OpenBSD”s iavf driver that started to 
occur after updating the firmware of my Intel X710 NIC from version 9.40 
to 9.50 using intel’s nvmupdate utility.
After the update all OpenBSD guests have lost network connectivity on 
iavf interfaces.



I tried the following to get it back up running:
- Installing all available updates on the hypervisor, proxmox 8.2 
(kernel 6.5.13-5-pve)
- Compiling the latest available i40e driver from intel’s website 
(v2.25.9)

- Rebooting several times, hypervisor and guests

There are many different operating systems running as guests including 
Linux, FreeBSD and Windows, however OpenBSD is currently the only OS 
where this problem occurs.


I’m running the latest snapshot on my OpenBSD guests.
Related dmesg output:

iavf0 at pci6 dev 16 function 0 "Intel XL710/X710 VF" rev 0x02, VF 
version 1.1, VF 0 VSI 13, msix, address 58:47:ca:13:37:03

iavf0: CONFIG_VSI_QUEUES failed: -1
iavf0: queue op 9 failed: -1
iavf0: failed to shut down ringsiavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1
iavf0: ADD/DEL_ETH_ADDR failed: -1

Regards


Re: vi: How to display German umlauts?

2024-07-11 Thread ropers
On Thu, 11 Jul 2024 at 06:09, Crystal Kolipe 
wrote:

> On Thu, Jul 11, 2024 at 04:25:33AM +0100, ropers wrote:
> > It's long been a secret wishlist item for me to solicit/reach agreement
> on
> > which 256 (possibly 512) code points might merit inclusion in a minimal
>
> There is already preliminary support for propper UTF-8 handling in the
> framebuffer console on OpenBSD.  It's still buggy, but work is on-going.
>

Thank you very much. That's great news.

It would be really nice if agreement could reached between all the BSDs
(and possibly other Unix-likes) on which characters to include in a
minimalist 256--or 512--character subset of Unicode. (If that too is
already underway, I may simply be unaware of it and not up to speed.)

Since the traditional charset here is that of ISO-8859-1, and since
Windows-1252 is both exceedingly good^H^H^H^H common and a superset of
ISO-8859-1, the latter looks like a good starting point. (For avoidance of
doubt: By superset of the former charset I mean Windows-1252 includes all
the characters (or graphemes) present in ISO-8859-1, though not necessarily
in the same order.)

Again for avoidance of doubt:
This would NOT mean OpenBSD's framebuffer console switching to CP1252 or
even adopting CP1252 -- no, OpenBSD would still be adopting UTF-8 and UTF-8
only, however on the question of which of the hundreds of thousands of
Unicode characters might get one of the 256 limited-edition tickets to
"supported on console" prominence, it may not be the worst of ideas to
settle on the ones that are in CP1252. So really, we'd be talking about
continuing to support what was in ISO-8859-1, and making sensible
industry-standard choices in terms of what other characters to admit to the
console club.

It is my understanding that going for 512-character framebuffer console
charsets would require forgoing broader compatibility and the possible use
of 16 colours (512-character VGA framebuffer consoles can only do 8
colours.) Thus limiting the subset to 256 characters seems advisable.

Even Windows-1252 still leaves a bunch of its 256 spots "unoccupied", i.e.
with no grapheme proffered. Notably Windows-1252 and ISO-8859-1 do not
define graphemes for the C0 control code characters. New and proper
framebuffer console UTF-8 handling routines could use those spots.

It would be possible to just put the C0 Control Pictures (
enwp.org/Control_Pictures) there, which might make the plaintext column in
(suitably patched) hex editors slightly more informative (fewer dots, more
identifiable characters), but those Control Pictures might have issues in
some contexts, i.e. with some consoles/terminal emulators, since at least
some X11 fonts render them too wide, so if all the Swiss cheese holes align
(enwp.org/Swiss_cheese_model), one Control Picture character can end up two
monospaced characters wide -- and while framebuffer console fonts are very
much controllable, one wouldn't want a situation where something that looks
right in the framebuffer console suddenly looks iffy in xterm (or some
other X11 terminal emulator) or vice versa. At the peril of sounding like
Agent Smith, terminal text mustn't be allowed to escape the matrix. OTOH,
maybe bending over backwards to fix some other font designer's mistake is
no use or not worth the squeeze.

One character I strongly feel should be included in a common minimalist
Unicode subset is the U+FFFD � REPLACEMENT CHARACTER, even though some font
and tty combos also render that too wide.

The above would leave but a literal handful of spots. Windows maps CP1252's
0x81, 8D, 8F, 90, and 9D spots to C1 control codes, but those too are
glyphless, and worse, there are no control pictures for C1 codes, so in
terms of glyphs and graphemes these spots remain truly empty.
I confess, for a while I thought of harebrained schemes, such as using what
remains to implement Impulse Tracker-like continuously character-redefining
smooth mouse pointer support (
enwp.org/Text-only#Under_DOS_and_Microsoft_Windows) -- or using
two-character pairs for little Puffy or Beastie logos -- however, even
given Unicode's Private Use Areas, including characters that are not in
Unicode is probably not justifiable. Not to mention I wouldn't know how to
actually code that. I should probably stop here, lest more abstruse
meanderings make me sound any more sectionable than the above already might.

Regarding the OP's specific question - if the files being edited only
> contain those specific UTF-8 sequences and are otherwise plain ASCII text,
> then a simple work-around might be a script that replaces each two-byte
> sequence with the corresponding ISO-8859-1 character, writes that to a
> temporary file, invokes vi for editing the temporary file, then converts
> it back to UTF-8 afterwards.
>

That is a pretty neat idea. For some value of "simple", I suppose. :-)
Of course, this workaround might break in new and interesting ways once
what's in the files is no longer strictly limited to two-byte 

Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-11 Thread Raul Miller
On Mon, Jun 17, 2019 at 4:22 AM Mogens Jensen
 wrote:
> Even after many tries, I have not yet been able to corrupt the
> filesystem so fsck cannot repair it without manual intervention.
> However, if power is removed  while the 'reorder_kernel' script runs,
> the system will become completely unbootable. I could do this multiple
> times.

Given that file system corruption in these cases is more likely with
some hardware and less likely with other hardware, it might be
interesting to know what you were using.

Granted, this kind of information might be inadequate - there are too
many choices and too many challenges. But even hints are probably
better than nothing.

Thanks,

-- 
Raul



Re: [solved]: vi: How to display German umlauts?

2024-07-11 Thread Michael Hekeler
Dear Anon Loli:

> (...)
> software should be free, and non-personal information should be free,
> too, without any IP or a requirement for a file "LICENSE".. those are
> just my 2 cents..

if you don't say something about using or redisributing your software or
code then nobody knows and noone can be sure if its allowed to do this
or that.
Just to make it clear for everyone you can give a statement about these
topics.
A good place for this statement is to include a file and call it
LICENSE.


> (...), would you use a open source peace of software that in the README
> says "you can use it for whatever you want with no strings attached,
> and that's it

In the end it is your decision. Whether you want to hide the text
down in the README or something else. 
If you are the creator, it's your work and your rules apply.



> I'm not sure about the license thought... as I despise licenses and even 
> having
> a copyleft license like CC is getting on my nerves, ...

creative commons (CC) recommend against using their licenses
for software.
Very similar to most Creative Commons licenses are Permissive software
licenses (e.g. Apache 2.0 License or MIT License)
But here again: if it is your work then you decide the ways share your work.  




Re: Running OpenBSD on a VPS.

2024-07-11 Thread Kirill A . Korinsky
On Thu, 11 Jul 2024 03:10:43 +0100,
Christian Schulte  wrote:
> 
> Running OpenBSD since then personally. Never had a chance to install it
> to a server, because the providers did not support it. Now they do.

Not all of them. Special in case like Hetzner, online.net and similar one.

But they allow to load the server from rescue mode with some linux, what
opens a kind of backdoor where you run QEMU to install OpenBSD :)

You may achive some kind of semi-automatic installation with answer files,
but QEMU uses only tftp-server-name which support was removed at 7.0, so,
semi-automatic installation via QEMU works for OpenBSD up to 6.9.

-- 
wbr, Kirill



Re: smtpd warn: not enough disk space

2024-07-11 Thread Christian Schulte




On 09.07.24 11:16, Stuart Henderson wrote:

On 2024-07-09, Christian Schulte  wrote:

For example: Just
remove the patches in this directory - well a lot of them - and see how
those GNU folks have turned into complete idiots. I don't get it.

https://github.com/openbsd/ports/tree/master/devel/gettext/patches


A lot of those patches are to avoid triggering warnings from ld when
linking other programs which use the gettext library due to the
api warnings openbsd has for some libc functions.




Of course they do. And there is a reason they do. This goes back to me 
running i386 instead of amd64 due to RAM constraints and using the gnome 
desktop environment, which makes heavy use of gettext. gettext authors 
have just sped up those functions, because they noticed themselves, that 
they are called way to often. Then those patches removed those speed ups 
uncovering those design flaws. Of course they noticed this themselves. 
They never rethought design decisions. Install i386 with a gnome desktop 
environment. So slow. Rebuild gettext wihtout some of those patches 
removing those speed ups. There you go. It's so noticeable and it's not 
those patches to blame. That's what I meant with "avoid hotspots" rather 
than trying to make them run faster. That's theire philosophy. And that 
is just wrong.




Re: vi: How to display German umlauts?

2024-07-10 Thread Crystal Kolipe
On Thu, Jul 11, 2024 at 04:25:33AM +0100, ropers wrote:
> It's long been a secret wishlist item for me to solicit/reach agreement on
> which 256 (possibly 512) code points might merit inclusion in a minimal

There is already preliminary support for propper UTF-8 handling in the
framebuffer console on OpenBSD.  It's still buggy, but work is on-going.

Regarding the OP's specific question - if the files being edited only
contain those specific UTF-8 sequences and are otherwise plain ASCII text,
then a simple work-around might be a script that replaces each two-byte
sequence with the corresponding ISO-8859-1 character, writes that to a
temporary file, invokes vi for editing the temporary file, then converts
it back to UTF-8 afterwards.



Re: ripd processes not exchanging routing tables

2024-07-10 Thread jrmu
Greetings,

> This looks strange to me. You do something here that is putting you in the
> warranty void bucket. Please configure your interfaces properly. Do not
> play games by injecting route commands to install cloning routes for a
> different network.
> 
> In short make sure that vport11 and vio0 share a common subnet and can
> talk directly to each other. After that ripd may actually work as well.

Thank you, this was the cause. I updated the configuration so that the
interfaces were in the same subnet, and now it works!

I documented it here:

https://wiki.ircnow.org/index.php?n=Ripd.Configure

Thanks so much for the help.

-- 
jrmu
IRCNow (https://ircnow.org)



Re: smtpd warn: not enough disk space

2024-07-10 Thread Christian Schulte



On 09.07.24 11:18, Stuart Henderson wrote:

On 2024-07-09, Christian Schulte  wrote:



On 07.07.24 03:51, Jeremy Evans wrote:

On Fri, Jul 5, 2024 at 9:16 PM Christian Schulte mailto:schulte...@gmail.com>> wrote:

 Just wondering how the postgresql
 port is configured. Really should setup quotas automatically when
 pkg_adding in a way, just to ensure, that no one ever runs into a
 situation, that there is no way out of a disk full situation.


The port can't sanely do that, because it doesn't know how the admin
has configured their system.

Also, openbsd doesn't enable filesystem quotas by default.


I did not criticize the postgresql port in any way. I am just
suggesting, that when you want to setup a postgresql server in a
fire-and-forget way of things, it would be cool to restrict it from
eating up all available storage.


That is simple, use a separate filesystem for /var/postgresql.



Indeed. This is what my provider provided me with. Watch out for the 
mount point of /. This would not have been a problem, if postgresql 
would be able to reclaim diskspace without requiring disk space to do 
so. This is what you get, for not taking care of yourself and blindly 
relying on others to provide you with sane defaults. Was it really my 
fault? Maybe. A simple warning message during install of postgresql 
about what issue might I run into would have been - hmm - nice.


sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs 
(rw,nosuid,relatime,size=8168948k,nr_inodes=2042237,mode=755,inode64)
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs 
(rw,nosuid,nodev,noexec,relatime,size=1637608k,mode=755,inode64)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs 
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs 
(rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 
(rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs 
(rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=2495)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl 
(rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs 
(ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysctl.service type ramfs 
(ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs 
(ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/sda1 on /boot type ext4 (rw,noatime)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs 
(ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs 
(rw,nosuid,nodev,relatime,size=1637604k,nr_inodes=409401,mode=700,uid=1000,gid=1000,inode64)


Re: vi: How to display German umlauts?

2024-07-10 Thread ropers
On Mon, 8 Jul 2024 at 19:05,  wrote:

> OpenBSD 7.5: In my vi, German umlauts (diaeresis) are displayed as
> follows:
> Ä: \xc3\x84
> ä: \xc3\xa4
> Ö: \xc3\x96
> ö: \xc3\xb6
> Ü: \xc3\x9c
> ü: \xc3\xbc
>
> These strings appear to consist of 2 character groups, as pressing `x`
> 2 times deletes the complete string.
>
> In man vi(1), I couldn't find anything concerning the file encoding,
>

Just because of the way you put that, and at the peril of dumbsplaining
Unicode to someone who--generally speaking--quite possibly knows much more
than yours truly:
What vi(1) displays there are (the hex equivalents of) UTF-8 code units.
Whenever old vi(1) Can't Even, it will barf hex, but treat each hex-barf
byte as a separate character, even when--as here--the two bytes are but one
character. Dunning-Kruger applies: Old vi(1) is ignorant of UTF-8
multi-byte characters and unaware of it.

In case you are not familiar with the difference between code points and
code units, and how to convert from the former to the latter (and vice
versa), Graham Douglas has you covered. This page is an excellent resource
and might help you wrap your head around that:
http://www.readytext.co.uk/?p=1284

Code points and code units used to be identical in ye olde extended ASCII
code pages (like ISO-8859-1, Windows-1252, CP437, etc.), so there weren't
even any of these special terms for them back in the day. They were all
just the chars in some 256-character charset. However, you're prolly not in
Kansas, and they're not identical in most Unicode formats anymore.
(Reaching agreement on whether they are to be considered identical in
UTF-32, and whether that might mean UTF-32 technically isn't even really a
*transformation* format is left as an exercise for interested--if not
pugilant--readers.)
In the variable-width and frequently multi-byte 8-bit Unicode
transformation format UTF-8, code points (U+ thru U+10) can be
transformed into anything from one (barely *transformed*, as before)
through four 8-bit byte code units. This is done for efficient and ASCII
backwards-compatible storage (encoding).
Your uppercase A umlaut (LATIN CAPITAL LETTER A WITH DIAERESIS) in code
unit form can thus be turned back into its code point form:
C3  84
1100 0011  1000 0100 <-- strip leading (110) and continuation byte prefixes
(10)
0 0011  00 0100 <-- reformat what remains
000  1100 0100 <-- left-fill with zeroes for complete bytes
   1100 0100
00  C4
de-rigueur U+ notation: U+00C4

The umlauts are displayed correctly in xterm.
>

It's long been a secret wishlist item for me to solicit/reach agreement on
which 256 (possibly 512) code points might merit inclusion in a minimal
Unicode subset which could then be used to make even ye olde text consoles
and console fonts on all the BSDs as Unicode-compatible as they can be.

a 256-character subset of UTF-8 > ISO-8859-1 on console

Hardware (VGA/BIOS) limitations mean only 256 (possibly 512) characters
could make the grade. However--due to personal reasons--I've long been out
of it, or rather--confession time--I never got *into* it with OpenBSD as
much as I always wanted and would have liked, so due to my never having
gotten to the point of "patch productivity", I didn't really even dare ask
others for something like that. If there's something like an open mike at
EuroBSDcon, and IFF they let me in without signing over my firstborn,
perhaps that might be a good place to raise such an issue anyway? Or maybe
even to elaborate and dumbsplain UTF-8 and the quirks and history of ASCII,
and why RFC 4648 is Considered Harmful, though I rather suspect most of the
audience would be way ahead of most of what I might have to say in
technical terms, so maybe not.

Ian


Re: Running OpenBSD on a VPS.

2024-07-10 Thread Christian Schulte




On 11.07.24 03:41, Geoff Steckel wrote:

On 7/10/24 20:40, Christian Schulte wrote:

Hello misc@,

 I understand I will need to setup a different system from scratch and 
replace various things (e.g. sendmail, milter-greylist, clamav-milter, 
spamass-milter, http, imap, etc.) with something else. I would really 
take the time to do it. Does OpenBSD support such a host? One fixed 
IPv4 and IPv6 address?


My web/mail server is on a VM and I literally have no idea what the host 
is!

It runs from os release (every 6 months) to os release.
IIRC it has 768Meg of (virtual) ram and 50GB (virtual) disk

The system comes with a core set of utilities and server programs
A mail and web server -might- need addons but they will work well out of 
the box.


I would *very* strongly recommend that you use the provided http and 
smtp servers
and any other ones that match your needs. The standard servers have been 
carefully audited

for security problems. The config files are -much- simpler than the
apache servers or legacy sendmail, etc. Many come already configured for 
a simple server or client.


Some of the milters are in the standard distribution or are in ports.

There are a lot of utilities and servers and... in ports. Thousands.
My imapd is from ports. It needs a tweak that I'll put in and submit 
Real Soon Now.

it does work quite well.

My setup has one IP4 address and a /64. I have a tunnel to my home network.

If you have VNC console access the half-yearly release update requires
"doas sysupgrade"
and afterwards
"doas package_add -u"
and you're done.
(doas is the sudo replacement - simple and easy to configure
IIRC it comes set up for group wheel or you remove a #)

The biggest downside is that the ports lag the "bleeding edge" by a year 
or a little more.
The core system maintainers are very conservative. The group is small 
and they concentrate
on the kernel and core utilities. There is a peripheral group of ports 
maintainers, etc.


a "ps a" shows about 20 daemons running. Many are split into 2 or more 
processes for
for security - one runs as root which configures and runs the others 
without privileges.


hth
Geoff Steckel
  good luck
  Geoff Steckel


It's like migrating the last 3 decades of your life to a new system. I 
knew that would hit me sometime in the future, when some commit made the 
a/c controller disappear back then. Fan controller stopped working after 
an update. And that was used to control air conditioning. Burn your 
basement, set your house on fire -> use linux.




Running OpenBSD since then personally. Never had a chance to install it 
to a server, because the providers did not support it. Now they do. 
Making a list of what I need to do will take an awful lot of time. For 
example, I would not want to install an apache http server, just because 
I need DAV support for subversion, file uploads during automated release 
processes and so on. So I understand how much effort it would take to 
e.g. enhance the default httpd in OpenBSD base to support all of that. 
Maybe no one wants that httpd to support such kind of things. What do I 
know? And that's just one example. We are talking months fulltime here 
already. This will need an awful lot of planning...and an awful lot of 
asking questions here on how to replace this and that form here and 
there with something the BSD way. Never had a single issue with OpenBSD 
since I installed it back in 2009. Not a single one ever since.


Regards.
--
Christian



Re: Running OpenBSD on a VPS.

2024-07-10 Thread deich...@placebonol.com
I've installed OpenBSD on a variety of inexpensive Linux KVM based virtual 
systems.  Sometimes I uploaded an OpenBSD iso, other virtual system providers 
needed me to provide an OpenBSD iso which was then made available from their OS 
drop down selection.  It just depends on the VSP.

diana 

On July 10, 2024 6:40:30 PM MDT, Christian Schulte  wrote:
>Hello misc@,
>
>please see attached a dmesq of a Linux VPS server. I talked to the provider 
>and got told that I can access the console usins VLC and can provide my own 
>iso images to install whatever OS I like. Does OpenBSD support this kind of 
>host system? 
SNIP

Running OpenBSD on a VPS.

2024-07-10 Thread Christian Schulte

Hello misc@,

please see attached a dmesq of a Linux VPS server. I talked to the 
provider and got told that I can access the console usins VLC and can 
provide my own iso images to install whatever OS I like. Does OpenBSD 
support this kind of host system? I would like to avoid any kind of 
experiments, because I would need to migrate a machine, I had installed 
Debian Woody on a long time ago and then just dist-upgraded whenever 
needed over the years. I just learnt the wonders of systemd and a really 
nifty out of memory killer not giving my application any chance to 
detect, that it is running out of memory, although it could handle that 
and ... #$!"§ ... tl;dr. I understand I will need to setup a different 
system from scratch and replace various things (e.g. sendmail, 
milter-greylist, clamav-milter, spamass-milter, http, imap, etc.) with 
something else. I would really take the time to do it. Does OpenBSD 
support such a host? One fixed IPv4 and IPv6 address?


Regards,
--
Christian[0.00] Linux version 6.1.0-22-amd64 (debian-ker...@lists.debian.org) 
(gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 
SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21)
[0.00] Command line: BOOT_IMAGE=/vmlinuz-6.1.0-22-amd64 
root=UUID=5efb3645-feed-412f-841d-4ddae853431f ro rootdelay=10 net.ifnames=0 
ixgbe.allow_unsupported_sfp=1 quiet
[0.00] BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0xbffdafff] usable
[0.00] BIOS-e820: [mem 0xbffdb000-0xbfff] reserved
[0.00] BIOS-e820: [mem 0xfeffc000-0xfeff] reserved
[0.00] BIOS-e820: [mem 0xfffc-0x] reserved
[0.00] BIOS-e820: [mem 0x0001-0x00043fff] usable
[0.00] NX (Execute Disable) protection: active
[0.00] SMBIOS 2.8 present.
[0.00] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[0.00] Hypervisor detected: KVM
[0.00] kvm-clock: Using msrs 4b564d01 and 4b564d00
[0.01] kvm-clock: using sched offset of 554415650994087 cycles
[0.05] clocksource: kvm-clock: mask: 0x max_cycles: 
0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[0.16] tsc: Detected 2794.748 MHz processor
[0.000861] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.000864] e820: remove [mem 0x000a-0x000f] usable
[0.000869] last_pfn = 0x44 max_arch_pfn = 0x4
[0.000924] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[0.000938] last_pfn = 0xbffdb max_arch_pfn = 0x4
[0.003801] found SMP MP-table at [mem 0x000f5a80-0x000f5a8f]
[0.003834] Using GB pages for direct mapping
[0.004071] RAMDISK: [mem 0x3451b000-0x36284fff]
[0.004094] ACPI: Early table checksum verification disabled
[0.004117] ACPI: RSDP 0x000F5880 14 (v00 BOCHS )
[0.004132] ACPI: RSDT 0xBFFE250D 34 (v01 BOCHS  BXPCRSDT 
0001 BXPC 0001)
[0.004143] ACPI: FACP 0xBFFE2399 74 (v01 BOCHS  BXPCFACP 
0001 BXPC 0001)
[0.004152] ACPI: DSDT 0xBFFE0040 002359 (v01 BOCHS  BXPCDSDT 
0001 BXPC 0001)
[0.004156] ACPI: FACS 0xBFFE 40
[0.004158] ACPI: APIC 0xBFFE240D A0 (v01 BOCHS  BXPCAPIC 
0001 BXPC 0001)
[0.004163] ACPI: HPET 0xBFFE24AD 38 (v01 BOCHS  BXPCHPET 
0001 BXPC 0001)
[0.004166] ACPI: WAET 0xBFFE24E5 28 (v01 BOCHS  BXPCWAET 
0001 BXPC 0001)
[0.004168] ACPI: Reserving FACP table memory at [mem 0xbffe2399-0xbffe240c]
[0.004169] ACPI: Reserving DSDT table memory at [mem 0xbffe0040-0xbffe2398]
[0.004170] ACPI: Reserving FACS table memory at [mem 0xbffe-0xbffe003f]
[0.004171] ACPI: Reserving APIC table memory at [mem 0xbffe240d-0xbffe24ac]
[0.004172] ACPI: Reserving HPET table memory at [mem 0xbffe24ad-0xbffe24e4]
[0.004173] ACPI: Reserving WAET table memory at [mem 0xbffe24e5-0xbffe250c]
[0.004545] No NUMA configuration found
[0.004547] Faking a node at [mem 0x-0x00043fff]
[0.004556] NODE_DATA(0) allocated [mem 0x43ffd5000-0x43fff]
[0.004933] Zone ranges:
[0.004938]   DMA  [mem 0x1000-0x00ff]
[0.004940]   DMA32[mem 0x0100-0x]
[0.004942]   Normal   [mem 0x0001-0x00043fff]
[0.004943]   Device   empty
[0.004944] Movable zone start for each node
[0.004948] Early memory node ranges
[0.004948]   node   0: [mem 0x1000-0x0009efff]
[

Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Kenneth Gober
On Wed, Jul 10, 2024 at 9:45 AM Tom Smyth 
wrote:

> are there other directories that contain files that regularly change
> that should be mfs mounted ?
>

Logs for cron go into /var/cron by default. This can be changed by modifying
/etc/syslog.conf, but if you do this don't forget to update
/etc/newsyslog.conf
as well.

-ken


Re: Packet filter can't NAT devices 2 hops away?

2024-07-10 Thread Tom Smyth
Hi
Can you do a packet capture on the firewall and also closer to the 2
hops that don't work,

some ISPs / hotspots rewrite TTL to prevent a client Noting and
sharing the connection with someone else
tcpdump and have a look a the ttl field of packets in both direction
... the TTL is close to 1 that is probably your issue,




On Wed, 3 Jul 2024 at 20:49, jrmu  wrote:
>
> Greetings,
>
> I'm trying to get packet filter to provide NAT for a group of routers I
> set up as follows:
>
> R1 <--> Internet
>   10.1/16
> ^
> |
>veb12
> |
> R2  <--veb23-->  R3 <--veb35--> R5 10.5/16
>   10.2/16  10.3/16
>  ^  ^
>   \/
>  veb24/
> \   veb34
>  \  /
>   > R4 <
>   10.4/16
>
> At R1, I have this packet filter rule to perform NAT on packets going to the
> Internet:
>
> match out on egress from !(egress:network) to any nat-to (egress:0)
>
> When I run $ ping 1.1.1.1 from R2, packets are successfully NAT'd to the
> public IP address, and ping works.
>
> However, when I run $ ping 1.1.1.1 from any other node (R3, R4, or R5), the
> packets are sent to R1 but not properly NAT'd. Here is what I see when I run
> tcpdump on the egress interface:
>
> host# tcpdump -ne -i em1 'host 1.1.1.1'
> tcpdump: listening on em1, link-type EN10MB
> 14:34:25.531207 00:25:90:5a:2d:92 ac:1f:6b:fe:ca:98 0800 98: 10.5.3.1 > 
> 1.1.1.1: icmp: echo request
> 14:34:26.549336 00:25:90:5a:2d:92 ac:1f:6b:fe:ca:98 0800 98: 10.5.3.1 > 
> 1.1.1.1: icmp: echo request
> 14:34:27.549307 00:25:90:5a:2d:92 ac:1f:6b:fe:ca:98 0800 98: 10.5.3.1 > 
> 1.1.1.1: icmp: echo request
> 14:34:28.549275 00:25:90:5a:2d:92 ac:1f:6b:fe:ca:98 0800 98: 10.5.3.1 > 
> 1.1.1.1: icmp: echo request
>
> The ping from node R5 is properly routed to R1, and is being sent out the
> egress interface, but for some reason, R1 is not properly performing NAT. NAT
> seems only to work for devices directly connected to R1.
>
> I don't believe the issue is with routing, but in case it helps, here are the 
> relevant routing tables:
>
> Routing tables
>
> Internet:
> DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
> default104.167.241.193UGS   11  4606309 - 8 em1
> 224/4  127.0.0.1  URS0  175 32768 8 lo0
> 10/8   10.2.1.1   UGS05 - 8 
> vport11
> 10.1/1610.1.2.1   UCn00 - 4 
> vport11
> 10.1.2.1   fe:e1:ba:dc:65:83  UHLl   0   13 - 1 
> vport11
> 10.1.255.255   10.1.2.1   UHb00 - 1 
> vport11
> 10.2.1.1   e8:8b:21:21:21:21  UHLch  1  347 - 7 
> vport11
> 10.2.1.1   link#154   UHCS   10 - 8 
> vport11
> 104.167.241.192/26 104.167.241.211UCn2  1412997 - 4 em1
> 104.167.241.193ac:1f:6b:fe:ca:98  UHLch  1   669180 - 3 em1
> 104.167.241.2108a:2c:1c:4a:15:f4  UHLc   0  1412439 - 3 em1
> 104.167.241.21100:25:90:5a:2d:92  UHLl   0   766416 - 1 em1
> 104.167.241.255104.167.241.211UHb0   449707 - 1 em1
> 127/8  127.0.0.1  UGRS   00 32768 8 lo0
> 127.0.0.1  127.0.0.1  UHhl   2  1707666 32768 1 lo0
>
> --
> jrmu
> IRCNow (https://ircnow.org)
>


-- 
Kindest regards,
Tom Smyth.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Hi Stuart I heard that no swap  stops dumps in the event of a panic

On Wed, 10 Jul 2024 at 21:46, Stuart Henderson
 wrote:
>
> On 2024-07-10, Tom Smyth  wrote:
> > I don't include a swap partition on the routers  in the field as I
> > don't want them swapping to disk, we over specify the hardware so that
> > memory exhaustion is (should be anyway)  not a concern.
>
> fwiw I don't know if they're (still? ever?) valid, but I've heard
> comments in the past that not having any swap can sometimes cause
> problems.
>
>


-- 
Kindest regards,
Tom Smyth.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Brian Conway
On Wed, Jul 10, 2024, at 3:49 PM, Crystal Kolipe wrote:
> On Wed, Jul 10, 2024 at 08:32:38PM -, Stuart Henderson wrote:
>> On 2024-07-10, Tom Smyth  wrote:
>> > I don't include a swap partition on the routers  in the field as I
>> > don't want them swapping to disk, we over specify the hardware so that
>> > memory exhaustion is (should be anyway)  not a concern.
>> 
>> fwiw I don't know if they're (still? ever?) valid, but I've heard
>> comments in the past that not having any swap can sometimes cause
>> problems.
>
> Yeah, we discussed it with Jan on -arm back in 2021:
>
> https://marc.info/?l=openbsd-arm=163500865502090=2

Thanks for the link. I ran into the same issue with swapless arm64 around the 
same time and didn't investigate it further. Apparently I missed that thread, 
probably because I don't usually read arm@.

I definitely never encountered it on swapless amd64, i386, octeon, or macppc 
(the latter two being in years long past).

Brian



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Crystal Kolipe
On Wed, Jul 10, 2024 at 08:32:38PM -, Stuart Henderson wrote:
> On 2024-07-10, Tom Smyth  wrote:
> > I don't include a swap partition on the routers  in the field as I
> > don't want them swapping to disk, we over specify the hardware so that
> > memory exhaustion is (should be anyway)  not a concern.
> 
> fwiw I don't know if they're (still? ever?) valid, but I've heard
> comments in the past that not having any swap can sometimes cause
> problems.

Yeah, we discussed it with Jan on -arm back in 2021:

https://marc.info/?l=openbsd-arm=163500865502090=2



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Crystal Kolipe
On Wed, Jul 10, 2024 at 03:29:47PM -0500, Brian Conway wrote:
> On Wed, Jul 10, 2024, at 2:48 PM, Tom Smyth wrote:
> > Hi Kirill,
> > I don't include a swap partition on the routers  in the field as I
> > don't want them swapping to disk, we over specify the hardware so that
> > memory exhaustion is (should be anyway)  not a concern.
> >
> > so im assuming the lack of a swap partition means that this would not
> > be an issue (in my deployment scenario)
> 
> That matches my experience.

If you're using X86 then lack of a swap partition shouldn't be an issue.
We've been running X86 machines in production without swap for many years.

On some non-X86 archs, (E.G. arm64), we have seen issues with having no swap
configured, even without memory exhaustion.  This has been discussed on the
lists before.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Stuart Henderson
On 2024-07-10, Tom Smyth  wrote:
> I don't include a swap partition on the routers  in the field as I
> don't want them swapping to disk, we over specify the hardware so that
> memory exhaustion is (should be anyway)  not a concern.

fwiw I don't know if they're (still? ever?) valid, but I've heard
comments in the past that not having any swap can sometimes cause
problems.




Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Stuart Henderson
On 2024-07-10, Marcus MERIGHI  wrote:
> Hello Tom, 
>
> tom.sm...@wirelessconnect.eu (Tom Smyth), 2024.07.10 (Wed) 18:40 (CEST):
>> swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
>> mfs:97883 on /var/log type mfs (asynchronous, local, nodev, noexec,
>>   nosuid, size=524288 512-blocks)
>
> as you do not save the logs, why not syslog "to an in-memory buffer that may 
> be
> read using syslogc(8)" (text taken from syslog.conf(5)?
>
> I have everything commented out in syslog.conf(5), except for: 
> *.* :256:full
>
> And in rc.conf.local(8):
> syslogd_flags=-s /var/run/syslogd.sock
>
> You can then read the logs with 
> $ syslogc -f full

That can be useful, but there are some gotchas. For example you can't
use syslogc twice at the same time.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Brian Conway
On Wed, Jul 10, 2024, at 2:48 PM, Tom Smyth wrote:
> Hi Kirill,
> I don't include a swap partition on the routers  in the field as I
> don't want them swapping to disk, we over specify the hardware so that
> memory exhaustion is (should be anyway)  not a concern.
>
> so im assuming the lack of a swap partition means that this would not
> be an issue (in my deployment scenario)

That matches my experience.

Brian Conway
Owner
RCE Software, LLC



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Hi Kirill,
I don't include a swap partition on the routers  in the field as I
don't want them swapping to disk, we over specify the hardware so that
memory exhaustion is (should be anyway)  not a concern.

so im assuming the lack of a swap partition means that this would not
be an issue (in my deployment scenario)


Thanks
Tom Smyth

On Wed, 10 Jul 2024 at 18:39, Kirill A. Korinsky  wrote:
>
> On Wed, 10 Jul 2024 17:40:17 +0100,
> Tom Smyth  wrote:
> >
> > swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144 0 0
> > swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 > > 0
> > swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 > > 0
> > swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> >
>
> I'd like to share https://marc.info/?l=openbsd-bugs=171959901216119=2
>
> Here I have a pretty simple way to block mfs when the system starts to use 
> swap.
>
> Not sure if it is achievable by you, but still worth mentioning
>
> --
> wbr, Kirill



-- 
Kindest regards,
Tom Smyth.



Re: Building Rust program with libreSSL on a --current machine

2024-07-10 Thread Stefan Kreutz
Some crates provide optional support for rustls as an alternative to
openssl. Take a look at the Cargo.toml for corresponding feature flags.

On Wed, Jul 10, 2024 at 02:47:36PM GMT, Rob Schmersel wrote:
> Hi,
> 
> Looking for advice on how one can build rust programs that require
> openSSL support on OpenBSD -current
> 
> No matter what I try I keep coming back to errors like:
> 
>  cargo:libressl_version_number=309f
> 
>   --- stderr
>   thread 'main' panicked at
>   
> /home/lobo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.96/build/main.rs:334:5:
> 
> 
>   This crate is only compatible with OpenSSL (version 1.0.1 through
>   1.1.1, or 3), or LibreSSL 2.5 through 3.8.1, but a different version
>   of OpenSSL was found. The build is now aborting due to this version
>   mismatch.
> 
> Or is it better to ask this on ports@?
> 
> BR/Rob
> 



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Marcus MERIGHI
Hello Tom, 

tom.sm...@wirelessconnect.eu (Tom Smyth), 2024.07.10 (Wed) 18:40 (CEST):
> swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
> mfs:97883 on /var/log type mfs (asynchronous, local, nodev, noexec,
>   nosuid, size=524288 512-blocks)

as you do not save the logs, why not syslog "to an in-memory buffer that may be
read using syslogc(8)" (text taken from syslog.conf(5)?

I have everything commented out in syslog.conf(5), except for: 
*.* :256:full

And in rc.conf.local(8):
syslogd_flags=-s /var/run/syslogd.sock

You can then read the logs with 
$ syslogc -f full

Marcus

> On Wed, 10 Jul 2024 at 17:07, Tom Smyth  wrote:
> >
> > Hi Kirill,
> > Ill give sync a go ... and see how  it impacts performance...
> > thanks for the suggestion,
> >
> > On Wed, 10 Jul 2024 at 16:30, Kirill A. Korinsky  wrote:
> > >
> > > On Wed, 10 Jul 2024 14:44:28 +0100,
> > > Tom Smyth  wrote:
> > > >
> > > > #cat /etc/fstab
> > > >
> > > > ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> > > > ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> > > > ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
> > > > swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> > > > swap /var/log mfs 
> > > > rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
> > > > swap /var/run mfs 
> > > > rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
> > > > swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> > > >
> > >
> > > You can dramatically reduce the probability of errors that can't be fixed 
> > > by
> > > fsck on boot by adding sync. Especially with noatime, this seems like a
> > > bulletproof setup.
> > >
> > > --
> > > wbr, Kirill
> >
> >
> >
> > --
> > Kindest regards,
> > Tom Smyth.
> 
> 
> 
> -- 
> Kindest regards,
> Tom Smyth.
> 



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Kirill A . Korinsky
On Wed, 10 Jul 2024 17:40:17 +0100,
Tom Smyth  wrote:
> 
> swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144 0 0
> swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
> swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
> swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> 

I'd like to share https://marc.info/?l=openbsd-bugs=171959901216119=2

Here I have a pretty simple way to block mfs when the system starts to use swap.

Not sure if it is achievable by you, but still worth mentioning

-- 
wbr, Kirill



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Thanks Kirill and Jan,
based on your feedback dropped pointless persist on /tmp (which is
cleared on startup anyway)   (ill check permissions (now that I think
of it ...)
updated fstab now
cat /etc/fstab
ff0023511d131fc2.a / ffs rw,sync,noatime 1 1
ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,sync,noatime 1 2
ff0023511d131fc2.d /var ffs rw,nodev,nosuid,sync,noatime 1 2
swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144 0 0
swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0


mount output
/dev/sd0a on / type ffs (local, noatime, synchronous)
/dev/sd0b on /usr/local type ffs (local, noatime, nodev, wxallowed, synchronous)
/dev/sd0d on /var type ffs (local, noatime, nodev, nosuid, synchronous)
mfs:95138 on /tmp type mfs (asynchronous, local, nodev, noexec,
nosuid, size=262144 512-blocks)
mfs:97883 on /var/log type mfs (asynchronous, local, nodev, noexec,
nosuid, size=524288 512-blocks)
mfs:12839 on /var/run type mfs (asynchronous, local, nodev, noexec,
nosuid, size=262144 512-blocks)
mfs:77475 on /dev type mfs (asynchronous, local, noexec, nosuid,
size=32768 512-blocks)


Thanks again

On Wed, 10 Jul 2024 at 17:07, Tom Smyth  wrote:
>
> Hi Kirill,
> Ill give sync a go ... and see how  it impacts performance...
> thanks for the suggestion,
>
> On Wed, 10 Jul 2024 at 16:30, Kirill A. Korinsky  wrote:
> >
> > On Wed, 10 Jul 2024 14:44:28 +0100,
> > Tom Smyth  wrote:
> > >
> > > #cat /etc/fstab
> > >
> > > ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> > > ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> > > ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
> > > swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> > > swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 
> > > 0 0
> > > swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 
> > > 0 0
> > > swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> > >
> >
> > You can dramatically reduce the probability of errors that can't be fixed by
> > fsck on boot by adding sync. Especially with noatime, this seems like a
> > bulletproof setup.
> >
> > --
> > wbr, Kirill
>
>
>
> --
> Kindest regards,
> Tom Smyth.



-- 
Kindest regards,
Tom Smyth.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Hi Kirill,
Ill give sync a go ... and see how  it impacts performance...
thanks for the suggestion,

On Wed, 10 Jul 2024 at 16:30, Kirill A. Korinsky  wrote:
>
> On Wed, 10 Jul 2024 14:44:28 +0100,
> Tom Smyth  wrote:
> >
> > #cat /etc/fstab
> >
> > ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> > ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> > ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
> > swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> > swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 > > 0
> > swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 > > 0
> > swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> >
>
> You can dramatically reduce the probability of errors that can't be fixed by
> fsck on boot by adding sync. Especially with noatime, this seems like a
> bulletproof setup.
>
> --
> wbr, Kirill



-- 
Kindest regards,
Tom Smyth.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Hi Jan
thanks for your Reply and feedback,
 please find my replies  in line ,

On Wed, 10 Jul 2024 at 16:28, Jan Stary  wrote:
>
> On Jul 10 14:44:28, tom.sm...@wirelessconnect.eu wrote:
> > we have been using  mfs mounted /var /dev and /tmp for years
>
> Why?
so any writes to disk would be simply written a memory filesystem and
if  there was a power cut there would be no changes happening to the
disk because it is being just written to memory


>
> > however  the impact of mfs (/var in particular) on upgrades has been
> > quite painful,
>
> How?
Losing new files in /var if the box is rebooted without first copying
the /var (in memory) to where the persistent storage is  (on shutdown)


>
> > my latest iteration for fstab is to  have
> >  / ,  /var /usr/local  and /tmp with different mount points to support
> > different mount options, (wxallowed for /usr/local)
> >
> > and to
> > mfs mount  /var/run,  /var/logs  /dev and /tmp
>
> I assume you mean /var/log (not /var/logs).
Yes (sorry )
>
> > #cat /etc/fstab
> >
> > ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> > ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> > ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
>
> So you _don't_ have /var on mfs ...
> Also, softdep no loger exists.
Thanks  it was an older option (now a noop (for backward compatibility
) just checked the manual there...  Ill drop it off the deployment
script



>
> > swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> > swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 > > 0
> > swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 > > 0
> > swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
>
> Why do you need /tmp to persist?
Fair point  I was more interested in getting /tmp to be memory mounted
(dont care about persistence) in that case
checking manual

> Why do you have a separate /dev?
when programs write to /dev/blah  is there a possibility of the
filesystem being updated...


> Why don't you have a separate /home?
it is a router /firewall / network appliance  /not a standard desktop
/ server ...  users are admins... etc .
>
> > ###
> > This seems to solve problems with  upgrades and  package updates,
basically if the partition was not synced with a copy on shutdown you
would lose the updated files ...

>
> What problem?


>
> Jan
>


-- 
Kindest regards,
Tom Smyth.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Kirill A . Korinsky
On Wed, 10 Jul 2024 14:44:28 +0100,
Tom Smyth  wrote:
> 
> #cat /etc/fstab
> 
> ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
> swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
> swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
> swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0
> 

You can dramatically reduce the probability of errors that can't be fixed by
fsck on boot by adding sync. Especially with noatime, this seems like a
bulletproof setup.

-- 
wbr, Kirill



Re: Building Rust program with libreSSL on a --current machine

2024-07-10 Thread Stuart Henderson
On 2024-07-10, Rob Schmersel  wrote:
> Hi,
>
> Looking for advice on how one can build rust programs that require
> openSSL support on OpenBSD -current
>
> No matter what I try I keep coming back to errors like:
>
>  cargo:libressl_version_number=309f
>
>   --- stderr
>   thread 'main' panicked at
>   
> /home/lobo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.96/build/main.rs:334:5:
>
>
>   This crate is only compatible with OpenSSL (version 1.0.1 through
>   1.1.1, or 3), or LibreSSL 2.5 through 3.8.1, but a different version
>   of OpenSSL was found. The build is now aborting due to this version
>   mismatch.
>
> Or is it better to ask this on ports@?
>
> BR/Rob


This is handled automatically for things in ports using the framework
you get with MODULES=devel/cargo.

Otherwise you will need to patch openssl-sys-*/build/main.rs to
loosen the version check.


-- 
Please keep replies on the mailing list.



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Jan Stary
On Jul 10 14:44:28, tom.sm...@wirelessconnect.eu wrote:
> we have been using  mfs mounted /var /dev and /tmp for years

Why?

> however  the impact of mfs (/var in particular) on upgrades has been
> quite painful,

How?

> my latest iteration for fstab is to  have
>  / ,  /var /usr/local  and /tmp with different mount points to support
> different mount options, (wxallowed for /usr/local)
> 
> and to
> mfs mount  /var/run,  /var/logs  /dev and /tmp

I assume you mean /var/log (not /var/logs).

> #cat /etc/fstab
> 
> ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
> ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
> ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2

So you _don't_ have /var on mfs ...
Also, softdep no loger exists.

> swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
> swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
> swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
> swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0

Why do you need /tmp to persist?
Why do you have a separate /dev?
Why don't you have a separate /home?

> ###
> This seems to solve problems with  upgrades and  package updates,

What problem?

Jan



Re: Filesystem corruption on OpenBSD routers after power outage?

2024-07-10 Thread Tom Smyth
Folks,
sorry to revive an old thread but for OpenBSD Routers in the Field
(where power availability and graceful shutdown / restarts are far
from guaranteed,

we have been using  mfs mounted /var /dev and /tmp for years and it
has been quite successful (a few hundred devices running for a few
years)
and only 1 or 2 failures (attributable to filesystem issues) in that time.

 however  the impact of mfs (/var in particular) on upgrades has been
quite painful,
my latest iteration for fstab is to  have
 / ,  /var /usr/local  and /tmp with different mount points to support
different mount options, (wxallowed for /usr/local)

and to
mfs mount  /var/run,  /var/logs  /dev and /tmp

#cat /etc/fstab

ff0023511d131fc2.a / ffs rw,softdep,noatime 1 1
ff0023511d131fc2.b /usr/local ffs rw,wxallowed,nodev,softdep,noatime 1 2
ff0023511d131fc2.d /var ffs rw,nodev,nosuid,softdep,noatime 1 2
swap /tmp mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/tmp 0 0
swap /var/log mfs rw,nosuid,noexec,nodev,-s=524288,-P=/persist-fs/var/log 0 0
swap /var/run mfs rw,nosuid,noexec,nodev,-s=262144,-P=/persist-fs/var/run 0 0
swap /dev mfs rw,nosuid,noexec,-P=/persist-fs/dev,-i=2048,-s=32768 0 0

###
This seems to solve problems with  upgrades and  package updates,

I have left /var/www/logs/  out as we are not using httpd /
webservices  on the boxes in the field

are there other directories that contain files that regularly change
that should be mfs mounted ?


Any thoughts / feedback welcome

Thanks
Tom Smyth



On Sun, 15 Mar 2020 at 15:26, Maurice McCarthy  wrote:
>
> There is a discussion about sofdeps here
> http://openbsd-archive.7691.n7.nabble.com/What-are-the-disadvantages-of-soft-updates-td264283.html
>


-- 
Kindest regards,
Tom Smyth.



Building Rust program with libreSSL on a --current machine

2024-07-10 Thread Rob Schmersel
Hi,

Looking for advice on how one can build rust programs that require
openSSL support on OpenBSD -current

No matter what I try I keep coming back to errors like:

 cargo:libressl_version_number=309f

  --- stderr
  thread 'main' panicked at
  
/home/lobo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.96/build/main.rs:334:5:


  This crate is only compatible with OpenSSL (version 1.0.1 through
  1.1.1, or 3), or LibreSSL 2.5 through 3.8.1, but a different version
  of OpenSSL was found. The build is now aborting due to this version
  mismatch.

Or is it better to ask this on ports@?

BR/Rob



Re: Offline syspatch

2024-07-10 Thread jonathon575
Thank you Ken. Highly appreciated.

John

On Wednesday, July 3rd, 2024 at 1:12 PM, Kenneth Gober  wrote:

> On Sat, Jun 29, 2024 at 3:29 AM jonathon575  
> wrote:
>
>> For the current release 7.5, specifically for security patches, if we 
>> downloaded the security patches located at any of the mirror links, for 
>> example,
>>
>> https://mirror.hs-esslingen.de/pub/OpenBSD/syspatch/7.5/amd64/
>>
>> manually verified the signature with signify, then changed the online path 
>> under /etc/installurl to point to the usb/location that contains the 
>> downloaded security patch files, and then executed the command syspatch, 
>> usually, the security patch files gets pulled from the pointed physical 
>> location and gets updated, however, my question is, would that be sufficient 
>> for patching the system, or do we actually have to compile from source and 
>> include the security patch files in the compilation process?
>
> It is my understanding that it will work as you desire. Modifying 
> /etc/installurl allows you to specify which mirror you want to download from, 
> and if you choose to maintain your own private mirror with only a subset of 
> files you can do so. Note that, iirc, /etc/installurl should point to a 
> directory that contains a "syspatch" subdirectory which contains a "7.5" 
> subdirectory, etc. Do not point /etc/installurl directly at the folder 
> containing the syspatch files, point it at the root under which you are 
> mirroring the structure of an official mirror. Your private mirror can 
> contain releases, patches and syspatches for multiple versions and 
> architectures, and the directory structure is needed to keep those things 
> separated and locatable.
>
> -ken

Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread Страхиња Радић
Дана 24/07/09 07:00PM, Anon Loli написа:
> > All that's missing is the URL to the source code of that wonderful
> > editor... if it exists at all.
> > 
> 
> It's currently offline, off the internet, as far as I know, it was last hosted
> on my eepsite, but circumstances mandated that I had to take down the epsite
> because the site was outdated and insecure due to the circumstances
> It's not usable and probably won't be as beautiful as Neatvi or Arab-friendly

Right... "circumstances". How convenient.

By the way, this function:

sourcesize()
{
find . -name '*.[ch]' -exec wc -l {} \; |
awk '{
size = $1
f = $2
sum += size
printf "%10d %s\n", size, f
}
END{
printf "%10d total\n", sum
}'
}

gives

550599 total

when run in the root of Vim's repository. Aside from being a rough
estimate (it doesn't distinguish comment lines from real code), that
includes X11 code and various other features which could be opted out.

Anyway, vis[1] (vise(1) in OpenBSD: `pkg_add vis`) has some of the
functionality I mentioned earlier, and supports Unicode. The above 
function gives

 28927 total

for vis.

[1]: https://github.com/martanne/vis



Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread Anon Loli
On Tue, Jul 09, 2024 at 08:20:53PM +0200, Страхиња Радић wrote:
> Дана 24/07/09 04:02PM, Anon Loli написа:
> > That's why I use vi, and am working on my own text editor.. I don't know if
> > it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code 
> > base
> > and Vim-like features (only most useful ones, the rest would be in a
> > patch-form, like suckless.org has)
> > Also when I said "am working", it's more like "was working and will work on 
> > it
> > again", but I have a problem right now which has paused my programming 
> > life...
> > I'm working on it
> > If you're interested, perhaps one day you'll want to test it out..
> 
> All that's missing is the URL to the source code of that wonderful
> editor... if it exists at all.
> 

It's currently offline, off the internet, as far as I know, it was last hosted
on my eepsite, but circumstances mandated that I had to take down the epsite
because the site was outdated and insecure due to the circumstances
It's not usable and probably won't be as beautiful as Neatvi or Arab-friendly

I'm hesitant to upload it anywhere before I setup my site.. I want to have SOME
reputaiton or something, and for that I need my website back online
When I put it back online, I'm thinking about making it something similar to
cGit, but without git, instead my own version control system and stuff...
Ideally I'd want my site written in C, and since it would be minimalistic, that
should be easy

TLS/SSL is replaced/handled by I2P so one less thing to worry about



Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread Страхиња Радић
Дана 24/07/09 04:02PM, Anon Loli написа:
> That's why I use vi, and am working on my own text editor.. I don't know if
> it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base
> and Vim-like features (only most useful ones, the rest would be in a
> patch-form, like suckless.org has)
> Also when I said "am working", it's more like "was working and will work on it
> again", but I have a problem right now which has paused my programming life...
> I'm working on it
> If you're interested, perhaps one day you'll want to test it out..

All that's missing is the URL to the source code of that wonderful
editor... if it exists at all.



Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread Anon Loli
On Tue, Jul 09, 2024 at 06:36:46PM +0200, prx wrote:
> 
> 
> Le 9 juillet 2024 18:02:31 GMT+02:00, Anon Loli  a 
> écrit :
> >On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote:
> >> Dear Страхиња Радић,
> >> dear Jan,
> >> dear Christian
> >> 
> >> Thanks a lot for your prompt and helpful answers!
> >> 
> >> ---
> >> Am 2024-07-08 20:35, schrieb Страхиња Радић:
> >> > vi lacks a lot of built-in quality of life features that Vim has.
> >> 
> >> Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to
> >> stick to the base install as close as possible.
> >> 
> >> ---
> >> Am 2024-07-08 21:05, schrieb Jan Stary:
> >> > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote:
> >> > > As I'd rather not switch to vim, I'd be very grateful for any tips
> >> > > concerning the display of umlauts in vi.
> >> > 
> >> > vi can't do it.
> >> 
> >> Thanks for confirming, Jan!
> >> 
> >> ---
> >> Am 2024-07-08 22:07, schrieb Christian Weisgerber:
> >> > There's a port and package of nvi-2.2.1, which is a close relative
> >> > of the base system nvi that has been extended with wide character
> >> > support.
> >> 
> >> I have just installed nvi, and the umlauts are displayed correctly.
> >> Many thanks for this tip!
> >> 
> >> ---
> >> I'm very grateful for the help misc@openbsd.org offers. A big thank
> >> you to all the list contributors - and of course to all the contributors
> >> and committers of OpenBSD itself. My family and I are very happy
> >> to be able to use it for our daily home office work.
> >> 
> >> Best regards
> >> 
> >> Rolf
> >> 
> >> 
> >> 
> >> 
> >
> >Once upon a time I decided to take a look at Vim source code
> >I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what
> >the fuck?
> >Do you know how much 700k of SLOC is?
> >Terry Davis made a reasonably good OS in just 100k of SLOC!
> >Very easy to hide malicious stuff like the backdoor that was in xz!
> >
> >That's why I use vi, and am working on my own text editor.. I don't know if
> >it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base
> >and Vim-like features (only most useful ones, the rest would be in a
> >patch-form, like suckless.org has)
> >Also when I said "am working", it's more like "was working and will work on 
> >it
> >again", but I have a problem right now which has paused my programming 
> >life...
> >I'm working on it
> >If you're interested, perhaps one day you'll want to test it out..
> >
> >I'm not sure about the license thought... as I despise licenses and even 
> >having
> >a copyleft license like CC is getting on my nerves, software should be free,
> >and non-personal information should be free, too, without any IP or a
> >requirement for a file "LICENSE".. those are just my 2 cents..
> >It's a little more complicated than that, let's just say that I don't want
> >being required to specify a LICENSE file... I'm just curious about the
> >consequences, would you use a open source peace of software that in the 
> >README
> >says "you can use it for whatever you want with no strings attached, and 
> >that's
> >about it."?
> >
> >I'm probably rambling needlessly again, that's why none care about what I say
> >
> 
> Maybe look at neatvi:
> => https://github.com/aligrudi/neatvi
> 
> Even if I still prefer nvi and its soft wrapping.
> 
> 

Oh, wow!
That looks hella impressive!
My text editor which is ALMOST functional (you can view and go up/down, but not
edit files yet, text is in buffer), and is like 600 SLOC, where Neatvi is 8000
SLOC...
But my editor doesn't have proper UTF-8 support, highlighting, any real
advanced functions, right-left support or those things found in kmap.h,
DIGRAPHS.
OK, I'm kindof lying when I say it has no highlighting, the cursor is
highlighted, and if we're talking escape sequences, that part should be easy
and like 50SLOC, depending on language and what-not
And the developer of Neatvi seems to be much more advanced than myself, in C.

I'm definitely giving Neatvi a try, after checking out it's source code thank
you, very much!
I still think that I'll make my own thing, I already learnt a whole lot, like
techinques for managing arrays/buffers by which I mean memory, which can be
useful like everywhere

I think that ANY project can be beneficial for the skill/experience
Like I never worked with hexidecimal or whatever 0x7f is

>>> actually checking out the source code mid-email
Dude advanced poll(2) code? Fuck yeah!
It's a little sad that by default C PL doesn't highlight for (u)int8-64.. but
for Go it does that lol..

Also I'm not sure how safe it is when it comes to handling escape sequences,
but I bet that the developer thought of that, he seems advanced
I also realize that there's a ton of string manipulation, and the program
manages command queries and stuff, it could easily somehow have a command that
runs something malicious
Honestly I don't even know what I'm looking for... I doubt it'd do a `rm -Rf
~/*` lol and for networking 

Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread prx



Le 9 juillet 2024 18:02:31 GMT+02:00, Anon Loli  a 
écrit :
>On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote:
>> Dear Страхиња Радић,
>> dear Jan,
>> dear Christian
>> 
>> Thanks a lot for your prompt and helpful answers!
>> 
>> ---
>> Am 2024-07-08 20:35, schrieb Страхиња Радић:
>> > vi lacks a lot of built-in quality of life features that Vim has.
>> 
>> Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to
>> stick to the base install as close as possible.
>> 
>> ---
>> Am 2024-07-08 21:05, schrieb Jan Stary:
>> > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote:
>> > > As I'd rather not switch to vim, I'd be very grateful for any tips
>> > > concerning the display of umlauts in vi.
>> > 
>> > vi can't do it.
>> 
>> Thanks for confirming, Jan!
>> 
>> ---
>> Am 2024-07-08 22:07, schrieb Christian Weisgerber:
>> > There's a port and package of nvi-2.2.1, which is a close relative
>> > of the base system nvi that has been extended with wide character
>> > support.
>> 
>> I have just installed nvi, and the umlauts are displayed correctly.
>> Many thanks for this tip!
>> 
>> ---
>> I'm very grateful for the help misc@openbsd.org offers. A big thank
>> you to all the list contributors - and of course to all the contributors
>> and committers of OpenBSD itself. My family and I are very happy
>> to be able to use it for our daily home office work.
>> 
>> Best regards
>> 
>> Rolf
>> 
>> 
>> 
>> 
>
>Once upon a time I decided to take a look at Vim source code
>I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what
>the fuck?
>Do you know how much 700k of SLOC is?
>Terry Davis made a reasonably good OS in just 100k of SLOC!
>Very easy to hide malicious stuff like the backdoor that was in xz!
>
>That's why I use vi, and am working on my own text editor.. I don't know if
>it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base
>and Vim-like features (only most useful ones, the rest would be in a
>patch-form, like suckless.org has)
>Also when I said "am working", it's more like "was working and will work on it
>again", but I have a problem right now which has paused my programming life...
>I'm working on it
>If you're interested, perhaps one day you'll want to test it out..
>
>I'm not sure about the license thought... as I despise licenses and even having
>a copyleft license like CC is getting on my nerves, software should be free,
>and non-personal information should be free, too, without any IP or a
>requirement for a file "LICENSE".. those are just my 2 cents..
>It's a little more complicated than that, let's just say that I don't want
>being required to specify a LICENSE file... I'm just curious about the
>consequences, would you use a open source peace of software that in the README
>says "you can use it for whatever you want with no strings attached, and that's
>about it."?
>
>I'm probably rambling needlessly again, that's why none care about what I say
>

Maybe look at neatvi:
=> https://github.com/aligrudi/neatvi

Even if I still prefer nvi and its soft wrapping.




Re: [solved]: vi: How to display German umlauts?

2024-07-09 Thread Anon Loli
On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote:
> Dear Страхиња Радић,
> dear Jan,
> dear Christian
> 
> Thanks a lot for your prompt and helpful answers!
> 
> ---
> Am 2024-07-08 20:35, schrieb Страхиња Радић:
> > vi lacks a lot of built-in quality of life features that Vim has.
> 
> Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to
> stick to the base install as close as possible.
> 
> ---
> Am 2024-07-08 21:05, schrieb Jan Stary:
> > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote:
> > > As I'd rather not switch to vim, I'd be very grateful for any tips
> > > concerning the display of umlauts in vi.
> > 
> > vi can't do it.
> 
> Thanks for confirming, Jan!
> 
> ---
> Am 2024-07-08 22:07, schrieb Christian Weisgerber:
> > There's a port and package of nvi-2.2.1, which is a close relative
> > of the base system nvi that has been extended with wide character
> > support.
> 
> I have just installed nvi, and the umlauts are displayed correctly.
> Many thanks for this tip!
> 
> ---
> I'm very grateful for the help misc@openbsd.org offers. A big thank
> you to all the list contributors - and of course to all the contributors
> and committers of OpenBSD itself. My family and I are very happy
> to be able to use it for our daily home office work.
> 
> Best regards
> 
> Rolf
> 
> 
> 
> 

Once upon a time I decided to take a look at Vim source code
I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what
the fuck?
Do you know how much 700k of SLOC is?
Terry Davis made a reasonably good OS in just 100k of SLOC!
Very easy to hide malicious stuff like the backdoor that was in xz!

That's why I use vi, and am working on my own text editor.. I don't know if
it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base
and Vim-like features (only most useful ones, the rest would be in a
patch-form, like suckless.org has)
Also when I said "am working", it's more like "was working and will work on it
again", but I have a problem right now which has paused my programming life...
I'm working on it
If you're interested, perhaps one day you'll want to test it out..

I'm not sure about the license thought... as I despise licenses and even having
a copyleft license like CC is getting on my nerves, software should be free,
and non-personal information should be free, too, without any IP or a
requirement for a file "LICENSE".. those are just my 2 cents..
It's a little more complicated than that, let's just say that I don't want
being required to specify a LICENSE file... I'm just curious about the
consequences, would you use a open source peace of software that in the README
says "you can use it for whatever you want with no strings attached, and that's
about it."?

I'm probably rambling needlessly again, that's why none care about what I say



Re: "intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-09 Thread Walter Alejandro Iglesias
On Tue, 9 Jul 2024 21:24:01 +1000 Jonathan Gray wrote: 
> On Tue, Jul 09, 2024 at 10:02:40AM -, Stuart Henderson wrote:
> > On 2024-07-08, Jan Stary  wrote:
> > > This is current/amd64 on a Thinkpad T410 (full dmesg below).
> > > Strangely, upon booting, xenodm sets the resolution to 640x480:
> > >
> > > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 
> > > 1552 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> > > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 
> > > 1552 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
> > > [   994.984] (II) intel(0): switch to mode 640x400@60.0 on LVDS1 using 
> > > pipe 0, position (0, 0), rotation normal, reflection none
> > 
> > shouldn't that be using modesetting rather than intel? or is the machine 
> > too old?
>
> > > inteldrm0: msi, IRONLAKE, gen 5
>
> xserver/hw/xfree86/common/xf86pciBus.c
>
> 
> revision 1.14
> date: 2017/09/25 15:05:57;  author: matthieu;  state: Exp;  lines: +2 -0;  
> commitid: wvjaQqtz2qvU9jZw;
> Force Intel Ironlake chipsets to use the xf86-video-intel driver.
> stsp@ reported that modesetting(4) has been reported unreliable
> on his laptop, while intel(4) works.
>
>  to be removed after 6.2 to figure out and fix the issue.
>
> ok kettenis@, also discussed briefly with deraadt@ during EuroBSDCon.
> 
>
> the intel driver requires pci access so won't work with
> startx as we stopped installing Xorg setuid
>

I remember many years ago modesetting wasn't reliable in this machine.
I also had issues with intel SNA acceleration (I had to use UXA).
Currently seems to work fine.  But, I can't tell for sure, I'm not using
this machine every day.



A Write-up on Fighting SPAM with the help of OpenBSD

2024-07-09 Thread Lari Huttunen
Greetings,

I composed a (somewhat opinionated) write-up on my blog about fighting SPAM
with the help of OpenBSD and rspamd. The reason I'm writing about it on this
list is that I want to give a shoutout Joel Carnat for his excellent write-up
on the subject (linked in my post).

I would love to hear your thoughts and any additional insight you might have on
the topic.

https://public-exposure.inform.social/post/a-tour-through-the-spam-fighting-state-of-the-art/

Best regards,

Lari Huttunen
-- 
Current projects:
 - https://www.huttu.net | hacking for good
 - https://public-exposure.inform.social | a blog on defensive cyber security



[solved]: vi: How to display German umlauts?

2024-07-09 Thread rfabris

Dear Страхиња Радић,
dear Jan,
dear Christian

Thanks a lot for your prompt and helpful answers!

---
Am 2024-07-08 20:35, schrieb Страхиња Радић:

vi lacks a lot of built-in quality of life features that Vim has.


Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to
stick to the base install as close as possible.

---
Am 2024-07-08 21:05, schrieb Jan Stary:

On Jul 08 18:55:11, rfab...@mhsmail.ch wrote:

As I'd rather not switch to vim, I'd be very grateful for any tips
concerning the display of umlauts in vi.


vi can't do it.


Thanks for confirming, Jan!

---
Am 2024-07-08 22:07, schrieb Christian Weisgerber:

There's a port and package of nvi-2.2.1, which is a close relative
of the base system nvi that has been extended with wide character
support.


I have just installed nvi, and the umlauts are displayed correctly.
Many thanks for this tip!

---
I'm very grateful for the help misc@openbsd.org offers. A big thank
you to all the list contributors - and of course to all the contributors
and committers of OpenBSD itself. My family and I are very happy
to be able to use it for our daily home office work.

Best regards

Rolf






Re: "intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-09 Thread Jonathan Gray
On Tue, Jul 09, 2024 at 10:02:40AM -, Stuart Henderson wrote:
> On 2024-07-08, Jan Stary  wrote:
> > This is current/amd64 on a Thinkpad T410 (full dmesg below).
> > Strangely, upon booting, xenodm sets the resolution to 640x480:
> >
> > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
> > [   994.984] (II) intel(0): switch to mode 640x400@60.0 on LVDS1 using pipe 
> > 0, position (0, 0), rotation normal, reflection none
> 
> shouldn't that be using modesetting rather than intel? or is the machine too 
> old?

> > inteldrm0: msi, IRONLAKE, gen 5

xserver/hw/xfree86/common/xf86pciBus.c


revision 1.14
date: 2017/09/25 15:05:57;  author: matthieu;  state: Exp;  lines: +2 -0;  
commitid: wvjaQqtz2qvU9jZw;
Force Intel Ironlake chipsets to use the xf86-video-intel driver.
stsp@ reported that modesetting(4) has been reported unreliable
on his laptop, while intel(4) works.

 to be removed after 6.2 to figure out and fix the issue.

ok kettenis@, also discussed briefly with deraadt@ during EuroBSDCon.


the intel driver requires pci access so won't work with
startx as we stopped installing Xorg setuid

> 
> > If I ctrl-alt-del the running X, it restarts with 1440x900;
> > both X logs below, the point is that the restarted xenodm
> > no longer chooses the 640x400 mode:
> >
> > [  1022.036] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> > [  1022.036] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
> >
> > So I have a simple workaround, but why is that happening?
> > How can I debug that?
> >
> > Jan
> >
> >
> >
> > dmesg:
> >
> > OpenBSD 7.5-current (GENERIC.MP) #173: Mon Jul  8 03:04:31 MDT 2024
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 8357658624 (7970MB)
> > avail mem = 8081145856 (7706MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
> > bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
> > bios0: LENOVO 2537BN8
> > acpi0 at bios0: ACPI 4.0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA 
> > DMAR SSDT SSDT SSDT
> > acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4) 
> > EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpiec0 at acpi0
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.14 MHz, 06-25-05, 
> > patch 0007
> > cpu0: cpuid 1 
> > edx=bfebfbff
> >  
> > ecx=29ae3ff
> > cpu0: cpuid 6 eax=7 ecx=1
> > cpu0: cpuid 7.0 edx=9c00
> > cpu0: cpuid a vers=3, gp=4, gpwidth=48, ff=3, ffwidth=48
> > cpu0: cpuid 8001 edx=28100800 ecx=1
> > cpu0: cpuid 8007 edx=100
> > cpu0: MELTDOWN
> > cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> > 64b/line 8-way L2 cache, 3MB 64b/line 12-way L3 cache
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 133MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.23 MHz, 06-25-05, 
> > patch 0007
> > cpu1: smt 1, core 0, package 0
> > cpu2 at mainbus0: apid 4 (application processor)
> > cpu2: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.39 MHz, 06-25-05, 
> > patch 0007
> > cpu2: smt 0, core 2, package 0
> > cpu3 at mainbus0: apid 5 (application processor)
> > cpu3: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.42 MHz, 06-25-05, 
> > patch 0007
> > cpu3: smt 1, core 2, package 0
> > ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
> > acpimcfg0 at acpi0
> > acpimcfg0: addr 0xe000, bus 0-255
> > acpihpet0 at acpi0: 14318179 Hz
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpiprt1 at acpi0: bus -1 (PEG_)
> > acpiprt2 at acpi0: bus 2 (EXP1)
> > acpiprt3 at acpi0: bus 3 (EXP2)
> > acpiprt4 at acpi0: bus -1 (EXP3)
> > acpiprt5 at acpi0: bus 5 (EXP4)
> > acpiprt6 at acpi0: bus 13 (EXP5)
> > acpibtn0 at acpi0: LID_(wakeup)
> > acpibtn1 at acpi0: SLPB(wakeup)
> > acpipci0 at acpi0 UNCR
> > acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
> > acpicmos0 at acpi0
> > tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0xfed4/0x5000, device 0x104a rev 
> > 0x4e
> > acpibat0 at acpi0: BAT0 model "42T4751" serial  1780 type LION oem "SANYO"
> > acpiac0 at acpi0: AC unit online
> > 

Re: "intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-09 Thread Walter Alejandro Iglesias
On Tue, 9 Jul 2024 10:02:40 - (UTC) Stuart Henderson wrote:
> On 2024-07-08, Jan Stary  wrote:
> > This is current/amd64 on a Thinkpad T410 (full dmesg below).
> > Strangely, upon booting, xenodm sets the resolution to 640x480:
> >
> > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> > [   974.100] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
> > 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
> > [   994.984] (II) intel(0): switch to mode 640x400@60.0 on LVDS1 using pipe 
> > 0, position (0, 0), rotation normal, reflection none
>
> shouldn't that be using modesetting rather than intel? or is the machine too 
> old?

In my t410, even not using any xorg.conf, xenodm(1) tries to load the
intel driver, startx(1) doesn't.  Notice the difference between both
Xorg.0.log files:


Running startx(1)


[  3481.653] 
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[  3481.654] Current Operating System: OpenBSD mamuca.roquesor.com 7.5 
GENERIC.MP#174 amd64
[  3481.654]  
[  3481.654] Current version of pixman: 0.42.2
[  3481.655]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[  3481.655] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  3481.657] (==) Log file: "/home/morlock/.local/share/xorg/Xorg.0.log", Time: 
Tue Jul  9 12:09:16 2024
[  3481.657] (==) Using system config directory 
"/usr/X11R6/share/X11/xorg.conf.d"
[  3481.658] (==) No Layout section.  Using the first Screen section.
[  3481.658] (==) No screen section available. Using defaults.
[  3481.658] (**) |-->Screen "Default Screen Section" (0)
[  3481.658] (**) |   |-->Monitor ""
[  3481.658] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[  3481.658] (**) Allowing byte-swapped clients
[  3481.658] (==) Automatically adding devices
[  3481.658] (==) Automatically enabling devices
[  3481.658] (==) Not automatically adding GPU devices
[  3481.658] (==) Automatically binding GPU devices
[  3481.658] (==) Max clients allowed: 256, resource mask: 0x1f
[  3481.658] (==) FontPath set to:
/usr/X11R6/lib/X11/fonts/misc/,
/usr/X11R6/lib/X11/fonts/TTF/,
/usr/X11R6/lib/X11/fonts/OTF/,
/usr/X11R6/lib/X11/fonts/Type1/,
/usr/X11R6/lib/X11/fonts/100dpi/,
/usr/X11R6/lib/X11/fonts/75dpi/
[  3481.658] (==) ModulePath set to "/usr/X11R6/lib/modules"
[  3481.658] (II) The server relies on wscons to provide the list of input 
devices.
If no devices become available, reconfigure wscons or disable 
AutoAddDevices.
[  3481.658] (II) Loader magic: 0xd9d14c08500
[  3481.658] (II) Module ABI versions:
[  3481.658]X.Org ANSI C Emulation: 0.4
[  3481.658]X.Org Video Driver: 25.2
[  3481.658]X.Org XInput driver : 24.4
[  3481.658]X.Org Server Extension : 10.0
[  3481.659] (--) Using wscons driver on /dev/ttyC4
[  3481.692] (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem
(Permission denied)
Check that you have set 'machdep.allowaperture=1'
in /etc/sysctl.conf and reboot your machine
refer to xf86(4) for details
[  3481.692]linear framebuffer access unavailable
[  3481.692] (II) LoadModule: "glx"
[  3481.693] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
[  3481.696] (II) Module glx: vendor="X.Org Foundation"
[  3481.696]compiled for 1.21.1.13, module version = 1.0.0
[  3481.697]ABI class: X.Org Server Extension, version 10.0
[  3481.697] (==) Matched modesetting as autoconfigured driver 0
[  3481.697] (==) Assigned the driver to the xf86ConfigLayout
[  3481.697] (II) LoadModule: "modesetting"
[  3481.697] (II) Loading /usr/X11R6/lib/modules/drivers/modesetting_drv.so
[  3481.698] (II) Module modesetting: vendor="X.Org Foundation"
[  3481.698]compiled for 1.21.1.13, module version = 1.21.1
[  3481.698]Module class: X.Org Video Driver
[  3481.698]ABI class: X.Org Video Driver, version 25.2
[  3481.698] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  3481.698] (WW) Falling back to old probe method for modesetting
[  3481.709] (II) modeset(0): using default device
[  3481.709] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  3481.709] (II) modeset(0): Creating default Display subsection in Screen 
section
"Default Screen Section" for depth/fbbpp 24/32
[  3481.709] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[  3481.709] (==) modeset(0): RGB weight 888
[  3481.709] (==) modeset(0): Default visual is TrueColor
[  3481.709] (II) Loading sub module "glamoregl"
[  3481.709] (II) LoadModule: "glamoregl"
[  3481.711] (II) Loading /usr/X11R6/lib/modules/libglamoregl.so
[  3481.743] (II) Module 

Re: "intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-09 Thread Stuart Henderson
On 2024-07-08, Jan Stary  wrote:
> This is current/amd64 on a Thinkpad T410 (full dmesg below).
> Strangely, upon booting, xenodm sets the resolution to 640x480:
>
> [   974.100] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
> 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> [   974.100] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
> 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
> [   994.984] (II) intel(0): switch to mode 640x400@60.0 on LVDS1 using pipe 
> 0, position (0, 0), rotation normal, reflection none

shouldn't that be using modesetting rather than intel? or is the machine too 
old?

> If I ctrl-alt-del the running X, it restarts with 1440x900;
> both X logs below, the point is that the restarted xenodm
> no longer chooses the 640x400 mode:
>
> [  1022.036] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
> 1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
> [  1022.036] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
> 1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
>
> So I have a simple workaround, but why is that happening?
> How can I debug that?
>
>   Jan
>
>
>
> dmesg:
>
> OpenBSD 7.5-current (GENERIC.MP) #173: Mon Jul  8 03:04:31 MDT 2024
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8357658624 (7970MB)
> avail mem = 8081145856 (7706MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
> bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
> bios0: LENOVO 2537BN8
> acpi0 at bios0: ACPI 4.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA 
> DMAR SSDT SSDT SSDT
> acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4) 
> EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.14 MHz, 06-25-05, patch 
> 0007
> cpu0: cpuid 1 
> edx=bfebfbff
>  
> ecx=29ae3ff
> cpu0: cpuid 6 eax=7 ecx=1
> cpu0: cpuid 7.0 edx=9c00
> cpu0: cpuid a vers=3, gp=4, gpwidth=48, ff=3, ffwidth=48
> cpu0: cpuid 8001 edx=28100800 ecx=1
> cpu0: cpuid 8007 edx=100
> cpu0: MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 3MB 64b/line 12-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 133MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.23 MHz, 06-25-05, patch 
> 0007
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.39 MHz, 06-25-05, patch 
> 0007
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 5 (application processor)
> cpu3: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.42 MHz, 06-25-05, patch 
> 0007
> cpu3: smt 1, core 2, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PEG_)
> acpiprt2 at acpi0: bus 2 (EXP1)
> acpiprt3 at acpi0: bus 3 (EXP2)
> acpiprt4 at acpi0: bus -1 (EXP3)
> acpiprt5 at acpi0: bus 5 (EXP4)
> acpiprt6 at acpi0: bus 13 (EXP5)
> acpibtn0 at acpi0: LID_(wakeup)
> acpibtn1 at acpi0: SLPB(wakeup)
> acpipci0 at acpi0 UNCR
> acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
> acpicmos0 at acpi0
> tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0xfed4/0x5000, device 0x104a rev 
> 0x4e
> acpibat0 at acpi0: BAT0 model "42T4751" serial  1780 type LION oem "SANYO"
> acpiac0 at acpi0: AC unit online
> acpithinkpad0 at acpi0: version 1.0
> "*pnp0c14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> acpicpu0 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
> C1(1000@3 mwait.1), PSS
> acpicpu1 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
> C1(1000@3 mwait.1), PSS
> acpicpu2 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
> C1(1000@3 mwait.1), PSS
> acpicpu3 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
> C1(1000@3 mwait.1), PSS
> acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
> acpitz0 at acpi0: critical temperature is 100 degC
> acpivideo0 at acpi0: VID_
> acpivout0 at acpivideo0: LCD0
> acpivideo1 at acpi0: VID_
> cpu0: using IvyBridge MDS workaround
> cpu0: Enhanced SpeedStep 2926 MHz: speeds: 2667, 2666, 2533, 2399, 2266, 
> 2133, 1999, 1866, 1733, 1599, 1466, 1333, 1199 MHz
> pci0 at mainbus0 bus 255
> pchb0 at pci0 dev 0 

Re: "intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-09 Thread Walter Alejandro Iglesias
I also have a T410 running the latest snaptshot.  The screen of my
laptop is 1280x800.  I can't reproduce your issue.

Probably this has nothing to do with your issue but I'd like to call the
attention to this error:

  (EE) AIGLX error: dlopen of /usr/X11R6/lib/modules/dri/i965_dri.so failed 
(File not found)
  (EE) AIGLX error: unable to load driver i965

It's present in both two Xorg.0.log you pasted.  And now I realize it is
in my /var/log/Xorg.log.0 too.  Curiously that error doesn't appear when
I use startx(1) (in ~/.local/share/xorg/Xorg.0.log).

My desktop machine has also a integrated intel graphic card and I don't
see that error, neither using startx nor using xenodm.


   Walter



Re: smtpd warn: not enough disk space

2024-07-09 Thread Stuart Henderson
On 2024-07-09, Christian Schulte  wrote:
>
>
> On 07.07.24 03:51, Jeremy Evans wrote:
>> On Fri, Jul 5, 2024 at 9:16 PM Christian Schulte > > wrote:
>> 
>> Just wondering how the postgresql
>> port is configured. Really should setup quotas automatically when
>> pkg_adding in a way, just to ensure, that no one ever runs into a
>> situation, that there is no way out of a disk full situation.

The port can't sanely do that, because it doesn't know how the admin
has configured their system.

Also, openbsd doesn't enable filesystem quotas by default.

> I did not criticize the postgresql port in any way. I am just 
> suggesting, that when you want to setup a postgresql server in a 
> fire-and-forget way of things, it would be cool to restrict it from 
> eating up all available storage.

That is simple, use a separate filesystem for /var/postgresql.

-- 
Please keep replies on the mailing list.



Re: smtpd warn: not enough disk space

2024-07-09 Thread Stuart Henderson
On 2024-07-09, Christian Schulte  wrote:
>For example: Just 
> remove the patches in this directory - well a lot of them - and see how 
> those GNU folks have turned into complete idiots. I don't get it.
>
> https://github.com/openbsd/ports/tree/master/devel/gettext/patches

A lot of those patches are to avoid triggering warnings from ld when
linking other programs which use the gettext library due to the
api warnings openbsd has for some libc functions.


-- 
Please keep replies on the mailing list.



Re: Hard freeze during `pkg_add -u` on -current

2024-07-09 Thread Stuart Henderson
Only thing I can really suggest at that point is uninstalling packages
and reinstalling them. The steps would be similar to those in faq 15
"Duplicating Installed Packages on Another Machine" but rather than
transferring "list" to another machine, pkg_delete /var/db/pkg/* and
install them locally.

If the pkg database in too bad a state to pkg_delete, you could produce
a list, move /var/db/pkg out of the way, and pkg_add using that list
over the top - there will be "missing package registration, do you want
to fix?" questions which you can answer yes to.



On 2024/07/05 15:01, Ronald Dahlgren wrote:
> Thank you for the reply, Stuart.
> 
> Running pkg_check startout out fine and then went off the rails. The output 
> is captured here ->
> https://sw.gy/files/pkg_check.html
> 
> The control characters passed through xterm and a clipboard so they may not 
> be accurate. Here
> are some screenshots of the original:
> 
> https://sw.gy/files/pkg_check-1.png
> https://sw.gy/files/pkg_check-2.png
> 
> Thankfully this behavior did not crash the system :)
> 
> Ron
> 
> On Fri, Jul 5, 2024 at 12:33 PM Stuart Henderson  
> wrote:
> 
> On 2024-07-05, Ronald Dahlgren  wrote:
> > --cbf9af061c80339e
> > Content-Type: text/plain; charset="UTF-8"
> > Content-Transfer-Encoding: quoted-printable
> >
> > Hello,
> >
> > On July 2nd, I updated a machine to the latest snapshot and rebooted. It
> > came back without issue. I then issued `pkg_add -U`. This machine was 
> last
> > updated on June 6th, so not terribly long ago. Partway during the 
> process,
> > the disk indicated it was full (not true) and no commands were available
> > (ls, cd, etc). Unable to do anything, I terminated my SSH session and
> > attempted to reconnect. The machine failed to respond to pings. I had
> > someone onsite reboot the machine. It then came back up. I did not try 
> the
> > `pkg_add -u` command again. Inspection showed that partitions had 
> plenty of
> > available space and inodes.
> >
> > The daily insecurity output that ran the following day, on Wednesday the
> > 3rd, had this unusual snippet:
> >
> > ```
> > vmm-firmware-1.16.3p0 firmware binary images for vmm(4) driver
> > -xz-5.4.5            library and tools for XZ and LZMA compressed files
> > +xz-5.6.2
> > /??^L???.???/?..??/??$???+DESC???/?
> >  
> +CONTENTS0^L+REQUIRED_BY??=
> > 
> ???=
> > 
> ???=
> > 
> ???=
> > 
> ???=
> > ??
> >  zsh-5.9p0           Z shell, Bourne shell-compatible
> > ```
> 
> The filesystem holding /var/db/pkg has some corruption.
> I'd try running pkg_check and allow it to repair, reinstall xz
> "pkg_add -r -D installed xz", and see how you get on.
> 
> > Given the package with the wacky description is `xz`, I'm more concerned
> > than I would be otherwise.
> 
> The same could have happened to any package, there's nothing special
> about xz there.
> 
> > I can see in `/var/log/messages` the snapshot update occurred without
> > issue. Logs after the physical reboot show no core dump and only have
> > complaints about filesystems not being properly unmounted - expected 
> when
> > the plug is pulled.
> >
> > Are there any other logs I can check and share to help get to the 
> bottom of
> > this? The impacted computer has been running current and humming along
> > happily in a network closet for over a year.
> 
> Not sure about the disk full message (spurious seems unlikely - if space
> is ok, is some filesystem tight on inodes? df -hi) or the hang.
> 
> --
> Please keep replies on the mailing list.
> 
> 



Re: smtpd warn: not enough disk space

2024-07-08 Thread Christian Schulte




On 07.07.24 03:51, Jeremy Evans wrote:
On Fri, Jul 5, 2024 at 9:16 PM Christian Schulte > wrote:


Just wondering how the postgresql
port is configured. Really should setup quotas automatically when
pkg_adding in a way, just to ensure, that no one ever runs into a
situation, that there is no way out of a disk full situation.


I'm not aware of any port that sets up quotas automatically, so I don't 
understand why you think this is an issue with the PostgreSQL port 
specifically.  Since you are wondering how the PostgreSQL port is 
configured: 
https://cvsweb.openbsd.org/ports/databases/postgresql/Makefile?rev=1.304=text/x-cvsweb-markup 


Jeremy



I am not wondering about anything. Just suggesting improvements. 
Currently I grabbed my old Atari 800XL and Atari Falcon 030 doing some 
cool things whit those machines using a PC for calculating data quicker, 
than had been possible in the 80s and 90s. Those 8 bit Ataris were 
really great machines. The ancestor Amiga as well. For example: Just 
remove the patches in this directory - well a lot of them - and see how 
those GNU folks have turned into complete idiots. I don't get it.


https://github.com/openbsd/ports/tree/master/devel/gettext/patches

They are introducing hotspots like hell and then try to speed those up 
by using insecure non sense. Those GNU folks have no soul. Just remove a 
bunch of those patches in the ports tree and see how stupid they were 
having not eliminated those hotspots in the first place but trying to 
make them as fast and insecure as possible.


Maybe time for me to write some 6502 on my Atari 800XL. There you do not 
need to cope with GNU idiots at all.


Regards,
--
Christian






Re: smtpd warn: not enough disk space

2024-07-08 Thread Christian Schulte




On 07.07.24 03:51, Jeremy Evans wrote:
On Fri, Jul 5, 2024 at 9:16 PM Christian Schulte > wrote:


Just wondering how the postgresql
port is configured. Really should setup quotas automatically when
pkg_adding in a way, just to ensure, that no one ever runs into a
situation, that there is no way out of a disk full situation.


I'm not aware of any port that sets up quotas automatically, so I don't 
understand why you think this is an issue with the PostgreSQL port 
specifically.  Since you are wondering how the PostgreSQL port is 
configured: 
https://cvsweb.openbsd.org/ports/databases/postgresql/Makefile?rev=1.304=text/x-cvsweb-markup 


Jeremy



I did not criticize the postgresql port in any way. I am just 
suggesting, that when you want to setup a postgresql server in a 
fire-and-forget way of things, it would be cool to restrict it from 
eating up all available storage. Just because only then will you notice 
how difficult it can get to get out of such a situation. That's all. 
Discussion started with an MTA blindly preserving 5% of space for 
temporary queue files, which are, well, temporary. Makes no sense. Queue 
will get emptied whatsoever automatically. Completely different scenario 
with a database system. The MTA can and will resolve such a situation 
automatically over a period of a few days. This does not hold true for a 
database system, which is not dealing with temporary data and just needs 
a way to ensure someone never runs into a non recoverable situation. No 
need to apply any changes to the postgresql port. If you know how nasty 
things can get, you can also just use GNU/Linux to shoot you into your 
own feet. So to say. There is a reason why we are here.


Regards,
--
Christian





Re: vi: How to display German umlauts?

2024-07-08 Thread Christian Weisgerber
Jan Stary:

> > As I'd rather not switch to vim, I'd be very grateful for any tips
> > concerning the display of umlauts in vi.
> 
> vi can't do it.

There's a port and package of nvi-2.2.1, which is a close relative
of the base system nvi that has been extended with wide character
support.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: -current #168 cannot suspend with zzz

2024-07-08 Thread Mike Larkin
On Mon, Jul 08, 2024 at 10:01:30PM +0700, hahahahacker2009 wrote:
> Vào Th 6, 5 thg 7, 2024 vào lúc 21:27 hahahahacker2009
>  đã viết:
> >
> > Vào Th 6, 5 thg 7, 2024 vào lúc 21:18 Mike Larkin
> >  đã viết:
> > >
> > > On Fri, Jul 05, 2024 at 07:17:35PM +0700, hahahahacker2009 wrote:
> > > > I'm on -current #168 (Thu Jul  4 18:00:50 MDT 2024) and I
> > > > cannot suspend (sleep) my computer using zzz. When I run zzz,
> > > > the screen enter power save mode, the machine seems to be
> > > > sleeping: the lights on the power button goes blinking for 2s,
> > > > and then the machine wake up.
> > > >
> > >
> > > when did it last work? what snapshot?
> > >
> >
> > I have never tried suspending OpenBSD before.
>
> I've just tested 7.5-stable without applying patches on the same
> machine. Can't suspend either. Now I've upgraded to the snapshot.
>

sorry, don't know what this might be.



Re: vi: How to display German umlauts?

2024-07-08 Thread Jan Stary
On Jul 08 18:55:11, rfab...@mhsmail.ch wrote:
> Dear friends
> 
> OpenBSD 7.5: In my vi, German umlauts (diaeresis) are displayed as
> follows:
> Ä: \xc3\x84
> ä: \xc3\xa4
> Ö: \xc3\x96
> ö: \xc3\xb6
> Ü: \xc3\x9c
> ü: \xc3\xbc
> 
> These strings appear to consist of 2 character groups, as pressing `x`
> 2 times deletes the complete string.
> 
> In man vi(1), I couldn't find anything concerning the file encoding,
> and the vi command `:set all` didn't give me any hints.
> 
> I log into cwm via xenodm and have the line
> `export LC_CTYPE="en_US.UTF-8"` in the `~/.xsession` file, as
> suggested in `https://www.openbsd.org/faq/faq10.html#locales`.
> 
> The umlauts are displayed correctly in xterm.
> 
> As I'd rather not switch to vim, I'd be very grateful for any tips
> concerning the display of umlauts in vi.

vi can't do it.



Re: vi: How to display German umlauts?

2024-07-08 Thread Страхиња Радић
Дана 24/07/08 06:55PM, rfab...@mhsmail.ch написа:
> My reason for preferring sticking to vi:
> "Vim is a huge security hole due to all of the unvetted and often
> times unnecessary plugins.

While that may be true, plugins are not necessary for the proper 
operation of Vim.

> [...] The fact is that vi is plain better and
> will help you learn how to deal with problems using command line
> tools."

vi lacks a lot of built-in quality of life features that Vim has. Just 
some examples:

- digraphs
- :qa
- ZQ
- :split
- :bnext

and so on...



Re: -current #168 cannot suspend with zzz

2024-07-08 Thread hahahahacker2009
Vào Th 6, 5 thg 7, 2024 vào lúc 21:27 hahahahacker2009
 đã viết:
>
> Vào Th 6, 5 thg 7, 2024 vào lúc 21:18 Mike Larkin
>  đã viết:
> >
> > On Fri, Jul 05, 2024 at 07:17:35PM +0700, hahahahacker2009 wrote:
> > > I'm on -current #168 (Thu Jul  4 18:00:50 MDT 2024) and I
> > > cannot suspend (sleep) my computer using zzz. When I run zzz,
> > > the screen enter power save mode, the machine seems to be
> > > sleeping: the lights on the power button goes blinking for 2s,
> > > and then the machine wake up.
> > >
> >
> > when did it last work? what snapshot?
> >
>
> I have never tried suspending OpenBSD before.

I've just tested 7.5-stable without applying patches on the same
machine. Can't suspend either. Now I've upgraded to the snapshot.



vi: How to display German umlauts?

2024-07-08 Thread rfabris

Dear friends

OpenBSD 7.5: In my vi, German umlauts (diaeresis) are displayed as
follows:
Ä: \xc3\x84
ä: \xc3\xa4
Ö: \xc3\x96
ö: \xc3\xb6
Ü: \xc3\x9c
ü: \xc3\xbc

These strings appear to consist of 2 character groups, as pressing `x`
2 times deletes the complete string.

In man vi(1), I couldn't find anything concerning the file encoding,
and the vi command `:set all` didn't give me any hints.

I log into cwm via xenodm and have the line
`export LC_CTYPE="en_US.UTF-8"` in the `~/.xsession` file, as
suggested in `https://www.openbsd.org/faq/faq10.html#locales`.

The umlauts are displayed correctly in xterm.

As I'd rather not switch to vim, I'd be very grateful for any tips
concerning the display of umlauts in vi.

My reason for preferring sticking to vi:
"Vim is a huge security hole due to all of the unvetted and often
times unnecessary plugins. The fact is that vi is plain better and
will help you learn how to deal with problems using command line
tools."
(https://www.reddit.com/r/openbsd/comments/ealnzl/vi_vs_vim/)

Many thanks and best regards

Rolf





"intel(0): switch to mode 640x400" on Thinkpad T410

2024-07-08 Thread Jan Stary
This is current/amd64 on a Thinkpad T410 (full dmesg below).
Strangely, upon booting, xenodm sets the resolution to 640x480:

[   974.100] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
[   974.100] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
1728  900 903 909 926 -hsync -vsync (46.5 kHz e)
[   994.984] (II) intel(0): switch to mode 640x400@60.0 on LVDS1 using pipe 0, 
position (0, 0), rotation normal, reflection none

If I ctrl-alt-del the running X, it restarts with 1440x900;
both X logs below, the point is that the restarted xenodm
no longer chooses the 640x400 mode:

[  1022.036] (II) intel(0): Modeline "1440x900"x0.0   96.10  1440 1488 1552 
1728  900 903 909 926 -hsync -vsync (55.6 kHz eP)
[  1022.036] (II) intel(0): Modeline "1440x900"x0.0   80.30  1440 1488 1552 
1728  900 903 909 926 -hsync -vsync (46.5 kHz e)

So I have a simple workaround, but why is that happening?
How can I debug that?

Jan



dmesg:

OpenBSD 7.5-current (GENERIC.MP) #173: Mon Jul  8 03:04:31 MDT 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8357658624 (7970MB)
avail mem = 8081145856 (7706MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
bios0: LENOVO 2537BN8
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA DMAR 
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4) 
EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.14 MHz, 06-25-05, patch 
0007
cpu0: cpuid 1 
edx=bfebfbff
 
ecx=29ae3ff
cpu0: cpuid 6 eax=7 ecx=1
cpu0: cpuid 7.0 edx=9c00
cpu0: cpuid a vers=3, gp=4, gpwidth=48, ff=3, ffwidth=48
cpu0: cpuid 8001 edx=28100800 ecx=1
cpu0: cpuid 8007 edx=100
cpu0: MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 64b/line 
8-way L2 cache, 3MB 64b/line 12-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.23 MHz, 06-25-05, patch 
0007
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.39 MHz, 06-25-05, patch 
0007
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 5 (application processor)
cpu3: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.42 MHz, 06-25-05, patch 
0007
cpu3: smt 1, core 2, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus 5 (EXP4)
acpiprt6 at acpi0: bus 13 (EXP5)
acpibtn0 at acpi0: LID_(wakeup)
acpibtn1 at acpi0: SLPB(wakeup)
acpipci0 at acpi0 UNCR
acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0xfed4/0x5000, device 0x104a rev 0x4e
acpibat0 at acpi0: BAT0 model "42T4751" serial  1780 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"*pnp0c14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
C1(1000@3 mwait.1), PSS
acpicpu1 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
C1(1000@3 mwait.1), PSS
acpicpu2 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
C1(1000@3 mwait.1), PSS
acpicpu3 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), 
C1(1000@3 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 100 degC
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD0
acpivideo1 at acpi0: VID_
cpu0: using IvyBridge MDS workaround
cpu0: Enhanced SpeedStep 2926 MHz: speeds: 2667, 2666, 2533, 2399, 2266, 2133, 
1999, 1866, 1733, 1599, 1466, 1333, 1199 MHz
pci0 at mainbus0 bus 255
pchb0 at pci0 dev 0 function 0 "Intel QuickPath" rev 0x02
pchb1 at pci0 dev 0 function 1 "Intel QuickPath" rev 0x02
pchb2 at pci0 dev 2 function 0 "Intel QPI Link" rev 0x02
pchb3 at pci0 dev 2 function 1 "Intel QPI Physical" rev 0x02
pchb4 at pci0 dev 2 function 2 "Intel Reserved" rev 0x02
pchb5 at pci0 dev 2 function 3 "Intel Reserved" rev 0x02
pci1 at mainbus0 bus 0

Re: ripd processes not exchanging routing tables

2024-07-08 Thread Claudio Jeker
On Sat, Jul 06, 2024 at 06:25:51PM -0700, jrmu wrote:
> Greetings,
> 
> I am now trying to figure out how to run ripd(8) to replace the static
> routes. I have two machines I'm trying to configure routing for, R1 and R2.
> 
> I suspect the two ripd processes I configured for R1 and R2 are sending
> multicast packets but not actually listening/replying to each other.
> 
> R1 <--> Internet
>   10.1/16
> ^
> |
> |
> |
> R2  <->  R3 <-> R5 10.5/16
>   10.2/16  10.3/16
>  ^  ^
>   \/
>\  /
> \/
>  \  /
>   > R4 <
>   10.4/16
> 
> Right now, I'm just looking at the link between R1 and R2. Both of them
> have ripd running, but the routing tables aren't being updated like I
> had expected.
> 
> Here's how I configure the interfaces:
> 
> r1# cat /etc/hostname.vport11 
> inet 10.1.2.1 0x
> !route add -inet 10.2.1.1 -cloning -link -iface vport11
> !route add -inet 10/8 10.2.1.1

> r2# cat /etc/hostname.vio0
> inet 10.2.1.1 0x
> !route add -inet 10.1.2.1 -cloning -link -iface vio0
> !route add -inet 10.1/16 10.1.2.1
> !route add -inet default 10.1.2.1
> up

This looks strange to me. You do something here that is putting you in the
warranty void bucket. Please configure your interfaces properly. Do not
play games by injecting route commands to install cloning routes for a
different network.

In short make sure that vport11 and vio0 share a common subnet and can
talk directly to each other. After that ripd may actually work as well.

-- 
:wq Claudio



Re: Question about iked logging

2024-07-07 Thread J Doe

On 2024-07-05 17:14, J Doe wrote:


Hi list,

I have a basic VPN setup with iked with certificate authentication.
Periodically, something will attempt to authenticate against it that is
not me and I see the following in the logs:

     Jul  5 10:55:47 server iked[15172]: spi=0x7680ddead2051f3c:
     ikev2_send_auth_failed: authentication failed for

Just wanted to double-check: is the reason it says "authentication
failed for" without an identity because someone is specifically
attempting certificate authentication against my server and iked is
rejecting them ?

Thanks,

- J



Hi list,

It occurs to me that I did not include the configuration I have for iked
(iked.conf), which would probably be helpful ... I also didn't mention
the version of OpenBSD I was running as my server, which is 7.5.

I run a "road-warrior" configuration similar to what is displayed in the
OpenBSD FAQ[0].  Here is my configuration:


ikev2 "VPN" passive ipcomp tunnel esp \
from any to dynamic \
local egress peer any \
srcid server.home.arpa \
dstid client.home.arpa \
rsa \
config address 10.0.5.0/24 \
tag "ROADW"


As mentioned in my previous e-mail, sometimes connections will be made
to my VPN server that display the following:

Jul  5 10:55:47 server iked[15172]: spi=0x7680ddead2051f3c:
ikev2_send_auth_failed: authentication failed for

I am wondering if this is an indication of someone attempting to
authenticate using public key/certificate authentication and being
_rejected_ by iked ?

My hypothesis is that iked does not name an identity because this is
certificate based authentication vs. MSCHAPv2 for EAP authentication
which would provide an identity (ie: a username).

Is that correct ?

Thanks,

- J


Links:
[0]  https://www.openbsd.org/faq/faq17.html#clientikev2



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sun, Jul 07, 2024 at 05:56:24PM +0200, Jan Stary wrote:
> > and started talking about something else entirely.
> 
> Right.
> 
> > you're wasting my time (and other people's time)
> > Now when it comes to polluting the list,
> > I don't think I'm the one polluting it..
> 
> jesus fucking christ, that's _why_ I am sending it offlist;
> unlike you, who takes the extra bullshit back to the list,
> after being told not to.

Yeah, because I was correcting my own double-mistake (1st mistake was I
accidentally replied to your offlist email and 2nd was that I had to correct my
reply which was already on the list so ohwell)


> > I want to become a tester for an audio bug which
> > has been in OpenBSD for years for one of my motherboards.
> 
> That, for a change, would have value.
> Have you described the bug somewhere?
> 

I Agree!

https://marc.info/?l=openbsd-bugs=171258729026792=2
https://marc.info/?l=openbsd-tech=167800286026964=2

I'm re-opening the tread in a minute and am applying as a tester if possible :)



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sun, Jul 07, 2024 at 07:27:32PM +0100, cho...@jtan.com wrote:
> Anon Loli writes:
> > If you were to read all of the emails in the thread for 1st to last, you
> > would've seen that I mentioned that I not only read but also followed 
> > that link as well as release(8).
> 
> If you followed the instructions correctly you would not have wiped
> your precious imagery by your own hand nor would you have ended up
> with a /usr/sys, but you did both of these things. So either your
> ability to process a list in order is at fault or your memory is.
> 
> You would be better off with more asking and less telling. Patiently
> listen to how a project with nearly 50 years of history is already
> firmly established rather than informing its developers how they
> are doing it wrong.
> 
> Matthew
> 

Oh, I followed those instructions well, and you would know the real problem if
you read the entire thread (assuming you're talking about the DD issue), I used
DD dozens if not hundreds of times, I was just not being careful, that's all..
It was the right drive before I unplug it and plugged a different drive, then
plugged back in the original drive (the one I fucked up)..

What do you mean with a /usr/sys? Nothing is wrong there, I just didn't expect
src.tar.gz and CVS's src/ to be different... no one would unless they've read
the most relatable of man pages (probably file sets related) and remember
everything perfectly..  all I had to do is move my /usr/sys to /usr/src/sys, no
big issue there.
A lot of things in OpenBSD work on assumption that the user knows a few too
many things, it's not nobrain-friendly, it requires mediocre brain usage,
compared to some other OS manual pages (not in their entirety, every OS has
it's own flaw)

Well if the 50 years of history still can't explain me how they can't handle
the differential between datetime of object files, and thus verify the object
file is/isn't outdated and thus wether or not the source file needs a
recompile, then I don't know what to tell you...
Someone mentioned /usr/lib or something like that, but I don't think that
really changes anything, as long as the machine isn't SERIOUSLY fucked up when
it comes to datetime, it should work even if shit is on another fucking
continent on someone else's computer
Am I missing something? Then tell me
Am I onto something? Then stop being butthurt about it xD
Am I a little annoying? Cmon it would be boring without that, just admit it,
why be so serious all the time

For example CVS repository don't get verified because "that's how it worked for
decades and from the start it wasn't made to be verifiable because no one
thought anyone would ever do anything malicious" (as far as someone on the
mailing list told me and that's how I understood it), you're telling me that
it's okay to have that?
Hello? Are we just assuming that mirrors are trust-worthy?
I trusted my own fucking family and they ruined my life, I'm not trusting
fucking mirrors, and no one should, do you understand me?
I'm only trusting openbsd.org and that's it (which also shouldn't be trusted,
but oh well)
There are many things that your "50 years of history firmly established"
project is missing, and you aren't seeing it because as far as I see, the
following goes for you:

Like I said, I consider most of you normal people until proven wrong, and
normal people even if they have 50 years of programming experience are still
missing an important factor which is critical thinking, in other to become
superoir and be a standalone responsible developer
Programmers have superior critical thinking than non-programmers, but normal
programmers are inferior to programmers which excell in critical thinking
and/or have autism. 



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread chohag
Anon Loli writes:
> If you were to read all of the emails in the thread for 1st to last, you
> would've seen that I mentioned that I not only read but also followed 
> that link as well as release(8).

If you followed the instructions correctly you would not have wiped
your precious imagery by your own hand nor would you have ended up
with a /usr/sys, but you did both of these things. So either your
ability to process a list in order is at fault or your memory is.

You would be better off with more asking and less telling. Patiently
listen to how a project with nearly 50 years of history is already
firmly established rather than informing its developers how they
are doing it wrong.

Matthew



Make ucc(4) pass audio cookie to wskbd(4)

2024-07-07 Thread Mark Hesselink

Hi,

I recently bought a JBL USB-C wired headphones for my 2020 Apple MacBook 
Air to enjoy audio without disturbing my family. The headphones is 
exposed via uaudio(4) as audio1 to the system. The headphones come with 
a simple consumer control keyboard supported by ucc(4) and wskbd(4). The 
keyboard exposes 2 volume control keys and an unmapped key. The relevant 
dmesg(8) lines are:


uaudio0 at uhub1 port 1 configuration 1 interface 1 "KTMICRO JBL TUNE 
310C USB-C" rev 2.00/0.03 addr 2

uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 5 ctls
audio1 at uaudio0
uhidev0 at uhub1 port 1 configuration 1 interface 3 "KTMICRO JBL TUNE 
310C USB-C" rev 2.00/0.03 addr 2

uhidev0: iclass 3/0, 84 report ids
ucc0 at uhidev0 reportid 1: 4 usages, 3 keys, enum
wskbd1 at ucc0 mux 1
wskbd1: connecting to wsdisplay0
uhid0 at uhidev0 reportid 75: input=10, output=10, feature=0
uhid1 at uhidev0 reportid 84: input=10, output=10, feature=0

The volume control keys unfortunately can only control audio0 in an 
OpenBSD 7.5-stable system as sys/dev/hid/hidcc.c does not currently pass 
the audio cookie it receives from ucc(4) on to wskbd(4). The attached 
hidcc_c.patch is a (simple) attempt at fixing this issue. It allows me 
to control the volume on my headphones using the consumer control 
keyboard, a good quality of life improvement.


Cheers,

Mark
Index: dev/hid/hidcc.c
===
RCS file: /cvs/src/sys/dev/hid/hidcc.c,v
diff -u -r1.5 hidcc.c
--- dev/hid/hidcc.c	14 Nov 2022 00:16:44 -	1.5
+++ dev/hid/hidcc.c	7 Jul 2024 15:42:13 -
@@ -593,7 +593,7 @@
 #undef N
 };
 
-void	hidcc_attach_wskbd(struct hidcc *);
+void	hidcc_attach_wskbd(struct hidcc *, void *);
 int	hidcc_enable(void *, int);
 void	hidcc_set_leds(void *, int);
 int	hidcc_ioctl(void *, u_long, caddr_t, int, struct proc *);
@@ -667,7 +667,7 @@
 
 	/* Cannot load an empty map. */
 	if (sc->sc_maplen > 0)
-		hidcc_attach_wskbd(sc);
+		hidcc_attach_wskbd(sc, hca->audio_cookie);
 
 	return sc;
 }
@@ -755,7 +755,7 @@
 }
 
 void
-hidcc_attach_wskbd(struct hidcc *sc)
+hidcc_attach_wskbd(struct hidcc *sc, void *audio_cookie)
 {
 	static const struct wskbd_accessops accessops = {
 		.enable		= hidcc_enable,
@@ -767,7 +767,7 @@
 		.keymap		= >sc_keymap,
 		.accessops	= ,
 		.accesscookie	= sc,
-		.audiocookie	= NULL,	/* XXX audio_cookie */
+		.audiocookie	= audio_cookie
 	};
 
 	sc->sc_keydesc[0].name = KB_US;


Re: M-Audio Fast Track Ultra 8R

2024-07-07 Thread Jan Stary
On Jul 01 15:07:48, a...@caoua.org wrote:
> On Sun, Jun 30, 2024 at 08:26:06AM +0200, Jan Stary wrote:
> > This is current/amd64 on a PC (full dmesg below).
> > I got my hands on an M-Audio Fast Track Ultra 8R,
> > an USB audio interface; eight tracks, 24/96, nice.
> > 
> > It doesn't seem to be supported though:
> > it attaches as an ugen, but no uaudio.
> > 
> > umidi0 at uhub4 port 2 configuration 1 interface 3 "M-Audio Fast Track 
> > Ultra 8R" rev 2.00/1.51 addr 3
> > umidi0: (genuine USB-MIDI)
> > umidi0: out=1, in=1
> > midi0 at umidi0: 
> > ugen0 at uhub4 port 2 configuration 1 "M-Audio Fast Track Ultra 8R" rev 
> > 2.00/1.51 addr 3
> > 
> > This happens in any USB slot.
> > 
> > What can I do to debug this?
> > Is anyone using this on OpenBSD?
> > 
> > It is an USB-compliant audio device,
> > macOS and Windows use it just fine.
> 
> It seems that the uaudio driver doesn't even try to attach. You could
> instrument the uaudio_match() kernel function, and try to figure out
> why it returns UMATCH_NONE for your device.

For the record, it is _not_ a USB-compliant audio device.
I had another one plugged into mac by mistake (sorry),
and on win, it only works with the latest = 2014 drivers.



Re: ripd processes not exchanging routing tables

2024-07-07 Thread jrmu
On R2, I run this command:

r2# netstat -na -f inet
Active Internet connections (including servers)
Proto   Recv-Q Send-Q  Local Address  Foreign AddressTCP-State
tcp  0  0  127.0.0.1.25   *.*LISTEN
tcp  0  0  *.22   *.*LISTEN
Active Internet connections (including servers)
Proto   Recv-Q Send-Q  Local Address  Foreign Address
udp  0  0  10.2.1.1.3788  217.180.209.214.123
udp  0  0  10.2.1.1.12451 162.159.200.1.123
udp  0  0  10.2.1.1.29041 142.202.190.19.123
udp  0  0  10.2.1.1.8358  69.89.207.199.123
udp  0  0  10.2.1.1.23580 73.193.62.54.123
udp  0  0  *.520  *.*
udp  0  0  *.**.*
udp  0  0  *.**.*

I notice that there's no listener for 224.0.0.9. This looks like the
reason for failure is that the interface isn't set up to listen for
IP multicast packets. Does anyone know how to fix that? I can't seem to
find documentation for how to add the interface to listen to multicast
packets.

-- 
jrmu
IRCNow (https://ircnow.org)



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sun, Jul 07, 2024 at 02:24:40PM +0200, Jan Stary wrote:
> On Jul 07 11:33:30, anonl...@autistici.org wrote:
> > On Sat, Jul 06, 2024 at 06:08:20PM +0200, Jan Stary wrote:
> > > > if you want to only build a kernel, go in the right directory and build
> > > > only a kernel :-)
> > > 
> > > More importantly, go read the entirety of https://www.openbsd.org/faq/
> > > before poluting this list with your retarted crap.
> > 
> > I'm confident that what you're quotting isn't what I'm looking for
> 
> Exactly. You are confident that the FAQ is not something you should read,
> while https://www.openbsd.org/faq/faq5.html#Bld is exactly what you should
> read. That is precisely the problem.
> 

No, I meant you and the other person are responding to something that has
nothing to do with what you 2 are saying
If you were to read all of the emails in the thread for 1st to last, you
would've seen that I mentioned that I not only read but also followed 
that link as well as release(8).

And as I'm building EVERYTHING (src, sys, xenocara, kernel), and complained
about object files IN GENERAL, your and the other person's reply isn't helpful,
especially since I'm proposing/discussing a solution to the object files, or at

least looking for a professional respond, which I kindof got from 1 person, but
they didn't explain the "you have to be 100% confident date is GOOD, but it's
never 100% good", which problem I have already acknowledged, so they are
wasting words, and so are you, not me.

Yes, I maybe have a little problem in expressing my feelings/thoughts, but you
can't tell me that you read this entire thread, because if you did, you
wouldn't be annoying in repeating stuff that I've already acknowledged and
started talking about something else entirely.

Is the subject title corresponding to the proposal/discussion of object file
absolute versioning/verification? No, because the subject has evolved..

I'm posting this to the list because in my last email to the list (which I
didn't realize you posted off-list I'm sorry but it's too late as I have to
correct my own email) I didn't express myself trully

Perhaps now I've expressed myself truthfully, and your ignorance in reading
threads and replying to them like you know better.

I am not an expert in OpenBSD nor have 100% perfect expressioning, but I'm not
stupid and you can't be telling me that you read everything that I wrote and
are giving a solution, because you're not, you're wasting my time (and other
people's time) by not reading.
If you're not interested in an thread, don't read half of it and respond, just
don't respond at all


Now when it comes to polluting the list, I don't think I'm the one polluting 
it..
sure I can work on my expressions, but there are certain parts of OpenBSD that
are laughable, and that is directly connected to it's contributors.
Of course you can have 20 years of programming experience, but if you're not a
critical thinker, your OS will still be lacking something.
I'm not here to laugh at OpenBSD as much as I'm here to try and contribute
something.
I want to become a tester for an audio bug which has been in OpenBSD for years
for one of my motherboards.

Take this as an insult if you will, but if I were on your position, I would
not, because I know that nothing is perfect, and that even a big fool can be
right about some things.
You're talking to a guy who installed GNU/Arch Linux over 30 times, just
because the documentation was broken for OpenZFS at the time... did I document
it?  sadly not... 


I'm sorry if I came out as an asshole, but in my experience, those kinds of
people contribute the most to the world, because they are direct, and politicts
and other social norms don't get in the way of them achieving superior
progress for some project or what-not, because it's not individuals that
matters as much as the project that matters, in my opinion.. I might be wrong.
Take Terry Davis as an half-example.
Then take Code Of Conducts as an example, and their ineffectivness.



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sun, Jul 07, 2024 at 01:44:35PM +0200, Janne Johansson wrote:
> Den sön 7 juli 2024 kl 13:34 skrev Anon Loli :
> > > > I don't want the reproductibility of the build, as I want to change the 
> > > > source
> > > > code of the src/sys/dev/pci/azalia.c :) consider me a tester :P
> > > > And it's such a shame that I have to wait a lot of hours... AGAIN
> > > > So as far as I understand, in the future, all I need is KEEPKERNELS as I
> > > > already now how.
> > >
> > > if you want to only build a kernel, go in the right directory and build
> > > only a kernel :-)
> > >
> >
> >
> > What the fuck are you farting about? lol
> >
> >
> > I never said "I only want to build kernel", I said that I want all object
> > files to remain where they are instead of getting deleted and new ones made
> > That's what I meant, and I believe that it's what I actually wrote, too.
> 
> You wrote: "I don't want the reproductibility of the build, as I want
> to change the source code of the src/sys/dev/pci/azalia.c" which is
> easily understood as you were changing only the kernel and hence you
> got advice on how to act if what you changed is just the azalia driver
> in the kernel. People can only respond to what you type, not
> everything else that you think of.
> 
> 
> -- 
> May the most significant bit of your life be positive.


And what about the 2 other kind-of opposing things I said?
1. KEEPKERNELS variable
and
2. keeping ALL object files
idk maybe these 2 are one and same



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Janne Johansson
Den sön 7 juli 2024 kl 13:34 skrev Anon Loli :
> > > I don't want the reproductibility of the build, as I want to change the 
> > > source
> > > code of the src/sys/dev/pci/azalia.c :) consider me a tester :P
> > > And it's such a shame that I have to wait a lot of hours... AGAIN
> > > So as far as I understand, in the future, all I need is KEEPKERNELS as I
> > > already now how.
> >
> > if you want to only build a kernel, go in the right directory and build
> > only a kernel :-)
> >
>
>
> What the fuck are you farting about? lol
>
>
> I never said "I only want to build kernel", I said that I want all object
> files to remain where they are instead of getting deleted and new ones made
> That's what I meant, and I believe that it's what I actually wrote, too.

You wrote: "I don't want the reproductibility of the build, as I want
to change the source code of the src/sys/dev/pci/azalia.c" which is
easily understood as you were changing only the kernel and hence you
got advice on how to act if what you changed is just the azalia driver
in the kernel. People can only respond to what you type, not
everything else that you think of.


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



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sat, Jul 06, 2024 at 06:08:20PM +0200, Jan Stary wrote:
> > if you want to only build a kernel, go in the right directory and build
> > only a kernel :-)
> 
> More importantly, go read the entirety of https://www.openbsd.org/faq/
> before poluting this list with your retarted crap.


I'm confident that what you're quotting isn't what I'm looking for, the email I
just sent explains more.

Please stop trolling



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sat, Jul 06, 2024 at 03:37:01PM +0200, Sebastien Marie wrote:
> Anon Loli  writes:
> >
> > I understand, I was a programmer and hopefully will be again..
> > In my opinion the CVS itself should take care in preventing the 
> > "missbehaving",
> > doesn't git do that already? I hope that we're on the same page..
> > I'm just not always understanding/understandable..
> 
> CVS (or git) take care of the source tree, files which are under
> /usr/src directory, and not the files already present in /usr/include or
> /usr/lib directories.
> 
> > I don't want the reproductibility of the build, as I want to change the 
> > source
> > code of the src/sys/dev/pci/azalia.c :) consider me a tester :P
> > And it's such a shame that I have to wait a lot of hours... AGAIN
> > So as far as I understand, in the future, all I need is KEEPKERNELS as I
> > already now how.
> 
> if you want to only build a kernel, go in the right directory and build
> only a kernel :-)
> 
> $ cd /sys/arch/amd64/compile/GENERIC.MP
> $ make obj
> $ make config
> $ make clean# (if previous step asked for)
> $ make  # (or with -j2, -j4…)
> $ doas make install
> 
> [and reboot to effectively use the build kernel]
> 
> note that the previous example assumes:
> - amd64 architecture
> - GENERIC.MP kernel
> 
> a full release(8) build isn't necessary for that.
> 
> Regards.
> -- 
> Sebastien Marie


What the fuck are you farting about? lol

> KEEPKERNELSIf set to "yes", the kernel object directories
>will not be cleaned out during "make build".
>

I never said "I only want to build kernel", I said that I want all object
files to remain where they are instead of getting deleted and new ones made
That's what I meant, and I believe that it's what I actually wrote, too.



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-07 Thread Anon Loli
On Sat, Jul 06, 2024 at 11:17:52AM -0600, deich...@placebonol.com wrote:
> what you suggest sounds like a really bad idea 
> 
> Time is an imperfect construct, with your suggestion you have to have 100% 
> confidence that system local time is always perfect.  I've been doing this a 
> long time and can recall many instances when an issue arose because time was 
> off.
> 
> On July 6, 2024 7:01:27 AM MDT, Anon Loli  wrote:
> SNIP
> >(my last email on this thread, about datetime "version check" is needed to
> >understand the meaning of this)
> >or make(1) can handle this when say building /usr/src, it can check datetime 
> >of
> >the source files (.c, .h), and then the datetime of object files (.o).. now
> >there might be a confusion between CVS repository datetime and local host
> >time, so perhaps convert everything to UTC unixtime, and perhaps CVS should
> >handle the differential between CVS and local datetime (if needed at all)
> >
> >And voila, that should handle object files so that they can't get outdated.
> >
> 

That's precisely what I meant by "handling the differential", I suppose.

What do you mean that system localtime is always perfect? NTP already exists..
And I think that the local datetime should be sufficient, no matter how much
you try, the files that you get from a CVS or tar.gz should always be older
than any changes you make by hand, for example

And then when you say go and update, same should apply, but the opposite
direction, the CVS/tar.gz should always have newer datetime (assuming changes
to such and such files happened)



Re: smtpd warn: not enough disk space

2024-07-06 Thread Jeremy Evans
On Fri, Jul 5, 2024 at 9:16 PM Christian Schulte 
wrote:

> Just wondering how the postgresql
> port is configured. Really should setup quotas automatically when
> pkg_adding in a way, just to ensure, that no one ever runs into a
> situation, that there is no way out of a disk full situation.
>

I'm not aware of any port that sets up quotas automatically, so I don't
understand why you think this is an issue with the PostgreSQL port
specifically.  Since you are wondering how the PostgreSQL port is
configured:
https://cvsweb.openbsd.org/ports/databases/postgresql/Makefile?rev=1.304=text/x-cvsweb-markup

Jeremy


ripd processes not exchanging routing tables

2024-07-06 Thread jrmu
Greetings,

I am now trying to figure out how to run ripd(8) to replace the static
routes. I have two machines I'm trying to configure routing for, R1 and R2.

I suspect the two ripd processes I configured for R1 and R2 are sending
multicast packets but not actually listening/replying to each other.

R1 <--> Internet
  10.1/16
^
|
|
|
R2  <->  R3 <-> R5 10.5/16
  10.2/16  10.3/16
 ^  ^
  \/
   \  /
\/
 \  /
  > R4 <
  10.4/16

Right now, I'm just looking at the link between R1 and R2. Both of them
have ripd running, but the routing tables aren't being updated like I
had expected.

Here's how I configure the interfaces:

r1# cat /etc/hostname.vport11 
inet 10.1.2.1 0x
!route add -inet 10.2.1.1 -cloning -link -iface vport11
!route add -inet 10/8 10.2.1.1
up
r1# cat /etc/ripd.conf  
#$OpenBSD: ripd.conf,v 1.1 2014/07/11 21:20:10 deraadt Exp $

fib-update yes
redistribute static
split-horizon poisoned
triggered-updates yes

interface vport11 {
cost 2
}
r1# ifconfig vport11
vport11: flags=8943 mtu 1500
lladdr fe:e1:ba:d1:c2:8b
index 12 priority 0 llprio 3
groups: vport
inet 10.1.2.1 netmask 0x broadcast 10.1.255.255

r2# cat /etc/hostname.vio0
inet 10.2.1.1 0x
!route add -inet 10.1.2.1 -cloning -link -iface vio0
!route add -inet 10.1/16 10.1.2.1
!route add -inet default 10.1.2.1
up
r2# cat /etc/hostname.vio1 
inet 10.2.3.1 0x
!route add -inet 10.3.2.1 -cloning -link -iface vio1
!route add -inet 10.3/16 10.3.2.1
!route add -inet 10.5/16 10.3.2.1
r2# cat /etc/hostname.vio2 
inet 10.2.4.1 0x
!route add -inet 10.4.2.1 -cloning -link -iface vio2
!route add -inet 10.4/16 10.4.2.1
up
r2# cat /etc/sysctl.conf
net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1
net.inet.ip.multipath=1
net.inet6.ip6.multipath=1
r2# cat /etc/ripd.conf 
#$OpenBSD: ripd.conf,v 1.1 2014/07/11 21:20:10 deraadt Exp $

fib-update yes
redistribute static
split-horizon poisoned
triggered-updates yes

interface vio0 {
cost 2
}
interface vio1 {
cost 2
}
interface vio2 {
cost 2
}
r2# ifconfig vio0
vio0: flags=8b43 mtu 
1500
lladdr e8:8b:21:21:21:21
index 1 priority 0 llprio 3
media: Ethernet autoselect
status: active
inet 10.2.1.1 netmask 0x broadcast 10.2.255.255

When I run ripd in debug mode, I see these errors on both r1 and r2:

r1# ripd -dvvv
startup
if_fsm: event 'UP' resulted in action 'START' and changing state for interface 
vport11 from 'DOWN' to 'ACTIVE'
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface

r2# ripd -dvvv
startup
if_fsm: event 'UP' resulted in action 'START' and changing state for interface 
vio2 from 'DOWN' to 'ACTIVE'
if_fsm: event 'UP' resulted in action 'START' and changing state for interface 
vio1 from 'DOWN' to 'ACTIVE'
if_fsm: event 'UP' resulted in action 'START' and changing state for interface 
vio0 from 'DOWN' to 'ACTIVE'
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface

I suspect that error message is due to the interface not being properly
configured for multicast packets, but I am not certain. The lladdr for r1's
vporrt11 is fe:e1:ba:d1:c2:8b, and the lladdr for r2's vio0 is
e8:8b:21:21:21:21. I don't think they have the ethernet multicast bit set.

When I check ripctl, it doesn't show any neighbors detected:

r1# ripctl show
Interface   AddressState  Linkstate  Uptime  
vport11 10.1.2.1/16ACTIVE unknown00:00:06

r1# ripctl show neighbor
ID  State   Address Iface Uptime


r2# ripctl show
Interface   AddressState  Linkstate  Uptime  
vio210.2.4.1/16ACTIVE active 00:00:13
vio110.2.3.1/16ACTIVE active 00:00:13
vio010.2.1.1/16ACTIVE active 00:00:13

r2# ripctl show neighbor
ID  State   Address Iface Uptime

Here's what I see when I run tcpdump on vport11:

$ doas tcpdump -ne -i vport11 'udp port 520' 
tcpdump: listening on vport11, link-type EN10MB
20:17:32.003561 e8:8b:21:21:21:21 01:00:5e:00:00:09 0800 66: 10.2.1.1.520 > 
224.0.0.9.520: RIPv2-req 24 [tos 0xc0] [ttl 1]
20:17:34.655769 fe:e1:ba:d1:c2:8b 01:00:5e:00:00:09 0800 66: 10.1.2.1.520 > 
224.0.0.9.520: RIPv2-req 24 [tos 0xc0] [ttl 1]
20:18:03.029734 e8:8b:21:21:21:21 01:00:5e:00:00:09 0800 186: 10.2.1.1.520 > 
224.0.0.9.520: RIPv2-resp [items 7]: {10.1.0.0/255.255.0.0}(16) 
{10.1.2.1/255.255.255.255}(16) {10.3.0.0/255.255.0.0}(2) 
{10.3.2.1/255.255.255.255}(2) {10.4.0.0/255.255.0.0}(2) 

Re: tcpdump on openbsd

2024-07-06 Thread Mik J
Hello Otto, Diana,
Thank you for your answers.

Otto, thank you for your work on tcpdump.

Regards






Le vendredi 5 juillet 2024 à 17:32:29 UTC+2, deich...@placebonol.com 
 a écrit : 





Take a look at OpenBSD src web interface for tcpdump, you'll see tcpdump is 
maintained by OpenBSD.

If you think something is missing you can always submit source to add a 
capability.

After using OpenBSD for over 25 years my observation is OpenBSD is willing to 
look at source code submissions, less willing to respond to people asking for 
this or that feature.

73
diana


On July 5, 2024 8:39:48 AM MDT, Mik J  wrote:
>  Hello,
> 
> I notice that tcpdump on openbsd differs from the linux version.
> 
> Some options don't exist:
> - G rotate_seconds
> - W filecount
> 
> Do you know why tcpdump on openbsd don't include these switch ?
> 
> Would it be possible to implement them on openbsd ?
> 
> Regards
> 



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-06 Thread Sebastien Marie
Anon Loli  writes:
>
> (my last email on this thread, about datetime "version check" is needed to
> understand the meaning of this)
> or make(1) can handle this when say building /usr/src, it can check datetime 
> of
> the source files (.c, .h), and then the datetime of object files (.o).. now
> there might be a confusion between CVS repository datetime and local host
> time, so perhaps convert everything to UTC unixtime, and perhaps CVS should
> handle the differential between CVS and local datetime (if needed at all)
>
> And voila, that should handle object files so that they can't get outdated.

it is basically what make(1) program tries to do. but it doesn't cover
100% cases. it works for files headers in /usr/include, but it will not
work for changes in the compiler (or in programs used by the compiler).

following all the dependency chain is a hard problem when considering
the OS level. in such cases, a full rebuild is need.

if you build things in /usr/src/sys/arch/amd64/compile/GENERIC.MP, make
will properly build only what needs to be rebuild to get a new kernel
with your changes. but the 'make config' stage will sometimes told you
to run a 'make clean'.

Regards.
-- 
Sebastien Marie



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-06 Thread deich...@placebonol.com
what you suggest sounds like a really bad idea 

Time is an imperfect construct, with your suggestion you have to have 100% 
confidence that system local time is always perfect.  I've been doing this a 
long time and can recall many instances when an issue arose because time was 
off.

On July 6, 2024 7:01:27 AM MDT, Anon Loli  wrote:
SNIP
>(my last email on this thread, about datetime "version check" is needed to
>understand the meaning of this)
>or make(1) can handle this when say building /usr/src, it can check datetime of
>the source files (.c, .h), and then the datetime of object files (.o).. now
>there might be a confusion between CVS repository datetime and local host
>time, so perhaps convert everything to UTC unixtime, and perhaps CVS should
>handle the differential between CVS and local datetime (if needed at all)
>
>And voila, that should handle object files so that they can't get outdated.
>



Re: (boring) why is KEEPKERNELS unset and obj gets cleaned?

2024-07-06 Thread Sebastien Marie
Anon Loli  writes:
>
> I understand, I was a programmer and hopefully will be again..
> In my opinion the CVS itself should take care in preventing the 
> "missbehaving",
> doesn't git do that already? I hope that we're on the same page..
> I'm just not always understanding/understandable..

CVS (or git) take care of the source tree, files which are under
/usr/src directory, and not the files already present in /usr/include or
/usr/lib directories.

> I don't want the reproductibility of the build, as I want to change the source
> code of the src/sys/dev/pci/azalia.c :) consider me a tester :P
> And it's such a shame that I have to wait a lot of hours... AGAIN
> So as far as I understand, in the future, all I need is KEEPKERNELS as I
> already now how.

if you want to only build a kernel, go in the right directory and build
only a kernel :-)

$ cd /sys/arch/amd64/compile/GENERIC.MP
$ make obj
$ make config
$ make clean# (if previous step asked for)
$ make  # (or with -j2, -j4…)
$ doas make install

[and reboot to effectively use the build kernel]

note that the previous example assumes:
- amd64 architecture
- GENERIC.MP kernel

a full release(8) build isn't necessary for that.

Regards.
-- 
Sebastien Marie



  1   2   3   4   5   6   7   8   9   10   >