Bug 269102 - sysutils/tmux-xpanes: new port
Summary: sysutils/tmux-xpanes: new port
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: Robert Clausecker
URL: https://github.com/greymd/tmux-xpanes
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2023-01-22 19:30 UTC by Vidar Karlsen
Modified: 2023-02-27 22:53 UTC (History)
1 user (show)

See Also:


Attachments
git format-patch (3.52 KB, patch)
2023-01-22 19:30 UTC, Vidar Karlsen
no flags Details | Diff
git format-patch, improved (4.18 KB, patch)
2023-02-24 15:06 UTC, Vidar Karlsen
no flags Details | Diff
git format-patch, improved with TEST_DEPENDS (4.11 KB, patch)
2023-02-24 21:07 UTC, Vidar Karlsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vidar Karlsen 2023-01-22 19:30:32 UTC
Created attachment 239644 [details]
git format-patch

Ultimate terminal divider powered by tmux

Features:
- Split tmux window into multiple panes
  * Construct command lines & execute them on the panes
- Runnable from outside of tmux session
- Runnable from inside of tmux session
- Record operation log
- Flexible layout arrangement for panes
  * Select layout presets
  * Set columns or rows as you like
- Display pane title on each pane
- Generate command lines from standard input (Pipe mode)

QA:
- portlint and portclippy are happy.
- run-time tested ok.
- poudriere doesn't work well for run-time testing this, due to restrictions preventing tmux running in a poudriere jail.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-02-21 18:09:43 UTC
Please:

 - set NO_ARCH=yes if the port does not install any architecture dependent files
 - install shell completion files into the appropriate directories (see ยง 6.30
   Porter's Handbook) instead of stuffing them with the documentation
 - define LICENSE_FILE and point it to the license file
 - check if files like CONTRIBUTING.md and install.sh are really needed in the
   installed package.  Try not to package unnecessary crap.
 - the xpanes script tries to autodetect the location of bash.  As we hardcode
   that location in shebangfix, check if you could patch it to the same place.
   Use REINPLACE_CMD in do-configure for that.
 - you mention having done run time tests.  Please hook them up to do-test if
   possible.
Comment 2 Vidar Karlsen 2023-02-24 15:06:08 UTC
Created attachment 240379 [details]
git format-patch, improved
Comment 3 Vidar Karlsen 2023-02-24 15:15:43 UTC
(In reply to Robert Clausecker from comment #1)

Thanks for the feedback! I learned a few new things from figuring this out.

- NO_ARCH is now set to yes.
- The zsh completion file now gets installed in the right location. I opted not to make it an option as the handbook says they should always be installed.
- LICENSE_FILE is set.
- I took a longer look at the previous PORTDOCS and removed all but README.md.
- I added a REINPLACE_CMD to set the second shebang to ${bash_CMD} in do-configure. Not sure if this should be there or in post-patch, but I suppose either works fine.
- The smoke test, as recommended by upstream, is now run by do-test. It needs a git subrepo to run the tests, so I added a GH_TUPLE for that. Is there a slicker way to do this, so the shunit2 repo won't be downloaded and extracted unless 'make test' gets run?
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-02-24 15:25:45 UTC
(In reply to Vidar Karlsen from comment #3)

Thank you for your updates!

> - I took a longer look at the previous PORTDOCS and removed all but README.md.

If it's only a README file, you can opt to unconditionally install it.  The DOCS option is to given an option to avoid installing bulky documentation files on production machines, but a single README doesn't do a lot of harm.

> - The smoke test, as recommended by upstream, is now run by do-test. It needs a 
> git subrepo to run the tests, so I added a GH_TUPLE for that. Is there a slicker 
> way to do this, so the shunit2 repo won't be downloaded and extracted unless 
> 'make test' gets run?

You could add a TEST_DEPENDS on devel/shunit2 and patch the port to use that instead of downloading the submodule.

I consider the port okay as it is right now, but feel free to tinker with it some more.  Let me know when it is good to commit.
Comment 5 Vidar Karlsen 2023-02-24 21:07:57 UTC
Created attachment 240390 [details]
git format-patch, improved with TEST_DEPENDS
Comment 6 Vidar Karlsen 2023-02-24 21:10:08 UTC
(In reply to Robert Clausecker from comment #4)

> You could add a TEST_DEPENDS on devel/shunit2 and patch the port to use that instead of downloading the submodule.

Yes, I like that, it seems more elegant.

> I consider the port okay as it is right now, but feel free to tinker with it some more.  Let me know when it is good to commit.

Alright, thanks, I think it's ready now.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-02-27 22:50:13 UTC
A commit in branch main references this bug:

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

commit dd998c7e12c3e4a7d31bf9a5cbb6c7d473db9b61
Author:     Vidar Karlsen <vidar@karlsen.tech>
AuthorDate: 2023-01-22 19:12:03 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-02-27 22:48:18 +0000

    sysutils/tmux-xpanes: new port

    Ultimate terminal divider powered by tmux

    Features:
    - Split tmux window into multiple panes
      * Construct command lines & execute them on the panes
    - Runnable from outside of tmux session
    - Runnable from inside of tmux session
    - Record operation log
    - Flexible layout arrangement for panes
      * Select layout presets
      * Set columns or rows as you like
    - Display pane title on each pane
    - Generate command lines from standard input (Pipe mode)

    WWW: https://github.com/greymd/tmux-xpanes

    Maintainer becomes submitter.  Already submitter of other ports.

    PR:             269102
    Approved by:    flo (mentor)
    Differential Revision: https://reviews.freebsd.org/D38780

 sysutils/Makefile                    |  1 +
 sysutils/tmux-xpanes/Makefile (new)  | 45 ++++++++++++++++++++++++++++++++++++
 sysutils/tmux-xpanes/distinfo (new)  |  3 +++
 sysutils/tmux-xpanes/pkg-descr (new) | 12 ++++++++++
 sysutils/tmux-xpanes/pkg-plist (new) |  4 ++++
 5 files changed, 65 insertions(+)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-02-27 22:53:46 UTC
Thank you for your contribution.