I've been trying to update one of my package using the docs at https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit... This says to use Source0: https://github.com/OWNER/PROJECT/archive/%%7Bcommit%7D/%%7Bname%7D-%%7Bshort... when one needs to reference an archive extracted from a specific commit. But it seems that the produced file is using the format %{name}-%{commit}.tar.gz
Am I doing something wrong?
Mattia
On Sat, 2019-02-09 at 17:50 +0000, Mattia Verga wrote:
I've been trying to update one of my package using the docs at https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit... This says to use Source0: https://github.com/OWNER/PROJECT/archive/%%7Bcommit%7D/%%7Bname%7D-%%7Bshort... when one needs to reference an archive extracted from a specific commit. But it seems that the produced file is using the format %{name}-%{commit}.tar.gz
yes is that what happens
Am I doing something wrong?
It is all correct you just need use :
%setup -q -n %{name}-%{commit}
the file %{name}-%{shortcommit}.tar.gz just will have a shorter filename , nothing else change i.e. if you download https://github.com/OWNER/PROJECT/archive/%%7Bcommit%7D/%%7Bname%7D-%%7Bcommi... you will see that files are equal , no diffs .
Mattia _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject....
On Sun, Feb 10, 2019, 01:59 Sérgio Basto <sergio@serjux.com wrote:
On Sat, 2019-02-09 at 17:50 +0000, Mattia Verga wrote:
I've been trying to update one of my package using the docs at
https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit...
This says to use Source0:
https://github.com/OWNER/PROJECT/archive/%%7Bcommit%7D/%%7Bname%7D-%%7Bshort...
when one needs to reference an archive extracted from a specific commit. But it seems that the produced file is using the format %{name}-%{commit}.tar.gz
yes is that what happens
Am I doing something wrong?
It is all correct you just need use :
%setup -q -n %{name}-%{commit}
the file %{name}-%{shortcommit}.tar.gz just will have a shorter filename , nothing else change i.e. if you download https://github.com/OWNER/PROJECT/archive/%%7Bcommit%7D/%%7Bname%7D-%%7Bcommi... you will see that files are equal , no diffs .
Thanks Sérgio, you're right.
It's also explicitly mentioned in the docs that the "-n" argument to %setup / %autosetup is needed - actually, it's even in the same code block as the URL pattern for git commits.
https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit...
However, if there really are errors, feel free to open issues with the packaging committee on our pagure repository. I updated the SourceURL guidelines myself not so long ago, and I hope to keep them up-to-date and correct.
Fabio
Mattia _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives:
https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject....
Sérgio M. B. _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject....
Thank you, I thought that rpmlint also checks that the downloaded file name is equal to those in SourceURL.
On Sun, Feb 10, 2019, 09:56 Mattia Verga <mattia.verga@protonmail.com wrote:
Thank you, I thought that rpmlint also checks that the downloaded file name is equal to those in SourceURL.
The file name obviously must be the same, otherwise RPM can't even build the source package (since it wouldn't be able to find and include SourceX).
The "-n" flag for *setup only specifies the name of the top-level directory in the source archive, which might be named differently than the file name without extensions (as in this case, shortcommit != commit).
Fabio
_______________________________________________
packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject....
packaging@lists.fedoraproject.org