diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch | 81 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.33.1.bb | 5 |
2 files changed, 84 insertions, 2 deletions
diff --git a/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch b/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch new file mode 100644 index 0000000000..4a1960dff2 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From ceb378209f953ea745ed93a8645567196380ce3c Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrej Valek <andrej.valek@siemens.com> | ||
3 | Date: Thu, 24 Jun 2021 19:13:22 +0200 | ||
4 | Subject: [PATCH] mktemp: add tmpdir option | ||
5 | |||
6 | Make mktemp more compatible with coreutils. | ||
7 | - add "--tmpdir" option | ||
8 | - add long variants for "d,q,u" options | ||
9 | |||
10 | Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2021-June/088932.html] | ||
11 | |||
12 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
13 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
14 | --- | ||
15 | coreutils/mktemp.c | 26 ++++++++++++++++++-------- | ||
16 | 1 file changed, 18 insertions(+), 8 deletions(-) | ||
17 | |||
18 | diff --git a/coreutils/mktemp.c b/coreutils/mktemp.c | ||
19 | index 5393320a5..05c6d98c6 100644 | ||
20 | --- a/coreutils/mktemp.c | ||
21 | +++ b/coreutils/mktemp.c | ||
22 | @@ -39,16 +39,17 @@ | ||
23 | //kbuild:lib-$(CONFIG_MKTEMP) += mktemp.o | ||
24 | |||
25 | //usage:#define mktemp_trivial_usage | ||
26 | -//usage: "[-dt] [-p DIR] [TEMPLATE]" | ||
27 | +//usage: "[-dt] [-p DIR, --tmpdir[=DIR]] [TEMPLATE]" | ||
28 | //usage:#define mktemp_full_usage "\n\n" | ||
29 | //usage: "Create a temporary file with name based on TEMPLATE and print its name.\n" | ||
30 | //usage: "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" | ||
31 | //usage: "Without TEMPLATE, -t tmp.XXXXXX is assumed.\n" | ||
32 | -//usage: "\n -d Make directory, not file" | ||
33 | -//usage: "\n -q Fail silently on errors" | ||
34 | -//usage: "\n -t Prepend base directory name to TEMPLATE" | ||
35 | -//usage: "\n -p DIR Use DIR as a base directory (implies -t)" | ||
36 | -//usage: "\n -u Do not create anything; print a name" | ||
37 | +//usage: "\n -d Make directory, not file" | ||
38 | +//usage: "\n -q Fail silently on errors" | ||
39 | +//usage: "\n -t Prepend base directory name to TEMPLATE" | ||
40 | +//usage: "\n -p DIR, --tmpdir[=DIR] Use DIR as a base directory (implies -t)" | ||
41 | +//usage: "\n For --tmpdir is a optional one." | ||
42 | +//usage: "\n -u Do not create anything; print a name" | ||
43 | //usage: "\n" | ||
44 | //usage: "\nBase directory is: -p DIR, else $TMPDIR, else /tmp" | ||
45 | //usage: | ||
46 | @@ -72,13 +73,22 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv) | ||
47 | OPT_t = 1 << 2, | ||
48 | OPT_p = 1 << 3, | ||
49 | OPT_u = 1 << 4, | ||
50 | + OPT_td = 1 << 5, | ||
51 | }; | ||
52 | |||
53 | path = getenv("TMPDIR"); | ||
54 | if (!path || path[0] == '\0') | ||
55 | path = "/tmp"; | ||
56 | |||
57 | - opts = getopt32(argv, "^" "dqtp:u" "\0" "?1"/*1 arg max*/, &path); | ||
58 | + opts = getopt32long(argv, "^" | ||
59 | + "dqtp:u\0" | ||
60 | + "?1" /* 1 arg max */, | ||
61 | + "directory\0" No_argument "d" | ||
62 | + "quiet\0" No_argument "q" | ||
63 | + "dry-run\0" No_argument "u" | ||
64 | + "tmpdir\0" Optional_argument "\xff" | ||
65 | + , &path, &path | ||
66 | + ); | ||
67 | |||
68 | chp = argv[optind]; | ||
69 | if (!chp) { | ||
70 | @@ -95,7 +105,7 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv) | ||
71 | goto error; | ||
72 | } | ||
73 | #endif | ||
74 | - if (opts & (OPT_t|OPT_p)) | ||
75 | + if (opts & (OPT_t|OPT_p|OPT_td)) | ||
76 | chp = concat_path_file(path, chp); | ||
77 | |||
78 | if (opts & OPT_u) { | ||
79 | -- | ||
80 | 2.11.0 | ||
81 | |||
diff --git a/meta/recipes-core/busybox/busybox_1.33.1.bb b/meta/recipes-core/busybox/busybox_1.33.1.bb index a71ff530cb..4c2bc1106d 100644 --- a/meta/recipes-core/busybox/busybox_1.33.1.bb +++ b/meta/recipes-core/busybox/busybox_1.33.1.bb | |||
@@ -38,6 +38,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
38 | ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \ | 38 | ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \ |
39 | file://syslog.cfg \ | 39 | file://syslog.cfg \ |
40 | file://unicode.cfg \ | 40 | file://unicode.cfg \ |
41 | file://rev.cfg \ | ||
42 | file://pgrep.cfg \ | ||
41 | file://rcS \ | 43 | file://rcS \ |
42 | file://rcK \ | 44 | file://rcK \ |
43 | file://makefile-libbb-race.patch \ | 45 | file://makefile-libbb-race.patch \ |
@@ -45,9 +47,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
45 | file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \ | 47 | file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \ |
46 | file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \ | 48 | file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \ |
47 | file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ | 49 | file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ |
48 | file://rev.cfg \ | ||
49 | file://pgrep.cfg \ | ||
50 | file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ | 50 | file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ |
51 | file://0001-mktemp-add-tmpdir-option.patch \ | ||
51 | " | 52 | " |
52 | SRC_URI_append_libc-musl = " file://musl.cfg " | 53 | SRC_URI_append_libc-musl = " file://musl.cfg " |
53 | 54 | ||