Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612876 - www-servers/caddy doesn't have an init.d file
Summary: www-servers/caddy doesn't have an init.d file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 04:12 UTC by Maurice Volaski
Modified: 2021-04-04 14:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sample caddy init script (caddy,546 bytes, text/plain)
2018-01-11 15:54 UTC, Winston Weinert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice Volaski 2017-03-17 04:12:55 UTC
This references https://packages.gentoo.org/packages/www-servers/caddy

Thanks for bringing the caddy onboard. It's missing the init script.
Comment 1 Maurice Volaski 2017-03-17 04:18:11 UTC
user www-data referenced in the standard init script is not added to /etc/passwd
Comment 2 Ian Moone 2017-07-02 16:23:02 UTC
I made one for my overlay, feel free to copy and/or adapt. Or if the maintainer wish, I can do a PR later.

--> https://github.com/csmk/frabjous/tree/master/www-servers/caddy/files

Cheers!
Comment 3 Winston Weinert 2018-01-11 15:54:08 UTC
Created attachment 514228 [details]
sample caddy init script

Uses a few vars that should be defined in /etc/conf.d/caddy (all vars prefixed with caddy_).
Comment 4 Winston Weinert 2018-01-11 15:57:58 UTC
I had a heck of a time getting caddy working from portage. I wrote my own init script before noticing this ticket & Ian's overlay. I've attached my init script for comparison, however it is very rough around the edges - it's my first openrc script.

I have some other thoughts - should /usr/bin/caddy have capability cap_net_bind_service and run as www-data?

Alternatively, a Caddyfile could be included that drops privileges for you.
Comment 5 Larry the Git Cow gentoo-dev 2021-04-04 14:28:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb2ed95885b68fb63650e7c7b53f26b716bf52b

commit ecb2ed95885b68fb63650e7c7b53f26b716bf52b
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-04-04 11:44:37 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-04-04 14:28:06 +0000

    www-servers/caddy: Revump to 2.3.0-r1 for init script and fcaps
    
    Closes: https://bugs.gentoo.org/612876
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 www-servers/caddy/caddy-2.3.0-r1.ebuild   | 1164 +++++++++++++++++++++++++++++
 www-servers/caddy/files/caddy.service     |   17 +
 www-servers/caddy/files/caddy_config.json |   31 +
 www-servers/caddy/files/confd             |    2 +
 www-servers/caddy/files/initd             |   26 +
 www-servers/caddy/files/logrotated        |    3 +
 6 files changed, 1243 insertions(+)
Comment 6 Zac Medico gentoo-dev 2021-04-04 14:34:33 UTC
We didn't have a www-data user yet. I copied the idea for the "http" user that I found here:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nginx-custom