Re: The simplest full cray data core with 3 cpu's and a physics hack that makes it work

2021-04-02 Thread Benjamin Baier
GPT-3 gone wild, or what? Definitely to late for Aprilfools-day.



Re: base LoC & committers

2020-12-08 Thread Benjamin Baier
On Tue, 08 Dec 2020 19:43:30 +0100
Salvatore Cuzzilla  wrote:

> do you know if it's possible to see some statistics about the
> committers? like for example number of commits per committer. 
Sounds like an Advent of Code puzzle, for grepping through
/cvs/CVSROOT/ChangeLog*

The answer for Part 1: sum of base (src) commits so far in 2020 is 7582. 
Part 2 to figure out which committer has the most commits in 2020 is 
left open as excercise for the reader. Hint it's ~740 commits.

> On Tue, 2020-12-08 at 15:53 +0100, Benjamin Baier wrote:
> > On Tue, 08 Dec 2020 13:49:13 +0100
> > Salvatore Cuzzilla  wrote:
> > 
> > > Hi Everyone,
> > > 
> > > just out of curiosity, I was asking myself:
> > > 
> > > - approx how many LoC do we have in *base*?
> > > - & how many committers are actually contributing to it?
> > > 
> > > when I think about some other OS with a kernel of almost 30M LoC &
> > > over
> > > 5k committers I go insane :)  
> > > 
> > > 
> > > Regards,
> > > Salvatore.
> > 
> > $ cloc /usr/src
> >   111439 text files.
> >85841 unique files.  
> >55120 files ignored.



Re: base LoC & committers

2020-12-08 Thread Benjamin Baier
On Tue, 08 Dec 2020 13:49:13 +0100
Salvatore Cuzzilla  wrote:

> Hi Everyone,
> 
> just out of curiosity, I was asking myself:
> 
> - approx how many LoC do we have in *base*?
> - & how many committers are actually contributing to it?
> 
> when I think about some other OS with a kernel of almost 30M LoC & over
> 5k committers I go insane :)  
> 
> 
> Regards,
> Salvatore.

$ cloc /usr/src
  111439 text files.
   85841 unique files.  
   55120 files ignored.

github.com/AlDanial/cloc v 1.86  T=254.29 s (229.3 files/s, 94467.6 lines/s)
---
Language files  blankcomment
   code
---
C1741212941481491393
7181673
C/C++ Header 14902 4933731021729
4255540
C++  10637 483624 511811
2771795
Perl  4309 169414 228936
 956256
Bourne Shell  1263  57662  69942
 434428
Markdown   279  47833  0
 407365
PO File129 141599 190451
 319672
Python1461  35581  35610
 134779
HTML   259  17553993
 128449
Assembly   969  21343  56839
 117720
yacc93  14004   8880
 108162
reStructuredText   775  49070  43308
 106806
Expect 460  14443  21700
  74931
make  2459  15471   8987
  68516
Windows Module Definition  200   6600  3
  49202
m4 177   5669   3351
  48578
CMake  882   5106   3729
  36458
ASP.NET  2   1013 18
  24717
TeX 29   3094  12237
  21764
Pascal  58   3289  16255
  13924
Scheme  95   1438146
  12907
XML108828396
  10910
lex 35   1714   1908
  10441
awk 57686   1607
   8210
SWIG67   2752508
   7668
Fortran 77 183893   2886
   7495
Oracle PL/SQL4180  1
   6945
Go  26908733
   6507
Objective C++   23   1097840
   6332
Objective C211   1639629
   6041
YAML   100 75 60
   5954
OCaml   59   1366   2512
   4083
Fortran 90  73264818
   3457
Korn Shell  83900   1118
   3381
JSON41  1  0
   2651
SQL  5 77 38
   2343
sed 46221593
   1848
CSS 20282105
   1801
ANTLR Grammar2  0  0
   1726
DOS Batch   30251103
   1501
SVG  4  0 26
   1361
Lisp12193452
   1147
Bourne Again Shell   8170236
899
diff25124624
628
Forth1122162
596
C#   8 89107
570
JavaScript   4 79   

Re: Hardware UUID discrepancies (dmidecode vs. sysctl) on amd64 multiboot system

2020-11-07 Thread Benjamin Baier
On Sat, 7 Nov 2020 12:36:42 -0500
Bruce Lilly  wrote:

> I have a multiboot system with several OSes on the same hardware.
> 
> Summary: OpenBSD UUID reported by dmidecode and from sysctl differ
> significantly w.r.t. byte ordering.  Multiple OSes report the same dmidecode
> UUID, and most other OSes provide one or more alternate ways of accessing
> the UUID which yields results consistent with dmidecode.
> 
> Details:
> dmidecode (after fiddling with kern.allowkmem via /etc/sysctl.conf on OpenBSD)
> run on each OS that has a dmidecode utility reports the same hardware UUID
> (modulo hexadecimal digit case), viz.
> 
> UUID: 484B1340-D7AA-81E5-3CED-9C5C8E3D6756
> 
> OpenBSD (6.8) `sysctl hw.uuid` instead reports:
> 
> hw.uuid=40134b48-aad7-e581-3ced-9c5c8e3d6756
> 
> Note that the differences are:
> 1. case of hexadecimal digits (inconsequential)
> 2. byte ordering (but inconsistently so between the initial part
> and the last 64 bits (the latter part's byte ordering is consistent
> with dmidecode))
> 
According to SMBIOS Reference Specification, you are correct.
  7.2.1
  Although RFC 4122 recommends network byte order for all fields, the PC 
industry (including the ACPI,
  UEFI, and Microsoft specifications) has consistently used little-endian byte 
encoding for the first three
  fields: time_low, time_mid, time_hi_and_version. The same encoding, also 
known as wire format, should
  also be used for the SMBIOS representation of the UUID.
  The UUID {00112233-4455-6677-8899-AABBCCDDEEFF} would thus be represented as:
  33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF.

What are the ramifications of a changed UUID?
What software depends on hw.uuid not changing? 

Greetings Ben

---

Index: amd64/amd64/bios.c
===
RCS file: /var/cvs/src/sys/arch/amd64/amd64/bios.c,v
retrieving revision 1.43
diff -u -p -r1.43 bios.c
--- amd64/amd64/bios.c  26 Aug 2020 03:29:05 -  1.43
+++ amd64/amd64/bios.c  7 Nov 2020 20:58:51 -
@@ -501,9 +501,9 @@ smbios_info(char *str)
if (hw_uuid) {
snprintf(hw_uuid, SMBIOS_UUID_REPLEN,
SMBIOS_UUID_REP,
-   sys->uuid[0], sys->uuid[1], sys->uuid[2],
-   sys->uuid[3], sys->uuid[4], sys->uuid[5],
-   sys->uuid[6], sys->uuid[7], sys->uuid[8],
+   sys->uuid[3], sys->uuid[2], sys->uuid[1],
+   sys->uuid[0], sys->uuid[5], sys->uuid[4],
+   sys->uuid[7], sys->uuid[6], sys->uuid[8],
sys->uuid[9], sys->uuid[10], sys->uuid[11],
sys->uuid[12], sys->uuid[13], sys->uuid[14],
sys->uuid[15]);
Index: arm64/dev/smbios.c
===
RCS file: /var/cvs/src/sys/arch/arm64/dev/smbios.c,v
retrieving revision 1.6
diff -u -p -r1.6 smbios.c
--- arm64/dev/smbios.c  26 Aug 2020 03:29:05 -  1.6
+++ arm64/dev/smbios.c  7 Nov 2020 21:00:32 -
@@ -410,9 +410,9 @@ smbios_info(char *str)
if (hw_uuid) {
snprintf(hw_uuid, SMBIOS_UUID_REPLEN,
SMBIOS_UUID_REP,
-   sys->uuid[0], sys->uuid[1], sys->uuid[2],
-   sys->uuid[3], sys->uuid[4], sys->uuid[5],
-   sys->uuid[6], sys->uuid[7], sys->uuid[8],
+   sys->uuid[3], sys->uuid[2], sys->uuid[1],
+   sys->uuid[0], sys->uuid[5], sys->uuid[4],
+   sys->uuid[7], sys->uuid[6], sys->uuid[8],
sys->uuid[9], sys->uuid[10], sys->uuid[11],
sys->uuid[12], sys->uuid[13], sys->uuid[14],
sys->uuid[15]);
Index: i386/i386/bios.c
===
RCS file: /var/cvs/src/sys/arch/i386/i386/bios.c,v
retrieving revision 1.126
diff -u -p -r1.126 bios.c
--- i386/i386/bios.c26 Aug 2020 03:29:05 -  1.126
+++ i386/i386/bios.c7 Nov 2020 21:02:17 -
@@ -1080,9 +1080,9 @@ smbios_info(char *str)
if (hw_uuid) {
snprintf(hw_uuid, SMBIOS_UUID_REPLEN,
SMBIOS_UUID_REP,
-   sys->uuid[0], sys->uuid[1], sys->uuid[2],
-   sys->uuid[3], sys->uuid[4], sys->uuid[5],
-   sys->uuid[6], sys->uuid[7], sys->uuid[8],
+   sys->uuid[3], sys->uuid[2], sys->uuid[1],
+   sys->uuid[0], sys->uuid[5], 

Re: VMM Debian guest serial setup help needed

2020-07-18 Thread Benjamin Baier
On Fri, 17 Jul 2020 23:50:06 -0700
Aaron Miller  wrote:

> On Fri, 2020-06-12 at 17:46 -0400, George wrote:
> > On 2020-06-12 11:17 a.m., George wrote:
> > > On 2020-06-10 4:15 p.m., Benjamin Baier wrote:
> > > > On Wed, 10 Jun 2020 14:36:46 -0400
> > > > George <
> > > > g.lis...@nodeunit.com
> > > > > wrote:
> > > > 
> > > > > Hi guys,
> > > > > 
> > > > > I apologize if this maybe out of topic even though it is
> > > > > truly related
> > > > > to VMM than Debian.
> > > > > 
> > > > > I am trying to setup a VMM Debian based guest but I'm not
> > > > > able to 
> > > > > get it
> > > > > to work. I found some description on the web about which
> > > > > settings to
> > > > > edit in grub.cfg to enable the serial console and created
> > > > > a VM with 
> > > > > 10.3
> > > > > in qcow2 disk format in KVM. Now I am trying to start the
> > > > > same on
> > > > > OpenBSD 6.7 but keep getting the connected message and
> > > > > then just
> > > > > "Rebooting " after I hit some keyboard keys seems like
> > > > > baud rate issue
> > > > > but not sure.
> > > > 
> > > > Don't need the KVM/qemu step.
> > > 
> > > Didn't know that was possible, much better thanks :)
> > > > > After messing with it for a while now I am getting a new
> > > > > error:
> > > > > 
> > > > > vmctl: could not open disk image(s)
> > > > 
> > > > Better start over.
> > > 
> > > And so I did ...
> > > > > even thought the disk is there and readable to the user I
> > > > > have setup in
> > > > > vm.conf in fact I have another VM with the same
> > > > > configuration and disk
> > > > > with the same permissions and in the same location that
> > > > > works (it is
> > > > > OpenBSD based).
> > > > > 
> > > > > I would greatly appreciate it if someone has gone this
> > > > > path and can
> > > > > share some config info with me.
> > > > 
> > > > Here is how I got debian 9 (stretch) installed.
> > > > http://www.netzbasis.de/openbsd/vmd-debian/index.html
> > > > 
> > > > I think the virtio-modules are now included in the debian 10
> > > > (buster)
> > > > installer, but not tested.
> I believe I can confirm this. See below.
> 
> > > > 
> > > 
> > > I am trying your preped boot.img so far going through install
> > > options 
> > > most of which lead to:
> > > 
> > > Loading linux... ok
> > > Loading initrd.gz...ok
> > > Probing EDD (edd=off to disable)... ok
> > > Undefined video mode number: 314
> > > Press  to see video modes available,  to
> > > continue, or 
> > > wait 30 sec
> > > Mode: Resolution:  Type:
> > > 0 F00   80x25  CGA/MDA/HGC
> > > Enter a video mode or "scan" to scan for additional modes:
> > > 
> > > trying Install which I thought would be best (2-nd one after
> > > Graphical 
> > > Install) hangs with:
> > > 
> > > [0.00] ACPI BIOS Error (bug): A valid RSDP was not
> > > found 
> > > (20160831/tbxfroot-244)
> > > [0.806052] Initramfs unpacking failed: write error
> > > [0.814403] [Firmware Bug]: cpu 0, invalid IBS interrupt
> > > offset 0 
> > > (MSRC001103A=0x)
> > > [1.852264] mce: Unable to init device /dev/mcelog (rc: -5)
> > > 
> > > Thanks for your help and the page!
> > 
> > 
> > I tried a few more times still no luck. What is the key
> > combination I 
> > need to use to get into a shell to load the modules. Hitting Esc
> > puts me 
> > into boot> program which does not understand module handling
> > etc.. and 
> > the menu does not let me to run a shell. I am missing something
> > ...?
> > 
> > Thanks!
> > 
> 
> Hey George,
> 
> I don't know if you resolved this, but I was able to get further
> than this loosely following Benjamin's instructions. I skipped the part about 
> the virtio-modules which doesn't seem to be necessary now (and the link is 
> 404 now anyway).
> 
> I was able to go through the menu (starting with Install, and skipping the 
> modprobe commands) but DHCP didn't work, and I'm not sure what's broken.
> 
> To answer your question, you need to press Esc _after_ selecting Install. 
> Maybe that's why you saw the "boot>" prompt.
> 
> It worked for me and I just ran lsmod since I didn't have any modules to 
> insert:
> 
> ~ # lsmod
> Module  Size  Used by
> virtio_blk 20480  0
> virtio_net 32768  0
> virtio_pci 24576  0
> virtio_ring24576  3 virtio_blk,virtio_net,virtio_pci
> virtio 16384  3 virtio_blk,virtio_net,virtio_pci
> 
> I hope this helps, and please let me know if you or anyone else
> has an idea of why DHCP isn't working in the guest VM.

With the virtio modules now included in the installer you can skip my
tutorial. You only need to change bootparameters in GRUB to pass
vga=off console=ttyS0,115200n8 to the linux kernel.

As for DHCP, it depends on your config: is pf blocking DHCP traffic?
is the bridge/switch interface set up correctly?
is sysctl net.inet.ip.{m,}forwarding set to 1?
do you use vmctl -L (local interface)?



Re: OpenMoko

2020-07-10 Thread Benjamin Baier
On Fri, 10 Jul 2020 04:12:03 + ()
m brandenberg  wrote:

> On Thu, 9 Jul 2020, Theo de Raadt wrote:
> 
> > static const struct urng_type urng_devs[] = {
> >{ { USB_VENDOR_OPENMOKO2, USB_PRODUCT_OPENMOKO2_CHAOSKEY },
> >  {64, 5, 0, 100, 5000} },
> 
> Interesting.  That's what became of OpenMoko...  a pool of DevIDs
> for small device builders?
Yes, for Open Source Hardware, see https://github.com/openmoko/openmoko-usb-oui



Re: VMM Debian guest serial setup help needed

2020-06-10 Thread Benjamin Baier
On Wed, 10 Jun 2020 14:36:46 -0400
George  wrote:

> Hi guys,
> 
> I apologize if this maybe out of topic even though it is truly related 
> to VMM than Debian.
> 
> I am trying to setup a VMM Debian based guest but I'm not able to get it 
> to work. I found some description on the web about which settings to 
> edit in grub.cfg to enable the serial console and created a VM with 10.3 
> in qcow2 disk format in KVM. Now I am trying to start the same on 
> OpenBSD 6.7 but keep getting the connected message and then just 
> "Rebooting " after I hit some keyboard keys seems like baud rate issue 
> but not sure.
Don't need the KVM/qemu step.

> After messing with it for a while now I am getting a new error:
> 
> vmctl: could not open disk image(s)
Better start over.

> even thought the disk is there and readable to the user I have setup in 
> vm.conf in fact I have another VM with the same configuration and disk 
> with the same permissions and in the same location that works (it is 
> OpenBSD based).
> 
> I would greatly appreciate it if someone has gone this path and can 
> share some config info with me.

Here is how I got debian 9 (stretch) installed.
http://www.netzbasis.de/openbsd/vmd-debian/index.html
I think the virtio-modules are now included in the debian 10 (buster)
installer, but not tested. 



Re: sndioctl and USB HID keyboard

2020-04-20 Thread Benjamin Baier
On Mon, 20 Apr 2020 17:07:26 +0200
Alessandro De Laurenzis  wrote:

> Greetings,
> 
> Latest -current here:
> 
> OpenBSD theseus.atlantide.priv 6.7 GENERIC.MP#140 amd64
> 
> Of course, mixerctl doesn't work anymore for volume control.
> 
> I have a Logitech wireless keyboard whose multimedia keys were pretty 
> functional in OpenBSD through usbhidaction(1):
> 
> # The volume range is 0..1. Moving 0.1 volume steps each keypress
> # moves quickly through the volume range but still has decent
> # granularity.
> Consumer:Bass 1
>  sndioctl output.mute=!
> Consumer:0x00eb 1
>  sndioctl output.level=-0.1
> Consumer:Volume_Decrement 1
>  sndioctl output.level=+0.1
> [...]
> 
> but when I use the multimedia keys... nothing happens. I really don't 
> know how to debug this; is it related to the interaction with sndio?
> 
> Any hints?
> 

Have made the same adjustments here. Works good.
Do you have an old usbhidaction running in background, that blocks /dev/uhid1



Re: [/ is full] How to delete junk in /dev ?

2020-04-05 Thread Benjamin Baier
On Sun, 5 Apr 2020 10:19:30 +0200
Olivier  wrote:

> Hi,
> 
> I am running OpenBSD from a long time(T410 / Amd64) ; and 6.6 from the 
> release. I did not monitor the size of / in the past...
> Until today :(
> 
> Please, how to identify junk to remove in /dev below :

$ find /dev/ -type f

Everything this command finds except /dev/MAKEDEV can be removed.
Most likely this is a dd(1) gone wrong.

-- Ben



Re: chrome with multiple profiles possible?

2020-01-29 Thread Benjamin Baier
On Wed, 29 Jan 2020 12:03:29 -0500
Allan Streib  wrote:

> Per the man page I have tried to launch chrome with an alternate data
> directory hoping to achieve separate profiles.
> 
> $ chrome --user-data-dir=~/.config/chromium_a
> 
> 
> [75336:1591778608:0129/114259.294272:ERROR:process_singleton_posix.cc(280)] 
> Failed to create /home/astreib/.config/chromium_a/SingletonLock: No such file 
> or directory (2)
> [75336:1591778608:0129/114259.294449:ERROR:chrome_browser_main.cc(1413)] 
> Failed to create a ProcessSingleton for your profile directory. This means 
> that running multiple instances would start multiple browser processes rather 
> than opening a new window in the existing process. Aborting now to avoid 
> profile corruption.
> [75336:-995142592:0129/114259.302586:ERROR:cache_util.cc(141)] Unable to 
> move cache folder /home/astreib/.config/chromium_a/ShaderCache/GPUCache to 
> /home/astreib/.config/chromium_a/ShaderCache/old_GPUCache_000
> [75336:-995142592:0129/114259.302696:ERROR:disk_cache.cc(178)] Unable to 
> create cache
> [75336:-995142592:0129/114259.302721:ERROR:shader_disk_cache.cc(605)] 
> Shader Cache Creation failed: -2
> 
> I have tried this with ~/.config/chromium_a as an empty directory, and
> as a copy of ~/.config/chromium (which is created successfully when
> chrome is started without any args).

I do have multiple users set up on my machine for this purpose (chrome and 
other applications)
Launching with a script similar to this

#allow connection to xserver
xhost +si:localuser:chromeuser
#start browser
cd /home/chrome &&
doas -u chromeuser env HOME=/home/chrome chrome
xhost -si:localuser:chromeuser



Re: Modern browser for OpenBSD powerpc

2019-05-26 Thread Benjamin Baier
On Thu, 23 May 2019 07:19:25 +0100
John Gould  wrote:

> Can someone suggest a modern graphical browser for OpenBSD PowerPC?
> I'm trying to run
> several G5's and g4 mini's on 6.5 as desktop machines. The basic
> install works really well but there doesn't seem to be an up to date
> graphically browser.
> 
> It's thanks to all the work the devs have put into OpenBSD powerpc
> that these machine are still very usable. They are hopelessly out of
> date as far as the Mac OS are concerned!
> 
> Kind regards John.
> 

otter-browser works. I use it on a G4 for simple surfing. Did not try
for heavy js sites.



Re: ulpt vs kernel relinking

2019-05-10 Thread Benjamin Baier
I cooked up a diff like this once, but I dont really use it any more.

diff --git a/libexec/reorder_kernel/reorder_kernel.sh 
b/libexec/reorder_kernel/reorder_kernel.sh
index d8b8a2d24a..b59faca992 100644
--- a/libexec/reorder_kernel/reorder_kernel.sh
+++ b/libexec/reorder_kernel/reorder_kernel.sh
@@ -26,6 +26,7 @@ df -t nfs /usr/share >/dev/null 2>&1 && exit 1
 KERNEL=$(sysctl -n kern.osversion)
 KERNEL=${KERNEL%#*}
 KERNEL_DIR=/usr/share/relink/kernel
+KERNEL_CONF=/etc/kernel.conf
 LOGFILE=$KERNEL_DIR/$KERNEL/relink.log
 PROGNAME=${0##*/}
 SHA256=/var/db/kernel.SHA256
@@ -63,6 +64,14 @@ fi
 
 cd $KERNEL_DIR/$KERNEL
 make newbsd
+
+# Configure custom kernel options
+if [[ -f $KERNEL_CONF ]]; then
+   while read _option; do
+   printf "%s\nquit" "$_option" | config -fe bsd
+   done < $KERNEL_CONF
+fi
+
 make newinstall
 
 echo "\nKernel has been relinked and is active on next reboot.\n"


On Thu, 09 May 2019 23:41:17 -0600
"Theo de Raadt"  wrote:

> config -e is incompatible with the KARL relinking sequence.
> 
> For now, we consider KARL more valuable than config -e usage
> patterns.
> 
> We've thought about this but for now we don't have a clever
> solution to solve this.
> 
> Thuban  wrote:
> 
> > Hi,
> > I have a printer that require ulpt to be disabled
> > as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.
> > 
> > # config -fe /bsd
> > disable ulpt
> > quit
> > 
> > After a reboot, I can notice : 
> > 
> > reorder_kernel: kernel relinking failed; see 
> > /usr/share/relink/kernel/GENERIC.MP/relink.log
> > 
> > Ok, so I run, as mentioned in the above file : 
> > 
> > sha256 -h /var/db/kernel.SHA256 /bsd
> > 
> > However, at next reboot, ulpt is reenabled.
> > 
> > How can I still have KARL and use my printer ?
> > 
> > 
> > -- 
> > thuban
> > 
> 



Re: Resize keydisk (softraid) partition...

2018-09-07 Thread Benjamin Baier
On Fri, 7 Sep 2018 21:00:58 +0200
Zbyszek Żółkiewski  wrote:

> 
> > Wiadomość napisana przez Marcus MERIGHI  w dniu 
> > 07.09.2018, o godz. 18:09:
> > 
> > $ dd bs=8192 skip=1 if=/dev/rsd99z of=backup-keydisk.img
> > $ dd bs=8192 seek=1 if=backup-keydisk.img of=/dev/rsd99z
> 
> thanks for answers but that will make dump of whole 14GB - i would like to 
> shrink it to reasonable size…

Well, from reading the code a little seems the keydisk metadata is at offset
SR_META_OFFSET = 8192 bytes and is SR_META_SIZE (64) * DEV_BSIZE (512 bytes) = 
32768 bytes long.

Time ran out so do what you will with it. This is untested and always keep a 
good backup.



Re: Atom CPU is clear of L1TF

2018-08-25 Thread Benjamin Baier
On Sat, 25 Aug 2018 07:10:14 +
Rupert Gallagher  wrote:

> While Intel Core and Xeon are affected by L1TF, Atom CPUs (c3000) are clear 
> of it. Applying the patch to Cores and Xeons basically turns those CPUs into 
> Atoms. It is a shame that the self-appointed "most secure OS" does not run on 
> such processors.

What? Atom X works well, why wouldn't it run on C3000?
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) x7-Z8750 CPU @ 1.60GHz, 1600.36 MHz

> Your faithful troll.
I see.



Re: newaliases vs makemap

2018-07-16 Thread Benjamin Baier
On Sun, 15 Jul 2018 19:54:12 -0700
Joshua Taylor Eppinette  wrote:

> On Sun, Jul 15, 2018 at 05:59:58PM -0700, Scott Vanderbilt wrote:
> >In /etc/mail/aliases, there is the following note:
> >
> >#>>  The program "newaliases" must be run after
> >#>> NOTE >>  this file is updated for any changes to
> >#>>  show through to smtpd.  
> 
> I found this note confusing, because I was able to make changes and see them 
> reflected without running newaliases(8). However, I believe this is because 
> you only need to run newaliases(8)/makemap(8) if you are using a db table.

True. 2 years ago smtpd defaults switched from db to file based tables.

Because backwards compatibility: newaliases(8), makemap(8), sendmail(8)
and mailq(8) are all symlinks to mailwrapper(8) which then runs smtpctl(8).



Re: clearing the disk cache

2018-07-03 Thread Benjamin Baier
On Tue, 3 Jul 2018 09:42:46 +0200
Maximilian Pichler  wrote:

> I'm doing some performance tests that include reading files from disk
> and want to make sure that each test takes place under similar
> conditions.
> 
> In particular, how can one clear the disk cache? (I want to make sure
> that the second test isn't faster than the first one, just because
> some files they both use are still in cache.)
> 
> Right now I'm doing:
> $ cat some_file_the_size_of_RAM > /dev/null
> 
> Does this indeed clear the cache? Is there a better way?

$ doas sysctl kern.bufcachepercent=5

This will knock the disk cache down to 5% of RAM space.
You can not go lower, so a reboot between tests is the best way
to have a clean state.
Default is 20%, max. is 90% (which I use).

> Also, are there several level of file/disk caches or just one?

Just the one buffercache.



Weird timing with hw.smt=0

2018-06-18 Thread Benjamin Baier
Anybody seen this, too? Can't be twice as fast _without_ hypertreading.

Greetings Ben

$ sysctl hw.smt
hw.smt=1
$ time sha256 -tt& time sha256 -tt& time sha256 -tt& time sha256 -tt& 
[1] 50365
[2] 71708
[3] 79327
[4] 63724
SHA256 time trial.  Processing 10 1-byte blocks...SHA256 time trial.  
Processing 10 1-byte blocks...SHA256 time trial.  Processing 10 
1-byte blocks...SHA256 time trial.  Processing 10 1-byte blocks...$ 
Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 16.57 seconds
Speed  = 60350030.175015 bytes/second
0m16.68s real 0m16.57s user 0m00.01s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 16.61 seconds
Speed  = 60204695.966285 bytes/second
0m16.69s real 0m16.61s user 0m00.01s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 16.60 seconds
Speed  = 60240963.855422 bytes/second
0m16.71s real 0m16.60s user 0m00.00s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 16.66 seconds
Speed  = 60024009.603842 bytes/second
0m16.72s real 0m16.67s user 0m00.00s system

[4] + Done time sha256 -tt 
[3] - Done time sha256 -tt 
[2]   Done time sha256 -tt 
[1]   Done time sha256 -tt

$ sysctl hw.smt=0 
hw.smt: 1 -> 0
$ time sha256 -tt& time sha256 -tt& time sha256 -tt& time sha256 -tt& 
[1] 41881
[2] 73097
[3] 58187
[4] 17276
SHA256 time trial.  Processing 10 1-byte blocks...SHA256 time trial.  
Processing 10 1-byte blocks...SHA256 time trial.  Processing 10 
1-byte blocks...SHA256 time trial.  Processing 10 1-byte blocks...$ 
Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 8.79 seconds
Speed  = 113765642.775882 bytes/second
0m17.05s real 0m08.79s user 0m00.00s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 8.73 seconds
Speed  = 114547537.227950 bytes/second
0m17.23s real 0m08.73s user 0m00.00s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 8.83 seconds
Speed  = 113250283.125708 bytes/second
0m17.61s real 0m08.83s user 0m00.00s system

Digest = 3f7daf2b36997b6eb269f63176e09fee8f6daa13202d87e020da63d262c6a4ca
Time   = 8.77 seconds
Speed  = 114025085.518814 bytes/second
0m17.68s real 0m08.77s user 0m00.01s system

[4] + Done time sha256 -tt 
[3] - Done time sha256 -tt 
[2]   Done time sha256 -tt 
[1]   Done time sha256 -tt 



OpenBSD 6.3-current (GENERIC.MP) #25: Sun Jun 17 08:13:18 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8451125248 (8059MB)
avail mem = 8117284864 (7741MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (64 entries)
bios0: vendor LENOVO version "8DET69WW (1.39 )" date 07/18/2013
bios0: LENOVO 4287CTO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT DMAR UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
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-2520M CPU @ 2.50GHz, 2492.31 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,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.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,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-2520M CPU @ 2.50GHz, 2491.91 MHz
cpu2: 

Re: kernel (6.2 amd-64 mp) relinking failed on cloned disk

2018-04-11 Thread Benjamin Baier
On Tue, 10 Apr 2018 22:16:14 -0500
Z Ero  wrote:
> Does this mean that a machine specific hash / checksum required to
> validate / execute the kernel relink is not working or what?

It compares /bsd with checksum in /var/db/kernel.SHA256
if it does not match kernel relinking is disabled because it
assumes you are a kernel developer and know what you are doing.

> Also, how to correct the error, if possible?

$ doas sha256 -h /var/db/kernel.SHA256 /bsd



Re: Bioctl rounds doesn't appear to affect the passphrase time?

2017-06-23 Thread Benjamin Baier
On Fri, 23 Jun 2017 18:34:54 +0100
Kevin Chadwick  wrote:

> On Fri, 23 Jun 2017 18:13:20 +0200
> 
> 
> > > I started by trying very high values with a simple password and
> > > expected to have to wait a long time but it was always around 7
> > > seconds?
> > very high as in -r 2000 ?  
> 
> Yeah, 2048? Is there a MAX?
Not really.

Oh it's been only 9 month since bioctl(8) switched over to bcrypt PBKDF.
You might run a older version (dmesg would help) in which case you want
to go much higher... 16000? 

# bioctl -v -c C -l /dev/vnd0a softraid0

shows you what KDF you are using.



Re: Bioctl rounds doesn't appear to affect the passphrase time?

2017-06-23 Thread Benjamin Baier
On Fri, 23 Jun 2017 17:02:18 +0100
Kevin Chadwick  wrote:

> On 6.1 i386 with syspatch 004 I am running:
> 
> time /sbin/bioctl -c C -l /dev/vnd0a -r31 softraid0
> 
> I guess I am simply seeing my passphrase input time and the round has
> a marginal affect? Perhaps more on memory usage?
Yes you are measuring your typing speed.

> Is 31 the highest number of rounds?
-r auto gives me 129 rounds (~1sec to compute key)

> I started by trying very high values with a simple password and expected
> to have to wait a long time but it was always around 7 seconds?
very high as in -r 2000 ?
 
> tx
np 



Re: touchscreen on advantech PPC-3100

2017-01-20 Thread Benjamin Baier
On Fri, 20 Jan 2017 11:37:10 +0100
Marko Cupać  wrote:

> On Fri, 20 Jan 2017 10:47:27 +0100
> ludovic coues  wrote:
>
> > xtsscale might help with the calibration process
>
> Thank you, hope I get to this part. Right now it appears I don't have
> any touchscreen functionality on this model.

"PNP0F03" at acpi0 not configured
No driver yet.



clang(1) not picking up headers from /usr/include

2016-11-28 Thread Benjamin Baier
Hello,

what am I doing wrong?

clang(1) from ports claims to look under /usr/include by default [0] but for
me it doesn't work unless -I/usr/includes or C_INCLUDE_PATH=/usr/include
is defined.
After that I even hacked around in InitHeaderSearch.cpp[1] but no luck so far.

Greetings Ben


[0]
$ clang -x c -v -E /dev/null 
clang version 3.9.0 (tags/RELEASE_390/final)
Target: amd64-unknown-openbsd6.0
Thread model: posix
InstalledDir: /usr/local/bin
 "/usr/local/bin/clang-3.9" -cc1 -triple amd64-unknown-openbsd6.0 -E 
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name null 
-mrelocation-model pic -pic-level 1 -pic-is-pie -mthread-model posix 
-mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases 
-munwind-tables -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb 
-resource-dir /usr/local/bin/../lib/clang/3.9.0 -fdebug-compilation-dir 
/home/ben/Projects/llvm/llvm/tools/clang/lib/Frontend -ferror-limit 19 
-fmessage-length 80 -stack-protector 2 -fobjc-runtime=gnustep 
-fdiagnostics-show-option -o - -x c /dev/null
clang -cc1 version 3.9.0 based upon LLVM 3.9.0 default target 
amd64-unknown-openbsd6.0
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/bin/../lib/clang/3.9.0/include
 /usr/include
End of search list.
# 1 "/dev/null"
# 1 "" 1
# 1 "" 3
# 318 "" 3
# 1 "" 1
# 1 "" 2
# 1 "/dev/null" 2

[1]
--- tools/clang/lib/Frontend/InitHeaderSearch.cpp.orig  Sat Nov 26 15:51:51 2016
+++ tools/clang/lib/Frontend/InitHeaderSearch.cpp Sat Nov 26 15:51:41 2016
@@ -212,7 +212,10 @@
 case llvm::Triple::CloudABI:
 case llvm::Triple::FreeBSD:
 case llvm::Triple::NetBSD:
+  break;
 case llvm::Triple::OpenBSD:
+  AddPath("/usr/include", System, false);
+  break;
 case llvm::Triple::Bitrig:
 case llvm::Triple::NaCl:
 case llvm::Triple::PS4:



Re: Why not use malloc S by default?

2016-11-22 Thread Benjamin Baier
On Tue, 22 Nov 2016 19:44:48 +0100
"minek van"  wrote:

> So why isn't "S" enabled by default? It is the "most secure" solution for the
> malloc settings, no? 
> Or are there still programs that will crash when "S" is used? 
> What are those? 

Adding new printer on the CUPS webinterface does not "like" this 
malloc option. It doesn't crash, it just doesn't work.

Subtle breakage like this might occure when you "set and forget" this
feature. I guess thats why it is labled "for security auditing".

Greetings Ben



Re: FDE on BeagleBone Black

2016-09-28 Thread Benjamin Baier
On Wed, 28 Sep 2016 06:48:35 +0200
"L.R. D.S."  wrote:

> Also, as a side question, I remember some discussion here on misc or tech, 
> about no 
> support for binary packages on armv7 port. Is it still right, I'll have to 
> compile 
> all by myself? I'm already feeling the pain to compile ffmpeg by myself...
Building packages is only half as bad as it used to be since the pmap and cache
improvements patches got in. I've privately started building packages since 
ports
lock just to see how far I would get with 2 BBB. Pretty far, it turns out.



Re: USB printer

2016-09-19 Thread Benjamin Baier
On Mon, 19 Sep 2016 11:47:51 +0900
Tuyosi T  wrote:

> does anyone find good URL about printing with USB printer by cups ?
file:///usr/local/share/doc/pkg-readmes/cups-2.1.4

Greetings Ben



Re: Audio quality

2016-07-02 Thread Benjamin Baier
On Sat, 2 Jul 2016 00:40:57 -0400
Pavan Maddamsetti  wrote:

> Hey,
> 
> Just thought I would take a moment to appreciate the OpenBSD audio
> subsystem. I don't know if it is just me, but instead of using my
> phone to listen to Youtube I plugged the headphones into my desktop
> machine. It's a small PC with an older model Atom processor and
> Realtek ALC887 on the board. Headphones are ~$10 from Monoprice.
> 
> Good Lord, it sounds fantastic.
> 
Have my stereo connected and I use OpenBSD for audio/video playback exclusively
for over a year now. Very nice overall audio integration. 
With Pulseaudio I always had the need to fiddle with the mixer to get audio
volumes the way I want them. Now I just have to controll the master volume,
because on OpenBSD the applications behave like they should.

PS: This "NetworkOS" makes a hell of a desktop machine...



Re: wifind(8) find your wifi

2016-06-04 Thread Benjamin Baier
On Fri, 3 Jun 2016 00:26:12 +0800
Ray Lai  wrote:

> Hi all,
> 
> I got tired of configuring my wifi every time I had to move my laptop.
> Here's a script a whipped up. It scans the wifi for known networks and
> writes the strongest one to /etc/hostname.if. Then it runs netstart.
> Easy to use, simple config file, no arguments needed, perfect
> for /etc/apm/resume.
> 
> Oh, and it uses pledge for good measure.
> 
> I hope this is helpful!

Hi and thanks, 
please let me share my modifications for wifi handling, too.

This patch to /etc/netstart [0] cycles through different configurations
in hostname.if [1] until the link status becomes "active".

It's not bulletproof nor as fast as it could be...

Greetings Ben


[0] diff -u /etc/netstart.orig /etc/netstart
--- /etc/netstart.orig  Fri Jun  3 23:09:40 2016
+++ /etc/netstart   Sat Jun  4 11:05:03 2016
@@ -40,6 +40,8 @@
fi
# Check for ifconfig'able interface.
(ifconfig $if || ifconfig $if create) >/dev/null 2>&1 || return
+   # Check for wifi, so we can treat it special
+   [ "$(ifconfig $if | grep groups:.*wlan)" ] && wifi=yes
 
# Now parse the hostname.* file.
while :; do
@@ -66,6 +68,11 @@
"!"*) # Parse commands.
cmd="${af#*!} ${name} ${mask} ${bcaddr} ${ext1} ${ext2}"
;;
+   "TRYNEXT")
+   [ "$wifi" ] && wifi=checkactive || continue
+   [ "$name" = "NONE" ] && checkdelay="" || 
checkdelay="$name"
+   cmd=
+   ;;
"dhcp")
[ "$name" = "NONE" ] && name=
[ "$mask" = "NONE" ] && mask=
@@ -127,6 +134,13 @@
;;
esac
eval "$cmd"
+   if [ "X$wifi" = "Xcheckactive" ]
+   then
+   # delay to let the status catch up
+   [ "$checkdelay" ] && sleep $checkdelay || sleep 1
+   [ "$(ifconfig $if | grep status:.*active)" ] && break
+   wifi=retry
+   fi 
done 

Re: ntpd commandline expansion

2016-05-08 Thread Benjamin Baier
On Sat, 7 May 2016 13:13:49 -0700
Philip Guenther  wrote:

> On Sat, May 7, 2016 at 9:06 AM, Luke Small  wrote:
> > I often use virtualbox to run openbsd-amd64 and lately I haven't been able
> > to "ntpd -s" and make it update the clock, which may have been after
> > several days.  
> 
> Uh, how about we start by figuring out why "ntpd -s" is misbehaving
> before we launch into adding new "NO, I REALLY MEAN IT" options?
> What's the verbose output?  dmesg?

Had a similar "problem" on a recent install.
The hardware clock was so out of date, that a ntpd -s refused to set
the time because of ...ssl certificates not yet valid...

Solution one disable constraint check and run ntpd the old fashioned way
for the first few minutes. Or second solution, set the date once by hand
and then run ntpd with constraint checks.

Greetings Ben



Re: simultaneous sound as many users

2016-04-02 Thread Benjamin Baier
On Sat, 2 Apr 2016 01:42:03 +0700
Roman Gorelov  wrote:

> My sndio configuration is default, OBSD 5.9.
> When I run a media file in e.g. mpv, and pause it without closing, and
> try to listen to smth in chrome _as another user_, there is no sound:

You need to share the .aucat_cookie with all the users that are allowed
to play sound at the same time.
Permissions and uid are important, too. Don't try to share with a
symlink.

$ ls -lah /home/*en*/.aucat_cookie 
-rw---  1 ben   ben16B Aug 18  2015 /home/ben/.aucat_cookie
-rw---  1 enc   ben16B Aug 18  2015 /home/enc/.aucat_cookie
-rw---  1 enc1  ben16B Sep 24  2015 /home/enc1/.aucat_cookie
-rw---  1 enc2  ben16B Aug 23  2015 /home/enc2/.aucat_cookie

Greetings Ben



Re: Advices for a new laptop (Free Battery)

2015-10-29 Thread Benjamin Baier
On Thu, 29 Oct 2015 20:58:32 +0100
Domovoy  wrote:
> Thanks again for the advices, buying that x220 right now!

Everybody who bought a x220 or any other Lenovo laptop shipped between 
February 2010 and June 2012 you better check your battery.

You might get a new one, because your batterie might be a fire hazard.

https://support.lenovo.com/us/en/documents/hf004122
https://lenovobattery2014.orderz.com/



x220 - dmesg
OpenBSD 5.8-current (GENERIC.MP) #1548: Thu Oct 29 09:46:20 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8451125248 (8059MB)
avail mem = 8190869504 (7811MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (64 entries)
bios0: vendor LENOVO version "8DET69WW (1.39 )" date 07/18/2013
bios0: LENOVO 4287CTO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT DMAR UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
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-2520M CPU @ 2.50GHz, 2492.31 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiec0 at acpi0
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 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP7)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4861" serial 12675 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK docked (15)
cpu0: Enhanced SpeedStep 2492 MHz: speeds: 2501, 2500, 2200, 2000, 1800, 1600, 
1400, 1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
f0:de:f1:cd:a7:0f
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" 

Re: doas and home directory of target user

2015-09-22 Thread Benjamin Baier
On Tue, 22 Sep 2015 17:41:57 +0900
Joel Rees  wrote:

> I have this rule in doas.conf:
> 
> permit nopass user1 as user2
> 
> As user1, I try this at the command line:
> 
> doas -u user2 whoami
> 
> and it tells me I am user2, as I expect. And
> 
>doas -u user2 ls
> 
> tells me I don't have permission. I kind of expect this.
> 
> I'm looking for a way to do the equivalent of
> 
> sudo -u user2 -s "cd; ls"

My two slightly different solutions

$ doas -u user2 -s << EOF 
> cd /home/user2
>  
> ls
> EOF

$ doas -u user2 env HOME=/home/user2 /bin/ksh << EOF
 
> cd
> ls
> EOF

Greetings ben



Re: library missing after upgarde to current snapshot

2015-09-10 Thread Benjamin Baier
On Thu, 10 Sep 2015 15:06:21 +0300
Joseph Oficre  wrote:

> Hello!
> today i've upgraded my system to 10 september snapshot. And pkg_add -u
> shows:
> root:/home/usf# pkg_add -u
> quirks-2.121 signed on 2015-09-08T18:55:21Z
> Can't install libiconv-1.14p3 because of libraries
> |library c.81.0 not found
> | /usr/lib/libc.so.79.0 (system): bad major
> | /usr/lib/libc.so.80.0 (system): bad major
> | /usr/lib/libc.so.80.1 (system): bad major
> | /usr/lib/libc.so.82.0 (system): bad major
> Can't install gettext-0.19.5.1 because of libraries
> Direct dependencies for gettext-0.19.5.1->0.19.5.1 resolve to
> libiconv-1.14p3
> Full dependency tree is libiconv-1.14p3
> Can't install aspell-0.60.6.1p2 because of libraries
> Direct dependencies for aspell-0.60.6.1p2->0.60.6.1p2 resolve to
> gettext-0.19.5.1 libiconv-1.14p3
> Full dependency tree is gettext-0.19.5.1 libiconv-1.14p3
> ^CCouldn't find updates for aspell-0.60.6.1p2 gettext-0.19.5.1
> libiconv-1.14p3
> Fatal error: Caught SIGINT
>  at /usr/libdata/perl5/OpenBSD/AddDelete.pm line 40.
> 
> So i have libc 80 and 82, but no 81. What is that mean and how can i fix
> the problem? My last upgrade was a month ago.

You skipped the snapshots with libc 81 [0] in it (Aug 26 - Sep 9).
Wait for the packages to be build with 82... should not be long.

[0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/shlib_version?r1=1.175



Re: Sluggish/laggy browser behaviour

2015-07-28 Thread Benjamin Baier
On Tue, 28 Jul 2015 14:48:41 +0200
Stefan Sperling s...@stsp.name wrote:

 On Mon, Jul 27, 2015 at 08:58:54PM -0500, Yass Amed wrote:
  This problem is NOT specific to this model or any other machine (as far as 
  I experienced).
  This issue was present on a few towers and still is on an Intel/Asus{1} 
  based machine.
  You can try debugging FireFox or Chromium with gdb(1).
  
  {1} No dmesg, not on this machine at the moment.
 
 I have never seen fluent browser HTML5 video on any OpenBSD machine.
 Generally, videos at a fair resolution on OpenBSD played back without
 use of xvideo extensions or OpenGL are not watchable.
I might have gotten luky but this Thinkpad X220 plays 720p Youtube HTML5
video in Chromium without glitches, even on fullscreen.
As long as there is no other system load.

 My theory is that browsers rely on fast multi-core CPUs and multihreading in
 the kernel to show video smoothly. OpenBSD doesn't have multihreading in
 the kernel and is tuned for correctness rather than performance.
 
 Did anyone try playing HTML5 video in a browser on a slow (= 1Ghz) single
 core machine running Linux? Would you expect that to work?
 

OpenBSD 5.8 (GENERIC.MP) #2: Mon Jul 27 21:42:02 CEST 2015

b...@x220.home.netzbasis.de:/git/hellfish/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8451125248 (8059MB)
avail mem = 8191107072 (7811MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (64 entries)
bios0: vendor LENOVO version 8DET69WW (1.39 ) date 07/18/2013
bios0: LENOVO 4287CTO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT DMAR UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
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-2520M CPU @ 2.50GHz, 2492.29 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
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-2520M CPU @ 2.50GHz, 2491.91 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiec0 at acpi0
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 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP7)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 42T4861 serial 12675 type LION oem SANYO
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK docked (15)
cpu0: Enhanced SpeedStep 2492 MHz: speeds: 2501, 2500, 2200, 2000, 1800, 1600, 
1400, 1200, 1000, 

Re: Sluggish/laggy browser behaviour

2015-07-27 Thread Benjamin Baier
 I can pretty much confirm this on an X220i, I have sort of come to terms
 with it, but it is definitely noticeable (in chromium and firefox).
X220 here.

 Also, when I play clips on YouTube, playback sometimes hangs for half a
 second. That is with a snapshot from today. To be safe, I also
 recompiled sndio from CVS to make sure I didn't miss the previously
 mentioned patch. While it does seem to have improved the situation, it's
 not entirely fixed.
Noticed this, too. Running with hw.perfpolicy=high solves it for me,
unless there is heavy disk I/O then it starts stuttering again.

 My guess is that this is due to missing SMP features/support, but I'm
 not entirely sure.
My guess is that disk I/O takes precedence, and cpu C-state transitions
should be avoided while audio/video playback...



Re: SPARC minimum hardware specification

2015-07-21 Thread Benjamin Baier
On Tue, 21 Jul 2015 23:18:40 +0200
Erling Westenvik erling.westen...@gmail.com wrote:

 On Tue, Jul 21, 2015 at 04:09:58PM +0100, Raf Czlonka wrote:
  On Tue, Jul 21, 2015 at 09:14:30AM BST, Karel Gardas wrote:
  
   Following this: http://unixhq.com/websgt/sunblade150.pdf -- it's 5.5
   bells (is that 55 dB?).
  
  Yes - it's a standard SI prefix[0]. However, 'bel'(B), *not* 'bell', is
  not used very often and 'decibel'(dB) is the actual unit.
 
 The wonders of metric logic: a decimeter is one-tenth of a meter, but a
 decibel is ten times a bel?
Mindgames...?
1 dB == 0.1 Bel
1 dm == 0.1 m

1 Bel == 10 dB
1 m == 10 dm

 Erling
 
  [0] http://www.bipm.org/en/measurement-units/prefixes.html
  
  Raf
 

Greetings Ben



Re: Any books about OpenBSD ARM programming?

2015-07-14 Thread Benjamin Baier
On Tue, 14 Jul 2015 13:27:59 +0200
Piotr Kubaj pku...@riseup.net wrote:

 On 06/29/15 03:46, Daniel Bolgheroni wrote:
  On Wed, Jun 24, 2015 at 05:26:10PM +0200, Piotr Kubaj wrote:
  Hi all,
 
  I'm mainly a FreeBSD user but want to learn OpenBSD. I'm also interested
  in basic electronics, like programming own thermometer. That's why I
  want to install OpenBSD on my BeagleBone Black and write some simple
  programs using I/O pins. Are there any tutorials on this? I have found
  some books about FreeBSD kernel programming, but none for OpenBSD.
  Thanks for your help.
 
  I have a simple example to blink a LED connected to the GPIO here:
 
  https://github.com/dbolgheroni/bghbox/blob/master/gpio_blink/gpio_blink.c
 
  Most of it I extracted from the OpenBSD gpioctl itself. It's all there.
 
  Cheers,
 
 Hi again,
 
 at first I was not sure that I had connected it properly, since neither
 you program nor gpioctl(1) seemed to work. Then I tried Debian, with
 which I also couldn't get GPIO to work (using /proc/sys/class/gpio). But
 using the library descriped in
 https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/g
 pio
 and the example program seemed to work (of course after switching to pin
 10). Can you tell me what is the correct way to access GPIO pins on
 OpenBSD? I did:
 gpioctl gpio1 6 2
 Later I also set flag:
 gpioctl gpio1 6 set out
 But changing states still didn't work.
 
 Thanks, for your help,
 Piotr Kubaj.
 
 [demime 1.01d removed an attachment of type application/pgp-signature which 
 had a name of signature.asc]
 

Hi,

if i remember correctly on Beaglebone Black the 4 on-board-leds are
numberd from 21 to 24. 
If you read the manpage for gpioctl carefully you'll find that
Only pins that have been configured at securelevel 0, typically 
during system startup, are accessible once the securelevel has been raised.
So put this in your /etc/rc.securelevel
gpioctl gpio1 21 set out

Then once logged  in, this
$ gpioctl gpio1 21 0
should turn the first led off, assuming the user has proper rights for 
/dev/gpio1

Also for testing I prefer the system not to raise the securelevel after boot,
so securelevel=0 in /etc/rc.securelevel

Greetings Ben



Re: usbhidctl(1) and usbhidaction(1)

2015-05-07 Thread Benjamin Baier
On Thu, 7 May 2015 14:40:59 +0200
ludovic coues cou...@gmail.com wrote:

 I wanted to know if anyone get either usbhidctl(1) or usbhidaction(1)
 working and if so for which usage.

I use it for volume control and for locking the screen.

got this in my .xinitrc
usbhidaction -d -c ~/.usbhid.conf -f /dev/uhid1 /dev/console 21

and here is my ~/.usbhid.conf
Consumer:Volume_Increment 1
  mixerctl outputs.master=+15
Consumer:Volume_Decrement 1
  mixerctl outputs.master=-15
Consumer:Mute 1
  mixerctl outputs.master.mute=toggle
Consumer:AL_Calculator 1
  zzzlock
Consumer:AC_Back 1
  xlock
Consumer:AC_Forward 1
 true



Re: Libressl and python2.7

2014-12-21 Thread Benjamin Baier

try
$ python2.7
Python 2.7.8 (default, Dec 12 2014, 14:59:33)
[GCC 4.2.1 20070719 ] on openbsd5
Type help, copyright, credits or license for more information.
 import ssl
 ssl.OPENSSL_VERSION

On 12/21/2014 11:11 AM, Alan Cheng wrote:

Hi,
How can I use libressl with a python2.7 programm on current?

The python program use import OpenSSL, and I tried replace OpenSSL with Libtls and 
Libressl, but none can be found.

Searched Misc, Tech and FAQ, didn't find anything helpful.

Thanks.
Alan Cheng




Re: Libressl and python2.7

2014-12-21 Thread Benjamin Baier

My example was just to show you that OpenBSD ships with LibreSSL.
Follow any OpenSSL tutorial to learn more.
.Pkey()  ===  .PKey()

On 12/21/2014 03:48 PM, Alan Cheng wrote:

Thanks Benjamin. Ssl works.
But now I got a new eorror: OpenSSL.crypto.Pkey() function not found.

Tried help(ssl) but found that module does not provide any  crypto related 
functions. Is there more modules to be imported or anything?

Thanks!
Alan

Benjamin Baier program...@netzbasis.de编写:


try
$ python2.7
Python 2.7.8 (default, Dec 12 2014, 14:59:33)
[GCC 4.2.1 20070719 ] on openbsd5
Type help, copyright, credits or license for more information.

import ssl
ssl.OPENSSL_VERSION


On 12/21/2014 11:11 AM, Alan Cheng wrote:

Hi,
How can I use libressl with a python2.7 programm on current?

The python program use import OpenSSL, and I tried replace OpenSSL with Libtls and 
Libressl, but none can be found.

Searched Misc, Tech and FAQ, didn't find anything helpful.

Thanks.
Alan Cheng




Re: Disk /dev/X is user root, group wheel, permissions brw-r-----.

2014-12-04 Thread Benjamin Baier

how about MAKEDEV(8)?
cd /dev  ./MAKEDEV all

Greetings Ben

On 12/04/2014 09:29 AM, Ezequiel Garzon wrote:

chgrp operator /dev/X


Thanks. I tried it but I now get

 Disk /dev/X is user root, group operator, permissions brw---.

Clearly I can just let it be, but it's puzzling, particularly as it
happens right after a fresh install. Any other suggestions will be
welcome.

Thanks again,

Ezequiel




Re: Thanks for ksh

2014-09-25 Thread Benjamin Baier

Is this because of the newest bash-shellshock (CVE-2014-6271)?

Nevertheless. Thanks for doing things right.

On 09/25/2014 01:48 PM, Craig R. Skinner wrote:

All the highly skilled work invested in the project, keeping ordinary
users secure, is appreciated.




Re: minimums for /usr/ports, /usr/xenocara, and /usr/src

2014-08-15 Thread Benjamin Baier

Here are the newest numbers i can provide for a full build from source.
/usr/src 900MB
/usr/xenocara 700MB
/usr/obj 900MB
/usr/xobj 500MB
/usr/ports 600MB
/usr/ports/pobj can't be big enought...

On 08/15/14 05:09, Joel Rees wrote:

I'm trying re-learn how to bring a new install up to -stable, and I've
been following the instructions on

http://www.openbsd.org/stable.html

and

http://www.openbsd.org/faq/faq5.html#Bld

and not doing a very good job of it. The recommended partition left me
with only 1.4G for /usr, and it was 90% full when I finished unpacking
the sys, src, ports, and xenocara tarballs.

(ancient IBM thinkpad with only 256M RAM and 20G (17 real gig) or hard
disk. 860 MHz or so CPU.)

I had saved 2.5G out of the suggested size for /home, so I cut a 1G
partition for /usr/ports and gave it the default newfs. mount on /mnt,
cp -pR /usr/ports/ /mnt/ (I always mess that up -- mv /mnt/ports/*
/mnt; mv /mnt/ports/.cvsignore /mnt.) Deleted the original contents
of /usr/ports, which I now see was a mistake, and mounted the new
partition on /usr/ports.

And then I did a cvs co on src, ports, and xenocara.

About an hour later, it tells me I have no inodes left on ports. df
-ih tells me I have 398 M used on /usr/ports, which is 42%, but
155,676 inodes in use, which is 100%. I forgot to write down what it
was trying to check out when it ran out.

/usr/src looks like its complete, with 111,613 inodes in use and
70,273 free, 1.2G partition with 313M free. I'm thinking that's room
enough to build the patches and a few other things I need.

What size partition should I cut for /usr/ports, and how many inodes
should I allocate it? Or should I just not try to bring /usr/ports up
to stable?

And what can I expect for /usr/xenocara? Just from unpacking the
tarball, it's using close to 700M on /usr, so I'm planning on cutting
it a partition, too.

My thinking is to use my remaining 1.5G for a new /usr/ports, give it
500,000 inodes and cp -pR again, to save bandwidth on the mirror, then
take the 1 G partition that would be freed, give it 300,000 inodes,
and use it for /usr/xenocara.

Can anyone tell me if that will be enough?

Or maybe I should just do it the other way, from the patch sets, I think it was.




Re: immutable-ish version control repo?

2014-07-18 Thread Benjamin Baier

On 07/18/14 04:27, Adam Thompson wrote:

I'm looking for a distributed VC system where even remote clients with
full(?) write access cannot, or at least would find it fairly difficult
to, alter history?
(1) With DVC it's easy to alter history and it's easy to get the 
original state back.
Everybody has a local copy of the repository so if somebody alters 
history locally and force pushes it to the central repository, it's 
broken for the rest of the developers. So you are just one force push 
from another developer away from having your original state back. Your 
team needs 100% approval rate to alter history.



AFAIK:
 rcs - trivial to change the past (also not distributed, and NFS is
undesirable).
 cvs - reasonably easy to change the past, usually.
 svn - definitely possible (AFAIK) to change the past.

not distributed


 bzr - unknown
 hg - unknown
 git - unknown
 everything else - unknown.

fossil comes to mind, too.


For this application, a file-oriented system would be preferred over a
snapshot-oriented system like git.
git uses files. They are named after their checksums and they are 
compressed.

what do you mean with file-oriented vs. snapshot-oriented


I'm trying to combine (soft) WORM-like properties with the benefits of a
version control system.  Does not need to be utterly secure, merely
needs to be good enough to deter both script-kiddie level attackers
and inebriated sysadmins.
CVS would be ideal except that access control is AFAIK basically ternary
(none,read,write).

WORM as in Write Once Read Many... Well DVC have the notion of an directed
acyclic graph with is protected by hashsums against alteration,
so (1) comes to mind.


Should ideally be in packages or ports, obviously.  We have a bunch of
version control systems in ports that I've never even heard of before!

Suggestions on which one I should learn how to configure?
git is the hip thing right now and you can do _everything_ with it, but 
be aware it has more knobs than a Boeing 777.


But maybe all you need is CVS (and a plan), who knows?



Re: Improve zenitys loading time when not in gnome

2014-05-08 Thread Benjamin Baier

Try xclip. It saves a paste if you have your URL already in the clipboard.

URL=$(xclip -o)
if [ x$URL = x ]; then
echo You must enter a url.
exit 1
fi
...

On 05/08/14 15:37, Nils R wrote:

David Coppa schrieb am 08.05.2014 15:26:


On Thu, May 8, 2014 at 2:46 PM, Nils R m...@hxgn.net wrote:

Hi misc@,

i face a problem with zenity (from ports).  I use it to read a string via a
nice graphical popup (in my case, the url to a youtube video, which then gets
opened in fullscreen mplayer).

Gnome is installed on my machine, although i don't use it very often.  Anyway,
zenity has a few dependencies on gnome (see http://ports.su/x11/gnome/zenity),
and when i'm logged in to gnome, zenity starts within a second.

Now, i seldomly use gnome, but dwm instead (a simple tiling manager).  Also, i
start dwm directly with a 'xinit' from the terminal, while i use gdm for
gnome.

 From dwm, zenity takes ~7 seconds (!) to start.  The whole system is installed
on a ssd (samsung 830) for that matter.  Even worse, the startup time stays
like that, whenever i (re)start zenity, so everything the system had to load
seems to be gone immediately after the program exits.


Suggestion: ditch zenity and use yad (ports/x11/yad) instead...

my 2 cents,
David



Thanks, i just tried yad, but it needs ~7 sec to start as well (from the command
line), so no improvement :(

Nils




Re: long file names with tar

2014-05-07 Thread Benjamin Baier

The exact error message is always helpfull.
Nevertheless, see man 1 pax and search for ustar
GNU tar uses a extended tar format to store longer pathnames.

Ben

On 05/07/14 11:05, Robert Connolly wrote:

Why does BSD tar complain about long file names, and GNU does not?




Re: Intel driver doesn't get automatically selected by Xorg

2014-05-07 Thread Benjamin Baier

I see you compile the kernel by yourself, GENERIC.MP is what you want.

- Ben

On 05/07/14 15:40, Manuel Pages wrote:

Dear Tomaš,
thank you so much for your support, thanks to you I felt encouraged to
finally
update my BIOS. It solved the driver problem (and by the looks of it,
improved
fan performance, but it's handwaving); however as far as I can tell from
dmesg
and system performance, only one core is used still.
If you have any great hints or suggestions about how to proceed, please
share
those.

New Xorg.0.log (initial issue resolved): http://f.nn.lv/n5/7h/yq/Xorg.0.log
New dmesg output (still only one CPU found):
http://f.nn.lv/n5/7h/zi/dmesg.full




Re: Updating sets

2014-05-07 Thread Benjamin Baier

On 05/07/14 21:41, Manuel Pages wrote:

1. Know your mirror:
A person who wants to do that should find out the
policies of making snapshots for a particular mirror.

Depending on the architecture, mostly once a day. Which is enough!
I mean the OpenBSD userland. Package snapshots take a little longer 
between updates.



3. Shake, don't mix
If one commits to usage of -current kernel with
snapshot ports, best effort should be put in avoiding port
compilation.

I don't understand that.
Following current (kernel, base system and X11) can be done by upgrading 
using the snapshot sets from the mirrors. Using bsd.rd's upgrade and 
then sysmerge is the preferred way.
Packages are precompiled ports which also is the preferred way of 
getting 3rd party software on your OpenBSD install.



4. pkg_add -U shouldn't be used
Partial update of the system is dangerous
and as we don't have control over the source of
snapshots, an upgrade followed by full update should
be done as a part of installation of new package.
So true, when pkg_add can't install a package it's probably time for a 
upgrade.



Now that I think about it, I realize that it's unlikely that I'll
keep using this weird build kernel, download pkgs
combination and will simply do snapshot hopping by
means of upgrade/sysmerge.
Nevertheless, compiling and upgrading/updating your system and ports 
from source is fun and a great way to learn = this translates to 
breaking your system is fun and you learn from mistakes.


- Ben



Re: Ralink mystery usb mini WiFi adapter

2014-04-20 Thread Benjamin Baier

It's Advertised as an EP-N8508.
It is most likely a rebrand, which uses the rtl8188cus (very low cost chip)
This should be supported by the urtwn driver.
Just need to recognize the USB device number.
In this case it's idVendor 0x148f idProduct 0x7601.

This makes me wonder, if there is a method to test this without 
recompiling the kernel.

With config(8) maybe?

- Ben

On 04/20/14 16:35, Alan Corey wrote:

I didn't buy Ralink on purpose. I've had issues with other products
from them and generally prefer Atheros.

If you want, I'll stick it back in its padded envelope and send it to
you to experiment on. I think I'd like it back someday but if it won't
work under OpenBSD it's useless.  I hope to know by tomorrow if it
works under FreeBSD 10 on my Raspberry Pi but otherwise I could only
use it under Windows. Email me a snail mail address if you want it.

On 4/20/14, Stefan Sperling s...@openbsd.org wrote:

On Sat, Apr 19, 2014 at 10:23:06PM -0400, Alan Corey wrote:

So it does need a different driver, it's not just a matter of tweaking
a device ID somewhere?

Looking closer, it seems to be a run(4) variant.
At least the vendor driver groups it with other run(4) devices.

That doesn't mean it will work without modifications, though.
It seems to need a different firmware at least. Whether or not
it is backwards compatible to older devices is hard to tell
without spending a lot of time digging around in the vendor
sources... But there are other run devices we don't yet support
without code changes:
http://marc.info/?l=openbsd-techm=138903287819764w=2h




Re: Broken links on faq

2014-03-12 Thread Benjamin Baier

Your URL is wrong, try http://www.openbsd.org/faq/faq1.html

On 03/12/14 22:55, Maurice McCarthy wrote:

Just for info, many of the links on http://www.openbsd.org/faq//faq1.html are 
broken