summaryrefslogtreecommitdiffstats
path: root/template.spec
blob: 85b10dd8ba8126ad70ef02898fb4f593eb04d8d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%define hostname        __HOSTNAME__
%define version         __VERSION__
%define release         __RELEASE__
%define ssldir          __SSLDIR__

Name:           puppet-%{hostname}
Version:        %{version}
Release:        %{release}
Summary:        Puppet SSL certificate files for %{hostname}

Group:          Applications/System
License:        Public Domain
Source0:        puppet-%{hostname}-%{version}.tar.gz
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildArch:      noarch
Requires:       puppet

%description
Puppet SSL Keys for %{hostname}.

%prep
%setup -q


%build
# nothing to build


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{ssldir}/{private,public_keys}
cp -a * %{buildroot}%{ssldir}

# set modes - puppet resets these on each run, so there's no point in trying to
# tighten them up. :/
chmod 0771 %{buildroot}%{ssldir}
chmod 0750 %{buildroot}%{ssldir}/private*
chmod 0600 %{buildroot}%{ssldir}/private_keys/%{hostname}.pem


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%{ssldir}


%changelog
* Thu Nov 20 2008 Todd Zullinger <tmz@pobox.com>
- Initial template for puppet client package