Re: How to deal with COPR and RPMAutoSpec

2023-10-23 Thread Pavel Raiskup
On úterý 17. října 2023 22:47:23 CEST Richard Shaw wrote:
> I'm trying to test build packages before actually creating a side tag and
> doing real builds.
> 
> I'm using rpkg to do the test builds but openshading language uses
> RPMAutoSpec. I've tried creating empty commits to bump the release but it
> does not appear to be working.
> 
> What's the work around?

One of the ways might be:
$ copr-distgit-client clone --dist-git fedora 
$ cd 
$ git commit -m "bump" --allow-empty
$ copr-distgit-client sources
$ copr-distgit-client srpm
...
Wrote: /tmp/--.src.rpm

Pavel


___
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


Re: How to deal with COPR and RPMAutoSpec

2023-10-18 Thread Neal Gompa
On Wed, Oct 18, 2023 at 11:18 AM Miroslav Suchý  wrote:
>
> Dne 18. 10. 23 v 16:12 Diego Herrera napsal(a):
> > What I usually do when I need for COPR to handle rpmautospec is to set
> > the source type to "Custom", and use the following script:
> >
> > #! /bin/sh -x
> > git clone  
> > cd 
> > spectool -g 
> > rpmautospec process-distgit  
> >
> > Set the Buildroot dependencies to "git rpmdevtools rpmautospec" and
> > the Result directory to the same  string used in the
> > script.
>
> This is great. I added this to our FAQ
>
> https://github.com/fedora-copr/copr/pull/2958
>

Note that you can use git-core instead to make the buildroot smaller.


-- 
真実はいつも一つ!/ Always, there's only one truth!
___
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


Re: How to deal with COPR and RPMAutoSpec

2023-10-18 Thread Miroslav Suchý

Dne 18. 10. 23 v 16:12 Diego Herrera napsal(a):

What I usually do when I need for COPR to handle rpmautospec is to set
the source type to "Custom", and use the following script:

#! /bin/sh -x
git clone  
cd 
spectool -g 
rpmautospec process-distgit  

Set the Buildroot dependencies to "git rpmdevtools rpmautospec" and
the Result directory to the same  string used in the
script.


This is great. I added this to our FAQ

https://github.com/fedora-copr/copr/pull/2958


--
Miroslav Suchy, RHCA
Red Hat, Manager, Packit and CPT, #brno, #fedora-buildsys
___
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


Re: How to deal with COPR and RPMAutoSpec

2023-10-18 Thread Diego Herrera
What I usually do when I need for COPR to handle rpmautospec is to set
the source type to "Custom", and use the following script:

#! /bin/sh -x
git clone  
cd 
spectool -g 
rpmautospec process-distgit  

Set the Buildroot dependencies to "git rpmdevtools rpmautospec" and
the Result directory to the same  string used in the
script.

On Tue, Oct 17, 2023 at 5:47 PM Richard Shaw  wrote:
>
> I'm trying to test build packages before actually creating a side tag and 
> doing real builds.
>
> I'm using rpkg to do the test builds but openshading language uses 
> RPMAutoSpec. I've tried creating empty commits to bump the release but it 
> does not appear to be working.
>
> What's the work around?
>
> Thanks,
> Richard
> ___
> 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
___
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


Re: How to deal with COPR and RPMAutoSpec

2023-10-17 Thread Richard Shaw
Never mind, I hadn't realized fedpkg had grown the ability to do COPR
builds.

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


Re: How to deal with COPR and RPMAutoSpec

2023-10-17 Thread Fabio Valentini
On Tue, Oct 17, 2023 at 10:47 PM Richard Shaw  wrote:
>
> I'm trying to test build packages before actually creating a side tag and 
> doing real builds.
>
> I'm using rpkg to do the test builds but openshading language uses 
> RPMAutoSpec. I've tried creating empty commits to bump the release but it 
> does not appear to be working.
>
> What's the work around?

The easiest would probably be to construct the .src.rpm with "fedpkg
srpm" locally and upload it to COPR.
The "rpkg" build method in COPR has no support for rpmautospec, as the
underlying code has been basically unmaintained for years.

Fabio
___
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


How to deal with COPR and RPMAutoSpec

2023-10-17 Thread Richard Shaw
I'm trying to test build packages before actually creating a side tag and
doing real builds.

I'm using rpkg to do the test builds but openshading language uses
RPMAutoSpec. I've tried creating empty commits to bump the release but it
does not appear to be working.

What's the work around?

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


Re: COPR and rpmautospec

2022-12-18 Thread Vitaly Zaitsev via devel

On 18/12/2022 15:14, Michael J Gruber wrote:

%autorelease needs the git history, and you are building from dist-git, so that 
part is fine.


COPR has Git history.

Example:
https://copr-dist-git.fedorainfracloud.org/cgit/xvitaly/matrix/neochat.git/log/

--
Sincerely,
  Vitaly Zaitsev (vit...@easycoding.org)
___
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


Re: COPR and rpmautospec

2022-12-18 Thread Florian Weimer
* Michael J. Gruber:

> I'm afraid you're not holding it right ;)
>
> %autorelease needs the git history, and you are building from
> dist-git, so that part is fine. But you are not using `Release:
> %autorelease` but, instead, there are additional tags in there. And -
> depending on your view on old vs. new version names - this is wrong
> anyways, or rpmautospec should support it ;)

I was building from dist-git, but not using the dist-git method.
Apparently this makes all the difference. I tweaked the Release: line as
well, just in case.  Anyway, the combined effect is that the NVR in COPR
matches Koji once more.

Thanks for nudging me in the right direction.

Florian
___
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


Re: COPR and rpmautospec

2022-12-18 Thread Michael J Gruber
I'm afraid you're not holding it right ;)

%autorelease needs the git history, and you are building from dist-git, so that 
part is fine. But you are not using `Release: %autorelease` but, instead, there 
are additional tags in there. And - depending on your view on old vs. new 
version names - this is wrong anyways, or rpmautospec should support it ;)

In any (well ...) case, the bare case works (see e.g. 
https://copr.fedorainfracloud.org/coprs/mjg/mupdf/builds/ from a dist-git fork).
___
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


Re: COPR and rpmautospec

2022-12-18 Thread Fabio Valentini
On Sat, Dec 17, 2022, 20:59 Florian Weimer  wrote:

> It looks like COPR always produces 1 for %autorelease.  Is this a known
> issue?  Is there a way around it?
>
> Here's a build that shows this:
>
>   <
> https://copr.fedorainfracloud.org/coprs/fweimer/modernc-1/build/5152562/>
>
> Thanks,
> Florian
>

The problem is that rpmautospec can only determine correct release and
changelog when run in a dist-git repo, which might not be available when in
COPR. There should be at least two ways to work around this, I think:

1. Upload an SRPM file that was already pre-processed (i.e. the file
produced by "fedpkg srpm"). It has correct Release and %changelog baked
into it.

2. When using dist-git as package source directly, there should be a way to
configure COPR to use "fedpkg srpm" to build the srpm file instead of
fedpkg-minimal (or whatever COPR uses by default, which doesn't support
rpmautospec). That should also produce srpm with correct Release and
%changelog (though I have not tested this).

Hope that helps.

Fabio

PS: Sorry for possibly weird formatting. Writing this on my phone, I'm not
at my PC this weekend.

___
> 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
>
___
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


Re: COPR and rpmautospec

2022-12-18 Thread Vitaly Zaitsev via devel

On 17/12/2022 20:59, Florian Weimer wrote:

It looks like COPR always produces 1 for %autorelease.  Is this a known
issue?


Yes. rpmautospec works correctly only in Fedora Koji. In rpmbuild, mock, 
COPR, it will always use 1.



Is there a way around it?


I didn't find it, so I reverted my packages back to the classic style.

--
Sincerely,
  Vitaly Zaitsev (vit...@easycoding.org)
___
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


COPR and rpmautospec

2022-12-17 Thread Florian Weimer
It looks like COPR always produces 1 for %autorelease.  Is this a known
issue?  Is there a way around it?

Here's a build that shows this:

  

Thanks,
Florian
___
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