Bug 2336345 - Move to local -build subdirs broke 'fedpkg patch'
Summary: Move to local -build subdirs broke 'fedpkg patch'
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 45
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondřej Nosek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-08 04:59 UTC by "FeRD" (Frank Dana)
Modified: 2026-08-17 13:20 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description "FeRD" (Frank Dana) 2025-01-08 04:59:59 UTC
Description of problem:

I'm not entirely sure _where_ this issue lives, so I'm filing it against the command that broke for me. The problem, and the fix, may well live with a different component.

The switch to `fedpkg prep` / `fedpkg local` extracting and building package sources inside a `${name}-${version}-build/${name}-${version}/` subdirectory broke the `fedpkg patch` command, which (as implemented in pyrpkg) expects there to be a top-level `${name}-${version}` directory next to the spec file.

Version-Release number of selected component (if applicable):
fedpkg-1.45-5.fc41.noarch


How reproducible:
100%

Steps to Reproduce:
Start with a fedpkg clone of any package (let's use fedpkg itself...)
1. fedpkg clone fedpkg
2. cd fedpkg
3. fedpkg --release f41 prep  # creates the directory fedpkg-1.45-build/fedpkg-1.45/
4. fedpkg patch my_fix_suffix  # (it doesn't matter that there are no
                                 files with that suffix, we won't get that far)

Actual results:
Could not execute patch: Expanded source dir not found!


Expected results:
fedpkg looks for files with the suffix .my_fix_suffix and creates a patch


Additional info:

The relevant part of the pyrpkg code is in
/usr/lib/python3.13/site-packages/pyrpkg/__init__.py

With python3-rpkg-1.67-5.fc41.noarch it's on lines 2158-2162,
inside def patch(self, suffix, rediff=False):

        # See if there is a source dir to diff in
        if not os.path.isdir(os.path.join(self.path,
                                          '%s-%s' % (self.repo_name,
                                                     self.ver))):
            raise rpkgError('Expanded source dir not found!')

Comment 1 Adam Williamson 2025-12-02 02:07:01 UTC
This message is a reminder that Fedora Linux 41 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 41 on 2025-12-15.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '41'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 41 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Aoife Moloney 2026-08-17 13:20:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.


Note You need to log in before you can comment on or make changes to this bug.