Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildenv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bump: coreutils-version /COREUTILS_VERSION="(.*)"/ https://ftp.gnu.org/gnu/coreutils/|re:/href="coreutils-([\d.]+).tar.gz"/$1/|semver:*
COREUTILS_VERSION="9.10"
COREUTILS_VERSION="9.11"

export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_STABLE_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-${COREUTILS_VERSION}.tar.gz"
Expand Down
10 changes: 5 additions & 5 deletions stable-patches/lib/nproc.c.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
diff --git a/lib/nproc.c b/lib/nproc.c
index b0c9514..79cc5bc 100644
index ef86975..f09b429 100644
--- a/lib/nproc.c
+++ b/lib/nproc.c
@@ -61,6 +61,10 @@
@@ -62,6 +62,10 @@

#include "minmax.h"

+#ifdef __MVS__
+#include <zos.h>
+#endif
+
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))

#define NPROC_MINIMUM 1
@@ -354,6 +358,10 @@ num_processors_available (enum nproc_query query)

/* Return the number of processors available to the current process, based
@@ -353,6 +357,10 @@ num_processors_available (enum nproc_query query)
}
#endif

Expand Down
42 changes: 22 additions & 20 deletions stable-patches/src/cat.c.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/src/cat.c b/src/cat.c
index f9c9200..e84ea88 100644
index 43063fb..0cde289 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -39,6 +39,11 @@
#include "full-write.h"
@@ -43,6 +43,11 @@
#include "unistd--.h"
#include "xbinary-io.h"

+#ifdef __MVS__
Expand All @@ -14,7 +14,7 @@ index f9c9200..e84ea88 100644
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "cat"

@@ -126,6 +131,17 @@ Concatenate FILE(s) to standard output.\n\
@@ -130,6 +135,17 @@ Concatenate FILE(s) to standard output.\n\
oputs (_("\
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n\
"));
Expand All @@ -32,7 +32,7 @@ index f9c9200..e84ea88 100644
oputs (HELP_OPTION_DESCRIPTION);
oputs (VERSION_OPTION_DESCRIPTION);
printf (_("\
@@ -140,6 +156,137 @@ Examples:\n\
@@ -144,6 +160,137 @@ Examples:\n\
exit (status);
}

Expand Down Expand Up @@ -85,8 +85,8 @@ index f9c9200..e84ea88 100644
+ return found_valid_key;
+}
+
+bool
+parse_text_conv_env(const char *env, struct CcsidInfo *info)
+bool
+parse_text_conv_env(const char *env, struct CcsidInfo *info)
+{
+ bool found = false;
+ char *copy = strdup(env);
Expand Down Expand Up @@ -128,8 +128,8 @@ index f9c9200..e84ea88 100644
+ return found;
+}
+
+bool
+get_codepage_options(struct CcsidInfo *info)
+bool
+get_codepage_options(struct CcsidInfo *info)
+{
+ // Check if both codesets are empty
+ if (info->filecodeset[0] == '\0' && info->pgmcodeset[0] == '\0') {
Expand All @@ -147,7 +147,7 @@ index f9c9200..e84ea88 100644
+
+ // Validate the program codeset
+ if (strcmp(info->pgmcodeset, "ISO8859-1") != 0 && strcmp(info->pgmcodeset, "819") != 0) {
+ error(EXIT_FAILURE, EINVAL, _("Only pgmcodeset ISO8859-1 is supported"));
+ error(EXIT_FAILURE, EINVAL, _("Only pgmcodeset ISO8859-1 is supported"));
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stable-patches/src/cat.c.patch:150: The validation allows pgmcodeset values ISO8859-1 and 819, but the error message says only ISO8859-1 is supported, which can mislead users when 819 is rejected/accepted.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

+ }
+
+ // Convert codesets to CCSIDs
Expand All @@ -170,10 +170,11 @@ index f9c9200..e84ea88 100644
/* Compute the next line number. */

static void
@@ -545,6 +692,35 @@ copy_cat (void)
}
@@ -678,6 +825,37 @@ ensure_buf_size (char *buf, idx_t *buf_alloc, idx_t alignment, idx_t size)
return buf;
}

+
+#ifdef __MVS__
+#define MVS_CAT "/bin/cat"
+#define MVS_CAT_LEN (sizeof(MVS_CAT)-1)
Expand Down Expand Up @@ -203,10 +204,11 @@ index f9c9200..e84ea88 100644
+ }
+}
+#endif
+
int
main (int argc, char **argv)
@@ -561,6 +737,10 @@ main (int argc, char **argv)
{
@@ -693,6 +871,10 @@ main (int argc, char **argv)
bool show_ends = false;
bool show_nonprinting = false;
bool show_tabs = false;
Expand All @@ -217,7 +219,7 @@ index f9c9200..e84ea88 100644
int file_open_mode = O_RDONLY;

static struct option const long_options[] =
@@ -577,6 +757,19 @@ main (int argc, char **argv)
@@ -709,6 +891,19 @@ main (int argc, char **argv)
{NULL, 0, NULL, 0}
};

Expand All @@ -237,7 +239,7 @@ index f9c9200..e84ea88 100644
initialize_main (&argc, &argv);
set_program_name (argv[0]);
setlocale (LC_ALL, "");
@@ -592,8 +785,13 @@ main (int argc, char **argv)
@@ -724,8 +919,13 @@ main (int argc, char **argv)
/* Parse command line options. */

int c;
Expand All @@ -251,7 +253,7 @@ index f9c9200..e84ea88 100644
{
switch (c)
{
@@ -642,6 +840,22 @@ main (int argc, char **argv)
@@ -774,6 +974,22 @@ main (int argc, char **argv)
show_tabs = true;
break;

Expand All @@ -265,7 +267,7 @@ index f9c9200..e84ea88 100644
+ ccsid_info.cmd_arg = true;
+ ccsid_info.disable_autocvt = false;
+ if (!parse_codepage_options_from_cmdline(optarg, &ccsid_info)) {
+ usage(EXIT_FAILURE);
+ usage(EXIT_FAILURE);
+ }
+ ccsid_info.enable_text_conv = get_codepage_options(&ccsid_info);
+ break;
Expand All @@ -274,7 +276,7 @@ index f9c9200..e84ea88 100644
case_GETOPT_HELP_CHAR;

case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -651,6 +865,19 @@ main (int argc, char **argv)
@@ -783,6 +999,19 @@ main (int argc, char **argv)
}
}

Expand All @@ -294,7 +296,7 @@ index f9c9200..e84ea88 100644
/* Get device, i-node number, and optimal blocksize of output. */

if (fstat (STDOUT_FILENO, &ostat_buf) < 0)
@@ -702,6 +929,19 @@ main (int argc, char **argv)
@@ -838,6 +1067,19 @@ main (int argc, char **argv)
}
}

Expand Down
17 changes: 8 additions & 9 deletions stable-patches/src/pinky.c.patch
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
diff --git a/src/pinky.c b/src/pinky.c
index 88862c2..39842df 100644
index 625c426..d069686 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -242,13 +242,19 @@ print_entry (const STRUCT_UTMP *utmp_ent)
@@ -247,12 +247,19 @@ print_entry (STRUCT_UTMP const *utmp_ent)
printf (" %19s", _(" ???"));
else
{
- char *const comma = strchr (pw->pw_gecos, ',');
char *result;
+ char *result;
+#ifndef __MVS__
+ char *const comma = strchr (pw->pw_gecos, ',');
char *const comma = strchr (pw->pw_gecos, ',');

if (comma)
*comma = '\0';
+#endif

- char *result = create_fullname (pw->pw_gecos, pw->pw_name);
+#ifdef __MVS__
+ result = create_fullname ("", pw->pw_name);
+#else
result = create_fullname (pw->pw_gecos, pw->pw_name);
+ result = create_fullname (pw->pw_gecos, pw->pw_name);
+#endif
printf (" %-19.19s", result);
free (result);
}
@@ -323,13 +329,19 @@ print_long_entry (const char name[])
@@ -358,12 +365,19 @@ print_long_entry (const char name[])
}
else
{
- char *const comma = strchr (pw->pw_gecos, ',');
- char *result;
+ char *result;
+#ifndef __MVS__
+ char *const comma = strchr (pw->pw_gecos, ',');
Expand All @@ -39,7 +38,7 @@ index 88862c2..39842df 100644
+ *comma = '\0';
+#endif

- result = create_fullname (pw->pw_gecos, pw->pw_name);
- char *result = create_fullname (pw->pw_gecos, pw->pw_name);
+#ifdef __MVS__
+ result = create_fullname ("", pw->pw_name);
+#else
Expand Down
Loading