From 8d919e6985a3de1cdd639e0e2d98ce9de48697a4 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 6 Nov 2020 12:54:17 -0600 Subject: [PATCH 01/40] Update to 1.0.2 Signed-off-by: W. Michael Petullo --- .gitignore | 1 + sources | 2 +- unicorn.spec | 13 +++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index df72d49..5fb7d61 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /unicorn-1.0.2-rc3.tar.gz /unicorn-1.0.2rc4.tar.gz /unicorn-1.0.2-rc4.tar.gz +/unicorn-1.0.2.tar.gz diff --git a/sources b/sources index e2f6d2a..882d4d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-1.0.2-rc4.tar.gz) = a57c2559176f0694d95bca374b66d381f6a15b470294a5a4db7d7f6135ee0a3a82f57c4f4ff7afdeb07a6f66953f5c2102a5922cdbdf6785fed41d0b6830e0b6 +SHA512 (unicorn-1.0.2.tar.gz) = e459c849407ce3e42e40035953f6236f69518d0626ba5233ca4a36e0c70f50f7bac56ecfe4432a9741ac178d982192f588c6cc9795eb2a38c95a04de741fa33c diff --git a/unicorn.spec b/unicorn.spec index cdd59d9..5647027 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,8 +1,6 @@ -%global rctag rc4 - Name: unicorn Version: 1.0.2 -Release: 0.5.%{rctag}%{?dist} +Release: 1%{?dist} Summary: A lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -12,7 +10,7 @@ Summary: A lightweight multi-platform, multi-architecture CPU emulator fr # BSD: Portions of code from QEMU License: GPLv2 and LGPLv2+ and MIT and BSD URL: https://www.unicorn-engine.org/ -Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}-%{rctag}/%{name}-%{version}-%{rctag}.tar.gz +Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: python3-devel @@ -45,7 +43,7 @@ Requires: %{name} = %{version}-%{release} The unicorn-python3 package contains python3 bindings for unicorn. %prep -%autosetup -n %{name}-%{version}-%{rctag} +%autosetup -n %{name}-%{version} %build %make_build @@ -74,10 +72,13 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{_includedir}/unicorn/ %files -n python3-unicorn -%{python3_sitelib}/%{name}-%{version}%{rctag}-py%{python3_version}.egg-info/ +%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info/ %{python3_sitelib}/%{name}/ %changelog +* Fri Nov 06 2020 W. Michael Petullo - 1.0.2-1 +- New upstream version + * Thu Aug 06 2020 W. Michael Petullo - 1.0.2-0.5.rc4 - Revert source name, as I had made use of wrong source tarball From 28007660d339bdc0484cb2007549755d6ee01fa1 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:23:25 +0000 Subject: [PATCH 02/40] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- unicorn.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/unicorn.spec b/unicorn.spec index 5647027..aa6710c 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -11,6 +11,7 @@ Summary: A lightweight multi-platform, multi-architecture CPU emulator fr License: GPLv2 and LGPLv2+ and MIT and BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: make BuildRequires: gcc BuildRequires: python3-devel From dd7b9edfd91cffdd4395df13f81c52e3b5db4db2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 22:40:04 +0000 Subject: [PATCH 03/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index aa6710c..df3f353 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -77,6 +77,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Nov 06 2020 W. Michael Petullo - 1.0.2-1 - New upstream version From 2baf262d2f2af44ab5fcb88fb0552fc3a0099810 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Thu, 6 May 2021 20:58:44 +0200 Subject: [PATCH 04/40] Add BuildRequire on setuptools --- unicorn.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/unicorn.spec b/unicorn.spec index df3f353..eebe5ad 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -14,6 +14,7 @@ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{n BuildRequires: make BuildRequires: gcc BuildRequires: python3-devel +BuildRequires: python3-setuptools # Much of Unicorn follows from QEMU, which the Unicorn project forked in # 2015. Since then, the Unicorn team has applied a number of bugfixes to From c72d0769b6f2360c995d7453e65a24bd7a1f9bf4 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 21:18:48 +0200 Subject: [PATCH 05/40] Rebuilt for Python 3.10 --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index eebe5ad..7f201f2 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -78,6 +78,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Fri Jun 04 2021 Python Maint - 1.0.2-3 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 1.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 29a3542c6f7ed53a2298d89d777a6e3b4adc43db Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:02:12 +0000 Subject: [PATCH 06/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index 7f201f2..fcc5b22 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -78,6 +78,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 1.0.2-3 - Rebuilt for Python 3.10 From 6fd3a8e03168e4e0d63dcfe691b3d75137b2f004 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 Aug 2021 10:43:12 +0200 Subject: [PATCH 07/40] * Thu Aug 26 2021 Fabian Affolter - 1.0.3-1 - Update to latest upstream release 1.0.3 (rhbz#1965152) --- .gitignore | 1 + sources | 2 +- unicorn.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5fb7d61..7afe099 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /unicorn-1.0.2rc4.tar.gz /unicorn-1.0.2-rc4.tar.gz /unicorn-1.0.2.tar.gz +/unicorn-1.0.3.tar.gz diff --git a/sources b/sources index 882d4d8..43df312 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-1.0.2.tar.gz) = e459c849407ce3e42e40035953f6236f69518d0626ba5233ca4a36e0c70f50f7bac56ecfe4432a9741ac178d982192f588c6cc9795eb2a38c95a04de741fa33c +SHA512 (unicorn-1.0.3.tar.gz) = 10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca diff --git a/unicorn.spec b/unicorn.spec index fcc5b22..da7f8f1 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,7 +1,7 @@ Name: unicorn -Version: 1.0.2 -Release: 4%{?dist} -Summary: A lightweight multi-platform, multi-architecture CPU emulator framework +Version: 1.0.3 +Release: 1%{?dist} +Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception # being the code which followed the project's fork of QEMU. @@ -78,6 +78,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Thu Aug 26 2021 Fabian Affolter - 1.0.3-1 +- Update to latest upstream release 1.0.3 (rhbz#1965152) + * Fri Jul 23 2021 Fedora Release Engineering - 1.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 6bf026c635deee87f7065618bff0f96acca3c6ac Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Sat, 8 Jan 2022 10:29:03 -0600 Subject: [PATCH 08/40] * Sat Jan 08 2022 W. Michael Petullo - 1.0.3-2 - Patch to use libunicorn.so.1, not libunicorn.so (Red Hat Bugzilla #2004320) - Require python3-setuptools at runtime (Red Hat Bugzilla #2004320) Signed-off-by: W. Michael Petullo --- unicorn-1.0.3-libunicorn.patch | 12 ++++++++++++ unicorn.spec | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 unicorn-1.0.3-libunicorn.patch diff --git a/unicorn-1.0.3-libunicorn.patch b/unicorn-1.0.3-libunicorn.patch new file mode 100644 index 0000000..847849f --- /dev/null +++ b/unicorn-1.0.3-libunicorn.patch @@ -0,0 +1,12 @@ +diff -u --recursive unicorn-1.0.3-vanilla/bindings/python/unicorn/unicorn.py unicorn-1.0.3/bindings/python/unicorn/unicorn.py +--- unicorn-1.0.3-vanilla/bindings/python/unicorn/unicorn.py 2021-05-26 10:07:07.000000000 -0500 ++++ unicorn-1.0.3/bindings/python/unicorn/unicorn.py 2022-01-08 10:14:03.531253408 -0600 +@@ -22,7 +22,7 @@ + _lib = { 'darwin': 'libunicorn.dylib', + 'win32': 'unicorn.dll', + 'cygwin': 'cygunicorn.dll', +- 'linux': 'libunicorn.so', ++ 'linux': 'libunicorn.so.1', + 'linux2': 'libunicorn.so' } + + diff --git a/unicorn.spec b/unicorn.spec index da7f8f1..4b90554 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -11,7 +11,8 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram License: GPLv2 and LGPLv2+ and MIT and BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: make +Patch0: unicorn-1.0.3-libunicorn.patch +BuildRequires: make BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -39,13 +40,14 @@ needed for developing applications using unicorn. %package -n python3-unicorn Summary: %{summary} Requires: %{name} = %{version}-%{release} +Requires: python3-setuptools %{?python_provide:%python_provide python3-%{name}} %description -n python3-unicorn The unicorn-python3 package contains python3 bindings for unicorn. %prep -%autosetup -n %{name}-%{version} +%autosetup -n %{name}-%{version} -p1 %build %make_build @@ -78,6 +80,10 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Sat Jan 08 2022 W. Michael Petullo - 1.0.3-2 +- Patch to use libunicorn.so.1, not libunicorn.so (Red Hat Bugzilla #2004320) +- Require python3-setuptools at runtime (Red Hat Bugzilla #2004320) + * Thu Aug 26 2021 Fabian Affolter - 1.0.3-1 - Update to latest upstream release 1.0.3 (rhbz#1965152) From 9a370c68227a064bd93ec84256477eac63a6aff9 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Sat, 8 Jan 2022 11:07:53 -0600 Subject: [PATCH 09/40] Remove obsolete patch file Signed-off-by: W. Michael Petullo --- unicorn-1.0.2-rc3-python3.patch | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 unicorn-1.0.2-rc3-python3.patch diff --git a/unicorn-1.0.2-rc3-python3.patch b/unicorn-1.0.2-rc3-python3.patch deleted file mode 100644 index caf10bf..0000000 --- a/unicorn-1.0.2-rc3-python3.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u --recursive unicorn-1.0.2-rc3-vanilla/Makefile unicorn-1.0.2-rc3/Makefile ---- unicorn-1.0.2-rc3-vanilla/Makefile 2020-04-08 10:52:43.000000000 -0400 -+++ unicorn-1.0.2-rc3/Makefile 2020-05-18 12:05:00.990026573 -0400 -@@ -226,7 +226,7 @@ - - qemu/config-host.h-timestamp: - cd qemu && \ -- ./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS} -+ ./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" --python=python3 ${UNICORN_QEMU_FLAGS} - printf "$(UNICORN_ARCHS)" > config.log - $(MAKE) -C qemu $(SMP_MFLAGS) - $(eval UC_TARGET_OBJ += $$(wildcard qemu/util/*.o) $$(wildcard qemu/*.o) $$(wildcard qemu/qom/*.o) $$(wildcard qemu/hw/core/*.o) $$(wildcard qemu/qapi/*.o) $$(wildcard qemu/qobject/*.o)) -@@ -322,7 +322,7 @@ - $(eval TARGETS := m68k arm armeb aarch64 aarch64eb mips mipsel mips64 mips64el\ - powerpc sparc sparc64 x86_64) - $(foreach var,$(TARGETS),\ -- $(shell python qemu/header_gen.py $(var) > qemu/$(var).h;)) -+ $(shell python3 qemu/header_gen.py $(var) > qemu/$(var).h;)) - @echo "Generated headers for $(TARGETS)." - - From 3c42da3cf646b8d8c7c7ff0a7d9722f8b40422cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:31:13 +0000 Subject: [PATCH 10/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index 4b90554..c350d0c 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -80,6 +80,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 1.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sat Jan 08 2022 W. Michael Petullo - 1.0.3-2 - Patch to use libunicorn.so.1, not libunicorn.so (Red Hat Bugzilla #2004320) - Require python3-setuptools at runtime (Red Hat Bugzilla #2004320) From 092ef8d2058972ca80c38776ea16f0dc16004aa2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:31:21 +0200 Subject: [PATCH 11/40] Rebuilt for Python 3.11 --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index c350d0c..7a13b0d 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -80,6 +80,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Mon Jun 13 2022 Python Maint - 1.0.3-4 +- Rebuilt for Python 3.11 + * Sat Jan 22 2022 Fedora Release Engineering - 1.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From c20b3f9ea2c66a85a81658e5047780bd820ec0e5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:23:23 +0000 Subject: [PATCH 12/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index 7a13b0d..d755d9e 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -80,6 +80,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 1.0.3-4 - Rebuilt for Python 3.11 From d2f7b5a63c4bcdf98f99d275b36dc3d969393386 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 05:48:49 +0000 Subject: [PATCH 13/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- unicorn.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index d755d9e..62d3cc9 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn Version: 1.0.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -80,6 +80,9 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 1.0.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From d67c8f59dc3561ad503bdb30ba35dcc57873a0a3 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Thu, 18 May 2023 13:44:06 -0500 Subject: [PATCH 14/40] Update to 2.0.1 Signed-off-by: W. Michael Petullo --- .gitignore | 1 + AUTHORS.TXT | 2 + COPYING | 339 +++++++++++++++++++++++++++++++++ CREDITS.TXT | 82 ++++++++ ChangeLog | 328 +++++++++++++++++++++++++++++++ sources | 2 +- unicorn-1.0.3-libunicorn.patch | 12 -- unicorn.spec | 115 +++-------- 8 files changed, 779 insertions(+), 102 deletions(-) create mode 100644 AUTHORS.TXT create mode 100644 COPYING create mode 100644 CREDITS.TXT create mode 100644 ChangeLog delete mode 100644 unicorn-1.0.3-libunicorn.patch diff --git a/.gitignore b/.gitignore index 7afe099..168ee6f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /unicorn-1.0.2-rc4.tar.gz /unicorn-1.0.2.tar.gz /unicorn-1.0.3.tar.gz +/unicorn-2.0.1.tar.gz diff --git a/AUTHORS.TXT b/AUTHORS.TXT new file mode 100644 index 0000000..5d4ea77 --- /dev/null +++ b/AUTHORS.TXT @@ -0,0 +1,2 @@ +Nguyen Anh Quynh +Dang Hoang Vu diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..00ccfbb --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/CREDITS.TXT b/CREDITS.TXT new file mode 100644 index 0000000..11df062 --- /dev/null +++ b/CREDITS.TXT @@ -0,0 +1,82 @@ +This file credits all the contributors of the Unicorn engine project. + + +Key developers +============== +Nguyen Anh Quynh +Dang Hoang Vu +Huitao Chen (chenhuitao) +Ziqiao Kong (lazymio) +KaiJernLau (xwings) + + +Beta testers (in no particular order) +============================== +Nguyen Tan Cong +Loi Anh Tuan +Edgar Barbosa +Joxean Koret +Chris Eagle +Jay Little, Trail of Bits +Jeong Wook Oh +Luis Miras +Yan Shoshitaishvili, Shellphish & UC Santa Barbara +Erik Fischer +Darel Griffin, NCC Group +Anton Cherepanov +Mohamed Saher (halsten) +Tyler Colgan +Jonathon Reinhart +Blue Skeye +Chris Maixner +Sergi Alvarez, aka pancake (author of radare) +Ryan Hileman +Tim "diff" Strazzere +WanderingGlitch of the Zero Day Initiative +Sascha Schirra +François Serman +Sean Heelan +Luke Burnett +Parker Thompson +Daniel Godas-Lopez +Antonio "s4tan" Parata +Corey Kallenberg +Shift +Gabriel Quadros +Fabian Yamaguchi +Ralf-Philipp Weinmann +Mike Guidry +Joshua "posixninja" Hill + + +Contributors (in no particular order) +===================================== +(Please let us know if you want to have your name here) + +Nguyen Tan Cong +Loi Anh Tuan +Shaun Wheelhouse: Homebrew package +Kamil Rytarowski: Pkgsrc package +Zak Escano: MSVC support. +Chris Eagle: Java binding +Ryan Hileman: Go binding +Antonio Parata: .NET binding +Jonathon Reinhart: C unit test +Sascha Schirra: Ruby binding +Adrian Herrera: Haskell binding +practicalswift: Various cool bugs found by fuzzing +farmdve: Memory leaking fix +Andrew Dutcher: uc_context_{save, restore} API. +Stephen Groat: improved CI setup. +David Zimmer: VB6 binding. +zhangwm: ARM & ARM64 big endian. +Mohamed Osama: FreePascal/Delphi binding. +Philippe Antoine (Catena cyber): fuzzing +Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Cmake support +Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Python3 support for building +Kevin Foo (chfl4gs): Travis-CI migration +Simon Gorchakov: PowerPC target +Stuart Dootson (studoot): MSVC compatibility with PowerPC target support +Ziqiao Kong (lazymio): uc_context_free() API and various bug fix & improvement. +Sven Almgren (blindmatrix): bug fix +Chenxu Wu (kabeor): Documentation diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..0e7113d --- /dev/null +++ b/ChangeLog @@ -0,0 +1,328 @@ +This file details the changelog of Unicorn Engine. + +------------------------------- +[Version 2.0.1.post1]: Nov 22nd, 2022 + +This is a small release to complement the previous 2.0.1 release. + +Fix: + +- Fix the endianness detection in tests. +- Fix the version number in CMakeLists.txt. + +------------------------------- +[Version 2.0.1]: Nov 1st, 2022 + +Unicorn2 makes the first step to [Debian packages](https://tracker.debian.org/pkg/unicorn-engine) and [vcpkg](https://github.com/microsoft/vcpkg/pull/26101)! Thanks @roehling and @LilyWangL ! + +Features: + +- Support building & running on BE hosts. #1710 +- Fix and support `clang-cl` on Windows. #1687 +- Fix python `sdist` and add aarch64 Linux wheels. Note `pip` can build Unicorn2 on M1 now! +- C# binding is refined and upgraded to .Net 6. #1723 + +Fix/Improvements: + +- Various bindings improvements. #1723 +- Improvements for tests. #1684 #1683 #1691 #1711 +- Fail explicitly when VEX.L is set. #1658 +- Fix endianness when writing PPC32 CR register. #1659 +- Fix a bug in `uc_ctl_set_cpu_model` check. +- Fix Tricore PC not updating. #1668 +- Fix the mapping not updated if users modify the mappings in the hooks. +- Handle pathological cases consistently. #1651 +- Fix memory leaks in PPC target. #1680 +- Fix memory leaks in Tricore target. #1681 +- Fix MSVC handling in cmake. #1693 +- Fix PC sync-ing problems for `UC_HOOK_BLOCK` hooks. +- Fix PC sync-ed twice when users request a soft restart. +- Prevent overflow with pre-allocated RAM blocks. #1712 +- Add FPCR and FPSR registers #1722 +- Fix ARM CPU state not deep copied. +- Fix PC not sync-ed for memory operation on aarch64. +- Exit invalid store operations early to avoid the target registers being overwritten. +- Improve the support for ARM BE32. + +Thanks: + +@roehling @LilyWangL @mrexodia @zachriggle @Yu3H0 @rhelmot @relapids @sh4w1 @TSRBerry + +------------------------------- +[Version 2.0.0]: July 7th, 2022 + +Features: + +- TriCore Support (#1568) + +Fixes/Improvements: + +- Build both shared library and static archive as unicorn1 does. +- Misc bindings improvements. #1569 #1600 #1609 #1613 #1616 +- Make sure setjmp-setjmp-wrapper-win32 participates in the build. #1604 +- Improve Rust bindings build logic. +- Fix wrong python binding for UC_CTL_TB_REMOVE_CACHE +- Flush translation blocks when the count hook is removed. +- Fix unicorn crash when nested `uc_emu_start` deletes a hook +- Fix CPU not fully resumed when writing PC. +- Don't quit TB if `uc_mem_protect` doesn't change the protection of current TB memory. +- Add type annotations for python bindings. +- Add CPUID hook for python bindings. #1618 +- Don't repeat memory hooks if there is already an unhandled error. #1618 +- Support reads and writes over all Arm SIMD registers #1621 +- Fix wrong registers range in python bindings. +- Fix uc_mem_protect on mmio regions +- Fix a UAF caused by hook cache. +- Fix the value collision between UC_MODE_ARMBE8 and UC_MODE_ARM926 + +Thanks: + +@AfoHT @mrexodia @bet4it @lowlyw @ekilmer @ondryaso @QDucasse @PalumboN @uberwoozle + +---------------------------------- +[Version 2.0.0 rc7]: April 17, 2022 + +This release is expected to be the real last RC release of Unicorn2. ;) + +Features: + +- Correctly generate static archives for the static build and have CI auto-tested. +- Rust bindings revised. #1584 +- Compatible with clang-cl compiler. #1581 +- Implement UC_HOOK_INSN for aarch64 MRS/MSR/SYS/SYSL + +Fixes/Improvements: + +- Several corner cases on our API. #1587 #1595 +- Fix the codegen buffer leak. +- Rust bindins improvements. #1574 #1575 +- Add "holes" to allow unicorn lib as a drop-in replacement for older ones. #1572 +- s390x backports. #1570 +- Fix exits wrongly removed in nested uc_emu_start +- Fix a possible endless loop for only one translation block in a multithreaded environment. +- Fix wrong PC without `UC_HOOK_CODE` installed. +- Update vb6 bindings license. #1563 +- Fix buffer allocation failure on M1. #1559 +- Fix wrong EFLAGS on startup. +- Fix wrong internal states on nested uc_emu_start. +- Remove armeb-softmmu and aarcheb-softmmu which are usermode targets. +- Advance PPC32 PC. #1558 +- Support UC_PPC_REG_CR. +- Update CI to windows-2019 + +Thanks: + +@shuffle2 @liyansong2018 @rose4096 @nviennot @n1tram1 @iii-i @dzzie @yrashk @bet4it + +---------------------------------- +[Version 2.0.0 rc6]: Feburary 13, 2022 + +This release is expected to be the last RC release of Unicorn2. + +Features: + +- SystemZ (aka. s390x) support. #1521 #1547 +- CPUID hook now may return a bool to indicate whether skipping the CPUID instruction. +- ARM/AARCH64 coprocessor registers read/write support. #889 + +Fixes/Improvements: + +- Rust improvements. More registers enums #1504 Easier to use #1543 #1545 +- M68k improvements. #1507 +- Golang improvements. Enable `uc_ctl_set_model` #1506 +- Unit tests improvements. #1512 +- Various ARM system mode fixes. #1500 #1520 #1525 #1531 +- Read/write arm FPSCR and FPSID. #1453 +- Fix the support for ARMv8 +- Fix a large number of memory leaks and unicorn2 now goes with google/oss-fuzz! +- Add more X87 registers. #1524 +- Add more PPC registers. +- Fix the exception not cleared in python bindings. #1537 +- Correctly support ARM big endian and drops `armeb-softmmu` and `aarch64eb-softmmu` +- Fix ARM CPSR.E not reflected during runtime. +- Resolve fuzzing speed problem on macOS. +- Modernize CmakeFileLists.txt. #1544 +- Fix an issue in nested `uc_emu_start` + +Thanks: + +@Kritzefitz @zznop @QDucasse @gerph @bet4it @mrexodia @iii-i @jbcayrou @scribam + +---------------------------------- +[Version 2.0.0 rc5]: November 25, 2021 + +This release fixes a few urgent bugs and improves performance. + +Fixes/Improvements: + +- Rust bindings improvements. #1480 #1483 +- Allow R/W to cp15 registers. #1481 +- Fix `UC_HOOK_EDGE_GENERATED` not calling for indirect jumps. +- Python bindings build improvements. #1486 +- Fix bindings on m1 macOS. +- Support nested `uc_emu_start` calls without context save/restore +- Fix wrong MMIO offset for 32bit targets. +- Fix wrong `uc_mem_unmap` logic for both ram and mmio memory. +- Inline `uc_trace_code` and PC sync to improve performance. +- Various fixes in tests. +- Allow writing to CPSR to switch bank registers. +- Implement MMIO in rust bindings. #1499 + +Thanks: + +- @domenukk +- @bet4it +- @mid-kid +- @Kritzefitz + +---------------------------------- +[Version 2.0.0 rc4]: November 09, 2021 + +This is a big release of Unicorn and introduces a few powerful new features and a bunch of fixes. + +New Features: + +- New API: uc_ctl, by which you could control CPU models, TB caches or multiple exits etc. +- New Hook: UC_HOOK_EDGE_GENERATED, UC_HOOK_TCG_OPCODE +- RISCV CSR read/write. +- Support reading MIPS hi/lo regs. 7268c2a19bce2db72b90e3ea3b133482c3ff4e58 +- OSS Fuzzing building support. +- MSVC 32bit and Android build support. +- Introduce clang-format. + +Fixes/Improvements: + +- Java bindings improvements. unicorn-engine/unicorn#1461 +- API Documents updates. unicorn-engine/unicorn#1459 +- Rust bindings improvements. unicorn-engine/unicorn#1462 +- Add a go.mod for go bindings. +- CMakeLists.txt improvements as a subproject. #1373 +- Fix rust bindings build script and add CI. +- Use binary search to find mappings. unicorn-engine/unicorn#1414 +- RISCV: + - Update pc when exiting execution. unicorn-engine/unicorn#1465 + - Add RISCV control status registers to enable floating. unicorn-engine/unicorn#1469 unicorn-engine/unicorn#1478 + - After `ecall`, pc not advanced. unicorn-engine/unicorn#1477 +- Fix tb not invalidated when exiting. +- Fix bindings makefile. +- Fix uc_mem_protect not working. unicorn-engine/unicorn#1468 + +Thanks: + +- @bet4it +- @kabeor +- @chfl4gs +- @QDucasse +- @h33p +- @geohot +- @cla7aye15I4nd +- @jcalabres + +---------------------------------- +[Version 2.0.0 rc3]: October 06, 2021 + +This is an urgent pre-release regarding python bindings on older Linux systems. + +- Support older Linux distribution, e.g. prior to Ubuntu 19.04 +- Fix a memory leak in `uc_close` +- Support building on Android +- Support hooking CPUID instruction. + +Enjoy. + +---------------------------------- +[Version 2.0.0 rc2]: October 05, 2021 + +This is an urgent pre-release regarding the packaging problem of python bindings. + +- Set `zip_false` and `is_pure` to `False` to avoid issues on some Linux distributions. +- Link to `libm` to make sure our libraries work. +- Support to read ST registers in rust bindings. +- Fix #1450 + +Enjoy. + +---------------------------------- +[Version 2.0.0 rc1]: October 04, 2021 + +Unicorn2 first release candidate! + +- Based on Qemu 5.0.1 +- Remain backward compatible with Unicorn 1.x +- Update ISA of all existing architectures +- Support 2 new architectures in PowerPC & RISCV + +---------------------------------- +[Unicorn2-beta]: October 3rd, 2021 + +- Release Unicorn2 beta to public. +- New logo to celebrate this important milestone! + +---------------------------------- +[Version 1.0.1]: April 20th, 2017 + +- Properly handle selected-architecture build. +- Fix compilation issues on PPC & S390x. +- Fix a memory leak on uc_mem_protect(). +- ARM: + - Support big-endian mode. + - Correct instruction size of Thumb/Thumb2 code. + - Support read/write APSR register. +- ARM64: + - Support read/write NEON registers. + - Support read/write NZCV registers. +- Mips: Support read/write Mips64 registers. +- X86: Support read/write MSR. +- Haskell binding: update to the latest API. +- Python: allow not having PATH setup. + +---------------------------------- +[Version 1.0]: February 23rd, 2017 + +- Fix build script for BSD host. +- Fix building Unicorn on Arm/PPC/Sparc/S390 hosts. +- X86: + - Fix 16bit address computation. + - Fix initial state of segment registers. + +---------------------------------- +[Version 1.0-rc3]: January 25th, 2017 + +- Rename API uc_context_free() to uc_free(). +- ARM: + - uc_reg_write() now can modify CPSR register. + - Add some ARM coproc registers. +- ARM64: uc_reg_read|write() now handles W0-W31 registers. +- Windows: fix a double free bug in uc_close(). +- New VB6 binding. +- Java: update to support new APIs from v1.0-rc1. +- Python: + - Fix memory leaking that prevents UC instances from being GC. + - Remove some dependencies leftover from glib time. + - Add new method mem_regions() (linked to uc_mem_regions() API) + +---------------------------------- +[Version 1.0-rc2]: January 4th, 2017 + +- Remove glib & pkconfig dependency. +- Python: fix an issue to restore support for FreeBSD (and other *BSD Unix). +- ARM: support MCLASS cpu (Cortex-M3). +- Windows: export a static lib that can be used outside of Mingw + +---------------------------------- +[Version 1.0-rc1]: December 22nd, 2016 + +- Lots of bugfixes in all architectures. +- Better support for ARM Thumb. +- Fix many memory leaking issues. +- New bindings: Haskell, MSVC. +- Better support for Python3. +- New APIs: uc_query, uc_reg_write_batch, uc_reg_read_batch, uc_mem_map_ptr, uc_mem_regions, uc_context_alloc, uc_context_save & uc_context_restore. +- New memory hook type: UC_HOOK_MEM_READ_AFTER. +- Add new version macros UC_VERSION_{MAJOR, MINOR, EXTRA} + +---------------------------------- +[Version 0.9]: October 15th, 2015 + +- Initial public release. + diff --git a/sources b/sources index 43df312..de85a0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-1.0.3.tar.gz) = 10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca +SHA512 (unicorn-2.0.1.tar.gz) = a7b6c6e46ab91a1e18c2f7326eb7e5386b8e7a709dfacb6df4cb94bb17c17af453e4a652d1c7f256b88795212a3dc4d3049d42a4ee0a860736997739b88bf041 diff --git a/unicorn-1.0.3-libunicorn.patch b/unicorn-1.0.3-libunicorn.patch deleted file mode 100644 index 847849f..0000000 --- a/unicorn-1.0.3-libunicorn.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u --recursive unicorn-1.0.3-vanilla/bindings/python/unicorn/unicorn.py unicorn-1.0.3/bindings/python/unicorn/unicorn.py ---- unicorn-1.0.3-vanilla/bindings/python/unicorn/unicorn.py 2021-05-26 10:07:07.000000000 -0500 -+++ unicorn-1.0.3/bindings/python/unicorn/unicorn.py 2022-01-08 10:14:03.531253408 -0600 -@@ -22,7 +22,7 @@ - _lib = { 'darwin': 'libunicorn.dylib', - 'win32': 'unicorn.dll', - 'cygwin': 'cygunicorn.dll', -- 'linux': 'libunicorn.so', -+ 'linux': 'libunicorn.so.1', - 'linux2': 'libunicorn.so' } - - diff --git a/unicorn.spec b/unicorn.spec index 62d3cc9..23f8b3e 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,6 +1,6 @@ Name: unicorn -Version: 1.0.3 -Release: 6%{?dist} +Version: 2.0.1 +Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework # GPLv2: Most of unicorn is licensed under the GPLv2, with exception @@ -11,8 +11,10 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram License: GPLv2 and LGPLv2+ and MIT and BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: unicorn-1.0.3-libunicorn.patch -BuildRequires: make +Source1: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/AUTHORS.TXT +Source2: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/ChangeLog +Source3: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/COPYING +Source4: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/CREDITS.TXT BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -48,30 +50,38 @@ The unicorn-python3 package contains python3 bindings for unicorn. %prep %autosetup -n %{name}-%{version} -p1 +cp -p %SOURCE1 . +cp -p %SOURCE2 . +cp -p %SOURCE3 . +cp -p %SOURCE4 . %build -%make_build -pushd bindings/python %py3_build -popd %install -%make_install LIBDIRARCH=%{_lib} UNICORN_STATIC=no -pushd bindings/python %py3_install -popd -rm -rf %{buildroot}%{python3_sitelib}/unicorn/include -rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib + +mkdir -p $RPM_BUILD_ROOT%{_includedir} +mv $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/include/unicorn $RPM_BUILD_ROOT%{_includedir} + +mkdir -p $RPM_BUILD_ROOT%{_libdir} +mv $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/lib/* $RPM_BUILD_ROOT%{_libdir} + +ln -s libunicorn.so.2 $RPM_BUILD_ROOT%{_libdir}/libunicorn.so + +install -D -m 0644 src/build_python/unicorn.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/unicorn.pc + +rm $RPM_BUILD_ROOT%{_libdir}/libunicorn.a %ldconfig_scriptlets %files -%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.md +%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.TXT %license COPYING -%{_libdir}/lib*.so.* +%{_libdir}/libunicorn.so.2 %files devel -%{_libdir}/lib*.so +%{_libdir}/libunicorn.so %{_libdir}/pkgconfig/unicorn.pc %{_includedir}/unicorn/ @@ -80,77 +90,4 @@ rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib %{python3_sitelib}/%{name}/ %changelog -* Sat Jan 21 2023 Fedora Release Engineering - 1.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 1.0.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 1.0.3-4 -- Rebuilt for Python 3.11 - -* Sat Jan 22 2022 Fedora Release Engineering - 1.0.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Sat Jan 08 2022 W. Michael Petullo - 1.0.3-2 -- Patch to use libunicorn.so.1, not libunicorn.so (Red Hat Bugzilla #2004320) -- Require python3-setuptools at runtime (Red Hat Bugzilla #2004320) - -* Thu Aug 26 2021 Fabian Affolter - 1.0.3-1 -- Update to latest upstream release 1.0.3 (rhbz#1965152) - -* Fri Jul 23 2021 Fedora Release Engineering - 1.0.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 1.0.2-3 -- Rebuilt for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Nov 06 2020 W. Michael Petullo - 1.0.2-1 -- New upstream version - -* Thu Aug 06 2020 W. Michael Petullo - 1.0.2-0.5.rc4 -- Revert source name, as I had made use of wrong source tarball - -* Thu Aug 06 2020 W. Michael Petullo - 1.0.2-0.4.rc4 -- Fix source name - -* Thu Aug 06 2020 W. Michael Petullo - 1.0.2-0.3.rc4 -- Update to 1.0.2-rc4 to satisfy python-angr (Red Hat Bugzilla #1858455 and #1865272) - -* Wed Jul 29 2020 Fedora Release Engineering - 1.0.2-0.3.rc3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 1.0.2-0.2.rc3 -- Rebuilt for Python 3.9 - -* Mon May 18 2020 W. Michael Petullo - 1.0.2-0.1.rc3 -- Update to 1.0.2-rc3 to satisfy pwntools (Red Hat Bugzilla #1836767 and #1833654) -- Removed obsolete patch to use python2 - -* Fri Jan 31 2020 Fedora Release Engineering - 1.0.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Sep 05 2019 Miro Hrončok - 1.0.1-7 -- Subpackage python2-unicorn has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Mon Aug 19 2019 Miro Hrončok - 1.0.1-6 -- Rebuilt for Python 3.8 - -* Sat Jul 27 2019 Fedora Release Engineering - 1.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 1.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sun Jul 22 2018 W. Michael Petullo - 1.0.1-3 -- Add patch to use python2 rather than python when building - -* Sat Jul 14 2018 Fedora Release Engineering - 1.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Sat Jun 16 2018 W. Michael Petullo - 1.0.1-1 -- Initial package +%autochangelog From 807e1a7159f922168a61baa3f01e86e86a44b7c0 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Thu, 18 May 2023 14:18:38 -0500 Subject: [PATCH 15/40] Add cmake as build requirement Signed-off-by: W. Michael Petullo --- unicorn.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/unicorn.spec b/unicorn.spec index 23f8b3e..6f11505 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -15,6 +15,7 @@ Source1: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/A Source2: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/ChangeLog Source3: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/COPYING Source4: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/CREDITS.TXT +BuildRequires: cmake BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools From 16958cbfd66c47494e90727275ab45491b71f04a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 20:56:33 +0200 Subject: [PATCH 16/40] Rebuilt for Python 3.12 From a2a786964b7ef24614d6eb2cf875c54f0532d77a Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 14 Jul 2023 14:46:07 -0500 Subject: [PATCH 17/40] Update to 2.0.1.post1 Signed-off-by: W. Michael Petullo --- .gitignore | 1 + sources | 2 +- unicorn.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 168ee6f..1233882 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /unicorn-1.0.2.tar.gz /unicorn-1.0.3.tar.gz /unicorn-2.0.1.tar.gz +/unicorn-2.0.1.post1.tar.gz diff --git a/sources b/sources index de85a0b..b39554b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.0.1.tar.gz) = a7b6c6e46ab91a1e18c2f7326eb7e5386b8e7a709dfacb6df4cb94bb17c17af453e4a652d1c7f256b88795212a3dc4d3049d42a4ee0a860736997739b88bf041 +SHA512 (unicorn-2.0.1.post1.tar.gz) = 196f4f894cc96dc357881c72f201ff8fd146d07c5e54d4a35d8ce3b84c2ee63937b4bec482e2fa237571ba1e17ce8089d89036ad7e729f795ea47f39aa938dd2 diff --git a/unicorn.spec b/unicorn.spec index 6f11505..8203999 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,5 +1,5 @@ Name: unicorn -Version: 2.0.1 +Version: 2.0.1.post1 Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework From 271d8f46c1326a282a37992258387c35e4567a31 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 14 Jul 2023 16:47:55 -0500 Subject: [PATCH 18/40] Modify to use GitHub source, not PyPi source Signed-off-by: W. Michael Petullo --- AUTHORS.TXT | 2 - COPYING | 339 --------------------------------------------------- CREDITS.TXT | 82 ------------- ChangeLog | 328 ------------------------------------------------- sources | 2 +- unicorn.spec | 32 ++--- 6 files changed, 13 insertions(+), 772 deletions(-) delete mode 100644 AUTHORS.TXT delete mode 100644 COPYING delete mode 100644 CREDITS.TXT delete mode 100644 ChangeLog diff --git a/AUTHORS.TXT b/AUTHORS.TXT deleted file mode 100644 index 5d4ea77..0000000 --- a/AUTHORS.TXT +++ /dev/null @@ -1,2 +0,0 @@ -Nguyen Anh Quynh -Dang Hoang Vu diff --git a/COPYING b/COPYING deleted file mode 100644 index 00ccfbb..0000000 --- a/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/CREDITS.TXT b/CREDITS.TXT deleted file mode 100644 index 11df062..0000000 --- a/CREDITS.TXT +++ /dev/null @@ -1,82 +0,0 @@ -This file credits all the contributors of the Unicorn engine project. - - -Key developers -============== -Nguyen Anh Quynh -Dang Hoang Vu -Huitao Chen (chenhuitao) -Ziqiao Kong (lazymio) -KaiJernLau (xwings) - - -Beta testers (in no particular order) -============================== -Nguyen Tan Cong -Loi Anh Tuan -Edgar Barbosa -Joxean Koret -Chris Eagle -Jay Little, Trail of Bits -Jeong Wook Oh -Luis Miras -Yan Shoshitaishvili, Shellphish & UC Santa Barbara -Erik Fischer -Darel Griffin, NCC Group -Anton Cherepanov -Mohamed Saher (halsten) -Tyler Colgan -Jonathon Reinhart -Blue Skeye -Chris Maixner -Sergi Alvarez, aka pancake (author of radare) -Ryan Hileman -Tim "diff" Strazzere -WanderingGlitch of the Zero Day Initiative -Sascha Schirra -François Serman -Sean Heelan -Luke Burnett -Parker Thompson -Daniel Godas-Lopez -Antonio "s4tan" Parata -Corey Kallenberg -Shift -Gabriel Quadros -Fabian Yamaguchi -Ralf-Philipp Weinmann -Mike Guidry -Joshua "posixninja" Hill - - -Contributors (in no particular order) -===================================== -(Please let us know if you want to have your name here) - -Nguyen Tan Cong -Loi Anh Tuan -Shaun Wheelhouse: Homebrew package -Kamil Rytarowski: Pkgsrc package -Zak Escano: MSVC support. -Chris Eagle: Java binding -Ryan Hileman: Go binding -Antonio Parata: .NET binding -Jonathon Reinhart: C unit test -Sascha Schirra: Ruby binding -Adrian Herrera: Haskell binding -practicalswift: Various cool bugs found by fuzzing -farmdve: Memory leaking fix -Andrew Dutcher: uc_context_{save, restore} API. -Stephen Groat: improved CI setup. -David Zimmer: VB6 binding. -zhangwm: ARM & ARM64 big endian. -Mohamed Osama: FreePascal/Delphi binding. -Philippe Antoine (Catena cyber): fuzzing -Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Cmake support -Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Python3 support for building -Kevin Foo (chfl4gs): Travis-CI migration -Simon Gorchakov: PowerPC target -Stuart Dootson (studoot): MSVC compatibility with PowerPC target support -Ziqiao Kong (lazymio): uc_context_free() API and various bug fix & improvement. -Sven Almgren (blindmatrix): bug fix -Chenxu Wu (kabeor): Documentation diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 0e7113d..0000000 --- a/ChangeLog +++ /dev/null @@ -1,328 +0,0 @@ -This file details the changelog of Unicorn Engine. - -------------------------------- -[Version 2.0.1.post1]: Nov 22nd, 2022 - -This is a small release to complement the previous 2.0.1 release. - -Fix: - -- Fix the endianness detection in tests. -- Fix the version number in CMakeLists.txt. - -------------------------------- -[Version 2.0.1]: Nov 1st, 2022 - -Unicorn2 makes the first step to [Debian packages](https://tracker.debian.org/pkg/unicorn-engine) and [vcpkg](https://github.com/microsoft/vcpkg/pull/26101)! Thanks @roehling and @LilyWangL ! - -Features: - -- Support building & running on BE hosts. #1710 -- Fix and support `clang-cl` on Windows. #1687 -- Fix python `sdist` and add aarch64 Linux wheels. Note `pip` can build Unicorn2 on M1 now! -- C# binding is refined and upgraded to .Net 6. #1723 - -Fix/Improvements: - -- Various bindings improvements. #1723 -- Improvements for tests. #1684 #1683 #1691 #1711 -- Fail explicitly when VEX.L is set. #1658 -- Fix endianness when writing PPC32 CR register. #1659 -- Fix a bug in `uc_ctl_set_cpu_model` check. -- Fix Tricore PC not updating. #1668 -- Fix the mapping not updated if users modify the mappings in the hooks. -- Handle pathological cases consistently. #1651 -- Fix memory leaks in PPC target. #1680 -- Fix memory leaks in Tricore target. #1681 -- Fix MSVC handling in cmake. #1693 -- Fix PC sync-ing problems for `UC_HOOK_BLOCK` hooks. -- Fix PC sync-ed twice when users request a soft restart. -- Prevent overflow with pre-allocated RAM blocks. #1712 -- Add FPCR and FPSR registers #1722 -- Fix ARM CPU state not deep copied. -- Fix PC not sync-ed for memory operation on aarch64. -- Exit invalid store operations early to avoid the target registers being overwritten. -- Improve the support for ARM BE32. - -Thanks: - -@roehling @LilyWangL @mrexodia @zachriggle @Yu3H0 @rhelmot @relapids @sh4w1 @TSRBerry - -------------------------------- -[Version 2.0.0]: July 7th, 2022 - -Features: - -- TriCore Support (#1568) - -Fixes/Improvements: - -- Build both shared library and static archive as unicorn1 does. -- Misc bindings improvements. #1569 #1600 #1609 #1613 #1616 -- Make sure setjmp-setjmp-wrapper-win32 participates in the build. #1604 -- Improve Rust bindings build logic. -- Fix wrong python binding for UC_CTL_TB_REMOVE_CACHE -- Flush translation blocks when the count hook is removed. -- Fix unicorn crash when nested `uc_emu_start` deletes a hook -- Fix CPU not fully resumed when writing PC. -- Don't quit TB if `uc_mem_protect` doesn't change the protection of current TB memory. -- Add type annotations for python bindings. -- Add CPUID hook for python bindings. #1618 -- Don't repeat memory hooks if there is already an unhandled error. #1618 -- Support reads and writes over all Arm SIMD registers #1621 -- Fix wrong registers range in python bindings. -- Fix uc_mem_protect on mmio regions -- Fix a UAF caused by hook cache. -- Fix the value collision between UC_MODE_ARMBE8 and UC_MODE_ARM926 - -Thanks: - -@AfoHT @mrexodia @bet4it @lowlyw @ekilmer @ondryaso @QDucasse @PalumboN @uberwoozle - ----------------------------------- -[Version 2.0.0 rc7]: April 17, 2022 - -This release is expected to be the real last RC release of Unicorn2. ;) - -Features: - -- Correctly generate static archives for the static build and have CI auto-tested. -- Rust bindings revised. #1584 -- Compatible with clang-cl compiler. #1581 -- Implement UC_HOOK_INSN for aarch64 MRS/MSR/SYS/SYSL - -Fixes/Improvements: - -- Several corner cases on our API. #1587 #1595 -- Fix the codegen buffer leak. -- Rust bindins improvements. #1574 #1575 -- Add "holes" to allow unicorn lib as a drop-in replacement for older ones. #1572 -- s390x backports. #1570 -- Fix exits wrongly removed in nested uc_emu_start -- Fix a possible endless loop for only one translation block in a multithreaded environment. -- Fix wrong PC without `UC_HOOK_CODE` installed. -- Update vb6 bindings license. #1563 -- Fix buffer allocation failure on M1. #1559 -- Fix wrong EFLAGS on startup. -- Fix wrong internal states on nested uc_emu_start. -- Remove armeb-softmmu and aarcheb-softmmu which are usermode targets. -- Advance PPC32 PC. #1558 -- Support UC_PPC_REG_CR. -- Update CI to windows-2019 - -Thanks: - -@shuffle2 @liyansong2018 @rose4096 @nviennot @n1tram1 @iii-i @dzzie @yrashk @bet4it - ----------------------------------- -[Version 2.0.0 rc6]: Feburary 13, 2022 - -This release is expected to be the last RC release of Unicorn2. - -Features: - -- SystemZ (aka. s390x) support. #1521 #1547 -- CPUID hook now may return a bool to indicate whether skipping the CPUID instruction. -- ARM/AARCH64 coprocessor registers read/write support. #889 - -Fixes/Improvements: - -- Rust improvements. More registers enums #1504 Easier to use #1543 #1545 -- M68k improvements. #1507 -- Golang improvements. Enable `uc_ctl_set_model` #1506 -- Unit tests improvements. #1512 -- Various ARM system mode fixes. #1500 #1520 #1525 #1531 -- Read/write arm FPSCR and FPSID. #1453 -- Fix the support for ARMv8 -- Fix a large number of memory leaks and unicorn2 now goes with google/oss-fuzz! -- Add more X87 registers. #1524 -- Add more PPC registers. -- Fix the exception not cleared in python bindings. #1537 -- Correctly support ARM big endian and drops `armeb-softmmu` and `aarch64eb-softmmu` -- Fix ARM CPSR.E not reflected during runtime. -- Resolve fuzzing speed problem on macOS. -- Modernize CmakeFileLists.txt. #1544 -- Fix an issue in nested `uc_emu_start` - -Thanks: - -@Kritzefitz @zznop @QDucasse @gerph @bet4it @mrexodia @iii-i @jbcayrou @scribam - ----------------------------------- -[Version 2.0.0 rc5]: November 25, 2021 - -This release fixes a few urgent bugs and improves performance. - -Fixes/Improvements: - -- Rust bindings improvements. #1480 #1483 -- Allow R/W to cp15 registers. #1481 -- Fix `UC_HOOK_EDGE_GENERATED` not calling for indirect jumps. -- Python bindings build improvements. #1486 -- Fix bindings on m1 macOS. -- Support nested `uc_emu_start` calls without context save/restore -- Fix wrong MMIO offset for 32bit targets. -- Fix wrong `uc_mem_unmap` logic for both ram and mmio memory. -- Inline `uc_trace_code` and PC sync to improve performance. -- Various fixes in tests. -- Allow writing to CPSR to switch bank registers. -- Implement MMIO in rust bindings. #1499 - -Thanks: - -- @domenukk -- @bet4it -- @mid-kid -- @Kritzefitz - ----------------------------------- -[Version 2.0.0 rc4]: November 09, 2021 - -This is a big release of Unicorn and introduces a few powerful new features and a bunch of fixes. - -New Features: - -- New API: uc_ctl, by which you could control CPU models, TB caches or multiple exits etc. -- New Hook: UC_HOOK_EDGE_GENERATED, UC_HOOK_TCG_OPCODE -- RISCV CSR read/write. -- Support reading MIPS hi/lo regs. 7268c2a19bce2db72b90e3ea3b133482c3ff4e58 -- OSS Fuzzing building support. -- MSVC 32bit and Android build support. -- Introduce clang-format. - -Fixes/Improvements: - -- Java bindings improvements. unicorn-engine/unicorn#1461 -- API Documents updates. unicorn-engine/unicorn#1459 -- Rust bindings improvements. unicorn-engine/unicorn#1462 -- Add a go.mod for go bindings. -- CMakeLists.txt improvements as a subproject. #1373 -- Fix rust bindings build script and add CI. -- Use binary search to find mappings. unicorn-engine/unicorn#1414 -- RISCV: - - Update pc when exiting execution. unicorn-engine/unicorn#1465 - - Add RISCV control status registers to enable floating. unicorn-engine/unicorn#1469 unicorn-engine/unicorn#1478 - - After `ecall`, pc not advanced. unicorn-engine/unicorn#1477 -- Fix tb not invalidated when exiting. -- Fix bindings makefile. -- Fix uc_mem_protect not working. unicorn-engine/unicorn#1468 - -Thanks: - -- @bet4it -- @kabeor -- @chfl4gs -- @QDucasse -- @h33p -- @geohot -- @cla7aye15I4nd -- @jcalabres - ----------------------------------- -[Version 2.0.0 rc3]: October 06, 2021 - -This is an urgent pre-release regarding python bindings on older Linux systems. - -- Support older Linux distribution, e.g. prior to Ubuntu 19.04 -- Fix a memory leak in `uc_close` -- Support building on Android -- Support hooking CPUID instruction. - -Enjoy. - ----------------------------------- -[Version 2.0.0 rc2]: October 05, 2021 - -This is an urgent pre-release regarding the packaging problem of python bindings. - -- Set `zip_false` and `is_pure` to `False` to avoid issues on some Linux distributions. -- Link to `libm` to make sure our libraries work. -- Support to read ST registers in rust bindings. -- Fix #1450 - -Enjoy. - ----------------------------------- -[Version 2.0.0 rc1]: October 04, 2021 - -Unicorn2 first release candidate! - -- Based on Qemu 5.0.1 -- Remain backward compatible with Unicorn 1.x -- Update ISA of all existing architectures -- Support 2 new architectures in PowerPC & RISCV - ----------------------------------- -[Unicorn2-beta]: October 3rd, 2021 - -- Release Unicorn2 beta to public. -- New logo to celebrate this important milestone! - ----------------------------------- -[Version 1.0.1]: April 20th, 2017 - -- Properly handle selected-architecture build. -- Fix compilation issues on PPC & S390x. -- Fix a memory leak on uc_mem_protect(). -- ARM: - - Support big-endian mode. - - Correct instruction size of Thumb/Thumb2 code. - - Support read/write APSR register. -- ARM64: - - Support read/write NEON registers. - - Support read/write NZCV registers. -- Mips: Support read/write Mips64 registers. -- X86: Support read/write MSR. -- Haskell binding: update to the latest API. -- Python: allow not having PATH setup. - ----------------------------------- -[Version 1.0]: February 23rd, 2017 - -- Fix build script for BSD host. -- Fix building Unicorn on Arm/PPC/Sparc/S390 hosts. -- X86: - - Fix 16bit address computation. - - Fix initial state of segment registers. - ----------------------------------- -[Version 1.0-rc3]: January 25th, 2017 - -- Rename API uc_context_free() to uc_free(). -- ARM: - - uc_reg_write() now can modify CPSR register. - - Add some ARM coproc registers. -- ARM64: uc_reg_read|write() now handles W0-W31 registers. -- Windows: fix a double free bug in uc_close(). -- New VB6 binding. -- Java: update to support new APIs from v1.0-rc1. -- Python: - - Fix memory leaking that prevents UC instances from being GC. - - Remove some dependencies leftover from glib time. - - Add new method mem_regions() (linked to uc_mem_regions() API) - ----------------------------------- -[Version 1.0-rc2]: January 4th, 2017 - -- Remove glib & pkconfig dependency. -- Python: fix an issue to restore support for FreeBSD (and other *BSD Unix). -- ARM: support MCLASS cpu (Cortex-M3). -- Windows: export a static lib that can be used outside of Mingw - ----------------------------------- -[Version 1.0-rc1]: December 22nd, 2016 - -- Lots of bugfixes in all architectures. -- Better support for ARM Thumb. -- Fix many memory leaking issues. -- New bindings: Haskell, MSVC. -- Better support for Python3. -- New APIs: uc_query, uc_reg_write_batch, uc_reg_read_batch, uc_mem_map_ptr, uc_mem_regions, uc_context_alloc, uc_context_save & uc_context_restore. -- New memory hook type: UC_HOOK_MEM_READ_AFTER. -- Add new version macros UC_VERSION_{MAJOR, MINOR, EXTRA} - ----------------------------------- -[Version 0.9]: October 15th, 2015 - -- Initial public release. - diff --git a/sources b/sources index b39554b..3faf8db 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.0.1.post1.tar.gz) = 196f4f894cc96dc357881c72f201ff8fd146d07c5e54d4a35d8ce3b84c2ee63937b4bec482e2fa237571ba1e17ce8089d89036ad7e729f795ea47f39aa938dd2 +SHA512 (unicorn-2.0.1.post1.tar.gz) = 8694d6bc92e3424a8ad050316413d53e56e0f55e7cad7517fb3e98e670a0f1768b060ead8f195da13607cec89a964364f05a8b9d0dc074f4ac5e51026f8343ad diff --git a/unicorn.spec b/unicorn.spec index 8203999..f292740 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -11,10 +11,6 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram License: GPLv2 and LGPLv2+ and MIT and BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/AUTHORS.TXT -Source2: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/ChangeLog -Source3: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/COPYING -Source4: https://raw.githubusercontent.com/unicorn-engine/%{name}/2.0.1/CREDITS.TXT BuildRequires: cmake BuildRequires: gcc BuildRequires: python3-devel @@ -51,33 +47,29 @@ The unicorn-python3 package contains python3 bindings for unicorn. %prep %autosetup -n %{name}-%{version} -p1 -cp -p %SOURCE1 . -cp -p %SOURCE2 . -cp -p %SOURCE3 . -cp -p %SOURCE4 . %build +%cmake +%cmake_build + +pushd bindings/python %py3_build +popd %install +%cmake_install + +pushd bindings/python %py3_install - -mkdir -p $RPM_BUILD_ROOT%{_includedir} -mv $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/include/unicorn $RPM_BUILD_ROOT%{_includedir} - -mkdir -p $RPM_BUILD_ROOT%{_libdir} -mv $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/lib/* $RPM_BUILD_ROOT%{_libdir} - -ln -s libunicorn.so.2 $RPM_BUILD_ROOT%{_libdir}/libunicorn.so - -install -D -m 0644 src/build_python/unicorn.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/unicorn.pc +popd rm $RPM_BUILD_ROOT%{_libdir}/libunicorn.a -%ldconfig_scriptlets +%check +%ctest %files -%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.TXT +%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.md %license COPYING %{_libdir}/libunicorn.so.2 From 27cee3896b9c51abe3139222024e0a4def5e30e1 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 14 Jul 2023 17:50:46 -0500 Subject: [PATCH 19/40] Exclude s390x until build works again Signed-off-by: W. Michael Petullo --- unicorn.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unicorn.spec b/unicorn.spec index f292740..8a93367 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -24,6 +24,10 @@ BuildRequires: python3-setuptools # http://www.unicorn-engine.org/docs/beyond_qemu.html. Provides: bundled(qemu) = 2.2.1 +# https://bugzilla.redhat.com/show_bug.cgi?id=2223039 +# https://github.com/unicorn-engine/unicorn/issues/1840 +ExcludeArch: s390x + %description Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework. From de9d9f1b5654a1939ccfa5b16a79e8959a64754d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:06:41 +0000 Subject: [PATCH 20/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 919d981f58670e11b387e50b7a29bf3eba78f1bb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:06:44 +0000 Subject: [PATCH 21/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d22a5561b7f2ccd4c2a738fef6610b47c3c14a95 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 09:08:23 +0200 Subject: [PATCH 22/40] Rebuilt for Python 3.13 From 83f3941b24e35801e5bfa354dbc4ce20b8689720 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:15:36 +0000 Subject: [PATCH 23/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 1de79e1f7800226d5b54e57e7da220a0a97678ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 4 Sep 2024 22:33:35 +0200 Subject: [PATCH 24/40] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- unicorn.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index 8a93367..653f64e 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -8,7 +8,8 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram # LGPLv2: Portions of code from QEMU # MIT: Portions of code from QEMU # BSD: Portions of code from QEMU -License: GPLv2 and LGPLv2+ and MIT and BSD +# Automatically converted from old format: GPLv2 and LGPLv2+ and MIT and BSD - review is highly recommended. +License: GPL-2.0-only AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake From ce136e10d26c73586d8f926aea3753aa4ff65248 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 Sep 2024 10:11:43 +0200 Subject: [PATCH 25/40] Update to latest upstream release (closes rhbz#2314072) --- .gitignore | 1 + sources | 2 +- unicorn.spec | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1233882..d33c790 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /unicorn-1.0.3.tar.gz /unicorn-2.0.1.tar.gz /unicorn-2.0.1.post1.tar.gz +/unicorn-2.1.0.tar.gz diff --git a/sources b/sources index 3faf8db..8120682 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.0.1.post1.tar.gz) = 8694d6bc92e3424a8ad050316413d53e56e0f55e7cad7517fb3e98e670a0f1768b060ead8f195da13607cec89a964364f05a8b9d0dc074f4ac5e51026f8343ad +SHA512 (unicorn-2.1.0.tar.gz) = 37f823c8214bc9d6e1d36cb504da8fd203128a17c321175cb714e3fe19ec5ab626b7b14461a795d3c637231a8804285bb1885198784258dfc94d83c35c479523 diff --git a/unicorn.spec b/unicorn.spec index 653f64e..b38ca52 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,5 +1,5 @@ Name: unicorn -Version: 2.0.1.post1 +Version: 2.1.0 Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework @@ -12,6 +12,7 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram License: GPL-2.0-only AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-BSD URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz + BuildRequires: cmake BuildRequires: gcc BuildRequires: python3-devel From 62f55a2c432f1c41ca0cff439db43ff1585a430a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Sep 2024 00:54:55 +0200 Subject: [PATCH 26/40] Update to latest upstream release (closes rhbz#2315358) --- .gitignore | 1 + sources | 2 +- unicorn.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d33c790..d45d80c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /unicorn-2.0.1.tar.gz /unicorn-2.0.1.post1.tar.gz /unicorn-2.1.0.tar.gz +/unicorn-2.1.1.tar.gz diff --git a/sources b/sources index 8120682..887d74c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.1.0.tar.gz) = 37f823c8214bc9d6e1d36cb504da8fd203128a17c321175cb714e3fe19ec5ab626b7b14461a795d3c637231a8804285bb1885198784258dfc94d83c35c479523 +SHA512 (unicorn-2.1.1.tar.gz) = d6184b87a0fb729397ec2ac2cb8bfd9d10c9d4276e49efa681c66c7c54d1a325305a920332a708e68989cc299d0d1a543a1ceeaf552a9b44ec93084f7bf85ef2 diff --git a/unicorn.spec b/unicorn.spec index b38ca52..328f107 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,5 +1,5 @@ Name: unicorn -Version: 2.1.0 +Version: 2.1.1 Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework From 1dc87b6526f94481b884bfd04f2ed8cf5280c0a6 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Wed, 1 Jan 2025 12:09:39 -0600 Subject: [PATCH 27/40] Review and adjust license after SPDX cleanup Signed-off-by: W. Michael Petullo --- unicorn.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unicorn.spec b/unicorn.spec index 328f107..4480031 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -8,8 +8,7 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram # LGPLv2: Portions of code from QEMU # MIT: Portions of code from QEMU # BSD: Portions of code from QEMU -# Automatically converted from old format: GPLv2 and LGPLv2+ and MIT and BSD - review is highly recommended. -License: GPL-2.0-only AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-BSD +License: GPL-2.0-only AND LGPL-2.1+ AND MIT AND BSD-2-Clause AND BSD-3-Clause URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From 66008400794edc3330ce5bc9f42b869da6c26b12 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Mon, 6 Jan 2025 10:16:27 -0600 Subject: [PATCH 28/40] Fix mistake in LGPL license identifier Signed-off-by: W. Michael Petullo --- unicorn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unicorn.spec b/unicorn.spec index 4480031..aaafa32 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -8,7 +8,7 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram # LGPLv2: Portions of code from QEMU # MIT: Portions of code from QEMU # BSD: Portions of code from QEMU -License: GPL-2.0-only AND LGPL-2.1+ AND MIT AND BSD-2-Clause AND BSD-3-Clause +License: GPL-2.0-only AND LGPL-2.1-or-later AND MIT AND BSD-2-Clause AND BSD-3-Clause URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From ebea71100beb2201765a3701cb0e524b3a968150 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 13:45:21 +0000 Subject: [PATCH 29/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From cc09e62532649f92307a7f43e2218a05d7c36254 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:47:31 +0200 Subject: [PATCH 30/40] Rebuilt for Python 3.14 From f9fcb47d905fcf5d0422878f067ba99a46fc602e Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Thu, 19 Jun 2025 15:36:51 -0500 Subject: [PATCH 31/40] Update to 2.1.3 Signed-off-by: W. Michael Petullo --- .gitignore | 1 + COPYING | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 2 +- unicorn.spec | 40 +++--- 4 files changed, 363 insertions(+), 19 deletions(-) create mode 100644 COPYING diff --git a/.gitignore b/.gitignore index d45d80c..21ca349 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /unicorn-2.0.1.post1.tar.gz /unicorn-2.1.0.tar.gz /unicorn-2.1.1.tar.gz +/unicorn-2.1.3.tar.gz diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..efcd76c --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. +␌ + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +␌ +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. +␌ + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. +␌ + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS +␌ + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/sources b/sources index 887d74c..32c18a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.1.1.tar.gz) = d6184b87a0fb729397ec2ac2cb8bfd9d10c9d4276e49efa681c66c7c54d1a325305a920332a708e68989cc299d0d1a543a1ceeaf552a9b44ec93084f7bf85ef2 +SHA512 (unicorn-2.1.3.tar.gz) = a4f81e4a220bbf3785ba625c8956957b5b182f4799121e33bee7cf29378027416fe18029f07e71e3eecd3bc6838aef19c3407933997e73aa7b9f09ab45874779 diff --git a/unicorn.spec b/unicorn.spec index aaafa32..c0ef0a7 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,5 +1,5 @@ Name: unicorn -Version: 2.1.1 +Version: 2.1.3 Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework @@ -11,6 +11,7 @@ Summary: Lightweight multi-platform, multi-architecture CPU emulator fram License: GPL-2.0-only AND LGPL-2.1-or-later AND MIT AND BSD-2-Clause AND BSD-3-Clause URL: https://www.unicorn-engine.org/ Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source1: COPYING BuildRequires: cmake BuildRequires: gcc @@ -25,13 +26,11 @@ BuildRequires: python3-setuptools # http://www.unicorn-engine.org/docs/beyond_qemu.html. Provides: bundled(qemu) = 2.2.1 -# https://bugzilla.redhat.com/show_bug.cgi?id=2223039 -# https://github.com/unicorn-engine/unicorn/issues/1840 -ExcludeArch: s390x - -%description +%global _description %{expand: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator -framework. +framework.} + +%description %_description %package devel Summary: Files needed to develop applications using unicorn @@ -51,30 +50,35 @@ Requires: python3-setuptools The unicorn-python3 package contains python3 bindings for unicorn. %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -p1 -n %{name}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +cp -p %SOURCE1 . %build +pushd src %cmake %cmake_build - -pushd bindings/python -%py3_build popd +%pyproject_wheel + %install +pushd src %cmake_install - -pushd bindings/python -%py3_install popd +%pyproject_install + rm $RPM_BUILD_ROOT%{_libdir}/libunicorn.a +rm $RPM_BUILD_ROOT%{_libdir}/unicorn.o %check -%ctest %files -%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.md +%doc src/AUTHORS.TXT src/CREDITS.TXT src/README.md %license COPYING %{_libdir}/libunicorn.so.2 @@ -84,8 +88,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/libunicorn.a %{_includedir}/unicorn/ %files -n python3-unicorn -%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info/ -%{python3_sitelib}/%{name}/ +%{python3_sitearch}/%{name}-%{version}.dist-info/ +%{python3_sitearch}/%{name}/ %changelog %autochangelog From b1f7b69c8befaaec91a023c59fe24efa80fa86d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:46:52 +0000 Subject: [PATCH 32/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 928b85c8f70eb5a42ce9cfd12d7cb939a1db7193 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:21:27 +0200 Subject: [PATCH 33/40] Rebuilt for Python 3.14.0rc2 bytecode From 8dc2a150f2b9e3dbe425c0d923f497f0e274652e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 15:01:19 +0200 Subject: [PATCH 34/40] Rebuilt for Python 3.14.0rc3 bytecode From 4cb5c7cfd6896056793b5177ede06d0e966643a4 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Wed, 24 Sep 2025 21:07:52 -0500 Subject: [PATCH 35/40] Update to 2.1.4 to satisfy pwntools (Red Hat Bugzilla #2383857) Signed-off-by: W. Michael Petullo --- .gitignore | 1 + sources | 2 +- unicorn.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 21ca349..6b7bbf2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /unicorn-2.1.0.tar.gz /unicorn-2.1.1.tar.gz /unicorn-2.1.3.tar.gz +/unicorn-2.1.4.tar.gz diff --git a/sources b/sources index 32c18a8..af3e0ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicorn-2.1.3.tar.gz) = a4f81e4a220bbf3785ba625c8956957b5b182f4799121e33bee7cf29378027416fe18029f07e71e3eecd3bc6838aef19c3407933997e73aa7b9f09ab45874779 +SHA512 (unicorn-2.1.4.tar.gz) = 1dd905fe0aedd9899cfba0677bdd2104b5586dfa0167204846bae486fa64100104d1b3257ec79001b3998733d48b6a2409c7d518fb60ea2fa352e52d61491399 diff --git a/unicorn.spec b/unicorn.spec index c0ef0a7..9b9d659 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -1,5 +1,5 @@ Name: unicorn -Version: 2.1.3 +Version: 2.1.4 Release: %autorelease Summary: Lightweight multi-platform, multi-architecture CPU emulator framework From 5ce390aae2c0f7c3f3843ba2831a50a84d09da69 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 19:36:19 +0000 Subject: [PATCH 36/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From a0dc0d10a4cef2a06055a07373d02a32e7ce4de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 12 May 2026 18:11:56 +0200 Subject: [PATCH 37/40] Add runtime dependency on python3-pkg-resources unicorn/unicorn_py2.py uses pkg_resources at runtime without a try-except guard. Assisted-By: Claude Opus 4.6 --- unicorn.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/unicorn.spec b/unicorn.spec index 9b9d659..96c15a2 100644 --- a/unicorn.spec +++ b/unicorn.spec @@ -44,6 +44,7 @@ needed for developing applications using unicorn. Summary: %{summary} Requires: %{name} = %{version}-%{release} Requires: python3-setuptools +Requires: python3-pkg-resources %{?python_provide:%python_provide python3-%{name}} %description -n python3-unicorn From c74a5ab582b4cc981babf5bf9c38d77739251e3e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 3 Jun 2026 21:19:35 +0200 Subject: [PATCH 38/40] Rebuilt for Python 3.15 From 57edc3290512ba767fdba20717e649bdc350e518 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:10:56 +0000 Subject: [PATCH 39/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From 99b52c987af8967dc90005ba4bb546f3da270b9a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:11:17 +0200 Subject: [PATCH 40/40] Rebuilt for Python 3.15.0b4 ABI change