129 Commits

Author SHA256 Message Date
901ff98e97 Accepting request 1293419 from Base:System
- Add patch 0001-fuser-Fix-expandpath.patch
  * Is an upstream commit which fixes https://gitlab.com/psmisc/psmisc/-/issues/57
    as well as bug boo#1242093

OBS-URL: https://build.opensuse.org/request/show/1293419
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=93
2025-07-17 15:17:42 +00:00
506229d94d Add upstream commit b61e3c44
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=151
2025-07-15 11:33:44 +00:00
eead6f72e0 Accepting request 1252709 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1252709
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=92
2025-03-16 17:57:59 +00:00
339f49a3c4 - fix build with gcc15
- added patches
  + psmisc-gcc15.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=150
2025-03-13 10:17:30 +00:00
c9f0435823 Accepting request 1246657 from Base:System
- Looks like Factory and TW includes glibc-gconv-modules-extra at build time

OBS-URL: https://build.opensuse.org/request/show/1246657
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=91
2025-02-18 18:09:13 +00:00
f2b48a0ece glibc-gconv-modules-extra
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=149
2025-02-18 12:05:04 +00:00
d31b655628 Accepting request 1228556 from Base:System
- add loongarch64 as peekfd supported arch (forwarded request 1228512 from adrianSuSE)

OBS-URL: https://build.opensuse.org/request/show/1228556
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=90
2024-12-06 13:25:19 +00:00
db05d2d75d Accepting request 1228512 from devel:LoongArch:Factory
- add loongarch64 as peekfd supported arch

OBS-URL: https://build.opensuse.org/request/show/1228512
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=148
2024-12-05 15:40:44 +00:00
1eede90fef Accepting request 1177128 from Base:System
- Update to 23.7
  * build-sys: Make disable-statx work
  * fuser: Fallback to stat() if no statx() Debian 1030747 #48
  * fuser: silently ignore EACCES when scanning proc directories
  * killall: small formatting fixes Debian #1037231
  * pstree: Do not assume root PID #49
  * pslog: include config.h #51 !36
  * misc: Update gettext to 0.21
- Add patch from upstream 0001-killall,pstree-use-clock_gettime-not-uptime.patch
- Port the patches
  * 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  * psmisc-22.21-pstree.patch
- Port patch psmisc-v23.6.dif and rename it to psmisc-v23.7.dif

OBS-URL: https://build.opensuse.org/request/show/1177128
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=89
2024-05-30 13:32:02 +00:00
a9fef0aaca Update to psmisc-v23.7
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=147
2024-05-27 12:03:39 +00:00
8a8bf4d464 Accepting request 1153389 from Base:System
Prepare for RPM 4.20 (forwarded request 1153364 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/1153389
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=88
2024-03-01 22:35:08 +00:00
3bb3c45610 Accepting request 1153364 from home:dimstar:rpm4.20:p
Prepare for RPM 4.20

OBS-URL: https://build.opensuse.org/request/show/1153364
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=146
2024-02-29 15:08:30 +00:00
1016dd6559 Accepting request 1119659 from Base:System
- Fix version at configure time as there was no .tarball-version

OBS-URL: https://build.opensuse.org/request/show/1119659
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=87
2023-10-24 18:07:04 +00:00
49a999dbb4 Version for the package at build time
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=145
2023-10-23 13:39:35 +00:00
3299dbdae3 Accepting request 1066338 from Base:System
- allow to switch off Apparmor support via bcond (forwarded request 1066220 from lnussel)

OBS-URL: https://build.opensuse.org/request/show/1066338
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=86
2023-02-19 17:18:53 +00:00
b072ee32cd Accepting request 1066220 from home:lnussel:branches:Base:System
- allow to switch off Apparmor support via bcond

OBS-URL: https://build.opensuse.org/request/show/1066220
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=144
2023-02-17 09:12:02 +00:00
1377094aa9 Accepting request 1057026 from Base:System
Replace transitional %usrmerged macro with regular version check (boo#1206798) (forwarded request 1055724 from lnussel)

OBS-URL: https://build.opensuse.org/request/show/1057026
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=85
2023-01-10 13:59:14 +00:00
485704d142 Accepting request 1055724 from home:lnussel:usrmerge
Replace transitional %usrmerged macro with regular version check (boo#1206798)

OBS-URL: https://build.opensuse.org/request/show/1055724
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=143
2023-01-09 10:21:59 +00:00
57fc58e4ed Accepting request 1042561 from Base:System
- Update to 23.6:
  * buildsys: Fix DEJAGNU work-around Debian #1015089
  * killall: Use kill if pidfd_send_signal fails Debian #1015228
  * fuser: Do not mention nonexistent - reset option #42
  * fuser: Use modern statn where possible
  * pstree: Better AppArmor support !30
  * killall: Check truncated names !28
  * killall: Use openat and pidfd_send_signal #37
  * killall: Don't check paths of sockets #35
  * pstree: Check for process with show_parents #38
  * pstree: Don't disable compaction with show pgids #34
  * pstree: Fix storage leak !29
- Enable new apparmor support
- Remove patch now upstream
  0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Port patch psmisc-22.21-pstree.patch
- Port patch psmisc-v23.4.dif which now becomes psmisc-v23.6.dif
- Merge patch socket-fix.patch with ported patch
  0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch

OBS-URL: https://build.opensuse.org/request/show/1042561
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=84
2022-12-14 13:10:40 +00:00
72018ee113 Update to psmisc-v23.6
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=142
2022-12-13 08:15:24 +00:00
45fac0a3cd Update to psmisc-v23.6
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=141
2022-12-13 08:15:06 +00:00
031614b488 Accepting request 1038188 from Base:System
- Add patch socket-fix.patch
  * Add test to check for named sockets as file as well as on mounts
  * Fix code to find named sockets
- The former test requires nc at build aka netcat from openbsd to
  create a named socket on the fly

OBS-URL: https://build.opensuse.org/request/show/1038188
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=83
2022-11-26 17:45:05 +00:00
94fb0e374e Find named sockets even on mounts
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=140
2022-11-25 11:52:03 +00:00
0b2e72f741 Accepting request 957096 from Base:System
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch 
  * Add a fallback if the system call name_to_handle_at() is
    not supported by the used file system.

- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch 
  * Determine the namespace of a process only once to speed
    up the parsing of fdinfo (bsc#1194172).
- Adopt patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch

OBS-URL: https://build.opensuse.org/request/show/957096
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=82
2022-02-24 17:18:29 +00:00
f56d412b38 fallback of name_to_handle_at
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=139
2022-02-23 13:51:28 +00:00
d97bedd0b8 Work on bsc#1194172
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=138
2022-02-01 12:42:17 +00:00
6234eb99bf Accepting request 947699 from Base:System
- Update to 23.4:
  * killall: Dynamically link to selinux and use security attributes
  * pstree: Do not crash on missing processes !21
  * pstree: fix layout when using -C !24
  * pstree: add time namespace !25
  * pstree: Dynamically link to selinux and use attr
  * fuser: Get less confused about duplicate dev_id !10
  * fuser: Only check pathname on non-block devices !31
- Rebase 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Rebase 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Port psmisc-22.21-pstree.patch
- Delete psmisc-v23.3-selinux.patch as not needed anymore
- Rename psmisc-v23.3.dif which is now psmisc-v23.4.dif with correct offsets

OBS-URL: https://build.opensuse.org/request/show/947699
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=81
2022-01-22 07:17:59 +00:00
daff926003 Remove old tar ball
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=137
2022-01-20 14:03:33 +00:00
242d0d8b2c Update to psmisc 23.4
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=136
2022-01-20 14:03:03 +00:00
b322a5943e Accepting request 894798 from Base:System
- Do not change CAP within spec file (boo#1186258) 

- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch 
  * Fix bsc#1185208 to make private mount namespaces work as well
    as to distinguish NFS mounts from same remote device share.

OBS-URL: https://build.opensuse.org/request/show/894798
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=80
2021-05-23 21:30:40 +00:00
5ba5b482c5 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=135
2021-05-21 12:18:19 +00:00
6d6f134cc6 CAP
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=134
2021-05-20 07:22:55 +00:00
b4c3a967e3 https://bugzilla.opensuse.org/show_bug.cgi?id=1186258
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=79
2021-05-19 15:30:13 +00:00
5e427c3b0c Accepting request 893186 from Base:System
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/893186
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=78
2021-05-18 16:26:43 +00:00
7bf55be6f1 bsc#1185208
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=131
2021-05-07 15:08:34 +00:00
fc3e023bdf Accepting request 877289 from Base:System
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  * Fix bsc#1178407: fuser does not show open kvm storage image files
    such as qcow2 files. Patch from Ali Abdallah <ali.abdallah@suse.com>

OBS-URL: https://build.opensuse.org/request/show/877289
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=77
2021-03-10 07:50:38 +00:00
e892524b9e Fix bsc#1178407
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=129
2021-03-05 14:12:24 +00:00
6574fdb607 Accepting request 863141 from Base:System
- Now with 23.3 peekfd is build even for aarch64 

- Rework 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  and split off the patch psmisc-v23.3-selinux.patch 
- Rework 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- New patch psmisc-v23.3-selinux.patch
- Rename patch psmisc-v23.2.dif which is now psmisc-v23.3.dif

- Update to 23.3:
  * killall: check also truncated 16 char comm names Debian
  * fuser: Return early if have nulls
  * peekfd: Add support for ARM64
  * pstree: Add color by age
  * fuser: Use larger inode sizes
- Rebase 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Rebase 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Rebase psmisc-22.21-pstree.patch

OBS-URL: https://build.opensuse.org/request/show/863141
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=76
2021-01-18 10:27:42 +00:00
1afa3e8cb0 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=127
2021-01-14 15:49:40 +00:00
2d77066498 rework former submit
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=126
2021-01-14 12:02:55 +00:00
d85a503ea2 Accepting request 859586 from home:polslinux:branches:Base:System
- Update to 23.3:
  * killall: check also truncated 16 char comm names Debian
  * fuser: Return early if have nulls
  * peekfd: Add support for ARM64
  * pstree: Add color by age
  * fuser: Use larger inode sizes
- Rebase 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Rebase 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Rebase psmisc-22.21-pstree.patch

OBS-URL: https://build.opensuse.org/request/show/859586
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=125
2021-01-11 08:22:06 +00:00
46262c94da Accepting request 853760 from Base:System
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/853760
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=75
2020-12-09 21:12:10 +00:00
621f5beebc Accepting request 849668 from home:lnussel:usrmove
- prepare usrmerge (boo#1029961)

OBS-URL: https://build.opensuse.org/request/show/849668
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=123
2020-11-20 13:11:36 +00:00
61cadd1707 Accepting request 798507 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  * Allow not unique mounts as well as not unique mountpoint (bsc#1170247)

OBS-URL: https://build.opensuse.org/request/show/798507
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=74
2020-04-29 18:43:31 +00:00
4bdee1e73d .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=121
2020-04-27 14:59:38 +00:00
e02436581e Allow not unique mounts as well as not unique mountpoint
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=120
2020-04-27 14:58:59 +00:00
704f312487 Accepting request 731946 from Base:System
- Do not recommend lang package. The lang package already has a
  supplements. (forwarded request 731940 from lnussel)

OBS-URL: https://build.opensuse.org/request/show/731946
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=73
2019-09-26 18:35:25 +00:00
9e7dd4a0e4 Accepting request 731940 from home:lnussel:branches:Base:System
- Do not recommend lang package. The lang package already has a
  supplements.

OBS-URL: https://build.opensuse.org/request/show/731940
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=118
2019-09-19 12:13:57 +00:00
78cdbd6d94 Accepting request 653088 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  * Always initialize head of simple linked list (bsc#1098697)
  * stat(2) on binary does not see subvol dev

OBS-URL: https://build.opensuse.org/request/show/653088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=72
2018-12-10 11:21:53 +00:00
20054b1980 Always initialize head of simple linked list
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=116
2018-11-30 14:26:22 +00:00
cb7bffe831 Accepting request 649178 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  to handle sub volumes of the btrFS (bsc#1112780)

OBS-URL: https://build.opensuse.org/request/show/649178
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=71
2018-11-19 22:28:36 +00:00
49b5b93df8 handle sub volumes of the btrFS
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=114
2018-11-15 06:48:52 +00:00
0f183c9a65 handle sub volumes of the btrFS
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=113
2018-11-14 11:26:45 +00:00
f7c9c45071 Accepting request 646331 from Base:System
- Modify patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
  to support older systems with statx kernel support 

- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  to respect autofs as well as afs file system 
- Add patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
  to use statx(2) system call since kernel 4.12. Now it is possible
  to avoid sync with remote file servers as well as trigger autofs
  mounts due stat(x) calls.

- Support also btrFS entries in mountinfo, that is use stat(2) to
  determine the device of the mounted subvolume (bsc#1098697, bsc#1112780) 

- Update to version 23.2
  * misc: Command names increased from 16 to 64 characters
  * buildsys: signals.c depends on signames.h !16
  * docs: Fix fuser.1 groff errors Debian #900225
  * killall: look at all namespaces by default
  * killall: Fix -INT option parsing #11
  * killall: ignore -n 0 #15
  * killall: another crack at fixing getopt #12 #13
  * peekfd: Attach to all threads option !15
  * pslog: Define PATH_MAX if required Debian:#905797
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Remove patches now upstream solved
  * psmisc-23.0-killall-signals.patch
  * psmisc-23.0-killall.patch
- Modify and rename patch psmisc-23.0.dif which now becomes psmisc-v23.2.dif

OBS-URL: https://build.opensuse.org/request/show/646331
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=70
2018-11-06 13:01:50 +00:00
e44eecab7f let it build even without statx around
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=111
2018-11-05 08:39:03 +00:00
cb3f27fce0 statx for older glibc versions
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=110
2018-11-05 07:52:51 +00:00
3f9f72dfb6 New statx(2) used for fuser
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=109
2018-11-02 13:41:02 +00:00
1a661c032f Support BtrFS
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=108
2018-10-23 10:13:58 +00:00
740d20db9c Update to psmisc-23.2 + mountinfo commit
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=107
2018-10-22 11:18:33 +00:00
7a6c715d2f Accepting request 637680 from Base:System
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/637680
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=69
2018-10-01 07:06:34 +00:00
b90d74132e Copying
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=105
2018-09-17 12:59:09 +00:00
6e088f8dc8 Accepting request 618536 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  to make fuser option -m <block_device> work even with mountinfo
  (bsc#1098697)

OBS-URL: https://build.opensuse.org/request/show/618536
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=68
2018-06-25 09:35:21 +00:00
37fa270b2e futty
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=103
2018-06-22 16:48:11 +00:00
a17ff7c6af bsc#1098697
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=102
2018-06-22 16:43:06 +00:00
52bdb881f6 Accepting request 610044 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  to let fuser -m also work for private mounts as well (boo#1093665)

OBS-URL: https://build.opensuse.org/request/show/610044
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=67
2018-05-23 14:06:44 +00:00
0a4e4eab6a boo#1093665
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=100
2018-05-17 10:43:20 +00:00
ea3a65873a boo#1093665
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=99
2018-05-17 10:37:30 +00:00
7f1bb16a07 Accepting request 534218 from Base:System
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  to run even on older kernels missing mnt_id tag in fdinfo

OBS-URL: https://build.opensuse.org/request/show/534218
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=66
2017-10-23 14:38:24 +00:00
9f456e9441 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=97
2017-10-13 07:57:27 +00:00
b4859a264f .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=96
2017-10-13 07:45:00 +00:00
b2ebdc9ee1 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=95
2017-10-13 07:11:59 +00:00
60a2c76a4a Accepting request 526990 from Base:System
- Add patch psmisc-23.0-killall-signals.patch to fix boo#1058990
  by prior scanning for signal names in the arguments of killall

OBS-URL: https://build.opensuse.org/request/show/526990
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=65
2017-09-21 10:31:59 +00:00
9f79714cad boo#1058990
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=93
2017-09-18 10:19:15 +00:00
8c8f6ff951 Accepting request 509834 from Base:System
- Update patch
  0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch

OBS-URL: https://build.opensuse.org/request/show/509834
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=64
2017-07-30 09:20:40 +00:00
89dcc40d73 Accepting request 508459 from Base:System
- Remove patches
  * psmisc-22.21-lessnfs.patch
  * psmisc-22.21-mntpt.patch
  * psmisc-23.0-net.patch
- Add patch
  0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
  from https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
  which is a heavily rework fuser used on NFS
  * Use mountinfo to be able to use the mount identity
    which allows to distinguish different mounts with the
    same device number as it happens with NFS shares.
  * Smaller cleanup as support of chroot environments
    and older systems.
  * Add support for name_to_handle_at() system call to
    get the real mount ID for each file
- Use test suite of psmisc in %check rpm section

- Add patch psmisc-23.0-net.patch to reenable network support
  broken to my own upstream commit

OBS-URL: https://build.opensuse.org/request/show/508459
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=63
2017-07-12 17:30:06 +00:00
8fe1002281 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=90
2017-07-06 13:59:59 +00:00
1ef6c17005 Rework of patch sets
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=89
2017-07-05 13:33:06 +00:00
9d020b6adc Accepting request 506747 from Base:System
- Add patch psmisc-23.0-killall.patch to remove left over debug
  output in killall utility (boo#1046237)

OBS-URL: https://build.opensuse.org/request/show/506747
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=62
2017-07-02 11:37:25 +00:00
5f48e639d4 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=87
2017-06-29 08:47:24 +00:00
bca62beb80 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=86
2017-06-29 08:22:15 +00:00
ed2762c1d2 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=85
2017-06-28 16:53:30 +00:00
4d7768b7cf .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=84
2017-06-28 13:12:45 +00:00
20956c6fdb .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=83
2017-06-28 10:01:14 +00:00
8a56621d12 Accepting request 505275 from Base:System
- Update to version 23.0
  * killall: Fix process age race condition !11 Debian #822861
  * killall: only use scope of current namespace by default
  * killall: better parsing of command names
  * pstree: add cgroup namespaces !10
  * peekfd: Help give long options too !5
  * killall: correctly report when 32+ procs match !8
  * prtat: Remove duplicate options in man page !3 Debian #846387
  * pslog: New program to check what logs are open merge !1
  * fuser: increase path length for octal escaping SF [#37]
  * Make usage of linked lists of devices found in
    /proc/self/mountinfo optional
  * Make timeout() in timeout.c work with shared mmap to
    reduce the load due write/read the stat buffers
  * Add list_sort() to lists.h to be able to sort lists
  * fuser: Fixed typo for  -M flag. Debian #740275
  * pstree: by default doesn't show threadnames, use -t to show
    as it disables compaction. SF [#33] Debian #815902
  * pstree: Removed need for PATH_MAX Debian #750405
  * pstree: ignores disappeared processes. SF [#34]
  * killall: -o and -y work with -r flags. SF [#64]
  * m4/gettext.m4: Upgrade to gettext-0.19.4.
  * m4/iconv.m4: Upgrade to gettext-0.19.4.
  * m4/lib-ld.m4: Upgrade to gettext-0.19.4.
  * m4/lib-link.m4: Upgrade to gettext-0.19.4.
  * m4/lib-prefix.m4: Upgrade to gettext-0.19.4.
  * m4/nls.m4: Upgrade to gettext-0.19.4.
  * m4/po.m4: Upgrade to gettext-0.19.4.
  * m4/progtest.m4: Upgrade to gettext-0.19.4.
  * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4.

OBS-URL: https://build.opensuse.org/request/show/505275
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=61
2017-06-24 06:34:09 +00:00
f4919ba329 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=81
2017-06-21 11:20:44 +00:00
b6f3565ed5 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=80
2017-06-20 18:02:05 +00:00
a711710ba6 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=79
2017-06-20 15:36:37 +00:00
46fe773cb7 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=78
2017-06-20 14:04:40 +00:00
082bd43f0b Accepting request 308332 from Base:System
1

OBS-URL: https://build.opensuse.org/request/show/308332
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=60
2015-05-23 10:43:20 +00:00
65ba96653a Accepting request 308233 from home:Andreas_Schwab:Factory
- Replace negative list %nopeek with positive list %have_peekfd

OBS-URL: https://build.opensuse.org/request/show/308233
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=76
2015-05-22 07:00:37 +00:00
10457c8bc4 Accepting request 293786 from Base:System
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/293786
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=59
2015-04-05 00:03:24 +00:00
f102c7b29d .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=74
2015-03-24 11:58:59 +00:00
Stephan Kulow
67cbb98b77 Accepting request 231389 from Base:System
- add patch to fix fuser -M option active all the time (bnc#874983)
  psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch (forwarded request 231322 from oertel)

OBS-URL: https://build.opensuse.org/request/show/231389
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=57
2014-04-26 07:58:43 +00:00
cf45d9c0db Accepting request 231322 from home:oertel:branches:Base:System
- add patch to fix fuser -M option active all the time (bnc#874983)
  psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch

OBS-URL: https://build.opensuse.org/request/show/231322
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=72
2014-04-25 10:02:11 +00:00
Stephan Kulow
e3ae996a9b Accepting request 227334 from Base:System
- Update to version 22.21
  * Missing comma in fuser(1) added Debian #702391
  * pstree uses COLUMN env variable Debian #717017
  * pstree shows proper thread names SF Bug#57
  * pstree shows namespace options SF Patch#30
  * killall.1 minor fixes SF Bug#59
  * peekfd for m68k SF Patch#31
  * Fixing some derefefed pointers SF Patch#32
  * Minor typos in man pages SF Bug#61 Bug#60
  * fuser -m and -M flags work either way Debian #606178
- Remove patch
  psmisc-22.20-pstree.patch as now part of upstream
  peekfd-m68k.patch as now part of upstream
- Port the patches
  psmisc-22.20-upstream.patch which becomes psmisc-22.21-upstream.patch
  psmisc-22.20.dif which becomes psmisc-22.21.dif
  psmisc-22.12-pstree.patch which becomes psmisc-22.21-pstree.patch

OBS-URL: https://build.opensuse.org/request/show/227334
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=56
2014-03-27 05:15:59 +00:00
4c1ca37150 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=70
2014-03-24 16:13:40 +00:00
Tomáš Chvátal
1e78287b9b Accepting request 204495 from Base:System
Some improvements (forwarded request 204437 from posophe)

OBS-URL: https://build.opensuse.org/request/show/204495
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=55
2013-10-24 12:41:23 +00:00
16141dd6ee Accepting request 204437 from home:posophe:branches:Base:System
Some improvements

OBS-URL: https://build.opensuse.org/request/show/204437
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=68
2013-10-24 09:32:22 +00:00
Tomáš Chvátal
6f8124013f Accepting request 203605 from Base:System
- peekfd-m68k.patch: Port peekfd to m68k (forwarded request 203580 from Andreas_Schwab)

OBS-URL: https://build.opensuse.org/request/show/203605
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=54
2013-10-17 18:38:13 +00:00
cb4f9c8c28 Accepting request 203580 from home:Andreas_Schwab:Factory
- peekfd-m68k.patch: Port peekfd to m68k

OBS-URL: https://build.opensuse.org/request/show/203580
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=66
2013-10-17 11:18:53 +00:00
Stephan Kulow
5f5421630d Accepting request 155067 from Base:System
- peekfd hasn't been ported to aarch64 yet (forwarded request 155004 from Andreas_Schwab)

OBS-URL: https://build.opensuse.org/request/show/155067
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=52
2013-02-11 10:10:02 +00:00
50658e7022 Accepting request 155004 from home:Andreas_Schwab:Factory
- peekfd hasn't been ported to aarch64 yet

OBS-URL: https://build.opensuse.org/request/show/155004
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=64
2013-02-10 22:27:02 +00:00
Stephan Kulow
56b4c333d5 Accepting request 145783 from Base:System
- Update to version 22.20 + upstream patch 
  * Make usage of linked lists of devices found in
    /proc/self/mountinfo optional
  * Make timeout() in timeout.c work with shared mmap to
    reduce the load due write/read the stat buffers
  * Add list_sort() to lists.h to be able to sort lists
  * pstree sorts properly on names Debian #682014
  * fuser -m regresion fixed SF #3559232, thanks to hanpt
  * pstree finds orphaned processes SF#3537508
  * fuser finds unix sockets again SF #3502649
  * pstree finds pid 0 stops looping Debian #687829
  * killall with no args exits again SF #3536526
  * Added AC_CANONICAL_TARGET for target_os Debian #673485
  * sed doesn't have [0-9]+ replace with [0-9][0-9]*
  * assert in killall triggered for small lifetimes Debian #628617
  * killall MAX_NAMES off by one Debian #677428
  * Removed remaining parts of pidof
  * fuser uses correct timeout_stat define Debian #661723
  * fuser is not compiled on hurd-i386 Debian #673485
  * No TEXTRELS in src/lists built as PIE on x86
  * Fake pstree root for kernels with hidepid turned on
  * More fixes for Cygwin SF Patch #3511920
  * pstree can show PGIDs SF Patch #3471056
- This should fix the bug reported by Madhu

OBS-URL: https://build.opensuse.org/request/show/145783
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=50
2012-12-21 14:02:17 +00:00
8380ca95a1 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=62
2012-12-18 17:20:19 +00:00
Stephan Kulow
170b517095 Accepting request 109130 from Base:System
- Submit ASCII null fix in pstree upsrtream
- Submit support for static background process for stat system call
  upstream
- Rebuild package with upstream patches

OBS-URL: https://build.opensuse.org/request/show/109130
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=48
2012-03-19 09:12:18 +00:00
b9ed20f85d .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=60
2012-03-13 15:28:38 +00:00
Stephan Kulow
01c78c90ea Accepting request 107198 from Base:System
- Update to version 22.16
  * Use strncpy for COMM_LEN and make it 18 characters to cover
    brackets in name.
  * don't change COMM_LEN, it breaks matching long commands
    Debian #661145
  * Enable some harden AM_CFLAGS by default, use configure option
    --disable-harden-flags to not use it.
  * Use ENOENT not EBADE for FreeBSD Debian #631566
  * Fix prstat typos
  * Stop zombies by using waitpid Ubuntu #876387 by Peter Holik, SF#3429674
  * Fixed minor older/younger typo in killall.1 thanks to Maikel Linke
  * Correct defines for timeout in configure.ac

OBS-URL: https://build.opensuse.org/request/show/107198
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=47
2012-02-28 13:15:00 +00:00
3d58b16e78 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=58
2012-02-27 17:46:23 +00:00
Stephan Kulow
ee4f649e46 Accepting request 99412 from Base:System
Update tarball from upstream. (forwarded request 99411 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/99412
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=46
2012-01-11 14:37:53 +00:00
cf16fe735d Accepting request 99411 from home:a_jaeger:FactoryFix
Update tarball from upstream.

OBS-URL: https://build.opensuse.org/request/show/99411
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=56
2012-01-09 09:21:03 +00:00
a72fc8d613 Accepting request 94757 from home:coolo:removeautomake
add automake to buildrequires

OBS-URL: https://build.opensuse.org/request/show/94757
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=55
2011-12-01 20:11:49 +00:00
Lars Vogdt
68bd0e367c Accepting request 87410 from Base:System
- Use __builtin___strcpy_ instead of __builtin___strcpy_chk to avoid
  trouble with char path[0] tag in struct handle (bnc#723304)

OBS-URL: https://build.opensuse.org/request/show/87410
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=44
2011-10-11 16:21:59 +00:00
94baa25e1a .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=52
2011-10-11 15:38:07 +00:00
Ruediger Oertel
d6f7abdd92 Accepting request 87071 from Base:System
- Make main fuser process more robust against broken pipe and check
  for helper process within a SIGCHLD handler

OBS-URL: https://build.opensuse.org/request/show/87071
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=43
2011-10-07 15:07:34 +00:00
a73d0fedee .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=49
2011-10-07 14:12:00 +00:00
Lars Vogdt
d688d2087b Accepting request 86648 from Base:System
- Handle internal size of structure stat by including config.h
  to avoid size missmatch during copy result back (bnc#720882)

OBS-URL: https://build.opensuse.org/request/show/86648
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=42
2011-10-05 15:47:27 +00:00
44130af329 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=46
2011-10-05 09:49:25 +00:00
Ruediger Oertel
fa1ea75768 Accepting request 86251 from Base:System
- Fix segfault in pstree, patch by Tetsuo Handa (bnc#718915). (forwarded request 86232 from michal-m)

OBS-URL: https://build.opensuse.org/request/show/86251
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=41
2011-10-04 15:00:59 +00:00
Stephan Kulow
aa973aa8f3 Accepting request 86232 from home:michal-m:branches:Base:System
- Fix segfault in pstree, patch by Tetsuo Handa (bnc#718915).

OBS-URL: https://build.opensuse.org/request/show/86232
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=44
2011-10-03 12:42:11 +00:00
Sascha Peilicke
46bb9fa7dd Accepting request 85293 from Base:System
- back out the timeout patch, it breaks fuser on i586 completely
  (bnc#720882)

OBS-URL: https://build.opensuse.org/request/show/85293
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=40
2011-09-28 12:25:44 +00:00
Stephan Kulow
ab34d867f2 - back out the timeout patch, it breaks fuser on i586 completely
(bnc#720882)

OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=41
2011-09-28 10:46:25 +00:00
Sascha Peilicke
40afdd7a2a Autobuild autoformatter for 81924
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=39
2011-09-13 10:31:00 +00:00
OBS User buildservice-autocommit
5fc42caf11 Updating link to change in openSUSE:Factory/psmisc revision 39.0
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=5edbf6f15e2a3bc3fa556232972d527b
2011-09-13 10:31:00 +00:00
Sascha Peilicke
6bee248837 Accepting request 81924 from Base:System
- Update to pre version 22.15
  + Really apply patch for SF#31110178 RH#651794
  + Conditionally use fork before stat calls
  + Patch from Corrina Vinschen for compiling on cygwin
  + Remove doubled content in src/lists.h
  + Add another 2 for thread brackets in pstree.c
- Change fork before stat calls to be in best case a second process
  using two pipes for bidirectional communication with main.

OBS-URL: https://build.opensuse.org/request/show/81924
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=38
2011-09-13 10:30:55 +00:00
3153c439b1 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=38
2011-09-12 15:50:38 +00:00
Sascha Peilicke
202c4b3ada Autobuild autoformatter for 74716
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=37
2011-06-28 08:29:55 +00:00
OBS User buildservice-autocommit
1308522862 Updating link to change in openSUSE:Factory/psmisc revision 37.0
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=7e4bfdb8d3ef0ef384974bf129103522
2011-06-28 08:29:55 +00:00
OBS User buildservice-autocommit
ea28ec9239 Accepting request 74716 from Base:System
baserev update by copy to link target

OBS-URL: https://build.opensuse.org/request/show/74716
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=37
2011-06-28 08:29:39 +00:00
7966c71021 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=36
2011-06-22 11:36:15 +00:00
14 changed files with 2327 additions and 390 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,211 @@
From b61e3c44b636691d5d2d2519efc934eac03e0f22 Mon Sep 17 00:00:00 2001
From: Craig Small <csmall@dropbear.xyz>
Date: Sat, 3 May 2025 11:10:11 +1000
Subject: [PATCH] fuser: Fix expandpath
The function expandpath had some issues:
* It would fail if you looked at non-Unix sockets
* get_pidfd called it twice most times
* it would try to find symlinks in /proc/<PID>/fd
* it kept scanning /proc/self/net/unix over and over
This meant fuser ran really slow, and would never find
any TCP/UDP sockets (and probably anything else that wasn't
a normal file/directory or Unix socket).
The main changes are:
If we know we are looking at procfs, skip over scanning for
directories.
Use the already parsed unix sockets list
If we find a socket and its not a unix socket, return the orginal path
References:
commit 366b0071aa889d2620b78f1cf4e197771171aea8
issue #57
Signed-off-by: Craig Small <csmall@dropbear.xyz>
---
ChangeLog | 1 +
src/fuser.c | 73 +++++++++++++++++++----------------------------------
2 files changed, 27 insertions(+), 47 deletions(-)
|diff --git a/ChangeLog b/ChangeLog
|index 4222066..edf164e 100644
|--- a/ChangeLog
|+++ b/ChangeLog
|@@ -1,6 +1,7 @@
| Changes in NEXT
| ===============
| * fuser: Use mountinfo to distinguish NFS mounts !40
|+ * fuser: Make TCP/UDP sockets work again #57
| * killall,pstree: Use gettime instead of uptime Debian 1066090
| * pstree: Add -P to show path of exe !38
|
diff --git a/src/fuser.c b/src/fuser.c
index b31338e..d3622d6 100644
--- a/src/fuser.c
+++ b/src/fuser.c
@@ -134,7 +134,7 @@ static ino_t get_namespace(const pid_t pid);
static int get_mountid(const char *path);
#endif
static int find_mountpoint(const char *path, mntinfo_t **mountinfo);
-static char *expandpath(const char *path);
+static char *expandpath(const char *path, const bool isproc);
static struct unixsocket_list *unixsockets = NULL;
static struct names *names_head = NULL, *names_tail = NULL;
static struct ip_connections *tcp_connection_list = NULL;
@@ -541,7 +541,7 @@ int parse_file(
const opt_type opts)
{
mntinfo_t *mountinfo;
- char *new = expandpath(this_name->filename);
+ char *new = expandpath(this_name->filename, false);
if (new)
{
if (this_name->filename)
@@ -1722,7 +1722,7 @@ static struct stat *get_pidstat(
if (id)
{
mntinfo_t *info;
- char *new = expandpath(pathname);
+ char *new = expandpath(pathname, true);
if (new && find_mountpoint(new, &info) == 0)
*id = info->id;
else *id = -1;
@@ -2442,11 +2442,10 @@ static int get_fdinfo(
const static char delimiters[] = ": \t\n";
char line[BUFSIZ];
FILE *fp;
-# if defined(HAS_NAME_TO_HANDLE_AT)
char *realname;
-# endif
snprintf(pathname, sizeof(pathname)-1, "/proc/%d/fdinfo/%s", pid, fd);
+
if ((fp = fopen(pathname, "r")) == NULL)
goto out;
@@ -2470,9 +2469,9 @@ static int get_fdinfo(
}
fclose(fp);
out:
-# if defined(HAS_NAME_TO_HANDLE_AT)
snprintf(pathname, sizeof(pathname)-1, "/proc/%d/fd/%s", pid, fd);
- realname = expandpath(pathname);
+ realname = expandpath(pathname, true);
+# if defined(HAS_NAME_TO_HANDLE_AT)
if (realname)
{
info->mnt_id = get_mountid(realname);
@@ -2485,7 +2484,6 @@ out:
{
struct stat lst;
- snprintf(pathname, sizeof(pathname)-1, "/proc/%d/fd/%s", pid, fd);
if (!flags && lstatn(pathname, STATX_MODE, &lst) == 0)
{
if (lst.st_mode & S_IWUSR)
@@ -2495,7 +2493,6 @@ out:
if (!mnt_id)
{
- realname = expandpath(pathname);
if (realname)
{
mntinfo_t *mountinfo;
@@ -2699,7 +2696,8 @@ out:
*/
static char real[PATH_MAX + 1];
char *expandpath(
- const char *path)
+ const char *path,
+ const bool isproc)
{
char tmpbuf[PATH_MAX + 1];
const char *start, *end;
@@ -2726,7 +2724,10 @@ char *expandpath(
while (*start == '/')
++start;
- for (end = start; *end && *end != '/'; ++end) ;
+ if (isproc)
+ end = start + strlen(start);
+ else
+ for (end = start; *end && *end != '/'; ++end) ;
if (end - start == 0)
break;
@@ -2741,6 +2742,7 @@ char *expandpath(
char lnkbuf[PATH_MAX + 1];
size_t len;
ssize_t n;
+ unsigned long long lnk_inode;
if (dest[-1] != '/')
*dest++ = '/';
@@ -2773,49 +2775,26 @@ char *expandpath(
/*
* Expand to real path of named socket if any
*/
- if (lnkbuf[0] != '/' && strncmp("socket:[", lnkbuf, 8) == 0)
+ if (lnkbuf[0] != '/' && sscanf(lnkbuf, "socket:[%llu]", &lnk_inode) == 1)
{
- FILE *fp;
- char *inode;
- char line[BUFSIZ];
- if ((inode = strchr(&lnkbuf[8], ']')))
- {
- *inode = '\0';
- inode = &lnkbuf[8];
- }
-
- if (!inode || (fp = fopen(PROC_SOCKETS, "r")) == NULL)
- {
- /*fprintf(stderr, "Cannot open %s\n", PROC_SOCKETS); */
- return (char *)0;
- }
- while (fgets(line, BUFSIZ, fp) != NULL)
+ struct unixsocket_list *sock_tmp;
+ for (sock_tmp = unixsockets; sock_tmp != NULL; sock_tmp = sock_tmp->next)
{
- char *named = NULL;
- unsigned long snode;
-
- if (*line == 'N')
- continue;
-
- if (sscanf(line, "%*x: %*x %*x %*x %*x %*x %lu %ms",
- &snode, &named) == 2)
+ if (sock_tmp->net_inode == lnk_inode)
{
- char *ep;
- unsigned long oul = strtoul(inode, &ep, 0);
- if (oul == snode) {
- ep = named;
- if (*ep == '@')
- ep++;
- n = strlen(ep);
- memcpy(lnkbuf, ep, n);
- lnkbuf[n] = '\0';
- }
- free (named);
+ strncpy(lnkbuf, sock_tmp->sun_name, PATH_MAX);
+ n = strlen(sock_tmp->sun_name);
+ break;
}
}
- fclose(fp);
+ if (sock_tmp == NULL) // socket, but not unix socket
+ {
+ strcpy(real, path);
+ return curr;
+ }
}
+ lnkbuf[n] = '\0';
len = strlen(end);
if ((n + len) > PATH_MAX)
{
--
GitLab

View File

@@ -0,0 +1,160 @@
From a146bfc359a4d4d96c438f3a0fa988c6a171d40d Mon Sep 17 00:00:00 2001
From: Craig Small <csmall@dropbear.xyz>
Date: Wed, 13 Mar 2024 22:01:07 +1100
Subject: [PATCH] killall,pstree use clock_gettime not uptime
/proc/uptime can become a container uptime in LXC containers
but the process start time is still relative to the boot time.
This means things like "newer than" or "older than" will be incorrect
in some containers, using clock_gettime() fixes this as its always the
hosts boot time.
References:
https://bugs.debian.org/1066090
https://gitlab.com/procps-ng/procps/-/commit/b5e19c1730bcc68d553f44b5585704e3c92267bf#83c45d853acc8384452b404946e4a0c484b16a4e
Signed-off-by: Craig Small <csmall@dropbear.xyz>
---
ChangeLog | 4 ++++
src/killall.c | 39 +++++++++++++++++++--------------------
src/pstree.c | 39 +++++++++++++++++++--------------------
3 files changed, 42 insertions(+), 40 deletions(-)
diff --git ChangeLog ChangeLog
index 15c5725..f4dcfd2 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+Changes in NEXT
+===============
+ * killall,pstree: Use gettime instead of uptime Debian 1066090
+
Changes in 23.7
===============
* build-sys: Make disable-statx work
diff --git src/killall.c src/killall.c
index 81dcc4b..229e61c 100644
--- src/killall.c
+++ src/killall.c
@@ -45,6 +45,7 @@
#include <regex.h>
#include <ctype.h>
#include <assert.h>
+#include <time.h>
#ifdef WITH_SELINUX
#include <dlfcn.h>
@@ -132,30 +133,28 @@ ask (char *name, pid_t pid, const int signal)
/* Never should get here */
}
-static double
-uptime()
-{
- char * savelocale;
- char buf[2048];
- FILE* file;
- if (!(file=fopen( PROC_BASE "/uptime", "r"))) {
- fprintf(stderr, "killall: error opening uptime file\n");
- exit(1);
- }
- savelocale = setlocale(LC_NUMERIC,"C");
- if (fscanf(file, "%2047s", buf) == EOF) perror("uptime");
- fclose(file);
- setlocale(LC_NUMERIC,savelocale);
- return atof(buf);
-}
-/* process age from jiffies to seconds via uptime */
+/* process age from jiffies to seconds via uptime
+ * Cannot use /proc/uptime as this can change in containers
+ * but process start time does not
+ */
static double process_age(const unsigned long long jf)
{
+ struct timespec ts;
+ double sc_clk_tck;
double age;
- double sc_clk_tck = sysconf(_SC_CLK_TCK);
- assert(sc_clk_tck > 0);
- age = uptime() - jf / sc_clk_tck;
+
+ if (clock_gettime(CLOCK_BOOTTIME, &ts) != 0) {
+ perror("clock_gettime():");
+ exit(EXIT_FAILURE);
+ }
+
+ if ( (sc_clk_tck = sysconf(_SC_CLK_TCK)) < 0) {
+ perror("sysconf(CLK_TCK):");
+ exit(EXIT_FAILURE);
+ }
+
+ age = (ts.tv_sec + ts.tv_nsec * 1.0e-9) - jf / sc_clk_tck;
if (age < 0L)
return 0L;
return age;
diff --git src/pstree.c src/pstree.c
index 39265d1..2545e24 100644
--- src/pstree.c
+++ src/pstree.c
@@ -44,6 +44,7 @@
#include <sys/ioctl.h>
#include <limits.h>
#include <locale.h>
+#include <time.h>
#include "i18n.h"
#include "comm.h"
@@ -1028,30 +1029,28 @@ static void trim_tree_by_parent(PROC * current)
trim_tree_by_parent(parent);
}
-static double
-uptime()
-{
- char * savelocale;
- char buf[2048];
- FILE* file;
- if (!(file=fopen( PROC_BASE "/uptime", "r"))) {
- fprintf(stderr, "pstree: error opening uptime file\n");
- exit(1);
- }
- savelocale = setlocale(LC_NUMERIC,"C");
- if (fscanf(file, "%2047s", buf) == EOF) perror("uptime");
- fclose(file);
- setlocale(LC_NUMERIC,savelocale);
- return atof(buf);
-}
-/* process age from jiffies to seconds via uptime */
+/* process age from jiffies to seconds via uptime
+ * Cannot use /proc/uptime as this can change in containers
+ * but process start time does not
+ */
static double process_age(const unsigned long long jf)
{
+ struct timespec ts;
+ double sc_clk_tck;
double age;
- double sc_clk_tck = sysconf(_SC_CLK_TCK);
- assert(sc_clk_tck > 0);
- age = uptime() - jf / sc_clk_tck;
+
+ if (clock_gettime(CLOCK_BOOTTIME, &ts) != 0) {
+ perror("clock_gettime():");
+ exit(EXIT_FAILURE);
+ }
+
+ if ( (sc_clk_tck = sysconf(_SC_CLK_TCK)) < 0) {
+ perror("sysconf(CLK_TCK):");
+ exit(EXIT_FAILURE);
+ }
+
+ age = (ts.tv_sec + ts.tv_nsec * 1.0e-9) - jf / sc_clk_tck;
if (age < 0L)
return 0L;
return age;
--
2.35.3

View File

@@ -1,11 +0,0 @@
--- src/pstree.c
+++ src/pstree.c 2010-07-13 10:18:31.454925471 +0000
@@ -69,7 +69,7 @@ extern const char *__progname;
#define VT_HD "w"
typedef struct _proc {
- char comm[COMM_LEN + 1];
+ char comm[COMM_LEN + 2 + 1]; /* add another 2 for thread brackets */
char **argv; /* only used : argv[0] is 1st arg; undef if argc < 1 */
int argc; /* with -a : number of arguments, -1 if swapped */
pid_t pid;

View File

@@ -1,11 +0,0 @@
--- src/pstree.c
+++ src/pstree.c 2010-07-13 10:14:50.978925622 +0000
@@ -868,7 +868,7 @@ int main(int argc, char **argv)
} else if (isatty(1) && (termname = getenv("TERM")) &&
(strlen(termname) > 0) &&
(setupterm(NULL, 1 /* stdout */ , NULL) == OK) &&
- (tigetstr("acsc") > 0)) {
+ ((int)tigetstr("acsc") > 0)) {
/*
* Failing that, if TERM is defined, a non-null value, and the terminal
* has the VT100 graphics charset, use it.

View File

@@ -1,255 +0,0 @@
--- src/lists.h
+++ src/lists.h 2011-06-21 13:38:35.696426015 +0000
@@ -247,252 +247,3 @@ static inline void move_tail(list_t *res
for (pos = (head)->prev; pos != (head); pos = pos->prev)
#endif /* _LISTS_H */
-/*
- * lists.h Simple doubly linked list implementation,
- * based on <linux/list.h> and <linux/prefetch.h>.
- *
- * Version: 0.1 01-Feb-2011 Fink
- *
- * Copyright 2011 Werner Fink, 2005 SUSE LINUX Products GmbH, Germany.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Author: Werner Fink <werner@suse.de>, 2011
- */
-
-#ifndef _LISTS_H
-#define _LISTS_H
-
-#include <stddef.h>
-#include <sys/types.h>
-
-typedef enum _boolean {false, true} boolean;
-typedef unsigned char uchar;
-#ifndef __USE_MISC
-typedef unsigned short ushort;
-typedef unsigned int uint;
-#endif
-
-#ifndef __OPTIMIZE__
-# warning This will not compile without -O at least
-#endif
-#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
-# ifndef inline
-# define inline __inline__
-# endif
-# ifndef restrict
-# define restrict __restrict__
-# endif
-# ifndef volatile
-# define volatile __volatile__
-# endif
-# ifndef asm
-# define asm __asm__
-# endif
-# ifndef extension
-# define extension __extension__
-# endif
-#endif
-#ifndef attribute
-# define attribute(attr) __attribute__(attr)
-#endif
-
-/*
- * This is lent from the kernel by e.g. using
- *
- * echo '#include <asm-i386/processor.h>\nint main () { prefetch(); return 0; }' | \
- * gcc -I/usr/src/linux/include -D__KERNEL__ -x c -E -P - | \
- * sed -rn '/void[[:blank:]]+prefetch[[:blank:]]*\(/,/^}/p'
- *
- * on the appropiate architecture (here on i686 for i586).
- */
-extern inline void attribute((used,__gnu_inline__,always_inline,__artificial__)) prefetch(const void *restrict x)
-{
-#if defined(__x86_64__)
- asm volatile ("prefetcht0 %0" :: "m" (*(unsigned long *)x))
-#elif defined(__ia64__)
- asm volatile ("lfetch [%0]" :: "r" (x))
-#elif defined(__powerpc64__)
- asm volatile ("dcbt 0,%0" :: "r" (x))
-#elif 1 && defined(__i386__)
- asm volatile ("661:\n\t"
- ".byte 0x8d,0x74,0x26,0x00\n"
- "\n662:\n"
- ".section .altinstructions,\"a\"\n"
- " .align 4\n"
- " .long 661b\n"
- " .long 663f\n"
- " .byte %c0\n"
- " .byte 662b-661b\n"
- " .byte 664f-663f\n"
- ".previous\n"
- ".section .altinstr_replacement,\"ax\"\n"
- " 663:\n\t"
- " prefetchnta (%1)"
- " \n664:\n"
- ".previous"
- :: "i" ((0*32+25)), "r" (x))
-#else
- __builtin_prefetch ((x), 0, 1);
-#endif
- ;
-}
-
-#if defined(DEBUG) && (DEBUG > 0)
-# define __align attribute((packed))
-#else
-# define __align attribute((aligned(sizeof(struct list_struct*))))
-#endif
-#define __packed attribute((packed))
-
-#define alignof(type) ((sizeof(type)+(sizeof(void*)-1)) & ~(sizeof(void*)-1))
-#define strsize(string) ((strlen(string)+1)*sizeof(char))
-
-typedef struct list_struct {
- struct list_struct * next, * prev;
-} __align list_t;
-
-/*
- * Linked list handling
- * ====================
- * The structures which will be linked into such lists have to be of the
- * same type. The structures may have alway a list identifier of the type
- * `list_t' as very first element. With this the macro list_entry() can
- * be used to cast the memory address of a list member to the corresponding
- * allocated structure.
- */
-
-/*
- * Insert new entry as next member.
- */
-static inline void _insert(list_t *restrict new, list_t *restrict here) attribute((always_inline,nonnull(1,2)));
-static inline void _insert(list_t *restrict new, list_t *restrict here)
-{
- list_t * prev = here;
- list_t * next = here->next;
-
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
-}
-
-#define insert(new, list) _insert(&((new)->this), (&(list)));
-#define append(new, list) _insert(&((new)->this), (&(list))->prev);
-
-/*
- * Set head
- */
-static inline void initial(list_t *restrict head) attribute((always_inline,nonnull(1)));
-static inline void initial(list_t *restrict head)
-{
- head->prev = head->next = head;
-}
-
-/*
- * Remove entries, note that the pointer its self remains.
- */
-static inline void delete(list_t *restrict entry) attribute((always_inline,nonnull(1)));
-static inline void delete(list_t *restrict entry)
-{
- list_t * prev = entry->prev;
- list_t * next = entry->next;
-
- next->prev = prev;
- prev->next = next;
-
- initial(entry);
-}
-
-/*
- * Replace an entry by a new one.
- */
-static inline void replace(list_t *restrict old, list_t *restrict new) attribute((always_inline,nonnull(1,2)));
-static inline void replace(list_t *restrict old, list_t *restrict new)
-{
- new->next = old->next;
- new->next->prev = new;
- new->prev = old->prev;
- new->prev->next = new;
-}
-
-static inline void join(list_t *restrict list, list_t *restrict head) attribute((always_inline,nonnull(1,2)));
-static inline void join(list_t *restrict list, list_t *restrict head)
-{
- list_t * first = list->next;
-
- if (first != list) {
- list_t * last = list->prev;
- list_t * at = head->next;
-
- first->prev = head;
- head->next = first;
-
- last->next = at;
- at->prev = last;
- }
-}
-
-static inline boolean list_empty(const list_t *restrict const head) attribute((always_inline,nonnull(1)));
-static inline boolean list_empty(const list_t *restrict const head)
-{
- return head->next == head;
-}
-
-static inline void move_head(list_t *restrict entry, list_t *restrict head) attribute((always_inline,nonnull(1,2)));
-static inline void move_head(list_t *restrict entry, list_t *restrict head)
-{
- list_t * prev = entry->prev;
- list_t * next = entry->next;
-
- next->prev = prev; /* remove entry from old list */
- prev->next = next;
-
- prev = head;
- next = head->next;
-
- next->prev = entry; /* and add it at head of new list */
- entry->next = next;
- entry->prev = prev;
- prev->next = entry;
-}
-
-static inline void move_tail(list_t *restrict entry, list_t *restrict head) attribute((always_inline,nonnull(1,2)));
-static inline void move_tail(list_t *restrict entry, list_t *restrict head)
-{
- list_t * prev = entry->prev;
- list_t * next = entry->next;
-
- next->prev = prev; /* remove entry from old list */
- prev->next = next;
-
- prev = head->prev;
- next = head;
-
- next->prev = entry; /* and add it at tail of new list */
- entry->next = next;
- entry->prev = prev;
- prev->next = entry;
-}
-
-/*
- * The handle of the list is named `this'
- */
-#define list_entry(ptr, type) (__extension__ ({ \
- const typeof( ((type *)0)->this ) *__mptr = (ptr); \
- ((type *)( (char *)(__mptr) - offsetof(type,this) )); }))
-#define list_for_each(pos, head) \
- for (pos = (head)->next; prefetch(pos->next), pos != (head); pos = pos->next)
-#define np_list_for_each(pos, head) \
- for (pos = (head)->next; pos != (head); pos = pos->next)
-#define list_for_each_safe(pos, safe, head) \
- for (pos = (head)->next, safe = pos->next; pos != (head); pos = safe, safe = pos->next)
-#define list_for_each_prev(pos, head) \
- for (pos = (head)->prev; prefetch(pos->prev), pos != (head); pos = pos->prev)
-#define np_list_for_each_prev(pos, head) \
- for (pos = (head)->prev; pos != (head); pos = pos->prev)
-
-#endif /* _LISTS_H */

View File

@@ -1,48 +0,0 @@
--- configure.ac
+++ configure.ac 2010-10-15 09:00:32.915927054 +0000
@@ -72,7 +72,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
struct user_regs_struct.rdi,
struct user_regs_struct.rsi,
struct user_regs_struct.rdx], [],[],
- [#include <bits/types.h>
+ [#include <sys/types.h>
#include <sys/user.h>])
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
--- src/fuser.c
+++ src/fuser.c 2011-02-08 16:08:59.823926228 +0000
@@ -888,7 +888,8 @@ int main(int argc, char *argv[])
char option_buf[3];
struct option *optr;
char *nsptr;
- int skip_argv;
+ int skip_argv;
+ int seen_file;
struct option options[] = {
{"all", 0, NULL, 'a'},
@@ -927,6 +928,7 @@ int main(int argc, char *argv[])
netdev = find_net_dev();
fill_unix_cache(&unixsockets);
+ seen_file = 0;
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++) {
current_argv = argv[argc_cnt];
if (current_argv[0] == '-') { /* its an option */
@@ -1056,6 +1058,7 @@ int main(int argc, char *argv[])
}
}
this_name->matched_procs = NULL;
+ seen_file = 1;
if (opts & (OPT_MOUNTS|OPT_ISMOUNTPOINT)
&& this_name->name_space != NAMESPACE_FILE)
usage(_
@@ -1103,7 +1106,7 @@ int main(int argc, char *argv[])
names_tail->next = this_name;
names_tail = this_name;
} /* for across the argvs */
- if (names_head == NULL)
+ if (names_head == NULL && !seen_file)
usage(_("No process specification given"));
if (opts & OPT_SILENT) {

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42c30ad9a9a85429edd0e84763e1333a1d0711d90e4f1943ecb1211d6f98ee42
size 382041

View File

@@ -1,16 +1,20 @@
---
src/pstree.c | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)
--- src/pstree.c
+++ src/pstree.c 2010-07-13 10:27:54.139239142 +0000
@@ -61,6 +61,7 @@ extern const char *__progname;
+++ src/pstree.c 2022-12-13 07:46:58.243076344 +0000
@@ -81,6 +81,7 @@ extern const char *__progname;
#define UTF_HD "\342\224\254" /* U+252C, Horizontal and down */
#define VT_BEG "\033(0\017" /* use graphic chars */
+#define VT_LEN 4
+#define VT_LEN 4
#define VT_END "\033(B" /* back to normal char set */
#define VT_V "x" /* see UTF definitions above */
#define VT_VR "t"
@@ -230,6 +231,27 @@ static void out_scontext(security_contex
@@ -594,6 +595,28 @@ static void out_scontext(const PROC *cur
out_string("'");
}
#endif /*WITH_SELINUX */
+/*
+ * Only affects vt100 line drawing mode: Do not count the strlen of
@@ -19,24 +23,25 @@
+static void
+out_sym (const char *str)
+{
+ int seq = 0;
+ if (sym == &sym_vt100 && *str == '\033') {
+ seq = 1;
+ if (cur_x <= output_width || !trunc)
+ cur_x -= VT_LEN;
+ }
+ out_string(str);
+ if (seq) {
+ str = VT_END;
+ while (*str)
+ putchar (*str++);
+ }
+ int seq = 0;
+ if (sym == &sym_vt100 && *str == '\033') {
+ seq = 1;
+ if (cur_x <= output_width || !trunc)
+ cur_x -= VT_LEN;
+ }
+ out_string(str);
+ if (seq) {
+ str = VT_END;
+ while (*str)
+ putchar (*str++);
+ }
+}
+
+
static void out_newline(void)
{
@@ -426,11 +448,12 @@ dump_tree(PROC * current, int level, int
if (last_char && cur_x == output_width)
@@ -833,11 +856,12 @@ dump_tree(PROC * current, int level, int
for (lvl = 0; lvl < level; lvl++) {
for (i = width[lvl] + 1; i; i--)
out_char(' ');
@@ -50,11 +55,11 @@
+ * to handle VT100 line drawing sequences if VT100 mode is active:
+ */
+ out_sym(lvl == level - 1 ? last ? sym->last_2 : sym->branch_2 :
+ more[lvl + 1] ? sym->vert_2 : sym->empty_2);
+ more[lvl + 1] ? sym->vert_2 : sym->empty_2);
}
if (rep < 2)
add = 0;
@@ -531,7 +554,7 @@ dump_tree(PROC * current, int level, int
@@ -947,7 +971,7 @@ dump_tree(PROC * current, int level, int
}
width[level] = comm_len + cur_x - offset + add;
if (cur_x >= output_width && trunc) {
@@ -63,7 +68,7 @@
out_string("+");
out_newline();
return;
@@ -553,7 +576,7 @@ dump_tree(PROC * current, int level, int
@@ -971,7 +995,7 @@ dump_tree(PROC * current, int level, int
}
}
if (first) {

16
psmisc-gcc15.patch Normal file
View File

@@ -0,0 +1,16 @@
Index: psmisc-v23.7/src/lists.h
===================================================================
--- psmisc-v23.7.orig/src/lists.h
+++ psmisc-v23.7/src/lists.h
@@ -18,9 +18,10 @@
#define _LISTS_H
#include <stddef.h>
+#include <stdbool.h>
#include <sys/types.h>
-typedef enum _boolean {false, true} boolean;
+typedef bool boolean;
typedef unsigned char uchar;
#ifndef __USE_MISC
typedef unsigned short ushort;

51
psmisc-v23.7.dif Normal file
View File

@@ -0,0 +1,51 @@
---
configure.ac | 2 +-
src/fuser.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
--- configure.ac
+++ configure.ac 2022-12-13 07:57:11.751636898 +0000
@@ -169,7 +169,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
struct user_regs_struct.rdi,
struct user_regs_struct.rsi,
struct user_regs_struct.rdx], [],[],
- [#include <bits/types.h>
+ [#include <sys/types.h>
#include <sys/user.h>])
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
--- src/fuser.c
+++ src/fuser.c 2022-12-13 07:59:50.896670010 +0000
@@ -1223,6 +1223,7 @@ int main(int argc, char *argv[])
struct option *optr;
char *nsptr;
int skip_argv;
+ int seen_file;
struct option options[] = {
{"all", 0, NULL, 'a'},
@@ -1266,6 +1267,7 @@ int main(int argc, char *argv[])
#endif
atexit(atexit_free_lists);
+ seen_file = 0;
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++)
{
current_argv = argv[argc_cnt];
@@ -1416,6 +1418,7 @@ int main(int argc, char *argv[])
}
}
this_name->matched_procs = NULL;
+ seen_file = 1;
if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT)
&& this_name->name_space != NAMESPACE_FILE)
{
@@ -1467,7 +1470,7 @@ int main(int argc, char *argv[])
names_tail->next = this_name;
names_tail = this_name;
} /* for across the argvs */
- if (names_head == NULL)
+ if (names_head == NULL && !seen_file)
usage(_("No process specification given"));
/* Check if -M flag was used and if so check mounts */

BIN
psmisc-v23.7.tar.bz2 LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,524 @@
-------------------------------------------------------------------
Tue Jul 15 11:31:55 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Add patch 0001-fuser-Fix-expandpath.patch
* Is an upstream commit which fixes https://gitlab.com/psmisc/psmisc/-/issues/57
as well as bug boo#1242093
-------------------------------------------------------------------
Thu Mar 13 09:45:47 UTC 2025 - pgajdos@suse.com
- fix build with gcc15
- added patches
+ psmisc-gcc15.patch
-------------------------------------------------------------------
Tue Feb 18 12:04:10 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Looks like Factory and TW includes glibc-gconv-modules-extra at build time
-------------------------------------------------------------------
Thu Dec 5 12:30:55 UTC 2024 - Adrian Schröter <adrian@suse.de>
- add loongarch64 as peekfd supported arch
-------------------------------------------------------------------
Mon May 27 11:55:43 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Update to 23.7
* build-sys: Make disable-statx work
* fuser: Fallback to stat() if no statx() Debian 1030747 #48
* fuser: silently ignore EACCES when scanning proc directories
* killall: small formatting fixes Debian #1037231
* pstree: Do not assume root PID #49
* pslog: include config.h #51 !36
* misc: Update gettext to 0.21
- Add patch from upstream 0001-killall,pstree-use-clock_gettime-not-uptime.patch
- Port the patches
* 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* psmisc-22.21-pstree.patch
- Port patch psmisc-v23.6.dif and rename it to psmisc-v23.7.dif
-------------------------------------------------------------------
Thu Feb 29 15:01:09 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Mon Oct 23 13:36:04 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- Fix version at configure time as there was no .tarball-version
-------------------------------------------------------------------
Thu Feb 16 16:06:59 UTC 2023 - Ludwig Nussel <lnussel@suse.de>
- allow to switch off Apparmor support via bcond
-------------------------------------------------------------------
Tue Dec 27 13:15:30 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
- Replace transitional %usrmerged macro with regular version check (boo#1206798)
-------------------------------------------------------------------
Tue Dec 13 08:01:33 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Update to 23.6:
* buildsys: Fix DEJAGNU work-around Debian #1015089
* killall: Use kill if pidfd_send_signal fails Debian #1015228
* fuser: Do not mention nonexistent - reset option #42
* fuser: Use modern statn where possible
* pstree: Better AppArmor support !30
* killall: Check truncated names !28
* killall: Use openat and pidfd_send_signal #37
* killall: Don't check paths of sockets #35
* pstree: Check for process with show_parents #38
* pstree: Don't disable compaction with show pgids #34
* pstree: Fix storage leak !29
- Enable new apparmor support
- Remove patch now upstream
0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Port patch psmisc-22.21-pstree.patch
- Port patch psmisc-v23.4.dif which now becomes psmisc-v23.6.dif
- Merge patch socket-fix.patch with ported patch
0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
-------------------------------------------------------------------
Fri Nov 25 11:48:39 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Add patch socket-fix.patch
* Add test to check for named sockets as file as well as on mounts
* Fix code to find named sockets
- The former test requires nc at build aka netcat from openbsd to
create a named socket on the fly
-------------------------------------------------------------------
Wed Feb 23 13:04:06 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Add a fallback if the system call name_to_handle_at() is
not supported by the used file system.
-------------------------------------------------------------------
Tue Feb 1 12:39:16 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Determine the namespace of a process only once to speed
up the parsing of fdinfo (bsc#1194172).
- Adopt patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
-------------------------------------------------------------------
Thu Jan 20 13:57:13 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Update to 23.4:
* killall: Dynamically link to selinux and use security attributes
* pstree: Do not crash on missing processes !21
* pstree: fix layout when using -C !24
* pstree: add time namespace !25
* pstree: Dynamically link to selinux and use attr
* fuser: Get less confused about duplicate dev_id !10
* fuser: Only check pathname on non-block devices !31
- Rebase 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Rebase 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Port psmisc-22.21-pstree.patch
- Delete psmisc-v23.3-selinux.patch as not needed anymore
- Rename psmisc-v23.3.dif which is now psmisc-v23.4.dif with correct offsets
-------------------------------------------------------------------
Thu May 20 07:21:45 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Do not change CAP within spec file (boo#1186258)
-------------------------------------------------------------------
Fri May 7 14:53:08 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Fix bsc#1185208 to make private mount namespaces work as well
as to distinguish NFS mounts from same remote device share.
-------------------------------------------------------------------
Fri Mar 5 14:10:11 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Change patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Fix bsc#1178407: fuser does not show open kvm storage image files
such as qcow2 files. Patch from Ali Abdallah <ali.abdallah@suse.com>
-------------------------------------------------------------------
Thu Jan 14 15:48:53 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Now with 23.3 peekfd is build even for aarch64
-------------------------------------------------------------------
Thu Jan 14 11:58:43 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Rework 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
and split off the patch psmisc-v23.3-selinux.patch
- Rework 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- New patch psmisc-v23.3-selinux.patch
- Rename patch psmisc-v23.2.dif which is now psmisc-v23.3.dif
-------------------------------------------------------------------
Thu Dec 31 09:40:07 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
- Update to 23.3:
* killall: check also truncated 16 char comm names Debian
* fuser: Return early if have nulls
* peekfd: Add support for ARM64
* pstree: Add color by age
* fuser: Use larger inode sizes
- Rebase 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Rebase 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
- Rebase psmisc-22.21-pstree.patch
-------------------------------------------------------------------
Fri Oct 16 10:18:52 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- prepare usrmerge (boo#1029961)
-------------------------------------------------------------------
Mon Apr 27 14:57:57 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Allow not unique mounts as well as not unique mountpoint (bsc#1170247)
-------------------------------------------------------------------
Thu Sep 19 11:57:44 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
- Do not recommend lang package. The lang package already has a
supplements.
-------------------------------------------------------------------
Fri Nov 30 13:21:44 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
* Always initialize head of simple linked list (bsc#1098697)
* stat(2) on binary does not see subvol dev
-------------------------------------------------------------------
Wed Nov 14 07:44:55 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
to handle sub volumes of the btrFS (bsc#1112780)
-------------------------------------------------------------------
Mon Nov 5 07:48:25 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Modify patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
to support older systems with statx kernel support
-------------------------------------------------------------------
Fri Nov 2 13:37:49 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
to respect autofs as well as afs file system
- Add patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
to use statx(2) system call since kernel 4.12. Now it is possible
to avoid sync with remote file servers as well as trigger autofs
mounts due stat(x) calls.
-------------------------------------------------------------------
Tue Oct 23 10:10:12 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Support also btrFS entries in mountinfo, that is use stat(2) to
determine the device of the mounted subvolume (bsc#1098697, bsc#1112780)
-------------------------------------------------------------------
Mon Oct 22 10:52:10 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Update to version 23.2
* misc: Command names increased from 16 to 64 characters
* buildsys: signals.c depends on signames.h !16
* docs: Fix fuser.1 groff errors Debian #900225
* killall: look at all namespaces by default
* killall: Fix -INT option parsing #11
* killall: ignore -n 0 #15
* killall: another crack at fixing getopt #12 #13
* peekfd: Attach to all threads option !15
* pslog: Define PATH_MAX if required Debian:#905797
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
- Remove patches now upstream solved
* psmisc-23.0-killall-signals.patch
* psmisc-23.0-killall.patch
- Modify and rename patch psmisc-23.0.dif which now becomes psmisc-v23.2.dif
-------------------------------------------------------------------
Mon Sep 17 12:08:31 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Add COPYING to file list as otherwise a required fix does not
reach anything
-------------------------------------------------------------------
Fri Jun 22 16:33:00 UTC 2018 - werner@suse.de
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
to make fuser option -m <block_device> work even with mountinfo
(bsc#1098697)
-------------------------------------------------------------------
Thu May 17 10:32:53 UTC 2018 - werner@suse.de
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
to let fuser -m also work for private mounts as well (boo#1093665)
-------------------------------------------------------------------
Fri Oct 13 07:10:39 UTC 2017 - werner@suse.de
- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
to run even on older kernels missing mnt_id tag in fdinfo
-------------------------------------------------------------------
Mon Sep 18 10:17:52 UTC 2017 - werner@suse.de
- Add patch psmisc-23.0-killall-signals.patch to fix boo#1058990
by prior scanning for signal names in the arguments of killall
-------------------------------------------------------------------
Thu Jul 6 13:59:36 UTC 2017 - werner@suse.de
- Update patch
0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
-------------------------------------------------------------------
Wed Jul 5 13:24:01 UTC 2017 - werner@suse.de
- Remove patches
* psmisc-22.21-lessnfs.patch
* psmisc-22.21-mntpt.patch
* psmisc-23.0-net.patch
- Add patch
0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
from https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
which is a heavily rework fuser used on NFS
* Use mountinfo to be able to use the mount identity
which allows to distinguish different mounts with the
same device number as it happens with NFS shares.
* Smaller cleanup as support of chroot environments
and older systems.
* Add support for name_to_handle_at() system call to
get the real mount ID for each file
- Use test suite of psmisc in %check rpm section
-------------------------------------------------------------------
Wed Jun 28 13:11:49 UTC 2017 - werner@suse.de
- Add patch psmisc-23.0-net.patch to reenable network support
broken to my own upstream commit
-------------------------------------------------------------------
Wed Jun 28 10:00:16 UTC 2017 - werner@suse.de
- Add patch psmisc-23.0-killall.patch to remove left over debug
output in killall utility (boo#1046237)
-------------------------------------------------------------------
Tue Jun 20 15:06:43 UTC 2017 - werner@suse.de
- Update to version 23.0
* killall: Fix process age race condition !11 Debian #822861
* killall: only use scope of current namespace by default
* killall: better parsing of command names
* pstree: add cgroup namespaces !10
* peekfd: Help give long options too !5
* killall: correctly report when 32+ procs match !8
* prtat: Remove duplicate options in man page !3 Debian #846387
* pslog: New program to check what logs are open merge !1
* fuser: increase path length for octal escaping SF [#37]
* Make usage of linked lists of devices found in
/proc/self/mountinfo optional
* Make timeout() in timeout.c work with shared mmap to
reduce the load due write/read the stat buffers
* Add list_sort() to lists.h to be able to sort lists
* fuser: Fixed typo for -M flag. Debian #740275
* pstree: by default doesn't show threadnames, use -t to show
as it disables compaction. SF [#33] Debian #815902
* pstree: Removed need for PATH_MAX Debian #750405
* pstree: ignores disappeared processes. SF [#34]
* killall: -o and -y work with -r flags. SF [#64]
* m4/gettext.m4: Upgrade to gettext-0.19.4.
* m4/iconv.m4: Upgrade to gettext-0.19.4.
* m4/lib-ld.m4: Upgrade to gettext-0.19.4.
* m4/lib-link.m4: Upgrade to gettext-0.19.4.
* m4/lib-prefix.m4: Upgrade to gettext-0.19.4.
* m4/nls.m4: Upgrade to gettext-0.19.4.
* m4/po.m4: Upgrade to gettext-0.19.4.
* m4/progtest.m4: Upgrade to gettext-0.19.4.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4.
- Make it build, that is create a po/POTFILES.in
- Remove obsolete patches
* psmisc-22.21-boo908063.patch
* psmisc-22.12-tigetstr.patch
* psmisc-22.21-upstream.patch
* psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch
- Rename patch psmisc-22.21.dif which becomes psmisc-23.0.dif
- Make /bin/fuser a symblic link of /usr/bin/fuser (boo#1029973)
- Last revision was 78
-------------------------------------------------------------------
Tue Jun 20 14:00:36 UTC 2017 - werner@suse.de
- Modify psmisc-22.21.dif to enforce the usage of `m' flag in
sscanf() instead of `a' for allocation. Also avoid to small
buffers and include sys/sysmacros.h for makedev macro.
- Add the patch psmisc-22.21-lessnfs.patch to support device
files of mount points as well (boo#1044638)
- Add the patch psmisc-22.21-mntpt.patch to do strinfg comparision
only for NFS shares
-------------------------------------------------------------------
Thu May 21 13:39:34 UTC 2015 - schwab@suse.de
- Replace negative list %nopeek with positive list %have_peekfd
-------------------------------------------------------------------
Tue Mar 24 11:58:08 UTC 2015 - werner@suse.de
- Add patch psmisc-22.21-boo908063.patch to avoid to close files
which are never open (boo#908063)
-------------------------------------------------------------------
Fri Apr 25 00:59:39 CEST 2014 - ro@suse.de
- add patch to fix fuser -M option active all the time (bnc#874983)
psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch
-------------------------------------------------------------------
Mon Mar 24 16:01:51 UTC 2014 - werner@suse.de
- Update to version 22.21
* Missing comma in fuser(1) added Debian #702391
* pstree uses COLUMN env variable Debian #717017
* pstree shows proper thread names SF Bug#57
* pstree shows namespace options SF Patch#30
* killall.1 minor fixes SF Bug#59
* peekfd for m68k SF Patch#31
* Fixing some derefefed pointers SF Patch#32
* Minor typos in man pages SF Bug#61 Bug#60
* fuser -m and -M flags work either way Debian #606178
- Remove patch
psmisc-22.20-pstree.patch as now part of upstream
peekfd-m68k.patch as now part of upstream
- Port the patches
psmisc-22.20-upstream.patch which becomes psmisc-22.21-upstream.patch
psmisc-22.20.dif which becomes psmisc-22.21.dif
psmisc-22.12-pstree.patch which becomes psmisc-22.21-pstree.patch
-------------------------------------------------------------------
Wed Oct 23 14:35:46 UTC 2013 - p.drouand@gmail.com
- Remove %fillup_prereq %insserv_prereq PreReq; package provides
neither sysconfigfile or sysvinit script
- Use %lang_package instead of define a lang subpackage manually
- Use %configure instead of ./configure
- Don't define CC and CXX flags manually
- Remove redundant %clean section
-------------------------------------------------------------------
Wed Oct 9 12:33:26 UTC 2013 - schwab@suse.de
- peekfd-m68k.patch: Port peekfd to m68k
-------------------------------------------------------------------
Sat Feb 9 12:46:46 UTC 2013 - schwab@suse.de
- peekfd hasn't been ported to aarch64 yet
-------------------------------------------------------------------
Tue Dec 18 17:16:02 UTC 2012 - werner@suse.de
- Update to version 22.20 + upstream patch
* Make usage of linked lists of devices found in
/proc/self/mountinfo optional
* Make timeout() in timeout.c work with shared mmap to
reduce the load due write/read the stat buffers
* Add list_sort() to lists.h to be able to sort lists
* pstree sorts properly on names Debian #682014
* fuser -m regresion fixed SF #3559232, thanks to hanpt
* pstree finds orphaned processes SF#3537508
* fuser finds unix sockets again SF #3502649
* pstree finds pid 0 stops looping Debian #687829
* killall with no args exits again SF #3536526
* Added AC_CANONICAL_TARGET for target_os Debian #673485
* sed doesn't have [0-9]+ replace with [0-9][0-9]*
* assert in killall triggered for small lifetimes Debian #628617
* killall MAX_NAMES off by one Debian #677428
* Removed remaining parts of pidof
* fuser uses correct timeout_stat define Debian #661723
* fuser is not compiled on hurd-i386 Debian #673485
* No TEXTRELS in src/lists built as PIE on x86
* Fake pstree root for kernels with hidepid turned on
* More fixes for Cygwin SF Patch #3511920
* pstree can show PGIDs SF Patch #3471056
- This should fix the bug reported by Madhu
-------------------------------------------------------------------
Tue Mar 13 15:26:37 UTC 2012 - werner@suse.de
- Submit ASCII null fix in pstree upsrtream
- Submit support for static background process for stat system call
upstream
- Rebuild package with upstream patches
-------------------------------------------------------------------
Mon Feb 27 17:43:46 UTC 2012 - werner@suse.de
- Update to version 22.16
* Use strncpy for COMM_LEN and make it 18 characters to cover
brackets in name.
* don't change COMM_LEN, it breaks matching long commands
Debian #661145
* Enable some harden AM_CFLAGS by default, use configure option
--disable-harden-flags to not use it.
* Use ENOENT not EBADE for FreeBSD Debian #631566
* Fix prstat typos
* Stop zombies by using waitpid Ubuntu #876387 by Peter Holik, SF#3429674
* Fixed minor older/younger typo in killall.1 thanks to Maikel Linke
* Correct defines for timeout in configure.ac
-------------------------------------------------------------------
Thu Dec 1 15:57:50 UTC 2011 - coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Tue Oct 11 15:36:40 UTC 2011 - werner@suse.de
- Use __builtin___strcpy_ instead of __builtin___strcpy_chk to avoid
trouble with char path[0] tag in struct handle (bnc#723304)
-------------------------------------------------------------------
Fri Oct 7 14:08:31 UTC 2011 - werner@suse.de
- Make main fuser process more robust against broken pipe and check
for helper process within a SIGCHLD handler
-------------------------------------------------------------------
Wed Oct 5 09:47:38 UTC 2011 - werner@suse.de
- Handle internal size of structure stat by including config.h
to avoid size missmatch during copy result back (bnc#720882)
-------------------------------------------------------------------
Mon Oct 3 10:56:19 UTC 2011 - mmarek@suse.cz
- Fix segfault in pstree, patch by Tetsuo Handa (bnc#718915).
-------------------------------------------------------------------
Wed Sep 28 10:43:03 UTC 2011 - coolo@suse.com
- back out the timeout patch, it breaks fuser on i586 completely
(bnc#720882)
-------------------------------------------------------------------
Mon Sep 12 14:28:38 UTC 2011 - werner@suse.de
- Update to pre version 22.15
+ Really apply patch for SF#31110178 RH#651794
+ Conditionally use fork before stat calls
+ Patch from Corrina Vinschen for compiling on cygwin
+ Remove doubled content in src/lists.h
+ Add another 2 for thread brackets in pstree.c
- Change fork before stat calls to be in best case a second process
using two pipes for bidirectional communication with main.
-------------------------------------------------------------------
Tue Jun 21 15:56:45 CEST 2011 - werner@suse.de

View File

@@ -1,7 +1,7 @@
#
# spec file for package psmisc
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,32 +12,46 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# norootforbuild
%bcond_without apparmor
Name: psmisc
BuildRequires: gcc-c++ glibc-devel ncurses-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: dejagnu
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel
BuildRequires: libselinux-devel
Url: http://sourceforge.net/projects/psmisc/
License: GPLv2+
Group: System/Monitoring
PreReq: %fillup_prereq %insserv_prereq
Version: 22.14
Release: 1
BuildRequires: linux-glibc-devel >= 4.12
BuildRequires: ncurses-devel
BuildRequires: netcat-openbsd
%if %{with apparmor}
BuildRequires: pkgconfig(libapparmor)
%endif
URL: https://gitlab.com/psmisc/psmisc/
Version: 23.7
Release: 0
Provides: ps:/usr/bin/killall
Summary: Utilities for managing processes on your system
Source: http://sourceforge.net/projects/psmisc/files/psmisc/%{name}-%{version}.tar.gz
Patch0: %name-22.14.dif
Patch1: %name-22.12-tigetstr.patch
Patch2: %name-22.12-pstree_overflow.patch
Patch3: %name-22.12-pstree.patch
Patch4: %name-22.14-toomuch.dif
License: GPL-2.0-or-later
Group: System/Monitoring
Source: https://gitlab.com/%{name}/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
Patch0: %{name}-v%{version}.dif
Patch1: 0001-killall,pstree-use-clock_gettime-not-uptime.patch
Patch2: %{name}-22.21-pstree.patch
# PATCH-ADD-SUSE boo#908068, boo#1046237, boo#1046237
# https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
Patch3: 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
# https://gitlab.com/psmisc/psmisc/-/issues/59
Patch4: psmisc-gcc15.patch
# https://gitlab.com/psmisc/psmisc/-/issues/57
Patch5: 0001-fuser-Fix-expandpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define nopeek s390 s390x ia64 %sparc hppa
%define have_peekfd %ix86 x86_64 ppc ppc64 ppc64le %arm mipsel m68k aarch64 loongarch64
%description
The psmisc package contains utilities for managing processes on your
@@ -47,52 +61,74 @@ command sends a specified signal (SIGTERM if nothing is specified) to
processes identified by name. The fuser command identifies the PIDs of
processes that are using specified files or filesystems.
%lang_package
%prep
%setup -q
%patch1 -p0 -b .tigetstr
%patch2 -p0 -b .pstreeovfl
%patch3 -p0 -b .pstree
%patch4 -p0 -b .2much
%patch0 -p0 -b .0
%setup -q -n %{name}-v%{version}
%patch -P 1 -p0 -b .uptime
%patch -P 2 -p0 -b .pstree
%patch -P 3 -p0 -b .mntinf
%patch -P 5 -p1 -b .tcp
%patch -P 0 -p0 -b .p0
%patch -P 4 -p1
%build
grep -h src/ po/*.po|\
sed -r 's/^#: //'|\
tr ' ' '\n'|\
sort -t : -k1,1 -u|\
sed -r 's/:[0-9]+$//' > po/POTFILES.in
echo %version > .tarball-version
autoreconf -fi
CFLAGS="-D_GNU_SOURCE ${RPM_OPT_FLAGS} -pipe"
CFLAGS="-D_GNU_SOURCE -D_DEFAULT_SOURCE ${RPM_OPT_FLAGS} -pipe -fPIE"
CXXFLAGS="$CFLAGS"
LDFLAGS=-pie
CC=gcc
CXX=g++
export CFLAGS CXXFLAGS CC CXX
sh ./configure --prefix=%{_prefix} --mandir=%{_mandir} --enable-selinux
export CFLAGS CXXFLAGS LDFLAGS CC
%configure --disable-rpath \
--with-gnu-ld \
%{?with_apparmor:--enable-apparmor} \
--enable-selinux
make %{?_smp_mflags} CFLAGS="$CFLAGS" "CC=$CC"
%check
make check
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/bin/
mv $RPM_BUILD_ROOT/usr/bin/fuser $RPM_BUILD_ROOT/bin/
%ifarch %nopeek
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/peekfd.1*
make DESTDIR=%{buildroot} install
%if 0%{?suse_version} < 1550
mkdir -p %{buildroot}/bin/
ln -sf %{_bindir}/fuser %{buildroot}/bin/
%endif
%ifnarch %have_peekfd
rm -f %{buildroot}%{_mandir}/man1/peekfd.1*
%endif
%find_lang psmisc
%clean
rm -rf $RPM_BUILD_ROOT
%files -f psmisc.lang
%files
%defattr (-,root,root,755)
%license COPYING
%if 0%{?suse_version} < 1550
/bin/fuser
%endif
%{_bindir}/fuser
%{_bindir}/killall
%ifnarch %nopeek
%ifarch %have_peekfd
%{_bindir}/peekfd
%endif
%{_bindir}/prtstat
%{_bindir}/pslog
%{_bindir}/pstree
%{_bindir}/pstree.x11
%{_mandir}/man1/fuser.1*
%{_mandir}/man1/killall.1*
%ifnarch %nopeek
%ifarch %have_peekfd
%{_mandir}/man1/peekfd.1*
%endif
%{_mandir}/man1/prtstat.1*
%{_mandir}/man1/pslog.1*
%{_mandir}/man1/pstree.1*
%files lang -f %{name}.lang
%changelog