Compare commits

...

33 Commits

Author SHA1 Message Date
David Abdurachmanov bafbe7491b
Fix riscv seccomp patch
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-06-10 16:33:26 +03:00
David Abdurachmanov a056577af6
Rebase riscv seccomp patch
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-06-10 16:01:09 +03:00
David Abdurachmanov 4b1c1c812f
Enable seccomp
This was originally disabled because one of our boards in Koji infra
didn't support seccomp. The board is removed from the infra.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-06-10 14:35:32 +03:00
David Abdurachmanov fd93247403
Merge remote-tracking branch 'up/f33' into f33-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-06-10 14:33:23 +03:00
Zbigniew Jędrzejewski-Szmek 1bcc94fae9 Version 246.15 2021-07-20 18:41:32 +02:00
Zbigniew Jędrzejewski-Szmek 823c295af0 Version 246.14 2021-05-15 22:28:21 +02:00
Zbigniew Jędrzejewski-Szmek f5c76bb664 Make sure not to lose systemd-networkd enablement when upgrading from F32 2021-05-15 21:34:00 +02:00
Zbigniew Jędrzejewski-Szmek 2299ee202a Version 246.13 2021-03-24 12:05:22 +01:00
Zbigniew Jędrzejewski-Szmek 6aa7553053 Add forgotten entry in changelog 2021-03-24 08:51:01 +01:00
Zbigniew Jędrzejewski-Szmek 90382542b5 Version 246.12 2021-03-23 10:19:26 +01:00
Zbigniew Jędrzejewski-Szmek e6a21d2052 Upload sources 2021-03-12 19:46:39 +01:00
Zbigniew Jędrzejewski-Szmek c546bbbc2d Version 246.11 2021-03-12 18:42:39 +01:00
Zbigniew Jędrzejewski-Szmek 30c6162c54 Version 246.10 2021-02-02 18:37:21 +01:00
Owen W. Taylor 779685bf4b Fix nss-resolve to properly fallback in a Flatpak sandbox
For unknown reasons, sd-bus has trouble connecting to the filtered
D-Bus system proxy exported by Flatpak and the connection to the
bus is closed during authentication. Don't mistake this for a remote
error - that was causing a hard failure rather than a fallback.
2021-01-05 00:24:40 -05:00
Zbigniew Jędrzejewski-Szmek b24ba6cad7 Fix bfq patch again
https://bugzilla.redhat.com/show_bug.cgi?id=1813219#c3
2021-01-02 15:10:58 +01:00
Zbigniew Jędrzejewski-Szmek b0eed6b094 Version 246.8 2020-12-16 16:30:12 +01:00
Zbigniew Jędrzejewski-Szmek 8d0eb549df Revert the fallback hostname revert
Sadly, this does not work.

It seems NM queries resolved for the local IP address and gets "linux"
and sets that as the transient hostname. Resolved has a "fallback hostname"
(that will now again be "fedora"), but it also has a fallback fallback hostname
that is "linux" that it used in reverse dns queries and such. NM gets
the "linux" name and tells hostnamed to use that as the transient hostname.
I don't think this is an improvement, since "linux" is a problematic
as "fedora". So let's revert this for now to avoid pointless churn,
until we figure out a real solution.
2020-12-08 20:13:08 +01:00
Zbigniew Jędrzejewski-Szmek 0734f6bacd Restore "localhost" as the fallback hostname 2020-12-08 18:54:58 +01:00
Zbigniew Jędrzejewski-Szmek 0c781e3fb3 Version 246.7 2020-12-08 18:47:55 +01:00
Zbigniew Jędrzejewski-Szmek bb07b579b9 Move container networkd config to -networkd subpackage
-container subpackage is for container *management*. Those files are
used *in* the container.

(cherry picked from commit 9bf9a317b6)
2020-12-08 18:30:19 +01:00
Zbigniew Jędrzejewski-Szmek 22dd111420 Pull in perl for tests
(cherry picked from commit 39bdda8d19)
2020-12-08 18:30:05 +01:00
Zbigniew Jędrzejewski-Szmek 0e4b90f113 Stop creating resolv.conf symlink in more circumstances
(cherry picked from commit 5bf2aac8b4)
2020-12-08 18:29:58 +01:00
Zbigniew Jędrzejewski-Szmek ede219f77b Use normal scriptlets for systemd-networkd
(cherry picked from commit b6a8363c43)
2020-12-08 18:29:24 +01:00
Robert Scheck 3dbcab83bf Harmonize networkd description/summary with other sub-packages
(cherry picked from commit 5acb5c4c08)
2020-12-08 18:29:14 +01:00
Zbigniew Jędrzejewski-Szmek 12233f3769 Do not touch resolv.conf if it is a mountpoint
https://bugzilla.redhat.com/show_bug.cgi?id=1885101
(cherry picked from commit 96b7895b99)
2020-12-08 18:29:08 +01:00
Zbigniew Jędrzejewski-Szmek ed795fb1fc 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).

(cherry picked from commit 14b2fafb36)
2020-12-08 18:29:01 +01:00
David Abdurachmanov c50883d629
Add support for riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-12-04 14:00:35 +02:00
Zbigniew Jędrzejewski-Szmek 6168715468 Merge branch 'master' into f33 2020-10-01 16:19:42 +02:00
Zbigniew Jędrzejewski-Szmek d3d43af8ad 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:54 +02:00
Zbigniew Jędrzejewski-Szmek f3f602da25 Upgrades: only replace NM /etc/resolv.conf if NM is enabled 2020-09-29 18:32:09 +02:00
Zbigniew Jędrzejewski-Szmek 3417440344 New version of patch 2020-09-14 21:16:32 +02:00
Zbigniew Jędrzejewski-Szmek a896a747c3 Apply patches to make test-path pass 2020-09-14 17:59:27 +02:00
Zbigniew Jędrzejewski-Szmek b98737cec4 Force creation of /etc/resolv.conf symlink during installation
https://bugzilla.redhat.com/show_bug.cgi?id=1873856#c14
2020-09-13 11:04:30 +02:00
6 changed files with 364 additions and 117 deletions

View File

@ -0,0 +1,250 @@
From 5231b108f5d5924381e58182f8fd2592d1077caf Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <davidlt@rivosinc.com>
Date: Fri, 10 Jun 2022 15:58:34 +0300
Subject: [PATCH] Add riscv SECCOMP support
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index fc79870..e4daadc 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -81,6 +81,8 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old)
# define __NR_memfd_create 356
# elif defined __arc__
# define __NR_memfd_create 279
+# elif defined __riscv
+# define __NR_memfd_create 279
# else
# warning "__NR_memfd_create unknown for your architecture"
# endif
@@ -134,6 +136,8 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
# endif
# elif defined(__arc__)
# define __NR_getrandom 278
+# elif defined(__riscv)
+# define __NR_getrandom 278
# else
# warning "__NR_getrandom unknown for your architecture"
# endif
@@ -179,6 +183,8 @@ static inline pid_t missing_gettid(void) {
# define __NR_name_to_handle_at 345
# elif defined(__arc__)
# define __NR_name_to_handle_at 264
+# elif defined(__riscv)
+# define __NR_name_to_handle_at 264
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(339)
@@ -224,6 +230,8 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil
# define __NR_setns 346
# elif defined(__arc__)
# define __NR_setns 268
+# elif defined(__riscv)
+# define __NR_setns 268
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_setns systemd_SC_arch_bias(344)
@@ -291,6 +299,8 @@ static inline pid_t raw_getpid(void) {
# define __NR_renameat2 347
# elif defined __arc__
# define __NR_renameat2 276
+# elif defined __riscv
+# define __NR_renameat2 276
# else
# warning "__NR_renameat2 unknown for your architecture"
# endif
@@ -382,6 +392,8 @@ static inline key_serial_t missing_request_key(const char *type, const char *des
# define __NR_copy_file_range 379
# elif defined __arc__
# define __NR_copy_file_range 285
+# elif defined __riscv
+# define __NR_copy_file_range 285
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_copy_file_range systemd_SC_arch_bias(360)
@@ -432,6 +444,8 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
# define __NR_bpf 351
# elif defined __tilegx__
# define __NR_bpf 280
+# elif defined __riscv
+# define __NR_bpf 280
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_bpf systemd_SC_arch_bias(355)
@@ -479,6 +493,8 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
# define __NR_pkey_mprotect 386
# elif defined __s390__
# define __NR_pkey_mprotect 384
+# elif defined __riscv
+# define __NR_pkey_mprotect 288
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define __NR_pkey_mprotect 4363
@@ -489,6 +505,8 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
# if _MIPS_SIM == _MIPS_SIM_ABI64
# define __NR_pkey_mprotect 5323
# endif
+# elif defined __riscv
+# define __NR_pkey_mprotect 288
# else
# warning "__NR_pkey_mprotect not defined for your architecture"
# endif
@@ -513,6 +531,8 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
# define __NR_statx 383
# elif defined __sparc__
# define __NR_statx 360
+# elif defined __riscv
+# define __NR_statx 291
# elif defined __x86_64__
# define __NR_statx systemd_SC_arch_bias(332)
# elif defined _MIPS_SIM
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 35acc73..6da76d5 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -84,7 +84,7 @@ static int detect_vm_cpuid(void) {
}
static int detect_vm_device_tree(void) {
-#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__riscv)
_cleanup_free_ char *hvtype = NULL;
int r;
@@ -134,7 +134,7 @@ static int detect_vm_device_tree(void) {
}
static int detect_vm_dmi(void) {
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
static const char *const dmi_vendors[] = {
"/sys/class/dmi/id/product_name", /* Test this before sys_vendor to detect KVM over QEMU */
diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c
index 3f91b75..ab61915 100644
--- a/src/shared/seccomp-util.c
+++ b/src/shared/seccomp-util.c
@@ -90,6 +90,8 @@ const uint32_t seccomp_local_archs[] = {
SCMP_ARCH_S390X, /* native */
#elif defined(__s390__)
SCMP_ARCH_S390,
+#elif defined(__riscv) && __riscv_xlen == 64
+ SCMP_ARCH_RISCV64, /* native */
#endif
(uint32_t) -1
};
@@ -135,6 +137,8 @@ const char* seccomp_arch_to_string(uint32_t c) {
return "s390";
case SCMP_ARCH_S390X:
return "s390x";
+ case SCMP_ARCH_RISCV64:
+ return "riscv64";
default:
return NULL;
}
@@ -180,6 +184,8 @@ int seccomp_arch_from_string(const char *n, uint32_t *ret) {
*ret = SCMP_ARCH_S390;
else if (streq(n, "s390x"))
*ret = SCMP_ARCH_S390X;
+ else if (streq(n, "riscv64"))
+ *ret = SCMP_ARCH_RISCV64;
else
return -EINVAL;
@@ -1339,6 +1345,7 @@ int seccomp_restrict_address_families(Set *address_families, bool allow_list) {
case SCMP_ARCH_MIPS64N32:
case SCMP_ARCH_MIPSEL64:
case SCMP_ARCH_MIPS64:
+ case SCMP_ARCH_RISCV64:
/* These we know we support (i.e. are the ones that do not use socketcall()) */
supported = true;
break;
@@ -1579,7 +1586,7 @@ static int add_seccomp_syscall_filter(scmp_filter_ctx seccomp,
}
/* For known architectures, check that syscalls are indeed defined or not. */
-#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
assert_cc(SCMP_SYS(shmget) > 0);
assert_cc(SCMP_SYS(shmat) > 0);
assert_cc(SCMP_SYS(shmdt) > 0);
@@ -1624,13 +1631,14 @@ int seccomp_memory_deny_write_execute(void) {
case SCMP_ARCH_X86_64:
case SCMP_ARCH_X32:
case SCMP_ARCH_AARCH64:
- filter_syscall = SCMP_SYS(mmap); /* amd64, x32 and arm64 have only mmap */
+ case SCMP_ARCH_RISCV64:
+ filter_syscall = SCMP_SYS(mmap); /* amd64, x32. arm64 and riscv64 have only mmap */
shmat_syscall = SCMP_SYS(shmat);
break;
/* Please add more definitions here, if you port systemd to other architectures! */
-#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__powerpc64__) && !defined(__arm__) && !defined(__aarch64__) && !defined(__s390__) && !defined(__s390x__)
+#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__powerpc64__) && !defined(__arm__) && !defined(__aarch64__) && !defined(__s390__) && !defined(__s390x__) && !defined(__riscv)
#warning "Consider adding the right mmap() syscall definitions here!"
#endif
}
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 9ca0620..e673ea9 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -277,6 +277,9 @@ static void test_exec_personality(Manager *m) {
#elif defined(__aarch64__)
test(__func__, m, "exec-personality-aarch64.service", 0, CLD_EXITED);
+#elif defined(__riscv__) && __riscv_xlen == 64
+ test(__func__, m, "exec-personality-riscv64.service", 0, CLD_EXITED);
+
#elif defined(__i386__)
test(__func__, m, "exec-personality-x86.service", 0, CLD_EXITED);
#else
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
index b685c2d..8647656 100644
--- a/src/test/test-seccomp.c
+++ b/src/test/test-seccomp.c
@@ -74,7 +74,8 @@ static void test_architecture_table(void) {
"ppc64\0"
"ppc64-le\0"
"s390\0"
- "s390x\0") {
+ "s390x\0"
+ "riscv64\0") {
uint32_t c;
assert_se(seccomp_arch_from_string(n, &c) >= 0);
@@ -538,7 +539,7 @@ static void test_memory_deny_write_execute_mmap(void) {
assert_se(seccomp_memory_deny_write_execute() >= 0);
p = mmap(NULL, page_size(), PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1,0);
-#if defined(__x86_64__) || defined(__i386__) || defined(__powerpc64__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__powerpc64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
assert_se(p == MAP_FAILED);
assert_se(errno == EPERM);
#endif
@@ -602,7 +603,7 @@ static void test_memory_deny_write_execute_shmat(void) {
p = shmat(shmid, NULL, SHM_EXEC);
log_debug_errno(p == MAP_FAILED ? errno : 0, "shmat(SHM_EXEC): %m");
-#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
assert_se(p == MAP_FAILED);
assert_se(errno == EPERM);
#endif
diff --git a/test/test-execute/exec-personality-riscv64.service b/test/test-execute/exec-personality-riscv64.service
new file mode 100644
index 0000000..ab20396
--- /dev/null
+++ b/test/test-execute/exec-personality-riscv64.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Test for Personality=riscv64
+
+[Service]
+ExecStart=/bin/sh -c 'echo $(uname -m); exit $(test $(uname -m) = "riscv64")'
+Type=oneshot
+Personality=riscv64
--
2.35.1

View File

@ -1,94 +0,0 @@
From 1a83d7234e374e991235f4ef21c56998f93cb875 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 08:58:54 +0200
Subject: [PATCH 4/4] test-path: use Type=exec
In general, Type=exec is superior to Type=simple. Let's not assume that
the service is started before it was really started.
---
test/test-path/path-changed.service | 2 +-
test/test-path/path-directorynotempty.service | 2 +-
test/test-path/path-exists.service | 2 +-
test/test-path/path-existsglob.service | 2 +-
test/test-path/path-makedirectory.service | 2 +-
test/test-path/path-modified.service | 2 +-
test/test-path/path-mycustomunit.service | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/test-path/path-changed.service b/test/test-path/path-changed.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-changed.service
+++ b/test/test-path/path-changed.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-directorynotempty.service b/test/test-path/path-directorynotempty.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-directorynotempty.service
+++ b/test/test-path/path-directorynotempty.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-exists.service b/test/test-path/path-exists.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-exists.service
+++ b/test/test-path/path-exists.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-existsglob.service b/test/test-path/path-existsglob.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-existsglob.service
+++ b/test/test-path/path-existsglob.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-makedirectory.service b/test/test-path/path-makedirectory.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-makedirectory.service
+++ b/test/test-path/path-makedirectory.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-modified.service b/test/test-path/path-modified.service
index fb465d76bb..b75552df4f 100644
--- a/test/test-path/path-modified.service
+++ b/test/test-path/path-modified.service
@@ -3,5 +3,5 @@ Description=Service Test for Path units
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true
diff --git a/test/test-path/path-mycustomunit.service b/test/test-path/path-mycustomunit.service
index bcdafe4f30..8fbc40d13f 100644
--- a/test/test-path/path-mycustomunit.service
+++ b/test/test-path/path-mycustomunit.service
@@ -3,5 +3,5 @@ Description=Service Test Path Unit
[Service]
ExecStart=/bin/true
-Type=simple
+Type=exec
RemainAfterExit=true

View File

@ -1 +1 @@
SHA512 (systemd-246.6.tar.gz) = 1936b291d9831cf61f800fe718a4c2c2fe9b2a11fd817fe32bd48da2087a675dfc91013209a3478ea52e8ada593300ed906e248b8081dcf9141bf1cc17483ea9
SHA512 (systemd-246.15.tar.gz) = 71c8afb9de149b9f4b2f63c7a84e2ce2d897e90570692eaa75d8c99c345ad6cfc9717f93844ff1f582f65b7bdbb1166de1d4574cf6f4329edda8920a6c6bf536

View File

@ -72,12 +72,10 @@ for file in files(buildroot):
/machine.slice|
/machines.target|
var-lib-machines.mount|
network/80-container|
network/80-vm|
org.freedesktop.(import|machine)1
''', n, re.X):
o = o_container
elif re.search(r'''/usr/lib/systemd/network/..-wifi|
elif re.search(r'''/usr/lib/systemd/network/80-|
networkd|
networkctl|
org.freedesktop.network1

View File

@ -20,8 +20,8 @@
Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd
Version: 246.6
Release: 3%{?dist}
Version: 246.15
Release: 1.0.riscv64%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: System and Service Manager
@ -74,13 +74,14 @@ Patch0001: use-bfq-scheduler.patch
Patch0002: 0001-Revert-test-path-increase-timeout.patch
Patch0003: 0002-test-path-more-debugging-information.patch
Patch0004: 0003-test-path-do-not-fail-the-test-if-we-fail-to-start-s.patch
Patch0005: 0004-test-path-use-Type-exec.patch
Patch0006: 0001-test-acl-util-output-more-debug-info.patch
Patch0007: 0001-Do-not-assert-in-test_add_acls_for_user.patch
Patch0009: https://github.com/systemd/systemd/pull/17050/commits/f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
Patch0040: 0001-Add-riscv-SECCOMP-support.patch
%ifarch %{ix86} x86_64 aarch64
%global have_gnu_efi 1
%endif
@ -140,8 +141,12 @@ BuildRequires: libseccomp-devel
BuildRequires: meson >= 0.43
BuildRequires: gettext
# We use RUNNING_ON_VALGRIND in tests, so the headers need to be available
%ifarch %{valgrind_arches}
BuildRequires: valgrind-devel
%endif
BuildRequires: pkgconfig(bash-completion)
BuildRequires: perl
BuildRequires: perl(IPC::SysV)
Requires(post): coreutils
Requires(post): sed
@ -319,17 +324,16 @@ This package contains systemd-journal-gatewayd,
systemd-journal-remote, and systemd-journal-upload.
%package networkd
Summary: A system service that manages network configurations
Summary: System daemon that manages network configurations
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
# https://src.fedoraproject.org/rpms/systemd/pull-request/34
Obsoletes: systemd < 246.6-2
%description networkd
%{summary}.
It detects and configures network devices as they appear,
as well as creating virtual network devices.
systemd-networkd is a system service that manages networks. It detects
and configures network devices as they appear, as well as creating virtual
network devices.
%package tests
Summary: Internal unit tests for systemd
@ -369,6 +373,7 @@ CONFIGURE_OPTS=(
-Dsysvinit-path=/etc/rc.d/init.d
-Drc-local=/etc/rc.d/rc.local
-Dntp-servers='0.%{ntpvendor}.pool.ntp.org 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 3.%{ntpvendor}.pool.ntp.org'
-Ddns-servers=
-Duser-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
-Dservice-watchdog=
-Ddev-kvm-mode=0666
@ -602,9 +607,6 @@ getent group systemd-journal &>/dev/null || groupadd -r -g 190 systemd-journal 2
getent group systemd-coredump &>/dev/null || groupadd -r systemd-coredump 2>&1 || :
getent passwd systemd-coredump &>/dev/null || useradd -r -l -g systemd-coredump -d / -s /sbin/nologin -c "systemd Core Dumper" systemd-coredump &>/dev/null || :
getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2>&1 || :
getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || :
getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1 || :
getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null || :
@ -665,7 +667,17 @@ systemctl --global preset-all &>/dev/null || :
# too before NetworkManager gets a chance. (systemd-tmpfiles invocation above
# does not do this, because it's marked with ! and we don't specify --boot.)
# https://bugzilla.redhat.com/show_bug.cgi?id=1873856
if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
#
# If systemd is not running, don't overwrite the symlink because that
# will immediately break DNS resolution, since systemd-resolved is
# also not running (https://bugzilla.redhat.com/show_bug.cgi?id=1891847).
#
# Also don't creat the symlink to the stub when the stub is disabled (#1891847 again).
if test -d /run/systemd/system/ &&
systemctl -q is-enabled systemd-resolved.service &>/dev/null &&
! mountpoint /etc/resolv.conf &>/dev/null &&
! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null | \
grep -qE '^DNSStubListener\s*=\s*([nN][oO]?|[fF]|[fF][aA][lL][sS][eE]|0|[oO][fF][fF])$'; then
ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
fi
@ -689,6 +701,7 @@ systemctl --no-reload preset systemd-resolved.service &>/dev/null || :
if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
systemctl -q is-enabled NetworkManager.service 2>/dev/null && \
! test -L /etc/resolv.conf 2>/dev/null && \
! mountpoint /etc/resolv.conf &>/dev/null && \
grep -q 'Generated by NetworkManager' /etc/resolv.conf 2>/dev/null && \
echo -e '/etc/resolv.conf was generated by NetworkManager.\nRemoving it to let systemd-resolved manage this file.' && \
mv -v /etc/resolv.conf /etc/resolv.conf.orig-with-nm && \
@ -813,14 +826,29 @@ fi
%systemd_postun_with_restart systemd-journal-upload.service
%firewalld_reload
%preun networkd
if [ $1 -eq 0 ] ; then
systemctl disable --quiet \
systemd-networkd.service \
systemd-networkd-wait-online.service \
>/dev/null || :
%pre networkd
getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2>&1 || :
getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || :
%post networkd
# systemd-networkd was split out in systemd-246.6-2.
# Ideally, we would have a trigger scriptlet to record enablement
# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS,
# rpm doesn't allow us to trigger on another package, short of
# querying the rpm database ourselves, which seems risky. For rpm,
# systemd and systemd-networkd are completely unrelated. So let's use
# a hack to detect if an old systemd version is currently present in
# the file system.
# https://bugzilla.redhat.com/show_bug.cgi?id=1943263
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then
echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd."
else
%systemd_post systemd-networkd.service systemd-networkd-wait-online.service
fi
%preun networkd
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
%global _docdir_fmt %{name}
%files -f %{name}.lang -f .file-list-rest
@ -868,6 +896,68 @@ fi
%files standalone-sysusers -f .file-list-standalone-sysusers
%changelog
* Fri Jun 10 2022 David Abdurachmanov <davidlt@rivosinc.com> - 246.15-1.0.riscv64
- Add SECCOMP support for RISC-V 64-bit (riscv64)
* Tue Jul 20 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.15-1
- Various correctness and potential crash fixes (systemd-journald,
udev, systemctl, systemd, systemd-tmpfiles, systemd-resolved)
- Better handling of very long sysfs paths
- Compilation fixes for updated glibc and kernel headers
- Addition of new syscalls to seccomp filters
- Latvian and Spanish/Dvorak keyboard mappings
- Shell completion fixes
- Ignore FORCERENEW DHCP messages in systemd-networkd (TALOS-2020-1142,
CVE-2020-13529, #1959398)
- by-uuid symlinks for ubifs volumes are now created
- CVE-2021-33910, #1984020: an unchecked stack allocation could be used to
crash systemd and cause the system to reboot by creating a very long
fuse mountpoint path.
* Sat May 15 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.14-1
- Do not preset systemd-networkd.service and systemd-networkd-wait-online.service
on upgrades from before systemd-networkd was split out (#1943263)
- A bunch of patches for systemd-resolved (#1944171, #1949670)
- Fix for systemd-tmpfiles (#1944468)
- Various fixes for systemd, systemd-run, systemd-networkd, bootctl,
the shutdown sequence, documentation, logging, libsystemd, and shell
completions.
* Wed Mar 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.13-1
- Revert patch that seems to cause problems with dns resolution
- A few minor fixes
* Tue Mar 23 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.12-1
- Latest bugfix release (#1941335, some documentation and
minor memory-access-correctness fixes).
- Fix hang when processing timers during DST switch in Europe/Dublin timezone (#1941335)
* Fri Mar 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.11-1
- Latest bugfix release (#1933137, #1935084).
* Tue Feb 2 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.10-1
- Latest bugfix release (#1903106, #1895937).
- Fixes #1813219.
* Mon Jan 4 2021 Owen Taylor <otaylor@redhat.com> - 246.9-3
- Fix nss-resolve to properly fallback in a Flatpak sandbox
* Sat Jan 2 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.9-2
- Fix bfq patch again (#1813219)
* Wed Dec 16 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.9-1
- Minor stable release
* Tue Dec 8 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.7-2
- Rebuild with fallback hostname change reverted.
* Tue Dec 8 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.7-1
- Update to latest stable release. Unfortunately this contains
a fairly large number of patches for a stable release (180+).
Fixes rhbz#1879216, rhbz#1890632, rhbz#1891847, rhbz#1885101.
- Unset fallback-hostname as plenty of applications expected localhost
to mean "default hostname" without ever standardising it (#1892235)
* Wed Sep 30 2020 Dusty Mabe <dusty@dustymabe.com> - 246.6-3
- Try to make files in subpackages (especially the networkd subpackage)
more appropriate.
@ -889,6 +979,8 @@ fi
- Update to latest stable release (a bunch of small network-related
fixes in systemd-networkd and socket handling, documentation updates,
a bunch of fixes for error handling).
* Sun Sep 13 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.4-2
- Also remove existing file when creating /etc/resolv.conf symlink
upon installation (#1873856 again)

View File

@ -20,11 +20,12 @@ new file mode 100644
index 0000000000..480b941761
--- /dev/null
+++ b/rules.d/60-block-scheduler.rules
@@ -0,0 +1,5 @@
@@ -0,0 +1,6 @@
+# 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*", \
+ ENV{DEVTYPE}=="disk", \
+ ATTR{queue/scheduler}="bfq"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index ca4445d774..38d6aa6970 100644