From 23a8e7818868b37fda68e3dd533b343b20777495b303de0d192d523a79520509 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 12 Jul 2018 07:27:34 +0000 Subject: [PATCH] Accepting request 621929 from home:jbohac:branches:Base:System - grub2.spec: change %config to %config(noreplace) Don't overwrite user changes to config files on upgrades. According to the openSUSE:Specfile guidelines, %config(noreplace) is preferred unless plain %config is necessarry: "As a rule of thumb, use %config(noreplace) instead of plain %config unless your best, educated guess is that doing so will break things." and "Whenever plain %config is used, add a brief comment to the specfile explaining why." Since there is no explanation why these files should not be %config(noreplace), I suppose it's just an ommission. A user modifying these file should not have his changes overwritten on upgrade. OBS-URL: https://build.opensuse.org/request/show/621929 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=306 --- grub2.changes | 6 ++++++ grub2.spec | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/grub2.changes b/grub2.changes index 70071e3..e9a4233 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 10 15:57:50 UTC 2018 - jbohac@suse.cz + +- grub2.spec: change %config to %config(noreplace) + Don't overwrite user changes to config files on upgrades. + ------------------------------------------------------------------- Wed Jul 4 12:55:30 UTC 2018 - josef.moellers@suse.com diff --git a/grub2.spec b/grub2.spec index 78a7ee9..6f516c8 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1032,13 +1032,13 @@ fi %config(noreplace) %{_sysconfdir}/default/grub %dir %{_sysconfdir}/grub.d %{_sysconfdir}/grub.d/README -%config %{_sysconfdir}/grub.d/00_header -%config %{_sysconfdir}/grub.d/10_linux -%config %{_sysconfdir}/grub.d/20_linux_xen +%config(noreplace) %{_sysconfdir}/grub.d/00_header +%config(noreplace) %{_sysconfdir}/grub.d/10_linux +%config(noreplace) %{_sysconfdir}/grub.d/20_linux_xen %config(noreplace) %{_sysconfdir}/grub.d/40_custom -%config %{_sysconfdir}/grub.d/41_custom -%config %{_sysconfdir}/grub.d/90_persistent -%config %{_sysconfdir}/grub.d/95_textmode +%config(noreplace) %{_sysconfdir}/grub.d/41_custom +%config(noreplace) %{_sysconfdir}/grub.d/90_persistent +%config(noreplace) %{_sysconfdir}/grub.d/95_textmode %{_sbindir}/%{name}-install %{_sbindir}/%{name}-mkconfig %{_sbindir}/%{name}-once @@ -1100,7 +1100,7 @@ fi %{_mandir}/man1/%{name}-emu.1.* %endif %ifnarch s390x -%config %{_sysconfdir}/grub.d/30_os-prober +%config(noreplace) %{_sysconfdir}/grub.d/30_os-prober %{_bindir}/%{name}-glue-efi %{_bindir}/%{name}-mount %{_sbindir}/%{name}-bios-setup @@ -1124,11 +1124,11 @@ fi %files %{grubarch} %defattr(-,root,root,-) %ifarch %{ix86} x86_64 -%config %{_sysconfdir}/grub.d/20_memtest86+ +%config(noreplace) %{_sysconfdir}/grub.d/20_memtest86+ %endif %dir %{_libdir}/%{name}/%{grubarch} %ifarch ppc ppc64 ppc64le -%config %{_sysconfdir}/grub.d/20_ppc_terminfo +%config(noreplace) %{_sysconfdir}/grub.d/20_ppc_terminfo # This is intentionally "grub.chrp" and not "%{name}.chrp" %{_libdir}/%{name}/%{grubarch}/grub.chrp %{_libdir}/%{name}/%{grubarch}/bootinfo.txt @@ -1183,7 +1183,7 @@ fi %defattr(-,root,root,-) %dir %{_libdir}/snapper %dir %{_libdir}/snapper/plugins -%config %{_sysconfdir}/grub.d/80_suse_btrfs_snapshot +%config(noreplace) %{_sysconfdir}/grub.d/80_suse_btrfs_snapshot %{_libdir}/snapper/plugins/grub %ifarch %{ix86} x86_64