OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
282 stars 142 forks source link

package: adjust openSUSE patch #2555

Closed aplanas closed 1 month ago

aplanas commented 1 month ago

Add the openSUSE patch as a Patch1 element, and set %autosetup to -p1

schaefi commented 1 month ago

Thanks much, looks good to me :+1:

Conan-Kudo commented 1 month ago

This commit means that SRPMs now can conditionally be broken by not including the patch. I did it differently on purpose to avoid that.

aplanas commented 1 month ago

This commit means that SRPMs now can conditionally be broken by not including the patch.

The patch is under a macro guard. Would not this resolve this issue?

I did it differently on purpose to avoid that.

Right, the problem is that the Factory / OBS packaging policies[1] require certain properties for a patch: needs to be referenced as a "Patch:", needs to be in the changelog, and optionally tagged.

[1] https://en.opensuse.org/openSUSE:Packaging_Patches_guidelines

Conan-Kudo commented 1 month ago

Macro guards are the problem. That's not allowed for Patch or Source because it means the SRPM can be generated in a way that's broken.

aplanas commented 1 month ago

Without breaking the policy (that makes the submission automatically declined), what can be a good solution then? Maybe creating a different spec template only for openSUSE?

aplanas commented 1 month ago

Maybe unconditionally add the patch in the spec file, remove the autosetup and manually apply the patch with "%patch"? That seems a bit of step backwards to me (I like autosetup)

Conan-Kudo commented 1 month ago

I like autosetup too, but %autosetup -N and %autosetup -m/-M aren't supported everywhere so we have to roll back a bit.

https://github.com/OSInside/kiwi/pull/2556