Bug 259015 - net/quoted: version 1.01_2 gives syntax error while trying to enable 'quoted' service
Summary: net/quoted: version 1.01_2 gives syntax error while trying to enable 'quoted'...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-08 21:19 UTC by hex7c
Modified: 2021-10-18 07:22 UTC (History)
3 users (show)

See Also:
bobf: maintainer-feedback+


Attachments
The diff file for /usr/local/etc/rc.d/quoted to fix the syntax error (181 bytes, patch)
2021-10-08 21:19 UTC, hex7c
no flags Details | Diff
updated patch file (594 bytes, patch)
2021-10-11 15:49 UTC, Bob Frazier
bobf: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hex7c 2021-10-08 21:19:23 UTC
Created attachment 228526 [details]
The diff file for /usr/local/etc/rc.d/quoted to fix the syntax error

Component: Service file for rc (/usr/local/etc/rc.d/quoted)
OS: FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f
Port in detail: net/quoted (1.01_2)

Details:
When running 'service quoted enable' immediately after installing net/quoted with pkg, the following errors occur:

/usr/local/etc/rc.d/quoted: 1: Syntax error: Unterminated quoted string
/usr/local/etc/rc.d/quoted: 32: Syntax error: Error in command substitution

I am unsure if this affects others so I am listing this as "only me", but since it is a fresh install of the package I would assume it affects everyone who installs the package.
This can be fixed by simply editing line 32; one quote is missing. A diff is attached for the individual file as an attachment.

I ran `patch /usr/local/etc/rc.d/quoted < quoted.diff` to fix the issue for now.

Hope this bug report helps.
Comment 1 Bob Frazier 2021-10-11 15:34:07 UTC
this is a good catch.  I am not sure why it was not seen before.  Mayb3e a change to the /bin/sh made it more strict than before.
Comment 2 Bob Frazier 2021-10-11 15:49:18 UTC
Created attachment 228592 [details]
updated patch file

tested, approved patch.  please apply (thank you)
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-18 00:29:35 UTC
Take.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-10-18 07:15:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=086b6c38dec852b483d48ceabd5a9d523f58bf82

commit 086b6c38dec852b483d48ceabd5a9d523f58bf82
Author:     hex7c@libpluto.net <hex7c@libpluto.net>
AuthorDate: 2021-10-18 00:22:49 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2021-10-18 07:14:10 +0000

    net/quoted: Fix syntax error of rc script

    * Switch to use @rmtry in pkg-plist
    * Pet portclippy

    PR:             259015
    Approved by:    maintainer, ygy (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32541

 net/quoted/Makefile        | 6 +++---
 net/quoted/files/quoted.in | 2 +-
 net/quoted/pkg-plist       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
Comment 5 Bob Frazier 2021-10-18 07:17:18 UTC
thanks for the other fixes as well
Comment 6 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-18 07:22:20 UTC
Committed with minor refinement. Thanks!