Haixiao Yan
e3ce89324d
buildtools-tarball: fix unbound variable issues under 'set -u'
...
When Bash runs with 'set -u' (nounset), accessing an unset variable
directly (e.g. [ -z "$SSL_CERT_FILE" ]) causes a fatal "unbound variable"
error. As a result, the fallback logic to set SSL_CERT_FILE/SSL_CERT_DIR
is never triggered and the script aborts.
The current code assumes these variables may be unset or empty, but does
not guard against 'set -u'. This breaks builds in stricter shell
environments or when users explicitly enable 'set -u'.
Fix this by using parameter expansion with a default value, e.g.
"${SSL_CERT_FILE:-}", so that unset variables are treated as empty
strings. This preserves the intended logic (respect host env first, then
CAFILE/CAPATH, then buildtools defaults) and makes the script robust
under 'set -u'.
(From OE-Core rev: 4cf131ebd157b79226533b5a5074691dd0e1a4ab)
Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com >
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
(cherry picked from commit 4d880c2eccd534133a2a4e6579d955605c0956ec)
Signed-off-by: Steve Sakoman <steve@sakoman.com >
2025-09-22 13:17:52 -07:00
..
2025-08-20 07:37:19 -07:00
2023-03-21 22:42:05 +00:00
2024-03-01 09:32:13 +00:00
2024-02-29 10:26:13 +00:00
2023-05-11 17:08:29 +01:00
2024-08-19 06:09:14 -07:00
2023-09-27 11:47:42 +01:00
2024-02-15 09:18:09 +00:00
2023-07-25 15:27:33 +01:00
2023-03-21 22:42:05 +00:00
2022-12-28 23:59:55 +00:00
2023-03-21 22:42:05 +00:00
2023-07-10 11:36:34 +01:00
2023-12-21 10:38:30 +00:00
2023-03-21 22:42:05 +00:00
2024-09-19 05:11:35 -07:00
2023-03-21 22:42:05 +00:00
2024-02-09 13:55:06 +00:00
2020-04-26 14:00:51 +01:00
2024-03-01 09:28:51 +00:00
2023-03-21 22:42:05 +00:00
2023-06-16 15:40:11 +01:00
2023-03-21 22:42:05 +00:00
2024-02-10 14:13:24 +00:00
2025-09-22 13:17:52 -07:00
2021-08-12 06:26:16 +01:00
2025-06-11 08:17:34 -07:00
2025-02-28 06:45:14 -08:00
2022-02-25 15:07:50 +00:00
2023-05-11 17:08:29 +01:00
2025-07-11 08:11:53 -07:00
2023-03-21 22:42:05 +00:00
2023-03-21 22:42:05 +00:00
2023-09-27 11:47:42 +01:00
2024-12-06 05:50:24 -08:00
2021-11-26 17:01:08 +00:00
2025-08-20 07:37:19 -07:00
2024-01-19 12:21:22 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-08-01 06:08:09 -07:00
2024-02-20 11:39:45 +00:00
2024-07-09 06:02:56 -07:00
2024-02-29 10:26:13 +00:00
2024-03-01 09:28:51 +00:00
2023-09-27 11:47:42 +01:00
2024-03-07 17:25:02 +00:00
2024-02-20 11:39:45 +00:00
2024-08-19 06:09:14 -07:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-03-05 12:24:49 +00:00
2024-02-29 10:26:13 +00:00
2024-02-29 10:26:13 +00:00
2024-01-19 12:21:23 +00:00
2022-10-29 16:28:36 +01:00
2024-03-01 09:28:51 +00:00
2023-10-04 23:55:12 +01:00
2023-08-24 16:50:24 +01:00
2024-03-07 17:25:02 +00:00
2023-08-14 12:51:21 +01:00
2018-07-30 12:44:35 +01:00
2023-06-16 15:40:11 +01:00
2024-02-29 10:26:13 +00:00
2023-11-05 11:28:42 +00:00
2024-01-07 12:24:57 +00:00
2023-11-20 15:30:52 +00:00
2024-02-14 13:53:35 +00:00
2024-03-05 12:24:49 +00:00
2024-08-01 06:08:09 -07:00
2023-04-13 13:53:44 +01:00
2024-02-20 11:39:45 +00:00
2023-02-24 13:31:45 +00:00
2022-02-20 16:45:25 +00:00
2023-05-22 10:53:49 +01:00
2024-02-20 11:39:45 +00:00
2023-09-27 11:47:42 +01:00
2025-04-28 08:18:53 -07:00
2024-02-20 11:39:45 +00:00
2024-03-07 17:25:02 +00:00
2024-04-13 14:39:07 +01:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-11-09 05:53:57 -08:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-09-19 05:11:35 -07:00
2023-12-17 19:07:21 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2023-10-19 13:38:57 +01:00
2024-02-20 11:39:45 +00:00
2023-12-23 08:46:00 +00:00
2023-11-20 15:30:52 +00:00
2024-03-01 09:28:51 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-12-13 05:21:54 -08:00
2022-03-16 08:48:08 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2023-11-30 08:43:03 +00:00
2024-03-01 09:28:52 +00:00
2024-02-20 11:39:45 +00:00
2024-08-19 06:09:14 -07:00
2024-08-19 06:09:14 -07:00
2024-02-20 11:39:45 +00:00
2023-12-06 22:55:49 +00:00
2023-11-13 11:38:03 +00:00
2024-07-09 06:02:56 -07:00
2024-02-20 11:39:45 +00:00
2023-11-30 08:43:04 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-03-01 09:28:52 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-03-01 09:28:52 +00:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2024-04-13 14:39:07 +01:00
2025-06-20 08:38:12 -07:00
2024-02-20 11:39:45 +00:00
2022-09-13 10:36:50 +01:00
2022-02-20 16:45:25 +00:00
2024-03-22 16:27:48 +00:00
2024-03-07 17:25:02 +00:00
2024-03-07 17:25:02 +00:00
2023-11-30 08:43:03 +00:00
2024-02-20 11:39:45 +00:00
2025-06-11 08:17:34 -07:00
2024-03-01 09:28:52 +00:00
2025-02-28 06:45:14 -08:00
2021-05-16 08:29:59 +01:00
2022-12-21 10:16:31 +00:00
2024-02-20 11:39:45 +00:00
2022-03-18 23:27:27 +00:00
2021-05-21 15:18:23 +01:00
2023-11-05 11:28:32 +00:00
2023-09-26 10:35:27 +01:00
2024-03-07 17:25:02 +00:00
2024-03-22 16:27:48 +00:00
2024-03-22 16:27:48 +00:00
2024-03-22 16:27:48 +00:00
2024-03-07 17:25:02 +00:00
2023-04-13 13:53:44 +01:00
2024-03-22 16:27:48 +00:00
2024-03-22 16:27:48 +00:00
2024-01-24 15:46:19 +00:00
2024-04-14 06:28:02 +01:00
2024-02-20 11:39:45 +00:00
2023-05-22 10:53:49 +01:00
2024-03-01 09:28:52 +00:00
2024-03-01 09:28:52 +00:00
2024-02-20 11:39:45 +00:00
2024-02-15 09:18:09 +00:00
2023-09-27 11:47:42 +01:00
2025-07-11 08:11:53 -07:00
2021-11-26 17:01:08 +00:00
2024-03-07 17:25:03 +00:00
2024-02-20 11:39:45 +00:00
2024-04-14 06:28:02 +01:00
2023-12-02 17:18:57 +00:00
2024-02-20 11:39:45 +00:00
2024-03-01 09:28:52 +00:00
2024-12-06 05:50:24 -08:00
2024-02-20 11:39:45 +00:00
2020-06-23 12:31:03 +01:00
2024-02-20 11:39:45 +00:00
2024-02-20 11:39:45 +00:00
2023-05-22 10:53:49 +01:00
2024-02-20 11:39:45 +00:00