On Tue, 7 Mar 2023, Betty Liu wrote:

Hi, I'm a beginner at fedora packaging and following the guide in the 
documentation.
https://docs.fedoraproject.org/en-US/packaging-guidelines/
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
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've checked the other threads but they cannot solve my problem. I also tried 
fedpkg mockbuild it shows the same. And also for fedpkg --name hello mockbuild, 
get error Could not execute mockbuild: /home/lucia/cs/fedora-packaging/hello is 
not a valid repo

I think there is some problem for the source code? I'm so sorry but I really 
don't know how to fix this bug QAQ

Following is my spec file:
Name:           hello
Version:        2.10
Release:        %autorelease
Summary:        Produces a familiar, friendly greeting

License:        GPL-3.0-or-later
URL:            https://www.gnu.org/software/hello/
Source0:                https://ftp.gnu.org/gnu/hello/hello-%{version}.tar.gz

#BuildRequires:
#Requires:

%description
The GNU Hello program produces a familiar, friendly greeting. Yes, this is
another implementation of the classic program that prints "Hello, world!" when
you run it.

%prep
%autosetup


%build
%configure
%make_build


%install
#rm -rf $RPM_BUILD_ROOT
%make_install


%files
#%license add-license-file-here
#%doc add-docs-here



%changelog
%autochangelog

Hi,

Most likely the issue is that the version of RPM on CentOS Stream 8 doesn't understand the %autorelease and %autochangelog macros, which are relatively new. Unfortunately, the Fedora Packaging Guidelines for the most part assume you are using a supported Fedora release and not CentOS.

I would recommend switching to use Fedora if you want to learn Fedora packaging.

Regards,
Scott
_______________________________________________
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