Re: Qsynth midi latency not low enough... what to do?

2018-12-01 Thread Ken M
On Sat, Dec 01, 2018 at 01:19:00PM -0600, Adam Thompson wrote:
> PROBLEM STATEMENT: driving FluidSynth from a MIDI controller produces ~1/4sec 
> delay between keypress and sound.
> 
> NARRATIVE:
> 
> I finally got Qsynth working under Xfce (it freezes X under twm!) so I can 
> control fluidsynth in a reasonably-obvious way... but I am now experiencing 
> substantial latency.
> The good news is that it feels just like playing an old pneumatic or tracker 
> organ, where there’s a ~0.25sec delay between keypress and sound.
> The bad news is that it feels just like playing an old pneumatic or tracker 
> organ...
> 
> I’m not a good enough musician to handle the roughly quarter-second delay 
> when playing live.  I know from many musicians that near-zero-latency from 
> MIDI softsynths (even when using soundfonts) is possible... although no-one I 
> know of uses OpenBSD.
> 
> Is sndio(4) suitable for real-time(-ish) performance?  Or do I need a (OS) 
> platform that does ASIO or JACK?  (I mostly play by ear so I'm targeting 
> <<0.1sec latency.)
> 
> If sndio core or umidi(4) support isn’t the problem, the only obvious thing 
> to blame is FluidSynth... but the CPU in this laptop should be more than up 
> to the task, and – again – I know this particular piece of software handles 
> low-latency live performance in other configurations (i.e. on Linux, using 
> JACK).
> I don't suspect Qsynth at the moment, as it only controls how fluidsynth 
> launches, it doesn't put itself in the data path.
> 
> Unsurprisingly, I’ve been unable to find any useful information on running 
> this kind of setup under OpenBSD.  But as mentioned before, I’m trying to 
> avoid the (to me) insanity that is JACK.
> 
> Dmesg follows, just in case anyone spots anything useful in there…
> 
> Hardware setup, broadly:
> * Dell Latitude E6430 laptop
>   - booting in EFI mode to work around a weird bootloader bug
> * onboard azalia(4) audio (for now) using onboard speakers (for now)
> * Roland A500PRO MIDI controller, connected via USB
> * M-audio Uno USB-MIDI, nothing connected to it yet
> * No-name USB 5.1ch Audio DAC from Amazon, nothing connected to it yet
>   - (leaving the M-audio umidi and the "ABC" uaudio devices disconnected 
> makes no difference)
> 
> 
> Advice / pointers gratefully accepted, including pointers to documentation or 
> threads I may have missed.
> 
> Thanks,
> -Adam
> 
> 
> Dmesg << __EOF__ (so to speak)
>  OpenBSD 6.4 (GENERIC.MP) #1: Mon Nov 26 10:18:14 CET 2018
> 
> r...@syspatch-64-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8471482368 (8079MB)
> avail mem = 8205459456 (7825MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xebf40 (101 entries)
> bios0: vendor Dell Inc. version "A21" date 05/08/2017
> bios0: Dell Inc. Latitude E6430
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT MCFG SSDT HPET SSDT SSDT SSDT ASF! SLIC 
> BGRT SSDT
> acpi0: wakeup devices P0P1(S4) USB1(S3) USB2(S3) USB3(S3) USB5(S3) USB6(S3) 
> USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP05(S4) PXSX(S4) 
> RP06(S4) PXSX(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2193.29 MHz, 06-3a-09
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
> cpu2: 
> 

Re: FreeBSD in vmm

2018-11-20 Thread Ken M
On Tue, Nov 20, 2018 at 06:40:50PM -0800, Philip Guenther wrote:
> 
> Not supported yet.  There will be some sort of announcement when it works.
> 
> 
> Philip Guenther

OK thank you. I was figuring it was me because I have gotten pretty much most of
the main Linux distros to work. In fact the only one I never sorted out before
this was Android-x86. Mostly just experimenting with just how much I can do with
vmm. No specific need I am trying to address.

Ken



FreeBSD in vmm

2018-11-20 Thread Ken M
Has anyone gotten this working?

Just trying it as an experiment.

I installed using qemu, serial console is working but when I boot through vmctl
the console shows a supervisor read error, page not found which from what I read
is indicative of bad memory. In qemu it boots fine though. Not sure what I am
missing.

Ken



Re: OpenBSD migration

2018-11-17 Thread Ken M
On Sat, Nov 17, 2018 at 10:42:57PM +0100, Ingo Schwarze wrote:
> Hi Martin,
> 
> Martin Sukany wrote on Sat, Nov 17, 2018 at 09:13:15PM +0100:
> 
> > I want to migrate OpenBSD 6.4 (stable) from VM to bare metal. I see, as 
> > usual, two options:
> > 
> > 1) install everything from scratch
> > 2) create some flashimage (I did such thing on Solaris few years ago) 
> > and apply the image on new hw.
> 
> I'd recommend option 1), reinstall.
> 
> I have no idea whether or not option 2) will work.  It may or may not.
> If it doesn't, you end up doing a reinstall anyway, and nobody will be
> interested in the reasons why it didn't work for you.  Such a thing
> simply isn't supported.
> 
> Yours,
>   Ingo
> 
I second reinstall. If you are concerned about setting things up the same I tend
to do as couple tricks to make my setup portable. I have a tgz I created of
important ~/.config items, mostly related to my openbox setup. I have git repos
for my vim, mutt, fish, and ~/.local/bin items. I have a tgz of important /etc
items, particularly vm.conf virtual host info for vmm, pf, etc.

Lastly I have a master file of my installed packages created from pkg_info
(forget the specific flags) but you can feel that file to a pkg add and let it
install everything for you.

Ken



Re: python3 script not running as root

2018-11-15 Thread Ken M
On Thu, Nov 15, 2018 at 09:36:45AM +0100, Markus Rosjat wrote:
> as daniel also suggested I will try the the PATH crontab approach and this
> is because scripts with a full path in the shebang seem to run anymore on
> 6.4
> 
> regards
> 

Yeah just checked my scripts I was referring to (they are for systend on linux
system). but actually in the gunicorn example I do this:

Set the PATH variable to the .venv/bin
the exec line actually points to .venv/bin/gunicorn in this case and calls the
service by module name under that venv. I think I did it this way to specify
serving on a .sock. Can't remember.

Ken



Re: python3 script not running as root

2018-11-15 Thread Ken M
On Thu, Nov 15, 2018 at 09:24:10AM +0100, Martin Sukany wrote:
> Hi,
> 
> you'd fix this by defining PATH variable in your crontab, or specify the
> full path to python3 interpreter instead using env.
> 
> M>
> 
> 

As the others said, and to expand, it is probably from the shebang line of your
python script which you should not change. You just want cron to not use it. So
in short in yourscript.py the first line should be #!/usr/bin/env python3, you
should call the scipt in cron as such:

/usr/local/bin/python3 /path/to/yourscript.py

Also that would be the same way to do it in a service. The reason I say that is
the specific best solution is in case your python script has dependencies in a
.venv or a specific python version and you have multiple. So you can change the
above to be as such.

/path/to/project/.venv/bin/python /path/to/project/yourscript.py

I use that syntax for example to spawn gunicorn served microservices.

Ken



Re: Issue with pkg_add against snapshots

2018-11-10 Thread Ken M
On Sat, Nov 10, 2018 at 08:29:02AM +0200, Timo Myyrä wrote:
> 
> There was some error in libssl which has been already fixed.
> I did cvs up in /usr/src/lib/libssl and 'make install' in there to fix it. 
> Also
> the HTTP mirrors should work too while new snapshot is made.
> 
> timo

Thank you, that squared it away for now. I had actually switched to an ftp
mirror temporarily as a stop gap but just rebuilt libssl and switched to my
usual mirror and all is well.

Appreciate the info, thank you.

Ken



Issue with pkg_add against snapshots

2018-11-09 Thread Ken M
Example:

https://fastly.cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/compton-0.1_beta2p2.tgz:
 ftp: SSL write error: handshake failed: error:1404C044:SSL 
routines:ST_OK:internal error
signify: gzheader truncated

Basically all my packages are showing this after a doas pkg_add -uUvVm

Checking the link it resolves, tried another mirror, smae thing...

Ken



Re: Send midi to software

2018-11-04 Thread Ken M
On Sun, Nov 04, 2018 at 03:22:23PM +0100, Alexandre Ratchov wrote:
> IIRC, the lmms sndio-midi backend lacks the "device chooser dialog",
> so it uses "default" as midi device, which translates
> "midithru/0". Your controller is probably "rmidi/0", so lmms doesn't
> use it.
> 
> You could workaround this by redefining the "default" midi port,
> starting lmms as follows:
> 
>   MIDIDEVICE=rmidi/0 lmms
> 
> assuming "rmidi/0" is your midi controller. Patching the sndio-midi
> code to implement the "device chooser" seems to be the nicer option.

Setting MIDIDEVICE worked flawlessly, as a follow up.

Thank you

Ken



Re: Send midi to software

2018-11-04 Thread Ken M
As an alternative could I cat rmidi0 to midithru0?

I will look into patching lmms as well. 

Sent from my iPad

> On Nov 4, 2018, at 9:22 AM, Alexandre Ratchov  wrote:
> 
>> On Sat, Nov 03, 2018 at 02:26:59PM -0400, Ken M wrote:
>> So I am sure I am missing something stupid. Just the first time I have tried 
>> a
>> midi controller with openbsd.
>> 
>> So the device shows in the dmesg
>> a hexdump shows I am receiving sounds
>> but in lmms even with a device set to receive midi, nothing happens.
>> 
>> And yes sound is coming from lmms.
>> 
>> I am guessing there is something obvious I am missing. lmms is set to 
>> sndio-midi
>> in the preferences.
>> 
> 
> IIRC, the lmms sndio-midi backend lacks the "device chooser dialog",
> so it uses "default" as midi device, which translates
> "midithru/0". Your controller is probably "rmidi/0", so lmms doesn't
> use it.
> 
> You could workaround this by redefining the "default" midi port,
> starting lmms as follows:
> 
>MIDIDEVICE=rmidi/0 lmms
> 
> assuming "rmidi/0" is your midi controller. Patching the sndio-midi
> code to implement the "device chooser" seems to be the nicer option.



Send midi to software

2018-11-03 Thread Ken M
So I am sure I am missing something stupid. Just the first time I have tried a
midi controller with openbsd.

So the device shows in the dmesg
a hexdump shows I am receiving sounds
but in lmms even with a device set to receive midi, nothing happens.

And yes sound is coming from lmms.

I am guessing there is something obvious I am missing. lmms is set to sndio-midi
in the preferences.

Ken



Re: Sound from vmm guest

2018-10-27 Thread Ken M
OK found the problem, the compiled sndio bridge was in the wrong place. Found
the right place.

And the reason I post here to the group again is sndio plus vmm is awesome.

Truth is reading about sndio was my main reason for even trying out OpenBSD.
Perhaps that is an odd reasons to some, but for me it was a big factor.

Thank you for the help.

Ken



Re: Sound from vmm guest

2018-10-27 Thread Ken M
On Sat, Oct 27, 2018 at 08:51:43PM +0200, David Coppa wrote:
> 
> Have you installed the alsa-plugins package?

So being wary and maybe we take this off list because the problem is not openbsd
related, it is debian related and openbsd is receiving the audio fine.

In debian the alsa-plugins are actually in libasound2-plugins, and yes that is
installed, I also purged pulseaudio from debian just to be sure. Right now an
alsamixer command tells me no mixer found and a cat on /proc/asound/cards does
nothing, well shows no cards. So I think the problem is in the asound.conf, not
sure what yet.



Re: Sound from vmm guest

2018-10-27 Thread Ken M
On Sat, Oct 27, 2018 at 07:23:05PM +0200, David Coppa wrote:
> 
> Hi,
> 
> Here's what I've done:
> 
> 1) Install libsndio on the Linux guest (I've used
> http://www.sndio.org/sndio.tar.gz)
> 
> 2) Compile this alsa plugin on the Linux guest:
> https://github.com/Duncaen/alsa-sndio
> 
> 3) Copy libasound_module_pcm_sndio.so under /usr/lib/alsa-lib/ (I'm on
> Arch Linux, YMMV)
> 
> 4) Create a /etc/asound.conf file containing the following lines:
> 
> pcm.!default {
> type sndio
> device "snd@100.64.1.1/0"
> }
> 
> Where 100.64.1.1 is the ip address of the host.
> 
> Enjoy,
> David

So an update, forwarding audio from the guest to the host with sndiod on debian
sid works fine, as tested with aucat. It is getting the last part, alsa to see
it that is not cooperating yet.



Re: Sound from vmm guest

2018-10-27 Thread Ken M
On Sat, Oct 27, 2018 at 10:15:45AM +0200, Alexandre Ratchov wrote:
> On Fri, Oct 26, 2018 at 07:49:16PM -0400, Ken M wrote:
> > 
> > xfreerdp /sound:sys:sndio,dev:/dev/audio /v:host
>   ^^
> 
> If this is the sndio device name, it should be "default", not "/dev/audio".
> You could do "man sndio" to see sndio device names syntax.

No dice there: same basic error as other attempts:

[11:20:26:235] [33299:dfafba40] [ERROR][com.winpr.library] - LoadLibraryA: File 
not found
[11:20:26:235] [33299:dfafba40] [WARN][com.freerdp.addin] - Failed to load 
channel rdpsnd [default]
[11:20:26:235] [33299:dfafba40] [ERROR][com.freerdp.channels.rdpsnd.client] - 
unable to load the default subsystem plugin because of error 1359
[11:20:26:235] [33299:dfafba40] [ERROR][com.freerdp.channels.rdpsnd.client] - 
error connecting sound channel
[11:20:26:237] [33299:75308840] [ERROR][com.freerdp.core] - 
rdpsnd_virtual_channel_client_thread reported an error. Error was 1359



Sound from vmm guest

2018-10-26 Thread Ken M
So I am working on a bit of an experiment. I have a debian sid guest in vmm.
xrdp is installed as is the pulse audio module for xrdp so that it can see the
xrdp output in the mixer. I can connect just fine till I try to get sound out.
Remmina wouldn't work with sound so to have more control I tried xfreerdp. An
example of the options I tried.

xfreerdp /sound:sys:sndio,dev:/dev/audio /v:host

Basically I can't get it to connect with sound. I can put together a whole log
and all, but I was wondering if anyone can suggest how the /sound flag should be
under openbsd, or perhaps an alternate method to get sound out of a vmm guest
via gui. Or perhaps it is just not possible as of today.

To mention I did double check I could cat a wav file to /dev/audio and that
worked just fine.

Ken



Latest snapshot pkg_add issue

2018-10-06 Thread Ken M
I just installed the latest snapshot and when I run a pkg_add it doesn't find
anything as it is trying to look in 6.4 for packages.

$ uname -r
6.4

Not sure if this is an issue in the latest snapshot or I stupidly missed some
information.



Re: Best USB WIFI Dongle

2018-09-22 Thread Ken M
On Sat, Sep 22, 2018 at 12:37:22PM -0500, Edgar Pettijohn III wrote:
> 
> 
> https://marc.info/?l=openbsd-misc=152381830319718=2
> 

Thank you, I just went right ahead and ordered it as it hit all the marks. Much
appreciated.

Ken



Best USB WIFI Dongle

2018-09-22 Thread Ken M
Can anyone make a recommendation for the best usb wifi dongle to use with
OpenBSD.

Criteria

(in order)

1. good range
2. good speed
3. low profile/small size

I realize priority 3 is typically going to compromise the first 2 priorities, so
I guess I am looking for a balance.

Thank you

Ken



Re: xscreensaver locking disabled

2018-09-22 Thread Ken M
On Sat, Sep 22, 2018 at 02:51:43AM +0100, Stuart Henderson wrote:
> 
> /, /usr, and /usr/X11R6 definitely contain programs that need setuid, and 
> /usr/local
> is likely to in many cases. Other partitions generally don't, so you can 
> mount them
> with "nosuid".
> 
> While on the subject of mount options, most things can be "nodev" (exceptions 
> being
> / and maybe mounts holding chroot jails, for example the mount containing 
> /var/www).
> 
> I used to like "noexec" for /tmp, but then I spent too long chasing ports 
> regression
> test failures due to having this restriction, so I got rid of it ..
> 

Thanks for some of this guidance. I know there is a great deal of information on
these options in the man page for mount but this is helpful.

Ken



Re: xscreensaver locking disabled

2018-09-21 Thread Ken M
On Fri, Sep 21, 2018 at 11:07:55AM +, Stuart Henderson wrote:
> 
> Given the permissions you showed, the most likely reason would be if
> /usr/local is mounted with the "nosuid" flag.
> 
> 

That was the issue, fixed that and locking works perfectly, thank you.

If I may a quick side question since this stems from my repartitioning of my
/usr mount points.

I have /usr /usr/local and /usr/ports as separate mount points. local now does
nto have nosuid, should /usr or /usr/ports have or not have that? Right now /usr
does not but /usr/ports does. To my mind that seems right, but well, as already
proven in this thread my mind was incorrect on that.

Ken



Re: xscreensaver locking disabled

2018-09-21 Thread Ken M
On Thu, Sep 20, 2018 at 08:20:18PM -0900, Philip Guenther wrote:
> If xscreensaver decides it can't do locking, then when started it should
> write to stderr why it thinks that.  Does openbox capture the stderr of the
> processes that it starts to some file you can review?  If not, then stop
> xscreensaver with
>  xscreensaver-command -exit
> and then start xscreensaver against manually in a shell and see what it
> says.
> 
> Philip Guenther

So below is what I did and that reveals a bit more.

$ xscreensaver-command -exit
xscreensaver-command: exiting.

$ ps aux|grep xscreen
me 73706  0.0  0.0   308  1348 p1  S+p6:48AM0:00.01 grep xscreen
$ xscreensaver &&
> xscreensaver-command -lock
xscreensaver: 06:48:31: couldn't get password of "me"
xscreensaver: 06:48:31: couldn't get password of "root"
xscreensaver: 06:48:31: locking is disabled (error getting password).
xscreensaver: 06:48:31: does xscreensaver need to be setuid?  consult the 
manual.



xscreensaver locking disabled

2018-09-20 Thread Ken M
I am following -current and use openbox if it matters for my window manager.
xscreensaver is started by openbox, anyway when I try to lock, well this is what
I see:

$ xscreensaver-command -lock
xscreensaver-command: locking not enabled.

>From what I understand form the xscreensaver document that could happen if
xscreensaver was not running as me, however a ps aux confirms it is running as
me,

My only guess is perhaps when I hosed the permissions this is some artifact.
Here is the contents of what is in /usr/local/bin. If you also run xscreensaver
could you confirm if this looks right.

-rwsr-xr-x1 root  bin  274128 Sep 13 03:42 xscreensaver*
-rwxr-xr-x1 root  bin   26240 Sep 13 03:42 xscreensaver-command*
-rwxr-xr-x1 root  bin  228744 Sep 13 03:42 xscreensaver-demo*
-rwxr-xr-x1 root  bin  150976 Sep 13 03:42 xscreensaver-getimage*
-rwxr-xr-x1 root  bin   39478 Sep 13 03:42 xscreensaver-getimage-file*
-rwxr-xr-x1 root  bin4293 Sep 13 03:42 xscreensaver-getimage-video*
-rwxr-xr-x1 root  bin   26392 Sep 13 03:42 xscreensaver-gl-helper*
-rwxr-xr-x1 root  bin   26802 Sep 13 03:42 xscreensaver-text*

Short of that not sure if anyone else is having a similar problem. I can share
my openbox config and of course my dmesg but I am not sure that is relevant.

Ken



Re: Deploy Django app - strategy?

2018-09-16 Thread Ken M
On Sun, Sep 16, 2018 at 09:05:33AM +0300, ??  wrote:
> I deploy my django app using uwsgi and venv in my home dir
> uWSGi starts on its default port and httpd server uses this port
> to handle my app requests. Everything just like in the official manual of
> uwsgi.
> 

Don't know if this is helpful for Django apps, or if httpd in openbsd can use
unix sockets. Anyway with a couple of falcon api's I setup with Gunicorn I
actually used unix sockets instead of creating ports. If my proxy is on the same
server as the api's I found that a little easier to manage. Granted in this case
it was on centos and I was using nginx. Also in the process of figuring out how
to do that I found a lot of the documentation on nginx syntax talking to a unix
socket was wrong. But that is another story.

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On a side note to this whole chain. My wife and I had another conversation about
this, and I think we are on the same page that there is no win in monitoring
their email. So I think I can stay out of the mail server business for now,
which I like.

I pointed our how her dad was a cop and what happened the minute she got out
from under the roof.

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On Sun, Sep 09, 2018 at 05:49:31PM +0100, Stuart Henderson wrote:
> 
> In a nutshell, monitoring email is concentrating on what is really
> likely to be one of the less problematic areas. The others, which IMO
> are MUCH more likely to be involved if any problems do occur, are less
> amenable to this sort of treatment.
> 
> (For my children, 12-16, email is pretty much a last resort if other
> methods aren't available, I think that's pretty common nowadays).
> 
It's funny how things change per generation in tech. Even though I have a smart
phone if I really have to compose a message I want a keyboard. And for
communication I so prefer email because it can truly work on all connected
devices where chat, and texts and other apps I am more at the mercy of an app or
proprietary api, meanwhile with email I sync my mutt config and I have the
terminal and vi style interface to work with that can be the same everywhere.

I am now the fuddy duddy...

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On Sun, Sep 09, 2018 at 05:46:40PM +0100, Kaya Saman wrote:
> 
> Maybe your ISP has option for "Parental Control"?? I know these days it is a
> big concern so many do offer this type of service
> 
> 
> Just a thought??
> 

As I mentioned we use OpenDNS for the home internet, which handles all
connections in the house provided no one manually specifies an alternate DNS
on their own. If my kids are at that point then they are also at the point of
using a proxy service or a free vpn. The next aspect is on other networks.
The school I think uses OpenDNS as well. As for their cell phones, well we have
the verizon family thing.

But frankly they go to a friends house in our red neck area with non tech savvy
parents and who knows what happens. But frankly anywhere they are there is
always something that could happen. I feel like there is no winning the battle
of doing this, only losing. It is more important to teach them to make good
decisions than trying to invade on all of their bad ones before they can make
it. And frankly just like in science failure is a result so are the mistakes we
all had to get to the point we learned from them.

Ughh, sorry I opened what is more of a philosophical can of worms on the mailing
list.

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On Sun, Sep 09, 2018 at 11:24:38AM -0500, Ed Ahlsen-Girard wrote:
> 
> While you should not take technical advice on mail servers from me, 
> I've raised two kids to adulthood with a 17 year old to go, and had
> almost 200 foster children.
> 
> The impedance mismatch you have with the missus is more important than
> the mail.
> 
Yeah, I know, and maybe I am exaggerating it in this discourse. Her words are,
"they can have all the privacy they want when they are 18" and I don't feel that
is a completely practical stand point. And in fact her own experience should
tell her that might not be the best approach.

I think what I want is something that I could monitor if need be, but would
rather not.

I am starting to lean more towards either paying for email service or paying for
something that is a stronger parental control for all of their devices. My
bigger concern is the link jacking porn sites can do. I recall once in the 90's
mistyping msnbc.com at work and the carnage from a site called cafe flesh that
came out.

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On Sun, Sep 09, 2018 at 10:08:39AM +, Stuart Henderson wrote:
> Scanning for troubling words is not going to work without being able to
> see the email itself for context. Whether it's automated scanning or
> reading the mails yourself there are still privacy issues. Plus whatever
> monitoring you do is going to miss IMs, web forums (reddit, youtube
> comments, etc), online chat in games, all sorts. Email is relatively
> much less used. Better to keep your eyes open and talk to them rather
> than try to do this by technical means.
> 
In general this is my belief as well. I am just trying to find the right
compromise on this for my wife to be satisfied. Or at least create the semblance
of what will satisfy her.

Ken



Re: Running your own mail server

2018-09-09 Thread Ken M
On Sun, Sep 09, 2018 at 08:49:26AM +, Tim Jones wrote:
> Ken,
> 
> Putting all the OpenBSD evangelists to one side, there are two things to say.
> 
> First, like me, you might use OpenBSD for many things. And like me, you might 
> come to the conclusion that using OpenBSD for mail is not one of those 
> things.Personally I prefer to use a decent Linux stack for my mail, but I 
> know saying that is probably amounts to heresy round here, so I all I will 
> say is "do your homework, test various options, see what works for you".
> 
I am completely on the page of using the right tool for the job. No argument
there.

> But the second (far more important) point I want to make is please *THINK 
> TWICE* if "running your own mail server" is something you are planning to do 
> on your home internet connection.
> 
> Why ?
> 
>  Well, you have all the spammers of this world to thank for the xSP community 
> taking "more rigorous" approaches to spam filtering.
> 
> I can tell you now that running a mailserver on your home internet connection 
> is only likely to lead to many head-scratching "why is Joe not receiving my 
> emails ?" moments.
> 
> If you are going to run your own personal mailserver, then either: (a) Rent a 
> box somewhere else;or
> (b) Do it at home, but on a business internet connection where you can jump 
> through all the anti-spam hoops without problems (static IP, reverse DNS etc. 
> etc. etc.  all of which will be difficult or impossible to convince your 
> ISP to implement on your typical dollar a month residential connection).
> 

I would never run something like this from my house. So no worries there. On a
VPS or something at minimum off site.

Ken



Re: Running your own mail server

2018-09-08 Thread Ken M
On Sat, Sep 08, 2018 at 09:22:01PM -0300, Friedrich Locke wrote:
> if you demand for performance, FreeBSD + Qmail-ldap is THE way to go.
> 
> my 1 cent.
> 
Performance is a priority, but not my first priority. In fact I think that is
why I have started becoming a convert to openbsd.

Although I do like freebsd for servers as well and linux and what not. Just
lately I have started trying to see if I can OpenBSD all the things I need.

Ken



Re: Vultr hosting of OpenBSD

2018-09-08 Thread Ken M
On Sat, Sep 08, 2018 at 08:36:01PM +0100, Chris Narkiewicz wrote:
> On 08/09/2018 19:55, Ken M wrote:
> What kind of issues? I'm curious. Can you pls provide a reference?
> 

Without digging them up I did a quick google on openbsd issues vultr. It pulled
some things I saw before with 6.2 and timing, as well as issues with the base
image, and other ones talking about a setting in KVM that was causing issues on
certain servers.

I can link them if you wish. I wanted to ask here because they seemed out of
date, and when it comes to openbsd I have to filter what a google search pulls
as I find so much misinformation about openbsd out there. Some of it more for
being out of date, some of it just plain anti without knowing, some just
misinformation.

So in short I figured asking here would be more current and accurate. This is a
case where I consider the absence of such information a result. Although I think
I might consider openbsd amsterdam that was mentioned. My only hesitation is
vmm/vmd considered mature enough for a production hosting solution?

Ken



Vultr hosting of OpenBSD

2018-09-08 Thread Ken M
This is related to my mail server thread, but in googling about openbsd on vultr
I have seen some comments here and there about issues with the default image on
vultr and to use a custom image or iso instead of what they have. Some of these
seem dated and related to older versions of openbsd. My questions are:

1. Is it still current information that it would be better to use my own
image/install/iso for openbsd on Vultr?

2. Is vultr a good place to host an openbsd box? If not interested in hearing
alternatives.

Also a side note question, is it possible to use VMD/VMM in an openbsd guest on
vultr. I was thinking probably not. I just ask as sometinmes I appreciate using
docker to test things, yeah I know. But the point is my dev workflow on my
openbsd current laptop involves sometimes using alpine linux on vmm an using
docker on that to spin up different things I want to check out.

Ken



Re: Running your own mail server

2018-09-08 Thread Ken M
On Sat, Sep 08, 2018 at 05:54:18PM +0200, Peter N. M. Hansteen wrote:
> On 09/08/18 17:23, Ken M wrote:
> 
> If you've never run a mail server before but are familiar with OpenBSD,
> please do go the OpenBSD route.
> 
> Setting up and running a mail service involves learning a few skills. If
> you already manage DNS for your domain(s) I suppose you have a head start.
> 
> Anything that comes as part of OpenBSD or packaged for OpenBSD will come
> with sensible defaults. Please do yourself and the rest of the world a
> favor and read up properly on the effects of anything you do change. A
> lot of stuff that appears on the face of it to be trivial actually isn't.
> 
> I've written quite a few pieces on mail and related topics on the blog
> (the first URL in the signature) and of course The Book of PF touches on
> the issue as well, at least the spamd(8) parts. I suppose the "Effective
> Spam and Malware Countermeasures"
> (https://bsdly.blogspot.com/2014/02/effective-spam-and-malware.html)
> piece is a goodish place to start.
> 
> For anyone setting up a mail server these days there are worse things to
> do than read Aaron Poffenberger's SMTPd mail server tutorial slides and
> some related materials
> (https://www.bsdcan.org/2016/schedule/events/691.en.html and links therein).
> 
> - Peter
> 
> -- 
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
> 
I have never run a mail server before so I know I have a learning curve to work
on, which I was not trying to solve in this email, just to feel out where
similar people have their mindset on this. I do have more experience
administering linux than openbsd but I am slowly working on changing that as I
really appreciate the way openbsd is engineered at all levels.

I am familiar with your blogs so I will read up and when I get to the point of
specific questions I will bring them up here.

Ken



Re: Running your own mail server

2018-09-08 Thread Ken M
On Sat, Sep 08, 2018 at 10:55:40AM -0700, jungle Boogie wrote:
> Ken,
> 
> Just curious, are you using pf to filter out the bad websites for you kids?
> I find that to be more challenging for our older daughter to not stumble
> into the bad stuff and not the wholesome sites like openbsd.org, which
> happens to be her homepage. ;)
> 
> Best,
> J. B.

So when computer usage for them first became something to talk about here they
had only kindles that only connect to our wifi. Kindles are pretty good out of
the box for parental controls. For the main workstation in the house (usually
linux) that they can access I used Dan's Guardian.

Overtime, they got older and so many more devices are in play, from android
phones to chromebooks. Our home uses opendns, set at the router. Granted easy
enough to bypass but my kids aren't there yet. On the android side we have
verizon so we use the verizon family settings.

I don't consider any of this ideal but it is the best I got so far without
having to spend all my time administrating things on the home network. I opt for
a mixture of what I got and keeping the kids believing that my computer skills
are that that I can see what they do no matter what. Which is mostly true but I
don't practice that. Also if asked to unlock their devices for us to see
something they know they are to do it without question or delay or they lose
said device.

The difficult part of all this and why I asked this here. My wife and I have
different philosophies on such things. Example she would put the kids in a damn
plastic bubble, meanwhile I am the type that believes that our job is not to
protect them from everything but to teach them to protect themselves and make
good decisions as we won't always be there. My wife is on the religious right
side of the room politics wise and I am more of the libertarian.

Sorry to digress but I asked these things here as I figure others here have
similar mindset on security vs censorship vs privacy. I don't view them as
mutually exclusive but there are ways that I try to avoid that strengthen one by
compromising the other. As my kids enter their teenage years I know they will
find a way to subvert such controls and the more I try to stop them from doing
so the harder it will get when they do and the more likely they are to not trust
us to bring us a problem they have. In short I am more worried about my kids
feeling they have to hide everything that they don't bring something important
to us to talk about, than I am about them sneaking something by me. 

Ken



Re: Running your own mail server

2018-09-08 Thread Ken M
On Sat, Sep 08, 2018 at 11:32:00AM -0400, Jay Hart wrote:
> Ken,
> 
> I've run my own email server for 15 years now I think. I stick with Linux for 
> email server,
> OpenBSD for routing/firewall. I personally find this is the best of both 
> worlds...
> 
> Just my 35 cents...
> 
> Jay
> 

Dare I ask, is there a specific technical reason for using Linux as your email
server. I ask as I already run a Debian web server on Digital Ocean.

Ken



Running your own mail server

2018-09-08 Thread Ken M
Just curious how many of you use openbsd to run your own personal email server?
Do you find it a hassle to manage in any way?

I know openbsd is perfectly fine for a mail server, don't get me wrong the
question is more about is it worth it to do yourself. Specifically I will
probably be doing it through a guest on vultr.

Back story my family all has email addresses through the domain I have. Which
basically will forward to a gmail account. The kids accounts don't really
forward anywhere, they are place holders I guess. But they are getting old
enough to use their own accounts for things and not just through the school
which sets them up with google accounts to use through their chromebook.

So my wife really doesn't like the idea of setting them loose on their own email
accounts, and I don't necessarily disagree with her, but I disagree on the way
to do it. In a gmail point of view all I can think of is shared passwords for
for the kids. I don't like that because first of all they could change it,
second of all monitoring their email means literally reading their email.

My wife and I have different views on privacy as well.

I was thinking I could run my own email server to give them accounts there, and
at the same time instead of reading their email be able to more specifically
block certain senders, but also to scan the email for troubling words. In my
mind that is things like suicide, kill, etc.

So I guess the end question, is for protecting the email of minors is running my
own email server, when I have never done it before on any OS, worth it over some
other solution. And yes I am very open to other suggestions for a solution, even
if it is something I have to pay for, to avoid sharing passwords or grotesque
privacy infringement of literally reading all their emails.

Welcome to differences of opinion as well.  Thank you.

Ken



Re: resize /usr

2018-09-06 Thread Ken M
As a follow up I did manage to get everything sorted out. Redid the disk labels
and used newfs and well in single user mode had to use ed to cleanup the fstab.
After that booting bsd.rd to reinstall sets and then a restore from backup on a
usb I made of what I would be hitting and all seems well. Well better...

$ df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/sd0a 1005M250M704M26%/
/dev/sd0h 62.9G   19.2G   40.6G32%/home
/dev/sd0d  3.9G288K3.7G 0%/tmp
/dev/sd0f  4.9G1.0G3.7G22%/usr
/dev/sd0g 19.7G   11.0G7.7G59%/usr/local
/dev/sd0e 11.2G   56.2M   10.6G 1%/var
/dev/sd0i  9.8G1.1G8.2G12%/usr/ports

$ mount
/dev/sd0a on / type ffs (local)
/dev/sd0h on /home type ffs (local, noatime, nodev, nosuid, softdep)
/dev/sd0d on /tmp type ffs (local, noatime, nodev, nosuid, softdep)
/dev/sd0f on /usr type ffs (local, noatime, nodev, softdep)
/dev/sd0g on /usr/local type ffs (local, noatime, nodev, nosuid, wxallowed, 
softdep)
/dev/sd0e on /var type ffs (local, noatime, nodev, nosuid, softdep)
/dev/sd0i on /usr/ports type ffs (local, noatime, nodev, nosuid, wxallowed, 
softdep)

Should /usr/ports be mounted wxallowed. I was thinking no, but I recall running
into an issue when it wasn't.



Re: resize /usr

2018-09-04 Thread Ken M
On Tue, Sep 04, 2018 at 10:06:52AM -0700, Chris Cappuccio wrote:
> 
> Just move /usr/ports back to /usr and remount /dev/sd0g as /usr/local

A perfectly reasonable suggestion, something I thought about. I kind of want to
tweak this and learn a little bit to make things better so I am going to give
the aggressive approach a try as I have a few days down time coming up. I made a
quick backup of everything in /etc /usr /home and captured my current installed
package list just to be safe.

My plan is to split /usr and /usr/ports into /usr /usr/local /usr/ports. Haven't
really decided how much space for each. I am going to think about it in the
interim. As a development laptop I don't really need a separate /var perhaps.
And then I can claim some extra space in home...

Perhaps I like to tinker too much...

Ken



Re: resize /usr

2018-09-03 Thread Ken M
On Mon, Sep 03, 2018 at 06:11:24PM -0500, ed...@pettijohn-web.com wrote:
> 
> This obviously isn't the officially recommended way to do it, but it works 
> here.
> 
> I put everything in my $HOME and use symlinks to trick the build system into 
> thinking it's in /usr/ports, etc. Thus, no need to fool with partitions.
> 
> Edgar

Considering the generally smaller size of the built in HD on this laptop, that
is not a bad solution to not having to deal with changing priorities in the
system.

Ken



Re: resize /usr

2018-09-03 Thread Ken M
On Mon, Sep 03, 2018 at 03:59:07AM +0200, Ingo Schwarze wrote:
> Hi Ken,
> 
> How exactly to distribute space among partitions really depends on what
> you want to use the machine for.  The disk you are showing above can be
> called terribly small nowadays (though i admit that i used disks in
> production with OpenBSD 2.7 17 years ago that were more than 1000 
> times smaller), so small that you are likely to run out of space
> sooner or later even if you don't let waste data lying around.
> 
> Yes, you always want /usr/local/, except maybe on a pure firewall router
> where you are not planning to install any ports whatsoever except rsync.
> 
> I see you do not have /usr/src/, /usr/obj/, /usr/xenocara/,
> and /usr/xobj/, so you are obviously not planning to work on patches
> to the base system or to X11.  Nothing is wrong with that.  If you ever
> start doing such work on that machine, you will have to bite off the
> required partitions from home, though.  It would have been smarter if
> you had left at least 10G at the end of the disk unallocated; if you
> ever needed some partition like that, you could create it without a fuss;
> if /home/ ever got full, you could move some stuff there.
> 
> I see you do have /usr/ports/, so obviously, you are planning to do
> some work on ports.  I only work on ports *occasionally*, i'm not a
> real porter, yet i currently have the following amounts of space *in
> use* for work on ports:
> 
>  - /usr/local/--   9 GB (separate partition)
>  - /usr/ports/pobj/   --  18 GB (separate partition)
>  - /usr/ports/distfiles/  --   9 GB (partition /usr/ports/)
>  - /usr/ports/packages/   --   8 GB 
>  - /usr/ports/--  650 MB (rest of the partition)
> 
> In addition to that, i have about 115 checkouts of source trees
> of various software that i occasionally work on or look at on
> another partition, which takes up another 21 GB (but that's more
> for base that for ports work).
> 
> Yours,
>   Ingo

Other than using OpenBSD as general secure laptop env and doing some development
I have planned to work on some ports, have done a little bit to try to help with
lmms for example.

At the time I installed this system (the 128 GB SSD is what came with it) I
probably didn't know enough about wxallowed to properly make decisions.

Probably the smartest thing to do is maybe reinstall or at least redo the
partitions a good bit.  I think what I need to do is make /usr smaller make
/usr/local a good 15gb partition and the rest leave for /usr/ports. I think I
need to backup what I got and then drop those partitions/disklabels and remake
them. That is probably the cleanest, I am guessing it will be best to do that
from single user mode.

Ken



Re: resize /usr

2018-09-02 Thread Ken M
On Sun, Sep 02, 2018 at 10:53:36AM -0700, Chris Bennett wrote:
> On Sun, Sep 02, 2018 at 04:16:57PM +0000, Ken M wrote:
> 
> You can only do this if /usr/ports is directly after /usr.
> Use disklabel sd0 to get the positions.
> 
> However, if /usr/ports is big enough and it's in the wrong spot, you can
> play games with switching them. I do this occasionally.
> If you can pull this off, use the n command in disklabel to rename /usr
> to something like /usr2 and /usr/ports as /usr/ports2, fiddle things
> around and then turn /usr2 into /usr/ports and /usr/ports2 into /usr.
> 
> What I don't see is /usr/local and that makes things much harder unless
> you can pkg_delete everything and then re-install.
> You might find it much easier to ditch /usr/ports, add /usr/local to
> disklabel and another for /usr/ports that is much smaller.
> 
> But we need to see your disklabel or any advice is hard to give.
> Also, by not having a /usr/local partition, your security is worse since
> that is the only partition that should use wxallowed in /etc/fstab.
> 
> Basically, this is going to be really easy or really challenging.
> growfs works well. There is no such command as shrinkfs, but it can be
> done if well planned, usually. Or maybe not.
> 
> Others may have different advice, but put up your disklabel sd0 here
> for sure.
> Just be glad you don't need to move /var. I've done it but ugh!
> 
> Chris Bennett
> 
> 

Here is the output from disklabel

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: SAMSUNG MZ7TE128
duid: ea188d6164482e5c
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 15566
total sectors: 250069680
boundstart: 64
boundend: 250067790
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
  a:  2097152   64  4.2BSD   2048 16384 12958 # /
  b:  8241536  2097216swap# none
  c:2500696800  unused
  d:  8388608 10338752  4.2BSD   2048 16384 12958 # /tmp
  e: 23823104 18727360  4.2BSD   2048 16384 12958 # /var
  f: 31460960 42550464  4.2BSD   2048 16384 12958 # /usr
  g: 41929664 74011424  4.2BSD   2048 16384 12958 # /usr/ports
  h:134126688115941088  4.2BSD   2048 16384 12958 # /home

Frankly what probably makes the most sense is remounting /usr/ports to be
/usr/local.  That probably makes the most sense. Frankly first doing this I am
sure I did not make the best decisions as I am still on the new side of using
OpenBSD.

Ken



resize /usr

2018-09-02 Thread Ken M
OK so now that I have been saved from my stupidity, let's try to prevent more
stupidity.

$ df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/sd0a 1005M245M710M26%/
/dev/sd0h 62.9G   21.7G   38.1G36%/home
/dev/sd0d  3.9G302K3.7G 0%/tmp
/dev/sd0f 14.8G   11.6G2.5G82%/usr
/dev/sd0g 19.7G1.1G   17.6G 6%/usr/ports
/dev/sd0e 11.2G   56.1M   10.6G 1%/var

Above is my current disk setup, what I would like to do is shrink /usr/ports to
grow /usr.  

So from what I get growfs will work if I have space after /usr. So can I shrink
/usr/ports and move it back so there is space after /usr or do I need to
completely drop and recreate /usr/ports?

Ken



Re: Some information needed, HELP!

2018-09-02 Thread Ken M
On Sun, Sep 02, 2018 at 10:46:44AM -0500, ed...@pettijohn-web.com wrote:
> 
> On Sep 2, 2018 9:55 AM, Ken M  wrote:
> >
> > I am backing up my config info right now and then will try that route, 
> > thank you
> >
> > Sent from my iPad
> >
> > > On Sep 2, 2018, at 10:52 AM, Sol??ne Rapenne  wrote:
> > > 
> > > Le 2018-09-02 16:21, Ken M a ??crit :
> > >> So I did something careless and stupid. Don't get me started but I 
> > >> really messed
> > >> up the group ownership of /usr by carelessly running a command not paying
> > >> attention. Yes I know, my stupidity.
> > >> Can anyone shoot me a quick list of what group should own what under 
> > >> /usr.
> > >> Sorry and thank you.
> > >> If it matters I am running current.
> > >> Ken
> > > 
> > > As you run current, boot bsd.rd and reinstall the sets
> > > for /usr/local one quick way is to save the package list installed 
> > > manually
> > > (pkg_info -lz I think, look at the man page) and reinstal them.
> >
> 
> I've done similar bad things and the bsd.rd route always worked for me.
> 

Reloading the sets saved my bacon. And frankly it was awesome how it just
worked. Dare I confess I debated if I was going to reinstall I was about to
throw fedora on there...

Forgive me puffy I have sinned...

Ken



Re: Some information needed, HELP!

2018-09-02 Thread Ken M
I am backing up my config info right now and then will try that route, thank you

Sent from my iPad

> On Sep 2, 2018, at 10:52 AM, Solène Rapenne  wrote:
> 
> Le 2018-09-02 16:21, Ken M a écrit :
>> So I did something careless and stupid. Don't get me started but I really 
>> messed
>> up the group ownership of /usr by carelessly running a command not paying
>> attention. Yes I know, my stupidity.
>> Can anyone shoot me a quick list of what group should own what under /usr.
>> Sorry and thank you.
>> If it matters I am running current.
>> Ken
> 
> As you run current, boot bsd.rd and reinstall the sets
> for /usr/local one quick way is to save the package list installed manually
> (pkg_info -lz I think, look at the man page) and reinstal them.



Some information needed, HELP!

2018-09-02 Thread Ken M
So I did something careless and stupid. Don't get me started but I really messed
up the group ownership of /usr by carelessly running a command not paying
attention. Yes I know, my stupidity.

Can anyone shoot me a quick list of what group should own what under /usr.

Sorry and thank you.

If it matters I am running current.

Ken



lobste.rs invite received

2018-08-25 Thread Ken M
Thank you

Ken



Lobste.rs

2018-08-25 Thread Ken M
Figuring there are a good amount of members on this list that are also on
Lobste.rs.

Anyway I was hoping to get an invite to create an account there if someone
could.

Thank you,
Ken



Re: Keeping clear out of history

2018-07-31 Thread Ken M
> Check out HISTCONTROL[1] and ignorespace in particular. Adding something
> along the lines to your ~/.kshrc should do the trick:
> 
>   HISTCONTROL=ignorespace
>   bind -m '^L'='^U clear^J^Y' # note the intentional space before clear
> 
> [1] https://man.openbsd.org/ksh#HISTCONTROL

Actually this worked out to be the cleanest for my purposes. Again thank you.

Ken



Re: Keeping clear out of history

2018-07-31 Thread Ken M
Thanks all for not making me feel like I opened a flame war can of worms.

I think the ignore dups solution is probably the most sensible for my purposes
from what I have read from all the responses.

Thank you.

Ken



Keeping clear out of history

2018-07-30 Thread Ken M
OK, so confession 1, I am a long time bash user
confession 2 all of my ksh experience is on solaris

However in a when in Rome moment I am realizing how much I like ksh in openbsd,
but one minor thing. I don't like how much clear ends up in my history file. So
I am wondering what I can do to suppress a command going to history.


Lets put my .profile here for reference

# $OpenBSD: dot.profile,v 1.5 2018/02/02 02:29:54 yasuoka Exp $
#
# sh/ksh initialization

. /etc/ksh.kshrc

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:$HOME/.local/bin
PS1="[\u@\h: \W]$ "
HISTFILE=$HOME/.ksh_history
HISTSIZE=1000
export PATH HOME TERM PS1 HISTFILE HISTSIZE

# For now clearing out clear from history when starting
sed -i '/^clear$/d' $HISTFILE

bind -m '^L'=clear'^J'
# I wish this worked
# bind -m '^L'=clear'^J';sed -i '$d' $HISTFILE

alias ll='ls -l'
alias la='ls -la'
alias watch='gnuwatch'


As you can see I tried adding the ; sed after my bind, I also tried it with &&
sed and that did not work. Both of course remove the sed from history and not
the clear. I guess I could remove the 2nd to last line. But before I go that sed
route is there a cleaner way to prevent a command from going to the HISTFILE?

Ken



Re: A problem from user

2018-07-24 Thread Ken M
I will beat others to the punch and say you were looking for Ubuntu not OpenBSD.

OpenBSD is plenty easy to use, but the type of easy to use you describe with a
full desktop environment is not the target.

However installing gnome is simple enough. Several sites exist describing it. I
am guessing from your output though you have not setup dbus which is required
for gnome. You will need to add that to you /etc/rc.conf.local

Ken

On Wed, Jul 25, 2018 at 01:49:44AM +, ??? ?? wrote:
> Hello, OpenBSD developers.
> 
> I like OpenBSD very much because of its security and stability.
> 
> But, as an UNIX-like system, it has some traditional problem such as no 
> integrated graphical operating environment (not means X but a completed 
> desktop environment system like Gnome). So, I tried to install the Gnome 
> software.
> 
> Although I tried hard to install and run Gnome, I always get a "Failed 
> connect to system bus: No such file or dictionary." error message. So I want 
> to ask you to give me a practical way to install the desktop environment on 
> OpenBSD 6.3 and furthermore, advise you to integrated desktop environment 
> into the system for making the system easier to use.
> 
> Sobin
> 



Re: Poor browser performance in OpenBSD

2018-06-20 Thread Ken M
Branching off from the CPU and X paths of analysis, have you made sure network
performance is not a factor in all this?

A tact also in the browser, is use the inspect tools to see the response time of
the request pieces. IF it is at all network related that my yield some
information.

Ken

On Wed, Jun 20, 2018 at 08:29:30AM +0300,  wrote:
> Hello.
> I'm using Firefox and Chromium (from packages) to browse the internet on 
> OpenBSD 6.3 (amd64).
> The problem is that their performance in OpenBSD is very poor compared to 
> other OSes.
> Everything I found regarding boosting their performance:
> 1) Changing some values in login.conf for login group staff and adding myself 
> to that login class:
> staff:\
> :datasize-cur=4096M:\
> :datasize-max=infinity:\
> :openfiles-cur=1024:\
> :stacksize-cur=64M:\
> :maxproc-max=512:\
> :maxproc-cur=512:\
> :ignorenologin:\
> :requirehome@:\
> :tc=default:
> 
> 2) sysctl kern.shminfo.shmall=268435456
> 
> All of this was taken from here:
> http://openbsd-archive.7691.n7.nabble.com/Coddling-bloated-web-browsers-etc-or-how-far-does-kern-shminfo-shmall-usefully-go-td244155.html
> 
> These changes to the system don't seem to have any effect.
> Loading pages is slow, watching online video is possible but the 
> responsiveness of the browser becomes awful.
> 
> Do I need additional settings to fix this?
> 
> 
> dmesg:
> 
> OpenBSD 6.3-current (GENERIC.MP) #13: Thu Jun 14 17:29:44 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8442433536 (8051MB)
> avail mem = 8108933120 (7733MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9374 (57 entries)
> bios0: vendor Hewlett-Packard version "K01 v02.57" date 11/16/2012
> bios0: Hewlett-Packard HP Compaq Pro 6300 All-in-One PC
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SLIC SSDT SSDT TCPA ASF! BGRT
> acpi0: wakeup devices PS2K(S3) PS2M(S3) P0P1(S4) USB1(S3) USB2(S3) USB3(S3) 
> USB4(S3) USB5(S3) USB6(S3) USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) 
> PXSX(S4) RP03(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz, 3293.09 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz, 3292.52 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,XSAVE,AVX,F16C,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> acpimcfg0 at acpi0 addr 0xf800, bus 0-63
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (P0P1)
> acpiprt2 at acpi0: bus -1 (RP01)
> acpiprt3 at acpi0: bus -1 (RP02)
> acpiprt4 at acpi0: bus -1 (RP03)
> acpiprt5 at acpi0: bus -1 (RP04)
> acpiprt6 at acpi0: bus -1 (RP05)
> acpiprt7 at acpi0: bus -1 (RP06)
> acpiprt8 at acpi0: bus -1 (RP07)
> acpiprt9 at acpi0: bus -1 (RP08)
> acpiprt10 at acpi0: bus -1 (PEG0)
> acpiprt11 at acpi0: bus -1 (PEG1)
> acpiprt12 at acpi0: bus -1 (PEG2)
> acpiprt13 at acpi0: bus -1 (PEG3)
> acpiec0 at acpi0: not present
> acpicpu0 at acpi0: C3(350@80 mwait.1@0x20), C2(500@59 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C3(350@80 mwait.1@0x20), C2(500@59 mwait.1@0x10), 
> C1(1000@1 mwait.1), PSS
> acpipwrres0 at acpi0: FN00, resource for FAN0
> acpipwrres1 at acpi0: FN01, resource for FAN1
> acpipwrres2 at acpi0: FN02, resource for FAN2
> acpipwrres3 at acpi0: FN03, resource for FAN3
> acpipwrres4 at acpi0: FN04, resource for FAN4
> acpitz0 at acpi0: critical temperature is 105 degC
> acpitz1 at acpi0: critical temperature is 105 degC
> acpicmos0 at acpi0
> "INT3F0D" at acpi0 not configured
> tpm0 at acpi0: TPM_ addr 0xfed4/0x5000: Infineon SLB9635 1.2 rev 0x10
> acpibtn0 at acpi0: PWRB
> "PNP0C14" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C0B" at 

Re: add -powersave to hostname.if

2018-06-19 Thread Ken M
On Tue, Jun 19, 2018 at 11:30:42PM +0100, Stuart Henderson wrote:
> 
> If powersave is enabled, you'll see "powersave on (XXms sleep)" on the
> ieee80211: [...] line.
> 
> If powersave is disabled (which is the default), nothing special is printed.
> 

Good to know, thank you.

Ken



Re: add -powersave to hostname.if

2018-06-19 Thread Ken M
On Tue, Jun 19, 2018 at 04:53:21PM +, Stuart Henderson wrote:
> 
> hostname.if(5) has this:
> 
> "Any lines not matching these packed formats are passed directly to
> ifconfig(8)."
> 

After reading the manpage again for hostname.if last night I spotted the way it
suggests to put uptions at the end of the inet line, or the dhcp line. So I made
my last line this:

dhcp -powersave

That seems to have solved my intermitten network issues that I was guessing were
caused by the wireless powersave. To ask a side question I am not noticing a way
to confirm powersave is disabled from the ifconfig command.

Ken



add -powersave to hostname.if

2018-06-18 Thread Ken M
My thought was just to add the line

-powersave

in the file, just like I had added it to an iconfig commandline. Hostname.if man
pages don't specify anything about it that I can see.

Was my thought a stupid thought?

Ken



FIFO Underrun error on current

2018-06-15 Thread Ken M
I posted this before, and the first time around it was pointed out I had out of
date firmware, that was addressed. Anyway I am on current, the last snapshot I
grabbed was from 6-9. These 2 errors persist in my dmesg:

error: [drm:pid0:ivybridge_set_fifo_underrun_reporting] *ERROR* uncleared fifo 
underrun on pipe A
error: [drm:pid0:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO 
underrun

Full dmesg:

OpenBSD 6.3-current (GENERIC.MP) #91: Sat Jun  9 20:57:09 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3950682112 (3767MB)
avail mem = 3786072064 (3610MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdccb3000 (61 entries)
bios0: vendor LENOVO version "GJET98WW (2.48 )" date 03/20/2018
bios0: LENOVO 20B7S41700
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT PCCT SSDT UEFI MSDM ASF! BATB FPDT UEFI DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1796.15 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.85 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.85 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 1795.85 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
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)
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
acpipwrres1 at acpi0: NVP3, resource for PEG_
acpipwrres2 at acpi0: NVP2, resource for PEG_
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpicmos0 at acpi0
"LEN0071" at acpi0 not configured
"LEN0036" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "45N" serial 13297 type LiP oem "SONY"
acpibat1 at acpi0: BAT1 model "45N1775" serial  2726 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured

Re: node: Cannot allocate memory

2018-06-06 Thread Ken M
So just to eliminate the off variable I updated my snapshot. Updated packages,
etc, etc

And now node works fine...

Ken

On Wed, Jun 06, 2018 at 09:28:39PM -0400, Ken M wrote:
> On Wed, Jun 06, 2018 at 09:10:59PM -0400, Thomas Frohwein wrote:
> > 
> > I run ksh. Doubt that bash is the cause though...
> > Might wanna check if you have the same problem with ksh.
> > 
> 
> I tried in sh before submitting and got the same problem, I just tried ksh and
> the same. Sorry for omitting that I tried to eliminate bash from the equation
> first.
> 
> > 
> > ... still, you provided rather little information to understand what might 
> > be
> > particular about your system. In most cases, including a dmesg is MVP to
> > understand this better.
> > 
> 
> Sorry, I wasn't thinking a dmesg would be useful in this case. I will put at 
> the
> end of this as well as the kdump from a ktrace on this.
> 
> > 
> > Yes? what about your ulimit?
> 
> I put myself in the staff user group so...
> 
> $ ulimit -a
> core file size  (blocks, -c) unlimited
> data seg size   (kbytes, -d) 2097152
> file size   (blocks, -f) unlimited
> max locked memory   (kbytes, -l) 1244372
> max memory size (kbytes, -m) 3710004
> open files  (-n) 512
> pipe size(512 bytes, -p) 1
> stack size  (kbytes, -s) 4096
> cpu time   (seconds, -t) unlimited
> max user processes  (-u) 256
> virtual memory  (kbytes, -v) 2101248
> 
> I also tried setting ulimit -d to my total memory size and no luck there.
> 
> kdump of ktrace:
> 
> $ kdump -f kt-node.out
>   7097 ktrace   RET   ktrace 0
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/bin/node"
>   7097 ktrace   RET   execve -1 errno 2 No such file or directory
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/usr/bin/node"
>   7097 ktrace   RET   execve -1 errno 2 No such file or directory
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/sbin/node"
>   7097 ktrace   RET   execve -1 errno 2 No such file or directory
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/usr/sbin/node"
>   7097 ktrace   RET   execve -1 errno 2 No such file or directory
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/usr/X11R6/bin/node"
>   7097 ktrace   RET   execve -1 errno 2 No such file or directory
>   7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
>   7097 ktrace   NAMI  "/usr/local/bin/node"
>   7097 ktrace   RET   execve -1 errno 12 Cannot allocate memory
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  write(2,0x7f7eb1e0,0x8)
>   7097 ktrace   GIO   fd 2 wrote 8 bytes
>"ktrace: "
>   7097 ktrace   RET   write 8
>   7097 ktrace   CALL  write(2,0x7f7eb2c0,0x15)
>   7097 ktrace   GIO   fd 2 wrote 21 bytes
>"exec of 'node' failed"
>   7097 ktrace   RET   write 21/0x15
>   7097 ktrace   CALL  write(2,0x7f7eb1e0,0x2)
>   7097 ktrace   GIO   fd 2 wrote 2 bytes
>": "
>   7097 ktrace   RET   write 2
>   7097 ktrace   CALL  write(2,0x7f7eb1e0,0x17)
>   7097 ktrace   GIO   fd 2 wrote 23 bytes
>"Cannot allocate memory
>"
>   7097 ktrace   RET   write 23/0x17
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
>   7097 ktrace   RET   mprotect 0
>   7097 ktrace   CALL  munmap(0xe36158b1000,0x1000)
>   7097 ktrace   RET   munmap 0
>   7097 ktrace   CALL  exit(1)
> 
> 
> dmesg:
> 
> $ dmesg
> OpenBSD 6.3-current (GENERIC.MP) #57: Thu May 31 15:57:20 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3950682112 (3767MB)
> avail mem = 3822796800 (3645MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdccb3000 (61 entries)
> bios0: vendor LENOVO version "GJET98WW (2.48 )" dat

Re: node: Cannot allocate memory

2018-06-06 Thread Ken M
On Wed, Jun 06, 2018 at 09:10:59PM -0400, Thomas Frohwein wrote:
> 
> I run ksh. Doubt that bash is the cause though...
> Might wanna check if you have the same problem with ksh.
> 

I tried in sh before submitting and got the same problem, I just tried ksh and
the same. Sorry for omitting that I tried to eliminate bash from the equation
first.

> 
> ... still, you provided rather little information to understand what might be
> particular about your system. In most cases, including a dmesg is MVP to
> understand this better.
> 

Sorry, I wasn't thinking a dmesg would be useful in this case. I will put at the
end of this as well as the kdump from a ktrace on this.

> 
> Yes? what about your ulimit?

I put myself in the staff user group so...

$ ulimit -a
core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) 2097152
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) 1244372
max memory size (kbytes, -m) 3710004
open files  (-n) 512
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 4096
cpu time   (seconds, -t) unlimited
max user processes  (-u) 256
virtual memory  (kbytes, -v) 2101248

I also tried setting ulimit -d to my total memory size and no luck there.

kdump of ktrace:

$ kdump -f kt-node.out
  7097 ktrace   RET   ktrace 0
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/bin/node"
  7097 ktrace   RET   execve -1 errno 2 No such file or directory
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/usr/bin/node"
  7097 ktrace   RET   execve -1 errno 2 No such file or directory
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/sbin/node"
  7097 ktrace   RET   execve -1 errno 2 No such file or directory
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/usr/sbin/node"
  7097 ktrace   RET   execve -1 errno 2 No such file or directory
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/usr/X11R6/bin/node"
  7097 ktrace   RET   execve -1 errno 2 No such file or directory
  7097 ktrace   CALL  execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78)
  7097 ktrace   NAMI  "/usr/local/bin/node"
  7097 ktrace   RET   execve -1 errno 12 Cannot allocate memory
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  write(2,0x7f7eb1e0,0x8)
  7097 ktrace   GIO   fd 2 wrote 8 bytes
   "ktrace: "
  7097 ktrace   RET   write 8
  7097 ktrace   CALL  write(2,0x7f7eb2c0,0x15)
  7097 ktrace   GIO   fd 2 wrote 21 bytes
   "exec of 'node' failed"
  7097 ktrace   RET   write 21/0x15
  7097 ktrace   CALL  write(2,0x7f7eb1e0,0x2)
  7097 ktrace   GIO   fd 2 wrote 2 bytes
   ": "
  7097 ktrace   RET   write 2
  7097 ktrace   CALL  write(2,0x7f7eb1e0,0x17)
  7097 ktrace   GIO   fd 2 wrote 23 bytes
   "Cannot allocate memory
   "
  7097 ktrace   RET   write 23/0x17
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x3)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  mprotect(0xe36158b1000,0x1000,0x1)
  7097 ktrace   RET   mprotect 0
  7097 ktrace   CALL  munmap(0xe36158b1000,0x1000)
  7097 ktrace   RET   munmap 0
  7097 ktrace   CALL  exit(1)


dmesg:

$ dmesg
OpenBSD 6.3-current (GENERIC.MP) #57: Thu May 31 15:57:20 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3950682112 (3767MB)
avail mem = 3822796800 (3645MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdccb3000 (61 entries)
bios0: vendor LENOVO version "GJET98WW (2.48 )" date 03/20/2018
bios0: LENOVO 20B7S41700
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT PCCT SSDT UEFI MSDM ASF! BATB FPDT UEFI DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.30 MHz
cpu0: 

node: Cannot allocate memory

2018-06-06 Thread Ken M
The subject is the problem:

node -v
bash: /usr/local/bin/node: Cannot allocate memory

I am on current, last grabbed the snapshot last Friday I think.

Plenty of swap and memory available

vmstat
 procsmemory   pagedisk traps  cpu
 r   s   avm fre  flt  re  pi  po  fr  sr sd0  int   sys   cs us sy id
 1 180  543M   1802M 1263   0   0   0   0   0  38  235  5252  781  3  1 95
swapctl -l
Device  512-blocks UsedAvail Capacity  Priority
/dev/sd0b  82415360  8241536 0%0

Last I checked on a 6.3 release install node was working. Last I checked it was
working in 6.3 so not sure what is going on here. Nothing else is giving me any
problems.

Ken



Stall on booting, seems related to these 2 dmesg lines

2018-05-30 Thread Ken M
It happens right after these 2 lines:

error: [drm:pid0:ivybridge_set_fifo_underrun_reporting] *ERROR* uncleared fifo 
underrun on pipe A
error: [drm:pid0:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO 
underrun

After those display the system seems to hang for about 30-40 seconds
before continueing on.

Any ideas.

Full dmesg below if that is more useful

Ken


OpenBSD 6.3 (RAMDISK_CD) #98: Sat Mar 24 14:26:39 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 3951230976 (3768MB)
avail mem = 3827695616 (3650MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdcd3d000 (61 entries)
bios0: vendor LENOVO version "GJET79WW (2.29 )" date 09/03/2014
bios0: LENOVO 20B7S41700
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT PCCT SSDT UEFI MSDM ASF! BATB FPDT UEFI SSDT DMAR
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.30 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
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)
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpitz at acpi0 not configured
"PNP0C0D" at acpi0 not configured
"PNP0C0E" at acpi0 not configured
"LEN0071" at acpi0 not configured
"LEN0036" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
"ACPI0003" at acpi0 not configured
"LEN0068" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT340F" at acpi0 not configured
"INT3392" at acpi0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x0b
vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x0b
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
"Intel Core 4G HD Audio" rev 0x0b at pci0 dev 3 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
"Intel 8 Series KT" rev 0x04 at pci0 dev 22 function 3 not configured
em0 at pci0 dev 25 function 0 "Intel I218-LM" rev 0x04: msi, address 
28:d2:44:c7:0f:b6
"Intel 8 Series HD Audio" rev 0x04 at pci0 dev 27 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xe4: msi
pci1 at ppb0 bus 2
rtsx0 at pci1 dev 0 function 0 "Realtek RTS5227 Card Reader" rev 0x01: msi
sdmmc0 at rtsx0: 4-bit, dma
ppb1 at pci0 dev 28 function 1 "Intel 8 Series PCIE" rev 0xe4: msi
pci2 at ppb1 bus 3
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0x83, msi
ehci0 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
"Intel 8 Series LPC" rev 0x04 at pci0 dev 31 function 0 not configured
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct 
fixed naa.5002538844584d30
sd0: 122104MB, 512 bytes/sector, 250069680 sectors, thin
"Intel 8 Series SMBus" rev 0x04 at pci0 dev 31 function 3 not configured
isa0 at mainbus0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
umass0 at uhub0 port 2 configuration 1 interface 0 "Hitachi-LG Data Storage Inc 
Portable Super Multi Drive" rev 2.00/0.00 addr 2
umass0: using ATAPI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
cd0 at scsibus1 targ 1 lun 0:  ATAPI 5/cdrom 
removable serial.0e8d1887754_
"Sierra Wireless, Incorporated Sierra Wireless EM7355 Qualcomm Gobi(TM) 4G 
LTE/HSPA+/EVDO" rev 2.00/0.06 addr 3 at uhub0 port 4 not configured
"vendor 0x8087 product 0x07dc" rev 2.00/0.01 addr 4 at uhub0 port 7 not 
configured
"SunplusIT INC. Integrated Camera" rev 2.00/26.03 addr 5 at uhub0 port 8 not 
configured
uhub2 at uhub1 

Status of Bluetooth support?

2018-05-25 Thread Ken M
I know Bluetooth support was pulled, but I was wondering if there was any new
information about it being rekindled in some fashion. My primary interest is the
bluetooth audio side. 

If there is or isn't I would be interested in helping to make it happen. Not
sure I am the best person to code it, but testing, advocating, documenting,
whatever.

Anyway if someone is working on it, would like to know what I could do to help.
If no one is, well I guess I gotta figure out how to help change that.

Thanks,
Ken



Re: attach chroot-jail to switchd(8) ?

2018-05-24 Thread Ken M
I can appreciate the spirit of that. Carry on good sir.

Ken

On Thu, May 24, 2018 at 01:19:07PM +0200, Thomas Huber wrote:
> Hi Ken,
> 
> sure, thats the way to go for docker, kubernetes and [add buzzword here].
> The _why_ is more about tinkering and getting deeper into the rabbit-hole.
> 
> Thomas
> 
> 
> On 24 May 2018 at 12:51, Ken M <k...@mack-z.com> wrote:
> >
> > I want to ask the question of why? And why this way? I think if you want
> docker
> > like functionality, just add docker to openbsd. The best way to do so is
> to add
> > a lightweight linux into vmm and connect to that docker daemon. Alpine or
> > Rancher are probably the best bet for that.
> >
> > I say nothing on the security of that. But at least you also get the
> critical
> > mass of pre-built images from the docker world. To me that is the real
> value of
> > docker anyway. As a containerization system I do not like it, but as a
> means to
> > make the OS less of a factor to an install, absolutely.
> >
> > Just my thoughts.
> >
> > On Thu, May 24, 2018 at 11:28:13AM +0200, Thomas Huber wrote:
> > > Hi Reyk,
> > >
> > > no it is not about chroot-ing switchd.
> > > What i have in mind is a kind of poor-mans kubernetes or docker-swarm
> which
> > > makes use of chroot(8), login.conf(5) and mount_vnd(8) to isolate, limit
> > > and encapsulate some processes.
> > > I´ll call this the "chroot-jail" and thought it is common wording after
> > > reading about this topic across the internet.
> > > Like in this (kind of outdated) tutorial:
> > >
> https://www.ibm.com/developerworks/community/blogs/karsten/entry/openbsd_chroot
> > > The chroot-jail is basically a extracted base##.tgz plus dev, some users
> > > and configs.
> > > What I have in mind now with switchd is, to attach this chroot-jails the
> > > same way like a virtual-machine.
> > >
> > > But also not sure if this makes sense anyway.
> > > It´s more I kind of learning project for myself to see how things work
> and
> > > if they play nicely together.
> > > And if this set-up works I´ld go on and use ansible to automate and to
> > > "orchestrate" this parts.
> > >
> > > Thomas
> > >
> > >
> > >
> > > On 24 May 2018 at 00:35, Reyk Floeter <r...@openbsd.org> wrote:
> > > >
> > > > switchd is already privsep‘ed with a chroot jail.
> > > >
> > > > But I don’t quite understand what you mean.
> > > >
> > > > > Am 23.05.2018 um 10:35 schrieb Thomas Huber <miracu...@gmail.com>:
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I´m just tinkering a little bit and try to mimic some
> > > "containerization" on
> > > > > OpenBSD with chroot. Is it somehow possible to attach a chrooted
> > > > > envirionment to swtichd(8) ?
> > > > >
> > > > > Thanks
> > > > > Thomas
> >



Re: attach chroot-jail to switchd(8) ?

2018-05-24 Thread Ken M
I want to ask the question of why? And why this way? I think if you want docker
like functionality, just add docker to openbsd. The best way to do so is to add
a lightweight linux into vmm and connect to that docker daemon. Alpine or
Rancher are probably the best bet for that.

I say nothing on the security of that. But at least you also get the critical
mass of pre-built images from the docker world. To me that is the real value of
docker anyway. As a containerization system I do not like it, but as a means to
make the OS less of a factor to an install, absolutely.

Just my thoughts.

On Thu, May 24, 2018 at 11:28:13AM +0200, Thomas Huber wrote:
> Hi Reyk,
> 
> no it is not about chroot-ing switchd.
> What i have in mind is a kind of poor-mans kubernetes or docker-swarm which
> makes use of chroot(8), login.conf(5) and mount_vnd(8) to isolate, limit
> and encapsulate some processes.
> I´ll call this the "chroot-jail" and thought it is common wording after
> reading about this topic across the internet.
> Like in this (kind of outdated) tutorial:
> https://www.ibm.com/developerworks/community/blogs/karsten/entry/openbsd_chroot
> The chroot-jail is basically a extracted base##.tgz plus dev, some users
> and configs.
> What I have in mind now with switchd is, to attach this chroot-jails the
> same way like a virtual-machine.
> 
> But also not sure if this makes sense anyway.
> It´s more I kind of learning project for myself to see how things work and
> if they play nicely together.
> And if this set-up works I´ld go on and use ansible to automate and to
> "orchestrate" this parts.
> 
> Thomas
> 
> 
> 
> On 24 May 2018 at 00:35, Reyk Floeter  wrote:
> >
> > switchd is already privsep‘ed with a chroot jail.
> >
> > But I don’t quite understand what you mean.
> >
> > > Am 23.05.2018 um 10:35 schrieb Thomas Huber :
> > >
> > > Hi all,
> > >
> > > I´m just tinkering a little bit and try to mimic some
> "containerization" on
> > > OpenBSD with chroot. Is it somehow possible to attach a chrooted
> > > envirionment to swtichd(8) ?
> > >
> > > Thanks
> > > Thomas



runit

2018-05-23 Thread Ken M
I noticed runit is in the ports, looking at the runit website I see instructions
for OpenBSD installation but they are many versions back. Does anyone use runit
as a replacement init system on their OpenBSD installs in the list?

Experiences and possibly a source for more current information on the
installation process would be awesome. Thank you.

Ken



Re: sndio multiple interfaces

2018-05-22 Thread Ken M
On Tue, May 22, 2018 at 07:56:31AM +0200, Alexandre Ratchov wrote:
> On Sun, May 20, 2018 at 06:49:25PM -0400, Ken M wrote:
> > Been looking around and can't find the answer to this question. If I missed 
> > it
> > in some obvious place please excuse me.
> > 
> > Anyway I am curious if sndio can support multiple simultaneous cards, either
> > identical or different, particularly multiple standards compliant USB audio
> > interfaces. Basically I am asking if it supports similar features to what 
> > one
> > might use zita with jack on a linux system.
> 
> This doesn't work with sndio. It's difficult to make work because each
> audio interface would use its own clock source, and clocks would drift
> sooner or later. Drift may be corrected, but this would cost
> additional latency, complexity and (probably) quality problems.
> 
> That's why certain devices have a "word clock", to allow audio devices
> to by synchronized; OpenBSD doesn't support any of them, but
> supporting them looks much easier than combining multiple devices.
> 
> Nowadays many-channel devices are common, so supporting multiple cards
> as one isn't that important, is it?

OK, noted. The question was about a feature parity against a library in linux.
Zita is a tool to help overcome the clock drift. Truth is in practice it is less
than reliable so a single interface is better in practice. 

Thank you.
Ken



sndio multiple interfaces

2018-05-20 Thread Ken M
Been looking around and can't find the answer to this question. If I missed it
in some obvious place please excuse me.

Anyway I am curious if sndio can support multiple simultaneous cards, either
identical or different, particularly multiple standards compliant USB audio
interfaces. Basically I am asking if it supports similar features to what one
might use zita with jack on a linux system.

Part of the reason I am diving into OpenBSD is sndio. I find it a breath of
fresh air after years of ALSA+Jack "fun..."

Ken



Re: Viewport for man.openbsd.org -- readability on phones

2018-05-17 Thread Ken M
In all honesty I wasn't thinking of the suggestion as a cautious one because of
bloat. I think bootstrap minified and compressed is like 20k. I mean how big is
the entire man page collection?

I was more hesitant to make the suggestion because if there was ever a community
that en masse browsed with js disabled I would think it would be this one.

Ken

On Fri, May 18, 2018 at 03:08:25AM +0200, Ingo Schwarze wrote:
> Hi Ken,
> 
> Ken M wrote on Thu, May 17, 2018 at 08:50:53PM -0400:
> 
> > I will probably have to duck and run
> > for suggesting javascript as the answer here...
> 
> Precisely.  :)
> 
> > But for the most part the modern industry standard to make pages
> > scale well across many devices and screen orientations is to use
> > a responsive design library, most notably bootstrap.
> 
> We are talking about a simplistic one-column layout here,
> and avoiding that kind of bloat (in particular javascript)
> is among the top four design goals, together with support
> for hyperlinks, support for semantic annotations, and avoiding
> gratuitous presentational differences when compared to terminal
> output (just to avoid misunderstandings, not every difference
> is gratuitous: for example, terminals naturally use fixed-width
> fonts, HTML naturally uses proportional fonts).
> 
> But no, javascript is an even worse suggestion than the
> original idea of "meta viewport".
> 
> Yours,
>   Ingo



Re: Viewport for man.openbsd.org -- readability on phones

2018-05-17 Thread Ken M
I will probably have to duck and run for suggesting javascript as the answer
here...

But for the most part the modern industry standard to make pages scale well
across many devices and screen orientations is to use a responsive design
library, most notably bootstrap.

Ken

On Fri, May 18, 2018 at 10:07:27AM +0930, Jack Burton wrote:
> On Thu, 17 May 2018 18:32:44 -0400
> Aner Perez  wrote:
> > First non-comment line of mandoc.css says:
> > 
> > html {  max-width: 100ex; }
> > 
> > Removing this line allows the use of the full browser width.  I'm
> > sure that it was put there for a reason (maybe to approximate the
> > width of a terminal?).
> 
> Some browsers simply don't calculate lengths expressed in exes correctly
> -- seen that in many other contexts. Last time I checked (about 3 years
> ago, so it might well have changed since), two of the four most common
> browsers still exhibited that fault.
> 
> As a quick experiment, try looking up the metrics of the font your
> browser actually uses to render man pages, then convert 100ex into ems
> for your font and put the result in the max-width attribute in your
> local copy of mandoc.css.
> 
> If that fixes your width issue then you'll have clear evidence that the
> bug lies in the browser (specifically in its routine for converting
> exes to whatever its native display length unit is).
> 



Re: CVE-2018-8897

2018-05-10 Thread Ken M
Thank you. After many of the things I have read about OpenBSD being "overhyped"
online I thought this was a real interesting case that most of the industry gets
slapped with this the other day and OpenBSD is all fine and dandy.

I am glad to get the quantification as to why.

Ken

On Thu, May 10, 2018 at 03:54:01PM -0700, Mike Larkin wrote:
> On Thu, May 10, 2018 at 03:41:59PM +, Ken MacKenzie wrote:
> > Dare I ask what lead to OpenBSD not being affected.
> > 
> > Sorry if it is a dumb question but since this hit FreeBSD as well I am
> > wondering
> > what OpenBSD did differently.
> > 
> > Was this caught in an audit?
> > 
> > I am just curious about causality that kept OpenBSD in the clear of this one
> > that made such headlines yesterday.
> > 
> > Ken
> > 
> 
> OpenBSD does not allow userspace to access the hardware debug registers.
> 
> -ml
> 
> > On Thu, May 10, 2018 at 07:39:28AM -0700, Mike Larkin wrote:
> > > On Thu, May 10, 2018 at 10:22:48AM -0400, Predrag Punosevac wrote:
> > > > Does this
> > > >
> > > > https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2018-8897
> > > >
> > > > affect 6.3 stable?
> > > >
> > > > Best,
> > > > Predrag
> > > >
> > >
> > > OpenBSD is not affected.
> > >
> > > -ml
> > >



Re: compiling ardour -lexecinfo issues

2018-05-06 Thread Ken M
I will move further iteration of this to there after this reply. Sorry.

OK I will try to figure out getting this to use cc c++ instead. I tried setting
the flag and it says not found. It is setup to compile with waf and that might
be part of the darn problem.

Ken

On Sun, May 06, 2018 at 02:15:52PM +, Stuart Henderson wrote:
> On 2018-05-06, Ken M <k...@mack-z.com> wrote:
> > Maybe this should go to ports@ but not sure I am near there yet.
> 
> ports@ is a much better place for this type of question.
> 
> > So I am trying to compile the latest ardour on 6.3, got through compiling
> > rubberband and aubio and now well I am stuck here:
> >
> > [200~./waf configure --boost-include=/usr/local/include
> > Setting top to   : /home/superfly/git/ardour 
> > Setting out to   : /home/superfly/git/ardour/build 
> > Checking for 'gcc' (c compiler)  : /usr/bin/gcc 
> > Checking for 'g++' (c++ compiler): /usr/bin/g++ 
> 
> This should be using cc/c++ rather than gcc/g++
> 
> > Global Configuration 
> >  * Install prefix: /usr/local 
> >   * Debuggable build  : True 
> >* Build documentation   : False 
> >
> >Ardour Configuration 
> > * Will build against private GTK dependency stack   : no 
> >  * Will rely on libintl built into libc  : yes 
> >   * Will build against private Ardour dependency stack : no 
> >   Checking for boost library >= 1.39   : ok 
> >   Checking for program pkg-config  : 
> > /usr/bin/pkg-config 
> >   Checking for 'glib-2.0' >= 2.28  : yes 
> >   Checking for 'gthread-2.0' >= 2.2: yes 
> >   Checking for 'glibmm-2.4' >= 2.32.0  : yes 
> >   Checking for 'sndfile' >= 1.0.18 : yes 
> >   Checking for 'giomm-2.4' >= 2.2  : yes 
> >   Checking for 'libcurl' >= 7.0.0  : yes 
> >   Checking for 'libarchive' >= 3.0.0   : yes 
> >   Checking for 'liblo' >= 0.26 : yes 
> >   Checking for 'taglib' >= 1.6 : yes 
> >   Checking for 'vamp-sdk' >= 2.1   : yes 
> >   Checking for 'vamp-hostsdk' >= 2.1   : yes 
> >   Checking for 'rubberband': yes 
> >   Checking for  sndfile RF64=>RIFF support : Found 
> >   Checking for clang   : no 
> >
> >   Warning: you are building Ardour with SSE support even though your 
> > system
> >   does not support these instructions. (This may not be an error, 
> > especially
> >   if you are a package maintainer)
> >   hidapi is not yet available for the given system
> >   Checking for 'fftw3f': yes 
> >   Checking for 'aubio' >= 0.3.2: yes 
> >   Checking for 'aubio' >= 0.4.0: yes 
> >   Checking for 'libxml-2.0': yes 
> >   Checking for 'sigc++-2.0' >= 2.0 : yes 
> >   Checking for function getmntent  : not found 
> >   Checking for header execinfo.h   : not found 
> >   Checking for header unistd.h : not found 
> >   Checking for function posix_memalign : no 
> 
> That's weird because we do have posix_memalign
> 
> >   Checking for function localtime_r: not found 
> >   Checking for header boost/shared_ptr.hpp : not found 
> >   The configuration failed
> >   (complete log in /home/superfly/git/ardour/build/config.log)
> >
> > Tail form the config.log
> >
> > [2/2] cxxprogram: 
> > build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/test.cpp.1.o 
> > -> build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/testprog
> >
> > ['/usr/bin/g++', '-lexecinfo', 'test.cpp.1.o', '-o', 
> > '/home/superfly/git/ardour/build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/testprog',
> >  '-Wl,-Bstatic', '-Wl,-Bdynamic']
> > err: /usr/bin/ld: cannot find -lexecinfo
> > collect2: ld returned 1 exit status
> 
> The reason it's failing is because it doesn't specify -L/usr/local/lib,
> however in the case of libexecinfo the best option here is to figure out
> how to disable it from being picked up at all.
> 
> 



compiling ardour -lexecinfo issues

2018-05-05 Thread Ken M
Maybe this should go to ports@ but not sure I am near there yet.

So I am trying to compile the latest ardour on 6.3, got through compiling
rubberband and aubio and now well I am stuck here:

[200~./waf configure --boost-include=/usr/local/include
Setting top to   : /home/superfly/git/ardour 
Setting out to   : /home/superfly/git/ardour/build 
Checking for 'gcc' (c compiler)  : /usr/bin/gcc 
Checking for 'g++' (c++ compiler): /usr/bin/g++ 

Global Configuration 
 * Install prefix: /usr/local 
  * Debuggable build  : True 
   * Build documentation   : False 

   Ardour Configuration 
* Will build against private GTK dependency stack   : no 
 * Will rely on libintl built into libc  : yes 
  * Will build against private Ardour dependency stack : no 
  Checking for boost library >= 1.39   : ok 
  Checking for program pkg-config  : 
/usr/bin/pkg-config 
  Checking for 'glib-2.0' >= 2.28  : yes 
  Checking for 'gthread-2.0' >= 2.2: yes 
  Checking for 'glibmm-2.4' >= 2.32.0  : yes 
  Checking for 'sndfile' >= 1.0.18 : yes 
  Checking for 'giomm-2.4' >= 2.2  : yes 
  Checking for 'libcurl' >= 7.0.0  : yes 
  Checking for 'libarchive' >= 3.0.0   : yes 
  Checking for 'liblo' >= 0.26 : yes 
  Checking for 'taglib' >= 1.6 : yes 
  Checking for 'vamp-sdk' >= 2.1   : yes 
  Checking for 'vamp-hostsdk' >= 2.1   : yes 
  Checking for 'rubberband': yes 
  Checking for  sndfile RF64=>RIFF support : Found 
  Checking for clang   : no 

  Warning: you are building Ardour with SSE support even though your 
system
  does not support these instructions. (This may not be an error, 
especially
  if you are a package maintainer)
  hidapi is not yet available for the given system
  Checking for 'fftw3f': yes 
  Checking for 'aubio' >= 0.3.2: yes 
  Checking for 'aubio' >= 0.4.0: yes 
  Checking for 'libxml-2.0': yes 
  Checking for 'sigc++-2.0' >= 2.0 : yes 
  Checking for function getmntent  : not found 
  Checking for header execinfo.h   : not found 
  Checking for header unistd.h : not found 
  Checking for function posix_memalign : no 
  Checking for function localtime_r: not found 
  Checking for header boost/shared_ptr.hpp : not found 
  The configuration failed
  (complete log in /home/superfly/git/ardour/build/config.log)

Tail form the config.log

[2/2] cxxprogram: 
build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/test.cpp.1.o -> 
build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/testprog

['/usr/bin/g++', '-lexecinfo', 'test.cpp.1.o', '-o', 
'/home/superfly/git/ardour/build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/testprog',
 '-Wl,-Bstatic', '-Wl,-Bdynamic']
err: /usr/bin/ld: cannot find -lexecinfo
collect2: ld returned 1 exit status

from /home/superfly/git/ardour/libs/pbd: Test does not build: Traceback (most 
recent call last):
  File 
"/home/superfly/git/ardour/.waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a/waflib/Tools/c_config.py",
 line 447, in run_c_code
bld.compile()
  File 
"/home/superfly/git/ardour/.waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a/waflib/Build.py",
 line 190, in compile
raise Errors.BuildError(self.producer.error)
BuildError: Build failed
 -> task in 'testprog' failed (exit status 1):
{task 29862752065616: cxxprogram test.cpp.1.o -> testprog}
['/usr/bin/g++', '', '-lexecinfo', 'test.cpp.1.o', '-o', 
'/home/superfly/git/ardour/build/.conf_check_c02c9165785b1b8132b54a498262d87b/testbuild/testprog',
 '-Wl,-Bstatic', '-Wl,-Bdynamic']

not found
from /home/superfly/git/ardour/libs/pbd: The configuration failed

Sanity check:

[200~ll /usr/local/lib/libexecinfo*
-rw-r--r--  1 root  bin  43940 Mar 27 11:52 /usr/local/lib/libexecinfo.a
-rw-r--r--  1 root  bin  45620 Mar 27 11:52 /usr/local/lib/libexecinfo.so.2.0
-rw-r--r--  1 root  bin  44868 Mar 27 11:52 /usr/local/lib/libexecinfo_p.a


So kind of drawing a blank of where to go next to resolve this.

Ken



Re: Suspend on Lenovo T440

2018-05-05 Thread Ken M
Theo also sent me a message to disable TPM as well as the fingerprint reader in
the BIOS. Compiling so I haven't rebooted to try it yet. But will, thank you.

Ken

On Sat, May 05, 2018 at 12:54:03PM -0300, Daniel Bolgheroni wrote:
> On Sat, May 05, 2018 at 03:14:32PM +0000, Ken M wrote:
> > So I recently picked up a Lenovo T440 for a good price to use as my OpenBSD 
> > road
> > warrior and replace the aging Toshiba I was using. Everything works but 2
> > things:
> > 
> > 1. Bluetooth of course
> > 2. Resume from suspend on lid close
> > 
> > I am writing because of number 2. For now I have disabled suspend on lid 
> > close
> > but I was wondering if other T440 users might have gotten suspend and 
> > resume on
> > lod close and open to work for another option on this computer.
> 
> Please check if this helps you:
> 
> https://marc.info/?l=openbsd-misc=152230308012611=2
> 
> -- 
> db



Suspend on Lenovo T440

2018-05-05 Thread Ken M
So I recently picked up a Lenovo T440 for a good price to use as my OpenBSD road
warrior and replace the aging Toshiba I was using. Everything works but 2
things:

1. Bluetooth of course
2. Resume from suspend on lid close

I am writing because of number 2. For now I have disabled suspend on lid close
but I was wondering if other T440 users might have gotten suspend and resume on
lod close and open to work for another option on this computer.

Ken



Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
Not to disagree but if using python3 -m venv in home works and home is not
mounted as wxallowed is there still a security issue with this workflow?

Granted at this point talking about a development workstation and not a server.

So while I am at it I guess I should ask is what you are saying more from a
serving python web app perspective, security wise?

Just trying to understand what I seem to be missing.

Ken

On Tue, May 01, 2018 at 03:18:00AM +0300, IL Ka wrote:
> It is up to you, but I still belive that best solution is to rebuild python
> without of wxneeded.
> 1) It improves security
> 2) It fixes your virtualenv issue.
> 
> If you do not use packages that need WX, why do you need wxneed?



Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
I happen to like python and will be the first I reach for for many simple or
even some bigger tasks. Nothing against those other languages. I actually have a
special place in my heart for perl, but with the perl 5 vs 6 thing I wonder on
the longer term future of the language.

Honestly I need to get the rust off of my c skills.

Ken

PS - please don't let me perl comment start any flame wars... please please


> My current position is to simply avoid python in favour of c,perl,sh
> and even php.
> 



Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
Thanks for all the responses but it seems an alternate solution presented by
another user in a direct reply is to use python3 - m venv.  Basically using the
venv built in to python3 as opposed to the legacy method of py-virtualenv that I
typically only have to use for older python 2 code bases.

Thanks all for the replies.

Ken


On Mon, Apr 30, 2018 at 06:23:32PM -0400, Dave Voutila wrote:
> Ken MacKenzie  writes:
> 
> > Is there a recommended best practice when setting up an environment with
> > python
> > virtualenv with regards to wxallowed.
> 
> AFAIK nothing official.
> 
> >
> > My typical workflow is under my home directory I have a
> > dev/language/project/.venv type structure. I guess the simple solution is to
> > mount /home as wxallowed in /etc/fstab, but is that truly the preferred way.
> > Seems to make a new attack surface for anything in home.
> >
> 
> Turning off any default mitigations is probably the opposite of "preferred".
> 
> > The other option I am thinking is to create a dev-username location in
> > /usr/local somewhere and then ln -s that into my home structure accordingly.
> >
> > Since I am new to OpenBSD I figured I would ask first and did not find much
> > on
> > this topic other than third parties that seem to want to casually just add
> > home
> > to wxallowed.
> >
> 
> I've been too lazy to dig into and "fix" this in the py{2,3}-virtualenv
> port. The main issue is it copies the binary for the target python
> executable and doesn't symlink it. It's really not a bug and more an
> adaptation issue so I've not been inclined.
> 
> However, symbolic links to /usr/local/bin/python work fine if they're
> located on partitions that aren't mounted wxallowed. I'd imagine if
> virtualenv created a symlink things would "just work."
> 
> So what I do, instead of teaching virtualenv to symlink instead of copy,
> is just confine my virtualenvs to /usr/local/venv (owned by root:wsrc).
> 
> I then just activate via the usual means of the activate script:
> 
>   kogelvis$ . /usr/local/venv/my-project/bin/activate
> 
> Typically, on other systems, I'd locate it in ~/.venv but for my
> personal machine it's not an issue.
> 
> I do set an environment variable:
> 
>   WORKON_HOME=/usr/local/venv
> 
> in .profile so I can configure tools like emacs major modes to point to
> where I want them to create/find virtual environments.
> 
> > Thanks in advance for any guidance,
> >
> > Ken



Re: Problem with OpenBSD as nfs client

2018-04-29 Thread Ken M
Best guess the problem is selinux on the fedora side.

Try setting it to permissive and if that solves the problem.

If that does solve the problem you need to analyze what to change in 
selinux not just leave it at permissive. Sorry I forget the exact commands 
but they can be found with a quick google search.

Ken



> On Apr 29, 2018, at 8:48 AM, Eike Lantzsch  wrote:
> 
>> On Sunday, April 29, 2018 2:14:23 PM -04 philippe@laposte.net wrote:
>> Hi,
>> 
>> First, im new with OpenBSD 6.3 that i run in Virtualbox.
>> 
>> I try to setup a NFS share :
>> server is Fedora workstation 28
>> - exports file looks like this
>> /home/filip/Documents 192.168.1.1238 (rw)
>> /home/filip/Public 192.168.1.128 (rw)
>> Of course NFS is active on the server
>> 
>> client is Openbsd 6.3 and i have this message when i try to mount a share :
>> 
>> filip@openbsd:~$ sudo mount -t nfs 192.168.1.85:/home/filip/Documents
>> /mnt/nfs_Documents/ NFS Portmap: RPC: Program not registered
>> 
>> I will be happy to find a solution after long time on google without succes.
>> Thanks for help
>> Philippe.
> 
> Sorry Philippe, but I have no knowledge of Fedora but what does your OBSD on 
> Virtualbox say about:
> rpcinfo -p 192.168.1.85
> 
> Which version of nfs is running on Fedora and is the portmapper running?
> The following discussion might be of help:
> https://forums.fedoraforum.org/showthread.php?186999-NFS-mounting-problems-quot-RPC-Error-Program-not-registered-quot
> 
> I wish you success
> Eike
> -- 
> Eike Lantzsch ZP6CGE
> 
> You can’t have your π and eat it.
>