From c31e9a6f6063ab737bc723a0a41dd81065679330 Mon Sep 17 00:00:00 2001 From: Peter Wagner <​tripolar@gmx.at> Date: Tue, 2 Jul 2013 23:13:28 +0000 Subject: [PATCH] update git to v1.8.3.2 SVN-Revision: 37138 --- net/git/Makefile | 4 +- net/git/patches/100-convert_builtin.patch | 320 ++++++++++++---------- 2 files changed, 181 insertions(+), 143 deletions(-) diff --git a/net/git/Makefile b/net/git/Makefile index 337394183..f89944f51 100644 --- a/net/git/Makefile +++ b/net/git/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=git -PKG_VERSION:=1.7.11.2 +PKG_VERSION:=1.8.3.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://git-core.googlecode.com/files/ -PKG_MD5SUM:=91e01a22032f5d0ca2941ae7fd49d587 +PKG_MD5SUM:=83b792fd06066c77e1d4911ebba2d701 PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/net/git/patches/100-convert_builtin.patch b/net/git/patches/100-convert_builtin.patch index 21a6a72da..3bbb24e38 100644 --- a/net/git/patches/100-convert_builtin.patch +++ b/net/git/patches/100-convert_builtin.patch @@ -1,44 +1,148 @@ +diff --git a/Makefile b/Makefile +index 0f931a2..d6c718f 100644 +--- a/Makefile ++++ b/Makefile +@@ -529,16 +529,7 @@ EXTRA_PROGRAMS = + # ... and all the rest that could be moved out of bindir to gitexecdir + PROGRAMS += $(EXTRA_PROGRAMS) + +-PROGRAM_OBJS += credential-store.o +-PROGRAM_OBJS += daemon.o +-PROGRAM_OBJS += fast-import.o +-PROGRAM_OBJS += http-backend.o +-PROGRAM_OBJS += imap-send.o +-PROGRAM_OBJS += sh-i18n--envsubst.o +-PROGRAM_OBJS += shell.o +-PROGRAM_OBJS += show-index.o +-PROGRAM_OBJS += upload-pack.o +-PROGRAM_OBJS += remote-testsvn.o ++PROGRAM_OBJS = + + # Binary suffix, set to .exe for Windows builds + X = +@@ -977,6 +968,12 @@ BUILTIN_OBJS += builtin/var.o + BUILTIN_OBJS += builtin/verify-pack.o + BUILTIN_OBJS += builtin/verify-tag.o + BUILTIN_OBJS += builtin/write-tree.o ++BUILTIN_OBJS += builtin/daemon.o ++BUILTIN_OBJS += builtin/fast-import.o ++BUILTIN_OBJS += builtin/http-backend.o ++BUILTIN_OBJS += builtin/imap-send.o ++BUILTIN_OBJS += builtin/shell.o ++BUILTIN_OBJS += builtin/upload-pack.o + + GITLIBS = $(LIB_FILE) $(XDIFF_LIB) + EXTLIBS = +@@ -1135,7 +1132,7 @@ endif + EXTLIBS += -lz + + ifndef NO_OPENSSL +- OPENSSL_LIBSSL = -lssl ++ EXTLIBS += -lssl + ifdef OPENSSLDIR + BASIC_CFLAGS += -I$(OPENSSLDIR)/include + OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) +@@ -2009,10 +2006,6 @@ endif + git-%$X: %.o GIT-LDFLAGS $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) + +-git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS) +- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ +- $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) +- + git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(LIBS) $(CURL_LIBCURL) +@@ -2323,24 +2316,22 @@ endif + bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ + execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ + { test "$$bindir/" = "$$execdir/" || \ +- for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ ++ for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ + $(RM) "$$execdir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ +- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ ++ ln -s git "$$execdir/$$p" 2>/dev/null || \ + cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ + done; \ + } && \ + for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ + $(RM) "$$bindir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)" && \ +- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ + cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ + done && \ + for p in $(BUILT_INS); do \ + $(RM) "$$execdir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)" && \ +- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ + cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ + done && \ +diff --git a/builtin.h b/builtin.h +index faef559..f2e9d26 100644 +--- a/builtin.h ++++ b/builtin.h +@@ -146,5 +146,11 @@ extern int cmd_verify_pack(int argc, const char **argv, const char *prefix); + extern int cmd_show_ref(int argc, const char **argv, const char *prefix); + extern int cmd_pack_refs(int argc, const char **argv, const char *prefix); + extern int cmd_replace(int argc, const char **argv, const char *prefix); ++extern int cmd_daemon(int argc, char **argv, const char *prefix); ++extern int cmd_fast_import(int argc, const char **argv, const char *prefix); ++extern int cmd_http_backend(int argc, char **argv, const char *prefix); ++extern int cmd_imap_send(int argc, char **argv, const char *prefix); ++extern int cmd_shell(int argc, char **argv, const char *prefix); ++extern int cmd_upload_pack(int argc, char **argv, const char *prefix); + + #endif +diff --git a/builtin/daemon.c b/builtin/daemon.c +new file mode 100644 +index 0000000..b1d8113 --- /dev/null +++ b/builtin/daemon.c @@ -0,0 +1 @@ +#include "../daemon.c" +diff --git a/builtin/fast-import.c b/builtin/fast-import.c +new file mode 100644 +index 0000000..12e1c10 --- /dev/null +++ b/builtin/fast-import.c @@ -0,0 +1 @@ +#include "../fast-import.c" +diff --git a/builtin/http-backend.c b/builtin/http-backend.c +new file mode 100644 +index 0000000..f8780e8 --- /dev/null +++ b/builtin/http-backend.c @@ -0,0 +1 @@ +#include "../http-backend.c" +diff --git a/builtin/imap-send.c b/builtin/imap-send.c +new file mode 100644 +index 0000000..246e2c7 --- /dev/null +++ b/builtin/imap-send.c @@ -0,0 +1 @@ +#include "../imap-send.c" +diff --git a/builtin/shell.c b/builtin/shell.c +new file mode 100644 +index 0000000..deed6bf --- /dev/null +++ b/builtin/shell.c @@ -0,0 +1 @@ +#include "../shell.c" +diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c +new file mode 100644 +index 0000000..14d020a --- /dev/null +++ b/builtin/upload-pack.c @@ -0,0 +1 @@ +#include "../upload-pack.c" ---- a/builtin.h -+++ b/builtin.h -@@ -153,5 +153,11 @@ extern int cmd_verify_pack(int argc, con - extern int cmd_show_ref(int argc, const char **argv, const char *prefix); - extern int cmd_pack_refs(int argc, const char **argv, const char *prefix); - extern int cmd_replace(int argc, const char **argv, const char *prefix); -+extern int cmd_daemon(int argc, char **argv, const char *prefix); -+extern int cmd_fast_import(int argc, const char **argv, const char *prefix); -+extern int cmd_http_backend(int argc, char **argv, const char *prefix); -+extern int cmd_imap_send(int argc, char **argv, const char *prefix); -+extern int cmd_shell(int argc, char **argv, const char *prefix); -+extern int cmd_upload_pack(int argc, char **argv, const char *prefix); - - #endif +diff --git a/daemon.c b/daemon.c +index 6aeddcb..71500cf 100644 --- a/daemon.c +++ b/daemon.c -@@ -1091,7 +1091,7 @@ static int serve(struct string_list *lis +@@ -1160,7 +1160,7 @@ static int serve(struct string_list *listen_addr, int listen_port, return service_loop(&socklist); } @@ -47,6 +151,8 @@ { int listen_port = 0; struct string_list listen_addr = STRING_LIST_INIT_NODUP; +diff --git a/fast-import.c b/fast-import.c +index 5f539d7..bd4a54f 100644 --- a/fast-import.c +++ b/fast-import.c @@ -3347,7 +3347,7 @@ static void parse_argv(void) @@ -58,53 +164,11 @@ { unsigned int i; ---- a/http-backend.c -+++ b/http-backend.c -@@ -533,7 +533,7 @@ static struct service_cmd { - {"POST", "/git-receive-pack$", service_rpc} - }; - --int main(int argc, char **argv) -+int cmd_http_backend(int argc, char **argv, const char *prefix) - { - char *method = getenv("REQUEST_METHOD"); - char *dir; ---- a/imap-send.c -+++ b/imap-send.c -@@ -1502,7 +1502,7 @@ static int git_imap_config(const char *k - return 0; - } - --int main(int argc, char **argv) -+int cmd_imap_send(int argc, char **argv, const char *prefix) - { - struct msg_data all_msgs, msg; - struct store *ctx = NULL; ---- a/shell.c -+++ b/shell.c -@@ -129,7 +129,7 @@ static struct commands { - { NULL }, - }; - --int main(int argc, char **argv) -+int cmd_shell(int argc, char **argv, const char *prefix) - { - char *prog; - const char **user_argv; ---- a/upload-pack.c -+++ b/upload-pack.c -@@ -785,7 +785,7 @@ static void upload_pack(void) - } - } - --int main(int argc, char **argv) -+int cmd_upload_pack(int argc, char **argv, const char *prefix) - { - char *dir; - int i; +diff --git a/git.c b/git.c +index 88eef5a..93751ff 100644 --- a/git.c +++ b/git.c -@@ -269,11 +269,11 @@ const char git_version_string[] = GIT_VE +@@ -252,11 +252,11 @@ static int handle_alias(int *argcp, const char ***argv) struct cmd_struct { const char *cmd; @@ -118,7 +182,7 @@ { int status, help; struct stat st; -@@ -326,7 +326,7 @@ static int run_builtin(struct cmd_struct +@@ -309,7 +309,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) return 0; } @@ -127,14 +191,15 @@ { const char *cmd = argv[0]; static struct cmd_struct commands[] = { -@@ -353,12 +353,14 @@ static void handle_internal_command(int +@@ -337,6 +337,7 @@ static void handle_internal_command(int argc, const char **argv) { "commit-tree", cmd_commit_tree, RUN_SETUP }, { "config", cmd_config, RUN_SETUP_GENTLY }, { "count-objects", cmd_count_objects, RUN_SETUP }, + { "daemon", cmd_daemon }, + { "credential", cmd_credential, RUN_SETUP_GENTLY }, { "describe", cmd_describe, RUN_SETUP }, { "diff", cmd_diff }, - { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE }, +@@ -344,6 +345,7 @@ static void handle_internal_command(int argc, const char **argv) { "diff-index", cmd_diff_index, RUN_SETUP }, { "diff-tree", cmd_diff_tree, RUN_SETUP }, { "fast-export", cmd_fast_export, RUN_SETUP }, @@ -142,7 +207,7 @@ { "fetch", cmd_fetch, RUN_SETUP }, { "fetch-pack", cmd_fetch_pack, RUN_SETUP }, { "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP }, -@@ -371,6 +373,8 @@ static void handle_internal_command(int +@@ -356,6 +358,8 @@ static void handle_internal_command(int argc, const char **argv) { "grep", cmd_grep, RUN_SETUP_GENTLY }, { "hash-object", cmd_hash_object }, { "help", cmd_help }, @@ -151,7 +216,7 @@ { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY }, { "init", cmd_init_db }, { "init-db", cmd_init_db }, -@@ -419,6 +423,7 @@ static void handle_internal_command(int +@@ -404,6 +408,7 @@ static void handle_internal_command(int argc, const char **argv) { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, { "rm", cmd_rm, RUN_SETUP }, { "send-pack", cmd_send_pack, RUN_SETUP }, @@ -159,7 +224,7 @@ { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER }, { "show", cmd_show, RUN_SETUP }, { "show-branch", cmd_show_branch, RUN_SETUP }, -@@ -436,6 +441,7 @@ static void handle_internal_command(int +@@ -421,6 +426,7 @@ static void handle_internal_command(int argc, const char **argv) { "update-server-info", cmd_update_server_info, RUN_SETUP }, { "upload-archive", cmd_upload_archive }, { "upload-archive--writer", cmd_upload_archive_writer }, @@ -167,82 +232,55 @@ { "var", cmd_var, RUN_SETUP_GENTLY }, { "verify-pack", cmd_verify_pack }, { "verify-tag", cmd_verify_tag, RUN_SETUP }, ---- a/Makefile -+++ b/Makefile -@@ -467,15 +467,7 @@ EXTRA_PROGRAMS = - # ... and all the rest that could be moved out of bindir to gitexecdir - PROGRAMS += $(EXTRA_PROGRAMS) - --PROGRAM_OBJS += credential-store.o --PROGRAM_OBJS += daemon.o --PROGRAM_OBJS += fast-import.o --PROGRAM_OBJS += http-backend.o --PROGRAM_OBJS += imap-send.o --PROGRAM_OBJS += sh-i18n--envsubst.o --PROGRAM_OBJS += shell.o --PROGRAM_OBJS += show-index.o --PROGRAM_OBJS += upload-pack.o -+PROGRAM_OBJS = +diff --git a/http-backend.c b/http-backend.c +index 6b85ffa..38582c9 100644 +--- a/http-backend.c ++++ b/http-backend.c +@@ -563,7 +563,7 @@ static struct service_cmd { + {"POST", "/git-receive-pack$", service_rpc} + }; - # Binary suffix, set to .exe for Windows builds - X = -@@ -903,6 +895,12 @@ BUILTIN_OBJS += builtin/var.o - BUILTIN_OBJS += builtin/verify-pack.o - BUILTIN_OBJS += builtin/verify-tag.o - BUILTIN_OBJS += builtin/write-tree.o -+BUILTIN_OBJS += builtin/daemon.o -+BUILTIN_OBJS += builtin/fast-import.o -+BUILTIN_OBJS += builtin/http-backend.o -+BUILTIN_OBJS += builtin/imap-send.o -+BUILTIN_OBJS += builtin/shell.o -+BUILTIN_OBJS += builtin/upload-pack.o +-int main(int argc, char **argv) ++int cmd_http_backend(int argc, char **argv, const char *prefix) + { + char *method = getenv("REQUEST_METHOD"); + char *dir; +diff --git a/imap-send.c b/imap-send.c +index d9bcfb4..cdcd724 100644 +--- a/imap-send.c ++++ b/imap-send.c +@@ -1366,7 +1366,7 @@ static int git_imap_config(const char *key, const char *val, void *cb) + return 0; + } - GITLIBS = $(LIB_FILE) $(XDIFF_LIB) - EXTLIBS = -@@ -1502,7 +1500,7 @@ endif - EXTLIBS += -lz +-int main(int argc, char **argv) ++int cmd_imap_send(int argc, char **argv, const char *prefix) + { + struct strbuf all_msgs = STRBUF_INIT; + struct strbuf msg = STRBUF_INIT; +diff --git a/shell.c b/shell.c +index 1429870..18e34aa 100644 +--- a/shell.c ++++ b/shell.c +@@ -142,7 +142,7 @@ static struct commands { + { NULL }, + }; - ifndef NO_OPENSSL -- OPENSSL_LIBSSL = -lssl -+ EXTLIBS += -lssl - ifdef OPENSSLDIR - BASIC_CFLAGS += -I$(OPENSSLDIR)/include - OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) -@@ -2287,10 +2285,6 @@ endif - git-%$X: %.o GIT-LDFLAGS $(GITLIBS) - $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) +-int main(int argc, char **argv) ++int cmd_shell(int argc, char **argv, const char *prefix) + { + char *prog; + const char **user_argv; +diff --git a/upload-pack.c b/upload-pack.c +index 127e59a..7bd12b0 100644 +--- a/upload-pack.c ++++ b/upload-pack.c +@@ -788,7 +788,7 @@ static int upload_pack_config(const char *var, const char *value, void *unused) + return parse_hide_refs_config(var, value, "uploadpack"); + } --git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS) -- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ -- $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) -- - git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) - $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ - $(LIBS) $(CURL_LIBCURL) -@@ -2587,24 +2581,22 @@ endif - bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ - execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ - { test "$$bindir/" = "$$execdir/" || \ -- for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ -+ for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ - $(RM) "$$execdir/$$p" && \ - test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ -- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ -+ ln -s git "$$execdir/$$p" 2>/dev/null || \ - cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ - done; \ - } && \ - for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ - $(RM) "$$bindir/$$p" && \ - test -z "$(NO_INSTALL_HARDLINKS)" && \ -- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ - ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ - cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ - done && \ - for p in $(BUILT_INS); do \ - $(RM) "$$execdir/$$p" && \ - test -z "$(NO_INSTALL_HARDLINKS)" && \ -- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ - ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ - cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ - done && \ +-int main(int argc, char **argv) ++int cmd_upload_pack(int argc, char **argv, const char *prefix) + { + char *dir; + int i; -- 2.30.2