#7 Drop ExclusiveArch, always build go-srpm-macros and go-filesystem
Merged 2 years ago by alexsaezm. Opened 2 years ago by churchyard.
rpms/ churchyard/go-rpm-macros eln_fix  into  rawhide

file modified
+27 -17
@@ -17,8 +17,6 @@ 

  # make Go devel packages archful

  %global gopath          %{_datadir}/gocode

  

- ExclusiveArch: %{golang_arches} %{gccgo_arches}

- 

  Name:      go-rpm-macros

  Release:   %autorelease

  Summary:   Build-stage rpm automation for Go packages
@@ -77,7 +75,7 @@ 

  %package -n go-rpm-templates

  Summary:   RPM spec templates for Go packages

  License:   MIT

- BuildArch: noarch

+ # go-rpm-macros only exists on some architectures, so this package cannot be noarch

  Requires:  go-rpm-macros = %{version}-%{release}

  #https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51

  #Requires:  redhat-rpm-templates
@@ -96,6 +94,13 @@ 

  done

  

  %install

+ install -m 0755 -vd   %{buildroot}%{rpmmacrodir}

+ 

+ install -m 0755 -vd   %{buildroot}%{_rpmluadir}/fedora/srpm

+ install -m 0644 -vp   rpm/lua/srpm/*lua \

+                       %{buildroot}%{_rpmluadir}/fedora/srpm

+ 

+ %ifarch %{golang_arches} %{gccgo_arches}

  # Some of those probably do not work with gcc-go right now

  # This is not intentional, but mips is not a primary Fedora architecture

  # Patches and PRs are welcome
@@ -110,12 +115,8 @@ 

  install -m 0755 -vd   %{buildroot}%{_bindir}

  install -m 0755 bin/* %{buildroot}%{_bindir}

  

- install -m 0755 -vd   %{buildroot}%{rpmmacrodir}

  install -m 0644 -vp   rpm/macros.d/macros.go-* \

                        %{buildroot}%{rpmmacrodir}

- install -m 0755 -vd   %{buildroot}%{_rpmluadir}/fedora/srpm

- install -m 0644 -vp   rpm/lua/srpm/*lua \

-                       %{buildroot}%{_rpmluadir}/fedora/srpm

  install -m 0755 -vd   %{buildroot}%{_rpmluadir}/fedora/rpm

  install -m 0644 -vp   rpm/lua/rpm/*lua \

                        %{buildroot}%{_rpmluadir}/fedora/rpm
@@ -124,6 +125,10 @@ 

                        %{buildroot}%{_rpmconfigdir}/fileattrs/

  install -m 0755 -vp   rpm/*\.{prov,deps} \

                        %{buildroot}%{_rpmconfigdir}/

+ %else

+ install -m 0644 -vp   rpm/macros.d/macros.go-srpm \

+                       %{buildroot}%{rpmmacrodir}

+ %endif

  

  %ifarch %{golang_arches}

  install -m 0644 -vp   rpm/macros.d/macros.go-compilers-golang \
@@ -135,6 +140,7 @@ 

                        %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-gcc

  %endif

  

+ %ifarch %{golang_arches} %{gccgo_arches}

  %files

  %license LICENSE.txt

  %doc README.md
@@ -146,16 +152,6 @@ 

  %{_rpmconfigdir}/macros.d/macros.go-compiler*

  %{_rpmluadir}/fedora/rpm/*.lua

  

- %files -n go-srpm-macros

- %license LICENSE.txt

- %doc README.md

- %{_rpmconfigdir}/macros.d/macros.go-srpm

- %{_rpmluadir}/fedora/srpm/*.lua

- 

- %files -n go-filesystem

- %dir %{gopath}

- %dir %{gopath}/src

- 

  %files -n go-rpm-templates

  %license LICENSE-templates.txt

  %doc README.md
@@ -164,5 +160,19 @@ 

  %dir %{_spectemplatedir}

  %{_spectemplatedir}/*.spec

  

+ %files -n go-filesystem

+ %dir %{gopath}

+ %dir %{gopath}/src

+ %endif

+ 

+ # we only build go-srpm-macros on all architectures

+ %files -n go-srpm-macros

+ %license LICENSE.txt

+ %doc README.md

+ %{_rpmconfigdir}/macros.d/macros.go-srpm

+ %{_rpmluadir}/fedora/srpm/*.lua

+ 

+ 

+ 

  %changelog

  %autochangelog

rebased onto 7475122

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Sorry it took so long to take a look at this, but this seems like the best approach to me. :thumbsup:

Why don't we just revert https://src.fedoraproject.org/rpms/go-rpm-macros/c/b1500ff47ee8cdd12f0dfda374e1c008f2899779?branch=rawhide entirely?

I suppose because there was a reason to include that?

Sorry, I should've clarified. That commit excludes this package from (building on) %{ix86} on RHEL and ELN. I was suggesting that we could just build the whole package (and the rest of the go stack) on %{ix86} on ELN, instead of splicing up the subpackages. It should be safe to revert that patch because RHEL has its own copy of the specfile. I suppose we could do both (revert that change and merge this PR).

It looks like this is what the rust ecosystem does, as well: rust-srpm-macros (buildroot macros) is available on all arches and rust-packaging is exclusive to %{rust_arches}.

Also, I don't think go-filesystem should be available on non %{golang_arches}.

Why don't we just revert https://src.fedoraproject.org/rpms/go-rpm-macros/c/b1500ff47ee8cdd12f0dfda374e1c008f2899779?branch=rawhide entirely?

I suppose because there was a reason to include that?

Sorry, I should've clarified. That commit excludes this package from (building on) %{ix86} on RHEL and ELN. I was suggesting that we could just build the whole package (and the rest of the go stack) on %{ix86} on ELN, instead of splicing up the subpackages. It should be safe to revert that patch because RHEL has its own copy of the specfile. I suppose we could do both (revert that change and merge this PR).

I still, don't understand, sorry. Are we talking RHEL 10 here? RHEL 9 is no longer relevant.

It looks like this is what the rust ecosystem does, as well: rust-srpm-macros (buildroot macros) is available on all arches and rust-packaging is exclusive to %{rust_arches}.

That is what is happening here.

Also, I don't think go-filesystem should be available on non %{golang_arches}.

That can be easily changed.

1 new commit added

  • Drop go-filesystem from non-go arches
2 years ago

2 new commits added

  • Drop go-filesystem from non-go arches
  • Drop ExclusiveArch, always build go-srpm-macros and go-filesystem
2 years ago

Also, I don't think go-filesystem should be available on non %{golang_arches}.

That can be easily changed.

Done in a separate commit. Can squash if preferred.


Is anybody of the package maintainers here? @alexsaezm @eclipseo @qulogic @jcajka

Is anybody of the package maintainers here? @alexsaezm @eclipseo @qulogic @jcajka

Sorry, not sure how I totally missed this. Taking a look at it.

Metadata Update from @alexsaezm:
- Request assigned

2 years ago

I still, don't understand, sorry. Are we talking RHEL 10 here? RHEL 9 is no longer relevant.

I was suggesting that we could avoid this whole problem by just building the whole go stack on 32-bit x86 on ELN in the first place.

That's definitely overkill. Building it on 32-bit x86 means an additional maintenance burden for a mostly-defunct architecture.

LGTM

cc @jcajka , what do you think?

Done in a separate commit. Can squash if preferred.

I would squash this, as each separate commit results in a release bump (thanks to rpmautospec).

Besides that, I'm on board with this now. LGTM. I pinged the maintainers on IRC to merge this.

rebased onto e8344ba

2 years ago

Build succeeded.

Pull-Request has been merged by alexsaezm

2 years ago
Metadata