Compare commits

...

557 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 97a6085912 Version 247.1 2020-12-01 10:55:58 +01:00
Zbigniew Jędrzejewski-Szmek 9bf9a317b6 Move container networkd config to -networkd subpackage
-container subpackage is for container *management*. Those files are
used *in* the container.
2020-12-01 10:31:51 +01:00
Zbigniew Jędrzejewski-Szmek 8bb6dc993a Version 247 2020-11-26 19:53:39 +01:00
Zbigniew Jędrzejewski-Szmek afdd35ec48 Really ignore test failure 2020-11-12 15:07:11 +01:00
Zbigniew Jędrzejewski-Szmek d9fc59f9a9 Ignore one test failure 2020-11-12 14:31:27 +01:00
Zbigniew Jędrzejewski-Szmek bca98cfc50 Compile with oomd 2020-11-12 13:08:11 +01:00
Zbigniew Jędrzejewski-Szmek 39bdda8d19 Pull in perl for tests 2020-11-12 12:56:08 +01:00
Zbigniew Jędrzejewski-Szmek f28a96e50a Version 247-rc2 2020-11-12 12:56:08 +01:00
Zbigniew Jędrzejewski-Szmek 5bf2aac8b4 Stop creating resolv.conf symlink in more circumstances 2020-11-12 12:56:08 +01:00
Zbigniew Jędrzejewski-Szmek a734fa3ff3 Add workaround for selinux preventing use of selinux status page 2020-11-12 12:56:08 +01:00
Zbigniew Jędrzejewski-Szmek b6a8363c43 Use normal scriptlets for systemd-networkd 2020-11-12 12:56:08 +01:00
Zbigniew Jędrzejewski-Szmek 550422fe1b Version 247-rc1 2020-11-12 12:56:08 +01:00
Robert Scheck 5acb5c4c08 Harmonize networkd description/summary with other sub-packages 2020-10-20 17:15:42 +00:00
Zbigniew Jędrzejewski-Szmek 96b7895b99 Do not touch resolv.conf if it is a mountpoint
https://bugzilla.redhat.com/show_bug.cgi?id=1885101
2020-10-08 11:52:07 +02:00
Zbigniew Jędrzejewski-Szmek 14b2fafb36 resolve: remove the fallback dns server list
DNS questions (which necessarilly include IP addresses) are personally
indentifying information in the sense of GDPR
(https://gdpr.eu/eu-gdpr-personal-data/ explicitly lists IP address as
PII). Sending those packets to Google or Cloudflare is "forwarding"
this PII to them. GDPR says that information which is not enough to
identify individuals still needs to be protected because it may be
combined with other information or processed with improved technology
later. So even though the information in DNS alone it not very big, it
may be interpreted as protected information in various scenarios.

When Fedora is installed by an end-user, they must have the reasonable
expectation that Fedora will contant Fedora servers for updates and
status checks and such. But the case of DNS packets is different,
because the dns servers are not under our control. While most of the
time the information leak through DNS is negligible, we can't rule out
scenarios where it could be considered more important.

Another thing to consider is that ISP and other local internet access
mechanisms are probably worse overall for privacy compared to google and
cloudflare dns servers. Nevertheless, they are more obvious to users and
fit better in the regulatory framework, because there are local laws
that govern them and implicitic or explicit agreements for their use.
Whereas US-based servers are foreign and are covered by different rules.

The fallback DNS servers don't matter most of the time because
NetworkManager will include the servers from a DHCP lease. So
hopefully users will not see any effect from the change done in this
patch. Right now I think it is better to avoid the legal and privacy
risk. If it turns out this change causes noticable problems, we might
want to reconsider. In particular we could use the fallback servers
only in containers and such which are not "personal" machines and there
is no particular person attached to them.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3C4KESHIMZDB6XCFO4EOBEDV4Q2AVVQ5/

I think we could provide a default dns server list more reasonably if
there was some kind of privacy policy published by Fedora and users
could at least learn about those defaults. Sadly, we don't have any
relevant privacy policy (https://pagure.io/Fedora-Council/tickets/issue/53).
2020-10-06 14:09:53 +02:00
Dusty Mabe 283a994776 split-files: break out more files into networkd subpackage
There were some things left in the main package that should have
been in the sub package (including networkd.conf). This is an attempt
to make the list of files in the networkd package more correct.

It explicitly tries to leave sytemd-network-generator and the network
targets in the main package.
2020-10-01 09:14:06 +02:00
Zbigniew Jędrzejewski-Szmek 7d7120d566 Only create resolv.conf symlink if sd-resolved.service is enabled
This way, if one wants to opt-out of resolved, installing a preset
that disables the service is enough. Previously that would only disable
the service, but a dangling symlink would be created.
2020-09-30 23:12:12 +02:00
Zbigniew Jędrzejewski-Szmek 3905512117 Upgrades: only replace NM /etc/resolv.conf if NM is enabled 2020-09-29 18:30:47 +02:00
Zbigniew Jędrzejewski-Szmek ce6da66f61 Pull in libfido2-devel
fido2 support in homed was actually unavailable.
2020-09-27 14:03:41 +02:00
Zbigniew Jędrzejewski-Szmek 147b753f29 Fix permissions on libsystemd-shared.abignore 2020-09-27 14:03:41 +02:00
Zbigniew Jędrzejewski-Szmek f10da8ae84 Add option to disable lto
This makes the build noticably faster.
2020-09-27 14:03:41 +02:00
Zbigniew Jędrzejewski-Szmek b36512ad8f Make main package Conflicts+Obsoletes with -standalone- subpackages
I'm not entirely sure if this is the right form...
Is Conflicts? useful when we have Obsoletes?

Seem to work OK. I tested:
dnf --installroot=... install x86_64/systemd-standalone-sysusers-246.6-2.fc34.x86_64.rpm  x86_64/systemd-standalone-tmpfiles-246.6-2.fc34.x86_64.rpm
→ succeeds with a new installation
→ fails if the installroot already had systemd installed
dnf --installroot=... install x86_64/systemd{,-libs,-pam}-246.6-2.fc34.x86_64.rpm noarch/systemd-noarch-246.6-2.fc34.noarch.rpm
→ uninstalls the two standalone packages
2020-09-27 14:01:34 +02:00
Filipe Brandenburger b50e9d7f29 Create separate standalone packages for tmpfiles and sysusers
These packages include binaries that link to a static version of
libsystemd-shared, so they don't depend on the systemd-libs package at
runtime.

These packages are intended to expose systemd-tmpfiles and systemd-sysusers
to non-systemd systems, such as container images.

Note that static linking only pulls in the small subset of functions from
libsystemd-shared that are actually used by the binaries, so the total size of
a statically linked binary is much smaller than the sum of the shared binary
with the shared library. The resulting binaries on an x86_64 build have 272KB
(tmpfiles) and 180KB (sysusers).

This commit relies on the -Dstandalone-binaries=true build configuration that
was pushed upstream in PR 16061 and released in systemd v246.
2020-09-26 21:00:25 +02:00
Christian Glombek f455b2249a Split out networkd sub-package
And add it to main package as recommended dependency.
2020-09-26 20:43:40 +02:00
Zbigniew Jędrzejewski-Szmek 043ff2e2f0 Add patch for kernel bug 2020-09-20 13:11:35 +02:00
Zbigniew Jędrzejewski-Szmek f74b957328 Version 246.6 2020-09-20 13:10:31 +02:00
Zbigniew Jędrzejewski-Szmek de06d8e22c Rework patches for test-path 2020-09-14 10:03:26 +02:00
Zbigniew Jędrzejewski-Szmek 81cd8d4bcf Fix patch numbering 2020-09-14 09:26:12 +02:00
Zbigniew Jędrzejewski-Szmek 269358bd5e One more debugging patch 2020-09-14 09:19:02 +02:00
Zbigniew Jędrzejewski-Szmek 04b6e059f7 Force creation of /etc/resolv.conf symlink during installation
https://bugzilla.redhat.com/show_bug.cgi?id=1873856#c14
2020-09-13 11:03:33 +02:00
Zbigniew Jędrzejewski-Szmek 0345c83b50 Version 246.5 2020-09-13 11:02:40 +02:00
Zbigniew Jędrzejewski-Szmek 764adb18da Don't complain if /dev/urandom is unavailable 2020-09-02 12:35:56 +02:00
Zbigniew Jędrzejewski-Szmek 1ebf8dd816 Version 246.4 2020-09-02 12:12:42 +02:00
Zbigniew Jędrzejewski-Szmek 5a70c03b7f Let avahi handle mdns requests
We need to disable it by default in resolved so that it doesn't fight
with avahi for the port when both are started up in parallel.

I also moved nss-files before nss-resolve. This is unfortunate because
resolved cached files and with the move, the file will be re-read on each
query. Nevertheless, we want nss-files to have higher priority than nss-mdns
to honour local config. Fortunately, only some people put lots of entries
in /etc/hosts, so the inefficiency incurred by this isn't important for
most users.

nss-myhostname is moved after nss-files, following the change in
upstream recommendations.
2020-09-02 10:52:43 +02:00
Zbigniew Jędrzejewski-Szmek d01d537e93 Create /etc/resolv.conf symlink upon installation 2020-09-02 10:22:03 +02:00
Petr Lautrbach 16c37db4fd Improve tests structure
- rename test-reboot.yml to tests-reboot.yml so that it's run by CI directly
- drop unnecessary tests.yml
- add mandatory test.log, see
  https://docs.fedoraproject.org/en-US/ci/standard-test-interface/#_invocation
- improve results.yml format
- drop avc.err.log and log everything AVC related to avc.log
2020-08-27 08:13:25 +02:00
Zbigniew Jędrzejewski-Szmek 98b9113655 Version 246.3 2020-08-26 14:50:44 +02:00
Zbigniew Jędrzejewski-Szmek d5c1247285 Version 246.2 2020-08-17 19:15:12 +02:00
Zbigniew Jędrzejewski-Szmek 27ec459b7b Add patch to ingnore test failure on s390x 2020-08-08 09:27:46 +02:00
Zbigniew Jędrzejewski-Szmek eee99e6ccc Add patch to debug test failure on s390x 2020-08-07 18:56:37 +02:00
Zbigniew Jędrzejewski-Szmek 84fad5038a Let's not try to define to triggers
error: line 639: Trigger fired by the same package is already defined in spec file: %post libs
It's not clear what rpm is complaining about here, but the two %triggerun's
for the same package seem to be the most likely offender.

I wanted to avoid applying to preset reset twice, alas.
2020-08-07 17:40:27 +02:00
Zbigniew Jędrzejewski-Szmek c8f86d89ba Version 246.1 2020-08-07 17:33:19 +02:00
Zbigniew Jędrzejewski-Szmek 0eabb3de75 Two more patches for a test that randomly fails in koji 2020-07-31 11:01:07 +02:00
Zbigniew Jędrzejewski-Szmek 7445a298df Actually update version :) 2020-07-30 21:21:06 +02:00
Zbigniew Jędrzejewski-Szmek 30273d3292 Release v246 2020-07-30 21:19:54 +02:00
Zbigniew Jędrzejewski-Szmek 65221f861e Increase timeout in another test 2020-07-27 16:11:20 +02:00
Zbigniew Jędrzejewski-Szmek 35e6dd7b1a Increase timeout in test 2020-07-27 15:18:39 +02:00
Zbigniew Jędrzejewski-Szmek 437a7b8c4f Add patch for failing test 2020-07-27 13:54:40 +02:00
Zbigniew Jędrzejewski-Szmek abd738eddc Pull in coreutils during build
/bin/true is used by test-path ;)
2020-07-27 12:10:55 +02:00
Zbigniew Jędrzejewski-Szmek a5acceb904 Force preset of systemd-resolved on package upgrade
Just changing /etc/nsswitch.conf is pointless without this.
2020-07-26 16:27:03 +02:00
Zbigniew Jędrzejewski-Szmek 11b1c53b97 Make /tmp large again 2020-07-26 15:50:33 +02:00
Zbigniew Jędrzejewski-Szmek 5bf170b999 Update to v246-rc2 2020-07-24 09:28:35 +02:00
Zbigniew Jędrzejewski-Szmek 5eb772cfb3 Add scriptlet to enable nss-resolve
The default line is
> hosts: files dns myhostname
Some people might insert mymachines, most likely as:
> hosts: mymachines files dns myhostname
The scriptlet for nss-mdns inserts mdns before dns:
> hosts: ... files mdns4_minimal [NOTFOUND=return] dns ...

The scriptlet replaces 'files dns myhostname' with
> resolve [!UNAVAIL=return] myhostname files dns
This follows the upstream recommendation. myhostname is ordered earlier
because
a) it's more trustworthy than files or especially dns
b) resolve synthetizes the same answers as myhostname, so it doesn't
   make much sense to have myhostname at any other place than directly
   after resolve, so that if resolve is not available, we get answers for
   the names that myhostname is able to synthesize with the same priority.

See https://fedoraproject.org/wiki/Changes/systemd-resolved.
2020-07-14 21:16:00 +02:00
Zbigniew Jędrzejewski-Szmek 0a6ab0825d Update defaults to dnssec=no, mdns,llmnr=resolve 2020-07-14 21:16:00 +02:00
Zbigniew Jędrzejewski-Szmek 778a3758dd Drop patch to avoid creation of /etc/resolv.conf symlink 2020-07-12 22:55:01 +02:00
Zbigniew Jędrzejewski-Szmek 6fd99c397b Drop scriptlet for nss-myhostname
The glibc default has nss-myhostname since mid-2018, bug #1581809.
2020-07-12 22:55:00 +02:00
Zbigniew Jędrzejewski-Szmek 65984c876a Make sure zstd is enabled during configuration
Let's not rely on autodetection.
2020-07-12 22:55:00 +02:00
Zbigniew Jędrzejewski-Szmek 9488c31cc1 changelog: add bug numbers 2020-07-09 10:48:24 +02:00
Zbigniew Jędrzejewski-Szmek 4f458499a5 Print error logs if tests fail 2020-07-09 09:54:04 +02:00
Zbigniew Jędrzejewski-Szmek c432921859 Enable zstd compression 2020-07-09 08:56:03 +02:00
Zbigniew Jędrzejewski-Szmek ca9af1e8a8 We don't really need git nowadays
Buildroot is broken, let's try without git.
2020-07-09 08:56:03 +02:00
Zbigniew Jędrzejewski-Szmek 0688d7a091 Also include systemd-homed.service in the uninstall scriptlets 2020-07-09 08:56:03 +02:00
Zbigniew Jędrzejewski-Szmek 55abe5f0ba Update to 246-rc1 2020-07-09 08:56:03 +02:00
Petr Lautrbach 9d2435f184 Add a basic sanity reboot test collecting AVCs
From time to time there's systemd update with new features which could break an
SELinux enabled system. In order to minimize possible damage on composes we need
to be sure that a system can boot with new systemd and it doesn't generate any
AVC denial.

This test reboots a machine and collects AVC, USER_AVC and SELINUX_ERR audit
messages into avc.log file which is propagated as test artifact.
2020-06-30 11:11:57 +02:00
Bastien Nocera 6eb8bcde28 + systemd-245.6-3
Set fallback-hostname to fedora so that unset hostnames are still
  recognisable (#1392925)
2020-06-24 15:50:16 +02:00
Zbigniew Jędrzejewski-Szmek ec562b2272 Add self-obsoletes to fix upgrades from F31
Debugged and fixed by adamw!

$ rpmdiff systemd-udev-245.6-[12]*
removed     OBSOLETES systemd < 229-5
added       OBSOLETES systemd < 245.6-1
...
2020-06-02 09:29:56 +02:00
Zbigniew Jędrzejewski-Szmek 6dead14ceb Add two bug numbers 2020-05-31 12:45:44 +02:00
Zbigniew Jędrzejewski-Szmek fb22f2a640 Update to v245.6 2020-05-31 11:45:46 +02:00
Christian Glombek 493f6fa66b sysusers.generate-pre.sh: Fix parsing files that don't end with newline 2020-05-11 12:52:13 +02:00
Björn Esser 265d91aff5 Disable bootstrap build 2020-04-21 19:51:17 +02:00
Björn Esser 282e088f13 Bootstrapping for json-c SONAME bump 2020-04-21 19:47:09 +02:00
Björn Esser f983169655 Bump release and update %changelog 2020-04-21 19:46:02 +02:00
Björn Esser b5c68a76ce Add explicit BuildRequires: acl
The acl package is not present in the buildroots when building
in bootstrap mode, but test-acl-util needs /usr/bin/getfacl.

Thus it should be an explicit build-time dependency.
2020-04-19 17:05:54 +02:00
Zbigniew Jędrzejewski-Szmek b80d007386 Update to v245.5 2020-04-17 15:22:25 +02:00
Björn Esser 63698f5ea0 Add bootstrap option to break circular deps on cryptsetup 2020-04-16 13:17:47 +02:00
Zbigniew Jędrzejewski-Szmek 80532792aa Move Provides:u2f-hidraw-policy to -udev subpackage
https://bugzilla.redhat.com/show_bug.cgi?id=1823002#c2
2020-04-11 11:06:07 +02:00
Zbigniew Jędrzejewski-Szmek 6238d479ae gitignore: add emacs backup files 2020-04-11 10:38:12 +02:00
Zbigniew Jędrzejewski-Szmek 8a34ce7dca Add abignore file to make abigail happy 2020-04-11 10:37:42 +02:00
Zbigniew Jędrzejewski-Szmek be4317e8bf Fix some rpmlint issues and add filter for others 2020-04-01 23:39:32 +02:00
Zbigniew Jędrzejewski-Szmek 91fd7acc9e Update to v245.4 2020-04-01 22:06:48 +02:00
Zbigniew Jędrzejewski-Szmek 24d7f17342 Remove %{shortcommit} reference in %description
Nowadays most builds happen from stable releases, so %shortcommit is not defined,
which rpmlint justly warns about.
2020-04-01 22:06:48 +02:00
Zbigniew Jędrzejewski-Szmek 48edd5b3a5 Move man pages for pam_systemd and pam_systemd_home to -pam subpackage
Fixes rpmlint: systemd-pam.x86_64: W: no-documentation
2020-04-01 22:06:48 +02:00
Zbigniew Jędrzejewski-Szmek bb79fb7387 Update to v245.3 2020-03-26 14:52:00 +01:00
Zbigniew Jędrzejewski-Szmek 7ceda13192 Update to v245.2 2020-03-18 20:41:58 +01:00
Zbigniew Jędrzejewski-Szmek 86b1777f9b Remove tab use 2020-03-08 12:12:39 +01:00
Zbigniew Jędrzejewski-Szmek 8f2e234d97 Update to v245 2020-03-06 14:25:45 +01:00
Zbigniew Jędrzejewski-Szmek a4507efa4e systemd-udev: downgrade Recommends→Suggests for systemd-bootchart
It gets installed on Fedora workstation, and I don't think we want
it there.
2020-03-06 13:47:09 +01:00
Zbigniew Jędrzejewski-Szmek 788f973eab Bump test timeout once more
The tests fail on s390x with timeouts.
2020-03-03 13:52:44 +01:00
Zbigniew Jędrzejewski-Szmek 111b3c5a31 Don't require /proc to be mounted for systemd-sysusers to work 2020-03-03 13:51:43 +01:00
Zbigniew Jędrzejewski-Szmek ab2423caa9 Update to 245-rc2 2020-03-03 09:11:51 +01:00
Zbigniew Jędrzejewski-Szmek a4e7f2840f Fix typo in udev rule 2020-03-02 21:28:38 +01:00
Zbigniew Jędrzejewski-Szmek 61de05c228 Add forgotten bug number 2020-03-02 21:26:47 +01:00
Zbigniew Jędrzejewski-Szmek db1cfc0955 Move a bunch more stuff to systemd-udev.rpm 2020-03-02 21:26:47 +01:00
Zbigniew Jędrzejewski-Szmek aed5718c3a Move boot-related files to -udev subpackage 2020-03-02 21:26:47 +01:00
Zbigniew Jędrzejewski-Szmek 933c039e04 Add --without tests option for quicker builds 2020-03-02 21:26:47 +01:00
Zbigniew Jędrzejewski-Szmek 01e2d8a982 "Upgrade" dependency on kbd package from Recommends to Requires 2020-03-02 21:26:47 +01:00
Filipe Brandenburger 529ae77811 Fix spurious `if` line in fallback for upgrade from v239 2020-02-28 09:54:59 -08:00
Filipe Brandenburger 5c5a95ecb4 Update kill -TERM fallback to check that systemd is PID 1
Also only execute the fallback when we're upgrading the RPM package.

Add a comment to indicate the actual bug in systemd v239 we're trying to
fix with this fallback.

Tested: Upgraded from v239 on a machine and confirmed that running
`sudo systemctl status` was working as expected after the upgrade, rather
than failing with "Access denied."
2020-02-28 12:16:24 +01:00
Zbigniew Jędrzejewski-Szmek 437cd52f28 Modify the downstream udev rule to use bfq to only apply to disks 2020-02-26 22:33:08 +01:00
Zbigniew Jędrzejewski-Szmek a8129e0964 Fix scriptlet to not kill non-systemd pid1 (#1803240) 2020-02-26 16:12:36 +01:00
Adam Williamson 3620ae5f58 Fix plymouth etc. running when they shouldn't (#1803293) 2020-02-18 09:02:08 -08:00
Zbigniew Jędrzejewski-Szmek 3666983037 Run tests with a timeout multiplier
Tests fail to pass on s390x, and this seems to be just a timeout.
2020-02-11 14:16:34 +01:00
Zbigniew Jędrzejewski-Szmek 6aa6d755fb Revert patch to udev rules causing regression with usb hubs 2020-02-10 17:23:40 +01:00
Zbigniew Jędrzejewski-Szmek ced9237a14 Add the sysusers compat parts 2020-02-10 17:19:18 +01:00
Zbigniew Jędrzejewski-Szmek 9434e617a6 Add default 'disable *' preset for user units 2020-02-07 13:41:19 +01:00
Zbigniew Jędrzejewski-Szmek d1a1f09895 #1798414 already fixed in v243 2020-02-05 18:24:23 +01:00
Zbigniew Jędrzejewski-Szmek 513853f320 Update to v245-rc1 2020-02-05 13:21:04 +01:00
Fedora Release Engineering d9b9454de8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 00:58:58 +00:00
Anita Zhang 58b22cf334 Resort to `kill -TERM 1` to re-exec the daemon
This might be more reliable when upgrading from an older systemd package. The
systemctl call to reexec will occasionally fail with "Access denied" when we
upgrade from a much older version (like 2-3 versions older). However, sending
PID 1 a SIGTERM is documented to be mostly the same and fixes it 100% of the
times.

Signed-off-by: Anita Zhang <the.anitazha@gmail.com>
Signed-off-by: Filipe Brandenburger <filbranden@gmail.com>
2020-01-29 15:24:36 -08:00
Zbigniew Jędrzejewski-Szmek 2ccb3a9dee Disable service watchdogs (for systemd units) 2019-12-21 19:01:15 +01:00
Zbigniew Jędrzejewski-Szmek 4cd9bf575b Adjust patches
0002-Revert-units-set-NoNewPrivileges-for-all-long-runnin.patch was added exactly
a year ago because selinux policy needed to be updated. I think we can drop the
patch now.

Also drop part of 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch:
the service runs as unprivileged user, so the creation cannot succeed. The other
part of the patch is kept.
2019-12-15 13:25:15 +01:00
Zbigniew Jędrzejewski-Szmek 51ab4bc42e Update to v244.1 2019-12-15 13:22:28 +01:00
Zbigniew Jędrzejewski-Szmek ed1ff6f641 Update to v244 2019-11-29 18:01:38 +01:00
Zbigniew Jędrzejewski-Szmek 8964873178 Obsolete u2f-hidraw-policy
systemd package numbering is completely different than
u2f-hidraw-policy, so I'm using a fixed number. "-40" is supposed to
be sufficiently high so that we stay higher and preserve the upgrade
path even if the package is updated in older releases.
2019-11-22 15:15:01 +01:00
Zbigniew Jędrzejewski-Szmek a746962e75 Update to v244-rc1 2019-11-22 15:15:01 +01:00
Zbigniew Jędrzejewski-Szmek da9dae21d7 Update to v243.4 2019-11-19 13:27:41 +01:00
Zbigniew Jędrzejewski-Szmek 5abc564f03 Remove recommendation to use %{?systemd_requires}
https://pagure.io/packaging-committee/issue/921
2019-10-20 11:57:02 +02:00
Adam Williamson ec1d7bb8af Backport PR #13792 to fix nomodeset+BIOS CanGraphical bug (#1728240) 2019-10-18 19:09:45 -07:00
Zbigniew Jędrzejewski-Szmek 82d2fa2f16 Fix typo in %changelog
https://bugzilla.redhat.com/show_bug.cgi?id=1745600
2019-10-17 23:34:23 +02:00
Zbigniew Jędrzejewski-Szmek a556e1f3e2 Various minor documentation and error message cleanups 2019-10-10 15:38:52 +02:00
Zbigniew Jędrzejewski-Szmek a760231337 Obsolete timedatex package 2019-09-22 00:13:41 +02:00
Zbigniew Jędrzejewski-Szmek 7aa63f3164 First batch of post-v243 fixes 2019-09-22 00:13:41 +02:00
Zbigniew Jędrzejewski-Szmek 1f0a2f0802 Remove reference to removed patch 2019-09-03 12:06:49 +02:00
Zbigniew Jędrzejewski-Szmek 090a9d035f Update to v243 2019-09-03 12:02:32 +02:00
Adam Williamson 07b358f168 Backport PR #13406 to solve PATH ordering issue (#1744059) 2019-08-26 11:44:02 -07:00
Zbigniew Jędrzejewski-Szmek 37d9de1fcf Fix typo in %changelog
https://bugzilla.redhat.com/show_bug.cgi?id=1745600
2019-08-26 15:32:00 +02:00
Zbigniew Jędrzejewski-Szmek d7b2d46533 Update to v243-rc2 2019-08-22 14:01:31 +02:00
Adam Williamson 07f0cd95cf Backport PR #1737362 so we own /etc/systemd/system again (#1737362) 2019-08-07 08:03:26 -07:00
Zbigniew Jędrzejewski-Szmek f1413ea879 Update to v243-rc1 2019-07-30 22:06:53 +02:00
Fedora Release Engineering bf71ff0b85 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 00:54:19 +00:00
Zbigniew Jędrzejewski-Szmek 8848319ef8 Another patch backport 2019-07-20 19:41:24 +02:00
Björn Esser 1c4be10032
Rebuilt (libqrencode.so.4) 2019-06-26 00:49:11 +02:00
Miro Hrončok d15ab16efa Rebuilt for iptables update (libip4tc.so.2) 2019-06-25 13:05:58 +02:00
Zbigniew Jędrzejewski-Szmek b9896dc2ce Also copy the %description for -stable to rawhide 2019-04-26 13:14:59 +02:00
Zbigniew Jędrzejewski-Szmek 6dff989abd First batch of post-v242 fixes 2019-04-26 11:21:52 +02:00
Adam Williamson a419fcc3bd Rebuild with Meson fix for #1699099 2019-04-16 12:55:58 -07:00
Zbigniew Jędrzejewski-Szmek 4480cada02 Update to v242 2019-04-11 18:54:17 +02:00
Zbigniew Jędrzejewski-Szmek 89aa08197f Make scriptlets non-failing and skip udevadm reload if no udev
sysctl, binfmt, and other rules are collected from multiple packages
and we don't want to see a report that systemd %triggerin failed.
So let's not silence the output, but use "|| :" to the trigger is
not reported as failed.

Also, adjust the udevadm check. In containers udevd might not be
running, even if systemd is, and we'd get:
Failed to send reload request: No such file or directory

https://bugzilla.redhat.com/show_bug.cgi?id=1698391
2019-04-11 16:04:25 +02:00
Zbigniew Jędrzejewski-Szmek 4c67e1cb51 Upload sources 2019-04-09 13:40:12 +02:00
Zbigniew Jędrzejewski-Szmek c7ac97585c Update to v242-rc4 2019-04-09 12:33:28 +02:00
Zbigniew Jędrzejewski-Szmek 77ab9b5088 Update to v242-rc3 2019-04-04 18:22:04 +02:00
Zbigniew Jędrzejewski-Szmek 5fb495cb03 Add patches to fix build on arm64 2019-04-03 16:45:51 +02:00
Zbigniew Jędrzejewski-Szmek 2379dd06da Update to v242-rc2 2019-04-03 11:05:37 +02:00
Zbigniew Jędrzejewski-Szmek 836fcf414a Drop some old units from scriptlet
default.target is now symlinked in /usr/lib, no need to touch /etc.
readahead units are long gone.
2019-04-03 11:05:37 +02:00
Zbigniew Jędrzejewski-Szmek 1d22340882 Update sources 2019-03-29 16:11:55 +01:00
Zbigniew Jędrzejewski-Szmek b61052552e 241-4: backport patches 2019-03-29 16:06:48 +01:00
Zbigniew Jędrzejewski-Szmek cf6cab52f2 Disable NDEBUG in builds
In principle systemd supports building without assertions for production,
but we want the assertions to be enabled to catch as many errors early as possible.

Also, let's remove the obsolete work-around for meson not showing logs. This
is already reverted upstream, but apparently not in the version of macros that
Fedora has.
2019-03-29 14:51:04 +01:00
Zbigniew Jędrzejewski-Szmek 484de996fc Revert "Skip dhcp[6]-client tests"
This reverts commit 94a4908748.
2019-03-29 14:50:59 +01:00
Zbigniew Jędrzejewski-Szmek 21fe449c94 Call cat /etc/machine-id just once in %post scriptlet 2019-03-29 14:50:53 +01:00
Zbigniew Jędrzejewski-Szmek 94a4908748 Skip dhcp[6]-client tests 2019-03-15 00:11:29 +01:00
Zbigniew Jędrzejewski-Szmek 32a6a004db Declare hyperv and framebuffer devices master-of-seat again 2019-03-14 23:08:46 +01:00
Zbigniew Jędrzejewski-Szmek cda068c40d Patches for CVE-2019-6454 2019-02-20 17:32:50 +01:00
Zbigniew Jędrzejewski-Szmek 922e5d4fa4 Revert "Skip failing part of test-json"
This reverts commit 79a1c5f8e8.

The issue was fixed upstream.
2019-02-14 11:37:19 +01:00
Zbigniew Jędrzejewski-Szmek 6af7b47648 Update to v241 2019-02-14 11:36:57 +01:00
Zbigniew Jędrzejewski-Szmek 660962e17a Turn LTO back on
This makes the package smaller:
-rw-rw-r--. 3840040 Feb  9 14:53 x86_64/systemd-241~rc2-1.fc30.x86_64.rpm
-rw-rw-r--. 3794532 Feb  9 15:58 x86_64/systemd-241~rc2-2.fc30.x86_64.rpm

Important binaries like systemd and libsystemd-shared.so are about
10% smaller.
2019-02-09 17:04:59 +01:00
Zbigniew Jędrzejewski-Szmek 79a1c5f8e8 Skip failing part of test-json 2019-02-06 10:27:03 +01:00
Zbigniew Jędrzejewski-Szmek 5df67cdae8 Drop patch that was merged upstream 2019-02-05 23:56:09 +01:00
Zbigniew Jędrzejewski-Szmek 442c8d41a9 Update to v241-rc2 2019-02-05 23:49:50 +01:00
Zbigniew Jędrzejewski-Szmek edaa157918 Override the version tag using the new functionality 2019-02-05 23:43:35 +01:00
Fedora Release Engineering 8d4a0946d1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 09:19:03 +00:00
Yu Watanabe ee8fc244d8 backport a patch for kernel-install 2019-01-27 17:59:32 +01:00
Zbigniew Jędrzejewski-Szmek 0eab21cb2b Update to v241-rc1 2019-01-26 17:51:43 +01:00
Zbigniew Jędrzejewski-Szmek a787811921 Add a work-around for #1663040 2019-01-15 11:20:43 +01:00
Björn Esser 3eb9903ba0
Rebuilt for libcrypt.so.2 (#1666033) 2019-01-14 18:53:39 +01:00
Zbigniew Jędrzejewski-Szmek 4557ee0872 Add a work-around for selinux issue on live images 2019-01-11 14:27:13 +01:00
Zbigniew Jędrzejewski-Szmek 0214da5fc8 Patches for the journal CVEs and various other fixes 2019-01-11 13:37:03 +01:00
Zbigniew Jędrzejewski-Szmek ea91d39bdd Bump release 2018-12-22 17:40:14 +01:00
Zbigniew Jędrzejewski-Szmek 7d37aab780 Actually commit the patches 2018-12-22 17:38:56 +01:00
Zbigniew Jędrzejewski-Szmek 9a32090cc2 Two more patches for udevd problems during boot
With debugging enabled, lvm devices wouldn't come up.
2018-12-22 17:38:05 +01:00
Yu Watanabe d644e8032c timesync: DynamicUser= is disabled now for timesyncd 2018-12-22 16:20:22 +01:00
Zbigniew Jędrzejewski-Szmek b80d668d9e Fix previous patch and revert the change that requires selinux policy update 2018-12-22 11:12:35 +01:00
Zbigniew Jędrzejewski-Szmek 4100d92c45 Add patch to fix build on arm32 2018-12-21 23:08:20 +01:00
Zbigniew Jędrzejewski-Szmek 47d443ea5d Update to v240 2018-12-21 20:08:58 +01:00
Zbigniew Jędrzejewski-Szmek 3a45ccbeb1 More patches including revert of resume= check 2018-12-18 00:43:46 +01:00
Zbigniew Jędrzejewski-Szmek 85e1a222f7 Add call to 'authselect check'
See https://src.fedoraproject.org/rpms/systemd/pull-request/12#comment-18052.
2018-12-06 14:49:27 +01:00
Zbigniew Jędrzejewski-Szmek 4ba08126b1 Adjust scriptlets to modify /etc/authselect/user-nsswitch.conf
With input from Pavel Březina.

The guard in install scriptlet was borked. The grep call was supposed
to skip the sed call if the file already had correct contents. But the
condition was always true. Added by me in back in 37de5dfe28 ;(
2018-12-05 13:57:25 +01:00
Zbigniew Jędrzejewski-Szmek 8bc4ef61e5 Drop scriptlet that removes /.readahead
Readahead was removed a long time ago.
2018-12-05 13:57:25 +01:00
Zbigniew Jędrzejewski-Szmek 9977ebc5d7 Drop scriptlet for pre-F19 entires in /etc/fstab 2018-12-05 13:57:25 +01:00
Zbigniew Jędrzejewski-Szmek cda71799e7 Drop scriptlet to tweak nss-resolve config
This was added in da15385b06, November 2016, after
nss-resolve was modified to return a special value. When nss-resolve is added to
new installations, it should be configured in this way already, and we shouldn't
modify configuration. Let's drop this too.
2018-11-29 14:36:25 +01:00
Zbigniew Jędrzejewski-Szmek b3c65ffbe3 Drop scriptlet to disable nss-mymachines
The scriptlet to *add* it was removed in 38d93ea79f,
November 2015. We only care about upgrades from previous two releases, so it is
long overdue to remove this.
2018-11-29 14:33:11 +01:00
Zbigniew Jędrzejewski-Szmek 07e98bcf32 Update description a bit
Parts of the package became inaccurate when stuff was moved to -container
subpackage.
2018-11-27 16:08:28 +01:00
Alejandro Domínguez Muñoz 9a0025413c Fix changelog typo 2018-11-19 12:29:29 +00:00
Alejandro Domínguez Muñoz b2165dc717 Remove link creation for rsyslog.service
It is already handled by rsyslog.rpm, as indicated in this BugZilla report: https://bugzilla.redhat.com/show_bug.cgi?id=1343132
2018-11-18 16:29:47 +00:00
Adam Williamson 8510cadb34 Go back to using systemctl preset-all in %post (#1647172, #1118740)
We tried this back in 2016 and it didn't go so well, because at
that time, preset-all was badly broken. See
https://bugzilla.redhat.com/show_bug.cgi?id=1363858 for the
history there. It seems that the bugs in preset-all were fixed
quite soon after that, but for whatever reason, the change to
%post was not re-applied (probably it just got forgotten).

We've now run into a bug in Rawhide where dbus-daemon is getting
installed before systemd despite having a dependency that should
make that not happen:
https://bugzilla.redhat.com/show_bug.cgi?id=1647172
this is apparently because there are very complex dependency
loops during initial install that rpm cannot find a single
clearly correct 'answer' for, so it does not always choose to
honor this dependency. We can take a look at breaking up those
loops, but we also figured it can't hurt to resurrect this change
to help with such cases: this way if some service with a preset
*does* happen to get installed before systemd, and so its attempt
to apply the preset in its own %post fails, that will be fixed up
here.
2018-11-08 16:35:11 -08:00
Adam Williamson 71e781a096 Requires(post) openssl-libs to fix live build machine-id issue 2018-11-05 12:18:32 -08:00
Yu Watanabe d15bd12f49 Set attributes to private directories
The attributes of private directories are maintained by pid1.
But, when creating os image, tools like mkosi, may complain the
wrong attributes.
2018-11-05 14:26:56 +09:00
Yu Watanabe db19323db2 Drop check for triggers
As we do not use the upstream provided trigger file.
2018-11-05 14:19:05 +09:00
Zbigniew Jędrzejewski-Szmek e394248861 Make macros package noarch 2018-11-02 11:53:19 +01:00
Zbigniew Jędrzejewski-Szmek c9030f045b Split out the rpm macros into systemd-rpm-macros subpackage 2018-11-02 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 59823848fc Remove patches already included in the tarball 2018-11-02 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 6a3bb3f641 Use modern github URLs
Also shorten macro names while at it.
2018-11-02 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 6714fc2555 Backport a bunch of fixes 2018-10-29 01:53:24 +01:00
Jan Synacek d8d2ff965e Fix line_begins() to accept word matching full string (#1631840)
Resolves: #1631840
2018-10-03 13:50:02 +02:00
Jan Synacek 1f6dfb7453 Fix meson using -Ddebug, which results in FTBFS 2018-10-03 13:48:52 +02:00
Colin Walters 48ac1cebde spec: Test for /var being writable before making /var/log/journal
rpm-ostree has `/var` be read-only during package installs, because
a whole part of the "transactional update" model is that your system's
data stays untouched, and `/var` is system data.

See e.g. https://src.fedoraproject.org/rpms/mock/pull-request/2
and the tracker https://bugzilla.redhat.com/show_bug.cgi?id=1352154

Just to squash some error spew during tree composes.
2018-09-11 09:23:16 +02:00
Zbigniew Jędrzejewski-Szmek 184871e826 Move /etc/yum/protected.d/systemd.conf to /etc/dnf/ 2018-09-10 11:58:35 +02:00
Zbigniew Jędrzejewski-Szmek 5306894742 Backport patch for statx conflict
https://bugzilla.redhat.com/show_bug.cgi?id=1602812
2018-07-18 17:55:08 +02:00
Zbigniew Jędrzejewski-Szmek e7883a3ff9 Ignore return value from systemd-binfmt in scriptlet 2018-07-18 13:36:02 +02:00
Zbigniew Jędrzejewski-Szmek 07b77042bc Use %autosetup to apply patches
Automatic application of patches should work just as well nowadays.
2018-07-18 13:35:09 +02:00
Filipe Brandenburger 05bb389ca4 Override systemd-user PAM config in %install and not %prep
This makes it possible to build RPMs from a git tree using
`rpmbuild --build-in-place --noprep` and have resulting RPMs
that will preserve the override of the PAM config file.

This needs to commit to HAVE_SELINUX being defined (since there
is no longer an m4 step to make that stanza conditional), but
that should be acceptable since the %build step calls Meson
with -Dselinux=true.

Tested:

- Chdir into a checkout of github.com/systemd/systemd tree and run:

  $ rpmbuild -bb --build-in-place --noprep \
        --define "gitcommit $(git rev-parse HEAD)" \
        --define "_sourcedir $HOME/fedorarpms/systemd" \
        ~/fedorarpms/systemd/systemd.spec

- Inspect the contents of systemd-user in the generated RPM package:

  $ rpm2cpio ~/rpmbuild/RPMS/x86_64/systemd-239-3.git99352de.fc29.x86_64.rpm \
        | cpio -i --to-stdout --quiet ./etc/pam.d/systemd-user
  ...
  account  include system-auth
  ...
  session  include system-auth
2018-07-15 01:08:07 -07:00
Fedora Release Engineering ad150b1fc6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 07:12:29 +00:00
Zbigniew Jędrzejewski-Szmek a2b05050f9 Rebuild for Python 3.7 again 2018-06-25 23:19:55 +02:00
Zbigniew Jędrzejewski-Szmek eb80e67908 Update to v239 2018-06-22 13:22:47 +02:00
Miro Hrončok c8d1507e04 Rebuilt for Python 3.7 2018-06-19 11:28:13 +02:00
Zbigniew Jędrzejewski-Szmek b59ff1a2fc Backport a bunch of patches
Existing patches moved to the systemd-stable tarball, with the exception
of 0991-core-fix-resetting-of-Delegate-and-properly-ignore-i.patch,
which was partially reverted upstream and is just removed.
2018-05-11 12:30:10 +02:00
Zbigniew Jędrzejewski-Szmek 6a5d5d666c Add patch from broken gpg headers 2018-04-18 23:51:01 +02:00
Zbigniew Jędrzejewski-Szmek bb3fb8bc57 Allow fake Delegate= setting on slices 2018-04-18 20:25:58 +02:00
Zbigniew Jędrzejewski-Szmek b05aec5ee0 Add patch to fix build on rawhide 2018-03-28 09:39:33 +02:00
Zbigniew Jędrzejewski-Szmek e8a9546241 Fix quoting 2018-03-28 08:57:12 +02:00
Zbigniew Jędrzejewski-Szmek 3c9433d7cf Move udev transfiletriggers to the right package
A redo of b5fa4adf after the rewrite to shell.
2018-03-28 08:53:37 +02:00
Zbigniew Jędrzejewski-Szmek a818a9f2ca Merge remote-tracking branch 'origin/f28' 2018-03-28 08:50:55 +02:00
Colin Walters dc46312de2 Use shell for triggers; see https://github.com/systemd/systemd/pull/8550
This fixes compatibility with rpm-ostree.
2018-03-27 20:38:45 +00:00
Colin Walters 8e6b39457b Use shell for triggers; see https://github.com/systemd/systemd/pull/8550
This fixes compatibility with rpm-ostree.
2018-03-27 20:37:29 +00:00
Zbigniew Jędrzejewski-Szmek f770414d95 Backport patch to revert inadvertent change of "predictable" interface name 2018-03-20 09:31:28 +01:00
Zbigniew Jędrzejewski-Szmek b5fa4adf3f Move udev transfiletriggers to the right package 2018-03-18 14:43:39 +01:00
Zbigniew Jędrzejewski-Szmek 176a1807d2 Add patch for Reload bug 2018-03-16 23:22:34 +01:00
Zbigniew Jędrzejewski-Szmek d4d36e6a87 Two patches
2018-03-06 23:21:31,835 INFO pylorax.dnfhelper: Performing post-installation setup tasks
2018-03-06 23:22:41,901 WARNING pylorax.dnfhelper: Non-fatal POSTTRANS scriptlet failure in rpm package kernel-core

warning: %posttrans(kernel-core-4.16.0-0.rc4.git0.1.fc29.x86_6 scriptlet failed, exit status 1
Please specify the kernel command line in /etc/kernel/cmdline!
Could not determine the kernel command line parameters
/usr/lib/kernel/install.d/90-loaderentry.install: line 53: /proc/cmdline: No such file or directory
2018-03-08 01:04:39 +01:00
Yu Watanabe d10793d82b Fix wrong version in changelog 2018-03-06 08:07:30 +01:00
Yu Watanabe 792370f28d Fix transfiletrigger script 2018-03-06 08:07:12 +01:00
Zbigniew Jędrzejewski-Szmek 77f7c6f491 Add patch which hopefully will fix build in koji 2018-03-06 00:05:31 +01:00
Zbigniew Jędrzejewski-Szmek 98ea23b9ac Update to v238 2018-03-05 23:29:40 +01:00
Javier Martinez Canillas fd0679e1ff
Add patch to install kernel images for GRUB BootLoaderSpec support
GRUB now has BootLoaderSpec support, the user can choose to use this by
setting GRUB_ENABLE_BLSCFG to true in /etc/default/grub. On this setup,
grubby isn't used to generate the kernel modules dependencies, instead
the depmod install script could be used.

But the BLS support in GRUB uses the config snippets that are generated
at build time and included in the kernel package, so the loaderentry
install script shouldn't be executed when using GRUB.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-02-28 10:39:11 +01:00
Zbigniew Jędrzejewski-Szmek 885c28c248 Create /etc/systemd in %post libs if necessary 2018-02-24 09:31:09 +01:00
Adam Williamson f5d69da27a zbyszek: use : not touch to create file in -libs %%post 2018-02-23 14:01:32 -08:00
Zbigniew Jędrzejewski-Szmek 273dc0fda0 Replace touch by :, add "|| :"
touch is from coreutils, and : is built into the shell.
2018-02-22 14:06:19 +01:00
Patrick Uiterwijk a88494686e Add typecasting patches for usb IDs
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2018-02-22 12:46:30 +01:00
Patrick Uiterwijk 6f5e81a1a0 Add dep for coreutils to -libs %post
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2018-02-22 11:32:18 +01:00
Zbigniew Jędrzejewski-Szmek 6eaf251a9e Bump release 2018-02-21 16:40:50 +01:00
Zbigniew Jędrzejewski-Szmek 388cd917f1 Add purge-nobody-user 2018-02-21 15:23:30 +01:00
Zbigniew Jędrzejewski-Szmek 3e18b458fc Actually change the nobody mapping
I added this to the changelog, but forgot to commit the change
itself. Also fix scriptlet definition.
2018-02-20 23:52:08 +01:00
Zbigniew Jędrzejewski-Szmek 8dc92a4da2 Backport more patches, update ldconfig macros, check for nobody 2018-02-20 23:32:22 +01:00
Zbigniew Jędrzejewski-Szmek c8ec349ecc Revert one patch from the first stable snapshot 2018-02-09 17:42:33 +01:00
Zbigniew Jędrzejewski-Szmek aadfe52dca A few more patches for the first stable snapshot 2018-02-09 17:17:55 +01:00
Zbigniew Jędrzejewski-Szmek 339b0245df Disable lto as a temporary workaround
https://bugzilla.redhat.com/show_bug.cgi?id=1543912
2018-02-09 16:58:00 +01:00
Zbigniew Jędrzejewski-Szmek 7ffa9232c4 First stable snapshot 2018-02-09 15:47:17 +01:00
Zbigniew Jędrzejewski-Szmek fb4de3a52a Slight simplification 2018-02-09 14:50:35 +01:00
Zbigniew Jędrzejewski-Szmek e3edeed65d Update to v237 2018-01-28 17:16:50 +01:00
Zbigniew Jędrzejewski-Szmek d13ecfd07d Fix mode on %ghost dirs in /etc
If the directory does not exist in %buildroot, rpm very usefully defaults
to access mask of 0. When the directory is created in the file system, of
course it has some other mode, and rpm -V reports the directory as changed.
2018-01-25 11:00:30 +01:00
Björn Esser 3595fb5110
Add patch to include <crypt.h> if needed 2018-01-21 15:35:40 +01:00
Björn Esser af29920ddf
Rebuilt for switch to libxcrypt 2018-01-20 23:14:09 +01:00
Zbigniew Jędrzejewski-Szmek 38d7cff9f6 Backport a bunch of patches 2018-01-11 11:14:11 +01:00
Zbigniew Jędrzejewski-Szmek 1eeb98d33d Update to v236 2017-12-15 09:36:03 +01:00
Zbigniew Jędrzejewski-Szmek f314ba8790 Add BR: gcc, gcc-c++
gcc is usually present in the buildroot, but let's require it since
the guidelines require that. gcc-c++ is used for some tests.
2017-12-15 09:22:20 +01:00
Yu Watanabe e0aa12142f update scriptlet for migrating to DynamicUser=
The directory /var/lib/systemd/journal-upload must not exist.
If both private and non-private directory exist, then
systemd cannot create link to private directory, and
the service fails to start.
This makes the script try to remove the non-private directory.
2017-12-13 12:37:04 +09:00
Zbigniew Jędrzejewski-Szmek 2125b9b134 Update %changelog 2017-12-12 09:41:54 +01:00
Yu Watanabe f59138540e add scriptlet to migrate private directory 2017-12-12 09:06:13 +01:00
Yu Watanabe e92fe49e42 remove white space at the end of line 2017-12-12 09:02:43 +01:00
Yu Watanabe 219c026dc0 remove unused files 2017-12-12 09:02:40 +01:00
Yu Watanabe dc44a1da74 use libidn2 2017-12-12 09:01:10 +01:00
Yu Watanabe db8b8fe77c create render group, remove groups for timesync, journal-gateway and journal-upload 2017-12-12 09:00:38 +01:00
Yu Watanabe a8ba7b15a2 bump required meson to 0.43 2017-12-12 08:52:11 +01:00
Yu Watanabe 9653e125fd update split-files.py and list of ghost files 2017-12-12 08:52:06 +01:00
Zbigniew Jędrzejewski-Szmek 17a6f382d1 Update to snapshot, use generated lists of files
Previous method was untenable, because rpm doesn't have a concept of
put those files here, and the rest in there. So for every positive
pattern that was added, we had to add an %exclude line somewhere else.
So let's generate the lists using pattern matching. This is a bit messy
too, but should not require updates when files are added or removed.
(Sometimes it'll be necessary to add a new pattern if the new files
should not land in the main binary package.)

There's some intentional changes:
- man pages are more consistently included with the files they describe
- shell completion scripts similarly
- various kernel-install and modules-load related files are moved
  to -udev subpackage
2017-12-12 01:04:08 +01:00
Zbigniew Jędrzejewski-Szmek f00d23638b Rebuild for cryptsetup-2.0.0-0.2.fc28 2017-11-07 17:07:34 +01:00
Zbigniew Jędrzejewski-Szmek 35bb94669a Backport a bunch of patches, including LP#172535 2017-10-25 16:25:53 +02:00
Zbigniew Jędrzejewski-Szmek ca246f98ec Patches for cryptsetup _netdev 2017-10-18 15:25:44 +02:00
Zbigniew Jędrzejewski-Szmek 8a752251c4 Fix patch 2017-10-06 18:03:54 +02:00
Zbigniew Jędrzejewski-Szmek a46c781ba7 Skip tests when cg_pid_get_path fails 2017-10-06 17:26:09 +02:00
Zbigniew Jędrzejewski-Szmek 3cb1145229 Update to v235 2017-10-06 16:50:13 +02:00
Nathaniel McCallum ac49c72d1e Backport /etc/crypttab _netdev feature from upstream 2017-09-26 10:48:54 -04:00
Michal Sekletar 1d5166b9df Make sure to remove all device units sharing the same sysfs path
Resolves: #1475570
2017-09-21 00:56:48 +02:00
Zbigniew Jędrzejewski-Szmek 8b20c798c7 Bump xslt recursion limit for libxslt-1.30 2017-09-18 17:12:43 +02:00
Zbigniew Jędrzejewski-Szmek 27bd1bd49f Backport some patches 2017-07-31 15:52:44 -04:00
Fedora Release Engineering 8d4133f998 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 19:52:30 +00:00
Zbigniew Jędrzejewski-Szmek d044ab56d6 Backport some patches 2017-07-17 19:34:13 -04:00
Zbigniew Jędrzejewski-Szmek f3e3e4d477 Fix typo in dev-kvm-mode option 2017-07-13 11:35:31 -04:00
Zbigniew Jędrzejewski-Szmek 84e7848871 Create kvm group
Thanks to Yu Watanabe.
2017-07-13 09:44:43 -04:00
Zbigniew Jędrzejewski-Szmek 22eb6688a2 Spec file cleanups
Thanks to Yu Watanabe.
2017-07-13 09:26:43 -04:00
Zbigniew Jędrzejewski-Szmek 5bf44923db Update to v234 2017-07-12 22:02:53 -04:00
Zbigniew Jędrzejewski-Szmek c2bfa7b218 Use libidn again for now 2017-07-12 01:58:23 -04:00
Zbigniew Jędrzejewski-Szmek 83f115d68f Build with meson again 2017-07-11 01:29:55 -04:00
Zbigniew Jędrzejewski-Szmek 4ebba8aac1 Recommend kbd for udev to configure vconsole properly 2017-07-11 01:29:55 -04:00
Zbigniew Jędrzejewski-Szmek 61120120a0 Tweak the patches a bit more 2017-06-27 17:31:48 -04:00
Zbigniew Jędrzejewski-Szmek acc114f21c Actually add the patches 2017-06-27 16:30:12 -04:00
Zbigniew Jędrzejewski-Szmek 054ce3eced Fix build and backport one more patch which restores efficiency 2017-06-27 14:23:48 -04:00
Zbigniew Jędrzejewski-Szmek 4bbfd1a314 Fix an out-of-bounds write in systemd-resolved 2017-06-27 13:43:24 -04:00
Zbigniew Jędrzejewski-Szmek d743bb5bcc Revert "Build with meson"
This reverts commits 3fb4a15096
and 0e8350ca14.

Either building with meson or other upstream changes was causing
issues with booting, and I didn't have time to debug this properly.
2017-06-27 13:42:28 -04:00
Zbigniew Jędrzejewski-Szmek 0e8350ca14 Upload new sources 2017-06-16 12:08:17 -04:00
Zbigniew Jędrzejewski-Szmek 3fb4a15096 Build with meson 2017-06-16 11:54:00 -04:00
Zbigniew Jędrzejewski-Szmek 1d06cbf3d4 Also update hwdb_parse.py
This is needed because an additional property was added and the
tests fail otherwise. I think adding of the property is OK, it's
fully backwards compatible.

Also use %if 0 syntax to make it easy to copy&paste the commands.
2017-06-15 11:25:17 -04:00
Zbigniew Jędrzejewski-Szmek f4a67616bd Backport a bunch of fixes 2017-06-15 10:26:56 -04:00
Zbigniew Jędrzejewski-Szmek ee53796748 Pull in xzcat and lz4cat, used in test-compress
lz4 and lz4-libs is split in F26+. Not sure about xz, but let's pull
it in for safety.
2017-06-07 13:16:38 -04:00
Pat Riehecky c0f6af7fcc Use ID from /etc/os-release as ntpvendor 2017-04-18 16:43:25 -04:00
Zbigniew Jędrzejewski-Szmek 3e3b80766f Drop soft-static uid for systemd-journal-gateway
It has been removed from the uidgid list in setup, we should assign
a dynamic uid.
2017-03-27 11:03:08 -04:00
Michal Sekletar e47c648430 Add lz4 to build dependencies
This commit fixes build failure due to failed "make check".

Our test-compress uses lz4cat. Binary is included in lz4 package that
used to contain both library and binaries. Since lz4-libs split-off we
need to explicitly pull-in lz4.

See: http://pkgs.fedoraproject.org/cgit/rpms/lz4.git/commit/?id=34760ea9354a972f946af0282e2c145c660a823c
2017-03-16 09:47:07 +01:00
Michal Sekletar f5f0737829 Backport bugfixes from upstream
Most notably this commit fixes #1419501 that caused mock traceback when
running with --new-chroot.

Resolves: #1419501
2017-03-16 09:16:18 +01:00
Zbigniew Jędrzejewski-Szmek 2809df176d Fix installation conflict with polkit
Error: Transaction check error:
  file /usr/share/polkit-1/rules.d from install of systemd-233-1.fc27.x86_64 conflicts with file from package polkit-0.113-7.fc26.x86_64
2017-03-02 13:37:46 -05:00
Zbigniew Jędrzejewski-Szmek bb41272694 Update to v233 2017-03-02 11:30:49 -05:00
Zbigniew Jędrzejewski-Szmek 4877912f6e Add %ghost %dir entries for .wants dirs of our targets
What is included:
- .wants directories
- for our own targets listed in systemd.special(7)

This is not supposed to cover all possible .wants and .requires and .d
dirs for all units, or even targets, or even just our targets, but only
the reasonably common ones that we provide.
2017-02-16 13:38:46 -05:00
Zbigniew Jędrzejewski-Szmek 645d1b9eb7 Update description
At least the part about snapshotting was obsolete. Let's use
the text from https://www.freedesktop.org/wiki/Software/systemd/
with some slight modifications.
2017-02-16 13:10:10 -05:00
Zbigniew Jędrzejewski-Szmek 7d23031443 Remove gnutls.pc workaround 2017-02-15 09:46:38 -05:00
Zbigniew Jędrzejewski-Szmek a88eae1c54 gnu-efi is not available on all arches 2017-02-14 18:59:10 -05:00
Zbigniew Jędrzejewski-Szmek 40fcd871d4 Patch for test-ipcrm
It is part of unsafe-tests. It got enabled and turned out to be failing
in the koji environment.
2017-02-14 18:44:48 -05:00
Zbigniew Jędrzejewski-Szmek 6353553a57 Just nuke the gnutls private deps
It still fails in koji, and I'd have to download each package from
koji by hand to find out what is the issue (or wait until tomorrow for
a compose). Let's just nuke the whole thing, all deps should be installed.
2017-02-14 17:31:23 -05:00
Zbigniew Jędrzejewski-Szmek cfadacd273 Add explicit --enable switches for all optional deps
Also turn on "unsafe" tests.
2017-02-14 17:17:52 -05:00
Zbigniew Jędrzejewski-Szmek d4f0a28c8c Add work-around for misdetection of gnutls and µhttpd 2017-02-14 17:05:48 -05:00
Zbigniew Jędrzejewski-Szmek 0f34996575 Ignore the hwdb parser test
Previous commits backported some newer properties, but hwdb/parse_hwdb.py
was not updated. Just ignore it for now.
2017-02-14 15:40:19 -05:00
Jan Synacek 78d35a9ba2 machinectl fails when virtual machine is running (#1419501)
Resolves: #1419501
2017-02-14 11:59:00 +01:00
Zbigniew Jędrzejewski-Szmek f020f8b986 Overwrite LC_CTYPE
Build failed with the following:

Traceback (most recent call last):
  File "./hwdb/parse_hwdb.py", line 195, in <module>
    groups = parse(fname)
  File "./hwdb/parse_hwdb.py", line 136, in parse
    parsed = grammar.parseFile(fname)
  File "/usr/lib/python3.6/site-packages/pyparsing.py", line 2142, in parseFile
    file_contents = f.read()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 15765: ordinal not in range(128)

In mock, LC_CTYPE is unset, so python3 defaults to ascii, uselessly.

I think "ID_VENDOR_FROM_DATABASE=VENGIT Korlátolt Felelősségű Társaság"
is the issue here.
2017-02-13 13:18:08 -05:00
Fedora Release Engineering 6c1e2a67b2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 14:24:20 +00:00
Zbigniew Jędrzejewski-Szmek 5d6eedd538 Moar patches 2017-01-31 12:11:17 -05:00
Zbigniew Jędrzejewski-Szmek b6b3541a52 Also include gperf compat patch 2017-01-29 18:26:01 -05:00
Zbigniew Jędrzejewski-Szmek 405c2cd182 Update hwdb to current git
The header on the patch is fake. git am does not deal well with just
diff output, mumbling the following:

  Applying: seccomp: rework seccomp code, to improve compat with some archs
  Applying:
  fatal: empty ident name (for <>) not allowed

We should really move away from mucking around with text patches.
2017-01-29 17:42:53 -05:00
Zbigniew Jędrzejewski-Szmek 6396212453 Compile with --enable-tpm 2017-01-29 17:39:09 -05:00
Zbigniew Jędrzejewski-Szmek 03e93e27d9 A number of backported patches, incl. seccomp fix 2017-01-29 17:38:52 -05:00
Adam Williamson 4c60d7b5ae Backport fix for boot failure in initrd-switch-root (#1414904) 2017-01-19 15:37:04 -08:00
Zbigniew Jędrzejewski-Szmek 74dc679828 Add fake dependency on systemd-pam to systemd-devel 2017-01-18 10:11:37 -05:00
Zbigniew Jędrzejewski-Szmek 25bd358ef1 Make sure we have our compressions libs ready
In case some library is not detected properly in the future, fail
the /configure step. We should probably do that for most deps, but
I'm too lazy atm.
2017-01-16 23:15:39 -05:00
Jan Synacek eaf2f302c0 Fix buildsystem to check for lz4 correctly (#1404406) 2017-01-16 23:12:23 -05:00
Zbigniew Jędrzejewski-Szmek ca3c77beb2 Revert b69d36e571
This was already fixed in e134e692b6.
2017-01-11 20:19:41 -05:00
Zbigniew Jędrzejewski-Szmek b810fade77 Use shorter syntax for shell redirections 2017-01-11 17:51:30 -05:00
Zbigniew Jędrzejewski-Szmek e4286e550e Also require sed and grep for libs %post
https://bugzilla.redhat.com/show_bug.cgi?id=1392236#c12
2017-01-11 17:38:12 -05:00
Zbigniew Jędrzejewski-Szmek 9286eca9c8 Remove stderr redirection from preset/disable calls in scriplets
We don't expect those calls to fail (they should work fine both
with systemd running and without). But if they fail, most likely
some unit is missing or misspelt, which we want to catch.
2017-01-11 14:33:24 -05:00
Zbigniew Jędrzejewski-Szmek 734f625c22 Drop console-shell.service from preset invocation
Missing unit would case the whole systemctl preset call to fail,
breaking getty@.service instantiation.

Reported by adamw.
2017-01-11 14:30:44 -05:00
Zbigniew Jędrzejewski-Szmek 324bf560f7 Bump dbus dependency version just in case
https://github.com/systemd/systemd/commit/0298f55bb0.
2017-01-11 13:30:19 -05:00
Zbigniew Jędrzejewski-Szmek b69d36e571 Add patch to restore Fedora-specific systemd-user PAM config 2017-01-11 12:16:22 -05:00
Kevin Fenzi 04206f627a Fix scriptlets to never fail in libs post. 2017-01-07 11:43:47 -07:00
Kevin Fenzi 1eb707d840 Add patch from Michal Schmidt to avoid process substitution. (#1392236) 2017-01-06 10:57:27 -07:00
Zbigniew Jędrzejewski-Szmek 1ec648fc4c Rebuild
Building with 232-2 in the buildroot did not work, because rpm cannot
unpack 232-2 properly. 232-has been untagged, so maybe things will
work now.
2016-11-07 12:30:04 -05:00
Zbigniew Jędrzejewski-Szmek c91b73ea39 Make /etc/dbus-1/system.d directory non-%ghost
koschei builds are failing on systemd.rpm:

DEBUG util.py:421:  error: unpacking of archive failed on file
                 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf;581cb002: cpio: open
DEBUG util.py:421:  error: systemd-232-2.fc26.x86_64: install failed
2016-11-04 13:04:17 -04:00
Zbigniew Jędrzejewski-Szmek 348151a546 Fix ownership of directories we create
Previously unowned:
systemd-229-16.fc24.x86_64
|-- /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.locale1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.login1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.network1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.resolve1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
|-- /etc/dbus-1/system.d/org.freedesktop.timedate1.conf
|-- /usr/share/factory/etc/nsswitch.conf
|-- /usr/share/factory/etc/pam.d/other
'-- /usr/share/factory/etc/pam.d/system-auth
systemd-container-229-16.fc24.x86_64
|-- /etc/dbus-1/system.d/org.freedesktop.import1.conf
'-- /etc/dbus-1/system.d/org.freedesktop.machine1.conf
2016-11-04 09:58:31 -04:00
Zbigniew Jędrzejewski-Szmek e134e692b6 Fix systemd-user PAM config and two packaging issues 2016-11-04 09:46:25 -04:00
Zbigniew Jędrzejewski-Szmek d81bdc27d3 Fix kernel-install 2016-11-04 09:12:11 -04:00
Zbigniew Jędrzejewski-Szmek 523b6ce46a Run testsuite in parallel 2016-11-03 22:11:56 -04:00
Zbigniew Jędrzejewski-Szmek 62b1bf52df Move systemd-nspawn man pages to the right subpackage 2016-11-03 22:11:56 -04:00
Zbigniew Jędrzejewski-Szmek da15385b06 Update sed-foo to enable nss-systemd and add UNAVAIL fallback for resolve
Only fall back to "dns" if nss-resolve is not installed (for the
architecture of the calling program). Once it is, we never want to
fall back to "dns" as that breaks enforcing DNSSEC verification and
also pointlessly retries NXDOMAIN failures.

C.f. https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=5e00954
2016-11-03 22:11:56 -04:00
Zbigniew Jędrzejewski-Szmek 12da227455 Replace grubby patch with a short-circuiting install.d "plugin" 2016-11-03 22:11:56 -04:00
Zbigniew Jędrzejewski-Szmek e42bd854c0 Create systemd-coredump user in %pre 2016-11-03 21:16:45 -04:00
Zbigniew Jędrzejewski-Szmek a6473965d9 Add %{_isa} to Provides on arch-full packages 2016-11-03 21:16:45 -04:00
Zbigniew Jędrzejewski-Szmek 1478fab950 Update to v232 2016-11-03 21:16:45 -04:00
Jan Synacek 14572d7192 SPC - Cannot restart host operating from container (#1384523)
Resolves: #1384523
2016-10-18 14:14:59 +02:00
Zbigniew Jędrzejewski-Szmek 7ae71c8772 Move nss-myhostname provides to systemd-libs
Also drop the removal of nss modules in %postun. If the module cannot be
loaded, it is simply ignored. It seems better to simply leave it there,
then play around with nsswitch.conf, which is always risky.
2016-10-11 13:03:07 -04:00
Zbigniew Jędrzejewski-Szmek 4e1286dd8b Do not recreate /var/log/journal on upgrades 2016-10-09 10:25:34 -04:00
Zbigniew Jędrzejewski-Szmek 65fed72862 Prevent systemd-udev-trigger.service from restarting
systemd-udev package should be updated in lockstep, so we rely on the
daemon-reexec in systemd.rpm's %post to get the drop in loaded.
2016-10-07 07:55:56 -04:00
Zbigniew Jędrzejewski-Szmek 51f362c39a Use install --target-directory 2016-10-07 07:55:33 -04:00
Zbigniew Jędrzejewski-Szmek 64282b85b2 Fix systemctl set-default 2016-10-07 07:55:30 -04:00
Zbigniew Jędrzejewski-Szmek 839ccebd9b Apply fix for systemd-udev upgrade causing Xorg crash 2016-10-04 16:48:13 -04:00
Zbigniew Jędrzejewski-Szmek a2242c1ded Apply patches properly 2016-10-03 12:12:41 -04:00
Zbigniew Jędrzejewski-Szmek 3a5d9b71f4 Better fix for the notify message issue 2016-09-29 17:04:15 -04:00
Zbigniew Jędrzejewski-Szmek 20fa848003 Fix for the empty notify message fuckup 2016-09-29 05:34:51 -04:00
Zbigniew Jędrzejewski-Szmek 8f85f19830 Revert "Add self-obsoletes on versions < 231"
This reverts commit 3250f00573.

This is not needed anymore, since we went the Recommends:systemd-bootchart
route.
2016-09-29 05:18:54 -04:00
Zbigniew Jędrzejewski-Szmek ef73cc0d30 Recommend systemd-bootchart
It was split out, but it's a tiny package so it's easiest to pull it
in on all "standard" installations.
2016-09-26 15:16:25 -04:00
Zbigniew Jędrzejewski-Szmek 3250f00573 Add self-obsoletes on versions < 231
https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c7
2016-09-22 08:11:33 -04:00
Zbigniew Jędrzejewski-Szmek 696e2f22d4 Fixes for preset-all, daemon-reexec, and other bugs 2016-08-25 16:13:45 -04:00
Michal Sekletar 2666b4f578 Use static uid/gid for systemd-{resolve,network}
Clearly we have static uid/gid allocated so let's actually use them.

egrep 'systemd-resolve|network' /usr/share/doc/setup/uidgid
systemd-network 192     192     /               /sbin/nologin   systemd
systemd-resolve 193     193     /               /sbin/nologin   systemd
2016-08-04 15:14:41 +02:00
Michal Sekletar 126aa118e1 Don't create systemd-bus-proxy user and group
We no longer ship bus-proxyd hence user and group are not needed
anymore.
2016-08-04 14:18:42 +02:00
Zbigniew Jędrzejewski-Szmek edb4e05013 Avoid % in comments
https://bugzilla.redhat.com/show_bug.cgi?id=1347865
2016-08-04 01:05:08 -04:00
Adam Williamson c418e76b87 build with preset-all reversion 2016-08-03 11:35:49 -07:00
Adam Williamson 287353c355 Revert "Run preset-all on initial installation"
This reverts commit 46083abe1a.
preset-all really does not work right, disabling all sorts of
stuff it should not disable. This caused RHBZ #1363858 (no tty
on vt1) and probably broke other things too.
2016-08-03 11:32:13 -07:00
Zbigniew Jędrzejewski-Szmek 140d00ebaa Fix botched %_isa dependency 2016-07-26 21:33:39 -04:00
Zbigniew Jędrzejewski-Szmek 46083abe1a Run preset-all on initial installation
https://bugzilla.redhat.com/show_bug.cgi?id=1118740
2016-07-26 20:13:34 -04:00
Zbigniew Jędrzejewski-Szmek 6153dd9122 Version 231 2016-07-26 15:12:35 -04:00
Zbigniew Jędrzejewski-Szmek 1ed18e5e9d Remove a bunch of old cruft 2016-07-26 14:24:30 -04:00
Zbigniew Jędrzejewski-Szmek ee7e6a6d57 Add missing man files to -container
Patch from mihkulemin@gmail.com.
2016-06-30 09:04:42 -04:00
Zbigniew Jędrzejewski-Szmek 49a32c19f1 Disable KillUserProcesses for now
https://fedorahosted.org/fesco/ticket/1580
2016-06-08 01:11:08 -04:00
Zbigniew Jędrzejewski-Szmek abad21f221 Update to git snapshot 2016-06-08 01:10:04 -04:00
Zbigniew Jędrzejewski-Szmek b3d8d37d58 Remove systemd-compat-libs on upgrade 2016-05-21 23:56:03 -04:00
Zbigniew Jędrzejewski-Szmek 8f6ec2ee91 Version 230 2016-05-21 20:15:34 -04:00
Zbigniew Jędrzejewski-Szmek 8efe61bc18 Remove duplicated entries in -container %files 2016-04-26 07:58:16 -04:00
Zbigniew Jędrzejewski-Szmek b7ec953f25 Move udev-related commands to udev's %post
This removed the operation of stopping udevd in %pre, and starting it
in %post. I think this shouldn't be necessary anymore.
2016-04-22 15:52:47 -04:00
Zbigniew Jędrzejewski-Szmek 994aacdaa6 Include license file in systemd-libs
It can be installed without the main package, so it should carry the file
too.
2016-04-18 12:54:30 -04:00
Zbigniew Jędrzejewski-Szmek 28e2d47eef Split out systemd-pam subpackage
This allows minimal installations without systemd but with systemd-libs installed
to drop the dependency on pam.
2016-04-18 11:51:52 -04:00
Zbigniew Jędrzejewski-Szmek 8b4408b5c9 Use %include to include filetrigger script from file
This makes it easier to update them from the upstream version.
2016-04-18 11:51:16 -04:00
Harald Hoyer f7a77f9cb0 move more binaries and services from the main package to subpackages 2016-04-18 17:39:04 +02:00
Harald Hoyer 7f4276c417 move more binaries and services from the main package to subpackages 2016-04-18 16:58:13 +02:00
Harald Hoyer cf1399ec4a move device dependant stuff to the udev sub package 2016-04-18 11:11:24 +02:00
Zbigniew Jędrzejewski-Szmek b54bf1386b Own linger dir 2016-04-10 11:21:43 -04:00
Zbigniew Jędrzejewski-Szmek 37de5dfe28 Add myhostname to /etc/nsswitch.conf 2016-03-22 10:45:58 -04:00
Harald Hoyer 253663e57d kernel-install: fixed patch format 2016-03-21 11:56:11 +01:00
Harald Hoyer afdf3eeb86 systemd-229-8
- fixed kernel-install for copying files for grubby
Resolves: rhbz#1299019
2016-03-21 11:45:52 +01:00
Harald Hoyer 70cb855cd7 kernel-install-grubby.patch: correctly copy files with "-T"
"cp -T" ensures a directory is not installed as a directory in the
target directory
2016-03-21 11:42:31 +01:00
Harald Hoyer f9a2211aaa Revert "Revert "kernel-install-grubby.patch: only copy files to /boot on "add"""
This reverts commit 4ee6493f72.
2016-03-21 11:25:03 +01:00
Zbigniew Jędrzejewski-Szmek b9a1e35039 Backport a few more patches 2016-03-17 09:26:12 -04:00
Zbigniew Jędrzejewski-Szmek c7c4361581 Move tmpfiles-setup-dev to systemd-udev subpackage
This removes the dependency on kmod from the main package
(kmod-libs is still required).
2016-03-17 08:52:09 -04:00
Zbigniew Jędrzejewski-Szmek 43a7716012 Also protect systemd-udev from removal 2016-03-15 15:34:52 -04:00
Zbigniew Jędrzejewski-Szmek 0a19dfe97e Move vconsole-setup to systemd-udev subpackage 2016-03-15 15:34:17 -04:00
Zbigniew Jędrzejewski-Szmek bed2768dc7 Patch for failing compression test case 2016-03-11 18:24:49 -05:00
Zbigniew Jędrzejewski-Szmek 6428127a18 Add patch for #1313085 2016-03-11 17:49:05 -05:00
Zbigniew Jędrzejewski-Szmek 7aba950aa4 Output test-suite.log on test failures 2016-03-04 13:24:11 -05:00
Zbigniew Jędrzejewski-Szmek 2b682337e7 Backport a bunch of patches 2016-03-04 13:06:46 -05:00
Zbigniew Jędrzejewski-Szmek c16b573717 Split out system-udev subpackage 2016-03-04 13:06:46 -05:00
Zbigniew Jędrzejewski-Szmek 34bfceffe6 Split out systemd-container subpackage 2016-03-04 12:52:57 -05:00
Zbigniew Jędrzejewski-Szmek 8ad6641ff2 Remove obsolete python bits from spec file 2016-03-04 12:07:48 -05:00
Peter Robinson 1a10d33b63 bump Release 2016-03-01 11:56:58 +00:00
Peter Robinson 624d2b7fea Power64 and s390(x) now have libseccomp support, aarch64 has gnu-efi 2016-03-01 11:13:00 +00:00
Jan Synacek 92af61aefe Fix build failures on ppc64 (#1310800)
Resolves: #1310800
2016-02-23 10:10:16 +01:00
Dennis Gilmore 18259f3b8c revert: fixed kernel-install for copying files for grubby
Resolves: rhbz#1299019
- this causes the dtb files to not get installed at all and the fdtdir
- line in extlinux.conf to not get updated correctly
2016-02-16 16:33:04 -06:00
Dennis Gilmore 4ee6493f72 Revert "kernel-install-grubby.patch: only copy files to /boot on "add""
The fix is worse than the bug it tries to fix

This reverts commit 908de082ce.
2016-02-16 16:29:38 -06:00
Michal Sekletar 5a1e61f28b New upstream release 2016-02-11 20:11:09 +01:00
Harald Hoyer 0a417f082a systemd-228-10.gite35a787
- fixed kernel-install for copying files for grubby
Resolves: rhbz#1299019
2016-02-11 10:59:48 +01:00
Harald Hoyer 908de082ce kernel-install-grubby.patch: only copy files to /boot on "add"
Also make sure directories are copied to the same place and not in the
already existing directory.

https://bugzilla.redhat.com/show_bug.cgi?id=129901
2016-02-11 10:55:30 +01:00
Jan Synacek 340bf090f9 remove spurious slashes (#1303344) 2016-02-11 09:37:05 +01:00
Zbigniew Jędrzejewski-Szmek 1dc1e2f91f Remove duplicate from %files 2016-02-10 15:11:53 -05:00
Zbigniew Jędrzejewski-Szmek ebd481af7f Add patch to fix {net,linux}/if.h conflict 2016-02-10 15:05:03 -05:00
Fedora Release Engineering 4df4d1391d - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 01:12:51 +00:00
Peter Robinson e53f79084e Rebuild for binutils on aarch64 fix 2016-01-27 08:38:20 +00:00
Dan Horák f08e792a66 - apply the conflict with fedora-release only in Fedora 2016-01-08 10:48:55 +01:00
Jan Synacek 2ec3b0659d Fix rawhide build failures on ppc64 (#1286249) 2015-12-10 13:47:25 +01:00
Zbigniew Jędrzejewski-Szmek 25282cb229 Require tree for tests 2015-12-01 23:53:29 -05:00
Zbigniew Jędrzejewski-Szmek d8151dbe1d Create /etc/systemd/network 2015-11-29 01:12:44 -05:00
Zbigniew Jędrzejewski-Szmek 38d93ea79f Do not install nss modules by default 2015-11-26 11:01:20 -05:00
Zbigniew Jędrzejewski-Szmek 1279f70ebd Update to git snapshot 2015-11-23 22:41:11 -05:00
Zbigniew Jędrzejewski-Szmek 80f2df5146 Convert file trigger scripts to lua
At least the %filetriggerpostun script can be invoked hundreds of
times during an upgrade, so it makes sense to optimize it a bit.

assert(exec(...)) is used because of https://bugzilla.redhat.com/show_bug.cgi?id=1094072.
2015-11-22 19:59:39 -05:00
Zbigniew Jędrzejewski-Szmek dc105f307e Improve filetriggers to run in all required situations 2015-11-22 19:53:05 -05:00
Zbigniew Jędrzejewski-Szmek 56be258e41 Add BR:lz4 2015-11-19 08:46:22 -05:00
Zbigniew Jędrzejewski-Szmek fc651191db Enable rpm file triggers for daemon-reload
We have to do this now because the corresponding change to rpm macros
was merged into systemd-228.
2015-11-19 08:25:57 -05:00
Zbigniew Jędrzejewski-Szmek 5767bd4538 Fix version number in obsoleted package name 2015-11-18 20:22:43 -05:00
Kay Sievers 32b81ffc99 New upstream release 2015-11-18 11:10:43 +01:00
Zbigniew Jędrzejewski-Szmek 38ce1c6b7e Revert last four commits
Pushed by mistake too early :(
2015-11-14 19:38:10 -05:00
Zbigniew Jędrzejewski-Szmek 7a0ef9c797 Use file trigger to call systemctl daemon-reload 2015-11-14 19:32:46 -05:00
Zbigniew Jędrzejewski-Szmek 895657f1cb Move more files to -udev 2015-11-13 20:52:25 -05:00
Zbigniew Jędrzejewski-Szmek fb4fe7a672 Split out system-udev subpackage 2015-11-13 20:52:24 -05:00
Zbigniew Jędrzejewski-Szmek 30dafa4290 Split out systemd-container subpackage 2015-11-13 20:52:06 -05:00
Zbigniew Jędrzejewski-Szmek 49f71b6ae3 Do not assume fstab is present 2015-11-13 20:51:46 -05:00
Zbigniew Jędrzejewski-Szmek a884a616c9 Ignore the access mode on /var/log/journal 2015-11-12 00:03:27 -05:00
Zbigniew Jędrzejewski-Szmek a67535cbef Remove obsolete %post script 2015-11-12 00:03:27 -05:00
Zbigniew Jędrzejewski-Szmek b321c5a2de Rename journal-gateway subpackage to journal-remote
We have outgrown the old name...
2015-11-12 00:03:27 -05:00
Zbigniew Jędrzejewski-Szmek 76c0b72634 Remove obsoletes for old systemd version 2015-11-11 23:50:31 -05:00
Zbigniew Jędrzejewski-Szmek aec27b1382 Remove sysvinit from description
Sysvinit is long gone, no need to mention it.
2015-11-11 23:50:31 -05:00
Peter Robinson 2532db13a7 Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 2015-11-11 12:07:32 +00:00
Lukas Nykryn 684a3bc691 Rebuild for libmicrohttpd soname bump 2015-11-10 17:14:29 +01:00
Robert Kuska 984ca0bc57 Rebuilt for Python3.5 rebuild 2015-11-06 12:59:00 +01:00
Kalev Lember 13362c9950 Fix up the patch to apply 2015-11-04 19:20:13 +01:00
Zbigniew Jędrzejewski-Szmek 35c1f69c22 Fix syntax in kernel install 2015-11-04 11:24:13 -05:00
Michal Schmidt 339d9a453b Rebuild for libmicrohttpd soname bump 2015-11-03 13:12:12 +01:00
Harald Hoyer f6039fadea kernel-install: fixed hmac filename
hmac is .vmlinuz-<version>.hmac so needs a special treatment
2015-10-08 16:26:38 +02:00
Harald Hoyer d4f2656784 kernel-install: restorecon the files copied to /boot 2015-10-08 16:13:16 +02:00
Kay Sievers 456eac18c7 New upstream release 2015-10-07 17:13:28 +02:00
Jan Synacek 5cdbe47c57 user systemd-journal-upload should be in systemd-journal group (#1262743) 2015-09-18 12:51:56 +02:00
Kay Sievers 7f82478f26 Fix sources 2015-09-18 01:36:56 +02:00
Kay Sievers 4463a3b894 Add selinux to system-user PAM config 2015-09-18 01:20:51 +02:00
Kay Sievers 41553e0ec2 New upstream release 2015-09-08 16:46:01 +02:00
Kay Sievers 6c1029f225 New upstream release 2015-08-27 17:06:22 +02:00
Kay Sievers b3ddfbd31c update tarball 2015-07-31 19:04:35 +02:00
Kay Sievers a5c858d8e5 New upstream release 2015-07-31 18:50:25 +02:00
Kay Sievers 5bd45994d7 update to git snapshot 2015-07-30 00:06:38 +02:00
Harald Hoyer 60a0b61d40 systemd.spec: it's "Recommends" not "Wants" 2015-07-29 19:31:53 +02:00
Harald Hoyer 68323a2a5a systemd.spec: turn diffutils into a soft requirement
diffutils is only needed for systemd-delta
2015-07-29 16:51:57 +02:00
Harald Hoyer 5c1c8ba5ff systemd.spec: require util-linux
we want /bin/mount
2015-07-29 16:50:23 +02:00
Kay Sievers 741490beeb New upstream release 2015-07-29 13:14:57 +02:00
Zbigniew Jędrzejewski-Szmek 35ec3ad770 python3-devel is required to expand macros 2015-07-25 14:30:54 -04:00
Zbigniew Jędrzejewski-Szmek 5b850f53b9 Fix sources 2015-07-25 13:54:20 -04:00
Zbigniew Jędrzejewski-Szmek 952794e6c0 Remove python subpackages and build just once 2015-07-25 00:14:03 -04:00
Zbigniew Jędrzejewski-Szmek a97e1246d5 Remove hidden files which are now part of the tarball
There were some fixes upstream for this, so it might not be necessary
starting with the next release.
2015-07-25 00:12:23 -04:00
Zbigniew Jędrzejewski-Szmek 3dfe820830 Use github tarballs
tar.xz is 800kB smaller than tar.gz, but not having to create the tarball
manually is much more convenient.
2015-07-25 00:11:30 -04:00
Kay Sievers a5e55f9d9f update tarball 2015-07-07 22:13:03 +02:00
Kay Sievers f7ff95060d New upstream release 2015-07-07 17:40:34 +02:00
Zbigniew Jędrzejewski-Szmek 036292004a Correct version in changelog 2015-07-06 15:00:20 -04:00
Zbigniew Jędrzejewski-Szmek 5984675661 Restore translation check and fix bug link
If the check fails, then systemd.i686 and systemd.x86_64 is most
likely non-coinstallable, which is problematic for users because it
breaks upgrades. So keep the check to catch botched builds until we
find underlying reason.
2015-07-06 14:59:36 -04:00
Kay Sievers 516775d649 update to git snapshot 2015-07-06 18:07:38 +02:00
Zbigniew Jędrzejewski-Szmek 52a9194e13 Bump release 2015-07-05 23:02:34 -04:00
Zbigniew Jędrzejewski-Szmek 527912bf78 Correct version in changelog 2015-07-05 22:52:35 -04:00
Zbigniew Jędrzejewski-Szmek 90aeeef683 Add example file with yama config 2015-07-05 22:52:35 -04:00
Kay Sievers 9a11c6baf7 temporary fix to work around broken kernel headers 2015-07-05 18:54:43 +02:00
Kay Sievers 569c6fda50 add missing journal-nocow.conf tmpfiles 2015-07-05 17:32:26 +02:00
Kay Sievers 790f46d643 update to git snapshot 2015-07-05 17:06:37 +02:00
Kay Sievers e074d0f41a always use "git archive" tarballs 2015-07-05 16:47:32 +02:00
Kay Sievers ee6fc81588 build systemd-boot EFI tools 2015-06-22 22:24:47 +02:00
Lennart Poettering e40887b16d New upstream release
- Undoes botched translation check, should be reinstated later?
2015-06-19 13:16:10 +02:00
Dennis Gilmore e3594d6614 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 02:25:02 +00:00
Zbigniew Jędrzejewski-Szmek acdc555f22 Clarify -devel description 2015-06-17 14:49:52 -04:00
Peter Robinson be68e452de The gold linker is now fixed on aarch64 2015-06-11 09:53:16 +01:00
Zbigniew Jędrzejewski-Szmek 436654a8a5 Patches for selinux issue and other problems 2015-06-10 15:08:55 -04:00
Zbigniew Jędrzejewski-Szmek e2168b5f24 Remove gudev 2015-06-09 12:22:05 -04:00
Harald Hoyer 6cfa04faa1 fix udev block device watch 2015-06-09 14:46:39 +02:00
Harald Hoyer 4dc6b4953d add support for network disk encryption 2015-06-09 11:29:38 +02:00
Peter Robinson 01fba4b815 Disable gold on aarch64 until it's fixed (tracked in rhbz #1225156) 2015-06-07 19:29:28 +01:00
Zbigniew Jędrzejewski-Szmek 7a75a5fbec Fix changelog and put hwdb.d in rpm 2015-06-01 21:00:21 -04:00
Zbigniew Jędrzejewski-Szmek 551967d7d9 Check for botched translations 2015-05-30 18:18:12 -04:00
Zbigniew Jędrzejewski-Szmek 9e71abc2c9 systemd-devel should require systemd-libs 2015-05-30 18:11:00 -04:00
Richard W.M. Jones d9b91fa93b Add patch to fix udev --daemon not cleaning child processes
(upstream commit 86c3bece38bcf5).
2015-05-28 09:02:50 +01:00
Richard W.M. Jones 78ba63c3c7 Add patch to fix udev --daemon crash (upstream commit 040e689654ef08). 2015-05-27 13:57:29 +01:00
Lennart Poettering 90957559ef really the new sources 2015-05-21 23:40:16 +02:00
Lennart Poettering 0a658c0c61 newer tarball 2015-05-21 23:36:08 +02:00
Lennart Poettering 836567c7a3 New upstream release
- Drop /etc/mtab hack, as that's apparently fixed in mock now (#1116158)
- Remove ghosting for %{_sysconfdir}/systemd/system/runlevel*.target, these targets are not configurable anymore in systemd upstream
- Drop work-around for #1002806, since this is solved upstream now
2015-05-21 22:39:30 +02:00
Dennis Gilmore 911deca421 fix up the conflicts version for fedora-release 2015-05-20 13:14:50 -05:00
Zbigniew Jędrzejewski-Szmek 05c90300b1 Fix compilation 2015-05-20 11:17:36 -04:00
Zbigniew Jędrzejewski-Szmek 5d3e2085f5 Bump release 2015-05-20 01:37:19 -04:00
Zbigniew Jędrzejewski-Szmek a48f80c6e3 More patches 2015-05-20 01:34:58 -04:00
Zbigniew Jędrzejewski-Szmek 0a8e7e6c19 Remove presets 2015-05-20 00:34:19 -04:00
Zbigniew Jędrzejewski-Szmek 812fb10583 Suppress warning from %post script when dir does not exist 2015-05-20 00:24:27 -04:00
Zbigniew Jędrzejewski-Szmek 75a820ceb0 Fix vconsole.conf sed script (#1218252) 2015-05-05 13:51:19 -04:00
Zbigniew Jędrzejewski-Szmek ef7b485f69 Patches for outstanding annoyances 2015-04-29 10:05:09 -04:00
Zbigniew Jędrzejewski-Szmek 0ab588521d Tighten requirements between subpackages
Use %{?_isa} everywhere: automatically generated requirements do not
specify the exact version. In principle it was possible to satisfy
automatically added requirements with an older systemd, and our manual
R:%{name}=%{version}-%{release} with a systemd package from a
different architecture. So tighten the requirements to make sure all
systemd subpackages are always upgraded in lock-step.

systemd-devel needs to require systemd-compat-libs explicitly. Otherwise
we get dangling symlinks.
2015-04-08 11:27:05 -04:00
Zbigniew Jędrzejewski-Szmek 77e6ed9659 More patches for outstanding bugs 2015-03-23 00:52:38 -04:00
Zbigniew Jędrzejewski-Szmek ffc19a0568 Create /var/lib/systemd/journal-upload 2015-03-23 00:52:37 -04:00
Zbigniew Jędrzejewski-Szmek c4099ef515 Move more stuff to systemd-journal-gatewayd subpackage 2015-03-22 23:36:54 -04:00
Zbigniew Jędrzejewski-Szmek c9f04dae19 Introduce helper variables for commonly used dirs
No change intended.
2015-03-22 22:52:11 -04:00
Zbigniew Jędrzejewski-Szmek 41d7c09d1b Reconfigure old Finnish keymaps in post 2015-03-14 12:08:23 -04:00
Zbigniew Jędrzejewski-Szmek 399a2a87d9 Backport a bunch of patches 2015-03-14 12:08:23 -04:00
Jan Synacek b4d5d4640a Buttons on Lenovo X6* tablets broken (#1198939) 2015-03-10 14:17:28 +01:00
Zbigniew Jędrzejewski-Szmek fa31ee886b Restore test verbosity 2015-03-03 19:21:12 -05:00
Zbigniew Jędrzejewski-Szmek 9c0d1d5a07 Remove s390 workaround 2015-03-03 19:21:12 -05:00
Zbigniew Jędrzejewski-Szmek b081c530a5 Remove duplicate ACLs in %post
This fixes a problem added during development, so it should be enough
to carry the scriplet for some time and remove it in all branches before
F22 goes stable.
2015-03-03 19:21:12 -05:00
Zbigniew Jędrzejewski-Szmek e4a83a82af Bugfixes 2015-03-03 19:21:12 -05:00
Michal Schmidt ade6190d36 arm: reenable lto. gcc-5.0.0-0.16 fixed the crash (#1193212) 2015-02-25 10:01:30 +01:00
Colin Walters b1d608a2b3 Revert patch that breaks Atomic/OSTree (#1195761)
Conflicts:
	systemd.spec
2015-02-24 17:46:22 -05:00
Michal Schmidt 5427ee063b Undo the resolv.conf workaround, Aim for a proper fix in Rawhide.
Do not merge this into F22 until other components are fixed (#1116651).

[See me reverting my reverts like a real weenie!]
2015-02-20 17:31:24 +01:00
Michal Schmidt 0cb630f4ff Revive fedora-disable-resolv.conf-symlink.patch to unbreak composes 2015-02-20 14:22:02 +01:00
Michal Schmidt 6e198e4088 arm: disabling gold did not help; disable lto instead (#1193212) 2015-02-18 17:00:58 +01:00
Michal Schmidt 68864dcf85 Merge branch 'master' into f22
Sew diverged branches.
2015-02-18 08:46:39 +01:00
Peter Jones 2c67f7fe1b Update 90-default.present for dbxtool.
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-02-17 13:38:33 -05:00
Peter Jones df692bb9f2 Add dbxtool to 90-default.present.
As per
https://fedoraproject.org/wiki/Changes/UEFISecureBootBlacklistUpdates ,
this service should be started by default.

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-02-17 13:36:47 -05:00
Peter Jones 5decfd300f Add dbxtool to 90-default.present.
As per
https://fedoraproject.org/wiki/Changes/UEFISecureBootBlacklistUpdates ,
this service should be started by default.

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-02-17 13:36:37 -05:00
Lennart Poettering 78bc69f934 disable gold on arm 2015-02-16 22:55:06 +01:00
Lennart Poettering f93ca2d2c3 new tarball 2015-02-16 22:07:17 +01:00
Lennart Poettering 258b2a4ba8 add missing deps to spec file 2015-02-16 21:54:03 +01:00
Lennart Poettering 1a99f77d64 new release 2015-02-16 20:22:05 +01:00
Lennart Poettering 064fee0cbb New upstream release 2015-02-16 19:24:46 +01:00
Peter Robinson b4bdea39fb aarch64 now has seccomp support 2015-02-16 15:26:55 +00:00
Michal Schmidt c3cf2ae4ec Don't overwrite systemd.macros with unrelated Source file. 2015-02-05 14:24:17 +01:00
Jan Synacek 55323ee7ea Add touchpad hwdb (#1189319) 2015-02-05 09:17:17 +01:00
Zbigniew Jędrzejewski-Szmek f2ebf1a65b Disable rpcbind in presets 2015-01-31 11:50:30 -05:00
Zbigniew Jędrzejewski-Szmek 92e27a50e4 Enable timedatex in presets 2015-01-31 11:48:08 -05:00
Zbigniew Jędrzejewski-Szmek 547d1d8bad Fixup very old fstabs (#1009023) 2015-01-28 15:48:37 -05:00
Zbigniew Jędrzejewski-Szmek 6cf221b459 Fix permissions of /var/log/journal 2015-01-20 00:39:37 -05:00
Zbigniew Jędrzejewski-Szmek c90404b648 Cleanup up spec file a bit 2015-01-19 23:45:50 -05:00
Zbigniew Jędrzejewski-Szmek 5724974576 Turn on verification of keymaps in loginctl 2015-01-16 00:27:43 -05:00
Jan Synacek f524b4a4be RFE: journal: automatically rotate the file if it is unlinked (#1171719) 2015-01-07 14:00:52 +01:00
Zbigniew Jędrzejewski-Szmek b53cf7b99c Add firewalld port descriptions 2015-01-05 22:46:35 -05:00
Jan Synacek 5606d835af systemd-nspawn doesn't work on s390/s390x (#1175394) 2014-12-18 15:36:07 +01:00
Jan Synacek 378cf2ba6f fix version in the comment 2014-12-18 10:15:42 +01:00
Lennart Poettering dfe64b9c42 remove obsolete readahead file on upgrade 2014-12-11 18:56:02 +01:00
Lennart Poettering 9254d88a74 add missing libmount dependency 2014-12-11 00:01:54 +01:00
Lennart Poettering 239db0d9eb new upstream release 2014-12-10 23:50:50 +01:00
Zbigniew Jędrzejewski-Szmek ea19761321 systemd-217-4 2014-11-06 21:58:39 -05:00
Zbigniew Jędrzejewski-Szmek 0440dc0ca2 Bump kmod requirement for #1147248
(cherry picked from commit 74c288b6b9)
2014-11-06 21:58:39 -05:00
Zbigniew Jędrzejewski-Szmek 90edccda2e Change libgudev1 to only require systemd-libs 2014-11-06 20:48:38 -05:00
Michal Schmidt ba201ce670 Fix hanging journal flush (#1159641) 2014-11-05 00:31:09 +01:00
Michal Schmidt 32324f829f Fix ordering cycles involving systemd-journal-flush.service and remote-fs.target (#1159117) 2014-10-31 22:07:17 +01:00
Lennart Poettering c6e31c698a fixed upstream tarball 2014-10-28 19:07:51 +01:00
Lennart Poettering cc4dc44dee new upstream release 2014-10-28 18:32:02 +01:00
Zbigniew Jędrzejewski-Szmek 2607f00f9e Drop PackageKit from presets 2014-10-17 13:21:57 -04:00
Zbigniew Jędrzejewski-Szmek f5ff7e9460 Add conflict with old initscripts and more patches 2014-10-13 10:33:20 -04:00
Zbigniew Jędrzejewski-Szmek db38be6409 More patches 2014-10-13 10:21:01 -04:00
Zbigniew Jędrzejewski-Szmek f1004dc2ae Update to latest git 2014-10-10 14:56:53 -04:00
Zbigniew Jędrzejewski-Szmek cebcd2064c Add bridge configuration 2014-10-07 15:51:56 -04:00
Zbigniew Jędrzejewski-Szmek 801ccd93e2 Steal sysctl.conf from initscripts
Basically another README file for stuff that we manage.
2014-10-07 15:51:56 -04:00
Zbigniew Jędrzejewski-Szmek b1a5d764a3 Steal [uwb]tmp from initscripts
systemd was already creating those files, so it is only an
rpm database accounting change.
2014-10-07 15:51:56 -04:00
Zbigniew Jędrzejewski-Szmek 6d5bee3354 Add /etc/inittab and /etc/crypttab
We are the only user of /etc/crypttab, so it makes sense
that we install.

/etc/inittab contains some instructions to help lost users.
It is very similar to /etc/init.d/README, which we also install.
2014-10-07 15:51:56 -04:00
Zbigniew Jędrzejewski-Szmek 62fe9450da Update to latest git 2014-10-07 15:51:56 -04:00
Kay Sievers 5cdc00d6e6 Revert "don't reset selinux context during CHANGE events"
This reverts commit 9a5afe8dab.

We must not diconnect selinux label application from udev's primary
device node permission handling. They are all applied by udev at
the same time or not applied at all.

External tools which mangle device node permissions must not
install rules to instruct udev to manage the permissions, they
can *own* the device nodes but need to call chmod()/chown()
themselves.
2014-10-01 20:13:26 +02:00
Lukas Nykryn 9a5afe8dab don't reset selinux context during CHANGE events
- add temporary workaround for #1147910
2014-10-01 14:05:41 +02:00
Zbigniew Jędrzejewski-Szmek 0019b3e60d Enable x2gocleansessions.service by default (#1141607) 2014-09-16 05:49:57 -04:00
Michal Schmidt d962ba812f Update timesyncd with patches to avoid hitting NTP pool too often. 2014-09-10 18:40:11 +02:00
Michal Schmidt ed4e5bbcf4 216-5 2014-09-09 20:41:04 +02:00
Michal Schmidt 10e6a8e59d configure with Fedora/RHEL NTP servers
The list of servers taken from the chrony package.
2014-09-09 20:34:49 +02:00
Michal Schmidt c8f466444b define ./configure options common to build2 and build3 only once 2014-09-09 20:34:46 +02:00
Zbigniew Jędrzejewski-Szmek 039253f8be Move config files for sd-j-remote/upload to sd-journal-gateway subpackage 2014-09-03 23:30:41 -04:00
Peter Robinson 522fbab110 Drop no LTO build option for aarch64/s390 now it's fixed in binutils (RHBZ 1091611) 2014-08-28 13:31:54 +01:00
Colin Walters 4dd25f856a Re-add patch to disable resolve.conf symlink 2014-08-21 22:15:40 -04:00
Lennart Poettering 92a80ac51a New upstream release 2014-08-20 01:52:28 +02:00
Peter Robinson 6a2a58eca0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 04:39:33 +00:00
Harald Hoyer bd236f8773 udpate kernel-install-grubby.patch
Copy over the kernel and other files, if the kernel is not in /boot.
2014-08-15 15:44:04 +02:00
Dan Horák a7ae5e1ba8 - disable LTO also on s390(x) 2014-08-13 22:54:19 +02:00
Harald Hoyer 4eb55a70f3 systemd-215-10
- fixed PPC64LE
2014-08-09 15:44:00 +02:00
Tom Callaway 07abe5d036 fix license handling 2014-08-06 06:27:48 +02:00
115 changed files with 2808 additions and 5623 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
*~
/systemd-*/
/.build-*.log
/x86_64/
/systemd-*src.rpm
/systemd-*.tar.xz
/systemd-*.tar.gz
/*.rpm

View File

@ -1,35 +0,0 @@
From ff14f3b995bfa85af05eb3108c96568eadf9d99c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 30 Jun 2014 20:10:16 -0400
Subject: [PATCH] man: add link to Open Group Base Specifications
(cherry picked from commit 9c5dcb68b058b6bde056fc1ece768ba74a120091)
---
man/file-hierarchy.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml
index ed6e0e9a05..408042ee6e 100644
--- a/man/file-hierarchy.xml
+++ b/man/file-hierarchy.xml
@@ -190,7 +190,9 @@
should prefer using the directory
specified in it over directly
referencing
- <filename>/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).</para></listitem>
+ <filename>/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ and
+ <ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">IEEE Std 1003.1</ulink> for details).</para></listitem>
</varlistentry>
</variablelist>
@@ -461,7 +463,8 @@
set they should prefer using the
directory specified in it over
directly referencing
- <filename>/var/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).
+ <filename>/var/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ for details).
</para></listitem>
</varlistentry>

View File

@ -1,65 +0,0 @@
From 7824f773110be8a0cecb89f650e13db03b58d1e1 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Mon, 7 Jul 2014 08:27:43 -0400
Subject: [PATCH] resolved: Move symlink creation from tmpfiles to daemon
runtime
At least Fedora right now doesn't by default use resolved; the service
is disabled by default in the 90-default.preset file.
The change to unconditionally create the resolv.conf symlink broke
Anaconda and related tools (lorax) which expect it to be a regular
file. In particular, Anaconda expects to be able to persist
networking state from the installation environment to the target
system.
A simple fix is to just have resolved itself create it at runtime.
---
src/resolve/resolved-manager.c | 12 +++++++++++-
tmpfiles.d/etc.conf | 1 -
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 3ed0603..1a6b3ac 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -192,9 +192,11 @@ static void append_dns(FILE *f, void *dns, unsigned char family, unsigned *count
int manager_update_resolv_conf(Manager *m) {
const char *path = "/run/systemd/resolve/resolv.conf";
+ const char *etcresolv_path = "/etc/resolv.conf";
_cleanup_free_ char *temp_path = NULL;
_cleanup_fclose_ FILE *f = NULL;
- _cleanup_free_ unsigned *indices = NULL;
+ _cleanup_free_ unsigned *indices = NULL;
+ struct stat st;
Address *address;
unsigned count = 0;
int n, r, i;
@@ -270,6 +272,14 @@ int manager_update_resolv_conf(Manager *m) {
return r;
}
+ /* Create /etc/resolv.conf as a link only if it doesn't exist */
+ if (lstat(etcresolv_path, &st) < 0) {
+ r = symlink(path, etcresolv_path);
+ if (r < 0 && errno != EEXIST) {
+ return r;
+ }
+ }
+
return 0;
}
diff --git a/tmpfiles.d/etc.conf b/tmpfiles.d/etc.conf
index e809dff..4937719 100644
--- a/tmpfiles.d/etc.conf
+++ b/tmpfiles.d/etc.conf
@@ -10,4 +10,3 @@
L /etc/os-release - - - - ../usr/lib/os-release
L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
L+ /etc/mtab - - - - ../proc/self/mounts
-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
--
1.8.3.1

View File

@ -0,0 +1,70 @@
From 2e9d763e7cbeb33954bbe3f96fd94de2cd62edf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 12 Nov 2020 14:28:24 +0100
Subject: [PATCH] test-path-util: do not fail if the fd_is_mount_point check
fails
This test fails on i686 and ppc64le in koji:
/* test_path */
Assertion 'fd_is_mount_point(fd, "/", 0) > 0' failed at src/test/test-path-util.c:85, function test_path(). Aborting.
I guess some permission error is the most likely.
---
src/test/test-path-util.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index f4f8d0550b..be428334f3 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -40,8 +40,6 @@ static void test_path_simplify(const char *in, const char *out, const char *out_
}
static void test_path(void) {
- _cleanup_close_ int fd = -1;
-
log_info("/* %s */", __func__);
test_path_compare("/goo", "/goo", 0);
@@ -80,10 +78,6 @@ static void test_path(void) {
assert_se(streq(basename("/aa///file..."), "file..."));
assert_se(streq(basename("file.../"), ""));
- fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
- assert_se(fd >= 0);
- assert_se(fd_is_mount_point(fd, "/", 0) > 0);
-
test_path_simplify("aaa/bbb////ccc", "aaa/bbb/ccc", "aaa/bbb/ccc");
test_path_simplify("//aaa/.////ccc", "/aaa/./ccc", "/aaa/ccc");
test_path_simplify("///", "/", "/");
@@ -120,6 +114,22 @@ static void test_path(void) {
assert_se(!path_equal_ptr(NULL, "/a"));
}
+static void test_path_is_mountpoint(void) {
+ _cleanup_close_ int fd = -1;
+ int r;
+
+ log_info("/* %s */", __func__);
+
+ fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
+ assert_se(fd >= 0);
+
+ r = fd_is_mount_point(fd, "/", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
+ else
+ assert_se(r == 1);
+}
+
static void test_path_equal_root(void) {
/* Nail down the details of how path_equal("/", ...) works. */
@@ -714,6 +724,7 @@ int main(int argc, char **argv) {
test_print_paths();
test_path();
+ test_path_is_mountpoint();
test_path_equal_root();
test_find_executable_full();
test_find_executable(argv[0]);

View File

@ -0,0 +1,33 @@
From e8bca4ba55f855260eda684a16e8feb5f20b1deb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 12 Nov 2020 15:06:12 +0100
Subject: [PATCH] test-path-util: ignore test failure
---
src/test/test-path-util.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index be428334f3..207c659b8b 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -120,14 +120,17 @@ static void test_path_is_mountpoint(void) {
log_info("/* %s */", __func__);
+ (void) system("uname -a");
+ (void) system("mountpoint /");
+
fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
assert_se(fd >= 0);
r = fd_is_mount_point(fd, "/", 0);
if (r < 0)
log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
- else
- assert_se(r == 1);
+ else if (r == 0)
+ log_warning("/ is not a mountpoint?");
}
static void test_path_equal_root(void) {

View File

@ -1,22 +0,0 @@
From b1177a14132cb362a50f3ee8b79fab65ec6796dd Mon Sep 17 00:00:00 2001
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
Date: Thu, 3 Jul 2014 22:28:29 +0200
Subject: [PATCH] sd-path: add missing header
(cherry picked from commit 0c7448867271180e8ac5795ebdff4bee0c0acd0c)
---
src/libsystemd/sd-path/sd-path.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c
index 7ade915c2b..360c85405b 100644
--- a/src/libsystemd/sd-path/sd-path.c
+++ b/src/libsystemd/sd-path/sd-path.c
@@ -22,6 +22,7 @@
#include "path-util.h"
#include "strv.h"
#include "sd-path.h"
+#include "missing.h"
static int from_environment(const char *envname, const char *fallback, const char **ret) {
assert(ret);

View File

@ -1,25 +0,0 @@
From eda7cab62bcd8ba26a4a8681527684a7c4495357 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 3 Jul 2014 22:52:44 +0200
Subject: [PATCH] architecture: remove "cris" from uname list
the only correct name appears to be "crisv32"...
http://lists.freedesktop.org/archives/systemd-devel/2014-July/020899.html
(cherry picked from commit bc4bc52bc3de56405045b0437e145a7067fb085d)
---
src/shared/architecture.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
index 7dd049a36a..6cdca4e7e5 100644
--- a/src/shared/architecture.c
+++ b/src/shared/architecture.c
@@ -115,7 +115,6 @@ Architecture uname_architecture(void) {
#elif defined(__tilegx__)
{ "tilegx", ARCHITECTURE_TILEGX },
#elif defined(__cris__)
- { "cris", ARCHITECTURE_CRIS },
{ "crisv32", ARCHITECTURE_CRIS },
#else
#error "Please register your architecture here!"

View File

@ -1,50 +0,0 @@
From a8e0b3dcb6cb021193f7ab71e94bcc554cfd0348 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Thu, 3 Jul 2014 21:35:03 +0200
Subject: [PATCH] networkd: link - improve link tracking logging
(cherry picked from commit 393c0c5e64d0cb85ce14f25a06fa8958c9e119e7)
---
src/network/networkd-link.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 14c0417d83..961c1ab8ad 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2140,7 +2140,7 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
r = address_new_dynamic(&address);
if (r < 0)
- return 0;
+ return r;
r = sd_rtnl_message_addr_get_family(message, &address->family);
if (r < 0 || !IN_SET(address->family, AF_INET, AF_INET6)) {
@@ -2204,7 +2204,10 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
case RTM_NEWADDR:
if (!address_dropped)
log_debug_link(link, "added address: %s/%u", buf,
- address->prefixlen);
+ address->prefixlen);
+ else
+ log_debug_link(link, "updated address: %s/%u", buf,
+ address->prefixlen);
LIST_PREPEND(addresses, link->addresses, address);
address = NULL;
@@ -2215,10 +2218,12 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
case RTM_DELADDR:
if (address_dropped) {
log_debug_link(link, "removed address: %s/%u", buf,
- address->prefixlen);
+ address->prefixlen);
link_save(link);
- }
+ } else
+ log_warning_link(link, "removing non-existent address: %s/%u",
+ buf, address->prefixlen);
break;
default:

View File

@ -1,103 +0,0 @@
From f49887cbe75da56dc8555d56c66daad78400b2b3 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Thu, 3 Jul 2014 22:47:51 +0200
Subject: [PATCH] networkd: properly track addresses when first added
When doing a NEWADDR, the reply we get back is the NEWADDR itself, rather
than just an empty ack (unlike how NEWLINK works). For this reason, the
process that did the NEWADDR does not get the broadcast message.
We were only listening for broadcast messages, and hence not tracking the
addresses we added ourselves. This went unnoticed as the kernel will usually
send NEWADDR messages from time to time anyway, so things would mostly work,
but in the worst case we would not notice that a routable address was available
and consider ourselves offline.
(cherry picked from commit 4958aee4977f325be19f0e1e4b424922c3cada5f)
---
src/network/networkd-link.c | 54 +++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 961c1ab8ad..6257372ffd 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -599,10 +599,35 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata)
return 0;
}
+static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+ _cleanup_link_unref_ Link *link = userdata;
+ int r;
+
+ assert(rtnl);
+ assert(m);
+ assert(link);
+ assert(link->manager);
+
+ for (; m; m = sd_rtnl_message_next(m)) {
+ r = sd_rtnl_message_get_errno(m);
+ if (r < 0) {
+ log_debug_link(link, "getting address failed: %s", strerror(-r));
+ continue;
+ }
+
+ r = link_rtnl_process_address(rtnl, m, link->manager);
+ if (r < 0)
+ log_warning_link(link, "could not process address: %s", strerror(-r));
+ }
+
+ return 1;
+}
+
static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
_cleanup_link_unref_ Link *link = userdata;
int r;
+ assert(rtnl);
assert(m);
assert(link);
assert(link->ifname);
@@ -623,6 +648,11 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
link->ifname, strerror(-r),
"ERRNO=%d", -r,
NULL);
+ if (r >= 0) {
+ /* calling handler directly so take a ref */
+ link_ref(link);
+ link_get_address_handler(rtnl, m, link);
+ }
if (link->addr_messages == 0) {
log_debug_link(link, "addresses set");
@@ -2233,30 +2263,6 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
return 1;
}
-static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
- _cleanup_link_unref_ Link *link = userdata;
- int r;
-
- assert(rtnl);
- assert(m);
- assert(link);
- assert(link->manager);
-
- for (; m; m = sd_rtnl_message_next(m)) {
- r = sd_rtnl_message_get_errno(m);
- if (r < 0) {
- log_debug_link(link, "getting address failed: %s", strerror(-r));
- continue;
- }
-
- r = link_rtnl_process_address(rtnl, m, link->manager);
- if (r < 0)
- log_warning_link(link, "could not process address: %s", strerror(-r));
- }
-
- return 1;
-}
-
int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
Link *link;
_cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;

View File

@ -1,26 +0,0 @@
From 9cb3134113680e868cd116944c8d6f0d21c1e939 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Fri, 4 Jul 2014 01:26:19 +0200
Subject: [PATCH] man: netdev - mention tun and tap
Reported by Moviuro <moviuro@gmail.com>
(cherry picked from commit 54f601debc07addbed803fb847cd5bd3e91e021e)
---
man/systemd.netdev.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index c90bd8f98c..857221fdb0 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -163,7 +163,8 @@
<literal>macvlan</literal>, <literal>vxlan</literal>,
<literal>ipip</literal>, <literal>gre</literal>,
<literal>sit</literal>, <literal>vti</literal>,
- <literal>veth</literal>, and <literal>dummy</literal>
+ <literal>veth</literal>, <literal>tun</literal>,
+ <literal>tap</literal> and <literal>dummy</literal>
are supported. This option is compulsory.</para>
</listitem>
</varlistentry>

View File

@ -1,47 +0,0 @@
From fce5e80589911d813dd13d1d0d64df96e0ab7939 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Jul 2014 03:07:20 +0200
Subject: [PATCH] units: conditionalize static device node logic on
CAP_SYS_MODULES instead of CAP_MKNOD
npsawn containers generally have CAP_MKNOD, since this is required
to make PrviateDevices= work. Thus, it's not useful anymore to
conditionalize the kmod static device node units.
Use CAP_SYS_MODULES instead which is not available for nspawn
containers. However, the static device node logic is only done for being
able to autoload modules with it, and if we can't do that there's no
point in doing it.
(cherry picked from commit e0c74691c41a204eba2fd5f39615049fc9ff1648)
---
units/kmod-static-nodes.service.in | 2 +-
units/systemd-tmpfiles-setup-dev.service.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
index 368f980fd1..0934a8751f 100644
--- a/units/kmod-static-nodes.service.in
+++ b/units/kmod-static-nodes.service.in
@@ -9,7 +9,7 @@
Description=Create list of required static device nodes for the current kernel
DefaultDependencies=no
Before=sysinit.target systemd-tmpfiles-setup-dev.service
-ConditionCapability=CAP_MKNOD
+ConditionCapability=CAP_SYS_MODULE
ConditionPathExists=/lib/modules/%v/modules.devname
[Service]
diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
index b9cfc53bd1..06346d3b7c 100644
--- a/units/systemd-tmpfiles-setup-dev.service.in
+++ b/units/systemd-tmpfiles-setup-dev.service.in
@@ -12,7 +12,7 @@ DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-sysusers.service
Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target
-ConditionCapability=CAP_MKNOD
+ConditionCapability=CAP_SYS_MODULE
[Service]
Type=oneshot

View File

@ -1,42 +0,0 @@
From b654a1065f278c93b3891cc5993645026e0d3702 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Jul 2014 03:10:09 +0200
Subject: [PATCH] units: conditionalize configfs and debugfs with CAP_SYS_RAWIO
We really don't want these in containers as they provide a too lowlevel
look on the system.
Conditionalize them with CAP_SYS_RAWIO since that's required to access
/proc/kcore, /dev/kmem and similar, which feel similar in style. Also,
npsawn containers lack that capability.
(cherry picked from commit fa229d09281d435153b4cfd138a2a62fa66d889b)
---
units/sys-kernel-config.mount | 1 +
units/sys-kernel-debug.mount | 1 +
2 files changed, 2 insertions(+)
diff --git a/units/sys-kernel-config.mount b/units/sys-kernel-config.mount
index 020101c0d8..21648eff6a 100644
--- a/units/sys-kernel-config.mount
+++ b/units/sys-kernel-config.mount
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/conf
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
ConditionPathExists=/sys/kernel/config
+ConditionCapability=CAP_SYS_RAWIO
After=systemd-modules-load.service
Before=sysinit.target
diff --git a/units/sys-kernel-debug.mount b/units/sys-kernel-debug.mount
index 5369728a9f..1e94387bac 100644
--- a/units/sys-kernel-debug.mount
+++ b/units/sys-kernel-debug.mount
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
ConditionPathExists=/sys/kernel/debug
+ConditionCapability=CAP_SYS_RAWIO
Before=sysinit.target
[Mount]

View File

@ -1,32 +0,0 @@
From 59afe82145260430e426cf4ac999e8fc69e2a288 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Jul 2014 03:13:05 +0200
Subject: [PATCH] main: change check whether /etc is unpopulated to look for
/etc/machine-id
Previously, we checked whether /etc was completely empty. This makes it
difficult though for container managers such as nspawn to install a
small number of files (such as /etc/timezone), and have the system
otherwise populate its own tree.
Hence, change this by looking for /etc/machine-id, which should be a
good sign whether /etc is populated or not.
(cherry picked from commit baa1bdf70f21848fbe01d3f383ae0f59d86a9bf3)
---
src/core/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/main.c b/src/core/main.c
index 38835fc620..1ca899998e 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1543,7 +1543,7 @@ int main(int argc, char *argv[]) {
if (in_initrd())
log_info("Running in initial RAM disk.");
- empty_etc = dir_is_empty("/etc") > 0;
+ empty_etc = access("/etc/machine-id", F_OK) < 0;
if (empty_etc)
log_info("Running with unpopulated /etc.");
} else {

View File

@ -1,28 +0,0 @@
From 1b74050afb9b407eaa59c67b6015611c9113f7e4 Mon Sep 17 00:00:00 2001
From: Steven Noonan <steven@uplinklabs.net>
Date: Thu, 3 Jul 2014 19:43:56 -0700
Subject: [PATCH] networkd: don't clear dhcpv6 lease timers if there's no
previous lease
If client->lease is NULL, dhcp6_lease_clear_timers will cause a segmentation
fault.
(cherry picked from commit b1e1238fb3af77419eca704fb64f68a313954734)
---
src/libsystemd-network/sd-dhcp6-client.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index 8fdbbfe320..a83778e938 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -708,7 +708,8 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply,
return 0;
}
- dhcp6_lease_clear_timers(&client->lease->ia);
+ if (client->lease)
+ dhcp6_lease_clear_timers(&client->lease->ia);
client->lease = sd_dhcp6_lease_unref(client->lease);
client->lease = lease;

View File

@ -1,23 +0,0 @@
From 18aa6c0119fbcad1e569f1d178c4f1691d4e3b90 Mon Sep 17 00:00:00 2001
From: Steven Noonan <steven@uplinklabs.net>
Date: Thu, 3 Jul 2014 19:42:19 -0700
Subject: [PATCH] networkd: accept section DHCP in systemd.network files
(cherry picked from commit c38d2eb828f1a62ae9052c9db45ccc70f98fdb47)
---
src/network/networkd-network.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 9ab4f23068..9f6de18538 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -92,7 +92,7 @@ static int network_load_one(Manager *manager, const char *filename) {
network->dhcp_routes = true;
network->dhcp_sendhost = true;
- r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCPv4\0", config_item_perf_lookup,
+ r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCP\0DHCPv4\0", config_item_perf_lookup,
(void*) network_network_gperf_lookup, false, false, network);
if (r < 0) {
log_warning("Could not parse config file %s: %s", filename, strerror(-r));

View File

@ -1,25 +0,0 @@
From 6e07a1c070376b7c2bcc8d57e8adbc8f6f78e8d5 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Sun, 6 Jul 2014 14:12:28 +0200
Subject: [PATCH] machine: don't return uninitialized variable
Repotred by Ronny Chevalier
(cherry picked from commit f14aa1f1b2e4e99ee20393871b5f64f1378ed6c3)
---
src/machine/machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/machine/machine.c b/src/machine/machine.c
index c0fa1b24b6..cf38e3fb94 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -371,7 +371,7 @@ static int machine_stop_scope(Machine *m) {
free(m->scope_job);
m->scope_job = job;
- return r;
+ return 0;
}
int machine_stop(Machine *m) {

View File

@ -1,23 +0,0 @@
From e41d164c532fa4345bc2dd1c5e1daaaec76b787c Mon Sep 17 00:00:00 2001
From: Ronny Chevalier <chevalier.ronny@gmail.com>
Date: Sun, 6 Jul 2014 13:33:38 +0200
Subject: [PATCH] sysusers: fix uninitialized warning
(cherry picked from commit bce415edcae8e7af8327de8265d621f95fa5426f)
---
src/sysusers/sysusers.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 1209a5a8b4..c0af69300a 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -1312,6 +1312,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
h = groups;
break;
+ default:
+ return -EBADMSG;
}
i->type = action[0];

View File

@ -1,92 +0,0 @@
From 20a575e8935cf5d2d078bbe3acf21fff56f2345c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 1 Jul 2014 22:20:11 -0400
Subject: [PATCH] vconsole-setup: run setfont before loadkeys
https://bugs.freedesktop.org/show_bug.cgi?id=80685
(cherry picked from commit abee28c56d523e55751b0c007d0bf812cc285c00)
---
src/vconsole/vconsole-setup.c | 48 +++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index e0c4050611..25d15afd5c 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -238,12 +238,10 @@ static void font_copy_to_all_vcs(int fd) {
int main(int argc, char **argv) {
const char *vc;
- char *vc_keymap = NULL;
- char *vc_keymap_toggle = NULL;
- char *vc_font = NULL;
- char *vc_font_map = NULL;
- char *vc_font_unimap = NULL;
- int fd = -1;
+ _cleanup_free_ char
+ *vc_keymap = NULL, *vc_keymap_toggle = NULL,
+ *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
+ _cleanup_close_ int fd = -1;
bool utf8;
pid_t font_pid = 0, keymap_pid = 0;
bool font_copy = false;
@@ -265,12 +263,12 @@ int main(int argc, char **argv) {
fd = open_terminal(vc, O_RDWR|O_CLOEXEC);
if (fd < 0) {
log_error("Failed to open %s: %m", vc);
- goto finish;
+ return EXIT_FAILURE;
}
if (!is_vconsole(fd)) {
log_error("Device %s is not a virtual console.", vc);
- goto finish;
+ return EXIT_FAILURE;
}
utf8 = is_locale_utf8();
@@ -305,27 +303,27 @@ int main(int argc, char **argv) {
else
disable_utf8(fd);
- r = EXIT_FAILURE;
- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 &&
- font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
- r = EXIT_SUCCESS;
-
-finish:
- if (keymap_pid > 0)
- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
+ r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
+ if (r < 0) {
+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
+ return EXIT_FAILURE;
+ }
- if (font_pid > 0) {
+ if (font_pid > 0)
wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
- if (font_copy)
- font_copy_to_all_vcs(fd);
+
+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
+ if (r < 0) {
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
+ return EXIT_FAILURE;
}
- free(vc_keymap);
- free(vc_font);
- free(vc_font_map);
- free(vc_font_unimap);
+ if (keymap_pid > 0)
+ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
- safe_close(fd);
+ /* Only copy the font when we started setfont successfully */
+ if (font_copy && font_pid > 0)
+ font_copy_to_all_vcs(fd);
- return r;
+ return EXIT_SUCCESS;
}

View File

@ -1,33 +0,0 @@
From 34156047f4e34b0d3c621b0641ec3444f2b37f8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 6 Jul 2014 18:35:46 -0400
Subject: [PATCH] coredumpctl: show a useful error on permission problems
(cherry picked from commit 31cda3d1759dee3e48c8ed4a949d99f041bdca1c)
---
src/journal/coredumpctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 2158d73771..ecde54744d 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -595,7 +595,8 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
retrieve(data, len, "COREDUMP_FILENAME", &filename);
if (filename && access(filename, R_OK) < 0) {
- log_debug("File %s is not readable: %m", filename);
+ log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+ "File %s is not readable: %m", filename);
free(filename);
filename = NULL;
}
@@ -668,7 +669,7 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
#endif
} else {
if (r == -ENOENT)
- log_error("Coredump neither in journal file nor stored externally on disk.");
+ log_error("Cannot retrieve coredump from journal nor disk.");
else
log_error("Failed to retrieve COREDUMP field: %s", strerror(-r));
goto error;

View File

@ -1,68 +0,0 @@
From 65b8b293a6a8560fc1d6eecf7712f870d597965b Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 7 Jul 2014 14:18:26 +0200
Subject: [PATCH] networkd: netdev - add missing refs
Without this, the underlying device would get freed (and hence
fail).
(cherry picked from commit e04468dec04a968c523ee09da7d2163a1d1a5a15)
---
src/network/networkd-macvlan.c | 2 ++
src/network/networkd-tunnel.c | 2 ++
src/network/networkd-vlan.c | 2 ++
src/network/networkd-vxlan.c | 2 ++
4 files changed, 8 insertions(+)
diff --git a/src/network/networkd-macvlan.c b/src/network/networkd-macvlan.c
index 9227144531..7c234264ac 100644
--- a/src/network/networkd-macvlan.c
+++ b/src/network/networkd-macvlan.c
@@ -150,6 +150,8 @@ int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t
return r;
}
+ link_ref(link);
+
log_debug_netdev(netdev, "creating netdev");
netdev->state = NETDEV_STATE_CREATING;
diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c
index 7341487795..5a244f61b0 100644
--- a/src/network/networkd-tunnel.c
+++ b/src/network/networkd-tunnel.c
@@ -529,6 +529,8 @@ int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c
return r;
}
+ link_ref(link);
+
log_debug_netdev(netdev, "Creating tunnel netdev: %s",
netdev_kind_to_string(netdev->kind));
diff --git a/src/network/networkd-vlan.c b/src/network/networkd-vlan.c
index 1d812fdcaa..8727b9f103 100644
--- a/src/network/networkd-vlan.c
+++ b/src/network/networkd-vlan.c
@@ -139,6 +139,8 @@ int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cal
return r;
}
+ link_ref(link);
+
log_debug_netdev(netdev, "creating netdev");
netdev->state = NETDEV_STATE_CREATING;
diff --git a/src/network/networkd-vxlan.c b/src/network/networkd-vxlan.c
index 8832024ef1..160459450d 100644
--- a/src/network/networkd-vxlan.c
+++ b/src/network/networkd-vxlan.c
@@ -154,6 +154,8 @@ int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t ca
return r;
}
+ link_ref(link);
+
log_debug_netdev(netdev, "Creating vxlan netdev: %s",
netdev_kind_to_string(netdev->kind));

View File

@ -1,35 +0,0 @@
From 14c30a407a7599c96af2e9998c3038574005c368 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 7 Jul 2014 08:55:30 -0400
Subject: [PATCH] vconsole-setup: fix inverted error messages
Introduced in abee28c56d.
Pointed-out-by: Werner Fink <werner@suse.de>
(cherry picked from commit 3dde3f819732aaa66ab8e881305488adaea17641)
---
src/vconsole/vconsole-setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index 25d15afd5c..645b1e6994 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -305,7 +305,7 @@ int main(int argc, char **argv) {
r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
if (r < 0) {
- log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
return EXIT_FAILURE;
}
@@ -314,7 +314,7 @@ int main(int argc, char **argv) {
r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
if (r < 0) {
- log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
return EXIT_FAILURE;
}

View File

@ -1,40 +0,0 @@
From 0afeabd2abb0f86c17f04558d84e39528d3eb9ee Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 7 Jul 2014 14:50:16 +0200
Subject: [PATCH] udev: link_config - ignore errors due to missing MAC address
Otherwis, we get misleading error messages on links with MACs.
Reported by Leonid Isaev.
(cherry picked from commit a669ea9860900d5cdebbc4cb9aaea72db7e28a02)
---
src/udev/net/link-config.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index b8650a6c6c..5a45c53cc6 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -383,7 +383,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
case MACPOLICY_PERSISTENT:
if (mac_is_random(device)) {
r = get_mac(device, false, &generated_mac);
- if (r < 0)
+ if (r == -ENOENT)
+ break;
+ else if (r < 0)
return r;
mac = &generated_mac;
}
@@ -391,7 +393,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
case MACPOLICY_RANDOM:
if (!mac_is_random(device)) {
r = get_mac(device, true, &generated_mac);
- if (r < 0)
+ if (r == -ENOENT)
+ break;
+ else if (r < 0)
return r;
mac = &generated_mac;
}

View File

@ -1,53 +0,0 @@
From a71b7b7e52f312c7a9fc19154ac0d444e057e1d4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 11:47:10 +0200
Subject: [PATCH] util: consider 0x7F a control chracter (which it is: DEL)
Let's better be safe than sorry.
(cherry picked from commit 3a8a916338d8446b938f3cf40f6aae0c611892e3)
---
src/shared/util.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 3d875c72b3..d25ee6652f 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1608,8 +1608,9 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
return -ETIMEDOUT;
}
+ errno = 0;
if (!fgets(line, sizeof(line), f))
- return -EIO;
+ return errno ? -errno : -EIO;
truncate_nl(line);
@@ -5355,6 +5356,9 @@ bool string_is_safe(const char *p) {
if (*t > 0 && *t < ' ')
return false;
+ if (*t == 127)
+ return false;
+
if (strchr("\\\"\'", *t))
return false;
}
@@ -5371,10 +5375,14 @@ bool string_has_cc(const char *p) {
assert(p);
- for (t = p; *t; t++)
+ for (t = p; *t; t++) {
if (*t > 0 && *t < ' ' && *t != '\t')
return true;
+ if (*t == 127)
+ return true;
+ }
+
return false;
}

View File

@ -1,29 +0,0 @@
From a821499e679a2d76c96ea6fda76e7847ba57a565 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 11:47:46 +0200
Subject: [PATCH] main: explain our /etc empty check a bit in a comment
(cherry picked from commit 3408ba015aee3a88c91962c028738be757779519)
---
src/core/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/core/main.c b/src/core/main.c
index 1ca899998e..a732c6945a 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1543,6 +1543,14 @@ int main(int argc, char *argv[]) {
if (in_initrd())
log_info("Running in initial RAM disk.");
+ /* Let's check whether /etc is already populated. We
+ * don't actually really check for that, but use
+ * /etc/machine-id as flag file. This allows container
+ * managers and installers to provision a couple of
+ * files already. If the container manager wants to
+ * provision the machine ID itself it should pass
+ * $container_uuid to PID 1.*/
+
empty_etc = access("/etc/machine-id", F_OK) < 0;
if (empty_etc)
log_info("Running with unpopulated /etc.");

View File

@ -1,45 +0,0 @@
From 8606ef2e22777f167a528c41fc15371bfe934f45 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 14:58:13 +0200
Subject: [PATCH] man: add missing archs to ConditionArchitecture= description
(cherry picked from commit f1e4d93f573087655ab1d0adb725102d5d2c1960)
---
man/systemd.unit.xml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 960fb90dbd..be0873c344 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -931,7 +931,9 @@
<varname>x86</varname>,
<varname>x86-64</varname>,
<varname>ppc</varname>,
+ <varname>ppc-le</varname>,
<varname>ppc64</varname>,
+ <varname>ppc64-le</varname>,
<varname>ia64</varname>,
<varname>parisc</varname>,
<varname>parisc64</varname>,
@@ -940,7 +942,9 @@
<varname>sparc</varname>,
<varname>sparc64</varname>,
<varname>mips</varname>,
+ <varname>mips-le</varname>,
<varname>mips64</varname>,
+ <varname>mips64-le</varname>,
<varname>alpha</varname>,
<varname>arm</varname>,
<varname>arm-be</varname>,
@@ -948,7 +952,9 @@
<varname>arm64-be</varname>,
<varname>sh</varname>,
<varname>sh64</varname>,
- <varname>m86k</varname> to test
+ <varname>m86k</varname>,
+ <varname>tilegx</varname>,
+ <varname>cris</varname> to test
against a specific architecture. The
architecture is determined from the
information returned by

View File

@ -1,23 +0,0 @@
From 3fe1ea74a50b7815816157da93c60379e8328821 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 14:58:36 +0200
Subject: [PATCH] man: chroot jails are no longer detected by
ConditionVirtualization=
(cherry picked from commit ac8ddf8c964f813464ef32cad1fcb7b61b692a01)
---
man/systemd.unit.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index be0873c344..cd3279c192 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -990,7 +990,6 @@
<varname>oracle</varname>,
<varname>xen</varname>,
<varname>bochs</varname>,
- <varname>chroot</varname>,
<varname>uml</varname>,
<varname>openvz</varname>,
<varname>lxc</varname>,

View File

@ -1,25 +0,0 @@
From 384bcccd9d6557a7543a21a44fce57ca06efcfdd Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 14:59:06 +0200
Subject: [PATCH] architecture: add string table entries for mips-le archs
which were missing
(cherry picked from commit 037c26d0aeb750ca9c8d605884ea1db7baecfea8)
---
src/shared/architecture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
index 6cdca4e7e5..dc45f3589d 100644
--- a/src/shared/architecture.c
+++ b/src/shared/architecture.c
@@ -153,7 +153,9 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_SPARC] = "sparc",
[ARCHITECTURE_SPARC64] = "sparc64",
[ARCHITECTURE_MIPS] = "mips",
+ [ARCHITECTURE_MIPS_LE] = "mips-le",
[ARCHITECTURE_MIPS64] = "mips64",
+ [ARCHITECTURE_MIPS64_LE] = "mips64-le",
[ARCHITECTURE_ALPHA] = "alpha",
[ARCHITECTURE_ARM] = "arm",
[ARCHITECTURE_ARM_BE] = "arm-be",

View File

@ -1,27 +0,0 @@
From 853896f09d35f8c2db3bf25376d1c3ab240287ed Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 17:33:46 +0200
Subject: [PATCH] service: flush status text and errno values each time a
service is started
We shouldn't show status texts from previous service starts
(cherry picked from commit 8cfdb077b8e3da1c47fc1d735d051f21f33144c1)
---
src/core/service.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/core/service.c b/src/core/service.c
index 0b19767d9e..2d8aa01445 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1699,6 +1699,9 @@ static int service_start(Unit *u) {
s->main_pid_alien = false;
s->forbid_restart = false;
+ free(s->status_text);
+ s->status_text = NULL;
+
service_enter_start_pre(s);
return 0;
}

View File

@ -1,36 +0,0 @@
From 313b57468fae9e3d4b762326c46e82afe6ec1c36 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 7 Jul 2014 17:45:53 +0200
Subject: [PATCH] base-filesystem.c: terminate string array elements with \0
NULSTR_FOREACH() looks for a terminating zero and the element also needs
one.
(cherry picked from commit 30d7c9c472bd7be1b6a09d3bd5afd939988de990)
---
src/shared/base-filesystem.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index daaeaca515..addd26ca39 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -42,12 +42,13 @@ typedef struct BaseFilesystem {
} BaseFilesystem;
static const BaseFilesystem table[] = {
- { "bin", 0, "usr/bin", NULL },
- { "lib", 0, "usr/lib", NULL },
- { "root", 0755, NULL, NULL },
- { "sbin", 0, "usr/sbin", NULL },
+ { "bin", 0, "usr/bin\0", NULL },
+ { "lib", 0, "usr/lib\0", NULL },
+ { "root", 0755, NULL, NULL },
+ { "sbin", 0, "usr/sbin\0", NULL },
#if defined(__i386__) || defined(__x86_64__)
- { "lib64", 0, "usr/lib/x86_64-linux-gnu\0usr/lib64", "ld-linux-x86-64.so.2" },
+ { "lib64", 0, "usr/lib/x86_64-linux-gnu\0"
+ "usr/lib64\0", "ld-linux-x86-64.so.2" },
#endif
};

View File

@ -1,50 +0,0 @@
From 13191f413a4dbff98094fe407cb592ae9723f956 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 18:45:07 +0200
Subject: [PATCH] man: drop references to the --priviliged command line option
which has been removed a while back
(cherry picked from commit ed3e4a3fd96891b5e7015723978e78cd21efd4fe)
---
man/hostnamectl.xml | 8 --------
man/localectl.xml | 8 --------
2 files changed, 16 deletions(-)
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index 71973fde91..4e456eb8f9 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -102,14 +102,6 @@
</varlistentry>
<varlistentry>
- <term><option>-P</option></term>
- <term><option>--privileged</option></term>
-
- <listitem><para>Acquire privileges via PolicyKit
- before executing the operation.</para></listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>--static</option></term>
<term><option>--transient</option></term>
<term><option>--pretty</option></term>
diff --git a/man/localectl.xml b/man/localectl.xml
index c2e79a2d71..9c32c794aa 100644
--- a/man/localectl.xml
+++ b/man/localectl.xml
@@ -90,14 +90,6 @@
</varlistentry>
<varlistentry>
- <term><option>-P</option></term>
- <term><option>--privileged</option></term>
-
- <listitem><para>Acquire privileges via PolicyKit
- before executing the operation.</para></listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>--no-convert</option></term>
<listitem><para>If

View File

@ -1,27 +0,0 @@
From 06d46a47eb13907a597a0e67cd8142321a81494e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 7 Jul 2014 16:10:38 -0400
Subject: [PATCH] fstab-generator: add comma when removed option is in the
middle
xxx,x-systemd.default-timeout=y,zzz was filtered to xxxzzz,
but should be xxx,zzz, of course.
(cherry picked from commit 36a259d22c450fbf3f696df0161db50275a98667)
---
src/shared/generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 5d5b6a0a61..2f9e5954c2 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -125,7 +125,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
char *prefix, *postfix;
prefix = strndupa(opts, start - opts - (start != opts));
- postfix = timeout + len + (timeout[len] != '\0');
+ postfix = timeout + len + (start == opts && timeout[len] != '\0');
*filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL);
if (!*filtered)
return log_oom();

View File

@ -1,43 +0,0 @@
From 5cec192e0c86a24bad9c3b24eca7d655470382df Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Mon, 7 Jul 2014 21:40:00 +0200
Subject: [PATCH] dropin: add format attribute and fix a wrong caller
(cherry picked from commit f5a4b0d3534bb13ef734a857647ab04be236c6f3)
---
src/shared/dropin.h | 4 +++-
src/shared/generator.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/shared/dropin.h b/src/shared/dropin.h
index 27a2b2953f..9c9742d0e4 100644
--- a/src/shared/dropin.h
+++ b/src/shared/dropin.h
@@ -21,6 +21,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "macro.h"
+
int drop_in_file(const char *dir, const char *unit, unsigned level,
const char *name, char **_p, char **_q);
@@ -28,4 +30,4 @@ int write_drop_in(const char *dir, const char *unit, unsigned level,
const char *name, const char *data);
int write_drop_in_format(const char *dir, const char *unit, unsigned level,
- const char *name, const char *format, ...);
+ const char *name, const char *format, ...) _printf_(5, 6);
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 2f9e5954c2..5d4cb5d54f 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -148,7 +148,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
return write_drop_in_format(dir, unit, 50, "device-timeout",
"# Automatically generated by %s\n\n"
- "[Unit]\nJobTimeoutSec=%u",
+ "[Unit]\nJobTimeoutSec=%lu",
program_invocation_short_name,
u / USEC_PER_SEC);
}

View File

@ -1,92 +0,0 @@
From af50ff78b93b683687464e45dee14033f494fcbe Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Wed, 4 Jun 2014 01:57:11 +0200
Subject: [PATCH] add new systemd-escape tool
(cherry picked from commit b1a5a9989ada9b3738d71605f051ff393d41f2ff)
---
Makefile.am | 10 +++++++++-
src/escape/escape.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 src/escape/escape.c
diff --git a/Makefile.am b/Makefile.am
index e238cdeebf..c856d822de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -347,7 +347,8 @@ bin_PROGRAMS = \
systemd-delta \
systemd-analyze \
systemd-run \
- systemd-path
+ systemd-path \
+ systemd-escape
dist_bin_SCRIPTS = \
src/kernel-install/kernel-install
@@ -2079,6 +2080,13 @@ systemd_cgroups_agent_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
+systemd_escape_SOURCES = \
+ src/escape/escape.c
+
+systemd_escape_LDADD = \
+ libsystemd-shared.la
+
+# -----------------------------------------------------------------------------
systemctl_SOURCES = \
src/systemctl/systemctl.c
diff --git a/src/escape/escape.c b/src/escape/escape.c
new file mode 100644
index 0000000000..0a59a05e28
--- /dev/null
+++ b/src/escape/escape.c
@@ -0,0 +1,46 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+ This file is part of systemd.
+
+ Copyright 2014 Michael Biebl
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "log.h"
+#include "unit-name.h"
+
+int main(int argc, char *argv[]) {
+ char *escaped_name = NULL;
+
+ if (argc != 2) {
+ log_error("This program requires on argument.");
+ return EXIT_FAILURE;
+ }
+
+ escaped_name = unit_name_escape(argv[1]);
+
+ if (!escaped_name) {
+ log_error("Failed to escape name.");
+ return EXIT_FAILURE;
+ }
+
+ printf("%s", escaped_name);
+
+ return EXIT_SUCCESS;
+}

View File

@ -1,274 +0,0 @@
From ee228789816679b6fff19c7c2f637eb0a1a3fcc4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 22:23:00 +0200
Subject: [PATCH] escape: beef up new systemd-escape tool
Add various options for making it easy unescape, or mangle, or format as
template instance or append a suffix.
(cherry picked from commit a1948c7bfeb87b54bc7715a44490c01593ee6e23)
Conflicts:
.gitignore
---
.gitignore | 1 +
src/escape/Makefile | 1 +
src/escape/escape.c | 215 +++++++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 206 insertions(+), 11 deletions(-)
create mode 120000 src/escape/Makefile
diff --git a/.gitignore b/.gitignore
index 9523ea027e..e08aa52aee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,6 +64,7 @@
/systemd-delta
/systemd-detect-virt
/systemd-efi-boot-generator
+/systemd-escape
/systemd-fsck
/systemd-fstab-generator
/systemd-getty-generator
diff --git a/src/escape/Makefile b/src/escape/Makefile
new file mode 120000
index 0000000000..d0b0e8e008
--- /dev/null
+++ b/src/escape/Makefile
@@ -0,0 +1 @@
+../Makefile
\ No newline at end of file
diff --git a/src/escape/escape.c b/src/escape/escape.c
index 0a59a05e28..ae0c183eca 100644
--- a/src/escape/escape.c
+++ b/src/escape/escape.c
@@ -21,26 +21,219 @@
#include <stdio.h>
#include <stdlib.h>
+#include <getopt.h>
#include "log.h"
#include "unit-name.h"
+#include "build.h"
+#include "strv.h"
-int main(int argc, char *argv[]) {
- char *escaped_name = NULL;
+static enum {
+ ACTION_ESCAPE,
+ ACTION_UNESCAPE,
+ ACTION_MANGLE
+} arg_action = ACTION_ESCAPE;
+static const char *arg_suffix = NULL;
+static const char *arg_template = NULL;
+static bool arg_path = false;
+
+static int help(void) {
+
+ printf("%s [OPTIONS...] [NAME...]\n\n"
+ "Show system and user paths.\n\n"
+ " -h --help Show this help\n"
+ " --version Show package version\n"
+ " --suffix=SUFFIX Unit suffix to append to escaped strings\n"
+ " --template=TEMPLATE Insert strings as instance into template\n"
+ " -u --unescape Unescape strings\n"
+ " -m --mangle Mangle strings\n"
+ " -p --path When escaping/unescaping assume the string is a path\n",
+ program_invocation_short_name);
+
+ return 0;
+}
+
+static int parse_argv(int argc, char *argv[]) {
+
+ enum {
+ ARG_VERSION = 0x100,
+ ARG_SUFFIX,
+ ARG_TEMPLATE
+ };
+
+ static const struct option options[] = {
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, ARG_VERSION },
+ { "suffix", required_argument, NULL, ARG_SUFFIX },
+ { "template", required_argument, NULL, ARG_TEMPLATE },
+ { "unescape", no_argument, NULL, 'u' },
+ { "mangle", no_argument, NULL, 'm' },
+ { "path", no_argument, NULL, 'p' },
+ {}
+ };
+
+ int c;
+
+ assert(argc >= 0);
+ assert(argv);
+
+ while ((c = getopt_long(argc, argv, "hump", options, NULL)) >= 0) {
+
+ switch (c) {
+
+ case 'h':
+ return help();
+
+ case ARG_VERSION:
+ puts(PACKAGE_STRING);
+ puts(SYSTEMD_FEATURES);
+ return 0;
+
+ case ARG_SUFFIX:
+
+ if (unit_type_from_string(optarg) < 0) {
+ log_error("Invalid unit suffix type %s.", optarg);
+ return -EINVAL;
+ }
+
+ arg_suffix = optarg;
+ break;
+
+ case ARG_TEMPLATE:
+
+ if (!unit_name_is_valid(optarg, true) || !unit_name_is_template(optarg)) {
+ log_error("Template name %s is not valid.", optarg);
+ return -EINVAL;
+ }
+
+ arg_template = optarg;
+ break;
+
+ case 'u':
+ arg_action = ACTION_UNESCAPE;
+ break;
+
+ case 'm':
+ arg_action = ACTION_MANGLE;
+ break;
+
+ case 'p':
+ arg_path = true;
+ break;
+
+ case '?':
+ return -EINVAL;
+
+ default:
+ assert_not_reached("Unhandled option");
+ }
+ }
- if (argc != 2) {
- log_error("This program requires on argument.");
- return EXIT_FAILURE;
+ if (optind >= argc) {
+ log_error("Not enough arguments.");
+ return -EINVAL;
}
- escaped_name = unit_name_escape(argv[1]);
+ if (arg_template && arg_suffix) {
+ log_error("--suffix= and --template= may not be combined.");
+ return -EINVAL;
+ }
+
+ if ((arg_template || arg_suffix) && arg_action != ACTION_ESCAPE) {
+ log_error("--suffix= and --template= are not compatible with --unescape or --mangle.");
+ return -EINVAL;
+ }
+
+ if (arg_path && !IN_SET(arg_action, ACTION_ESCAPE, ACTION_UNESCAPE)) {
+ log_error("--path may not be combined with --mangle.");
+ return -EINVAL;
+ }
+
+ return 1;
+}
+
+int main(int argc, char *argv[]) {
+ char **i;
+ int r;
+
+ log_parse_environment();
+ log_open();
+
+ r = parse_argv(argc, argv);
+ if (r <= 0)
+ goto finish;
+
+ STRV_FOREACH(i, argv + optind) {
+ _cleanup_free_ char *e = NULL;
+
+ switch (arg_action) {
+
+ case ACTION_ESCAPE:
+ if (arg_path)
+ e = unit_name_path_escape(*i);
+ else
+ e = unit_name_escape(*i);
+
+ if (!e) {
+ r = log_oom();
+ goto finish;
+ }
+
+ if (arg_template) {
+ char *x;
+
+ x = unit_name_replace_instance(arg_template, e);
+ if (!x) {
+ r = log_oom();
+ goto finish;
+ }
+
+ free(e);
+ e = x;
+ } else if (arg_suffix) {
+ char *x;
+
+ x = strjoin(e, ".", arg_suffix, NULL);
+ if (!x) {
+ r = log_oom();
+ goto finish;
+ }
+
+ free(e);
+ e = x;
+ }
+
+ break;
+
+ case ACTION_UNESCAPE:
+ if (arg_path)
+ e = unit_name_path_unescape(*i);
+ else
+ e = unit_name_unescape(*i);
+
+ if (!e) {
+ r = log_oom();
+ goto finish;
+ }
+ break;
+
+ case ACTION_MANGLE:
+ e = unit_name_mangle(*i, MANGLE_NOGLOB);
+ if (!e) {
+ r = log_oom();
+ goto finish;
+ }
+ break;
+ }
+
+ if (i != argv+optind)
+ fputc(' ', stdout);
- if (!escaped_name) {
- log_error("Failed to escape name.");
- return EXIT_FAILURE;
+ fputs(e, stdout);
}
- printf("%s", escaped_name);
+ fputc('\n', stdout);
- return EXIT_SUCCESS;
+finish:
+ return r ? EXIT_FAILURE : EXIT_SUCCESS;
}

View File

@ -1,234 +0,0 @@
From 9045c9cedb155255e4dd55b988a39093364efbac Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 22:48:25 +0200
Subject: [PATCH] man: document systemd-escape(1)
(cherry picked from commit 9869e75929acd9377aa460074334d8523cf8e822)
Conflicts:
Makefile-man.am
---
Makefile-man.am | 2 +
man/systemd-escape.xml | 193 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 195 insertions(+)
create mode 100644 man/systemd-escape.xml
diff --git a/Makefile-man.am b/Makefile-man.am
index 5c289dda2a..4238c21710 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -63,6 +63,7 @@ MANPAGES += \
man/systemd-delta.1 \
man/systemd-detect-virt.1 \
man/systemd-efi-boot-generator.8 \
+ man/systemd-escape.1 \
man/systemd-fsck@.service.8 \
man/systemd-fstab-generator.8 \
man/systemd-getty-generator.8 \
@@ -1600,6 +1601,7 @@ EXTRA_DIST += \
man/systemd-delta.xml \
man/systemd-detect-virt.xml \
man/systemd-efi-boot-generator.xml \
+ man/systemd-escape.xml \
man/systemd-fsck@.service.xml \
man/systemd-fstab-generator.xml \
man/systemd-getty-generator.xml \
diff --git a/man/systemd-escape.xml b/man/systemd-escape.xml
new file mode 100644
index 0000000000..b2a4a9ce8c
--- /dev/null
+++ b/man/systemd-escape.xml
@@ -0,0 +1,193 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+ This file is part of systemd.
+
+ Copyright 2014 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="systemd-escape"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <refentryinfo>
+ <title>systemd-escape</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart@poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>systemd-escape</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>systemd-escape</refname>
+ <refpurpose>Escape strings for usage in system unit names</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>systemd-escape <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">STRING</arg></command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><command>systemd-escape</command> may be used to
+ escape strings for inclusion in systemd unit
+ names. The command may be used to escape and to undo
+ escaping of strings.</para>
+
+ <para>The command takes any number of strings on the
+ command line, and will process them individually, one
+ after the other. It will output them separated by
+ spaces to stdout.</para>
+
+ <para>By default this command will escape the strings
+ passed, unless <option>--unescape</option> is passed
+ which results in the inverse operation being
+ applied. If <option>--mangle</option> a special mode
+ of escaping is applied instead, which assumes a string
+ to be already escaped but will escape everything that
+ appears obviously non-escaped.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>The following options are understood:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>--suffix=</option></term>
+
+ <listitem><para>Appends the specified
+ unit type suffix to the escaped
+ string. Takes one of the unit types
+ supported by systemd, such as
+ <literal>.service</literal> or
+ <literal>.mount</literal>. May not be
+ used in conjunction with
+ <option>--template=</option>,
+ <option>--unescape</option> or
+ <option>--mangle</option>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--template=</option></term>
+
+ <listitem><para>Inserts the escaped
+ strings in a unit name template. Takes
+ a unit name template such as
+ <filename>foobar@.service</filename>
+ May not be used in conjunction with
+ <option>--suffix=</option>,
+ <option>--unescape</option> or
+ <option>--mangle</option>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--path</option></term>
+ <term><option>-p</option></term>
+
+ <listitem><para>When escaping or
+ unescaping a string, assume it refers
+ to a file system path. This enables
+ special processing of the initial
+ <literal>/</literal> of the
+ path.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--unescape</option></term>
+
+ <listitem><para>Instead of escaping
+ the specified strings, undo the
+ escaping, reversing the operation. May
+ not be used in conjunction with
+ <option>--suffix=</option>,
+ <option>--template=</option> or
+ <option>--mangle</option>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--mangle</option></term>
+
+ <listitem><para>Like
+ <option>--escape</option>, but only
+ escape characters that are obviously
+ not escaped yet, and possibly
+ automatically append an appropriate
+ unit type suffix to the string. May
+ not be used in conjunction with
+ <option>--suffix=</option>,
+ <option>--template=</option> or
+ <option>--unescape</option>.</para></listitem>
+ </varlistentry>
+
+ <xi:include href="standard-options.xml" xpointer="help" />
+ <xi:include href="standard-options.xml" xpointer="version" />
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+
+ <para>Escape a single string:</para>
+ <programlisting>$ systemd-escape 'Hallöchen, Meister'
+Hall\xc3\xb6chen\x2c\x20Meister</programlisting>
+
+ <para>To undo escaping on a single string:</para>
+ <programlisting>$ systemd-escape -u 'Hall\xc3\xb6chen\x2c\x20Meister'
+Hallöchen, Meister</programlisting>
+
+ <para>To generate the mount unit for a path:</para>
+ <programlisting>$ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/"
+tmp-waldi-foobar.mount</programlisting>
+
+ <para>To generate instance names of three strings</para>
+ <programlisting>$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
+systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service</programlisting>
+ </refsect1>
+
+ <refsect1>
+ <title>Exit status</title>
+
+ <para>On success, 0 is returned, a non-zero failure
+ code otherwise.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>

View File

@ -1,23 +0,0 @@
From 539fc6acb23fb2928a2443d1e27db95d7084d41a Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 22:49:59 +0200
Subject: [PATCH] shared: fix format string for usec_t type
(cherry picked from commit de48d5ab62e452b596d6f2762422d0ab32c4d313)
---
src/shared/generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 5d4cb5d54f..414470be1c 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -148,7 +148,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
return write_drop_in_format(dir, unit, 50, "device-timeout",
"# Automatically generated by %s\n\n"
- "[Unit]\nJobTimeoutSec=%lu",
+ "[Unit]\nJobTimeoutSec=" USEC_FMT,
program_invocation_short_name,
u / USEC_PER_SEC);
}

View File

@ -1,35 +0,0 @@
From a1a46db86071388fcfeb35d06147f673c6c58c6d Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Tue, 8 Jul 2014 12:56:55 +0200
Subject: [PATCH] logind: allow switching to unused VTs via SwitchTo()
If compositors use the new SwitchTo() logic to map F1-F12, we should allow
them to switch to unregistered VTs, too. Otherwise, the auto-spawn logic
of gettys won't trigger.
Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit 154034270c4643b7cfe61c0be1676d78bb1b7b07)
---
src/login/logind-seat.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 3114de84de..9992195151 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -275,8 +275,13 @@ int seat_switch_to(Seat *s, unsigned int num) {
if (!num)
return -EINVAL;
- if (num >= s->position_count || !s->positions[num])
+ if (num >= s->position_count || !s->positions[num]) {
+ /* allow switching to unused VTs to trigger auto-activate */
+ if (seat_has_vts(s) && num < 64)
+ return chvt(num);
+
return -EINVAL;
+ }
return session_activate(s->positions[num]);
}

View File

@ -1,24 +0,0 @@
From bcb94736047823194fcfc98e23c4ed4e392eb3d3 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Tue, 8 Jul 2014 15:17:36 +0200
Subject: [PATCH] systemctl: fix visual alignment for lines prefixed with color
dots
(cherry picked from commit b7bbdabeb4a5b66fdbcdfed0d097109cfb39c43e)
---
src/systemctl/systemctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 03720f411d..8086e1e296 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -456,7 +456,7 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
}
if (circle_len > 0)
- printf("%s%s%s", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_circle);
+ printf("%s%s%s ", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_circle);
printf("%s%-*s%s %s%-*s%s %s%-*s %-*s%s %-*s",
on_active, id_len, id, off_active,

View File

@ -1,74 +0,0 @@
From e27bfc22bba932950a398b32bf57be6f825438ee Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 8 Jul 2014 18:29:06 +0200
Subject: [PATCH] accelerometer: Don't wait for new data from the sensor
Instead of waiting for new data from the sensor, which might be
a long time coming, depending on the sensor device, ask the kernel
for the last state for that particular input device.
(cherry picked from commit a545c6e1aa31b4d7e80c9d3609d9fc4fc9921498)
---
src/udev/accelerometer/accelerometer.c | 33 ++++++---------------------------
1 file changed, 6 insertions(+), 27 deletions(-)
diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
index 925d38de1f..32adf27777 100644
--- a/src/udev/accelerometer/accelerometer.c
+++ b/src/udev/accelerometer/accelerometer.c
@@ -180,7 +180,7 @@ get_prev_orientation(struct udev_device *dev)
return string_to_orientation(value);
}
-#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } }
+#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; }
/* accelerometers */
static void test_orientation(struct udev *udev,
@@ -189,10 +189,9 @@ static void test_orientation(struct udev *udev,
{
OrientationUp old, new;
_cleanup_close_ int fd = -1;
- struct input_event ev[64];
- bool got_syn = false;
- bool got_x = false, got_y = false, got_z = false;
+ struct input_absinfo abs_info;
int x = 0, y = 0, z = 0;
+ int r;
char text[64];
old = get_prev_orientation(dev);
@@ -201,30 +200,10 @@ static void test_orientation(struct udev *udev,
if (fd < 0)
return;
- while (1) {
- int i, r;
-
- r = read(fd, ev, sizeof(struct input_event) * 64);
-
- if (r < (int) sizeof(struct input_event))
- return;
-
- for (i = 0; i < r / (int) sizeof(struct input_event); i++) {
- if (got_syn) {
- if (ev[i].type == EV_ABS) {
- SET_AXIS(x, ABS_X);
- SET_AXIS(y, ABS_Y);
- SET_AXIS(z, ABS_Z);
- }
- }
- if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT)
- got_syn = true;
- if (got_x && got_y && got_z)
- goto read_dev;
- }
- }
+ READ_AXIS(ABS_X, x);
+ READ_AXIS(ABS_Y, y);
+ READ_AXIS(ABS_Z, z);
-read_dev:
new = orientation_calc(old, x, y, z);
snprintf(text, sizeof(text),
"ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new));

View File

@ -1,38 +0,0 @@
From f6431973ef3d681c1c0c3e6850c7906a22ee7ec7 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Tue, 8 Jul 2014 21:06:07 +0200
Subject: [PATCH] escape: move to rootbindir
The systemd-escape utility might be used during early boot (e.g. when
being triggered from udev rules), so move it to rootbindir to support
systems with a split /usr setup.
(cherry picked from commit 2945a452b084879c6885efe51aefea00c179aa5f)
---
Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c856d822de..7210ab70be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -337,7 +337,8 @@ rootbin_PROGRAMS = \
systemd-notify \
systemd-ask-password \
systemd-tty-ask-password-agent \
- systemd-machine-id-setup
+ systemd-machine-id-setup \
+ systemd-escape
bin_PROGRAMS = \
systemd-cgls \
@@ -347,8 +348,7 @@ bin_PROGRAMS = \
systemd-delta \
systemd-analyze \
systemd-run \
- systemd-path \
- systemd-escape
+ systemd-path
dist_bin_SCRIPTS = \
src/kernel-install/kernel-install

View File

@ -1,67 +0,0 @@
From 00464ad8a698fe7735737fab57420f8a44013890 Mon Sep 17 00:00:00 2001
From: Jon Severinsson <jon@severinsson.net>
Date: Tue, 8 Jul 2014 18:29:46 +0200
Subject: [PATCH] journal/compress: improve xz compression performance
The new lzma2 compression options at the top of compress_blob_xz are
equivalent to using preset "0", exept for using a 1 MiB dictionary
(the same as preset "1"). This makes the memory usage at most 7.5 MiB
in the compressor, and 1 MiB in the decompressor, instead of the
previous 92 MiB in the compressor and 8 MiB in the decompressor.
According to test-compress-benchmark this commit makes XZ compression
20 times faster, with no increase in compressed data size.
Using more realistic test data (an ELF binary rather than repeating
ASCII letters 'a' through 'z' in order) it only provides a factor 10
speedup, and at a cost if a 10% increase in compressed data size.
But that is still a worthwhile trade-off.
According to test-compress-benchmark XZ compression is still 25 times
slower than LZ4, but the compressed data is one eighth the size.
Using more realistic test data XZ compression is only 18 times slower
than LZ4, and the compressed data is only one quarter the size.
$ ./test-compress-benchmark
XZ: compressed & decompressed 2535300963 bytes in 42.30s (57.15MiB/s), mean compresion 99.95%, skipped 3570 bytes
LZ4: compressed & decompressed 2535303543 bytes in 1.60s (1510.60MiB/s), mean compresion 99.60%, skipped 990 bytes
(cherry picked from commit 1930eed2a7855d2df06ccf51f9e394428bf547e2)
Conflicts:
src/journal/compress.c
---
src/journal/compress.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/journal/compress.c b/src/journal/compress.c
index 1fc62ead2a..9c0b74c455 100644
--- a/src/journal/compress.c
+++ b/src/journal/compress.c
@@ -30,6 +30,13 @@
#include "util.h"
bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
+ static const lzma_options_lzma opt = {
+ 1u << 20u, NULL, 0, LZMA_LC_DEFAULT, LZMA_LP_DEFAULT,
+ LZMA_PB_DEFAULT, LZMA_MODE_FAST, 128, LZMA_MF_HC3, 4};
+ static const lzma_filter filters[2] = {
+ {LZMA_FILTER_LZMA2, (lzma_options_lzma*) &opt},
+ {LZMA_VLI_UNKNOWN, NULL}
+ };
lzma_ret ret;
size_t out_pos = 0;
@@ -41,8 +48,11 @@ bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_
/* Returns false if we couldn't compress the data or the
* compressed result is longer than the original */
- ret = lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
- src, src_size, dst, &out_pos, src_size);
+ if (src_size < 80)
+ return -ENOBUFS;
+
+ ret = lzma_stream_buffer_encode((lzma_filter*) filters, LZMA_CHECK_NONE, NULL,
+ src, src_size, dst, &out_pos, src_size - 1);
if (ret != LZMA_OK)
return false;

View File

@ -1,24 +0,0 @@
From 6f977a8c14c4cec72a85f20d0986daa391dd3319 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Jul 2014 13:20:05 +0200
Subject: [PATCH] hostnamed: add a new chassis type for watches
(cherry picked from commit c49e59c1831f20fe02276d7bc6ba7d23d24c4ab3)
---
src/hostname/hostnamed.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 14629dd3a9..8127b688c4 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -144,7 +144,8 @@ static bool valid_chassis(const char *chassis) {
"laptop\0"
"server\0"
"tablet\0"
- "handset\0",
+ "handset\0"
+ "watch\0",
chassis);
}

View File

@ -1,39 +0,0 @@
From 710348ce7349b224ba58bae765611455320f68d1 Mon Sep 17 00:00:00 2001
From: Tomasz Torcz <tomek@pipebreaker.pl>
Date: Wed, 9 Jul 2014 13:37:50 +0200
Subject: [PATCH] hostnamed: update documentation with new "watch" chassis type
(cherry picked from commit efab8d0b0ebf6d715949b7af66fecaf5e5e5d77b)
---
man/hostnamectl.xml | 3 ++-
man/machine-info.xml | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index 4e456eb8f9..001bfced03 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -205,7 +205,8 @@
<literal>laptop</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
- <literal>handset</literal>, as well as
+ <literal>handset</literal>,
+ <literal>watch</literal>, as well as
the special chassis types
<literal>vm</literal> and
<literal>container</literal> for
diff --git a/man/machine-info.xml b/man/machine-info.xml
index 7448e68fd4..244e9b69cf 100644
--- a/man/machine-info.xml
+++ b/man/machine-info.xml
@@ -138,7 +138,8 @@
<literal>laptop</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
- <literal>handset</literal>, as well as
+ <literal>handset</literal>,
+ <literal>watch</literal>, as well as
the special chassis types
<literal>vm</literal> and
<literal>container</literal> for

View File

@ -1,51 +0,0 @@
From 7a4ab10135c2b8fdeedb53c0585c67a0d6448ce6 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Tue, 8 Jul 2014 17:42:23 +0200
Subject: [PATCH] units: make ExecStopPost action part of ExecStart
Currently after exiting rescue shell we isolate default target. User
might want to isolate to some other target than default one. However
issuing systemctl isolate command to desired target would bring system
to default target as a consequence of running ExecStopPost action.
Having common ancestor for rescue shell and possible followup systemctl
default command should fix this. If user exits rescue shell we will
proceed with isolating default target, otherwise, on manual isolate,
parent shell process is terminated and we don't isolate default target,
but target chosen by user.
Suggested-by: Michal Schmidt <mschmidt@redhat.com>
(cherry picked from commit d3381512282f2ca1c7669f77fb736a90fdce6982)
---
units/emergency.service.in | 3 +--
units/rescue.service.m4.in | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/units/emergency.service.in b/units/emergency.service.in
index 94c090f654..91fc1bbf51 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -17,8 +17,7 @@ Environment=HOME=/root
WorkingDirectory=/root
ExecStartPre=-/bin/plymouth quit
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=@SYSTEMCTL@ --fail --no-block default
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
Type=idle
StandardInput=tty-force
StandardOutput=inherit
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
index 552ef8981b..ef5436960f 100644
--- a/units/rescue.service.m4.in
+++ b/units/rescue.service.m4.in
@@ -18,8 +18,7 @@ Environment=HOME=/root
WorkingDirectory=/root
ExecStartPre=-/bin/plymouth quit
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
Type=idle
StandardInput=tty-force
StandardOutput=inherit

View File

@ -1,119 +0,0 @@
From 15dbdbd90db21bea19e48194a485bbaaa9501b9b Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 12:04:55 +0200
Subject: [PATCH] util: don't consider tabs special in string_has_cc() anymore
Instead, take a list of exceptions to our usual CC check
(cherry picked from commit 6294aa76d818e831de4592b41a37e225fd0871f9)
---
src/hostname/hostnamed.c | 3 +--
src/shared/env-util.c | 4 +++-
src/shared/fileio.c | 2 +-
src/shared/util.c | 19 ++++++++++---------
src/shared/util.h | 2 +-
5 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 8127b688c4..eaae1139fa 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -551,8 +551,7 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop
if (prop == PROP_ICON_NAME && !filename_is_safe(name))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid icon name '%s'", name);
- if (prop == PROP_PRETTY_HOSTNAME &&
- (string_has_cc(name) || chars_intersect(name, "\t")))
+ if (prop == PROP_PRETTY_HOSTNAME && string_has_cc(name, NULL))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid pretty host name '%s'", name);
if (prop == PROP_CHASSIS && !valid_chassis(name))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid chassis '%s'", name);
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index b2e45531ab..20b208f63c 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -78,7 +78,9 @@ bool env_value_is_valid(const char *e) {
if (!utf8_is_valid(e))
return false;
- if (string_has_cc(e))
+ /* bash allows tabs in environment variables, and so should
+ * we */
+ if (string_has_cc(e, "\t"))
return false;
/* POSIX says the overall size of the environment block cannot
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index fb1c1bcf9f..b1de5908c5 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -738,7 +738,7 @@ static void write_env_var(FILE *f, const char *v) {
p++;
fwrite(v, 1, p-v, f);
- if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
+ if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
fputc('\"', f);
for (; *p; p++) {
diff --git a/src/shared/util.c b/src/shared/util.c
index d25ee6652f..d223ecf711 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5350,16 +5350,14 @@ bool filename_is_safe(const char *p) {
bool string_is_safe(const char *p) {
const char *t;
- assert(p);
+ if (!p)
+ return false;
for (t = p; *t; t++) {
if (*t > 0 && *t < ' ')
return false;
- if (*t == 127)
- return false;
-
- if (strchr("\\\"\'", *t))
+ if (strchr("\\\"\'\0x7f", *t))
return false;
}
@@ -5367,16 +5365,19 @@ bool string_is_safe(const char *p) {
}
/**
- * Check if a string contains control characters.
- * Spaces and tabs are not considered control characters.
+ * Check if a string contains control characters. If 'ok' is non-NULL
+ * it may be a string containing additional CCs to be considered OK.
*/
-bool string_has_cc(const char *p) {
+bool string_has_cc(const char *p, const char *ok) {
const char *t;
assert(p);
for (t = p; *t; t++) {
- if (*t > 0 && *t < ' ' && *t != '\t')
+ if (ok && strchr(ok, *t))
+ return false;
+
+ if (*t > 0 && *t < ' ')
return true;
if (*t == 127)
diff --git a/src/shared/util.h b/src/shared/util.h
index e23069c016..7124e51d90 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -692,7 +692,7 @@ _alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_
bool filename_is_safe(const char *p) _pure_;
bool path_is_safe(const char *p) _pure_;
bool string_is_safe(const char *p) _pure_;
-bool string_has_cc(const char *p) _pure_;
+bool string_has_cc(const char *p, const char *ok) _pure_;
/**
* Check if a string contains any glob patterns.

View File

@ -1,56 +0,0 @@
From 10242a06bf0b1cd3bde58cada79c8a1aae5d8caa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Jul 2014 09:21:15 -0400
Subject: [PATCH] util: fix has cc check and add test
---
src/shared/util.c | 2 +-
src/test/test-util.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index d223ecf711..03a5860a62 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5375,7 +5375,7 @@ bool string_has_cc(const char *p, const char *ok) {
for (t = p; *t; t++) {
if (ok && strchr(ok, *t))
- return false;
+ continue;
if (*t > 0 && *t < ' ')
return true;
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 44921bd156..ed91a67d10 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -731,6 +731,20 @@ static void test_filename_is_safe(void) {
assert_se(filename_is_safe("o.o"));
}
+static void test_string_has_cc(void) {
+ assert_se(string_has_cc("abc\1", NULL));
+ assert_se(string_has_cc("abc\x7f", NULL));
+ assert_se(string_has_cc("abc\x7f", NULL));
+ assert_se(string_has_cc("abc\t\x7f", "\t"));
+ assert_se(string_has_cc("abc\t\x7f", "\t"));
+ assert_se(string_has_cc("\x7f", "\t"));
+ assert_se(string_has_cc("\x7f", "\t\a"));
+
+ assert_se(!string_has_cc("abc\t\t", "\t"));
+ assert_se(!string_has_cc("abc\t\t\a", "\t\a"));
+ assert_se(!string_has_cc("a\ab\tc", "\t\a"));
+}
+
static void test_ascii_strlower(void) {
char a[] = "AabBcC Jk Ii Od LKJJJ kkd LK";
assert_se(streq(ascii_strlower(a), "aabbcc jk ii od lkjjj kkd lk"));
@@ -937,6 +951,7 @@ int main(int argc, char *argv[]) {
test_log2i();
test_foreach_string();
test_filename_is_safe();
+ test_string_has_cc();
test_ascii_strlower();
test_files_same();
test_is_valid_documentation_url();

View File

@ -1,52 +0,0 @@
From e17ff7ab5115b80f0d2bd4989cd31889bd54fbb1 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Jul 2014 19:20:58 +0200
Subject: [PATCH] sysusers: don't allow user names longer than UT_NAMESIZE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As pointed out by Miloslav Trmač it might be a good idea to make sure
that usernames stay with in the utmp-defined limits.
(cherry picked from commit 932ad62b84165b0acf690ea34c4b8083657ae244)
---
man/sysusers.d.xml | 2 +-
src/sysusers/sysusers.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml
index 549b3f6351..40f8715bc0 100644
--- a/man/sysusers.d.xml
+++ b/man/sysusers.d.xml
@@ -142,7 +142,7 @@ m authd input</programlisting>
<title>Name</title>
<para>The name field specifies the user or
- group name. It should be be shorter than 256
+ group name. It should be be shorter than 31
characters and avoid any non-ASCII characters,
and not begin with a numeric character. It is
strongly recommended to pick user and group
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index c0af69300a..f3ba8cf7b3 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -24,6 +24,7 @@
#include <grp.h>
#include <shadow.h>
#include <getopt.h>
+#include <utmp.h>
#include "util.h"
#include "hashmap.h"
@@ -1095,6 +1096,9 @@ static bool valid_user_group_name(const char *u) {
if ((size_t) (i-u) > (size_t) sz)
return false;
+ if ((size_t) (i-u) > UT_NAMESIZE - 1)
+ return false;
+
return true;
}

View File

@ -1,27 +0,0 @@
From b374a6f62172bf5352cc1ad825ace44d78430e0c Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Jul 2014 19:21:42 +0200
Subject: [PATCH] sysusers: don't allow control characters in gecos fields
(cherry picked from commit 38c74dad1c3d605018e61074e0b80f6b9523b1c8)
---
src/sysusers/sysusers.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index f3ba8cf7b3..16ea0c9c57 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -1107,7 +1107,11 @@ static bool valid_gecos(const char *d) {
if (!utf8_is_valid(d))
return false;
- if (strpbrk(d, ":\n"))
+ if (string_has_cc(d, NULL))
+ return false;
+
+ /* Colons are used as field separators, and hence not OK */
+ if (strchr(d, ':'))
return false;
return true;

View File

@ -1,122 +0,0 @@
From e65cf4e9d68dd4526524b33709bd16afb95f374a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 10 Jul 2014 08:50:32 -0400
Subject: [PATCH] sysusers: allow overrides in /etc and /run
An administrator might want to block a certain sysusers config file from
being executed, e.g. to block the creation of a certain user.
Only a relatively short description is added in the man page, since
overrides should be relatively rare.
(cherry picked from commit 938a560b7608e8906134ed7d717c3f5aa459a760)
---
man/sysusers.d.xml | 63 ++++++++++++++++++++++++++++++++++---------------
src/sysusers/sysusers.c | 2 ++
2 files changed, 46 insertions(+), 19 deletions(-)
diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml
index 40f8715bc0..00eb7ec942 100644
--- a/man/sysusers.d.xml
+++ b/man/sysusers.d.xml
@@ -53,32 +53,28 @@
<title>Description</title>
<para><command>systemd-sysusers</command> uses the
- files from <filename>/usr/lib/sysusers.d/</filename>
+ files from <filename>sysusers.d</filename> directory
to create system users and groups at package
- installation or boot time. This tool may be used for
- allocating system users and groups only, it is not
+ installation or boot time. This tool may be used to
+ allocate system users and groups only, it is not
useful for creating non-system users and groups, as it
- accessed <filename>/etc/passwd</filename> and
+ accesses <filename>/etc/passwd</filename> and
<filename>/etc/group</filename> directly, bypassing
- any more complex user database, for example any
+ any more complex user databases, for example any
database involving NIS or LDAP.</para>
-
</refsect1>
<refsect1>
- <title>File Format</title>
-
- <para>Each file shall be named in the style of
- <filename><replaceable>package</replaceable>.conf</filename>.</para>
+ <title>Configuration Format</title>
- <para>All files are sorted by their filename in
- lexicographic order, regardless of which of the
- directories they reside in. If multiple files specify
- the same user or group, the entry in the file with the
- lexicographically earliest name will be applied, all
- all other conflicting entries will be logged as
- errors. Users and groups are
- processed in the order they are listed.</para>
+ <para>Each configuration file shall be named in the
+ style of
+ <filename><replaceable>package</replaceable>.conf</filename>
+ or
+ <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
+ The second variant should be used when it is desirable
+ to make it easy to override just this part of
+ configuration.</para>
<para>The file format is one line per user or group
containing name, ID and GECOS field description:</para>
@@ -193,10 +189,39 @@ m authd input</programlisting>
</refsect1>
<refsect1>
+ <title>Overriding vendor configuration</title>
+
+ <para>Note that <command>systemd-sysusers</command>
+ will do nothing if the specified users or groups
+ already exist, so normally there no reason to override
+ <filename>sysusers.d</filename> vendor configuration,
+ except to block certain users or groups from being
+ created.</para>
+
+ <para>Files in <filename>/etc/sysusers.d</filename>
+ override files with the same name in
+ <filename>/usr/lib/sysusers.d</filename> and
+ <filename>/run/sysusers.d</filename>. Files in
+ <filename>/run/sysusers.d</filename> override files
+ with the same name in
+ <filename>/usr/lib/sysusers.d</filename>. The scheme is the same as for
+ <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ except for the directory name.</para>
+
+ <para>If the administrator wants to disable a
+ configuration file supplied by the vendor, the
+ recommended way is to place a symlink to
+ <filename>/dev/null</filename> in
+ <filename>/etc/sysusers.d/</filename> bearing the
+ same filename.</para>
+ </refsect1>
+
+ <refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 16ea0c9c57..61c9bb5efb 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -62,6 +62,8 @@ typedef struct Item {
static char *arg_root = NULL;
static const char conf_file_dirs[] =
+ "/etc/sysusers.d\0"
+ "/run/sysusers.d\0"
"/usr/local/lib/sysusers.d\0"
"/usr/lib/sysusers.d\0"
#ifdef HAVE_SPLIT_USR

View File

@ -1,37 +0,0 @@
From 634ddd73f790dd779e97edd1491178897858f7c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 10 Jul 2014 22:34:43 -0400
Subject: [PATCH] man: document x-systemd.device-timeout for crypttab
https://bugs.freedesktop.org/show_bug.cgi?id=54210
(cherry picked from commit dc5cd2b77288dc85c82cb95810cd14caee311e7e)
---
man/crypttab.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/man/crypttab.xml b/man/crypttab.xml
index 9dbf1546b1..d658a6ff20 100644
--- a/man/crypttab.xml
+++ b/man/crypttab.xml
@@ -319,6 +319,21 @@
</varlistentry>
<varlistentry>
+ <term><option>x-systemd.device-timeout=</option></term>
+
+ <listitem><para>Specifies how long
+ systemd should wait for a device to
+ show up before giving up on the
+ entry. The argument is a time in
+ seconds or explicitly specifified
+ units of <literal>s</literal>,
+ <literal>min</literal>,
+ <literal>h</literal>,
+ <literal>ms</literal>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>tmp</option></term>
<listitem><para>The encrypted block device will

View File

@ -1,224 +0,0 @@
From ba838f7f9b3de1777f3528c0fe211f9bedbd2a8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Jul 2014 08:25:20 -0400
Subject: [PATCH] shell-completion,man: beef up chassis completions and
description
Parameters to hostnamectl command are not optional and should not be marked
as such in the man page.
(cherry picked from commit 1ed774956406941d4812a3fb4493d2915f130f12)
---
man/hostnamectl.xml | 73 +++++++++++++++++++++------------------
shell-completion/bash/hostnamectl | 3 ++
shell-completion/zsh/_hostnamectl | 32 +++++++++++++++--
shell-completion/zsh/_localectl | 4 +--
4 files changed, 75 insertions(+), 37 deletions(-)
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index 001bfced03..13e5bd57f2 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -141,13 +141,14 @@
</varlistentry>
<varlistentry>
- <term><command>set-hostname [NAME]</command></term>
+ <term><command>set-hostname <replaceable>NAME</replaceable></command></term>
<listitem><para>Set the system
- hostname. By default, this will alter
- the pretty, the static, and the
- transient hostname alike; however, if
- one or more of
+ hostname to
+ <replaceable>NAME</replaceable>. By
+ default, this will alter the pretty,
+ the static, and the transient hostname
+ alike; however, if one or more of
<option>--static</option>,
<option>--transient</option>,
<option>--pretty</option> are used,
@@ -168,55 +169,61 @@
the hostname string is not done if
only the transient and/or static host
names are set, and the pretty host
- name is left untouched. Pass the empty
- string <literal></literal> as the
- hostname to reset the selected
- hostnames to their default (usually
+ name is left untouched.</para>
+
+ <para>Pass the empty string
+ <literal></literal> as the hostname to
+ reset the selected hostnames to their
+ default (usually
<literal>localhost</literal>).</para></listitem>
</varlistentry>
<varlistentry>
- <term><command>set-icon-name [NAME]</command></term>
+ <term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
<listitem><para>Set the system icon
- name. The icon name is used by some
- graphical applications to visualize
- this host. The icon name should follow
- the <ulink
+ name to
+ <replaceable>NAME</replaceable>. The
+ icon name is used by some graphical
+ applications to visualize this host.
+ The icon name should follow the <ulink
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
- Naming Specification</ulink>. Pass an
- empty string to this operation to
- reset the icon name to the default
- value, which is determined from chassis
- type (see below) and possibly other
+ Naming Specification</ulink>.</para>
+
+ <para>Pass an empty string to reset
+ the icon name to the default value,
+ which is determined from chassis type
+ (see below) and possibly other
parameters.</para></listitem>
</varlistentry>
<varlistentry>
- <term><command>set-chassis [TYPE]</command></term>
+ <term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
- <listitem><para>Set the chassis
- type. The chassis type is used by some
+ <listitem><para>Set the chassis type
+ to <replaceable>TYPE</replaceable>.
+ The chassis type is used by some
graphical applications to visualize
- the host or alter user
- interaction. Currently, the following
- chassis types are defined:
+ the host or alter user interaction.
+ Currently, the following chassis types
+ are defined:
<literal>desktop</literal>,
<literal>laptop</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
- <literal>handset</literal>,
- <literal>watch</literal>, as well as
+ <literal>handset</literal>,
+ <literal>watch</literal>, as well as
the special chassis types
<literal>vm</literal> and
<literal>container</literal> for
virtualized systems that lack an
- immediate physical chassis. Pass an
- empty string to this operation to
- reset the chassis type to the default
- value which is determined from the
- firmware and possibly other
- parameters.</para></listitem>
+ immediate physical chassis.</para>
+
+ <para>Pass an empty string to reset
+ the chassis type to the default value
+ which is determined from the firmware
+ and possibly other parameters.</para>
+ </listitem>
</varlistentry>
</variablelist>
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
index 9c75da9e7f..22f8f06b69 100644
--- a/shell-completion/bash/hostnamectl
+++ b/shell-completion/bash/hostnamectl
@@ -39,6 +39,7 @@ _hostnamectl() {
[STANDALONE]='status'
[ICONS]='set-icon-name'
[NAME]='set-hostname'
+ [CHASSIS]='set-chassis'
)
for ((i=0; i < COMP_CWORD; i++)); do
@@ -50,6 +51,8 @@ _hostnamectl() {
if [[ -z $verb ]]; then
comps=${VERBS[*]}
+ elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
+ comps='desktop laptop server tablet handset watch vm container'
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
comps=''
fi
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
index 7effa0489e..be8687609e 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -1,5 +1,30 @@
#compdef hostnamectl
+_hostnamectl_set-hostname() {
+ if (( CURRENT <= 3 )); then
+ _message "new hostname"
+ else
+ _message "no more options"
+ fi
+}
+
+_hostnamectl_set-icon-name() {
+ if (( CURRENT <= 3 )); then
+ _message "new icon name"
+ else
+ _message "no more options"
+ fi
+}
+
+_hostnamectl_set-chassis() {
+ if (( CURRENT <= 3 )); then
+ _chassis=( desktop laptop server tablet handset watch vm container )
+ _describe chassis _chassis
+ else
+ _message "no more options"
+ fi
+}
+
_hostnamectl_command() {
local -a _hostnamectl_cmds
_hostnamectl_cmds=(
@@ -14,8 +39,11 @@ _hostnamectl_command() {
local curcontext="$curcontext"
cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}"
if (( $#cmd )); then
- [[ $cmd == status ]] && msg="no options" || msg="options for $cmd"
- _message "$msg"
+ if [[ $cmd == status ]]; then
+ _message "no options"
+ else
+ _hostnamectl_$cmd
+ fi
else
_message "unknown hostnamectl command: $words[1]"
fi
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
index 87432da1dc..d8af4d1863 100644
--- a/shell-completion/zsh/_localectl
+++ b/shell-completion/zsh/_localectl
@@ -22,8 +22,8 @@ _localectl_set-locale() {
_localectl_set-keymap() {
local -a _keymaps
- _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
if (( CURRENT <= 3 )); then
+ _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
_describe keymaps _keymaps
else
_message "no more options"
@@ -77,7 +77,7 @@ _localectl_command() {
if (( $+functions[_localectl_$cmd] )); then
_localectl_$cmd
else
- _message "no more options"
+ _message "unknown localectl command: $words[1]"
fi
fi
}

View File

@ -1,33 +0,0 @@
From 33def81ef9cbfd7827e5239c1389c571db600f98 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Fri, 4 Jul 2014 14:43:14 -0400
Subject: [PATCH] Revert "build-sys: include PolicyKit files as part of
distribution"
This reverts commit 0c26bfc3d21fdb3963f1248c237e2f1a33b5566d.
src/core/org.freedesktop.systemd1.policy.in.in depends on values which
are specified at configure time, so we cannot ship the corresponding
policy file in the tarball.
Since we need to regenerate one policy file, we might as well generate
them all.
(cherry picked from commit 3ce142490907d31c33ac03d72554f92459192f92)
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 7210ab70be..9525e748cf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5224,7 +5224,7 @@ units/user/%: units/%.m4
$(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
if ENABLE_POLKIT
-dist_polkitpolicy_DATA = \
+nodist_polkitpolicy_DATA = \
$(polkitpolicy_files) \
$(polkitpolicy_in_in_files:.policy.in.in=.policy)
endif

View File

@ -1,27 +0,0 @@
From 8147d2f97abd8460541fdb0ba961f3fac5ca86ae Mon Sep 17 00:00:00 2001
From: Jon Severinsson <jon@severinsson.net>
Date: Fri, 11 Jul 2014 14:37:36 +0200
Subject: [PATCH] build-sys: Do not distribute generated emergency.service
It is already in nodist_systemunit_DATA and if it is
shipped, it contains the hardcoded path to systemctl
which will cause it to fail to start when
rootprefix != prefix and rootbindir != bindir.
(cherry picked from commit 3864c28549d742427fdf33026e522e9f10a7e4ec)
---
Makefile.am | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 9525e748cf..025461b497 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -413,7 +413,6 @@ dist_sysctl_DATA = \
dist_systemunit_DATA = \
units/graphical.target \
units/multi-user.target \
- units/emergency.service \
units/emergency.target \
units/sysinit.target \
units/basic.target \

View File

@ -1,54 +0,0 @@
From 2d258d4a029f43d22050cab56c3dfae36a8ace45 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Sun, 13 Jul 2014 13:35:33 -0700
Subject: [PATCH] sysusers: preserve label of /etc/{passwd, group}
These files are specially labeled on SELinux systems, and we need to
preserve that label.
(cherry picked from commit a334cbba7222d3d7d886c17c828fa4227c656535)
---
src/sysusers/sysusers.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 61c9bb5efb..6ec22ccc73 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -312,7 +312,11 @@ static int write_files(void) {
_cleanup_fclose_ FILE *original = NULL;
group_path = fix_root("/etc/group");
+ r = label_context_set("/etc/group", S_IFREG);
+ if (r < 0)
+ goto finish;
r = fopen_temporary(group_path, &group, &group_tmp);
+ label_context_clear();
if (r < 0)
goto finish;
@@ -388,9 +392,14 @@ static int write_files(void) {
_cleanup_fclose_ FILE *original = NULL;
passwd_path = fix_root("/etc/passwd");
- r = fopen_temporary(passwd_path, &passwd, &passwd_tmp);
+ r = label_context_set("/etc/passwd", S_IFREG);
if (r < 0)
goto finish;
+ r = fopen_temporary(passwd_path, &passwd, &passwd_tmp);
+ label_context_clear();
+ if (r < 0) {
+ goto finish;
+ }
if (fchmod(fileno(passwd), 0644) < 0) {
r = -errno;
@@ -1527,6 +1536,8 @@ int main(int argc, char *argv[]) {
umask(0022);
+ label_init(NULL);
+
r = 0;
if (optind < argc) {

View File

@ -1,111 +0,0 @@
From 8aa593f9b9c68d27a9722d1c80c39b9ff65bc2de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 13 Jul 2014 21:10:38 -0400
Subject: [PATCH] Add function to open temp files in selinux mode
(cherry picked from commit f7f628b5db770feb8b18990436baefaec55c460b)
---
src/shared/fileio-label.c | 20 ++++++++++++++++++--
src/shared/fileio-label.h | 2 ++
src/sysusers/sysusers.c | 15 ++++-----------
3 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/shared/fileio-label.c b/src/shared/fileio-label.c
index 0711826e85..417ca5695a 100644
--- a/src/shared/fileio-label.c
+++ b/src/shared/fileio-label.c
@@ -25,12 +25,13 @@
#include "fileio-label.h"
#include "label.h"
+#include "util.h"
int write_string_file_atomic_label(const char *fn, const char *line) {
int r;
r = label_context_set(fn, S_IFREG);
- if (r < 0)
+ if (r < 0)
return r;
write_string_file_atomic(fn, line);
@@ -44,7 +45,7 @@ int write_env_file_label(const char *fname, char **l) {
int r;
r = label_context_set(fname, S_IFREG);
- if (r < 0)
+ if (r < 0)
return r;
write_env_file(fname, l);
@@ -53,3 +54,18 @@ int write_env_file_label(const char *fname, char **l) {
return r;
}
+
+int fopen_temporary_label(const char *target,
+ const char *path, FILE **f, char **temp_path) {
+ int r;
+
+ r = label_context_set("/etc/passwd", S_IFREG);
+ if (r < 0)
+ return r;
+
+ r = fopen_temporary(path, f, temp_path);
+
+ label_context_clear();
+
+ return r;
+}
diff --git a/src/shared/fileio-label.h b/src/shared/fileio-label.h
index fce4fe0d73..25fa351be2 100644
--- a/src/shared/fileio-label.h
+++ b/src/shared/fileio-label.h
@@ -27,3 +27,5 @@
int write_string_file_atomic_label(const char *fn, const char *line);
int write_env_file_label(const char *fname, char **l);
+int fopen_temporary_label(const char *target,
+ const char *path, FILE **f, char **temp_path);
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 6ec22ccc73..bf2fbbc252 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -35,6 +35,8 @@
#include "conf-files.h"
#include "copy.h"
#include "utf8.h"
+#include "label.h"
+#include "fileio-label.h"
typedef enum ItemType {
ADD_USER = 'u',
@@ -312,11 +314,7 @@ static int write_files(void) {
_cleanup_fclose_ FILE *original = NULL;
group_path = fix_root("/etc/group");
- r = label_context_set("/etc/group", S_IFREG);
- if (r < 0)
- goto finish;
- r = fopen_temporary(group_path, &group, &group_tmp);
- label_context_clear();
+ r = fopen_temporary_label("/etc/group", group_path, &group, &group_tmp);
if (r < 0)
goto finish;
@@ -392,14 +390,9 @@ static int write_files(void) {
_cleanup_fclose_ FILE *original = NULL;
passwd_path = fix_root("/etc/passwd");
- r = label_context_set("/etc/passwd", S_IFREG);
+ r = fopen_temporary_label("/etc/passwd", passwd_path, &passwd, &passwd_tmp);
if (r < 0)
goto finish;
- r = fopen_temporary(passwd_path, &passwd, &passwd_tmp);
- label_context_clear();
- if (r < 0) {
- goto finish;
- }
if (fchmod(fileno(passwd), 0644) < 0) {
r = -errno;

View File

@ -1,200 +0,0 @@
From e6751d628bdc96c751517e9b6680d3a3a5cd8f2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 13 Jul 2014 20:32:46 -0400
Subject: [PATCH] man: add systemd-coredump(8) and a bunch of links
(cherry picked from commit 5146e7e8aec2d394c06771d4c9d0d03fc2cd911c)
---
Makefile-man.am | 4 +-
man/coredumpctl.xml | 2 +
man/journalctl.xml | 1 +
man/systemd-coredump.xml | 105 +++++++++++++++++++++++++++++++++++++++
man/systemd-journald.service.xml | 1 +
sysctl.d/50-coredump.conf.in | 4 +-
6 files changed, 115 insertions(+), 2 deletions(-)
create mode 100644 man/systemd-coredump.xml
diff --git a/Makefile-man.am b/Makefile-man.am
index 4238c21710..a02ef733aa 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -681,7 +681,8 @@ endif
if ENABLE_COREDUMP
MANPAGES += \
man/coredump.conf.5 \
- man/coredumpctl.1
+ man/coredumpctl.1 \
+ man/systemd-coredump.8
MANPAGES_ALIAS += \
#
@@ -1595,6 +1596,7 @@ EXTRA_DIST += \
man/systemd-cat.xml \
man/systemd-cgls.xml \
man/systemd-cgtop.xml \
+ man/systemd-coredump.xml \
man/systemd-cryptsetup-generator.xml \
man/systemd-cryptsetup@.service.xml \
man/systemd-debug-generator.xml \
diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml
index 73d1b8435f..327ef6e859 100644
--- a/man/coredumpctl.xml
+++ b/man/coredumpctl.xml
@@ -210,6 +210,8 @@
<refsect1>
<title>See Also</title>
<para>
+ <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 78fc6f6160..de7741c819 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -908,6 +908,7 @@
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml
new file mode 100644
index 0000000000..b83b278620
--- /dev/null
+++ b/man/systemd-coredump.xml
@@ -0,0 +1,105 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+ This file is part of systemd.
+
+ Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="systemd-coredump" conditional='ENABLE_COREDUMP'
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <refentryinfo>
+ <title>systemd-coredump</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart@poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>systemd-coredump</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>systemd-coredump</refname>
+ <refpurpose>Log and store core dumps</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <para><filename>/usr/lib/systemd/systemd-coredump</filename></para>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><command>systemd-coredump</command> can be used as a helper
+ binary by the kernel when a user space program receives a fatal
+ signal and dumps core. For it to be used in this capacity, it must
+ be specified by the
+ <varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ setting. Systemd installs
+ <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> which
+ configures <varname>kernel.core_pattern</varname> to invoke
+ <command>systemd-coredump</command>. This file may be masked or
+ overriden to use a different setting following normal
+ <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> rules.</para>
+
+ <para>The behaviour of a specific program upon reception of a
+ signal is governed by a few factors which are described in detail
+ in <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ In particular, the coredump will only be processed when the
+ related resource limits are high enough. For programs started by
+ <command>systemd</command> those may be set using
+ <varname>LimitCore=</varname> (see
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+ </para>
+
+ <para><command>systemd-coredump</command> will log the coredump
+ including a backtrace if possible, and store the core (contents of
+ process' memory contents) in an external file on disk in
+ <filename>/var/lib/systemd/coredump</filename>, or directly in
+ the journal. This behaviour may be modified using
+ <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+
+ <para>Apart from the
+ <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ log viewer,
+ <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ may be used to list and extract coredumps.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+ </para>
+ </refsect1>
+</refentry>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
index 7ac73ed66d..eb16118afd 100644
--- a/man/systemd-journald.service.xml
+++ b/man/systemd-journald.service.xml
@@ -248,6 +248,7 @@
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>setfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<command>pydoc systemd.journal</command>.
</para>
diff --git a/sysctl.d/50-coredump.conf.in b/sysctl.d/50-coredump.conf.in
index d5795a37d5..d5f600ef45 100644
--- a/sysctl.d/50-coredump.conf.in
+++ b/sysctl.d/50-coredump.conf.in
@@ -5,6 +5,8 @@
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
-# See sysctl.d(5) and core(5) for for details.
+# See sysctl.d(5) for the description of the files in this directory,
+# and systemd-coredump(8) and core(5) for the explanation of the
+# setting below.
kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %p %u %g %s %t %e

View File

@ -1,26 +0,0 @@
From 508627c15e7f98b1169810a2998c1707305fd58c Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd@luon.net>
Date: Sun, 13 Jul 2014 16:56:16 +0200
Subject: [PATCH] man: sysusers.d correct default user shell
For the non-root user sysusers uses nologin as the default shell, not
login. Correct the documentation to match the code.
(cherry picked from commit eb34cba76323ea673471e226f97721bd6bdbcbf6)
---
man/sysusers.d.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml
index 00eb7ec942..1e079b2111 100644
--- a/man/sysusers.d.xml
+++ b/man/sysusers.d.xml
@@ -102,7 +102,7 @@ m authd input</programlisting>
group will be set to the group
bearing the same name. The
user's shell will be set to
- <filename>/sbin/login</filename>,
+ <filename>/sbin/nologin</filename>,
the home directory to
<filename>/</filename>. The
account will be created

View File

@ -1,41 +0,0 @@
From 7dd741b242fef522190d6a1412ca9b422286a879 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Date: Sat, 12 Jul 2014 19:36:16 +0300
Subject: [PATCH] man: mention XDG_DATA_HOME in systemd.unit
(cherry picked from commit 91acdc17a5b47e775369c6b907601f44fab07dcb)
---
man/systemd.unit.xml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index cd3279c192..f66c580a37 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -74,6 +74,8 @@
<filename>$HOME/.config/systemd/user/*</filename>
<filename>/etc/systemd/user/*</filename>
<filename>/run/systemd/user/*</filename>
+<filename>$XDG_DATA_HOME/systemd/user/*</filename>
+<filename>$HOME/.local/share/systemd/user/*</filename>
<filename>/usr/lib/systemd/user/*</filename>
<filename>...</filename>
</literallayout></para>
@@ -339,8 +341,16 @@
<entry>Runtime units</entry>
</row>
<row>
+ <entry><filename>$XDG_DATA_HOME/systemd/user</filename></entry>
+ <entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is set)</entry>
+ </row>
+ <row>
+ <entry><filename>$HOME/.local/share/systemd/user</filename></entry>
+ <entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</entry>
+ </row>
+ <row>
<entry><filename>/usr/lib/systemd/user</filename></entry>
- <entry>Units of installed packages</entry>
+ <entry>Units of packages that have been installed system-wide</entry>
</row>
</tbody>
</tgroup>

View File

@ -1,49 +0,0 @@
From d8f6518b91f3c493471fa73b7ca98759e895a3d7 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Date: Sat, 12 Jul 2014 18:59:19 +0300
Subject: [PATCH] path-lookup: don't make ~/.local/share/systemd/user a symlink
We already encourage upstreams to keep the default configuration
separate from user customizations for software that is installed in
the system location. Let's allow that separation also for software
that is installed in the home directory.
Some discussion:
http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/19627
(cherry picked from commit 667a1cd645c9402921dedff08a86bb35cddbcbf9)
---
src/shared/path-lookup.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index e0aaf4431f..7d53d859b6 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -125,26 +125,8 @@ static char** user_dirs(
goto fail;
} else if (home) {
- _cleanup_free_ char *data_home_parent = NULL;
-
if (asprintf(&data_home, "%s/.local/share/systemd/user", home) < 0)
goto fail;
-
- /* There is really no need for two unit dirs in $HOME,
- * except to be fully compliant with the XDG spec. We
- * now try to link the two dirs, so that we can
- * minimize disk seeks a little. Further down we'll
- * then filter out this link, if it is actually is
- * one. */
-
- if (path_get_parent(data_home, &data_home_parent) >= 0) {
- _cleanup_free_ char *config_home_relative = NULL;
-
- if (path_make_relative(data_home_parent, config_home, &config_home_relative) >= 0) {
- mkdir_parents_label(data_home, 0777);
- (void) symlink(config_home_relative, data_home);
- }
- }
}
e = getenv("XDG_DATA_DIRS");

View File

@ -1,53 +0,0 @@
From b91985eca0db632daecf6e20b1d3718f0f884389 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com>
Date: Sun, 13 Jul 2014 18:49:00 +0300
Subject: [PATCH] fileio: quote more shell characters in envfiles
Turns out, making strings shell-proof is harder than expected:
# machinectl set-hostname "foo|poweroff" && . /etc/machine-info
(This could be simplified by quoting *and* escaping all characters,
which is harmless in shell but unnecessary.)
(cherry picked from commit 0ce5a80601597fe4d1a715a8f70ce8d5ccaa2d86)
---
src/shared/fileio.c | 4 ++--
src/shared/util.h | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index b1de5908c5..d22770b772 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -738,11 +738,11 @@ static void write_env_var(FILE *f, const char *v) {
p++;
fwrite(v, 1, p-v, f);
- if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
+ if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE SHELL_NEED_QUOTES)) {
fputc('\"', f);
for (; *p; p++) {
- if (strchr("\'\"\\`$", *p))
+ if (strchr(SHELL_NEED_ESCAPE, *p))
fputc('\\', f);
fputc(*p, f);
diff --git a/src/shared/util.h b/src/shared/util.h
index 7124e51d90..64b9fc6884 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -93,6 +93,12 @@
#define COMMENTS "#;"
#define GLOB_CHARS "*?["
+/* What characters are special in the shell? */
+/* must be escaped outside and inside double-quotes */
+#define SHELL_NEED_ESCAPE "\"\\`$"
+/* can be escaped or double-quoted */
+#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;"
+
#define FORMAT_BYTES_MAX 8
#define ANSI_HIGHLIGHT_ON "\x1B[1;39m"

View File

@ -1,30 +0,0 @@
From f096a48e2195d0189742f8ed2e61cb0091d8fc62 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 14 Jul 2014 12:25:42 +0200
Subject: [PATCH] man: systemd.netdev - make it clear that we do not touch
preexisting netdevs
We will happily use bridges/bonds as master devices, but we will not change their settings if they were created by
someone else.
(cherry picked from commit 7c1cff4ff79f3121189403a8c1b7c350925b3aaa)
---
man/systemd.netdev.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 857221fdb0..347f80e692 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -60,7 +60,10 @@
<para>Virtual Network Device files must have the extension
<filename>.netdev</filename>; other extensions are ignored. Virtual
- network devices are created as soon as networkd is started.</para>
+ network devices are created as soon as networkd is started. If a netdev
+ with the specified name already exists, networkd will use that as-is
+ rather than create its own. Note that the settings of the pre-existing
+ netdev will not be changed by networkd.</para>
<para>The <filename>.netdev</filename> files are read from the files located in the
system network directory <filename>/usr/lib/systemd/network</filename>,

View File

@ -1,67 +0,0 @@
From 9221fcfe485a71dd206691f25fc7db3b02076bf3 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Tue, 15 Jul 2014 02:04:47 +0200
Subject: [PATCH] rules: consistently use "?*" instead of "*?"
(cherry picked from commit 64dfe7b74446bd56e2d0e1588f900372ac13ae42)
---
rules/99-systemd.rules.in | 2 +-
src/login/70-uaccess.rules | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
index db72373c16..c3ef81b178 100644
--- a/rules/99-systemd.rules.in
+++ b/rules/99-systemd.rules.in
@@ -43,7 +43,7 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"
SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules
index e1cf897acd..57f619d5eb 100644
--- a/src/login/70-uaccess.rules
+++ b/src/login/70-uaccess.rules
@@ -12,7 +12,7 @@ ENV{MAJOR}=="", GOTO="uaccess_end"
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess"
# Digicams with proprietary protocol
-ENV{ID_GPHOTO2}=="*?", TAG+="uaccess"
+ENV{ID_GPHOTO2}=="?*", TAG+="uaccess"
# SCSI and USB scanners
ENV{libsane_matched}=="yes", TAG+="uaccess"
@@ -49,13 +49,13 @@ SUBSYSTEM=="drm", KERNEL=="card*|renderD*", TAG+="uaccess"
SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess"
# smart-card readers
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="uaccess"
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess"
# (USB) authentication devices
-ENV{ID_SECURITY_TOKEN}=="*?", TAG+="uaccess"
+ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess"
# PDA devices
-ENV{ID_PDA}=="*?", TAG+="uaccess"
+ENV{ID_PDA}=="?*", TAG+="uaccess"
# Programmable remote control
ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
@@ -64,10 +64,10 @@ ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess"
# color measurement devices
-ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess"
+ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess"
# DDC/CI device, usually high-end monitors such as the DreamColor
-ENV{DDC_DEVICE}=="*?", TAG+="uaccess"
+ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
# media player raw devices (for user-mode drivers, Android SDK, etc.)
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"

View File

@ -1,31 +0,0 @@
From 5c34306656dbcc8932f3dd992cf7e3e1d78c8a80 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Tue, 15 Jul 2014 02:24:35 +0200
Subject: [PATCH] timesyncd: suppress resync at system time change when not
connected
Jul 04 17:46:03 orchid systemd[1]: Starting Network Time Synchronization...
Jul 04 17:46:03 orchid systemd[1]: Started Network Time Synchronization.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: System time changed. Resyncing.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: Assertion 'm->current_server_name'
https://bugs.freedesktop.org/show_bug.cgi?id=80932
(cherry picked from commit afc7b1b9c170b9d23a3d91367e00f33b2ee2e89e)
---
src/timesync/timesyncd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 27f6b2d226..9bc773ce5f 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -331,6 +331,9 @@ static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents
/* rearm timer */
manager_clock_watch_setup(m);
+ if (!m->current_server_address)
+ return 0;
+
/* skip our own jumps */
if (m->jumped) {
m->jumped = false;

View File

@ -1,45 +0,0 @@
From 1e673f08f3299f4704e26cb983f046091881dc01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 15 Jul 2014 09:52:17 -0400
Subject: [PATCH] timesyncd: only listen to clock changes when connected
This reverts previous commit and applies a different fix.
manager_clock_watch() callback calls manager_send_request() to kick
off a resync. We can only do that when we're actually connected to
something. It is not useful to setup the callback from manager_new().
Now the callback will be dropped in manager_connect() and requested
in manager_begin().
https://bugs.freedesktop.org/show_bug.cgi?id=80932
(cherry picked from commit c566ee3253132cc2ec37ed04c5bccbadf8e60c58)
---
src/timesync/timesyncd.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 9bc773ce5f..19af9f9b61 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -331,9 +331,6 @@ static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents
/* rearm timer */
manager_clock_watch_setup(m);
- if (!m->current_server_address)
- return 0;
-
/* skip our own jumps */
if (m->jumped) {
m->jumped = false;
@@ -1047,10 +1044,6 @@ static int manager_new(Manager **ret) {
if (r < 0)
return r;
- r = manager_clock_watch_setup(m);
- if (r < 0)
- return r;
-
*ret = m;
m = NULL;

View File

@ -1,140 +0,0 @@
From 49323e421a0fad064e3258ca26ae8c80a3386666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 14 Jul 2014 19:24:46 -0400
Subject: [PATCH] shell-completion: restore completion for -p
It was broken since systemd was moved out of /bin.
For zsh it was never there.
(cherry picked from commit c0a67aef31bb9716617ffe150ca8be19c5df203e)
---
Makefile.am | 19 +++++++++++++++++--
shell-completion/bash/.gitignore | 1 +
shell-completion/bash/{systemctl => systemctl.in} | 4 ++--
shell-completion/zsh/.gitignore | 1 +
shell-completion/zsh/{_systemctl => _systemctl.in} | 15 ++++++++++++++-
5 files changed, 35 insertions(+), 5 deletions(-)
create mode 100644 shell-completion/bash/.gitignore
rename shell-completion/bash/{systemctl => systemctl.in} (98%)
create mode 100644 shell-completion/zsh/.gitignore
rename shell-completion/zsh/{_systemctl => _systemctl.in} (95%)
diff --git a/Makefile.am b/Makefile.am
index 025461b497..9847ff50bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -383,7 +383,6 @@ systemgenerator_PROGRAMS = \
dist_bashcompletion_DATA = \
shell-completion/bash/busctl \
shell-completion/bash/journalctl \
- shell-completion/bash/systemctl \
shell-completion/bash/systemd-analyze \
shell-completion/bash/systemd-cat \
shell-completion/bash/systemd-cgls \
@@ -395,8 +394,10 @@ dist_bashcompletion_DATA = \
shell-completion/bash/udevadm \
shell-completion/bash/kernel-install
+nodist_bashcompletion_DATA = \
+ shell-completion/bash/systemctl
+
dist_zshcompletion_DATA = \
- shell-completion/zsh/_systemctl \
shell-completion/zsh/_journalctl \
shell-completion/zsh/_udevadm \
shell-completion/zsh/_kernel-install \
@@ -407,6 +408,17 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_systemd-delta \
shell-completion/zsh/_systemd
+nodist_zshcompletion_DATA = \
+ shell-completion/zsh/_systemctl
+
+EXTRA_DIST += \
+ shell-completion/bash/systemctl.in \
+ shell-completion/zsh/_systemctl.in
+
+CLEANFILES += \
+ $(nodist_bashcompletion_DATA) \
+ $(nodist_zshcompletion_DATA)
+
dist_sysctl_DATA = \
sysctl.d/50-default.conf
@@ -5196,6 +5208,9 @@ src/core/macros.%: src/core/macros.%.in
src/%.policy.in: src/%.policy.in.in
$(SED_PROCESS)
+shell-completion/%: shell-completion/%.in
+ $(SED_PROCESS)
+
%.rules: %.rules.in
$(SED_PROCESS)
diff --git a/shell-completion/bash/.gitignore b/shell-completion/bash/.gitignore
new file mode 100644
index 0000000000..016e09d1e7
--- /dev/null
+++ b/shell-completion/bash/.gitignore
@@ -0,0 +1 @@
+/systemctl
diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl.in
similarity index 98%
rename from shell-completion/bash/systemctl
rename to shell-completion/bash/systemctl.in
index e1c842006e..4beec4e13f 100644
--- a/shell-completion/bash/systemctl
+++ b/shell-completion/bash/systemctl.in
@@ -24,8 +24,8 @@ __systemctl() {
__systemd_properties() {
local mode=$1
- { __systemctl -a $mode show;
- systemd --dump-configuration-items; } |
+ { __systemctl $mode show --all;
+ @rootlibexecdir@/systemd --dump-configuration-items; } |
while IFS='=' read -r key value; do
[[ $value ]] && echo "$key"
done
diff --git a/shell-completion/zsh/.gitignore b/shell-completion/zsh/.gitignore
new file mode 100644
index 0000000000..75f13ad6d1
--- /dev/null
+++ b/shell-completion/zsh/.gitignore
@@ -0,0 +1 @@
+/_systemctl
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl.in
similarity index 95%
rename from shell-completion/zsh/_systemctl
rename to shell-completion/zsh/_systemctl.in
index b6cf664587..d9b8d1c0e3 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl.in
@@ -301,12 +301,25 @@ _unit_types() {
_values -s , "${_types[@]}"
}
+_unit_properties() {
+ if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES ) &&
+ ! _retrieve_cache SYS_ALL_PROPERTIES;
+ then
+ _sys_all_properties=( $( {__systemctl show --all;
+ @rootlibexecdir@/systemd --dump-configuration-items; } | {
+ while IFS='=' read -r a b; do [ -n "$b" ] && echo "$a"; done
+ }) )
+ _store_cache SYS_ALL_PROPRTIES _sys_all_properties
+ fi
+ _values -s , "${_sys_all_properties[@]}"
+}
+
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \
{-t+,--type=}'[List only units of a particular type]:unit type:_unit_types' \
'--state=[Display units in the specifyied state]:unit state:_unit_states' \
- \*{-p+,--property=}'[Show only properties by specific name]:unit property' \
+ {-p+,--property=}'[Show only properties by specific name]:unit property:_unit_properties' \
{-a,--all}'[Show all units/properties, including dead/empty ones]' \
'--reverse[Show reverse dependencies]' \
'--after[Show units ordered after]' \

View File

@ -1,27 +0,0 @@
From 5ad965069574badd35f79ecb8e6def133de8bd8b Mon Sep 17 00:00:00 2001
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
Date: Tue, 15 Jul 2014 08:36:29 +0200
Subject: [PATCH] core: fix oneshot service resource control
Oneshot services's cgroup is removed when the service
exits. An assert is hit otherwise.
(cherry picked from commit 285cd771cbe275265e165bdb5650b92b31eeab47)
---
src/core/manager.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 0cb2044325..edcde31ec1 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2539,7 +2539,8 @@ void manager_check_finished(Manager *m) {
}
SET_FOREACH(u, m->startup_units, i)
- cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
+ if (u->cgroup_path)
+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);

View File

@ -1,44 +0,0 @@
From 4e0d085ff52a7d7858a30c651e37b18f3e92618b Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Tue, 15 Jul 2014 17:35:53 +0200
Subject: [PATCH] rules: uaccess - add ID_SOFTWARE_RADIO
On Tue, Jul 15, 2014 at 1:52 PM, Alick Zhao <alick9188@gmail.com> wrote:
>>>
>>> So maybe ID_SOFTWARE_RADIO ?
>>
>> Hmm, SDR is more a term for a generic technology than for a device
>> class. To me it does not really sound like an administrator would know
>> what this is.
>>
>> What exactly is the device or subsystem you want to make accessible to
>> locally logged-in users only?
>
> Initially it is bladeRF, but many more are of interest: USRP, rtl-sdr,
> HackRF, ... [1]
>
> I agree an administrator might not know what SDR is, since it is
> currently still not widely known, and makes sense only for amateurs
> and researchers. But as a SDR fan, I see many new SDR peripherals
> are created recently, and expect to see more. So a generic ID seems
> reasonable to me.
>
> [1] http://en.wikipedia.org/wiki/List_of_software-defined_radios
(cherry picked from commit 30632d97d9d68c8202e562f34afae8f8d6e9c377)
---
src/login/70-uaccess.rules | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules
index 57f619d5eb..694df2cfc8 100644
--- a/src/login/70-uaccess.rules
+++ b/src/login/70-uaccess.rules
@@ -72,4 +72,7 @@ ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
# media player raw devices (for user-mode drivers, Android SDK, etc.)
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
+# software-defined radio communication devices
+ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
+
LABEL="uaccess_end"

View File

@ -1,32 +0,0 @@
From ae1d412f96829802688194e6957f75d37da9d7e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 30 Mar 2014 14:20:34 -0400
Subject: [PATCH] journal: allow files with no data whatsoever
If a file was opened for writing, and then closed immediately without
actually writing any entries, on subsequent opening, it would be
considered "corrupted". This should be totally fine, and even in
read mode, an empty file can become non-empty later on.
(cherry picked from commit b3306e9c3c1e036396bc6bf74555eecea3f45ad9)
---
src/journal/journal-file.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index b3b1ffc3c0..ef54af4558 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -271,12 +271,6 @@ static int journal_file_verify_header(JournalFile *f) {
!VALID64(le64toh(f->header->entry_array_offset)))
return -ENODATA;
- if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size))
- return -ENODATA;
-
if (f->writable) {
uint8_t state;
sd_id128_t machine_id;

View File

@ -1,33 +0,0 @@
From 89b958ef6a43400d1f7b25c58b02f4b5c3c59b36 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Tue, 15 Jul 2014 18:28:10 +0200
Subject: [PATCH] units/serial-getty@.service: use the default RestartSec
For pluggable ttys such as USB serial devices, the getty is restarted
and exits in a loop until the remove event reaches systemd. Under
certain circumstances the restart loop can overload the system in a
way that prevents the remove event from reaching systemd for a long
time (e.g. at least several minutes on a small embedded system).
Use the default RestartSec to prevent the restart loop from
overloading the system. Serial gettys are interactive units, so
waiting an extra 100ms really doesn't make a difference anyways
compared to the time it takes the user to log in.
(cherry picked from commit 4bf04322b8b7ecca4f3d65cfc642d0ac16356129)
---
units/serial-getty@.service.m4 | 1 -
1 file changed, 1 deletion(-)
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index 4ac51e768d..4522d0d2be 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
Type=idle
Restart=always
-RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes

View File

@ -1,33 +0,0 @@
From c46cee9156e8785fc70e8528d6deb402bef06ca0 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Wed, 16 Jul 2014 12:09:47 +0200
Subject: [PATCH] build-sys: don't move libgudev to /lib
It depends on libgobject and libgmodule which are installed in /usr/lib.
(cherry picked from commit 5c059d2ead0787a90732d27ed1b485d236abf641)
---
Makefile.am | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9847ff50bc..2b0c855da2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3338,16 +3338,6 @@ typelibs_DATA = \
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # HAVE_INTROSPECTION
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libgudev-install-hook:
- libname=libgudev-1.0.so && $(move-to-rootlibdir)
-
-libgudev-uninstall-hook:
- rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
-
-INSTALL_EXEC_HOOKS += libgudev-install-hook
-UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
endif
EXTRA_DIST += \

View File

@ -1,22 +0,0 @@
From a6874d3be0e08b17cc62b84e4dde2abebe035d81 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd@luon.net>
Date: Wed, 16 Jul 2014 12:09:56 +0200
Subject: [PATCH] shared: include stdbool.h in mkdir.h
(cherry picked from commit 4e4877d96c8afd0818176a472080986bbf28ea3a)
---
src/shared/mkdir.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/shared/mkdir.h b/src/shared/mkdir.h
index d15ede6064..dd5b41ec6f 100644
--- a/src/shared/mkdir.h
+++ b/src/shared/mkdir.h
@@ -22,6 +22,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
#include <sys/types.h>
int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid);

View File

@ -1,48 +0,0 @@
From 5a263a734350a1f2de6b3e6ac8813b51280a9794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Jul 2014 16:44:45 -0400
Subject: [PATCH] missing.h: add IFLA_MACVLAN_FLAGS
Now we are getting into kernel < 3.4 territory...
https://bugs.freedesktop.org/show_bug.cgi?id=80095
(cherry picked from commit 75616a1332aff00d27db713cda3bd93c508a5b59)
---
configure.ac | 3 ++-
src/shared/missing.h | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ae88382e21..df6b3571d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -310,7 +310,8 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN]
#include <linux/loop.h>
]])
-AC_CHECK_DECLS([IFLA_PHYS_PORT_ID,
+AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
+ IFLA_PHYS_PORT_ID,
IFLA_BOND_AD_INFO,
IFLA_VLAN_PROTOCOL,
IFLA_VXLAN_LOCAL6,
diff --git a/src/shared/missing.h b/src/shared/missing.h
index f129f0b2d3..818d704f92 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -371,6 +371,15 @@ static inline int setns(int fd, int nstype) {
#define LOOP_CTL_GET_FREE 0x4C82
#endif
+#if !HAVE_DECL_IFLA_MACVLAN_FLAGS
+#define IFLA_MACVLAN_UNSPEC 0
+#define IFLA_MACVLAN_MODE 1
+#define IFLA_MACVLAN_FLAGS 2
+#define __IFLA_MACVLAN_MAX 3
+
+#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
+#endif
+
#if !HAVE_DECL_IFLA_PHYS_PORT_ID
#undef IFLA_PROMISCUITY
#define IFLA_PROMISCUITY 30

View File

@ -1,47 +0,0 @@
From 6941ea3fb076b8abc3e4e1759f448e2532ed14a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Jul 2014 22:17:29 -0400
Subject: [PATCH] man: document yearly and annually in systemd.time(7)
https://bugs.freedesktop.org/show_bug.cgi?id=81158
(cherry picked from commit 8c275eef38bf7e3e592e4cb35a497522d1f15bb6)
---
man/systemd.time.xml | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/man/systemd.time.xml b/man/systemd.time.xml
index 0706cdf54a..02431a5a1e 100644
--- a/man/systemd.time.xml
+++ b/man/systemd.time.xml
@@ -243,12 +243,16 @@
<para>The special expressions
<literal>hourly</literal>, <literal>daily</literal>,
- <literal>monthly</literal> and <literal>weekly</literal>
- may be used as calendar events which refer to
- <literal>*-*-* *:00:00</literal>, <literal>*-*-*
- 00:00:00</literal>, <literal>*-*-01 00:00:00</literal> and
- <literal>Mon *-*-* 00:00:00</literal>,
- respectively.</para>
+ <literal>monthly</literal>, <literal>weekly</literal>,
+ and <literal>yearly</literal> or
+ <literal>annually</literal> may be used as calendar
+ events which refer to
+ <literal>*-*-* *:00:00</literal>,
+ <literal>*-*-* 00:00:00</literal>,
+ <literal>*-*-01 00:00:00</literal>,
+ <literal>Mon *-*-* 00:00:00</literal>, and
+ <literal>*-01-01 00:00:00</literal> respectively.
+ </para>
<para>Examples for valid timestamps and their
normalized form:</para>
@@ -277,6 +281,8 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03
daily → *-*-* 00:00:00
monthly → *-*-01 00:00:00
weekly → Mon *-*-* 00:00:00
+ yearly → *-01-01 00:00:00
+ annually → *-01-01 00:00:00
*:2/3 → *-*-* *:02/3:00</programlisting>
<para>Calendar events are used by timer units, see

View File

@ -1,28 +0,0 @@
From fe85271fb6090e58b36e182ce3e20a388f0ca006 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Jul 2014 22:52:53 -0400
Subject: [PATCH] core: nicer message when inotify watches are exhausted
inotify_add_watch returns ENOSPC, which translates to
"No space left on device", which is misleading.
https://bugs.freedesktop.org/show_bug.cgi?id=73628
(cherry picked from commit 18abe7bd3e13525b257da69ac49ff7841c289567)
---
src/core/path.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/path.c b/src/core/path.c
index 20e454d96f..f54c77f6c3 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -99,7 +99,8 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
break;
}
- log_warning("Failed to add watch on %s: %m", s->path);
+ log_warning("Failed to add watch on %s: %s", s->path,
+ errno == ENOSPC ? "too many watches" : strerror(-r));
r = -errno;
if (cut)
*cut = tmp;

View File

@ -1,31 +0,0 @@
From be8dbe82ba453b40e119010454e30237e6d02b12 Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 17 Jul 2014 11:25:37 +0200
Subject: [PATCH] detect-virt: Fix Xen domU discovery
The conditional for detection xen virtualization contained a little mistake.
It is checking for i to be empty: 'if (!i) {', but it must check for cap instead,
because: 'cap = strsep(&i, ",")' will set cap to the discovered value and i to
the next value after the separator.
Hence, i would be empty, if there is only control_d in domcap, leading to a wrong
domU detection.
https://bugs.freedesktop.org/show_bug.cgi?id=77271
(cherry picked from commit a71516dfd1858f37712ef52a288bf5fb274383e0)
---
src/shared/virt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/virt.c b/src/shared/virt.c
index 774915f4be..20a8d7c5bf 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -173,7 +173,7 @@ int detect_vm(const char **id) {
if (streq(cap, "control_d"))
break;
- if (!i) {
+ if (!cap) {
_id = "xen";
r = 1;
}

View File

@ -1,27 +0,0 @@
From 918af53be96fe4284538ebf8eb4fac1aa8839529 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Fri, 18 Jul 2014 12:58:00 +0200
Subject: [PATCH] journal: reduce test-journal-send timeout from 10s to 1s
The sleep(10) in test-journal-send is quite aggressive. We need it only
for the journal to get our cgroup information. But even that information
is not vital to the test, so a sleep(1) should be just fine.
(cherry picked from commit 037ee337f0f64bd35ced765f2e2d97f496d4e7c7)
---
src/journal/test-journal-send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/test-journal-send.c b/src/journal/test-journal-send.c
index 3e986ed99a..45eb327609 100644
--- a/src/journal/test-journal-send.c
+++ b/src/journal/test-journal-send.c
@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) {
"N_CPUS=%li", sysconf(_SC_NPROCESSORS_ONLN),
NULL);
- sleep(10);
+ sleep(1);
return 0;
}

View File

@ -1,71 +0,0 @@
From 4b41b0d24b5efe70a5d6a39ff7b1f6571a7315b5 Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Fri, 18 Jul 2014 09:13:36 -0400
Subject: [PATCH] systemd-detect-virt: detect s390 virtualization
A system that is running on a logical partition (LPAR) provided by
PR/SM has access to physical hardware (except CPU). It is true that
PR/SM abstracts the hardware, but only for sharing purposes.
Details are statet at:
http://publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eicaz/eicazzlpar.htm
-->--
In other words, PR/SM transforms physical resources into virtual resources so
that many logical partitions can share the same physical resources.
--<--
Still, from the OS point of view, the shared virtual resource is real
hardware. ConditionVirtualization must be set to false if the OS runs
directly on PR/SM (e.g. in an LPAR).
[zj: reorder code so that variables are not allocated when #if-def is
false. Add commit message.]
(cherry picked from commit f41925b4e442a34c93ad120ef1426c974a047ed1)
---
man/systemd.unit.xml | 1 +
src/shared/virt.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index f66c580a37..e66be4ee51 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -995,6 +995,7 @@
virtualization solution, or one of
<varname>qemu</varname>,
<varname>kvm</varname>,
+ <varname>zvm</varname>,
<varname>vmware</varname>,
<varname>microsoft</varname>,
<varname>oracle</varname>,
diff --git a/src/shared/virt.c b/src/shared/virt.c
index 20a8d7c5bf..b4368952ff 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -220,6 +220,23 @@ int detect_vm(const char **id) {
goto finish;
}
+#if defined(__s390__)
+ {
+ _cleanup_free_ char *t = NULL;
+
+ r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t);
+ if (r >= 0) {
+ if (streq(t, "z/VM"))
+ _id = "zvm";
+ else
+ _id = "kvm";
+ r = 1;
+
+ goto finish;
+ }
+ }
+#endif
+
r = 0;
finish:

View File

@ -1,116 +0,0 @@
From 634a6893abd524b5ccae0c9b8cd0957fa00abb24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 18 Jul 2014 21:44:36 -0400
Subject: [PATCH] man,journal: add note about
sd_journal_get_cutoff_monotonic_usec return value
Also modify the function itself to be a bit simpler to read.
(cherry picked from commit 1651e2c61e544de9ca947c8b3202552b1272ef57)
---
man/sd_journal_get_cutoff_realtime_usec.xml | 36 ++++++++++++++++++-----------
src/journal/sd-journal.c | 16 ++++++-------
2 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/man/sd_journal_get_cutoff_realtime_usec.xml b/man/sd_journal_get_cutoff_realtime_usec.xml
index 6df4b26e6f..ef987d85b0 100644
--- a/man/sd_journal_get_cutoff_realtime_usec.xml
+++ b/man/sd_journal_get_cutoff_realtime_usec.xml
@@ -74,25 +74,29 @@
<title>Description</title>
<para><function>sd_journal_get_cutoff_realtime_usec()</function>
- gets the realtime (wallclock) timestamps of the first
- and last entries accessible in the journal. It takes
- three arguments: the journal context object and two
- pointers to 64-bit unsigned integers to store the
- timestamps in. The timestamps are in microseconds
- since the epoch,
+ retrieves the realtime (wallclock) timestamps of the
+ first and last entries accessible in the journal. It
+ takes three arguments: the journal context object
+ <parameter>j</parameter> and two pointers
+ <parameter>from</parameter> and
+ <parameter>to</parameter> pointing at 64-bit unsigned
+ integers to store the timestamps in. The timestamps
+ are in microseconds since the epoch,
i.e. <constant>CLOCK_REALTIME</constant>. Either one
of the two timestamp arguments may be passed as
<constant>NULL</constant> in case the timestamp is not
needed, but not both.</para>
<para><function>sd_journal_get_cutoff_monotonic_usec()</function>
- gets the monotonic timestamps of the first and last
- entries accessible in the journal. It takes three
- arguments: the journal context object, a 128-bit
- identifier for the boot, and two pointers to 64-bit
- unsigned integers to store the timestamps. The
- timestamps are in microseconds since boot-up of the
- specific boot,
+ retrieves the monotonic timestamps of the first and
+ last entries accessible in the journal. It takes three
+ arguments: the journal context object
+ <parameter>j</parameter>, a 128-bit identifier for the
+ boot <parameter>boot_id</parameter>, and two pointers
+ to 64-bit unsigned integers to store the timestamps,
+ <parameter>from</parameter> and
+ <parameter>to</parameter>. The timestamps are in
+ microseconds since boot-up of the specific boot,
i.e. <constant>CLOCK_MONOTONIC</constant>. Since the
monotonic clock begins new with every reboot it only
defines a well-defined point in time when used
@@ -113,6 +117,12 @@
<function>sd_journal_get_cutoff_monotonic_usec()</function>
return 1 on success, 0 if not suitable entries are in
the journal or a negative errno-style error code.</para>
+
+ <para>Locations pointed to by parameters
+ <parameter>from</parameter> and
+ <parameter>to</parameter> will be set only if the
+ return value is positive, and obviously, the
+ parameters are non-null.</para>
</refsect1>
<refsect1>
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index ca805f83fe..15dae90925 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2390,7 +2390,7 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
_public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint64_t *from, uint64_t *to) {
Iterator i;
JournalFile *f;
- bool first = true;
+ bool found = false;
int r;
assert_return(j, -EINVAL);
@@ -2409,21 +2409,21 @@ _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot
if (r == 0)
continue;
- if (first) {
+ if (found) {
if (from)
- *from = fr;
+ *from = MIN(fr, *from);
if (to)
- *to = t;
- first = false;
+ *to = MAX(t, *to);
} else {
if (from)
- *from = MIN(fr, *from);
+ *from = fr;
if (to)
- *to = MAX(t, *to);
+ *to = t;
+ found = true;
}
}
- return first ? 0 : 1;
+ return found;
}
void journal_print_header(sd_journal *j) {

View File

@ -1,106 +0,0 @@
From 1d9614d1e6086b6b5c0e08ebdb4df3c66d59ab6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 3 Mar 2014 19:49:40 -0500
Subject: [PATCH] Be more verbose when bind or listen fails
Also be more verbose in devnode_acl_all().
(cherry picked from commit 6b9732b2bf0499c5e4ea8a9d4f6051d98033f680)
---
src/core/manager.c | 2 +-
src/journal/journald-native.c | 2 +-
src/journal/journald-stream.c | 4 ++--
src/journal/journald-syslog.c | 2 +-
src/login/logind-acl.c | 5 ++++-
src/shared/ask-password-api.c | 2 +-
6 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index edcde31ec1..9b754d8f02 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -554,7 +554,7 @@ static int manager_setup_notify(Manager *m) {
strncpy(sa.un.sun_path, m->notify_socket, sizeof(sa.un.sun_path)-1);
r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(@%s) failed: %m", sa.un.sun_path+1);
return -errno;
}
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index c54f6475d3..666cbd2102 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -387,7 +387,7 @@ int server_open_native_socket(Server*s) {
r = bind(s->native_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 89da150a60..8a983d84d9 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -450,14 +450,14 @@ int server_open_stdout_socket(Server *s) {
r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
chmod(sa.un.sun_path, 0666);
if (listen(s->stdout_fd, SOMAXCONN) < 0) {
- log_error("listen() failed: %m");
+ log_error("listen(%s) failed: %m", sa.un.sun_path);
return -errno;
}
} else
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index b826e23c01..f97e0d2ba9 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -441,7 +441,7 @@ int server_open_syslog_socket(Server *s) {
r = bind(s->syslog_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
index 4bbeb64e8b..af7c352ce5 100644
--- a/src/login/logind-acl.c
+++ b/src/login/logind-acl.c
@@ -277,7 +277,10 @@ int devnode_acl_all(struct udev *udev,
SET_FOREACH(n, nodes, i) {
int k;
- log_debug("Fixing up ACLs at %s for seat %s", n, seat);
+ log_debug("Changing ACLs at %s for seat %s (uid "UID_FMT"→"UID_FMT"%s%s)",
+ n, seat, old_uid, new_uid,
+ del ? " del" : "", add ? " add" : "");
+
k = devnode_acl(n, flush, del, old_uid, add, new_uid);
if (k == -ENOENT)
log_debug("Device %s disappeared while setting ACLs", n);
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index 5997a03fb2..8d03f4ad09 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -270,7 +270,7 @@ static int create_socket(char **name) {
if (r < 0) {
r = -errno;
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
goto fail;
}

View File

@ -1,31 +0,0 @@
From 51a993c94f70e1d18838dae05e10047a7b25c2f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Dec 2013 17:14:24 -0500
Subject: [PATCH] core: show timeouts when watchdog howls
(cherry picked from commit a7850c7d1339b490ac021ff82c2081285ea28503)
---
src/core/service.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/core/service.c b/src/core/service.c
index 2d8aa01445..73a0e849e8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2550,11 +2550,15 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void *userdata) {
Service *s = SERVICE(userdata);
+ char t[FORMAT_TIMESPAN_MAX];
assert(s);
assert(source == s->watchdog_event_source);
- log_error_unit(UNIT(s)->id, "%s watchdog timeout!", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id,
+ "%s watchdog timeout (limit %s)!",
+ UNIT(s)->id,
+ format_timespan(t, sizeof(t), s->watchdog_usec, 1));
service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_WATCHDOG);
return 0;

View File

@ -1,21 +0,0 @@
From e8aa845bcf37e9ec7709c49af77c906332225c93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 19 Jul 2014 15:35:48 -0400
Subject: [PATCH] escape: fix return code
(cherry picked from commit 91a81d93b569a98e04566eef1753a0956ba035f3)
---
src/escape/escape.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/escape/escape.c b/src/escape/escape.c
index ae0c183eca..ba2fb4789f 100644
--- a/src/escape/escape.c
+++ b/src/escape/escape.c
@@ -235,5 +235,5 @@ int main(int argc, char *argv[]) {
fputc('\n', stdout);
finish:
- return r ? EXIT_FAILURE : EXIT_SUCCESS;
+ return r <= 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}

View File

@ -1,46 +0,0 @@
From 9f2dae12f4ee324e3c1cb26ce3ea382e586235b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= <jean.andre.santoni@gmail.com>
Date: Mon, 21 Jul 2014 21:04:44 -0400
Subject: [PATCH] Add IFLA_VTI defines to missing.h
(cherry picked from commit 6589d0dba2b1ccf2406db527c2c1b51c7143e117)
---
configure.ac | 1 +
src/shared/missing.h | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/configure.ac b/configure.ac
index df6b3571d1..8925eb5435 100644
--- a/configure.ac
+++ b/configure.ac
@@ -311,6 +311,7 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN]
]])
AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
+ IFLA_VTI_REMOTE,
IFLA_PHYS_PORT_ID,
IFLA_BOND_AD_INFO,
IFLA_VLAN_PROTOCOL,
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 818d704f92..2985285409 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -380,6 +380,18 @@ static inline int setns(int fd, int nstype) {
#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
#endif
+#if !HAVE_DECL_IFLA_VTI_REMOTE
+#define IFLA_VTI_UNSPEC 0
+#define IFLA_VTI_LINK 1
+#define IFLA_VTI_IKEY 2
+#define IFLA_VTI_OKEY 3
+#define IFLA_VTI_LOCAL 4
+#define IFLA_VTI_REMOTE 5
+#define __IFLA_VTI_MAX 6
+
+#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
+#endif
+
#if !HAVE_DECL_IFLA_PHYS_PORT_ID
#undef IFLA_PROMISCUITY
#define IFLA_PROMISCUITY 30

View File

@ -1,27 +0,0 @@
From 766fa6bb149ece2ed4bb0d58e4f836a86bb51893 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Fri, 18 Jul 2014 06:33:52 +0200
Subject: [PATCH] install: systemd-timesyncd.service is enabled by
sysinit.target
systemd-timesyncd.service has a "WantedBy=sysinit.target" so the
initially generated link should match that.
(cherry picked from commit e9b11a8457293c553296e5d986a0bb7f86f275d5)
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 2b0c855da2..53f82f9fce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4346,7 +4346,7 @@ nodist_systemunit_DATA += \
units/systemd-timesyncd.service
GENERAL_ALIASES += \
- $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-timesyncd.service
+ $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
EXTRA_DIST += \
units/systemd-timesyncd.service.in

View File

@ -1,44 +0,0 @@
From de92879c4fd08974b90bc73f3bd3129774486a1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 19 Jul 2014 19:46:04 -0400
Subject: [PATCH] bash-completion: -p option for journalctl
(cherry picked from commit be8f4a9fa732d61e845e1ab1a62ac3a6b368d3a7)
---
shell-completion/bash/journalctl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index e4b2f4ac84..14dcd223b3 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -35,6 +35,8 @@ __journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
_UDEV_{SYSNAME,DEVNODE,DEVLINK}
__CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
+__syslog_priorities=(emerg alert crit err warning notice info debug)
+
_journalctl() {
local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
@@ -44,8 +46,8 @@ _journalctl() {
--no-tail -q --quiet --setup-keys --this-boot --verify
--version --list-catalog --update-catalog --list-boots'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
- -o --output -u --unit --user-unit'
- [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until
+ -o --output -u --unit --user-unit -p --priority'
+ [ARGUNKNOWN]='-c --cursor --interval -n --lines --since --until
--verify-key'
)
@@ -68,6 +70,9 @@ _journalctl() {
--field|-F)
comps=${__journal_fields[*]}
;;
+ --priority|-p)
+ comps=${__syslog_priorities[*]}
+ ;;
--unit|-u)
comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)
;;

View File

@ -1,122 +0,0 @@
From ec300fdabb27c41258cf5aea91dae518a3b88a04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 21 Jul 2014 20:41:19 -0400
Subject: [PATCH] sysusers: fix selinux context of backup files
Also, fix fopen_temporary_label to set proper context. By chance,
all users so far used the same context, so the error didn't matter.
Also, check return value from label_init().
https://bugzilla.redhat.com/show_bug.cgi?id=1121806
(cherry picked from commit 9f1c19405a1ccaf59dcc8c32c13a1619541189ad)
---
src/shared/fileio-label.c | 2 +-
src/sysusers/sysusers.c | 45 ++++++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/src/shared/fileio-label.c b/src/shared/fileio-label.c
index 417ca5695a..c3def3c568 100644
--- a/src/shared/fileio-label.c
+++ b/src/shared/fileio-label.c
@@ -59,7 +59,7 @@ int fopen_temporary_label(const char *target,
const char *path, FILE **f, char **temp_path) {
int r;
- r = label_context_set("/etc/passwd", S_IFREG);
+ r = label_context_set(target, S_IFREG);
if (r < 0)
return r;
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index bf2fbbc252..2387d5873a 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -195,8 +195,9 @@ static int load_group_database(void) {
return 0;
}
-static int make_backup(const char *x) {
- _cleanup_close_ int src = -1, dst = -1;
+static int make_backup(const char *target, const char *x) {
+ _cleanup_close_ int src = -1;
+ _cleanup_fclose_ FILE *dst = NULL;
char *backup, *temp;
struct timespec ts[2];
struct stat st;
@@ -213,30 +214,30 @@ static int make_backup(const char *x) {
if (fstat(src, &st) < 0)
return -errno;
- temp = strappenda(x, ".XXXXXX");
- dst = mkostemp_safe(temp, O_WRONLY|O_CLOEXEC|O_NOCTTY);
- if (dst < 0)
- return dst;
+ r = fopen_temporary_label(target, x, &dst, &temp);
+ if (r < 0)
+ return r;
- r = copy_bytes(src, dst, (off_t) -1);
+ r = copy_bytes(src, fileno(dst), (off_t) -1);
if (r < 0)
goto fail;
+ /* Don't fail on chmod() or chown(). If it stays owned by us
+ * and/or unreadable by others, then it isn't too bad... */
+
+ backup = strappenda(x, "-");
+
/* Copy over the access mask */
- if (fchmod(dst, st.st_mode & 07777) < 0) {
- r = -errno;
- goto fail;
- }
+ if (fchmod(fileno(dst), st.st_mode & 07777) < 0)
+ log_warning("Failed to change mode on %s: %m", backup);
- /* Don't fail on chmod(). If it stays owned by us, then it
- * isn't too bad... */
- fchown(dst, st.st_uid, st.st_gid);
+ if (fchown(fileno(dst), st.st_uid, st.st_gid)< 0)
+ log_warning("Failed to change ownership of %s: %m", backup);
ts[0] = st.st_atim;
ts[1] = st.st_mtim;
- futimens(dst, ts);
+ futimens(fileno(dst), ts);
- backup = strappenda(x, "-");
if (rename(temp, backup) < 0)
goto fail;
@@ -469,13 +470,13 @@ static int write_files(void) {
/* Make a backup of the old files */
if (group && group_changed) {
- r = make_backup(group_path);
+ r = make_backup("/etc/group", group_path);
if (r < 0)
goto finish;
}
if (passwd) {
- r = make_backup(passwd_path);
+ r = make_backup("/etc/passwd", passwd_path);
if (r < 0)
goto finish;
}
@@ -1529,9 +1530,11 @@ int main(int argc, char *argv[]) {
umask(0022);
- label_init(NULL);
-
- r = 0;
+ r = label_init(NULL);
+ if (r < 0) {
+ log_error("SELinux setup failed: %s", strerror(-r));
+ goto finish;
+ }
if (optind < argc) {
int j;

View File

@ -1,86 +0,0 @@
From 62ae78fdcc50515d292f7622aeff7a89a5b2bfd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 21 Jul 2014 20:56:29 -0400
Subject: [PATCH] update-done: set proper selinux context for .updated
https://bugzilla.redhat.com/show_bug.cgi?id=1121806
(cherry picked from commit 7dbb1d08f66cd44b1296be3ee8e3629b989e19a8)
---
Makefile.am | 1 +
src/update-done/update-done.c | 25 ++++++++++++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 53f82f9fce..764a4fde58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1724,6 +1724,7 @@ systemd_update_done_SOURCES = \
systemd_update_done_LDADD = \
libsystemd-internal.la \
+ libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c
index 10ba85ca92..b199a68972 100644
--- a/src/update-done/update-done.c
+++ b/src/update-done/update-done.c
@@ -20,6 +20,7 @@
***/
#include "util.h"
+#include "label.h"
static int apply_timestamp(const char *path, struct timespec *ts) {
struct timespec twice[2];
@@ -51,10 +52,20 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
} else if (errno == ENOENT) {
_cleanup_close_ int fd = -1;
+ int r;
/* The timestamp file doesn't exist yet? Then let's create it. */
+ r = label_context_set(path, S_IFREG);
+ if (r < 0) {
+ log_error("Failed to set SELinux context for %s: %s",
+ path, strerror(-r));
+ return r;
+ }
+
fd = open(path, O_CREAT|O_EXCL|O_WRONLY|O_TRUNC|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644);
+ label_context_clear();
+
if (fd < 0) {
if (errno == EROFS) {
@@ -83,7 +94,7 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
int main(int argc, char *argv[]) {
struct stat st;
- int r, q;
+ int r, q = 0;
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
@@ -94,11 +105,15 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- r = apply_timestamp("/etc/.updated", &st.st_mtim);
+ r = label_init(NULL);
+ if (r < 0) {
+ log_error("SELinux setup failed: %s", strerror(-r));
+ goto finish;
+ }
+ r = apply_timestamp("/etc/.updated", &st.st_mtim);
q = apply_timestamp("/var/.updated", &st.st_mtim);
- if (q < 0 && r == 0)
- r = q;
- return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+finish:
+ return r < 0 || q < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}

51
20-grubby.install Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
if [[ ! -x /sbin/new-kernel-pkg ]]; then
exit 0
fi
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
KERNEL_DIR="${KERNEL_IMAGE%/*}"
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
case "$COMMAND" in
add)
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
for i in \
"$KERNEL_IMAGE" \
"$KERNEL_DIR"/System.map \
"$KERNEL_DIR"/config \
"$KERNEL_DIR"/zImage.stub \
"$KERNEL_DIR"/dtb \
; do
[[ -e "$i" ]] || continue
cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
done
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
if [[ -e "$i" ]]; then
cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
command -v restorecon &>/dev/null && \
restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
fi
fi
/sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
/sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
/sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
;;
remove)
/sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
;;
*)
;;
esac
# skip other installation plugins, if we can't find a boot loader spec conforming setup
if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
exit 77
fi

42
20-yama-ptrace.conf Normal file
View File

@ -0,0 +1,42 @@
# The ptrace system call is used for interprocess services,
# communication and introspection (like synchronisation, signaling,
# debugging, tracing and profiling) of processes.
#
# Usage of ptrace is restricted by normal user permissions. Normal
# unprivileged processes cannot use ptrace on processes that they
# cannot send signals to or processes that are running set-uid or
# set-gid. Nevertheless, processes running under the same uid will
# usually be able to ptrace one another.
#
# Fedora enables the Yama security mechanism which restricts ptrace
# even further. Sysctl setting kernel.yama.ptrace_scope can have one
# of the following values:
#
# 0 - Normal ptrace security permissions.
# 1 - Restricted ptrace. Only child processes plus normal permissions.
# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.
# 3 - No attach. No process may call ptrace at all. Irrevocable.
#
# For more information see Documentation/security/Yama.txt in the
# kernel sources.
#
# The default is 1., which allows tracing of child processes, but
# forbids tracing of arbitrary processes. This allows programs like
# gdb or strace to work when the most common way of having the
# debugger start the debuggee is used:
# gdb /path/to/program ...
# Attaching to already running programs is NOT allowed:
# gdb -p ...
# This default setting is suitable for the common case, because it
# reduces the risk that one hacked process can be used to attack other
# processes. (For example, a hacked firefox process in a user session
# will not be able to ptrace the keyring process and extract passwords
# stored only in memory.)
#
# Developers and administrators might want to disable those protections
# to be able to attach debuggers to existing processes. Use
# sysctl kernel.yama.ptrace_scope=0
# for change the setting temporarily, or copy this file to
# /etc/sysctl.d/20-yama-ptrace.conf to set it for future boots.
kernel.yama.ptrace_scope = 0

View File

@ -1,11 +0,0 @@
# We enable all display managers by default. Since only one can
# actually be enabled at the same time the one which is installed
# first wins
enable gdm.service
enable lightdm.service
enable slim.service
enable lxdm.service
enable sddm.service
enable kdm.service
enable xdm.service

View File

@ -1,118 +0,0 @@
# Also see:
# https://fedoraproject.org/wiki/Starting_services_by_default
# On Fedora we deviate from some upstream defaults
disable systemd-timesyncd.service
disable systemd-networkd.service
disable systemd-resolved.service
# System stuff
enable sshd.service
enable atd.*
enable crond.*
enable chronyd.service
enable rpcbind.*
enable NetworkManager.service
enable NetworkManager-dispatcher.service
enable ModemManager.service
enable auditd.service
enable restorecond.service
enable bluetooth.*
enable avahi-daemon.*
enable cups.*
# The various syslog implementations
enable rsyslog.*
enable syslog-ng.*
enable sysklogd.*
# Network facing
enable firewalld.service
enable libvirtd.service
enable xinetd.service
enable ladvd.service
# Storage
enable multipathd.service
enable libstoragemgmt.service
enable lvm2-monitor.*
enable lvm2-lvmetad.*
enable dm-event.*
enable dmraid-activation.service
# https://bugzilla.redhat.com/show_bug.cgi?id=855372
enable mdmonitor.service
enable mdmonitor-takeover.service
# https://bugzilla.redhat.com/show_bug.cgi?id=876237
enable spice-vdagentd.service
# https://bugzilla.redhat.com/show_bug.cgi?id=885406
enable qemu-guest-agent.service
# https://bugzilla.redhat.com/show_bug.cgi?id=928726
enable dnf-makecache.timer
# https://bugzilla.redhat.com/show_bug.cgi?id=929403
enable initial-setup-graphical.service
enable initial-setup-text.service
# https://bugzilla.redhat.com/show_bug.cgi?id=957135
enable vmtoolsd.service
# https://bugzilla.redhat.com/show_bug.cgi?id=976315
enable dkms.service
# https://bugzilla.redhat.com/show_bug.cgi?id=961878
enable ipmi.service
enable ipmievd.service
# https://bugzilla.redhat.com/show_bug.cgi?id=1039351
enable x509watch.timer
# https://bugzilla.redhat.com/show_bug.cgi?id=1060754
enable dnssec-triggerd.service
# https://bugzilla.redhat.com/show_bug.cgi?id=1095353
enable uuidd.socket
# Hardware
enable gpm.*
# https://bugzilla.redhat.com/show_bug.cgi?id=1066421
enable gpsd.socket
enable irqbalance.service
enable lm_sensors.service
enable mcelog.*
enable acpid.*
enable smartd.service
enable pcscd.socket
enable rngd.service
# Other stuff
enable abrtd.service
enable abrt-ccpp.service
enable abrt-oops.service
enable abrt-xorg.service
enable abrt-vmcore.service
enable lttng-sessiond.service
enable ksm.service
enable ksmtuned.service
enable rootfs-resize.service
enable sysstat.service
enable sysstat-collect.timer
enable sysstat-summary.timer
enable uuidd.service
enable xendomains.service
enable xenstored.service
enable xenconsoled.service
# Desktop stuff
enable accounts-daemon.service
enable rtkit-daemon.service
enable upower.service
enable udisks2.service
enable polkit.service
enable packagekit-offline-update.service
enable PackageKit.service

View File

@ -1 +0,0 @@
disable *

View File

@ -0,0 +1,129 @@
From f58b96d3e8d1cb0dd3666bc74fa673918b586612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 14 Sep 2020 17:58:03 +0200
Subject: [PATCH] test-mountpointutil-util: do not assert in test_mnt_id()
https://bugzilla.redhat.com/show_bug.cgi?id=1803070
I *think* this a kernel bug: the mnt_id as listed in /proc/self/mountinfo is different
than the one we get from /proc/self/fdinfo/. This only matters when both statx and
name_to_handle_at are unavailable and we hit the fallback path that goes through fdinfo:
(gdb) !uname -r
5.6.19-200.fc31.ppc64le
(gdb) !cat /proc/self/mountinfo
697 664 253:0 /var/lib/mock/fedora-31-ppc64le/root / rw,relatime shared:298 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
698 697 253:0 /var/cache/mock/fedora-31-ppc64le/yum_cache /var/cache/yum rw,relatime shared:299 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
699 697 253:0 /var/cache/mock/fedora-31-ppc64le/dnf_cache /var/cache/dnf rw,relatime shared:300 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
700 697 0:32 /mock-selinux-plugin.7me9bfpi /proc/filesystems rw,nosuid,nodev shared:301 master:18 - tmpfs tmpfs rw,seclabel <==========================================================
701 697 0:41 / /sys ro,nosuid,nodev,noexec,relatime shared:302 - sysfs sysfs ro,seclabel
702 701 0:21 / /sys/fs/selinux ro,nosuid,nodev,noexec,relatime shared:306 master:8 - selinuxfs selinuxfs rw
703 697 0:42 / /dev rw,nosuid shared:303 - tmpfs tmpfs rw,seclabel,mode=755
704 703 0:43 / /dev/shm rw,nosuid,nodev shared:304 - tmpfs tmpfs rw,seclabel
705 703 0:45 / /dev/pts rw,nosuid,noexec,relatime shared:307 - devpts devpts rw,seclabel,gid=5,mode=620,ptmxmode=666
706 703 0:6 /btrfs-control /dev/btrfs-control rw,nosuid shared:308 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
707 703 0:6 /loop-control /dev/loop-control rw,nosuid shared:309 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
708 703 0:6 /loop0 /dev/loop0 rw,nosuid shared:310 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
709 703 0:6 /loop1 /dev/loop1 rw,nosuid shared:311 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
710 703 0:6 /loop10 /dev/loop10 rw,nosuid shared:312 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
711 703 0:6 /loop11 /dev/loop11 rw,nosuid shared:313 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
712 703 0:6 /loop2 /dev/loop2 rw,nosuid shared:314 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
713 703 0:6 /loop3 /dev/loop3 rw,nosuid shared:315 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
714 703 0:6 /loop4 /dev/loop4 rw,nosuid shared:316 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
715 703 0:6 /loop5 /dev/loop5 rw,nosuid shared:317 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
716 703 0:6 /loop6 /dev/loop6 rw,nosuid shared:318 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
717 703 0:6 /loop7 /dev/loop7 rw,nosuid shared:319 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
718 703 0:6 /loop8 /dev/loop8 rw,nosuid shared:320 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
719 703 0:6 /loop9 /dev/loop9 rw,nosuid shared:321 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
720 697 0:44 / /run rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
721 720 0:25 /systemd/nspawn/propagate/9cc8a155d0244558b273f773d2b92142 /run/systemd/nspawn/incoming ro master:12 - tmpfs tmpfs rw,seclabel,mode=755
722 697 0:32 /mock-resolv.dvml91hp /etc/resolv.conf rw,nosuid,nodev shared:322 master:18 - tmpfs tmpfs rw,seclabel
725 697 0:47 / /proc rw,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
603 725 0:47 /sys /proc/sys ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
604 725 0:44 /systemd/inaccessible/reg /proc/kallsyms ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
605 725 0:44 /systemd/inaccessible/reg /proc/kcore ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
606 725 0:44 /systemd/inaccessible/reg /proc/keys ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
607 725 0:44 /systemd/inaccessible/reg /proc/sysrq-trigger ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
608 725 0:44 /systemd/inaccessible/reg /proc/timer_list ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
609 725 0:47 /bus /proc/bus ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
610 725 0:47 /fs /proc/fs ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
611 725 0:47 /irq /proc/irq ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
612 725 0:47 /scsi /proc/scsi ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
613 703 0:46 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:324 - mqueue mqueue rw,seclabel
614 701 0:26 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:325 - cgroup2 cgroup rw,seclabel,nsdelegate
615 603 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
616 725 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
617 725 0:44 /.#proc-kmsg5b7a8bcfe6717139//deleted /proc/kmsg rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
The test process does
name_to_handle_at("/proc/filesystems") which returns -EOPNOTSUPP, and then
openat(AT_FDCWD, "/proc/filesystems") which returns 4, and then
read(open("/proc/self/fdinfo/4", ...)) which gives
"pos:\t0\nflags:\t012100000\nmnt_id:\t725\n"
and the "725" is clearly inconsistent with "700" in /proc/self/mountinfo.
We could either drop the fallback path (and fail name_to_handle_at() is not
avaliable) or ignore the error in the test. Not sure what is better. I think
this issue only occurs sometimes and with older kernels, so probably continuing
with the current flaky implementation is better than ripping out the fallback.
Another strace:
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/sys is 603", iov_len=27}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/sys is 603
) = 28
name_to_handle_at(AT_FDCWD, "/", {handle_bytes=128 => 12, handle_type=129, f_handle=0x52748401000000008b93e20d}, [697], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of / is 697", iov_len=19}, {iov_base="\n", iov_len=1}], 2mnt ids of / is 697
) = 20
name_to_handle_at(AT_FDCWD, "/proc/kcore", {handle_bytes=128 => 12, handle_type=1, f_handle=0x92ddcfcd2e802d0100000000}, [605], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/kcore is 605", iov_len=29}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/kcore is 605
) = 30
name_to_handle_at(AT_FDCWD, "/dev", {handle_bytes=128 => 12, handle_type=1, f_handle=0x8ae269160c802d0100000000}, [703], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /dev is 703", iov_len=22}, {iov_base="\n", iov_len=1}], 2mnt ids of /dev is 703
) = 23
name_to_handle_at(AT_FDCWD, "/proc/filesystems", {handle_bytes=128}, 0x7fffe36ddb84, 0) = -1 EOPNOTSUPP (Operation not supported)
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 4</proc/filesystems>
openat(AT_FDCWD, "/proc/self/fdinfo/4", O_RDONLY|O_CLOEXEC) = 5</proc/20/fdinfo/4>
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
read(5</proc/20/fdinfo/4>, "pos:\t0\nflags:\t012100000\nmnt_id:\t725\n", 2048) = 36
read(5</proc/20/fdinfo/4>, "", 1024) = 0
close(5</proc/20/fdinfo/4>) = 0
close(4</proc/filesystems>) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/filesystems are 700, 725", iov_len=41}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/filesystems are 700, 725
) = 42
writev(2</dev/pts/0>, [{iov_base="the other path for mnt id 725 is /proc", iov_len=38}, {iov_base="\n", iov_len=1}], 2the other path for mnt id 725 is /proc
) = 39
writev(2</dev/pts/0>, [{iov_base="Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.", iov_len=108}, {iov_base="\n", iov_len=1}], 2Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.
) = 109
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 20
gettid() = 20
tgkill(20, 20, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=20, si_uid=0} ---
+++ killed by SIGABRT (core dumped) +++
---
src/test/test-mountpoint-util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c
index 30b00ae4d8b..ffe5144b04a 100644
--- a/src/test/test-mountpoint-util.c
+++ b/src/test/test-mountpoint-util.c
@@ -89,8 +89,12 @@ static void test_mnt_id(void) {
/* The ids don't match? If so, then there are two mounts on the same path, let's check if
* that's really the case */
char *t = hashmap_get(h, INT_TO_PTR(mnt_id2));
- log_debug("the other path for mnt id %i is %s\n", mnt_id2, t);
- assert_se(path_equal(p, t));
+ log_debug("Path for mnt id %i from /proc/self/mountinfo is %s\n", mnt_id2, t);
+
+ if (!path_equal(p, t))
+ /* Apparent kernel bug in /proc/self/fdinfo */
+ log_warning("Bad mount id given for %s: %d, should be %d",
+ p, mnt_id2, mnt_id);
}
}

16
inittab Normal file
View File

@ -0,0 +1,16 @@
# inittab is no longer used.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target

View File

@ -1,42 +0,0 @@
From 0fe97bc02e3108efdb844feb1b367a89ba995d83 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 14 Jan 2014 17:48:08 -0500
Subject: [PATCH] kernel-install: add fedora specific callouts to
new-kernel-pkg
---
src/kernel-install/kernel-install | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index 3ae1d77..3a2ac56 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -19,6 +19,27 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+if [[ -x /sbin/new-kernel-pkg ]]; then
+ [[ "$2" == *\+* ]] && flavor=-"${2##*+}"
+ case "$1" in
+ add)
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $?
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $?
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $?
+ ;;
+ remove)
+ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || exit $?
+ ;;
+ *)
+ ;;
+ esac
+
+ # exit, if we can't find a boot loader spec conforming setup
+ if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
+ exit 0
+ fi
+fi
+
usage()
{
echo "Usage:"

View File

@ -0,0 +1,3 @@
[suppress_file]
# This shared object is private to systemd
file_name_regexp=libsystemd-shared-.*.so

View File

@ -1 +0,0 @@
$SystemLogSocketName /run/systemd/journal/syslog

10
macros.sysusers Normal file
View File

@ -0,0 +1,10 @@
# RPM macros for packages creating system accounts
#
# Turn a sysusers.d file into macros specified by
# https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
%sysusers_requires_compat Requires(pre): shadow-utils
%sysusers_create_compat() \
%(%{_rpmconfigdir}/sysusers.generate-pre.sh %{?*}) \
%{nil}

View File

@ -1,29 +0,0 @@
#!/bin/bash
set -e
NAME=systemd
UPSTREAM=git://anongit.freedesktop.org/systemd/systemd
REFDIR="$HOME/git/systemd" # for faster cloning, if available
[ -n "$1" ] && HEAD="$1" || HEAD="HEAD"
WORKDIR="$(mktemp -d --tmpdir "$NAME.XXXXXXXXXX")"
trap 'rm -rf $WORKDIR' exit
[ -d "$REFDIR" ] && REFERENCE="--reference $REFDIR"
git clone $REFERENCE "$UPSTREAM" "$WORKDIR"
pushd "$WORKDIR" > /dev/null
git branch to-archive $HEAD
read COMMIT_SHORTID COMMIT_TITLE <<EOGIT
$(git log to-archive^..to-archive --pretty='format:%h %s')
EOGIT
popd > /dev/null
echo "Making git snapshot using commit: $COMMIT_SHORTID $COMMIT_TITLE"
DIRNAME="$NAME-git$COMMIT_SHORTID"
git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" to-archive | xz -9 > "$DIRNAME.tar.xz"
echo "Written $DIRNAME.tar.xz"

101
purge-nobody-user Executable file
View File

@ -0,0 +1,101 @@
#!/bin/bash -eu
if [ $UID -ne 0 ]; then
echo "WARNING: This script needs to run as root to be effective"
exit 1
fi
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
if [ "${1:-}" = "--ignore-journal" ]; then
shift
ignore_journal=1
else
ignore_journal=0
fi
echo "Checking processes..."
if ps h -u 99 | grep .; then
echo "ERROR: ps reports processes with UID 99!"
exit 2
fi
echo "... not found"
echo "Checking UTMP..."
if w -h 199 | grep . ; then
echo "ERROR: w reports UID 99 as active!"
exit 2
fi
if w -h nobody | grep . ; then
echo "ERROR: w reports user nobody as active!"
exit 2
fi
echo "... not found"
echo "Checking the journal..."
if [ "$ignore_journal" = 0 ] && journalctl -q -b -n10 _UID=99 | grep . ; then
echo "ERROR: journalctl reports messages from UID 99 in current boot!"
exit 2
fi
echo "... not found"
echo "Looking for files in /etc, /run, /tmp, and /var..."
if find /etc /run /tmp /var -uid 99 -print | grep -m 10 . ; then
echo "ERROR: found files belonging to UID 99"
exit 2
fi
echo "... not found"
echo "Checking if nobody is defined correctly..."
if getent passwd nobody |
grep '^nobody:[x*]:65534:65534:.*:/:/sbin/nologin';
then
echo "OK, nothing to do."
exit 0
else
echo "NOTICE: User nobody is not defined correctly"
fi
echo "Checking if nfsnobody or something else is using the uid..."
if getent passwd 65534 | grep . ; then
echo "NOTICE: will have to remove this user"
else
echo "... not found"
fi
if [ "${1:-}" = "-x" ]; then
if getent passwd nobody >/dev/null; then
# this will remove both the user and the group.
( set -x
userdel nobody
)
fi
if getent passwd 65534 >/dev/null; then
# Make sure the uid is unused. This should free gid too.
name="$(getent passwd 65534 | cut -d: -f1)"
( set -x
userdel "$name"
)
fi
if grep -qE '^(passwd|group):.*\bsss\b' /etc/nsswitch.conf; then
echo "Sleeping, so sss can catch up"
sleep 3
fi
if getent group 65534; then
# Make sure the gid is unused, even if uid wasn't.
name="$(getent group 65534 | cut -d: -f1)"
( set -x
groupdel "$name"
)
fi
# systemd-sysusers uses the same gid and uid
( set -x
systemd-sysusers --inline 'u nobody 65534 "Kernel Overflow User" / /sbin/nologin'
)
else
echo "Pass '-x' to perform changes"
fi

View File

@ -1 +1 @@
d2603e9fffd8b18d242543e36f2e7d31 systemd-215.tar.xz
SHA512 (systemd-247.1.tar.gz) = 2a737afcee4409c2be073d8cb650c3465a25c101b3c3072ea6e6a0614d06e3ed7ae55c84f9ae60555915ad1480b3a13aa72fef4b9210139afe6b0d7a7629385a

Some files were not shown because too many files have changed in this diff Show More