Re: fedpkg: Failed to get repository name from Git url or pushurl ->
%build
by Chuck Anderson
On Tue, Mar 07, 2023 at 11:14:34PM +0000, Kenneth Goldman wrote:
> Let's see if I have this right ...
>
> %build
> %configure
> %make_build
>
> are not three separate steps. %build is the overall step, and the next two lines
> are the build steps. The blank line terminates the %build. Correct?
An unfortunate happenstance of RPM is that spec file script sections and
macros both start with the % character. The main script sections are:
%prep %build %install %check %pre %post %preun %postun
(there are some others)
Some other sections that aren't scripts are:
%files %changelog %package
Other words that start with % are macros. That's what these are:
%setup
%autosetup
%configure
%make_build
%make_install
> Where are the macros defined? I.e., %configure probably expands
> to ./configure and %make_build to make.
/usr/lib/rpm/macros
/usr/lib/rpm/macros.d/*
> If I want to add some arguments to configure,
%configure --argument1 --argument2 etc.
> and add an autoreconf step before configure, how would I do that?
I don't think there are any autoconf/autoreconf macros. You just run
it directly, e.g:
%build
autoreconf -iv
%configure
%make_build
Sometimes the upstream source includes a script to do all the right
things with autoconf/autoreconf:
%build
./autogen.sh
%configure
%make_build
1 year, 2 months
Re: fedpkg: Failed to get repository name from Git url or pushurl
by Vít Ondruch
Dne 01. 03. 23 v 23:39 Kenneth Goldman napsal(a):
> There's Source, Source0, and sources. What are the definitions?
I think that older RPMs require the numbered version, e.g. `Source0`.
With advent of macros such as `%autosetup`, the number is not as
important as it used to be and therefore it has been made optional.
>
> The tutorial doesn't have a 'sources' tag. Is that documented? What should
> it be?
I think there is no `sources` tag (while there is `%{sources}` macro
available later). You can either use `Source` tag multiple times or use
the appropriately numbered `Source0`, `Source1`, etc.
>
> The hello tutorial has the URL to the tarball in Source: but it also says to
> use
> wget to download the tarball.
While RPM has the ability to download the sources, it is disabled by
default for security reasons. You simply don't want to download random
stuff from Internet.
https://stackoverflow.com/questions/33177450/how-do-i-get-rpmbuild-to-dow...
>
> The Source: tag doesn't have a list of files, just a pointer to the tarball.
One file per one `Source` line, but you probably understand it based on
the above.
>
> Maybe I'm way off and the source files should be in a local directory?
I believe so in the context of the tutorial and usage of `$ fedpkg
--release f36 mockbuild` command.
>
> When I run the tutorial, it seems to ignore the .spec URLs and uses the local
> tarball. How does it even know what the name is? Does it default to the
> file name of the URL?
Yes
>
> How does it know what to build. Does it default to configure;make
> or something similar?
You have to specify what are the right steps in the `%build` sections.
In the tutorial, there are used the `%configure` + `%make_build` macros.
You could use different build commands (or macros) at this place.
Vít
>
>> -----Original Message-----
>> From: Artur Frenszek-Iwicki <suve(a)fedoraproject.org>
>> Sent: Wednesday, February 15, 2023 11:43 AM
>> To: devel(a)lists.fedoraproject.org
>> Subject: [EXTERNAL] RE: fedpkg: Failed to get repository name from Git url
>> or
>> pushurl
>>
>>> Should that tutorial work? Is it perhaps obsolete?
>> I'd say the opposite of obsolete - it's been updated to suggest using fedpkg
>> all
>> along the way, instead of the old rpmbuild tools. But it looks like it
>> wasn't tested
>> enough to make sure everything works.
>>
>>> My newbie understanding is that fedpkg should get the source from the
>>> Source0 location and then follow the build instructions.
>>> Is that even close?
>> This is a bit complicated. When the package is being built, the list of
>> files is taken
>> from the Source: tags in the spec file. However, fedpkg keeps a separate
>> file,
>> "sources" (no extension), where it lists files uploaded to the Fedora build
>> cache.
>> The justification is that keeping source tarballs in the repository is a bad
>> idea,
>> since these files can be really large (1GiB+ for game packages), so they're
>> stored
>> in a cache instead, and the repository contains only this "sources" file
>> with
>> references to said cache. (That being said, you totally can store source
>> files in
>> the repo - this is often done with stuff like non-standard Fedora configs.)
>>
>> As for the "get the source from the Source0 location" bit - no.
>> fedpkg will not download stuff from Source: tags for you, only the files
>> listed in
>> the "sources" file.
>>
>> Since my impression is that you want to start experimenting with RPM
>> packaging
>> in general, and not specifically fedpkg - I'll do a bit shameless
>> self-promotion
>> and link to an article on RPM packaging that I wrote some time ago:
>> https://urldefense.proofpoint.com/v2/url?u=https-
>> 3A__blog.svgames.pl_article_basics-2Dof-2Drpm-
>> 2Dpackaging&d=DwIGaQ&c=jf_iaSHvJObTbx-
>> siA1ZOg&r=DZCVG43VcL8GTneMZb8k8lEwb-O1GZktFfre1-mlmiA&m=9Zy9a03p-
>> GrtnAWrzttvmFX417X-C_WOqiZaQjuiv1_bUC_4VaDdANM4Cv-
>> tBucE&s=ASsrhv8V4Ny-ujgsugfcpVLuPxEn578dICLLMx2eCYw&e=
>>
>> In this article, I show how to build RPM packages using the traditional
>> rpmbuild
>> workflow. If you're just starting out with writing specs and such, it should
>> get
>> you started enough to make switching to fedpkg later down the road a no-
>> brainer.
>>
>> A.FI.
>> _______________________________________________
>> devel mailing list -- devel(a)lists.fedoraproject.org To unsubscribe send an
>> email
>> to devel-leave(a)lists.fedoraproject.org
>> Fedora Code of Conduct: https://urldefense.proofpoint.com/v2/url?u=https-
>> 3A__docs.fedoraproject.org_en-2DUS_project_code-2Dof-
>> 2Dconduct_&d=DwIGaQ&c=jf_iaSHvJObTbx-
>> siA1ZOg&r=DZCVG43VcL8GTneMZb8k8lEwb-O1GZktFfre1-mlmiA&m=9Zy9a03p-
>> GrtnAWrzttvmFX417X-C_WOqiZaQjuiv1_bUC_4VaDdANM4Cv-
>> tBucE&s=wgOj27qGmhxD4UEHTA9tqeAxCZr1ny0rPQPs7_SL2sQ&e=
>> List Guidelines: https://urldefense.proofpoint.com/v2/url?u=https-
>> 3A__fedoraproject.org_wiki_Mailing-5Flist-
>> 5Fguidelines&d=DwIGaQ&c=jf_iaSHvJObTbx-
>> siA1ZOg&r=DZCVG43VcL8GTneMZb8k8lEwb-O1GZktFfre1-mlmiA&m=9Zy9a03p-
>> GrtnAWrzttvmFX417X-C_WOqiZaQjuiv1_bUC_4VaDdANM4Cv-
>> tBucE&s=cUh77057QE1qCKOAD2SsxFWibxM8aVJOWgvcuUM-1gI&e=
>> List Archives: https://urldefense.proofpoint.com/v2/url?u=https-
>> 3A__lists.fedoraproject.org_archives_list_devel-
>> 40lists.fedoraproject.org&d=DwIGaQ&c=jf_iaSHvJObTbx-
>> siA1ZOg&r=DZCVG43VcL8GTneMZb8k8lEwb-O1GZktFfre1-mlmiA&m=9Zy9a03p-
>> GrtnAWrzttvmFX417X-C_WOqiZaQjuiv1_bUC_4VaDdANM4Cv-
>> tBucE&s=WiPTKb0_GaJvkLzQAdKMxWSDV8qxvKguXGSvM8rqGgs&e=
>> Do not reply to spam, report it:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__pagure.io_fedora-
>> 2Dinfrastructure_new-5Fissue&d=DwIGaQ&c=jf_iaSHvJObTbx-
>> siA1ZOg&r=DZCVG43VcL8GTneMZb8k8lEwb-O1GZktFfre1-mlmiA&m=9Zy9a03p-
>> GrtnAWrzttvmFX417X-C_WOqiZaQjuiv1_bUC_4VaDdANM4Cv-
>> tBucE&s=FMdlaadJWvp1hsOPTPqy9TFB3w7W_bTTIYBf553Savs&e=
>>
>> _______________________________________________
>> devel mailing list -- devel(a)lists.fedoraproject.org
>> To unsubscribe send an email to devel-leave(a)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
1 year, 2 months
Re: Package Tutorial bug - missing BuildRequires gcc
by Jason Tibbitts
>>>>> Kenneth Goldman <kgoldman(a)us.ibm.com> writes:
> but … if the tutorial has a sample .spec file, I think it would
> help the new user if it was 100% complete.
I believe that the section "A Complete hello.spec File" at
https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutori...
is, as indicated, complete. It does contain the necessary build
dependency on gcc, as well as the others. If I'm missing something,
please feel free to enlighten me.
I do see that the license tag should probably have an SPDX identifier
"GPL-3.0-or-later" instead of "GPLv3+" but that's somewhat minor.
- J<
1 year, 2 months
fedpkg: Failed to get repository name from Git url or pushurl
by Betty Liu
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
Thanks for any helping QAQ
1 year, 2 months
Re: [HEADS UP] [SONAME BUMP] libcbor will be updated to 0.10.2 in
rawhide with a soname bump
by Gary Buhrmaster
On Tue, Mar 7, 2023 at 4:32 PM Richard Hughes <rhughes(a)redhat.com> wrote:
>
> On Tue, Mar 7, 2023 at 3:55 PM Gary Buhrmaster
> <gary.buhrmaster(a)gmail.com> wrote:
> > I will rebuild libfido2. For fwupd, I will need the maintainers
> > (CC'ed) or a proven packagers assistance.
>
> No problem at all, thanks for letting me know. Do you need me to do
> the build now?
The side-tag is ready for your build
(libcbor and libfido2 have already
been built).
Let me know if you have any issues
with the build.
Thanks!
1 year, 2 months
[HEADS UP] [SONAME BUMP] libcbor will be updated to 0.10.2 in rawhide
with a soname bump
by Gary Buhrmaster
libcbor will be updated to 0.10.2 in rawhide in the
next week or so, which includes a soname bump.
The list of affected packages in rawhide are:
libfido2
fwupd
I will rebuild libfido2. For fwupd, I will need the maintainers
(CC'ed) or a proven packagers assistance.
I have used the Mass Prebuild tool (mpb) to verify that
all the packages rebuild successfully, so I do not anticipate
any surprises.
Please use the side tag f39-build-side-64500
Thanks!
Gary
1 year, 2 months
biber license correction
by Petr Pisar
biber-2.19 will correct a license from ((GPL+ or Artistic 2.0) and
Artistic 2.0) to (Artistic-2.0).
-- Petr
1 year, 2 months