* define ".tarball-version" as the default if not specified by $1
* try read the version string from NEWS file as a fallback if the
git-repository or .tarball-version is not available
Fixes: https://github.com/karelzak/util-linux/issues/1381
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'reorder' of https://github.com/pali/util-linux:
fdisk: move reorder diag messages to fdisk_reorder_partitions()
fdisk: do not print error message when partition reordering is not needed
* 'verity_corruption' of https://github.com/bluca/util-linux:
verity: fix verity.roothashsig only working as last parameter
verity: add support for corruption action flag
build-sys: display cryptsetup status after ./configure
The function fdisk_reorder_partitions() is also used in sfdisk and cfdisk
and these commands assume info/warn messages from the library. So move all
messages from fdisk to fdisk_reorder_partitions().
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Parsing of verity.roothashsig did not take into consideration that other options
might follow, and used the whole string as a file path. But mnt_optstr_get_option
just returns a pointer in the mount option string, it doesn't extract it, so it
would have other subsequent options too. The length parameter has to be used.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Add verity.oncorruption= to let users override the default kernel
behaviour, using libcrypsetup's relevant flags.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Option 'f' currently prints following RED error message:
Nothing to do. Ordering is correct already.
Failed to fix partitions order.
This change removes RED error message when ordering is already correct.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
FAT32 can be formatted with boot sign 0x28 to indicate that only serial id
is present or with boot sign 0x29 which indicates that both boot label and
serial id is present.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Older FAT16 variants do not have to contain boot label or serial id. Boot
sign 0x28 indicates that only serial id is present and boot sign 0x29
indicates that both boot label and serial id is present. Other boot sign
values (e.g. zero) indicates older FAT16 variant without boot label and
boot sign.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
dlopen is treated as a dependency, but that's not quite right, it
should be an alternative way to link to libcryptsetup.
Search for it only if cryptsetup is not disabled, and if the cryptsetup-dlopen
is explicitly set to enabled. If it is, do not link to libcryptsetup.
Add cryptsetup support status to the meson summary.
It should set HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY, rather than HAVE_CRYPTSETUP
which enables the verity features, as it needs to detect the availability of
the crypt_activate_by_signed_key API
This test tries to add asan to LD_PRELOAD because the just-built eject
will call the host /bin/umount, and apparently asan doesn't like this.
However, if ldd isn't present, this fails as the path to asan is the
error message saying that ldd isn't present.
As the asan workaround is only needed when executing the binaries that
have just been built and not the system binaries, only use it if the
test is on the built binaries.
Closes#1373.
Signed-off-by: Ross Burton <ross.burton@arm.com>
This feature is already supported for -a and -A. Let's support it also
when FS specified on command line.
Addresses: https://github.com/systemd/mkosi/pull/721
Signed-off-by: Karel Zak <kzak@redhat.com>
These strings come from HW and udev does not modify it. It seems good
idea to clean up it before we print it.
Fixes: https://github.com/karelzak/util-linux/issues/1368
Signed-off-by: Karel Zak <kzak@redhat.com>
As with ul/basic, this test produces different output when ran under
different terminals, which isn't very useful.
Set TS_KNOWN_FAIL so that these problems don't cause the test to fail.
Signed-off-by: Ross Burton <ross.burton@arm.com>
* 'kill' of https://github.com/rossburton/util-linux:
tests: check correct log file for errors in blkdiscard test
tests: don't hardcode /bin/kill in the kill tests
"When you discover you're riding a dead horse, the best strategy is to dismount."
EVMS is dead since 2006, LVM is the winner.
Signed-off-by: Karel Zak <kzak@redhat.com>
The file "/sys/firmware/dmi/tables/DMI" always exists.
The dmi_decode_cputype() can provide more information then arm_smbios_decode().
So remove it to tidy the code.
Before this patch, we can get the output from Centos 7.9 who has
"/sys/firmware/dmi/entries/4-0/raw" and "/sys/firmware/dmi/tables/DMI":
----------------------------------------------------
BIOS Vendor ID: Ampere(TM)
Model name: Neoverse-N1
BIOS Model name: Ampere(TM) Altra(TM) Processor
----------------------------------------------------
After this patch which uses "/sys/firmware/dmi/tables/DMI", in Centos 7.9, we get:
----------------------------------------------------
BIOS Vendor ID: Ampere(TM)
Model name: Neoverse-N1
BIOS Model name: Ampere(TM) Altra(TM) Processor Q00-00 CPU @ 2.8GHz
BIOS CPU family: 257
----------------------------------------------------
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
When checking if the discard ioctl is supported, look in stderr not stdout as
that is where the error appears.
Signed-off-by: Ross Burton <ross.burton@arm.com>
If the 'kill' test is executed with --use-system-commands, it calls
/bin/kill to avoid the shell's own kill command being invoked.
However, this doesn't work if the kill we want to test isn't in fact in
/bin. Instead, use $(which kill) to find a kill on the PATH and call
that directly.
Signed-off-by: Ross Burton <ross.burton@arm.com>
The command allows executing arbitrary shell commands while viewing a file by
entering '!' followed by the command. Entering a command that contains a '%',
'!', or '\' causes a segmentation violation.
The same more(1) function has a problem when not file is specified (cat
/etc/passwd | more) on command line.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1975153
Signed-off-by: Karel Zak <kzak@redhat.com>