Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/pwcrypt/, app-admin/pwcrypt/files/
Date: Tue, 12 May 2020 14:43:19
Message-Id: 1589294573.5c65f9976ebf4e21f5cf31d8c0fa1757447ab676.hattya@gentoo
1 commit: 5c65f9976ebf4e21f5cf31d8c0fa1757447ab676
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 12 14:42:29 2020 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Tue May 12 14:42:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c65f997
7
8 app-admin/pwcrypt: fix build with >=sys-devel/gcc-10
9
10 Closes: https://bugs.gentoo.org/707854
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
13
14 app-admin/pwcrypt/files/pwcrypt-gcc-10.patch | 66 ++++++++++++++++++++++++++++
15 app-admin/pwcrypt/pwcrypt-1.2.2-r2.ebuild | 1 +
16 2 files changed, 67 insertions(+)
17
18 diff --git a/app-admin/pwcrypt/files/pwcrypt-gcc-10.patch b/app-admin/pwcrypt/files/pwcrypt-gcc-10.patch
19 new file mode 100644
20 index 00000000000..745c93f5d15
21 --- /dev/null
22 +++ b/app-admin/pwcrypt/files/pwcrypt-gcc-10.patch
23 @@ -0,0 +1,66 @@
24 +--- a/src/cli-crypt.h
25 ++++ b/src/cli-crypt.h
26 +@@ -27,16 +27,16 @@
27 + #define LSIZE 1024 /* our standard buffer size for static memory */
28 +
29 + /* our global variables */
30 +-char cleartext_pass[LSIZE]; /* where do we store the initial cleartext of the password */
31 +-char encrypted_pass[LSIZE]; /* where we stuff our password once it's encrypted */
32 +-char salt_src[LSIZE]; /* a place we can store text to scramble to get our salt */
33 +-char salt[LSIZE]; /* the actual salt we end up with using in our call to crypt(); */
34 ++extern char cleartext_pass[LSIZE]; /* where do we store the initial cleartext of the password */
35 ++extern char encrypted_pass[LSIZE]; /* where we stuff our password once it's encrypted */
36 ++extern char salt_src[LSIZE]; /* a place we can store text to scramble to get our salt */
37 ++extern char salt[LSIZE]; /* the actual salt we end up with using in our call to crypt(); */
38 +
39 + /* flags we use to determine how we're doing things */
40 +-short int md5; /* we doing md5 passwords */
41 +-short int quiet; /* are we to be quiet */
42 +-short int debug; /* do we print debug info? */
43 +-short int do_salt; /* do we need to provide a salt? */
44 ++extern short int md5; /* we doing md5 passwords */
45 ++extern short int quiet; /* are we to be quiet */
46 ++extern short int debug; /* do we print debug info? */
47 ++extern short int do_salt; /* do we need to provide a salt? */
48 +
49 +
50 + /* from main.c */
51 +--- a/src/crypt.c
52 ++++ b/src/crypt.c
53 +@@ -26,7 +26,7 @@
54 +
55 + #include "include.h"
56 +
57 +-
58 ++char encrypted_pass[LSIZE];
59 +
60 + short int cr_crypt() {
61 + char *cp;
62 +--- a/src/getopt.c
63 ++++ b/src/getopt.c
64 +@@ -25,6 +25,13 @@
65 +
66 + #include "include.h"
67 +
68 ++char cleartext_pass[LSIZE];
69 ++
70 ++short int md5;
71 ++short int quiet;
72 ++short int debug;
73 ++short int do_salt;
74 ++
75 + void cr_version(char *me) {
76 + /* some quick mutzing around to get the == of `basename $0` */
77 + char lme[LSIZE];
78 +--- a/src/random.c
79 ++++ b/src/random.c
80 +@@ -27,6 +27,9 @@
81 +
82 + #include "include.h"
83 +
84 ++char salt_src[LSIZE];
85 ++char salt[LSIZE];
86 ++
87 + /* shared amongst the functions in this file */
88 + long int rand_file;
89 +
90
91 diff --git a/app-admin/pwcrypt/pwcrypt-1.2.2-r2.ebuild b/app-admin/pwcrypt/pwcrypt-1.2.2-r2.ebuild
92 index bc081dbe683..250ada02cb4 100644
93 --- a/app-admin/pwcrypt/pwcrypt-1.2.2-r2.ebuild
94 +++ b/app-admin/pwcrypt/pwcrypt-1.2.2-r2.ebuild
95 @@ -14,6 +14,7 @@ SLOT="0"
96 KEYWORDS="amd64 ppc x86"
97 IUSE=""
98
99 +PATCHES=( "${FILESDIR}"/${PN}-gcc-10.patch )
100 DOCS=( CREDITS README )
101
102 src_prepare() {