Bug 191464 - [patch] www/interchange stagify
Summary: [patch] www/interchange stagify
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: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2014-06-28 17:08 UTC by loader
Modified: 2014-07-09 14:41 UTC (History)
1 user (show)

See Also:

stagify (1.84 KB, text/plain)
2014-06-28 17:08 UTC, loader
no flags Details
stagify (1.85 KB, patch)
2014-06-28 17:14 UTC, loader
no flags Details | Diff
new patch (9.51 KB, patch)
2014-06-30 13:47 UTC, loader
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description loader 2014-06-28 17:08:08 UTC
Created attachment 144225 [details]

- stagify
- drop my maintainship
Comment 1 loader 2014-06-28 17:13:42 UTC
Comment on attachment 144225 [details]

Ooops, wrong patch
Comment 2 loader 2014-06-28 17:14:25 UTC
Created attachment 144226 [details]
Comment 3 Raphael Kubo da Costa freebsd_committer 2014-06-28 20:49:53 UTC
Thanks for the patch. I get some errors with it on Poudriere, though:

====>> Checking for filesystem violations... done
====>> Error: Filesystem touched during build:
        size (1528, 1592)
        size (442, 456)
        size (1647, 1716)
extra: var/log/userlog
extra: var/mail/interch
Comment 4 loader 2014-06-29 05:43:14 UTC
work/interchange-5.6.1/Makefile.PL runs getpwnam() to get the interch uid during make configure, it just hangs in the loop when interch user doesn't exist.
Comment 5 Raphael Kubo da Costa freebsd_committer 2014-06-29 11:18:10 UTC
Looking at the debian/ directory in upstream's tarball, it looks like you can make Makefile.PL skip the prompt if you pass INTERCHANGE_USER to it (possibly passing force=1 as well).

This, together with http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/users-and-groups.html, should allow you to get rid of the current calls to pw in pkg-install.
Comment 6 loader 2014-06-30 13:47:02 UTC
Created attachment 144289 [details]
new patch

okay, here's the new patch
Comment 7 Raphael Kubo da Costa freebsd_committer 2014-07-06 20:04:34 UTC
There's still a lot of room for improvement.

I'll commit my version based on your patch; among other things, it gets rid of pkg-{deinstall,install} altogether.
Comment 8 commit-hook freebsd_committer 2014-07-06 20:10:53 UTC
A commit references this bug:

Author: rakuco
Date: Sun Jul  6 20:10:13 UTC 2014
New revision: 361002
URL: http://svnweb.freebsd.org/changeset/ports/361002

  - Reset maintainership to ports@.
  - Support staging.
  - Modernise the Makefile:
    * Switch from USE_BZIP2=yes to USES=tar:bzip2
    * Use <OPTION>_RUN_DEPENDS instead of including bsd.port.options.mk and
      doing checks ourselves.
    * Drop the pkg-deinstall and pkg-install scripts. Instead, just rely on
      the ports infrastructure with GROUPS/USERS to create the "interch"
      group/user and use the plist to create /var/run/interchange and change
      the ownership in %D/interchange.
  - Add some missing entries to the plist.

  Based on a patch sent by the former maintainer.

  PR:		191464
  Submitted by:	loader@freebsdmall.com (based on)

Comment 9 Raphael Kubo da Costa freebsd_committer 2014-07-06 20:12:20 UTC
Landed, thanks for maintaining this port.
Comment 10 loader 2014-07-07 05:43:48 UTC
Thanks for improvements.

It might need a small change to the Perl scrtips
installed in /usr/local/bin/, like compile_link,
it needs to use the directory /usr/local/interchange/
instead of /usr/local/ in "use lib" and $::Self hash.

Adding INSTALLARCHLIB="${PREFIX}/interchange/"
to CONFIGURE_ARGS in www/interchange/Makefile
will be overridden by the do-configure: target
in Mk/Users/perl5.mk, it just appends another
INSTALLARCHLIB="${PREFIX}/lib", so I copied
do-configure: to www/interchange/Makefile
in the previous patch.
Comment 11 Raphael Kubo da Costa freebsd_committer 2014-07-08 09:45:22 UTC
Thanks for noticing! I think I've fixed it in https://svnweb.freebsd.org/ports?view=revision&revision=361207, please take a look.
Comment 12 loader 2014-07-09 14:41:17 UTC
looks great. thanks.