[MacPorts] #48302: tomcat8 @ 8.0.24 looking for review/feedback/help
#48302: tomcat8 @ 8.0.24 looking for review/feedback/help ------------------------+-------------------------------- Reporter: raupach@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: ------------------------+-------------------------------- MacPorts is missing a current Apache Tomcat 8 port. Unlike tomcat5 and tomcat6 this does not build tomcat. It downloads and extracts a binary from one of the Apache mirror sites. I am totally new to creating ports files. This is my first attempt and it would be nice if someone is willing to help/work with me on this port. I do have experiences with running Apache Tomcat on *nix servers. This port is plain and simple it just downloads, extracts and copies files to ${prefix}/share/java. You can start and stop tomcat via the provided scripts in /bin. This is probably not how a server should act. * Should I create a custom system account and group e.g. tomcat:tomcat? * Start and stop via launched? * How should I deal with updates? Lets say I change my server.xml and the port updates? Is it possible to keep files around? -- Ticket URL: <https://trac.macports.org/ticket/48302> MacPorts <https://www.macports.org/> Ports system for OS X
#48302: tomcat8 @ 8.0.24 looking for review/feedback/help -------------------------+-------------------------------- Reporter: raupach@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | -------------------------+-------------------------------- Comment (by cal@…): - `openmaintainer` is meaningless without a real maintainer associated with it. So either add yourself in the `domain.tld:localpart` obfuscated format, or just use `nomaintainer`. - We prefer `sha256` and `rmd160` checksums nowadays. If you delete the checksums line and run `port -v checksum`, the correct line will be printed. - You're mixing tabs and spaces in the `depends_lib` line - MacPorts has a `delete` command that wraps `file delete` that you could use instead of `file delete` in the pre-destroot block. I think it doesn't make a difference in this case, but it's still shorter. - If you're overriding the destroot phase anyway, there's little point in splitting out parts of it into pre- or post-destroot. - don't set `destroot.keepdirs` in a phase; do it at the top level of the Portfile - If you want, you can create a custom account for tomcat using the `add_users` directive. You could also use OS X' builtin `_www` user. - Please provide a launchd control interface so `port load tomcat8` will start and `port unload tomcat8` will stop the server. Search other Portfiles for `startupitem` to see how it's done -- if you need help, please feel free to ask here or on -dev. - If your port installs configuration files that should stay around after a user uninstalls the port and should not be overwritten by updates, move the configuration file by appending ".sample" and add a note (`notes your- text-here`) to tell the user that he needs to configure tomcat by creating the file before starting it. -- Ticket URL: <https://trac.macports.org/ticket/48302#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#48302: tomcat8 @ 8.0.24 looking for review/feedback/help -------------------------+-------------------------------- Reporter: raupach@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | -------------------------+-------------------------------- Comment (by raupach@…): I am still working on the custom account for Tomcat and moving files so that they don't get replaced upon an upgrade. Here are the [https://tomcat.apache.org/tomcat-8.0-doc/security-howto.html security considerations] from Apache Tomcat Team. I used to run it like this in production unless the distro provided a custom Tomcat installation. So it probably makes sense to set this port up like the developers recommend. Starting and stopping works now via the startupitem. It is not perfect yet. I am still missing a PID file but that should be easy once I figure out how to deal with {{{ /files }}} in a port. -- Ticket URL: <https://trac.macports.org/ticket/48302#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#48302: tomcat8 @ 8.0.24 looking for review/feedback/help -------------------------+-------------------------------- Reporter: raupach@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | -------------------------+-------------------------------- Comment (by raupach@…): Apache Tomcat does not distribute {{{ setenv.sh }}}. I created a custom one and made sure it is not overridden on updates. We need this file to tell Tomcat to create a PID file. However there is the {{{ conf }}} directory. Basically all the files in that directory can and will be edited during Tomcat installation. Should I copy them and make .default or .sample files? Still figuring out how to deal with custom accounts and setting permissions. -- Ticket URL: <https://trac.macports.org/ticket/48302#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts