On Thu, Jan 6, 2022 at 12:01 PM David Cantrell <dcantr...@redhat.com> wrote:
>
> On Wed, Dec 22, 2021 at 05:26:26PM +0100, Pavel Raiskup wrote:
> >On Wednesday, December 22, 2021 4:22:29 PM CET Neal Gompa wrote:
> >> On Wed, Dec 22, 2021 at 10:14 AM Pavel Raiskup <prais...@redhat.com> wrote:
> >> >
> >> > On Wednesday, December 22, 2021 9:36:01 AM CET Pavel Raiskup wrote:
> >> > > On Tuesday, December 21, 2021 5:49:34 PM CET Maxwell G wrote:
> >> > > > On Tuesday, December 21, 2021 8:22:55 AM CST Miro Hrončok wrote:
> >> > > > > On 19. 12. 21 22:39, Pavel Raiskup wrote:
> >> > > > > > On Sunday, December 19, 2021 10:22:57 PM CET Pavel Raiskup wrote:
> >> > > > > >> So it seems that fedpkg doesn't (yet) know there's 
> >> > > > > >> ~/.config/mock* at all.
> >> > > > > >
> >> > > > > > Proposed fix: https://pagure.io/rpkg/pull-request/595
> >> > > > >
> >> > > > > It seems that this would only fix the issue if the symbolic link 
> >> > > > > has already > > > been created. But before that, `fedpkg --release 
> >> > > > > epel8 mockbuild` would still
> >> > > > > fail, wouldn't it? Can we fix that as well, even if it's fixed in 
> >> > > > > some
> >> > > > > documentation only?
> >> > > >
> >> > > > Yes, I think `fedpkg --release epel8 mockbuild` should print the 
> >> > > > same error
> >> > > > message mock does when no default has been set, instead of 
> >> > > > defaulting to a
> >> > > > non-functional koji config.
> >> > >
> >> > > Fedpkg _automatically_ downloads the relevant Koji config ('koji
> >> > > mock-config' variant, which is broken for normal users) when mock 
> >> > > doesn't
> >> > > ship the appropriate config file (it doesn't by default).
> >> > >
> >> > > @onosek, would it be too bad if we made the Koji config download 
> >> > > feature
> >> > > opt-in in fedpkg?  Something like 'fedpkg mockbuild 
> >> > > --use-koji-mock-config'?
> >> > > - when used, all local mock configuration is ignored
> >> > > - when not used, 'mock -r epel-8-x86_64' even if the config doesn't 
> >> > > exist,
> >> > >   which would automatically trigger the new Mock error message
> >> >
> >> > I'm trying to propose this:
> >> > https://pagure.io/rpkg/pull-request/597
> >> >
> >> > $ fedpkg mockbuild
> >> > Not downloading already downloaded pspg-5.5.2.tar.gz
> >> >
> >> > setting SOURCE_DATE_EPOCH=1639353600
> >> > Wrote: /tmp/pspg/pspg-5.5.2-1.el8.src.rpm
> >> > ERROR: Could not find required config file: /etc/mock/epel-8-x86_64.cfg
> >> > ERROR: There are those alternatives:
> >> > ERROR:
> >> > ERROR: [1] alma+epel-8-x86_64
> >> > ERROR:     Use instead: mock -r alma+epel-8-x86_64 --resultdir 
> >> > /tmp/pspg/results_pspg/5.5.2/1.el8 --rebuild 
> >> > /tmp/pspg/pspg-5.5.2-1.el8.src.rpm
> >> > ERROR:     Builds against AlmaLinux 8 repositories, together with the 
> >> > official EPEL repositories.
> >> > ERROR:     Project page: https://almalinux.org/
> >> > ERROR:     Enable permanently by:
> >> > ERROR:     $ ln -s /etc/mock/alma+epel-8-x86_64.cfg 
> >> > /home/praiskup/.config/mock/epel-8-x86_64.cfg
> >> > ERROR:
> >> > ERROR: [2] centos+epel-8-x86_64
> >> > ERROR:     Use instead: mock -r centos+epel-8-x86_64 --resultdir 
> >> > /tmp/pspg/results_pspg/5.5.2/1.el8 --rebuild 
> >> > /tmp/pspg/pspg-5.5.2-1.el8.src.rpm
> >> > ERROR:     Builds against CentOS Linux 8 repositories, together with the 
> >> > official EPEL repositories.
> >> > ERROR:     This will reach end-of-life in January 2021.
> >> > ERROR:     Enable permanently by:
> >> > ERROR:     $ ln -s /etc/mock/centos+epel-8-x86_64.cfg 
> >> > /home/praiskup/.config/mock/epel-8-x86_64.cfg
> >> > ERROR:
> >> > ERROR: [3] rhel+epel-8-x86_64
> >> > ERROR:     Use instead: mock -r rhel+epel-8-x86_64 --resultdir 
> >> > /tmp/pspg/results_pspg/5.5.2/1.el8 --rebuild 
> >> > /tmp/pspg/pspg-5.5.2-1.el8.src.rpm
> >> > ERROR:     Builds against Red Hat Enterprise Linux 8 repositories, 
> >> > together with the official EPEL repositories.
> >> > ERROR:     This mimics what is done in the official EPEL build system, 
> >> > but you need a Red Hat subscription:
> >> > ERROR:     
> >> > https://rpm-software-management.github.io/mock/Feature-rhelchroots
> >> > ERROR:     Enable permanently by:
> >> > ERROR:     $ ln -s /etc/mock/rhel+epel-8-x86_64.cfg 
> >> > /home/praiskup/.config/mock/epel-8-x86_64.cfg
> >> > ERROR:
> >> > ERROR: [4] rocky+epel-8-x86_64
> >> > ERROR:     Use instead: mock -r rocky+epel-8-x86_64 --resultdir 
> >> > /tmp/pspg/results_pspg/5.5.2/1.el8 --rebuild 
> >> > /tmp/pspg/pspg-5.5.2-1.el8.src.rpm
> >> > ERROR:     Builds against Rocky Linux 8 repositories, together with the 
> >> > official EPEL repositories.
> >> > ERROR:     Project page: https://rockylinux.org/
> >> > ERROR:     Enable permanently by:
> >> > ERROR:     $ ln -s /etc/mock/rocky+epel-8-x86_64.cfg 
> >> > /home/praiskup/.config/mock/epel-8-x86_64.cfg
> >> > Could not execute mockbuild: Failed to execute command.
> >> >
> >>
> >> This is why I suggested that fedpkg needed the alias system instead of
> >> mock in the EPEL discussion. fedpkg already has a config file format
> >> for setting keys and values, so fedpkg should be extended to allow
> >> people to set the distro prefix to search for with epel targets (e.g.
> >> alma, rhel, centos-stream, etc.). Mock is basically the "dumb builder"
> >> whereas fedpkg is the high-level packager Swiss Army Knife tool to get
> >> stuff done.
> >
> >Well, my opinion is quite the opposite:  IMO it would be better if
> >fedpkg/pyrpkg know *nothing* about mock configuration (location, etc.).
> >
> >The fact that this logic is implemented in fedpkg/pyrpkg/rhpkg/etc. makes
> >this fix complicated.  And searching for the available Mock configs will 
> >become
> >super complicated once we move the configs from /etc/mock to /usr/share).
>
> I agree here.  fedpkg/pyrpkg should be disconnected from mock as much as
> possible.  This may not be achievable overnight, but it's something that I
> think is worth pursuing.  It should be easy to adapt fedpkg to build backends
> other than mock and likewise it should be easy to change mock out for
> something else if we ever deem that necessary.
>
> >Also note that I for one have never used 'fedpkg mockbuild' for real.  I use
> >plain mock.  That said, I find the error message quite appropriate in Mock,
> >too.
>
> Me either.  I run mock by itself before ultimately submitting builds using
> fedpkg.
>

I always use "fedpkg mockbuild" because it takes care of things like
fetching sources and configuring a local resultdir and such. It's nice
sugar on top of Mock itself.



-- 
真実はいつも一つ!/ 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 on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to