3 # We can run on Rhel 3'ish systems, but only if python2.3 is installed
5 %define __python_ver
2.3
7 %define python python
%{?__python_ver}
8 %define __python
/usr
/bin
/%{python}
11 %{!?python_version: %define python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")}
12 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
14 %define is_suse %
(test -e
/etc
/SuSE
-release
&& echo 1 ||
echo 0)
17 Summary: Remote certificate distribution framework
21 Source0: %{name}-%{version}.tar.gz
23 Group: Applications
/System
24 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
26 Url
: https
://fedorahosted.org
/certmaster
30 Requires: pyOpenSSL
-py23
32 Requires: python
>= 2.3
37 BuildRequires
: %{python}-devel
39 BuildRequires
: gettext
-devel
42 BuildRequires
: python
-setuptools
-devel
45 BuildRequires
: python
-setuptools
54 certmaster is a easy mechanism
for distributing SSL certificates
60 %{__python} setup.py build
63 test "x$RPM_BUILD_ROOT"
!= "x"
&& rm -rf $RPM_BUILD_ROOT
64 %{__python} setup.py
install --prefix
=/usr
--root
=$RPM_BUILD_ROOT
65 ln
-s
%{_bindir}/certmaster
-sync $RPM_BUILD_ROOT
/var
/lib
/certmaster
/triggers
/sign
/post
/certmaster
-sync
66 ln
-s
%{_bindir}/certmaster
-sync $RPM_BUILD_ROOT
/var
/lib
/certmaster
/triggers
/remove
/post
/certmaster
-sync
67 touch $RPM_BUILD_ROOT
/var
/log
/certmaster
/certmaster.log
68 touch $RPM_BUILD_ROOT
/var
/log
/certmaster
/audit.log
72 rm -fr $RPM_BUILD_ROOT
75 %defattr(-, root
, root
, -)
76 %if "
%{python_version}"
>= "
2.5"
77 %{python_sitelib}/certmaster
*.egg
-info
80 %{_bindir}/certmaster
-request
81 %{_bindir}/certmaster
-ca
82 %{_bindir}/certmaster
-sync
83 /etc
/init.d
/certmaster
84 %dir %{_sysconfdir}/%{name}
85 %dir %{_sysconfdir}/%{name}/minion
-acl.d
/
86 %dir %{_sysconfdir}/pki/%{name}
87 %config(noreplace
) /etc
/certmaster
/minion.conf
88 %config(noreplace
) /etc
/certmaster
/certmaster.conf
89 %config(noreplace
) /etc
/logrotate.d
/certmaster_rotate
90 %dir %{python_sitelib}/certmaster
91 %{python_sitelib}/certmaster
/*.py
*
93 %dir /var
/log
/certmaster
94 %attr(0600,root
,root
) %config(noreplace
) %verify(not md5 size mtime
) /var
/log
/certmaster
/certmaster.log
95 %attr(0600,root
,root
) %config(noreplace
) %verify(not md5 size mtime
) /var
/log
/certmaster
/audit.log
97 %attr(600,root
,root
) %dir /var
/lib
/certmaster
98 %attr(600,root
,root
) %dir /var
/lib
/certmaster
/certmaster
99 %attr(600,root
,root
) %dir /var
/lib
/certmaster
/certmaster
/certs
100 %attr(600,root
,root
) %dir /var
/lib
/certmaster
/certmaster
/csrs
101 %dir /var
/lib
/certmaster
/peers
102 %dir /var
/lib
/certmaster
/triggers
/sign
/
103 %dir /var
/lib
/certmaster
/triggers
/sign
/pre
104 %dir /var
/lib
/certmaster
/triggers
/sign
/post
105 %dir /var
/lib
/certmaster
/triggers
/request
/
106 %dir /var
/lib
/certmaster
/triggers
/request
/pre
107 %dir /var
/lib
/certmaster
/triggers
/request
/post
108 %dir /var
/lib
/certmaster
/triggers
/remove
/
109 %dir /var
/lib
/certmaster
/triggers
/remove
/pre
110 %dir /var
/lib
/certmaster
/triggers
/remove
/post
111 /var
/lib
/certmaster
/triggers
/sign
/post
/certmaster
-sync
112 /var
/lib
/certmaster
/triggers
/remove
/post
/certmaster
-sync
113 %doc AUTHORS README LICENSE
114 %{_mandir}/man1
/*.1.gz
119 if [ -x
/usr
/lib
/lsb
/install_initd
]; then
120 /usr
/lib
/lsb
/install_initd
/etc
/init.d
/certmaster
121 # for red hat distros
122 elif [ -x
/sbin
/chkconfig
]; then
123 /sbin
/chkconfig
--add certmaster
124 # or, the old fashioned way
127 ln
-sf
/etc
/init.d
/certmaster
/etc
/rc.d
/rc$
{i
}.d
/S99certmaster
130 ln
-sf
/etc
/init.d
/certmaster
/etc
/rc.d
/rc$
{i
}.d
/k01certmaster
134 # fix perms on log files
135 chmod
600 /var
/log
/certmaster
/certmaster.log
136 chmod
600 /var
/log
/certmaster
/audit.log
139 if [ "$
1"
= 0 ] ; then
140 /etc
/init.d
/certmaster stop
> /dev
/null
2>&1
141 if [ -x
/usr
/lib
/lsb
/remove_initd
]; then
142 /usr
/lib
/lsb
/remove_initd
/etc
/init.d
/certmaster
143 elif [ -x
/sbin
/chkconfig
]; then
144 /sbin
/chkconfig
--del certmaster
146 rm -f
/etc
/rc.d
/rc?.d
/???certmaster
152 * Tue May
26 2009 Adrian Likins
<alikins@redhat.com
> - 0.25-1
153 - add
/var
/lib
/certmaster
/certmaster
* to spec and
set perms
154 - add
/var
/log
/certmaster
/certmaster.log
,audit.log to spec
157 * Wed Feb
18 2009 Adrian Likins
<alikins@redhat.com
> - 0.24.5
158 - remove version file
160 * Mon Jan
19 2009 Adrian Likins
<alikins@redhat.com
> - 0.24.4
161 - make inclusion of egginfo dependant on having python
>= 2.5
162 - remove need
for patch on rhel3
+python2.4 cases
(distutils should
163 do all the
/usr
/bin
/python renaming now
)
164 - minor reformatting changes
166 * Tue Jan
06 2009 Greg Swift
<gregswift@gmail.com
> - 0.24-3x1
167 - Fixed spec because it was only building
in rhel3
169 * Wed Dec
31 2008 Greg Swift
<gregswift@gmail.com
> - 0.24-2
170 - Patched SPEC to build on rhel3 with python2.3
171 - Added
Patch0 to handle python2.3
if on rhel3
173 * Mon Dec
12 2008 Adrian Likins
<alikins@redhat.com
> - 0.24-1
174 - add missing
dirs as per bz
#473633
176 * Mon Jun
6 2008 Adrian Likins
<alikins@redhat.com
> - 0.20-2
177 - fix fedora bug
#441283 - typo in postinstall scriptlet
178 (the init.d symlinks
for runlevels
1 and
6 were created wrong
)
180 * Tue Apr
15 2008 Michael DeHaan
<mdehaan@redhat.com
> - 0.20-1
182 - fix changelog versions
184 * Tue Apr
15 2008 Steve Salevan
<ssalevan@redhat.com
> - 0.19-3
185 - added
in trigger directories
187 * Mon Mar
17 2008 Adrian Likins
<alikins@redhat.com
> - 0.19-2
188 - removed unused minion
/ and overlord
/ dirs
190 * Mon Feb
25 2008 Adrian Likins
<alikins@redhat.com
> - 0.19-1
191 - remove certmasterd references
193 * Thu Feb
7 2008 Michael DeHaan
<mdehaan@redhat.com
> - 0.18-1
194 - initial version
, split off from func project
, WIP