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
85 changed files with 2733 additions and 8031 deletions

2
.gitignore vendored
View File

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

File diff suppressed because it is too large Load Diff

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,374 +0,0 @@
From a8caf8eabad9bd51425c649189955c9fe18c9418 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 09:20:39 -0500
Subject: [PATCH] Revert "timedated: manage systemd-timesyncd directly instead
of lists of alternatives"
This reverts commit b72ddf0f4f552dd53d6404b6ddbc9f17d02b8e12.
Conflicts:
Makefile.am
NEWS
---
Makefile.am | 9 ++
NEWS | 2 +
src/timedate/timedated.c | 254 +++++++++++++++++++++++++++++------------------
3 files changed, 171 insertions(+), 94 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3666a927fd..3509665176 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -109,6 +109,7 @@ udevrulesdir=$(udevlibexecdir)/rules.d
udevhwdbdir=$(udevlibexecdir)/hwdb.d
catalogdir=$(prefix)/lib/systemd/catalog
kernelinstalldir = $(prefix)/lib/kernel/install.d
+ntpunitsdir=$(prefix)/lib/systemd/ntp-units.d
factory_etcdir = $(prefix)/share/factory/etc
factory_pamdir = $(prefix)/share/factory/etc/pam.d
@@ -4762,6 +4763,10 @@ dist_systemunit_DATA_busnames += \
polkitpolicy_files += \
src/timedate/org.freedesktop.timedate1.policy
+INSTALL_DIRS += \
+ $(prefix)/lib/systemd/ntp-units.d \
+ $(sysconfdir)/systemd/ntp-units.d
+
SYSTEM_UNIT_ALIASES += \
systemd-timedated.service dbus-org.freedesktop.timedate1.service
@@ -4840,6 +4845,10 @@ EXTRA_DIST += \
CLEANFILES += \
src/timesync/timesyncd.conf
+
+dist_ntpunits_DATA = \
+ src/timesync/90-systemd.list
+
endif
# ------------------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 84a43fd5df..078fabb1e5 100644
--- a/NEWS
+++ b/NEWS
@@ -218,6 +218,8 @@ CHANGES WITH 216:
to their unit files to take over and replace systemd's NTP
default functionality.
+ [ reverted in this branch ]
+
* systemd-sysusers gained a new line type "r" for configuring
which UID/GID ranges to allocate system users/groups
from. Lines of type "u" may now add an additional column
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 8880812b49..08b604dcca 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -180,145 +180,211 @@ static int context_write_data_local_rtc(Context *c) {
return write_string_file_atomic_label("/etc/adjtime", w);
}
+static char** get_ntp_services(void) {
+ _cleanup_strv_free_ char **r = NULL, **files = NULL;
+ char **i;
+ int k;
+
+ k = conf_files_list(&files, ".list", NULL,
+ "/etc/systemd/ntp-units.d",
+ "/run/systemd/ntp-units.d",
+ "/usr/local/lib/systemd/ntp-units.d",
+ "/usr/lib/systemd/ntp-units.d",
+ NULL);
+ if (k < 0)
+ return NULL;
+
+ STRV_FOREACH(i, files) {
+ _cleanup_fclose_ FILE *f;
+
+ f = fopen(*i, "re");
+ if (!f)
+ continue;
+
+ for (;;) {
+ char line[PATH_MAX], *l;
+
+ if (!fgets(line, sizeof(line), f)) {
+ if (ferror(f))
+ log_error("Failed to read NTP unit file: %m");
+
+ break;
+ }
+
+ l = strstrip(line);
+ if (l[0] == 0 || l[0] == '#')
+ continue;
+
+ if (strv_extend(&r, l) < 0) {
+ log_oom();
+ return NULL;
+ }
+ }
+ }
+
+ i = r;
+ r = NULL; /* avoid cleanup */
+
+ return strv_uniq(i);
+}
+
static int context_read_ntp(Context *c, sd_bus *bus) {
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- sd_bus_message *reply = NULL;
- const char *s;
+ _cleanup_strv_free_ char **l;
+ char **i;
int r;
assert(c);
assert(bus);
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "GetUnitFileState",
- &error,
- &reply,
- "s",
- "systemd-timesyncd.service");
+ l = get_ntp_services();
+ STRV_FOREACH(i, l) {
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+ sd_bus_message *reply = NULL;
+ const char *s;
- if (r < 0) {
- if (sd_bus_error_has_name(&error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
- sd_bus_error_has_name(&error, "org.freedesktop.systemd1.LoadFailed") ||
- sd_bus_error_has_name(&error, "org.freedesktop.systemd1.NoSuchUnit"))
- return 0;
+ r = sd_bus_call_method(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "GetUnitFileState",
+ &error,
+ &reply,
+ "s",
+ *i);
- return r;
- }
+ if (r < 0) {
+ /* This implementation does not exist. Try the next one. */
+ if (sd_bus_error_has_name(&error, SD_BUS_ERROR_FILE_NOT_FOUND))
+ continue;
- r = sd_bus_message_read(reply, "s", &s);
- if (r < 0)
- return r;
+ return r;
+ }
+
+ r = sd_bus_message_read(reply, "s", &s);
+ if (r < 0)
+ return r;
- c->can_ntp = true;
- c->use_ntp = STR_IN_SET(s, "enabled", "enabled-runtime");
+ c->can_ntp = true;
+ c->use_ntp = STR_IN_SET(s, "enabled", "enabled-runtime");
+
+ return 0;
+ }
return 0;
}
static int context_start_ntp(Context *c, sd_bus *bus, sd_bus_error *error) {
+ _cleanup_strv_free_ char **l = NULL;
+ char **i;
int r;
assert(c);
assert(bus);
assert(error);
- if (c->use_ntp)
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StartUnit",
- error,
- NULL,
- "ss",
- "systemd-timesyncd.service",
- "replace");
- else
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StopUnit",
- error,
- NULL,
- "ss",
- "systemd-timesyncd.service",
- "replace");
+ l = get_ntp_services();
+ STRV_FOREACH(i, l) {
+
+ if (c->use_ntp)
+ r = sd_bus_call_method(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "StartUnit",
+ error,
+ NULL,
+ "ss", *i, "replace");
+ else
+ r = sd_bus_call_method(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "StopUnit",
+ error,
+ NULL,
+ "ss", *i, "replace");
+
+ if (r < 0) {
+ if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
+ sd_bus_error_has_name(error, "org.freedesktop.systemd1.LoadFailed") ||
+ sd_bus_error_has_name(error, "org.freedesktop.systemd1.NoSuchUnit")) {
+ /* This implementation does not exist. Try the next one. */
+ sd_bus_error_free(error);
+ continue;
+ }
- if (r < 0) {
- if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
- sd_bus_error_has_name(error, "org.freedesktop.systemd1.LoadFailed") ||
- sd_bus_error_has_name(error, "org.freedesktop.systemd1.NoSuchUnit")) {
- sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
- return -ENOTSUP;
+ return r;
}
- return r;
+ return 1;
}
- return 0;
+ sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
+ return -ENOTSUP;
}
static int context_enable_ntp(Context*c, sd_bus *bus, sd_bus_error *error) {
+ _cleanup_strv_free_ char **l = NULL;
+ char **i;
int r;
assert(c);
assert(bus);
assert(error);
- if (c->use_ntp)
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "EnableUnitFiles",
- error,
- NULL,
- "asbb", 1,
- "systemd-timesyncd.service",
- false, true);
- else
+ l = get_ntp_services();
+ STRV_FOREACH(i, l) {
+ if (c->use_ntp)
+ r = sd_bus_call_method(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "EnableUnitFiles",
+ error,
+ NULL,
+ "asbb", 1, *i, false, true);
+ else
+ r = sd_bus_call_method(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "DisableUnitFiles",
+ error,
+ NULL,
+ "asb", 1, *i, false);
+
+ if (r < 0) {
+ if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND)) {
+ /* This implementation does not exist. Try the next one. */
+ sd_bus_error_free(error);
+ continue;
+ }
+
+ return r;
+ }
+
r = sd_bus_call_method(
bus,
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
- "DisableUnitFiles",
+ "Reload",
error,
NULL,
- "asb", 1,
- "systemd-timesyncd.service",
- false);
-
- if (r < 0) {
- if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND)) {
- sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
- return -ENOTSUP;
- }
+ NULL);
+ if (r < 0)
+ return r;
- return r;
+ return 1;
}
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "Reload",
- error,
- NULL,
- NULL);
- if (r < 0)
- return r;
-
- return 0;
+ sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
+ return -ENOTSUP;
}
static int property_get_rtc_time(

View File

@ -1,41 +0,0 @@
From 2ed2be30664faa7076edd819ea4ae429fab8ac08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 09:42:01 -0500
Subject: [PATCH] Revert "sysctl.d: default to fq_codel, fight bufferbloat"
This reverts commit e6c253e363dee77ef7e5c5f44c4ca55cded3fd47.
Conflicts:
NEWS
---
NEWS | 2 ++
sysctl.d/50-default.conf | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 078fabb1e5..c3d28a6394 100644
--- a/NEWS
+++ b/NEWS
@@ -100,6 +100,8 @@ CHANGES WITH 217:
servers that do not do forwarding, "fq" may perform better.
Systems without a good clocksource should use "pfifo_fast".
+ [ reverted in this branch ]
+
* If kdbus is enabled during build a new option BusPolicy= is
available for service units, that allows locking all service
processes into a stricter bus policy, in order to limit
diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf
index f18923399b..8fc9ab77a9 100644
--- a/sysctl.d/50-default.conf
+++ b/sysctl.d/50-default.conf
@@ -25,9 +25,6 @@ net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
-# Fair Queue CoDel packet scheduler to fight bufferbloat
-net.core.default_qdisc = fq_codel
-
# Enable hard and soft link protection
fs.protected_hardlinks = 1
fs.protected_symlinks = 1

View File

@ -1,54 +0,0 @@
From 93871b345b76480e99b9a135006cad47e10acd7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 10:02:41 -0500
Subject: [PATCH] Revert "units: define appropriate job timeout actions when
boot or shutdown timeouts are hit"
This reverts commit 3898b80d409ae16b049d46f883bf763417bb4c8a.
We have various jobs that run during early boot and might cause
basic.target not to be reached within 15 minutes. E.g. Fedora has
fedora-autorelabel.service, which can take an arbitrarily long time on
a large and slow drive.
---
units/basic.target | 2 --
units/poweroff.target | 2 --
units/reboot.target | 2 --
3 files changed, 6 deletions(-)
diff --git a/units/basic.target b/units/basic.target
index 228f62c4b1..b890d48bbc 100644
--- a/units/basic.target
+++ b/units/basic.target
@@ -11,5 +11,3 @@ Documentation=man:systemd.special(7)
Requires=sysinit.target
Wants=sockets.target timers.target paths.target slices.target
After=sysinit.target sockets.target timers.target paths.target slices.target
-JobTimeoutSec=15min
-JobTimeoutAction=poweroff-force
diff --git a/units/poweroff.target b/units/poweroff.target
index dd92d816ca..71871033a5 100644
--- a/units/poweroff.target
+++ b/units/poweroff.target
@@ -12,8 +12,6 @@ DefaultDependencies=no
Requires=systemd-poweroff.service
After=systemd-poweroff.service
AllowIsolate=yes
-JobTimeoutSec=30min
-JobTimeoutAction=poweroff-force
[Install]
Alias=ctrl-alt-del.target
diff --git a/units/reboot.target b/units/reboot.target
index 668b98d9e4..dec8f56796 100644
--- a/units/reboot.target
+++ b/units/reboot.target
@@ -12,8 +12,6 @@ DefaultDependencies=no
Requires=systemd-reboot.service
After=systemd-reboot.service
AllowIsolate=yes
-JobTimeoutSec=30min
-JobTimeoutAction=reboot-force
[Install]
Alias=ctrl-alt-del.target

View File

@ -1,38 +0,0 @@
From 2f0a6c615496777ec37f6815b8516f8b3a25e82e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 10:03:49 -0500
Subject: [PATCH] Revert "Update NEWS"
This reverts commit 4ffd29fda1a2621d8f1711ccaad723d327fef93a.
---
NEWS | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/NEWS b/NEWS
index c3d28a6394..a590b3101b 100644
--- a/NEWS
+++ b/NEWS
@@ -22,23 +22,6 @@ CHANGES WITH 217:
/run/systemd/user directory that was already previously
supported, but is under the control of the user.
- * Job timeouts (i.e. time-outs on the time a job that is
- queued stays in the run queue) can now optionally result in
- immediate reboot or power-off actions (JobTimeoutAction= and
- JobTimeoutRebootArgument=). This is useful on ".target"
- units, to limit the maximum time a target remains
- undispatched in the run queue, and to trigger an emergency
- operation in such a case. This is now used by default to
- turn off the system if boot-up (as defined by everything in
- basic.target) hangs and does not complete for at least
- 15min. Also, if power-off or reboot hang for at least 30min
- an immediate power-off/reboot operation is triggered. This
- functionality is particularly useful to increase reliability
- on embedded devices, but also on laptops which might
- accidentally get powered on when carried in a backpack and
- whose boot stays stuck in a hard disk encryption passphrase
- question.
-
* systemd-logind can be configured to also handle lid switch
events even when the machine is docked or multiple displays
are attached (HandleLidSwitchDocked= option).

View File

@ -1,227 +0,0 @@
From 32e659e2d7a50ebe19dd82db116518eb150f7317 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 10:05:51 -0500
Subject: [PATCH] Revert "login: remove multi-seat-x"
This reverts commit 3769415e6573da64fb80e31f4bb3f850cd99031e.
Conflicts:
NEWS
---
.gitignore | 1 +
Makefile.am | 14 ++++++
NEWS | 6 ---
TODO | 2 +
configure.ac | 9 ++++
src/login/multi-seat-x.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 134 insertions(+), 6 deletions(-)
create mode 100644 src/login/multi-seat-x.c
diff --git a/.gitignore b/.gitignore
index 0b71f0973b..f119b574c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -93,6 +93,7 @@
/systemd-machined
/systemd-modeset
/systemd-modules-load
+/systemd-multi-seat-x
/systemd-networkd
/systemd-networkd-wait-online
/systemd-notify
diff --git a/Makefile.am b/Makefile.am
index 3509665176..11a3033253 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5461,6 +5461,20 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
+if ENABLE_MULTI_SEAT_X
+
+systemd_multi_seat_x_SOURCES = \
+ src/login/multi-seat-x.c
+
+systemd_multi_seat_x_LDADD = \
+ libsystemd-label.la \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-multi-seat-x
+
+endif
+
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/NEWS b/NEWS
index a590b3101b..c85605f1d6 100644
--- a/NEWS
+++ b/NEWS
@@ -127,12 +127,6 @@ CHANGES WITH 217:
occur. Again: you need to update util-linux to at least
v2.25 when updating systemd to v217.
- * The "multi-seat-x" tool has been removed from systemd, as
- its functionality has been integrated into X servers 1.16,
- and the tool is hence redundant. It is recommended to update
- display managers invoking this tool to simply invoke X
- directly from now on, again.
-
* Support for the new ALLOW_INTERACTIVE_AUTHORIZATION D-Bus
message flag has been added for all of systemd's PolicyKit
authenticated method calls has been added. In particular
diff --git a/TODO b/TODO
index b07d664715..64b24c18a7 100644
--- a/TODO
+++ b/TODO
@@ -88,6 +88,8 @@ Features:
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to fail (instead of skipping it) if some condition is not true...
+* remove multi-seat-x now
+
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a server
diff --git a/configure.ac b/configure.ac
index 48e094cd80..e63d3dc809 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1071,6 +1071,14 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
+have_multi_seat_x=no
+AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
+if test "x$enable_multi_seat_x" != "xno"; then
+ have_multi_seat_x=yes
+fi
+AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
+
+# ------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then
@@ -1379,6 +1387,7 @@ AC_MSG_RESULT([
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}
+ multi-seat-x: ${have_multi_seat_x}
terminal: ${have_terminal}
kdbus: ${have_kdbus}
Python: ${have_python}
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
new file mode 100644
index 0000000000..83760d4191
--- /dev/null
+++ b/src/login/multi-seat-x.c
@@ -0,0 +1,108 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+ This file is part of systemd.
+
+ Copyright 2011 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/>.
+***/
+
+#include <string.h>
+#include <unistd.h>
+
+#include "util.h"
+#include "mkdir.h"
+
+int main(int argc, char *argv[]) {
+
+ int i;
+ const char *seat = NULL;
+ char **new_argv;
+ _cleanup_free_ char *path = NULL;
+ int r;
+ _cleanup_fclose_ FILE *f = NULL;
+
+ /* This binary will go away as soon as X natively takes the
+ * arguments in question as command line parameters, instead
+ * of requiring them in the configuration file. */
+
+ /* If this file is removed, don't forget to remove the code
+ * that invokes this in gdm and other display managers. */
+
+ for (i = 1; i < argc; i++)
+ if (streq(argv[i], "-seat"))
+ seat = argv[i+1];
+
+ if (isempty(seat) || streq(seat, "seat0")) {
+ argv[0] = (char*) X_SERVER;
+ execv(X_SERVER, argv);
+ log_error("Failed to execute real X server: %m");
+ goto fail;
+ }
+
+ r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
+ if (r < 0) {
+ log_error("Failed to create directory: %s", strerror(-r));
+ goto fail;
+ }
+
+ path = strappend("/run/systemd/multi-session-x/", seat);
+ if (!path) {
+ log_oom();
+ goto fail;
+ }
+
+ f = fopen(path, "we");
+ if (!f) {
+ log_error("Failed to write configuration file: %m");
+ goto fail;
+ }
+
+ fprintf(f,
+ "Section \"ServerFlags\"\n"
+ " Option \"AutoAddDevices\" \"True\"\n"
+ " Option \"AllowEmptyInput\" \"True\"\n"
+ " Option \"DontVTSwitch\" \"True\"\n"
+ "EndSection\n"
+ "Section \"InputClass\"\n"
+ " Identifier \"Force Input Devices to Seat\"\n"
+ " Option \"GrabDevice\" \"True\"\n"
+ "EndSection\n");
+
+ fflush(f);
+
+ if (ferror(f)) {
+ log_error("Failed to write configuration file: %m");
+ goto fail;
+ }
+
+ fclose(f);
+ f = NULL;
+
+ new_argv = newa(char*, argc + 3 + 1);
+ memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
+
+ new_argv[0] = (char*) X_SERVER;
+ new_argv[argc+0] = (char*) "-config";
+ new_argv[argc+1] = path;
+ new_argv[argc+2] = (char*) "-sharevts";
+ new_argv[argc+3] = NULL;
+
+ execv(X_SERVER, new_argv);
+ log_error("Failed to execute real X server: %m");
+
+fail:
+ return EXIT_FAILURE;
+}

View File

@ -1,22 +0,0 @@
From 9bbe7b209c31fb3b31f7b0e1a66ae82b4c2768d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 10:24:58 -0500
Subject: [PATCH] Revert "service: add missing state table entry"
This reverts commit 1378a3b5a10444e6c9a17084c65032b4e1061c8e.
---
src/core/service.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/core/service.c b/src/core/service.c
index f27e63eb9a..2b16778731 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2830,7 +2830,6 @@ static const char* const service_state_table[_SERVICE_STATE_MAX] = {
[SERVICE_EXITED] = "exited",
[SERVICE_RELOAD] = "reload",
[SERVICE_STOP] = "stop",
- [SERVICE_STOP_SIGABRT] = "stop-sigabrt",
[SERVICE_STOP_SIGTERM] = "stop-sigterm",
[SERVICE_STOP_SIGKILL] = "stop-sigkill",
[SERVICE_STOP_POST] = "stop-post",

View File

@ -1,397 +0,0 @@
From d5cd1a02f0da4de24cce433b1759e3e297df0f5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 10:25:06 -0500
Subject: [PATCH] Revert "core: send sigabrt on watchdog timeout to get the
stacktrace"
This reverts commit db2cb23b5b179707000d28a11efb3d888d06ee80.
---
TODO | 2 ++
man/systemd.service.xml | 5 ++---
src/core/busname.c | 2 +-
src/core/mount.c | 3 +--
src/core/scope.c | 2 +-
src/core/service.c | 37 +++++++++++--------------------------
src/core/service.h | 1 -
src/core/socket.c | 3 +--
src/core/swap.c | 3 +--
src/core/unit.c | 24 ++++++------------------
src/core/unit.h | 8 +-------
11 files changed, 27 insertions(+), 63 deletions(-)
diff --git a/TODO b/TODO
index 64b24c18a7..68506671fa 100644
--- a/TODO
+++ b/TODO
@@ -48,6 +48,8 @@ Features:
* consider showing the unit names during boot up in the status output, not just the unit descriptions
+* send SIGABRT when a service watchdog is triggered, by default, so that we acquire a backtrace of the hang.
+
* dhcp: do we allow configuring dhcp routes on interfaces that are not the one we got the dhcp info from?
* maybe allow timer units with an empty Units= setting, so that they
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index e563b1968b..115d1692ed 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -593,9 +593,8 @@
(i.e. the "keep-alive ping"). If the time
between two such calls is larger than
the configured time, then the service
- is placed in a failed state and it will
- be terminated with <varname>SIGABRT</varname>.
- By setting <varname>Restart=</varname> to
+ is placed in a failed state. By
+ setting <varname>Restart=</varname> to
<option>on-failure</option> or
<option>always</option>, the service
will be automatically restarted. The
diff --git a/src/core/busname.c b/src/core/busname.c
index 68cb6ca7b7..22d2a6d24b 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -446,7 +446,7 @@ static void busname_enter_signal(BusName *n, BusNameState state, BusNameResult f
r = unit_kill_context(UNIT(n),
&kill_context,
- state != BUSNAME_SIGTERM ? KILL_KILL : KILL_TERMINATE,
+ state != BUSNAME_SIGTERM,
-1,
n->control_pid,
false);
diff --git a/src/core/mount.c b/src/core/mount.c
index 01243c381a..e284357c6f 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -775,8 +775,7 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) {
r = unit_kill_context(
UNIT(m),
&m->kill_context,
- (state != MOUNT_MOUNTING_SIGTERM && state != MOUNT_UNMOUNTING_SIGTERM && state != MOUNT_REMOUNTING_SIGTERM) ?
- KILL_KILL : KILL_TERMINATE,
+ state != MOUNT_MOUNTING_SIGTERM && state != MOUNT_UNMOUNTING_SIGTERM && state != MOUNT_REMOUNTING_SIGTERM,
-1,
m->control_pid,
false);
diff --git a/src/core/scope.c b/src/core/scope.c
index 0f7c1f97ce..e8f9e8dd73 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -243,7 +243,7 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) {
r = unit_kill_context(
UNIT(s),
&s->kill_context,
- state != SCOPE_STOP_SIGTERM ? KILL_KILL : KILL_TERMINATE,
+ state != SCOPE_STOP_SIGTERM,
-1, -1, false);
if (r < 0)
goto fail;
diff --git a/src/core/service.c b/src/core/service.c
index 2b16778731..d160c4e93b 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -56,7 +56,6 @@ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_EXITED] = UNIT_ACTIVE,
[SERVICE_RELOAD] = UNIT_RELOADING,
[SERVICE_STOP] = UNIT_DEACTIVATING,
- [SERVICE_STOP_SIGABRT] = UNIT_DEACTIVATING,
[SERVICE_STOP_SIGTERM] = UNIT_DEACTIVATING,
[SERVICE_STOP_SIGKILL] = UNIT_DEACTIVATING,
[SERVICE_STOP_POST] = UNIT_DEACTIVATING,
@@ -77,7 +76,6 @@ static const UnitActiveState state_translation_table_idle[_SERVICE_STATE_MAX] =
[SERVICE_EXITED] = UNIT_ACTIVE,
[SERVICE_RELOAD] = UNIT_RELOADING,
[SERVICE_STOP] = UNIT_DEACTIVATING,
- [SERVICE_STOP_SIGABRT] = UNIT_DEACTIVATING,
[SERVICE_STOP_SIGTERM] = UNIT_DEACTIVATING,
[SERVICE_STOP_SIGKILL] = UNIT_DEACTIVATING,
[SERVICE_STOP_POST] = UNIT_DEACTIVATING,
@@ -665,7 +663,7 @@ static void service_set_state(Service *s, ServiceState state) {
SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL,
SERVICE_AUTO_RESTART))
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
@@ -674,7 +672,7 @@ static void service_set_state(Service *s, ServiceState state) {
SERVICE_START, SERVICE_START_POST,
SERVICE_RUNNING, SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
service_unwatch_main_pid(s);
s->main_command = NULL;
@@ -684,7 +682,7 @@ static void service_set_state(Service *s, ServiceState state) {
SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
service_unwatch_control_pid(s);
s->control_command = NULL;
@@ -698,7 +696,7 @@ static void service_set_state(Service *s, ServiceState state) {
SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
SERVICE_RUNNING, SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL, SERVICE_STOP_POST,
- SERVICE_STOP_SIGABRT, SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL) &&
+ SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL) &&
!(state == SERVICE_DEAD && UNIT(s)->job)) {
service_close_socket_fd(s);
service_connection_unref(s);
@@ -752,7 +750,7 @@ static int service_coldplug(Unit *u) {
SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
usec_t k;
@@ -781,7 +779,7 @@ static int service_coldplug(Unit *u) {
SERVICE_START, SERVICE_START_POST,
SERVICE_RUNNING, SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL))) {
r = unit_watch_pid(UNIT(s), s->main_pid);
if (r < 0)
@@ -793,7 +791,7 @@ static int service_coldplug(Unit *u) {
SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
SERVICE_RELOAD,
SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
- SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
+ SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
r = unit_watch_pid(UNIT(s), s->control_pid);
if (r < 0)
@@ -1183,8 +1181,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
r = unit_kill_context(
UNIT(s),
&s->kill_context,
- (state != SERVICE_STOP_SIGTERM && state != SERVICE_FINAL_SIGTERM && state != SERVICE_STOP_SIGABRT) ?
- KILL_KILL : (state == SERVICE_STOP_SIGABRT ? KILL_ABORT : KILL_TERMINATE),
+ state != SERVICE_STOP_SIGTERM && state != SERVICE_FINAL_SIGTERM,
s->main_pid,
s->control_pid,
s->main_pid_alien);
@@ -1200,7 +1197,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
}
service_set_state(s, state);
- } else if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGABRT)
+ } else if (state == SERVICE_STOP_SIGTERM)
service_enter_signal(s, SERVICE_STOP_SIGKILL, SERVICE_SUCCESS);
else if (state == SERVICE_STOP_SIGKILL)
service_enter_stop_post(s, SERVICE_SUCCESS);
@@ -1214,8 +1211,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
fail:
log_warning_unit(UNIT(s)->id, "%s failed to kill processes: %s", UNIT(s)->id, strerror(-r));
- if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGKILL ||
- state == SERVICE_STOP_SIGABRT)
+ if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGKILL)
service_enter_stop_post(s, SERVICE_FAILURE_RESOURCES);
else
service_enter_dead(s, SERVICE_FAILURE_RESOURCES, true);
@@ -1641,7 +1637,6 @@ static int service_start(Unit *u) {
/* We cannot fulfill this request right now, try again later
* please! */
if (s->state == SERVICE_STOP ||
- s->state == SERVICE_STOP_SIGABRT ||
s->state == SERVICE_STOP_SIGTERM ||
s->state == SERVICE_STOP_SIGKILL ||
s->state == SERVICE_STOP_POST ||
@@ -1700,7 +1695,6 @@ static int service_stop(Unit *u) {
/* Already on it */
if (s->state == SERVICE_STOP ||
- s->state == SERVICE_STOP_SIGABRT ||
s->state == SERVICE_STOP_SIGTERM ||
s->state == SERVICE_STOP_SIGKILL ||
s->state == SERVICE_STOP_POST ||
@@ -2132,7 +2126,6 @@ static void service_notify_cgroup_empty_event(Unit *u) {
service_enter_running(s, SERVICE_SUCCESS);
break;
- case SERVICE_STOP_SIGABRT:
case SERVICE_STOP_SIGTERM:
case SERVICE_STOP_SIGKILL:
@@ -2259,7 +2252,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
service_enter_running(s, f);
break;
- case SERVICE_STOP_SIGABRT:
case SERVICE_STOP_SIGTERM:
case SERVICE_STOP_SIGKILL:
@@ -2400,7 +2392,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
service_enter_signal(s, SERVICE_STOP_SIGTERM, f);
break;
- case SERVICE_STOP_SIGABRT:
case SERVICE_STOP_SIGTERM:
case SERVICE_STOP_SIGKILL:
if (main_pid_good(s) <= 0)
@@ -2470,12 +2461,6 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_TIMEOUT);
break;
- case SERVICE_STOP_SIGABRT:
- log_warning_unit(UNIT(s)->id,
- "%s stop-sigabrt timed out. Terminating.", UNIT(s)->id);
- service_enter_signal(s, SERVICE_STOP_SIGTERM, s->result);
- break;
-
case SERVICE_STOP_SIGTERM:
if (s->kill_context.send_sigkill) {
log_warning_unit(UNIT(s)->id, "%s stop-sigterm timed out. Killing.", UNIT(s)->id);
@@ -2543,7 +2528,7 @@ static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void
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_SIGABRT, SERVICE_FAILURE_WATCHDOG);
+ service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_WATCHDOG);
return 0;
}
diff --git a/src/core/service.h b/src/core/service.h
index 54fbe46fa4..0db0c4d64c 100644
--- a/src/core/service.h
+++ b/src/core/service.h
@@ -39,7 +39,6 @@ typedef enum ServiceState {
SERVICE_EXITED, /* Nothing is running anymore, but RemainAfterExit is true hence this is OK */
SERVICE_RELOAD,
SERVICE_STOP, /* No STOP_PRE state, instead just register multiple STOP executables */
- SERVICE_STOP_SIGABRT, /* Watchdog timeout */
SERVICE_STOP_SIGTERM,
SERVICE_STOP_SIGKILL,
SERVICE_STOP_POST,
diff --git a/src/core/socket.c b/src/core/socket.c
index 6ba8338d8b..9004cb42cf 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1578,8 +1578,7 @@ static void socket_enter_signal(Socket *s, SocketState state, SocketResult f) {
r = unit_kill_context(
UNIT(s),
&s->kill_context,
- (state != SOCKET_STOP_PRE_SIGTERM && state != SOCKET_FINAL_SIGTERM) ?
- KILL_KILL : KILL_TERMINATE,
+ state != SOCKET_STOP_PRE_SIGTERM && state != SOCKET_FINAL_SIGTERM,
-1,
s->control_pid,
false);
diff --git a/src/core/swap.c b/src/core/swap.c
index 1add722bf1..13e12ad67a 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -687,8 +687,7 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) {
r = unit_kill_context(
UNIT(s),
&s->kill_context,
- (state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM) ?
- KILL_KILL : KILL_TERMINATE,
+ state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM,
-1,
s->control_pid,
false);
diff --git a/src/core/unit.c b/src/core/unit.c
index 84f210a312..489ea1e502 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3313,7 +3313,7 @@ int unit_make_transient(Unit *u) {
int unit_kill_context(
Unit *u,
KillContext *c,
- KillOperation k,
+ bool sigkill,
pid_t main_pid,
pid_t control_pid,
bool main_pid_alien) {
@@ -3326,19 +3326,7 @@ int unit_kill_context(
if (c->kill_mode == KILL_NONE)
return 0;
- switch (k) {
- case KILL_KILL:
- sig = SIGKILL;
- break;
- case KILL_ABORT:
- sig = SIGABRT;
- break;
- case KILL_TERMINATE:
- sig = c->kill_signal;
- break;
- default:
- assert_not_reached("KillOperation unknown");
- }
+ sig = sigkill ? SIGKILL : c->kill_signal;
if (main_pid > 0) {
r = kill_and_sigcont(main_pid, sig);
@@ -3352,7 +3340,7 @@ int unit_kill_context(
if (!main_pid_alien)
wait_for_exit = true;
- if (c->send_sighup && k != KILL_KILL)
+ if (c->send_sighup && !sigkill)
kill(main_pid, SIGHUP);
}
}
@@ -3368,12 +3356,12 @@ int unit_kill_context(
} else {
wait_for_exit = true;
- if (c->send_sighup && k != KILL_KILL)
+ if (c->send_sighup && !sigkill)
kill(control_pid, SIGHUP);
}
}
- if ((c->kill_mode == KILL_CONTROL_GROUP || (c->kill_mode == KILL_MIXED && k == KILL_KILL)) && u->cgroup_path) {
+ if ((c->kill_mode == KILL_CONTROL_GROUP || (c->kill_mode == KILL_MIXED && sigkill)) && u->cgroup_path) {
_cleanup_set_free_ Set *pid_set = NULL;
/* Exclude the main/control pids from being killed via the cgroup */
@@ -3397,7 +3385,7 @@ int unit_kill_context(
/* wait_for_exit = true; */
- if (c->send_sighup && k != KILL_KILL) {
+ if (c->send_sighup && !sigkill) {
set_free(pid_set);
pid_set = unit_pid_set(main_pid, control_pid);
diff --git a/src/core/unit.h b/src/core/unit.h
index 081ab18f10..bbad546356 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -54,12 +54,6 @@ enum UnitActiveState {
_UNIT_ACTIVE_STATE_INVALID = -1
};
-typedef enum KillOperation {
- KILL_TERMINATE,
- KILL_KILL,
- KILL_ABORT,
-} KillOperation;
-
static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
return t == UNIT_ACTIVE || t == UNIT_RELOADING;
}
@@ -582,7 +576,7 @@ int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const
int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name);
-int unit_kill_context(Unit *u, KillContext *c, KillOperation k, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
+int unit_kill_context(Unit *u, KillContext *c, bool sigkill, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
int unit_make_transient(Unit *u);

View File

@ -1,23 +0,0 @@
From 6bb37d22af95d11df7f487f3e34abc97fa5fa9bf Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 28 Oct 2014 20:36:32 +0100
Subject: [PATCH] NEWS: well, it's Options= now, not Discard=
(cherry picked from commit c4ac990007cd0069bb7e76ec15dd731320f382fd)
---
NEWS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index c85605f1d6..bf8d0ac242 100644
--- a/NEWS
+++ b/NEWS
@@ -59,7 +59,7 @@ CHANGES WITH 217:
rotating media anymore, and nobody stepped up to actively
maintain this component of systemd it has now been removed.
- * Swap units can use Discard= to specify discard options.
+ * Swap units can use Options= to specify discard options.
Discard options specified for swaps in /etc/fstab are now
respected.

View File

@ -1,23 +0,0 @@
From 8207682d7a40270e6581515e3537adaff885a072 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 29 Oct 2014 17:58:43 +0100
Subject: [PATCH] sd-bus: properly handle removals of non-existing matches
(cherry picked from commit ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b)
---
src/libsystemd/sd-bus/bus-match.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
index 18afe0f12a..5658c61ba7 100644
--- a/src/libsystemd/sd-bus/bus-match.c
+++ b/src/libsystemd/sd-bus/bus-match.c
@@ -537,7 +537,7 @@ static int bus_match_find_compare_value(
else if (BUS_MATCH_CAN_HASH(t))
n = hashmap_get(c->compare.children, value_str);
else {
- for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next)
+ for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next)
;
}

View File

@ -1,32 +0,0 @@
From 5b6b524662ddc3178b4d8c2e51eba5d023ad08c4 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 29 Oct 2014 13:32:43 -0400
Subject: [PATCH] nspawn: ignore EEXIST when creating mount point
A combination of commits f3c80515c and 79d80fc14 cause nspawn to
silently fail with a commandline such as:
# systemd-nspawn -D /build/extra-x86_64 --bind=/usr
strace shows the culprit:
[pid 27868] writev(2, [{"Failed to create mount point /build/extra-x86_64/usr: File exists", 82}, {"\n", 1}], 2) = 83
(cherry picked from commit 1ab19cb167b32967556eefd8f6d3df0e3de7d67d)
---
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index b6d9bc631c..d88987a580 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) {
* and char devices. */
if (S_ISDIR(source_st.st_mode)) {
r = mkdir_label(where, 0755);
- if (r < 0) {
+ if (r < 0 && errno != EEXIST) {
log_error("Failed to create mount point %s: %s", where, strerror(-r));
return r;

View File

@ -1,40 +0,0 @@
From c96c14e1f545e6533c781e33c2238d1433deb30f Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 30 Oct 2014 01:18:34 +0100
Subject: [PATCH] udev: path_id - update comments
(cherry picked from commit a42cdff19f2d34f12ceca0f40707421a8aaa2c2f)
---
src/udev/udev-builtin-path_id.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
index 0d247f6b5a..df996cb17a 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
@@ -548,9 +548,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
}
/*
- * Do return devices with have an unknown type of parent device, they
- * might produce conflicting IDs below multiple independent parent
- * devices.
+ * Do not return devices with an unknown parent device type. They
+ * might produce conflicting IDs if the parent does not provide a
+ * unique and predictable name.
*/
if (!supported_parent) {
free(path);
@@ -558,9 +558,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
}
/*
- * Do not return a have-only a single-parent block devices, some
- * have entire hidden buses behind it, and not create predictable
- * IDs that way.
+ * Do not return block devices without a well-known transport. Some
+ * devices do not expose their buses and do not provide a unique
+ * and predictable name that way.
*/
if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport) {
free(path);

View File

@ -1,71 +0,0 @@
From 1c7a80d7748ee8c4117ccbb628274413f2c7cb59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 29 Oct 2014 22:25:33 -0400
Subject: [PATCH] bash-completion: rework startable/restartable units once more
I tried to use 'systemctl --all list-units' to filter unit files, but
this always filters out unit files which are not loaded. We want to complete
systemctl start with those units too, so this approach is not going to work.
New version is rather slow, but hopefully correct.
(cherry picked from commit 9ff8af5460d57dfab78a1137ec743b539715e82a)
---
shell-completion/bash/systemctl.in | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 1c44a8df01..9e538a9a5b 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -52,20 +52,23 @@ __filter_units_by_property () {
}
__get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \
- | { while read -r a b; do echo " $a"; done; }; }
+ | { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }; }
__get_template_names () { __systemctl $1 list-unit-files \
| { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
__get_active_units () { __systemctl $1 list-units \
| { while read -r a b; do echo " $a"; done; }; }
__get_startable_units () {
- # find inactive or failed units, filter out masked and not-found
- __systemctl $1 list-units --state inactive,failed -- $( __get_all_units ) | \
- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
+ # find startable inactive units
+ __filter_units_by_property $mode LoadState loaded $(
+ __filter_units_by_property $mode ActiveState inactive $(
+ __filter_units_by_property $mode CanStart yes $( __get_all_units )))
+}
__get_restartable_units () {
- # find !masked, filter out masked and not-found
- __systemctl $1 list-units --state active,inactive,failed -- $( __get_all_units ) | \
- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
+ # filter out masked and not-found
+ __filter_units_by_property $mode LoadState loaded $(
+ __filter_units_by_property $mode CanStart yes $( __get_all_units ))
+}
__get_failed_units () { __systemctl $1 list-units \
| { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }
__get_enabled_units () { __systemctl $1 list-unit-files \
@@ -186,15 +189,13 @@ _systemctl () {
compopt -o filenames
elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then
- comps=$( __filter_units_by_property $mode CanStart yes \
- $( __get_startable_units $mode);
- __get_template_names $mode)
+ comps=$( __get_startable_units $mode;
+ __get_template_names $mode)
compopt -o filenames
elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
- comps=$( __filter_units_by_property $mode CanStart yes \
- $( __get_restartable_units $mode); \
- __get_template_names $mode)
+ comps=$( __get_restartable_units $mode;
+ __get_template_names $mode)
compopt -o filenames
elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then

View File

@ -1,98 +0,0 @@
From 4ffc2172253c5ac6ad49bee3c87e5740ae520c8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 29 Oct 2014 22:46:30 -0400
Subject: [PATCH] systemctl: let list-{units,unit-files } honour --type
The docs don't clarify what is expected, but I don't see any reason
why --type should be ignored.
Also restucture the compund conditions into separate clauses for
easier reading.
(cherry picked from commit 6c71341aeecc3d092ed90f66e1b2c481b8e260ff)
---
src/systemctl/systemctl.c | 48 ++++++++++++++++++++++++++++++++++++-----------
1 file changed, 37 insertions(+), 11 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 28eaa6a847..b71040be40 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -301,21 +301,37 @@ static int compare_unit_info(const void *a, const void *b) {
}
static bool output_show_unit(const UnitInfo *u, char **patterns) {
- const char *dot;
-
if (!strv_isempty(patterns)) {
char **pattern;
STRV_FOREACH(pattern, patterns)
if (fnmatch(*pattern, u->id, FNM_NOESCAPE) == 0)
- return true;
+ goto next;
return false;
}
- return (!arg_types || ((dot = strrchr(u->id, '.')) &&
- strv_find(arg_types, dot+1))) &&
- (arg_all || !(streq(u->active_state, "inactive")
- || u->following[0]) || u->job_id > 0);
+next:
+ if (arg_types) {
+ const char *dot;
+
+ dot = strrchr(u->id, '.');
+ if (!dot)
+ return false;
+
+ if (!strv_find(arg_types, dot+1))
+ return false;
+ }
+
+ if (arg_all)
+ return true;
+
+ if (u->job_id > 0)
+ return true;
+
+ if (streq(u->active_state, "inactive") || u->following[0])
+ return false;
+
+ return true;
}
static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
@@ -1231,18 +1247,28 @@ static int compare_unit_file_list(const void *a, const void *b) {
}
static bool output_show_unit_file(const UnitFileList *u, char **patterns) {
- const char *dot;
-
if (!strv_isempty(patterns)) {
char **pattern;
STRV_FOREACH(pattern, patterns)
if (fnmatch(*pattern, basename(u->path), FNM_NOESCAPE) == 0)
- return true;
+ goto next;
return false;
}
- return !arg_types || ((dot = strrchr(u->path, '.')) && strv_find(arg_types, dot+1));
+next:
+ if (!strv_isempty(arg_types)) {
+ const char *dot;
+
+ dot = strrchr(u->path, '.');
+ if (!dot)
+ return false;
+
+ if (!strv_find(arg_types, dot+1))
+ return false;
+ }
+
+ return true;
}
static void output_unit_file_list(const UnitFileList *units, unsigned c) {

View File

@ -1,26 +0,0 @@
From ff0c10038b7dc58ad13dce492806e6781a0f34fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 29 Oct 2014 22:51:00 -0400
Subject: [PATCH] systemctl: obey --state in list-unit-files
(cherry picked from commit fec1530e6b5b8d6dc352c7338010357126e84621)
---
src/systemctl/systemctl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index b71040be40..8481a9b20c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1268,6 +1268,11 @@ next:
return false;
}
+ if (!strv_isempty(arg_states)) {
+ if (!strv_find(arg_states, unit_file_state_to_string(u->state)))
+ return false;
+ }
+
return true;
}

View File

@ -1,40 +0,0 @@
From fef18888ca215c0600b95cd4dfd9b469c9936043 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 29 Oct 2014 23:06:58 -0400
Subject: [PATCH] bash-completion: use improved filtering to make things faster
(cherry picked from commit 372b221166eb586c4f767969f442ed940e21f353)
---
shell-completion/bash/systemctl.in | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 9e538a9a5b..9e98a1850e 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -60,14 +60,20 @@ __get_active_units () { __systemctl $1 list-units \
| { while read -r a b; do echo " $a"; done; }; }
__get_startable_units () {
# find startable inactive units
- __filter_units_by_property $mode LoadState loaded $(
- __filter_units_by_property $mode ActiveState inactive $(
- __filter_units_by_property $mode CanStart yes $( __get_all_units )))
+ __filter_units_by_property $mode ActiveState inactive $(
+ __filter_units_by_property $mode CanStart yes $(
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
+ __systemctl $mode list-units --state inactive,failed | \
+ { while read -r a b; do echo " $a"; done; } ))
}
__get_restartable_units () {
# filter out masked and not-found
- __filter_units_by_property $mode LoadState loaded $(
- __filter_units_by_property $mode CanStart yes $( __get_all_units ))
+ __filter_units_by_property $mode CanStart yes $(
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
+ __systemctl $mode list-units | \
+ { while read -r a b; do echo " $a"; done; } )
}
__get_failed_units () { __systemctl $1 list-units \
| { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }

View File

@ -1,69 +0,0 @@
From 8b2735073009dcb855d65a3aa85eec25d8100a2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 29 Oct 2014 23:47:55 -0400
Subject: [PATCH] zsh-completion: update start/restart completions
Now zsh should behave the same for those two subcommands as bash.
(cherry picked from commit 81333ecf9d5497f8aa95f7fec23c67b869d5abf9)
---
shell-completion/zsh/_systemctl.in | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 44981fe85d..7eefe53aec 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -141,13 +141,29 @@ _filter_units_by_property() {
done
}
-_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } }
+_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; } }
_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } }
_systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )}
-_systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
-_systemctl_restartable_units(){_sys_restartable_units=($(__systemctl list-units --state inactive,failed,active -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
+
+_systemctl_startable_units(){
+ _sys_startable_units=(_filter_units_by_property ActiveState inactive $(
+ _filter_units_by_property CanStart yes $(
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
+ __systemctl $mode list-units --state inactive,failed | \
+ { while read -r a b; do echo -E - " $a"; done; } )))
+}
+
+_systemctl_restartable_units(){
+ _sys_restartable_units=(_filter_units_by_property CanStart yes $(
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
+ __systemctl $mode list-units | \
+ { while read -r a b; do echo -E - " $a"; done; } ))
+}
+
_systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
_systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )}
_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
@@ -194,8 +210,7 @@ done
(( $+functions[_systemctl_start] )) || _systemctl_start()
{
_systemctl_startable_units
- compadd "$@" - $( _filter_units_by_property CanStart yes \
- ${_sys_startable_units[*]} )
+ compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
}
# Completion functions for STOPPABLE_UNITS
@@ -231,8 +246,7 @@ for fun in restart reload-or-restart ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
_systemctl_restartable_units
- compadd "$@" - $( _filter_units_by_property CanStart yes \
- ${_sys_restartable_units[*]} )
+ compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
}
done

View File

@ -1,39 +0,0 @@
From b9ae7f976b524c712b7b98062087adaa662f3cf8 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 30 Oct 2014 10:15:54 +0100
Subject: [PATCH] keymap: Ignore brightness keys on Dell Inspiron 1520 to avoid
double events
On the Dell Inspiron 1520 both the atkbd and acpi-video input devices report
an event for pressing the brightness up / down key-combos, resulting in user
space seeing double events and increasing / decreasing the brightness 2 steps
for each keypress.
This hwdb snippet suppresses the atkbd events, making the Inspiron 1520 work
like most modern laptops which emit brightness up / down events through
acpi-video only.
Reported by Pavel Malyshev <p.malishev@gmail.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1141525
(cherry picked from commit aba248ee6b1eb10baf3d89eca2ad7569459af6ab)
---
hwdb/60-keyboard.hwdb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 06caba9791..d2ca965c90 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -230,6 +230,11 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:pvr*
KEYBOARD_KEY_84=wlan
+# Dell Inspiron 1520
+keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:pvr*
+ KEYBOARD_KEY_85=unknown # Brightness Down, also emitted by acpi-video, ignore
+ KEYBOARD_KEY_86=unknown # Brightness Up, also emitted by acpi-video, ignore
+
# Latitude XT2
keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr*
KEYBOARD_KEY_9b=up # tablet rocker up

View File

@ -1,161 +0,0 @@
From c3a8638cf447ae5901dccb89ea766d768febe529 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 29 Oct 2014 14:03:41 +0000
Subject: [PATCH] sysusers: Preserve ownership and mode on /etc/passwd and
friends
When running sysusers we would clobber file ownership and permissions
on the files /etc/passwd, /etc/group and /etc/[g]shadow.
This simply preserves the ownership and mode if existing files are
found.
(cherry picked from commit e3c72c21d62aadabf4df436c3e2c7219eeeccc1c)
---
src/sysusers/sysusers.c | 61 +++++++++++++++++++++++++++++++++----------------
1 file changed, 41 insertions(+), 20 deletions(-)
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 9b9be96a0a..c133dc5f10 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -358,6 +358,7 @@ static int write_files(void) {
_cleanup_fclose_ FILE *passwd = NULL, *group = NULL, *shadow = NULL, *gshadow = NULL;
_cleanup_free_ char *passwd_tmp = NULL, *group_tmp = NULL, *shadow_tmp = NULL, *gshadow_tmp = NULL;
const char *passwd_path = NULL, *group_path = NULL, *shadow_path = NULL, *gshadow_path = NULL;
+ struct stat st;
bool group_changed = false;
Iterator iterator;
Item *i;
@@ -372,15 +373,17 @@ static int write_files(void) {
if (r < 0)
goto finish;
- if (fchmod(fileno(group), 0644) < 0) {
- r = -errno;
- goto finish;
- }
-
original = fopen(group_path, "re");
if (original) {
struct group *gr;
+ if (fstat(fileno(original), &st) < 0 ||
+ fchmod(fileno(group), st.st_mode & 07777) < 0 ||
+ fchown(fileno(group), st.st_uid, st.st_gid) < 0) {
+ r = -errno;
+ goto finish;
+ }
+
errno = 0;
while ((gr = fgetgrent(original))) {
/* Safety checks against name and GID
@@ -418,6 +421,9 @@ static int write_files(void) {
} else if (errno != ENOENT) {
r = -errno;
goto finish;
+ } else if (fchmod(fileno(group), 0644) < 0) {
+ r = -errno;
+ goto finish;
}
HASHMAP_FOREACH(i, todo_gids, iterator) {
@@ -449,15 +455,17 @@ static int write_files(void) {
if (r < 0)
goto finish;
- if (fchmod(fileno(gshadow), 0000) < 0) {
- r = -errno;
- goto finish;
- }
-
original = fopen(gshadow_path, "re");
if (original) {
struct sgrp *sg;
+ if (fstat(fileno(original), &st) < 0 ||
+ fchmod(fileno(gshadow), st.st_mode & 07777) < 0 ||
+ fchown(fileno(gshadow), st.st_uid, st.st_gid) < 0) {
+ r = -errno;
+ goto finish;
+ }
+
errno = 0;
while ((sg = fgetsgent(original))) {
@@ -483,6 +491,9 @@ static int write_files(void) {
} else if (errno != ENOENT) {
r = -errno;
goto finish;
+ } else if (fchmod(fileno(gshadow), 0000) < 0) {
+ r = -errno;
+ goto finish;
}
HASHMAP_FOREACH(i, todo_gids, iterator) {
@@ -513,15 +524,17 @@ static int write_files(void) {
if (r < 0)
goto finish;
- if (fchmod(fileno(passwd), 0644) < 0) {
- r = -errno;
- goto finish;
- }
-
original = fopen(passwd_path, "re");
if (original) {
struct passwd *pw;
+ if (fstat(fileno(original), &st) < 0 ||
+ fchmod(fileno(passwd), st.st_mode & 07777) < 0 ||
+ fchown(fileno(passwd), st.st_uid, st.st_gid) < 0) {
+ r = -errno;
+ goto finish;
+ }
+
errno = 0;
while ((pw = fgetpwent(original))) {
@@ -552,6 +565,9 @@ static int write_files(void) {
} else if (errno != ENOENT) {
r = -errno;
goto finish;
+ } else if (fchmod(fileno(passwd), 0644) < 0) {
+ r = -errno;
+ goto finish;
}
HASHMAP_FOREACH(i, todo_uids, iterator) {
@@ -596,15 +612,17 @@ static int write_files(void) {
if (r < 0)
goto finish;
- if (fchmod(fileno(shadow), 0000) < 0) {
- r = -errno;
- goto finish;
- }
-
original = fopen(shadow_path, "re");
if (original) {
struct spwd *sp;
+ if (fstat(fileno(original), &st) < 0 ||
+ fchmod(fileno(shadow), st.st_mode & 07777) < 0 ||
+ fchown(fileno(shadow), st.st_uid, st.st_gid) < 0) {
+ r = -errno;
+ goto finish;
+ }
+
errno = 0;
while ((sp = fgetspent(original))) {
@@ -629,6 +647,9 @@ static int write_files(void) {
} else if (errno != ENOENT) {
r = -errno;
goto finish;
+ } else if (fchmod(fileno(shadow), 0000) < 0) {
+ r = -errno;
+ goto finish;
}
lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);

View File

@ -1,23 +0,0 @@
From 3db5ad126fcca99e7d341e47f1c2967aa70fc813 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 28 Oct 2014 12:36:17 -0400
Subject: [PATCH] snapshot: return error when snapshot exists
(cherry picked from commit 7cabba07745b388497e8c0fc19b61984167fd474)
---
src/core/snapshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/snapshot.c b/src/core/snapshot.c
index 5eed615a15..c2678cbe6e 100644
--- a/src/core/snapshot.c
+++ b/src/core/snapshot.c
@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
if (manager_get_unit(m, name))
- sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
+ return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
} else {

View File

@ -1,30 +0,0 @@
From b994526e7fbc8acc71889120645508ac5f8aca33 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Thu, 30 Oct 2014 14:23:00 -0500
Subject: [PATCH] sd-dhcp-client: clean up raw socket sd_event_source when
creating new UDP socket
The raw socket sd_event_source used for DHCP server solicitations
was simply dropped on the floor when creating the new UDP socket
after a lease has been acquired. Clean it up properly so we're
not still listening and responding to events on it.
(cherry picked from commit affaa94fc38a980a70534f70f6a6c58a4129b062)
---
src/libsystemd-network/sd-dhcp-client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 0eba4c379d..1f7f238ca0 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -1269,6 +1269,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
if (r >= 0) {
client->timeout_resend =
sd_event_source_unref(client->timeout_resend);
+ client->receive_message =
+ sd_event_source_unref(client->receive_message);
+ client->fd = asynchronous_close(client->fd);
if (IN_SET(client->state, DHCP_STATE_REQUESTING,
DHCP_STATE_REBOOTING))

View File

@ -1,37 +0,0 @@
From deb58970549681f28a7e38ee0f75664523f5066a Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Thu, 30 Oct 2014 20:12:05 -0400
Subject: [PATCH] shared/install: avoid prematurely rejecting "missing" units
f7101b7368df copied some logic to prevent enabling masked units, but
also added a check which causes attempts to enable templated units to
fail. Since we know the logic beyond this check will properly handle
units which truly do not exist, we can rely on the unit file state
comparison to suffice for expressing the intent of f7101b7368df.
ref: https://bugs.archlinux.org/task/42616
(cherry picked from commit 0ffce503cd6e5a5ff5ba5cd1cc23684cfb8bb9e3)
---
src/shared/install.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 035b44cc52..cab93e8dc6 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1620,12 +1620,10 @@ int unit_file_enable(
STRV_FOREACH(i, files) {
UnitFileState state;
+ /* We only want to know if this unit is masked, so we ignore
+ * errors from unit_file_get_state, deferring other checks.
+ * This allows templated units to be enabled on the fly. */
state = unit_file_get_state(scope, root_dir, *i);
- if (state < 0) {
- log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
- return state;
- }
-
if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
log_error("Failed to enable unit: Unit %s is masked", *i);
return -ENOTSUP;

View File

@ -1,75 +0,0 @@
From c986f1e5ff7afaa52274ee25a7ba94bec0356d03 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 30 Oct 2014 20:53:23 +0100
Subject: [PATCH] nspawn: don't make up -1 as error code
(cherry picked from commit fddbb89c46ea5d39e52e361b390ea34a06cbb67c)
---
src/nspawn/nspawn.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index d88987a580..7e96efd425 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2931,33 +2931,30 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
}
switch (status.si_code) {
+
case CLD_EXITED:
r = status.si_status;
if (r == 0) {
if (!arg_quiet)
- log_debug("Container %s exited successfully.",
- arg_machine);
+ log_debug("Container %s exited successfully.", arg_machine);
*container = CONTAINER_TERMINATED;
- } else {
- log_error("Container %s failed with error code %i.",
- arg_machine, status.si_status);
- }
+ } else
+ log_error("Container %s failed with error code %i.", arg_machine, status.si_status);
+
break;
case CLD_KILLED:
if (status.si_status == SIGINT) {
if (!arg_quiet)
- log_info("Container %s has been shut down.",
- arg_machine);
+ log_info("Container %s has been shut down.", arg_machine);
*container = CONTAINER_TERMINATED;
r = 0;
break;
} else if (status.si_status == SIGHUP) {
if (!arg_quiet)
- log_info("Container %s is being rebooted.",
- arg_machine);
+ log_info("Container %s is being rebooted.", arg_machine);
*container = CONTAINER_REBOOTED;
r = 0;
@@ -2966,15 +2963,13 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
/* CLD_KILLED fallthrough */
case CLD_DUMPED:
- log_error("Container %s terminated by signal %s.",
- arg_machine, signal_to_string(status.si_status));
- r = -1;
+ log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status));
+ r = -EIO;
break;
default:
- log_error("Container %s failed due to unknown reason.",
- arg_machine);
- r = -1;
+ log_error("Container %s failed due to unknown reason.", arg_machine);
+ r = -EIO;
break;
}

View File

@ -1,114 +0,0 @@
From 860e33966a511e008f80bbfa23450dcc33650290 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 31 Oct 2014 16:22:36 +0100
Subject: [PATCH] units: don't order journal flushing afte remote-fs.target
Instead, only depend on the actual file systems we need.
This should solve dep loops on setups where remote-fs.target is moved
into late boot.
(cherry picked from commit 919699ec301ea507edce4a619141ed22e789ac0d)
---
src/nspawn/nspawn.c | 38 ++++++++++++++--------------------
units/systemd-journal-flush.service.in | 3 ++-
2 files changed, 18 insertions(+), 23 deletions(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7e96efd425..f332ade03e 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2911,8 +2911,8 @@ static int change_uid_gid(char **_home) {
* container argument.
* > 0 : The program executed in the container terminated with an
* error. The exit code of the program executed in the
- * container is returned. No change is made to the container
- * argument.
+ * container is returned. The container argument has been set
+ * to CONTAINER_TERMINATED.
* 0 : The container is being rebooted, has been shut down or exited
* successfully. The container argument has been set to either
* CONTAINER_TERMINATED or CONTAINER_REBOOTED.
@@ -2921,8 +2921,8 @@ static int change_uid_gid(char **_home) {
* error is indicated by a non-zero value.
*/
static int wait_for_container(pid_t pid, ContainerStatus *container) {
- int r;
siginfo_t status;
+ int r;
r = wait_for_terminate(pid, &status);
if (r < 0) {
@@ -2933,44 +2933,38 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
switch (status.si_code) {
case CLD_EXITED:
- r = status.si_status;
- if (r == 0) {
- if (!arg_quiet)
- log_debug("Container %s exited successfully.", arg_machine);
+ if (status.si_status == 0) {
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s exited successfully.", arg_machine);
- *container = CONTAINER_TERMINATED;
} else
- log_error("Container %s failed with error code %i.", arg_machine, status.si_status);
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s failed with error code %i.", arg_machine, status.si_status);
- break;
+ *container = CONTAINER_TERMINATED;
+ return status.si_status;
case CLD_KILLED:
if (status.si_status == SIGINT) {
- if (!arg_quiet)
- log_info("Container %s has been shut down.", arg_machine);
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s has been shut down.", arg_machine);
*container = CONTAINER_TERMINATED;
- r = 0;
- break;
+ return 0;
+
} else if (status.si_status == SIGHUP) {
- if (!arg_quiet)
- log_info("Container %s is being rebooted.", arg_machine);
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s is being rebooted.", arg_machine);
*container = CONTAINER_REBOOTED;
- r = 0;
- break;
+ return 0;
}
+
/* CLD_KILLED fallthrough */
case CLD_DUMPED:
log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status));
- r = -EIO;
- break;
+ return -EIO;
default:
log_error("Container %s failed due to unknown reason.", arg_machine);
- r = -EIO;
- break;
+ return -EIO;
}
return r;
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index 699670bb4e..2612220e2e 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -10,8 +10,9 @@ Description=Trigger Flushing of Journal to Persistent Storage
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Requires=systemd-journald.service
-After=systemd-journald.service local-fs.target remote-fs.target
+After=systemd-journald.service
Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
+RequiresMountsFor=/var/log/journal
[Service]
ExecStart=@rootbindir@/journalctl --flush

View File

@ -1,75 +0,0 @@
From 077f3bccf730114917c581fb9f47beb4518835bd Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Fri, 31 Oct 2014 20:37:59 +0100
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 5d20fde4a5c4dff4d7c737b545fbd13582d544c1)
---
hwdb/20-bluetooth-vendor-product.hwdb | 57 +++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index ee2efdff2e..58ca87d69d 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -1166,3 +1166,60 @@ bluetooth:v0181*
bluetooth:v0182*
ID_VENDOR_FROM_DATABASE=HOP Ubiquitous
+
+bluetooth:v0183*
+ ID_VENDOR_FROM_DATABASE=To Be Assigned
+
+bluetooth:v0184*
+ ID_VENDOR_FROM_DATABASE=Nectar
+
+bluetooth:v0185*
+ ID_VENDOR_FROM_DATABASE=bel'apps LLC
+
+bluetooth:v0186*
+ ID_VENDOR_FROM_DATABASE=CORE Lighting Ltd
+
+bluetooth:v0187*
+ ID_VENDOR_FROM_DATABASE=Seraphim Sense Ltd
+
+bluetooth:v0188*
+ ID_VENDOR_FROM_DATABASE=Unico RBC
+
+bluetooth:v0189*
+ ID_VENDOR_FROM_DATABASE=Physical Enterprises Inc.
+
+bluetooth:v018A*
+ ID_VENDOR_FROM_DATABASE=Able Trend Technology Limited
+
+bluetooth:v018B*
+ ID_VENDOR_FROM_DATABASE=Konica Minolta, Inc.
+
+bluetooth:v018C*
+ ID_VENDOR_FROM_DATABASE=Wilo SE
+
+bluetooth:v018D*
+ ID_VENDOR_FROM_DATABASE=Extron Design Services
+
+bluetooth:v018E*
+ ID_VENDOR_FROM_DATABASE=Fitbit, Inc.
+
+bluetooth:v018F*
+ ID_VENDOR_FROM_DATABASE=Fireflies Systems
+
+bluetooth:v0190*
+ ID_VENDOR_FROM_DATABASE=Intelletto Technologies Inc.
+
+bluetooth:v0191*
+ ID_VENDOR_FROM_DATABASE=FDK CORPORATION
+
+bluetooth:v0192*
+ ID_VENDOR_FROM_DATABASE=Cloudleaf, Inc
+
+bluetooth:v0193*
+ ID_VENDOR_FROM_DATABASE=Maveric Automation LLC
+
+bluetooth:v0194*
+ ID_VENDOR_FROM_DATABASE=Acoustic Stream Corporation
+
+bluetooth:v0195*
+ ID_VENDOR_FROM_DATABASE=Zuli

View File

@ -1,60 +0,0 @@
From e63854bf942d6f3364e5e69d5e7bcfd5a2ad8ec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 1 Nov 2014 11:32:44 -0400
Subject: [PATCH] libudev: modernization
This brings udev logging style a bit closer to normal systemd convention.
(cherry picked from commit fe756ed9ec2c0fa33c30b1d9a33d745dc1593aed)
---
src/libudev/libudev.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
index e2ab960d55..7803863b2e 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/libudev.c
@@ -119,7 +119,7 @@ _public_ struct udev *udev_new(void)
{
struct udev *udev;
const char *env;
- FILE *f;
+ _cleanup_free_ FILE *f = NULL;
udev = new0(struct udev, 1);
if (udev == NULL)
@@ -132,7 +132,7 @@ _public_ struct udev *udev_new(void)
f = fopen("/etc/udev/udev.conf", "re");
if (f != NULL) {
char line[UTIL_LINE_SIZE];
- int line_nr = 0;
+ unsigned line_nr = 0;
while (fgets(line, sizeof(line), f)) {
size_t len;
@@ -153,7 +153,7 @@ _public_ struct udev *udev_new(void)
/* split key/value */
val = strchr(key, '=');
if (val == NULL) {
- udev_err(udev, "missing <key>=<value> in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
+ udev_err(udev, "/etc/udev/udev.conf:%u: missing assignment, skipping line.\n", line_nr);
continue;
}
val[0] = '\0';
@@ -185,7 +185,7 @@ _public_ struct udev *udev_new(void)
/* unquote */
if (val[0] == '"' || val[0] == '\'') {
if (val[len-1] != val[0]) {
- udev_err(udev, "inconsistent quoting in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
+ udev_err(udev, "/etc/udev/udev.conf:%u: inconsistent quoting, skipping line.\n", line_nr);
continue;
}
val[len-1] = '\0';
@@ -197,7 +197,6 @@ _public_ struct udev *udev_new(void)
continue;
}
}
- fclose(f);
}
/* environment overrides config */

View File

@ -1,72 +0,0 @@
From 6c2d3f24672aaa806bbd6b4b5741e315566da35c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 1 Nov 2014 12:06:41 -0400
Subject: [PATCH] libudev: do not accept invalid log levels
Invalid log levels lead to a assert failure later on.
https://bugs.freedesktop.org/show_bug.cgi?id=85657
(cherry picked from commit ee7122c0ec6aa11f02e9e8d94254b353f12d2c14)
---
src/libudev/libudev-util.c | 10 +++++++---
src/libudev/libudev.c | 19 ++++++++++++++++---
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index f3fdf3b5aa..0bc10f3470 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -159,9 +159,13 @@ int util_log_priority(const char *priority)
char *endptr;
int prio;
- prio = strtol(priority, &endptr, 10);
- if (endptr[0] == '\0' || isspace(endptr[0]))
- return prio;
+ prio = strtoul(priority, &endptr, 10);
+ if (endptr[0] == '\0' || isspace(endptr[0])) {
+ if (prio >= 0 && prio <= 7)
+ return prio;
+ else
+ return -ERANGE;
+ }
return log_level_from_string(priority);
}
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
index 7803863b2e..8464427651 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/libudev.c
@@ -193,7 +193,13 @@ _public_ struct udev *udev_new(void)
}
if (streq(key, "udev_log")) {
- udev_set_log_priority(udev, util_log_priority(val));
+ int prio;
+
+ prio = util_log_priority(val);
+ if (prio < 0)
+ udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val);
+ else
+ udev_set_log_priority(udev, prio);
continue;
}
}
@@ -201,8 +207,15 @@ _public_ struct udev *udev_new(void)
/* environment overrides config */
env = secure_getenv("UDEV_LOG");
- if (env != NULL)
- udev_set_log_priority(udev, util_log_priority(env));
+ if (env != NULL) {
+ int prio;
+
+ prio = util_log_priority(env);
+ if (prio < 0)
+ udev_err(udev, "$UDEV_LOG specifies invalid logging level '%s', ignoring.\n", env);
+ else
+ udev_set_log_priority(udev, prio);
+ }
return udev;
}

View File

@ -1,33 +0,0 @@
From acfc0db365d38b1185ab4cb47f03c63b9aa23087 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 1 Nov 2014 14:36:29 -0400
Subject: [PATCH] man: describe all log levels in udevadm(8)
https://bugs.freedesktop.org/show_bug.cgi?id=85657
(cherry picked from commit e03234a16047dc635d13f7118fc9fcf243744b51)
---
man/udevadm.xml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/man/udevadm.xml b/man/udevadm.xml
index b85d9a9249..fd17f40be3 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -368,9 +368,14 @@
<term><option>-l</option></term>
<term><option>--log-priority=<replaceable>value</replaceable></option></term>
<listitem>
- <para>Set the internal log level of systemd-udevd. Valid values are the numerical
- syslog priorities or their textual representations: <option>err</option>,
- <option>info</option> and <option>debug</option>.</para>
+ <para>Set the internal log level of
+ <filename>systemd-udevd</filename>. Valid values are the
+ numerical syslog priorities or their textual
+ representations: <option>emerg</option>,
+ <option>alert</option>, <option>crit</option>,
+ <option>err</option>, <option>warning</option>,
+ <option>notice</option>, <option>info</option>, and
+ <option>debug</option>.</para>
</listitem>
</varlistentry>
<varlistentry>

View File

@ -1,47 +0,0 @@
From 896050eeb3acbf4106d71204a5173b4984cf1675 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Fri, 31 Oct 2014 10:16:45 +0100
Subject: [PATCH] core: improve error message when machine id is missing
(cherry picked from commit 86fb9ca7ae49790880d4b3ce523988b01b13d9ae)
---
src/core/machine-id-setup.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index efb074fcbd..ce6d8e02d0 100644
--- a/src/core/machine-id-setup.c
+++ b/src/core/machine-id-setup.c
@@ -162,7 +162,7 @@ static int generate(char id[34], const char *root) {
int machine_id_setup(const char *root) {
const char *etc_machine_id, *run_machine_id;
_cleanup_close_ int fd = -1;
- bool writable = false;
+ bool writable = true;
struct stat st;
char id[34]; /* 32 + \n + \0 */
int r;
@@ -186,12 +186,19 @@ int machine_id_setup(const char *root) {
mkdir_parents(etc_machine_id, 0755);
fd = open(etc_machine_id, O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444);
- if (fd >= 0)
- writable = true;
- else {
+ if (fd < 0) {
+ int old_errno = errno;
+
fd = open(etc_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY);
if (fd < 0) {
- log_error("Cannot open %s: %m", etc_machine_id);
+ if (old_errno == EROFS && errno == ENOENT)
+ log_error("System cannot boot: Missing /etc/machine-id and /etc is mounted read-only.\n"
+ "Booting up is supported only when:\n"
+ "1) /etc/machine-id exists and is populated.\n"
+ "2) /etc/machine-id exists and is empty.\n"
+ "3) /etc/machine-id is missing and /etc is writable.\n");
+ else
+ log_error("Cannot open %s: %m", etc_machine_id);
return -errno;
}

View File

@ -1,42 +0,0 @@
From 3169d6cf7f78ab2906b7249466d0c5721890fc7a Mon Sep 17 00:00:00 2001
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
Date: Wed, 29 Oct 2014 11:20:02 +0100
Subject: [PATCH] man: explain journalctl --flush correctly
(cherry picked from commit 2a97b03b3b087e724867e7501ae0c1535ee35031)
---
NEWS | 4 ++++
man/journalctl.xml | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index bf8d0ac242..afc73a781f 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,10 @@ CHANGES WITH 217:
show log timestamps in the UTC timezone. journalctl now also
accepts -n/--lines=all to disable line capping in a pager.
+ * journalctl gained a new switch, --flush, that flushes
+ logs from /run/log/journal to /var/log/journal if
+ persistent storage is enabled.
+
* Services can notify the manager before they start a reload
(by sending RELOADING=1) or shutdown (by sending
STOPPING=1). This allows the manager to track and show the
diff --git a/man/journalctl.xml b/man/journalctl.xml
index db2a1e142b..0ed3ca3bc8 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -883,9 +883,9 @@
<listitem><para>Asks the Journal
daemon to flush any log data stored in
- <filename>/run/systemd/log</filename>
+ <filename>/run/log/journal</filename>
into
- <filename>/var/systemd/log</filename>,
+ <filename>/var/log/journal</filename>,
if persistent storage is enabled. This
call does not return until the
operation is

View File

@ -1,45 +0,0 @@
From 309ce8c2537ae72e2c7a07b7e21bee5fd2da0960 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 1 Nov 2014 13:52:14 -0400
Subject: [PATCH] systemd-journal-flush.service: remove "trigger" from
description
This service is now synchronous, so "trigger" is misleading.
(cherry picked from commit a65b82457735df2ef58736a55846f400124a8dc0)
---
NEWS | 7 ++++---
units/systemd-journal-flush.service.in | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/NEWS b/NEWS
index afc73a781f..ac987ad5b7 100644
--- a/NEWS
+++ b/NEWS
@@ -7,9 +7,10 @@ CHANGES WITH 217:
show log timestamps in the UTC timezone. journalctl now also
accepts -n/--lines=all to disable line capping in a pager.
- * journalctl gained a new switch, --flush, that flushes
- logs from /run/log/journal to /var/log/journal if
- persistent storage is enabled.
+ * journalctl gained a new switch, --flush, that synchronously
+ flushes logs from /run/log/journal to /var/log/journal if
+ persistent storage is enabled. systemd-journal-flush.service
+ now waits until the operation is complete.
* Services can notify the manager before they start a reload
(by sending RELOADING=1) or shutdown (by sending
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index 2612220e2e..fa290897d6 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -6,7 +6,7 @@
# (at your option) any later version.
[Unit]
-Description=Trigger Flushing of Journal to Persistent Storage
+Description=Flush Journal to Persistent Storage
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Requires=systemd-journald.service

View File

@ -1,36 +0,0 @@
From b464167132f65d25364d3d22368346ab48981a4a Mon Sep 17 00:00:00 2001
From: Michael Chapman <mike@very.puzzling.org>
Date: Wed, 29 Oct 2014 11:54:07 +1100
Subject: [PATCH] kernel-install/90-loaderentry.install: fix cmdline parsing
A recent commit (2f3a215) changed the parsing of /proc/cmdline to use a
shell array. Unfortunately, this introduced a bug: "read -ar line"
populates the shell variable $r, not $line. This breaks installation of
new loader entries:
# kernel-install add 3.17.1-304.fc21.x86_64 \
/boot/vmlinuz-3.17.1-304.fc21.x86_64
Could not determine the kernel command line parameters.
Please specify the kernel command line in /etc/kernel/cmdline!
This commit alters the read command to correctly populate the $line
array instead.
(cherry picked from commit c008f6ee8df9aa36782378d1a3767543b3635a54)
---
src/kernel-install/90-loaderentry.install | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
index 6f032b5a4b..d433e00a5c 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/kernel-install/90-loaderentry.install
@@ -47,7 +47,7 @@ if [[ -f /etc/kernel/cmdline ]]; then
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
- read -ar line < /proc/cmdline
+ read -a line -r < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"

View File

@ -1,27 +0,0 @@
From 3db8a5d1b39f88981e979ff01afb4a0c7aa9a126 Mon Sep 17 00:00:00 2001
From: Joe Lawrence <joe.lawrence@stratus.com>
Date: Sat, 1 Nov 2014 12:18:08 -0400
Subject: [PATCH] scsi_id: fix usage spelling
s/threat/treat/g
(cherry picked from commit 85f13fce322e6303e7e4e55cb43104f81827f36b)
---
src/udev/scsi_id/scsi_id.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index 4d9378a5c0..48c6cf7dba 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -317,8 +317,8 @@ static void help(void) {
" -f,--config= location of config file\n"
" -p,--page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n"
" -s,--sg-version=3|4 use SGv3 or SGv4\n"
- " -b,--blacklisted threat device as blacklisted\n"
- " -g,--whitelisted threat device as whitelisted\n"
+ " -b,--blacklisted treat device as blacklisted\n"
+ " -g,--whitelisted treat device as whitelisted\n"
" -u,--replace-whitespace replace all whitespace by underscores\n"
" -v,--verbose verbose logging\n"
" --version print version\n"

View File

@ -1,28 +0,0 @@
From 5a9b149c96f39d8363e6b2dcb45e95056d2799ea Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Sat, 1 Nov 2014 15:49:53 -0400
Subject: [PATCH] libudev: Use correct free function
FILE * wants cleanup_fclose().
Spotted by udev hwdb segfaulting in gnome-continuous' buildroot
construction.
(cherry picked from commit ea55caa60c6860e33fa4f1a216c003ff666e9c68)
---
src/libudev/libudev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
index 8464427651..05f3b479fa 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/libudev.c
@@ -119,7 +119,7 @@ _public_ struct udev *udev_new(void)
{
struct udev *udev;
const char *env;
- _cleanup_free_ FILE *f = NULL;
+ _cleanup_fclose_ FILE *f = NULL;
udev = new0(struct udev, 1);
if (udev == NULL)

View File

@ -1,40 +0,0 @@
From b5404292de0a4252b4b7447ef45bf3f334cae529 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 12:10:42 -0500
Subject: [PATCH] Raise level of 'Found dependency...' lines
This way they always show up together with 'Found ordering cycle...'.
Ordering cycles are a serious error and a major pain to debug. If
quiet is enabled, only the first and the last line of output are
shown:
systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job timers.target/start
systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start
which isn't particularly enlightening. So just show the whole message
at the same level.
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
(cherry picked from commit 14fe721b5f6d8457cc8737fa75f2ed79e7fa534b)
---
src/core/transaction.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/transaction.c b/src/core/transaction.c
index dbb4133fe3..91f5ee18df 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -377,9 +377,9 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
/* logging for j not k here here to provide consistent narrative */
- log_info_unit(j->unit->id,
- "Found dependency on %s/%s",
- k->unit->id, job_type_to_string(k->type));
+ log_warning_unit(j->unit->id,
+ "Found dependency on %s/%s",
+ k->unit->id, job_type_to_string(k->type));
if (!delete && hashmap_get(tr->jobs, k->unit) &&
!unit_matters_to_anchor(k->unit, k)) {

View File

@ -1,124 +0,0 @@
From db2241b5259671c2a7435235f5fc560ba4e97077 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 12:19:38 -0500
Subject: [PATCH] manager: do not print timing when running in test mode
(cherry picked from commit 56dacdbc1ca95cef8bf8c97c0d7af761a71eaab3)
---
src/core/manager.c | 84 ++++++++++++++++++++++++++++++------------------------
1 file changed, 46 insertions(+), 38 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index d427d88d4e..ff29ae1d9d 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2584,45 +2584,13 @@ bool manager_unit_inactive_or_pending(Manager *m, const char *name) {
return unit_inactive_or_pending(u);
}
-void manager_check_finished(Manager *m) {
+static void manager_notify_finished(Manager *m) {
char userspace[FORMAT_TIMESPAN_MAX], initrd[FORMAT_TIMESPAN_MAX], kernel[FORMAT_TIMESPAN_MAX], sum[FORMAT_TIMESPAN_MAX];
usec_t firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec;
- Unit *u = NULL;
- Iterator i;
- assert(m);
-
- if (m->n_running_jobs == 0)
- m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
-
- if (hashmap_size(m->jobs) > 0) {
-
- if (m->jobs_in_progress_event_source)
- sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
-
- return;
- }
-
- manager_flip_auto_status(m, false);
-
- /* Notify Type=idle units that we are done now */
- m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
- manager_close_idle_pipe(m);
-
- /* Turn off confirm spawn now */
- m->confirm_spawn = false;
-
- /* No need to update ask password status when we're going non-interactive */
- manager_close_ask_password(m);
-
- /* This is no longer the first boot */
- manager_set_first_boot(m, false);
-
- if (dual_timestamp_is_set(&m->finish_timestamp))
+ if (m->test_run)
return;
- dual_timestamp_get(&m->finish_timestamp);
-
if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0) {
/* Note that m->kernel_usec.monotonic is always at 0,
@@ -2677,10 +2645,6 @@ void manager_check_finished(Manager *m) {
NULL);
}
- SET_FOREACH(u, m->startup_units, i)
- 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);
sd_notifyf(false,
@@ -2689,6 +2653,50 @@ void manager_check_finished(Manager *m) {
format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC));
}
+void manager_check_finished(Manager *m) {
+ Unit *u = NULL;
+ Iterator i;
+
+ assert(m);
+
+ if (m->n_running_jobs == 0)
+ m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
+
+ if (hashmap_size(m->jobs) > 0) {
+
+ if (m->jobs_in_progress_event_source)
+ sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
+
+ return;
+ }
+
+ manager_flip_auto_status(m, false);
+
+ /* Notify Type=idle units that we are done now */
+ m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
+ manager_close_idle_pipe(m);
+
+ /* Turn off confirm spawn now */
+ m->confirm_spawn = false;
+
+ /* No need to update ask password status when we're going non-interactive */
+ manager_close_ask_password(m);
+
+ /* This is no longer the first boot */
+ manager_set_first_boot(m, false);
+
+ if (dual_timestamp_is_set(&m->finish_timestamp))
+ return;
+
+ dual_timestamp_get(&m->finish_timestamp);
+
+ manager_notify_finished(m);
+
+ SET_FOREACH(u, m->startup_units, i)
+ if (u->cgroup_path)
+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
+}
+
static int create_generator_dir(Manager *m, char **generator, const char *name) {
char *p;
int r;

View File

@ -1,58 +0,0 @@
From 3c6a000d5c291f998dba2eb4c8e351f4603ca985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 11:39:17 -0500
Subject: [PATCH] unit: do not order timers.target before basic.target
Since commit 19f8d037833f2 'timer: order OnCalendar units after
timer-sync.target if DefaultDependencies=no' timers might get a
dependency on time-sync.target, which does not really belong in early
boot. If ntp is enabled, time-sync.target might be delayed until a
network connection is established.
It turns out that majority of timer units found in the wild do not
need to be started in early boot. Out of the timer units available in
Fedora 21, only systemd-readahead-done.timer and mdadm-last-resort@.timer
should be started early, but they both have DefaultDependencies=no,
so are not part of timers.target anyway. All the rest look like they
will be fine with being started a bit later (and the majority even
much later, since they run daily or weekly).
Let timers.target be pulled in by basic.target, but without the
temporal dependency. This means timer units are started on a "best
effort" schedule.
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
(cherry picked from commit 3b0217036040a6013faeab4eb9da7469e3bbcfb3)
Conflicts:
units/basic.target
---
units/basic.target | 4 +++-
units/timers.target | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/units/basic.target b/units/basic.target
index b890d48bbc..abb63ec560 100644
--- a/units/basic.target
+++ b/units/basic.target
@@ -8,6 +8,8 @@
[Unit]
Description=Basic System
Documentation=man:systemd.special(7)
+
Requires=sysinit.target
+After=sysinit.target
Wants=sockets.target timers.target paths.target slices.target
-After=sysinit.target sockets.target timers.target paths.target slices.target
+After=sockets.target paths.target slices.target
diff --git a/units/timers.target b/units/timers.target
index 07fda3d9d0..251fa68065 100644
--- a/units/timers.target
+++ b/units/timers.target
@@ -8,3 +8,6 @@
[Unit]
Description=Timers
Documentation=man:systemd.special(7)
+
+DefaultDependencies=no
+Conflicts=shutdown.target

View File

@ -1,28 +0,0 @@
From 0ce3f7e212c826162b15f8b78b18a4646b791a6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 21:45:42 -0500
Subject: [PATCH] units: order sd-journal-flush after sd-remount-fs
Otherwise we could attempt to flush the journal while /var/log/ was
still ro, and silently skip journal flushing.
The way that errors in flushing are handled should still be changed to
be more transparent and robust.
(cherry picked from commit 1f1926aa5e836caa3bd6df43704aecd606135103)
---
units/systemd-journal-flush.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index fa290897d6..98c91b4bc5 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -11,6 +11,7 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Requires=systemd-journald.service
After=systemd-journald.service
+After=systemd-remount-fs.service
Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
RequiresMountsFor=/var/log/journal

View File

@ -1,33 +0,0 @@
From 25bfe24d32faa1203d74ffb6bfbf732e10426ea3 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Tue, 4 Nov 2014 20:28:08 +0100
Subject: [PATCH] units: make systemd-journald.service Type=notify
It already calls sd_notify(), so it looks like an oversight.
Without it, its ordering to systemd-journal-flush.service is
non-deterministic and the SIGUSR1 from flushing may kill journald before
it has its signal handlers set up.
https://bugs.freedesktop.org/show_bug.cgi?id=85871
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
(cherry picked from commit a87a38c20196a4aeb56b6ba71d688eefd0b21c30)
Conflicts:
units/systemd-journald.service.in
---
units/systemd-journald.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index 4de38fad59..441d5b1f96 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -14,6 +14,7 @@ After=systemd-journald.socket systemd-journald-dev-log.socket syslog.socket
Before=sysinit.target
[Service]
+Type=notify
Sockets=systemd-journald.socket systemd-journald-dev-log.socket
ExecStart=@rootlibexecdir@/systemd-journald
Restart=always

View File

@ -1,229 +0,0 @@
From a48190c9f9b07f735d14743878955511e66206c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 6 Nov 2014 16:44:06 -0500
Subject: [PATCH] Revert "missing: remove fanotify"
This reverts commit c7e4a7bece7a5c4484d229dd5e8ff01a5d49c62e.
---
Makefile.am | 1 +
configure.ac | 1 +
src/shared/linux/fanotify.h | 98 +++++++++++++++++++++++++++++++++++++++++++++
src/shared/missing.h | 59 +++++++++++++++++++++++++++
4 files changed, 159 insertions(+)
create mode 100644 src/shared/linux/fanotify.h
diff --git a/Makefile.am b/Makefile.am
index 11a3033253..6d869c12ad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -741,6 +741,7 @@ noinst_LTLIBRARIES += \
libsystemd_shared_la_SOURCES = \
src/shared/linux/auto_dev-ioctl.h \
+ src/shared/linux/fanotify.h \
src/shared/ioprio.h \
src/shared/missing.h \
src/shared/initreq.h \
diff --git a/configure.ac b/configure.ac
index e63d3dc809..c2f8f7a548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,6 +306,7 @@ RT_LIBS="$LIBS"
AC_SUBST(RT_LIBS)
LIBS="$save_LIBS"
+AC_CHECK_FUNCS([fanotify_init fanotify_mark])
AC_CHECK_FUNCS([memfd_create])
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN],
diff --git a/src/shared/linux/fanotify.h b/src/shared/linux/fanotify.h
new file mode 100644
index 0000000000..63531a6b4d
--- /dev/null
+++ b/src/shared/linux/fanotify.h
@@ -0,0 +1,98 @@
+#ifndef _LINUX_FANOTIFY_H
+#define _LINUX_FANOTIFY_H
+
+#include <linux/types.h>
+
+/* the following events that user-space can register for */
+#define FAN_ACCESS 0x00000001 /* File was accessed */
+#define FAN_MODIFY 0x00000002 /* File was modified */
+#define FAN_CLOSE_WRITE 0x00000008 /* Unwrittable file closed */
+#define FAN_CLOSE_NOWRITE 0x00000010 /* Writtable file closed */
+#define FAN_OPEN 0x00000020 /* File was opened */
+
+#define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */
+
+/* FIXME currently Q's have no limit.... */
+#define FAN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
+
+#define FAN_OPEN_PERM 0x00010000 /* File open in perm check */
+#define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */
+
+/* helper events */
+#define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */
+
+/* flags used for fanotify_init() */
+#define FAN_CLOEXEC 0x00000001
+#define FAN_NONBLOCK 0x00000002
+
+#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK)
+
+/* flags used for fanotify_modify_mark() */
+#define FAN_MARK_ADD 0x00000001
+#define FAN_MARK_REMOVE 0x00000002
+#define FAN_MARK_DONT_FOLLOW 0x00000004
+#define FAN_MARK_ONLYDIR 0x00000008
+#define FAN_MARK_MOUNT 0x00000010
+#define FAN_MARK_IGNORED_MASK 0x00000020
+#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
+#define FAN_MARK_FLUSH 0x00000080
+
+#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
+ FAN_MARK_REMOVE |\
+ FAN_MARK_DONT_FOLLOW |\
+ FAN_MARK_ONLYDIR |\
+ FAN_MARK_MOUNT |\
+ FAN_MARK_IGNORED_MASK |\
+ FAN_MARK_IGNORED_SURV_MODIFY)
+
+/*
+ * All of the events - we build the list by hand so that we can add flags in
+ * the future and not break backward compatibility. Apps will get only the
+ * events that they originally wanted. Be sure to add new events here!
+ */
+#define FAN_ALL_EVENTS (FAN_ACCESS |\
+ FAN_MODIFY |\
+ FAN_CLOSE |\
+ FAN_OPEN)
+
+/*
+ * All events which require a permission response from userspace
+ */
+#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
+ FAN_ACCESS_PERM)
+
+#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\
+ FAN_ALL_PERM_EVENTS |\
+ FAN_Q_OVERFLOW)
+
+#define FANOTIFY_METADATA_VERSION 2
+
+struct fanotify_event_metadata {
+ __u32 event_len;
+ __u32 vers;
+ __u64 mask;
+ __s32 fd;
+ __s32 pid;
+} __attribute__ ((packed));
+
+struct fanotify_response {
+ __s32 fd;
+ __u32 response;
+} __attribute__ ((packed));
+
+/* Legit userspace responses to a _PERM event */
+#define FAN_ALLOW 0x01
+#define FAN_DENY 0x02
+
+/* Helper functions to deal with fanotify_event_metadata buffers */
+#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
+
+#define FAN_EVENT_NEXT(meta, len) ((len) -= (meta)->event_len, \
+ (struct fanotify_event_metadata*)(((char *)(meta)) + \
+ (meta)->event_len))
+
+#define FAN_EVENT_OK(meta, len) ((long)(len) >= (long)FAN_EVENT_METADATA_LEN && \
+ (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \
+ (long)(meta)->event_len <= (long)(len))
+
+#endif /* _LINUX_FANOTIFY_H */
diff --git a/src/shared/missing.h b/src/shared/missing.h
index bb4f8f23a8..c98d0273a3 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -116,6 +116,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
#endif
#ifdef __x86_64__
+# ifndef __NR_fanotify_init
+# define __NR_fanotify_init 300
+# endif
+# ifndef __NR_fanotify_mark
+# define __NR_fanotify_mark 301
+# endif
# ifndef __NR_memfd_create
# define __NR_memfd_create 319
# endif
@@ -124,16 +130,69 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
# define __NR_memfd_create 385
# endif
#elif defined _MIPS_SIM
+# if _MIPS_SIM == _MIPS_SIM_ABI32
+# ifndef __NR_fanotify_init
+# define __NR_fanotify_init 4336
+# endif
+# ifndef __NR_fanotify_mark
+# define __NR_fanotify_mark 4337
+# endif
+# elif _MIPS_SIM == _MIPS_SIM_NABI32
+# ifndef __NR_fanotify_init
+# define __NR_fanotify_init 6300
+# endif
+# ifndef __NR_fanotify_mark
+# define __NR_fanotify_mark 6301
+# endif
+# elif _MIPS_SIM == _MIPS_SIM_ABI64
+# ifndef __NR_fanotify_init
+# define __NR_fanotify_init 5295
+# endif
+# ifndef __NR_fanotify_mark
+# define __NR_fanotify_mark 5296
+# endif
+# endif
# ifndef __NR_memfd_create
# warning "__NR_memfd_create not yet defined for MIPS"
# define __NR_memfd_create 0xffffffff
# endif
#else
+# ifndef __NR_fanotify_init
+# define __NR_fanotify_init 338
+# endif
+# ifndef __NR_fanotify_mark
+# define __NR_fanotify_mark 339
+# endif
# ifndef __NR_memfd_create
# define __NR_memfd_create 356
# endif
#endif
+#ifndef HAVE_FANOTIFY_INIT
+static inline int fanotify_init(unsigned int flags, unsigned int event_f_flags) {
+ return syscall(__NR_fanotify_init, flags, event_f_flags);
+}
+#endif
+
+#ifndef HAVE_FANOTIFY_MARK
+static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64_t mask,
+ int dfd, const char *pathname) {
+#if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc__ && !defined __powerpc64__ \
+ || defined __arm__ && !defined __aarch64__
+ union {
+ uint64_t _64;
+ uint32_t _32[2];
+ } _mask;
+ _mask._64 = mask;
+
+ return syscall(__NR_fanotify_mark, fanotify_fd, flags,
+ _mask._32[0], _mask._32[1], dfd, pathname);
+#else
+ return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, pathname);
+#endif
+}
+#endif
+
#ifndef HAVE_MEMFD_CREATE
static inline int memfd_create(const char *name, unsigned int flags) {
return syscall(__NR_memfd_create, name, flags);

View File

@ -1,26 +0,0 @@
From 67ada875bc0563d97e88f77732359d01ef28a404 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 4 Nov 2014 23:45:15 +0000
Subject: [PATCH] udev: Fix parsing of udev.event-timeout kernel parameter.
(cherry picked from commit f671774f52838d35d78e62ddcb781b5b65b3373f)
---
src/udev/udevd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 2e6c71352f..193702cd28 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -994,9 +994,9 @@ static void kernel_cmdline_options(struct udev *udev) {
if (r < 0)
log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
} else if (startswith(opt, "udev.event-timeout=")) {
- r = safe_atou64(opt + 16, &arg_event_timeout_usec);
+ r = safe_atou64(opt + 19, &arg_event_timeout_usec);
if (r < 0) {
- log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
+ log_warning("Invalid udev.event-timeout ignored: %s", opt + 19);
break;
}
arg_event_timeout_usec *= USEC_PER_SEC;

View File

@ -1,48 +0,0 @@
From dc2bcafb431344448b93f92a1f6749c9afb30398 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sun, 2 Nov 2014 13:33:16 +0000
Subject: [PATCH] manager: Ensure user's systemd runtime directory exists.
This mirrors code in dbus.c when creating the private socket and
avoids error messages like:
systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory
systemd[1353]: Failed to fully start up daemon: No such file or directory
(cherry picked from commit 0c3f25e0c1f028d4da9cc5253abf0322230e6835)
---
src/core/manager.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index ff29ae1d9d..47e23ba80e 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -662,9 +662,11 @@ static int manager_setup_notify(Manager *m) {
return -errno;
}
- if (m->running_as == SYSTEMD_SYSTEM)
+ if (m->running_as == SYSTEMD_SYSTEM) {
m->notify_socket = strdup("/run/systemd/notify");
- else {
+ if (!m->notify_socket)
+ return log_oom();
+ } else {
const char *e;
e = getenv("XDG_RUNTIME_DIR");
@@ -674,9 +676,11 @@ static int manager_setup_notify(Manager *m) {
}
m->notify_socket = strappend(e, "/systemd/notify");
+ if (!m->notify_socket)
+ return log_oom();
+
+ mkdir_parents_label(m->notify_socket, 0755);
}
- if (!m->notify_socket)
- return log_oom();
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));

View File

@ -1,31 +0,0 @@
From c4b4b03e153f8449480977535eb70465b4320b12 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 5 Nov 2014 15:29:41 +0000
Subject: [PATCH] udev hwdb: Change error message regarding missing hwdb.bin
back to debug.
When used in an initramfs, it's expected that the hwdb.bin file is
not present (it makes for a very large initramfs otherwise).
While it's nice to tell the user about this, as it's not strictly
speaking an error we really shouldn't be so forceful in our
reporting.
(cherry picked from commit 8232e39e7cf32071e11b3b04839e6c98fbc81d0f)
---
src/libudev/libudev-hwdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index a1cfc0bd5a..0716072d9a 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -296,7 +296,7 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) {
}
if (!hwdb->f) {
- udev_err(udev, "hwdb.bin does not exist, please run udevadm hwdb --update");
+ udev_dbg(udev, "hwdb.bin does not exist, please run udevadm hwdb --update");
udev_hwdb_unref(hwdb);
return NULL;
}

View File

@ -1,33 +0,0 @@
From 4ce940e9a436ef9d19bd52bd9c2f7ac24d1c842c Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 6 Nov 2014 15:20:29 +0100
Subject: [PATCH] systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.
(cherry picked from commit 4a3ad39957399c4a30fc472a804e72907ecaa4f9)
---
src/systemctl/systemctl.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8481a9b20c..207a5e78dc 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6948,8 +6948,13 @@ done:
static int halt_now(enum action a) {
-/* Make sure C-A-D is handled by the kernel from this
- * point on... */
+ /* The kernel will automaticall flush ATA disks and suchlike
+ * on reboot(), but the file systems need to be synce'd
+ * explicitly in advance. */
+ sync();
+
+ /* Make sure C-A-D is handled by the kernel from this point
+ * on... */
reboot(RB_ENABLE_CAD);
switch (a) {

View File

@ -1,42 +0,0 @@
From dd5e5ef3392a83525d23aa9a523e9d187fb7faaf Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 6 Nov 2014 16:48:11 +0100
Subject: [PATCH] shared: create files even if the SELinux policy has no
context for them
The SELinux policy defines no context for some files. E.g.:
$ matchpathcon /run/lock/subsys /dev/mqueue
/run/lock/subsys <<none>>
/dev/mqueue <<none>>
We still need to be able to create them.
In this case selabel_lookup_raw() returns ENOENT. We should then skip
setfscreatecon(), but still return success.
It was broken since c34255bdb2 ("label: unify code to make directories,
symlinks").
(cherry picked from commit 2d58aa4692e9fc47911bff5d064ba3e328c35369)
---
src/shared/selinux-util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
index 1eddd17d27..6bd3bf1c80 100644
--- a/src/shared/selinux-util.c
+++ b/src/shared/selinux-util.c
@@ -332,9 +332,13 @@ int mac_selinux_create_file_prepare(const char *path, mode_t mode) {
r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
}
- if (r < 0 && errno != ENOENT)
+ /* No context specified by the policy? Proceed without setting it. */
+ if (r < 0 && errno == ENOENT)
+ return 0;
+
+ if (r < 0)
r = -errno;
- else if (r == 0) {
+ else {
r = setfscreatecon(filecon);
if (r < 0) {
log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);

View File

@ -1,67 +0,0 @@
From a59400d10830f01a5eb657d41d992df42cd8952e Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 6 Nov 2014 22:24:13 +0100
Subject: [PATCH] shutdown: fix arguments to /run/initramfs/shutdown
Our initrd interface specifies that the verb is in argv[1].
This is where systemd passes it to systemd-shutdown, but getopt
permutes argv[]. This confuses dracut's shutdown script:
Shutdown called with argument '--log-level'. Rebooting!
getopt can be convinced to not permute argv[] by having '-' as the first
character of optstring. Let's use it. This requires changing the way
non-option arguments (in our case, the verb) are processed.
This fixes a bug where the system would reboot instead of powering off.
(cherry picked from commit 4b5d8d0f22ae61ceb45a25391354ba53b43ee992)
---
src/core/shutdown.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index 20cf526ba2..03cfddc543 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -75,7 +75,9 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 1);
assert(argv);
- while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
+ /* "-" prevents getopt from permuting argv[] and moving the verb away
+ * from argv[1]. Our interface to initrd promises it'll be there. */
+ while ((c = getopt_long(argc, argv, "-", options, NULL)) >= 0)
switch (c) {
case ARG_LOG_LEVEL:
@@ -113,6 +115,13 @@ static int parse_argv(int argc, char *argv[]) {
break;
+ case '\001':
+ if (!arg_verb)
+ arg_verb = optarg;
+ else
+ log_error("Excess arguments, ignoring");
+ break;
+
case '?':
return -EINVAL;
@@ -120,15 +129,11 @@ static int parse_argv(int argc, char *argv[]) {
assert_not_reached("Unhandled option code.");
}
- if (optind >= argc) {
+ if (!arg_verb) {
log_error("Verb argument missing.");
return -EINVAL;
}
- arg_verb = argv[optind];
-
- if (optind + 1 < argc)
- log_error("Excess arguments, ignoring");
return 0;
}

View File

@ -1,45 +0,0 @@
From 3da3e6e3eb1453a9f2ddf4a1455d1ca9dfe9ec49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 19:08:06 -0500
Subject: [PATCH] Accept StartTimeout* options for compatibility
Assignments of 0/none are ignored, all others are warned about.
---
src/core/main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/core/main.c b/src/core/main.c
index d48604e673..a9ca34d8cb 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -623,6 +623,9 @@ static int config_parse_join_controllers(const char *unit,
}
static int parse_config_file(void) {
+ usec_t start_timeout_usec = 0;
+ FailureAction start_timeout_action = FAILURE_ACTION_NONE;
+ char *start_timeout_reboot_arg = NULL;
const ConfigTableItem items[] = {
{ "Manager", "LogLevel", config_parse_level2, 0, NULL },
@@ -670,6 +673,9 @@ static int parse_config_file(void) {
{ "Manager", "DefaultCPUAccounting", config_parse_bool, 0, &arg_default_cpu_accounting },
{ "Manager", "DefaultBlockIOAccounting", config_parse_bool, 0, &arg_default_blockio_accounting },
{ "Manager", "DefaultMemoryAccounting", config_parse_bool, 0, &arg_default_memory_accounting },
+ { "Manager", "StartTimeoutSec", config_parse_sec, 0, &start_timeout_usec },
+ { "Manager", "StartTimeoutAction", config_parse_failure_action, 0, &start_timeout_action },
+ { "Manager", "StartTimeoutRebootArgument",config_parse_string, 0, &start_timeout_reboot_arg },
{}
};
@@ -681,6 +687,10 @@ static int parse_config_file(void) {
config_item_table_lookup, items,
false, false, true, NULL);
+ if (start_timeout_usec != 0 || start_timeout_action != FAILURE_ACTION_NONE)
+ log_warning("StartTimeoutSec, StartTimeoutAction, StartTimeoutRebootArgument settings have\n"
+ "been replaced by JobTimeoutSec, JobTimeoutAction, JobTimeoutReboot, ignoring.");
+
return 0;
}

View File

@ -1,60 +0,0 @@
From f6ba8671d83f9fce9a00045d8fa399a1c07ba7fc Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 5 Nov 2014 08:30:52 -0500
Subject: [PATCH] login: rerun vconsole-setup when switching from vgacon to
fbcon
The initialization performed by systemd-vconsole-setup is reset
when changing console drivers (say from vgacon to fbcon), so we
need to run it in that case.
See
http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html
http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html
http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html
This commit adds a udev rule to make systemd-vconsole-setup get run when
the fbcon device becomes available.
(david: moved into new file 90-vconsole.rules instead of 71-seats.rules;
build-failures are on me, not on Ray)
---
Makefile.am | 3 +++
src/vconsole/90-vconsole.rules | 11 +++++++++++
2 files changed, 14 insertions(+)
create mode 100644 src/vconsole/90-vconsole.rules
diff --git a/Makefile.am b/Makefile.am
index 3686103..f614b86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4439,6 +4439,9 @@ rootlibexec_PROGRAMS += \
nodist_systemunit_DATA += \
units/systemd-vconsole-setup.service
+dist_udevrules_DATA += \
+ src/vconsole/90-vconsole.rules
+
SYSINIT_TARGET_WANTS += \
systemd-vconsole-setup.service
endif
diff --git a/src/vconsole/90-vconsole.rules b/src/vconsole/90-vconsole.rules
new file mode 100644
index 0000000..bf6a9ef
--- /dev/null
+++ b/src/vconsole/90-vconsole.rules
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# 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.
+
+# Kernel resets vconsole state when changing console drivers so run
+# systemd-vconsole-setup when fbcon loads
+
+ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup"
--
1.9.3

View File

@ -1,35 +0,0 @@
From 75836b9d2071aab978ee78d7d797126a18a32052 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Mon, 15 Dec 2014 10:39:00 +0100
Subject: [PATCH] systemctl: fix argument handling when invoked as
"shutdown"
---
src/systemctl/systemctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 649fb5c..4c4648f 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6926,7 +6926,7 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "HPrhkt:afFc", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "HPrhkKt:afFc", options, NULL)) >= 0)
switch (c) {
case ARG_HELP:
@@ -6967,6 +6967,8 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
case 't':
case 'a':
+ case 'f':
+ case 'F':
/* Compatibility nops */
break;
--
2.2.0

View File

@ -1,53 +0,0 @@
From e6ec314b4a905e0967b08202ebc6509753f2d518 Mon Sep 17 00:00:00 2001
From: Fedora systemd team <systemd-maint@redhat.com>
Date: Fri, 19 Dec 2014 08:06:15 +0100
Subject: [PATCH] nspawn: fix invocation of the raw clone() system call on s390
and cris
Since the order of the first and second arguments of the raw clone() system
call is reversed on s390 and cris it needs to be invoked differently.
(cherry-picked from 60e1651a31c9c0ed1caef1a63f5e3a87156b0b1e)
---
src/nspawn/nspawn.c | 6 +++---
src/shared/missing.h | 10 ++++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index f332ade..e7d36bb 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3187,9 +3187,9 @@ int main(int argc, char *argv[]) {
goto finish;
}
- pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWNS|
- (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
- (arg_private_network ? CLONE_NEWNET : 0), NULL);
+ pid = raw_clone(SIGCHLD|CLONE_NEWNS|
+ (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
+ (arg_private_network ? CLONE_NEWNET : 0), NULL);
if (pid < 0) {
if (errno == EINVAL)
log_error("clone() failed, do you have namespace support enabled in your kernel? (You need UTS, IPC, PID and NET namespacing built in): %m");
diff --git a/src/shared/missing.h b/src/shared/missing.h
index c98d027..4b4c6df 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -595,3 +595,13 @@ static inline int setns(int fd, int nstype) {
#ifndef LOOPBACK_IFINDEX
#define LOOPBACK_IFINDEX 1
#endif
+
+static inline long raw_clone(unsigned long flags, void *child_stack) {
+#if defined(__s390__) || defined(__CRIS__)
+ /* On s390 and cris the order of the first and second arguments
+ * of the raw clone() system call is reversed. */
+ return syscall(__NR_clone, child_stack, flags);
+#else
+ return syscall(__NR_clone, flags, child_stack);
+#endif
+}
--
2.2.0

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,120 +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
# https://bugzilla.redhat.com/show_bug.cgi?id=1141607
enable x2gocleansessions.service
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

View File

@ -1 +0,0 @@
disable *

View File

@ -1,45 +0,0 @@
From 3cd561fcf1d419fd6484ae831bced6c842453e6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 19:08:06 -0500
Subject: [PATCH] Accept StartTimeout* options for compatibility
Assignments of 0/none are ignored, all others are warned about.
---
src/core/main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/core/main.c b/src/core/main.c
index d48604e673..a9ca34d8cb 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -623,6 +623,9 @@ static int config_parse_join_controllers(const char *unit,
}
static int parse_config_file(void) {
+ usec_t start_timeout_usec = 0;
+ FailureAction start_timeout_action = FAILURE_ACTION_NONE;
+ char *start_timeout_reboot_arg = NULL;
const ConfigTableItem items[] = {
{ "Manager", "LogLevel", config_parse_level2, 0, NULL },
@@ -670,6 +673,9 @@ static int parse_config_file(void) {
{ "Manager", "DefaultCPUAccounting", config_parse_bool, 0, &arg_default_cpu_accounting },
{ "Manager", "DefaultBlockIOAccounting", config_parse_bool, 0, &arg_default_blockio_accounting },
{ "Manager", "DefaultMemoryAccounting", config_parse_bool, 0, &arg_default_memory_accounting },
+ { "Manager", "StartTimeoutSec", config_parse_sec, 0, &start_timeout_usec },
+ { "Manager", "StartTimeoutAction", config_parse_failure_action, 0, &start_timeout_action },
+ { "Manager", "StartTimeoutRebootArgument",config_parse_string, 0, &start_timeout_reboot_arg },
{}
};
@@ -681,6 +687,10 @@ static int parse_config_file(void) {
config_item_table_lookup, items,
false, false, true, NULL);
+ if (start_timeout_usec != 0 || start_timeout_action != FAILURE_ACTION_NONE)
+ log_warning("StartTimeoutSec, StartTimeoutAction, StartTimeoutRebootArgument settings have\n"
+ "been replaced by JobTimeoutSec, JobTimeoutAction, JobTimeoutReboot, ignoring.");
+
return 0;
}

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);
}
}

View File

@ -1,87 +0,0 @@
From 30353eb466fe1ef768dc7bc1ccc1239b97dab70c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 7 Oct 2014 01:49:10 -0400
Subject: [PATCH] fedora: add bridge sysctl configuration
Udev rule is added to load those settings when the bridge
module is loaded.
https://bugzilla.redhat.com/show_bug.cgi?id=634736
---
Makefile.am | 8 ++++++--
rules/.gitignore | 1 +
rules/99-bridge.rules.in | 9 +++++++++
sysctl.d/50-bridge.conf | 4 ++++
4 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 rules/99-bridge.rules.in
create mode 100644 sysctl.d/50-bridge.conf
diff --git a/Makefile.am b/Makefile.am
index e52db1793b..41e94575ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -445,7 +445,8 @@ CLEANFILES += \
$(nodist_zshcompletion_DATA)
dist_sysctl_DATA = \
- sysctl.d/50-default.conf
+ sysctl.d/50-default.conf \
+ sysctl.d/50-bridge.conf
dist_systemunit_DATA = \
units/graphical.target \
@@ -3281,7 +3282,8 @@ dist_udevrules_DATA += \
rules/95-udev-late.rules
nodist_udevrules_DATA += \
- rules/99-systemd.rules
+ rules/99-systemd.rules \
+ rules/99-bridge.rules
dist_udevhwdb_DATA = \
hwdb/20-pci-vendor-model.hwdb \
@@ -3306,10 +3308,12 @@ sharepkgconfig_DATA = \
EXTRA_DIST += \
rules/99-systemd.rules.in \
+ rules/99-bridge.rules.in \
src/udev/udev.pc.in
CLEANFILES += \
rules/99-systemd.rules \
+ rules/99-bridge.rules \
src/udev/udev.pc
EXTRA_DIST += \
diff --git a/rules/.gitignore b/rules/.gitignore
index 93a50ddd80..46c7f3ce91 100644
--- a/rules/.gitignore
+++ b/rules/.gitignore
@@ -1 +1,2 @@
/99-systemd.rules
+/99-bridge.rules
diff --git a/rules/99-bridge.rules.in b/rules/99-bridge.rules.in
new file mode 100644
index 0000000000..f46f96bd2e
--- /dev/null
+++ b/rules/99-bridge.rules.in
@@ -0,0 +1,9 @@
+# This file is part of systemd.
+#
+# 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.
+
+# Apply sysctl settings to bridges
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/net/bridge"
diff --git a/sysctl.d/50-bridge.conf b/sysctl.d/50-bridge.conf
new file mode 100644
index 0000000000..b586bf15fa
--- /dev/null
+++ b/sysctl.d/50-bridge.conf
@@ -0,0 +1,4 @@
+# Disable netfilter on bridges.
+net.bridge.bridge-nf-call-ip6tables = 0
+net.bridge.bridge-nf-call-iptables = 0
+net.bridge.bridge-nf-call-arptables = 0

View File

@ -1,22 +0,0 @@
From 6da80d4bbfaa3d8a2a8952995a108d6dbd6a1e3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 3 Oct 2014 21:34:14 -0400
Subject: [PATCH] fedora: disable resolv.conf symlink
---
tmpfiles.d/etc.conf.m4 | 3 ---
1 file changed, 3 deletions(-)
diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4
index f567c8d6ea..125d6e0a17 100644
--- a/tmpfiles.d/etc.conf.m4
+++ b/tmpfiles.d/etc.conf.m4
@@ -10,8 +10,5 @@
L /etc/os-release - - - - ../usr/lib/os-release
L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
L+ /etc/mtab - - - - ../proc/self/mounts
-m4_ifdef(`ENABLE_RESOLVED',
-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
-)
C /etc/nsswitch.conf - - - -
C /etc/pam.d - - - -

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 @@
e68dbff3cc19f66e341572d9fb2ffa89 systemd-217.tar.xz SHA512 (systemd-247.1.tar.gz) = 2a737afcee4409c2be073d8cb650c3465a25c101b3c3072ea6e6a0614d06e3ed7ae55c84f9ae60555915ad1480b3a13aa72fef4b9210139afe6b0d7a7629385a

143
split-files.py Normal file
View File

@ -0,0 +1,143 @@
import re, sys, os, collections
buildroot = sys.argv[1]
known_files = sys.stdin.read().splitlines()
known_files = {line.split()[-1]:line for line in known_files}
def files(root):
os.chdir(root)
todo = collections.deque(['.'])
while todo:
n = todo.pop()
files = os.scandir(n)
for file in files:
yield file
if file.is_dir() and not file.is_symlink():
todo.append(file)
o_libs = open('.file-list-libs', 'w')
o_udev = open('.file-list-udev', 'w')
o_pam = open('.file-list-pam', 'w')
o_rpm_macros = open('.file-list-rpm-macros', 'w')
o_devel = open('.file-list-devel', 'w')
o_container = open('.file-list-container', 'w')
o_networkd = open('.file-list-networkd', 'w')
o_remote = open('.file-list-remote', 'w')
o_tests = open('.file-list-tests', 'w')
o_standalone_tmpfiles = open('.file-list-standalone-tmpfiles', 'w')
o_standalone_sysusers = open('.file-list-standalone-sysusers', 'w')
o_rest = open('.file-list-rest', 'w')
for file in files(buildroot):
n = file.path[1:]
if re.match(r'''/usr/(share|include)$|
/usr/share/man(/man.|)$|
/usr/share/zsh(/site-functions|)$|
/usr/share/dbus-1$|
/usr/share/dbus-1/system.d$|
/usr/share/dbus-1/(system-|)services$|
/usr/share/polkit-1(/actions|/rules.d|)$|
/usr/share/pkgconfig$|
/usr/share/bash-completion(/completions|)$|
/usr(/lib|/lib64|/bin|/sbin|)$|
/usr/lib.*/(security|pkgconfig)$|
/usr/lib/rpm(/macros.d|)$|
/usr/lib/firewalld(/services|)$|
/usr/share/(locale|licenses|doc)| # no $
/etc(/pam\.d|/xdg|/X11|/X11/xinit|/X11.*\.d|)$|
/etc/(dnf|dnf/protected.d)$|
/usr/(src|lib/debug)| # no $
/run$|
/var(/cache|/log|/lib|/run|)$
''', n, re.X):
continue
if '/security/pam_' in n or '/man8/pam_' in n:
o = o_pam
elif '/rpm/' in n:
o = o_rpm_macros
elif '/usr/lib/systemd/tests' in n:
o = o_tests
elif re.search(r'/lib.*\.pc|/man3/|/usr/include|(?<!/libsystemd-shared-...).so$', n):
o = o_devel
elif re.search(r'''journal-(remote|gateway|upload)|
systemd-remote\.conf|
/usr/share/systemd/gatewayd|
/var/log/journal/remote
''', n, re.X):
o = o_remote
elif re.search(r'''mymachines|
machinectl|
systemd-nspawn|
import-pubring.gpg|
systemd-(machined|import|pull)|
/machine.slice|
/machines.target|
var-lib-machines.mount|
org.freedesktop.(import|machine)1
''', n, re.X):
o = o_container
elif re.search(r'''/usr/lib/systemd/network/80-|
networkd|
networkctl|
org.freedesktop.network1
''', n, re.X):
o = o_networkd
elif '.so.' in n:
o = o_libs
elif re.search(r'''udev(?!\.pc)|
hwdb|
bootctl|
sd-boot|systemd-boot\.|loader.conf|
bless-boot|
boot-system-token|
kernel-install|
vconsole|
backlight|
rfkill|
random-seed|
modules-load|
timesync|
cryptsetup|
kmod|
quota|
pstore|
sleep|suspend|hibernate|
systemd-tmpfiles-setup-dev|
network/99-default.link|
growfs|makefs|makeswap|mkswap|
fsck|
repart|
gpt-auto|
volatile-root|
verity-setup|
remount-fs|
/boot$|
/boot/efi|
/kernel/|
/kernel$|
/modprobe.d
''', n, re.X):
o = o_udev
elif n.endswith('.standalone'):
if 'tmpfiles' in n:
o = o_standalone_tmpfiles
elif 'sysusers' in n:
o = o_standalone_sysusers
else:
assert False, 'Found .standalone not belonging to known packages'
else:
o = o_rest
if n in known_files:
prefix = ' '.join(known_files[n].split()[:-1])
if prefix:
prefix += ' '
elif file.is_dir() and not file.is_symlink():
prefix = '%dir '
elif n.startswith('/etc'):
prefix = '%config(noreplace) '
else:
prefix = ''
suffix = '*' if '/man/' in n else ''
print(f'{prefix}{n}{suffix}', file=o)

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>systemd-journal-gatewayd</short>
<description>Journal Gateway Service</description>
<port protocol="tcp" port="19531"/>
</service>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>systemd-journal-remote</short>
<description>Journal Remote Sink</description>
<port protocol="tcp" port="19532"/>
</service>

View File

@ -0,0 +1,3 @@
[Unit]
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974#c17
RefuseManualStop=true

10
systemd-user Normal file
View File

@ -0,0 +1,10 @@
# This file is part of systemd.
#
# Used by systemd --user instances.
account include system-auth
session required pam_selinux.so close
session required pam_selinux.so nottys open
session required pam_loginuid.so
session include system-auth

50
systemd.rpmlintrc Normal file
View File

@ -0,0 +1,50 @@
# Just kill all warnings about README being wrong in every possible way
addFilter(r'README')
addFilter(r'missing-call-to-(chdir-with-chroot|setgroups-before-setuid)')
addFilter(r'executable-marked-as-config-file /etc/X11/xinit/xinitrc.d/50-systemd-user.sh')
addFilter(r'non-readable /etc/crypttab')
addFilter(r'non-conffile-in-etc /etc/inittab')
addFilter(r'systemd-unit-in-etc /etc/systemd/.*\.wants')
addFilter(r'dangling-relative-symlink /usr/lib/environment.d/99-environment.conf ../../../etc/environment')
addFilter(r'devel-file-in-non-devel-package /usr/share/pkgconfig/(systemd|udev).pc')
addFilter(r'non-standard-dir-perm /var/cache/private 700')
addFilter(r'non-root-group-log-file /var/log/btmp utmp')
addFilter(r'non-standard-dir-perm /var/log/private 700')
addFilter(r'non-root-group-log-file /var/log/wtmp utmp')
addFilter(r'dangerous-command-in-')
addFilter(r'summary-not-capitalized C systemd')
addFilter(r'obsolete-not-provided')
addFilter(r'postin-without-ldconfig')
addFilter(r'systemd-rpm-macros.noarch: W: only-non-binary-in-usr-lib')
addFilter(r'systemd-rpm-macros.noarch: W: no-documentation')
addFilter(r'systemd-tests\..*: W: no-documentation')
addFilter(r'systemd-tests.*: E: zero-length /usr/lib/systemd/tests/testdata/test-umount/empty.mountinfo')
addFilter(r'hardcoded-library-path in.*(firewalld|install.d|lib/systemd)')
# everybody does it this way: systemd, syslog-ng, rsyslog
addFilter(r'unversioned-explicit-provides syslog')
# systemd-machine-id-setup requires libssl
addFilter(r'explicit-lib-dependency openssl-libs')
addFilter(r'systemd.src:.*strange-permission')

File diff suppressed because it is too large Load Diff

2
sysusers.attr Normal file
View File

@ -0,0 +1,2 @@
%__sysusers_provides %{_rpmconfigdir}/sysusers.prov
%__sysusers_path ^%{_sysusersdir}/.*\\.conf$

79
sysusers.generate-pre.sh Executable file
View File

@ -0,0 +1,79 @@
#!/bin/bash
# This script turns sysuser.d files into scriptlets mandated by Fedora
# packaging guidelines. The general idea is to define users using the
# declarative syntax but to turn this into traditional scriptlets.
user() {
user="$1"
uid="$2"
desc="$3"
group="$4"
home="$5"
shell="$6"
[ "$desc" = '-' ] && desc=
[ "$home" = '-' -o "$home" = '' ] && home=/
[ "$shell" = '-' -o "$shell" = '' ] && shell=/sbin/nologin
if [ "$uid" = '-' -o "$uid" = '' ]; then
cat <<EOF
getent passwd '$user' >/dev/null || \\
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user'
EOF
else
cat <<EOF
if ! getent passwd '$user' >/dev/null ; then
if ! getent passwd '$uid' >/dev/null ; then
useradd -r -u '$uid' -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
else
useradd -r -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
fi
fi
EOF
fi
}
group() {
group="$1"
gid="$2"
if [ "$gid" = '-' ]; then
cat <<EOF
getent group '$group' >/dev/null || groupadd -r '$group'
EOF
else
cat <<EOF
getent group '$group' >/dev/null || groupadd -f -g '$gid' -r '$group'
EOF
fi
}
parse() {
while read line || [ "$line" ]; do
[ "${line:0:1}" = '#' -o "${line:0:1}" = ';' ] && continue
line="${line## *}"
[ -z "$line" ] && continue
eval arr=( $line )
case "${arr[0]}" in
('u')
group "${arr[1]}" "${arr[2]}"
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
# TODO: user:group support
;;
('g')
group "${arr[1]}" "${arr[2]}"
;;
('m')
group "${arr[2]}" "-"
user "${arr[1]}" "-" "" "${arr[2]}"
;;
esac
done
}
for fn in "$@"; do
[ -e "$fn" ] || continue
echo "# generated from $(basename $fn)"
parse < "$fn"
done

28
sysusers.prov Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
parse() {
while read line; do
[ "${line:0:1}" = '#' -o "${line:0:1}" = ';' ] && continue
line="${line## *}"
[ -z "$line" ] && continue
set -- $line
case "$1" in
('u')
echo "user($2)"
echo "group($2)"
# TODO: user:group support
;;
('g')
echo "group($2)"
;;
('m')
echo "user($2)"
echo "group($3)"
;;
esac
done
}
while read fn; do
parse < "$fn"
done

50
tests/tests-reboot.yml Normal file
View File

@ -0,0 +1,50 @@
---
- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
tasks:
# switch SELinux to permissive mode
- name: Get default kernel
command: "grubby --default-kernel"
register: default_kernel
- debug: msg="{{ default_kernel.stdout }}"
- name: Set permissive mode
command: "grubby --args=enforcing=0 --update-kernel {{ default_kernel.stdout }}"
- name: reboot
block:
- name: restart host
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
ignore_errors: true
- name: wait for host to come back
wait_for_connection:
delay: 10
timeout: 300
- name: Re-create /tmp/artifacts
command: mkdir /tmp/artifacts
- name: Gather SELinux denials since boot
shell: |
result=pass
dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail
ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log
grep -q '<no matches>' /tmp/avc.log || result=fail
echo -e "\nresults:\n- test: reboot and collect AVC\n result: $result\n logs:\n - avc.log\n\n" > /tmp/results.yml
( [ $result = "pass" ] && echo PASS test-reboot || echo FAIL test-reboot ) > /tmp/test.log
always:
- name: Pull out the artifacts
fetch:
dest: "{{ artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/avc.log
- /tmp/results.yml

111
triggers.systemd Normal file
View File

@ -0,0 +1,111 @@
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# Copyright 2015 Zbigniew Jędrzejewski-Szmek
# Copyright 2018 Neal Gompa
#
# 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/>.
# The contents of this are an example to be copied into systemd.spec.
#
# Minimum rpm version supported: 4.13.0
%transfiletriggerin -P 900900 -- /usr/lib/systemd/system /etc/systemd/system
# This script will run after any package is initially installed or
# upgraded. We care about the case where a package is initially
# installed, because other cases are covered by the *un scriptlets,
# so sometimes we will reload needlessly.
if test -d /run/systemd/system; then
%{_bindir}/systemctl daemon-reload
fi
%transfiletriggerun -- /usr/lib/systemd/system /etc/systemd/system
# On removal, we need to run daemon-reload after any units have been
# removed. %transfiletriggerpostun would be ideal, but it does not get
# executed for some reason.
# On upgrade, we need to run daemon-reload after any new unit files
# have been installed, but before %postun scripts in packages get
# executed. %transfiletriggerun gets the right list of files
# but it is invoked too early (before changes happen).
# %filetriggerpostun happens at the right time, but it fires for
# every package.
# To execute the reload at the right time, we create a state
# file in %transfiletriggerun and execute the daemon-reload in
# the first %filetriggerpostun.
if test -d "/run/systemd/system"; then
mkdir -p "%{_localstatedir}/lib/rpm-state/systemd"
touch "%{_localstatedir}/lib/rpm-state/systemd/needs-reload"
fi
%filetriggerpostun -P 1000100 -- /usr/lib/systemd/system /etc/systemd/system
if test -f "%{_localstatedir}/lib/rpm-state/systemd/needs-reload"; then
rm -rf "%{_localstatedir}/lib/rpm-state/systemd"
%{_bindir}/systemctl daemon-reload
fi
%transfiletriggerin -P 100700 -- /usr/lib/sysusers.d
# This script will process files installed in /usr/lib/sysusers.d to create
# specified users automatically. The priority is set such that it
# will run before the tmpfiles file trigger.
if test -d /run/systemd/system; then
%{_bindir}/systemd-sysusers || :
fi
%transfiletriggerin -P 100500 -- /usr/lib/tmpfiles.d
# This script will process files installed in /usr/lib/tmpfiles.d to create
# tmpfiles automatically. The priority is set such that it will run
# after the sysusers file trigger, but before any other triggers.
if test -d /run/systemd/system; then
%{_bindir}/systemd-tmpfiles --create || :
fi
%transfiletriggerin udev -- /usr/lib/udev/hwdb.d
# This script will automatically invoke hwdb update if files have been
# installed or updated in /usr/lib/udev/hwdb.d.
if test -d /run/systemd/system; then
%{_bindir}/systemd-hwdb update || :
fi
%transfiletriggerin -- /usr/lib/systemd/catalog
# This script will automatically invoke journal catalog update if files
# have been installed or updated in /usr/lib/systemd/catalog.
if test -d /run/systemd/system; then
%{_bindir}/journalctl --update-catalog || :
fi
%transfiletriggerin udev -- /usr/lib/udev/rules.d
# This script will automatically update udev with new rules if files
# have been installed or updated in /usr/lib/udev/rules.d.
if test -e /run/udev/control; then
%{_bindir}/udevadm control --reload || :
fi
%transfiletriggerin -- /usr/lib/sysctl.d
# This script will automatically apply sysctl rules if files have been
# installed or updated in /usr/lib/sysctl.d.
if test -d /run/systemd/system; then
/usr/lib/systemd/systemd-sysctl || :
fi
%transfiletriggerin -- /usr/lib/binfmt.d
# This script will automatically apply binfmt rules if files have been
# installed or updated in /usr/lib/binfmt.d.
if test -d /run/systemd/system; then
# systemd-binfmt might fail if binfmt_misc kernel module is not loaded
# during install
/usr/lib/systemd/systemd-binfmt || :
fi

View File

@ -1,58 +0,0 @@
From 3c6a000d5c291f998dba2eb4c8e351f4603ca985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Nov 2014 11:39:17 -0500
Subject: [PATCH] unit: do not order timers.target before basic.target
Since commit 19f8d037833f2 'timer: order OnCalendar units after
timer-sync.target if DefaultDependencies=no' timers might get a
dependency on time-sync.target, which does not really belong in early
boot. If ntp is enabled, time-sync.target might be delayed until a
network connection is established.
It turns out that majority of timer units found in the wild do not
need to be started in early boot. Out of the timer units available in
Fedora 21, only systemd-readahead-done.timer and mdadm-last-resort@.timer
should be started early, but they both have DefaultDependencies=no,
so are not part of timers.target anyway. All the rest look like they
will be fine with being started a bit later (and the majority even
much later, since they run daily or weekly).
Let timers.target be pulled in by basic.target, but without the
temporal dependency. This means timer units are started on a "best
effort" schedule.
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
(cherry picked from commit 3b0217036040a6013faeab4eb9da7469e3bbcfb3)
Conflicts:
units/basic.target
---
units/basic.target | 4 +++-
units/timers.target | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/units/basic.target b/units/basic.target
index b890d48bbc..abb63ec560 100644
--- a/units/basic.target
+++ b/units/basic.target
@@ -8,6 +8,8 @@
[Unit]
Description=Basic System
Documentation=man:systemd.special(7)
+
Requires=sysinit.target
+After=sysinit.target
Wants=sockets.target timers.target paths.target slices.target
-After=sysinit.target sockets.target timers.target paths.target slices.target
+After=sockets.target paths.target slices.target
diff --git a/units/timers.target b/units/timers.target
index 07fda3d9d0..251fa68065 100644
--- a/units/timers.target
+++ b/units/timers.target
@@ -8,3 +8,6 @@
[Unit]
Description=Timers
Documentation=man:systemd.special(7)
+
+DefaultDependencies=no
+Conflicts=shutdown.target

View File

@ -1,26 +0,0 @@
From fd2b2627c5fa463a9a4bf557d9e0980b727cf007 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 16 Oct 2014 19:16:00 -0500
Subject: [PATCH] units: remove /dev/log to always create symlink
When upgrading from older systemds, /dev/log would
exist and we wouldn't be able to create the symlink successfully.
https://bugzilla.redhat.com/show_bug.cgi?id=1099299
---
units/systemd-journald-dev-log.socket | 2 ++
1 file changed, 2 insertions(+)
diff --git a/units/systemd-journald-dev-log.socket b/units/systemd-journald-dev-log.socket
index ffd44bb507..0950424163 100644
--- a/units/systemd-journald-dev-log.socket
+++ b/units/systemd-journald-dev-log.socket
@@ -17,6 +17,8 @@ Before=sockets.target
IgnoreOnIsolate=yes
[Socket]
+ExecStartPre=-/bin/rm -f /dev/log
+
Service=systemd-journald.service
ListenDatagram=/run/systemd/journal/dev-log
Symlinks=/dev/log

40
use-bfq-scheduler.patch Normal file
View File

@ -0,0 +1,40 @@
From 223ea50950f97ed4e67311dfcffed7ffc27a7cd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 14 Aug 2019 15:57:42 +0200
Subject: [PATCH] udev: use bfq as the default scheduler
As requested in https://bugzilla.redhat.com/show_bug.cgi?id=1738828.
Test results are that bfq seems to behave better and more consistently on
typical hardware. The kernel does not have a configuration option to set
the default scheduler, and it currently needs to be set by userspace.
See the bug for more discussion and links.
---
rules.d/60-block-scheduler.rules | 5 +++++
rules.d/meson.build | 1 +
2 files changed, 6 insertions(+)
create mode 100644 rules.d/60-block-scheduler.rules
diff --git a/rules.d/60-block-scheduler.rules b/rules.d/60-block-scheduler.rules
new file mode 100644
index 0000000000..480b941761
--- /dev/null
+++ b/rules.d/60-block-scheduler.rules
@@ -0,0 +1,5 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="add", SUBSYSTEM=="block", \
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
+ ATTR{queue/scheduler}="bfq"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index ca4445d774..38d6aa6970 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -3,6 +3,7 @@
rules = files('''
60-autosuspend.rules
60-block.rules
+ 60-block-scheduler.rules
60-cdrom_id.rules
60-drm.rules
60-evdev.rules

View File

@ -1 +1,2 @@
systemd systemd
systemd-udev