Commit graph

241 commits

Author SHA1 Message Date
Lennart Poettering 4467d39315 CODING_STYLE: split out section about runtime behaviour 2019-04-12 16:59:48 +02:00
Lennart Poettering 78e5b4d7ee CODING_STYLE: add section about C constructs use 2019-04-12 16:53:27 +02:00
Lennart Poettering 3b75e079a8 CODING_STYLE: split out section about deadlocks 2019-04-12 16:50:24 +02:00
Lennart Poettering 96f6cfbf62 CODING_STYLE: split out section about logging 2019-04-12 16:49:02 +02:00
Lennart Poettering 5638076135 CODING_STYLE: export section about exporting symbols 2019-04-12 16:45:03 +02:00
Lennart Poettering c159efe341 CODING_STYLE: split out section about destructors 2019-04-12 16:42:44 +02:00
Lennart Poettering 996f119d97 CODING_STYLE: split out section about command line parsing 2019-04-12 16:40:34 +02:00
Lennart Poettering b065e1f176 CODING_STYLE: Split out section about error handling 2019-04-12 16:38:14 +02:00
Lennart Poettering 831781b9c9 CODING_STYLE: split out section about commiting to git 2019-04-12 16:35:17 +02:00
Lennart Poettering 25553cd9cd CODING_STYLE: split out section about file descriptors 2019-04-12 16:34:01 +02:00
Lennart Poettering 0485824030 CODING_STYLE: split out section about memory allocations 2019-04-12 16:31:58 +02:00
Lennart Poettering f42c1cd4b5 CODING_STYLE: move out section about Types 2019-04-12 16:28:35 +02:00
Lennart Poettering 971dfffab8 CODING_STYLE: add section about how to reference specific concepts 2019-04-12 16:28:35 +02:00
Lennart Poettering 8c9289e705 CODING_STYLE: split out bits about Formatting into its own section
(And, for now, add a section "Other" to separate the rest of the stuff)
2019-04-12 16:28:35 +02:00
Lennart Poettering 2d0dce2afe CODING_STYLE: add a section about functions not to use
Let's add sections to the document. First off, let's add one about
functions not to use.
2019-04-12 16:28:02 +02:00
Zbigniew Jędrzejewski-Szmek 3b69b18fbf CODING_STYLE: adjust indentation rules, and add note about config loading 2019-04-12 08:37:41 +02:00
Zbigniew Jędrzejewski-Szmek 3be4939149 docs: also document updates to stable repo 2019-04-03 16:43:17 +02:00
Zbigniew Jędrzejewski-Szmek afa4e4a9db docs: let's not close the milestone early 2019-04-03 16:23:43 +02:00
Zbigniew Jędrzejewski-Szmek f5a44d42af docs: update release steps for meson 2019-04-03 11:25:15 +02:00
Lennart Poettering 570ee29ce1 docs: fix path to unit files 2019-04-03 13:47:12 +09:00
Lennart Poettering 7445db6eb7 man: document the new RestrictSUIDSGID= setting 2019-04-02 16:56:48 +02:00
Lennart Poettering efebb613c7 core: optionally, trigger .timer units on timezone and clock changes
Fixes: #6228
2019-04-02 08:20:10 +02:00
Lennart Poettering e178b335f5 docs: adjust the spec a bit with firmware authros in mind
This borrows heavily from Nico Huber's
https://github.com/systemd/systemd/pull/10398, but makes a number of
changes.

Replaces: #10398
2019-03-14 15:13:33 +01:00
Lennart Poettering 957848db22 docs: comprehensively document what a minimal portable service image needs to include
The docs were incomplete on this. Let's fix that.

Fixes: #11870
2019-03-14 15:13:33 +01:00
Lennart Poettering e86c7a3abc docs: document the new environment variables logind groks 2019-03-05 16:52:46 +01:00
Zbigniew Jędrzejewski-Szmek 57903f93c9 docs: add a note about compilation options
Closes #6371.
2019-03-05 13:58:06 +01:00
Ben Iofel 892cd2f7ac xbootldr: multiple spaces between keys and values (#11872)
The example below the changed line has multiple spaces between e.g. `title` and `Fedora`
2019-03-03 22:51:22 +01:00
Lennart Poettering 82dad52818 docs: enclose all uuids in `` 2019-03-01 12:41:32 +01:00
unixsysadmin 56ee4d7001 Fix typo - "do note use guessable names"
Fix typo - "do note use guessable names" to "do not use guessable names"
2019-02-20 22:46:16 +01:00
Lennart Poettering b04d849085 docs: document semantics of /tmp and /var/tmp 2019-02-20 18:31:18 +01:00
Lennart Poettering eca3d5d567
Merge pull request #9594 from filbranden/cpu_quota_period1
core: add CPUQuotaPeriodSec=
2019-02-15 12:11:42 +01:00
Ignat Korchagin def3c7c791 resolved: use Cloudflare public DNS server as a default fallback alongside Google one
Cloudflare public DNS service is currently the fastest one according to
https://www.dnsperf.com/#!dns-resolvers. Why not improve the experience for
systemd users using this as a default fallback nameserver?
2019-02-15 11:34:11 +01:00
Filipe Brandenburger 10f2864111 core: add CPUQuotaPeriodSec=
This new setting allows configuration of CFS period on the CPU cgroup, instead
of using a hardcoded default of 100ms.

Tested:
- Legacy cgroup + Unified cgroup
- systemctl set-property
- systemctl show
- Confirmed that the cgroup settings (such as cpu.cfs_period_ns) were set
  appropriately, including updating the CPU quota (cpu.cfs_quota_ns) when
  CPUQuotaPeriodSec= is updated.
- Checked that clamping works properly when either period or (quota * period)
  are below the resolution of 1ms, or if period is above the max of 1s.
2019-02-14 11:04:42 -08:00
Дамјан Георгиевски 6f61b14d53 portable: document /etc/machine-id and /etc/resolv.conf
… requirement for portable service images.

systemd will mount the host machine-id and resolv.conf at these
locations, so for read-only images these must exist in the image,
because they can't be created.
2019-02-04 15:59:41 +01:00
Chris Morin f36712b7c3 CODING_STYLE: fix grammar mistake 2019-01-17 12:37:40 +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
Chris Down 4e1dfa45e9 cgroup: s/cgroups? ?v?([0-9])/cgroup v\1/gI
Nitpicky, but we've used a lot of random spacings and names in the past,
but we're trying to be completely consistent on "cgroup vN" now.

Generated by `fd -0 | xargs -0 -n1 sed -ri --follow-symlinks 's/cgroups?  ?v?([0-9])/cgroup v\1/gI'`.

I manually ignored places where it's not appropriate to replace (eg.
"cgroup2" fstype and in src/shared/linux).
2019-01-03 11:32:40 +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
Filipe Brandenburger c3e270f4ee docs: add a "front matter" snippet to our markdown pages
It turns out Jekyll (the engine behind GitHub Pages) requires that pages
include a "Front Matter" snippet of YAML at the top for proper rendering.

Omitting it will still render the pages, but including it opens up new
possibilities, such as using a {% for %} loop to generate index.md instead of
requiring a separate script.

I'm hoping this will also fix the issue with some of the pages (notably
CODE_OF_CONDUCT.html) not being available under systemd.io

Tested locally by rendering the website with Jekyll. Before this change, the
*.md files were kept unchanged (so not sure how that even works?!), after this
commit, proper *.html files were generated from it.
2019-01-02 14:16:34 -08:00
Lennart Poettering 59f13dd6f8 remount-fs: optionally remount / writable, if we are told through an env var 2018-12-18 14:47:44 +01:00
Lennart Poettering 7db43ec32f docs: add missing section to ENVIRONMENT.md
No, this is not an env var understood by logind. Let's fix the
confusoin.
2018-12-17 20:48:22 +01:00
Zbigniew Jędrzejewski-Szmek 3f9a0a522f tree-wide: s/time-out/timeout/g
From WordNet (r) 3.0 (2006) [wn]:

  time-out
      n 1: a brief suspension of play; "each team has two time-outs left"

From The Free On-line Dictionary of Computing (18 March 2015) [foldoc]:

  timeout

     A period of time after which an error condition is raised if
     some event has not occured.  A common example is sending a
     message.  If the receiver does not acknowledge the message
     within some preset timeout period, a transmission error is
     assumed to have occured.
2018-12-14 11:17:52 +01:00
Zbigniew Jędrzejewski-Szmek 06da5c63dd meson: make net.naming-scheme= default configurable
This is useful for distributions, where the stability of interface names should
be preseved after an upgrade of systemd. So when some specific release of the
distro is made available, systemd defaults to the latest & greatest naming
scheme, and subsequent updates set the same default. This default may still
be overriden through the kernel and env var options.

A special value "latest" is also allowed. Without a specific name, it is harder
to verride from meson. In case of 'combo' options, meson reads the default
during the initial configuration, and "remembers" this choice. When systemd is
updated, old build/ directories could keep the old default, which would be
annoying. Hence, "latest" is introduced to make it explicit, yet follow the
upstream. This is actually useful for the user too, because it may be used
as an override, without having to actually specify a version.
2018-12-12 10:09:36 +01:00
Lennart Poettering f7e81fd96f udev: introduce udev net_id "naming schemes"
With this we can stabilize how naming works for network interfaces. A
user can request through a kernel cmdline option or an env var which
scheme to follow. The idea is that installers use this to set into stone
(a very soft stone though) the scheme used during installation so that
interface naming doesn't change afterwards anymore.

Why use env vars and kernel cmdline options, and not a config file of
its own?

Well, first of all there's no obvious existing one to use. But more
importantly: I have the feeling that this logic is kind of an incomplete
hack, and I simply don't want to do advertise this as a perfectly
working solution. So far we used env vars for the non-so-official
options and proper config files for the official stuff. Given how
incomplete this logic is (i.e. the big variable for naming remains the
kernel, which might expose sysfs attributes in newer versions that we
check for and didn't exist in older versions — and other problems like
this), I am simply not confident in giving this first-class exposure in
a primary configuration file.

Fixes: #10448
2018-12-11 23:29:46 +01:00
Zbigniew Jędrzejewski-Szmek a2bd90d38e Merge branch 'predictable-interface-names'
This imports the wiki page for predictable interface names. I think it's
useful to preserve history here because it's a contentious subject, and
it's useful to know when what happened.
2018-12-11 11:13:26 +01:00
Zbigniew Jędrzejewski-Szmek f9e6d49904 Rename to follow the convention
Also remove trailing whitespace.
2018-12-11 11:02:06 +01:00
LennartPoettering 4368c49697 2018-12-11 10:58:40 +01:00
LennartPoettering e90d48ae38 2018-12-11 10:58:40 +01:00
TanuKaskinen 27eaa1bc7a fix typo 2018-12-11 10:58:40 +01:00
LennartPoettering 86db1e3532 2018-12-11 10:58:40 +01:00
LennartPoettering c8f2c6b122 2018-12-11 10:58:40 +01:00
ColinGuthrie b4584342c0 Deal with 80-net-setup-link.rules introduced in 209. 2018-12-11 10:58:40 +01:00
LennartPoettering 8745120c99 2018-12-11 10:58:40 +01:00
LennartPoettering 56fbd5310f 2018-12-11 10:58:40 +01:00
ColinGuthrie f42be39a18 Document the net.ifnames kernel command line. 2018-12-11 10:58:40 +01:00
Joe Rayhawk cedf08c774 moin2mdwn: convert page docs/PredictableNetworkInterfaceNames 2018-12-11 10:58:40 +01:00
LennartPoettering 54313217c1 2018-12-11 10:58:40 +01:00
LennartPoettering 3c31f15cdb 2018-12-11 10:58:40 +01:00
LennartPoettering e2f9b633c4 2018-12-11 10:58:40 +01:00
LennartPoettering afce8ff3af 2018-12-11 10:58:40 +01:00
LennartPoettering d363512c92 2018-12-11 10:58:40 +01:00
LennartPoettering ee83da3a75 2018-12-11 10:58:40 +01:00
LennartPoettering b1661148ac 2018-12-11 10:58:39 +01:00
LennartPoettering 13f79279b2 2018-12-11 10:58:39 +01:00
LennartPoettering fb30e224e7 2018-12-11 10:58:39 +01:00
LennartPoettering 1f6bee9328 2018-12-11 10:58:39 +01:00
LennartPoettering f47346c3aa 2018-12-11 10:58:39 +01:00
LennartPoettering ce7c9f453a 2018-12-11 10:58:39 +01:00
127.0.0.1 128faa63f2 typo fix 2018-12-11 10:58:39 +01:00
LennartPoettering a5d1717c40 2018-12-11 10:58:39 +01:00
LennartPoettering 648f251ff9 2018-12-11 10:58:39 +01:00
LennartPoettering 2d2111748f 2018-12-11 10:58:39 +01:00
LennartPoettering adb51bc84d 2018-12-11 10:58:39 +01:00
LennartPoettering 0adad03eb8 2018-12-11 10:58:39 +01:00
LennartPoettering cd6c4dd571 2018-12-11 10:58:39 +01:00
LennartPoettering 80b0c64bcf 2018-12-11 10:58:39 +01:00
LennartPoettering e13da0ac1e 2018-12-11 10:58:39 +01:00
LennartPoettering 93aae43890 2018-12-11 10:58:39 +01:00
LennartPoettering 6f99e67081 2018-12-11 10:58:39 +01:00
LennartPoettering 3c36dd1ca5 2018-12-11 10:58:39 +01:00
LennartPoettering 6dbee95541 2018-12-11 10:58:39 +01:00
LennartPoettering 5536de5cc4 2018-12-11 10:58:39 +01:00
LennartPoettering 7b1e4518e0 2018-12-11 10:58:39 +01:00
Zbigniew Jędrzejewski-Szmek c90ee83400 coding style: reduce text width to 109 characters
Patches are shown on github with a fixed width (no matter how wide the window
is). When line numbers are high (we have some files with 5 digit line numbers),
the diff does not fit, and horizontal scrolling must be used when viewing the
patch. This is super annoying. Let's reduce the width a bit. I think 109 is
still very wide, but at least the github issue should be alleviated.
2018-12-08 10:14:28 +01:00
Lennart Poettering 5f1b0cc6d0 locale-util: add logic to output smiley emojis at various happiness levels 2018-11-30 16:19:29 +01:00
Filipe Brandenburger 00195abcbe docs: turn LGTM URL into a markdown link 2018-11-30 12:02:13 +03:00
Lennart Poettering f7db73528f docs: work around GitHub pages weirdness
Fixes: #10546
2018-11-29 19:09:09 +01:00
Lennart Poettering edc8e7b81f docs: fix typo 2018-11-29 15:29:47 +01:00
Lennart Poettering c1d3483d47 docs: uppercase the title of our Markdown docs 2018-11-29 15:29:47 +01:00
Lennart Poettering ecb1a44cc9 docs: add brief docs explaing udev's flock() block device node synchronization 2018-11-29 10:48:30 +01:00
Zbigniew Jędrzejewski-Szmek 8b4e51a60e
Merge pull request #10797 from poettering/run-generator
add new "systemd-run-generator" for running arbitrary commands from the kernel command line as system services using the "systemd.run=" kernel command line switch
2018-11-28 22:40:55 +01:00
Lennart Poettering 7af67e9a8b core: allow to set exit status when using SuccessAction=/FailureAction=exit in units
This adds SuccessActionExitStatus= and FailureActionExitStatus= that may
be used to configure the exit status to propagate in when
SuccessAction=exit or FailureAction=exit is used.

When not specified let's also propagate the exit status of the main
process we fork off for the unit.
2018-11-27 09:44:40 +01:00
Lennart Poettering e2391ce0bc docs: document the .control/ subcgroup contract in the docs 2018-11-26 18:43:23 +01:00
nikolas b24546706e Fix a few docs typos (#10907)
Found with [codespell](https://github.com/codespell-project/codespell)
2018-11-24 04:28:39 +09:00
nikolas 1e268f423c Fix typo in hacking guide: "no possible" -> "not possible" (#10905) 2018-11-24 03:01:50 +09:00
Zbigniew Jędrzejewski-Szmek cd7bcfa8fe CODING_STYLE: describe log & return operations 2018-11-22 10:54:38 +01:00
Zbigniew Jędrzejewski-Szmek a98dc693e4 CODING_STYLE: fix rules for STRLEN and recommend strjoina more strongly
Again, this mostly matches what is happening in the codebase already.
2018-11-20 07:27:37 +01:00
Zbigniew Jędrzejewski-Szmek a527f70a41 CODING_STYLE: clarify the rules for the src/basic & src/shared split
The rule is changed from "put in basic unless there's a reason not to" to "put
in shared unless there's a reason not to", to match the change done in previous
commit. This minimizes libbasic. See previous commit for the reasons why this
is useful.

Previously, the guideline was based on whether the files in question use
"publicly exported APIs". This distinction is not particularly relevant. Let's
consider all other programs we compile: most of them use "publicly exported
APIs", usually linking to libsystemd-shared.so for the actual code. But those
programs are not forced to be in src/basic, and the distinction whether they
happen to use 'sd-*.h' or not is of no importance. The same is true for files
in src/shared/. If we didn't have publicly exported shared objects, we'd put
everything in libsystemd-shared.so. So let's only move things out of it that we
need to. Previous guideline was not "wrong", in the sense that it created *a*
split that was functional (no code in src/shared was required in the publicly
exported shared objects), but it put more files in basic/ then necessary.

Not much changes in practice, because (as previous commit shows), moving files
between libbasic.a and libsystemd-shared.so mostly just changes compilation
order.

The list of components which cannot use libsystemd-shared.so is adjusted.
2018-11-20 07:27:37 +01:00
Lennart Poettering cc7a0bfa15 bootspec: introduce SYSTEMD_ESP_PATH for overriding where to look for the ESP (#10834) 2018-11-20 12:37:01 +09:00
Lennart Poettering f7f00fb15b doc: document the boot menu entry identifier vocabulary
The existing text already said "See below regarding a recommended
vocabulary for boot loader entry identifiers.", but the section for it
was still missing. Let's fill in the missing bits, and describe basic
suggested rules for the boot menu entry identifier vocabulary, in
particular how to identify Windows and MacOS X installations, and how to
name automatic entries vs. explicitly configured ones.

This basically follows the logic implemented in sd-boot these days.
2018-11-19 21:52:28 +01:00