V Tue, Mar 07, 2023 at 02:19:11PM -0000, Betty Liu napsal(a):
> I'm using CentOS stream 8 and I've downloaded the source code of yellow. In 
> the same directory, I've made the spec file, but after I run 
> fedpkg --release f28 mockbuild 

I worry that f28 is tool old and unknown to mock nowdays. Try a number between
f36 and f39. Those are currently supported Fedora releases.

> It shows error
> 
> Failed to get repository name from Git url or pushurl
> Failed to get ns from Git url or pushurl
> warning: line 3: Possible unexpanded macro in: Release:        %autorelease
> error: %changelog entries must start with *
> error: query of specfile /home/lucia/cs/fedora-packaging/hello/hello.spec 
> failed, can't parse
> 
> Could not execute mockbuild: ('Could not download sources: %s', 
> rpkgError('Could not get n-v-r-e from 
> /home/lucia/cs/fedora-packaging/hello/hello.spec',))
> 
I think that spec files which use %autorelease macro need to be processed from
a git repository. Either turn that directory into a git repository (git
init-db . && git add hello.spec && git commit -a), or as a quick workaround,
modify the spec file like this:

> Release:        %autorelease
>
Release:    1%{?dist}

> %changelog
> %autochangelog
>
%changelog
* Tue Mar 07 2023 Betty Liu <acyanb...@gmail.com> - 2.10-1

That changes will resort to manually maintained release number and changelog
entries.

-- Petr

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to