softwarefactory-project / rdopkg

power to the packagers
Apache License 2.0
28 stars 21 forks source link

autosetup in prep section needs p1 flag added. #114

Open fuzzball81 opened 7 years ago

fuzzball81 commented 7 years ago

If a spec file contains autosetup in the prep section, the -p1 flag needs to be appended to allow git formatted patches to be applied.

yazug commented 7 years ago

if using rdopkg patch to add patches and the following modification is required to make patches apply

-%autosetup -n %{pypi_name}-%{upstream_version} +%autosetup -n %{pypi_name}-%{upstream_version} -p1

if -S git is present -p1 is not needed

yac commented 7 years ago

There are currently sanity checks that fail rdopkg patch/new-version on certain .spec errors, see specfile.sanity_check.

So adding sanity_check_autosetup there would be simplest way to prevent this error without touching the .spec too much.

In order for automated fixing of stuff, some work on a streamlined and reausable solution is needed as described in #115.