packit / dist-git-to-source-git

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

Variable value in patch name or source not the same #72

Closed dhodovsk closed 3 years ago

dhodovsk commented 4 years ago

Patch name contains hash, that gets changed after dist2src - https://git.centos.org/rpms/libnice/blob/c8/f/SPECS/libnice.spec#_17

[dhodovsk@shiny playground]$ diff src/libnice/SPECS/libnice.spec rpms/libnice/SPECS/libnice.spec
4c4
< %global upstream_date 20180504.
---
> %global upstream_date 20180504
6c6
< %global upstream_hash ffeb5ea2
---
> %global upstream_hash 34d6044
10c10
< Release:        7.%{upstream_date}g%{upstream_hash}%{?dist}
---
> Release:        7.%{upstream_date}git%{upstream_hash}%{?dist}
84c84
< %autosetup -p1
---
> %setup -q
161,163d160
< * Wed Sep 16 2020 Dominika Hodovska <dhodovsk@redhat.com> - 0.1.14-7.20180504.gffeb5ea2
< - Downstream changes (ffeb5ea2)
< 

What results in error: Bad source: /tmp/playground/src/libnice/SPECS/libnice-0.1.14-85-gffeb5ea2.patch: No such file or directory and in SPECS file libnice-0.1.14-85-g34d6044.patch is present.

Packages:

dhodovsk commented 3 years ago

The values are changed when set_release or set_version is called on SpecFile. The values of the macros used in Release or Version tag are rewritten.

TomasTomecek commented 3 years ago

so we can either wait for a new rebase-helper release, or install rebase-helper from master branch