Summary: | RFE: enable --no-backup-if-mismatch by default in %patch macro | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Honza Horak <hhorak> |
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | ffesti, hhorak, jpokorny, jzeleny, lkardos, marcosfrm, orion, packaging-team, pahan, pmatilai, ppisar, redhat, rvokal, virtuousfox |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-04-15 11:12:23 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: |
Description
Honza Horak
2012-12-06 16:36:15 UTC
Actually, I think %patch should just include that option by default. It is not apparent to me that there's any use-case for having backup files made during an RPM build, and if anyone does want it, they can add -b to the %patch command. For the packages where it matters you can achieve that already by adding this to the spec: %global _default_patch_flags --no-backup-if-mismatch As for globally enabling... I'll mull over it for a bit, everybody seems to want their patches slightly differently applied. Which is sort of why _default_patch_flags exists. (In reply to comment #2) > For the packages where it matters you can achieve that already by adding > this to the spec: > %global _default_patch_flags --no-backup-if-mismatch Hm, that might be a sufficient solution. The cases where it matters, I think, are where the specfile blindly installs *everything* that's in a given source directory. I'm not sure whether that's common enough to justify changing the default. I'd still vote for enabling --no-backup-if-mismatch by default. It can influence in a wrong way only such packages, that depend on patches applied uncleanly and still want to create backup with no -b specified, which is really broken design (that I hope is not used by anyone). I'd vote for it too. I think the expectation of most packagers (certainly mine) is that if I don't use "-b" I don't get a backup file. See thread starting at https://lists.fedoraproject.org/pipermail/devel/2014-April/197506.html An alternative would be to carry it in redhat-rpm-macros There is a thing called "Open Build Service" which is used to automatically build packages for openSUSE, Fedora and a bunch of other distroes. It considers existence of this "backup" cruft as fatal error of the build. I, as others, just can't even imagine why would you want them on package builds at all. Insane things like that is why I, personally, dream about times when rpm authors would bother to learn something from portage/ebuilds. I added --no-backup-if-mismatch to _default_patch_flags in /usr/lib/macros in rawhide (rpm-4.13.0-0.rc1.32.fc25). We will see if there will be any objections. Well, it did break some builds (ltrace, for one) but they deserve to be broken. Would be nice to test things like this before pushing them, but I can understand that doing fedpkg prep on all of Fedora takes a while even if you start from the current git checkout seed. |