From e264b44682a930f70715ea58cf96e69c87a86b64 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 30 May 2020 00:01:28 +0200 Subject: Add license and basic documentation LICENSE: Add GPL-3.0 license. {{archiso,configs}/*,.editorconfig,.gitlab-ci.yml}: Add SPDX license identifier. Makefile: Add SPDX license identifier. Install the `run_archiso.sh` script as global executable `run_archiso`. Use -D and -t flags to install to install files more generically (without a previous call to install the directory). README.rst: Add README outlining the project's scope, how to build images from the profiles and how to test. AUTHORS.rst: Add list of all direct contributors to the repository. CONTRIBUTING.rst: Add basic contribution guidelines, explaining the linter and the license in use. Closes #7 Closes #3 --- AUTHORS.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 AUTHORS.rst (limited to 'AUTHORS.rst') diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000..4fe0eb5 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,33 @@ +=============== +Archiso Authors +=============== + +* Aaron Griffin +* Adam Purkrt +* Chandan Singh +* Charles Vejnar +* Christian Hesse +* Christopher Brannon +* Dan McGee +* David Runge +* David Thurstenson +* Dieter Plaetinck +* Eli Schwartz +* Florian Pritz +* Gerardo Exequiel Pozzi +* Gerhard Brauer +* James Sitegen +* Justin Kromlinger +* Keshav Amburay +* Loui Chang +* Lukas Fleischer +* Martin Damian Fernandez +* Pierre Schmitz +* Sean Enck +* Simo Leone +* Steffen Bönigk +* Sven-Hendrik Haase +* Thomas Bächler +* Yu Li-Yu +* nl6720 +* Øyvind Heggstad -- cgit v1.2.3-70-g09d2 From e369ade17d219cff62016de4fcd81d7f9a77d640 Mon Sep 17 00:00:00 2001 From: Alexander Epaneshnikov Date: Thu, 29 Oct 2020 19:16:14 +0300 Subject: fix a typo, add myself in AUTHORS.rst --- AUTHORS.rst | 1 + configs/releng/efiboot/loader/entries/archiso-x86_64-speech-linux.conf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'AUTHORS.rst') diff --git a/AUTHORS.rst b/AUTHORS.rst index 4fe0eb5..536c15c 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -4,6 +4,7 @@ Archiso Authors * Aaron Griffin * Adam Purkrt +* Alexander Epaneshnikov * Chandan Singh * Charles Vejnar * Christian Hesse diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-speech-linux.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-speech-linux.conf index a9525ee..632c446 100644 --- a/configs/releng/efiboot/loader/entries/archiso-x86_64-speech-linux.conf +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-speech-linux.conf @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -title Arch Linux install medium (x86_64, UEFI) with speach +title Arch Linux install medium (x86_64, UEFI) with speech linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux initrd /%INSTALL_DIR%/boot/intel-ucode.img initrd /%INSTALL_DIR%/boot/amd-ucode.img -- cgit v1.2.3-70-g09d2 From 9f16862acd7e7be02da72f63a03b4c0e256dabff Mon Sep 17 00:00:00 2001 From: fdupoux Date: Fri, 30 Oct 2020 21:20:05 +0000 Subject: Configure the image type and image creation options using profiles (#54) --- AUTHORS.rst | 1 + README.profile.rst | 5 +++++ archiso/mkarchiso | 53 ++++++++++++++++++++++++++--------------------------- 3 files changed, 32 insertions(+), 27 deletions(-) (limited to 'AUTHORS.rst') diff --git a/AUTHORS.rst b/AUTHORS.rst index 536c15c..cc2c3e0 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -15,6 +15,7 @@ Archiso Authors * Dieter Plaetinck * Eli Schwartz * Florian Pritz +* Francois Dupoux * Gerardo Exequiel Pozzi * Gerhard Brauer * James Sitegen diff --git a/README.profile.rst b/README.profile.rst index 94cecdd..70f0b30 100644 --- a/README.profile.rst +++ b/README.profile.rst @@ -44,6 +44,11 @@ The image file is constructed from some of the variables in **profiledef.sh**: ` file (e.g. `packages.x86_64`) * `pacman_conf`: The `pacman.conf` to use to install packages to the work directory when creating the image (defaults to the host's `/etc/pacman.conf`) +* `airootfs_image_type`: The image type to create. The following options are understood (defaults to `squashfs`): + - `squashfs`: Create a squashfs image directly from the airootfs work directory + - `ext4+squashfs`: Create an ext4 partition, copy the airootfs work directory to it and create a squashfs image from it +* `airootfs_image_tool_options`: An array of options to pass to the tool to create the airootfs image. Currently only + `mksquashfs` is supported - see `mksquashfs --help` for all possible options (defaults to `('-comp' 'xz')`). packages.arch ============= diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 5bb042c..13cee6a 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -17,8 +17,6 @@ quiet="y" work_dir="work" out_dir="out" img_name="${app_name}.iso" -sfs_mode="sfs" -sfs_comp="xz" gpg_key="" override_gpg_key="" @@ -38,6 +36,8 @@ arch="$(uname -m)" pacman_conf="/etc/pacman.conf" override_pacman_conf="" bootmodes=() +airootfs_image_type="squashfs" +airootfs_image_tool_options=('-comp' 'xz') # Show an INFO message @@ -108,17 +108,11 @@ usage: ${app_name} [options] Default: '${iso_label}' -P Set the ISO publisher Default: '${iso_publisher}' - -c Set SquashFS compression type (gzip, lzma, lzo, xz, zstd) - Default: '${sfs_comp}' -g Set the GPG key to be used for signing the sqashfs image -h This message -o Set the output directory Default: '${out_dir}' -p PACKAGE(S) Package(s) to install, can be used multiple times - -s Set SquashFS image mode (img or sfs) - img: prepare airootfs.sfs for dm-snapshot usage - sfs: prepare airootfs.sfs for overlayfs usage - Default: '${sfs_mode}' -v Enable verbose output -w Set the working directory Default: '${work_dir}' @@ -201,6 +195,23 @@ _cleanup() { _msg_info "Done!" } +_mkairootfs_create_image() { + if (( $# < 1 )); then + _msg_error "Function '${FUNCNAME[0]}' requires at least one argument" 1 + fi + + image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" + if [[ "${airootfs_image_type}" =~ .*squashfs ]] ; then + if [[ "${quiet}" == "y" ]]; then + mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" -no-progress > /dev/null + else + mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" + fi + else + _msg_error "Unsupported image type: '${airootfs_image_type}'" 1 + fi +} + # Makes a ext4 filesystem inside a SquashFS from a source directory. _mkairootfs_img() { if [[ ! -e "${airootfs_dir}" ]]; then @@ -223,13 +234,7 @@ _mkairootfs_img() { _umount_airootfs install -d -m 0755 -- "${isofs_dir}/${install_dir}/${arch}" _msg_info "Creating SquashFS image, this may take some time..." - if [[ "${quiet}" = "y" ]]; then - mksquashfs "${airootfs_dir}.img" "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" -noappend \ - -comp "${sfs_comp}" -no-progress > /dev/null - else - mksquashfs "${airootfs_dir}.img" "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" -noappend \ - -comp "${sfs_comp}" - fi + _mkairootfs_create_image "${airootfs_dir}.img" _msg_info "Done!" rm -- "${airootfs_dir}.img" } @@ -242,13 +247,7 @@ _mkairootfs_sfs() { install -d -m 0755 -- "${isofs_dir}/${install_dir}/${arch}" _msg_info "Creating SquashFS image, this may take some time..." - if [[ "${quiet}" = "y" ]]; then - mksquashfs "${airootfs_dir}" "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" -noappend \ - -comp "${sfs_comp}" -no-progress > /dev/null - else - mksquashfs "${airootfs_dir}" "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" -noappend \ - -comp "${sfs_comp}" - fi + _mkairootfs_create_image "${airootfs_dir}" _msg_info "Done!" } @@ -573,10 +572,12 @@ _make_boot_uefi-x64.systemd-boot.eltorito() { # Build airootfs filesystem image _make_prepare() { - if [[ "${sfs_mode}" == "sfs" ]]; then + if [[ "${airootfs_image_type}" == "squashfs" ]]; then # prepare airootfs.sfs for overlayfs usage (default) _run_once _mkairootfs_sfs - else + elif [[ "${airootfs_image_type}" == "ext4+squashfs" ]]; then # prepare airootfs.sfs for dm-snapshot usage _run_once _mkairootfs_img + else + _msg_error "Unsupported image type: '${airootfs_image_type}'" 1 fi _mkchecksum if [[ "${gpg_key}" ]]; then @@ -806,7 +807,7 @@ _build_profile() { _run_once _make_iso } -while getopts 'p:r:C:L:P:A:D:w:o:s:c:g:vh?' arg; do +while getopts 'p:r:C:L:P:A:D:w:o:g:vh?' arg; do case "${arg}" in p) read -r -a opt_pkg_list <<< "${OPTARG}" @@ -820,8 +821,6 @@ while getopts 'p:r:C:L:P:A:D:w:o:s:c:g:vh?' arg; do D) override_install_dir="${OPTARG}" ;; w) work_dir="$(realpath -- "${OPTARG}")" ;; o) out_dir="$(realpath -- "${OPTARG}")" ;; - s) sfs_mode="${OPTARG}" ;; - c) sfs_comp="${OPTARG}" ;; g) override_gpg_key="${OPTARG}" ;; v) quiet="n" ;; h|?) _usage 0 ;; -- cgit v1.2.3-70-g09d2 From 23c5d52bd873f97bbce73269c8b7c1da936d6b4c Mon Sep 17 00:00:00 2001 From: "Michael Vorburger.ch" Date: Sat, 30 Jan 2021 14:21:16 +0000 Subject: add vorburger to AUTHORS.rst --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'AUTHORS.rst') diff --git a/AUTHORS.rst b/AUTHORS.rst index cc2c3e0..c6804df 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -24,6 +24,7 @@ Archiso Authors * Loui Chang * Lukas Fleischer * Martin Damian Fernandez +* Michael Vorburger * Pierre Schmitz * Sean Enck * Simo Leone -- cgit v1.2.3-70-g09d2 From 767c09569d840538f43ed2788929b1921707412f Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Sun, 31 Jan 2021 02:12:27 +0100 Subject: Update my email in AUTHORS --- AUTHORS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'AUTHORS.rst') diff --git a/AUTHORS.rst b/AUTHORS.rst index c6804df..3a03c0e 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -29,7 +29,7 @@ Archiso Authors * Sean Enck * Simo Leone * Steffen Bönigk -* Sven-Hendrik Haase +* Sven-Hendrik Haase * Thomas Bächler * Yu Li-Yu * nl6720 -- cgit v1.2.3-70-g09d2