Skip to content
Open
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
15 changes: 8 additions & 7 deletions buildenv
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ export ZOPEN_CATEGORIES="development source_control"
GIT_VERSION="2.54.0"

export ZOPEN_DEV_URL="https://github.com/git/git.git"
export ZOPEN_DEV_DEPS="curl git make m4 perl autoconf automake help2man texinfo xz zlib openssl expat gettext coreutils diffutils bash tar check_python gawk zusage libpsl libssh2"
export ZOPEN_DEV_DEPS="curl git make m4 perl autoconf automake help2man texinfo xz zlib openssl expat gettext coreutils diffutils bash tar check_python gawk zusage libpsl libssh2 libiconv"

export ZOPEN_STABLE_URL="https://github.com/git/git.git"
export ZOPEN_STABLE_TAG="v${GIT_VERSION}"
export ZOPEN_STABLE_DEPS="curl git make m4 perl autoconf automake help2man texinfo xz zlib openssl expat gettext gzip tar coreutils zoslib diffutils ncurses bash sed libpcre2 tar check_python gawk zusage libpsl libssh2"
export ZOPEN_STABLE_DEPS="curl git make m4 perl autoconf automake help2man texinfo xz zlib openssl expat gettext gzip tar coreutils zoslib diffutils ncurses bash sed libpcre2 tar check_python gawk zusage libpsl libssh2 libiconv"

export ZOPEN_CHECK_TIMEOUT="${ZOPEN_CHECK_NO_TIMEOUT}"
#
# Note the 'man' tarball release is numbered independently from the 'git' release.
#
export ZOPEN_TARBALL_MAN_URL="https://mirrors.edge.kernel.org/pub/software/scm/git/git-manpages-${GIT_VERSION}.tar.xz"

export ZOPEN_RUNTIME_DEPS="perl bash less ncurses" # If building with shared libs, add openssl, curl
export ZOPEN_RUNTIME_DEPS="perl bash less ncurses libiconv" # If building with shared libs, add openssl, curl

export ZOPEN_BOOTSTRAP="make"
export ZOPEN_BOOTSTRAP_OPTS="configure"
Expand All @@ -27,13 +28,13 @@ export ZOPEN_MAKE_OPTS=""
export ZOPEN_INSTALL="zopen_install_all"
export ZOPEN_INSTALL_OPTS=""
#export ZOPEN_CHECK_OPTS="-i test -j\$ZOPEN_NUM_JOBS"
export ZOPEN_CHECK_OPTS="test -j\$ZOPEN_NUM_JOBS"
export ZOPEN_CHECK_OPTS="-i test -j\$ZOPEN_NUM_JOBS"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ZOPEN_CHECK_OPTS uses make -i test ..., which ignores test failures; this can cause CI/package builds to look successful even when the test suite is failing, making regressions easy to miss.

Severity: medium

Fix This in Augment

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

export ZOPEN_COMP=CLANG

export ZOPEN_EXTRA_CONFIGURE_OPTS="--with-zlib=\${ZLIB_HOME} --with-curl=\${CURL_HOME} --with-openssl=\${OPENSSL_HOME} --with-libpcre2=\${PCRE2_HOME}"
export ZOPEN_EXTRA_CONFIGURE_OPTS="--with-zlib=\${ZLIB_HOME} --with-curl=\${CURL_HOME} --with-openssl=\${OPENSSL_HOME} --with-libpcre2=\${PCRE2_HOME} --with-libiconv-prefix=\${LIBICONV_HOME}"

export ZOPEN_EXTRA_CPPFLAGS="-I\${OPENSSL_HOME}/include -I\${GETTEXT_HOME}/include -I\${ZLIB_HOME}/include -I\${NCURSES_HOME}/include -I\${ZOPEN_ROOT}/patches/include -I\${CURL_HOME}/include -I\${EXPAT_HOME}/include"
export ZOPEN_EXTRA_LDFLAGS="-L\${GETTEXT_HOME}/lib -L\${OPENSSL_HOME}/lib -L\${ZLIB_HOME}/lib -L\${NCURSES_HOME}/lib -L\${CURL_HOME}/lib -L\${EXPAT_HOME}/lib"
export ZOPEN_EXTRA_CPPFLAGS="-I\${OPENSSL_HOME}/include -I\${GETTEXT_HOME}/include -I\${ZLIB_HOME}/include -I\${NCURSES_HOME}/include -I\${ZOPEN_ROOT}/patches/include -I\${CURL_HOME}/include -I\${EXPAT_HOME}/include -I\${LIBICONV_HOME}/include"
export ZOPEN_EXTRA_LDFLAGS="-L\${GETTEXT_HOME}/lib -L\${OPENSSL_HOME}/lib -L\${ZLIB_HOME}/lib -L\${NCURSES_HOME}/lib -L\${CURL_HOME}/lib -L\${EXPAT_HOME}/lib -L\${LIBICONV_HOME}/lib"
export ZOPEN_EXTRA_LIBS="${ZOPEN_EXTRA_LIBS} -lz -lcurl -lssl -lcrypto"
export ZOPEN_EXTRA_CFLAGS="-mzos-target=zosv2r5 -march=z13"
export ZOPEN_SYSTEM_PREREQS="zos25"
Expand Down
20 changes: 10 additions & 10 deletions stable-patches/Makefile.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git i/Makefile w/Makefile
index 7e0f77e298..9a6c598885 100644
--- i/Makefile
+++ w/Makefile
diff --git a/Makefile b/Makefile
index cedc234..dae1cf5 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,8 @@ include shared.mak
#
# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
Expand All @@ -11,7 +11,7 @@ index 7e0f77e298..9a6c598885 100644
# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend
# to PATH if your tools in /usr/bin are broken.
#
@@ -214,6 +216,8 @@ include shared.mak
@@ -224,6 +226,8 @@ include shared.mak
#
# Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl).
#
Expand All @@ -20,7 +20,7 @@ index 7e0f77e298..9a6c598885 100644
# Define NO_PERL if you do not want Perl scripts or libraries at all.
#
# Define NO_PERL_CPAN_FALLBACKS if you do not want to install bundled
@@ -914,15 +918,22 @@ BINDIR_PROGRAMS_NO_X += git-cvsserver
@@ -927,15 +931,22 @@ BINDIR_PROGRAMS_NO_X += git-cvsserver
ifndef SHELL_PATH
SHELL_PATH = /bin/sh
endif
Expand All @@ -43,7 +43,7 @@ index 7e0f77e298..9a6c598885 100644

TEST_SHELL_PATH = $(SHELL_PATH)

@@ -941,7 +952,7 @@ RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
@@ -954,7 +965,7 @@ RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
endif

GITLIBS = common-main.o $(LIB_FILE)
Expand All @@ -52,7 +52,7 @@ index 7e0f77e298..9a6c598885 100644

GIT_USER_AGENT = git/$(GIT_VERSION)

@@ -2409,9 +2420,10 @@ perllibdir_relative_SQ = $(subst ','\'',$(perllibdir_relative))
@@ -2467,9 +2478,10 @@ perllibdir_relative_SQ = $(subst ','\'',$(perllibdir_relative))
gitwebdir_SQ = $(subst ','\'',$(gitwebdir))
gitwebstaticdir_SQ = $(subst ','\'',$(gitwebstaticdir))

Expand All @@ -64,7 +64,7 @@ index 7e0f77e298..9a6c598885 100644
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
DIFF_SQ = $(subst ','\'',$(DIFF))
@@ -2654,7 +2666,7 @@ hook-list.h: generate-hooklist.sh Documentation/githooks.adoc
@@ -2714,7 +2726,7 @@ hook-list.h: tools/generate-hooklist.sh Documentation/githooks.adoc

SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\
$(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
Expand All @@ -73,7 +73,7 @@ index 7e0f77e298..9a6c598885 100644
$(perllibdir_SQ)
GIT-SCRIPT-DEFINES: FORCE
@FLAGS='$(SCRIPT_DEFINES)'; \
@@ -2884,7 +2896,7 @@ endif
@@ -2948,7 +2960,7 @@ endif

exec-cmd.sp exec-cmd.s exec-cmd.o: GIT-PREFIX
exec-cmd.sp exec-cmd.s exec-cmd.o: EXTRA_CPPFLAGS = \
Expand Down
37 changes: 37 additions & 0 deletions stable-patches/apply.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/apply.c b/apply.c
index 4aa1694..2d0ccd6 100644
--- a/apply.c
+++ b/apply.c
@@ -33,6 +33,7 @@
#include "read-cache.h"
#include "repository.h"
#include "rerere.h"
+#include "convert.h"
#include "apply.h"
#include "entry.h"
#include "setup.h"
@@ -4521,12 +4522,23 @@ static int try_create_file(struct apply_state *state, const char *path,
if (fd < 0)
return 1;

- if (convert_to_working_tree(state->repo->index, path, buf, size, &nbuf, NULL)) {
+#ifdef __MVS__
+ __setfdbinary(fd);
+ __disableautocvt(fd);
+#endif
+
+ int ret = convert_to_working_tree(state->repo->index, path, buf, size, &nbuf, NULL);
+ if (ret > 0) {
size = nbuf.len;
buf = nbuf.buf;
}

res = write_in_full(fd, buf, size) < 0;
+
+#ifdef __MVS__
+ tag_file_as_working_tree_encoding(state->repo->index, path, fd, ret);
+#endif
+
if (res)
error_errno(_("failed to write to '%s'"), path);
strbuf_release(&nbuf);
12 changes: 8 additions & 4 deletions stable-patches/archive.c.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
diff --git a/builtin/archive.c b/builtin/archive.c
index 13ea730..f0da605 100644
index 13ea730..d45ce03 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -12,6 +12,10 @@
@@ -12,6 +12,14 @@
static void create_output_file(const char *output_file)
{
int output_fd = xopen(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
+#ifdef __MVS__
+ if (__setfdbinary(output_fd))
+ die_errno(_("could not tag archive file '%s'"), output_file);
+ struct stat st;
+ if (fstat(output_fd, &st) >= 0 && S_ISREG(st.st_mode)) {
+ if (__setfdbinary(output_fd))
+ die_errno(_("could not tag archive file '%s'"), output_file);
+ __disableautocvt(output_fd);
+ }
+#endif
if (output_fd != 1) {
if (dup2(output_fd, 1) < 0)
Expand Down
8 changes: 4 additions & 4 deletions stable-patches/attr.c.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git i/attr.c w/attr.c
index 0bd2750..9e17884 100644
--- i/attr.c
+++ w/attr.c
diff --git a/attr.c b/attr.c
index 7536954..b15e1aa 100644
--- a/attr.c
+++ b/attr.c
@@ -873,9 +873,10 @@ static struct attr_stack *read_attr(struct index_state *istate,

const char *git_attr_system_file(void)
Expand Down
2 changes: 1 addition & 1 deletion stable-patches/blame.c.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/blame.c b/blame.c
index cb0b083..eb7dad0 100644
index a3c49d1..d4bc3ae 100644
--- a/blame.c
+++ b/blame.c
@@ -274,6 +274,11 @@ static struct commit *fake_working_tree_commit(struct repository *r,
Expand Down
14 changes: 14 additions & 0 deletions stable-patches/builtin/cat-file.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index d9fbad5..6f975e6 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -83,7 +83,8 @@ static int filter_object(const char *path, unsigned mode,
struct checkout_metadata meta;

init_checkout_metadata(&meta, NULL, NULL, oid);
- if (convert_to_working_tree(the_repository->index, path, *buf, *size, &strbuf, &meta)) {
+ int ret = convert_to_working_tree(the_repository->index, path, *buf, *size, &strbuf, &meta);
+ if (ret > 0) {
free(*buf);
*size = strbuf.len;
*buf = strbuf_detach(&strbuf, NULL);
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git i/builtin/help.c w/builtin/help.c
index c257079..9ae3815 100644
--- i/builtin/help.c
+++ w/builtin/help.c
@@ -313,6 +313,14 @@ static void exec_man_man(const char *path, const char *page)
diff --git a/builtin/help.c b/builtin/help.c
index c0aece4..fd18dad 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -338,6 +338,14 @@ static void exec_man_man(const char *path, const char *page)
warning_errno(_("failed to exec '%s'"), path);
}

Expand All @@ -17,22 +17,22 @@ index c257079..9ae3815 100644
static void exec_man_cmd(const char *cmd, const char *page)
{
struct strbuf shell_cmd = STRBUF_INIT;
@@ -335,6 +343,7 @@ static int supported_man_viewer(const char *name, size_t len)
@@ -360,6 +368,7 @@ static int supported_man_viewer(const char *name, size_t len)
{
return (!strncasecmp("man", name, len) ||
!strncasecmp("woman", name, len) ||
+ !strncasecmp("zotman", name, len) ||
!strncasecmp("konqueror", name, len));
}

@@ -478,6 +487,13 @@ static void exec_viewer(const char *name, const char *page)
@@ -503,6 +512,13 @@ static void exec_viewer(const char *name, const char *page)
{
const char *info = get_man_viewer_info(name);

+#ifdef __MVS__
+ if (!strcasecmp(name, "man"))
+ exec_man_zotman(info, page);
+ if (!strcasecmp(name, "zotman"))
+ else if (!strcasecmp(name, "zotman"))
+ exec_man_zotman(info, page);
+ else
+#endif
Expand Down
15 changes: 15 additions & 0 deletions stable-patches/builtin/index-pack.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index ca7784d..f043465 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -368,6 +368,10 @@ static const char *open_pack_file(const char *pack_name)
pack_name = strbuf_detach(&tmp_file, NULL);
} else {
output_fd = xopen(pack_name, O_CREAT|O_EXCL|O_RDWR, 0600);
+#ifdef __MVS__
+ __setfdbinary(output_fd);
+ __disableautocvt(output_fd);
+#endif
}
nothread_data.pack_fd = output_fd;
} else {
11 changes: 10 additions & 1 deletion stable-patches/combine-diff.c.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/combine-diff.c b/combine-diff.c
index b799862..fc1ce24 100644
index b799862..0fea1b9 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1074,6 +1074,10 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
Expand All @@ -13,3 +13,12 @@ index b799862..fc1ce24 100644
elem->mode = canon_mode(st.st_mode);
/* if symlinks don't work, assume symlink if all parents
* are symlinks
@@ -1098,7 +1102,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
struct strbuf buf = STRBUF_INIT;

if (convert_to_git(rev->diffopt.repo->index,
- elem->path, result, len, &buf, global_conv_flags_eol)) {
+ elem->path, result, len, &buf, global_conv_flags_eol) > 0) {
free(result);
result = strbuf_detach(&buf, &len);
result_size = len;
35 changes: 35 additions & 0 deletions stable-patches/common-init.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/common-init.c b/common-init.c
index 5cc73f0..fe79089 100644
--- a/common-init.c
+++ b/common-init.c
@@ -9,6 +9,9 @@
#include "setup.h"
#include "strbuf.h"
#include "trace2.h"
+#ifdef __MVS__
+#include "environment.h"
+#endif

/*
* Many parts of Git have subprograms communicate via pipe, expect the
@@ -37,6 +40,20 @@ void init_git(const char **argv)

trace2_initialize_clock();

+#ifdef __MVS__
+ const char* git_utf8_ccsid_str = getenv("GIT_UTF8_CCSID");
+
+ if (git_utf8_ccsid_str != NULL) {
+ char* endptr;
+ errno = 0;
+ long conv = strtol(git_utf8_ccsid_str, &endptr, 10);
+
+ if (conv > 0 && endptr != git_utf8_ccsid_str) {
+ utf8_ccsid = (int)conv;
+ }
+ }
+#endif
+
/*
* Always open file descriptors 0/1/2 to avoid clobbering files
* in die(). It also avoids messing up when the pipes are dup'ed
22 changes: 22 additions & 0 deletions stable-patches/config.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/config.c b/config.c
index 156f2a2..3cbca3a 100644
--- a/config.c
+++ b/config.c
@@ -2986,7 +2986,7 @@ int repo_config_set_multivar_in_file_gently(struct repository *r,
* The lock serves a purpose in addition to locking: the new
* contents of .git/config will be written into it.
*/
- fd = hold_lock_file_for_update(&lock, config_filename, 0);
+ fd = hold_lock_file_for_update(&lock, config_filename, LOCK_TAG_TEXT);
if (fd < 0) {
error_errno(_("could not lock config file %s"), config_filename);
ret = CONFIG_NO_LOCK;
@@ -3331,7 +3331,7 @@ static int repo_config_copy_or_rename_section_in_file(
if (!config_filename)
config_filename = filename_buf = repo_git_path(r, "config");

- out_fd = hold_lock_file_for_update(&lock, config_filename, 0);
+ out_fd = hold_lock_file_for_update(&lock, config_filename, LOCK_TAG_TEXT);
if (out_fd < 0) {
ret = error(_("could not lock config file %s"), config_filename);
goto out;
16 changes: 11 additions & 5 deletions stable-patches/config.mak.uname.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
diff --git a/config.mak.uname b/config.mak.uname
index d5112168a4..17716314c0 100644
index 5feb582..d422080 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -639,12 +639,19 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
@@ -655,15 +655,25 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
SHELL_PATH = /usr/coreutils/bin/bash
endif
ifeq ($(uname_S),OS/390)
+ PERL_PATH = perl
+ PERL_PATH = $(PERL5_HOME)/bin/perl
+ PERL_PATH_FOR_SCRIPTS = /bin/env perl
+ SHELL_PATH = bash
+ SHELL_PATH = $(BASH_HOME)/bin/bash
+ TEST_SHELL_PATH = $(SHELL_PATH)
+ SHELL_PATH_FOR_SCRIPTS = /bin/env bash
+ PYTHON_PATH = python
+ PYTHON_PATH := $(PYTHON_PATH)/python3
NO_SYS_POLL_H = YesPlease
+ RUNTIME_PREFIX = YesPlease
NO_STRCASESTR = YesPlease
Expand All @@ -22,3 +23,8 @@ index d5112168a4..17716314c0 100644
NO_MEMMEM = YesPlease
NO_GECOS_IN_PWENT = YesPlease
HAVE_STRINGS_H = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ ICONVDIR = $(LIBICONV_HOME)
NEEDS_MODE_TRANSLATION = YesPlease
HAVE_ZOS_GET_EXECUTABLE_PATH = YesPlease
endif
2 changes: 1 addition & 1 deletion stable-patches/configure.ac.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/configure.ac b/configure.ac
index 38ff866..c9cf5ac 100644
index cfb5011..2d967f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -463,6 +463,9 @@ else
Expand Down
Loading
Loading