Re: Procps-ng 4.0.0 released with newlib

"Dr. Werner Fink" <[email protected]> Wed, 30 Mar 2022 11:12:14 +0200
Newsgroups gmane.linux.procps.devel
Message-ID <YkQe7n/[email protected]>
On 2022/03/30 10:37:03 +0200, Dr. Werner Fink wrote:
> On 2022/03/22 04:04:02 -0700, Craig Small wrote:
> > The procps team is pleased to announce the release of procps-ng 4.0.0. This
> > is a major change from previous versions because it uses the newlib branch.
> > The newlib branch is a major re-work of the procps/proc-2 library API and
> > has been an undertaking that started around 2015.
> > 
> > procps-ng v4.0.0 is probably not ready for the main path of most
> > distributions; for example, it will be packaged for Debian experimental,
> > not Debian Sid. We encourage people with all sorts of setups to test out
> > this new version and provide feedback.
> > 
> > Source code packages can be found at
> > GitLab Release: https://gitlab.com/procps-ng/procps/-/releases/v4.0.0
> > Sourceforge tarball:
> > https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.0.tar.xz/download
> > 
[...]
> 
> Hi,
> 
> somehow the ps tool seems not provide all known features anymore
> at least elfutils-debuginfod test suite fails in our QA tests
> with:
> 
>   [   93s] + ps -q 18200 -e -L -o '%p %c %a'
>   [   93s] + grep groom
>   [   93s] error: unknown user-defined format specifier "%p"
> 
> and if I use the example of the manual page I see
> 
>   noether:/ # ps -eo "%p %y %x %c"
>   error: unknown user-defined format specifier "%p"
> 
>   Usage:
>    ps [options]
>  
>    Try 'ps --help <simple|list|output|threads|misc|all>'
>     or 'ps --help <s|l|o|t|m|a>'
>    for additional help text.
> 
>   For more details see ps(1).
> 
> even if set personality
> 
>   noether:/ # env -i PS_PERSONALITY=aix ps -eo "%p %y %x %c"
>   error: unknown user-defined format specifier "%p"
> 
>   Usage:
>    ps [options]
> 
>    Try 'ps --help <simple|list|output|threads|misc|all>'
>     or 'ps --help <s|l|o|t|m|a>'
>    for additional help text.
> 
>   For more details see ps(1).

The attached patch seems to fix this

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
procps-ng-4.0.0-aix_sortformats.dif (text/plain, 969 B)
---
 ps/display.c    |    2 +-
 ps/sortformat.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

--- ps/display.c
+++ ps/display.c	2022-03-30 09:07:26.500609633 +0000
@@ -593,7 +593,7 @@ static void finalize_stacks (void)
   // now accommodate any results not yet satisfied
   f_node = format_list;
   while (f_node) {
-    (*f_node->pr)(NULL, NULL);
+    if (*f_node->pr) (*f_node->pr)(NULL, NULL);
     f_node = f_node->next;
   }
   s_node = sort_list;
--- ps/sortformat.c
+++ ps/sortformat.c	2022-03-30 09:06:19.885822446 +0000
@@ -313,8 +313,7 @@ static const char *format_parse(sf_node
   if(0) improper: err=_("improper format list");
   if(0) badwidth: err=_("column widths must be unsigned decimal numbers");
   if(0) notmacro: err=_("can not set width for a macro (multi-column) format specifier");
-  if (!err)
-    if(strchr(sfn->sf,'%')) err = aix_format_parse(sfn);
+  if(strchr(sfn->sf,'%')) err = aix_format_parse(sfn);
   return err;
 }
signature.asc (application/pgp-signature, 894 B)
-----BEGIN PGP SIGNATURE-----

iQJgBAABCABKFiEEGwa/WjgpkPvLonW+UOkNVR3Bay4FAmJEHuksFIAAAAAAFQAO
cGthLWFkZHJlc3NAZ251cGcub3Jnd2VybmVyQHN1c2UuZGUACgkQUOkNVR3Bay60
LQ/+I06f0cns0rKmLTNeSWXRzxNXowZsfeN/Xnm87m4g3u4yS2AqEIpJ0HaQFJUG
gu2ETkA9hXmXARF383RsSXfOyQ1ZK2E+i7jpz0NxELYN8yJ7DNEAhqNE/HbhE+R3
lJ0UP3QM/2/mdY0jgk3jwv0HFTAK9tVjzsaHZ2Ea9aDMzPGeejw8Rye7Sy2/VTaC
FhzD8e+WOgEfm0UUPFmirGWnVwsg36s3haY8At6jBsuVj6m+AVjJElDrM+lE563P
g73Zl3spl/nfhTU5S9FfmwjBzUiE1ynIS13znoa6MizAdNZjPj0oZvdBMeEW73lH
XhxuFhff/xPG+AccxvUQz5+2/wuAqKoGd3Qq7NA2oFl7IEnd+ttUagcjmrY7qs8q
ecU7c6nJNYl3GYdAV+3iFoAND4Ne50OtM7YxWLI+ukD3tsCBy002PD7F4Es1OEqi
BrtnzWthrGhqAQgfc/7JiZBuJF+wATIZRGpG7OzxmLkW6AUZfsoVd2AYxcoDLlO5
xyMNck41cCFKrfcQ69oXQdautz0HIrcPaFG0EhSCzxyZx9RydUB4PAbLgN67GM6i
MQHazxaTRHEnsH/4vnSjRgZ+4TiCSxicJJ8Y+DWMp3e5vdpTCIIgtbYLSIHp27XV
21v7Ikt9lyiRYZHJosLQPU3JGgnuDLz5s7U6e4mG67EZ+mk=
=zUZe
-----END PGP SIGNATURE-----