Bug 122269

Summary: mail/fetchmail install as non-root user with SU_CMD fails
Product: Ports & Packages Reporter: Stefan Sperling <stsp>
Component: Individual Port(s)Assignee: Simon Barner <barner>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Stefan Sperling 2008-03-30 20:50:05 UTC
When installing the mail/fetchmail port as a non-root user
with SU_CMD, the install fails because the port Makefile
executes the pkg-install script which needs root privileges
to succeed as a non-root user.

Fix: The port should acquire root privileges before executing
the pkg-install script. The patch below fixes the issue for me.
How-To-Repeat: Set SU_CMD in /etc/make.conf, for example:

	SU_CMD=/usr/bin/su root -c

Try to install fetchmail.

This will happen:

===>  Installing for fetchmail-6.3.8_4
===>   fetchmail-6.3.8_4 depends on file: /usr/local/share/certs/ca-root-nss.crt - found
===>   fetchmail-6.3.8_4 depends on shared library: intl - found
fetchmail:*:124:
You already have a group "fetchmail", so I will use it.
fetchmail:*:124:124::0:0:Fetchmail mail-retrieval daemon:/var/run/fetchmail:/usr
/sbin/nologin
You already have a user "fetchmail", so I will use it.
install: mkdir /var/run/fetchmail: Permission denied
*** Error code 71

Stop in /usr/ports/mail/fetchmail.
*** Error code 1

Stop in /usr/ports/mail/fetchmail.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-30 20:50:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->barner

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2008-04-06 10:08:37 UTC
barner      2008-04-06 09:08:28 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
  Log:
  - Fix installation as non-root user
  
  Submitted by:   Stefan Sperling
  PR:             ports/122269
  
  Revision  Changes    Path
  1.192     +1 -1      ports/mail/fetchmail/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"
Comment 3 Simon Barner freebsd_committer freebsd_triage 2008-04-06 10:08:59 UTC
State Changed
From-To: open->closed

Committed. Thanks!