Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit fd3e2a5

Browse files
committed
Merge branch 'master' into fedora-update
2 parents f112765 + 78aae5e commit fd3e2a5

File tree

108 files changed

+7792
-2633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+7792
-2633
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
ch_prefix: /var/tmp
4646

4747
steps:
48-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v3
4949

5050
- name: early setup & validation
5151
run: |
@@ -150,10 +150,11 @@ jobs:
150150
run: |
151151
set -x
152152
sudo apt-get install -y libfuse3-dev
153-
# Currently we need the master branch of SquashFUSE.
154153
cd /usr/local/src
155154
git clone https://github.com/vasi/squashfuse.git
156155
cd squashfuse
156+
# Check out the latest release.
157+
git checkout $(git tag -l '[0-9].*' | sort -V | tail -1)
157158
./autogen.sh
158159
./configure --prefix=/usr/local
159160
make
@@ -186,28 +187,6 @@ jobs:
186187
/usr/include/x86_64-linux-musl/
187188
sudo ln -s x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/
188189
189-
- name: install/configure dependencies, all Buildah
190-
if: ${{ startsWith(matrix.builder, 'buildah') }}
191-
run: |
192-
command -v buildah
193-
buildah --version
194-
command -v runc
195-
runc --version
196-
# As of 2020-11-30, stock registries.conf is pretty simple; it
197-
# includes Docker Hub (docker.io) and then quay.io. Still, use ours
198-
# for stability.
199-
cat /etc/containers/registries.conf
200-
cat <<'EOF' | sudo tee /etc/containers/registries.conf
201-
[registries.search]
202-
registries = ['docker.io']
203-
EOF
204-
205-
- name: install/configure dependencies, privileged Buildah
206-
if: ${{ startsWith(matrix.builder, 'buildah-') }}
207-
run: |
208-
sudo usermod --add-subuids 10000-65536 $USER
209-
sudo usermod --add-subgids 10000-65536 $USER
210-
211190
- name: disable bundled lark, ch-image
212191
if: ${{ matrix.builder == 'ch-image'
213192
&& matrix.pack_fmt == 'squash-mount'
@@ -231,7 +210,7 @@ jobs:
231210
test -f ./lib/lark/lark.py
232211
make $ch_makej
233212
sudo make $ch_makej install
234-
[[ $(bin/ch-image -v --dependencies) = 'lark path: /home/runner/work/charliecloud/charliecloud/lib/charliecloud/lark/__init__.py' ]]
213+
[[ $(bin/ch-image -v --dependencies) = 'lark path: /home/runner/work/charliecloud/charliecloud/lib/lark/__init__.py' ]]
235214
[[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = 'lark path: /usr/local/lib/python3.10/dist-packages/lark/__init__.py' ]]
236215
make clean
237216
# no install, enable: build fails, untested
@@ -260,11 +239,18 @@ jobs:
260239
else
261240
LDD=ldd
262241
fi
263-
./configure --prefix=$ch_prefix/from-git
242+
# Go wild with install directories to make sure it works (see #683).
243+
# We do have a normal install below.
244+
./configure --prefix=$ch_prefix/from-git \
245+
--datarootdir=$ch_prefix/from-git_dataroot \
246+
--libexecdir=$ch_prefix/from-git_libexec \
247+
--libdir=$ch_prefix/from-git_lib \
248+
--mandir=$ch_prefix/from-git_man \
249+
--docdir=$ch_prefix/from-git_doc \
250+
--htmldir=$ch_prefix/from-git_html
264251
set -x
265252
fgrep 'documentation: yes' config.log
266-
[[ $CH_TEST_BUILDER = buildah* ]] && fgrep 'with Buildah: yes' config.log
267-
[[ $CH_TEST_BUILDER = docker ]] && fgrep 'with Docker: yes' config.log
253+
[[ $CH_TEST_BUILDER = docker ]] && command -v docker
268254
if [[ $CH_TEST_BUILDER = ch-image ]]; then
269255
fgrep 'with ch-image(1): yes' config.log
270256
fgrep '"lark" module ... bundled' config.log
@@ -296,9 +282,9 @@ jobs:
296282
run: |
297283
set -x
298284
[[ $(bin/ch-image gestalt python-path) = /usr/bin/python3 ]]
299-
[[ $(bin/ch-image -v --dependencies) = "lark path: /home/runner/work/charliecloud/charliecloud/lib/charliecloud/lark/__init__.py" ]]
285+
[[ $(bin/ch-image -v --dependencies) = "lark path: /home/runner/work/charliecloud/charliecloud/lib/lark/__init__.py" ]]
300286
[[ $($ch_prefix/from-git/bin/ch-image gestalt python-path) = /usr/bin/python3 ]]
301-
[[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = "lark path: /var/tmp/from-git/lib/charliecloud/lark/__init__.py" ]]
287+
[[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = "lark path: /var/tmp/from-git_lib/charliecloud/lark/__init__.py" ]]
302288
303289
- name: late setup & validation, all
304290
run: |
@@ -341,15 +327,15 @@ jobs:
341327
mv charliecloud-*.tar.gz $ch_prefix
342328
cd $ch_prefix
343329
tar xf charliecloud-*.tar.gz
344-
rm charliecloud-*.tar.gz # else cd fails with "too many arguments"
330+
rm charliecloud-*.tar.gz # else cd fails with too many arguments
345331
cd charliecloud-*
346332
pwd
347333
# Configure and verify output.
348334
./configure --prefix=$ch_prefix/from-tarball
349335
set -x
350336
fgrep 'documentation: yes' config.log
351-
[[ $CH_TEST_BUILDER = buildah* ]] && fgrep 'with Buildah: yes' config.log
352-
[[ $CH_TEST_BUILDER = docker ]] && fgrep 'with Docker: yes' config.log
337+
[[ $CH_TEST_BUILDER = buildah* ]] && command -v buildah
338+
[[ $CH_TEST_BUILDER = docker ]] && command -v docker
353339
[[ $CH_TEST_BUILDER = ch-image ]] && fgrep 'with ch-image(1): yes' config.log
354340
fgrep 'recommended tests, tar-unpack mode: yes' config.log
355341
fgrep 'recommended tests, squash-unpack mode: yes' config.log
@@ -382,20 +368,39 @@ jobs:
382368
- name: run test suite (Git WD, standard)
383369
run: |
384370
bin/ch-test all
371+
# Validate that “rootemu” test phase didn’t run (skipped by default
372+
# on standard scope).
373+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
374+
375+
- name: run root emulation phase
376+
if: ${{ matrix.builder == 'ch-image'
377+
&& matrix.pack_fmt == 'squash-mount'
378+
&& matrix.cache == 'enabled' }}
379+
run: |
380+
# We only really need to run the root emulation tests once in CI.
381+
# ch-image with an enabled cache is required for these unit tests.
382+
# Since all CI tests that use ch-image with an enabled cache take
383+
# roughly the same amount of time, we arbitrarily chose squash-mount
384+
# as the pack format.
385+
bin/ch-test rootemu
386+
# Validate that “rootemu” test phase ran.
387+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = yes ]]
385388
386389
- name: run test suite (installed from Git WD, standard)
387390
if: ${{ matrix.builder == 'ch-image'
388391
&& matrix.pack_fmt == 'squash-mount'
389392
&& matrix.cache == 'enabled' }}
390393
run: |
391394
$ch_prefix/from-git/bin/ch-test all
395+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
392396
393397
- name: run test suite (installed from tarball, standard)
394398
if: ${{ matrix.builder == 'ch-image'
395399
&& matrix.pack_fmt == 'squash-mount'
396400
&& matrix.cache == 'enabled' }}
397401
run: |
398402
$ch_prefix/from-tarball/bin/ch-test all
403+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
399404
400405
- name: uninstall from tarball
401406
if: ${{ matrix.keep_sudo }}
@@ -424,9 +429,10 @@ jobs:
424429
fgrep 'HTML documentation ... no' config.log
425430
fgrep 'man pages ... no' config.log
426431
fgrep 'ch-image(1) ... no' config.log
427-
fgrep 'with Docker: yes' config.log
428432
fgrep 'with ch-image(1): no' config.log
429-
fgrep 'basic tests, all stages: yes' config.log
433+
# This CI test requires Docker, but the “configure” script doesn’t
434+
# check for Docker, so we do it ourselves with “command -v”.
435+
command -v docker
430436
fgrep 'more complete tests: no' config.log
431437
set +x
432438
# Build.
@@ -437,6 +443,7 @@ jobs:
437443
if: ${{ matrix.builder == 'docker' }}
438444
run: |
439445
bin/ch-test all
446+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
440447
441448
- name: remove non-essential dependencies
442449
if: ${{ matrix.builder == 'docker' }}
@@ -462,8 +469,7 @@ jobs:
462469
./configure --prefix=/doesnotexist
463470
set -x
464471
fgrep 'documentation: no' config.log
465-
fgrep 'with Docker: yes' config.log
466-
fgrep 'basic tests, all stages: yes' config.log
472+
command -v docker
467473
fgrep 'more complete tests: no' config.log
468474
fgrep 'recommended tests, squash-mount mode: no' config.log
469475
set +x
@@ -475,6 +481,7 @@ jobs:
475481
if: ${{ matrix.builder == 'docker' }}
476482
run: |
477483
bin/ch-test all
484+
[[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
478485
479486
- name: print ending environment
480487
if: ${{ always() }}

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ a.out
55
/bin/ch-image
66
/bin/ch-run
77
/bin/ch-run-oci
8-
/bin/ch-ssh
98
/examples/copy/dirCa/symlink-to-dirCb
109
/examples/copy/dirD/symlink-to-fileDa
1110
/examples/copy/dirEa/symlink-to-dirEb
@@ -20,19 +19,21 @@ a.out
2019
/doc/doctrees/
2120
/doc/html/
2221
/doc/man/*.[17]
23-
/lib/charliecloud
2422
/lib/contributors.bash
2523
/lib/lark
2624
/lib/lark-stubs
2725
/lib/lark*.dist-info
2826
/lib/version.py
2927
/lib/version.sh
3028
/lib/version.txt
31-
/test/build/61_force-auto.bats
29+
/test/build/30_doctest-auto.bats
30+
/test/force-auto.bats
3231
/test/docs-sane
32+
/test/doctest
3333
/test/fixtures/symlink-to-tmp
3434
/test/force-auto
3535
/test/make-perms-test
36+
/test/order-py
3637
/test/sotest/*.so*
3738
/test/sotest/sotest
3839
/test/sotest/bin/

Makefile.am

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,24 @@ SUBDIRS = lib bin doc examples misc packaging test
55
EXTRA_DIST = .github/PERUSEME .github/workflows/main.yml
66

77
EXTRA_DIST += LICENSE README.rst VERSION autogen.sh
8+
9+
# Embedded paths are in the source code suitable for running from the source
10+
# directory (i.e., without install). When installing, those paths are often
11+
# wrong, so re-write them with the correct paths we got from configure. Note:
12+
# Some variables are in both Python and sh, so we use syntax valid for both;
13+
# others are just sh.
14+
install-exec-hook:
15+
@echo '### re-writing embedded paths ###'
16+
for i in $(DESTDIR)@bindir@/ch-convert \
17+
$(DESTDIR)@bindir@/ch-fromhost \
18+
$(DESTDIR)@bindir@/ch-image \
19+
$(DESTDIR)@bindir@/ch-run-oci \
20+
$(DESTDIR)@bindir@/ch-test \
21+
$(DESTDIR)@libdir@/charliecloud/base.sh \
22+
$(DESTDIR)@libexecdir@/charliecloud/doctest; \
23+
do \
24+
sed -Ei -e 's|^(ch_lib ?= ?).+/lib"?$$|\1"@libdir@/charliecloud"|' \
25+
-e 's|^(CHTEST_DIR=).+$$|\1@libexecdir@/charliecloud|' \
26+
-e 's|^(CHTEST_EXAMPLES_DIR=).+$$|\1@docdir@/examples|' \
27+
$$i; \
28+
done

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ code. Please instead use the current number in the FAQ.
109109
Copyright and license
110110
---------------------
111111

112-
Charliecloud is copyright © 2014–2022 Triad National Security, LLC and others.
112+
Charliecloud is copyright © 2014–2023 Triad National Security, LLC and others.
113113

114114
This software was produced under U.S. Government contract 89233218CNA000001
115115
for Los Alamos National Laboratory (LANL), which is operated by Triad National

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.33~pre
1+
0.36~pre

bin/Makefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## C programs
66

7-
bin_PROGRAMS = ch-checkns ch-run ch-ssh
7+
bin_PROGRAMS = ch-checkns ch-run
88

99
ch_checkns_SOURCES = ch-checkns.c ch_misc.h ch_misc.c
1010

@@ -16,8 +16,6 @@ endif
1616
ch_run_CFLAGS = $(CFLAGS) $(PTHREAD_CFLAGS)
1717
ch_run_LDADD = $(CH_RUN_LIBS)
1818

19-
ch_ssh_SOURCES = ch-ssh.c ch_misc.h ch_misc.c
20-
2119

2220
## Shell scripts - distributed as-is
2321

0 commit comments

Comments
 (0)