summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-08-02 08:56:08 +0000
committerRoy Marples <uberlord@gentoo.org>2007-08-02 08:56:08 +0000
commit44f174bc3141cd48a518352d240f1597fa11c431 (patch)
tree21655cc4b18da136de5ff4ca6002f86c8d2d597a /sys-process/psmisc
parentRemove old version. (diff)
downloadhistorical-44f174bc3141cd48a518352d240f1597fa11c431.tar.gz
historical-44f174bc3141cd48a518352d240f1597fa11c431.tar.bz2
historical-44f174bc3141cd48a518352d240f1597fa11c431.zip
Add a patch from marienz to improve the finding of sockets
Package-Manager: portage-2.1.3_rc9
Diffstat (limited to 'sys-process/psmisc')
-rw-r--r--sys-process/psmisc/ChangeLog8
-rw-r--r--sys-process/psmisc/Manifest29
-rw-r--r--sys-process/psmisc/files/digest-psmisc-22.5-r23
-rw-r--r--sys-process/psmisc/files/psmisc-22.5-sockets.patch87
-rw-r--r--sys-process/psmisc/psmisc-22.5-r2.ebuild48
5 files changed, 160 insertions, 15 deletions
diff --git a/sys-process/psmisc/ChangeLog b/sys-process/psmisc/ChangeLog
index 65cd2d29cce0..e667142fdc2d 100644
--- a/sys-process/psmisc/ChangeLog
+++ b/sys-process/psmisc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-process/psmisc
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/ChangeLog,v 1.61 2007/07/11 21:49:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/ChangeLog,v 1.62 2007/08/02 08:56:08 uberlord Exp $
+
+*psmisc-22.5-r2 (02 Aug 2007)
+
+ 02 Aug 2007; Roy Marples <uberlord@gentoo.org>
+ +files/psmisc-22.5-sockets.patch, +psmisc-22.5-r2.ebuild:
+ Add a patch from marienz to improve the finding of sockets
*psmisc-22.5-r1 (11 Jul 2007)
diff --git a/sys-process/psmisc/Manifest b/sys-process/psmisc/Manifest
index 0c15d1056608..36099b11e403 100644
--- a/sys-process/psmisc/Manifest
+++ b/sys-process/psmisc/Manifest
@@ -1,10 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX psmisc-22.2-gcc2.patch 1625 RMD160 8e1b80c56a5a3dfea3db3ae554f9a33f910b9699 SHA1 bb779b02988837bff2dbaec5aa7909d5e84a050f SHA256 6a710d66db02902db9b99d57abde991ab172b7a41b29b33eb3e552422e0843b5
MD5 4b14fe14a62770a45a7e3bc5cd54ea26 files/psmisc-22.2-gcc2.patch 1625
RMD160 8e1b80c56a5a3dfea3db3ae554f9a33f910b9699 files/psmisc-22.2-gcc2.patch 1625
SHA256 6a710d66db02902db9b99d57abde991ab172b7a41b29b33eb3e552422e0843b5 files/psmisc-22.2-gcc2.patch 1625
+AUX psmisc-22.5-sockets.patch 4178 RMD160 f47532677c80a8411d8036940587fbc9246e3b67 SHA1 9e00314d9ecf181a359e4703de07495af51df6f5 SHA256 e47d0fc4803713e669ef45d4caca52826cd794dff476e2920f5ae02bb7475103
+MD5 6a06aaa609390001287fd3faff8a5702 files/psmisc-22.5-sockets.patch 4178
+RMD160 f47532677c80a8411d8036940587fbc9246e3b67 files/psmisc-22.5-sockets.patch 4178
+SHA256 e47d0fc4803713e669ef45d4caca52826cd794dff476e2920f5ae02bb7475103 files/psmisc-22.5-sockets.patch 4178
AUX psmisc-22.5-user-header.patch 234 RMD160 a284b4898a868894a5956a689f5c64969422c2ce SHA1 c01a28043beb7acc4b05d96d016c16275af6a07b SHA256 68035208f6e4d94af61c79fcb3041a2607c8df19d751f0650dc46ca13ec7aedb
MD5 d07d5aedc05be5004bdb89e44ecde323 files/psmisc-22.5-user-header.patch 234
RMD160 a284b4898a868894a5956a689f5c64969422c2ce files/psmisc-22.5-user-header.patch 234
@@ -24,14 +25,18 @@ EBUILD psmisc-22.5-r1.ebuild 1272 RMD160 7a6e42b601e41c17bd3fb51c68f1c0030452ef5
MD5 add0f9441bd0d9c20f5988d31ab4234b psmisc-22.5-r1.ebuild 1272
RMD160 7a6e42b601e41c17bd3fb51c68f1c0030452ef52 psmisc-22.5-r1.ebuild 1272
SHA256 e8c8652ca19a67fac45153feca25ac1d3d3d28c3f7e5d9fa6b71a16ed9cab39f psmisc-22.5-r1.ebuild 1272
+EBUILD psmisc-22.5-r2.ebuild 1315 RMD160 4b08fb8a0b0d2250ac6ca8271fb7f26c227b7ad5 SHA1 8678b695f972ce290011f1cfaa3bd5b06bcad6ef SHA256 2950c04b02859109dda4a4c1be7ca7fffc98ffce3ad1cc83c886dad4214d5422
+MD5 2da568ed9ddbd183216442caa11df5bd psmisc-22.5-r2.ebuild 1315
+RMD160 4b08fb8a0b0d2250ac6ca8271fb7f26c227b7ad5 psmisc-22.5-r2.ebuild 1315
+SHA256 2950c04b02859109dda4a4c1be7ca7fffc98ffce3ad1cc83c886dad4214d5422 psmisc-22.5-r2.ebuild 1315
EBUILD psmisc-22.5.ebuild 1183 RMD160 60ba6080ad837097ec120fc92a351d409e0bcd1c SHA1 0374d721ea8f28170b887a0412494f5a70001b23 SHA256 5b3af1a299ab5dd2ef106dbc3e305006d394637cb378d120e04e3e2c3e219571
MD5 0a558085d9639e0cfab02d585a99411f psmisc-22.5.ebuild 1183
RMD160 60ba6080ad837097ec120fc92a351d409e0bcd1c psmisc-22.5.ebuild 1183
SHA256 5b3af1a299ab5dd2ef106dbc3e305006d394637cb378d120e04e3e2c3e219571 psmisc-22.5.ebuild 1183
-MISC ChangeLog 13063 RMD160 dfdfadf42a867313c045f1525ca801e07d823834 SHA1 2cc6c22e7add9c5fb90ade4a0e81522def77aace SHA256 bac98173fd9bf82e7625caae1e5f041f4bec28c029797e88979b485862bedfb5
-MD5 8c7577ade3e170c85412203b17bf1956 ChangeLog 13063
-RMD160 dfdfadf42a867313c045f1525ca801e07d823834 ChangeLog 13063
-SHA256 bac98173fd9bf82e7625caae1e5f041f4bec28c029797e88979b485862bedfb5 ChangeLog 13063
+MISC ChangeLog 13267 RMD160 e78a85970bd414c6a4e676bbd36b41faef918f42 SHA1 e57e8ac9eeef95c89ae94e61bfc787aee67e62a5 SHA256 2bb6a22c831c61979232c4db025690adcb9100ddc279b196859d1d264f837e6a
+MD5 0f786b3f1475fcc8f954740890e37db3 ChangeLog 13267
+RMD160 e78a85970bd414c6a4e676bbd36b41faef918f42 ChangeLog 13267
+SHA256 2bb6a22c831c61979232c4db025690adcb9100ddc279b196859d1d264f837e6a ChangeLog 13267
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164
@@ -48,10 +53,6 @@ SHA256 731c1dbe435888285f4ad568ed5587e849cdbeb2757a20b270e4da3ade756472 files/di
MD5 1590aaf049b785f84112230dc6a79a89 files/digest-psmisc-22.5-r1 235
RMD160 3c30c02a0697f859d3d2cd831249dc1584a8553f files/digest-psmisc-22.5-r1 235
SHA256 731c1dbe435888285f4ad568ed5587e849cdbeb2757a20b270e4da3ade756472 files/digest-psmisc-22.5-r1 235
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.5 (GNU/Linux)
-
-iD8DBQFGpBZZp/wUKkr7RBoRAkndAJoCk6tnw2n3ASylE7/+xOMvjB0pbwCePEFI
-YVoa4SVohKx3DcroyCsQxoA=
-=pjBN
------END PGP SIGNATURE-----
+MD5 1590aaf049b785f84112230dc6a79a89 files/digest-psmisc-22.5-r2 235
+RMD160 3c30c02a0697f859d3d2cd831249dc1584a8553f files/digest-psmisc-22.5-r2 235
+SHA256 731c1dbe435888285f4ad568ed5587e849cdbeb2757a20b270e4da3ade756472 files/digest-psmisc-22.5-r2 235
diff --git a/sys-process/psmisc/files/digest-psmisc-22.5-r2 b/sys-process/psmisc/files/digest-psmisc-22.5-r2
new file mode 100644
index 000000000000..43c6bd8484d3
--- /dev/null
+++ b/sys-process/psmisc/files/digest-psmisc-22.5-r2
@@ -0,0 +1,3 @@
+MD5 09c20fd899c2c1bd2dce02a510f99fab psmisc-22.5.tar.gz 277404
+RMD160 315e02a601b8729696244379038885365978ebbe psmisc-22.5.tar.gz 277404
+SHA256 f1cfe0b3b85cf06ef67d4648b59b896abce1a3f2a810d694567aff7e33273c02 psmisc-22.5.tar.gz 277404
diff --git a/sys-process/psmisc/files/psmisc-22.5-sockets.patch b/sys-process/psmisc/files/psmisc-22.5-sockets.patch
new file mode 100644
index 000000000000..99ea96828aa2
--- /dev/null
+++ b/sys-process/psmisc/files/psmisc-22.5-sockets.patch
@@ -0,0 +1,87 @@
+=== modified file 'src/fuser.c'
+--- src/fuser.c 2007-05-30 13:45:07 +0000
++++ src/fuser.c 2007-05-30 13:48:30 +0000
+@@ -60,7 +60,8 @@
+ #define NAME_FIELD 20 /* space reserved for file name */
+ /* Function defines */
+ static void add_matched_proc(struct names *name_list, const pid_t pid, const uid_t uid, const char access);
+-static void check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head, struct inode_list *ino_head, const uid_t uid, const char access);
++static void check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head, struct inode_list *ino_head, const uid_t uid, const char access,
++ struct unixsocket_list *sockets, dev_t netdev);
+ static void check_map(const pid_t pid, const char *filename, struct device_list *dev_head, struct inode_list *ino_head, const uid_t uid, const char access);
+ static struct stat *get_pidstat(const pid_t pid, const char *filename);
+ static uid_t getpiduid(const pid_t pid);
+@@ -72,7 +73,7 @@
+ void scan_mount_devices(const opt_type opts, struct mountdev_list **mount_devices);
+ void fill_unix_cache(struct unixsocket_list **unixsocket_head);
+ static dev_t find_net_dev(void);
+-static void scan_procs(struct names *names_head, struct inode_list *ino_head, struct device_list *dev_head);
++static void scan_procs(struct names *names_head, struct inode_list *ino_head, struct device_list *dev_head, struct unixsocket_list *sockets, dev_t netdev);
+ #ifdef NFS_CHECKS
+ static void scan_knfsd(struct names *names_head, struct device_list *dev_head);
+ #endif /* NFS_CHECKS */
+@@ -125,7 +126,7 @@
+ "For more information about these matters, see the files named COPYING.\n"));
+ }
+
+-static void scan_procs(struct names *names_head, struct inode_list *ino_head, struct device_list *dev_head)
++static void scan_procs(struct names *names_head, struct inode_list *ino_head, struct device_list *dev_head, struct unixsocket_list *sockets, dev_t netdev)
+ {
+ DIR *topproc_dir;
+ struct dirent *topproc_dent;
+@@ -185,9 +186,9 @@
+ }
+ }
+ }
+- check_dir(pid, "lib", dev_head, ino_head, uid, ACCESS_MMAP);
+- check_dir(pid, "mmap", dev_head, ino_head, uid, ACCESS_MMAP);
+- check_dir(pid, "fd", dev_head, ino_head, uid, ACCESS_FILE);
++ check_dir(pid, "lib", dev_head, ino_head, uid, ACCESS_MMAP, sockets, netdev);
++ check_dir(pid, "mmap", dev_head, ino_head, uid, ACCESS_MMAP, sockets, netdev);
++ check_dir(pid, "fd", dev_head, ino_head, uid, ACCESS_FILE, sockets, netdev);
+ check_map(pid, "maps", dev_head, ino_head, uid, ACCESS_MMAP);
+
+ } /* while topproc_dent */
+@@ -863,7 +864,7 @@
+ #ifdef DEBUG
+ debug_match_lists(names_head, match_inodes, match_devices);
+ #endif
+- scan_procs(names_head, match_inodes, match_devices);
++ scan_procs(names_head, match_inodes, match_devices, unixsockets, netdev);
+ #ifdef NFS_CHECKS
+ scan_knfsd(names_head, match_devices);
+ #endif /* NFS_CHECKS */
+@@ -983,13 +984,15 @@
+ return st;
+ }
+
+-static void check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head, struct inode_list *ino_head, const uid_t uid, const char access)
++static void check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head, struct inode_list *ino_head, const uid_t uid, const char access,
++ struct unixsocket_list *sockets, dev_t netdev)
+ {
+ char *dirpath, *filepath;
+ DIR *dirp;
+ struct dirent *direntry;
+ struct inode_list *ino_tmp;
+ struct device_list *dev_tmp;
++ struct unixsocket_list *sock_tmp;
+ struct stat st, lst;
+
+ if ( (dirpath = malloc(MAX_PATHNAME)) == NULL)
+@@ -1009,6 +1012,15 @@
+ if (stat(filepath, &st) != 0) {
+ fprintf(stderr, _("Cannot stat file %s: %s\n"),filepath, strerror(errno));
+ } else {
++ if (st.st_dev == netdev) {
++ for (sock_tmp = sockets; sock_tmp != NULL; sock_tmp = sock_tmp->next) {
++ if (sock_tmp->net_inode == st.st_ino) {
++ st.st_ino = sock_tmp->inode;
++ st.st_dev = sock_tmp->dev;
++ break;
++ }
++ }
++ }
+ for (dev_tmp = dev_head ; dev_tmp != NULL ; dev_tmp = dev_tmp->next) {
+ if (st.st_dev == dev_tmp->device) {
+ if (access == ACCESS_FILE && (lstat(filepath, &lst)==0) && (lst.st_mode & S_IWUSR)) {
+
diff --git a/sys-process/psmisc/psmisc-22.5-r2.ebuild b/sys-process/psmisc/psmisc-22.5-r2.ebuild
new file mode 100644
index 000000000000..44235c3bb319
--- /dev/null
+++ b/sys-process/psmisc/psmisc-22.5-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/psmisc-22.5-r2.ebuild,v 1.1 2007/08/02 08:56:08 uberlord Exp $
+
+inherit eutils
+
+DESCRIPTION="A set of tools that use the proc filesystem"
+HOMEPAGE="http://psmisc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/psmisc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="ipv6 nls selinux X"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-22.2-gcc2.patch
+ epatch "${FILESDIR}"/${P}-user-header.patch
+ epatch "${FILESDIR}"/${P}-sockets.patch
+}
+
+src_compile() {
+ econf \
+ $(use_enable selinux) \
+ $(use_enable nls) \
+ $(use_enable ipv6) \
+ || die
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS ChangeLog NEWS README
+ use X || rm "${D}"/usr/bin/pstree.x11
+ # fuser is needed by init.d scripts
+ dodir /bin
+ mv "${D}"/usr/bin/fuser "${D}"/bin/ || die
+ # easier to do this than forcing regen of autotools
+ [[ -e ${D}/usr/bin/peekfd ]] || rm -f "${D}"/usr/share/man/man1/peekfd.1
+}