- 07 Dec, 2022 6 commits
-
-
Morten Linderud authored
* origin/merge-requests/161: CHANGELOG: document mkinitcpio v34
-
nl6720 authored
-
nl6720 authored
Calling them binaries is not correct. They could be called executables, but since we do not enforce the execute (`+x`) permissions on the added files, it would be wrong too. Since they have shebangs, they are scripts, so let's call them that.
-
nl6720 authored
138374f0 added a condition to `add_binary` that if the non-binary file does not have a shebang, the function returns successfully before trying to parse sodeps. Before the change, the function returned in all cases when the file was not a binary. Bring back the previous behaviour of returning early on non-binaries. Fixes 138374f0
-
- 06 Dec, 2022 9 commits
-
-
nl6720 authored
Use `realpath` to resolve the target file and add it as regular file with `add_runscript`. Otherwise, if the hooks are symlinks, the initramfs image could expose the paths used on the host system.
-
nl6720 authored
38a62e22 broke support for adding files via nested symbolic links. Before the change, the first level symlink was pointed to the end target, but after the change it pointed to the second symlink which was not added to the initamfs. Recursively adding each nested symlink is not possible since any directory in the next target's path could itself be a symlink. Parsing it all is not sanely possible. Instead limit relative symlink support to target that are not symlinks and reside in the same directory. Everything else will get pointed to the resolved end target. Fixes https://bugs.archlinux.org/task/76711
-
Morten Linderud authored
* morten/asahi: autodetect: Look up modules in the target kernel version
-
Signed-off-by:
Hector Martin <marcan@marcan.st>
-
nl6720 authored
-
nl6720 authored
Executables that are actually only scripts require the binary that is specified in the shebang to be able run. The `add_binary` function will only warn and not automatically include the required interpreter. This is because with things like `#!/bin/sh`, it may be better to use the `base` hook that provides it instead of pulling in the `bash` binary. Also it is possible that the interpreter is simply added after the binary that requires it. That is why it says "Possibly missing". Fixes #136.
-
Morten Linderud authored
* pr-162: Add .mailmap
-
nl6720 authored
Fix names and email addresses in `git log` / `git shortlog -e`.
-
- 05 Dec, 2022 4 commits
-
-
Morten Linderud authored
* pr-156: kernel-install: support uki generation
-
Morten Linderud authored
* pr-166: mkinitcpio: update the "sane PATH" to remove symlinked directories functions: use the -f/--force option when copying files with add_file
-
nl6720 authored
`compgen -c` from the `fsck` hook will look for files in all directories in PATH. Including those that are just symlinks to already defined ones. This makes it run four times longer than necessary and needlessly overwrite existing files. Use Arch's default path that omits the `/usr/sbin`, `/sbin` and `/bin` symlinks.
-
nl6720 authored
When `mkinitcpio` is executed as a regular user instead of root, sometimes it will fail to overwrite files in the work directory. For example, with a build hook containing: add_binary /usr/bin/dmsetup add_binary /usr/bin/dmsetup The `mkinitcpio` output will contain: cp: cannot create regular file '/tmp/mkinitcpio.XOuS4Z/root/usr/bin/dmsetup': Permission denied Using the `cp` command's `-f`/`--force` option instructs it to remove the file if it cannot be opened. This prevents the issue.
-
- 04 Dec, 2022 5 commits
-
-
Morten Linderud authored
-
Fixes #131. Signed-off-by:
Morten Linderud <morten@linderud.pw>
-
nl6720 authored
If `add_file` encounters a symlink it offloads the file addition to `add_symlink`, and the link target to another `add_file`. The first "file" is never added as a regular file, so do not mention it in the verbose output. It will be mentioned by `add_symlink`.
-
nl6720 authored
By Tobias Powalowski * origin/merge-requests/164: remove needless add_dir. it's called before action is taken See merge request archlinux/mkinitcpio/mkinitcpio!164
-
Tobias Powalowski authored
-
- 03 Dec, 2022 5 commits
-
-
Morten Linderud authored
-
Massimo Zugno authored
Migrated existing test suite to bats test Added kver_x86 test Added hexdump coverage
-
nl6720 authored
By Tobias Powalowski * origin/merge-requests/158: functions: use cp instead of stat+install in add_file when mode is not specified See merge request archlinux/mkinitcpio/mkinitcpio!158
-
`cp` alone is considerably faster than running `stat` (to get the permissions) and copying the file with `install`. This basically replaces calls to two external commands with one. The directory of the target file is created by `add_dir` when using `cp`. When the mode is specified, `install` is used as before.
-
nl6720 authored
Since add_udev_rule is available, there is no need to add the rule file with add_file.
-
- 02 Dec, 2022 3 commits
-
-
Ádám Maróti authored
-
nl6720 authored
cp will fail to copy `/` if the target directory already exists. The produced error is not very helpful: cp: cannot create directory '/run/initramfs/': No such file or directory Instead of copying `/`, copy `/.` to avoid the issue. Fixes #104, Fixes https://bugs.archlinux.org/task/74534
-
nl6720 authored
Revert "functions: try to avoid path traversal issues in add_file & add_binary by resolving the real path" `realpath -s` is not guaranteed to return the **real path** in case the path contains a symlink in it. E.g. `/usr/lib/symlink/../binary`. Best not to work around potential edge cases of which no one has complained about yet. This reverts commit 3ecaccf3.
-
- 30 Nov, 2022 2 commits
-
-
nl6720 authored
By Tcc * origin/merge-requests/153: symlinks in add_file: Use mode from argument, fix link creation Fixes #140 See merge request archlinux/mkinitcpio/mkinitcpio!153
- 27 Nov, 2022 2 commits
-
-
nl6720 authored
Some misconstructed hooks may set these variables globally and in case they are not defined in vconsole.conf (and thus not overwritten), cause errors when the consolefont, keymap or sd-vconsole hooks use the incompatible values. Setting them as local variables prevents this interference. Fixes https://bugs.archlinux.org/task/76654
-
Geert Hendrickx authored
as workaround for FS#76468.
-
- 26 Nov, 2022 1 commit
-
-
T C authored
-
- 23 Nov, 2022 3 commits
-
-
nl6720 authored
functions: remove special handling of relative symbolic links from add_file and simply use add_symlink Now that add_symlink preserves relative symlinks, there is no need for add_file to copy the symlinks. All symbolic link handling is now left to the add_symlink function.
-
nl6720 authored
Use find in place of readlink to return the symlink target just as it is and not the resolved absolute path. This keeps relative symlinks relative.
-
nl6720 authored
By Christian Hesse * origin/merge-requests/145: man: add missing parameter for `add_runscript` man: use same syntax for all hooks See merge request archlinux/mkinitcpio/mkinitcpio!145
-