Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
AgeCommit message (Collapse)Author
2020-09-27archiso/mkarchiso: do not hardcode the kernel and initramfs file namesnl6720
All kernels and initramfs images from airootfs are copied to ${install_dir}/boot/ on both ISO 9660 and FAT. This allows providing multiple kernels. The kernel package needs to be added to packages.x86_64 and the boot loader configuration files created/adjusted appropriately. Support all possible microcode initrd file names.
2020-09-27Use the same file paths in both ISO 9660 and FATnl6720
This allows to use only one systemd-boot configuration file per kernel. Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/44 .
2020-09-27Do not rename the initramfs imagenl6720
This is a breaking change. archweb, archiso-manager and various documentation must be updated. * https://github.com/archlinux/archweb/blob/master/templates/releng/archlinux.ipxe * https://github.com/pierres/archiso-manager/blob/master/Makefile
2020-09-05Do not overwrite existing files when copying from /etc/skel/nl6720
Copy /etc/skel/ only for users with UID in range 1000–60000. Correct user home directory permission after copying files. Fixes all /etc/skel issues from https://bugs.archlinux.org/task/67729 .
2020-09-02Create directories and copy files to the FAT image using mtools instead of ↵nl6720
mounting the file system - mtools supports SOURCE_DATE_EPOCH. - The image file is operated on directly instead of mounting the file system. This is a prerequisite to limit the commands that run with root privileges. Related to https://gitlab.archlinux.org/archlinux/archiso/-/issues/40 . - Add a reminder comment to not get rid of the dosfstools dependency, since a mformat made FAT image can fail to boot on some systems.
2020-08-25Add missing declaration of override_install_dirDavid Runge
**archiso/mkarchiso**: In d90184a 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
2020-08-25Pass profile directory as parameter to mkarchisoDavid Runge
**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
2020-08-21archiso/mkarchiso: reduce duplication and add more info messagesnl6720
Fixes to issues introduced in https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/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 () .
2020-08-18archiso/mkarchiso: correct the path of airootfs/etc/machine-idnl6720
Use "${airootfs_dir}". Fixes a mistake introduced when rebasing https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/64 .
2020-08-18Add Joliet file system to the ISOnl6720
Joliet ensures correct file names capitalization on operating systems that support Joliet but not support Rock Ridge. Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/45 .
2020-08-18archiso/mkarchiso: create an empty /etc/machine-idnl6720
Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/42 .
2020-08-17Deprecate build.sh scripts and old mkarchiso commandsnl6720
Replace build.sh scripts with calls to mkarchiso -B "profiledir" build_profile. Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/37 .
2020-08-17archiso/mkarchiso: delete all files in /boot not just the kernel and initramfsnl6720
There is nothing useful in /boot for the live system.
2020-08-17archiso/mkarchiso: allow choosing boot modes from profiledef.shnl6720
Boot mode names are: - bios_syslinux.mbr: SYSLINUX in MBR - bios.syslinux.eltorito: SYSLINUX (ISOLINUX) via El Torito - uefi-x64.systemd-boot.esp: systemd-boot on ESP in MBR - uefi-x64.systemd-boot.eltorito: systemd-boot on ESP via El Torito It is not yet possible to create an ISO with only El Torito or only MBR boot modes!
2020-08-17archiso/mkarchiso: copy make_* functions from configs/releng/build.shnl6720
Adapt _make_* functions to mkarchiso. Related to https://gitlab.archlinux.org/archlinux/archiso/-/issues/37 .
2020-08-17archiso/mkarchiso: start preparing a build_profile commandnl6720
Nothing is implemented yet! configs/releng/profiledef.sh: A test profile.
2020-08-17archiso/mkarchiso: general bash improvementsnl6720
Quote all variables. Terminate option processing using '--' for commands that support it. Do not hardcode file descriptor. Compare integers with arithmetic comparison instead of string comparison. Replace echo with printf. Use heredoc for usage text. Don't print INFO messages when quiet is set. Export SOURCE_DATE_EPOCH.
2020-07-30Ensure all files in the ISO's Rock Ridge file system are owned by rootnl6720
archiso/mkarchiso: Add the -rational-rock option to xorriso. This is a preparatory step for creating ISOs as a regular user. See https://gitlab.archlinux.org/archlinux/archiso/-/issues/40 .
2020-07-30Show mksquashfs progress bar when mkarchiso is run in verbose modenl6720
2020-07-29Add license and basic documentationDavid Runge
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
2020-06-30Fixing issues with variable quoting and arraysDavid Runge
archiso/mkarchiso: Calls to _pacman() need to be done with multiple parameters (e.g. array) instead of one string, as string splitting is not done in that function anymore. Turning _iso_efi_boot_args from string into an array to have an easier time of passing it to xorriso. Calling xorriso within the if statements instead of providing -quiet via variable. Fixing command_install() to provide packages separately to _pacman() configs/releng/build.sh: Replacing all newlines when retrieving the packages from packages.x86_64 with spaces so they will be properly provided to "mkarchiso install".
2020-06-29Introducing shellcheck in gitlab CIDavid Runge
archiso/mkarchiso: Quoting all variables. Changing pkg_list to be an array instead of a string for easier handling. Using read to properly populate pkg_list from OPTARG with stripped whitespaces. Not exporting iso_label anymore as there seems to be no reason to do so. Introducing line breaks. .editorconfig: Setting max_line_length to 120. Adding a section for YAML files (e.g. .gitlab-ci.yml). configs/releng/build.sh Quting nearly all variables. Introducing line breaks. configs/baseline/build.sh: Quoting all variables. Introducing line breaks. .gitlab-ci.yml: Adding gitlab CI for shelleck linting of the config build scripts, mkarchiso and startup scripts in releng. Closes #19
2019-09-03add zstd in supported squashfs compression listChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de>
2019-01-09make sure the root filesystem is owned by rootChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de>
2018-07-26generate pkglist with query (not sync) operationChristian Hesse
Using the sync operation with list option fails with --sysroot when signed database files are around. Instead use the query operation, which uses the local databases of installed pakages only. The only downside is that we do no longer record the originating repository. Signed-off-by: Christian Hesse <mail@eworm.de>
2018-06-25[archiso] Drop --config when using --sysrootGerardo Exequiel Pozzi
https://lists.archlinux.org/pipermail/arch-releng/2018-June/003834.html Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-06-24[archiso] Use --sysroot when list installed packages.Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-06-23Ensure correct umask for scriptsGerardo Exequiel Pozzi
Fix for FS#58473 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-06-17Drop the '-d' from pacstrap callsSean Enck via arch-releng
The '-d' in pacstrap is a noop nowadays, keeping it may cause confusion Signed-off-by: Sean Enck <enckse@gmail.com>
2017-10-17use a stronger hashing algorithmChristian Hesse
Nobody wants to use md5 these days... Signed-off-by: Christian Hesse <mail@eworm.de>
2016-03-01Fix non-signed buildsGerardo Exequiel Pozzi
FS#48382
2016-02-28Optionally sign the squashfs files with gpgThomas Bächler
A new option -g <keyid> is added to set the key id. The squashfs files are only signed if this option is set.
2015-09-28[archiso] mkarchiso: Switch to overlayfs by defaultGerardo Exequiel Pozzi
If old behaviour is needed use "... -s sfs prepare". Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-04-21explicitly detach loop device on umountChristian Hesse
I see cases where a stale loop device stays around and fills up my partition as image file is still in use and does not get unlinked. Explicitly detach loop device on umount to fix that. Signed-off-by: Christian Hesse <mail@eworm.de>
2015-01-27[archiso] Add optional OverlayFS supportGerardo Exequiel Pozzi
This is the first attemp to test overlayfs in archiso. The current dm-snapshot mode is keep and is enabled by default, while the new mode is enabled via "-s sfs" to mkarchiso. No new boot parameters are added, since archiso hooks detects if the .sfs file is for dm-snapshot (airootfs.img inside) or for overlayfs. Persistence is supported in overlayfs mode using the same options (cowlabel or cowdevice), but warning while in dm-snapshot mode, only one file is used (airootfs.cow), in overlayfs mode internal files for workdir/ and upperdir/ are allocated, so you can not use VFAT or NTFS. To test this, you need to enable [testing] in pacman.conf from releng profile and edit build.sh then add "-s sfs" in make_prepare() Look at: setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare Replace with: setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -s sfs -D "${install_dir}" prepare The build requires just half of space that the build for dm-snapshot, since there is no ext4 img ;) Just to remember: there is no space gain in .sfs (just about 2M) There is at least one thing during boot with machine-id service: Dec 24 03:31:39 archiso systemd-machine-id-commit[183]: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2014-08-22[archiso] Disable ext4 resize_inode on airootfs.Gerardo Exequiel Pozzi
Remove unused feature, just to save space sizeof ext4 image (empty): 4.3M vs 403K (du airootfs.img) sizeof used space (empty): 48M vs 20K (df) Thanks Christian Hesse for initial tip. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2014-06-28[archiso] Rework checksum functionGerardo Exequiel Pozzi
2014-06-28[archiso] _chroot_init() remove "already runned" logicGerardo Exequiel Pozzi
This is done better with run_once() in build.sh
2014-06-28[archiso] command_install() remove "already executed" logicGerardo Exequiel Pozzi
This is done better with run_once() in build.sh
2014-06-28[archiso] Minor changeGerardo Exequiel Pozzi
2014-06-28[archiso] Remove _is_directory_changed()Gerardo Exequiel Pozzi
This is a task done in some way by run_once() on build.sh
2014-06-28[archiso] Rework _mount_fs() to _mount_airootfs() same for umountGerardo Exequiel Pozzi
Also remove _show_space_usage() irrelevant now when fs size is fixed and big
2014-06-28[archiso] Merge _mkfs() and _mksfs() in _mkairootfs()Gerardo Exequiel Pozzi
2014-06-28[archiso] rename airootfs.fs.sfs to airootfs.sfsGerardo Exequiel Pozzi
* Make it ISO9660 friendly (extra dot "." is replaced by "_") * Was used when support both .fs.sfs and .sfs
2014-06-28[archiso] Drop aitab supportGerardo Exequiel Pozzi
Always create one filesystem of a fixed size (32G), format (ext4) and know name "airootfs". Simplify logic a lot.
2014-06-28[archiso] mkarchiso: Add -c switch to specify squashfs compression type.Gerardo Exequiel Pozzi
2014-06-28[archiso] Always use a 32GiB filesystem size for airootfsGerardo Exequiel Pozzi
There is no big overhead. Space usage in ext4-1G is ~0.4M while in ext4-32G is ~4M. Just use a big value to make all people happy.
2014-06-28[archiso] mkarchiso: Only use ext4 as filesystem for airootfsGerardo Exequiel Pozzi
2014-06-28[archiso] Rename root-image to airootfsGerardo Exequiel Pozzi
Two purposes: * systemd filename friendly: "-" is used for "/" and must be escaped with "\x20" * ISO9660 filename friendly: "-" is replaced with "_"
2013-10-02[archiso] mkarchiso: init cmd: test for file instead of directoryGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>