summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: preserve correct mode when generating files via jinja2Christian Brauner2021-11-0820-41/+26
| | | | | | | | | When using "capture : true" in custom_target()s the mode of the source file is not preserved when the generated file is not installed and so needs to be tweaked manually. Switch from output capture to creating the target file and copy the permissions from the input file. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
* test: refactor test-procfs-util for clarity and skip test on perm failureDan Streetman2021-11-081-26/+37
| | | | | | | | | | After commit c3dead53d50e334f2d072a2248256983d6dc9f8c the test can fail if the procfs file(s) aren't writable, because the check for permission failure happens after a call that will never fail, since setting the limit to the existing limit will always pass. This also refactors the function slightly to make the test var names clearer.
* hwdb: remove the tablet pad entry for the UC-Logic 1060NPeter Hutterer2021-11-081-5/+0
| | | | | | | | | | | | | | | | This entry only matches on vid/pid, so the pen event node of the device would also get assigned the ID_INPUT_TABLET_PAD property - making it break with libinput. On top of that, UC-Logic's tablets re-use USB ids, so now we're breaking multiple devices this way. To get this device tagged correctly, use libwacom which has the per-device hwdb entries. Fixes #17953 This reverts commit 0fbe78ac7a4c5689660b1c1e2c956ffa1a2e4ee5
* po: Translated using Weblate (German)Ettore Atalan2021-11-081-49/+31
| | | | | | | | Currently translated at 77.7% (147 of 189 strings) Co-authored-by: Ettore Atalan <atalanttore@googlemail.com> Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/ Translation: systemd/main
* Merge pull request #21237 from bluca/analyze_skipLuca Boccassi2021-11-063-6/+16
|\ | | | | analyze: allow a custom policy to skip a check
| * analyze: allow a custom policy to skip a check with weight=0Luca Boccassi2021-11-053-2/+8
| | | | | | | | | | | | In some cases an offline analysis should ignore some fields, for example a portable service in an image will never list RootImage/RootDirectory, as they are added at runtime, and thus can be skipped.
| * analyze: explain how the weight/range policy fields are usedLuca Boccassi2021-11-051-3/+7
| |
| * analyze: fix typos in test policyLuca Boccassi2021-11-041-2/+2
| |
* | Merge pull request #21171 from DaanDeMeyer/tty-dimensionsLennart Poettering2021-11-0621-10/+183
|\ \ | | | | | | exec: Add TTYRows and TTYColumns properties to set TTY dimensions
| * | exec: Add TTYRows and TTYColumns properties to set TTY dimensionsDaan De Meyer2021-11-0517-6/+171
| | |
| * | getty: Pass tty to use by agetty via stdinDaan De Meyer2021-11-054-4/+12
| | | | | | | | | | | | | | | | | | | | | If the tty arg is set to "-", agetty uses the stdin fd as the tty. Let's pass the tty this way so that we keep an fd open to the tty at all times. If all fd's to a tty are closed, the kernel might reset the tty which we want to avoid.
* | | user-record: show CIFS extra mount options, in output tooLennart Poettering2021-11-061-0/+3
| | | | | | | | | | | | Follow-up for 4c2ee5c7f26fda41d7eb1250c61c85cc869a90de
* | | test: wait until `lvm-activate-$vgroup.service` finishesFrantisek Sumsal2021-11-051-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new lvm autoactivation method runs `vgchange` via `systemd-run --no-block`[0], which means that checking if the unit is in the `active` state is not enough, since the main binary might still be running. Let's fix this by waiting until the unit reaches the `exited` sub state. Follow-up to: * 29f8bef05eb9a4bb7f578b31409ca38ec1b1a069 * e50d743f99fa66c9f55e534c4e109a2cf6323f04 [0] https://sourceware.org/git/?p=lvm2.git;a=blob;f=udev/69-dm-lvm.rules.in;h=39e5b98074010745f78a7a86a05929700c9cd690;hb=67722b312390cdab29c076c912e14bd739c5c0f6#l83 Example: ``` [ 17.102002] systemd-udevd[282]: sdf: '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212'(err) 'Running as unit: lvm-activate-iscsi_> [ 17.102522] systemd-udevd[282]: sdf: Process '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212' succeeded. [ 17.102697] systemd-udevd[282]: sdf: Adding watch on '/dev/sdf' [ 17.104944] systemd[1]: lvm-activate-iscsi_lvm2212.service: Changed dead -> running ... [ 17.105434] systemd[1]: Started /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212. [ 17.105601] systemd[931]: lvm-activate-iscsi_lvm2212.service: Executing: /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212 ... [ 17.420228] testsuite-64.sh[268]: + systemctl -q is-active lvm-activate-iscsi_lvm2212.service [ 17.420228] testsuite-64.sh[268]: + return 0 [ 17.420228] testsuite-64.sh[268]: + test -e /dev/disk/by-path/ip-127.0.0.1:3260-iscsi-iqn.2021-09.com.example:iscsi.lvm.test-lun-4 [ 17.420228] testsuite-64.sh[268]: + udevadm settle [ 17.420228] testsuite-64.sh[268]: + test -e /dev/iscsi_lvm2212/mypart1 ... [ 17.451313] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE [ 17.451475] systemd[1]: testsuite-64.service: Failed with result 'exit-code'. ... [ 17.555759] systemd[1]: Starting End the test... [ 17.556972] sh[941]: + systemctl poweroff --no-block ... [ 17.688923] lvm[931]: 2 logical volume(s) in volume group "iscsi_lvm2212" now active ... [ 17.838484] systemd[1]: lvm-activate-iscsi_lvm2212.service: Child 931 belongs to lvm-activate-iscsi_lvm2212.service. [ 17.838718] systemd[1]: lvm-activate-iscsi_lvm2212.service: Main process exited, code=exited, status=0/SUCCESS (success) ```
* | | coredump: fix filename in journal when not compressedxdavidwu2021-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since 587f2a5e564cf434c2e0a653f52b8f73e86092d8, filename for not-compressed coredump is missing from save_external_coredump, making it write COREDUMP_FILENAME= (empty) in journal, making `coredumpctl` report it missing but it is actually saved. This fixes it.
* | | test: exercise sytemd-integritysetup & generatorTony Asleson2021-11-054-0/+135
| | | | | | | | | | | | | | | Ensures we can open a dm-integrity volume formated with integritysetup.
* | | sd-boot: Add .osrel sectionJan Janssen2021-11-052-4/+11
| | | | | | | | | | | | | | | | | | This allows starting systemd-boot from \EFI\Linux for easier testing and bisection without risking an unbootable system as the user does not need to replace their working loader.
* | | Merge pull request #21252 from poettering/homed-record-dir-env-varLennart Poettering2021-11-055-6/+44
|\ \ \ | | | | | | | | homed: add env var to override dir where we fine stored user records
| * | | docs: document systemd-homed development env varsLennart Poettering2021-11-051-0/+32
| | | |
| * | | homed: add env var to override dir where we fine stored user recordsLennart Poettering2021-11-054-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an env var which we can use to redirect where homed stores and looks for user records kept on the host. This is useful for debugging purposes so that one can easily run another homed instnce that doesn't interfere with the main instance.
* | | | user-record: fix display of access modeLennart Poettering2021-11-051-1/+1
| | | |
* | | | user-record: show fs/luks/gpt UUIDs as proper UUIDsLennart Poettering2021-11-051-3/+3
|/ / / | | | | | | | | | | | | These are not defined by us, but are defined as proper UUIDs by their respective specs, hence show them as such.
* | | test: Add test for flag macrosJan Janssen2021-11-051-0/+70
| | |
* | | Merge pull request #20056 from calestyo/split-up-sysusers.d-systemd.conf.inZbigniew Jędrzejewski-Szmek2021-11-059-31/+72
|\ \ \ | |/ / |/| | sysusers: split up systemd.conf
| * | meson: minor cleanupChristoph Anton Mitterer2021-07-111-2/+0
| | | | | | | | | | | | | | | | | | The file itself is already only included when HAVE_MICROHTTPD is set. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
| * | sysusers: split up systemd.confChristoph Anton Mitterer2021-07-118-29/+72
| | | | | | | | | | | | | | | | | | | | | This makes it easier have the respective users/groups only created when their respective packages are installed. Fixes #20044.
* | | Merge pull request #20138 from keszybz/coding-style-variable-declsLuca Boccassi2021-11-0548-169/+191
|\ \ \ | | | | | | | | A coding style tweak and checking of sd_notify() calls and voidification of pager_open()
| * | | Make pager_open() return voidZbigniew Jędrzejewski-Szmek2021-11-0338-100/+96
| | | |
| * | | manager: fix confusion when to send READY=1Zbigniew Jędrzejewski-Szmek2021-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got the logic reversed in 6d9326595592f98e8126eacb4176acd8c3516d5c. Let's just remove the conditionalization of the status message: if we're sending something, we might just as well always attach READY=1, the extra few bytes don't make much of a difference. FWIW, it seems that this bug didn't cause problems, probably because we'd send READY=1 either from user_manager_send_ready() or from a later call to manager_send_ready().
| * | | tree-wide: drop "f" from sd_notify() calls with a static stringZbigniew Jędrzejewski-Szmek2021-11-033-5/+5
| | | | | | | | | | | | | | | | If we don't need to do any formatting, let's optimize things a bit.
| * | | journald: modernize code to send notificationsZbigniew Jędrzejewski-Szmek2021-11-031-13/+5
| | | | | | | | | | | | | | | | No change except making things a bit less verbose.
| * | | tree-wide: warn when sd_notify fails with READY=1 or FDSTOREREMOVE=1Zbigniew Jędrzejewski-Szmek2021-11-038-46/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most sd_notify() calls are like log_info() — the result is only informative and if they fail, it's best ignore this. But if a call with READY=1 fails, the unit may enter a failed state, so we should warn about this. Similarly for FSTOREREMOVE=1: the manager may be left with a stale fd, at least wasting resources.
| * | | CODING_STYLE: allow joined variable declarations and function callsZbigniew Jędrzejewski-Szmek2021-11-031-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | … but only for a single variable. The guidelines already allowed declaring variables at the point of initialization. But not making a function call to do that. Let's allow that now. The existing style of declaring and initializing seperate is still allowed, and whatever makes most sense should be used.
* | | | meson-render-jinja2: use ast.literal_eval()Zbigniew Jędrzejewski-Szmek2021-11-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Imports are sorted in the usual fashion: stdlib first. literal_eval() parses string/numbers/lists/sets/dicts, and nothing else, while eval will execute any python code. Using literal_eval() is generally more correct, because it avoids the risk of side effects from the parsed expression. In this case, we generate the parsed strings ourselves, so it's very unlikely to have anything unexpected in the expressions. But let's do the correct thing anyway.
* | | | Merge pull request #21225 from medhefgo/boot-cleanupZbigniew Jędrzejewski-Szmek2021-11-0510-89/+96
|\ \ \ \ | | | | | | | | | | Boot cleanup
| * | | | sd-boot: Fix efi_arch checksJan Janssen2021-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | efi_arch is set to whatever meson returns from host_machine.cpu_family() and gnu_efi_arch is then set accordingly. On x86, efi_arch == x86 and gnu_efi_arch == ia32. Surprisingly, compilation worked (without disabling some instruction sets) and nobody ever complained about systemd-bootia32.efi not working.
| * | | | sd-boot: Detect supported compile argsJan Janssen2021-11-041-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the final list of compiler arguments more in line with how meson does things. In particular, --buildtype=plain will not add any optimizations on its own (and would have to be provided through CFLAGS=).
| * | | | sd-boot: Add some link flagsJan Janssen2021-11-042-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These flags are used by gnu-efi. Adding --no-undefined even allows us to drop the no-undefined-symbols.sh test in favor of immediate compile time errors.
| * | | | sd-stub: Fix possible memory leakJan Janssen2021-11-041-8/+4
| | | | |
| * | | | sd-boot: Check for existence of required pe sectionsJan Janssen2021-11-042-17/+30
| | | | |
| * | | | sd-boot: Move optional header verification into verify_peJan Janssen2021-11-041-10/+4
| | | | |
| * | | | sd-boot: Use FLAGS_SETJan Janssen2021-11-044-8/+8
| | | | |
| * | | | sd-boot: Move flags helpers to macro-fundamental.hJan Janssen2021-11-042-7/+7
| | | | |
| * | | | sd-boot: Always compile with -ffreestanding and -fshort-wcharJan Janssen2021-11-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a hosted environment and we should not pretend otherwise if -ffreestanding is not supported. With EFI strings being in UCS2, it is not supported to build without -fshort-wchar as gcc/clang default to a w_char_t size of 4 bytes. This also makes the charset for wide chars explicit on gcc. This way we get a nice error message if anyone ever tries to add 💩 to strings.
| * | | | sd-boot: Save and restore console attributesJan Janssen2021-11-041-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | This also only writes the message on a new line if we aren't at the beginning of one already.
* | | | | basic/mountpoint-util: detect erofs as a read-only FSLuca Boccassi2021-11-051-0/+1
| | | | |
* | | | | loop-util: reopen device node if we shortcut loop device creationLennart Poettering2021-11-051-4/+9
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LoopDevice object supports a shortcut: if the backing fd we are supposed to create a loopback device of refers to a block device alrady then we'll use it as is – if we can – instead of setting up an unnecessary loopback device that would be pretty much the same as its backing device. Previously, when doing this we'd just dup() the original backing fd and use that. But that's problematic in case O_DIRECT was set on the fd, since we'll keep that flag set on our copy too, which means we can't do simple, regular IO on it anymore. Thus, let's reopen the inode in this case with the exact access flags we'd apply if we'd actually allocate and open a new loopback device. Fixes: #21176
* | | | Merge pull request #21229 from keszybz/improve-m-hintLuca Boccassi2021-11-0417-42/+46
|\ \ \ \ | |/ / / |/| | | Improve hint to use -M in various tools
| * | | tree-wide: do not print hint about -M if -M is already usedZbigniew Jędrzejewski-Szmek2021-11-0417-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Or when -H is used, since -H and -M are incompatible.) Note that the slightly unusual form with separate boolean variables (hint_vars, hint_addr) instead of e.g. a const char* variable to hold the message, because this way we don't trigger the warning about non-literal format.
| * | | busctl: do not print hint about -M if -M is already usedZbigniew Jędrzejewski-Szmek2021-11-043-5/+7
| | | | | | | | | | | | | | | | (Or when -H is used, since -H and -M are incompatible.)
| * | | shared/bus-util: make bus_log_*_error() functions functionsZbigniew Jędrzejewski-Szmek2021-11-042-16/+15
| |/ / | | | | | | | | | | | | They were defined as macros, but they are a bit too complicated for this, so it's getting unwieldy. We can make them functions without any loss.