Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/, sys-apps/busybox/files/
Date: Thu, 06 Feb 2020 23:06:49
Message-Id: 1581030394.d7d0d98ea093bb29a81c1f9c0d27d823c61e8640.chutzpah@gentoo
1 commit: d7d0d98ea093bb29a81c1f9c0d27d823c61e8640
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Thu Feb 6 23:06:22 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 6 23:06:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7d0d98e
7
8 sys-apps/busybox-1.31.1-r1: Revbump, virtual/libxcrypt, fix bug #708350
9
10 Closes: https://bugs.gentoo.org/708350
11 Copyright: Sony Interactive Entertainment Inc.
12 Package-Manager: Portage-2.3.87, Repoman-2.3.20
13 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
14
15 ...ybox-1.31.1.ebuild => busybox-1.31.1-r1.ebuild} | 15 +++--
16 .../busybox/files/busybox-1.31.1-glibc-2.31.patch | 65 ++++++++++++++++++++++
17 2 files changed, 75 insertions(+), 5 deletions(-)
18
19 diff --git a/sys-apps/busybox/busybox-1.31.1.ebuild b/sys-apps/busybox/busybox-1.31.1-r1.ebuild
20 similarity index 97%
21 rename from sys-apps/busybox/busybox-1.31.1.ebuild
22 rename to sys-apps/busybox/busybox-1.31.1-r1.ebuild
23 index c15fa90610c..0ee063abe46 100644
24 --- a/sys-apps/busybox/busybox-1.31.1.ebuild
25 +++ b/sys-apps/busybox/busybox-1.31.1-r1.ebuild
26 @@ -1,9 +1,9 @@
27 -# Copyright 1999-2019 Gentoo Authors
28 +# Copyright 1999-2020 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30
31 # See `man savedconfig.eclass` for info on how to use USE=savedconfig.
32
33 -EAPI=6
34 +EAPI=7
35
36 inherit flag-o-matic savedconfig toolchain-funcs
37
38 @@ -26,14 +26,18 @@ REQUIRED_USE="pam? ( !static )"
39 RESTRICT="test"
40
41 COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
42 - pam? ( sys-libs/pam )"
43 + pam? ( sys-libs/pam )
44 + virtual/libcrypt"
45 DEPEND="${COMMON_DEPEND}
46 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
47 + static? (
48 + virtual/libcrypt[static-libs]
49 + selinux? ( sys-libs/libselinux[static-libs(+)] )
50 + )
51 >=sys-kernel/linux-headers-2.6.39"
52 RDEPEND="${COMMON_DEPEND}
53 mdev? ( !<sys-apps/openrc-0.13 )"
54
55 -S=${WORKDIR}/${MY_P}
56 +S="${WORKDIR}/${MY_P}"
57
58 busybox_config_option() {
59 local flag=$1 ; shift
60 @@ -66,6 +70,7 @@ busybox_config_enabled() {
61 # patches go here!
62 PATCHES=(
63 "${FILESDIR}"/${PN}-1.26.2-bb.patch
64 + "${FILESDIR}"/${PN}-1.31.1-glibc-2.31.patch
65 # "${FILESDIR}"/${P}-*.patch
66 )
67
68
69 diff --git a/sys-apps/busybox/files/busybox-1.31.1-glibc-2.31.patch b/sys-apps/busybox/files/busybox-1.31.1-glibc-2.31.patch
70 new file mode 100644
71 index 00000000000..1cef320b284
72 --- /dev/null
73 +++ b/sys-apps/busybox/files/busybox-1.31.1-glibc-2.31.patch
74 @@ -0,0 +1,65 @@
75 +diff --git a/coreutils/date.c b/coreutils/date.c
76 +index 3414d38ae..4ade6abb4 100644
77 +--- a/coreutils/date.c
78 ++++ b/coreutils/date.c
79 +@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv)
80 + time(&ts.tv_sec);
81 + #endif
82 + }
83 ++#if !ENABLE_FEATURE_DATE_NANO
84 ++ ts.tv_nsec = 0;
85 ++#endif
86 + localtime_r(&ts.tv_sec, &tm_time);
87 +
88 + /* If date string is given, update tm_time, and maybe set date */
89 +@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv)
90 + if (date_str[0] != '@')
91 + tm_time.tm_isdst = -1;
92 + ts.tv_sec = validate_tm_time(date_str, &tm_time);
93 ++ ts.tv_nsec = 0;
94 +
95 + /* if setting time, set it */
96 +- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
97 ++ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) {
98 + bb_perror_msg("can't set date");
99 + }
100 + }
101 +diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c
102 +index 87cf59b3d..dc40d9155 100644
103 +--- a/libbb/missing_syscalls.c
104 ++++ b/libbb/missing_syscalls.c
105 +@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid)
106 + return syscall(__NR_getsid, pid);
107 + }
108 +
109 +-int stime(const time_t *t)
110 +-{
111 +- struct timeval tv;
112 +- tv.tv_sec = *t;
113 +- tv.tv_usec = 0;
114 +- return settimeofday(&tv, NULL);
115 +-}
116 +-
117 + int sethostname(const char *name, size_t len)
118 + {
119 + return syscall(__NR_sethostname, name, len);
120 +diff --git a/util-linux/rdate.c b/util-linux/rdate.c
121 +index 70f829e7f..878375d78 100644
122 +--- a/util-linux/rdate.c
123 ++++ b/util-linux/rdate.c
124 +@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv)
125 + if (!(flags & 2)) { /* no -p (-s may be present) */
126 + if (time(NULL) == remote_time)
127 + bb_error_msg("current time matches remote time");
128 +- else
129 +- if (stime(&remote_time) < 0)
130 ++ else {
131 ++ struct timespec ts;
132 ++ ts.tv_sec = remote_time;
133 ++ ts.tv_nsec = 0;
134 ++ if (clock_settime(CLOCK_REALTIME, &ts) < 0)
135 + bb_perror_msg_and_die("can't set time of day");
136 ++ }
137 + }
138 +
139 + if (flags != 1) /* not lone -s */