Bug 259109 - shells/zsh: Add BASE_ZSH option
Summary: shells/zsh: Add BASE_ZSH option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-12 17:26 UTC by Yasuhiro Kimura
Modified: 2021-11-26 08:42 UTC (History)
3 users (show)

See Also:
yasu: maintainer-feedback-


Attachments
Patch file (2.45 KB, patch)
2021-10-12 17:26 UTC, Yasuhiro Kimura
no flags Details | Diff
Patch file (5.75 KB, patch)
2021-11-06 03:03 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-12 17:26:12 UTC
Created attachment 228632 [details]
Patch file

Add new option BIN_ZSH that makes zsh and rzsh also available as /bin/zsh and /bin/rzsh.

Under ports flamework everything is installed under /usr/local unless custom prefix is used. And according to it zsh is installed as /usr/local/bin/zsh. But on most Linux based OSes zsh is installed as /bin/zsh. And it causes problem if user's account information is shared between FreeBSD and Linux by using such tools as LDAP or NIS as account information also includes absolute path of user's login shell.
To work around it I have created /bin/zsh as symbolic link referencing /usr/local/bin/zsh and also edited /etc/shells to add /bin/zsh to it every time I set up new FreeBSD system. But it's quite bothersome and I decided to create patch to add new option that makes this port do these jobs automatically by enabling it.
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-12 17:29:37 UTC
By the way I admit "BIN_ZSH" isn't so smart option name.  So I'll accept better alternative if someone propose it.
Comment 2 Chris Hutchinson 2021-10-14 14:57:35 UTC
(In reply to Yasuhiro Kimura from comment #1)
BASE_ZSH? Admittedly it adds one more letter. But somehow
seems maybe more intuitive -- installed to $BASE as opposed
to $LOCALBASE.

Just a thought. :-)
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-11-06 03:03:47 UTC
Created attachment 229309 [details]
Patch file

* Change option name from BIN_ZSH to BASE_ZSH
* Pet portclippy
* Re-format Makefile with portfmt
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-11-06 03:05:54 UTC
(In reply to Chris Hutchinson from comment #2)

Thanks for proposal. I agree that BASE_ZSH is more intuitive and adopt it.
Comment 5 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-11-26 00:50:49 UTC
maintainer timeout (> 2 weeks).
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-11-26 00:55:51 UTC
A commit in branch main references this bug:

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

commit ae1787aab23e44e369dbb0cc814e8318c6f86e0d
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2021-10-12 16:47:27 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2021-11-26 00:53:36 +0000

    shells/zsh: Add BASE_ZSH option

    Add new option BASE_ZSH that makes zsh and rzsh also available as
    /bin/zsh and /bin/rzsh.

    Under ports flamework everything is installed under /usr/local unless
    custom prefix is used. And according to it zsh is installed as
    /usr/local/bin/zsh. But on most Linux based OSes zsh is installed as
    /bin/zsh. And it causes problem if user's account information is
    shared between FreeBSD and Linux by using such tools as LDAP or NIS as
    account information also includes absolute path of user's login shell.
    To work around it I have created /bin/zsh as symbolic link referencing
    /usr/local/bin/zsh and also edited /etc/shells to add /bin/zsh to it
    every time I set up new FreeBSD system. But it's quite bothersome and
    that is why I add new BASE_ZSH option.

    While I'm here,

    * Pet portclippy
    * Re-format Makefile with portfmt

    PR:             259109
    Proposed by:    Chris Hutchinson (more intuitive option name)
    Approved by:    maintainer timeout (> 2 weeks)

 shells/zsh/Makefile  | 80 ++++++++++++++++++++++++++++------------------------
 shells/zsh/pkg-plist |  2 ++
 2 files changed, 45 insertions(+), 37 deletions(-)
Comment 7 Baptiste Daroussin freebsd_committer freebsd_triage 2021-11-26 08:42:29 UTC
Sorry I should have replied earlier.

for the record, I disagree with the patch, we have been enforcing the LOCALBASE separation from base a lot over the last years, preventing as much as possible the ports into install anything in base. Hence me disagreeing with the patch.