Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install tarball packages with custom extraction #21

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

henriquesimoes
Copy link
Collaborator

Installing through tarballs is useful to enable us to include software that is not yet packaged in the distribution repositories.

A custom extraction script is interesting to solve, in a centralized way, permission issues in rootless container engines both for source code and binaries packages.

I've named the custom script untar, but I'm open to suggestions for other names.

base/untar.sh Outdated Show resolved Hide resolved
base/untar.sh Outdated Show resolved Hide resolved
base/untar.sh Outdated Show resolved Hide resolved
base/Dockerfile Outdated Show resolved Hide resolved
@henriquesimoes henriquesimoes force-pushed the tar-packages branch 2 times, most recently from 7a44f81 to 9c39f4c Compare September 19, 2023 18:36
base/lnls-get-n-unpack.sh Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
base/lnls-get-n-unpack.sh Outdated Show resolved Hide resolved
Trivial tarball extraction leads to file ownership to be kept, which can
cause permission problems with rootless container engines. This could be
overcome by changing subuid and subgid ranges or ignoring ownership
from the container filesystem in the installed machine. However, this
leads to a more difficult setup for the IOC machines. Instead, file
ownership is ignored during extraction in the build phase.

This requirement of customizing extraction for all downloaded archives
justifies having a dedicated helper script for both downloading and
extracting archives.

For convenience, a list of URLs can be defined. Tarball archives are
downloaded to a dedicated temporary directory to avoid filename
conflicts, since they might have arbitrary names. The extraction can be
made either in the current directory or at the filesystem root. The
latter is useful to extract to specific directories without any
intervention. It should be used, for instance, to install custom
packages to the /usr/local tree.

Noisy output from commands are replaced by short messages to make the
build progress more clean. Exceptionally, `wget` output is logged to
stdout only when it fails.
This makes it possible to install software not packaged in the
distribution repositories, such as closed-source local packages.
Packages can be installed during the build-stage, since the IOC might
require a given library also at compile time.

`ldconfig` is executed at the end to refresh the dynamic linker library
resolution cache, which is required to identify new libraries installed
with lnls-get-n-unpack. `ldconfig` is not required for the build stage,
as dynamic link will take place only during the binary runtime.
@henriquesimoes henriquesimoes merged commit 8f02abc into main Oct 23, 2023
1 check passed
@henriquesimoes henriquesimoes deleted the tar-packages branch October 23, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants