From 06f817e869738289c1933402794e622e0058d9db Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 19:53:58 +0000 Subject: [PATCH 01/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 52359f1..dc13d84 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -184,6 +184,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 4.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 4.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From bbee2241bf44aceaf1eaa2f6e43d2591acda8f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 10:11:19 +0200 Subject: [PATCH 02/52] Rebuilt for Python 3.8 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index dc13d84..c5259a7 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -184,6 +184,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Mon Aug 19 2019 Miro Hrončok - 4.0.1-5 +- Rebuilt for Python 3.8 + * Wed Jul 24 2019 Fedora Release Engineering - 4.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 82c66729bacc205f1458a048a2d81397fa7cb760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 3 Oct 2019 13:51:32 +0200 Subject: [PATCH 03/52] Rebuilt for Python 3.8.0rc1 (#1748018) --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index c5259a7..f07f630 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -184,6 +184,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Thu Oct 03 2019 Miro Hrončok - 4.0.1-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + * Mon Aug 19 2019 Miro Hrončok - 4.0.1-5 - Rebuilt for Python 3.8 From 57fca6d4ffd36deb6b38b2848ebe6a9a15018402 Mon Sep 17 00:00:00 2001 From: rpmbuild Date: Thu, 10 Oct 2019 23:21:58 +0200 Subject: [PATCH 04/52] remove python2 package from fc32 --- capstone.spec | 82 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/capstone.spec b/capstone.spec index f07f630..2a3129d 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -18,7 +18,7 @@ URL: http://www.capstone-engine.org/ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Test suite binary samples to be used for disassembly -# Source1: +# Source1: # Fedora 29 makes python executable separate from python2 and python3. This patch makes # it possible to specify PYTHON2 and PYTHON3 binary to be explicit that by "python" we mean "python2" @@ -28,22 +28,31 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # See: https://github.com/aquynh/capstone/issues/1339 Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch -%if 0%{?fedora} > 12 +%global common_desc %{expand: +Capstone is a disassembly framework with the target of becoming the ultimate +disasm engine for binary analysis and reversing in the security community. +} + %global with_python3 1 -%else -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%bcond_with python2 +# Build also the python2 package +%if %{with python2} || (0%{?fedora} && 0%{?fedora} <= 31 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 ) +%global with_python2 1 %endif + %global srcname distribute BuildRequires: gcc BuildRequires: git +BuildRequires: jna +BuildRequires: java-devel + +%if 0%{?with_python2} BuildRequires: python2 BuildRequires: python2-devel BuildRequires: python2-setuptools -BuildRequires: jna -BuildRequires: java-devel +%endif # if with_python2 %if 0%{?with_python3} BuildRequires: python%{python3_pkgversion} @@ -54,17 +63,20 @@ BuildRequires: python%{python3_pkgversion}-setuptools %description -Capstone is a disassembly framework with the target of becoming the ultimate -disasm engine for binary analysis and reversing in the security community. +%{common_desc} %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel +%{common_desc} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. + + +%if 0%{?with_python2} %package -n python2-capstone %{?python_provide:%python_provide python2-capstone} # Remove before F30 @@ -75,40 +87,48 @@ Summary: Python bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-capstone +%{common_desc} The %{name}-python package contains python bindings for %{name}. +%endif # _with_python3 + + %if 0%{?with_python3} %package -n python%{python3_pkgversion}-capstone %{?python_provide:%python_provide python%{python3_pkgversion}-capstone} -# Remove before F30 Provides: %{name}-python%{python3_pkgversion} = %{version}-%{release} Provides: %{name}-python%{python3_pkgversion}%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python%{python3_pkgversion} < %{version}-%{release} -Summary: Python bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Python3 bindings for %{name} -Summary: Python3 bindings for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description -n python%{python3_pkgversion}-capstone +%description -n python%{python3_pkgversion}-capstone +%{common_desc} The %{name}-python3 package contains python3 bindings for %{name}. %endif # with_python3 + + %package java Summary: Java bindings for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description java +%{common_desc} The %{name}-java package contains java bindings for %{name}. + + %prep # autosetup -n %{gitname}-%{commit} -S git %autosetup -n %{gitname}-%{version} -S git + + %build -DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ +DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ make PYTHON2=%{__python2} PYTHON3=%{__python3} %{?_smp_mflags} @@ -117,9 +137,14 @@ sed -i 's;%{buildroot};;' capstone.pc grep -v archive capstone.pc > capstone.pc.tmp mv capstone.pc.tmp capstone.pc + # build python bindings pushd bindings/python + +%if 0%{?with_python2} CFLAGS="%{optflags}" %{__python2} setup.py build +%endif # with_python2 + %if 0%{?with_python3} CFLAGS="%{optflags}" %{__python3} setup.py build %endif # with_python3 @@ -130,6 +155,8 @@ pushd bindings/java make PYTHON2=%{__python2} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken popd + + %install DESTDIR=%{buildroot} LIBDIRARCH=%{_lib} \ INCDIR="%{_includedir}" make install @@ -138,7 +165,10 @@ find %{buildroot} -name '*.a' -exec rm -f {} ';' # install python bindings pushd bindings/python +%if 0%{?with_python2} %{__python2} setup.py install --skip-build --root %{buildroot} +%endif # with_python2 + %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root %{buildroot} %endif # with_python3 @@ -147,13 +177,18 @@ popd # install java bindings install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar + + #%check #ln -s libcapstone.so libcapstone.so.4 #make check LD_LIBRARY_PATH="`pwd`" + + %ldconfig_scriptlets + %files # %license does not work for RHEL<7 %if 0%{?rhel} || 0%{?fedora} < 21 @@ -165,14 +200,22 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_libdir}/*.so.* %{_bindir}/cstool + + %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/* + + +%if 0%{?with_python2} %files -n python2-capstone %{python2_sitelib}/*egg-info %{python2_sitelib}/%{name} +%endif # _with_python2 + + %if 0%{?with_python3} %files -n python%{python3_pkgversion}-capstone @@ -180,10 +223,15 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{python3_sitelib}/%{name} %endif # _with_python3 + + %files java %{_javadir}/ %changelog +* Thu Oct 10 2019 Michal Ambroz - 4.0.1-7 +- remove python2 from rawhide/fc32 package + * Thu Oct 03 2019 Miro Hrončok - 4.0.1-6 - Rebuilt for Python 3.8.0rc1 (#1748018) From d72f07b5a3a66d1a4ab4e8da42a2d4ddffc92289 Mon Sep 17 00:00:00 2001 From: rpmbuild Date: Fri, 11 Oct 2019 00:03:03 +0200 Subject: [PATCH 05/52] build java package also with the python3 --- capstone.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 2a3129d..5b54ce9 100644 --- a/capstone.spec +++ b/capstone.spec @@ -152,7 +152,11 @@ popd # build java bindings pushd bindings/java -make PYTHON2=%{__python2} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken +%if 0%{?with_python3} +make PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken +%else +make PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken +%endif popd From 17a9e5293c605da83ef65d5b7def6e0c9d4cab71 Mon Sep 17 00:00:00 2001 From: rpmbuild Date: Fri, 11 Oct 2019 02:12:04 +0200 Subject: [PATCH 06/52] - fix descriptions of sub-packages - remove buildroot from the build phase --- capstone.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/capstone.spec b/capstone.spec index 5b54ce9..47aafbe 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,14 +1,12 @@ Name: capstone Version: 4.0.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh %global gitname capstone # 4.0.1 release %global commit f9c6a90489be7b3637ff1c7298e45efafe7cf1b9 -# -#global commit 75c05281b4bc8e8c41a1ab7f91705401caa3832a %global shortcommit %(c=%{commit}; echo ${c:0:7}) License: BSD @@ -30,8 +28,7 @@ Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch %global common_desc %{expand: Capstone is a disassembly framework with the target of becoming the ultimate -disasm engine for binary analysis and reversing in the security community. -} +disasm engine for binary analysis and reversing in the security community.} %global with_python3 1 %bcond_with python2 @@ -88,7 +85,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-capstone %{common_desc} -The %{name}-python package contains python bindings for %{name}. +The python2-capstone package contains python bindings for %{name}. %endif # _with_python3 @@ -105,7 +102,7 @@ Summary: Python3 bindings for %{name} %description -n python%{python3_pkgversion}-capstone %{common_desc} -The %{name}-python3 package contains python3 bindings for %{name}. +The python%{python3_pkgversion}-capstone package contains python3 bindings for %{name}. %endif # with_python3 @@ -128,7 +125,8 @@ The %{name}-java package contains java bindings for %{name}. %build -DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ +#DESTDIR="%{buildroot}" +V=1 CFLAGS="%{optflags}" \ LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ make PYTHON2=%{__python2} PYTHON3=%{__python3} %{?_smp_mflags} @@ -233,6 +231,10 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Thu Oct 10 2019 Michal Ambroz - 4.0.1-8 +- fix descriptions of sub-packages +- remove buildroot from the build phase + * Thu Oct 10 2019 Michal Ambroz - 4.0.1-7 - remove python2 from rawhide/fc32 package From 20eece19409bf24f29e20d646ce6e2a050af662f Mon Sep 17 00:00:00 2001 From: rpmbuild Date: Tue, 15 Oct 2019 03:00:48 +0200 Subject: [PATCH 07/52] do not build py2 for rhel8 --- capstone.rpmlintrc | 6 ++++++ capstone.spec | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 capstone.rpmlintrc diff --git a/capstone.rpmlintrc b/capstone.rpmlintrc new file mode 100644 index 0000000..edf9709 --- /dev/null +++ b/capstone.rpmlintrc @@ -0,0 +1,6 @@ +from Config import addFilter + +addFilter('capstone.*: macro-in-comment.*') +addFilter('capstone.*: rpm-buildroot-usage %build sed -i .s;%{buildroot};;.*') +addFilter('capstone.*: specfile-error warning: Macro expanded in comment on line ..: %{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz') + diff --git a/capstone.spec b/capstone.spec index 47aafbe..1e1d41b 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -30,11 +30,14 @@ Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch Capstone is a disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.} -%global with_python3 1 -%bcond_with python2 -# Build also the python2 package -%if %{with python2} || (0%{?fedora} && 0%{?fedora} <= 31 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 ) -%global with_python2 1 +# Build with python3 package by default +%bcond_without python3 + +# Build without python2 package for newer releases f32+ and rhel8+ +%if (0%{?fedora} && 0%{?fedora} >= 32 ) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) +%bcond_with python2 +%else +%bcond_without python2 %endif @@ -56,6 +59,7 @@ BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %endif # if with_python3 + %global _hardened_build 1 @@ -86,7 +90,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-capstone %{common_desc} The python2-capstone package contains python bindings for %{name}. -%endif # _with_python3 +%endif # with_python2 @@ -148,7 +152,7 @@ CFLAGS="%{optflags}" %{__python3} setup.py build %endif # with_python3 popd -# build java bindings +# build java bindings needs some python pushd bindings/java %if 0%{?with_python3} make PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken @@ -231,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Tue Oct 15 2019 Michal Ambroz - 4.0.1-9 +- do not build python2 package for rhel8 + * Thu Oct 10 2019 Michal Ambroz - 4.0.1-8 - fix descriptions of sub-packages - remove buildroot from the build phase From b2655e5fb8bb4ef84a59fb926f12fc3eafd92a5a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 21 Jan 2020 22:05:23 +0100 Subject: [PATCH 08/52] Avoid hardcoding /usr prefix The prefix can be /app when building for flatpak. --- capstone.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/capstone.spec b/capstone.spec index 1e1d41b..bdfb79a 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -131,7 +131,7 @@ The %{name}-java package contains java bindings for %{name}. %build #DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ -LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ +PREFIX="%{_prefix}" LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ make PYTHON2=%{__python2} PYTHON3=%{__python3} %{?_smp_mflags} # Fix pkgconfig file @@ -164,7 +164,7 @@ popd %install -DESTDIR=%{buildroot} LIBDIRARCH=%{_lib} \ +DESTDIR=%{buildroot} PREFIX="%{_prefix}" LIBDIRARCH=%{_lib} \ INCDIR="%{_includedir}" make install find %{buildroot} -name '*.la' -exec rm -f {} ';' find %{buildroot} -name '*.a' -exec rm -f {} ';' @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Tue Jan 21 2020 Kalev Lember - 4.0.1-10 +- Avoid hardcoding /usr prefix + * Tue Oct 15 2019 Michal Ambroz - 4.0.1-9 - do not build python2 package for rhel8 From 5e9bc7b1641317d2582084cc3d5e9f995c1347d0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 13:39:20 +0000 Subject: [PATCH 09/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index bdfb79a..c88b9de 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 4.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Jan 21 2020 Kalev Lember - 4.0.1-10 - Avoid hardcoding /usr prefix From 5f249a1fcf1caadaf242ecc194dc38fd1d01af06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 26 May 2020 02:42:16 +0200 Subject: [PATCH 10/52] Rebuilt for Python 3.9 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index c88b9de..1112c29 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Tue May 26 2020 Miro Hrončok - 4.0.1-12 +- Rebuilt for Python 3.9 + * Tue Jan 28 2020 Fedora Release Engineering - 4.0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From a88e940062dfa8460cda257e6736e7d8b16612ff Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 10 Jul 2020 17:11:58 +0200 Subject: [PATCH 11/52] Rebuilt for JDK-11 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 1112c29..97f8e4a 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Fri Jul 10 2020 Jiri Vanek - 4.0.1-13 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + * Tue May 26 2020 Miro Hrončok - 4.0.1-12 - Rebuilt for Python 3.9 From e2d59256dc920987599673cccdad2c85f37853b2 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 20 Jul 2020 12:43:23 +0200 Subject: [PATCH 12/52] Rebase to 4.2.0 --- .gitignore | 1 + capstone.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ccc4ead..11b9f51 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /capstone-3.0.5-db19431.tar.gz /capstone-4.0.0-75c0528.tar.gz /capstone-4.0.1.tar.gz +/capstone-4.0.2.tar.gz diff --git a/capstone.spec b/capstone.spec index 97f8e4a..7600dfe 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone -Version: 4.0.1 -Release: 13%{?dist} +Version: 4.0.2 +Release: 1%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -24,7 +24,7 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # Upstream patch which fixes libcapstone.pc. # See: https://github.com/aquynh/capstone/issues/1339 -Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch +# Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch %global common_desc %{expand: Capstone is a disassembly framework with the target of becoming the ultimate @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Mon Jul 20 2020 Riccardo Schirone - 4.0.2-1 +- Rebase to upstream version 4.0.2 + * Fri Jul 10 2020 Jiri Vanek - 4.0.1-13 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 diff --git a/sources b/sources index 2b49f76..657d090 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (capstone-4.0.1.tar.gz) = 43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36 +SHA512 (capstone-4.0.2.tar.gz) = 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e From 08c8b2840e0d2221ee154a00f3cbbb6446b2fd8e Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Wed, 22 Jul 2020 09:23:38 +0200 Subject: [PATCH 13/52] Use make_build macro instead of make (thanks to tstellar) --- capstone.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/capstone.spec b/capstone.spec index 7600dfe..828a3fe 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -132,7 +132,7 @@ The %{name}-java package contains java bindings for %{name}. #DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ PREFIX="%{_prefix}" LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ -make PYTHON2=%{__python2} PYTHON3=%{__python3} %{?_smp_mflags} +%make_build PYTHON2=%{__python2} PYTHON3=%{__python3} # Fix pkgconfig file sed -i 's;%{buildroot};;' capstone.pc @@ -155,9 +155,9 @@ popd # build java bindings needs some python pushd bindings/java %if 0%{?with_python3} -make PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken +%make_build PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken %else -make PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken +%make_build PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken %endif popd @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Wed Jul 22 2020 Riccardo Schirone - 4.0.2-2 +- Use make_build macro instead of make (thanks to tstellar) + * Mon Jul 20 2020 Riccardo Schirone - 4.0.2-1 - Rebase to upstream version 4.0.2 From dfb10a4f14b24c79b36f7c1aae882b7c0cb209b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 13:40:21 +0000 Subject: [PATCH 14/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 828a3fe..daaef62 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -235,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 4.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 22 2020 Riccardo Schirone - 4.0.2-2 - Use make_build macro instead of make (thanks to tstellar) From 7318596fcabb129f06f222ecd281687a8f11fbc1 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 19 Dec 2020 05:10:48 +0000 Subject: [PATCH 15/52] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- capstone.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/capstone.spec b/capstone.spec index daaef62..b57f328 100644 --- a/capstone.spec +++ b/capstone.spec @@ -59,6 +59,7 @@ BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %endif # if with_python3 +BuildRequires: make %global _hardened_build 1 From 72b713c48b48037c4c8a59018a5d2bcd2b962f3b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 01:40:34 +0000 Subject: [PATCH 16/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index b57f328..09c7598 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -236,6 +236,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 4.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Jul 27 2020 Fedora Release Engineering - 4.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 4e6db8ca3a7ad52dfb4f443f36d1af744d8c79d6 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Fri, 14 May 2021 22:20:54 +0200 Subject: [PATCH 17/52] modernize the capstone specfile, rebuild for EPEL --- capstone.rpmlintrc | 2 -- capstone.spec | 81 +++++++++++++++++++++++----------------------- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/capstone.rpmlintrc b/capstone.rpmlintrc index edf9709..f304280 100644 --- a/capstone.rpmlintrc +++ b/capstone.rpmlintrc @@ -1,6 +1,4 @@ from Config import addFilter -addFilter('capstone.*: macro-in-comment.*') addFilter('capstone.*: rpm-buildroot-usage %build sed -i .s;%{buildroot};;.*') -addFilter('capstone.*: specfile-error warning: Macro expanded in comment on line ..: %{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz') diff --git a/capstone.spec b/capstone.spec index 09c7598..a9b2fef 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,18 +1,19 @@ Name: capstone Version: 4.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh %global gitname capstone -# 4.0.1 release -%global commit f9c6a90489be7b3637ff1c7298e45efafe7cf1b9 +# 4.0.2 release +%global commit 1d230532840a37ac032c6ab80128238fc930c6c1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) License: BSD URL: http://www.capstone-engine.org/ +VCS: https://github.com/aquynh/capstone/ # https://github.com/aquynh/capstone/releases -#Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz +# Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Test suite binary samples to be used for disassembly @@ -44,22 +45,22 @@ disasm engine for binary analysis and reversing in the security community.} %global srcname distribute BuildRequires: gcc +BuildRequires: make BuildRequires: git BuildRequires: jna BuildRequires: java-devel -%if 0%{?with_python2} +%if %{with python2} BuildRequires: python2 BuildRequires: python2-devel BuildRequires: python2-setuptools -%endif # if with_python2 +%endif -%if 0%{?with_python3} +%if %{with python3} BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools -%endif # if with_python3 -BuildRequires: make +%endif %global _hardened_build 1 @@ -78,7 +79,7 @@ developing applications that use %{name}. -%if 0%{?with_python2} +%if %{with python2} %package -n python2-capstone %{?python_provide:%python_provide python2-capstone} # Remove before F30 @@ -91,11 +92,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-capstone %{common_desc} The python2-capstone package contains python bindings for %{name}. -%endif # with_python2 +# with_python2 +%endif -%if 0%{?with_python3} +%if %{with python3} %package -n python%{python3_pkgversion}-capstone %{?python_provide:%python_provide python%{python3_pkgversion}-capstone} Provides: %{name}-python%{python3_pkgversion} = %{version}-%{release} @@ -108,7 +110,8 @@ Summary: Python3 bindings for %{name} %description -n python%{python3_pkgversion}-capstone %{common_desc} The python%{python3_pkgversion}-capstone package contains python3 bindings for %{name}. -%endif # with_python3 +#with python3 +%endif @@ -124,13 +127,12 @@ The %{name}-java package contains java bindings for %{name}. %prep -# autosetup -n %{gitname}-%{commit} -S git +# autosetup -n %%{gitname}-%%{commit} -S git %autosetup -n %{gitname}-%{version} -S git %build -#DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \ PREFIX="%{_prefix}" LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ %make_build PYTHON2=%{__python2} PYTHON3=%{__python3} @@ -144,18 +146,18 @@ mv capstone.pc.tmp capstone.pc # build python bindings pushd bindings/python -%if 0%{?with_python2} -CFLAGS="%{optflags}" %{__python2} setup.py build -%endif # with_python2 +%if %{with python2} +%py2_build +%endif -%if 0%{?with_python3} -CFLAGS="%{optflags}" %{__python3} setup.py build -%endif # with_python3 +%if %{with python3} +%py3_build +%endif popd # build java bindings needs some python pushd bindings/java -%if 0%{?with_python3} +%if %{with python3} %make_build PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken %else %make_build PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken @@ -172,13 +174,13 @@ find %{buildroot} -name '*.a' -exec rm -f {} ';' # install python bindings pushd bindings/python -%if 0%{?with_python2} -%{__python2} setup.py install --skip-build --root %{buildroot} -%endif # with_python2 +%if %{with python2} +%py2_install +%endif -%if 0%{?with_python3} -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif # with_python3 +%if %{with python3} +%py3_install +%endif popd # install java bindings @@ -186,10 +188,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name -#%check -#ln -s libcapstone.so libcapstone.so.4 -#make check LD_LIBRARY_PATH="`pwd`" - +%check +ln -s libcapstone.so.4 libcapstone.so +make check LD_LIBRARY_PATH="`pwd`" %ldconfig_scriptlets @@ -197,12 +198,7 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %files -# %license does not work for RHEL<7 -%if 0%{?rhel} || 0%{?fedora} < 21 -%doc LICENSE.TXT LICENSE_LLVM.TXT -%else %license LICENSE.TXT LICENSE_LLVM.TXT -%endif # %license workarond for RHEL<7 %doc CREDITS.TXT ChangeLog README.md SPONSORS.TXT %{_libdir}/*.so.* %{_bindir}/cstool @@ -216,19 +212,19 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name -%if 0%{?with_python2} +%if %{with python2} %files -n python2-capstone %{python2_sitelib}/*egg-info %{python2_sitelib}/%{name} -%endif # _with_python2 +%endif -%if 0%{?with_python3} +%if %{with python3} %files -n python%{python3_pkgversion}-capstone %{python3_sitelib}/*egg-info %{python3_sitelib}/%{name} -%endif # _with_python3 +%endif @@ -236,6 +232,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Fri May 14 2021 Michal Ambroz - 4.0.2-5 +- modernize specfile, using with bcond and py*_build macros + * Tue Jan 26 2021 Fedora Release Engineering - 4.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From c1fe94860f3b1cd1453b638f074f11f0872b15c7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:01:11 +0200 Subject: [PATCH 18/52] Rebuilt for Python 3.10 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index a9b2fef..f495576 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Fri Jun 04 2021 Python Maint - 4.0.2-6 +- Rebuilt for Python 3.10 + * Fri May 14 2021 Michal Ambroz - 4.0.2-5 - modernize specfile, using with bcond and py*_build macros From 215c58818c85380494e1bca6f660890e2f0fe362 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 14:12:27 +0000 Subject: [PATCH 19/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From edd18f7f0c64229683d7aa1e42eac755b4a307e5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 19:09:56 +0000 Subject: [PATCH 20/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index f495576..d7a4387 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 4.0.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 4.0.2-6 - Rebuilt for Python 3.10 From e264969ea282a8f40d63550c4e94e75d382bd1bf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 22:54:29 +0000 Subject: [PATCH 21/52] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index d7a4387..170bc95 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 4.0.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 4.0.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 506654424b30ffeeda0270c6b83ae35765b97827 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 5 Feb 2022 19:52:48 +0100 Subject: [PATCH 22/52] Rebuilt for java-17-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java17 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 170bc95..96a9ada 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Sat Feb 05 2022 Jiri Vanek - 4.0.2-9 +- Rebuilt for java-17-openjdk as system jdk + * Wed Jan 19 2022 Fedora Release Engineering - 4.0.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 2c2f8e58b68e0ce4b2fd541e453c6dfa94390161 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 14:58:33 +0200 Subject: [PATCH 23/52] Rebuilt for Python 3.11 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 96a9ada..65c924b 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Mon Jun 13 2022 Python Maint - 4.0.2-10 +- Rebuilt for Python 3.11 + * Sat Feb 05 2022 Jiri Vanek - 4.0.2-9 - Rebuilt for java-17-openjdk as system jdk From 4a015f7148ce082a7d60ba1a5dc34e0e34d08a91 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 22:35:35 +0000 Subject: [PATCH 24/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 65c924b..9933903 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -232,6 +232,9 @@ make check LD_LIBRARY_PATH="`pwd`" %{_javadir}/ %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 4.0.2-10 - Rebuilt for Python 3.11 From 5a188602fc0f3b2bfe0ecdc7fc28f89f5ecfe8fd Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Tue, 1 Nov 2022 13:00:24 +0100 Subject: [PATCH 25/52] drop java for platforms not in java_arches --- capstone.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/capstone.spec b/capstone.spec index 9933903..d86d558 100644 --- a/capstone.spec +++ b/capstone.spec @@ -47,8 +47,11 @@ disasm engine for binary analysis and reversing in the security community.} BuildRequires: gcc BuildRequires: make BuildRequires: git + +%ifarch %{java_arches} BuildRequires: jna BuildRequires: java-devel +%endif %if %{with python2} BuildRequires: python2 @@ -114,7 +117,7 @@ The python%{python3_pkgversion}-capstone package contains python3 bindings for % %endif - +%ifarch %{java_arches} %package java Summary: Java bindings for %{name} Requires: %{name} = %{version}-%{release} @@ -123,7 +126,7 @@ BuildArch: noarch %description java %{common_desc} The %{name}-java package contains java bindings for %{name}. - +%endif %prep @@ -155,6 +158,7 @@ pushd bindings/python %endif popd +%ifarch %{java_arches} # build java bindings needs some python pushd bindings/java %if %{with python3} @@ -163,6 +167,7 @@ pushd bindings/java %make_build PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken %endif popd +%endif @@ -183,9 +188,10 @@ pushd bindings/python %endif popd +%ifarch %{java_arches} # install java bindings install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar - +%endif %check @@ -227,13 +233,15 @@ make check LD_LIBRARY_PATH="`pwd`" %endif - +%ifarch %{java_arches} %files java %{_javadir}/ +%endif %changelog * Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild +- drop java binding for platforms not in %%{java_arches} * Mon Jun 13 2022 Python Maint - 4.0.2-10 - Rebuilt for Python 3.11 From 68a66989918ca5902672a8f009668da5edf751af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 23:30:56 +0000 Subject: [PATCH 26/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index d86d558..061d3ef 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -239,6 +239,9 @@ make check LD_LIBRARY_PATH="`pwd`" %endif %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 4.0.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - drop java binding for platforms not in %%{java_arches} From a7faf4710ca43c8bf969348064a7d2fd2faaec73 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Fri, 27 Jan 2023 15:00:11 +0100 Subject: [PATCH 27/52] update the github page --- capstone.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/capstone.spec b/capstone.spec index d86d558..3b74917 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,9 +1,9 @@ Name: capstone Version: 4.0.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework -%global gituser aquynh +%global gituser capstone-engine %global gitname capstone # 4.0.2 release %global commit 1d230532840a37ac032c6ab80128238fc930c6c1 @@ -11,8 +11,8 @@ Summary: A lightweight multi-platform, multi-architecture disassembly fra License: BSD URL: http://www.capstone-engine.org/ -VCS: https://github.com/aquynh/capstone/ -# https://github.com/aquynh/capstone/releases +VCS: https://github.com/capstone-engine/capstone/ +# https://github.com/capstone-engine/capstone/releases # Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -24,7 +24,7 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # Patch0: capstone-python.patch # Upstream patch which fixes libcapstone.pc. -# See: https://github.com/aquynh/capstone/issues/1339 +# See: https://github.com/capstone-engine/capstone/issues/1339 # Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch %global common_desc %{expand: @@ -239,6 +239,9 @@ make check LD_LIBRARY_PATH="`pwd`" %endif %changelog +* Fri Jan 06 2023 Michal Ambroz - 4.0.2-12 +- update the new github page + * Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - drop java binding for platforms not in %%{java_arches} From 921156b31c04d42aab4ca547653d6a9c0ef74a08 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 20:33:11 +0200 Subject: [PATCH 28/52] Rebuilt for Python 3.12 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index caaf717..4b26944 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser capstone-engine @@ -239,6 +239,9 @@ make check LD_LIBRARY_PATH="`pwd`" %endif %changelog +* Tue Jun 13 2023 Python Maint - 4.0.2-14 +- Rebuilt for Python 3.12 + * Fri Jan 27 2023 Michal Ambroz - 4.0.2-13 - update the new github page From 05fb022e661cb21368fac612d75101d4e70f50a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 15:17:46 +0000 Subject: [PATCH 29/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 4b26944..57a75b2 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.2 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser capstone-engine @@ -239,6 +239,9 @@ make check LD_LIBRARY_PATH="`pwd`" %endif %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 4.0.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 4.0.2-14 - Rebuilt for Python 3.12 From d5e61df22e573205d7d6f8620881c439b4d9aa9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 15 Sep 2023 11:19:43 +0100 Subject: [PATCH 30/52] Convert license to SPDX format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel P. Berrangé --- capstone.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 57a75b2..939b7c9 100644 --- a/capstone.spec +++ b/capstone.spec @@ -9,7 +9,7 @@ Summary: A lightweight multi-platform, multi-architecture disassembly fra %global commit 1d230532840a37ac032c6ab80128238fc930c6c1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -License: BSD +License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ VCS: https://github.com/capstone-engine/capstone/ # https://github.com/capstone-engine/capstone/releases From 047252f8d985bb0dd647fb66b39ff1c8cf9c6d84 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Sun, 12 Nov 2023 09:49:41 +0100 Subject: [PATCH 31/52] cleanup --- ...r-Makefile-too-1339.patch => capstone-4.0.1-includedir.patch | 1 + capstone.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch => capstone-4.0.1-includedir.patch (98%) diff --git a/0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch b/capstone-4.0.1-includedir.patch similarity index 98% rename from 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch rename to capstone-4.0.1-includedir.patch index b45690a..04385d4 100644 --- a/0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch +++ b/capstone-4.0.1-includedir.patch @@ -1,3 +1,4 @@ +Fixed with 5.0.0 From d36b7395e69c70a8d98f78f2bcb20a32bf9f3173 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 11 Jan 2019 13:48:11 +0000 diff --git a/capstone.spec b/capstone.spec index 939b7c9..d2cb903 100644 --- a/capstone.spec +++ b/capstone.spec @@ -25,7 +25,7 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # Upstream patch which fixes libcapstone.pc. # See: https://github.com/capstone-engine/capstone/issues/1339 -# Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch +# Patch1: capstone-4.0.1-includedir.patch %global common_desc %{expand: Capstone is a disassembly framework with the target of becoming the ultimate From 26974a5785aae37d9b489dacafff71f45c281f8b Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Sun, 12 Nov 2023 09:53:46 +0100 Subject: [PATCH 32/52] cleanup --- capstone-python.patch => capstone-3.0.5-python.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename capstone-python.patch => capstone-3.0.5-python.patch (100%) diff --git a/capstone-python.patch b/capstone-3.0.5-python.patch similarity index 100% rename from capstone-python.patch rename to capstone-3.0.5-python.patch From a67979effb9791e516f818ded5b9a0e010755733 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 13 Nov 2023 02:41:57 +0100 Subject: [PATCH 33/52] bump to 5.0.1 --- .gitignore | 6 +- capstone-5.0.1-ocaml.patch | 12 ++ capstone-5.0.1-platform.patch | 22 +++ capstone.spec | 173 ++++++++++++++++++----- cstool.1 | 256 ++++++++++++++++++++++++++++++++++ sources | 2 +- 6 files changed, 429 insertions(+), 42 deletions(-) create mode 100644 capstone-5.0.1-ocaml.patch create mode 100644 capstone-5.0.1-platform.patch create mode 100644 cstool.1 diff --git a/.gitignore b/.gitignore index 11b9f51..0958ad6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -/capstone-3.0.4-e710e4f.tar.gz -/capstone-3.0.5-db19431.tar.gz -/capstone-4.0.0-75c0528.tar.gz -/capstone-4.0.1.tar.gz -/capstone-4.0.2.tar.gz +/capstone-*.tar.gz diff --git a/capstone-5.0.1-ocaml.patch b/capstone-5.0.1-ocaml.patch new file mode 100644 index 0000000..a577369 --- /dev/null +++ b/capstone-5.0.1-ocaml.patch @@ -0,0 +1,12 @@ +diff -ru capstone-5.0.1/bindings/ocaml/Makefile capstone-5.0.1.new/bindings/ocaml/Makefile +--- capstone-5.0.1/bindings/ocaml/Makefile 2023-08-22 18:03:55.000000000 +0200 ++++ capstone-5.0.1.new/bindings/ocaml/Makefile 2023-11-12 10:28:45.320198200 +0100 +@@ -2,7 +2,7 @@ + # By Nguyen Anh Quynh , 2013-2015 + + LIB = capstone +-FLAGS = '-Wall -Wextra -Wwrite-strings' ++FLAGS = '-Wall -Wextra -Wwrite-strings -I ../../include -L ../../' + PYTHON2 ?= python + + all: arm_const.cmxa arm64_const.cmxa m680x_const.cmxa mips_const.cmxa ppc_const.cmxa sparc_const.cmxa sysz_const.cmxa x86_const.cmxa xcore_const.cmxa arm.cmxa arm64.cmxa m680x.cmxa mips.cmxa ppc.cmxa x86.cmxa sparc.cmxa systemz.cmxa xcore.cmxa capstone.cmxa test_basic.cmx test_detail.cmx test_x86.cmx test_arm.cmx test_arm64.cmx test_mips.cmx test_ppc.cmx test_sparc.cmx test_systemz.cmx test_xcore.cmx test_m680x.cmx ocaml.o diff --git a/capstone-5.0.1-platform.patch b/capstone-5.0.1-platform.patch new file mode 100644 index 0000000..771f674 --- /dev/null +++ b/capstone-5.0.1-platform.patch @@ -0,0 +1,22 @@ +diff -uNr capstone-5.0.orig/bindings/python/setup.py capstone-5.0/bindings/python/setup.py +--- capstone-5.0.orig/bindings/python/setup.py 2023-08-07 16:55:34.314825530 -0500 ++++ capstone-5.0/bindings/python/setup.py 2023-08-07 21:06:59.182376477 -0500 +@@ -201,15 +201,9 @@ + idx = sys.argv.index('bdist_wheel') + 1 + sys.argv.insert(idx, '--plat-name') + name = get_platform() +- if 'linux' in name: +- # linux_* platform tags are disallowed because the python ecosystem is fubar +- # linux builds should be built in the centos 5 vm for maximum compatibility +- # see https://github.com/pypa/manylinux +- # see also https://github.com/angr/angr-dev/blob/master/bdist.sh +- sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine()) +- else: +- # https://www.python.org/dev/peps/pep-0425/ +- sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_')) ++ pyversion = platform.python_version() ++ major_version, minor_version = map(int, pyversion.split('.')[:2]) ++ sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_') + "_" + str(major_version) + str(minor_version)) + + setup( + provides=['capstone'], diff --git a/capstone.spec b/capstone.spec index d2cb903..46ff5ea 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,36 +1,43 @@ Name: capstone -Version: 4.0.2 -Release: 15%{?dist} +Version: 5.0.1 +Release: 1%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework - -%global gituser capstone-engine -%global gitname capstone -# 4.0.2 release -%global commit 1d230532840a37ac032c6ab80128238fc930c6c1 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ VCS: https://github.com/capstone-engine/capstone/ # https://github.com/capstone-engine/capstone/releases -# Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz -Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz - -# Test suite binary samples to be used for disassembly -# Source1: - -# Fedora 29 makes python executable separate from python2 and python3. This patch makes -# it possible to specify PYTHON2 and PYTHON3 binary to be explicit that by "python" we mean "python2" -# Patch0: capstone-python.patch - -# Upstream patch which fixes libcapstone.pc. -# See: https://github.com/capstone-engine/capstone/issues/1339 -# Patch1: capstone-4.0.1-includedir.patch %global common_desc %{expand: Capstone is a disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.} + +%define _lto_cflags %{nil} +#%%global _hardened_build 1 + +%global gituser capstone-engine +%global gitname capstone +# 5.0.1 release +%global gitdate 20230823 +%global commit 097c04d9413c59a58b00d4d1c8d5dc0ac158ffaa +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +# Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz +Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +# Manpage for cstool is missing in the package, add one generated by help2man +Source1: cstool.1 + +# modified to remove the GH CI modifications from this patch +# Patch: https://patch-diff.githubusercontent.com/raw/capstone-engine/capstone/pull/2099.patch +# Patch0: https://github.com/capstone-engine/capstone/pull/2099.patch#/capstone-5.0.1-cibuildwheel.patch + +Patch0: capstone-5.0.1-platform.patch + +# Ocaml binding is not using local path for the includes/links +Patch1: capstone-5.0.1-ocaml.patch + + # Build with python3 package by default %bcond_without python3 @@ -41,6 +48,13 @@ disasm engine for binary analysis and reversing in the security community.} %bcond_without python2 %endif +# Build with java binding +%bcond_without java + +# Build without ocaml binding - it is not ready to be distributed as ocaml shared library +%bcond_with ocaml + + %global srcname distribute @@ -48,25 +62,32 @@ BuildRequires: gcc BuildRequires: make BuildRequires: git +%if %{with java} %ifarch %{java_arches} BuildRequires: jna BuildRequires: java-devel %endif +%endif %if %{with python2} BuildRequires: python2 BuildRequires: python2-devel +BuildRequires: python2-pip BuildRequires: python2-setuptools %endif %if %{with python3} BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-wheel %endif -%global _hardened_build 1 - +%if %{with ocaml} +BuildRequires: ocaml +BuildRequires: ocaml-ocamlbuild +%endif %description %{common_desc} @@ -84,6 +105,7 @@ developing applications that use %{name}. %if %{with python2} %package -n python2-capstone +BuildArch: noarch %{?python_provide:%python_provide python2-capstone} # Remove before F30 Provides: %{name}-python = %{version}-%{release} @@ -102,6 +124,7 @@ The python2-capstone package contains python bindings for %{name}. %if %{with python3} %package -n python%{python3_pkgversion}-capstone +BuildArch: noarch %{?python_provide:%python_provide python%{python3_pkgversion}-capstone} Provides: %{name}-python%{python3_pkgversion} = %{version}-%{release} Provides: %{name}-python%{python3_pkgversion}%{?_isa} = %{version}-%{release} @@ -117,22 +140,39 @@ The python%{python3_pkgversion}-capstone package contains python3 bindings for % %endif +%if %{with java} %ifarch %{java_arches} %package java Summary: Java bindings for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} BuildArch: noarch %description java %{common_desc} The %{name}-java package contains java bindings for %{name}. %endif +%endif + +%if %{with ocaml} +%package -n ocaml-%{name} +Summary: OCaml bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n ocaml-%{name} +%{common_desc} +The ocaml-%{name} package contains OCaml bindings for %{name}. +%endif %prep # autosetup -n %%{gitname}-%%{commit} -S git -%autosetup -n %{gitname}-%{version} -S git +%autosetup -n %{gitname}-%{version} -p1 +%if %{with python3} +pushd bindings/python +%pyproject_buildrequires +popd +%endif %build @@ -141,11 +181,9 @@ PREFIX="%{_prefix}" LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \ %make_build PYTHON2=%{__python2} PYTHON3=%{__python3} # Fix pkgconfig file -sed -i 's;%{buildroot};;' capstone.pc grep -v archive capstone.pc > capstone.pc.tmp mv capstone.pc.tmp capstone.pc - # build python bindings pushd bindings/python @@ -154,12 +192,14 @@ pushd bindings/python %endif %if %{with python3} +# %%pyproject_wheel %py3_build %endif popd +%if %{with java} %ifarch %{java_arches} -# build java bindings needs some python +# build java bindings needs some python runtime pushd bindings/java %if %{with python3} %make_build PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken @@ -168,47 +208,96 @@ pushd bindings/java %endif popd %endif +%endif +%if %{with ocaml} +pushd bindings/ocaml +# build ocaml bindings needs some python runtime +%if %{with python3} +%make_build PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" -j1 # %{?_smp_mflags} parallel seems broken +%else +%make_build PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" -j1 # %{?_smp_mflags} parallel seems broken +%endif +popd +%endif %install DESTDIR=%{buildroot} PREFIX="%{_prefix}" LIBDIRARCH=%{_lib} \ INCDIR="%{_includedir}" make install + +# cleanup static libraries find %{buildroot} -name '*.la' -exec rm -f {} ';' find %{buildroot} -name '*.a' -exec rm -f {} ';' +# add the manpage +install -d -D %{buildroot}%{_mandir}/man1 +install -p -m 644 -D %{SOURCE1} %{buildroot}%{_mandir}/man1/ + + # install python bindings pushd bindings/python %if %{with python2} %py2_install + +# cleanup the install +rm -rf %{buildroot}%{python2_sitelib}/capstone/lib/libcapstone.a +rm -rf %{buildroot}%{python2_sitelib}/capstone/lib/libcapstone.so +rm -rf %{buildroot}%{python2_sitelib}/capstone/include/capstone %endif %if %{with python3} %py3_install +# %%pyproject_install +# %%pyproject_save_files capstone + +# cleanup the install +rm -rf %{buildroot}%{python3_sitelib}/capstone/lib/libcapstone.a +rm -rf %{buildroot}%{python3_sitelib}/capstone/lib/libcapstone.so +rm -rf %{buildroot}%{python3_sitelib}/capstone/include/capstone + %endif popd +%if %{with java} %ifarch %{java_arches} # install java bindings install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar %endif +%endif + +%if %{with ocaml} +# install ocaml binding +%endif + %check -ln -s libcapstone.so.4 libcapstone.so +# ln -s libcapstone.so.5 libcapstone.so make check LD_LIBRARY_PATH="`pwd`" +%if %{with python3} +pushd bindings/python +%pytest -sv -k "not testcb and not test_cs_disasm_quick" +popd +%endif + +%if %{with ocaml} +pushd bindings/ocaml +make check LD_LIBRARY_PATH="`pwd`" +popd +%endif + %ldconfig_scriptlets - %files %license LICENSE.TXT LICENSE_LLVM.TXT %doc CREDITS.TXT ChangeLog README.md SPONSORS.TXT %{_libdir}/*.so.* %{_bindir}/cstool - +%{_mandir}/man1/cstool.1* %files devel @@ -217,7 +306,6 @@ make check LD_LIBRARY_PATH="`pwd`" %{_libdir}/pkgconfig/* - %if %{with python2} %files -n python2-capstone %{python2_sitelib}/*egg-info @@ -225,20 +313,33 @@ make check LD_LIBRARY_PATH="`pwd`" %endif - %if %{with python3} +#%%files -n python%%{python3_pkgversion}-capstone -f %%{pyproject_files} %files -n python%{python3_pkgversion}-capstone -%{python3_sitelib}/*egg-info -%{python3_sitelib}/%{name} +%{python3_sitelib}/capstone* %endif +%if %{with java} %ifarch %{java_arches} %files java %{_javadir}/ %endif +%endif + + +%if %{with ocaml} +%files -n ocaml-%{name} +%endif + %changelog +* Fri Sep 15 2023 Jonathan Wright - 5.0.1-1 +- Update to 5.0.1 + +* Wed Jul 19 2023 Jonathan Wright - 5.0-1 +- Modernize spec file using pyproject/wheel build + * Wed Jul 19 2023 Fedora Release Engineering - 4.0.2-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/cstool.1 b/cstool.1 new file mode 100644 index 0000000..50efef0 --- /dev/null +++ b/cstool.1 @@ -0,0 +1,256 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH CSTOOL "1" "November 2023" "Cstool for Capstone Disassembler Engine v5.0.1" "User Commands" +.SH NAME +Cstool \- manual page for Cstool for Capstone Disassembler Engine +.SH DESCRIPTION +Cstool for Capstone Disassembler Engine +.PP +Syntax: cstool [\-d|\-s|\-u|\-v] [start\-address\-in\-hex\-format] +.SS "The following options are supported:" +.TP +x16 +16\-bit mode (X86) +.TP +x32 +32\-bit mode (X86) +.TP +x64 +64\-bit mode (X86) +.TP +x16att +16\-bit mode (X86), syntax AT&T +.TP +x32att +32\-bit mode (X86), syntax AT&T +.TP +x64att +64\-bit mode (X86), syntax AT&T +.TP +arm +arm +.TP +armbe +arm + big endian +.TP +thumb +thumb mode +.TP +thumbbe +thumb + big endian +.TP +cortexm +thumb + cortex\-m extensions +.TP +armv8 +arm v8 +.TP +thumbv8 +thumb v8 +.TP +armv8be +arm v8 + big endian +.TP +thumbv8be +thumb v8 + big endian +.TP +arm64 +aarch64 mode +.TP +arm64be +aarch64 + big endian +.TP +mips +mips32 + little endian +.TP +mipsbe +mips32 + big endian +.TP +mips64 +mips64 + little endian +.TP +mips64be +mips64 + big endian +.TP +ppc32 +ppc32 + little endian +.TP +ppc32be +ppc32 + big endian +.TP +ppc32qpx +ppc32 + qpx + little endian +.TP +ppc32beqpx +ppc32 + qpx + big endian +.TP +ppc32ps +ppc32 + ps + little endian +.TP +ppc32beps +ppc32 + ps + big endian +.TP +ppc64 +ppc64 + little endian +.TP +ppc64be +ppc64 + big endian +.TP +ppc64qpx +ppc64 + qpx + little endian +.TP +ppc64beqpx +ppc64 + qpx + big endian +.TP +sparc +sparc +.TP +systemz +systemz (s390x) +.TP +xcore +xcore +.TP +m68k +m68k + big endian +.TP +m68k40 +m68k_040 +.TP +tms320c64x +TMS320C64x +.TP +m6800 +M6800/2 +.TP +m6801 +M6801/3 +.TP +m6805 +M6805 +.TP +m6808 +M68HC08 +.TP +m6809 +M6809 +.TP +m6811 +M68HC11 +.TP +cpu12 +M68HC12/HCS12 +.TP +hd6301 +HD6301/3 +.TP +hd6309 +HD6309 +.TP +hcs08 +HCS08 +.TP +evm +Ethereum Virtual Machine +.TP +6502 +MOS 6502 +.TP +65c02 +WDC 65c02 +.TP +w65c02 +WDC w65c02 +.TP +65816 +WDC 65816 (long m/x) +.TP +wasm: +Web Assembly +.TP +bpf +Classic BPF +.TP +bpfbe +Classic BPF + big endian +.TP +ebpf +Extended BPF +.TP +ebpfbe +Extended BPF + big endian +.TP +riscv32 +riscv32 +.TP +riscv64 +riscv64 +.TP +sh +superh SH1 +.TP +sh2 +superh SH2 +.TP +sh2e +superh SH2E +.TP +sh2dsp +superh SH2\-DSP +.TP +sh2a +superh SH2A +.TP +sh2afpu +superh SH2A\-FPU +.TP +sh3 +superh SH3 +.TP +sh3be +superh SH3 big endian +.TP +sh3e +superh SH3E +.TP +sh3ebe +superh SH3E big endian +.TP +sh3\-dsp +superh SH3\-DSP +.TP +sh3\-dspbe +superh SH3\-DSP big endian +.TP +sh4 +superh SH4 +.TP +sh4be +superh SH4 big endian +.TP +sh4a +superh SH4A +.TP +sh4abe +superh SH4A big endian +.TP +sh4al\-dsp +superh SH4AL\-DSP +.IP +sh4al\-dspbe superh SH4AL\-DSP big endian +tc110 tricore V1.1 +tc120 tricore V1.2 +tc130 tricore V1.3 +tc131 tricore V1.3.1 +tc160 tricore V1.6 +tc161 tricore V1.6.1 +tc162 tricore V1.6.2 +.SS "Extra options:" +.HP +\fB\-d\fR show detailed information of the instructions +.HP +\fB\-s\fR decode in SKIPDATA mode +.HP +\fB\-u\fR show immediates as unsigned +.HP +\fB\-v\fR show version & Capstone core build info +.PP diff --git a/sources b/sources index 657d090..b5723a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (capstone-4.0.2.tar.gz) = 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e +SHA512 (capstone-5.0.1.tar.gz) = 350aba77ce2d96b5c25764913591ba80e4497177ae0a8b2c820c6755ee8310848fbfc54e7ccac27fafc2dbc6778118ad92c53d1b5cb601d4fa146dec7d7e11e5 From 2ce7768e08e1e3c4d92a51f020491e14e5d8aaff Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 13 Nov 2023 02:56:27 +0100 Subject: [PATCH 34/52] capstone - add pytest as build dependency --- capstone.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/capstone.spec b/capstone.spec index 46ff5ea..f3004fa 100644 --- a/capstone.spec +++ b/capstone.spec @@ -82,6 +82,7 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-wheel +BuildRequires: python%{python3_pkgversion}-pytest %endif %if %{with ocaml} From 48bd43125a59fdc3e6d7eb41823dbbda53ce3c45 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 13 Nov 2023 03:22:00 +0100 Subject: [PATCH 35/52] build dependencies --- capstone.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/capstone.spec b/capstone.spec index f3004fa..e40a41a 100644 --- a/capstone.spec +++ b/capstone.spec @@ -109,11 +109,11 @@ developing applications that use %{name}. BuildArch: noarch %{?python_provide:%python_provide python2-capstone} # Remove before F30 +# loading the libcapstone dynamically using ctypes, not tied to certain architecture Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python bindings for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description -n python2-capstone %{common_desc} @@ -128,9 +128,8 @@ The python2-capstone package contains python bindings for %{name}. BuildArch: noarch %{?python_provide:%python_provide python%{python3_pkgversion}-capstone} Provides: %{name}-python%{python3_pkgversion} = %{version}-%{release} -Provides: %{name}-python%{python3_pkgversion}%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python%{python3_pkgversion} < %{version}-%{release} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Summary: Python3 bindings for %{name} From f9f2496ce7dc5293b3d88f0ffaacfb4f2969b1b8 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 13 Nov 2023 03:51:12 +0100 Subject: [PATCH 36/52] deps for java sub-package --- capstone.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index e40a41a..f64db14 100644 --- a/capstone.spec +++ b/capstone.spec @@ -144,7 +144,7 @@ The python%{python3_pkgversion}-capstone package contains python3 bindings for % %ifarch %{java_arches} %package java Summary: Java bindings for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} BuildArch: noarch %description java From d56a043feb64c59c7d1252ada902a3d86937e294 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 15:04:32 +0000 Subject: [PATCH 37/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index f64db14..450f31a 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -334,6 +334,9 @@ popd %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 5.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Sep 15 2023 Jonathan Wright - 5.0.1-1 - Update to 5.0.1 From 3a28980dbd575da36de40774b28ef1dacf5e290e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 23 Jan 2024 01:14:17 +0000 Subject: [PATCH 38/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 450f31a..0b48304 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -334,6 +334,9 @@ popd %changelog +* Tue Jan 23 2024 Fedora Release Engineering - 5.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 5.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 8435a0eb0885ca60dd9f67e6fcc57a23d1554438 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 10:49:38 +0200 Subject: [PATCH 39/52] Rebuilt for Python 3.13 --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 0b48304..1718919 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -334,6 +334,9 @@ popd %changelog +* Fri Jun 07 2024 Python Maint - 5.0.1-4 +- Rebuilt for Python 3.13 + * Tue Jan 23 2024 Fedora Release Engineering - 5.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From dff95a42228c0d8c938d796e8f30c59238dc9383 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 18:58:00 +0000 Subject: [PATCH 40/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 1718919..2c3a435 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -334,6 +334,9 @@ popd %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 5.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 5.0.1-4 - Rebuilt for Python 3.13 From 5bb8deb74d9cba7d623ced931990baccf6a4900b Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Wed, 31 Jul 2024 22:49:12 +0200 Subject: [PATCH 41/52] capstone - adding static subpackage BZ #2302041 --- capstone.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/capstone.spec b/capstone.spec index 2c3a435..2ab3af6 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -103,6 +103,15 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package static +Summary: Static linking of %{name} library + +%description static +%{common_desc} +The %{name}-static package contains files needed for static linking +of %{name} library into static binaries. + + %if %{with python2} %package -n python2-capstone @@ -228,7 +237,7 @@ INCDIR="%{_includedir}" make install # cleanup static libraries find %{buildroot} -name '*.la' -exec rm -f {} ';' -find %{buildroot} -name '*.a' -exec rm -f {} ';' +# find %%{buildroot} -name '*.a' -exec rm -f {} ';' # add the manpage install -d -D %{buildroot}%{_mandir}/man1 @@ -306,6 +315,11 @@ popd %{_libdir}/pkgconfig/* +%files static +%license LICENSE.TXT LICENSE_LLVM.TXT +%{_libdir}/libcapstone.a + + %if %{with python2} %files -n python2-capstone %{python2_sitelib}/*egg-info @@ -334,6 +348,9 @@ popd %changelog +* Wed Jul 31 2024 Michal Ambroz - 5.0.1-6 +- add static subpackage for static building with capstone + * Wed Jul 17 2024 Fedora Release Engineering - 5.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8313843954e525655bfb92c05399869877fd4428 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 13:19:07 +0000 Subject: [PATCH 42/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- capstone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 2ab3af6..5d9ca1e 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 5.0.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -348,6 +348,9 @@ popd %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 5.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 31 2024 Michal Ambroz - 5.0.1-6 - add static subpackage for static building with capstone From 1e90cb01e6a3b46b0cd6b8e35279eb04c7686dc7 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 6 Feb 2025 21:38:52 +0100 Subject: [PATCH 43/52] adding the changelog --- changelog | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..6930d59 --- /dev/null +++ b/changelog @@ -0,0 +1,188 @@ +* Thu Jan 16 2025 Fedora Release Engineering - 5.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 31 2024 Michal Ambroz - 5.0.1-6 +- add static subpackage for static building with capstone + +* Wed Jul 17 2024 Fedora Release Engineering - 5.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 5.0.1-4 +- Rebuilt for Python 3.13 + +* Tue Jan 23 2024 Fedora Release Engineering - 5.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 5.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Sep 15 2023 Jonathan Wright - 5.0.1-1 +- Update to 5.0.1 + +* Wed Jul 19 2023 Jonathan Wright - 5.0-1 +- Modernize spec file using pyproject/wheel build + +* Wed Jul 19 2023 Fedora Release Engineering - 4.0.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 4.0.2-14 +- Rebuilt for Python 3.12 + +* Fri Jan 27 2023 Michal Ambroz - 4.0.2-13 +- update the new github page + +* Wed Jan 18 2023 Fedora Release Engineering - 4.0.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild +- drop java binding for platforms not in %%{java_arches} + +* Mon Jun 13 2022 Python Maint - 4.0.2-10 +- Rebuilt for Python 3.11 + +* Sat Feb 05 2022 Jiri Vanek - 4.0.2-9 +- Rebuilt for java-17-openjdk as system jdk + +* Wed Jan 19 2022 Fedora Release Engineering - 4.0.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 4.0.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 4.0.2-6 +- Rebuilt for Python 3.10 + +* Fri May 14 2021 Michal Ambroz - 4.0.2-5 +- modernize specfile, using with bcond and py*_build macros + +* Tue Jan 26 2021 Fedora Release Engineering - 4.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 4.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 22 2020 Riccardo Schirone - 4.0.2-2 +- Use make_build macro instead of make (thanks to tstellar) + +* Mon Jul 20 2020 Riccardo Schirone - 4.0.2-1 +- Rebase to upstream version 4.0.2 + +* Fri Jul 10 2020 Jiri Vanek - 4.0.1-13 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Tue May 26 2020 Miro Hrončok - 4.0.1-12 +- Rebuilt for Python 3.9 + +* Tue Jan 28 2020 Fedora Release Engineering - 4.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Kalev Lember - 4.0.1-10 +- Avoid hardcoding /usr prefix + +* Tue Oct 15 2019 Michal Ambroz - 4.0.1-9 +- do not build python2 package for rhel8 + +* Thu Oct 10 2019 Michal Ambroz - 4.0.1-8 +- fix descriptions of sub-packages +- remove buildroot from the build phase + +* Thu Oct 10 2019 Michal Ambroz - 4.0.1-7 +- remove python2 from rawhide/fc32 package + +* Thu Oct 03 2019 Miro Hrončok - 4.0.1-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 4.0.1-5 +- Rebuilt for Python 3.8 + +* Wed Jul 24 2019 Fedora Release Engineering - 4.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jan 12 2019 Richard W.M. Jones - 4.0.1-2 +- Add upstream patch which fixes libcapstone.pc + https://github.com/aquynh/capstone/issues/1339 + +* Fri Jan 11 2019 Michal Ambroz - 4.0.1-1 +- bump to 4.0.1 release + +* Mon Aug 27 2018 Michal Ambroz - 3.0.5-1 +- bump to 3.0.5 + +* Thu Jul 12 2018 Fedora Release Engineering - 3.0.4-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Miro Hrončok - 3.0.4-17 +- Rebuilt for Python 3.7 + +* Tue Jun 26 2018 Michal Ambroz - 3.0.4-16 +- unify the naming convention for the python packages +- fix the python3 package naming for EPEL7 + +* Tue Jun 19 2018 Miro Hrončok - 3.0.4-15 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Igor Gnatenko - 3.0.4-14 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 3.0.4-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 3.0.4-12 +- Add Provides for the old name without %%_isa + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 3.0.4-11 +- Python 2 binary package renamed to python2-capstone + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Wed Aug 02 2017 Fedora Release Engineering - 3.0.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.0.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.0.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 3.0.4-7 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 3.0.4-6 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Feb 03 2016 Fedora Release Engineering - 3.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Oct 27 2015 Stefan Cornelius - 3.0.4-4 +- Really add dist tag this time + +* Sun Oct 25 2015 Stefan Cornelius - 3.0.4-3 +- Fix issues found during package review: dist tag, git sources + +* Thu Jul 16 2015 Stefan Cornelius - 3.0.4-2 +- Fix EPEL6 build problems + +* Wed Jul 15 2015 Stefan Cornelius - 3.0.4-1 +- new version 3.0.4. Includes security fixes. + +* Tue May 12 2015 Stefan Cornelius - 3.0.3-2 +- Addressed issues found during package review. + +* Fri May 08 2015 Stefan Cornelius - 3.0.3-1 +- Update to version 3.0.3 + +* Fri May 08 2015 Stefan Cornelius - 3.0.2-3 +- Added python3 and hardened build support. Update java building. +- Various cleanups. + +* Wed May 06 2015 Stefan Cornelius - 3.0.2-2 +- Update to 3.0.2. Fix 64bit issues. add %%check. + +* Sat Sep 27 2014 Adel Gadllah - 2.1.2-2 +- Addressed issues found during package review. + +* Mon May 19 2014 Adel Gadllah - 2.1.2-1 +- Initial package From 9598fce0cd33b49c93c63b5d65ebe1a85c78ef02 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 6 Feb 2025 22:21:09 +0100 Subject: [PATCH 44/52] bump to 5.0.5 --- capstone.spec | 204 ++------------------------------------------------ 1 file changed, 8 insertions(+), 196 deletions(-) diff --git a/capstone.spec b/capstone.spec index 5d9ca1e..2a9f7a4 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,10 +1,10 @@ Name: capstone -Version: 5.0.1 -Release: 7%{?dist} +Version: 5.0.5 +Release: %autorelease Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ -VCS: https://github.com/capstone-engine/capstone/ +VCS: git:https://github.com/capstone-engine/capstone/ # https://github.com/capstone-engine/capstone/releases %global common_desc %{expand: @@ -17,9 +17,9 @@ disasm engine for binary analysis and reversing in the security community.} %global gituser capstone-engine %global gitname capstone -# 5.0.1 release -%global gitdate 20230823 -%global commit 097c04d9413c59a58b00d4d1c8d5dc0ac158ffaa +# 5.0.5 release +%global gitdate 20250117 +%global commit 55261253c3f14d957c58382df82e61123dad45b9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz @@ -31,8 +31,7 @@ Source1: cstool.1 # modified to remove the GH CI modifications from this patch # Patch: https://patch-diff.githubusercontent.com/raw/capstone-engine/capstone/pull/2099.patch # Patch0: https://github.com/capstone-engine/capstone/pull/2099.patch#/capstone-5.0.1-cibuildwheel.patch - -Patch0: capstone-5.0.1-platform.patch +# Patch0: capstone-5.0.1-platform.patch # Ocaml binding is not using local path for the includes/links Patch1: capstone-5.0.1-ocaml.patch @@ -348,191 +347,4 @@ popd %changelog -* Thu Jan 16 2025 Fedora Release Engineering - 5.0.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 31 2024 Michal Ambroz - 5.0.1-6 -- add static subpackage for static building with capstone - -* Wed Jul 17 2024 Fedora Release Engineering - 5.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 5.0.1-4 -- Rebuilt for Python 3.13 - -* Tue Jan 23 2024 Fedora Release Engineering - 5.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 5.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Sep 15 2023 Jonathan Wright - 5.0.1-1 -- Update to 5.0.1 - -* Wed Jul 19 2023 Jonathan Wright - 5.0-1 -- Modernize spec file using pyproject/wheel build - -* Wed Jul 19 2023 Fedora Release Engineering - 4.0.2-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 4.0.2-14 -- Rebuilt for Python 3.12 - -* Fri Jan 27 2023 Michal Ambroz - 4.0.2-13 -- update the new github page - -* Wed Jan 18 2023 Fedora Release Engineering - 4.0.2-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jul 20 2022 Fedora Release Engineering - 4.0.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -- drop java binding for platforms not in %%{java_arches} - -* Mon Jun 13 2022 Python Maint - 4.0.2-10 -- Rebuilt for Python 3.11 - -* Sat Feb 05 2022 Jiri Vanek - 4.0.2-9 -- Rebuilt for java-17-openjdk as system jdk - -* Wed Jan 19 2022 Fedora Release Engineering - 4.0.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 21 2021 Fedora Release Engineering - 4.0.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 4.0.2-6 -- Rebuilt for Python 3.10 - -* Fri May 14 2021 Michal Ambroz - 4.0.2-5 -- modernize specfile, using with bcond and py*_build macros - -* Tue Jan 26 2021 Fedora Release Engineering - 4.0.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 4.0.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jul 22 2020 Riccardo Schirone - 4.0.2-2 -- Use make_build macro instead of make (thanks to tstellar) - -* Mon Jul 20 2020 Riccardo Schirone - 4.0.2-1 -- Rebase to upstream version 4.0.2 - -* Fri Jul 10 2020 Jiri Vanek - 4.0.1-13 -- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - -* Tue May 26 2020 Miro Hrončok - 4.0.1-12 -- Rebuilt for Python 3.9 - -* Tue Jan 28 2020 Fedora Release Engineering - 4.0.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Jan 21 2020 Kalev Lember - 4.0.1-10 -- Avoid hardcoding /usr prefix - -* Tue Oct 15 2019 Michal Ambroz - 4.0.1-9 -- do not build python2 package for rhel8 - -* Thu Oct 10 2019 Michal Ambroz - 4.0.1-8 -- fix descriptions of sub-packages -- remove buildroot from the build phase - -* Thu Oct 10 2019 Michal Ambroz - 4.0.1-7 -- remove python2 from rawhide/fc32 package - -* Thu Oct 03 2019 Miro Hrončok - 4.0.1-6 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Mon Aug 19 2019 Miro Hrončok - 4.0.1-5 -- Rebuilt for Python 3.8 - -* Wed Jul 24 2019 Fedora Release Engineering - 4.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Jan 31 2019 Fedora Release Engineering - 4.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jan 12 2019 Richard W.M. Jones - 4.0.1-2 -- Add upstream patch which fixes libcapstone.pc - https://github.com/aquynh/capstone/issues/1339 - -* Fri Jan 11 2019 Michal Ambroz - 4.0.1-1 -- bump to 4.0.1 release - -* Mon Aug 27 2018 Michal Ambroz - 3.0.5-1 -- bump to 3.0.5 - -* Thu Jul 12 2018 Fedora Release Engineering - 3.0.4-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jul 02 2018 Miro Hrončok - 3.0.4-17 -- Rebuilt for Python 3.7 - -* Tue Jun 26 2018 Michal Ambroz - 3.0.4-16 -- unify the naming convention for the python packages -- fix the python3 package naming for EPEL7 - -* Tue Jun 19 2018 Miro Hrončok - 3.0.4-15 -- Rebuilt for Python 3.7 - -* Fri Feb 09 2018 Igor Gnatenko - 3.0.4-14 -- Escape macros in %%changelog - -* Wed Feb 07 2018 Fedora Release Engineering - 3.0.4-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 3.0.4-12 -- Add Provides for the old name without %%_isa - -* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 3.0.4-11 -- Python 2 binary package renamed to python2-capstone - See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 - -* Wed Aug 02 2017 Fedora Release Engineering - 3.0.4-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 3.0.4-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 3.0.4-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Dec 19 2016 Miro Hrončok - 3.0.4-7 -- Rebuild for Python 3.6 - -* Tue Jul 19 2016 Fedora Release Engineering - 3.0.4-6 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Wed Feb 03 2016 Fedora Release Engineering - 3.0.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Oct 27 2015 Stefan Cornelius - 3.0.4-4 -- Really add dist tag this time - -* Sun Oct 25 2015 Stefan Cornelius - 3.0.4-3 -- Fix issues found during package review: dist tag, git sources - -* Thu Jul 16 2015 Stefan Cornelius - 3.0.4-2 -- Fix EPEL6 build problems - -* Wed Jul 15 2015 Stefan Cornelius - 3.0.4-1 -- new version 3.0.4. Includes security fixes. - -* Tue May 12 2015 Stefan Cornelius - 3.0.3-2 -- Addressed issues found during package review. - -* Fri May 08 2015 Stefan Cornelius - 3.0.3-1 -- Update to version 3.0.3 - -* Fri May 08 2015 Stefan Cornelius - 3.0.2-3 -- Added python3 and hardened build support. Update java building. -- Various cleanups. - -* Wed May 06 2015 Stefan Cornelius - 3.0.2-2 -- Update to 3.0.2. Fix 64bit issues. add %%check. - -* Sat Sep 27 2014 Adel Gadllah - 2.1.2-2 -- Addressed issues found during package review. - -* Mon May 19 2014 Adel Gadllah - 2.1.2-1 -- Initial package +%autochangelog From f912a1b615ab189d22f66afa0e7eafc091ecdddd Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 6 Feb 2025 22:28:41 +0100 Subject: [PATCH 45/52] [skip changelog] adding source tarballs for 5.0.5 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index b5723a1..d7eb6bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (capstone-5.0.1.tar.gz) = 350aba77ce2d96b5c25764913591ba80e4497177ae0a8b2c820c6755ee8310848fbfc54e7ccac27fafc2dbc6778118ad92c53d1b5cb601d4fa146dec7d7e11e5 +SHA512 (capstone-5.0.5.tar.gz) = 36c81fb6f36867b7d43f4e930493cd821cb5f233a56dbe504c6244569f154f462db565181aa2fe7df8f194a7225f56d42f941ff82e2ee16e44d5fb74ff27c818 From 5477268f3177b5a135223a2a2a682c56e7bd7d94 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 22:45:03 +0200 Subject: [PATCH 46/52] Rebuilt for Python 3.14 From ff6e6f4dfc32289dd682e98cc1333b247605476b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 17 Jun 2025 17:12:51 -0400 Subject: [PATCH 47/52] Fix test failures The python bindings need some help to find libcapstone when testing in-build, for which the LIBCAPSTONE_PATH variable is recognized. test_sh.py is not ready for consumption (it references a nonexistent sh_size member) and is not included in test_all.py. --- capstone.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index 2a9f7a4..148befa 100644 --- a/capstone.spec +++ b/capstone.spec @@ -286,7 +286,8 @@ make check LD_LIBRARY_PATH="`pwd`" %if %{with python3} pushd bindings/python -%pytest -sv -k "not testcb and not test_cs_disasm_quick" +export LIBCAPSTONE_PATH=%{buildroot}%{_libdir} +%pytest -sv -k "not testcb and not test_cs_disasm_quick" --ignore 'tests/test_sh.py' popd %endif From 11e82fa2d85d0aa444b4fa57dcc107bd71c5c28a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 18:06:04 +0000 Subject: [PATCH 48/52] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From bd4d0713e73076751cbf6a7bdf50115b76ec4391 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:41:15 +0200 Subject: [PATCH 49/52] Rebuilt for Python 3.14.0rc2 bytecode From 3b7eb0f52dca19ddd60d8353a02b9121ed8c7547 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:10:26 +0200 Subject: [PATCH 50/52] Rebuilt for Python 3.14.0rc3 bytecode From a4c02a08b594070bfe2d8366fbbd2ba0be81b485 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Sun, 16 Nov 2025 01:27:05 +0100 Subject: [PATCH 51/52] bump to 5.0.6 --- capstone.spec | 6 +++--- sources | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/capstone.spec b/capstone.spec index 148befa..a67fe8f 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,5 +1,5 @@ Name: capstone -Version: 5.0.5 +Version: 5.0.6 Release: %autorelease Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT @@ -18,8 +18,8 @@ disasm engine for binary analysis and reversing in the security community.} %global gituser capstone-engine %global gitname capstone # 5.0.5 release -%global gitdate 20250117 -%global commit 55261253c3f14d957c58382df82e61123dad45b9 +%global gitdate 20250323 +%global commit accf4df62f1fba6f92cae692985d27063552601c %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz diff --git a/sources b/sources index d7eb6bf..4b5fed0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (capstone-5.0.5.tar.gz) = 36c81fb6f36867b7d43f4e930493cd821cb5f233a56dbe504c6244569f154f462db565181aa2fe7df8f194a7225f56d42f941ff82e2ee16e44d5fb74ff27c818 +SHA512 (capstone-5.0.6.tar.gz) = d4ed08a2ab4ed8ede51a163e98542129d6441889cf6936ac9e3f8027fb2dfcbb04a7aacba14c2a007e788790bb3939c173b47db3d95f5dd9eafce2f30ff493e1 From a15349e233220da16028e9ffd3c5339d890f0b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 Jul 2025 12:35:30 +0200 Subject: [PATCH 52/52] Drop redundant BuildRequires on python3-wheel --- capstone.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/capstone.spec b/capstone.spec index a67fe8f..188d34c 100644 --- a/capstone.spec +++ b/capstone.spec @@ -80,7 +80,6 @@ BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: python%{python3_pkgversion}-pytest %endif