Re: pkg_create ignores flags obsd 6.0

2017-03-14 Thread Panagiotis Atmatzidis
Hi Marc,


> On 15 Mar 2017, at 02:11, Marc Espie  wrote:
>
> On Tue, Mar 14, 2017 at 07:48:09PM +0200, Panagiotis Atmatzidis wrote:
>> Hello,
>>
>> I'm trying to use "pkg_create" under OpenBSD to distribute a precompiled
>> binary along with linked libraries.
>>
>> I have a python script which I inherited, that creates a "+CONTENTS"
>> file containing the list of files + sha.
>>
>> The problem is that "pkg_create" doesn't accept additional flags. I
>> tried -D COMMENT="test", -M "/path/to/file", etc.
>> The result is pretty ugly:
>>
>> --
>> bash-4.3$ pkg_create -f +CONTENTS -desc -D COMMENT="some comment" -D
>> MAINTAINER="moi"
>> -bash-4.3$ pkg_info myapp-3.99.tgz
>> Information for file:./myapp-3.99.tgz
>
> Basically, you are missing some parameters to create a package from
scratch,
> so you're using the 2nd synopsis of pkg_create, the one that says
> pkg_create -f plist
>
> everything else is ignored.
>
> You're going about this all wrong. Your plist shouldn't contain the
pkgname,
> it shouldn't contain sha for all the files. No wonder this is not working.
>
> Note that -p is not optional for the normal way to create packages.
>
> I think tedu's suggestion is very much correct, actually, use the ports
> tree, or figure out how to do everything by hand.


Thanks for the suggestions.

I’ll play a bit more with “pkg_create” and try ports.


Panagiotis (atmosx) Atmatzidis

email:  a...@convalesco.org
URL:http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"Everyone thinks of changing the world, but no one thinks of changing
himself.” - Leo Tolstoy

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]



Re: where are antialiased fonts now documented?

2017-03-14 Thread Ted Unangst
Jonathan Thornburg wrote:
> What Fine Manual(s) should I be reading for up-to-date information
> on antialiased fonts?  I can't find anything relevant in xterm(1) or
> any of the X server man pages.  Interestingly, the example from the
> 5.8-stable FAQ,
>   xterm -fa 'Mono' -fs 14
> *does* work on my 6.0-stable system.  But I'd still like to read more
> (e.g., about what font families are available).

fc-list is probably close to what you're looking for.

fc-list | grep ttf | grep -i mono
...
/usr/X11R6/lib/X11/fonts/TTF/luximr.ttf: Luxi Mono:style=Regular
...

xterm -fa "Luxi Mono"



Re: IKEv2 (iked) VPN with Windows 10 clients

2017-03-14 Thread Bobby Johnson
Your configuration looks reasonable. You should upgrade to 6.0.  You could
replace the local network range with 0.0.0.0/0 to limit the flow less.
I've found that config address with a range doesn't work as expected with
multiple clients.  Below is an example of a working config using machine
certs for windows clients, including Windows 10.

ikev2 passive esp \
from 0.0.0.0/0 to 192.168.40.2 local 1.2.3.4 peer any \
srcid "asn1_dn of server cert"
dstid "asn1_dn of client cert" \
config address 192.168.40.2 \
config name-server 10.0.0.4


On Mar 10, 2017 7:58 AM, "Roberto Katalinic"  wrote:

> I have a few remote workers with Windows 10 and would like to move them to
> IKEv2 VPN.
>
> On my gateway (OpenBSD 5.7) the iked.conf file is:
> ikev2 "IKEv2 DIAL-IN" passive esp \
> from 192.168.10.0/24 to 192.168.40.0/24 \
> local 1.2.3.4 peer 0.0.0.0/0 \
> srcid 1.2.3.4 \
> config access-server 192.168.10.10 \
> config name-server 192.168.10.21 \
> config address 192.168.40.0/24
>
> My remote client is configured like this:
> VPN Type: IKEv2
> Data encryption: Optional
> Authentication: Use machine Certificates (no EAP)
>
> My PF rules contain the following lines which are definitely not overruled
> by
> any rules further down the line:
> set skip on {lo,enc0}
> pass in on egress proto udp from any to any port {500,4500}
> pass in on egress proto {ah,esp}
>
> When the client attempts connection, the SA is configured and Windows
> reports
> the connection as established. It also acquires an IP address and the DNS
> server as specified in the iked.conf file:
>
> PPP adapter EDGE:
>Connection-specific DNS Suffix  . :
>Description . . . . . . . . . . . : EDGE
>Physical Address. . . . . . . . . :
>DHCP Enabled. . . . . . . . . . . : No
>Autoconfiguration Enabled . . . . : Yes
>IPv4 Address. . . . . . . . . . . : 192.168.40.87(Preferred)
>Subnet Mask . . . . . . . . . . . : 255.255.255.255
>Default Gateway . . . . . . . . . :
>DNS Servers . . . . . . . . . . . : 192.168.10.21
>NetBIOS over Tcpip. . . . . . . . : Enabled
>
> My gateway also reports the connection as established and the SA is shown
> by
> ipsecctl -sa:
> FLOWS:
> flow esp in from 192.168.40.87 to 192.168.10.0/24 peer 5.6.7.8 srcid
> IPV4/1.2.3.4 type use
> flow esp out from 192.168.10.0/24 to 192.168.40.87 peer 5.6.7.8 srcid
> IPV4/1.2.3.4 type require
> flow esp out from ::/0 to ::/0 type deny
>
> SAD:
> esp tunnel from 1.2.3.4 to 5.6.7.8 spi 0x7a8197f6 auth hmac-sha1 enc
> aes-256
> esp tunnel from 5.6.7.8 to 1.2.3.4 spi 0x926fb219 auth hmac-sha1 enc
> aes-256
>
> Output from iked -dvvv:
> ikev2_pld_cp: INTERNAL_IP4_SERVER 0x5ba0 length 4
> ikev2_pld_cp: INTERNAL_IP4_DNS 0x0003 length 4
> ikev2_pld_cp: INTERNAL_IP4_ADDRESS 0x0001 length 4
> ikev2_pld_payloads: decrypted payload SA nextpayload TSi critical 0x00
> length
> 44
> ikev2_pld_sa: more 0 reserved 0 length 40 proposal #1 protoid ESP spisize 4
> xforms 3 spi 0xe7ce691f
> ikev2_pld_xform: more 3 reserved 0 length 12 type ENCR id AES_CBC
> ikev2_pld_attr: attribute type KEY_LENGTH length 256 total 4
> ikev2_pld_xform: more 3 reserved 0 length 8 type INTEGR id HMAC_SHA1_96
> ikev2_pld_xform: more 0 reserved 0 length 8 type ESN id NONE
> ikev2_pld_payloads: decrypted payload TSi nextpayload TSr critical 0x00
> length
> 24
> ikev2_pld_ts: count 1 length 16
> ikev2_pld_ts: type IPV4_ADDR_RANGE protoid 0 length 16 startport 0 endport
> 65535
> ikev2_pld_ts: start 192.168.40.34 end 192.168.40.34
> ikev2_pld_payloads: decrypted payload TSr nextpayload NONE critical 0x00
> length 24
> ikev2_pld_ts: count 1 length 16
> ikev2_pld_ts: type IPV4_ADDR_RANGE protoid 0 length 16 startport 0 endport
> 65535
> ikev2_pld_ts: start 192.168.10.0 end 192.168.10.255
> ikev2_msg_send: IKE_AUTH response from 1.2.3.4:4500 to 5.6.7.8:15573
> msgid 1,
> 1452 bytes, NAT-T
> pfkey_sa_add: update spi 0xe7ce691f
> pfkey_sa: udpencap port 15573
> ikev2_childsa_enable: loaded CHILD SA spi 0xe7ce691f
> pfkey_sa_add: add spi 0xabf256a4
> pfkey_sa: udpencap port 15573
> ikev2_childsa_enable: loaded CHILD SA spi 0xabf256a4
> ikev2_childsa_enable: loaded flow 0x1166a0b99800
> ikev2_childsa_enable: loaded flow 0x1166a0b99400
> sa_state: VALID -> ESTABLISHED from 5.6.7.8:15573 to 1.2.3.4:4500 policy
> 'IKEv2 DIAL-IN'
>
>
> The problem is, from the remote worker, I cannot connect to any resources
> on
> the remote network. Pinging the remote gateway's internal IP address or the
> DNS server produces no replies.
>
> Equally, the gateway cannot ping the remote worker's IP address.
>
> tcpdump on the enc0 and pflog0 interfaces produces no results at all when
> creating traffic between the two.
>
> What am I missing?
>
>
>
> Kind regards,
>
> Roberto Katalinic
> 07460663373
>
> kliker IT
> www.kliker.it
> 08455442033
>
> Information contained in this e-mail is intended for the use of the
> addressee
> only, and is confidential and may b

Re: doas(1) adjustable timeout length

2017-03-14 Thread bytevolcano
Understood (though in this case it looks unfinished when 99% of the
implementation is already present).

In any case you have answered my original question. Thanks, Ted.

On Tue, 14 Mar 2017 18:29:25 -0400
"Ted Unangst"  wrote:

> bytevolc...@safe-mail.net wrote:
> > I'm not saying "you must do everything my way or else", but rather I
> > am trying to understand the reasoning behind making this hardcoded
> > and fixed, as opposed to being admin-settable; maybe something is
> > planned here I am unaware of?  
> 
> We're trying to keep the options to a minimum, which keeps the
> implementation simple, but more importantly keeps the documentation
> short and reduces the number of decisions that need to be made.



where are antialiased fonts now documented?

2017-03-14 Thread Jonathan Thornburg
I'm trying to set up antialiased fonts in xterm.

The OpenBSD FAQ used to contain a section "Antialiased and Truetype
fonts in X" with lots of useful information on this subject
[e.g., an archived copy I have of the OpenBSD
web pages as of 5.8-stable (checked out from CVS
on 2016-06-23) has this as FAQ 8.20.],
but the current FAQ doesn't seem to address this subject.

Looking in the cvs logs, I see

> RCS file: /cvs/www/faq/Attic/truetype.html,v
> Working file: truetype.html
> head: 1.30
> branch:
> locks: strict
> access list:
> symbolic names:
> keyword substitution: kv
> total revisions: 30;selected revisions: 30
> description:
> 
> revision 1.30
> date: 2016/02/22 20:16:15;  author: tj;  state: dead;  lines: +0 -0;  
> commitid: 8xuyj7Vi3LgzLAdx;
> remove outdated "antialiased and truetype fonts in x" section.
> 
> ok matthieu
> 

suggesting that that information is now outdated.

What Fine Manual(s) should I be reading for up-to-date information
on antialiased fonts?  I can't find anything relevant in xterm(1) or
any of the X server man pages.  Interestingly, the example from the
5.8-stable FAQ,
  xterm -fa 'Mono' -fs 14
*does* work on my 6.0-stable system.  But I'd still like to read more
(e.g., about what font families are available).

ciao,

-- 
-- "Jonathan Thornburg [remove -color to reply]" 
   Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
   "There was of course no way of knowing whether you were being watched
at any given moment.  How often, or on what system, the Thought Police
plugged in on any individual wire was guesswork.  It was even conceivable
that they watched everybody all the time."  -- George Orwell, "1984"



Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

2017-03-14 Thread Mike Larkin
On Tue, Mar 14, 2017 at 08:16:17PM -0400, Jiri B wrote:
> Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
> 'bsd.mp'.
> 
> j.
> 

What are you trying to achieve here? Why not just use a device that doesn't
cause errors. You could choose virtio-blk or even a non-PV storage device.

-ml

> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2017 OpenBSD. All rights reserved.
> https://www.OpenBSD.org
> 
> OpenBSD 6.0-current (RAMDISK_CD) #163: Sat Feb 11 19:41:57 MST 2017
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
> real mem = 250470400 (238MB)
> avail mem = 239251456 (228MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
> bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: tables DSDT FACP APIC
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
> cpu0:
> FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MM
> X,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line
> 16-way L2 cache
> cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: apic clock running at 999MHz
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu at acpi0 not configured
> "ACPI0006" at acpi0 not configured
> "PNP0303" at acpi0 not configured
> "PNP0F13" at acpi0 not configured
> "PNP0700" at acpi0 not configured
> "PNP0501" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "ACPI0010" at acpi0 not configured
> pvbus0 at mainbus0: KVM
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
> "Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
> pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
> wired to compatibility, channel 1 wired to compatibility
> pciide0: channel 0 disabled (no drives)
> pciide0: channel 1 disabled (no drives)
> "Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
> virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:15:b0:a3
> virtio0: msix shared
> virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
> vioscsi0 at virtio1: qsize 128
> scsibus0 at vioscsi0: 255 targets
> sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
> fixed
> sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
> virtio1: msix shared
> uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
> uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
> uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
> ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
> addr 1
> virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
> virtio2: no matching child driver; not configured
> usb1 at uhci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb2 at uhci1: USB revision 1.0
> uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb3 at uhci2: USB revision 1.0
> uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> isa0 at mainbus0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: console
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0 mux 1
> softraid0 at root
> scsibus1 at softraid0: 256 targets
> PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
> root on rd0a swap on rd0b dump on rd0b
> erase ^?, werase ^W, kill ^U, intr ^C, status ^T
> 
> Welcome to the OpenBSD/amd64 6.0 installation program.
> Starting non-interactive mode in 5 seconds...
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
> DHCPDISCOVER on vio0 - interval 1
> DHCPDISCOVER on vio0 - interval 1
> DHCPOFFER from 192.168.1.1 (00:25:90:60:8f:1e)
> DHCPREQUEST on vio0 to 255.255.255.255
> DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
> bound to 192.168.1.118 -- renewal in 1800 seconds.
> Fetching
> http://192.168.1.2/52:54:00:15:b0:a3-install.conf?path=snapshots/amd64
> Performing non-interactive install...
> Terminal type? [vt220] vt220
> System hostname? (short form, e.g. 'foo') test1
> 
> Available network interfaces are: vio0 vlan0.
> Which network interface do you wish to configure? (or 'done') [vio0] vio0
> IPv4 address for vio0? (or 'dh

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

2017-03-14 Thread Jiri B
Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
'bsd.mp'.

j.

Copyright (c) 1982, 1986, 1989, 1991, 1993
  The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2017 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 6.0-current (RAMDISK_CD) #163: Sat Feb 11 19:41:57 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 250470400 (238MB)
avail mem = 239251456 (228MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MM
X,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line
16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: apic clock running at 999MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:15:b0:a3
virtio0: msix shared
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio1: qsize 128
scsibus0 at vioscsi0: 255 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
fixed
sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
virtio1: msix shared
uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
virtio2: no matching child driver; not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
softraid0 at root
scsibus1 at softraid0: 256 targets
PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.0 installation program.
Starting non-interactive mode in 5 seconds...
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
DHCPDISCOVER on vio0 - interval 1
DHCPDISCOVER on vio0 - interval 1
DHCPOFFER from 192.168.1.1 (00:25:90:60:8f:1e)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
bound to 192.168.1.118 -- renewal in 1800 seconds.
Fetching
http://192.168.1.2/52:54:00:15:b0:a3-install.conf?path=snapshots/amd64
Performing non-interactive install...
Terminal type? [vt220] vt220
System hostname? (short form, e.g. 'foo') test1

Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0] vio0
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] dhcp
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
bound to 192.168.1.118 -- renewal in 1800 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none] none
Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [done] done
Using DNS domainname internal
Using DNS nameservers at 192.168.1.1

Password for root account?

Re: pkg_create ignores flags obsd 6.0

2017-03-14 Thread Marc Espie
On Tue, Mar 14, 2017 at 07:48:09PM +0200, Panagiotis Atmatzidis wrote:
> Hello,
> 
> I'm trying to use "pkg_create" under OpenBSD to distribute a precompiled
> binary along with linked libraries.
> 
> I have a python script which I inherited, that creates a "+CONTENTS"
> file containing the list of files + sha.
> 
> The problem is that "pkg_create" doesn't accept additional flags. I
> tried -D COMMENT="test", -M "/path/to/file", etc.
> The result is pretty ugly:
> 
> --
> bash-4.3$ pkg_create -f +CONTENTS -desc -D COMMENT="some comment" -D
> MAINTAINER="moi"
> -bash-4.3$ pkg_info myapp-3.99.tgz
> Information for file:./myapp-3.99.tgz

Basically, you are missing some parameters to create a package from scratch,
so you're using the 2nd synopsis of pkg_create, the one that says
pkg_create -f plist

everything else is ignored.

You're going about this all wrong. Your plist shouldn't contain the pkgname,
it shouldn't contain sha for all the files. No wonder this is not working.

Note that -p is not optional for the normal way to create packages.

I think tedu's suggestion is very much correct, actually, use the ports
tree, or figure out how to do everything by hand.



Re: watchdog - "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured

2017-03-14 Thread Jiri B
On Tue, Mar 14, 2017 at 03:52:17PM -0700, Mike Larkin wrote:
> > [...]
> > virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
> > vio0 at virtio0: address 52:54:00:b8:93:d9
> > virtio0: msix shared
> > "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured
> > ...
> > 
> > # sysctl -a | grep watch
> > #
> > 
> > Shouldn't this be detected as ichwdt(4)?
> > 
> >   ichwdt(4) - Intel 6300ESB ICH watchdog timer device
> > 
> 
> Looks like it was only ever "built" for i386, and not extensively tested even
> then:
> 
> revision 1.411
> date: 2005/05/02 17:26:00;  author: grange;  state: Exp;  lines: +2 -1;
> Add ichwdt(4): Intel 6300ESB ICH watchdog timer driver. Disabled for
> now due to lack of testing. If you have a machine that uses this
> device please contact me.
> 
> -ml

Hi,

it seems i6300esb is only watchdog usable on qemu-kvm. There's also some
ib700 but it is ISA device and diag288 which is applicable only to IBM s/390 and
zSeries.

Should I give a try to i386 with rebuilt kernel? i6300esb is also default 
watchdog
in RHV[1]/oVirt but I doubt anybody uses OpenBSD on it except me sporadically :)

[1] 
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.0/html/virtual_machine_management_guide/sect-configuring_a_watchdog

j.



Re: watchdog - "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured

2017-03-14 Thread Mike Larkin
On Tue, Mar 14, 2017 at 06:46:52PM -0400, Jiri B wrote:
> Hi,
> 
> I added watchdog device for OpenBSD VM on qemu-kvm and it seems it's not
> detected
> correctly:
> 
> OpenBSD 6.0-current (GENERIC.MP) #167: Sat Feb 11 19:35:52 MST 2017
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 518905856 (494MB)
> avail mem = 498569216 (475MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf7220 (11 entries)
> bios0: vendor Seabios version "0.5.1" date 01/01/2011
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: sleep states S5
> acpi0: tables DSDT FACP APIC
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel Core i7 9xx (Nehalem Class Core i7), 1866.90 MHz
> ...
> virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:b8:93:d9
> virtio0: msix shared
> "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured
> ...
> 
> # sysctl -a | grep watch
> #
> 
> Shouldn't this be detected as ichwdt(4)?
> 
>   ichwdt(4) - Intel 6300ESB ICH watchdog timer device
> 

Looks like it was only ever "built" for i386, and not extensively tested even
then:

revision 1.411
date: 2005/05/02 17:26:00;  author: grange;  state: Exp;  lines: +2 -1;
Add ichwdt(4): Intel 6300ESB ICH watchdog timer driver. Disabled for
now due to lack of testing. If you have a machine that uses this
device please contact me.

-ml

> # pcidump -v 0:4:0
>  0:4:0: Intel 6300ESB WDT
> 0x: Vendor ID: 8086 Product ID: 25ab
> 0x0004: Command: 0103 Status: 
> 0x0008: Class: 08 Subclass: 80 Interface: 00 Revision: 00
> 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
> 00
> 0x0010: BAR mem 32bit addr: 0xfebc1000/0x0010
> 0x0014: BAR empty ()
> 0x0018: BAR empty ()
> 0x001c: BAR empty ()
> 0x0020: BAR empty ()
> 0x0024: BAR empty ()
> 0x0028: Cardbus CIS: 
> 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> 0x0030: Expansion ROM Base Address: 
> 0x0038: 
> 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> 
> Libvirt xml part is:
> 
> 
>   
>function='0x0'/>
> 
> 
> Qemu cmd line is:
> 
> qemu 11657 81.6  5.3 1075552 434084 ?  Sl   23:23  17:53
> /usr/libexec/qemu-kvm -name guest=www1,debug-threads=on -S -object
> secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-www1/mast
> er-key.aes -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu Nehalem -m 512
> -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
> e26e7c0c-ea90-45bd-981d-23d471f58162 -nographic -no-user-config -nodefaults
> -device sga -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-6-www1/monitor.sock,s
> erver,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
> base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
> -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
> menu=on,reboot-timeout=0,splash-time=3000,strict=on -device
> ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5
> -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1
> -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2
> -drive
> file=/dev/data1vg/www1,format=raw,if=none,id=drive-virtio-disk0,cache=none,ai
> o=native -device
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio
> -disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b8:93:d9,bus=pci.0,addr=0
> x3,bootindex=1 -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -device
> i6300esb,id=watchdog0,bus=pci.0,addr=0x4 -watchdog-action reset -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -object
> rng-random,id=objrng0,filename=/dev/random -device
> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
> 
> Am I doing something wrong or it is a bug?
> 
> j.



Re: watchdog - "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured

2017-03-14 Thread Theo de Raadt
It isn't in amd64 GENERIC, and is disabled in i386 GENERIC.

Guess noone tried it in a while, and noone cared to push for it
to be enabled.

> I added watchdog device for OpenBSD VM on qemu-kvm and it seems it's not
> detected
> correctly:
> 
> OpenBSD 6.0-current (GENERIC.MP) #167: Sat Feb 11 19:35:52 MST 2017
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 518905856 (494MB)
> avail mem = 498569216 (475MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf7220 (11 entries)
> bios0: vendor Seabios version "0.5.1" date 01/01/2011
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: sleep states S5
> acpi0: tables DSDT FACP APIC
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel Core i7 9xx (Nehalem Class Core i7), 1866.90 MHz
> ...
> virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:b8:93:d9
> virtio0: msix shared
> "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured
> ...
> 
> # sysctl -a | grep watch
> #
> 
> Shouldn't this be detected as ichwdt(4)?
> 
>   ichwdt(4) - Intel 6300ESB ICH watchdog timer device
> 
> # pcidump -v 0:4:0
>  0:4:0: Intel 6300ESB WDT
> 0x: Vendor ID: 8086 Product ID: 25ab
> 0x0004: Command: 0103 Status: 
> 0x0008: Class: 08 Subclass: 80 Interface: 00 Revision: 00
> 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
> 00
> 0x0010: BAR mem 32bit addr: 0xfebc1000/0x0010
> 0x0014: BAR empty ()
> 0x0018: BAR empty ()
> 0x001c: BAR empty ()
> 0x0020: BAR empty ()
> 0x0024: BAR empty ()
> 0x0028: Cardbus CIS: 
> 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> 0x0030: Expansion ROM Base Address: 
> 0x0038: 
> 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> 
> Libvirt xml part is:
> 
> 
>   
>function='0x0'/>
> 
> 
> Qemu cmd line is:
> 
> qemu 11657 81.6  5.3 1075552 434084 ?  Sl   23:23  17:53
> /usr/libexec/qemu-kvm -name guest=www1,debug-threads=on -S -object
> secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-www1/mast
> er-key.aes -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu Nehalem -m 512
> -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
> e26e7c0c-ea90-45bd-981d-23d471f58162 -nographic -no-user-config -nodefaults
> -device sga -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-6-www1/monitor.sock,s
> erver,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
> base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
> -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
> menu=on,reboot-timeout=0,splash-time=3000,strict=on -device
> ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5
> -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1
> -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2
> -drive
> file=/dev/data1vg/www1,format=raw,if=none,id=drive-virtio-disk0,cache=none,ai
> o=native -device
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio
> -disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b8:93:d9,bus=pci.0,addr=0
> x3,bootindex=1 -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -device
> i6300esb,id=watchdog0,bus=pci.0,addr=0x4 -watchdog-action reset -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -object
> rng-random,id=objrng0,filename=/dev/random -device
> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
> 
> Am I doing something wrong or it is a bug?
> 
> j.



watchdog - "Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured

2017-03-14 Thread Jiri B
Hi,

I added watchdog device for OpenBSD VM on qemu-kvm and it seems it's not
detected
correctly:

OpenBSD 6.0-current (GENERIC.MP) #167: Sat Feb 11 19:35:52 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 518905856 (494MB)
avail mem = 498569216 (475MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf7220 (11 entries)
bios0: vendor Seabios version "0.5.1" date 01/01/2011
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Core i7 9xx (Nehalem Class Core i7), 1866.90 MHz
...
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:b8:93:d9
virtio0: msix shared
"Intel 6300ESB WDT" rev 0x00 at pci0 dev 4 function 0 not configured
...

# sysctl -a | grep watch
#

Shouldn't this be detected as ichwdt(4)?

  ichwdt(4) - Intel 6300ESB ICH watchdog timer device

# pcidump -v 0:4:0
 0:4:0: Intel 6300ESB WDT
0x: Vendor ID: 8086 Product ID: 25ab
0x0004: Command: 0103 Status: 
0x0008: Class: 08 Subclass: 80 Interface: 00 Revision: 00
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
00
0x0010: BAR mem 32bit addr: 0xfebc1000/0x0010
0x0014: BAR empty ()
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00

Libvirt xml part is:


  
  


Qemu cmd line is:

qemu 11657 81.6  5.3 1075552 434084 ?  Sl   23:23  17:53
/usr/libexec/qemu-kvm -name guest=www1,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-www1/mast
er-key.aes -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu Nehalem -m 512
-realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
e26e7c0c-ea90-45bd-981d-23d471f58162 -nographic -no-user-config -nodefaults
-device sga -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-6-www1/monitor.sock,s
erver,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
-no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
menu=on,reboot-timeout=0,splash-time=3000,strict=on -device
ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2
-drive
file=/dev/data1vg/www1,format=raw,if=none,id=drive-virtio-disk0,cache=none,ai
o=native -device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio
-disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b8:93:d9,bus=pci.0,addr=0
x3,bootindex=1 -chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -device
i6300esb,id=watchdog0,bus=pci.0,addr=0x4 -watchdog-action reset -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -object
rng-random,id=objrng0,filename=/dev/random -device
virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on

Am I doing something wrong or it is a bug?

j.



Re: doas(1) adjustable timeout length

2017-03-14 Thread Ted Unangst
bytevolc...@safe-mail.net wrote:
> I'm not saying "you must do everything my way or else", but rather I
> am trying to understand the reasoning behind making this hardcoded and
> fixed, as opposed to being admin-settable; maybe something is planned
> here I am unaware of?

We're trying to keep the options to a minimum, which keeps the implementation
simple, but more importantly keeps the documentation short and reduces the
number of decisions that need to be made.



Re: pkg_create ignores flags obsd 6.0

2017-03-14 Thread Ted Unangst
Panagiotis Atmatzidis wrote:
> I'm trying to use "pkg_create" under OpenBSD to distribute a precompiled
> binary along with linked libraries.
> 
> I have a python script which I inherited, that creates a "+CONTENTS"
> file containing the list of files + sha.
> 
> The problem is that "pkg_create" doesn't accept additional flags. I
> tried -D COMMENT="test", -M "/path/to/file", etc.
> The result is pretty ugly:

>From the man page..

 Use of the ports(7) infrastructure instead of manual pkg_create
 invocation is strongly recommended.

You can add local ports under the ports/mystuff directory.



Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

2017-03-14 Thread Stefan Fritsch
Hi,

On Mon, 13 Mar 2017, Jiri B wrote:
> 
> it seems virtio-scsi is not working correctly in OpenBSD, I gave it
> a try today and OpenBSD VM was killed with:
> 
>   2017-03-13T15:29:00.814657Z qemu-kvm: wrong size for virtio-scsi headers
> 
> on EL7 with qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64.
> 
> I found a bug stating it is OpenBSD's fault
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768517
> 
> I'd like to provide more info but could you give me some hints
> please? I tried to attach debugger to qemu-kvm process but I get
> only this :/


last time I looked at this I found a bug how vioscsi uses 
virtio_dequeue_commit(). After that was fixed, it did not cause qemu to 
complain anymore but there were occasional data errors that would result 
in filesystem corruption. I don't have a really good idea how to debug 
that. Maybe write a test program that writes known patterns to the raw 
disk and then reads them again and shows the diffs. Or does anyone know a 
program that does this? In any case, I ran out of time before I got any 
further.

The attached diff fixes the bug and adds lots of debug output. If you 
comment out the printfs, you could try if you have more luck. But this is 
probably more a topic for tech@

Cheers,
Stefan

diff --git sys/dev/pv/vioscsi.c sys/dev/pv/vioscsi.c
index 6a8bb55..1783bd5 100644
--- sys/dev/pv/vioscsi.c
+++ sys/dev/pv/vioscsi.c
@@ -32,12 +32,23 @@
 enum { vioscsi_debug = 0 };
 #define DPRINTF(f...) do { if (vioscsi_debug) printf(f); } while (0)
 
+#define STATE_ASSERT(vr, want) do {\
+   if (vr->vr_state != want) { \
+   panic("%s:%d: vr_state is %d should be %d\n",   \
+   __func__, __LINE__, vr->vr_state, want);\
+   } \
+   } while (0)
+
+
+enum vioscsi_req_state { FREE, ALLOC, INQUEUE, DONE };
+
 struct vioscsi_req {
struct virtio_scsi_req_hdr   vr_req;
struct virtio_scsi_res_hdr   vr_res;
struct scsi_xfer*vr_xs;
bus_dmamap_t vr_control;
bus_dmamap_t vr_data;
+   enum vioscsi_req_state   vr_state;
 };
 
 struct vioscsi_softc {
@@ -166,16 +177,19 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
struct virtio_scsi_req_hdr *req = &vr->vr_req;
struct virtqueue *vq = &sc->sc_vqs[2];
int slot = vr - sc->sc_reqs;
+   int ec = 0;
 
DPRINTF("vioscsi_scsi_cmd: enter\n");
+   STATE_ASSERT(vr, ALLOC);
 
// TODO(matthew): Support bidirectional SCSI commands?
if ((xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT))
== (SCSI_DATA_IN | SCSI_DATA_OUT)) {
+   ec = __LINE__;
stuffup:
xs->error = XS_DRIVER_STUFFUP;
xs->resid = xs->datalen;
-   DPRINTF("vioscsi_scsi_cmd: stuffup\n");
+   printf("vioscsi_scsi_cmd: stuffup l.%d\n", ec);
scsi_done(xs);
return;
}
@@ -187,16 +201,20 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
 * 1, second byte set to target, third and fourth byte representing a
 * single level LUN structure, followed by four zero bytes."
 */
-   if (xs->sc_link->target >= 256 || xs->sc_link->lun >= 16384)
+   if (xs->sc_link->target >= 256 || xs->sc_link->lun >= 16384) {
+   ec = __LINE__;
goto stuffup;
+   }
req->lun[0] = 1;
req->lun[1] = xs->sc_link->target;
req->lun[2] = 0x40 | (xs->sc_link->lun >> 8);
req->lun[3] = xs->sc_link->lun;
memset(req->lun + 4, 0, 4);
 
-   if ((size_t)xs->cmdlen > sizeof(req->cdb))
+   if ((size_t)xs->cmdlen > sizeof(req->cdb)) {
+   ec = __LINE__;
goto stuffup;
+   }
memset(req->cdb, 0, sizeof(req->cdb));
memcpy(req->cdb, xs->cmd, xs->cmdlen);
 
@@ -207,16 +225,21 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
if (bus_dmamap_load(vsc->sc_dmat, vr->vr_data,
xs->data, xs->datalen, NULL,
((isread ? BUS_DMA_READ : BUS_DMA_WRITE) |
-BUS_DMA_NOWAIT)))
+BUS_DMA_NOWAIT))) {
+   ec = __LINE__;
goto stuffup;
+   }
nsegs += vr->vr_data->dm_nsegs;
}
 
int s = splbio();
int r = virtio_enqueue_reserve(vq, slot, nsegs);
splx(s);
-   if (r)
+   if (r) {
+   ec = __LINE__;
+   printf("nsegs: %d seg_max: %d datalen %d isread %d\n", nsegs, 
sc->sc_seg_max, xs->datalen, isread);
goto stuffup;
+   }
 
bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
offsetof(struct vioscsi_req, vr_req),
@@ -245,6 +268,7 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
virtio_enqueue(vq, slot, vr->vr_data, 0);
 
virtio_enqueue_c

pkg_create ignores flags obsd 6.0

2017-03-14 Thread Panagiotis Atmatzidis
Hello,

I'm trying to use "pkg_create" under OpenBSD to distribute a precompiled
binary along with linked libraries.

I have a python script which I inherited, that creates a "+CONTENTS"
file containing the list of files + sha.

The problem is that "pkg_create" doesn't accept additional flags. I
tried -D COMMENT="test", -M "/path/to/file", etc.
The result is pretty ugly:

--
bash-4.3$ pkg_create -f +CONTENTS -desc -D COMMENT="some comment" -D
MAINTAINER="moi"
-bash-4.3$ pkg_info myapp-3.99.tgz
Information for file:./myapp-3.99.tgz

Comment:


Description:
-

Another issue that I came across was adding "@rcscript ${RCDIR}/myapp"
in the "+CONTENTS" file, resulted in "wrong checksum" error. That's not
a priority, the init file could be place manually.

What I'd like to know is how I can add comments and description to be
displayed with "pkg_info"?

Thanks for your time.

--
Panagiotis (atmosx) Atmatzidis

email:  a...@convalesco.org
URL:http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"Everyone thinks of changing the world, but no one thinks of changing
himself.” - Leo Tolstoy



Re: CVS: cvs.openbsd.org: ports

2017-03-14 Thread Rajneesh Shetty
here @ the moment;
www.bolluru.blogspot.com

www.rns-thoughts.blogspot.com


> On 14 Mar 2017, at 9:34 PM, Antoine Jacoutot  wrote:
> 
> CVSROOT:  /cvs
> Module name:  ports
> Changes by:   ajacou...@cvs.openbsd.org   2017/03/14 04:34:14
> 
> Modified files:
>   x11/arandr : Makefile 
>   x11/arandr/pkg : DESCR 
> 
> Log message:
> typo: RandR -> ARandR



Re: Isakmpd and NAT-T

2017-03-14 Thread Philipp Buehler

Am 14.03.2017 01:46 schrieb Mik J:
Hello Sebastien,I'm not sure there's something special to force nat-t, 
it's
automatic.The natted side has to initiate the flow to the non natted 
side.If

the two sides are natted then there should be a port forward to one of
them.There should be a nat keepalive parameter as well.



Since I've seen this on several occassions, check that isakmpd is /not/
having the flag -T. But you might want to use -L and look into the 
resulting
/var/run/isakmpd.pcap (hint: tail -fc+0 isakmpd.pcap|tcpdump -netttvvr 
-)

and watch out for the vendor lines in the proposal if NAT-T is actually
advertised - and of course allow 4500/udp in both directions.