I thought we could make a discrete note about disabling BRP scripts in the main guidelines, then other guidelines (such as those proposed in #738) can simply reference this section:
BRP scripts are injected at the end of %install (via the %__os_install_post macro) and perform some automatic sanity checks of, or adjustments to, files installed in the build root.
%install
%__os_install_post
All packages SHOULD always be subject to all the BRP scripts, but sometimes it is necessary for a package to opt-out of certain ones. From Fedora 28, it is possible to disable any BRP script simply by undefining the corresponding variable. For example, to disable the brp-python-bytecompile script:
# Turn off Python bytecode compilation because this is a Jython # package and we will generate JVM bytecode instead %undefine __brp_python_bytecompile
Any package that disables a BRP script this way MUST also note the reason in an accompanying comment. For a list of the BRP scripts run by default, on F28 and newer invoke: fgrep '%__brp_' /usr/lib/rpm/redhat/macros
fgrep '%__brp_' /usr/lib/rpm/redhat/macros
Surprisingly, I couldn't find any existing mention in the guidelines of brp scripts, except mentioned in passing in the Python guidelines. Thoughts?
Metadata Update from @mbooth: - Issue assigned to mbooth - Issue tagged with: meeting
Yes, this is what I'd planned on drafting, but now I'm happy to not need to do it.
We have never really mentioned the BRP scripts and indeed I don't think most people realize they exist or understand what they do. Things like debuginfo generation have always been a nagging, undebuggable thing so documenting the BRP stuff, even a bit, is still a good thing.
I wonder if %__os_install_post is worth a mention. I don't really want to include (and manage) a list of all of the BRP scripts which are run but it seems mean to talk about these things and not give any way to see a list of them.
Maybe just change the first sentence:
+1 with @tibbs modification.
We discussed this at this weeks meeting (https://meetbot-raw.fedoraproject.org/fedora-meeting-2/2018-02-07/fpc.2018-02-07-18.01.txt):
Metadata Update from @james: - Issue untagged with: meeting - Issue tagged with: writeup
Announcement text:
A guideline was added showing how to disable BRP scripts for your package, if necessary:
Metadata Update from @mbooth: - Issue untagged with: writeup - Issue tagged with: announce
Metadata Update from @tibbs: - Issue untagged with: announce - Issue close_status updated to: accepted - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.