summaryrefslogtreecommitdiff
path: root/src/update-done
Commit message (Collapse)AuthorAgeFilesLines
* Make failures of mac_selinux_init() fatalChristian Göttsche2020-06-231-3/+1
|
* headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-271-1/+5
| | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* update-done: quit earlier on failureYu Watanabe2018-11-231-2/+1
|
* log: introduce new helper call log_setup_service()Lennart Poettering2018-11-201-3/+1
| | | | | Let's reduce the common boilerplate and have a single setup function used by all service code to setup logging.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-3/+0
| | | | | | | | | | | 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.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | 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.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | 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.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* build-sys: drop automake supportZbigniew Jędrzejewski-Szmek2017-07-181-1/+0
| | | | | v2: - also mention m4
* update-done: use newly added library function to write the fileZbigniew Jędrzejewski-Szmek2017-05-111-53/+11
| | | | Fixes #5861.
* update-done: Create using a temporary file (#5789)codekipper2017-04-261-5/+16
| | | | | | '/etc/.updated' is created without using a temporary file, this can be problematic with filesystems that cache writes. Modify so that the timestamp is written to a temporary file and then use an atomic move to move it to its correct place.
* tree-wide: add man: to manpage references (#5402)Lucas Werkmeister2017-02-201-1/+1
| | | | | Found with: git grep '"[^"]*[a-z0-9]([0-9]\+p\?)' src/ | grep -vF man:
* update-done: minor clean-upsLennart Poettering2016-10-241-6/+9
| | | | | | | | | | | | | | | | | | | This is a follow-up for fb8b0869a7bc30e23be175cf978df23192d59118, and makes a couple of minor clean-up changes: - The field name in the timestamp file is changed from "TimestampNSec=" to "TIMESTAMP_NSEC=". This is done simply to reflect the fact that we parse the file with the env var file parser, and hence the contents should better follow the usual capitalization of env vars, i.e. be all uppercase. - Needless negation of the errno parameter log_error_errno() and friends has been removed. - Instead of manually calculating the nsec remainder of the timestamp, use timespec_store(). - We now check whether we were able to write the timestamp file in full with fflush_and_check() the way we usually do it.
* update-done, condition: write the timestamp to the file as well and use it ↵Ivan Shapovalov2016-09-151-43/+33
| | | | | | | | to prevent false-positives This fixes https://bugs.freedesktop.org/show_bug.cgi?id=90192 and #4130 for real. Also, remove timestamp check in update-done.c altogether since the whole operation is idempotent.
* selinux: always try to load the full selinux dbZbigniew Jędrzejewski-Szmek2016-03-011-1/+1
| | | | | https://github.com/systemd/systemd/pull/2508#issuecomment-190901170 Maybe fixes https://bugzilla.redhat.com/show_bug.cgi?id=1308771.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* util-lib: split out IO related calls to io-util.[ch]Lennart Poettering2015-10-261-0/+1
|
* util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-1/+2
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* update-done: ignore nanosecond file timestamp components, they are not reliableLennart Poettering2015-04-271-3/+9
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=90192
* update-done: minor simplificationLennart Poettering2015-04-271-7/+4
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-1/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering2014-12-281-0/+1
|
* udev,update-done: more log_xyz_errno() conversionsLennart Poettering2014-11-281-27/+13
|
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* selinux: clean up selinux label function namingLennart Poettering2014-10-231-2/+2
|
* mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho2014-10-231-3/+3
|
* update-done: include a short description in .updatedZbigniew Jędrzejewski-Szmek2014-07-261-0/+7
| | | | | | | People might be confused where the file comes from, since the name is not at all specific. https://bugzilla.redhat.com/show_bug.cgi?id=1121301#c8
* update-done: set proper selinux context for .updatedZbigniew Jędrzejewski-Szmek2014-07-211-5/+20
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1121806
* update-done: add minimal tool to manage system updates for /etc and /var, if ↵Lennart Poettering2014-06-132-0/+105
/usr has changed In order to support offline updates to /usr, we need to be able to run certain tasks on next boot-up to bring /etc and /var in line with the updated /usr. Hence, let's devise a mechanism how we can detect whether /etc or /var are not up-to-date with /usr anymore: we keep "touch files" in /etc/.updated and /var/.updated that are mtime-compared with /usr. This means: Whenever the vendor OS tree in /usr is updated, and any services that shall be executed at next boot shall be triggered, it is sufficient to update the mtime of /usr itself. At next boot, if /etc/.updated and/or /var/.updated is older than than /usr (or missing), we know we have to run the update tools once. After that is completed we need to update the mtime of these files to the one of /usr, to keep track that we made the necessary updates, and won't repeat them on next reboot. A subsequent commit adds a new ConditionNeedsUpdate= condition that allows checking on boot whether /etc or /var are outdated and need updating. This is an early step to allow booting up with an empty /etc, with automatic rebuilding of the necessary cache files or user databases therein, as well as supporting later updates of /usr that then propagate to /etc and /var again.