Gentoo Archives: gentoo-commits

From: Dave Hughes <davidhughes205@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-process/psmisc/files/, sys-process/psmisc/
Date: Thu, 15 Apr 2021 12:18:34
Message-Id: 1618489110.4e0f50f1fb7619279073c85dd5670017120862d8.xaero@gentoo
1 commit: 4e0f50f1fb7619279073c85dd5670017120862d8
2 Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
3 AuthorDate: Thu Apr 15 12:18:30 2021 +0000
4 Commit: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
5 CommitDate: Thu Apr 15 12:18:30 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=4e0f50f1
7
8 sys-process/psmisc: sync with ::gentoo
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
12
13 .../psmisc-23.4-fuser_regression_revert.patch | 45 ++++++++++++++++++++++
14 .../{psmisc-23.4.ebuild => psmisc-23.4-r1.ebuild} | 5 +++
15 2 files changed, 50 insertions(+)
16
17 diff --git a/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch b/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch
18 new file mode 100644
19 index 0000000..59b2bfc
20 --- /dev/null
21 +++ b/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch
22 @@ -0,0 +1,45 @@
23 +https://gitlab.com/psmisc/psmisc/-/issues/35
24 +
25 +diff --git a/ChangeLog b/ChangeLog
26 +index df45ae3..be20ca0 100644
27 +--- a/ChangeLog
28 ++++ b/ChangeLog
29 +@@ -5,8 +5,6 @@ Changes in 23.4
30 + * pstree: fix layout when using -C !24
31 + * pstree: add time namespace !25
32 + * pstree: Dynamically link to selinux and use attr
33 +- * fuser: Get less confused about duplicate dev_id !10
34 +- * fuser: Only check pathname on non-block devices !31
35 +
36 + Changes in 23.3
37 + ===============
38 +diff --git a/src/fuser.c b/src/fuser.c
39 +index 03e6237..f9d78db 100644
40 +--- a/src/fuser.c
41 ++++ b/src/fuser.c
42 +@@ -1566,7 +1566,6 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head,
43 + struct stat st, lst;
44 + char *dirpath;
45 + char filepath[PATH_MAX];
46 +- char real_filepath[PATH_MAX];
47 +
48 + if (asprintf(&dirpath, "/proc/%d/%s", pid, dirname) < 0)
49 + return;
50 +@@ -1605,17 +1604,6 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head,
51 + dev_tmp = dev_tmp->next) {
52 + if (thedev != dev_tmp->device)
53 + continue;
54 +-
55 +- /* check the paths match if it is not a block device */
56 +- if (! S_ISBLK(dev_tmp->name->st.st_mode)) {
57 +- if (readlink(filepath, real_filepath, PATH_MAX-1) < 0) {
58 +- if (strncmp(dev_tmp->name->filename, filepath, strlen(dev_tmp->name->filename)) != 0)
59 +- continue;
60 +- } else {
61 +- if (strncmp(dev_tmp->name->filename, real_filepath, strlen(dev_tmp->name->filename)) != 0)
62 +- continue;
63 +- }
64 +- }
65 + if (access == ACCESS_FILE
66 + && (lstat(filepath, &lst) == 0)
67 + && (lst.st_mode & S_IWUSR)) {
68
69 diff --git a/sys-process/psmisc/psmisc-23.4.ebuild b/sys-process/psmisc/psmisc-23.4-r1.ebuild
70 similarity index 91%
71 rename from sys-process/psmisc/psmisc-23.4.ebuild
72 rename to sys-process/psmisc/psmisc-23.4-r1.ebuild
73 index 31edc94..7d1b6cc 100644
74 --- a/sys-process/psmisc/psmisc-23.4.ebuild
75 +++ b/sys-process/psmisc/psmisc-23.4-r1.ebuild
76 @@ -22,6 +22,11 @@ BDEPEND=">=sys-devel/libtool-2.2.6b
77
78 DOCS=( AUTHORS ChangeLog NEWS README )
79
80 +PATCHES=(
81 + # https://gitlab.com/psmisc/psmisc/-/issues/35
82 + "${FILESDIR}/${PN}-23.4-fuser_regression_revert.patch"
83 +)
84 +
85 src_prepare() {
86 default