diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 41ab768836dc98d9611187323791b4775ba0cfd3..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# afflib - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index bf869a907575982f172b3b0cdf2fc244bc356b20..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# afflib - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/Sanity-check-size-passed-to-malloc.patch b/Sanity-check-size-passed-to-malloc.patch deleted file mode 100644 index dddbfde5354952168c46f74aae3c349bbec54d1b..0000000000000000000000000000000000000000 --- a/Sanity-check-size-passed-to-malloc.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 435a2ca802358a3debb6d164d2c33049131df81c Mon Sep 17 00:00:00 2001 -From: Phillip Hellewell -Date: Sat, 10 Mar 2018 18:05:39 -0700 -Subject: [PATCH 3/4] Sanity check size passed to malloc... - -Add sanity check before calling malloc in af_get_page() function to -avoid undefined behavior (e.g., seg fault) when dealing with a corrupt -AFF image with an invalid pagesize. - -Issue found by Luis Rocha (luiscrocha@gmail.com). ---- - lib/afflib_pages.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib/afflib_pages.cpp b/lib/afflib_pages.cpp -index 2569c2a..f8cf775 100644 ---- a/lib/afflib_pages.cpp -+++ b/lib/afflib_pages.cpp -@@ -219,6 +219,11 @@ int af_get_page(AFFILE *af,int64_t pagenum,unsigned char *data,size_t *bytes) - return -3; // read error - } - -+ /* Sanity check to avoid undefined behaviour when calling malloc below with pagesize from a corrupt AFF image. */ -+ if(af->image_pagesize <= 0 || af->image_pagesize > 16*1024*1024) -+ return -1; -+ -+ - /* Now uncompress directly into the buffer provided by the caller, unless the caller didn't - * provide a buffer. If that happens, allocate our own... - */ --- -2.13.6 - diff --git a/afflib-3.7.16.tar.gz b/afflib-3.7.16.tar.gz deleted file mode 100644 index 6c41595e2146178e6a672446d6046bda22312726..0000000000000000000000000000000000000000 Binary files a/afflib-3.7.16.tar.gz and /dev/null differ diff --git a/afflib.spec b/afflib.spec index b0224b4798f7405ed048fbd740625faded4a00bb..f8ab9db5fbc4c940c2a13abf1d3c8299093ccd2c 100644 --- a/afflib.spec +++ b/afflib.spec @@ -1,22 +1,25 @@ Name: afflib -Version: 3.7.16 -Release: 9 -Summary: Libraries supporting advanced forensic formats - +Version: 3.7.18 +Release: 3 +Summary: Library to support the Advanced Forensic Format License: BSD with advertising URL: https://github.com/sshock/AFFLIBv3 -Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: Sanity-check-size-passed-to-malloc.patch +Source0: %{url}/archive/v%{version}.tar.gz +BuildRequires: gcc-c++ libtool curl-devel expat-devel ncurses-devel +BuildRequires: libtermcap-devel openssl-devel python2-devel zlib-devel +BuildRequires: python2 python2-devel python2-setuptools +BuildRequires: python3 python3-devel python3-setuptools +Provides: bundled(lzma) = 443 -BuildRequires: gcc-c++ libtool curl-devel expat-devel lzma-devel zlib-devel -BuildRequires: ncurses-devel openssl-devel python2-devel +%description +Afflib is a library for support of the Advanced Forensic Format. -Provides: afftools = %{version}-%{release} -Obsoletes: afftools < %{version}-%{release} +%package -n afftools +Summary: The Utility for %{name} +Requires: %{name} = %{version}-%{release} -%description -AFF® is an open and extensible file format designed to store -disk images and associated metadata. +%description -n afftools +The %{name}-utils package contains utilities to use %{name}. %package devel Summary: Development files for %{name} @@ -24,44 +27,67 @@ Requires: %{name} = %{version}-%{release} Requires: openssl-devel pkgconfig %description devel -The %{name}-devel package contains libraries for -developing applications that use %{name}. +The %{name}-devel package contains libraries for developing +applications that use %{name}. + +%package -n python2-pyaff +Summary: The python2 binding for the AFFLIB +Provides: python-pyaff(aarch-64) = 3.7.18-2 +Provides: python-pyaff = 3.7.18-2 +Obsoletes: python-pyaff < 3.7.18-2 -%package help -Summary: Help for %{name} +%description -n python2-pyaff +Python2 bindings currently support a read-only file-like interface to AFFLIB and +basic metadata accessor functions. These bindings are not currently complete. -%description help -The %{name}-help package contains help for %{name}. +%package -n python3-pyaff +Summary: The python3 binding for the AFFLIB +Provides: python-pyaff(aarch-64) = 3.7.18-3 +Provides: python-pyaff = 3.7.18-3 +Obsoletes: python-pyaff < 3.7.18-3 + +%description -n python3-pyaff +Python3 bindings currently support a read-only file-like interface to AFFLIB and +basic metadata accessor functions. These bindings are not currently complete. %prep %autosetup -p1 -n AFFLIBv3-%{version} - find lzma443 -type f -exec chmod 0644 {} ';' chmod 0644 lib/base64.{h,cpp} - ./bootstrap.sh %build -%configure --enable-shared --disable-static --enable-python=yes --enable-s3=yes - +%configure --enable-shared --disable-static --enable-python=no --enable-s3=yes sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool %make_build - +cd pyaff +%global py_setup_args build_ext --include-dirs %{_builddir}/AFFLIBv3-%{version}/include --library-dirs %{_builddir}/AFFLIBv3-%{version}/lib/.libs +%py2_build +%py3_build %install %make_install %delete_la +cd pyaff +%py2_install +%py3_install -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post +/sbin/ldconfig +%postun +/sbin/ldconfig %files -%license COPYING +%doc AUTHORS BUGLIST.txt ChangeLog NEWS README COPYING +%doc doc/announce_2.2.txt %{_libdir}/*.so.* + +%files -n afftools %{_bindir}/aff* %{python2_sitearch}/* +%{_mandir}/man1/aff*.1.* %files devel %doc doc/crypto_design.txt doc/crypto_doc.txt @@ -69,14 +95,16 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool %{_libdir}/*.so %{_libdir}/pkgconfig/afflib.pc -%files help -%doc AUTHORS BUGLIST.txt ChangeLog NEWS README -%doc doc/announce_2.2.txt -%{_mandir}/man1/aff*.1.* +%files -n python2-pyaff +%doc pyaff/README COPYING +%{python2_sitearch}/PyAFF* +%{python2_sitearch}/pyaff* -%changelog -* Wed Mar 04 2019 yangjian - 3.7.16-9 -- Change buildrequires +%files -n python3-pyaff +%doc pyaff/README COPYING +%{python3_sitearch}/PyAFF* +%{python3_sitearch}/pyaff* -* Wed Feb 22 2019 yangjian - 3.7.16-8 -- Package init +%changelog +* Mon Jun 1 2020 wangyue - 3.7.18-3 +- package init diff --git a/afflib.yaml b/afflib.yaml deleted file mode 100644 index 70a5d3d91568d824d4a4d2777a1ea1698cab0999..0000000000000000000000000000000000000000 --- a/afflib.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: sshock/AFFLIBv3 -tag_prefix: ^v -seperator: . diff --git a/v3.7.18.tar.gz b/v3.7.18.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3f26ad9b7c2ebd5e7158c47af940fd4b2daf135e Binary files /dev/null and b/v3.7.18.tar.gz differ