Ticket #259 (closed defect: fixed)

Opened 14 months ago

Last modified 12 months ago

Should rpm macro files be marked with any flags (e.g %config and or noreplace)?

Reported by: dmalcolm Owned by:
Priority: minor Milestone:
Component: Guideline Draft Version:
Keywords: Cc: santiago@…
Blocked By: Blocking:

Description

http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_of_Additional_RPM_Macros talks about macros.$PACKAGE files.

Some packages flag these as %config and/or noreplace, some don't:

 fedora17$ for i in /etc/rpm/*;do printf "%02x %s\n" $(rpm -q --qf "%{fileflags}\n" -f $i) $i;done
   11 /etc/rpm/macros.cmake
   01 /etc/rpm/macros.color
   01 /etc/rpm/macros.dist
   11 /etc/rpm/macros.emacs
   00 /etc/rpm/macros.fjava
   00 /etc/rpm/macros.gconf2
   00 /etc/rpm/macros.ghc-srpm
   00 /etc/rpm/macros.gnat-srpm
   00 /etc/rpm/macros.jpackage
   00 /etc/rpm/macros.kde4
   00 /etc/rpm/macros.mono-srpm
   00 /etc/rpm/macros.ocaml-srpm
   00 /etc/rpm/macros.perl
   00 /etc/rpm/macros.prelink
   11 /etc/rpm/macros.python2
   11 /etc/rpm/macros.ruby
   51 /etc/rpm/macros.systemd

...where 0x01 and 0x10 are RPMFILE_CONFIG and _NOREPLACE respectively, see rpm/rpmfi.h.

What flags should such flags have?

[Note to self: https://bugzilla.redhat.com/show_bug.cgi?id=914789 which is about macros.python2 having both flags in internal-to-RH builds of python.el7]

Change History

comment:1 Changed 14 months ago by corsepiu

IMO, all these files are system config files and are not supposed to be edited/modified by user or admins.

Therefore, I think, these files all should not be marked %config or %config(noreplace).

comment:2 Changed 14 months ago by toshio

Approved: RPM Macro files MUST NOT be marked as %config (+1: 5, 0: 0, -1: 0)

I'll write it up into the Guidelines

comment:3 follow-up: ↓ 4 Changed 14 months ago by toshio

Added. Announcement text:

"The packaging guidelines have been clarified to specify that RPM Macro files stored in /etc/rpm/ are not to be marked %config."

comment:4 in reply to: ↑ 3 Changed 14 months ago by dmalcolm

Replying to toshio:

Added. Announcement text:

"The packaging guidelines have been clarified to specify that RPM Macro files stored in /etc/rpm/ are not to be marked %config."

For reference, the relevant edit was: https://fedoraproject.org/w/index.php?title=Packaging%3AGuidelines&diff=325012&oldid=323210

comment:6 Changed 13 months ago by vondruch

David, have you considered to move this macros into /usr/lib/rpm/macros.d ? In that place, there is no question about %config. And as Ralf said: "all these files are system config files and are not supposed to be edited/modified by user or admins.", so why they should be in /etc on the first place?

comment:7 Changed 13 months ago by rdieter

Since when does a /usr/lib/rpm/macros.d exist? It doesn't on my f18 box.

comment:8 Changed 13 months ago by sundaram

comment:9 Changed 13 months ago by sundaram

https://bugzilla.redhat.com/show_bug.cgi?id=846679

"Support added upstream in rpm >= 4.10.90, the directory actually now exists too in >= 4.10.90-0.git11989.3.fc19"

The guidelines could recommend this location for Fedora 19 and newer

comment:10 Changed 13 months ago by sundaram

Actually, just noticed that it already does. Never mind.

comment:11 Changed 12 months ago by spot

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.