Closed gkoh closed 7 months ago
The SmartOS pkgsrc repository dropped caddy for some reason, so I've opted to add it to the OmniOS extra IPS instead.
Thank you very much for your contribution. This looks good so far. However, since this is a service we should provide an SMF service manifest. Have a look at other stuff in omnios-extra that provides a service manifest.
Let me know if you get stuck or have questions and we can help getting this done and integrated.
Done! Thank you for the initial review.
I selected a random available uid/gid from doc/idlist.md
, this could well reuse webservd
though.
Done! Thank you for the initial review. I selected a random available uid/gid from
doc/idlist.md
, this could well reusewebservd
though.Yeah, I think re-using
webservd
would be a good idea (like we do for apache). Given we are limited to IDs below 100 for service accounts we should not allocate new ones if not necessary.
I have made this change locally, but not sure how to proceed. If I add the webservd uid/gid in the caddy pkg, it results in conflicts with the apache pkg. If I don't add the webservd uid/gid, then it requires apache to be installed just to have the uid/gid present.
Can you recommend a way forward? (I couldn't find a way to optionally create a user).
Can you recommend a way forward? (I couldn't find a way to optionally create a user).
So the way forward is to create a meta package that will ship the user/group, then make apache and caddy depend on it. We do this already for nginx
as we ship multiple versions there. We'd have to do this anyway for webservd
once we ship another apache version.
I quickly prepared a commit (untested) that should show you the principle. Feel free to copy whatever you need from it: https://github.com/hadfl/omnios-extra/commit/544e1ba5d44d9365b88cbe049424843d3cea37fd
Can you recommend a way forward? (I couldn't find a way to optionally create a user).
So the way forward is to create a meta package that will ship the user/group, then make apache and caddy depend on it. We do this already for
nginx
as we ship multiple versions there. We'd have to do this anyway forwebservd
once we ship another apache version.I quickly prepared a commit (untested) that should show you the principle. Feel free to copy whatever you need from it: hadfl@544e1ba
Aha, thank you for that. I have updated, but it is untested.
How does one build this meta package for testing?
How does one build this meta package for testing?
You can use buildctl
in the build
directory to build any package (including meta packages). In this case: ./buildctl build webservd-common
How does one build this meta package for testing?
You can use
buildctl
in thebuild
directory to build any package (including meta packages). In this case:./buildctl build webservd-common
Perfect, thanks. Done and tested, confirmed working as expected.
Add v2.7.6 of the Caddy web server.
Add patch to fix Solaris-derivative build. Comes from caddy master:76611fa15079b755ddf3c859ae2ea0ad2123223f and this PR 6021: https://github.com/caddyserver/caddy/pull/6021