Bug 272800 - sysutils/incron: fix dependency on hard-coded /bin/bash
Summary: sysutils/incron: fix dependency on hard-coded /bin/bash
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-29 17:49 UTC by Trenton Schulz
Modified: 2023-08-13 16:42 UTC (History)
3 users (show)

See Also:


Attachments
Path to port to make use /bin/sh instead (1.57 KB, patch)
2023-07-29 17:49 UTC, Trenton Schulz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trenton Schulz 2023-07-29 17:49:26 UTC
Created attachment 243692 [details]
Path to port to make use /bin/sh instead

When incron is run for users, it uses a hard-coded /bin/bash to execute the command. This results in a confusing error about not being able to execute the command.

Use /bin/sh instead since that is the regular shell on FreeBSD.
Comment 1 Mina Galić freebsd_triage 2023-07-29 18:08:06 UTC
this seems like something that could be pushed upstream, or at least as feature request to set at build time
Comment 2 Trenton Schulz 2023-07-30 07:56:43 UTC
(In reply to Mina Galić from comment #1)
I don't disagree that this should be fixed upstream! But I figured there was a better chance of getting the minimum patch working for FreeBSD and then work on getting a more cross-platform patch for upstream.

As I was just trying to get the incron for my use case, I went with the minimal solution, but figured others would run into the problem. My hope was that the maintainer might know a better solution and this was an OK stopgap or a stepping stone to the correct cross-platform solution.
Comment 3 Mina Galić freebsd_triage 2023-07-30 09:48:10 UTC
it definitely is a good solution for now
and much better than depending on bash.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-13 16:41:43 UTC
Committed with maintainer timeout.

Thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-08-13 16:42:08 UTC
A commit in branch main references this bug:

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

commit ba7720b45c318713be97c1739af97d468e5241eb
Author:     Trenton Schulz <trueos@norwegianrockcat.com>
AuthorDate: 2023-07-31 08:28:05 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-08-13 16:41:05 +0000

    sysutils/incron: fix dependency on hard-coded /bin/bash

    PR:             272800
    Reported by:    trueos@norwegianrockcat.com
    Approved by:    joh.hendriks@gmail.com (maintainer, timeout > 2 weeks)

 sysutils/incron/Makefile                        |  2 +-
 sysutils/incron/files/patch-usertable.cpp (new) | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)