`SPECS-EXTENDED` regression fixes: `efi-rpm-macros`, `libftdi`, and `python-mccabe`. (#3062)

This commit is contained in:
Pawel Winogrodzki 2022-05-26 09:35:02 -07:00 коммит произвёл GitHub
Родитель bd04d2c953
Коммит 8c17a38e22
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 158 добавлений и 144 удалений

Просмотреть файл

@ -1,5 +1,5 @@
{
"Signatures": {
"efi-rpm-macros-4.tar.bz2": "1cfb087532e591b78b967969180ef392f13c7404db6fba097a0d753e596fee92"
"efi-rpm-macros-4.tar.gz": "896865fd477441f74c0cbbc971f4622a91c1605041fd5a9127b02cc329b778ac"
}
}

Просмотреть файл

@ -1,42 +1,45 @@
%global debug_package %{nil}
%global _efi_vendor_ %(eval echo $(sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' %{_sysconfdir}/os-release))
Summary: Common RPM Macros for building EFI-related packages
Name: efi-rpm-macros
Version: 4
Release: 6%{?dist}
License: GPLv3
Vendor: Microsoft Corporation
Distribution: Mariner
Summary: Common RPM Macros for building EFI-related packages
Name: efi-rpm-macros
Version: 4
Release: 5%{?dist}
License: GPLv3+
URL: https://github.com/rhboot/%{name}/
BuildRequires: git sed
BuildRequires: bash
BuildArch: noarch
URL: https://github.com/rhboot/%{name}/
Source0: https://github.com/rhboot/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-4.tar.bz2
BuildArch: noarch
%global debug_package %{nil}
%global _efi_vendor_ %(eval echo $(sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release))
BuildRequires: %{_sysconfdir}/os-release
BuildRequires: bash
BuildRequires: git
BuildRequires: sed
%description
%{name} provides a set of RPM macros for use in EFI-related packages.
%package -n efi-srpm-macros
Summary: Common SRPM Macros for building EFI-related packages
BuildArch: noarch
Requires: rpm
Summary: Common SRPM Macros for building EFI-related packages
Requires: rpm
%description -n efi-srpm-macros
efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages.
%package -n efi-filesystem
Summary: The basic directory layout for EFI machines
BuildArch: noarch
Requires: filesystem
Summary: The basic directory layout for EFI machines
Requires: filesystem
%description -n efi-filesystem
The efi-filesystem package contains the basic directory layout for EFI
machine bootloaders and tools.
%prep
%autosetup -S git -n %{name}-4
%autosetup -S git
git config --local --add efi.vendor "%{_efi_vendor_}"
git config --local --add efi.esp-root /boot/efi
git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
@ -47,14 +50,7 @@ git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
%install
%make_install SHELL=/bin/bash
#%%files
#%%{!?_licensedir:%%global license %%%%doc}
#%%license LICENSE
#%%doc README
#%%{_rpmmacrodir}/macros.efi
%files -n efi-srpm-macros
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README
%{_rpmmacrodir}/macros.efi-srpm
@ -68,6 +64,10 @@ git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
%dir /boot/efi/EFI/%{_efi_vendor_}
%changelog
* Wed May 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 4-6
- Fixing package build by adding an explicit BR on '/etc/os-release'.
- License verified.
* Mon Jun 07 2021 Thomas Crain <thcrain@microsoft.com> - 4-5
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
- Set shell to bash during make invocations, since the Makefile uses bash built-in commands

Просмотреть файл

@ -0,0 +1,44 @@
From cdb28383402d248dbc6062f4391b038375c52385 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 17 Jul 2020 21:25:03 +0200
Subject: [PATCH] CMakeLists.txt: fix paths when FTDIPP is set
Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP
is enabled as suggested by Aurelien Jarno in
http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html
Without this change, the libftdi1.pc config file defines the include
path as /usr/local/include/libftdipp1 while the ftdi.h file is actually
installed in /usr/local/include/libftdi1
This is an issue for example for libsigrok which will fail on:
In file included from src/hardware/asix-sigma/protocol.c:27:
src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory
28 | #include <ftdi.h>
| ^~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5aecafc..3b0b87c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,7 +136,7 @@ endif ()
add_subdirectory(src)
if ( FTDIPP )
- project(libftdipp1 C CXX)
+ project(libftdi1 C CXX)
add_subdirectory(ftdipp)
endif ()
if ( PYTHON_BINDINGS )
--
1.7.1

Просмотреть файл

@ -1,21 +0,0 @@
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,3 +1,7 @@
+# swig_add_module is deprecated and SWIG_MODULE_<target>_REAL_NAME is no
+# longer set by default so set policy to the old behavior.
+cmake_policy(SET CMP0078 OLD)
+
option ( PYTHON_BINDINGS "Build python bindings via swig" ON )
option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON )
@@ -24,8 +28,9 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND
if ( DOCUMENTATION AND DOXYGEN_FOUND )
set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND})
+ set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i)
endif()
- swig_add_module ( ftdi1 python ftdi1.i )
+ swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i )
swig_link_libraries ( ftdi1 ftdi1 )
if ( LINK_PYTHON_LIBRARY )

Просмотреть файл

@ -1,5 +1,5 @@
{
"Signatures": {
"libftdi1-1.4.tar.bz2": "ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74"
"libftdi1-1.5.tar.bz2": "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
}
}

Просмотреть файл

@ -1,69 +1,70 @@
Summary: Library to program and control the FTDI USB controller
Name: libftdi
Version: 1.5
Release: 1%{?dist}
License: BSD and GPLv2
Vendor: Microsoft Corporation
Distribution: Mariner
Name: libftdi
Version: 1.4
Release: 3%{?dist}
Summary: Library to program and control the FTDI USB controller
URL: https://www.intra2net.com/en/developer/libftdi/
Source0: https://www.intra2net.com/en/developer/%{name}/download/%{name}1-%{version}.tar.bz2
# http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30
Patch0: libftdi-1.5-fix_pkgconfig_path.patch
License: LGPLv2
URL: http://www.intra2net.com/de/produkte/opensource/ftdi/
Source0: http://www.intra2net.com/en/developer/%{name}/download/%{name}1-%{version}.tar.bz2
# Swig requirements have changed in newer versions of CMake.
# This has been reported to the mailing list
Patch0: libftdi-cmake_swig.patch
BuildRequires: cmake3 gcc-c++
BuildRequires: doxygen
BuildRequires: boost-devel
BuildRequires: libconfuse-devel
BuildRequires: libusbx-devel
BuildRequires: python3-devel
BuildRequires: swig
Requires: systemd
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libconfuse-devel
BuildRequires: libusbx-devel
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: swig
BuildRequires: systemd
Requires: systemd
%description
A library (using libusb) to talk to FTDI's FT2232C,
FT232BM and FT245BM type chips including the popular bitbang mode.
%package devel
Summary: Header files and static libraries for libftdi
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-%{name}%{?_isa} = %{version}-%{release}
Summary: Header files and static libraries for libftdi
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake-filesystem
Requires: python3-%{name}%{?_isa} = %{version}-%{release}
%description devel
Header files and static libraries for libftdi
%package -n python3-libftdi
%{?python_provide:%python_provide python3-libftdi}
Summary: Libftdi library Python 3 binding
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Libftdi library Python 3 binding
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-libftdi
Libftdi Python 3 Language bindings.
%package c++
Summary: Libftdi library C++ binding
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Libftdi library C++ binding
Requires: %{name}%{?_isa} = %{version}-%{release}
%description c++
Libftdi library C++ language binding.
%package c++-devel
Summary: Libftdi library C++ binding development headers and libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-c++ = %{version}-%{release}
Summary: Libftdi library C++ binding development headers and libraries
Requires: %{name}-c++ = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
%description c++-devel
Libftdi library C++ binding development headers and libraries
for building C++ applications with libftdi.
%prep
%autosetup -p1 -n %{name}1-%{version}
@ -72,31 +73,16 @@ sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules
%build
export CMAKE_PREFIX_PATH=%{_prefix}
mkdir build-py3 && pushd build-py3
%{cmake3} -DPython_ADDITIONAL_VERSIONS=%{python3_version} -DLIB_SUFFIX:STRING="" ..
%make_build
popd
# Fix python sheband lines
find python/examples -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} +
%cmake -DSTATICLIBS=off -DFTDIPP=on -DPYTHON_BINDINGS=on -DDOCUMENTATION=on -DLIB_SUFFIX:STRING="" .
%cmake_build
%install
pushd build-py3
%make_install
popd
%cmake_install
mkdir -p %{buildroot}/lib/udev/rules.d/
install -pm 0644 packages/99-libftdi.rules %{buildroot}/lib/udev/rules.d/69-libftdi.rules
install -D -pm 0644 packages/99-libftdi.rules %{buildroot}%{_udevrulesdir}/69-libftdi.rules
find %{buildroot} -type f -name "*.la" -delete
find %{buildroot} -type f -name "*.a" -delete
#no man install
mkdir -p %{buildroot}%{_mandir}/man3
install -pm 0644 build-py3/doc/man/man3/*.3 %{buildroot}%{_mandir}/man3
mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
install -pm 0644 packages/99-libftdi.rules %{buildroot}%{_libdir}/udev/rules.d/69-libftdi.rules
# Cleanup examples
rm -f %{buildroot}%{_bindir}/simple
@ -109,9 +95,9 @@ rm -f %{buildroot}%{_bindir}/find_all_pp
rm -f %{buildroot}%{_bindir}/baud_test
rm -f %{buildroot}%{_bindir}/serial_read
rm -f %{buildroot}%{_bindir}/serial_test
rm -rf %{buildroot}%{_libdir}/cmake*
rm -rf %{buildroot}%{_datadir}/doc/libftdi1/example.conf
rm -f %{buildroot}%{_docdir}/libftdi1/example.conf
rm -f %{buildroot}%{_docdir}/libftdipp1/example.conf
%check
@ -119,20 +105,20 @@ rm -rf %{buildroot}%{_datadir}/doc/libftdi1/example.conf
%files
%license COPYING.LIB
%doc AUTHORS ChangeLog README
%license COPYING-CMAKE-SCRIPTS COPYING.LIB
%{_libdir}/libftdi1.so.2*
/lib/udev/rules.d/69-libftdi.rules
%{_udevrulesdir}/69-libftdi.rules
%files devel
%doc build-py3/doc/html
%doc AUTHORS ChangeLog
%doc %{_datadir}/libftdi/examples
%dir %{_includedir}/libftdi1
%{_bindir}/ftdi_eeprom
%{_bindir}/libftdi1-config
%{_includedir}/libftdi1/*.h
%{_libdir}/libftdi1.so
%{_includedir}/libftdi1
%{_libdir}/pkgconfig/libftdi1.pc
%{_mandir}/man3/*
%{_libdir}/cmake/libftdi1/
%files -n python3-libftdi
%{python3_sitearch}/*
@ -143,15 +129,18 @@ rm -rf %{buildroot}%{_datadir}/doc/libftdi1/example.conf
%files c++-devel
%{_libdir}/libftdipp1.so
%{_includedir}/libftdi1/*hpp
%{_includedir}/libftdi1/*.hpp
%{_libdir}/pkgconfig/libftdipp1.pc
%ldconfig_scriptlets
%ldconfig_scriptlets c++
%changelog
* Wed May 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.5-1
- Updating to 1.5 using Fedora 36 (license: MIT) for guidance.
- License verified.
* Wed Jun 02 2021 Thomas Crain <thcrain@microsoft.com> - 1.4-3
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
- Explicitly set an empty libdir suffix for CMake

Просмотреть файл

@ -1,17 +1,24 @@
%global modname mccabe
Summary: McCabe complexity checker
Name: python-%{modname}
Version: 0.6.1
Release: 18%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
%global modname mccabe
Name: python-%{modname}
Version: 0.6.1
Release: 17%{?dist}
Summary: McCabe complexity checker
License: MIT
URL: http://pypi.python.org/pypi/mccabe
Source0: https://files.pythonhosted.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz#/python-%{modname}-%{version}.tar.gz
BuildArch: noarch
URL: https://pypi.python.org/pypi/mccabe
Source0: https://files.pythonhosted.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz#/python-%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-runner
BuildRequires: python%{python3_pkgversion}-setuptools
%if %{with_check}
BuildRequires: python3-pip
BuildRequires: python3-pip
%endif
%description
@ -21,10 +28,8 @@ This module provides a plugin for flake8, the Python code
checker.
%package -n python%{python3_pkgversion}-%{modname}
Summary: McCabe checker, plugin for flake8
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
Summary: McCabe checker, plugin for flake8
%description -n python%{python3_pkgversion}-%{modname}
Ned's script to check McCabe complexity.
@ -32,23 +37,18 @@ Ned's script to check McCabe complexity.
This module provides a plugin for flake8, the Python code
checker.
%prep
%autosetup -n %{modname}-%{version}
%build
%py3_build
%install
%py3_install
%check
pip3 install pytest
%{__python3} -m pytest -v
python3 -m pytest -v
%files -n python%{python3_pkgversion}-%{modname}
%license LICENSE
@ -57,8 +57,10 @@ pip3 install pytest
%{python3_sitelib}/%{modname}-%{version}-*
%{python3_sitelib}/__pycache__/%{modname}.*
%changelog
* Wed May 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 0.6.1-18
- Bringing back removed BRs to fix package build.
* Thu Apr 28 2022 Muhammad Falak <mwani@microsoft.com> - 0.6.1-17
- Drop BR on pytest & pip install latest deps to enable ptest
- License verified

Просмотреть файл

@ -2739,7 +2739,7 @@
"other": {
"name": "efi-rpm-macros",
"version": "4",
"downloadUrl": "https://github.com/rhboot/efi-rpm-macros/releases/download/4/efi-rpm-macros-4.tar.bz2"
"downloadUrl": "https://github.com/rhboot/efi-rpm-macros/archive/refs/tags/4.tar.gz"
}
}
},
@ -8211,8 +8211,8 @@
"type": "other",
"other": {
"name": "libftdi",
"version": "1.4",
"downloadUrl": "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2"
"version": "1.5",
"downloadUrl": "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2"
}
}
},
@ -24294,9 +24294,9 @@
"component": {
"type": "other",
"other": {
"name": "sdparm",
"version": "1.11",
"downloadUrl": "http://sg.danny.cz/sg/p/sdparm-1.11.tgz"
"name": "sdbus-cpp",
"version": "1.1.0",
"downloadUrl": "https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v1.1.0.tar.gz"
}
}
},
@ -24304,9 +24304,9 @@
"component": {
"type": "other",
"other": {
"name": "sdbus-cpp",
"version": "1.1.0",
"downloadUrl": "https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v1.1.0.tar.gz"
"name": "sdparm",
"version": "1.11",
"downloadUrl": "http://sg.danny.cz/sg/p/sdparm-1.11.tgz"
}
}
},