The package rpms/fedora-coreos-config-transpiler.git has added or updated architecture
specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/fedora-coreos-config-transpiler.g....
Change:
-ExclusiveArch: %{go_arches} noarch
Thanks.
Full change:
============
commit ba7a0d6fc68869e9a2300f8eba54a6c0090cabf1
Author: Benjamin Gilbert <bgilbert(a)redhat.com>
Date: Sat Feb 1 01:01:53 2020 -0500
Avoid incorrect separate noarch build in koji
This is the real fix for the broken noarch builds; drop the
_binaries_in_noarch_packages_terminate_build override.
diff --git a/fedora-coreos-config-transpiler.spec b/fedora-coreos-config-transpiler.spec
index 3f65ab7..647b664 100644
--- a/fedora-coreos-config-transpiler.spec
+++ b/fedora-coreos-config-transpiler.spec
@@ -2,9 +2,6 @@
# Manually modified for fcct 0.4.0
%bcond_without check
-# noarch -nonlinux subpackage contains non-executable binaries for other OSes
-%global _binaries_in_noarch_packages_terminate_build 0
-
#
https://github.com/coreos/fcct
%global goipath
github.com/coreos/fcct
Version: 0.4.0
@@ -19,7 +16,7 @@ for provisioning Fedora CoreOS machines.}
%global godocs docs README.md NEWS
Name: fedora-coreos-config-transpiler
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Fedora CoreOS Config Transpiler
# Upstream license specification: Apache-2.0
@@ -56,7 +53,6 @@ Provides: bundled(golang(gopkg.in/yaml.v3)) =
3.0.0-20191010095647.gitfc94e3f716
Summary: Fedora CoreOS Config Transpiler for macOS and Windows
License: ASL 2.0
BuildArch: noarch
-ExclusiveArch: %{go_arches} noarch
%description nonlinux
%{common_description}
@@ -108,6 +104,10 @@ install -p -m 0644 ./fcct-x86_64-pc-windows-gnu.exe
%{buildroot}%{_datadir}/fcct
%{_datadir}/fcct/fcct-x86_64-pc-windows-gnu.exe
%changelog
+* Sat Feb 01 2020 Benjamin Gilbert <bgilbert(a)redhat.com> - 0.4.0-3
+- Avoid incorrect separate noarch build in koji
+- Re-enable noarch package check; it was the wrong fix
+
* Fri Jan 31 2020 Benjamin Gilbert <bgilbert(a)redhat.com> - 0.4.0-2
- Disable noarch package check that was failing the build
commit f7c0daba8b93b0b446a39af3096eb3356203f396
Author: Benjamin Gilbert <bgilbert(a)redhat.com>
Date: Fri Jan 31 17:11:34 2020 -0500
Copy go-mods-to-bundled-provides.py from ignition dist-git
diff --git a/go-mods-to-bundled-provides.py b/go-mods-to-bundled-provides.py
new file mode 100755
index 0000000..3de621a
--- /dev/null
+++ b/go-mods-to-bundled-provides.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+
+'''
+ Tiny dumb script that generates virtual bundled `Provides` from a repo that
+ uses go modules and vendoring.
+'''
+
+import sys
+import re
+
+
+def main():
+ repos = get_repos_from_go_mod()
+ print_provides_from_modules_txt(repos)
+
+
+def get_repos_from_go_mod():
+ repos = {}
+ in_reqs = False
+ for line in open('go.mod'):
+ line = line.strip()
+ if in_reqs and line.startswith(')'):
+ break
+ if not in_reqs:
+ if line.startswith('require ('):
+ in_reqs = True
+ continue
+ req = line.split()
+
+ repo = req[0]
+ tag = req[1]
+
+ repos[repo] = go_mod_tag_to_rpm_provides_version(tag)
+
+ return repos
+
+
+def go_mod_tag_to_rpm_provides_version(tag):
+
+ # go.mod tags are either exact git tags, or may be "pseudo-versions". We
+ # want to convert these tags to something resembling a version string that
+ # RPM won't fail on. For more information, see
+ #
https://golang.org/cmd/go/#hdr-Pseudo_versions and following sections.
+
+ # trim off any +incompatible
+ if tag.endswith('+incompatible'):
+ tag = tag[:-len('+incompatible')]
+
+ # git tags are normally of the form v$VERSION
+ if tag.startswith('v'):
+ tag = tag[1:]
+
+ # is this a pseudo-version? e.g. v0.0.0-20181031085051-9002847aa142
+ m = re.match("(.*)-([0-9]{14})-([a-f0-9]{12})", tag)
+ if m:
+ # rpm doesn't like multiple dashes in the version, so just merge the
+ # timestamp and the commit checksum into the "release" field
+ tag = f"{m.group(1)}-{m.group(2)}.git{m.group(3)}"
+
+ return tag
+
+
+def print_provides_from_modules_txt(repos):
+
+ for line in open('vendor/modules.txt'):
+ if line.startswith('#'):
+ continue
+ gopkg = line.strip()
+ repo = lookup_repo_for_pkg(repos, gopkg)
+ if not repo:
+ # must be a pkg for tests only; ignore
+ continue
+ tag = repos[repo]
+ print(f"Provides: bundled(golang({gopkg})) = {tag}")
+
+
+def lookup_repo_for_pkg(repos, gopkg):
+ for repo in repos:
+ if gopkg.startswith(repo):
+ return repo
+
+
+if __name__ == '__main__':
+ sys.exit(main())
commit c3c23a5d1c72ffa3eb53957f186b66e5a1f3eb20
Author: Benjamin Gilbert <bgilbert(a)redhat.com>
Date: Fri Jan 31 16:58:47 2020 -0500
Disable noarch package check that was failing the build
diff --git a/fedora-coreos-config-transpiler.spec b/fedora-coreos-config-transpiler.spec
index 95f639d..3f65ab7 100644
--- a/fedora-coreos-config-transpiler.spec
+++ b/fedora-coreos-config-transpiler.spec
@@ -2,6 +2,9 @@
# Manually modified for fcct 0.4.0
%bcond_without check
+# noarch -nonlinux subpackage contains non-executable binaries for other OSes
+%global _binaries_in_noarch_packages_terminate_build 0
+
#
https://github.com/coreos/fcct
%global goipath
github.com/coreos/fcct
Version: 0.4.0
@@ -16,7 +19,7 @@ for provisioning Fedora CoreOS machines.}
%global godocs docs README.md NEWS
Name: fedora-coreos-config-transpiler
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fedora CoreOS Config Transpiler
# Upstream license specification: Apache-2.0
@@ -105,5 +108,8 @@ install -p -m 0644 ./fcct-x86_64-pc-windows-gnu.exe
%{buildroot}%{_datadir}/fcct
%{_datadir}/fcct/fcct-x86_64-pc-windows-gnu.exe
%changelog
+* Fri Jan 31 2020 Benjamin Gilbert <bgilbert(a)redhat.com> - 0.4.0-2
+- Disable noarch package check that was failing the build
+
* Thu Jan 30 2020 Benjamin Gilbert <bgilbert(a)redhat.com> - 0.4.0-1
- Initial package