aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel NĂ©ri <dne+alpine@mayonnaise.net>2020-08-30 23:50:48 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-08-30 23:39:24 +0000
commit3ad14e49cc1db395e909189ee4f934f911b3b07e (patch)
tree0ea655eeb20f3e49dd7c5369bd5ce4ac2d50e082
parent68b7be35b3584c015d08b5c32ec1683b24dd0315 (diff)
downloadaports-3ad14e49cc1db395e909189ee4f934f911b3b07e.tar.gz
aports-3ad14e49cc1db395e909189ee4f934f911b3b07e.tar.bz2
aports-3ad14e49cc1db395e909189ee4f934f911b3b07e.tar.xz
testing/py3-libarchive-c: add patch for 64-bit time_t
-rw-r--r--testing/py3-libarchive-c/APKBUILD12
-rw-r--r--testing/py3-libarchive-c/time64.patch52
2 files changed, 58 insertions, 6 deletions
diff --git a/testing/py3-libarchive-c/APKBUILD b/testing/py3-libarchive-c/APKBUILD
index cb20c7f077..1fa264e6de 100644
--- a/testing/py3-libarchive-c/APKBUILD
+++ b/testing/py3-libarchive-c/APKBUILD
@@ -1,23 +1,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-libarchive-c
pkgver=2.9
-pkgrel=1
+pkgrel=2
pkgdesc="Python interface to libarchive"
url="https://github.com/Changaco/python-libarchive-c"
arch="noarch !mips !mips64" # essential tests fail on mips
-# tests/test_atime_mtime_ctime.py ....Fatal Python error: Segmentation fault
-arch="$arch !armhf !armv7 !x86"
license="CC0-1.0"
depends="libarchive python3" # uses ffi
makedepends="python3-dev libarchive-dev py3-setuptools"
checkdepends="py3-pytest py3-mock"
-source="python-libarchive-c-$pkgver.tar.gz::https://github.com/Changaco/python-libarchive-c/archive/$pkgver.tar.gz"
+source="python-libarchive-c-$pkgver.tar.gz::https://github.com/Changaco/python-libarchive-c/archive/$pkgver.tar.gz
+ time64.patch"
builddir="$srcdir/python-libarchive-c-$pkgver"
prepare() {
default_prepare
soname=$(scanelf --quiet --soname /usr/lib/libarchive.so | awk '{print $1}')
- sed -i -e "s/find_library('libarchive')/find_library('$soname')/" libarchive/ffi.py
+ sed -i -e "s/find_library('archive')/find_library('$soname')/" libarchive/ffi.py
}
build() {
@@ -32,4 +31,5 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="282791cef6ff67aefc238ce1b40783e3952b366fc5c464fe99557e81d91e8057b9ec339c52535917c251f9a9bffdd3ec2773c91cbb6c9881d9ecb8572cf0fc5b python-libarchive-c-2.9.tar.gz"
+sha512sums="282791cef6ff67aefc238ce1b40783e3952b366fc5c464fe99557e81d91e8057b9ec339c52535917c251f9a9bffdd3ec2773c91cbb6c9881d9ecb8572cf0fc5b python-libarchive-c-2.9.tar.gz
+24cbdbfeeb8f375bfdf4061dbdbd6bd40fbe5cd6b2c9f15c6b15814062121ede938c90b2b73cb5540ee7fedf56062a748d5b9b21b3d35327ce583be1d6e164ba time64.patch"
diff --git a/testing/py3-libarchive-c/time64.patch b/testing/py3-libarchive-c/time64.patch
new file mode 100644
index 0000000000..4cdc8a32fa
--- /dev/null
+++ b/testing/py3-libarchive-c/time64.patch
@@ -0,0 +1,52 @@
+diff --git a/libarchive/ffi.py b/libarchive/ffi.py
+index 26b383f..b089575 100644
+--- a/libarchive/ffi.py
++++ b/libarchive/ffi.py
+@@ -2,7 +2,7 @@ from __future__ import division, print_function, unicode_literals
+
+ from ctypes import (
+ c_char_p, c_int, c_uint, c_long, c_longlong, c_size_t, c_void_p,
+- c_wchar_p, CFUNCTYPE, POINTER,
++ c_wchar_p, CFUNCTYPE, POINTER, c_int64
+ )
+
+ try:
+@@ -56,6 +56,7 @@ VOID_CB = lambda *_: ARCHIVE_OK
+
+ c_archive_p = c_void_p
+ c_archive_entry_p = c_void_p
++c_time_t = c_int64
+
+
+ # Helper functions
+@@ -113,10 +114,10 @@ error_string = ffi('error_string', [c_archive_p], c_char_p)
+ ffi('entry_new', [], c_archive_entry_p, check_null)
+
+ ffi('entry_filetype', [c_archive_entry_p], c_int)
+-ffi('entry_atime', [c_archive_entry_p], c_int)
+-ffi('entry_birthtime', [c_archive_entry_p], c_int)
+-ffi('entry_mtime', [c_archive_entry_p], c_int)
+-ffi('entry_ctime', [c_archive_entry_p], c_int)
++ffi('entry_atime', [c_archive_entry_p], c_time_t)
++ffi('entry_birthtime', [c_archive_entry_p], c_time_t)
++ffi('entry_mtime', [c_archive_entry_p], c_time_t)
++ffi('entry_ctime', [c_archive_entry_p], c_time_t)
+ ffi('entry_atime_nsec', [c_archive_entry_p], c_long)
+ ffi('entry_birthtime_nsec', [c_archive_entry_p], c_long)
+ ffi('entry_mtime_nsec', [c_archive_entry_p], c_long)
+@@ -140,10 +141,10 @@ ffi('entry_gid', [c_archive_entry_p], c_longlong)
+ ffi('entry_set_size', [c_archive_entry_p, c_longlong], None)
+ ffi('entry_set_filetype', [c_archive_entry_p, c_uint], None)
+ ffi('entry_set_perm', [c_archive_entry_p, c_int], None)
+-ffi('entry_set_atime', [c_archive_entry_p, c_int, c_long], None)
+-ffi('entry_set_mtime', [c_archive_entry_p, c_int, c_long], None)
+-ffi('entry_set_ctime', [c_archive_entry_p, c_int, c_long], None)
+-ffi('entry_set_birthtime', [c_archive_entry_p, c_int, c_long], None)
++ffi('entry_set_atime', [c_archive_entry_p, c_time_t, c_long], None)
++ffi('entry_set_mtime', [c_archive_entry_p, c_time_t, c_long], None)
++ffi('entry_set_ctime', [c_archive_entry_p, c_time_t, c_long], None)
++ffi('entry_set_birthtime', [c_archive_entry_p, c_time_t, c_long], None)
+
+ ffi('entry_update_pathname_utf8', [c_archive_entry_p, c_char_p], None)
+
+