Some directories were not removed on rpm -e due no declaration on %files
section. Also, the directory was being created in runtime. Now, it is
being created on rpm build.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
contrib/kimchi.spec.fedora.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index c1929f8..99dc153 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -83,6 +83,11 @@ rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%if 0%{?with_systemd}
+
+# create directory
+mkdir -p %{buildroot}/var/lib/kimchi/{isos,vnc-tokens}
+
+
# Install the systemd scripts
install -Dm 0644 contrib/kimchid.service.fedora %{buildroot}%{_unitdir}/kimchid.service
install -Dm 0640 src/firewalld.xml
%{buildroot}%{_prefix}/lib/firewalld/services/kimchid.xml
@@ -148,7 +153,6 @@ exit 0
# Rollback SELinux rules
semanage permissive -d httpd_t
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -162,6 +166,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/kimchi/xmlutils/*.py*
%{python_sitelib}/kimchi/API.json
%{python_sitelib}/kimchi/plugins/*.py*
+%{python_sitelib}/kimchi/
%{_datadir}/kimchi/doc/API.md
%{_datadir}/kimchi/doc/README.md
%{_datadir}/kimchi/doc/README-federation.md
@@ -170,6 +175,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
%{_datadir}/kimchi/config/ui/*.xml
%{_datadir}/kimchi/ui/
+%{_datadir}/kimchi
%{_sysconfdir}/kimchi/kimchi.conf
%{_sysconfdir}/kimchi/nginx.conf.in
%{_sysconfdir}/kimchi/distros.d/debian.json
@@ -177,6 +183,8 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/kimchi/distros.d/opensuse.json
%{_sysconfdir}/kimchi/distros.d/ubuntu.json
%{_sysconfdir}/kimchi/distros.d/gentoo.json
+%{_sysconfdir}/kimchi/
+%{_sharedstatedir}/kimchi/*
%if 0%{?with_systemd}
%{_unitdir}/kimchid.service
--
1.8.3.1