1 Summary: letsencrypt/acme client implemented as a shell-script
6 Group: Applications/Networking
7 Source0: https://github.com/dehydrated-io/dehydrated/releases/download/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 0ebe5185b2c9bd721e95f95962dc377d
10 Source2: lighttpd.conf
15 Source7: 01-ca-path.sh
16 Source8: 02-challenge-type.sh
21 Source13: 07-contact.sh
24 Source31: hook.functions
25 Source32: hook.custom_functions
29 URL: https://github.com/dehydrated-io/dehydrated
30 BuildRequires: rpmbuild(macros) >= 1.713
31 Requires: ca-certificates
37 Requires: openssl-tools
41 Requires(postun): /usr/sbin/groupdel
42 Requires(pre): /usr/bin/getgid
43 Requires(pre): /usr/sbin/groupadd
44 Suggests: webserver(access)
45 Suggests: webserver(alias)
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define _webapps /etc/webapps
52 This is a client for signing certificates with an ACME-server
53 (currently only provided by letsencrypt) implemented as a relatively
57 - Signing of a list of domains
59 - Renewal if a certificate is about to expire or SAN (subdomains)
61 - Certificate revocation
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sbindir},{/etc/%{name},%{_webapps}/%{name}}/{conf.d,hooks,hooks.d},/etc/{cron,sudoers}.d} \
70 $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenges,alpn-certs,certs}
72 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
73 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/httpd.conf
74 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{name}/lighttpd.conf
75 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{name}/nginx.conf
76 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/%{name}/domains.txt
77 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}
78 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/%{name}/config
79 cp -p %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} \
80 %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \
81 $RPM_BUILD_ROOT/etc/%{name}/conf.d/
82 install -p %{SOURCE30} $RPM_BUILD_ROOT/etc/%{name}/hooks/hook.sh
83 cp -p %{SOURCE31} $RPM_BUILD_ROOT/etc/%{name}/hooks/functions
84 cp -p %{SOURCE32} $RPM_BUILD_ROOT/etc/%{name}/hooks/custom_functions
85 cp -p %{SOURCE33} $RPM_BUILD_ROOT/etc/%{name}/hooks.d/global
86 cp -p %{SOURCE34} $RPM_BUILD_ROOT/etc/sudoers.d/%{name}
89 %groupadd -g 184 dehydrated
92 if [ "$1" = "0" ]; then
93 %groupremove dehydrated
97 rm -rf $RPM_BUILD_ROOT
99 %triggerin -- apache < 2.2.0, apache-base
100 %webapp_register httpd %{name}
102 %triggerun -- apache < 2.2.0, apache-base
103 %webapp_unregister httpd %{name}
105 %triggerin -- lighttpd
106 %webapp_register lighttpd %{name}
108 %triggerun -- lighttpd
109 %webapp_unregister lighttpd %{name}
112 %webapp_register nginx %{name}
115 %webapp_unregister nginx %{name}
118 %defattr(644,root,root,755)
119 %doc README.md CHANGELOG LICENSE docs/*.md docs/examples/config
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
121 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sudoers.d/%{name}
122 %dir %attr(750,root,http) %{_webapps}/%{name}
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/httpd.conf
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/lighttpd.conf
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/nginx.conf
126 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/config
127 %dir %attr(755,root,root) /etc/%{name}
128 %dir %attr(755,root,root) /etc/%{name}/conf.d
129 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/conf.d/*.sh
130 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/domains.txt
131 %dir %attr(755,root,root) /etc/%{name}/hooks
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/custom_functions
133 %attr(640,root,root) /etc/%{name}/hooks/functions
134 %attr(750,root,root) /etc/%{name}/hooks/hook.sh
135 %dir %attr(755,root,root) /etc/%{name}/hooks.d
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks.d/global
137 %attr(755,root,root) %{_sbindir}/%{name}
138 %dir %attr(751,root,root) /var/lib/%{name}
139 %dir %attr(700,root,root) /var/lib/%{name}/accounts
140 %dir %attr(750,root,dehydrated) /var/lib/%{name}/alpn-certs
141 %dir %attr(750,root,dehydrated) /var/lib/%{name}/certs
142 # challenges are written here, need to be readable by webserver
143 %dir %attr(751,root,dehydrated) /var/lib/%{name}/acme-challenges