From 1f93ef2b83c47885c69272c4d3685858e1c9288e Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 19:21:37 +0430 Subject: Ports: Update git's patches to use git patches --- ...-Remove-some-unimplemented-function-calls.patch | 74 ++++++++++++++++++++++ ...emove-uname-detection-in-config.mak.uname.patch | 35 ++++++++++ Ports/git/patches/ReadMe.md | 13 ++++ Ports/git/patches/build.patch | 59 ----------------- Ports/git/patches/no-uname-detection.patch | 23 ------- 5 files changed, 122 insertions(+), 82 deletions(-) create mode 100644 Ports/git/patches/0001-Remove-some-unimplemented-function-calls.patch create mode 100644 Ports/git/patches/0002-Remove-uname-detection-in-config.mak.uname.patch create mode 100644 Ports/git/patches/ReadMe.md delete mode 100644 Ports/git/patches/build.patch delete mode 100644 Ports/git/patches/no-uname-detection.patch (limited to 'Ports/git/patches') diff --git a/Ports/git/patches/0001-Remove-some-unimplemented-function-calls.patch b/Ports/git/patches/0001-Remove-some-unimplemented-function-calls.patch new file mode 100644 index 0000000000..cbe9a1ac61 --- /dev/null +++ b/Ports/git/patches/0001-Remove-some-unimplemented-function-calls.patch @@ -0,0 +1,74 @@ +From 5d3c9d7aafc66abe10e035a7930b0868f73916b5 Mon Sep 17 00:00:00 2001 +From: Federico Guerinoni <41150432+guerinoni@users.noreply.github.com> +Date: Fri, 16 Apr 2021 17:38:54 +0200 +Subject: [PATCH 1/2] Remove some unimplemented function calls + +i.e. f(un)lockfile stubs and setitimer. +--- + builtin/log.c | 2 -- + git-compat-util.h | 8 -------- + progress.c | 2 -- + 3 files changed, 12 deletions(-) + +diff --git a/builtin/log.c b/builtin/log.c +index c211d66..9755174 100644 +--- a/builtin/log.c ++++ b/builtin/log.c +@@ -373,7 +373,6 @@ static void log_show_early(struct rev_info *revs, struct commit_list *list) + */ + early_output_timer.it_value.tv_sec = 0; + early_output_timer.it_value.tv_usec = 500000; +- setitimer(ITIMER_REAL, &early_output_timer, NULL); + } + + static void early_output(int signal) +@@ -407,7 +406,6 @@ static void setup_early_output(void) + */ + early_output_timer.it_value.tv_sec = 0; + early_output_timer.it_value.tv_usec = 100000; +- setitimer(ITIMER_REAL, &early_output_timer, NULL); + } + + static void finish_early_output(struct rev_info *rev) +diff --git a/git-compat-util.h b/git-compat-util.h +index 58fd813..0a0f007 100644 +--- a/git-compat-util.h ++++ b/git-compat-util.h +@@ -1350,14 +1350,6 @@ int open_nofollow(const char *path, int flags); + #endif + + #ifndef _POSIX_THREAD_SAFE_FUNCTIONS +-static inline void flockfile(FILE *fh) +-{ +- ; /* nothing */ +-} +-static inline void funlockfile(FILE *fh) +-{ +- ; /* nothing */ +-} + #define getc_unlocked(fh) getc(fh) + #endif + +diff --git a/progress.c b/progress.c +index 0cdd875..19a2a67 100644 +--- a/progress.c ++++ b/progress.c +@@ -83,7 +83,6 @@ static void set_progress_signal(void) + v.it_interval.tv_sec = 1; + v.it_interval.tv_usec = 0; + v.it_value = v.it_interval; +- setitimer(ITIMER_REAL, &v, NULL); + } + + static void clear_progress_signal(void) +@@ -93,7 +92,6 @@ static void clear_progress_signal(void) + if (progress_testing) + return; + +- setitimer(ITIMER_REAL, &v, NULL); + signal(SIGALRM, SIG_IGN); + progress_update = 0; + } +-- +2.36.1 + diff --git a/Ports/git/patches/0002-Remove-uname-detection-in-config.mak.uname.patch b/Ports/git/patches/0002-Remove-uname-detection-in-config.mak.uname.patch new file mode 100644 index 0000000000..d22ea0eba0 --- /dev/null +++ b/Ports/git/patches/0002-Remove-uname-detection-in-config.mak.uname.patch @@ -0,0 +1,35 @@ +From 1dc6e8b8d7cb459ce209b9f55a69c1f53f277daa Mon Sep 17 00:00:00 2001 +From: TheFightingCatfish +Date: Fri, 13 Aug 2021 06:52:59 +0800 +Subject: [PATCH 2/2] Remove uname detection in config.mak.uname + +--- + config.mak.uname | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config.mak.uname b/config.mak.uname +index 259d151..b072f4c 100644 +--- a/config.mak.uname ++++ b/config.mak.uname +@@ -4,12 +4,12 @@ + # Microsoft's Safe Exception Handling in libraries (such as zlib). + # Typically required for VS2013+/32-bit compilation on Vista+ versions. + +-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') +-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') +-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') +-uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') +-uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') ++# uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') ++# uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') ++# uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') ++# uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') ++# uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') ++# uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') + + ifneq ($(findstring MINGW,$(uname_S)),) + uname_S := MINGW +-- +2.36.1 + diff --git a/Ports/git/patches/ReadMe.md b/Ports/git/patches/ReadMe.md new file mode 100644 index 0000000000..29d6141a0b --- /dev/null +++ b/Ports/git/patches/ReadMe.md @@ -0,0 +1,13 @@ +# Patches for git on SerenityOS + +## `0001-Remove-some-unimplemented-function-calls.patch` + +Remove some unimplemented function calls + +i.e. f(un)lockfile stubs and setitimer. + +## `0002-Remove-uname-detection-in-config.mak.uname.patch` + +Remove uname detection in config.mak.uname + + diff --git a/Ports/git/patches/build.patch b/Ports/git/patches/build.patch deleted file mode 100644 index 3035ed4fb1..0000000000 --- a/Ports/git/patches/build.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/builtin/log.c b/builtin/log.c -index f67b67d..ae6ebee 100644 ---- a/builtin/log.c -+++ b/builtin/log.c -@@ -354,7 +354,6 @@ static void log_show_early(struct rev_info *revs, struct commit_list *list) - */ - early_output_timer.it_value.tv_sec = 0; - early_output_timer.it_value.tv_usec = 500000; -- setitimer(ITIMER_REAL, &early_output_timer, NULL); - } - - static void early_output(int signal) -@@ -388,7 +387,6 @@ static void setup_early_output(void) - */ - early_output_timer.it_value.tv_sec = 0; - early_output_timer.it_value.tv_usec = 100000; -- setitimer(ITIMER_REAL, &early_output_timer, NULL); - } - - static void finish_early_output(struct rev_info *rev) -diff --git a/git-compat-util.h b/git-compat-util.h -index 3b2738c..618f6d2 100644 ---- a/git-compat-util.h -+++ b/git-compat-util.h -@@ -1251,14 +1251,6 @@ int warn_on_fopen_errors(const char *path); - #endif - - #ifndef _POSIX_THREAD_SAFE_FUNCTIONS --static inline void flockfile(FILE *fh) --{ -- ; /* nothing */ --} --static inline void funlockfile(FILE *fh) --{ -- ; /* nothing */ --} - #define getc_unlocked(fh) getc(fh) - #endif - -diff --git a/progress.c b/progress.c -index 31014e6..d48acce 100644 ---- a/progress.c -+++ b/progress.c -@@ -83,7 +83,6 @@ static void set_progress_signal(void) - v.it_interval.tv_sec = 1; - v.it_interval.tv_usec = 0; - v.it_value = v.it_interval; -- setitimer(ITIMER_REAL, &v, NULL); - } - - static void clear_progress_signal(void) -@@ -93,7 +92,6 @@ static void clear_progress_signal(void) - if (progress_testing) - return; - -- setitimer(ITIMER_REAL, &v, NULL); - signal(SIGALRM, SIG_IGN); - progress_update = 0; - } diff --git a/Ports/git/patches/no-uname-detection.patch b/Ports/git/patches/no-uname-detection.patch deleted file mode 100644 index 66a1dfb943..0000000000 --- a/Ports/git/patches/no-uname-detection.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/config.mak.uname b/config.mak.uname -index d204c20..d49e3ba 100644 ---- a/config.mak.uname -+++ b/config.mak.uname -@@ -4,12 +4,12 @@ - # Microsoft's Safe Exception Handling in libraries (such as zlib). - # Typically required for VS2013+/32-bit compilation on Vista+ versions. - --uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') --uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') --uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') --uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') --uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') --uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') -+# uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -+# uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') -+# uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') -+# uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') -+# uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') -+# uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') - - ifdef MSVC - # avoid the MingW and Cygwin configuration sections -- cgit v1.2.3