summaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* make-autosuspend-rules: restore compatibility with Python3 < 3.6Luca Boccassi2020-06-231-2/+2
| | | | | | | | | | | | | | | | | The f'...' format was introduced in Python 3.6 ( https://www.python.org/dev/peps/pep-0498/ ) and returns an error when systemd is built on a system with an older Python3 version: <...> File /home/bluca/git/systemd/tools/make-autosuspend-rules.py, line 15 print(f'pci:v{vendor:08X}d{device:08X}*') ^ SyntaxError: invalid syntax [2/388] Generating version.h with a custom command. ninja: build stopped: subcommand failed. $ python3 --version Python 3.5.6 Use an older format to keep backward compatibility.
* Merge pull request #16179 from keszybz/auto-suspend-hwdbLennart Poettering2020-06-221-7/+17
|\ | | | | Convert autosuspend rules to hwdb
| * make-autosuspend-rules: remove one instance of "whitelist"Zbigniew Jędrzejewski-Szmek2020-06-221-2/+2
| | | | | | | | | | Let's be clear what we mean exactly. Also see https://lwn.net/Articles/823224/ for general justification.
| * tools: rewrite make-autosuspend-rules.py and add udev rulesZbigniew Jędrzejewski-Szmek2020-06-221-25/+16
| | | | | | | | | | | | | | | | | | | | | | Concatenating strings is not a very efficient approach. And in this case fully unnecessary. We also need some rules to make use of those hwdb entries. PCI needs to be 8 characters, not 4. And we need to use uppercase hexadecimal for both. With udev rules this made no difference, but hwdb match is case sensitive. Fixes #16119.
| * hwdb: generate a hwdb file instead of rules for autosuspendLennart Poettering2020-06-131-1/+20
| |
* | man: drop obsolete HAVE_PYTHON conditionalZbigniew Jędrzejewski-Szmek2020-06-131-1/+1
| | | | | | | | | | | | It stopped making sense when automake support was dropped and python started being required to perform a build. Follow-up for 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8.
* | update-man-rules: properly filter out directives index againZbigniew Jędrzejewski-Szmek2020-06-131-7/+7
|/ | | | | | When directives-template.xml was created in 282230882cd0fc49b5377349f2aee22a1c9dd159, this generator started picking it up. Let's filter it out properly again, and also simply the filter while at it.
* gdb: make output a bit nicerZbigniew Jędrzejewski-Szmek2020-05-301-1/+1
| | | | Now: set, 0x7f19be8f7c20 <string_hash_ops>, False, 1, 1, 4, unit_new, src/core/unit.c:96
* gdb: update accessors for bucket counts and entry sizesZbigniew Jędrzejewski-Szmek2020-05-301-4/+3
| | | | | | Afaict, this code never worked, since even when this code was added in 2ea8c08306c7e33f8217a878cf990fc491c9432c, neither all_entry_sizes nor all_direct_buckets were defined.
* gdb: drop python2 supportZbigniew Jędrzejewski-Szmek2020-05-301-12/+11
|
* tools/gdb: decrese indentation to 4 spacesZbigniew Jędrzejewski-Szmek2020-05-301-69/+69
| | | | This follows PEP 8 and matces other python code in systemd.
* oss-fuzz: turn on the pointer-overflow checkEvgeny Vereshchagin2020-05-211-1/+7
| | | | | | | It's off by default on OSS-Fuzz but it should be safe to turn it on manually: https://github.com/google/oss-fuzz/issues/659#issuecomment-631897889 Just a follow-up to https://github.com/systemd/systemd/pull/15865.
* man: put all pages which mention a specifier in the indexZbigniew Jędrzejewski-Szmek2020-05-071-0/+3
| | | | | | I wasn't 100% convinced that this is the right thing to do, hence the separate commit. But e.g. for paths we index all mentions, so I think it's reasonable to do the same here.
* man: add specifiers section to directives indexZbigniew Jędrzejewski-Szmek2020-05-071-0/+9
| | | | | | The hack with getparent().txt is not very pretty, but the whole thing seems to work well enough. It is useful to figure out whihc specifiers are supported where.
* tools: move directive index template to separate fileZbigniew Jędrzejewski-Szmek2020-05-071-195/+6
| | | | | | | In the beginning, it was rather short, and reasonable to include inline. Now it is long and unwieldy, let's split it out. While at it, let's reindent and wrap using our current standards.
* meson: rename make-man-rules.py to update-man-rules.pyZbigniew Jędrzejewski-Szmek2020-05-071-1/+1
| | | | | | | The name of the helper didn't match the name of the meson target, which was always confusing me. With this change, we consistenly use "update" to re-generate things which we otherwise keep in vc, and "make" for things which are generated during each build.
* meson: drop "meson-" prefix from various helper script filenamesZbigniew Jędrzejewski-Szmek2020-05-076-0/+0
| | | | | | | | | | | In a few cases, the prefix was originally necessary because a different helper script was used for automake, and a different one for meson. But now we use meson exclusively, and the prefix isn't useful. This also synchronizes the target name, file name, and variable name in meson.build. The targets exposed by meson didn't have the prefix, so the user interface is unchanged. (The prefix is retained in the few tools that are used for meson itself, e.g. meosn-vcs-tag.sh, meson-make-symlink.sh, etc.)
* update-dbus-docs: use executables in build/Zbigniew Jędrzejewski-Szmek2020-05-051-33/+21
|
* tree-wide: fix spelling errorsFrantisek Sumsal2020-04-212-2/+2
| | | | | | Based on a report from Fossies.org using Codespell. Followup to #15436
* Merge pull request #15505 from keszybz/man-sd-hwdb-sd-journalLennart Poettering2020-04-211-0/+1
|\ | | | | Document remaining sd-journal and sd-hwdb functions
| * check-api-docs: sd_journal_open_container is deprecatedZbigniew Jędrzejewski-Szmek2020-04-211-0/+1
| |
* | update-dbus-docs: automatically add variablelist for introspected itemsJérémy Rosen2020-04-202-2/+79
| | | | | | | | | | Add a <variablelist/> tag after every programlisting we auto-generate that will be read by make-directive-index to cross-reference all dbus elements.
* | make-directive-index: allow variablelist to specify an element to indexJérémy Rosen2020-04-201-0/+7
| | | | | | | | | | | | This commit looks for a new "extra-ref" attribute in <variablelist> If this attribute is specified, its content will be index as pointing to the current man-page in systemd.directives
* | make-directive-index: allow pages to specify the path to searchJérémy Rosen2020-04-201-1/+2
|/ | | | | | | | So far, make-directive-index would look for ./valistentry/term/varname for elements to add to the directive man page. This commit allows to specify xpath= in the varlist directive to tell the generator what to look for.
* Merge pull request #15396 from keszybz/dbus-api-docsLennart Poettering2020-04-171-0/+250
|\ | | | | D-bus API docs
| * update-dbus-docs: add support for settings printing just one selected interfaceZbigniew Jędrzejewski-Szmek2020-04-161-4/+10
| | | | | | | | | | | | So far the units there were being documented had only one custom interface. But for the pid1 case, something more flexibile is needed. So let's add an annotation in the page what we want to print, and filter in the generator.
| * Add updater for dbus introspection in man pagesZbigniew Jędrzejewski-Szmek2020-04-161-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compares to gdbus output, the values of properties are replaced by ellipses. For arrays and strings, the outer markers are kept. This is obviously also told by the type string, but it seems a bit easier to read this way. For any elements which are undocumented, a comment is inserted in sources. "Undocumented" means that the expected element was not found. This might require some adjustments if I missed some markup types. Invocation is manual: $ tools/update-dbus-docs.py tools/update-dbus-docs.py man/org.freedesktop.login1.xml $ tools/update-dbus-docs.py tools/update-dbus-docs.py man/org.freedesktop.resolve1.xml $ tools/update-dbus-docs.py tools/update-dbus-docs.py man/org.freedesktop.systemd1.xml ... If some object is not found on the bus, the existing output is retained. So the user needs to make sure that the appropriate objects have been instantiated before calling this. We don't change the dbus interface very often, so I think this manual mode is OK as a starting point. Making this fully automatic later would be nice of course.
* | sd-login: get rid of seat_can_multi_session()Zbigniew Jędrzejewski-Szmek2020-04-171-0/+1
| | | | | | | | | | | | | | | | | | Follow-up for fa2cf64a917d31605d40d34e98ce9e2e066064fa. Backwards-compat is retained. A short note is added in docs, in case people see sd_seat_can_multi_session() mentioned somewhere and wonder what happened to it. Also see https://github.com/systemd/systemd/pull/15337#issuecomment-610369404.
* | meson: Exclude more deprecated functions from check-api-docsDaan De Meyer2020-04-111-1/+8
|/
* Merge pull request #14338 from keszybz/functional-test-reworkFrantisek Sumsal2020-03-301-3/+3
|\ | | | | Functional test rework
| * test: move TEST-08-ISSUE-2730 setup to static files and meson scriptsZbigniew Jędrzejewski-Szmek2020-03-281-3/+3
| | | | | | | | | | | | | | | | Unfortunately meson does not install symlinks, but copies the symlink destination instead. So symlinks need to be created by a script. This commit adds both symlinks in test/testsuite-08.units/ and meson scriptlet calls. Strictly speaking, the first is not necessary, since nothing reads stuff directly from the source tree.
* | sd-bus: mark sd_bus_try_close() as deprecatedZbigniew Jędrzejewski-Szmek2020-03-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | codesearch.debian.net shows no uses (except for the definition in systemd and elogind). $ cat > test.c int main() { sd_bus_try_close(NULL); return 0; } $ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd test.c: In function ‘main’: test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations] 4 | sd_bus_try_close(NULL); | ^~~~~~~~~~~~~~~~ In file included from test.c:1: src/systemd/sd-bus.h:180:5: note: declared here 180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */ | ^~~~~~~~~~~~~~~~
* treewide: more portable bash shebangsJörg Thalheim2020-03-054-4/+4
| | | | | | | | | | | | | | | | As in 2a5fcfae024ffc370bb780572279f45a1da3f946 and in 3e67e5c9928f8b1e1c5a63def88d53ed1fed12eb using /usr/bin/env allows bash to be looked up in PATH rather than being hard-coded. As with the previous changes the same arguments apply - distributions have scripts to rewrite shebangs on installation and they know what locations to rely on. - For tests/compilation we should rather rely on the user to have setup there PATH correctly. In particular this makes testing from git easier on NixOS where do not provide /bin/bash to improve compose-ability.
* chromiumos: sync auto suspend rules with chromeos commit e348a229bacc3Mario Limonciello2020-02-071-1/+20
| | | | | | | | | | | | | Enables autosuspend for the following: - Microchip (Composite HID + CDC) - i915 - proc_thermal - xchi_hdc - snd_hda - pcieport - lpc_ich - iosf_mbi_pci - Realtek RTL8822C BT
* test: unpin meson from v0.52.1Frantisek Sumsal2020-01-251-4/+0
| | | | | | | | The compatibility issue in meson v0.53 has been fixed in v0.53.1, which is already available through pip, so let's remove the pin for meson introduced before. Reverts: 514793658c499821383bdc8bbf1d33048c18dd40
* test: pin meson to 0.52.1 for fuzzit/fuzzbuzzFrantisek Sumsal2020-01-081-0/+4
| | | | | | | | Latest meson doesn't work with older python 3.5, which is present on Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until we properly bump all necessary Ubuntu images to 18.04. See: https://github.com/mesonbuild/meson/issues/6427
* man: sort options without "=" in the directives indexZbigniew Jędrzejewski-Szmek2019-11-211-0/+3
| | | | | | | Some options would appear twice in the index, e.g. --collect= and --collect. Some man pages use one form, some the other, and the argument might be mandatory for some commands but not others. Anyway, let's display them as one entry, to reduce the total number of items listed.
* man: fix a few bogus entries in directives indexZbigniew Jędrzejewski-Szmek2019-11-211-1/+1
| | | | | | When wrong element types are used, directives are sometimes placed in the wrong section. Also, strip part of text starting with "'", which is used in a few places and which is displayed improperly in the index.
* man: change noindex="true" to index="false"Zbigniew Jędrzejewski-Szmek2019-11-211-2/+2
| | | | We nowadays prefer positive options over negative.
* meson: add target to update the chromiumos rulesZbigniew Jędrzejewski-Szmek2019-11-152-0/+7
| | | | | | | | There is no change in the file right now, but the download seems to work OK. It's funny that the biggest company in the world cannot provide a download link in plain text.
* coverity: replace python with jqEvgeny Vereshchagin2019-10-301-3/+3
| | | | | | | | Judging by https://travis-ci.org/systemd/systemd/jobs/604425785 (where the script failed with "tools/coverity.sh: line 45: python: command not found") python-unversioned-command is no longer installed by default with python2. Given that it's not the first time python has vanished and it's not clear what exactly should be installed to make sure it's there, let's just use jq instead.
* trivial: rename chromeos to chromiumosTim Teichmann2019-10-073-3/+3
|
* trivial: update tools/chromeos/gen_autosuspend_rules.pyMario Limonciello2019-10-051-1/+3
| | | | Adds CNP PCH xHCI device PCIID to udev rules
* Add missing license file and information for ↵Tim Teichmann2019-10-051-0/+27
| | | | | | tools/chromeos/gen_autosuspend_rules.py (#13729) The license file for the python script that was commited with b61d777abeecd8b6c76035e11899aae210633534 was missing. The license was copied from https://chromium.googlesource.com/chromiumos/platform2/+/master/LICENSE.
* rules: Add automatic suspend udev rulesMario Limonciello2019-10-042-0/+329
| | | | | | | | | | | | | | | | | | | The ChromeOS ecosystem has a large amount of testing, both automated and manual across devices including measurement of power regressions. It's safe to assume that any of these devices will handle USB auto-suspend appropriately. Use the script from ChromeOS https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py to generate udev rules at build time. This script in systemd `tools/chromeos/gen_autosuspend_rules.py` should be kept in sync with the ChromeOS version of the script. Manually added autosuspend devices should be placed in the new template `rules/61-autosuspend-manual.rules` Suggested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
* oss-fuzz.sh: stop downloading the skia seed corpusEvgeny Vereshchagin2019-09-111-1/+0
| | | | | | | | | | | | | | | | | When the fuzz target was integrated, it was added as a stopgap to get fuzz-json up and running. It served its purpose and can safely be removed to prevent tools/oss-fuzz.sh from failing with ``` +wget -O /home/travis/build/systemd/systemd/out/fuzz-json_seed_corpus.zip https://storage.googleapis.com/skia-fuzzer/oss-fuzz/skjson_seed_corpus.zip --2019-09-10 22:40:44-- https://storage.googleapis.com/skia-fuzzer/oss-fuzz/skjson_seed_corpus.zip Resolving storage.googleapis.com (storage.googleapis.com)... 74.125.70.128, 2607:f8b0:4001:c05::80 Connecting to storage.googleapis.com (storage.googleapis.com)|74.125.70.128|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2019-09-10 22:40:44 ERROR 403: Forbidden. ``` Ideally we should put our seed corpus somewhere and download it from there but I haven't got round to it.
* meson: catch programs which ignore argumentsZbigniew Jędrzejewski-Szmek2019-07-221-2/+8
| | | | | Don't try to use <<<. It seems to not work properly with old bash versions or something.
* meson: update hint in man/rules/Zbigniew Jędrzejewski-Szmek2019-07-191-0/+2
|
* Merge pull request #12510 from keszybz/test-directivesYu Watanabe2019-05-211-6/+8
|\ | | | | test: run check-directives.sh as part of the test suite
| * test: run check-directives.sh as part of the test suiteZbigniew Jędrzejewski-Szmek2019-05-201-6/+8
| |