summaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fetch-distro: use git log --first-parentLuca Boccassi2024-11-131-1/+1
| | | | | | | We now import the upstream tag in the debian repository, so this explodes as it tries to walk all upstream commits. Use --first-parent so that merges only get added via the merge commit.
* man: drop whitespace from final <programlisting> linesZbigniew Jędrzejewski-Szmek2024-11-081-1/+1
| | | | | | In the troff output, this doesn't seem to make any difference. But in the html output, the whitespace is sometimes preserved, creating an additional gap before the following content. Drop it everywhere to avoid this.
* hwdb: import newest autosuspend rules from chromeosLennart Poettering2024-11-011-2/+10
|
* mkosi: add helper script to update mkosi hashZbigniew Jędrzejewski-Szmek2024-09-121-0/+103
| | | | | | | | | | | | | | This is very similar to tools/fetch-distro.py. The idea is that we extend the commit to update the mkosi hash with a git log --pretty=oneline output, so that the reader can know what changes were actually included. The motivation is that I'm always wondering what changed in mkosi when I see a commit updating the hash, and it's nicer to have this information shown directly in the commit. The script does _not_ pull changes from upstream, on the assumption that the person doing the commit always has a fresh checkout and that they tested with that checkout.
* man: add basic documents for org.freedesktop.timesync1Yu Watanabe2024-09-101-0/+13
| | | | Closes #34352.
* doc-sync: strip point release from version before uploadingLuca Boccassi2024-09-101-0/+2
| | | | | We create subdirectories for each major release, but not for point releases so strip the suffix if it is present
* measure: introduce support for a new ".profile" sectionLennart Poettering2024-09-061-0/+1
| | | | | This introduces the concept, and makes sure systemd-measure covers it. See a later commit for details on the new section.
* Merge pull request #33597 from keszybz/fetch-distroLuca Boccassi2024-07-221-5/+41
|\ | | | | Extend the distro fetching script to check the repository out
| * tools/fetch-distro: switch to the target branchZbigniew Jędrzejewski-Szmek2024-07-221-0/+4
| | | | | | | | | | We switch opensuse from "factory" to "devel". I had an old checkout that was using the stale branch.
| * tools/fetch-distro: only fetch the configured branchZbigniew Jędrzejewski-Szmek2024-07-221-4/+5
| | | | | | | | | | We don't need the other branches. This mostly cuts down on the noise in output. But add '-v' to show what we're fetching.
| * tools/update-distro-hash: rename, fetch the repository if appropriateZbigniew Jędrzejewski-Szmek2024-07-221-5/+36
| | | | | | | | | | | | | | | | | | | | | | Let's rename the tool to tools/fetch-distro. It's useful to be able to fetch the distro directly. But when that functionality is added, the old name is confusing. Now --update/-u must be specified to update the commits. --reference-if-able is used to speed up the clone of debian. It saves about 75% of the download.
* | Make vcs-tag do something useful for non-developer mode as wellDaan De Meyer2024-07-221-0/+17
|/ | | | | | | | | | | | When building packages of arbitrary commits of systemd-stable, distributors might want to include a git sha of the exact commit they're on. Let's extend vcs-tag a little to make this possible. If we're on a commit matching a tag, don't generate a git sha at all. If we're not on a commit matching a tag, generate a vcs tag as usually. However, if we're not in developer mode, don't append a '^' if the tree is dirty to accomodate package builds applying various patches to the tree which shouldn't be considered as "dirty" edits.
* mkosi: Introduce build imageDaan De Meyer2024-07-151-2/+3
| | | | | | | | | | | | | We want the exitrd image to be built with the latest systemd as well. As the exitrd image is built as part of mkosi.images, and all subimages are built before the main image, this implies the packages must be built as a subimage in mkosi.images/ as well. So we introduce the build image and move all logic related to building distribution packages there. This also has the nice side effect of slimming down the main image as the build dependencies are not installed into the main image anymore. It also makes sure the packages are built in a "clean" chroot without any of the other packages which we install in the main image available.
* tools/update-distro-hash: Fix pathDaan De Meyer2024-07-101-1/+1
|
* man: drop version info from file hiearchy man pageLennart Poettering2024-07-041-0/+43
| | | | | | | | | | | | | | | | This file doesn't document features of systemd, but is more a of a general description that generalizes/modernizes FHS. As such, the items listed in it weren't "added" in systemd versions, they simply reflect general concepts independent of any specific systemd version. hence let's drop this misleading and confusing version info. Or in other words, the man page currently claims under "/usr/": "Added in version 215." – Which of course is rubbish, the directory existed since time began. This also rebreaks all paragaphs this touches. No content changes.
* Merge pull request #33214 from keszybz/system-clock-epochMike Yuan2024-06-161-3/+3
|\ | | | | Rework the setting and description of system clock to the epoch
| * man: describe setting of the clock by systemd and systemd-timesyncdZbigniew Jędrzejewski-Szmek2024-06-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting of systemd clock is important and deserves an accurate description, see for example: https://discussion.fedoraproject.org/t/f38-to-f39-40-dnf-system-upgrade-can-fail-on-raspberry-pi/92403 https://bugzilla.redhat.com/show_bug.cgi?id=2242759 The meat of the description was in systemd-timesyncd.service(8), but actually it's systemd that sets the clock. In particular, systemd-timesyncd doesn't know anything about /usr/lib/clock-epoch, and since systemd sets the clock to the epoch when initializing, systemd-timesyncd would only get to advance the clock to the epoch under special circumstances. Also, systemd-timesyncd is an optional component, so we can't even rely on its man page being installed in all circumstances. The description needs to be moved to systemd(1). The description is updated to describe the changes that were made in previous commits.
* | tools/update-distro-hash: add a helper script to sync submoduleZbigniew Jędrzejewski-Szmek2024-06-061-0/+89
|/
* mkosi: Replace submodules with our own thingDaan De Meyer2024-05-302-22/+0
| | | | | | | | | | | | | | | | | | | Unfortunately, git submodules break in all sorts of ways: - Various github workflows (dependabot, github pages) try to do a shallow clone of git submodules which does not work at all when the git repository is hosted on pagure (https://pagure.io/pagure/issue/5453, https://github.com/dependabot/dependabot-core/issues/9391). - If the git forge hosting the git repository uses SHA256, then it breaks our usage of it as a submodule as SHA256 repositories cannot be used as submodules in SHA1 repositories (src.opensuse.org moved to SHA256 which broke our usage of opensuse's systemd spec as a submodule). - git submodules completely break usage of git worktrees. - ... Let's avoid all these issues by just doing our own home grown implementation of git submodules. We lose the automatic dependabot updates this way but since dependabot fails to run more often that not with submodules we don't really lose anything.
* meson: Set up git submodule update on post checkout as wellDaan De Meyer2024-05-052-1/+7
|
* Merge pull request #32204 from DaanDeMeyer/post-rewriteLuca Boccassi2024-04-102-5/+18
|\ | | | | git: Add post-rewrite hook that invokes git submodule update
| * git: Add post-rewrite hook that invokes git submodule updateDaan De Meyer2024-04-102-5/+18
| | | | | | | | | | | | | | git rebase does not support a --recurse-submodules switch to automatically check out the submodules at their registered commits during or after a rebase. Instead, let's use the post-rewrite git hook to do this ourselves.
* | tools/check-version-history: skip test if lxml is not installedAntonio Alvarez Feijoo2024-04-101-1/+6
|/ | | | | | | | | | | | | | | | | | | ``` ================================= 1070/1408 ================================== test: systemd:dist / check-version-history start time: 07:55:05 duration: 0.03s result: exit status 1 ... ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-version-history.py", line 6, in <module> import lxml.etree as tree ModuleNotFoundError: No module named 'lxml' ============================================================================== ``` Follow-up for 3691e7fce70149ed19edc5d3003e2d7c936c147a
* git-contrib: use 'git shortlog' commandYu Watanabe2024-04-031-9/+3
| | | | | | | | | | | | | Also, this drops Weblate (again) and dependabot from the contributers list. Moreover, this makes the contributers sorted by git command, rather than sort command. Then, the authors are sorted by their first name, e.g. - before Xiaotian Wu, Yuri Chornoivan, Yu Watanabe, Zbigniew Jędrzejewski-Szmek, - after Xiaotian Wu, Yu Watanabe, Yuri Chornoivan, Zbigniew Jędrzejewski-Szmek, Suggested-by: Matteo Croce <teknoraver@meta.com>
* efi: skip check-alignment-* tests if pefile is not installedAntonio Alvarez Feijoo2024-03-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, when building with ukify disabled, no one else requires pefile, and if it is not installed, those tests fail: ``` ================================== 12/1212 =================================== test: systemd:efi / check-alignment-systemd-bootx64.efi start time: 14:21:54 duration: 0.08s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/systemd-bootx64.efi ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ================================== 13/1212 =================================== test: systemd:efi / check-alignment-linuxx64.efi.stub start time: 14:21:54 duration: 0.08s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/linuxx64.efi.stub ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ================================== 14/1212 =================================== test: systemd:efi / check-alignment-addonx64.efi.stub start time: 14:21:54 duration: 0.07s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/addonx64.efi.stub ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ``` Follow-up for 7ff3b88396f440bff60328b4bff7627a34d45e4a
* Merge pull request #31907 from mrc0mmand/efi-shenanigansZbigniew Jędrzejewski-Szmek2024-03-231-0/+32
|\ | | | | efi: check if all sections of our EFI binaries are properly aligned
| * efi: check if all sections of our EFI binaries are properly alignedFrantisek Sumsal2024-03-221-0/+32
| |
* | Merge pull request #31779 from keszybz/elf2efi-clang-18Zbigniew Jędrzejewski-Szmek2024-03-231-119/+132
|\ \ | |/ |/| Make elf2efi work with clang-18
| * tools/elf2efi: elif→if to make pylint happyZbigniew Jędrzejewski-Szmek2024-03-221-1/+1
| |
| * tools/elf2efi: skip empty .got section and its .relro_paddingZbigniew Jędrzejewski-Szmek2024-03-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves https://github.com/systemd/systemd/issues/31637. lld-18 does the section setup differently than older versions. There is a bunch of ordering chagnes, but it also inserts the following: Sections: Idx Name Size VMA LMA File off Algn ... 9 .got 00000000 00000000000283c0 00000000000283c0 000283c0 2**3 CONTENTS, ALLOC, LOAD, DATA 10 .relro_padding 00000c40 00000000000283c0 00000000000283c0 000283c0 2**0 ALLOC 11 .data 00000024 00000000000293c0 00000000000293c0 000283c0 2**4 CONTENTS, ALLOC, LOAD, DATA ... This causes a problem for us, because we try to map the .got to .rodata, and the subsequent .data to .data, and round down the VMA to the nearest page, which causes the PE sections to overlap. https://github.com/llvm/llvm-project/pull/66042 adds .relro_padding to make sure that the RELRO segment is properly write protected and allocated. For our binaries, the .got section is empty, so we can skip it safely, and the .relro_padding section is not useful once .got has been dropped. We don't expect .got sections, but they are apparently inserted on i386 and aarch64 builds. Emit a warning until we figure out why they are there.
| * tools/elf2efi: rework exception messagesZbigniew Jędrzejewski-Szmek2024-03-141-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RuntimeError is documented as "Unspecified run-time error". It doesn't make much sense for Python. (It originated in Java, where exceptions that can be thrown by a function are declared in the function signature. All code calling such a function must either explicitly catch all possible exception types, or allow them to propagate by listing them in its own exception type list. This is nice in theory, but in practice very annoying. Especially during development, when the list of possible exception types is not finalized, we would end up adding and removing exceptions to functions signatures all the time. Also for code which is designed to call functions recursively, we would soon end up with all functions declaring all possible exception types… To avoid this, people would quite often do fake handling with a block that either prints and ignores an exception, or has just a comment like "fix me later", or even nothing. This often lead to people forgetting to adjust this later on and production code containing such constructs. An escape hatch was opened with RuntimeException and its subclasses, which do not need to be pre-declared. Various memory-related exceptions were added as subclasses of RuntimeException. But later on, people starting using this to not to have to declare all exception types everywhere.) In Python, exceptions do no have to be pre-declared, and for code which just encounters a failure, we should raise a specific exception type. The catch-all class for unexpected input is ValueError. For https://github.com/systemd/systemd/issues/31637: BadSectionError: Section '.data' @0x28000 overlaps previous section @0x28000+0x300=@0x28300 Also, exception strings should not contain trailing periods, because they are often embedded in sentences.
| * tools/elf2efi: split out function to create parserZbigniew Jędrzejewski-Szmek2024-03-141-1/+5
| | | | | | | | main() is supposed to be lean and mean.
| * tools/elf2efi: align columns in tables, unify formattingZbigniew Jędrzejewski-Szmek2024-03-141-98/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tables which represent binary data structures, readability is greatly enhanced if the part which shows field size and type is aligned. This follows the usual style for tables in the rest of the systemd codebase. Also, use the same style for functions: if the function signature is too long to fit in one line, put each parameter on a separate line. Also, for comprehension expressions, if they are split, use the usual Python style. Also, drop format annotations, since the code isn't automatically formatted anymore, and automatic formatting is neither feasible nor a goal for the systemd codebase.
* | docs: Add one more git submodule setting to configureDaan De Meyer2024-03-221-0/+1
| |
* | dbus-exporter: Set explicit mode on output directoryDaan De Meyer2024-03-211-0/+2
| | | | | | | | | | Otherwise the created directory might have the sticky bit or the setgid bit set as these are inherited from the parent directory.
* | meson: Rename add-git-hook.sh to git-setup.sh and configure git in itDaan De Meyer2024-03-151-0/+5
|/ | | | Let's automatically apply the recommended git config with meson.
* meson: Remove version_h dependency from jinja2_cmdlineDaan De Meyer2024-03-061-5/+4
| | | | | | | | version_h includes GIT_VERSION which only makes sense for C files which aren't preprocessed by jinja2 so remove the argument. The end result of this change is that the man pages are not recompiled anymore every time GIT_VERSION changes.
* Merge pull request #31352 from DaanDeMeyer/versioningZbigniew Jędrzejewski-Szmek2024-02-231-42/+0
|\ | | | | Rework meson-vcs-tag.sh
| * meson: Decouple the version tag from the vcs tagDaan De Meyer2024-02-211-42/+0
| | | | | | | | | | | | | | | | | | | | | | Let's split off a new vcs-tag option from version-tag that configures whether the current commit should be appended to the version tag. Doing this saves us from having to fiddle around with generating git versions in packaging specs and instead let's meson do it for us, even if we pass in a custom version tag. With this approach there's no more need for tools/meson-vcs-tag.sh so we remove it.
* | test: verify our own units (where applicable)Frantisek Sumsal2024-02-201-0/+20
|/ | | | | | | | | | | | | | | | | | | | | This is inspired by one of our internal tests that does pretty much the same thing. However, it is slightly more convoluted than I'd like it to be, since I really don't want to duplicate the list of our units in another place, so we need to, somehow, pass the list from the meson file to the test script. I originally envisioned this to be a part of the unit test suite, but this doesn't work for unit files with absolute paths to binaries, as we'd have to install the build first (maybe using a chroot would work?). It doesn't check man pages (since they might not be installed on the test machine) and also skip recursive dependencies (as that would trip over issues in files that are not under our direct control), but it should still cover typos and such. There are currently two units for which the check had to be disabled - syslog.socket, as the corresponding syslog.service might not be installed, and rc-local.service as that's a compat API and the necessary /etc/rc.d/rc.local file may not (and most likely won't be) present.
* meson-vcs-tag: Say version format specificationDaan De Meyer2024-02-141-1/+1
| | | | That's the official name so let's use it.
* meson: Start adding devel and rc suffixes to the project versionDaan De Meyer2024-02-141-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | Let's make sure that versions generated by meson-vcs-tag.sh always sort higher than official and stable releases. We achieve this by immediately updating the meson version in meson.build after a new release. To make sure this version always sorts lower than future rcs, we suffix it with "~devel" which will sort lower than "~rcX". The new release workflow is to update the version in meson.build for each rc and the official release and to also update the version number after a new release to the next development version. The full version is exposed as PROJECT_VERSION_FULL and used where it makes sense over PROJECT_VERSION. We also switch to reading the version from a meson.version file in the repo instead of hardcoding it in meson.build. This makes it easier to access both inside and outside of the project. The meson-vcs-tag.sh script is rewritten to query the version from meson.version instead of passing it in via the command line. This makes it easier to use outside of systemd since users don't have to query the version themselves first.
* tools: fix typoYu Watanabe2024-02-131-1/+1
| | | | Follow-up for 6d55e3a3641b35dd2bb4306711b4db4004bf6817.
* Use tilde for rc tag versioningDaan De Meyer2024-02-131-1/+4
| | | | | | | | | | | | | | | tilde sorts lower in the version comparison spec: https://uapi-group.org/specifications/specs/version_format_specification/ ➜ systemd git:(strip) systemd-analyze compare-versions 249\~rc1 249 249\~rc1 < 249 ➜ systemd git:(strip) systemd-analyze compare-versions 249-rc1 249 249-rc1 > 249 Also update tools/meson-vcs-tag.sh to use carets instead of hyphens for the git part of the version as carets are allowed to be part of a version by pacman while hyphens are not and both sort higher than a version without the git part.
* tmpfiles: split out verbs in helpZbigniew Jędrzejewski-Szmek2024-02-091-3/+3
| | | | | | | | | | One of the three must always be specified, but they buried in a long list of options in the output of --help. Make them more visible to draw the eye. Also, drop "marked" from the description. It's supposed to mean "configured", but it's a strange way to say that, and also it's generally obvious that the program does what its configuration tells it to, and it's not going to remove all files found on the system.
* man: suffix signals with ()Frantisek Sumsal2024-01-232-28/+33
| | | | | | | | | Since signals can take arguments, let's suffix them with () as we already do with functions. To make sure we remain consistent, make the `update-dbus-docs.py` script check & fix any occurrences where this is not the case. Resolves: #31002
* update-man-rules: skip over standard-conf.xmlFrantisek Sumsal2024-01-041-0/+1
| | | | | | | | | | bc6fdcbf5d switched its doctype to refentry, so the script started picking it up and complaining that it's missing required stuff. Since this file is only included from other man pages, let's skip it when putting together a list of valid targets. Resolves: #30715 Follow-up for: bc6fdcbf5d
* man: make ID validDavid Tardon2023-12-251-1/+1
| | | | | | The id attribute is of type ID, defined at https://www.w3.org/TR/1998/REC-xml-19980210#id . It may contain only selected non-alphanumeric characters; '@' is not among them.
* elf2efi: remove outdated comment mentioning linker scriptMike Yuan2023-12-101-1/+0
| | | | Follow-up for 142f0c61a37091e233b80f02375cff1114dab24a
* tools/meson-vcs-tag: the third argument is optionalYu Watanabe2023-12-041-1/+1
| | | | Follow-up for 1a71ac07adafebe7e0074f92d049f72968ca2d47.