Bug 245324 - games/cowsay puts STAGEDIR in manpage
Summary: games/cowsay puts STAGEDIR in manpage
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: Nikolai Lifanov
Depends on:
Reported: 2020-04-03 18:24 UTC by Adriaan de Groot
Modified: 2021-01-21 22:47 UTC (History)
1 user (show)

See Also:
adridg: maintainer-feedback? (lifanov)

Remove STAGEDIR from manpage (1.27 KB, patch)
2021-01-07 00:06 UTC, Adriaan de Groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adriaan de Groot freebsd_committer 2020-04-03 18:24:03 UTC
I have built games/cowsay in my own poudriere. In the manpage, it says:

       /wrkdirs/usr/ports/games/cowsay/work/stage/usr/local/share/cows holds a
       sample set of cowfiles.  If your COWPATH is not explicitly set, it
       automatically contains this directory.

Notice that the stagedir from building has leaked into the manpage. And if I build the port as a user in /tmp/port, and look at the staged manpage at /tmp/port/work/stage/usr/local/man/man1/cowsay.1.gz, then I see this:

.B /tmp/port/work/stage/usr/local/share/cows
holds a sample set of cowfiles.  If your

.. and while the script explicitly handles a "normal" (or maybe "old-fashioned, before staging was a thing") prefix, it substitutes a full prefix (with staging, it seems) in to the intermediate perl scripts -- and onwards into the manpages:

echo s,%PREFIX%,$PREFIX,\; >> install.pl
Comment 1 Adriaan de Groot freebsd_committer 2021-01-07 00:06:51 UTC
Created attachment 221341 [details]
Remove STAGEDIR from manpage

This patch does two things:
 - updates the version number reported by `cowsay -h` to the port version; cowsay release 3.04 still claims to be 3.03, and we may as well make the port revision explicit then, too
 - removes STAGEDIR from the manpage, as reported in this PR
Comment 2 Adriaan de Groot freebsd_committer 2021-01-07 00:08:04 UTC
(flipping maintainer-feedback because now there's a patch and the usual "update rules" apply to this "mission-critical" application)
Comment 3 commit-hook freebsd_committer 2021-01-21 22:27:48 UTC
A commit references this bug:

Author: adridg
Date: Thu Jan 21 22:26:51 UTC 2021
New revision: 562252
URL: https://svnweb.freebsd.org/changeset/ports/562252

  Fix build artifacts in games/cowsay

  `cowsay -h` still reported 3.03 (this was an upstream error) and the manpage
  contained STAGEDIR paths; fix that with some sed-work. I've added comments
  in the makefile explaining how we're mulching this ancient perl script.

  Note that this uses `${SED} -i` rather than `${REINPLACE_CMD}` because
  that's what the port was already doing. I didn't want to change style
  at the same time.

  PR:		245324
  Approved by:	maintainer timeout (2 weeks)