On 7/10/12 11:36 AM, Joshua Root wrote:
Revision: 95045
           https://trac.macports.org/changeset/95045
Author:   blair at macports.org
Date:     2012-07-04 13:05:23 -0700 (Wed, 04 Jul 2012)
Log Message:
-----------
tomcat6: switch from deprecated adduser to add_users.

Modified Paths:
--------------
     trunk/dports/java/tomcat6/Portfile

Modified: trunk/dports/java/tomcat6/Portfile
===================================================================
--- trunk/dports/java/tomcat6/Portfile  2012-07-04 20:00:33 UTC (rev 95044)
+++ trunk/dports/java/tomcat6/Portfile  2012-07-04 20:05:23 UTC (rev 95045)
@@ -127,7 +127,7 @@
          # Create the tomcat user
          addgroup ${tomcatgroup}
          set gid [existsgroup ${tomcatgroup}]
-        adduser ${tomcatuser} gid=${gid} realname=Web Server
+        add_users ${tomcatuser} gid=${gid} realname=Web Server

          # Install Tomcat
          ui_msg "# installing tomcat..."

This doesn't work right. Setting add_users in the destroot phase means
that the user will not be added for anyone that does not run that phase,
such as when installing from a binary.

Which phase should I have this in?

You should also just put 'group=${tomcatgroup}' in add_users, instead of
calling addgroup directly and then using the gid.

So replace:

        # Create the tomcat user
        addgroup ${tomcatgroup}
        set gid [existsgroup ${tomcatgroup}]
        add_users ${tomcatuser} gid=${gid} realname=Web Server

with
        add_users ${tomcatuser} group=${tomcatgroup} realname=Web Server

Blair

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to