Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949834 - sys-devel/patch-2.7.6_p20250206: causes kde-frameworks/extra-cmake-modules-6.11.0 to install .orig files
Summary: sys-devel/patch-2.7.6_p20250206: causes kde-frameworks/extra-cmake-modules-6....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: https://lists.gnu.org/archive/html/bu...
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2025-02-16 10:44 UTC by Sam James
Modified: 2025-02-27 05:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-16 10:44:35 UTC
```
 * CMP: =kde-frameworks/extra-cmake-modules-6.10.0 with kde-frameworks/extra-cmake-modules-6.11.0/image
 *  FILES:+usr/share/ECM/kde-modules/KDECompilerSettings.cmake.orig
 *  FILES:+usr/share/ECM/modules/ECMAddTests.cmake.orig
 *  FILES:+usr/share/ECM/modules/ECMGenerateQDoc.cmake
 * ------> FILES(+3)
```

Ionen found it happens when using patch-2.7.6_p20250206.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-16 11:13:23 UTC
5bac27450794f2820ea41f2d6d5342c770f36e40 is the first bad commit
commit 5bac27450794f2820ea41f2d6d5342c770f36e40
Author: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date:   Wed Nov 20 23:54:48 2024 +0100

    Set --no-backup-if-mismatch when in --posix mode

    When in POSIX mode, the --no-backup-if-mismatch option should be
    enabled.  However, this is only true when the POSIXLY_CORRECT
    environmant variable is set but not when the --posix command line
    option is given.  Fix that by setting backup_if_mismatch after
    evaluating the command line arguments.

 src/patch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bisect found first bad commit
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-16 11:16:10 UTC
Portage does:
```
                        ebegin "${prefix:-Applying }${f##*/}"
                        # -p1 as a sane default
                        # -f to avoid interactivity
                        # -g0 to guarantee no VCS interaction
                        # --no-backup-if-mismatch not to pollute the sources
                        local all_opts=(
                                -p1 -f -g0 --no-backup-if-mismatch
                                "${patch_options[@]}"                        
```

It seems to me that 5bac27450794f2820ea41f2d6d5342c770f36e40 discards the value of backup_if_mismatch and makes it entirely a function of POSIXLY_CORRECT.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-16 11:48:44 UTC
Reported upstream at https://lists.gnu.org/archive/html/bug-patch/2025-02/msg00014.html.
Comment 4 Eli Schwartz gentoo-dev 2025-02-26 02:16:16 UTC
Fix applied in https://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5d2124e2e6019ee5d329b49ef6904a0daec74a1


Figuring to wait for either a new snapshot or a new release.
Comment 5 Larry the Git Cow gentoo-dev 2025-02-27 05:54:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bc98b5f3b280ab33857da098557edf1df1d4b14

commit 0bc98b5f3b280ab33857da098557edf1df1d4b14
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2025-02-27 04:56:42 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2025-02-27 05:53:44 +0000

    sys-devel/patch: backport two regression fixes for the alpha
    
    Yes I know, we were trying to move on from needing patch to build patch.
    On the plus side we are getting really close to a well polished stable
    release? Worth it.
    
    Closes: https://bugs.gentoo.org/949834
    Acked-by: Sam James <sam@gentoo.org>
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

 ...20250206-no-backup-if-mismatch-regression.patch | 131 +++++++++++++++++++++
 ...ch-2.7.6_p20250206-traditional-diff-lines.patch | 114 ++++++++++++++++++
 ...0206.ebuild => patch-2.7.6_p20250206-r1.ebuild} |  16 +++
 3 files changed, 261 insertions(+)