diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-03-10 08:10:12 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-03-10 08:10:12 +0100 |
commit | 15c75a059f42804078db639c532eb908b8fea038 (patch) | |
tree | 4e0f4aea32ec3ab8440af101a66a4159e0e9a7b1 | |
parent | 98d23e77893cc1885e8b81fc5d3844420360a9d1 (diff) | |
download | fake_ilo-15c75a059f42804078db639c532eb908b8fea038.tar.gz |
spec: setup cert
-rw-r--r-- | fake_ilo.spec | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/fake_ilo.spec b/fake_ilo.spec index 24ca631..61ad8d5 100644 --- a/fake_ilo.spec +++ b/fake_ilo.spec @@ -5,7 +5,9 @@ Release: 1%{?dist} Summary: iLO emulator which can power cycle libvirt VMs Group: FIXME Source: %{name}-%{version}.tar.gz -Requires: pythom + +Requires: python +Requires: openssl %description FIXME @@ -16,12 +18,25 @@ FIXME %build %install -mkdir -p %{buildroot}{/usr/bin,/etc/init.d} +mkdir -p %{buildroot}{/usr/bin,/etc/init.d,/etc/fake_ilo} make DESTDIR=%{buildroot} install rm -rf %{buildroot}/etc/init.d %files %doc LICENSE +%dir /etc/fake_ilo +%ghost /etc/fake_ilo/server.key +%ghost /etc/fake_ilo/server.crt %{_bindir}/ilo.py +%post +if test -f "/etc/fake_ilo"; then + exit 0 +fi +subject="/C=unknown/ST=unknown/L=unknown/O=libvirt/CN=$(hostname -f)" +openssl req -x509 -newkey rsa:2048 \ + -keyout /etc/fake_ilo/server.key \ + -out /etc/fake_ilo/server.crt \ + -nodes -days 9999 -subj "$subject" + %changelog |