Commit graph

373 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 1b584f38a8 update-dbus-docs: add test mode 2020-08-27 20:22:52 +02:00
Zbigniew Jędrzejewski-Szmek 0f5cea0212 update-dbus-docs: use argparse 2020-08-27 20:22:52 +02:00
Zbigniew Jędrzejewski-Szmek af4c7dc269 update-dbus-docs: print statistics at the end
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

:(
2020-08-27 20:22:40 +02:00
Zbigniew Jędrzejewski-Szmek 47354b440e meson: add syscall-names-update target
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).
2020-08-19 15:30:24 +02:00
Haochen Tong f331733645 tools/make-man-index: fix purpose text that contains tags 2020-08-17 18:32:51 +02:00
Zbigniew Jędrzejewski-Szmek 19b4864346 hwdb/autosuspend: add missing parenthesis 2020-07-16 18:06:35 +02:00
Zbigniew Jędrzejewski-Szmek 9c70fc2164 git-contrib: simplify implementation a bit 2020-07-08 17:31:43 +02:00
Luca Boccassi 87d25bdead make-autosuspend-rules: restore compatibility with Python3 < 3.6
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.
2020-06-23 21:02:15 +02:00
Lennart Poettering c2c193f79a
Merge pull request #16179 from keszybz/auto-suspend-hwdb
Convert autosuspend rules to hwdb
2020-06-22 17:38:42 +02:00
Zbigniew Jędrzejewski-Szmek 7b33ff7388 make-autosuspend-rules: remove one instance of "whitelist"
Let's be clear what we mean exactly. Also see https://lwn.net/Articles/823224/
for general justification.
2020-06-22 14:47:49 +02:00
Zbigniew Jędrzejewski-Szmek 79dc5d35dd tools: rewrite make-autosuspend-rules.py and add udev rules
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.
2020-06-22 14:45:20 +02:00
Lennart Poettering b4564641be hwdb: generate a hwdb file instead of rules for autosuspend 2020-06-13 20:00:23 +02:00
Zbigniew Jędrzejewski-Szmek 4f0ef40deb man: drop obsolete HAVE_PYTHON conditional
It stopped making sense when automake support was dropped and python started
being required to perform a build.
Follow-up for 72cdb3e783.
2020-06-13 17:31:59 +02:00
Zbigniew Jędrzejewski-Szmek a2095c0698 update-man-rules: properly filter out directives index again
When directives-template.xml was created in 282230882c,
this generator started picking it up. Let's filter it out properly again,
and also simply the filter while at it.
2020-06-13 17:31:59 +02:00
Zbigniew Jędrzejewski-Szmek ea806175cd gdb: make output a bit nicer
Now: set, 0x7f19be8f7c20 <string_hash_ops>, False, 1, 1, 4, unit_new, src/core/unit.c:96
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 3aff6c7917 gdb: update accessors for bucket counts and entry sizes
Afaict, this code never worked, since even when this code was added in
2ea8c08306, neither all_entry_sizes nor
all_direct_buckets were defined.
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 31ca609f8a gdb: drop python2 support 2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek c544fc319c tools/gdb: decrese indentation to 4 spaces
This follows PEP 8 and matces other python code in systemd.
2020-05-30 11:24:58 +02:00
Evgeny Vereshchagin 1f034000a5 oss-fuzz: turn on the pointer-overflow check
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.
2020-05-21 08:52:18 +02:00
Zbigniew Jędrzejewski-Szmek 6dbf40256b man: put all pages which mention a specifier in the index
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.
2020-05-07 16:30:10 +02:00
Zbigniew Jędrzejewski-Szmek 0d525a3e93 man: add specifiers section to directives index
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.
2020-05-07 14:59:24 +02:00
Zbigniew Jędrzejewski-Szmek 282230882c tools: move directive index template to separate file
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.
2020-05-07 14:40:10 +02:00
Zbigniew Jędrzejewski-Szmek 06689b8d11 meson: rename make-man-rules.py to update-man-rules.py
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.
2020-05-07 14:01:09 +02:00
Zbigniew Jędrzejewski-Szmek dd1e33c8dc meson: drop "meson-" prefix from various helper script filenames
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.)
2020-05-07 13:57:48 +02:00
Zbigniew Jędrzejewski-Szmek c351d568c3 update-dbus-docs: use executables in build/ 2020-05-05 22:41:23 +02:00
Frantisek Sumsal 86b52a3958 tree-wide: fix spelling errors
Based on a report from Fossies.org using Codespell.

Followup to #15436
2020-04-21 23:21:08 +02:00
Lennart Poettering ede32a7cff
Merge pull request #15505 from keszybz/man-sd-hwdb-sd-journal
Document remaining sd-journal and sd-hwdb functions
2020-04-21 13:37:55 +02:00
Zbigniew Jędrzejewski-Szmek 622018c5b4 check-api-docs: sd_journal_open_container is deprecated 2020-04-21 09:08:14 +02:00
Jérémy Rosen f92c8d1c67 update-dbus-docs: automatically add variablelist for introspected items
Add a <variablelist/> tag after every programlisting we auto-generate that
will be read by make-directive-index to cross-reference all dbus elements.
2020-04-20 21:03:03 +02:00
Jérémy Rosen 8906e26278 make-directive-index: allow variablelist to specify an element to index
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
2020-04-20 18:49:58 +02:00
Jérémy Rosen acbfdec33e make-directive-index: allow pages to specify the path to search
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.
2020-04-20 18:49:58 +02:00
Lennart Poettering 09f8722801
Merge pull request #15396 from keszybz/dbus-api-docs
D-bus API docs
2020-04-17 23:40:50 +02:00
Zbigniew Jędrzejewski-Szmek 8f8cc84ba4 sd-login: get rid of seat_can_multi_session()
Follow-up for fa2cf64a91.
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.
2020-04-17 16:15:30 +02:00
Zbigniew Jędrzejewski-Szmek 08fe1b6cdc update-dbus-docs: add support for settings printing just one selected interface
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.
2020-04-16 19:46:40 +02:00
Zbigniew Jędrzejewski-Szmek e5dd26cc20 Add updater for dbus introspection in man pages
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.
2020-04-16 19:46:40 +02:00
Daan De Meyer eb74579d09 meson: Exclude more deprecated functions from check-api-docs 2020-04-11 21:08:34 +02:00
Frantisek Sumsal 15529f5cea
Merge pull request #14338 from keszybz/functional-test-rework
Functional test rework
2020-03-30 16:25:12 +02:00
Zbigniew Jędrzejewski-Szmek c84752398b test: move TEST-08-ISSUE-2730 setup to static files and meson scripts
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.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek cc3d85eb97 sd-bus: mark sd_bus_try_close() as deprecated
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 */
      |     ^~~~~~~~~~~~~~~~
2020-03-18 19:57:44 +01:00
Jörg Thalheim ff12a7954c treewide: more portable bash shebangs
As in 2a5fcfae02
and in 3e67e5c992
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.
2020-03-05 17:27:07 +01:00
Mario Limonciello 6e55b9b758 chromiumos: sync auto suspend rules with chromeos commit e348a229bacc3
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
2020-02-07 13:22:05 +09:00
Frantisek Sumsal a3e42c468f test: unpin meson from v0.52.1
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: 514793658c
2020-01-25 23:14:35 +03:00
Frantisek Sumsal 514793658c test: pin meson to 0.52.1 for fuzzit/fuzzbuzz
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
2020-01-08 13:56:30 +03:00
Zbigniew Jędrzejewski-Szmek 8c6c56c36f man: sort options without "=" in the directives index
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.
2019-11-21 22:06:30 +01:00
Zbigniew Jędrzejewski-Szmek f8b68539d0 man: fix a few bogus entries in directives index
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.
2019-11-21 22:06:30 +01:00
Zbigniew Jędrzejewski-Szmek b0343f8c96 man: change noindex="true" to index="false"
We nowadays prefer positive options over negative.
2019-11-21 22:03:57 +01:00
Zbigniew Jędrzejewski-Szmek 62d3999518 meson: add target to update the chromiumos rules
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.
2019-11-15 11:36:59 +01:00
Evgeny Vereshchagin 738606e452 coverity: replace python with jq
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.
2019-10-30 09:17:04 +01:00
Tim Teichmann 0490b44031 trivial: rename chromeos to chromiumos 2019-10-07 08:58:13 +09:00
Mario Limonciello f10bb2ce03 trivial: update tools/chromeos/gen_autosuspend_rules.py
Adds CNP PCH xHCI device PCIID to udev rules
2019-10-05 15:52:53 +02:00
Tim Teichmann 13cd6f0b98 Add missing license file and information for tools/chromeos/gen_autosuspend_rules.py (#13729)
The license file for the python script that was commited with b61d777abe was missing. The license was copied from https://chromium.googlesource.com/chromiumos/platform2/+/master/LICENSE.
2019-10-05 15:52:37 +02:00
Mario Limonciello b61d777abe rules: Add automatic suspend udev rules
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>
2019-10-04 08:57:29 +02:00
Evgeny Vereshchagin 2dd9b65778 oss-fuzz.sh: stop downloading the skia seed corpus
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.
2019-09-11 03:24:29 +03:00
Zbigniew Jędrzejewski-Szmek cdfa3f0c76 meson: catch programs which ignore arguments
Don't try to use <<<. It seems to not work properly with old bash
versions or something.
2019-07-22 14:08:37 +02:00
Zbigniew Jędrzejewski-Szmek 34d2f9204c meson: update hint in man/rules/ 2019-07-19 07:09:34 +09:00
Yu Watanabe d7c5b3ec3e
Merge pull request #12510 from keszybz/test-directives
test: run check-directives.sh as part of the test suite
2019-05-21 08:35:10 +09:00
Joe Lin 88e94c3810 meson-vcs-tag: enhance version info generation
When build from release tarball and where there is parent .git dir,
this situtaion will get wrong version info. (build with buildroot)

The systemd running show wrong version in dmesg log:
systemd[1]: systemd 2019.02-1086-gf5f17c4 running in system mode.
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shoule be:
systemd[1]: systemd 241 running in system mode. (-PAM -AUDIT -SEL
            ^^^^^^^^^^^
2019-05-21 07:53:40 +09:00
Zbigniew Jędrzejewski-Szmek c6448ee39e test: run check-directives.sh as part of the test suite 2019-05-20 15:44:31 +02:00
Evgeny Vereshchagin 9c5c4677fa fuzzers: use -fsanitizer=fuzzer if clang supports it
Closes https://github.com/systemd/systemd/issues/10645
2019-05-14 13:42:17 +02:00
Zbigniew Jędrzejewski-Szmek 291539b75e check-directives: use diff to show what the differences really are
This also makes the comparison more detailed, since we check spelling,
including case.
2019-05-08 06:52:58 +05:30
Ben Boeckel 5238e95759 codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
Zbigniew Jędrzejewski-Szmek cc5549ca12 scripts: use 4 space indentation
We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed.
4 sp was the most common, in particular the majority of scripts under test/
used that. Let's standarize on 4 sp, because many commandlines are long and
there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp
also seems to be the default indentation, so this will make it less likely
that people will mess up if they don't load the editor config. (I think people
often use vi, and vi has no support to load project-wide configuration
automatically. We distribute a .vimrc file, but it is not loaded by default,
and even the instructions in it seem to discourage its use for security
reasons.)

Also remove the few vim config lines that were left. We should either have them
on all files, or none.

Also remove some strange stuff like '#!/bin/env bash', yikes.
2019-04-12 08:30:31 +02:00
Paul Menzel 55a37d7117 Update UEFI URLs (#12260)
* Use more secure https://www.uefi.org

http://www.uefi.org directs to https://uefi.org/, so this saves one
redirect.

    $ curl -I http://www.uefi.org
    HTTP/1.1 302 Found
    Server: nginx
    Date: Tue, 09 Apr 2019 14:54:46 GMT
    Content-Type: text/html; charset=iso-8859-1
    Connection: keep-alive
    X-Content-Type-Options: nosniff
    Location: https://uefi.org/
    Cache-Control: max-age=1209600
    Expires: Tue, 23 Apr 2019 14:54:46 GMT

Run the command below to update all occurrences.

    git grep -l http://www.uefi.org | xargs sed -i 's,http://www.uefi.org,https://www.uefi.org,'

* Use https://uefi.org to save redirect

Save one redirect by using the target location.

    $ curl -I https://www.uefi.org
    HTTP/1.1 301 Moved Permanently
    Server: nginx
    Date: Tue, 09 Apr 2019 14:55:42 GMT
    Content-Type: text/html; charset=iso-8859-1
    Connection: keep-alive
    X-Content-Type-Options: nosniff
    Location: https://uefi.org/
    Cache-Control: max-age=1209600
    Expires: Tue, 23 Apr 2019 14:55:42 GMT

Run the command below to update all occurrences.

    git grep -l https://www.uefi.org | xargs sed -i 's,https://www.uefi.org,https://uefi.org,'
2019-04-09 18:37:46 +02:00
Yu Watanabe 051f39c227 tools: check all directives even if it detects non-updated files 2019-02-25 12:41:11 +09:00
Yu Watanabe 810d43a8e8 tools: update check-directives.sh to support fuzz-link-parser 2019-02-25 12:41:11 +09:00
Zbigniew Jędrzejewski-Szmek bc61c2b1c7 man: add a new section for EFI variables
We should probably refer to them from other man pages
for programs which use them, since right now all refs are
in systemd-boot(7). But creating the section is a good step
anyway.
2019-02-13 11:17:41 +01:00
Zbigniew Jędrzejewski-Szmek 37dac218b4 man: add a new directives section for .nspawn
They is quite a bit of those directives and they were in "MISCELLANEOUS" because
they don't quite fit anywhere. When the OCI-compat stuff is merged, there'll
be even more, so let's make a separate section for them.
2019-02-13 11:17:41 +01:00
Zbigniew Jędrzejewski-Szmek d2acdcc646 man: move all config file options to one section
We had "SYSTEM MANAGER DIRECTIVES" which was a misnomer already, because
it also listed user manager stuff. Let's make this a more general section
and move the items for other services there too (from "MISCELANENOUS").
2019-02-13 11:17:41 +01:00
Zbigniew Jędrzejewski-Szmek 833fc9802c man: move os-release, machine-info, vconsole.conf vars to envvar section
Strictly speaking, those are not environment variables, but they are compatible
and people think about them like this. Moving them makes them easier to find.
2019-02-13 11:17:41 +01:00
Jörg Thalheim 990bb60a6f tools/choose-default-locale.sh: set shebang to /bin/sh
The script does not use any bash features.
On NixOS we have /bin/sh and /usr/bin/env for posix compatibility
but not /bin/bash as it is stored in our nix store.
With this change one can run the `meson configure` without patching
which greatly helps, when working on upstream contributions.
2019-01-17 18:06:16 +01:00
Zbigniew Jędrzejewski-Szmek d27d60b3bc
Merge pull request #11317 from filbranden/docs1
Improvements to systemd.io generation
2019-01-03 18:38:57 +01:00
Yu Watanabe a92f2af28a
Merge pull request #11230 from keszybz/version-string-alt
Generate version string from git describe (alternative approach)
2019-01-03 21:33:55 +09:00
Filipe Brandenburger 357211a426 docs: generate index.md in Jekyll
This uses a {% for %} loop in Jekyll to render the page, from the "title"
information in the Front Matter of the actual page files.

This also makes `make-index-md` build rule unnecessary, since generation is
done by the template engine itself.

Tested this by running Jekyll locally.
2019-01-02 14:23:18 -08:00
Yu Watanabe 03475e2232 meson: check whether C.UTF-8 exists or not and use it if exists
If C.UTF-8 does not exist, then fallback to en_US.UTF-8 or C.
2019-01-02 03:41:36 +09:00
Zbigniew Jędrzejewski-Szmek dcb905b61b meson: use /bin/bash for script
It seems -o pipefail does not work on Ubunut. /bin/sh is most likely resolved
to dash.
2018-12-21 13:43:20 +01:00
Zbigniew Jędrzejewski-Szmek e1ca734edd meson: allow setting the version string during configuration
This will be useful when building distro packages, because we can set the
version string to the rpm/dpkg/whatever version string, and getter reports
from end users.
2018-12-21 13:43:20 +01:00
Zbigniew Jędrzejewski-Szmek e4d5753bd0 meson-vcs-tag: add work-around for git bug 2018-12-21 13:43:20 +01:00
Zbigniew Jędrzejewski-Szmek 681bd2c524 meson: generate version tag from git
$ build/systemctl --version
systemd 239-3555-g6178cbb5b5
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid
$ git tag v240 -m 'v240'
$ ninja -C build
ninja: Entering directory `build'
[76/76] Linking target fuzz-unit-file.
$ build/systemctl --version
systemd 240
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid

This is very useful during development, because a precise version string is
embedded in the build product and displayed during boot, so we don't have to
guess answers for questions like "did I just boot the latest version or the one
from before?".

This change creates an overhead for "noop" builds. On my laptop, 'ninja -C
build' that does nothing goes from 0.1 to 0.5 s. It would be nice to avoid
this, but I think that <1 s is still acceptable.

Fixes #7183.

PACKAGE_VERSION is renamed to GIT_VERSION, to make it obvious that this is the
more dynamically changing version string.

Why save to a file? It would be easy to generate the version tag using
run_command(), but we want to go through a file so that stuff gets rebuilt when
this file changes. If we just defined an variable in meson, ninja wouldn't know
it needs to rebuild things.
2018-12-21 13:43:20 +01:00
Yu Watanabe d8a0bcfd77 tree-wide: drop header for emacs from python scripts 2018-12-10 03:17:33 +09:00
Yu Watanabe 87421ff560 tools: add one more SPDX license header 2018-12-10 03:08:52 +09:00
Yu Watanabe 2f6c9b6f3f tools: drop unused variable 2018-12-10 03:07:08 +09:00
Lennart Poettering f7db73528f docs: work around GitHub pages weirdness
Fixes: #10546
2018-11-29 19:09:09 +01:00
Yu Watanabe 50ae773f85
Merge pull request #10970 from yuwata/from-name-return-negative-errno
util: make *_from_name() returns negative errno on error
2018-11-29 03:18:03 +09:00
Yu Watanabe 6ec439fd4b tools: move generate-gperfs.py to tools/ 2018-11-28 20:19:41 +09:00
Evgeny Vereshchagin a2ab58da1a travis: make sure that *.perf and directives.* files are in sync
New features are constantly added to networkd. Apparently, not everybody
knows that the "directives" files should be updated too to make
the fuzzers aware of them.
2018-11-28 05:12:58 +01:00
Lennart Poettering 6fdc4831bb docs: tweak index.md generation and run it again 2018-11-16 17:44:27 +01:00
Evgeny Vereshchagin 3ff074bd85 oss-fuzz.sh: copy dictionaries along with "options" files
We currently don't have any upstream but it doesn't mean that
it should be impossible to experiment with local ones :-)
2018-11-06 19:55:11 +01:00
Evgeny Vereshchagin 6315d12bba tests: add a fuzzer for the json parser and dumper 2018-10-10 10:13:30 +02:00
Yu Watanabe f6d783ac3d meson: use same compilers to build fuzzers 2018-10-09 11:54:10 +02:00
Lennart Poettering c3281539da
Merge pull request #10246 from keszybz/fuzz-buss
Bus fuzzer
2018-10-02 15:45:21 +02:00
Lennart Poettering 0bc7a22d93 docs: add a simple, auto-generated index.md
This is useful for the github pages feature
2018-10-02 10:43:54 +02:00
Zbigniew Jędrzejewski-Szmek 93b575b266 fuzz: rename "fuzz-corpus" directory to just "fuzz"
Also, all corpus subdirectories are named exactly the same as the fuzzer they
are for. This makes the paths a bit longer, but easier.
2018-10-02 09:41:25 +02:00
Lucas Werkmeister e12f397683 tools: use print function in Python 3 code
This GDB script was converted to use Python 3 along with all other
Python scripts in commit b95f5528cc, but still used the Python 2 print
statement syntax instead of the Python 3 print function. Fix that.

We also add the Python 2 compatibility statement, just in case some GDB
still uses Python 2 instead of Python 3.
2018-08-27 14:22:32 +02:00
Evgeny Vereshchagin 7cd98cc495 oss-fuzz.sh: just install the shared library
The workaround is no longer necessary, because the scripts
checking fuzzers have stopped going down to the subdirectories
of $OUT and started to look for the string "LLVMFuzzerTestOneInput"
to tell fuzzers and random binaries apart. Some more details can be
found at https://github.com/google/oss-fuzz/issues/1566.
2018-08-16 06:45:49 +00:00
Zbigniew Jędrzejewski-Szmek 65889ab72d meson: print stats in check-api-docs 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek ae1d4a70a6
Merge pull request #8876 from yuwata/meson-0.46
meson: bump minimum required version to 0.46
2018-07-24 13:41:57 +02:00
Zbigniew Jędrzejewski-Szmek 820d14e3df Drop "Copyright abandonded" header
Add CC0 as the license. SPDX does not have a "public domain" tag, but CC0 is
more or less equivalent. We should have *some* header to avoid doubts in the
future.
2018-07-24 11:14:44 +02:00
Yu Watanabe 7a6397d2b3 meson: use has_link_argument() and friends
This bumps the minimum required version of meson to 0.46, as
`has_link_argument()` and friends are supported since 0.46.
2018-07-24 01:31:22 +09:00
Yu Watanabe 0a924a775a meson: check the existence of ninja.build for fuzzer tests 2018-07-23 08:50:26 +02:00
Evegeny Vereshchagin f3a020d153 coverity.sh: fail if uploading data to Coverity Scan is forbidden 2018-06-25 22:22:29 +00:00
Evegeny Vereshchagin 1e79d09ef9 coverity.sh: use a comma to separate module names
Otherwise Python bails out with
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'json' is not defined
```

See https://travis-ci.org/systemd/systemd/jobs/397490437
2018-06-25 22:02:41 +00:00
Evegeny Vereshchagin 096eec29cd coverity.sh: make the script compatible with Python 3 2018-06-25 21:59:28 +00:00
Evegeny Vereshchagin eeeaebf9c5 coverity.sh: fix a couple indents 2018-06-25 21:57:43 +00:00
Zbigniew Jędrzejewski-Szmek d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02:00
Lennart Poettering 30ce657e5d
Merge pull request #9301 from keszybz/man-drop-authorgroup
man: drop unused <authorgroup> tags from man sources
2018-06-14 15:29:24 +02:00
Zbigniew Jędrzejewski-Szmek 0cd41d4dff Drop my copyright headers
perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
2018-06-14 13:03:20 +02:00
Zbigniew Jędrzejewski-Szmek 49a2d9a2ae Also drop <authorgroup> from autogenerated pages 2018-06-14 12:28:53 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Lennart Poettering 0c69794138 tree-wide: remove Lennart's copyright lines
These lines are generally out-of-date, incomplete and unnecessary. With
SPDX and git repository much more accurate and fine grained information
about licensing and authorship is available, hence let's drop the
per-file copyright notice. Of course, removing copyright lines of others
is problematic, hence this commit only removes my own lines and leaves
all others untouched. It might be nicer if sooner or later those could
go away too, making git the only and accurate source of authorship
information.
2018-06-14 10:20:20 +02:00
Lennart Poettering 818bf54632 tree-wide: drop 'This file is part of systemd' blurb
This part of the copyright blurb stems from the GPL use recommendations:

https://www.gnu.org/licenses/gpl-howto.en.html

The concept appears to originate in times where version control was per
file, instead of per tree, and was a way to glue the files together.
Ultimately, we nowadays don't live in that world anymore, and this
information is entirely useless anyway, as people are very welcome to
copy these files into any projects they like, and they shouldn't have to
change bits that are part of our copyright header for that.

hence, let's just get rid of this old cruft, and shorten our codebase a
bit.
2018-06-14 10:20:20 +02:00
Lennart Poettering d5ef342dfe hwdb-update: make sure it works when run from meson
let's make the argument optional again, so that the command line "ninja
-C build hwdb-update" runs works.
2018-06-13 14:20:03 +02:00
Evegeny Vereshchagin 3b8e98818d coverity.sh: check that coverity responds with 200
This is mostly inspired by 7b103fd2dd

Closes https://github.com/systemd/systemd/issues/9186.
2018-06-07 17:49:54 +00:00
Lennart Poettering 12b74c38e2 tools: make various scripts find the top-levle git dir automatically 2018-06-07 16:22:16 +02:00
Lennart Poettering 3dfd31c8d2 find-double-newline: look in headers too 2018-05-22 16:13:45 +02:00
Lennart Poettering 8244a87768 tools: add a script for fixing up TABs
This is similar to "find-double-newline.sh" but looks for TABs that
should not be there.
2018-05-22 16:13:45 +02:00
Zbigniew Jędrzejewski-Szmek 3c31f3a575 tools/oss-fuzz: install private shared library non-executable (#8927)
Apparently oss-fuzz's "bad build check" is confused by the library.
Let's make it non-executable, so the checker ignores it.

Should fix https://github.com/google/oss-fuzz/issues/1330.
2018-05-08 18:00:19 +03:00
Yu Watanabe 348b44372f meson: generate m4 preprocessor from config.h (#8914) 2018-05-07 11:17:35 +02:00
Lennart Poettering 5d13a15b1d tree-wide: drop spurious newlines (#8764)
Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.

It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.
2018-04-19 12:13:23 +02:00
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Filipe Brandenburger 63554ed907 oss-fuzz: Fallback to ninja-build when available (#8641)
The ninja binary is deployed as `ninja-build` in older distros such as
RHEL 7/CentOS 7.  Detect that and use `ninja-build` instead of `ninja`
when it's available.
2018-04-04 09:32:59 +02:00
Zbigniew Jędrzejewski-Szmek 36cd9913ce tools/oss-fuzz: add clang library dir using -L
I have no idea why clang doesn't do this on its own, and why clang
makes it so hard to query this path (-dumpversion returns something
unrelated...).

I know this is an ugly hack, but this is a very specialized script,
so it should be OK to make it a bit hacky.

Tested to work on Fedora (27) and Debian (unstable).

Fixes #8428.
2018-03-12 15:59:25 +01:00
Zbigniew Jędrzejewski-Szmek 9037a0e022 Rename scripts/oss-fuzz.sh to tools/oss-fuzz.sh 2018-03-12 15:40:37 +01:00
Zbigniew Jędrzejewski-Szmek 748c59b110 Rename scripts/coverity.sh to tools/coverity.sh
There are only two files in tools/, I don't think we need a separate
directory for them.
2018-03-12 15:39:21 +01:00
Zbigniew Jędrzejewski-Szmek 299597f8d5 tools/hwdb-update: allow downloads to fail
sf.net is down, and linux-usb.org which is hosted there also fails.
That's not nice, but there's not we can do about it now.
2018-03-02 12:06:32 +01:00
Zbigniew Jędrzejewski-Szmek 4af1aea411 tools/hwdb-update: print what is being executed 2018-03-02 11:50:43 +01:00
Batuhan Osman Taşkaya 7c4a807277 [gdb-sd_dump_hashmaps.py] String Formatting Update (#7819)
Changes: % changed as .format()
2018-01-27 14:03:08 +01:00
Zbigniew Jędrzejewski-Szmek b68dfb9e83 Hook up oss-fuzz test cases as tests
This is a bit painful because a separate build of systemd is necessary. The
tests are guarded by tests!=false and slow-tests==true. Running them is not
slow, but compilation certainly is. If this proves unwieldy, we can add a
separate option controlling those builds later.

The build for each sanitizer has its own directory, and we build all fuzzer
tests there, and then pull them out one-by-one by linking into the target
position as necessary. It would be nicer to just build the desired fuzzer, but
we need to build the whole nested build as one unit.

[I also tried making systemd and nested meson subproject. This would work
nicely, but meson does not allow that because the nested target names are the
same as the outer project names. If that is ever fixed, that would be the way
to go.]

v2:
- make sure things still work if memory sanitizer is not available
v3:
- switch to syntax which works with meson 0.42.1 found in Ubuntu
2018-01-27 09:03:46 +01:00
Jonathan Rudenberg 7db7d5b733 fuzz: add initial fuzzing infrastructure
The fuzzers will be used by oss-fuzz to automatically and
continuously fuzz systemd.

This commit includes the build tooling necessary to build fuzz
targets, and a fuzzer for the DNS packet parser.
2018-01-17 13:57:06 -05:00
Lennart Poettering 51b13863a2 meson: resurrect API documentation target
We had this functionality back in Automake times, let's resurrect it.
2018-01-05 13:58:33 +01:00
bleep_blop 7629744a3d separate flags from shebang 2017-12-25 19:48:49 +01:00
Jörg Thalheim 2a5fcfae02 more portable perl shebangs (#7701)
same motivation as in #5816:

- 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.
2017-12-19 11:13:34 +01:00
Zbigniew Jędrzejewski-Szmek c6801f502c meson-hwdb-update: fix undefined variable access
I added the test if an optional parameter is not empty, but that doesn't work
with -u. Provide an empty "fallback" value to fix the issue.

Also group the update steps so that it's easier to see what is going on.
2017-12-14 15:45:21 +01:00
Zbigniew Jędrzejewski-Szmek ded65775a2 tests: try to autodetect directory better
Ignore mkosi.builddir. In the future we can also add other patterns
if necessary.

run-intergration-tests.sh is updated to use the new script, and modified
to work from arbitrary directory.

Follow-up for #7494.
2017-12-06 15:16:35 +01:00
Yu Watanabe 07b3a02643 test: set log_level to info in test-hwdb and check-help-*
These tests check the stderr. So, if the systemd.log_level=debug
is set in the kernel command line, then these tests fail.
This set log_level to info in hwdb-test.sh and meson-check-help.sh,
the kernel command line not to change the output of the target
programs.

Fixes #7362.
2017-11-26 00:01:55 +09:00
Zbigniew Jędrzejewski-Szmek 35df744355 Add SPDX license headers to python scripts 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 57056020c5 hwdb: switch meson to use ids_parser.py (#6964)
Also drop the now-unused perl implementation (that doesn't do sorting),
so it's incompatible anyway.
2017-10-04 19:32:59 +02:00
Zbigniew Jędrzejewski-Szmek 689f489812 hwdb: update
http://www.uefi.org/uefi-pnp-export is returning an internal server error,
so the previous version was used.
2017-10-02 13:19:21 +02:00
Zbigniew Jędrzejewski-Szmek 91dab98ffc meson-hwdb-update.sh: add -n param to skip downloads
Useful to experiment with the patching part w/o redownloading the files.
2017-10-02 13:19:21 +02:00
Zbigniew Jędrzejewski-Szmek 003c887967 meson: install the git hook (#6425)
This was done autogen.sh previously and was dropped in
72cdb3e783. Let's add it back.
The meson configuration step is the only reasonable place.

Note that this only works for the most standard git dirs, e.g.
the hook will not be installed if git worktree is used or if
$GIT_DIR is specified, etc. I think that's OK because most of
the time meson will be run at least once in the original cloned
dir.
2017-07-24 10:41:45 +02:00
Zbigniew Jędrzejewski-Szmek 1c6c3ef0bf python: remove star imports
Star imports are discouraged and break pyflakes.

I'm happy to report that pyflakes finds no issues ;)
2017-07-18 10:04:44 -04:00
Zbigniew Jędrzejewski-Szmek 0689f766dc build-sys: drop support for generation of Makefile-man.am 2017-07-18 10:04:44 -04:00
Lennart Poettering 7c34a0a306 git-contrib: drop weird non-breaking spaces
For some reason git shortlog spits out non-breaking spaces, let's remove
that, as for our purposes (inclusion in NEWS) we really want breaking
(i.e. normal) spaces.
2017-07-03 11:22:38 +02:00
Zbigniew Jędrzejewski-Szmek 6b0c49e036 Mark python scripts executable
Since all our python scripts have a proper python3 shebang, there is no benefit
to letting meson autodetect them. On linux, meson will just uses exec(), so the
shebang is used anyway. The only difference should be in how meson reports the
script and that the detection won't fail for (most likely misconfigured)
non-UTF8 locales.

Closes #5855.
2017-05-07 20:16:47 -04:00
Jörg Thalheim 3e67e5c992 more portable python shebangs (#5816)
This is useful on systems like NixOS, where python3 is not in
/usr/bin/python3 as well as for people using alternative ways to
install python such as virtualenv/pyenv.
2017-04-30 20:26:56 -04:00
Zbigniew Jędrzejewski-Szmek 6e2afb1cab meson: fix checking of linker args
Previous checks did nothing, because cc.has_argument only does compilation,
without any linking. Unfortunately cc.links() cannot be used, because it does
not accept any options. Providing the test file as a static source is easiest,
even if not every elegant.

https://github.com/mesonbuild/meson/issues/1676
2017-04-25 08:49:16 -04:00
Zbigniew Jędrzejewski-Szmek b884196cc1 meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
Zbigniew Jędrzejewski-Szmek dc25d2adb5 meson: $DESTDIR might be undefined
This causes an error with -u. Just add an empty fallback.
2017-04-24 19:25:33 -04:00
Zbigniew Jędrzejewski-Szmek 86b3ca7a66 meson: use "sh -eu" and make .sh +x, .py -x
Shell scripts should be executable so that meson reports their
invocation succinctly (does not print 'sh' '-e').
Python scripts should not be executable so that meson does the
detection of the right python binary itself.

Add -u everywhere to catch potential errors.
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek fdd147a88e meson: add dist-check-includes replacement
This is more-or-less the same as dist-check-includes. meson doesn't exactly
make it easy to call a compiler with a custom set of options. The tests
are included in the test listing.
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek 734005fe75 hwdb: use curl instead of wget, and regenerate patch after successful update
libcurl is already our build dependency, so using curl reduces the deps
a bit, and curl also has a more modern codebase.

Regenerating the patch makes it more likely that the patch will apply
in the future.

Also, update URLs which return 302 to the new location.

(Patch suggested by Igor Gnatenko.)
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek abba22c51c meson: add hwdb/update target 2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek 177929c236 meson: add git-contrib target 2017-04-23 21:47:28 -04:00
Zbigniew Jędrzejewski-Szmek 005a29f234 meson: recreate dist-check-help 2017-04-23 21:47:28 -04:00
Zbigniew Jędrzejewski-Szmek 7b76fce1a5 meson: create various symlinks
v2:
- remove bashisms
2017-04-23 21:47:27 -04:00
Zbigniew Jędrzejewski-Szmek e2bb410515 make-man-rules: add support for generating the list in meson.build format
v2:
- sort the alias array too, otherwise the output is not stable
2017-04-23 21:47:26 -04:00
Zbigniew Jędrzejewski-Szmek ba9534535e tools/catalog-report.py: a script to scour the journal for bad catalog entries
I think it can be a useful tool to find such issues.

SD_MESSAGE_UNIT_STARTING 7d4958e842da4a758f6c1cdc7b36dcc5: no field UNIT
../src/core/unit.c:1239 unit_status_log_starting_stopping_reloading
    Starting Paths.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    USER_UNIT=paths.target

SD_MESSAGE_UNIT_STARTED 39f53479d3a045ac8e11786248231fbf: no field UNIT
../src/core/job.c:721 job_log_status_message
    Reached target Paths.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    RESULT=done
    USER_UNIT=paths.target

SD_MESSAGE_STARTUP_FINISHED b07a249cd024414a82dd00cd181378ff: no field KERNEL_USEC
../src/core/manager.c:2532 manager_check_finished
    Startup finished in 19ms.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    USERSPACE_USEC=19670

SD_MESSAGE_STARTUP_FINISHED b07a249cd024414a82dd00cd181378ff: no field INITRD_USEC
../src/core/manager.c:2532 manager_check_finished
    Startup finished in 19ms.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    USERSPACE_USEC=19670

unknown 0ce153587afa4095832d233c17a88001: no catalog entry
gsm-manager.c:1366 start_phase
    Entering running state
    SYSLOG_IDENTIFIER=gnome-session
    PRIORITY=5

SD_MESSAGE_UNIT_STOPPING de5b426a63be47a7b6ac3eaac82e2f6f: no field UNIT
../src/core/unit.c:1239 unit_status_log_starting_stopping_reloading
    Stopping Default.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    USER_UNIT=default.target

SD_MESSAGE_UNIT_STOPPED 9d1aaa27d60140bd96365438aad20286: no field UNIT
../src/core/job.c:729 job_log_status_message
    Stopped target Default.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6
    RESULT=done
    USER_UNIT=default.target

SD_MESSAGE_TIME_CHANGE c7a787079b354eaaa9e77b371893cd27: no field REALTIME
src/core/manager.c:2049 manager_dispatch_time_change_fd
    Time has been changed
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=6

unknown f3ea493c22934e26811cd62abe8e203a: no catalog entry
shell-global.c:1375 shell_global_log_structured
    GNOME Shell started at Sat Jun 11 2016 12:37:46 GMT-0400 (EDT)
    SYSLOG_IDENTIFIER=gnome-shell

SD_MESSAGE_UNIT_FAILED be02cf6855d2428ba40df7e9d022f03d: no field UNIT
src/core/job.c:803 job_log_status_message
    Failed to start GNOME Terminal Server.
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    RESULT=failed
    PRIORITY=3
    USER_UNIT=gnome-terminal-server.service

SD_MESSAGE_LID_CLOSED b72ea4a2881545a0b50e200e55b9b070: no catalog entry
src/login/logind-button.c:198 button_dispatch
    Lid closed.
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    PRIORITY=6

SD_MESSAGE_LID_OPENED b72ea4a2881545a0b50e200e55b9b06f: no catalog entry
src/login/logind-button.c:219 button_dispatch
    Lid opened.
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    PRIORITY=6

SD_MESSAGE_SUSPEND_KEY b72ea4a2881545a0b50e200e55b9b072: no catalog entry
src/login/logind-button.c:177 button_dispatch
    Suspend key pressed.
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    PRIORITY=6

SD_MESSAGE_CONFIG_ERROR c772d24e9a884cbeb9ea12625c306c01: no catalog entry
src/shared/conf-parser.c:469 config_parse_sec
    [/etc/systemd/system/systemd-networkd.service.d/override.conf:2] Failed to parse sec value, ignoring:
    UNIT=systemd-networkd.service
    SYSLOG_FACILITY=3
    ERRNO=22
    SYSLOG_IDENTIFIER=systemd
    PRIORITY=3
    CONFIG_LINE=2
    CONFIG_FILE=/etc/systemd/system/systemd-networkd.service.d/override.conf

unknown 10dd2dc188b54a5e98970f56499d1f73: no catalog entry
gsm-manager.c:308 on_display_server_failure
    Unrecoverable failure in required component org.gnome.Shell.desktop
    PRIORITY=3
    SYSLOG_IDENTIFIER=gnome-session-binary

unknown 52fb62f99e2c49d89cfbf9d6de5e3555: no catalog entry
src/journal/test-journal-send.c:85 main
    Hello World!
    PAGE_SIZE=4096
    TERM=xterm-256color
    SYSLOG_IDENTIFIER=lt-test-journal-send
    PRIORITY=5
    N_CPUS=2
    HOME=/home/zbyszek

unknown 9348174c5cc74001a71ef26bd79d302e: no catalog entry
/usr/lib/python3.5/site-packages/dnf-plugins/system_upgrade.py:422 log_status
    Download finished.
    SYSLOG_IDENTIFIER=python3
    DNF_VERSION=1.1.10
    TARGET_RELEASEVER=25
    SYSTEM_RELEASEVER=24
    PRIORITY=5

unknown fef1cc509d5047268b83a3a553f54b43: no catalog entry
/usr/lib/python3.5/site-packages/dnf-plugins/system_upgrade.py:422 log_status
    Rebooting to perform upgrade.
    SYSLOG_IDENTIFIER=python3
    DNF_VERSION=1.1.10
    TARGET_RELEASEVER=25
    SYSTEM_RELEASEVER=24
    PRIORITY=5

unknown 3e0a5636d16b4ca4bbe5321d06c6aa62: no catalog entry
/usr/lib/python3.5/site-packages/dnf-plugins/system_upgrade.py:422 log_status
    Starting system upgrade. This will take a while.
    SYSLOG_IDENTIFIER=python3
    DNF_VERSION=1.1.10
    SYSTEM_RELEASEVER=24
    PRIORITY=5
    TARGET_RELEASEVER=25

unknown 0123456789abcdef0123456789abcdef: no catalog entry
<doctest systemd.journal.JournalHandler[9]>:1 <module>
    Message with ID
    SYSLOG_IDENTIFIER=/usr/lib/python2.7/site-packages/py/test.py
    LOGGER=custom_logger_name
    PRIORITY=4
    THREAD_NAME=MainThread
2016-12-11 15:43:16 -05:00
Felipe Sateler b95f5528cc Use python3 explicitly in all python scripts 2016-11-28 15:00:20 -03:00
Daniel Mack 232c84b2d2 Remove systemd-bootchart
This commit rips out systemd-bootchart. It will be given a new home, outside
of the systemd repository. The code itself isn't actually specific to
systemd and can be used without systemd even, so let's put it somewhere
else.
2016-02-23 13:30:09 +01:00
Zbigniew Jędrzejewski-Szmek 958caa58c0 man: include the target name when linking to man pages in html output
Links like http://www.freedesktop.org/software/systemd/man/systemd.socket.html
are changed to http://www.freedesktop.org/software/systemd/man/systemd.socket.html#Accept=.

This implementation is quick & dirty, and misses various corner
cases. A fairly important one is that when a few directives share the
same anchor (which happens when multiple directives are described in
the same paragraph), generated links for everything except the first
one link to an invalid anchor. Another shortcoming is that the
formatting does not use the proper generateID machinery, so the anchor
name could be wrong in some cases. But it seems to work for a large
percentage of links, so seems to be an improvement in usability. When
the anchor is missing, we land at the top of the page, which is the
same as before. If the anchor were to point to different spot, this
would be more confusing... Not sure if that ever happens. Anyway, the
user should be able to recover from landing on the wrong place in the
page.

(Mostly) fixes https://github.com/systemd/systemd/issues/1956.
2015-11-22 23:54:29 -05:00
David Herrmann d537694a98 terminal: drop unfinished code
This drops the libsystemd-terminal and systemd-consoled code for various
reasons:

 * It's been sitting there unfinished for over a year now and won't get
   finished any time soon.

 * Since its initial creation, several parts need significant rework: The
   input handling should be replaced with the now commonly used libinput,
   the drm accessors should coordinate the handling of mode-object
   hotplugging (including split connectors) with other DRM users, and the
   internal library users should be converted to sd-device and friends.

 * There is still significant kernel work required before sd-console is
   really useful. This includes, but is not limited to, simpledrm and
   drmlog.

 * The authority daemon is needed before all this code can be used for
   real. And this will definitely take a lot more time to get done as
   no-one else is currently working on this, but me.

 * kdbus maintenance has taken up way more time than I thought and it has
   much higher priority. I don't see me spending much time on the
   terminal code in the near future.

If anyone intends to hack on this, please feel free to contact me. I'll
gladly help you out with any issues. Once kdbus and authorityd are
finished (whenever that will be..) I'll definitely pick this up again. But
until then, lets reduce compile times and maintenance efforts on this code
and drop it for now.
2015-07-27 20:15:34 +02:00
Zbigniew Jędrzejewski-Szmek e4f42f9d1e build-sys: use wildcard glob in update-man-list again
The idea is that after adding a new man page, make update-man-list
will be used to regenerate part of the makefile. So the data already
present in the makefile cannot be used to do that.

Also, renames filter out generated xml files in make-man-rules.py
itself in order to make Makefile.am a bit simpler, and rename files
to dist_files to better reflect new meaning.
2015-06-30 09:56:44 -04:00
Zbigniew Jędrzejewski-Szmek 2a481c8456 compile-unifont: Python 2 compatibility
Under Python 2, sys.stdout.buffer is missing.
2015-01-26 23:56:34 -05:00
Lennart Poettering 81c7dd897c s/command-line/command line/g
A follow-up to:

commit 3f85ef0f05
Author: Harald Hoyer <harald@redhat.com>
Date:   Thu Nov 6 15:33:48 2014 +0100

    s/commandline/command line/g
2014-11-06 20:06:30 +01:00
Michal Schmidt 2ea8c08306 tools: add gdb command to dump hashmap information
$ sudo gdb -p 1
...
(gdb) source gdb-sd_dump_hashmaps.py
(gdb) sd_dump_hashmaps
  ... lists allocated hashmaps ...
(gdb) sd_dump_hashmaps 1
  ... lists allocated hashmaps, their DIB histograms and contiguous
      blocks statistics ...
2014-10-30 19:50:51 +01:00
David Herrmann 86db5dfb6d terminal: add unifont font-handling
The unifont layer of libsystemd-terminal provides a fallback font for
situations where no system-fonts are available, or if you don't want to
deal with traditional font-formats for some reasons.

The unifont API mmaps a pre-compiled bitmap font that was generated out of
GNU-Unifont font-data. This guarantees, that all users of the font will
share the pages in memory. Furthermore, the layout of the binary file
allows accessing glyph data in O(1) without pre-rendering glyphs etc. That
is, the OS can skip loading pages for glyphs that we never access.

Note that this is currently a test-run and we want to include the binary
file in the GNU-Unifont package. However, until it was considered stable
and accepted by the maintainers, we will ship it as part of systemd. So
far it's only enabled with the experimental --enable-terminal, anyway.
2014-07-18 17:45:33 +02:00
Zbigniew Jędrzejewski-Szmek 63b03c0b28 man: mention that x-systemd.device-timeout is only for fstab
Reformat fstab options description. Now they are easier to read and
show up in systemd.directives(7).

Use a single sublist for both /etc/fstab and /etc/crypttab options.
Many of them can be used in both places. crypttab(5) is updated to use
the same docbook elements, so formatting is uniform.
2014-06-30 18:41:17 -04:00
Filipe Brandenburger d7c9aa5e64 build-sys: fix indentation in make-man-rules generated output
This fixes the footer where 7 spaces were used on the first line of EXTRA_DIST,
but a Tab was clearly intended.
2014-06-20 14:41:09 +02:00
Zbigniew Jędrzejewski-Szmek d86dd07d46 build-sys: update intructions for Makefile-man.am regeneration 2014-03-06 23:24:30 -05:00
Zbigniew Jędrzejewski-Szmek c0652d453e man: ignore non-manpage files when generating makefile 2014-02-20 22:43:27 -05:00
Zbigniew Jędrzejewski-Szmek 32dcef3ab1 build-sys: make lxml required when generating indices
Since the manpage indices generated without lxml would be missing some
parts, it doesn't make sense to keep lxml optional anymore.
2014-02-12 03:04:57 -05:00
Zbigniew Jędrzejewski-Szmek 21ac6ff143 man: use xinclude to de-deduplicate common text
I only tested with python-lxml. I'm not sure if xml.etree should be
deprecated.
2014-02-12 01:10:31 -05:00
Karel Zak 3c3e5f4276 build-sys: move python helpers to tools directory
Note that make-man-rules.py is missing in EXTRA_DIST=, this patch
fixes this mistake too.
2014-02-10 13:02:34 +01:00
Karel Zak bfb35cfda1 build-sys: add check-includes build target and script 2014-02-10 13:00:19 +01:00