From ae79d87a0823ef16aa17e903a9bf3aeb3ba26acb Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Tue, 24 May 2016 20:30:48 +0200 Subject: [PATCH] git: update to 2.8.3 --- git/build.sh | 6 +- git/meta/ChangeLog | 4 + git/src/git-2.8.1-all-non-zero-returns.patch | 37 ---------- .../git-2.8.1-avoid-null-with-printf.patch | 46 ------------ git/src/git-2.8.1-handle-unset-errors.patch | 44 ----------- .../git-2.8.1-lower-case-error-strings.patch | 73 ------------------- 6 files changed, 5 insertions(+), 205 deletions(-) delete mode 100644 git/src/git-2.8.1-all-non-zero-returns.patch delete mode 100644 git/src/git-2.8.1-avoid-null-with-printf.patch delete mode 100644 git/src/git-2.8.1-handle-unset-errors.patch delete mode 100644 git/src/git-2.8.1-lower-case-error-strings.patch diff --git a/git/build.sh b/git/build.sh index 3e0aa0a..e379951 100755 --- a/git/build.sh +++ b/git/build.sh @@ -6,17 +6,13 @@ ########################################################### # Check the following 4 variables before running the script topdir=git -version=2.8.1 +version=2.8.3 pkgver=1 source[0]=https://www.kernel.org/pub/software/scm/git/$topdir-$version.tar.gz source[1]=https://www.kernel.org/pub/software/scm/git/$topdir-manpages-$version.tar.gz # If there are no patches, simply comment this patch[0]=git-1.8.1.5-inet_addrstrlen.patch patch[1]=git-2.6.3-stdint_h.patch -patch[2]=git-2.8.1-avoid-null-with-printf.patch -patch[3]=git-2.8.1-lower-case-error-strings.patch -patch[4]=git-2.8.1-all-non-zero-returns.patch -patch[5]=git-2.8.1-handle-unset-errors.patch # Source function library . ${BUILDPKG_SCRIPTS}/buildpkg.functions diff --git a/git/meta/ChangeLog b/git/meta/ChangeLog index 5a10f94..25c11a2 100644 --- a/git/meta/ChangeLog +++ b/git/meta/ChangeLog @@ -1,5 +1,9 @@ CHANGELOG --------- +* Tue May 24 2016 Tom G. Christensen - 2.8.3-1 +- Update to 2.8.3 +- Drop upstreamed patches + * Fri Apr 08 2016 Tom G. Christensen - 2.8.1-1 - Update to 2.8.1 diff --git a/git/src/git-2.8.1-all-non-zero-returns.patch b/git/src/git-2.8.1-all-non-zero-returns.patch deleted file mode 100644 index dc0b647..0000000 --- a/git/src/git-2.8.1-all-non-zero-returns.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Jeff King -Subject: [PATCH 2/3] git_config_set_multivar_in_file: all non-zero returns - are errors -Date: Sat, 9 Apr 2016 13:42:54 -0400 - -This function is just a thin wrapper for the "_gently" form -of the function. But the gently form is designed to feed -builtin/config.c, which passes our return code directly to -its exit status, and thus uses positive error values for -some cases. We check only negative values, meaning we would -fail to die in some cases (e.g., a malformed key). - -This may or may not be triggerable in practice; we tend to -use this non-gentle form only when setting internal -variables, which would not have malformed keys. - -Signed-off-by: Jeff King ---- - config.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config.c b/config.c -index 6b81931..d446315 100644 ---- a/config.c -+++ b/config.c -@@ -2222,7 +2222,7 @@ void git_config_set_multivar_in_file(const char *config_filename, - const char *value_regex, int multi_replace) - { - if (git_config_set_multivar_in_file_gently(config_filename, key, value, -- value_regex, multi_replace) < 0) -+ value_regex, multi_replace)) - die(_("could not set '%s' to '%s'"), key, value); - } - --- -2.8.1.245.g18e0f5c - diff --git a/git/src/git-2.8.1-avoid-null-with-printf.patch b/git/src/git-2.8.1-avoid-null-with-printf.patch deleted file mode 100644 index 5ba1fa4..0000000 --- a/git/src/git-2.8.1-avoid-null-with-printf.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Junio C Hamano -Subject: setup.c: do not feed NULL to "%.*s" even with the precision 0 - -A recent update 75faa45a (replace trivial malloc + sprintf / strcpy -calls with xstrfmt, 2015-09-24) rewrote - - prepare an empty buffer - if (len) - append the first len bytes of "prefix" to the buffer - append "path" to the buffer - -that computed "path", optionally prefixed by "prefix", into - - xstrfmt("%.*s%s", len, prefix, path); - -However, passing a NULL pointer to the printf(3) family of functions -to format it with %s conversion, even with the precision 0, i.e. - - xstrfmt("%.*s", 0, NULL) - -yields undefined results, at least on some platforms. - -Avoid this problem by substituting prefix with "" when len==0, as -prefix can legally be NULL in that case. This would mimick the -intent of the original code better. - -Reported-by: "Tom G. Christensen" -Helped-by: Jeff King -Signed-off-by: Junio C Hamano ---- - setup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.c b/setup.c -index 3439ec6..b4a92fe 100644 ---- a/setup.c -+++ b/setup.c -@@ -103,7 +103,7 @@ char *prefix_path_gently(const char *prefix, int len, - return NULL; - } - } else { -- sanitized = xstrfmt("%.*s%s", len, prefix, path); -+ sanitized = xstrfmt("%.*s%s", len, len ? prefix : "", path); - if (remaining_prefix) - *remaining_prefix = len; - if (normalize_path_copy_len(sanitized, sanitized, remaining_prefix)) { diff --git a/git/src/git-2.8.1-handle-unset-errors.patch b/git/src/git-2.8.1-handle-unset-errors.patch deleted file mode 100644 index 4a9a850..0000000 --- a/git/src/git-2.8.1-handle-unset-errors.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Jeff King -Subject: [PATCH 3/3] git_config_set_multivar_in_file: handle "unset" errors -Date: Sat, 9 Apr 2016 13:43:54 -0400 - -We pass off to the "_gently" form to do the real work, and -just die() if it returned an error. However, our die message -de-references "value", which may be NULL if the request was -to unset a variable. Nobody using glibc noticed, because it -simply prints "(null)", which is good enough for the test -suite (and presumably very few people run across this in -practice). But other libc implementations (like Solaris) may -segfault. - -Let's not only fix that, but let's make the message more -clear about what is going on in the "unset" case. - -Reported-by: "Tom G. Christensen" -Signed-off-by: Jeff King ---- - config.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/config.c b/config.c -index d446315..3fe40c3 100644 ---- a/config.c -+++ b/config.c -@@ -2221,9 +2221,13 @@ void git_config_set_multivar_in_file(const char *config_filename, - const char *key, const char *value, - const char *value_regex, int multi_replace) - { -- if (git_config_set_multivar_in_file_gently(config_filename, key, value, -- value_regex, multi_replace)) -+ if (!git_config_set_multivar_in_file_gently(config_filename, key, value, -+ value_regex, multi_replace)) -+ return; -+ if (value) - die(_("could not set '%s' to '%s'"), key, value); -+ else -+ die(_("could not unset '%s'"), key); - } - - int git_config_set_multivar_gently(const char *key, const char *value, --- -2.8.1.245.g18e0f5c diff --git a/git/src/git-2.8.1-lower-case-error-strings.patch b/git/src/git-2.8.1-lower-case-error-strings.patch deleted file mode 100644 index 2fb89a9..0000000 --- a/git/src/git-2.8.1-lower-case-error-strings.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Jeff King -Subject: [PATCH 1/3] config: lower-case first word of error strings -Date: Sat, 9 Apr 2016 13:42:31 -0400 - -This follows our usual style (both throughout git, and -throughout the rest of this file). - -This covers the whole file, but note that I left the capitalization in -the multi-sentence: - - error: malformed value... - error: Must be one of ... - -because it helps make it clear that we are starting a new sentence in -the second one. - -Signed-off-by: Jeff King ---- - config.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/config.c b/config.c -index 8f66519..6b81931 100644 ---- a/config.c -+++ b/config.c -@@ -108,7 +108,7 @@ static int handle_path_include(const char *path, struct config_include_data *inc - - expanded = expand_user_path(path); - if (!expanded) -- return error("Could not expand include path '%s'", path); -+ return error("could not expand include path '%s'", path); - path = expanded; - - /* -@@ -950,7 +950,7 @@ static int git_default_branch_config(const char *var, const char *value) - else if (!strcmp(value, "always")) - autorebase = AUTOREBASE_ALWAYS; - else -- return error("Malformed value for %s", var); -+ return error("malformed value for %s", var); - return 0; - } - -@@ -976,7 +976,7 @@ static int git_default_push_config(const char *var, const char *value) - else if (!strcmp(value, "current")) - push_default = PUSH_DEFAULT_CURRENT; - else { -- error("Malformed value for %s: %s", var, value); -+ error("malformed value for %s: %s", var, value); - return error("Must be one of nothing, matching, simple, " - "upstream or current."); - } -@@ -2223,7 +2223,7 @@ void git_config_set_multivar_in_file(const char *config_filename, - { - if (git_config_set_multivar_in_file_gently(config_filename, key, value, - value_regex, multi_replace) < 0) -- die(_("Could not set '%s' to '%s'"), key, value); -+ die(_("could not set '%s' to '%s'"), key, value); - } - - int git_config_set_multivar_gently(const char *key, const char *value, -@@ -2404,7 +2404,7 @@ int git_config_rename_section(const char *old_name, const char *new_name) - #undef config_error_nonbool - int config_error_nonbool(const char *var) - { -- return error("Missing value for '%s'", var); -+ return error("missing value for '%s'", var); - } - - int parse_config_key(const char *var, --- -2.8.1.245.g18e0f5c -