Re: RPM packaging help

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

 



On Mon Aug 14, 2023 at 12:49 +0200, Bob Mauchin wrote:
> On Sun, 13 Aug 2023, 21:39 Maxwell G, <maxwell@xxxxxxx> wrote:
>
> > > %build
> > > %if %{with bundled}
> > > export GO111MODULE=on
> > > export GOFLAGS=-mod=vendor
> > > %endif
> >
> > I think you can remove these GO* exports.
> >
> >
> >
> >
>
> Why though? If we vendor the stuff, wouldn't it be better to run on Go
> modules to be closer to upstream?

If you want to run in Go modules mode,
you need

-export GO111MODULE=on
+%global gomodulesmode GO111MODULE=off

Due to $SHENANIGANS, the macros ignore the value of the GO111MODULE env
var and only read from the macro.
We could probably fix this, but we'd have to make sure it doesn't break
existing packages that `export GO111MODULE` which is currently a NOOP.

> We should move all the ecosystem to go modules but ENOTIME.

Yeah...

> > > Now we need to add the Python parts. This is actually way more tricky
> > because the Python
> > > macros are not designed
> > > to work with multiple packages inside one repo. It can handles "extra"
> > packages but not
> > > independent packages.
> >
> > > We have added some logic to handle separate record files for each
> > package.
> >
> > Hmm, you shouldn't need to do that.
> >
> >
> >
> >
>
> I don't know, I think it is better to use the Python guidelines and macros
> if possible.

Yes, but redefining the macro instead of doing it manually as the
maintainers recommend for more complicated usecases doesn't accomplish
this.


> > > # Generated by go2rpm 1.9.0
> > > %bcond_without check
> > > %bcond_without bundled
> > > %bcond_without golang_library
> > > %if %{defined rhel}
> > > %bcond_without bundled
> > > %endif
> > > %if %{with bundled}
> > > %bcond_with golang_library
> > > %endif
> >
> > would be better written as
> >
> > %bcond check 1
> > %bcond bundled 1
> > %bcond golang_library %{without bundled}
> >
> >
> >
>
> I need to read the doc regarding bcond compared to bcond_without.

See
https://rpm-software-management.github.io/rpm/manual/conditionalbuilds.html.

-- 
Best,

Maxwell G (@gotmax23)
Pronouns: He/They
_______________________________________________
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, report it: https://pagure.io/fedora-infrastructure/new_issue




[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