packit / dist-git-to-source-git

Converting dist-git to source-git
MIT License
4 stars 9 forks source link

patches applied in different directories in %prep #58

Open dhodovsk opened 4 years ago

dhodovsk commented 4 years ago

When digging in the spec files, trying to find specific reasons for error xxx.patch: No such file or directory, there was one thing that some of the packages had in common and that is they change the directory where some of the patches are applied.

Packages:

TomasTomecek commented 3 years ago

a lot of high-profile packages in the list and I hope this should be fairly easy to do

TomasTomecek commented 3 years ago

I just reported an issue against rpm which is coming from how gcc is doing %setup:

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

the issue is that when we change it to %autosetup, not both additional archives are unpacked

TomasTomecek commented 3 years ago

okay, this seems to be a list of packages which are really hard to convert.

fwupd:

%prep
%setup -q
%patch2 -p1 -b .lvfs-disabled

mkdir -p subprojects/libjcat
tar xfvs %{SOURCE1} -C subprojects/libjcat --strip-components=1

# apply patch to subproject
cd subprojects/libjcat
%patch3 -p0 -b .gpgme-parsing
cd -

Breathe now. Deeply.

So they unpack an archive in the tree structure and patch it then (!!!!!!!) - there is no way that we can convert this reliably: the unpack&patch thing is just impossible to turn into a source-git repo.