1. 26 Mar, 2021 1 commit
  2. 21 Mar, 2021 1 commit
  3. 09 Mar, 2021 1 commit
    • nl6720's avatar
      Support EROFS · bc67933a
      nl6720 authored
      EROFS, like Squashfs, is a read-only file system. It can be used to store airootfs in an image file.
      Its advantage is the support for POSIX ACLs. EROFS downside is that currently it only supports LZ4 compression (LZMA support is not yet fully implemented).
      
      A difference from Squashfs is that, EROFS stores change time (ctime) not modification time (mtime). The reverse is true for Squashfs.
      
      Implements archlinux/archiso#59
      bc67933a
  4. 28 Jan, 2021 1 commit
  5. 26 Jan, 2021 1 commit
    • Christian Hesse's avatar
      mkarchiso: add version information · b30d1cad
      Christian Hesse authored
      To date the iso version was used for iso volume information and iso file name.
      In my custom builds I do use it a lot more:
      
      * Inside the root fs: The system knows about its own version. I use this to:
        -> report the version to a server (poor man's inventory)
        -> let the system update itself
      
      * On the iso fs: The files are served via rsync, running systems transfer
        version file first to check for available update.
      
      * A grub environment file on the iso fs: Booting the iso from grub allows
        to create cow directory per version:
      
          loopback loop archlinux.iso
          load_env -f (loop)/arch/grubenv
          linux (loop)/arch/boot/x86_64/vmlinuz-linux ... \
              cow_directory=archlinux/${VERSION} ...
      
      So let's just create these files.
      b30d1cad
  6. 23 Jan, 2021 1 commit
  7. 07 Jan, 2021 1 commit
  8. 30 Nov, 2020 4 commits
    • David Runge's avatar
      Fix issues with file ownerships/modes · c10004df
      David Runge authored
      archiso/mkarchiso:
      Make sure to always compare absolute paths in `_make_custom_airootfs()` (as `realpath` is used).
      Remove `echo` calls that prevent the setting of actual file ownerships and modes.
      
      configs/releng/profiledef.sh:
      Set file mode of /root/.automated_script.sh to 755.
      
      Fixes #82
      c10004df
    • nl6720's avatar
      Keep all SYSLINUX files in /syslinux · 863247d0
      nl6720 authored
      This gets rid of the duplicate ldlinux.c32 and the useless isolinux.cfg which only points to syslinux.cfg.
      
      Implements archlinux/archiso#46 .
      863247d0
    • nl6720's avatar
      Prevent path traversal outside of $airootfs_dir · 183ae527
      nl6720 authored
      183ae527
    • nl6720's avatar
      Allow specifying ownership and mode of custom airootfs files and directories · 42d9e4f9
      nl6720 authored
      profiledef.sh can now contain an associative array called file_permissions which can be used to set custom ownership and mode of custom airootfs files. The array's keys contain the path and the value is a colon separated list of owner UID, owner GID and access mode.
      For example:
      
          file_permissions=(
            ["/etc/shadow"]="0:0:400"
          )
      
      This means that mkarchiso now copies airootfs files (and directores) without permissions and anything that should be owned by a user other than root and/or if the mode should be something other than 644 for files and 755 for directories must to be listed in ${file_permission[@]} in profiledef.sh.
      
      Fixes archlinux/archiso#61 .
      42d9e4f9
  9. 18 Nov, 2020 1 commit
    • David Runge's avatar
      Fix evaluation bugs in mkarchiso · 3160db0e
      David Runge authored
      archiso/mkarchiso:
      Guard the call to `_mksignature()` in `_prepare_airootfs_image()` by an if statement.
      Using the `&&` logic leads to `_prepare_airootfs_image()` evaluating to false if `$gpg_key` is not set.
      
      Add `_msg_info()` calls to `_set_override()` which prevent the function from evaluating to false if no override is
      being done. Additionally this is great for debugging purposes.
      
      Add `_msg_info()` calls to `_read_profile()` (which is great for debugging purposes).
      
      Fixes #81
      3160db0e
  10. 14 Nov, 2020 3 commits
  11. 30 Oct, 2020 1 commit
  12. 29 Oct, 2020 1 commit
    • David Runge's avatar
      Remove build.sh support from profiles and mkarchiso · 1bd944ee
      David Runge authored
      configs/{baseline,releng}/build.sh:
      Remove `build.sh` scripts. They were deprecated with v47.
      
      archiso/mkarchiso:
      Remove all `build.sh` related functionality (i.e. `command_pkglist()`, `command_iso()`, `command_prepare()`,
      `command_install()`, `command_init()`, `command_run()`).
      
      Rename `command_build_profile()` to `_build_profile()` to be more in line with the style of the other function naming.
      
      Change `_show_config()` to only print info about the profile and make no more use of parameters.
      
      Remove all help output related to legacy `build.sh` commands.
      
      Fixes #51
      1bd944ee
  13. 24 Oct, 2020 2 commits
    • David Runge's avatar
      Set CacheDir and HookDir for profile more sanely · f3af5692
      David Runge authored
      archiso/mkarchiso:
      Change `_pacman()` to use the *modified* pacman.conf from the work_dir, instead of using the *unmodified* pacman.conf from
      the profile.
      
      Change `_make_pacman_conf()` to compare the system's and the profile's CacheDir setting and use the profile's CacheDir
      setting only if it's not the default and not the same as the system's.
      
      Always set the HookDir to the airootfs' override directory, so that no hooks from the host system are being run.
      
      Remove DBPath, LogFile and RootDir settings from the work_dir pacman.conf as they are otherwise referring to the host
      system, **even if** pacman is being called with the `-r` flag.
      
      Fix a typo in _make_custom_airootfs().
      
      README.profile.rst:
      Add information about the pacman.conf in a profile and how configuration options behave, when used by mkarchiso.
      
      Fixes #73
      Fixes #74
      f3af5692
    • nl6720's avatar
      Move FAT image to a separate partition outside the ISO 9660 file system · 729d16b4
      nl6720 authored
      Support bios.syslinux.eltorito boot mode without bios.syslinux.mbr.
      bios.syslinux.mbr does not work without bios.syslinux.eltorito because -isohybrid-mbr requires the El Torito boot image.
      
      Support uefi-x64.systemd-boot.esp boot mode without uefi-x64.systemd-boot.eltorito and vice versa.
      If uefi-x64.systemd-boot.eltorito is used without uefi-x64.systemd-boot.esp, the El Torito boot image will be placed in the ISO 9660 file system as before.
      Note that an ISO created with only uefi-x64.systemd-boot.eltorito will still be bootable as a "hard disk" on OVMF. OVMF will boot the El Torito image.
      
      This change has the following effect on the partition tables:
      
      - *.eltorito options add El Torito boot catalog entries. MBR and GPT are not affected.
      - uefi-x64.systemd-boot.esp creates a protective MBR partition table and a GPT table that includes a Linux filesystem data partition for the ISO 9660 volume, an EFI system partition and a Microsoft basic data partition that maps the 300 KiB padding added by xorriso.
      - bios.syslinux.mbr (without uefi-x64.systemd-boot.esp): adds a MBR partition table and maps the ISO 9660 volume as a partition of type 0x83. No GPT is produced.
      - bios.syslinux.mbr (with uefi-x64.systemd-boot.esp): adds an second partition in the MBR (after 0xEE) starting from sector 0 to sector 1 with type 0 and marks it as bootable. This violates the GPT specification, but allows some systems to succesfully boot in BIOS mode from GPT.
      
      Fixes archlinux/archiso#49
      729d16b4
  14. 07 Oct, 2020 3 commits
  15. 04 Oct, 2020 1 commit
  16. 03 Oct, 2020 1 commit
    • David Runge's avatar
      Replace bash arithmetic with awk functions · 55cfb8ba
      David Runge authored
      archiso/mkarchiso:
      The bash arithmethics in _make_boot_uefi-x64.systemd-boot.esp() introduced rounding issues, that can lead to
      insufficient FAT image size for the files.
      Conversion functions for awk now replace the bash arithmetics and additionally a ceil() function rounds the calculated
      size up to the next full MiB.
      Add an info message about the size of the created FAT image.
      
      Fixes #70
      55cfb8ba
  17. 29 Sep, 2020 1 commit
    • David Runge's avatar
      Fix info message for legacy command · 2e1ddec0
      David Runge authored
      archiso/mkarchiso:
      Change the way _show_config() displays information about the build environment, as displaying a profile directory as a
      legacy command to mkarchiso is confusing.
      The function now prints a deprecation message if '$command_name' is not a directory (i.e. not a profile).
      Remove 'command_' prefix from help output for legacy commands (the prefix is only in use for internal functions).
      
      Relates to !69
      Fixes #60
      2e1ddec0
  18. 27 Sep, 2020 4 commits
  19. 05 Sep, 2020 1 commit
  20. 02 Sep, 2020 1 commit
  21. 25 Aug, 2020 2 commits
    • David Runge's avatar
      Add missing declaration of override_install_dir · 4b401931
      David Runge authored
      **archiso/mkarchiso**:
      
      In d90184a7 the unbound variable `override_install_dir` was introduced by accident.
      
      It is required to be set to empty string to provide override functionality for `install_dir`.
      
      Fixes #57
      4b401931
    • David Runge's avatar
      Pass profile directory as parameter to mkarchiso · d90184a7
      David Runge authored
      **archiso/mkarchiso**:
      
      Change all override option parameters (i.e. `-A`, `-C`, `-D`, `-L`, `-P` and `-g`) to not directly override the global
      variable they are tied to, but instead using an `override_` prefixed variable.
      
      Add `_set_overrides()` to use `override_` prefixed variables (if set) to override those without a prefix.
      
      Remove `-B` (a profile directory) from the list of parameters. The profile directory is now provided as separate
      non-option parameter.
      
      Add a call to `_read_profile()`, `_set_overrides()` and `command_build_profile()` to the fallthrough option of the
      switch-case checking `command_name` - a non-option parameter to mkarchiso. This effectively provides the possibility to
      set the profile directory using a non-option parameter, while still maintaining compatibility to legacy named arguments
      used in the configs' `build.sh` scripts.
      
      Extend the warning in regards to legacy `build.sh` based commands to mkarchiso by providing an EOL with archiso v49.
      
      Change the help output to reflect the changes and further elaborate on the legacy commands used by `build.sh` scripts.
      
      Change help output to be ordered alphabetically.
      
      Add help output for `-r` and `-g` options.
      
      Call `_set_overrides()` for legacy commands that accept one or more of the overriden options (i.e. `command_init`,
      `command_install`, `command_prepare` and `command_iso`).
      
      Various style fixes.
      
      **configs/{baseline,releng}/build.sh**:
      
      Change call to mkarchiso to use the profile's directory as a named argument instead of an option-argument.
      
      **README.rst**:
      
      Fix documentation on how to call mkarchiso with a profile directory.
      
      Fix wording and ordering of option arguments for run_archiso documentation.
      
      Fixes #52
      d90184a7
  22. 21 Aug, 2020 1 commit
    • nl6720's avatar
      archiso/mkarchiso: reduce duplication and add more info messages · e2c5b452
      nl6720 authored
      Fixes to issues introduced in archlinux/archiso!59 :
      - _make_boot_on_fat(): copy initramfs from "${airootfs_dir}/boot/" not "${isofs_dir}/". Otherwise UEFI-only ISOs cannot be built.
      
      Some general fixes:
      - Replace mkdir with install. Unlike mkdir, install does not complain when the target exists.
      - Reduce excess newlines produced by messages.
      - Ensure FAT image gets unmounted in case the script is interrupted.
      - Create the ext4 image with mkfs.ext4 instead of truncate.
      - Do not rely on user and group names for chown commands. Use numeric UID and GID instead.
      - Minimize the times stderr is redirected to /dev/null.
      - Add missing '?' to getopts.
      - Standardize function definitions by removing spaces between the function name and () .
      e2c5b452
  23. 18 Aug, 2020 3 commits
  24. 17 Aug, 2020 3 commits