diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-01-02 10:35:47 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-01-02 10:35:47 +0000 |
commit | 36b0da5c3711e9f86436bfd0e33b749c3388a7d7 (patch) | |
tree | cce7746c9aab569f901dc42c5528c5b567c96a0d | |
parent | Manifest fix (diff) | |
download | gentoo-2-36b0da5c3711e9f86436bfd0e33b749c3388a7d7.tar.gz gentoo-2-36b0da5c3711e9f86436bfd0e33b749c3388a7d7.tar.bz2 gentoo-2-36b0da5c3711e9f86436bfd0e33b749c3388a7d7.zip |
Version bump.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
-rw-r--r-- | sys-process/psmisc/ChangeLog | 9 | ||||
-rw-r--r-- | sys-process/psmisc/files/psmisc-22.8-fuser-r159.patch | 249 | ||||
-rw-r--r-- | sys-process/psmisc/psmisc-22.8.ebuild | 51 | ||||
-rw-r--r-- | sys-process/psmisc/psmisc-22.9.ebuild (renamed from sys-process/psmisc/psmisc-22.8-r1.ebuild) | 6 |
4 files changed, 10 insertions, 305 deletions
diff --git a/sys-process/psmisc/ChangeLog b/sys-process/psmisc/ChangeLog index 21462bcce68e..280a136e0a8d 100644 --- a/sys-process/psmisc/ChangeLog +++ b/sys-process/psmisc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-process/psmisc -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/ChangeLog,v 1.92 2009/12/23 15:12:36 ssuominen Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/ChangeLog,v 1.93 2010/01/02 10:35:46 ssuominen Exp $ + +*psmisc-22.9 (02 Jan 2010) + + 02 Jan 2010; Samuli Suominen <ssuominen@gentoo.org> +psmisc-22.9.ebuild: + Version bump. *psmisc-22.8-r1 (23 Dec 2009) diff --git a/sys-process/psmisc/files/psmisc-22.8-fuser-r159.patch b/sys-process/psmisc/files/psmisc-22.8-fuser-r159.patch deleted file mode 100644 index 95edee7709fb..000000000000 --- a/sys-process/psmisc/files/psmisc-22.8-fuser-r159.patch +++ /dev/null @@ -1,249 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=297423 - -Fix segmentation fault with false options e.g. "fuser --help" - -src/fuser.c Rev. 1.59 -src/fuser.h Rev 1.7 - ---- src/fuser.c 2009-07-14 02:23:38.000000000 +0300 -+++ src/fuser.c 2009-12-23 17:04:26.000000000 +0200 -@@ -102,7 +102,7 @@ - - fprintf(stderr, - _ -- ("Usage: fuser [ -fuv ] [ -a | -s ] [ -4 | -6 ] [ -c | -m | -n SPACE ] [ -k [ -i ] [ -SIGNAL ]] NAME...\n" -+ ("Usage: fuser [-fMuv] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME...\n" - " fuser -l\n" " fuser -V\n" - "Show which processes use the named files, sockets, or filesystems.\n\n" - " -a display unused files too\n" -@@ -112,6 +112,7 @@ - " -k kill processes accessing the named file\n" - " -l list available signal names\n" - " -m show all processes using the named filesystems or block device\n" -+ " -M fulfill request only if NAME is a mount point\n" - " -n SPACE search in this name space (file, udp, or tcp)\n" - " -s silent operation\n" - " -SIGNAL send this signal instead of SIGKILL\n" -@@ -767,6 +768,56 @@ - } - #endif - -+static void -+read_proc_mounts(struct mount_list **mnt_list) -+{ -+ FILE *fp; -+ char line[BUFSIZ]; -+ char *find_mountp; -+ char *find_space; -+ struct mount_list *mnt_tmp; -+ -+ if ((fp = fopen(PROC_MOUNTS, "r")) == NULL) { -+ fprintf(stderr, "Cannot open %s\n", PROC_MOUNTS); -+ return; -+ } -+ while (fgets(line, BUFSIZ, fp) != NULL) { -+ if ((find_mountp = strchr(line, ' ')) == NULL) -+ continue; -+ find_mountp++; -+ if ((find_space = strchr(find_mountp, ' ')) == NULL) -+ continue; -+ *find_space = '\0'; -+ if ((mnt_tmp = malloc(sizeof(struct mount_list))) == NULL) -+ continue; -+ if ((mnt_tmp->mountpoint = strdup(find_mountp)) == NULL) -+ continue; -+ mnt_tmp->next = *mnt_list; -+ *mnt_list = mnt_tmp; -+ } -+ fclose(fp); -+} -+ -+static int -+is_mountpoint(struct mount_list **mnt_list, char *arg) -+{ -+ char *p; -+ struct mount_list *mnt_tmp; -+ -+ if (*arg == '\0') -+ return 0; -+ /* Remove trailing slashes. */ -+ for (p = arg; *p != '\0'; p++) -+ ; -+ while (*(--p) == '/' && p > arg) -+ *p = '\0'; -+ -+ for (mnt_tmp = *mnt_list; mnt_tmp != NULL; mnt_tmp = mnt_tmp->next) -+ if (!strcmp(mnt_tmp->mountpoint, arg)) -+ return 1; -+ return 0; -+} -+ - int main(int argc, char *argv[]) - { - opt_type opts; -@@ -777,6 +828,7 @@ - unsigned char default_namespace = NAMESPACE_FILE; - struct device_list *match_devices = NULL; - struct unixsocket_list *unixsockets = NULL; -+ struct mount_list *mounts = NULL; - - dev_t netdev; - struct ip_connections *tcp_connection_list = NULL; -@@ -798,6 +850,7 @@ - {"interactive", 0, NULL, 'i'}, - {"list-signals", 0, NULL, 'l'}, - {"mount", 0, NULL, 'm'}, -+ {"ismountpoint", 0, NULL, 'M'}, - {"namespace", 1, NULL, 'n'}, - {"silent", 0, NULL, 's'}, - {"user", 0, NULL, 'u'}, -@@ -808,8 +861,7 @@ - {"ipv6", 0, NULL, '6'}, - #endif - {"SIG", 1, NULL, 'S'}, -- -- -+ { 0, 0, 0, 0 } - }; - - #ifdef WITH_IPV6 -@@ -833,9 +885,9 @@ - ignore_options=0; - while ((optc = - #ifdef WITH_IPV6 -- getopt_long(argc, argv, "46acfhikmn:sS:uvV", options,NULL) -+ getopt_long(argc, argv, "46acfhiklmMn:sS:uvV", options,NULL) - #else -- getopt_long(argc, argv, "acfhikmn:sS:uvV", options,NULL) -+ getopt_long(argc, argv, "acfhikilmMn:sS:uvV", options,NULL) - #endif - ) != -1) { - if (ignore_options > 0) { -@@ -855,7 +907,7 @@ - opts |= OPT_ALLFILES; - break; - case 'c': -- opts |= OPT_MOUNTPOINT; -+ opts |= OPT_MOUNTS; - break; - case 'f': - /* ignored */ -@@ -875,6 +927,9 @@ - case 'm': - opts |= OPT_MOUNTS; - break; -+ case 'M': -+ opts |= OPT_ISMOUNTPOINT; -+ break; - case 'n': - if (strcmp(optarg, "tcp") == 0) - default_namespace = NAMESPACE_TCP; -@@ -934,16 +989,15 @@ - - } /* switch */ - } /* while optc */ -+ if (optc == argc) -+ usage(_("No process specification given")); -+ if (opts & OPT_ISMOUNTPOINT) -+ read_proc_mounts(&mounts); - for (optc = optind; optc < argc; optc++) { - /* File specifications */ - if ((this_name = malloc(sizeof(struct names))) == NULL) - continue; - this_name->next = NULL; -- if (names_head == NULL) -- names_head = this_name; -- if (names_tail != NULL) -- names_tail->next = this_name; -- names_tail = this_name; - /* try to find namespace spec */ - this_name->name_space = default_namespace; - if (((nsptr = strchr(argv[optc], '/')) != NULL) -@@ -960,10 +1014,15 @@ - } - } - this_name->matched_procs = NULL; -- if ((opts & OPT_MOUNTS || opts & OPT_MOUNTPOINT) -+ if (opts & (OPT_MOUNTS|OPT_ISMOUNTPOINT) - && this_name->name_space != NAMESPACE_FILE) - usage(_ -- ("You can only use files with mountpoint option")); -+ ("You can only use files with mountpoint options")); -+ if (opts & OPT_ISMOUNTPOINT && -+ !is_mountpoint(&mounts, argv[optc])) { -+ free(this_name); -+ continue; -+ } - switch (this_name->name_space) { - case NAMESPACE_TCP: - if (asprintf(&(this_name->filename), "%s/tcp", argv[optc]) > 0) { -@@ -990,22 +1049,18 @@ - parse_file(this_name, &match_inodes); - parse_unixsockets(this_name, &match_inodes, - unixsockets); -- if (opts & OPT_MOUNTPOINT || opts & OPT_MOUNTS) -+ if (opts & OPT_MOUNTS) - parse_mounts(this_name, &match_devices, opts); - break; - } - -+ if (names_head == NULL) -+ names_head = this_name; -+ if (names_tail != NULL) -+ names_tail->next = this_name; -+ names_tail = this_name; - } /* for optc */ - -- if (names_head == NULL) { -- usage(_("No process specification given")); -- } -- /* Check conflicting operations */ -- if (opts & OPT_MOUNTPOINT) { -- if (opts & OPT_MOUNTS) -- usage(_ -- ("You cannot use the mounted and mountpoint flags together")); -- } - if (opts & OPT_SILENT) { - opts &= ~OPT_VERBOSE; - opts &= ~OPT_USER; -@@ -1452,13 +1507,14 @@ - struct procs *pptr; - - for (pptr = proc_head; pptr != NULL; pptr = pptr->next) { -+ if ( pptr->proc_type == PTYPE_NORMAL ) -+ continue; - if ((opts & OPT_INTERACTIVE) && (ask(pptr->pid) == 0)) - continue; -- if (kill(pptr->pid, sig_number) < 0) { -+ if ( kill(pptr->pid, sig_number) < 0) { - fprintf(stderr, _("Could not kill process %d: %s\n"), -- pptr->pid, strerror(errno)); -+ pptr->pid, strerror(errno)); - } -- - } - } - ---- src/fuser.h 2009-07-10 05:48:33.000000000 +0300 -+++ src/fuser.h 2009-12-23 17:04:26.000000000 +0200 -@@ -9,7 +9,7 @@ - #define OPT_INTERACTIVE 16 - #define OPT_SILENT 32 - #define OPT_USER 64 --#define OPT_MOUNTPOINT 128 -+#define OPT_ISMOUNTPOINT 128 - - struct procs { - pid_t pid; -@@ -79,6 +79,11 @@ - struct unixsocket_list *next; - }; - -+struct mount_list { -+ char *mountpoint; -+ struct mount_list *next; -+}; -+ - #define NAMESPACE_FILE 0 - #define NAMESPACE_TCP 1 - #define NAMESPACE_UDP 2 diff --git a/sys-process/psmisc/psmisc-22.8.ebuild b/sys-process/psmisc/psmisc-22.8.ebuild deleted file mode 100644 index cb0b8d77c7e6..000000000000 --- a/sys-process/psmisc/psmisc-22.8.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/psmisc-22.8.ebuild,v 1.1 2009/12/11 11:45:40 ssuominen Exp $ - -inherit eutils autotools - -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}" - use nls || epatch "${FILESDIR}"/${PN}-22.5-no-nls.patch #193920 - eautoreconf -} - -src_compile() { - # the nls looks weird, but it's because we actually delete the nls stuff - # above when USE=-nls. this should get cleaned up so we dont have to patch - # it out, but until then, let's not confuse users ... #220787 - econf \ - --disable-dependency-tracking \ - $(use_enable selinux) \ - $(use_enable ipv6) \ - $(use nls && use_enable nls) - - emake || die -} - -src_install() { - emake DESTDIR="${D}" install || 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 -} diff --git a/sys-process/psmisc/psmisc-22.8-r1.ebuild b/sys-process/psmisc/psmisc-22.9.ebuild index 9143b52b8aaa..10011abe3a37 100644 --- a/sys-process/psmisc/psmisc-22.8-r1.ebuild +++ b/sys-process/psmisc/psmisc-22.9.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/psmisc-22.8-r1.ebuild,v 1.1 2009/12/23 15:12:36 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/psmisc-22.9.ebuild,v 1.1 2010/01/02 10:35:46 ssuominen Exp $ inherit eutils autotools @@ -22,8 +22,8 @@ DEPEND="${RDEPEND} src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}"/${P}-fuser-r159.patch use nls || epatch "${FILESDIR}"/${PN}-22.5-no-nls.patch #193920 + sed -i -e '/ACLOCAL_AMFLAGS/d' Makefile.am || die eautoreconf } |