Commit Graph

130 Commits

Author SHA1 Message Date
Johannes Frohnmeyer 97183630e6
chmod 2023-09-30 23:31:14 +02:00
Johannes Frohnmeyer 715b8d30fc
Additional tweaks 2023-09-30 22:45:57 +02:00
David Runge fe0dda99c4 Remove build.sh support from profiles and mkarchiso
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
2020-10-29 12:32:48 +01:00
David Runge 914c43f5d4 Pass profile directory as parameter to mkarchiso
**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-25 19:06:43 +02:00
nl6720 ed20402254 Deprecate build.sh scripts and old mkarchiso commands
Replace build.sh scripts with calls to mkarchiso -B "profiledir" build_profile.

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/37 .
2020-08-17 21:33:20 +03:00
nl6720 2be645d75f releng: copy UEFI shell from airootfs instead of the host system
Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/35 .
2020-07-30 18:31:25 +03:00
nl6720 1f141610c2 Install mkinitcpio-archiso-hooks in airootfs instead of copying the hooks from host 2020-07-30 12:55:12 +03:00
nl6720 aabf517cb1 Build initramfs images only once
Place custom mkinitcpio.conf in airootfs.
Use a custom mkinitcpio preset to specify generated image file path.
2020-07-29 18:19:42 +03:00
David Runge b18881f511 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
2020-07-29 14:27:48 +02:00
David Runge 6fd2b1b897 Copy files more generically
configs/*:
Copy all files that do not need a rename generically (not specifying a destination file name).
Do not rename vmlinuz-linux to vmlinuz or vmlinuz.efi (as this serves no purpose and makes the scripts more
complicated).
Do not rename microcode (i.e. {amd,intel}-ucode.img) when copying them and change all boot loader configuration files
that assume a renamed microcode image.
Add note and link to Arch Linux wiki to state why memtest.bin is renamed to memtest.
Copy license files for {amd,intel}-ucode and memtest more generically by placing them into subdirectories with the same
name as the package (to circumenvent overwriting one other).

Closes #33
2020-07-28 12:13:45 +02:00
nl6720 66cfb270d6 Copy /etc/skel/ to user's home from build.sh instead of customize_airootfs.sh
Additionally copy the files to all custom user homes, not just root's.
2020-07-28 11:56:59 +03:00
nl6720 3acf024b72 Set up custom user home directories and their permissions 2020-07-28 11:56:59 +03:00
nl6720 3a6a486904 Deprecate customize_airootfs.sh
Show a deprecation notice if airootfs/root/customize_airootfs.sh is found.
2020-07-28 11:56:58 +03:00
nl6720 bec99e2919 Install all packages in one go and don't copy pacman.conf to airootfs
configs/{baseline,releng}/build.sh:
Copy custom files to airootfs before installing packages.
Instead of calling `mkarchiso init`, list all required packages in packages.x86_64 and install them all at once with `mkarchiso install`. The mkdir command which `mkarchiso init` performs is now done by make_custom_airootfs.

configs/releng/build.sh:
Don't copy configs/releng/pacman.conf to airootfs, it is only meant to provide a unmodified pacman.conf durring pacstrap. In airootfs, an unmodified /etc/pacman.conf will be installed with the pacman package.
2020-07-28 11:50:25 +03:00
nl6720 796ac31655 Set root user's shell and password with custom /etc/passwd and /etc/shadow
Correct shadow file permissions from build.sh.
2020-07-20 13:39:41 +03:00
Justin Kromlinger bc7d39ccdf Fix unexpected script_path behaviour
When one calls the `build.sh` scripts with bash instead of the shebang
`$script_path` contains the filepath, not the parent dir:

```
% cd /path
% grep -A2 script_path= build.sh
script_path=$(readlink -f "${0%/*}")
echo "$script_path"
exit 0
% ./build.sh
/path
% bash build.sh
/path/build.sh
```

This commit fixes that:

```
% grep -A2 script_path= build.sh
script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && pwd )"
echo "$script_path"
exit 0
% ./build.sh
/path
% bash build.sh
/path
```
2020-07-16 22:54:16 +02:00
nl6720 0cdad28f63 Don't hardcode packages in build.sh
Move all required packages to packages.x86_64.
Test file availability before copying them.
2020-07-12 16:28:38 +03:00
nl6720 9906475575 Remove lynx usage in configs/releng/build.sh
/usr/local/bin/Installation_guide:
Add a convenience script which opens the installation guide in lynx.

/etc/motd:
Provide a message with minimal instructions for connecting to internet and inform about the Installation_guide convenience script.
2020-07-11 17:08:44 +03:00
nl6720 dc1c81e446 Use /usr/bin/env in shebangs 2020-07-11 16:31:18 +03:00
nl6720 157333ba89 Keep /root permissions as 750
The filesystem package installs /root as 750 not 700.

Move chmod from customize_airootfs.sh to build.sh.
2020-07-11 16:30:25 +03:00
David Runge e800bd884a Fixing issues with variable quoting and arrays
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-30 19:35:56 +02:00
nl6720 0868000955 Do not download a mirrorlist durring build
Pacman's mirrolist will be updated by reflector.service in the live system.
2020-06-30 18:10:45 +03:00
David Runge fe8e2f0729 Introducing shellcheck in gitlab CI
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
2020-06-29 20:10:23 +02:00
David Runge 5e1e7fc3d7 Fixing ownership in airootfs customization
configs/releng/build.sh:
Fixing wrong ownership of files when copying overlay modifications from
the config's airootfs directory to the working directory in
make_customize_airootfs() by using the cp flag
'--no-preserve=ownership'.

Thanks to Marcos Mello and Francois Dupoux of sysresccd
(https://gitlab.com/fdupoux/sysresccd-src) for making this fix
available.

Closes #11
2020-06-23 22:16:16 +02:00
David Runge 9274ed07b4 Removing custom UEFI shell boot loader configs
configs/releng/build.sh:
Copying the edk2-shell based Shell_Full.efi to the root of the iso/ efi
image as 'shellx64.efi' is automatically picked up by certain hardware
and by systemd-boot.
This makes all custom UEFI shell configuration obsolete.

configs/releng/efiboot/loader/entries/uefi-shell-*.conf:
Removing obsolete custom UEFI shell boot loader configuration.

Closes #14
2020-06-23 20:44:29 +02:00
David Runge 5ec4f97c78 Removing efitools
configs/releng/build.sh:
Removing the efitools based PreLoader.efi and HashTool.efi, as they are
dead weight due to not allowing secure boot (FS#59487).
Future secure boot functionality (most probably based on shim) is being
discussed in FS#53864.

Closes #17
2020-06-23 20:08:57 +02:00
David Runge 9a47bad4a4 Using edk2-shell for UEFI shell
configs/releng/build.sh:
Instead of downloading UDK2018 based edk2 UEFI shell, use the Shell
binaries from the edk2-shell package.
This effectively makes the use of EFI shell v1 obsolete.

configs/releng/efiboot/loader/entries/uefi-shell-v*:
Renaming UEFI shell entries to match the packaged edk2-shell based UEFI
shell binaries.

configs/releng/build.sh:
Renaming the systemd-boot bootloader entries for UEFI shell (normal and
full version) to reflect their file names, which are derived from the
binary names in the edk2-shell package.
Copying the edk2-shell based UEFI shell binaries for normal efiboot and
.iso based "el-torito" efiboot mode.

docs/README.build:
Adding edk2-shell to the requirements in the documentation, as the
package is now used to provide UEFI shell.
2020-05-30 19:30:52 +02:00
Christian Hesse b57425125f update download url for Shell.efi
Signed-off-by: Christian Hesse <mail@eworm.de>
2019-04-26 11:47:15 -03:00
Christian Hesse 91a0f1ec7b update download url for Shell_Full.efi
https://bugzilla.tianocore.org/show_bug.cgi?id=1108
Signed-off-by: Christian Hesse <mail@eworm.de>
2018-12-13 01:08:14 -03:00
Gerardo Exequiel Pozzi 30f9513acb [configs/releng] Update amd-ucode license path
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-08-25 13:45:05 -03:00
Christian Hesse 08c8769c85 use package amd-ucode for amd microcode
The package linux-firmware has a new split package amd-ucode. Do not
build the image manually but use the package.

Signed-off-by: Christian Hesse <mail@eworm.de>
2018-08-24 17:36:48 -03:00
Gerardo Exequiel Pozzi 97bb7eaed8 [configs/releng] Make and use amd_ucode.bin for initrd.
Requested at FS#59694
2018-08-18 23:23:44 -03:00
Eli Schwartz via arch-releng da36009e19 make detection of kernel modules dir more robust
extract `uname -r` from the contents of vmlinuz-linux rather than make
assumptions about the kernel EXTRAVERSION.

This is trivially customizable by changing the chosen kernel image.

Fixes FS#59496

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2018-08-01 00:56:20 -03:00
Gerardo Exequiel Pozzi c656e103af [releng] Copy custom pacman.conf to airootfs 2018-06-28 00:40:13 -03:00
Gerardo Exequiel Pozzi 60fca72e7a [releng] support for -P iso_publisher and -A iso_application in build.sh
Implement FS#54126
2018-06-23 22:38:34 -03:00
Gerardo Exequiel Pozzi 94aecf068b [releng] Cleanup remain dual-arch stuff
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-06-23 16:34:15 -03:00
Gerardo Exequiel Pozzi 8560fcaed4 Ensure correct umask for scripts
Fix for FS#58473

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2018-06-23 16:09:33 -03:00
Gerardo Exequiel Pozzi 60aaf9f4d8 [configs/releng] Oops, rename -dual.iso -> -x86_64.iso
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2017-03-01 23:05:35 -03:00
Gerardo Exequiel Pozzi 86b4dcad9f [configs/releng] Do not build i686
Only avoid build i686. The syslinux config files for i686 are still
present. This implies that a i686 entry will be present but not working.
In another patch, this can be removed if desired.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2017-01-23 14:05:25 -03:00
Gerardo Exequiel Pozzi c062d53133 [configs/releng] Increse efiboot.img again
We reached the upper limit again [#1], increasing sufficiently
to do not touch again in long time.

[#1] 526be1579e

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2016-12-07 19:24:31 -03:00
Gerardo Exequiel Pozzi 2218538653 [configs/releng] Fix efitools path #2
Thanks Daniel Hillenbrand.
2016-05-15 16:04:05 -03:00
Gerardo Exequiel Pozzi 2b0bc5ad25 [configs/releng] Oops, fix efitools path
Thanks Philip Müller.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2016-05-14 23:47:07 -03:00
Gerardo Exequiel Pozzi b575b1d497 [configs/releng] prebootloader -> efitools
Should be fixed FS#49314 first
2016-05-12 22:09:45 -03:00
Christian Hesse 67653d5a29 update to match upstream binary name mkfs.fat
Starting with dosfstools 4.0-1 the mkfs executable is called 'mkfs.fat'.

Signed-off-by: Christian Hesse <mail@eworm.de>
2016-05-12 20:39:12 -03:00
Gerardo Exequiel Pozzi 227f28ebe4 [archiso] Increase EFI image size for El Torito boot method
Current build leaves ~800K free of 31M in the FAT filesystem, adding 9M.

Going beyond 65535 sectors of 512-byte is a bit special,
but works for EFI. Image size is reported a zero in boot catalog,
but xorriso does a good job, and writes right value in hybrid-partition.

Tested booting in qemu in both modes (cd-rom and hybrid) and works fine.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2016-03-01 23:57:47 -03:00
Gerardo Exequiel Pozzi 4500fc3725 Fix non-signed builds
FS#48382
2016-03-01 21:47:44 -03:00
Thomas Bächler 755d9d514f Optionally sign the squashfs files with gpg and add the gpg key to the initramfs
A new option -g <keyid> is added to build.sh set the key id. If it is set, the squashfs files will be signed
by gpg and the gpg key will be added to archiso.img. In order to use this option, a gpg agent must be running.
Since build.sh is executed as root, it may be necessary to set the GNUPGHOME environment variable, for
example

$ su -c "GNUPGHOME=/home/youruser/.gnupg /path/to/build.sh -g yourkeyid"
2016-02-28 17:09:08 -03:00
Gerardo Exequiel Pozzi 8a126e8ab4 [configs/releng] Fix EFI shells URL
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-07-20 13:04:34 -03:00
Gerardo Exequiel Pozzi 4fd57e4b74 [configs/releng] Update EFI Shells URL
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-07-18 15:39:48 -03:00
Gerardo Exequiel Pozzi 48ec602c90 [configs/releng] refind-efi is not used for ISO build, move to packages
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-06-24 22:18:46 -03:00