Re: How to easily automate test builds in a COPR project

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

 



On Thu, 31 Dec 2020 at 14:59, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
>
> I maintain a suite of ham radio related packages. The developer is very active and often creates test versions adding and incrementing the "tweak" part of the version which is removed for the full releases and the patch level incremented.
>
> Currently I'm just trying to keep up with them by hand using pagure forks of the official repos so I don't accidentally pollute SCM with the changes and build them in COPR.
>
> Things I need to manage automagically:
> 1. Monitor the test URLs to look for new versions.
>
> I could write a bash script for this and add a cron or systemd timer but I was hoping for something that took less time as I don't have a lot of that :)
>
> Would it be permissible to create a <package>-testing entry in release-monitoring.org?
>
>
> 2. Trigger a "fedpkg clone" and add a tweak version.
>
> This could probably be managed with macros easy enough, %{?tweak}, or something like that. And then use a script to substitute into "%global tweak ..."
>
>
> 3. I need to download the files from a different location.
>
> %if %{?tweak}
> ... use difference Source0?
>
>
> 4. Build the packages in COPR.
>
> Easy enough using a bash script but is there a better way?

There would be a very neat way if "Enable Spec File preprocessing"
change was accepted but it looks like it won't happen. There are still
some options but they require keeping a spec file (template) outside
of Fedora DistGit (which should normally be the source for the spec
file). Actually, also rpkg-3 would be needed in Copr (currently rpkg-2
is there). So with rpkg-3, you could:

- have the spec file template e.g. in Pagure
- configure rpkg SCM method by using https URL of the spec file in
pagure and clone url of upstream (this is a thing currently
unsupported by rpkg-2)
-  either ask the upstream developer to configure a webhook for you to
trigger a build in COPR upon a new commit or tag or configure
release-monitoring for that

With the aforementioned Fedora change, you could have just a single
spec file in Fedora DistGit and use it for official Fedora builds as
well as for upstream builds. But without that change, it is not
possible so you would need to take rendered spec files from the
template and load them into DistGit with an upstream version that you
would like to release into Fedora. That breaks Fedora DisGit
canonicity but it's the best way and many people do it anyway.

You can actually implement this workflow even today without rpkg-3 in
COPR by using COPR's custom srpm build method. There you could specify
a snippet which installs rpkg-3 into the chroot and then invokes
`rpkg` command on the spec in the pagure (again specified as https
URL) while operating on the upstream cloned repo. Of course, you could
also avoid using rpkg-3 and do something more manual on your own
(e.g. invoking git archive and sedding your spec file with the
produced sourcename).

Well, I probably didn't help you much
Anyway, best regards
clime

>
> Thanks,
> Richard
>
> _______________________________________________
> 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
_______________________________________________
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




[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