Re: AMDGPU in current issue

2019-09-06 Thread Charlie Burnett
Hey, apologies to continually bother you with this, but I've gotten a
driver that compiles and detects the card... however it seems to be having
powerplay table issues, I was wondering if this was ever an issue when
initially porting, and if so how'd you go about fixing it?
Leaving the powerplay untouched and only altering the amdgpu subdirectory
results in this error in the following error in dmesg:
initializing kernel modesetting (VEGA20 0x1002:0x66AF 0x1002:0x081E 0xC1).
amdgpu_device_resize_fb_bar: stub
amdgpu: [powerplay] smc start failed
amdgpu: [powerplay] powerplay hw init failed
[drm] *ERROR* hw_init of IP block  failed -22
drm:pid0:amdgpu_device_init *ERROR* amdgpu_device_ip_init failed
drm:pid0:amdgpu_attachhook *ERROR* Fatal error during GPU init
efifb0 at mainbus0: 3440x1440, 32bpp
wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
wskbd3: connecting to wsdisplay0
wskbd4: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Compiling the kernel with the additional powerplay changes relevant to vega
20 results in a similar message, although instead of the "hw_init" having
issues, it complains about "Unmatch PPTable version, vbios update may be
needed". I'd post a diff, but trying to generate a diff through cvs isn't
picking up the files I've added even with the --new-file option, but I'm
rather unfamiliar with cvs/diff in general so it's probable I screwed the
pooch on that part somehow. Any help would be very much appreciated, and
thanks for the help you've given already!

On Wed, Sep 4, 2019 at 8:04 PM Jonathan Gray  wrote:

> amdgpu tracks the linux-4.19.y (lts) branch of linux-stable
> currently this is 4.19.69
>
> On Wed, Sep 04, 2019 at 10:28:51AM -0500, Charlie Burnett wrote:
> > Thanks for the advice!
> > Do you happen to have a link to the commit amdgpu is at currently?
> >
> > On Wed, Sep 4, 2019 at 9:44 AM Jonathan Gray  wrote:
> >
> > > Look for individual post 4.19 linux commits that are relevant.
> > > We have in the past taken small patches to enable more
> > > generations of hardware.
> > >
> > > On Wed, Sep 04, 2019 at 08:11:24AM -0500, Charlie Burnett wrote:
> > > > Hey,
> > > > I???ve been trying to write a patch to get vega 20 working, but due
> to a
> > > > screw up on my end I lost the progress I???d made. Before I start
> over
> > > again,
> > > > I was wondering if you had any advice on how to do it? Before, I was
> > > trying
> > > > to more or less just port the vega 20 hwmgr files in from FreeBSD drm
> > > next
> > > > which is at linux drm 5.0 as well as the other files which seemed to
> > > > mention Vega 20 or seemed to be needed to compile. I wasn???t having
> much
> > > > luck as you can imagine, and currently I???m still in university so
> my
> > > > experience with kernel patching isn???t fantastic, I was wondering
> if you
> > > > might have any advice where to begin if I???m having to start from
> > > scratch?
> > > > Best regards,
> > > > Charlie Burnett
> > > >
> > > > On Thu, Aug 1, 2019 at 11:06 PM Jonathan Gray  wrote:
> > > >
> > > > > On Fri, Aug 02, 2019 at 03:11:54AM -0500, Charlie Burnett wrote:
> > > > > > Hey-
> > > > > > I'd been messing around with the AMDGPU on current (which I'm
> aware
> > > is
> > > > > very
> > > > > > experimental) and had very few issues with it using a Vega 56
> GPU. I
> > > > > > recently swapped to another Vega GPU (Radeon VII) and have issues
> > > with
> > > > > the
> > > > > > display not showing anything. Still boots fine, in that I can
> still
> > > enter
> > > > > > commands (i.e. reboot) so it has to be a display issue. I tried
> > > searching
> > > > > > for the diff where the firmware was added which I'm certain I saw
> > > (for
> > > > > Vega
> > > > > > 20) but can't seem to find it in the commit history. Anyone have
> a
> > > fix
> > > > > for
> > > > > > it, and if not, who should I talk to if I wanted to help get it
> > > working?
> > > > > I
> > > > > > saw most of the AMDGPU commits have been by @jonathangray if he
> > > would be
> > > > > > the best option.
> > > > > > Thanks!
> > > > >
> > > > > vega20 firmware was added when ports/sysutils/firmware/amdgpu was
> > > > > updated to 20190312.
> > > > >
> > > > > vega20 is marked as experimental in the version of drm we have,
> but we
> > > > > don't currently check the flag on probe like linux does.
> > > > >
> > > > > The following diff will prevent amdgpu from matching on devices
> > > > > in the amdgpu_pciidlist table with the AMD_EXP_HW_SUPPORT flag
> > > > > (currently these are all vega20 ids).
> > > > >
> > > > > Index: sys/dev/pci/drm/include/drm/drm_drv.h
> > > > > ===
> > > > > RCS file: /cvs/src/sys/dev/pci/drm/include/drm/drm_drv.h,v
> > > > > retrieving revision 1.2
> > > > > diff -u -p -r1.2 drm_drv.h
> > > > > --- sys/dev/pci/drm/include/drm/drm_drv.h   25 Jul 

Who has an ancient -current snapshot

2019-09-06 Thread Luke Small
I need an old kernel image older than maybe a couple weeks old. I have the
x8dth-6f motherboard and newer snapshots broke it. I made the mistake of
trying to downgrade to 6.5 and now I can boot my machine! I made a
not-bright decision.
-- 
-Luke


Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Theo de Raadt
Andreas Kusalananda Kähäri  wrote:

> On Fri, Sep 06, 2019 at 02:38:18PM -0600, Theo de Raadt wrote:
> > Christian Weisgerber  wrote:
> > 
> > > On 2019-09-06, Andreas Kusalananda Kähäri  wrote:
> > > 
> > > >> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
> > > >
> > > > The shells in the OpenBSD base system do not support matching regular
> > > > expressions with that syntax.  You may have been thinking of bash,
> > > 
> > > Just to head off crazy rumors: bash doesn't either.
> > 
> > Doesn't bash perform this task by invisibly calling out to perl?
> 
> You're thinking of zsh.

No I'm thinking it is all crazy.



Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Andreas Kusalananda Kähäri
On Fri, Sep 06, 2019 at 02:38:18PM -0600, Theo de Raadt wrote:
> Christian Weisgerber  wrote:
> 
> > On 2019-09-06, Andreas Kusalananda Kähäri  wrote:
> > 
> > >> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
> > >
> > > The shells in the OpenBSD base system do not support matching regular
> > > expressions with that syntax.  You may have been thinking of bash,
> > 
> > Just to head off crazy rumors: bash doesn't either.
> 
> Doesn't bash perform this task by invisibly calling out to perl?

You're thinking of zsh.



Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Raul Miller
On Fri, Sep 6, 2019 at 2:40 PM JohnS  wrote:
> Why next construction doesn't work?
>
> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done

People have been focusing on the syntax of arguments for test (the
left bracket operation), but there's no 'next' here.

You are reading x just once and then going into a loop. That's almost
certainly not what you want to do.

You might want to be doing something like this:

   while read x; ! echo $x | egrep -q '[abc]'; do echo 'Not a, b or c'; done

But, given how non-functional your code example was, and how
non-descriptive your surrounding text was, it's kind of hard to
tell...

That said, good luck,

-- 
Raul



Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Theo de Raadt
Christian Weisgerber  wrote:

> On 2019-09-06, Andreas Kusalananda Kähäri  wrote:
> 
> >> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
> >
> > The shells in the OpenBSD base system do not support matching regular
> > expressions with that syntax.  You may have been thinking of bash,
> 
> Just to head off crazy rumors: bash doesn't either.

Doesn't bash perform this task by invisibly calling out to perl?



Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Christian Weisgerber
On 2019-09-06, Andreas Kusalananda Kähäri  wrote:

>> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
>
> The shells in the OpenBSD base system do not support matching regular
> expressions with that syntax.  You may have been thinking of bash,

Just to head off crazy rumors: bash doesn't either.

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



Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Andreas Kusalananda Kähäri
On Fri, Sep 06, 2019 at 08:55:10PM +0200, Andreas Kusalananda Kähäri wrote:
> On Fri, Sep 06, 2019 at 11:39:06PM +0500, JohnS wrote:
> > Hi, all!
> > 
> > Why next construction doesn't work?
> > 
> > read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
> > 
> > I tried many variants but can't make it work. Moreover I don't understand 
> > WHY it
> > doesn't work?!
> > 
> > Thanks!
> 
> The shells in the OpenBSD base system do not support matching regular
> expressions with that syntax.  You may have been thinking of bash,
> 
> while [[ ! $x =~ [abc] ]]; do ...; done
> 
> Or, in ksh,
> 
> while [[ $x != [abc] ]]; do ...; done
> 
> Here however, [abc] is not a regular expression, but a filename globbing
> pattern, and the test will test for equality rather than trying to match
> a substring (as would be the case with a regular expression match).

"equality" was not quite what I meant. It would test for a match against
the whole of $x, as any globbing pattern would do, rather than a
substring of $x, as a regular expression would do. I.e., the bash code
above tests whether $x *contains* a, b, or c, while the ksh code beneath
it tests whether $x *is* a, b or c (and then the result of the test is
negated).

> 
> Note that this test requries [[ ... ]] rather than [ ... ].  See the
> ksh(1) manual.



Re: Xerox Phaser printing with CUPS

2019-09-06 Thread Jonathan Drews
On Fri, Sep 06, 2019 at 12:57:07PM +0100, Raf Czlonka wrote:
> Hi Jonathan,
> 
> Doesn't the printer work with base lpd? Is CUPS necessary?
> 
> Cheers,
> 
> Raf

 I tried CUPS first and it discovered my printers IP address
automatically. Plus LibreOffice printed documents with CUPS
without needing any print configuration. I printed some
spreadsheets out. They turned out fine.




Re: Why regex doesn't work in while loop's condition?

2019-09-06 Thread Andreas Kusalananda Kähäri
On Fri, Sep 06, 2019 at 11:39:06PM +0500, JohnS wrote:
> Hi, all!
> 
> Why next construction doesn't work?
> 
> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
> 
> I tried many variants but can't make it work. Moreover I don't understand WHY 
> it
> doesn't work?!
> 
> Thanks!

The shells in the OpenBSD base system do not support matching regular
expressions with that syntax.  You may have been thinking of bash,

while [[ ! $x =~ [abc] ]]; do ...; done

Or, in ksh,

while [[ $x != [abc] ]]; do ...; done

Here however, [abc] is not a regular expression, but a filename globbing
pattern, and the test will test for equality rather than trying to match
a substring (as would be the case with a regular expression match).

Note that this test requries [[ ... ]] rather than [ ... ].  See the
ksh(1) manual.



Why regex doesn't work in while loop's condition?

2019-09-06 Thread JohnS
Hi, all!

Why next construction doesn't work?

read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done

I tried many variants but can't make it work. Moreover I don't understand WHY it
doesn't work?!

Thanks!



Re: Xerox Phaser printing with CUPS

2019-09-06 Thread Jonathan Drews
On Thu, Sep 05, 2019 at 09:51:47PM -0400, Ian Darwin wrote:
> Nice post but:
> 
> On 9/5/19 20:41, Jonathan Drews wrote:
> > 2) Add the following line to your /etc/rc.conf.local file:
> > pkg_scripts=cupsd.
> 
> No need to manually edit that. Just do
> 
> ?? doas rcctl enable cupsd
> 
> > Reboot the computer to make sure CUPS is
> > running.
> 
> No need to reboot at that point. Just do:
> 
> ?? doas rcctl start cupsd
> 

I used the above configuration because the man page for rc.conf.local
said to. From man (8) rc.conf:

EXAMPLES
 Do not start the dhcpd(8) daemon when booting the system:

   dhcpd_flags=NO
.
.
 Run /etc/rc.d/messagebus then /etc/rc.d/cupsd with the start
argument at
 boot time, and in reverse order with the stop argument at
shutdown:

   pkg_scripts=messagebus cupsd

I don't use the message bus so I just used:
pkg_scripts=cupsd

I use the advice of the man pages first and foremost. 

My main purpose in posting this was to show you where to get the
*.ppd file. The other steps are just for context.




Re: Impossible to remove a broken package on 6.5.

2019-09-06 Thread me
On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote:
> Angelo Rossi [angelo.rossi.home...@gmail.com] wrote:
> > 
> > # pkg_delete -v kicad
> > Can't locate object method "updateset_with_new" via package
> > "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm
> > line 309.
> > 
> 
> Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should exist
> in /usr/libdata/perl5/OpenBSD/PkgAdd.pm
> 
> Your upgrade seems to have failed
> 

The upgrade probably didn't fail.  I ran into the exact same issue with
kicad-20100505p11;  The package is available in 6.4, but was removed
and marked broken in 6.5 due to an issue with python-wx. I think the
error message Angelo Rossi quoted is simply an issue with `pkg_delete`.
Pkg_delete doesn't know what to do with a package that isn't available
anymore.

I didn't know what to do here either. I just let the broken kicad package
float around on my machine :). I tried to take a stab at fixing it,
but my knowledge of pkg_add internals is limited.



Re: athn in 6.5: no link. Works in 6.4

2019-09-06 Thread Pedro Fortuny Ayuso
Hi!

Sorry for the delay. I have looked into the archives you provided and,
unfortunatley, already the version from April 21 does not work. I gather
from the referenced conversation that we may need to look into February.
Would it be possible to get those binaries?

Thanks a lot,


Pedro.

Stefan Sperling  writes:

> On Wed, Sep 04, 2019 at 04:55:02AM +, Pedro Fortuny Ayuso wrote:
>> How can I do that? I mean, commit of what files, etc?
>
> If all you need is a list of files in the source tree, the list is:
>
> sys/dev/ic/athn.c
> sys/dev/ic/athnvar.h
> sys/dev/ic/ar5008.c
> sys/dev/ic/ar5416.c
> sys/dev/ic/ar5416reg.h
> sys/dev/ic/ar9280.c
> sys/dev/ic/ar928reg.h
>
> The general idea is to test kernels from different dates and find out
> when things started breaking for you.
>
> To speed this up you could start by testing pre-compiled kernels from here:
> http://ftp.hostserver.de/archive/
>
> Based on other similar problem reports which have already been addressed
> a possible cut-off date is around February 2019:
> https://marc.info/?l=openbsd-bugs=155769666903558=2
>
> If you need more assistence let me know.


-- 
Pedro Fortuny Ayuso
http://pfortuny.net

Despacho 2-8-6
EPIG, Campus de Viesques, Gijon
Dpto. de Matematicas
Universidad de Oviedo



Re: Impossible to remove a broken package on 6.5.

2019-09-06 Thread Chris Cappuccio
Angelo Rossi [angelo.rossi.home...@gmail.com] wrote:
> 
> # pkg_delete -v kicad
> Can't locate object method "updateset_with_new" via package
> "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm
> line 309.
> 

Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should exist
in /usr/libdata/perl5/OpenBSD/PkgAdd.pm

Your upgrade seems to have failed



Re: wskbd without wsdisplay

2019-09-06 Thread allan
lol, how bout dat? only needin dem digits anyways.

fd = fopen("/dev/wskbd0", "r");
if (fd != NULL) {
c = 0;
while (c < 9) {
fread(buf, 48, 1, fd);
if (buf[0] == 2 && buf[1] == 0 && buf[2] == 0 && buf[3] == 0) {
z = buf[4] - 29;
if (z == 10)
z = 0;

printf("%d", z);
c++;
}
}
} else
perror("wskdb0");

On Wed, Sep 4, 2019 at 5:10 PM allan  wrote:

> I want to use an USB-keyboard/barcode-reader on a pc-engines apu.  Since
> the apu has no graphics card, there is no wsdisplay and the keyboard stays
> unconnected.
>
> # wsconscfg -k
> wsconscfg: /dev/ttyCcfg: Device not configured
>
> How can I read that keyboard input?  Do I even have to write some C and
> use usbhid.h or is there an api in wscons for that?  Or something simpler?
> Any hints or directions to go would be appreciated.
>
> Thanks.
>
>


Re: athn bugs: usbd_free_xfer and fail HT-MCS

2019-09-06 Thread Stefan Sperling
Thanks. These bugs are up for anyone to tackle. I'm already overloaded.

On Fri, Sep 06, 2019 at 06:46:52AM -0300, fogkt...@airmail.cc wrote:
> Hi! Wanted to report some bugs with athn firmware. I know there has been
> some updates
> recently (thanks mostly to stsp@ and kevlo@), so I'm not sure what I'm
> reporting is already known or not. I'm using OpenBSD 6.5, not -current (let
> me know if full dmesg is needed - the hardware is a AMD Ryzen 5). The
> adapter
> is a TP-Link TL-WN722N (firmware instaled using fw_update):
> 
> athn0 at uhub1 port 4 configuration 1 interface 0 "ATHEROS USB2.0 WLAN" rev
> 2.00/1.08 addr 4
> athn0: AR9271 rev 1 (1T1R), ROM rev 13
> 
> While using client mode (not HostAP), this bug happens some times:
> 
> usbd_free_xfer: xfer=0xfd81e0bd53d0 not free
> usbd_free_xfer: xfer=0xfd81831163c0 not free
> usbd_free_xfer: xfer=0xfd81e0c2de18 not free
> 
> I'm unable to reconnect the device, it's just not recognized anymore until
> next boot.
> I'm sure this is not a hardware issue, as it works on other systems.
> There was a hypothesis that USB is not sending enough power on 2.0 ports
> [1].
> So I connected to a standalone 3.0 port, and the same still happens.
> kevlo@ reported his device (same as the one I'm using) is working just fine
> in older releases [2].
> 
> The second bug is with 11n HT-MCS. It doesn't work at all. The only mode
> that
> works is 11g OFDM58. But the speed is not great. I know I'm not doing a
> proper benchmark
> with iperf3, but the difference is very significant between ath9k-open on
> debian and openbsd.
> The maximum speed I could get on OpenBSD was 1.5MB/s, while on Debian it
> gets up to ~6.0MB/s.
> I don't expect the same speed and I'm not complaining, just wanted to point
> out that this
> might be because HT-MCS is not working (at least for me).
> 
> Will the new release solve some of these issues? Thanks for all the work
> this year!
> Looking foward for the next release (bin patches seems great).
> 
> 
> [1] https://marc.info/?l=openbsd-bugs=153268350614634=2
> [2] https://marc.info/?l=openbsd-tech=151090602510672=2
> 



athn bugs: usbd_free_xfer and fail HT-MCS

2019-09-06 Thread fogktstv
Hi! Wanted to report some bugs with athn firmware. I know there has been 
some updates

recently (thanks mostly to stsp@ and kevlo@), so I'm not sure what I'm
reporting is already known or not. I'm using OpenBSD 6.5, not -current 
(let
me know if full dmesg is needed - the hardware is a AMD Ryzen 5). The 
adapter

is a TP-Link TL-WN722N (firmware instaled using fw_update):

athn0 at uhub1 port 4 configuration 1 interface 0 "ATHEROS USB2.0 WLAN" 
rev 2.00/1.08 addr 4

athn0: AR9271 rev 1 (1T1R), ROM rev 13

While using client mode (not HostAP), this bug happens some times:

usbd_free_xfer: xfer=0xfd81e0bd53d0 not free
usbd_free_xfer: xfer=0xfd81831163c0 not free
usbd_free_xfer: xfer=0xfd81e0c2de18 not free

I'm unable to reconnect the device, it's just not recognized anymore 
until next boot.

I'm sure this is not a hardware issue, as it works on other systems.
There was a hypothesis that USB is not sending enough power on 2.0 ports 
[1].

So I connected to a standalone 3.0 port, and the same still happens.
kevlo@ reported his device (same as the one I'm using) is working just 
fine

in older releases [2].

The second bug is with 11n HT-MCS. It doesn't work at all. The only mode 
that
works is 11g OFDM58. But the speed is not great. I know I'm not doing a 
proper benchmark
with iperf3, but the difference is very significant between ath9k-open 
on debian and openbsd.
The maximum speed I could get on OpenBSD was 1.5MB/s, while on Debian it 
gets up to ~6.0MB/s.
I don't expect the same speed and I'm not complaining, just wanted to 
point out that this

might be because HT-MCS is not working (at least for me).

Will the new release solve some of these issues? Thanks for all the work 
this year!

Looking foward for the next release (bin patches seems great).


[1] https://marc.info/?l=openbsd-bugs=153268350614634=2
[2] https://marc.info/?l=openbsd-tech=151090602510672=2



Re: Xerox Phaser printing with CUPS

2019-09-06 Thread Stuart Henderson
On 2019-09-06, Jonathan Drews  wrote:
>  You have to use the absolute path name
> /usr/local/bin/lpr, /usr/local/bin/lprm, /usr/local/bin/lpq and 
> /usr/local/bin/lp to print with CUPS.

I don't like the extra typing so I have this in .kshrc :

for i in dig lpq lpr lprm; do
alias $i=/usr/local/bin/$i
done




Re: What is you motivational to use OpenBSD

2019-09-06 Thread Péter Bertalan Zoltán
Mohamed salah  [2019-08-28 16:32:29 +0200]:
> I wanna put something in discussion, what's your motivational to use
> OPENBSD what not other bsd's what not gnu/Linux, if something doesn't
> work fine on openbsd and you love this os so much what will do?

My journey was

Windows ---> ‘friendly Linux’ ---> ‘less friendly Linux’ ---> OpenBSD

I (sadly) grew up on using Windows and other MS products, but being
interested in computers I kept checking out Linux (Ubuntu) after a
while, but I always got fed up relatively quickly because things just
didn't work how they worked on Windows.

There was always something I had to mess around with, which I partly
enjoyed but at the same time it could be very frustrating (eg. somebody
asking me to copy a few images over from their phone only to discover
there's no such driver for Linux and spending two days trying to find
some solution or not being able to just run software everyone else was
running without problems on Windows, etc).

This made me dual boot after a while and often I just fell back to
Windows altogether. Then I chose to force myself to learn more about the
Linux world by trying out Arch Linux, which was arguably a bit more
challenging than say Ubuntu or Linux Mint. The quirks were *not* much
better though. Things broke, crashed or just didn't work at all.

Finally I stumbled upon some articles on OpenBSD around a year ago --
just at the right time because I think now my computing skills were
finally adequate and I started having a thing for privacy and FOSS at
that time. I decided to give it a try and I have zero regrets. It took a
little effort to familiarize myself with the differences (such as having
to use different command line options or different programs altogether),
but OpenBSD has taught me a lot and I am sure I still have a *lot* to
learn.

I can't say OpenBSD fixed all problems I had with computers though --
for example I can't use adb to connect to my Android phone and I am
unable to have UTF-8 characters outside X, but I am certain the benefits
overweight these tiny drawbacks. The defaults are indeed very sane, the
system is good to use out of the box. PF is absolutely wonderful.
Although I like experimenting with things, I like that basically
everything you might need is in the base system. Of course I must also
mention the legendary man pages. I didn't have random and sometimes
extremely infuriating crashes and my system never broke like a few
experiences I recall from Arch. I am very grateful for the developers
of OpenBSD and I am looking forward to contribute to it once I get to
that level. So if you are a contributor and are reading this, thank you!
:-)

PS sorry about the lengthy email, I hope it's not too inappropriate

-- 
Bertalan Z. Péter 
FB9B 34FE 3500 3977 92AE  4809 935C 3BEB 44C1 0F89

/"\
\ /ASCII Ribbon Campaign
 X   against HTML email & proprietary attachments
/ \www.asciiribbon.org



Impossible to remove a broken package on 6.5.

2019-09-06 Thread Angelo Rossi
Hi,

Please help, I've got kicad-20100505p11 installed on 6.4 for some reason,
then I forgot it
and upgraded to 6.5. During a pkg_add -v -u I've got an error said that it
cannot
upgrade kicad, so I tried to remove it with pkg_delete:

# pkg_delete -v kicad
Can't locate object method "updateset_with_new" via package
"OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm
line 309.

# pkg_delete -v -D baddepend -D dependencies kicad
Can't locate object method "updateset_with_new" via package
"OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm
line 309.

# dmesg
OpenBSD 6.5 (GENERIC.MP) #5: Thu Aug 29 20:38:30 CEST 2019
r...@syspatch-65-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/
GENERIC.MP
real mem = 8438480896 (8047MB)
avail mem = 8173101056 (7794MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f400 (63 entries)
bios0: vendor American Megatrends Inc. version "1303" date 04/13/2011
bios0: ASUSTeK Computer INC. M4N78 PRO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET INFO NVHD SSDT
acpi0: wakeup devices UAR1(S4) SMB0(S4) USB0(S4) USB2(S3) US15(S4) US12(S3)
NMAC(S5) P0P1(S4) HDAC(S4) MXR0(S4) BR11(S4) BR12(S4) BR13(S4) BR14(S4)
BR15(S4) BR16(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) II X2 240 Processor, 2800.48 MHz, 10-06-02
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu0: AMD erratum 721 detected and fixed
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) II X2 240 Processor, 2800.01 MHz, 10-06-02
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu1: AMD erratum 721 detected and fixed
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 2500 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiprt2 at acpi0: bus 2 (IXVE)
acpiprt3 at acpi0: bus 3 (MXR0)
acpiprt4 at acpi0: bus -1 (BR11)
acpiprt5 at acpi0: bus -1 (BR12)
acpiprt6 at acpi0: bus 4 (BR13)
acpiprt7 at acpi0: bus 5 (BR14)
acpiprt8 at acpi0: bus -1 (BR15)
acpiprt9 at acpi0: bus -1 (BR16)
acpiprt10 at acpi0: bus -1 (BR17)
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
aibs0 at acpi0 RTMP RVLT RFAN GGRP GITM SITM
acpicmos0 at acpi0
"*pnp0c14" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"AWY0001" at acpi0 not configured
cpu0: 2800 MHz: speeds: 2800 2100 1600 800 MHz
pci0 at mainbus0 bus 0
"NVIDIA MCP77 Memory" rev 0xa2 at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 1 function 0 "NVIDIA MCP77 ISA" rev 0xa2
nviic0 at pci0 dev 1 function 1 "NVIDIA MCP77 SMBus" rev 0xa1
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL6
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL6
spdmem2 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL6
spdmem3 at iic0 addr 0x53: 2GB DDR2 SDRAM non-parity PC2-6400CL6
iic1 at nviic0
"NVIDIA MCP77 Memory" rev 0xa1 at pci0 dev 1 function 2 not configured
"NVIDIA MCP77 Co-processor" rev 0xa2 at pci0 dev 1 function 3 not configured
"NVIDIA MCP77 Memory" rev 0xa1 at pci0 dev 1 function 4 not configured
ohci0 at pci0 dev 2 function 0 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 15,
version 1.0, legacy support
ehci0 at pci0 dev 2 function 1 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "NVIDIA EHCI root hub" rev
2.00/1.00 addr 1
ohci1 at pci0 dev 4 function 0 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 10,
version 1.0, legacy support
ehci1 at pci0 dev 4 function 1 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 14
usb1 at ehci1: USB revision 2.0
uhub1 

Re: Kerberos SSH routing tables problem

2019-09-06 Thread Stuart Henderson
The __automatic table is created by pfctl's ruleset optimiser, probably 
from $broken.


I suspect this ilauncher program is tripping either sshguard or your 
max-src-conn-rate or max-src-conn rules.



--
Sent from a phone, apologies for poor formatting.

On 6 September 2019 03:57:04 Predrag Punosevac  wrote:


On 2019-08-02, Stuart Henderson wrote:


On 2019-07-29, Predrag Punosevac  wrote:

Hi Misc,


I am using Edgerouter lite as a firewall/DNS cashing resolver for one of
our remote location


ubnt1# uname -mrsv
OpenBSD 6.5 GENERIC.MP#0 octeon


The desktops behind the firewall have to use Kerberised SSH to perform
some work on one of .mil servers. I opened egress ports kerberos,
klogin, kshell TCP protocol as well as kerberos UDP. After the work is
finished and desktops are "logged out" routing tables (dns) are in a bad
state on the firewall. A simple


pfctl -F all -f /etc/pf.conf


fixes the problem and desktops can again do DNS resolving and surfing
the Internet.


Could somebody give me a head start how to go about further trouble
shooting and fixing the problem? Obviously flashing states is not very
convenient.


Most Kind Regards,
Predrag Punosevac


Hi Sthen,

I apologize for long silence. I got busy with other stuff and this got
put onto the back burner.


Can you go into some more details about what the "bad state" is?


Please forgive me for repating some things from my original email. After
rereading it I realized that I sounded like a mentally disturb
individual.

As I mentioned in my original email my folks are using Kerberised SSH to
log into some .mil computing nodes. OpenBSD 6.5 release running of
Edgerouter lite provides PF/Unbound DNS caching resolver to our office
computers. In order to reach .mil server I opened in egress direction
bunch of kerberos related ports. Thing worked like a charm. Then one day
somebody start complaining that after the Kerberized ssh session with
.mil server is closed they no longer can connect to the Internet.
Original problem report was complaining about non reachable DNS resolver
on my firewall but after further investigation I tracked down problem to
state of PF tables.

To make things more convoluted I discovered that actually problem was
not caused per se by Kerberized SSH session but a .mil homemade
application called ilauncher session. iluncher provides a web interface
similar to CUPS http://localhost:631 which is used to manage/connect
access to bunch of scientific related software packages (Jupyter
Notebooks, RStudio, etc) in a "user friendly" way. After the ilauncher
session is finished my firewall refuses any network connection to the
workstation from which ilauncher was run. The only remedy is to clear
all tables. Note that I always see that three tables are cleared when I
do

pfctl -F Tables

After that everything works as expected. Right now

ubnt1# pfctl -s Tables

lists no tables while on my home network with similar firewall rules I
see three tables.

minix# pfctl -s Tables
__automatic_1c228804_0
bruteforce
sshguard


This is our office pf.conf file. I am planning to reproduce one more
time problem but this time to start flashing tables one by one until I
see which one is related to that ilauncher thing.


ext_if="cnmac0"
int_if="cnmac1"
dmz_if="cnmac2"
lan_net = "{192.168.1.0/24}"

broken = "{224.0.0.22, 127.0.0.0/8, 172.16.0.0/12, \
 10.0.0.0/8,  169.254.0.0/16, 192.0.2.0/24, 192.168.100.0/24 \
   198.51.100.0/24, 203.0.113.0/24, \
   0.0.0.0/8,   240.0.0.0/4, 255.255.255.255/32}"
table  persist
table  persist


tcp_services = "{ssh, submission, imaps, http, https, 30041, 8080, \
   kerberos, klogin, kshell}"
udp_services= "{domain, ntp, kerberos}"


set block-policy return
set limit states 10
set loginterface $ext_if
set optimization normal
set ruleset-optimization basic
set skip on lo
set state-policy floating
set timeout interval 10
set timeout frag 30
set timeout src.track 0
set state-defaults pflow


match in all scrub (no-df max-mss 1440)
match out on egress inet from !(egress:network) to any nat-to (egress:0)


block quick from 
block in quick on $ext_if proto tcp from  \
   to any port ssh label "ssh bruteforce"
antispoof quick for { $int_if $ext_if }


block drop in quick on egress from {$broken, no-route} to any
block drop in quick from urpf-failed to any
block drop in quick on ! lo0 proto tcp to port 6000:6010

block all


pass inet proto icmp all icmp-type { echoreq, unreach }
pass out on $ext_if inet proto udp to any port $udp_services
pass out on $ext_if inet proto tcp to any port $tcp_services

pass log on $ext_if inet proto tcp from any to any port {ssh} \
   flags S/SA keep state \
   (max-src-conn 100, max-src-conn-rate 15/5, \
overload  flush global)

pass inet proto tcp from {$lan_net} to any port $tcp_services
pass inet proto udp from {$lan_net} to any port $udp_services






"routing tables (dns) are in a bad state on the firewall" 

Re: Postscript printer recommendations

2019-09-06 Thread Jonathan Drews
On Tue, Jul 16, 2019 at 11:18:16AM -0700, BSD user wrote:
> 
> 
> On 7/16/19 11:03 AM, Jonathan Drews wrote:
> > 
> > *** WARNING ***
> > ulpt(4) needs to be disabled in the kernel (see config(8)) or the printer
> > will not be available to libusb.
> > 
> > 
> > I read the manpage for config (8) and I can't seem to find the appropriate
> > configuration file in /usr/src/sys/arch/amd64/compile. I'll have to
> > read up on compiling the kernel and modifying it's configuration file.
> > Once again thanks for all the generous help form you guys.
> > 
> > Regards,
> > Jonathan
> > 
> 
> I think you can temporarily disable ulpt via ukc, but I can't confirm as
> I'm currently travelling.
> 
> As sthen@ said (IIRC) earlier in the thread, if your printer has
> networking (ethernet or wifi) support, it's usually easiest to just
> print over the network as it saves having to mess with kernel configs
> and device node permissions.
> 
> 
Thanks for your suggestion. I got a Xerox Phaser 6022 Laser printer. It's
working great. I made a separate post about configuring it using
CUPS.