[Kimchi-devel] [PATCH 1/2] Remove empty directories after rpm -e kimchi on fedora
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Wed Dec 10 13:19:22 UTC 2014
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 at linux.vnet.ibm.com>
---
contrib/kimchi.spec.fedora.in | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index c1929f8..37794e3 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -83,6 +83,16 @@ rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%if 0%{?with_systemd}
+
+# create /var/lib/kimchi structure
+mkdir -p %{buildroot}/var/lib/kimchi/{debugreports,screenshots,vnc-tokens,isos}
+touch %{buildroot}/var/lib/kimchi/objectstore
+
+# create /var/log/kimchi structure
+mkdir -p %{buildroot}/var/log/kimchi/
+touch %{buildroot}/var/log/kimchi/kimchi-access.log
+touch %{buildroot}/var/log/kimchi/kimchi-error.log
+
# 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 +158,6 @@ exit 0
# Rollback SELinux rules
semanage permissive -d httpd_t
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -162,6 +171,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 +180,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 +188,14 @@ 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/debugreports/
+%{_sharedstatedir}/kimchi/screenshots/
+%{_sharedstatedir}/kimchi/vnc-tokens/
+%{_sharedstatedir}/kimchi/isos/
+%{_sharedstatedir}/kimchi/
+%{_localstatedir}/log/kimchi/*
+%{_localstatedir}/log/kimchi/
%if 0%{?with_systemd}
%{_unitdir}/kimchid.service
--
1.8.3.1
More information about the Kimchi-devel
mailing list