From nobody Tue Jul 11 22:08:40 2023 X-Original-To: dev-commits-ports-main@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 4R0w4S6BdRz4lRGN; Tue, 11 Jul 2023 22:08:40 +0000 (UTC) (envelope-from git@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 4R0w4S3XH7z4H33; Tue, 11 Jul 2023 22:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689113320; 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=0XB2828aN6pikVQhI+1I5eSwtUuPR3Iy3qAuJmT3NcY=; b=Y0fkc4xGmtMM4sJTALrz37U9rX5VRnHEvNCt2UbnyQv4xQJ+Vl1i1f5A9DLwv8HjFNEMdu htOtAfnlmFGVEqoiODVvH3mFsLnv7Y22bybf6PCxzzUUUyiONt7F8KwDdJEFWTh1DKpRWk 3K/DnUvof4edbLyA/Q4lS3e+kdPVBfTLTu85Z5V/JvI9bRIAO9Gb9+H1PCRmg0C/lo2WsM iblD/A1PSmUDbtDIkhBBVLHAinW9Sp3oquCuDhJ4n+dACO/l3jzqlU5KnMtyQX840mkCVX AGqiPdffGWNAF+9zdIRZAkQNU/twjLzPTCAzlzKKz9hM9tppoya1Fa26GcuN2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689113320; 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=0XB2828aN6pikVQhI+1I5eSwtUuPR3Iy3qAuJmT3NcY=; b=ewDRL1Wucm6DRZAPRxHKCzaQYuQ1d7TQSamy2EF4p5I4l0wzurCCE7jUWT7Gb6r59ysIMq z//zScsuQ97fpkYxPtaNrwH23G2qVOtVaM2oY41X8kPuwnB7wVQzcqqXC9JNBoIZ0Ulhic s9QFZ7jvNTCjVaRSoprb1K4fQDCCYwTTBrvOR9WZ/oRNBO5964Ec88tqCV3QBbE2i//ufp mq7CwYUGmv9srYtbfErc0v+dnpPewPlQMqeBKFdOSwFiuKf9nWsWnEa6qCdpM/7mge/gj+ 0LrBP7fqHMLzQKPMaK2IJKLQQYfDt48s34JUXX+8UjF41P+Ppdw9IvPYf0ZsUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689113320; a=rsa-sha256; cv=none; b=IuyBUmGF2q3bCYKT131Va46WwmZZwg/CRh1rDf61F/PVOyRXtA+7NAwuk+jJ1gzmhYH35H E+y1cZx/Y5sFoF/i3an6K7Q00sxZEZRir5AMdvu+KBAFsZqFXeCv+dbhrCPwDLyn2sR4Yp k2dPLKeq9ZyZiUhzllSlcdCfBjU4QrEPMeFe4YR36wYGQGeJdmAPTyLdBbXCnrNWy+MdkL JT+3ajsVWHXArxXOhS9w46HM+Enm0nCRl0US6y5onGNv6oM9dCJCIEhwJ6QvDLWRjXllWj CsRdxg+w85aAe3gpjt2CeUKqDBHMaMtZezM6R13INO96rH9lOmH37xlDFxlf8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4R0w4S2P5GzjsV; Tue, 11 Jul 2023 22:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36BM8eek004986; Tue, 11 Jul 2023 22:08:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36BM8ef2004985; Tue, 11 Jul 2023 22:08:40 GMT (envelope-from git) Date: Tue, 11 Jul 2023 22:08:40 GMT Message-Id: <202307112208.36BM8ef2004985@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 2705e09bd8c2 - main - sysutils/scanbd: correct file placement and robustness fix List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2705e09bd8c207f8158639d3dbbc47e547ddf115 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=2705e09bd8c207f8158639d3dbbc47e547ddf115 commit 2705e09bd8c207f8158639d3dbbc47e547ddf115 Author: Trenton Schulz AuthorDate: 2023-07-07 16:58:35 +0000 Commit: Robert Clausecker CommitDate: 2023-07-11 22:07:21 +0000 sysutils/scanbd: correct file placement and robustness fix These are additional revisions based on discussion on bug #272066. There, the placement for the sample scripts wasn't correct. So, we now move the sample scripts to $LOCALBASE/etc/scanbd/scripts as samples, but they aren't marked as samples in the plist. There is also a pkg-message that explains this. This should be the last revision I can see in the immediate future until a new release comes out. PR: 272419 See also: 272066 --- sysutils/scanbd/Makefile | 14 +++++++++----- sysutils/scanbd/files/patch-conf_scanbd.conf | 8 ++++---- sysutils/scanbd/files/pkg-message.in | 11 +++++++++++ sysutils/scanbd/pkg-plist | 10 +++++----- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/sysutils/scanbd/Makefile b/sysutils/scanbd/Makefile index d94376c62c37..298b444f37af 100644 --- a/sysutils/scanbd/Makefile +++ b/sysutils/scanbd/Makefile @@ -1,6 +1,6 @@ PORTNAME= scanbd DISTVERSION= 1.5.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MAINTAINER= trueos@norwegianrockcat.com @@ -31,15 +31,19 @@ SHEBANG_GLOB= *.script USE_RC_SUBR= scanbd -SUB_FILES= scanbd +SUB_FILES= pkg-message \ + scanbd post-patch: - @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/conf/scanbd.conf + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/conf/scanbd.conf post-install: ${MV} ${STAGEDIR}${ETCDIR}/scanbd.conf ${STAGEDIR}${ETCDIR}/scanbd.conf.sample - ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${MV} ${STAGEDIR}${ETCDIR}/scripts ${STAGEDIR}${EXAMPLESDIR} + ${MV} ${STAGEDIR}${ETCDIR}/scripts/action.script ${STAGEDIR}${ETCDIR}/scripts/action.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/example.script ${STAGEDIR}${ETCDIR}/scripts/example.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/insert.script ${STAGEDIR}${ETCDIR}/scripts/insert.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/scanadf.script ${STAGEDIR}${ETCDIR}/scripts/scanadf.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/test.script ${STAGEDIR}${ETCDIR}/scripts/test.script.sample ${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/scanbd ${STAGEDIR}${PREFIX}/etc/rc.d/scanbd diff --git a/sysutils/scanbd/files/patch-conf_scanbd.conf b/sysutils/scanbd/files/patch-conf_scanbd.conf index 7c786843d6ee..f08c92a6a4d3 100644 --- a/sysutils/scanbd/files/patch-conf_scanbd.conf +++ b/sysutils/scanbd/files/patch-conf_scanbd.conf @@ -1,4 +1,4 @@ ---- conf/scanbd.conf.orig 2023-06-18 13:49:49 UTC +--- conf/scanbd.conf.orig 2017-08-25 06:29:18 UTC +++ conf/scanbd.conf @@ -30,7 +30,7 @@ global { @@ -18,10 +18,10 @@ # the saned executable for manager-mode - saned = "/usr/sbin/saned" -+ saned = "/usr/local/sbin/saned" ++ saned = "%%PREFIX%%/sbin/saned" saned_opt = {} # string-list - saned_env = { "SANE_CONFIG_DIR=/etc/scanbd" } # list of environment vars for saned -+ saned_env = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd" } # list of environment vars for saned ++ saned_env = { "SANE_CONFIG_DIR=%%PREFIX%%/etc/scanbd" } # list of environment vars for saned # Scriptdir specifies where scanbd normally looks for scripts. # The scriptdir option can be defined as: @@ -32,7 +32,7 @@ - # Default scriptdir is /etc/scanbd, this is normally appropriate - scriptdir = /etc/scanbd/scripts + # Default scriptdir is /etc/scanbd, this is normally -+ scriptdir = /usr/local/share/examples/scanbd/scripts ++ scriptdir = %%PREFIX%%/etc/scanbd/scripts # Scripts to execute upon device insertion/removal. # It can be necessary to load firmware into the device when it is first diff --git a/sysutils/scanbd/files/pkg-message.in b/sysutils/scanbd/files/pkg-message.in new file mode 100644 index 000000000000..773c4d4aae87 --- /dev/null +++ b/sysutils/scanbd/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: install + message: <.sample. Copy and modify +these to suit your needs (or start from scratch). For details, see +%%PREFIX%%/etc/scanbd/scanbd.conf + +EOM +} +] diff --git a/sysutils/scanbd/pkg-plist b/sysutils/scanbd/pkg-plist index 8bd096a4e0a7..a5cf7d0bfcf4 100644 --- a/sysutils/scanbd/pkg-plist +++ b/sysutils/scanbd/pkg-plist @@ -1,8 +1,8 @@ -%%EXAMPLESDIR%%/scripts/action.script -%%EXAMPLESDIR%%/scripts/example.script -%%EXAMPLESDIR%%/scripts/insert.script -%%EXAMPLESDIR%%/scripts/scanadf.script -%%EXAMPLESDIR%%/scripts/test.script +%%ETCDIR%%/scripts/action.script.sample +%%ETCDIR%%/scripts/example.script.sample +%%ETCDIR%%/scripts/insert.script.sample +%%ETCDIR%%/scripts/scanadf.script.sample +%%ETCDIR%%/scripts/test.script.sample @sample %%ETCDIR%%/scanbd.conf.sample %%ETCDIR%%/scanner.d/avision.conf %%ETCDIR%%/scanner.d/canon.conf