Re: Compiling ninja on alpha

2020-05-13 Thread Juan Francisco Cantero Hurtado
On Wed, May 13, 2020 at 01:21:43PM +0200, Martijn van Duren wrote:
> Hello,
> 
> Trying to build ninja on alpha fails with the current COMPILER-line.
> Apparently gcc-8 has a regression for its alpha backend resulting in a
> compiler crash with the following error (transcribed):
> ./src/deps_log.cc:306:1: error: unrecognizable insn:
> }
> 
> (insn 483 482 484 36 (set (reg:DI 262)
>   (plus:DI (reg/f:DI 65 virtual-stack-vars)
>   (const_int -524292 [0xfff7fffc] "./src/deps_log.cc":228 -1
>   (nil))
> during RTL pass: vregs
> ./src/deps_log.cc:386:1: internal compiler error: in extract_insn, at 
> recog.c:2304
> 
> Is there an easy way to prioritize base-gcc over ports-gcc on alpha,
> because I don't think we want to change the line to:
> COMPILER =base-clang base-gcc ports-gcc

.if ${MACHINE_ARCH} != "alpha"
COMPILER = base-clang ports-gcc base-gcc
.endif

If alpha is using ports-gcc by default, then add an else to the
conditional.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: NEW: security/uacme

2020-05-13 Thread Jeremie Courreges-Anglas
On Mon, May 11 2020, Stuart Henderson  wrote:
> Obviously for after unlock.. OK to import?

ok jca@

> ---
> uacme is a lightweight client for the RFC8555 ACMEv2 protocol used with
> certificate authorities to validate and issue X509 certificates. It is
> written in plain C with minimal dependencies (libcurl and one of GnuTLS,
> OpenSSL or mbedTLS) and can handle all authentication types via external
> hooks (examples for http-01, dns-01 via nsupdate, and tls-alpn-01).
> ---

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: Compiling ninja on alpha

2020-05-13 Thread Stuart Henderson
On 2020/05/13 13:21, Martijn van Duren wrote:
> Hello,
> 
> Trying to build ninja on alpha fails with the current COMPILER-line.
> Apparently gcc-8 has a regression for its alpha backend resulting in a
> compiler crash with the following error (transcribed):
> ./src/deps_log.cc:306:1: error: unrecognizable insn:
> }
> 
> (insn 483 482 484 36 (set (reg:DI 262)
>   (plus:DI (reg/f:DI 65 virtual-stack-vars)
>   (const_int -524292 [0xfff7fffc] "./src/deps_log.cc":228 -1
>   (nil))
> during RTL pass: vregs
> ./src/deps_log.cc:386:1: internal compiler error: in extract_insn, at 
> recog.c:2304
> 
> Is there an easy way to prioritize base-gcc over ports-gcc on alpha,
> because I don't think we want to change the line to:
> COMPILER =base-clang base-gcc ports-gcc
> 
> martijn@
> 

Add "MODGCC4_ARCHS= ${GCC49_ARCHS:Nalpha}"



Compiling ninja on alpha

2020-05-13 Thread Martijn van Duren
Hello,

Trying to build ninja on alpha fails with the current COMPILER-line.
Apparently gcc-8 has a regression for its alpha backend resulting in a
compiler crash with the following error (transcribed):
./src/deps_log.cc:306:1: error: unrecognizable insn:
}

(insn 483 482 484 36 (set (reg:DI 262)
(plus:DI (reg/f:DI 65 virtual-stack-vars)
  (const_int -524292 [0xfff7fffc] "./src/deps_log.cc":228 -1
(nil))
during RTL pass: vregs
./src/deps_log.cc:386:1: internal compiler error: in extract_insn, at 
recog.c:2304

Is there an easy way to prioritize base-gcc over ports-gcc on alpha,
because I don't think we want to change the line to:
COMPILER =  base-clang base-gcc ports-gcc

martijn@



[doc] using qemu guest agent on OpenBSD kvm/qemu guests

2020-05-13 Thread Landry Breuil
Hi,

experimenting with proxmox VE since some years (but that also applies to
plain kvm/qemu OpenBSD vms), today i had a look at the qemu guest agent
feature:
https://pve.proxmox.com/wiki/Qemu-guest-agent
https://wiki.qemu.org/Features/GuestAgent

in the host config/webui, enabling the guest agent adds a virtio-serial
device to the kvm cmdline:
-chardev socket,path=/var/run/qemu-server/100.qga,server,nowait,id=qga0
-device virtio-serial,id=qga0,bus=pci.0,addr=0x8
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

in the guest, this is detected as a new virtio device for which we have
no dedicated driver, so it stays unconfigured:

virtio1 at pci0 dev 8 function 0 "Qumranet Virtio Console" rev 0x00
virtio1: no matching child driver; not configured

but looking at the qemu-guest-agent & proxmox qm docs:
https://www.qemu.org/docs/master/interop/qemu-ga.html
https://pve.proxmox.com/wiki/Manual:_qm.conf

there's a way to tell proxmox to use the 'isa-serial' device type:
proxmox# grep agent /etc/pve/qemu-server/100.conf 
agent: 1,type=isa

which adds another device type to the kvm cmdline:
-chardev socket,path=/var/run/qemu-server/100.qga,server,nowait,id=qga0
-device isa-serial,chardev=qga0

and in the guest.. there's a new serial device (com0 is used by the qemu
console):
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo

from that point, one can run qemu-ga, pointing at this serial port (-f
and -t are used because otherwise qemu-ga hardcodes
/usr/local/$something):
guest$ doas qemu-ga -m isa-serial -p /dev/cua01 -f /tmp/xx.pid -t /tmp/ -v
1589361079.833754: debug: disabling command: guest-suspend-disk
1589361079.833788: debug: disabling command: guest-suspend-ram
1589361079.833799: debug: disabling command: guest-suspend-hybrid
1589361079.833809: debug: disabling command: guest-network-get-interfaces
1589361079.833818: debug: disabling command: guest-get-vcpus
1589361079.833827: debug: disabling command: guest-set-vcpus
1589361079.833836: debug: disabling command: guest-get-memory-blocks
1589361079.833852: debug: disabling command: guest-set-memory-blocks
1589361079.833862: debug: disabling command: guest-get-memory-block-size
1589361079.833872: debug: disabling command: guest-get-memory-block-info
1589361079.833881: debug: disabling command: guest-get-fsinfo
1589361079.833890: debug: disabling command: guest-fsfreeze-status
1589361079.833898: debug: disabling command: guest-fsfreeze-freeze
1589361079.833907: debug: disabling command: guest-fsfreeze-freeze-list
1589361079.833916: debug: disabling command: guest-fsfreeze-thaw
1589361079.833924: debug: disabling command: guest-get-fsinfo
1589361079.833933: debug: disabling command: guest-fstrim

(yeah, some commands are disabled, something to probably fix w/
upstream, freebsd has some work done in
https://github.com/aborche/qemu-guest-agent)

from that point one can send commands via the host:

proxmox# qm agent 100 get-host-name
{
   "host-name" : "c64.proxmox2"
}

proxmox# qm agent 100 get-time
158936136003392
proxmox# qm agent 100 get-osinfo
{
   "kernel-release" : "6.7",
   "kernel-version" : "GENERIC.MP#182",
   "machine" : "amd64"
}

sadly, sending 'shutdown' doesnt work, but that should be possible to
fix.

according to the 'info' command, those qemu commands should work:
proxmox# qm guest cmd 100 info | jq '.supported_commands | .[] | 
select(.enabled == true) | select (."success-response" == true) | .name'
"guest-get-osinfo"
"guest-get-timezone"
"guest-get-users"
"guest-get-host-name"
"guest-exec"
"guest-exec-status"
"guest-set-user-password"
"guest-file-flush"
"guest-file-seek"
"guest-file-write"
"guest-file-read"
"guest-file-close"
"guest-file-open"
"guest-info"
"guest-set-time"
"guest-get-time"
"guest-ping"
"guest-sync"
"guest-sync-delimited"

testing shows some are broken at runtime, but that allows the host to
list files within the guest:

proxmox# qm guest exec 100 ls /tmp
{
   "exitcode" : 0,
   "exited" : 1,
   "out-data" : 
".ICE-unix\n.X11-unix\nqga.state\nsndio\ntmux-1000\nvi.recover\n"
}

and finally, this allows a graceful shutdown of the guest from the host:

proxmox# qm guest exec 100 halt
QEMU guest agent is not running

(and the vm is properly stopped)

Hoping that can be useful for people who use OpenBSD in qemu/kvm VMs,
havent found any kind of doc on that specific to OpenBSD so far.

bits to consider portswise: i think it would make sense to subpackage
qemu-ga binary, having to install the complete qemu package with all its
dependencies in a VM if a bit much imo. Will see if that's feasible..
fixing hardcoded paths and some commands would be nice too :)

Landry



Re: NEW: sysutils/packer-vmm

2020-05-13 Thread Klemens Nanni
On Sun, Apr 19, 2020 at 06:29:13PM +0300, Pavel Korovin wrote:
> Please find sysutils/packer-vmm, a vmm(4) builder plugiun for HashiCorp Packer
> attached.
> Upstream maintainer, Philipp Buehler is OK for me taking maintainership.
> OK to import?
The D variable in Makefile is unused, port looks really good otherwise.
Thanks for pkg/README.

OK kn (tree is still locked)



Re: [Update] devel/p5-MCE : Update to 1.868

2020-05-13 Thread Stuart Henderson
On 2020/05/13 01:09, wen heping wrote:
> Hi, ports@:
> 
>Here is a simple patch for devel/p5-MCE to update to 1.868.
>It build well and pas all tests on amd64-current system.
> 
>One port depends on p5-MCE : devel/p5-Test-Perl-Critic.
>It build well and pass all tests too.

The changelog looks sane (I'll include it here to make it easier for
readers). OK with me for after unlock.



1.868 Sun May 10 22:00:00 EST 2020
 
  * Completed threads-like detach capability in MCE::Child.
 
  * Resolved MCE::Channel failing when calling dequeue multiple times
on an ended channel.
 
  * MCE->say, MCE->print, and MCE->printf now return 1.
 
1.867 Sun May 03 18:00:00 EST 2020
 
  * Bug fix for UTF-8 issues during inter-process communication.
This update required undoing optimizations specific to scalar args.
Essentially, IPC involves serialization for everything going forward.
Install Sereal::Encoder and Sereal::Decoder for better performance
in Perl 5.8.8+.
 
  * MCE options flush_stdout, flush_stderr, and flush_file now default to
enabled for the MCE->print, MCE->printf, and MCE->say output routines.
 
  * Improved MCE::Child with threads-like detach capability. See POD.
 
  * Improved IPC in MCE::Queue with permanent fast-like dequeue including
dequeue_nb. Going forward, the fast and barrier options are silently
ignored if specified (i.e. no-op).
 
  * Improved IPC performance on Linux.
 
1.866 Sat Feb 08 21:00:00 EST 2020
 
  * Bug fix for restart_worker, race condition introduced in 1.863.
Thank you, Oliver Gorwits for reporting the issue.


> 
> Regards,
> wen

> Index: Makefile
> ===
> RCS file: /cvs/ports/devel/p5-MCE/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile  10 Feb 2020 00:32:06 -  1.4
> +++ Makefile  13 May 2020 00:56:08 -
> @@ -2,7 +2,7 @@
>  
>  COMMENT =engine for Perl providing parallel processing capabilities
>  
> -DISTNAME =   MCE-1.865
> +DISTNAME =   MCE-1.868
>  CPAN_AUTHOR =MARIOROY
>  
>  CATEGORIES = devel
> Index: distinfo
> ===
> RCS file: /cvs/ports/devel/p5-MCE/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo  10 Feb 2020 00:32:06 -  1.3
> +++ distinfo  13 May 2020 00:56:08 -
> @@ -1,2 +1,2 @@
> -SHA256 (MCE-1.865.tar.gz) = LIEzt+2z5Ts7/5IqzkYyiaa673wgTjo+9z+XFytgGbo=
> -SIZE (MCE-1.865.tar.gz) = 215892
> +SHA256 (MCE-1.868.tar.gz) = 96KD7oKJm1zOcY/AcL4Tmfv7esI4NMm9CUb90u6STqw=
> +SIZE (MCE-1.868.tar.gz) = 219769



Re: ipfs-0.5.1 - wanting to contribute

2020-05-13 Thread Stuart Henderson
On 2020/05/12 08:08, Bryan Stenson wrote:
> Is anybody working on ipfs-0.5.1?

Not that I've heard of.

> This would be my first contribution to ports, and would likely need a
> sherpa, but I'm interested/motivated enough to keep this updated.

https://github.com/ipfs/go-ipfs/blob/master/go.mod>

I think you will want to start with an initial port produced by
abieber's portgen diff for go (see the "Go and portgen(1)" thread in
the ports@ archives), working through the deps by hand won't be fun.



Re: [PATCH] unbreak games/mnemosyne

2020-05-13 Thread Grégoire Jadi
Jeremie Courreges-Anglas  writes:

> On Sun, May 10 2020, gj...@omecha.info (Grégoire Jadi) wrote:
>
>> Hi,
>>
>> An upgrade to py-CherryPy broke the webserver feature of
>> games/mnemosyne.
>>
>> Mnemosyne used the wsgiserver from py-CherryPy which was moved to
>> py-cheroot. As far as I could tell, that was the only use of py-CherryPy
>> in Mnemosyne codebase.
>>
>> The attached patch replace the depency from py-CherryPy to py-cheroot
>> and update the two uses accordingly.
>>
>> I was able to use the webserver and sync features with my own database.
>
> Changes make sense to me.  I'll commit it post-unlock unless another
> committer with interest in mnemosyne wants to take care of this.

Thanks.

>> NB: I tried to upgrade mnemosyne to the latest version but it uses
>> QtWebEngine from qt5 which isn't provided. education/anki, suffers from
>> the same issue. :(
>
> I think rsadowski@ is working on a qtwebengine port.

Ok, cool.

> Updated diff which:
> - explains why this can't be updated to a newer version for now
> (qtwebengine)
> - adds a comment and a link to upstream bug report to the patches
> - moves HOMEPAGE to https
>
> Thanks! :)
>
> Index: Makefile
> ===
> RCS file: /cvs/ports/games/mnemosyne/Makefile,v
> retrieving revision 1.39
> diff -u -p -r1.39 Makefile
> --- Makefile  12 Jul 2019 20:46:21 -  1.39
> +++ Makefile  13 May 2020 00:12:49 -
> @@ -2,13 +2,14 @@
>
>  COMMENT= flash-card tool which optimises your learning process
>
> +# Newer versions moved to Qt5 and need qtwebengine
>  MODPY_EGG_VERSION = 2.3.6
>  DISTNAME=Mnemosyne-${MODPY_EGG_VERSION}
>  PKGNAME= ${DISTNAME:L}
>  CATEGORIES=  games education
> -REVISION=2
> +REVISION=3
>
> -HOMEPAGE=http://www.mnemosyne-proj.org/
> +HOMEPAGE=https://www.mnemosyne-proj.org/
>
>  # GPLv2
>  PERMIT_PACKAGE=  Yes
> @@ -23,7 +24,7 @@ RUN_DEPENDS=x11/py-qt4 \
>   textproc/py-xml \
>   graphics/py-Pillow \
>   graphics/py-matplotlib \
> - www/py-CherryPy \
> + www/py-cheroot \
>   www/py-webob>=1.3.1 \
>   devel/desktop-file-utils
>
> Index: patches/patch-mnemosyne_web_server_web_server_py
> ===
> RCS file: patches/patch-mnemosyne_web_server_web_server_py
> diff -N patches/patch-mnemosyne_web_server_web_server_py
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-mnemosyne_web_server_web_server_py  13 May 2020 00:12:49 
> -
> @@ -0,0 +1,26 @@
> +$OpenBSD$
> +
> +The cherrypy project moved their WSGI server to py-cheroot.
> +https://bugs.launchpad.net/mnemosyne-proj/+bug/1659314
> +
> +Index: mnemosyne/web_server/web_server.py
> +--- mnemosyne/web_server/web_server.py.orig
>  mnemosyne/web_server/web_server.py
> +@@ -13,7 +13,7 @@ import threading
> + from webob import Request
> + from webob.static import FileApp
> + 
> +-from cherrypy import wsgiserver
> ++from cheroot import wsgi
> + 
> + from mnemosyne.libmnemosyne import Mnemosyne
> + from mnemosyne.libmnemosyne.utils import localhost_IP
> +@@ -69,7 +69,7 @@ class WebServer(Component):
> + self.is_just_started = True
> + self.is_mnemosyne_loaded = False
> + self.is_shutting_down = False
> +-self.wsgi_server = wsgiserver.CherryPyWSGIServer(\
> ++self.wsgi_server = wsgi.Server(\
> + ("0.0.0.0", port), self.wsgi_app, server_name="localhost",
> + numthreads=1, timeout=5)
> + # We need to set the timeout relatively low, otherwise it will take
> Index: patches/patch-openSM2sync_server_py
> ===
> RCS file: patches/patch-openSM2sync_server_py
> diff -N patches/patch-openSM2sync_server_py
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-openSM2sync_server_py   13 May 2020 00:12:49 -
> @@ -0,0 +1,19 @@
> +$OpenBSD$
> +
> +The cherrypy project moved their WSGI server to py-cheroot.
> +https://bugs.launchpad.net/mnemosyne-proj/+bug/1659314
> +
> +Index: openSM2sync/server.py
> +--- openSM2sync/server.py.orig
>  openSM2sync/server.py
> +@@ -105,8 +105,8 @@ class Server(Partner):
> + self.machine_id = machine_id
> + # We only use 1 thread, such that subsequent requests don't run into
> + # SQLite access problems.
> +-from cherrypy import wsgiserver
> +-self.wsgi_server = wsgiserver.CherryPyWSGIServer\
> ++from cheroot import wsgi
> ++self.wsgi_server = wsgi.Server\
> + (("0.0.0.0", port), self.wsgi_app, server_name="localhost",
> + numthreads=1, timeout=1000)
> + Partner.__init__(self, ui)
> Index: patches/patch-setup_py
> ===
> RCS file: /cvs/ports/games/mnemosyne/patches/patch-setup_py,v
> retrieving revision 1.5
> diff -u