Skip to content

Commit 6f8d6ae

Browse files
authored
Merge pull request #401 from indigo-dc/devel3
Devel3
2 parents 92c6bb4 + 61f6c43 commit 6f8d6ae

File tree

8 files changed

+44
-17
lines changed

8 files changed

+44
-17
lines changed

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## udocker (1.3.11)
4+
5+
* add support for hard link to symbolic link conversion in Pn modes
6+
as hard links cannot be created by unprivileged users - partially
7+
addresses: #388
8+
* check of availability of network extensions for port mapping and
9+
netcoop in Pn modes and only use them if supported by the proot
10+
engine being invoked.
11+
* improve image metadata generated by udocker on import - closes: #398
12+
313
## udocker (1.3.10)
414

515
* improved handling of container platform information
@@ -19,7 +29,8 @@
1929
an architecture for the image
2030
* new option `ps -p` enables list of the architectures of containers
2131
* new option `images -p` enables list of the architectures of containers
22-
* the udocker tools support for Fn now includes Ubuntu 23:04, Fedora 38,
32+
* build udockertools 1.2.10 and set it as default
33+
* the udockertools support for Fn now includes Ubuntu 23:04, Fedora 38,
2334
Alpine 3.17 and 3.18.
2435
* experimental support for native Fn execution on arm64 for Fedora 36,
2536
Fedora 37, Fedora 38, CentOS 7, AlmaLinux 8, AlmaLinux 9 and Ubuntu 22,
@@ -32,7 +43,7 @@
3243
## udocker (1.3.9)
3344

3445
* add support to access non-config metadata from containers
35-
* added support for multiplatform manifests and indices solves #392
46+
* added support for multiplatform manifests and indices solves #392 and #355
3647

3748
## udocker (1.3.8)
3849

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@type": "SoftwareSourceCode",
77
"identifier": "udocker",
88
"name": "udocker",
9-
"version": "1.3.10",
9+
"version": "1.3.11",
1010
"description": "A basic user tool to execute simple docker containers in batch or interactive systems without root privileges",
1111
"license": "Apache Software License 2.0, OSI Approved :: Apache Software License",
1212
"author": [

docs/installation_manual.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ udocker requires:
3232
Download a release tarball from <https://github.com/indigo-dc/udocker/releases>:
3333

3434
```bash
35-
wget https://github.com/indigo-dc/udocker/releases/download/1.3.10/udocker-1.3.10.tar.gz
36-
tar zxvf udocker-1.3.10.tar.gz
37-
export PATH=`pwd`/udocker-1.3.10/udocker:$PATH
35+
wget https://github.com/indigo-dc/udocker/releases/download/1.3.11/udocker-1.3.11.tar.gz
36+
tar zxvf udocker-1.3.11.tar.gz
37+
export PATH=`pwd`/udocker-1.3.11/udocker:$PATH
3838
```
3939

4040
Alternatively use `curl` instead of `wget` as follows:
4141

4242
```bash
43-
curl -L https://github.com/indigo-dc/udocker/releases/download/1.3.10/udocker-1.3.10.tar.gz \
44-
> udocker-1.3.10.tar.gz
45-
tar zxvf udocker-1.3.10.tar.gz
46-
export PATH=`pwd`/udocker-1.3.10/udocker:$PATH
43+
curl -L https://github.com/indigo-dc/udocker/releases/download/1.3.11/udocker-1.3.11.tar.gz \
44+
> udocker-1.3.11.tar.gz
45+
tar zxvf udocker-1.3.11.tar.gz
46+
export PATH=`pwd`/udocker-1.3.11/udocker:$PATH
4747
```
4848

4949
udocker executes containers using external tools and libraries that
@@ -353,8 +353,8 @@ The udocker tool should be installed as shown in section 2.1:
353353

354354
```bash
355355
cd /sw
356-
wget https://github.com/indigo-dc/udocker/releases/download/1.3.10/udocker-1.3.10.tar.gz
357-
tar zxvf udocker-1.3.10.tar.gz
356+
wget https://github.com/indigo-dc/udocker/releases/download/1.3.11/udocker-1.3.11.tar.gz
357+
tar zxvf udocker-1.3.11.tar.gz
358358
```
359359

360360
Directing users to the central udocker installation can be done using the

docs/udocker.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" Manpage for udocker
22
.\" Contact udocker@lip.pt to correct errors or typos.
33
.\" To read this man page use: man -l udocker.1
4-
.TH udocker 1 "30 Jun 2023" "version 1.3.10" "udocker man page"
4+
.TH udocker 1 "31 Oct 2023" "version 1.3.11" "udocker man page"
55
.SH NAME
66
udocker \- execute Docker containers in user space without privileges
77
.SH SYNOPSIS

udocker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
"Singularity http://singularity.lbl.gov"
3333
]
3434
__license__ = "Licensed under the Apache License, Version 2.0"
35-
__version__ = "1.3.10"
35+
__version__ = "1.3.11"
3636
__date__ = "2023"

udocker/commonlocalfile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from udocker.engine.execmode import ExecutionMode
1212
from udocker.utils.fileutil import FileUtil
1313
from udocker.utils.uprocess import Uprocess
14+
from udocker.utils.chksum import ChkSUM
1415

1516

1617
class CommonLocalFileApi(object):
@@ -100,6 +101,11 @@ def create_container_meta(self, layer_id, platform=""):
100101
container_json["size"] = FileUtil(layer_file).size()
101102
if container_json["size"] == -1:
102103
container_json["size"] = 0
104+
layer_chksum = ChkSUM().hash(layer_file, "sha256")
105+
if layer_chksum:
106+
container_json["rootfs"] = {}
107+
container_json["rootfs"]["type"] = "layers"
108+
container_json["rootfs"]["diff_ids"] = [ "sha256:" + layer_chksum, ]
103109
container_json["container_config"] = {
104110
"Hostname": "",
105111
"Domainname": "",

udocker/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class Config(object):
7979
# PRoot override seccomp
8080
# conf['proot_noseccomp'] = True
8181
conf['proot_noseccomp'] = None
82-
conf['proot_killonexit'] = True # PRoot kill-on-exit
82+
conf['proot_killonexit'] = True # PRoot --kill-on-exit
83+
conf['proot_link2symlink'] = True # PRoot --link2symlink
8384

8485
# fakechroot engine get ld_library_paths from ld.so.cache
8586
conf['ld_so_cache'] = "/etc/ld.so.cache"

udocker/engine/proot.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ def _get_network_map(self):
119119
proot_netmap_list = []
120120
for (cont_port, host_port) in list(self._get_portsmap().items()):
121121
proot_netmap_list.extend(["-p", "%d:%d" % (cont_port, host_port)])
122-
if self.opt["netcoop"]:
122+
if self.opt["netcoop"] and self._has_option("--netcoop"):
123123
proot_netmap_list.extend(["-n", ])
124-
return proot_netmap_list
124+
if proot_netmap_list and self._has_option("--port"):
125+
return proot_netmap_list
126+
return []
125127

126128
def _get_qemu_string(self):
127129
"""Get the qemu string for container run command if emulation needed"""
@@ -162,6 +164,12 @@ def run(self, container_id):
162164
else:
163165
proot_verbose = []
164166

167+
if (Config.conf['proot_link2symlink'] and
168+
self._has_option("--link2symlink")):
169+
proot_link2symlink = ["--link2symlink", ]
170+
else:
171+
proot_link2symlink = []
172+
165173
if (Config.conf['proot_killonexit'] and
166174
self._has_option("--kill-on-exit")):
167175
proot_kill_on_exit = ["--kill-on-exit", ]
@@ -173,6 +181,7 @@ def run(self, container_id):
173181
cmd_l.append(self.executable)
174182
cmd_l.extend(proot_verbose)
175183
cmd_l.extend(proot_kill_on_exit)
184+
cmd_l.extend(proot_link2symlink)
176185
cmd_l.extend(self._get_qemu_string())
177186
cmd_l.extend(self._get_volume_bindings())
178187
cmd_l.extend(self._set_uid_map())

0 commit comments

Comments
 (0)