Compare commits

..

No commits in common. 'c9' and 'i10c' have entirely different histories.
c9 ... i10c

@ -1 +1 @@
3e6ab5121dcfe5ff9f8b0503becfcf687d5d4434 SOURCES/dtc-1.6.0.tar.xz
19a95204dd787b4809886db15655082cb28718e9 SOURCES/dtc-1.7.0.tar.xz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/dtc-1.6.0.tar.xz
SOURCES/dtc-1.7.0.tar.xz

@ -0,0 +1,33 @@
From c2f48c8694e77d619b1497daa8e6fd2bd3a78c9b Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 28 Jun 2024 02:51:00 -0400
Subject: [PATCH] pylibfdt/Makefile.pylibfdt: Use CFLAGS when building module
Building python module do not use CLFAGS properly and so produced
files are missing some flags.
Adding explicit setting of CFLAGS environment variable to ensure
all flags are used. We just need to disable Werror flag that is causing
build to fiail.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
pylibfdt/Makefile.pylibfdt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt
index 82f565e..992ef6a 100644
--- a/pylibfdt/Makefile.pylibfdt
+++ b/pylibfdt/Makefile.pylibfdt
@@ -17,7 +17,7 @@ endif
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP)
@$(VECHO) PYMOD $@
- $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=$(PYLIBFDT_dir)
+ CFLAGS="$(CFLAGS) -Wno-error" $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext
install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB
--
2.39.3

@ -0,0 +1,63 @@
From 418bb0eb622691af31b1b638ce287fc85fac16b2 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 1 Nov 2024 07:44:36 -0400
Subject: [PATCH 1/2] pylibfdt/libfdt.i: Use SWIG_AppendOutput
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
RH-MergeRequest: 2: Fix build in RHEL 10
RH-Jira: RHEL-64318 RHEL-65448
RH-Commit: [1/2] 7874ef09ebd58c2591e42cebe821dc6b20719dc3 (mrezanin/centos-src-dtc)
Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.
| /home/flk/poky/build-hypr/tmp/work/x86_64-linux/python3-dtc-native/1.7.0/git/pylibfdt/libfdt_wrap.c: In function _wrap_fdt_next_node:
| /home/flk/poky/build-hypr/tmp/work/x86_64-linux/python3-dtc-native/1.7.0/git/pylibfdt/libfdt_wrap.c:5598:17: error: too few arguments to function SWIG_Python_AppendOutput
| 5598 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
pylibfdt/libfdt.i | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
index 2361e22..e04053e 100644
--- a/pylibfdt/libfdt.i
+++ b/pylibfdt/libfdt.i
@@ -1080,7 +1080,7 @@ typedef uint32_t fdt32_t;
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
buff = PyByteArray_FromStringAndSize(
(const char *)($1 + 1), fdt32_to_cpu($1->len));
- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
+ resultobj = SWIG_AppendOutput(resultobj, buff);
}
}
@@ -1121,7 +1121,7 @@ typedef uint32_t fdt32_t;
%typemap(argout) int *depth {
PyObject *val = Py_BuildValue("i", *arg$argnum);
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
+ resultobj = SWIG_AppendOutput(resultobj, val);
}
%apply int *depth { int *depth };
@@ -1137,7 +1137,7 @@ typedef uint32_t fdt32_t;
if (PyTuple_GET_SIZE(resultobj) == 0)
resultobj = val;
else
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
+ resultobj = SWIG_AppendOutput(resultobj, val);
}
}
--
2.39.3

@ -1,15 +1,41 @@
%global with_mingw 0
%if 0%{?fedora}
%global with_mingw 1
%endif
%undefine _auto_set_build_flags
Name: dtc
Version: 1.6.0
Release: 7%{?dist}
Version: 1.7.0
Release: 12%{?dist}
Summary: Device Tree Compiler
License: GPLv2+
License: GPL-2.0-or-later
URL: https://devicetree.org/
Source0: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
Patch1: 0001-pylibfdt-Makefile.pylibfdt-Use-CFLAGS-when-building-.patch
# For RHEL-64318 - [RHEL10][CS10] dtc fails to build with Swig 4.3.0
Patch2: dtc-pylibfdt-libfdt.i-Use-SWIG_AppendOutput.patch
BuildRequires: gcc make
BuildRequires: flex bison swig
BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-wheel
%if %{with_mingw}
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc-c++
BuildRequires: meson
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc-c++
%endif
%description
Devicetree is a data structure for describing hardware. Rather than hard coding
@ -48,20 +74,73 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-libfdt
This package provides python2 bindings for libfdt
%if %{with_mingw}
%package -n mingw32-libfdt
Summary: MinGW Device tree library
BuildArch: noarch
%description -n mingw32-libfdt
libfdt is a library to process Open Firmware style device trees on various
architectures.
%package -n mingw32-libfdt-static
Summary: Static version of MinGW Device tree library
Requires: mingw32-libfdt = %{version}-%{release}
BuildArch: noarch
%description -n mingw32-libfdt-static
This package provides the static library of mingw32-libfdt
%package -n mingw64-libfdt
Summary: MinGW Device tree library
BuildArch: noarch
%description -n mingw64-libfdt
libfdt is a library to process Open Firmware style device trees on various
architectures.
%package -n mingw64-libfdt-static
Summary: Static version of MinGW Device tree library
Requires: mingw64-libfdt = %{version}-%{release}
BuildArch: noarch
%description -n mingw64-libfdt-static
This package provides the static library of mingw64-libfdt
%{?mingw_debug_package}
%endif
%prep
%autosetup -p1
sed -i 's/python2/python3/' pylibfdt/setup.py
# to prevent setuptools from installing an .egg, we need to pass --root to setup.py install
# since $(PREFIX) already contains %%{buildroot}, we set root to /
# .eggs are going to be deprecated, see https://github.com/pypa/pip/issues/11501
sed -i 's@--prefix=$(PREFIX)@--prefix=$(PREFIX) --root=/@' pylibfdt/Makefile.pylibfdt
%build
%{make_build} EXTRA_CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{make_build} EXTRA_CFLAGS="%{build_cflags} -Wno-redundant-decls -Wno-cast-qual -Wno-missing-prototypes" LDFLAGS="%{build_ldflags}"
%if %{with_mingw}
%mingw_meson -Dtools=false
%mingw_ninja
%endif
%install
%{make_install} DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir}
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{make_install} DESTDIR=%{buildroot} PREFIX=%{buildroot}/%{_prefix} \
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} \
EXTRA_CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}"
# we don't want ftdump and it conflicts with freetype-demos, so drop it (rhbz 797805)
rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
%if %{with_mingw}
%mingw_ninja_install
%mingw_debug_install_post
%endif
%ldconfig_scriptlets -n libfdt
%files
@ -71,7 +150,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
%files -n libfdt
%license GPL
%{_libdir}/libfdt-1.6.0.so
%{_libdir}/libfdt-%{version}.so
%{_libdir}/libfdt.so.*
%files -n libfdt-static
@ -82,20 +161,108 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
%{_includedir}/*
%files -n python3-libfdt
%{python3_sitearch}/*
%{python3_sitearch}/libfdt-%{version}-py%{python3_version}.egg-info/
%{python3_sitearch}/_libfdt%{python3_ext_suffix}
%pycached %{python3_sitearch}/libfdt.py
%if %{with_mingw}
%files -n mingw32-libfdt
%license GPL
%{mingw32_bindir}/libfdt-1.dll
%{mingw32_includedir}/*fdt*.h
%{mingw32_libdir}/libfdt.dll.a
%{mingw32_libdir}/pkgconfig/libfdt.pc
%files -n mingw32-libfdt-static
%{mingw32_libdir}/libfdt.a
%files -n mingw64-libfdt
%license GPL
%{mingw64_bindir}/libfdt-1.dll
%{mingw64_includedir}/*fdt*.h
%{mingw64_libdir}/libfdt.dll.a
%{mingw64_libdir}/pkgconfig/libfdt.pc
%files -n mingw64-libfdt-static
%{mingw64_libdir}/libfdt.a
%endif
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.0-7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.7.0-12
- Rebuilt for MSVSphere 10
* Tue Nov 12 2024 Miroslav Rezanina <mrezanin@redhat.com> - 1.7.0-12
- dtc-pylibfdt-libfdt.i-Use-SWIG_AppendOutput.patch [RHEL-64318 RHEL-65448]
- dtc-Disable-problematic-waring-flags.patch [RHEL-64318 RHEL-65448]
- Resolves: RHEL-64318
([RHEL10][CS10] dtc fails to build with Swig 4.3.0)
- Resolves: RHEL-65448
([RHEL10][CS10][FTBFS] dtc fails to build on CS10 and RHEL10)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.7.0-11
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Jun 28 2024 Miroslav Rezanina <mrezanin@redhat.com> - 1.7.0-10
- Fix missing dynamic tags for aarch64 python3 pylibfdt
- Resolves: RHEL-33493
(Annocheck FAIL: bind-now (dtc))
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.7.0-9
- Bump release for June 2024 mass rebuild
* Mon May 27 2024 Miroslav Rezanina <mrezanin@redhat.com> - 1.7.0-8
- dtc-Properly-harden-built-packages.patch [RHEL-33493]
- Resolves: RHEL-33493
(Annocheck FAIL: bind-now (dtc))
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Sep 27 2023 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-5
- Don't install a Python .egg
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 05 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.7.0-3
- Rebuilt for Python 3.12
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1.7.0-2
- Rebuilt for Python 3.12
* Mon Mar 20 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0
* Mon Feb 13 2023 Josh Boyer <jwboyer@fedoraproject.org> - 1.6.1-8
- migrated to SPDX license
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Sep 14 2022 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.6.1-6
- Add mingw sub-packages. Fixes rhbz#1997511
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.6.1-4
- Rebuilt for Python 3.11
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 23 2021 Miroslav Rezanina <mrezanin@redhat.com> - 1.6.0-6
- Gating rebuild [bz#1974188]
- Resolves: bz#1974188
(Define tests, including gating tests, for dtc)
* Tue Jun 08 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.6.1-1
- Update to 1.6.1
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.0-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.0-5
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save