From 8aae7276440c1c4c9f67f64d5ae65e795761d826f1b35d217810013de69d682a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Wed, 23 Nov 2011 14:47:03 +0000 Subject: [PATCH] Accepting request 93315 from home:a_jaeger:branches:openSUSE:Factory Create tmpfiles during new install. OBS-URL: https://build.opensuse.org/request/show/93315 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=71 --- vim.changes | 7 +++++++ vim.spec | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/vim.changes b/vim.changes index afb6955..26a0bd6 100644 --- a/vim.changes +++ b/vim.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 23 13:05:42 UTC 2011 - aj@suse.de + +- Create tmpfiles during install +- Fix tmpfiles handling +- Own directory /var/run/vi.recover + ------------------------------------------------------------------- Tue Nov 22 22:49:39 UTC 2011 - reddwarf@opensuse.org diff --git a/vim.spec b/vim.spec index f7cc35f..9354029 100644 --- a/vim.spec +++ b/vim.spec @@ -37,6 +37,7 @@ BuildRequires: ruby-devel BuildRequires: tcl-devel BuildRequires: update-alternatives BuildRequires: update-desktop-files +BuildRequires: systemd # BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1130 @@ -65,6 +66,7 @@ PreReq: %{vim_prereq} PreReq: fileutils PreReq: sh-utils PreReq: update-alternatives +Requires(post): systemd # Provides: vim_client Provides: vi @@ -456,6 +458,8 @@ mv %{buildroot}%{_mandir}/ru.UTF-8 %{buildroot}%{_mandir}/ru rm -f %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/tools/*.c rm -f %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/macros/maze/*.c # +# Create ghost files (see vim.conf) +mkdir -p %{buildroot}/var/run/vi.recover %if 0%{?suse_version} > 1020 %fdupes -s %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/lang @@ -474,6 +478,8 @@ rm -rf %{buildroot} %post base /usr/sbin/update-alternatives --install \ /bin/vim vim %{_datadir}/vim/current/tools/missing-vim-client 0 +# Create tmpfiles +/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/vim.conf %post enhanced /usr/sbin/update-alternatives --install \ @@ -529,7 +535,8 @@ fi %config(noreplace) %{_sysconfdir}/vimrc %ghost %{_sysconfdir}/alternatives/vim %dir /usr/lib/tmpfiles.d -%config(noreplace) /usr/lib/tmpfiles.d/vim.conf +/usr/lib/tmpfiles.d/vim.conf +%ghost %dir /var/run/vi.recover # symlinks /bin/vi /bin/vim