The package rpms/switchtec.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/switchtec.git/commit/?id=2d4083acb74....
Change: +%ifarch s390x
Thanks.
Full change: ============
commit 2d4083acb74423556345bb0fedf2547cfc972608 Author: Davide Cavalca dcavalca@fedoraproject.org Date: Wed Jun 29 08:13:41 2022 -0700
Initial import; Fixes: RHBZ#2057654
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc0f938 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/switchtec-user-3.1.tar.gz diff --git a/316.patch b/316.patch new file mode 100644 index 0000000..7fbb75e --- /dev/null +++ b/316.patch @@ -0,0 +1,22 @@ +From 2d61587f85d1bf57287d12b470afb94c0bf9249d Mon Sep 17 00:00:00 2001 +From: Davide Cavalca dcavalca@fedoraproject.org +Date: Mon, 27 Jun 2022 16:54:35 -0700 +Subject: [PATCH] cli: Fix format security warning + +--- + cli/graph.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cli/graph.c b/cli/graph.c +index 5748914b..95609ded 100644 +--- a/cli/graph.c ++++ b/cli/graph.c +@@ -134,7 +134,7 @@ static void draw_status(WINDOW *win, int x_off, int x_cnt, const char *status) + mvwprintw(win, 0, 0, " "); + for (i = 0; i < x_cnt * 2 + x_off; i++) + mvwaddch(win, 1, i, ' '); +- mvwprintw(win, 1, x_off, status); ++ mvwprintw(win, 1, x_off, "%s", status); + wrefresh(win); + } + diff --git a/sources b/sources new file mode 100644 index 0000000..71d0148 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (switchtec-user-3.1.tar.gz) = 5c591e8f9b2fd4ae232f57c95d384300b5804e2ff9e6e190922fed4f43a1e1e45789fe18cc650cae923a7f98a8c78cfd4c6ff694ec1c9097a02e6ef7521951ad diff --git a/switchtec.spec b/switchtec.spec new file mode 100644 index 0000000..a9f932d --- /dev/null +++ b/switchtec.spec @@ -0,0 +1,98 @@ +%global srcname switchtec-user + +Name: switchtec +Version: 3.1 +Release: %autorelease +Summary: Userspace code for the Microsemi PCIe switch + +License: MIT +URL: https://github.com/Microsemi/switchtec-user +Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz +# cli: Fix format security warning +Patch: https://github.com/Microsemi/switchtec-user/pull/316.patch + +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: gcc +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: openssl-devel + +Suggests: bash-completions + +%description +Easy to use CLI and C library for communicating with Microsemi's Switchtec +management interface. + +%package libs +Summary: Shared Libraries for %{name} + +%description libs +This package contains shared libraries for %{name}. + +%package devel +Summary: Development headers and libraries for %{name} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description devel +This package contains development headers and libraries for %{name}. + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch + +%description doc +This package contains additional documentation for %{name}. + +%prep +%autosetup -n %{srcname}-%{version} -p1 + +%build +%configure +# https://bugzilla.redhat.com/show_bug.cgi?id=2057636 +%ifarch s390x +%make_build WINDRES= +%else +%make_build +%endif +%make_build -C doc + +%install +%make_install \ + PREFIX="%{_prefix}" \ + LIBDIR="%{buildroot}%{_libdir}" \ +%ifarch s390x + WINDRES= \ +%endif + LDCONFIG=/bin/true + +# Relocate bash completion config +install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \ + %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} +rm -r %{buildroot}%{_sysconfdir} + +# We don't want static libraries +rm %{buildroot}%{_libdir}/*.a + +%files +%license LICENSE +%doc README.md +%{_bindir}/%{name} +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/%{name} + +%files libs +%license LICENSE +%{_libdir}/lib%{name}.so.3* + +%files devel +%{_includedir}/%{name} +%{_libdir}/lib%{name}.so + +%files doc +%license LICENSE +%doc doc/doxygen/html + +%changelog +%autochangelog
arch-excludes@lists.fedoraproject.org