Commit graph

343 commits

Author SHA1 Message Date
Frantisek Sumsal 43b238f1c1 man: suffix signals with ()
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
2024-01-23 16:27:50 +01:00
Frantisek Sumsal 25cb4c1d53 update-man-rules: skip over standard-conf.xml
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
2024-01-04 15:02:28 +01:00
David Tardon c101b65619 man: make ID valid
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.
2023-12-25 10:40:40 +01:00
Mike Yuan ced3e6bc0e elf2efi: remove outdated comment mentioning linker script
Follow-up for 142f0c61a3
2023-12-10 12:50:14 +00:00
Yu Watanabe 67bc3c1a8c tools/meson-vcs-tag: the third argument is optional
Follow-up for 1a71ac07ad.
2023-12-04 10:29:52 +00:00
Yu Watanabe b3b33fa3aa contrib: include co-authors to the contributor list of NEWS
Closes #30261.
2023-11-30 09:57:49 +00:00
Zbigniew Jędrzejewski-Szmek 94113d5f19 hwdb: rename .html=>.csv
The old suffix is now confusing.
2023-11-15 15:21:26 +01:00
Frantisek Sumsal a3d3bf559c fuzz: don't panic without a C++ compiler
meson's `cpp_args` option is defined only if it detects a C++ compiler,
otherwise we get an error:

../test/fuzz/meson.build:56:28: ERROR: Tried to access unknown option 'cpp_args'.
2023-11-15 12:07:42 +00:00
Frantisek Sumsal 17ee59c9c9 fuzz: pass -Dc_args=/-Dcpp_args= to fuzzer targets
Prompted by #29972, because right now it's practically impossible to pass
-fno-sanitize=function to the fuzzer targets without some extensive
sed'ing.

This splits both c_args and cpp_args to separate arguments for
tools/meson-build.sh, because the other way would be to use `eval`, so
the space-separated but quoted strings passed to these options are not
split where they shouldn't, and I'd rather avoid using `eval` if
possible.

Also, this switches the positional arguments we pass to `meson setup`,
as they were in incorrect order (docs say it should be buildir followed
by sourcedir); meson is apparently clever enough to figure this out and
switch the arguments around if necessary, so it didn't complain.
2023-11-10 17:22:08 +00:00
Luca Boccassi 4561c679bc tools: syscall tables moved to a subdirectory 2023-11-01 14:07:54 +00:00
Luca Boccassi 73b2d48558 Update hwdb autosuspend rules 2023-11-01 14:07:54 +00:00
Zbigniew Jędrzejewski-Szmek 725e646854 meson: generate proper version tag when git fails on permission errors
When building with mkosi I would get the following:

    [1/477] Generating version.h with a custom command
    fatal: detected dubious ownership in repository at '/work/src'
    To add an exception for this directory, call:

            git config --global --add safe.directory /work/src

and then the tag would be generated as 'v254-'. This is obviously some problem
with the setup, but we should handle this gracefully. Let's fall back to 'v254'
instead.

In the case where we have a repo but no tags, use --dirty=^ too, as in the case
with tags.

I tested four cases:
- normal checkout
- checkout with .git removed
- checkout with .git chowned to root
- checkout wiht all tags removed
2023-10-19 17:52:44 +02:00
Abderrahim Kitouni e8868e8354 doc-sync: add support for uploading the documentation for main
It will refuse running on any other branch than main or stable branches.

Also update the release instructions to run it on the stable branch.
2023-10-10 17:50:04 +01:00
Abderrahim Kitouni 00fc4a3945 doc-sync: automatically detect whether we're updating the latest version
also update the release instructions to push release candidates to -stable
2023-10-09 18:37:41 +01:00
Abderrahim Kitouni 75481bebc1 doc-sync: add man/ to the passed directory
This mirrors the behaviour before multiple version support
2023-10-09 18:03:57 +01:00
Abderrahim Kitouni 3c1f396f69 man: support multiple versions of the documentation on the website
This changes the doc-sync meson target from a simple rsync command to a
script that:

* puts the documentation in a subdirectory according to the version
* injects a bit of javascript to add a drop-down to switch between versions
* updates an index.json file with the newly uploaded version
* keeps the latest/ directory up to date with the latest version
* supports a --no-latest switch to be used when uploading older versions
2023-10-09 11:16:20 +01:00
Abderrahim Kitouni 3691e7fce7 man: add checks for missing version information
This adds a new script tools/check-version-history.py and a corresponding
test when building in developer mode. It checks manpages (except dbus
documentation which is handled by update-dbus-docs) for missing version
history information.

It also adds ignore lists based on version 183 (the version that our version
annotations go back to). These can be augmented if we want to ignore other
elements if it doesn't make sense for them to have version annotations.
2023-10-01 11:54:29 +01:00
Jan Janssen 823bf39a49 elf2efi: Add GNU_RELRO support 2023-09-29 17:05:11 +02:00
Jan Janssen 898e9edc46 elf2efi: Add --copy-sections option
This makes the special PE sections available again in our output EFI
images.

Since the compiler provides no way to mark a section as not allocated,
we use GNU assembler syntax to emit the sections instead. This ensures
the section data isn't emitted twice as load segments will only contain
allocating input sections.
2023-09-29 16:56:30 +02:00
Jan Janssen 7d6fd7f099 elf2efi: Add next_section_address helper 2023-09-29 16:56:30 +02:00
Jan Janssen 5713c50d84 elf2efi: Check ELF image base if possible 2023-09-29 16:56:30 +02:00
Jan Janssen 142f0c61a3 elf2efi: Rework ELF section conversion
The main reason we need to apply a whole lot of logic to the section
conversion logic is because PE sections have to be aligned to the page
size (although, currently not even EDK2 enforces this). The process of
achieving this with a linker script is fraught with errors, they are a
pain to set up correctly and suck in general. They are also not
supported by mold, which requires us to forcibly use bfd, which also
means that linker feature detection is easily at odds as meson has a
differnt idea of what linker is in use.

Instead of forcing a manual ELF segment layout with a linker script we
just let the linker do its thing. We then simply copy/concatenate the
sections while observing proper page boundaries.
Note that we could just copy the ELF load *segments* directly and
achieve the same result. Doing this manually allows us to strip sections
we don't need at runtime like the dynamic linking information (the
elf2efi conversion is effectively the dynamic loader).

Important sections like .sbat that we emit directly from code will
currently *not* be exposed as individual PE sections as they are
contained within the ELF segments. A future commit will fix this.
2023-09-29 16:56:30 +02:00
Abderrahim Kitouni ad4934904a update-dbus-docs: Test that items are documented in the History section
This also adds an ignore list, which currently contains the whole API as of
version 250, since that's the base we used for dbus interfaces.

See d9d2d16aea
2023-09-26 19:11:53 +01:00
Mike Yuan 1365355d14 elf2efi: fix a typo 2023-09-21 19:16:11 +02:00
Abderrahim Kitouni d0c0c1069b update-dbus-docs: don't consider mentions in the History
Being mentioned in the History section as added in a specific version isn't
enough to consider a member documented.
2023-09-19 14:33:34 +01:00
Zbigniew Jędrzejewski-Szmek 1a71ac07ad meson: restore tools/meson-vcs-tag.sh
This conceptually reverts e95acdfe1d,
but the actual contents of the script are taken from the command invocation
in meson with all the updates that happened in the meantime.

One small change is that I replaced () by {}: this avoids one subprocess spawn.
People were worried about the cost of vcs_tag(), and this microoptimization may
help a bit. I measured the speed on machine, and noop rebuilds are still about
100–120 ms.

The logic is entirely moved to the script. This makes the meson config simpler
and also makes it easier to use it externally.

The script is needed for in-place rpm builds, see README.build-in-place.md [1],
where it is invoked from the spec file to determine the project version.

[1] https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/README.build-in-place.md
2023-09-18 14:37:09 +02:00
Jan Janssen 7f9a0d6d74 meson: Drop skip-deps option
Now that we use meson feature options for our dependencies, we can just
rely on '--auto-features=disabled' to do the same. One benefit of this
is that specific features can still be force-enabled by overriding it
with the appropriate '-Dfeature=enabled' flag.

The two remaining uses for skip-deps can simply rely on their default
logic that sets the value to 'no' when the dependency is disabled.
2023-08-23 14:57:49 +02:00
Luca Boccassi 2f72e94984 hwdb: update autosuspend rules
ninja -C build update-hwdb-autosuspend
2023-08-16 13:01:07 +02:00
Brian Norris bd2f6a568d tools: update-hwdb-autosuspend.sh: Point at HEAD, not master branch
Many Chromium projects have moved from 'master' to 'main', where
'master' is no longer updated. Point at HEAD instead, which should
always represent the default branch.

I don't actually rerun/regenerate the database, since I don't really run
systemd environments to test that update on.
2023-08-16 02:07:00 +01:00
Frantisek Sumsal 79f902eb09 Add .pylintrc to globally suppress warnings we don't really care about
Also, drop the respective disable directives from existing files.
2023-08-10 18:13:29 +02:00
Frantisek Sumsal 2d49429e58 tools: pylint meson-render-jinja2.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal d853b9be98 tools: pylint analyze-dump-sort.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal fecdbd7227 tools: pylint dump-auxv.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal de9eca7e86 tools: pylint gdb-sd_dump_hashmaps.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 8708cd47b2 tools: pylint list-discoverable-partitions.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 54a9070ce5 tools: pylint xml_helper.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 234909f9d6 tools: pylint update-man-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 019e726958 tools: pylint update-dbus-docs.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal c6041b8bf8 tools: pylint make-man-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 947727681b tools: pylint make-directive-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 564602400f tools: pylint make-autosuspend-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 782051f3cb tools: pylint generate-gperfs.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 8b1932cf2d tools: pylint dbus_exporter.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal f56accb6ef tools: pylint check-includes.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal b4048aaa1e tools: pylint catalog-report.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal e7ecc24eda tools: pylint analyze-dump-sort.py 2023-08-10 11:08:17 +02:00
Yu Watanabe 9289e093ae meson: use install_emptydir() and drop meson-make-symlink.sh
The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'.
Let's replace it with install_emptydir() builtin function and
inline meson call.
2023-08-08 22:11:34 +01:00
Luca Boccassi fcd71b62be
Merge pull request #28595 from medhefgo/elf2efi-fixes
elf2efi: Fixes
2023-07-31 00:07:28 +01:00
Jan Janssen ee91e06a58 elf2efi: Fix header size calculation
The PE header size calculation failed to take the PE magic and coff
header size into account, which will lead to header truncation if we are
writing only 5 sections.
2023-07-30 21:31:38 +02:00
Yu Watanabe e95acdfe1d meson: drop short script to generate vcs tag 2023-07-30 04:54:03 +09:00