Re: Updating sources file using fedpkg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dne 17. 06. 21 v 20:02 Otto Urpelainen napsal(a):
Ken Dreyer kirjoitti 17.6.2021 klo 19.04:
On Thu, Jun 17, 2021 at 8:33 AM Richard Shaw <hobbes1069@xxxxxxxxx> wrote:

On Thu, Jun 17, 2021 at 7:22 AM Ewoud Kohl van Wijngaarden <ewoud+fedora@xxxxxxxxxxxxxxxxxxxxx> wrote:


To be clear: I don't want to fiddle with the sources file, hence this
email. However, I would like to at least complete a local mockbuild
before uploading to the lookaside cache. It is my understanding that
new-sources always does this.


That's actually a nit I've been tempted to complain about. If I'm upgrading a package to a new version I update the spec file:

rpmdev-bumpspec -n <version> -c "Update to <version>." *.spec

And download the new source:

spectool -g *.spec

But then I have to upload the new source with 'fedpkg new-sources' if I don't want it to download the old version.

Yeah, the way I deal with this is I zero out the sources file, like ">
sources". Or another alternative that I use sometimes is "sha512sum
--tag", like:

   sha512sum --tag kstart-4.2.tar.gz > sources

Hi Ewould and everybody,

I am a bit confused about this discussion. My fedpkg does not care about the 'sources' file or the lookaside cache at all on 'fedpkg mockbuild'.


I am not using `fedpkg mockbuild`, but `fedpkg srpm` certainly cares about 'sources' file. Prior creating the SRPM, it download files listed in 'sources' file from lookaside cache. However, later it uses whatever is available in the directory.


Vít


It simply looks up the expected filename of downloaded Source, grabs it from the local working directory and uses that. So for me this works:

    rpmdev-bumpspec -D -n 1.2.3 *.spec
    # Update specfile as needed
    spectool -g *.spec
    fedpkg mockbuild

After that is done, the rpm is available at results_mypackage, I install it locally and see that everything works. At that point it is a good time do 'fedpkg new-sources'.

This also means that non-packagers actually *can* properly test their changes. The maintainer has to do new-sources, commit, push and build after merging the pull request, so annoyingly there are those steps to remember. But at least the pull request author does not have to submit their changes blindly.

A simple test to make sure that it really uses the local download:

    $ sed -i 's/^Source.*/Source:https:\/\/example.com\/foo/' *.spec
    $ fedpkg mockbuild
    SOME_OUTPUT
    error: Bad file: SOMEPATH/foo: No such file or directory
    $ touch foo
    $ fedpkg mockbuild
    LOTS_OF_OUTPUT
    SOME_ERROR_DUE_TO_EMPTY_SOURCE

When I started, I was having exactly the same trouble, so wrote something in the wiki:

https://fedoraproject.org/wiki/Package_maintenance_guide#Using_fedpkg_anonymously

Otto
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux