summaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* meson: Respect MESON_INSTALL_QUIETDaan De Meyer2020-12-061-3/+9
| | | | | | MESON_INSTALL_QUIET is set when --quiet is passed to meson install. Make sure we check the variable in our custom install scripts and don't output anything if it is set.
* hwdb: update chromiumos autosuspend rulesZbigniew Jędrzejewski-Szmek2020-11-261-0/+2
|
* tools: drop unnecessary "else" after for loopYu Watanabe2020-11-201-2/+1
|
* git-contrib: exclude -rc tagsLennart Poettering2020-11-101-1/+1
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-0911-11/+11
|
* Partially revert "hwdb: add trailing ":*" everywhere"Zbigniew Jędrzejewski-Szmek2020-11-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c0443b97b71d5f70a0622061f589307bec5502c6. I got various cases wrong: "usb:v04F3p2B7Cd5912dc00dsc00dp00ic03isc00ip00in00" "usb:v0627p0001:QEMU USB Tablet" "input:b0003v0627p0001e0001-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw" OTOH: -evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:* +evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV* is OK. Other parts follow after 'pn'. -mouse:*:name:*Trackball*:* -mouse:*:name:*trackball*:* -mouse:*:name:*TrackBall*:* +mouse:*:name:*Trackball*: +mouse:*:name:*trackball*: +mouse:*:name:*TrackBall*: ... and anything else with :name should be OK too, because our imports always include ":" at the end: IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'" Including '*' at the end makes the pattern work even if we decide to add something to the match string later. Fixes #17499.
* hwdb: add trailing ":*" everywhereZbigniew Jędrzejewski-Szmek2020-10-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change is intended. The general pattern of changes: -usb:v04F3p2B7C* +usb:v04F3p2B7C:* This is mostly a clarification, to make the part that makes the usb vXXXXpYYYY part visually separated. It would only make a difference if we added further keys with a different number of digits, which is unlikely. -usb:v0627p0001:*QEMU USB Keyboard* -usb:v0627p0001:*QEMU USB Mouse* -usb:v0627p0001:*QEMU USB Tablet* +usb:v0627p0001:*QEMU USB Keyboard*:* +usb:v0627p0001:*QEMU USB Mouse*:* +usb:v0627p0001:*QEMU USB Tablet*:* Again, only a clarification. We know that ":" will appear somewhere later in the match key, so anything that matches "…Keyboard*" will also match "…Keyboard*:*". -evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV* +evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:* This makes the match narrower. Previously we would match product "N53SV" and "N53SV2", "N53SV3", and others. Here we are saying that the ':pn' part must match exactly. Most of the changes in this patch match this pattern. I made a few judgement calls and used "pn…*:*" when I wasn't sure if the full pn is included: -evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision* +evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:* -evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*: +evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:* This more like the "QEMU" example above, since all dmi strings end in ":", so anything which matches the old version will also match the new version. -evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr* +evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:* I replaced trailing ":pvr*" by ":*". This makes no functional difference because we expect "pvr" to always appear in the dmi string. This makes patterns shorter. -evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn* +evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:* OTOH, ":pn*" is kept. This is because almost patterns include ":pn*", and if we skip it, we should make it clear that this is on purpose, that we really want to match any product name. The python script to generate autosuspend rules is updated to use ":*" too. Inspired by https://github.com/systemd/systemd/pull/17281#discussion_r501489750.
* hwdb: update chromiumos autosuspend rulesZbigniew Jędrzejewski-Szmek2020-10-151-0/+2
|
* update-dbus-docs: skip test if python is too oldZbigniew Jędrzejewski-Szmek2020-09-201-5/+10
|
* update-dbus-docs: skip test lxml is not availableZbigniew Jędrzejewski-Szmek2020-09-181-7/+16
|
* update-dbus-docs: add hintZbigniew Jędrzejewski-Szmek2020-08-271-1/+2
|
* update-dbus-docs: omit verbose output when in --test modeZbigniew Jędrzejewski-Szmek2020-08-271-5/+5
| | | | It makes the ninja output listing very long for no good purpose.
* update-dbus-docs: add test modeZbigniew Jędrzejewski-Szmek2020-08-271-8/+19
|
* update-dbus-docs: use argparseZbigniew Jędrzejewski-Szmek2020-08-271-11/+12
|
* update-dbus-docs: print statistics at the endZbigniew Jędrzejewski-Szmek2020-08-271-6/+22
| | | | | | | | | | | | | | | | | Right now: org.freedesktop.LogControl1.xml: 3/3 org.freedesktop.home1.xml: 44/44 org.freedesktop.hostname1.xml: 21/21 org.freedesktop.import1.xml: 17/19 org.freedesktop.locale1.xml: 10/10 org.freedesktop.login1.xml: 172/172 org.freedesktop.machine1.xml: 49/65 org.freedesktop.resolve1.xml: 25/61 org.freedesktop.systemd1.xml: 214/1468 org.freedesktop.timedate1.xml: 12/12 total: 567/1875 :(
* meson: add syscall-names-update targetZbigniew Jędrzejewski-Szmek2020-08-191-0/+6
| | | | | The calls to find_program("tools/*") are moved earlier so they can be used in libshared/ (and it doesn't make sense to split them).
* tools/make-man-index: fix purpose text that contains tagsHaochen Tong2020-08-171-1/+2
|
* hwdb/autosuspend: add missing parenthesisZbigniew Jędrzejewski-Szmek2020-07-161-1/+1
|
* git-contrib: simplify implementation a bitZbigniew Jędrzejewski-Szmek2020-07-081-4/+1
|
* 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.