forked from pool/systemd
Accepting request 1038709 from Base:System
- Import commit e7e931b07edd786dc6ca1dae6c23ff7b785f8efd (merge of v252.2)
For a complete list of changes, visit:
64dc546913...e7e931b07e
- Rebase 6000-Revert-tmpfiles-whenever-creating-an-inode-immediate.patch
OBS-URL: https://build.opensuse.org/request/show/1038709
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=372
This commit is contained in:
parent
2eea2ae3cc
commit
52490fab54
@ -1,4 +1,4 @@
|
|||||||
From 9420aaad2680981323b0786c479b14891444f5cb Mon Sep 17 00:00:00 2001
|
From 3aabdad41fecf8004a1e0e4ca4bfc7b2f935404c Mon Sep 17 00:00:00 2001
|
||||||
From: Franck Bui <fbui@suse.com>
|
From: Franck Bui <fbui@suse.com>
|
||||||
Date: Tue, 22 Nov 2022 14:45:56 +0100
|
Date: Tue, 22 Nov 2022 14:45:56 +0100
|
||||||
Subject: [PATCH 6000/6000] Revert "tmpfiles: whenever creating an inode,
|
Subject: [PATCH 6000/6000] Revert "tmpfiles: whenever creating an inode,
|
||||||
@ -10,7 +10,7 @@ This reverts commit 8f6fb95cd069884f4ce0a24eb20efc821ae3bc5e.
|
|||||||
1 file changed, 118 insertions(+), 165 deletions(-)
|
1 file changed, 118 insertions(+), 165 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
|
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
|
||||||
index 784b895577..2c44856c3a 100644
|
index 18bb75715b..9c2740f6ce 100644
|
||||||
--- a/src/tmpfiles/tmpfiles.c
|
--- a/src/tmpfiles/tmpfiles.c
|
||||||
+++ b/src/tmpfiles/tmpfiles.c
|
+++ b/src/tmpfiles/tmpfiles.c
|
||||||
@@ -31,7 +31,6 @@
|
@@ -31,7 +31,6 @@
|
||||||
@ -21,7 +21,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
#include "escape.h"
|
#include "escape.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
@@ -1515,9 +1514,11 @@ static int create_file(Item *i, const char *path) {
|
@@ -1527,9 +1526,11 @@ static int create_file(Item *i, const char *path) {
|
||||||
st = &stbuf;
|
st = &stbuf;
|
||||||
creation = CREATION_EXISTING;
|
creation = CREATION_EXISTING;
|
||||||
} else {
|
} else {
|
||||||
@ -36,7 +36,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
|
|
||||||
creation = CREATION_NORMAL;
|
creation = CREATION_NORMAL;
|
||||||
}
|
}
|
||||||
@@ -1617,7 +1618,6 @@ static int truncate_file(Item *i, const char *path) {
|
@@ -1629,7 +1630,6 @@ static int truncate_file(Item *i, const char *path) {
|
||||||
static int copy_files(Item *i) {
|
static int copy_files(Item *i) {
|
||||||
_cleanup_close_ int dfd = -1, fd = -1;
|
_cleanup_close_ int dfd = -1, fd = -1;
|
||||||
_cleanup_free_ char *bn = NULL;
|
_cleanup_free_ char *bn = NULL;
|
||||||
@ -44,7 +44,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
log_debug("Copying tree \"%s\" to \"%s\".", i->argument, i->path);
|
log_debug("Copying tree \"%s\" to \"%s\".", i->argument, i->path);
|
||||||
@@ -1637,40 +1637,46 @@ static int copy_files(Item *i) {
|
@@ -1649,27 +1649,35 @@ static int copy_files(Item *i) {
|
||||||
i->uid_set ? i->uid : UID_INVALID,
|
i->uid_set ? i->uid : UID_INVALID,
|
||||||
i->gid_set ? i->gid : GID_INVALID,
|
i->gid_set ? i->gid : GID_INVALID,
|
||||||
COPY_REFLINK | COPY_MERGE_EMPTY | COPY_MAC_CREATE | COPY_HARDLINKS);
|
COPY_REFLINK | COPY_MERGE_EMPTY | COPY_MAC_CREATE | COPY_HARDLINKS);
|
||||||
@ -94,9 +94,10 @@ index 784b895577..2c44856c3a 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int create_directory_or_subvolume(
|
static int create_directory_or_subvolume(
|
||||||
const char *path,
|
@@ -1677,13 +1685,11 @@ static int create_directory_or_subvolume(
|
||||||
mode_t mode,
|
mode_t mode,
|
||||||
bool subvol,
|
bool subvol,
|
||||||
|
bool allow_failure,
|
||||||
- struct stat *ret_st,
|
- struct stat *ret_st,
|
||||||
CreationMode *ret_creation) {
|
CreationMode *ret_creation) {
|
||||||
|
|
||||||
@ -108,7 +109,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
int r, fd;
|
int r, fd;
|
||||||
|
|
||||||
assert(path);
|
assert(path);
|
||||||
@@ -1690,7 +1696,7 @@ static int create_directory_or_subvolume(
|
@@ -1703,7 +1709,7 @@ static int create_directory_or_subvolume(
|
||||||
log_warning_errno(r, "Cannot parse value of $SYSTEMD_TMPFILES_FORCE_SUBVOL, ignoring.");
|
log_warning_errno(r, "Cannot parse value of $SYSTEMD_TMPFILES_FORCE_SUBVOL, ignoring.");
|
||||||
r = btrfs_is_subvol(empty_to_root(arg_root)) > 0;
|
r = btrfs_is_subvol(empty_to_root(arg_root)) > 0;
|
||||||
}
|
}
|
||||||
@ -117,7 +118,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
/* Don't create a subvolume unless the root directory is one, too. We do this under
|
/* Don't create a subvolume unless the root directory is one, too. We do this under
|
||||||
* the assumption that if the root directory is just a plain directory (i.e. very
|
* the assumption that if the root directory is just a plain directory (i.e. very
|
||||||
* light-weight), we shouldn't try to split it up into subvolumes (i.e. more
|
* light-weight), we shouldn't try to split it up into subvolumes (i.e. more
|
||||||
@@ -1706,36 +1712,37 @@ static int create_directory_or_subvolume(
|
@@ -1719,40 +1725,41 @@ static int create_directory_or_subvolume(
|
||||||
} else
|
} else
|
||||||
r = 0;
|
r = 0;
|
||||||
|
|
||||||
@ -139,7 +140,11 @@ index 784b895577..2c44856c3a 100644
|
|||||||
- /* Then look at the original error */
|
- /* Then look at the original error */
|
||||||
- if (r < 0)
|
- if (r < 0)
|
||||||
+ if (!IN_SET(r, -EEXIST, -EROFS))
|
+ if (!IN_SET(r, -EEXIST, -EROFS))
|
||||||
return log_error_errno(r, "Failed to create directory or subvolume \"%s\": %m", path);
|
return log_full_errno(allow_failure ? LOG_INFO : LOG_ERR,
|
||||||
|
r,
|
||||||
|
"Failed to create directory or subvolume \"%s\"%s: %m",
|
||||||
|
path,
|
||||||
|
allow_failure ? ", ignoring" : "");
|
||||||
|
|
||||||
- return log_error_errno(errno, "Failed to open directory/subvolume we just created '%s': %m", path);
|
- return log_error_errno(errno, "Failed to open directory/subvolume we just created '%s': %m", path);
|
||||||
- }
|
- }
|
||||||
@ -174,7 +179,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
@@ -1743,30 +1750,28 @@ static int create_directory_or_subvolume(
|
@@ -1760,30 +1767,28 @@ static int create_directory_or_subvolume(
|
||||||
static int create_directory(Item *i, const char *path) {
|
static int create_directory(Item *i, const char *path) {
|
||||||
_cleanup_close_ int fd = -1;
|
_cleanup_close_ int fd = -1;
|
||||||
CreationMode creation;
|
CreationMode creation;
|
||||||
@ -183,8 +188,8 @@ index 784b895577..2c44856c3a 100644
|
|||||||
assert(i);
|
assert(i);
|
||||||
assert(IN_SET(i->type, CREATE_DIRECTORY, TRUNCATE_DIRECTORY));
|
assert(IN_SET(i->type, CREATE_DIRECTORY, TRUNCATE_DIRECTORY));
|
||||||
|
|
||||||
- fd = create_directory_or_subvolume(path, i->mode, /* subvol= */ false, &st, &creation);
|
- fd = create_directory_or_subvolume(path, i->mode, /* subvol= */ false, i->allow_failure, &st, &creation);
|
||||||
+ fd = create_directory_or_subvolume(path, i->mode, /* subvol= */ false, &creation);
|
+ fd = create_directory_or_subvolume(path, i->mode, /* subvol= */ false, i->allow_failure, &creation);
|
||||||
if (fd == -EEXIST)
|
if (fd == -EEXIST)
|
||||||
return 0;
|
return 0;
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
@ -203,12 +208,12 @@ index 784b895577..2c44856c3a 100644
|
|||||||
assert(i);
|
assert(i);
|
||||||
assert(IN_SET(i->type, CREATE_SUBVOLUME, CREATE_SUBVOLUME_NEW_QUOTA, CREATE_SUBVOLUME_INHERIT_QUOTA));
|
assert(IN_SET(i->type, CREATE_SUBVOLUME, CREATE_SUBVOLUME_NEW_QUOTA, CREATE_SUBVOLUME_INHERIT_QUOTA));
|
||||||
|
|
||||||
- fd = create_directory_or_subvolume(path, i->mode, /* subvol = */ true, &st, &creation);
|
- fd = create_directory_or_subvolume(path, i->mode, /* subvol = */ true, i->allow_failure, &st, &creation);
|
||||||
+ fd = create_directory_or_subvolume(path, i->mode, /* subvol = */ true, &creation);
|
+ fd = create_directory_or_subvolume(path, i->mode, /* subvol = */ true, i->allow_failure, &creation);
|
||||||
if (fd == -EEXIST)
|
if (fd == -EEXIST)
|
||||||
return 0;
|
return 0;
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
@@ -1789,7 +1794,7 @@ static int create_subvolume(Item *i, const char *path) {
|
@@ -1806,7 +1811,7 @@ static int create_subvolume(Item *i, const char *path) {
|
||||||
log_debug("Quota for subvolume \"%s\" already in place, no change made.", i->path);
|
log_debug("Quota for subvolume \"%s\" already in place, no change made.", i->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +222,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
if (q < 0) /* prefer the quota change error from above */
|
if (q < 0) /* prefer the quota change error from above */
|
||||||
return q;
|
return q;
|
||||||
|
|
||||||
@@ -1830,11 +1835,9 @@ static int create_device(Item *i, mode_t file_type) {
|
@@ -1847,11 +1852,9 @@ static int create_device(Item *i, mode_t file_type) {
|
||||||
_cleanup_close_ int dfd = -1, fd = -1;
|
_cleanup_close_ int dfd = -1, fd = -1;
|
||||||
_cleanup_free_ char *bn = NULL;
|
_cleanup_free_ char *bn = NULL;
|
||||||
CreationMode creation;
|
CreationMode creation;
|
||||||
@ -229,7 +234,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
assert(IN_SET(file_type, S_IFBLK, S_IFCHR));
|
assert(IN_SET(file_type, S_IFBLK, S_IFCHR));
|
||||||
|
|
||||||
r = path_extract_filename(i->path, &bn);
|
r = path_extract_filename(i->path, &bn);
|
||||||
@@ -1854,166 +1857,116 @@ static int create_device(Item *i, mode_t file_type) {
|
@@ -1871,166 +1874,116 @@ static int create_device(Item *i, mode_t file_type) {
|
||||||
r = RET_NERRNO(mknodat(dfd, bn, i->mode | file_type, i->major_minor));
|
r = RET_NERRNO(mknodat(dfd, bn, i->mode | file_type, i->major_minor));
|
||||||
mac_selinux_create_file_clear();
|
mac_selinux_create_file_clear();
|
||||||
}
|
}
|
||||||
@ -362,8 +367,8 @@ index 784b895577..2c44856c3a 100644
|
|||||||
- return log_error_errno(SYNTHETIC_ERRNO(EISDIR), "Cannot open path '%s' for creating FIFO, is a directory.", i->path);
|
- return log_error_errno(SYNTHETIC_ERRNO(EISDIR), "Cannot open path '%s' for creating FIFO, is a directory.", i->path);
|
||||||
+ return log_error_errno(SYNTHETIC_ERRNO(EISDIR), "Cannot open path '%s' for creating FIFO, is a directory.", path);
|
+ return log_error_errno(SYNTHETIC_ERRNO(EISDIR), "Cannot open path '%s' for creating FIFO, is a directory.", path);
|
||||||
|
|
||||||
- pfd = path_open_parent_safe(i->path);
|
- pfd = path_open_parent_safe(i->path, i->allow_failure);
|
||||||
+ pfd = path_open_parent_safe(path);
|
+ pfd = path_open_parent_safe(path, i->allow_failure);
|
||||||
if (pfd < 0)
|
if (pfd < 0)
|
||||||
return pfd;
|
return pfd;
|
||||||
|
|
||||||
@ -460,7 +465,7 @@ index 784b895577..2c44856c3a 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int create_symlink(Item *i) {
|
static int create_symlink(Item *i) {
|
||||||
@@ -2482,7 +2435,7 @@ static int create_item(Item *i) {
|
@@ -2499,7 +2452,7 @@ static int create_item(Item *i) {
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f361fb4824b21acec02b87b4c209b1a5ad864dff7753baf575ee358d12022d43
|
|
||||||
size 8035180
|
|
3
systemd-v252.2+suse.29.ge7e931b07e.tar.xz
Normal file
3
systemd-v252.2+suse.29.ge7e931b07e.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:981382ec6df9b609d8ecd5cb7e570064567840e1f618c205df9d0fc67d803dca
|
||||||
|
size 8035936
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 25 16:37:18 UTC 2022 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
- Import commit e7e931b07edd786dc6ca1dae6c23ff7b785f8efd (merge of v252.2)
|
||||||
|
|
||||||
|
For a complete list of changes, visit:
|
||||||
|
https://github.com/openSUSE/systemd/compare/64dc546913525e33e734500055a62ed0e963c227...e7e931b07edd786dc6ca1dae6c23ff7b785f8efd
|
||||||
|
|
||||||
|
- Rebase 6000-Revert-tmpfiles-whenever-creating-an-inode-immediate.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 22 13:52:07 UTC 2022 - Franck Bui <fbui@suse.com>
|
Tue Nov 22 13:52:07 UTC 2022 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
|
||||||
%define min_kernel_version 4.5
|
%define min_kernel_version 4.5
|
||||||
%define archive_version +suse.27.g3bd3e4e6c1
|
%define archive_version +suse.29.ge7e931b07e
|
||||||
|
|
||||||
%define _testsuitedir /usr/lib/systemd/tests
|
%define _testsuitedir /usr/lib/systemd/tests
|
||||||
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
|
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
Name: systemd%{?mini}
|
Name: systemd%{?mini}
|
||||||
URL: http://www.freedesktop.org/wiki/Software/systemd
|
URL: http://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 252.1
|
Version: 252.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A System and Session Manager
|
Summary: A System and Session Manager
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
|
Loading…
Reference in New Issue
Block a user