commit 03942fb
hovercats
·
2024-05-04 18:48:26 +0000 UTC
parent 5920f5d
zip: make patches more consistent
7 files changed,
+83,
-40
+3,
-3
1@@ -1,4 +1,4 @@
2 c622bb4295213bc6d94e42a6da58d8bdb32fc6d8f7f37aa078238c31b05c9d9176
3-7c6b1596061daff3d5b0d2b1b2a7d3f133b9912f99f88d1f732d5d1d1ce0b21566
4-2ff1a790bfbe5c70e375ab04a5e2005684cba7c8ce689b419ad4e5a3b882aebfec
5-c0172d5b8405edd064e03d4f6f313215bb3097274ac9dbbb3415f96c633aec02a9
6+85d4fccfcc73d98604d4183cc1322d7e1aa9dfa7de74c85d26bae7ea812d304ba4
7+0738c7aac287329b8de073c7e9d4cf8fafe6189c3fd103a30f69ac82b251afa4da
8+b4c5dbd122ccd610de483d5fca0d33b74888733f037f1f8105c011d14c8f5c35f2
R repo/zip/patches/zip-3.0-format-security.patch =>
repo/zip/patches/0001-fix-build-with-Werror-format-security.patch
+16,
-2
1@@ -1,5 +1,16 @@
2---- a/zip.c
3-+++ a/zip.c
4+From 54a296d45093014dd4e4bda48ef2fea8ed299b35 Mon Sep 17 00:00:00 2001
5+From: hovercats <hovercatswithlasereyes@protonmail.com>
6+Date: Sat, 4 May 2024 20:43:40 +0200
7+Subject: [PATCH 1/3] fix build with -Werror=format-security
8+
9+---
10+ zip.c | 4 ++--
11+ 1 file changed, 2 insertions(+), 2 deletions(-)
12+
13+diff --git a/zip.c b/zip.c
14+index 439821f..91ad13b 100644
15+--- a/zip.c
16++++ b/zip.c
17 @@ -1028,7 +1028,7 @@ local void help_extended()
18
19 for (i = 0; i < sizeof(text)/sizeof(char *); i++)
20@@ -18,3 +29,6 @@
21 putchar('\n');
22 }
23 ++i; /* crypt support means there IS at least one compilation option */
24+--
25+2.44.0
26+
1@@ -0,0 +1,25 @@
2+From 51671ebaa4fe539d498305421917bce050637e20 Mon Sep 17 00:00:00 2001
3+From: hovercats <hovercatswithlasereyes@protonmail.com>
4+Date: Sat, 4 May 2024 20:46:12 +0200
5+Subject: [PATCH 2/3] strip redundant leading "./" sections
6+
7+---
8+ util.c | 2 ++
9+ 1 file changed, 2 insertions(+)
10+
11+diff --git a/util.c b/util.c
12+index 73317da..2dd3a46 100644
13+--- a/util.c
14++++ b/util.c
15+@@ -493,6 +493,8 @@ int cs; /* force case-sensitive match if TRUE */
16+ /* Compare the sh pattern p with the string s and return true if they match,
17+ false if they don't or if there is a syntax error in the pattern. */
18+ {
19++ while (s[0] == '.' && s[1] == '/')
20++ s += 2; /* strip redundant leading "./" sections */
21+ return recmatch(p, s, cs) == 1;
22+ }
23+
24+--
25+2.44.0
26+
1@@ -0,0 +1,36 @@
2+From 94adfcfb2933d0b053b971cba3d93dfee749b767 Mon Sep 17 00:00:00 2001
3+From: hovercats <hovercatswithlasereyes@protonmail.com>
4+Date: Sat, 4 May 2024 20:47:09 +0200
5+Subject: [PATCH 3/3] add proper GNU stack markings so we dont get the default:
6+ executable
7+
8+---
9+ crc_i386.S | 3 +++
10+ match.S | 3 +++
11+ 2 files changed, 6 insertions(+)
12+
13+diff --git a/crc_i386.S b/crc_i386.S
14+index 38dbc86..62e5c16 100644
15+--- a/crc_i386.S
16++++ b/crc_i386.S
17+@@ -302,3 +302,6 @@ _crc32: /* ulg crc32(ulg crc, uch *buf, extent len) */
18+ #endif /* i386 || _i386 || _I386 || __i386 */
19+
20+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
21++
22++.section .note.GNU-stack, "", @progbits
23++.previous
24+diff --git a/match.S b/match.S
25+index eb8f735..b900d83 100644
26+--- a/match.S
27++++ b/match.S
28+@@ -405,3 +405,6 @@ L__return:
29+ #endif /* i386 || _I386 || _i386 || __i386 */
30+
31+ #endif /* !USE_ZLIB */
32++
33++.section .note.GNU-stack, "", @progbits
34++.previous
35+--
36+2.44.0
37+
+0,
-12
1@@ -1,12 +0,0 @@
2-diff -up zip30/util.c.currdir zip30/util.c
3---- zip30/util.c.currdir 2009-11-16 12:42:17.783961701 +0100
4-+++ zip30/util.c 2009-11-16 12:42:58.185960707 +0100
5-@@ -493,6 +493,8 @@ int cs; /* force case-se
6- /* Compare the sh pattern p with the string s and return true if they match,
7- false if they don't or if there is a syntax error in the pattern. */
8- {
9-+ while (s[0] == '.' && s[1] == '/')
10-+ s += 2; /* strip redundant leading "./" sections */
11- return recmatch(p, s, cs) == 1;
12- }
13-
1@@ -1,20 +0,0 @@
2-diff -up zip30/crc_i386.S.exec_shield zip30/crc_i386.S
3---- zip30/crc_i386.S.exec_shield 2009-11-13 18:37:45.000000000 +0100
4-+++ zip30/crc_i386.S 2009-11-13 18:39:54.435390166 +0100
5-@@ -302,3 +302,6 @@ _crc32: /* ulg c
6- #endif /* i386 || _i386 || _I386 || __i386 */
7-
8- #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
9-+
10-+.section .note.GNU-stack, "", @progbits
11-+.previous
12-diff -up zip30/match.S.exec_shield zip30/match.S
13---- zip30/match.S.exec_shield 2005-01-28 10:40:14.000000000 +0100
14-+++ zip30/match.S 2009-11-13 18:39:48.570389058 +0100
15-@@ -405,3 +405,6 @@ L__return:
16- #endif /* i386 || _I386 || _i386 || __i386 */
17-
18- #endif /* !USE_ZLIB */
19-+
20-+.section .note.GNU-stack, "", @progbits
21-+.previous
+3,
-3
1@@ -1,4 +1,4 @@
2 https://downloads.sourceforge.net/infozip/zip30.tar.gz
3-patches/zip-3.0-currdir.patch
4-patches/zip-3.0-exec-shield.patch
5-patches/zip-3.0-format-security.patch
6+patches/0001-fix-build-with-Werror-format-security.patch
7+patches/0002-strip-redundant-leading-.-sections.patch
8+patches/0003-add-proper-GNU-stack-markings-so-we-dont-get-the-def.patch