From nobody Sat Jul 16 20:56:09 2022 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LlgVy0CPmz4TJ4c for ; Sat, 16 Jul 2022 20:56:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LlgVx5XmFz3FTn for ; Sat, 16 Jul 2022 20:56:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LlgVx4Rzjzb8N for ; Sat, 16 Jul 2022 20:56:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 26GKu9Nr061916 for ; Sat, 16 Jul 2022 20:56:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26GKu95D061915 for ports-bugs@FreeBSD.org; Sat, 16 Jul 2022 20:56:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 265255] net-mgmt/unbound_exporter rc.d script causes failure to start when ssl configuration is empty Date: Sat, 16 Jul 2022 20:56:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: joel.bohnes+freebsd@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658004969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jB4lNC3XHfTCh2a0GFv9Dli+m3viQvuNmoRe5iPaZPk=; b=hJmn6W5wne/sw1N7dUfi6Tp9eXYXlaBGcECZtGK4p2DV9y4Ln6B0cdWphqOt1/xFo/+5Qi QrDtVERxFZFSv3VYaSAlz8fqxCidduW45MeDLLGx7w/xuAF7wata8HfeGbTg6od1eJizAn Zzrrr925P/eL4OthnwL56xSksnzxTapm7mgudxTw7tQ+8ood+rvqf8rS0TGy2B3nXQZWod ipBqFyj37zccEC+M1yh/XKfEk9UHt6srDSRiFIrowYwGDV14Nn5uRCMWV8HH/sD/hpC0mo rq/S0Sxf3c0Rbx46jR2ulDRfOtrlzP6CwfKEct9ZoQcq3StjtWZ1CibAjCn9gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658004969; a=rsa-sha256; cv=none; b=mnheHqcE5ucSLCvQOk5enKxl95yFQq7PhUdm98aaAiW7d3943sSosXmearvjjFD17DHcLQ a1HrwixlfEGNtZve5hHd+SAXt9A0IZsWDCYEKJ0oNmu2G03fNfLqAvN7a1kI/7ciPfxPOr JLPQwhTAbaqhRk0Scy0/xN7y/BsJ1GnNNA6rX9ZhX2YzZgjhHUbZp5Jt+7qy1Eh529h/eg 6vOwBGXpQYYExAsGoJl1Y2ScYjgt32ZJc49GQ7mMO0FoXWTEAvDicWytzMmUXJ0A5gEJ4l ahxjcnfNWaObTiNTQWQBn/X0LnYeXRgCwXQO2gjYyywLzorzgc3TlDYScX/bcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265255 Bug ID: 265255 Summary: net-mgmt/unbound_exporter rc.d script causes failure to start when ssl configuration is empty Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: joel.bohnes+freebsd@gmail.com CC: aduitsis@cpan.org Flags: maintainer-feedback?(aduitsis@cpan.org) CC: aduitsis@cpan.org In our configuration we have have unbound and unbound_exporter running in t= he same jail. The unbound remote-control is listening on a plain (unencrypted)= tcp socket. Section in unbound.conf looks something like this: --- unbound.conf --- remote-control: control-enable: yes control-interface: 127.0.0.1 control-use-cert: "no" --- This configuration is supported by unbound_exporter, but it's a bit awkward because it requires passing an empty string in the command line. The correc= t, working command line looks like this: unbound_exporter -unbound.cert "" -unbound.ca "" <...> If we try to use the rc.d script provided by the unbound_exporter port, we = can try using following settings: --- /etc/rc.conf --- unbound_exporter_enable=3D"YES" unbound_exporter_ca=3D"" unbound_exporter_cert=3D"" unbound_exporter_key=3D"" --- However this will fail with the following error: --- /var/log/unbound_exporter.log --- time=3D"2022-07-16T22:12:56+02:00" level=3Dinfo msg=3D"Starting unbound_exp= orter" source=3D"unbound_exporter.go:478" panic: open -unbound.cert: no such file or directory goroutine 1 [running]: main.main() github.com/kumina/unbound_exporter/unbound_exporter.go:481 +0x485 --- The failing command that the init script executes looks like this: unbound_exporter -unbound.cert -unbound.ca <...> When using command_args in the init script, it seems a bit difficult to pass empty strings along (which is a feature of shellscript). We used to following (nasty?) patch to fix the rc.d script. --- --- /usr/local/etc/rc.d/unbound_exporter.original 2022-07-16 22:12:50.062388470 +0200 +++ /usr/local/etc/rc.d/unbound_exporter 2022-07-16 22:12:09.073708468 +0200 @@ -46,9 +46,9 @@ command=3D/usr/sbin/daemon procname=3D"/usr/local/bin/unbound_exporter" command_args=3D"-p ${pidfile} /usr/bin/env ${procname} \ - -unbound.ca ${unbound_exporter_ca} \ - -unbound.cert ${unbound_exporter_cert} \ - -unbound.key ${unbound_exporter_key} \ + -unbound.ca '\"'${unbound_exporter_ca}'\"' \ + -unbound.cert '\"'${unbound_exporter_cert}'= \"' \ + -unbound.key '\"'${unbound_exporter_key}'\"= ' \ -web.listen-address ${unbound_exporter_bind= } \ ${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1" --- --=20 You are receiving this mail because: You are the assignee for the bug.=