From 9e9385541e8b04199eee94b11ec757c19a2a09a0f4e94e83f680dc1c43a582a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= <ismail@i10z.com>
Date: Wed, 1 Jul 2020 10:57:16 +0000
Subject: [PATCH] Accepting request 817920 from home:lnussel:branches:editors

- stop owning /etc/vimrc so the old, distro provided config actually
  gets removed. Leaving it around leads to a duplicated autocmd for
  *.spec, leading to spec file template inserted twice.

OBS-URL: https://build.opensuse.org/request/show/817920
OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=610
---
 vim.changes | 7 +++++++
 vim.spec    | 8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/vim.changes b/vim.changes
index 246e61f..64f3b23 100644
--- a/vim.changes
+++ b/vim.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Tue Jun 30 15:14:06 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
+
+- stop owning /etc/vimrc so the old, distro provided config actually
+  gets removed. Leaving it around leads to a duplicated autocmd for
+  *.spec, leading to spec file template inserted twice.
+
 -------------------------------------------------------------------
 Mon Jun 22 15:59:31 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
 
diff --git a/vim.spec b/vim.spec
index 34aee4d..6ddd001 100644
--- a/vim.spec
+++ b/vim.spec
@@ -331,7 +331,7 @@ ln -s -f %{VIM_SUBDIR} %{buildroot}%{_datadir}/vim/current
 
 # additional files
 install -D -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/vim/current/suse.vimrc
-install -D -m 0644 /dev/null %{buildroot}%{_sysconfdir}/vimrc
+#install -D -m 0644 /dev/null %{buildroot}%{_sysconfdir}/vimrc
 install -D -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/gvimrc
 
 # create site wide runtime directory
@@ -545,7 +545,11 @@ fi
 %{_datadir}/vim/%{VIM_SUBDIR}/tutor/*
 
 %files data-common
-%ghost %config(noreplace) %{_sysconfdir}/vimrc
+# we can't currently own /etc/vimrc. If we keep owning it, an
+# existing, unmodified vimrc would not be removed. That results in a
+# duplicated definition of SKEL_spec().
+# see also https://github.com/rpm-software-management/rpm/issues/1296
+#%ghost %config(noreplace) %{_sysconfdir}/vimrc
 %{_datadir}/vim/current
 %dir %{_datadir}/vim/
 %dir %{_datadir}/vim/%{VIM_SUBDIR}/