Bug 163715 - Empty install variables in mail/p5-Mail-SpamAssassin/pkg-install
Summary: Empty install variables in mail/p5-Mail-SpamAssassin/pkg-install
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 14:00 UTC by Alexey Markov
Modified: 2012-01-01 20:50 UTC (History)
0 users

See Also:


Attachments
pr_163715_mail_p5-Mail-SpamAssassin.txt (12.43 KB, text/plain)
2011-12-30 18:04 UTC, Michael Scheidell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Markov 2011-12-30 14:00:40 UTC
In revision 1.12 of mail/p5-Mail-SpamAssassin/pkg-install direct call of 'install' utility was changed to call of ${INSTALL} variable:

${INSTALL} -d -o ${USER} -g ${GROUP} /var/run/spamd
${PREFIX}/bin/spamassassin -x -L --lint

Now on 'make install' I get following error:

===> Creating users and/or groups.
Using existing group 'spamd'.
Using existing user 'spamd'.
-d: not found
./+INSTALL: /bin/spamassassin: not found

It seems that ${INSTALL} and ${PREFIX} variables are empty in the moment of pkg-install script execution.

As a result of it the /var/run/spamd directory is not created in process of port installation, and spamd daemon cannot start because of missed directory.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-30 14:00:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

perl@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-30 14:01:00 UTC
Maintainer of mail/p5-Mail-SpamAssassin,

Please note that PR ports/163715 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/163715

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-30 14:01:04 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Michael Scheidell freebsd_committer freebsd_triage 2011-12-30 14:10:41 UTC
Responsible Changed
From-To: perl->scheidell

From perl..
Comment 5 Michael Scheidell freebsd_committer freebsd_triage 2011-12-30 15:07:00 UTC
On 12/30/11 9:01 AM, Edwin Groothuis wrote:
> Maintainer of mail/p5-Mail-SpamAssassin,
>
> Please note that PR ports/163715 has just been submitted.
>
> The full text of the PR can be found at:
>      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/163715
>
Trying to track this down.

EXACTLY how did you do this?

cd ../mail/p5-Mail-SpamAssassin && make install?

were you root?

You are right, SOMETIMES, it seems that ${INSTALL} isn't being passed, 
and I am trying to track it down, but can't duplicate it.

are you running make install from a shell script?

or was this 'pkg_install'? portinstall? port using one of the ports tools?

can you try this patch and send results to bug-followup?

Index: pkg-install
===================================================================
RCS file: /home/pcvs/ports/mail/p5-Mail-SpamAssassin/pkg-install,v
retrieving revision 1.12
diff -u -u -r1.12 pkg-install
--- pkg-install    28 Nov 2011 16:35:43 -0000    1.12
+++ pkg-install    30 Dec 2011 15:05:55 -0000
@@ -1,5 +1,9 @@
  #!/bin/sh

+echo $*
+echo 'pkg-install'
+echo "INSTALL:${INSTALL}, U:${USER}, G:${GROUP}"
+
  if [ "$2" = "POST-INSTALL" ];then
  ask() {
          local question default answer

-- 
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
 >*| *SECNAP Network Security Corporation

    * Best Mobile Solutions Product of 2011
    * Best Intrusion Prevention Product
    * Hot Company Finalist 2011
    * Best Email Security Product
    * Certified SNORT Integrator
Comment 6 Michael Scheidell freebsd_committer freebsd_triage 2011-12-30 18:04:58 UTC
Can you try this patch?
(minor issue not involved in your issue: manpages moved to files/*)
so, make sure files/manpages is created by patch
Also, make sure pkg-install is deleted, and new file files/pkg-install.in is created.
(use 'patch -EuI -i pr_163715_mail_p5-Mail-SpamAssassin.txt'  ) attached patch.

Could not reproduce your problem with 'make install', but could with 'pkg_add'.
pkg_add for some reason does not set env variables.


-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
(561) 999-5000 scheidell@secnap.net
http://www.secnap.com/

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com/
______________________________________________________________________  
  
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-12-31 14:17:12 UTC
scheidell    2011-12-31 14:17:03 UTC

  FreeBSD ports repository

  Modified files:
    mail/p5-Mail-SpamAssassin Makefile 
  Added files:
    mail/p5-Mail-SpamAssassin/files manpages pkg-install.in 
  Removed files:
    mail/p5-Mail-SpamAssassin pkg-install 
  Log:
  - Built packages were not passing  INSTALL var [1]
  - moved pkg-install to files/pkg-install.in to fix [1]
  - General cleanup:
  - Move MAN* to files/manpages
  - pre-install is/was not su.  DATADIR was not made if you were not root
  - removed pkginstall from pre-su-install (not needed, was a no-op anyway
  - use my freebsd name as maintainer for auto GNATS assignments.
  
  PR:             ports/163715 [1]
  Submitted by:   Alexey Markov <redrat@mail.ru> [1]
  Approved by:    gabor (mentor)
  
  Revision  Changes    Path
  1.145     +7 -75     ports/mail/p5-Mail-SpamAssassin/Makefile
  1.1       +71 -0     ports/mail/p5-Mail-SpamAssassin/files/manpages (new)
  1.1       +77 -0     ports/mail/p5-Mail-SpamAssassin/files/pkg-install.in (new)
  1.13      +0 -62     ports/mail/p5-Mail-SpamAssassin/pkg-install (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 Michael Scheidell freebsd_committer freebsd_triage 2011-12-31 14:37:46 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes to above patch
Comment 9 dfilter service freebsd_committer freebsd_triage 2012-01-01 20:45:32 UTC
scheidell    2012-01-01 20:45:24 UTC

  FreeBSD ports repository

  Modified files:
    mail/p5-Mail-SpamAssassin Makefile 
  Log:
  - Portsbump to make sure pkg builders get fixed pkg-install.in [1]
  
  PR:             ports/163715
  Approved by:    gabor (mentor) [1]
  
  Revision  Changes    Path
  1.146     +1 -1      ports/mail/p5-Mail-SpamAssassin/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"