Newpkg: udocker (#24699)

Fix #21694
This commit is contained in:
termux-pacman-bot
2025-05-17 03:22:45 +00:00
parent 65e534a1dc
commit e6270fdbb6
6 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
diff -ur orig/udocker/config.py mod/udocker/config.py
--- orig/udocker/config.py 2024-08-28 16:01:10.000000000 +0200
+++ mod/udocker/config.py 2025-05-12 21:01:56.967859955 +0200
@@ -79,7 +79,7 @@
# conf['proot_noseccomp'] = True
conf['proot_noseccomp'] = None
conf['proot_killonexit'] = True # PRoot --kill-on-exit
- conf['proot_link2symlink'] = False # PRoot --link2symlink
+ conf['proot_link2symlink'] = True # PRoot --link2symlink
# fakechroot engine get ld_library_paths from ld.so.cache
conf['ld_so_cache'] = "/etc/ld.so.cache"
@@ -128,8 +128,8 @@
# Force the use of specific executables
# UDOCKER = use executable from the udocker binary distribution/tarball
- conf['use_proot_executable'] = "UDOCKER"
- conf['use_patchelf_executable'] = "UDOCKER"
+ conf['use_proot_executable'] = "@TERMUX_PREFIX@/bin/proot"
+ conf['use_patchelf_executable'] = "@TERMUX_PREFIX@/bin/patchelf"
conf['use_runc_executable'] = ""
conf['use_singularity_executable'] = ""

View File

@@ -0,0 +1,9 @@
diff -ur orig/udocker/engine/base.py mod/udocker/engine/base.py
--- orig/udocker/engine/base.py 2024-08-28 16:01:10.000000000 +0200
+++ mod/udocker/engine/base.py 2025-05-12 15:23:35.642041791 +0200
@@ -690,4 +690,4 @@
if not qemu_path:
Msg().err("Warning: qemu required but not available", l=Msg.WAR)
return ""
- return qemu_path if return_path else qemu_filename
+ return qemu_path if return_path else qemu_path

View File

@@ -0,0 +1,12 @@
diff -ur orig/udocker/container/structure.py mod/udocker/container/structure.py
--- orig/udocker/container/structure.py 2024-08-28 16:01:10.000000000 +0200
+++ mod/udocker/container/structure.py 2025-05-12 15:33:59.978143281 +0200
@@ -281,7 +281,7 @@
if Msg.level >= Msg.VER:
verbose = 'v'
Msg().out("Info: extracting:", tarf, l=Msg.INF)
- cmd = ["tar", "-C", destdir, "-x" + verbose,
+ cmd = ["proot", "--link2symlink", "tar", "-C", destdir, "-x" + verbose,
"--one-file-system", "--no-same-owner", "--overwrite",
"--exclude=dev/*", "--exclude=etc/udev/devices/*",
"--no-same-permissions", r"--exclude=.wh.*",

View File

@@ -0,0 +1,12 @@
diff -ur orig/udocker/engine/proot.py mod/udocker/engine/proot.py
--- orig/udocker/engine/proot.py 2024-08-28 16:01:10.000000000 +0200
+++ mod/udocker/engine/proot.py 2025-05-12 15:37:28.103523863 +0200
@@ -166,7 +166,7 @@
if (Config.conf['proot_link2symlink'] and
self._has_option("--link2symlink")):
- proot_link2symlink = ["--link2symlink", ]
+ proot_link2symlink = ["--link2symlink", "--sysvipc", "-L", "-p", ]
else:
proot_link2symlink = []

View File

@@ -0,0 +1,17 @@
diff -ur orig/udocker/engine/base.py mod/udocker/engine/base.py
--- orig/udocker/engine/base.py 2024-08-28 16:01:10.000000000 +0200
+++ mod/udocker/engine/base.py 2025-05-13 20:06:50.803621502 +0200
@@ -197,9 +197,13 @@
self.opt["vol"].extend(self.hostauth_list)
if self.opt["dri"]:
self.opt["vol"].extend(Config.conf['dri_list'])
+
+ self.opt["vol"].append("@TERMUX_PREFIX@/etc/resolv.conf:/etc/resolv.conf")
+
home = self._get_bindhome()
if home:
self.opt["vol"].append(home)
+
# remove directory bindings specified with --novol
for novolume in list(self.opt["novol"]):
found = False

12
packages/udocker/build.sh Normal file
View File

@@ -0,0 +1,12 @@
TERMUX_PKG_HOMEPAGE=https://indigo-dc.github.io/udocker
TERMUX_PKG_DESCRIPTION="A basic user tool to execute simple docker containers in batch or interactive systems without root privileges."
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.3.17
TERMUX_PKG_SRCURL=https://github.com/indigo-dc/udocker/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=76713c1e8ea3f0f412144fda51b38a6e309d1fe29e85de8f678626d42e9e04a1
TERMUX_PKG_DEPENDS="curl, proot, python, resolv-conf"
TERMUX_PKG_PYTHON_BUILD_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--prefix=$TERMUX_PREFIX"