Releases: ivan-hc/ArchImage
4.3
This release brings workflow improvements and more lightweight AppImages created
Create the script and the JuNest environment (part 1) | Create the AppImage (part 2) |
---|---|
part.1.mkv.mp4 |
part.2.mkv.mp4 |
Updated archimage-cli
- if you are a user of "AM"/AppMan at https://github.com/ivan-hc/AM, you can use bash/zsh completion for arguments and options
- added two options to use this CLI in "develper mode" , like "AM", options
--devmode-enable
(lets you use the "dev" branch of this repo) and--devmode-disable
- added a message that warns you in case you have not a XDG directory, files will be saved in your current directory
Updated the script "NEW-junest.sh"
- running the script is now less resource intensive... and it is now really quick, expecially for the part of libraries saved
- replaced all the slow functions to add libraries with only one that quickly selects only the needed libraries of the main package and the dependencies
- the basic JuNest is keept into a dedicated directory "archlinux/.junest", while the AppDir will be created apart, with the same structure of directories and its own patches, not to
rsync
/remove
backups each time - restarting the process will take care if the variables
extraction_count
andDEPENDENCES
are not changed, if so, there is no need to extract all packages again (see below 👇 )
simplescreenrecorder-2025-01-18_20.10.40.mkv.mp4
- check libraries is more selective, to reduce bloating the final AppImage
- in most cases it is enough to add only keywords to BINSAVED, LIBSAVED and SHARESAVED instead of adding packages in DEPENDENCES, so you don't need to specify what dependencies must be added in
DEPENDENCES
, using a high value forextraction_count
should be enough to create a working (and bloat) AppImage - empty directories under /usr are removed (eccept the needed mountpoints)
The above can be resumed in a cleaner AppDir with only what the app really needs to work.
Please refer to the tutorial on the README of this repo to start your searches.
If you have already installed archimage-cli, please run
archimage-cli -s
...to use the latest version.
4.2
"NEW" template that merges the previous ones
https://github.com/ivan-hc/ArchImage/blob/main/NEW-junest.sh
- all AppImages created are updatable, the footer of the script contains variables for this purpose
- all AppImages can alternate BubbleWrap and PROOT in order to work on all systems with or without restrictions on Namespaces
- dependences and "optdepend" of the base package are all detected and extracted by default
- include the more common
coreutils
binaries by default, to prevent missing core commands when running the app - fixed major issues related to links inside the apps, now they can communicate with your local Firefox (and maybe other browsers)... it is recommended to add
xapp
as a dependency - all main variables for keywords are now on top of the script, under the main variables APP, BIN and DEPENDENCES, for the sake of your workflow
- you can choose not to add dependencies due to the new "extraction level" system: set 1 (default) to extract only dependencies of the dependencies, 2 to extract the dependencies of the latter... and so on, until you can bundle the whole Arch Linux (please, don't do it 😆 )... seriously, there is also a black list of packages that prevents
base-devel
related ones and packages likesystemd
or the kernel to be bundled. You can extend that command according to your needs. The variable name is$extraction_count
, you can edit it manually or set it out of the script. NOTE, the higher the number, the more packages will be included, the more successfully the app will work... the bigger the AppImage will be - the script is separated into blocks with headers indicating what that part of the workflow is dedicated to, making it easier to customize your scripts
- added a new function with variables to set manually for files and directories to remove, conveniently manageable via
for
loops
For more details, see the updated README with new questions of the wizard and the function to remove explained files in detail.
If you already have archimage-cli
installed, run the command
archimage-cli -s
to update.
New "suggestions" have also been added to the end of the wizard.
Here is a video where I build OBS Studio
https://www.youtube.com/watch?v=gMFo9_ykBss
Have fun!
4.1
New core code in the AppRun to use Nvidia drivers from the host
[ -z "$NVIDIA_ON" ] && NVIDIA_ON=1
if [ "$NVIDIA_ON" = 1 ]; then
DATADIR="${XDG_DATA_HOME:-$HOME/.local/share}"
CONTY_DIR="${DATADIR}/Conty/overlayfs_shared"
[ -f /sys/module/nvidia/version ] && nvidia_driver_version="$(cat /sys/module/nvidia/version)"
if [ -n "$nvidia_driver_version" ]; then
mkdir -p "${CONTY_DIR}"/nvidia "${CONTY_DIR}"/up/usr/lib "${CONTY_DIR}"/up/usr/share
nvidia_data_dirs="egl glvnd nvidia vulkan"
for d in $nvidia_data_dirs; do [ ! -d "${CONTY_DIR}"/up/usr/share/"$d" ] && ln -s /usr/share/"$d" "${CONTY_DIR}"/up/usr/share/ 2>/dev/null; done
[ ! -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
[ -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && nvidia_driver_conty=$(cat "${CONTY_DIR}"/nvidia/current-nvidia-version)
if [ "${nvidia_driver_version}" != "${nvidia_driver_conty}" ]; then
rm -f "${CONTY_DIR}"/up/usr/lib/*; echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
fi
/sbin/ldconfig -p > "${CONTY_DIR}"/nvidia/host_libs
grep -i "nvidia\|libcuda" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2 > "${CONTY_DIR}"/nvidia/host_nvidia_libs
libnv_paths=$(grep "libnv" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2)
for f in $libnv_paths; do strings "${f}" | grep -qi -m 1 "nvidia" && echo "${f}" >> "${CONTY_DIR}"/nvidia/host_nvidia_libs; done
nvidia_libs=$(cat "${CONTY_DIR}"/nvidia/host_nvidia_libs)
for n in $nvidia_libs; do libname=$(echo "$n" | sed 's:.*/::') && [ ! -f "${CONTY_DIR}"/up/usr/lib/"$libname" ] && cp "$n" "${CONTY_DIR}"/up/usr/lib/; done
libvdpau_nvidia="${CONTY_DIR}/up/usr/lib/libvdpau_nvidia.so"
if ! test -f "${libvdpau_nvidia}*"; then cp "$(find /usr/lib -type f -name 'libvdpau_nvidia.so*' -print -quit 2>/dev/null | head -1)" "${CONTY_DIR}"/up/usr/lib/; fi
[ -f "${libvdpau_nvidia}"."${nvidia_driver_version}" ] && [ ! -f "${libvdpau_nvidia}" ] && ln -s "${libvdpau_nvidia}"."${nvidia_driver_version}" "${libvdpau_nvidia}"
[ -d "${CONTY_DIR}"/up/usr/lib ] && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}":"${CONTY_DIR}"/up/usr/lib:"${LD_LIBRARY_PATH}"
[ -d "${CONTY_DIR}"/up/usr/share ] && export XDG_DATA_DIRS="${XDG_DATA_DIRS}":"${CONTY_DIR}"/up/usr/share:"${XDG_DATA_DIRS}"
fi
fi
...you don't have to wait for the download to finish, download external scripts or compile anything from scratch.
One second or less is enough before you stat using hardware acceleration in your apps.
The above function is inspired by Conty's NVIDIA_HANDLER=2, and is 100% compatible with Conty.
What's Changed
Full Changelog: 4.0...4.1
4.0
This release combines the flexibility of JuNest with the power of Conty to support hardware acceleration!
Like JuNest, Conty is also a portable Arch Linux container, and as in the main script, it uses BubbleWrap to interface with the host system.
Its advantage, however, is that it detects the presence of proprietary Nvidia drivers in the system and then locally installs those needed by an Arch Linux system to work.
The drivers are saved in a "Conty" directory, under $HOME/.local/share. Once installed, the JuNest-based Archimage will only have to detect them and then automatically export the path to the libraries and files needed for hardware acceleration to work.
Here is an example of how Nvidia drivers are installed locally
simplescreenrecorder-2024-12-29_01.15.05.mkv.mp4
This only works with Archimages that contain the same piece of code added in this commit a8fae45 or for all new Archimages.
It is recommended not to abuse this feature, not all programs need hardware acceleration.
Added a new question to the CLI:
DO YOU WANT TO ENABLE HARDWARE ACCELERATION FOR NVIDIA USERS?
default is "N".
It will be possible to activate Nvidia support with NVIDIA_ON=1
and deactivate it by setting it to zero or other values different from 1, for example with NVIDIA_ON=0
. The function to detect and install/update local Nvidia drivers can then also be activated/deactivated at a later time, or by the user himself who uses the AppImage, by exporting the right value for NVIDIA_ON
.
See more at Hardware Acceleration.
What's Changed
Full Changelog: 3.5...4.0
ArchImage CLI 3.5
Now it is possible to choose between the buld script based on BubbleWrap and the one based on Proot
- BubbleWrap (default), uses Linux namespaces for greater host compatibility
- Proot (new), maximum portability, but still experimental
also, full refactoring and a new look.
simplescreenrecorder-2024-12-20_20.58.17.mkv.mp4
Curiosity
The first versions of the Archimage scripts were all based on PROOT, this return was driven by the discovery of new implementations, in particular using Archimages on non-Linux systems, such as FreeBSD: AppImages based on PROOT had a better chance of being executed in Linuxlator than those based on Bubblewrap.
The port is still under experimentation.
3.4.4
- Refactoring del codice nella CLI principale e negli script
- Reduced the number of customization steps
- Velocità di costruzione migliorata
Full Changelog: 3.4...3.4.4
3.4
Scripts
- AppImages are now Type3, so you don't need to have
libfuse2
installed on the host - first experimental implementation of "libselinux", if in "$DEPENDENCES" it will be bundled into AppImage and system libraries from the host can be viewed without conflicts (this is a first step towards implementing hardware acceleration)
- various cleanings of the code
- use "BASH" instead of "SH"
CLI
- Just changed the version number
Full Changelog: 3.3...3.4
3.3
3.2
CLI
Not big changes, just moved "include dependencies" to the top options.
SCRIPTS
- Unsilenced messages, now you can debug without extracting the package;
- Automatic mounting of "/etc/resolv.conf" for internet connections, single point in "/etc", removing any JuNest related error messages and giving the internal BASH/SHELL full control of the container.
This release aims to broaden user search by enabling debugging by default.
Future releases will see an attempt to implement hardware acceleration, which is still absent in JuNest. If you want to help me, visit fsquillace/junest#344
3.1
Finish with a standard setup or continue customizing!
From now on you can choose whether to easily create the script by pressing "enter" 4 times on the keyboard (optional) or continue to customize it (default, classic), thanks to a standard selection of enabled defaults (based on my experience), including:
- Installation of
binutils
,gzip
andbasedevel
(used to build from AUR, packages will not be bundled in the Appimage); - AUR enabled;
- Install
ca-certificates
and check for internet / audio related libraries; - Scan only libraries needed by the app and its dependences;
- Also bundle the dependences with the app in the Appimage package;
- The file "/usr/lib/dri/swrast_dri.so" will NOT be included if not needed.
All you have to do is choose the package name, specify the binary name if it is different from the package name, add (optional) dependencies and choose whether to end up with the aforementioned defaults (press "Y") or continue customizing as normal (RECOMMENDED choice, press "N" or leave blank).
Installation
Download the main script and made it executable:
wget https://raw.githubusercontent.com/ivan-hc/ArchImage/main/archimage-cli
chmod a+x ./archimage-cli
Usage
./archimage-cli [OPTION]
or
./archimage-cli [OPTION] [PROGRAM]
This tool will create a script to compile an AppImage based on JuNest. To create the script use the option -b
or --build
Full Changelog: 3.0...3.1