From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice via Bug reports for GNU Guix Subject: bug#37905: psmisc-23.2.tar.xz was updated in place Date: Thu, 24 Oct 2019 18:22:30 +0200 Message-ID: <87wocuf709.fsf@nckx> Reply-To: Tobias Geerinckx-Rice Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56758) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNftA-0005vw-3i for bug-guix@gnu.org; Thu, 24 Oct 2019 12:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNft8-0007hl-7A for bug-guix@gnu.org; Thu, 24 Oct 2019 12:23:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNft8-0007hY-30 for bug-guix@gnu.org; Thu, 24 Oct 2019 12:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iNft7-0005W5-T9 for bug-guix@gnu.org; Thu, 24 Oct 2019 12:23:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:56672) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNfsp-0005Ao-90 for bug-guix@gnu.org; Thu, 24 Oct 2019 12:22:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNfsm-0007Se-Dg for bug-guix@gnu.org; Thu, 24 Oct 2019 12:22:42 -0400 Received: from tobias.gr ([2001:470:7405::1]:51394) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNfsl-0007Qs-Rm for bug-guix@gnu.org; Thu, 24 Oct 2019 12:22:40 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 26d0ade9 for ; Thu, 24 Oct 2019 16:22:34 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 39d17852 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 24 Oct 2019 16:22:33 +0000 (UTC) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 37905@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; format=flowed Guix, Here's[0] the diff with pretty colours. Here it is without: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=DIFF Content-Transfer-Encoding: quoted-printable Content-Description: diff -Naur psmisc-23.2-{old,new} diff -Naur psmisc-23.2-old/ChangeLog psmisc-23.2-new/ChangeLog =2D-- psmisc-23.2-old/ChangeLog 2018-08-13 13:25:48.670327531 +0200 +++ psmisc-23.2-new/ChangeLog 2018-09-18 13:13:41.336594226 +0200 @@ -2,9 +2,11 @@ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * 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 =2D * killall: change to getopt_long without _only #12 + * 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 =20 diff -Naur psmisc-23.2-old/doc/fuser.1 psmisc-23.2-new/doc/fuser.1 =2D-- psmisc-23.2-old/doc/fuser.1 2016-09-21 13:18:43.691359617 +0200 +++ psmisc-23.2-new/doc/fuser.1 2018-09-12 14:13:48.728646493 +0200 @@ -21,15 +21,14 @@ .RB [ \-i ] .RB [ \-M ] .RB [ \-w ] =2D.RB [ \- \fISIGNAL\fR] +.RB [ \-\c +.IR SIGNAL ] ] =2D.IR name " ..." +.IR name " \&...\&" .br =2D.B fuser =2D.RB \-l +.B fuser \-l .br =2D.B fuser =2D.RB \-V +.B fuser \-V .ad b .SH DESCRIPTION .B fuser @@ -88,7 +87,7 @@ and the remote address. All fields are optional, but commas in front of missing fields must be present: .PP =2D\fB[\fR\fIlcl_port\fR\fB][\fR,\fB[\fR\fIrmt_host\fR\fB][\fR,\fB[\fIrmt_p= ort\fR\fB]]] +.RI [ lcl_port ][,[ rmt_host ][,[ rmt_port ]]] .PP Either symbolic or numeric values can be used for IP addresses and port numbers. @@ -97,19 +96,21 @@ outputs only the PIDs to stdout, everything else is sent to stderr. .SH OPTIONS .TP =2D\fB\-a\fR, \fB\-\-all\fR +.BR \-a ", " \-\-all Show all files specified on the command line. By default, only files that are accessed by at least one process are shown. .TP =2D\fB\-c\fR +.B \-c Same as \-m option, used for POSIX compatibility. .TP =2D\fB\-f\fR +.B \-f Silently ignored, used for POSIX compatibility. .TP =2D\fB\-k\fR, \fB\-\-kill\fR +.BR \-k ", "\-\-kill Kill processes accessing the file. Unless changed with =2D\fB\-\fR\fISIGNAL\fR, SIGKILL is sent. An +.BI \- SIGNAL\/\c +, SIGKILL is sent. +An .B fuser process never kills itself, but may kill other .B fuser @@ -117,22 +118,23 @@ .B fuser is set to its real user ID before attempting to kill. .TP =2D\fB\-i\fR, \fB\-\-interactive\fR =2DAsk the user for confirmation before killing a process. This option is +.BR \-i ", " \-\-interactive +Ask the user for confirmation before killing a process. +This option is silently ignored if .B \-k is not present too. .TP =2D\fB\-I\fR, \fB\-\-inode\fR +.BR \-I ", " \-\-inode For the name space .B file =2Dlet all comparisions be based on the inodes of the specified file(s) +let all comparisons be based on the inodes of the specified file(s) and never on the file names even on network based file systems. .TP =2D\fB\-l\fR, \fB\-\-list\-signals\fR +.BR \-l ", " \-\-list\-signals List all known signal names. .TP =2D\fB\-m\fR \fINAME\fR, \fB\-\-mount\fR \fINAME\fR +.BI -m " NAME \fR, " "\-\-mount " NAME .I NAME specifies a file on a mounted file system or a block device that is mounted. All processes accessing files on that file system are listed. @@ -140,21 +142,21 @@ .IR NAME /. to use any file system that might be mounted on that directory. .TP =2D\fB\-M\fR, \fB\-\-ismountpoint\fR +.BR \-M ", " \-\-ismountpoint Request will be fulfilled only if .I NAME =2Dspecifies a mountpoint. This is an invaluable seatbelt which prevents +specifies a mountpoint. This is an invaluable seat belt which prevents you from killing the machine if .I NAME happens to not be a filesystem. .TP =2D\fB\-w\fP +.B \-w Kill only processes which have write access. This option is silently ignored if .B \-k is not present too. .TP =2D\fB\-n \fISPACE\fR, \fB\-\-namespace\fR \fISPACE\fR +.BI \-n " SPACE\fR, " "\-\-namespace " SPACE Select a different name space. The name spaces .B file (file names, the default), @@ -163,10 +165,13 @@ .B tcp (local TCP ports) are supported. For ports, either the port number or the symbolic name can be specified. If there is no ambiguity, the =2Dshortcut notation \fIname\fB/\fIspace\fR (e.g. \fI80\fB/\fItcp\fR) +shortcut notation +.IB name / space +(e.g., +.IB 80 / tcp \fR) can be used. .TP =2D\fB\-s\fR, \fB\-\-silent\fR +.BR \-s ", " \-\-silent Silent operation. .B \-u and @@ -176,20 +181,20 @@ must not be used with .BR \-s . .TP =2D\fB\-\fISIGNAL\fR +.BI \- SIGNAL Use the specified signal instead of SIGKILL when killing processes. =2DSignals can be specified either by name (e.g. =2D.BR \-HUP ) or by =2Dnumber (e.g. +Signals can be specified either by name (e.g., +.BR \-HUP ) +or by number (e.g., .BR \-1 ). This option is silently ignored if the .B \-k option is not used. .TP =2D\fB\-u\fR, \fB\-\-user\fR +.BR \-u ", " \-\-user Append the user name of the process owner to each PID. .TP =2D\fB\-v\fR, \fB\-\-verbose\fR +.BR \-v ", " \-\-verbose =20 Verbose mode. Processes are shown in a .BR ps -like @@ -201,15 +206,15 @@ .B kernel is shown instead of the PID. .TP =2D\fB\-V\fR, \fB\-\-version\fR +.BR \-V ", " \-\-version Display version information. .TP =2D\fB\-4\fR, \fB\-\-ipv4\fR +.BR \-4 ", " \-\-ipv4 Search only for IPv4 sockets. This option must not be used with the .B \-6 option and only has an effect with the tcp and udp namespaces. .TP =2D\fB\-6\fR, \fB\-\-ipv6\fR +.BR \-6 ", " \-\-ipv6 Search only for IPv6 sockets. This option must not be used with the .B \-4 option and only has an effect with the tcp and udp namespaces. @@ -224,7 +229,7 @@ .B fuser \-km /home kills all processes accessing the file system /home in any way. .TP =2D\fBif fuser \-s /dev/ttyS1; then :; else \fIsomething\fB; fi\fR +.BI "if fuser \-s /dev/ttyS1; then :; else " something "; fi" invokes .I something if no other process is using /dev/ttyS1. diff -Naur psmisc-23.2-old/src/killall.c psmisc-23.2-new/src/killall.c =2D-- psmisc-23.2-old/src/killall.c 2018-08-13 13:24:42.767618335 +0200 +++ psmisc-23.2-new/src/killall.c 2018-09-18 13:09:23.948951682 +0200 @@ -350,8 +350,8 @@ lencomm =3D endcomm - startcomm; if (lencomm < 0) lencomm =3D 0; =2D if (lencomm > sizeof comm -1) =2D lencomm =3D sizeof comm -1; + if (lencomm > COMM_LEN -1) + lencomm =3D COMM_LEN -1; strncpy(comm, startcomm, lencomm); comm[lencomm] =3D '\0'; =20 @@ -857,9 +857,9 @@ =20 opterr =3D 0; #ifdef WITH_SELINUX =2D while ( (optc =3D getopt_long(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",opt= ions,NULL)) !=3D -1) { + while ( (optc =3D getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",= options,NULL)) !=3D -1) { #else =2D while ( (optc =3D getopt_long(argc,argv,"egy:o:ilqrs:u:vwVIn:",o= ptions,NULL)) !=3D -1) { + while ( (optc =3D getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwVIn:= ",options,NULL)) !=3D -1) { #endif switch (optc) { case 'e': @@ -914,7 +914,7 @@ ignore_case =3D 1; } else { sig_num =3D get_signal (argv[optind]+1, "killall"); =2D skip_error=3D1; + skip_error=3Doptind; } break; case 'V': @@ -922,13 +922,20 @@ if (strcmp(argv[optind-1],"-V") =3D=3D 0 || strncmp(argv[o= ptind-1],"--",2) =3D=3D 0) { print_version(); return 0; + } else { + sig_num =3D get_signal (argv[optind]+1, "killall"); + skip_error=3Doptind; } =2D sig_num =3D get_signal (argv[optind]+1, "killall"); break; =2D case 'n': =2D opt_ns_pid =3D atoi(optarg); =2D if (opt_ns_pid =3D=3D 0) + case 'n': { + long num; + char *end =3D NULL; + errno =3D 0; + num =3D strtol(optarg, &end, 10); + if (errno !=3D 0 || optarg =3D=3D end || end =3D=3D NULL) usage(_("Invalid namespace PID")); + opt_ns_pid =3D (pid_t) num; + } break; #ifdef WITH_SELINUX case 'Z':=20 @@ -943,6 +950,15 @@ break; #endif /*WITH_SELINUX*/ case '?': + if (skip_error =3D=3D optind) + break; + /* Sigh, this is a hack because -ve could be -version or + * -verbose */ + if (strncmp(argv[optind-1], "-ve", 3) =3D=3D 0) { + verbose=3D1; + exact=3D1; + break; + } /* Signal names are in uppercase, so check to see if the a= rgv * is upper case */ if (argv[optind-1][1] >=3D 'A' && argv[optind-1][1] <=3D '= Z') { @@ -952,9 +968,6 @@ if (argv[optind-1][1] >=3D '0' && argv[optind-1][1] <= =3D '9') { sig_num =3D atoi(argv[optind-1]+1); } else { =2D if (skip_error) =2D skip_error=3D0; =2D else usage(NULL); } } --=-=-= Content-Type: text/plain; format=flowed Kind regards, T G-R [0]: https://paste.debian.net/1110034/ --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl2xz8YACgkQ2Imw8BjF STyGtQ/+MhKk8CEchOchO1YXTTlu0ItYzmVcvO5lYeSOH0hwZLBazAqtI21eQT1U Y/byhFsAxgfCj8fRPbhpqlvxGqfmQiPSjVqWyfIUywPhPE+QrX5fJLwBHtNafxq2 U6KX5+sxH61vElH1pxoSotf9Q5LzGbbJ0hWyQDERFDuIBhIsPWa1NC41OspyhSyy +BD4ZbIhdIf35ITvcOJL5pIZYanrYsLAWGaiwQJ1IiRUgjUPACQ4+/t84dRAotgi NZWRbV9nfS/WbsACTqfJaFMu3Ra9CB3xNNC4kfZ5wSEnpcBjwSVwjNT83E0hPGTD 0WTnMIU9FxbIY//uOi8JR4VAgIw85zocbvdg5BHHmAzmQ9ycqSujlvL/KE/MoCA5 CFEcLuZ+0C7BJCagw/ZXG/ZmroAmfU6g410rfCSSUHwFEuoXMZ1uuoz4lKC1rCva x/rBOso9iZ/zVVtn6UmVfgOnrtEk2UOZi2UDv2D2PMmq1IkKQzPTRLtspWmalhnP DEyjC6WEP9KrEkkL9D+MKRWQWqbCrKgkqznbwMrNRt1dl/G7k4PhNiDKcM91ilnl 4VMj574iaR32hxdH9Uy2jygLN2BtiJMmzbcp+BZiNaOiuIRKlegu1pkEgqfizJN/ EAvKeQjV9ff00WrPbdMBF9JXRGPO1vRye+qsk8UWT3A0paSMLSg= =38Zr -----END PGP SIGNATURE----- --==-=-=--