Bug 128932

Summary: Fixed rc script for mail/dovecot port
Product: Ports & Packages Reporter: Alex Trull <alex>
Component: Individual Port(s)Assignee: Wesley Shields <wxs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Alex Trull 2008-11-17 01:40:01 UTC
rc script from recent port update (ports/128469) won't get a gid, so
won't start up correctly.

Fix: See attached patch - single line changed to be simpler and more direct.

Regards,

Alex Trull
How-To-Repeat: Run the v1.9 rc script with the start option.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-11-17 02:49:41 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports-bugs

Reclassify.
Comment 2 Wesley Shields freebsd_committer freebsd_triage 2008-11-17 18:43:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 3 Yarema 2008-11-21 17:12:28 UTC
I cannot reproduce the issue.

Running the code in question on the command line:
/usr/sbin/pw usershow -n "dovecot" 2>/dev/null | /usr/bin/cut -d: -f4
returns: 143
as expected.  Running the suggested fix does the same.  However "pw 
usershow" makes more sense to me because we're going for the group of 
the user specified with "login_user" and not for the group with the same 
name as the user specified with "login_user".  The two are not 
necessarily the same so this patch could introduce a subtle bug.

I suspect there may be some sort of corruption in the PR submitter's 
passwd db.  Make sure the "dovecot" user is created correctly.  And if 
using a different "login_user" make sure the passwd and group records 
are sensible.  This has been well tested before commiting to the port by 
myself and Nicolas Letellier <nicolas@nicoelro.net>, who initially 
brought this to my attention.

-- 
Yarema
Comment 4 Wesley Shields freebsd_committer freebsd_triage 2008-11-21 17:25:07 UTC
On Fri, Nov 21, 2008 at 12:12:28PM -0500, Yarema wrote:
> I cannot reproduce the issue.
> 
> Running the code in question on the command line:
> /usr/sbin/pw usershow -n "dovecot" 2>/dev/null | /usr/bin/cut -d: -f4
> returns: 143
> as expected.  Running the suggested fix does the same.  However "pw 
> usershow" makes more sense to me because we're going for the group of 
> the user specified with "login_user" and not for the group with the same 
> name as the user specified with "login_user".  The two are not 
> necessarily the same so this patch could introduce a subtle bug.

This was my assessment of the situation also.  Thanks for the
confirmation.

> I suspect there may be some sort of corruption in the PR submitter's 
> passwd db.  Make sure the "dovecot" user is created correctly.  And if 
> using a different "login_user" make sure the passwd and group records 
> are sensible.  This has been well tested before commiting to the port by 
> myself and Nicolas Letellier <nicolas@nicoelro.net>, who initially 
> brought this to my attention.

I agree with your suspicion.  I'll close out this PR and thanks for your
work on this port.

-- WXS
Comment 5 Wesley Shields freebsd_committer freebsd_triage 2008-11-21 17:41:42 UTC
State Changed
From-To: open->closed

Patch rejected by maintainer.  This may introduce a bug and is likely a 
symptom of a local problem.