upgpkg(main/borgbackup): 1.2.6

This commit is contained in:
Twaik Yont 2023-10-20 14:08:26 +03:00 committed by Leonid P
parent 3f28c0942d
commit 028746219e
4 changed files with 39 additions and 122 deletions

View File

@ -2,12 +2,19 @@ TERMUX_PKG_HOMEPAGE=https://www.borgbackup.org/
TERMUX_PKG_DESCRIPTION="Deduplicating and compressing backup program"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1.17
TERMUX_PKG_REVISION=10
TERMUX_PKG_VERSION="1.2.6"
TERMUX_PKG_SRCURL=https://github.com/borgbackup/borg/releases/download/${TERMUX_PKG_VERSION}/borgbackup-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7ab924fc017b24929bedceba0dcce16d56f9868bf9b5050d2aae2eb080671674
# Cannot be updated to 1.2.0 (or newer) as it requires external python package
#TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_SHA256=b7a6f8f086039eeec79070b914f3c651ed7f3612c965374af910d277c7a2139d
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libacl, liblz4, openssl, python, xxhash, zstd"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PYTHON_COMMON_DEPS="Cython, wheel"
TERMUX_PKG_PYTHON_TARGET_DEPS="msgpack==1.0.5"
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install $TERMUX_PKG_PYTHON_TARGET_DEPS
EOF
}

View File

@ -1,52 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -167,8 +167,7 @@
library_dirs = []
define_macros = []
-possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl',
- '/usr/local/borg', '/opt/local', '/opt/pkg', '/opt/homebrew/opt/openssl@1.1', ]
+possible_openssl_prefixes = ['@TERMUX_PREFIX@', ]
if os.environ.get('BORG_OPENSSL_PREFIX'):
possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX'))
ssl_prefix = detect_openssl(possible_openssl_prefixes)
@@ -178,8 +177,7 @@
library_dirs.append(os.path.join(ssl_prefix, 'lib'))
-possible_liblz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4',
- '/usr/local/borg', '/opt/local', '/opt/pkg', ]
+possible_liblz4_prefixes = ['@TERMUX_PREFIX@', ]
if os.environ.get('BORG_LIBLZ4_PREFIX'):
possible_liblz4_prefixes.insert(0, os.environ.get('BORG_LIBLZ4_PREFIX'))
liblz4_prefix = setup_lz4.lz4_system_prefix(possible_liblz4_prefixes)
@@ -190,8 +188,7 @@
else:
liblz4_system = False
-possible_libb2_prefixes = ['/usr', '/usr/local', '/usr/local/opt/libb2', '/usr/local/libb2',
- '/usr/local/borg', '/opt/local', '/opt/pkg', ]
+possible_libb2_prefixes = ['@TERMUX_PREFIX@', ]
if os.environ.get('BORG_LIBB2_PREFIX'):
possible_libb2_prefixes.insert(0, os.environ.get('BORG_LIBB2_PREFIX'))
libb2_prefix = setup_b2.b2_system_prefix(possible_libb2_prefixes)
@@ -202,8 +199,7 @@
else:
libb2_system = False
-possible_libzstd_prefixes = ['/usr', '/usr/local', '/usr/local/opt/libzstd', '/usr/local/libzstd',
- '/usr/local/borg', '/opt/local', '/opt/pkg', ]
+possible_libzstd_prefixes = ['@TERMUX_PREFIX@', ]
if os.environ.get('BORG_LIBZSTD_PREFIX'):
possible_libzstd_prefixes.insert(0, os.environ.get('BORG_LIBZSTD_PREFIX'))
libzstd_prefix = setup_zstd.zstd_system_prefix(possible_libzstd_prefixes)
@@ -214,8 +210,7 @@
else:
libzstd_system = False
-possible_libxxhash_prefixes = ['/usr', '/usr/local', '/usr/local/opt/libxxhash', '/usr/local/libxxhash',
- '/usr/local/borg', '/opt/local', '/opt/pkg', ]
+possible_libxxhash_prefixes = ['@TERMUX_PREFIX@', ]
if os.environ.get('BORG_LIBXXHASH_PREFIX'):
possible_libxxhash_prefixes.insert(0, os.environ.get('BORG_LIBXXHASH_PREFIX'))
libxxhash_prefix = setup_xxhash.xxhash_system_prefix(possible_libxxhash_prefixes)

View File

@ -1,12 +0,0 @@
diff -uNr borgbackup-1.1.17/src/borg/xattr.py borgbackup-1.1.17.mod/src/borg/xattr.py
--- borgbackup-1.1.17/src/borg/xattr.py 2021-07-12 22:44:34.000000000 +0300
+++ borgbackup-1.1.17.mod/src/borg/xattr.py 2021-07-16 22:08:43.614494338 +0300
@@ -72,7 +72,7 @@
# tools used by find_library, like ldconfig, gcc/cc, objdump.
# so we can only try some "usual" names for the C library:
if sys.platform.startswith('linux'):
- libc_name = 'libc.so.6'
+ libc_name = 'libc.so'
elif sys.platform == 'darwin':
libc_name = 'libc.dylib'
else:

View File

@ -23,43 +23,32 @@ diff --git a/setup.py b/setup.py
index 87e93d25..5ca79af2 100644
--- a/setup.py
+++ b/setup.py
@@ -37,9 +37,7 @@
# Are we building on ReadTheDocs?
on_rtd = os.environ.get('READTHEDOCS')
@@ -10,9 +10,11 @@
except ImportError:
multiprocessing = None
-install_requires = [
- 'packaging',
-]
+install_requires = []
# note for package maintainers: if you package borgbackup for distribution,
# please add llfuse as a *requirement* on all platforms that have a working
@@ -54,8 +52,10 @@
],
}
-from setuptools import setup, find_packages, Extension, Command
+from setuptools import setup, find_packages, Extension
-from setuptools.command.build_ext import build_ext
-from setuptools import setup, find_namespace_packages, Extension, Command
+from distutils.command.build_ext import build_ext
+from setuptools import setup, find_namespace_packages, Extension
from setuptools.command.sdist import sdist
+from distutils.core import Command
+from distutils.command.clean import clean
compress_source = 'src/borg/compress.pyx'
crypto_ll_source = 'src/borg/crypto/low_level.pyx'
@@ -146,7 +146,7 @@ def __init__(self, *args, **kwargs):
msgpack_packer_source = msgpack_packer_source.replace('.pyx', '.cpp')
msgpack_unpacker_source = msgpack_unpacker_source.replace('.pyx', '.cpp')
try:
from Cython.Build import cythonize
@@ -71,7 +73,6 @@
# using any other msgpack version is not supported by borg development and
# any feedback related to issues caused by this will be ignored.
'msgpack >=0.5.6, <=1.0.5, !=1.0.1',
- 'packaging',
]
- from setuptools.command.build_ext import build_ext
+ from distutils.command.build_ext import build_ext
if not on_rtd and not all(os.path.exists(path) for path in [
compress_source, crypto_ll_source, chunker_source, hashindex_source, item_source, checksums_source,
platform_posix_source, platform_linux_source, platform_syncfilerange_source, platform_freebsd_source, platform_darwin_source,
@@ -767,16 +767,9 @@ def rm(file):
pass
# note for package maintainers: if you package borgbackup for distribution,
@@ -146,15 +147,8 @@
-class Clean(Command):
class Clean(Command):
- user_options = []
-
- def initialize_options(self):
@ -68,15 +57,14 @@ index 87e93d25..5ca79af2 100644
- def finalize_options(self):
- pass
-
+class Clean(clean):
def run(self):
+ super().run()
for source in cython_c_sources:
for source in cython_sources:
genc = source.replace('.pyx', '.c')
rm(genc)
@@ -793,7 +786,7 @@ def run(self):
'build_usage': build_usage,
'build_man': build_man,
@@ -168,7 +162,7 @@
'build_usage': setup_docs.build_usage,
'build_man': setup_docs.build_man,
'sdist': Sdist,
- 'clean2': Clean,
+ 'clean': Clean,
@ -106,26 +94,12 @@ diff --git a/src/borg/xattr.py b/src/borg/xattr.py
index f611a80a..8f77ab95 100644
--- a/src/borg/xattr.py
+++ b/src/borg/xattr.py
@@ -8,7 +8,7 @@
@@ -7,7 +7,7 @@
import sys
import tempfile
from ctypes import CDLL, create_string_buffer, c_ssize_t, c_size_t, c_char_p, c_int, c_uint32, get_errno
from ctypes.util import find_library
-from packaging.version import parse as parse_version
+from distutils.version import LooseVersion
+from distutils.version import LooseVersion as parse_version
from .helpers import Buffer, prepare_subprocess_env
from .helpers import prepare_subprocess_env
@@ -91,8 +91,8 @@ def get_all(path, follow_symlinks=True):
if preload.startswith("libfakeroot"):
env = prepare_subprocess_env(system=True)
fakeroot_output = subprocess.check_output(['fakeroot', '-v'], env=env)
- fakeroot_version = parse_version(fakeroot_output.decode('ascii').split()[-1])
- if fakeroot_version >= parse_version("1.20.2"):
+ fakeroot_version = LooseVersion(fakeroot_output.decode('ascii').split()[-1])
+ if fakeroot_version >= LooseVersion("1.20.2"):
# 1.20.2 has been confirmed to have xattr support
# 1.18.2 has been confirmed not to have xattr support
# Versions in-between are unknown
--
2.30.2