Bug 191464

Summary: [patch] www/interchange stagify
Product: Ports & Packages Reporter: loader
Component: Individual Port(s)Assignee: freebsd-ports-bugs mailing list <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: rakuco
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
stagify
none
stagify
none
new patch none

Description loader 2014-06-28 17:08:08 UTC
Created attachment 144225 [details]
stagify

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

Ooops, wrong patch
Comment 2 loader 2014-06-28 17:14:25 UTC
Created attachment 144226 [details]
stagify
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:
etc/passwd:
        size (1528, 1592)
etc/group:
        size (442, 456)
etc/master.passwd:
        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

Log:
  - 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)

Changes:
  head/www/interchange/Makefile
  head/www/interchange/files/patch-Makefile.PL
  head/www/interchange/pkg-deinstall
  head/www/interchange/pkg-install
  head/www/interchange/pkg-plist
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.