* [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env
@ 2015-10-27 12:21 Henning Schild
2015-10-27 12:29 ` [Xenomai] [PATCH v2] " Henning Schild
2015-10-27 12:30 ` [Xenomai] [PATCH] " Gilles Chanteperdrix
0 siblings, 2 replies; 16+ messages in thread
From: Henning Schild @ 2015-10-27 12:21 UTC (permalink / raw)
To: xenomai
The environment variable TMPDIR is optional and not always set. We could
test for it and fall back to /tmp/ or just use the tool mktemp.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 8e960e8..c9bb815 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,9 +238,9 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=$TMPDIR/prepare-kernel-$$
- if ! mkdir $temp_tree; then
- echo Temporary directory $temp_tree already exists, aborting.
+ temp_tree=$( mktemp -d prepare-kernel-XXX )
+ if [ $? -ne 0 ]; then
+ echo Temporary directory could not be created.
exit 1
fi
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Xenomai] [PATCH v2] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:21 [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env Henning Schild
@ 2015-10-27 12:29 ` Henning Schild
2015-10-27 12:30 ` [Xenomai] [PATCH v3] " Henning Schild
2015-10-27 12:30 ` [Xenomai] [PATCH] " Gilles Chanteperdrix
1 sibling, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-10-27 12:29 UTC (permalink / raw)
To: xenomai
The environment variable TMPDIR is optional and not always set. We could
test for it and fall back to /tmp/ or just use the tool mktemp.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 8e960e8..c9bb815 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,9 +238,9 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=$TMPDIR/prepare-kernel-$$
- if ! mkdir $temp_tree; then
- echo Temporary directory $temp_tree already exists, aborting.
+ temp_tree=$( mktemp -d prepare-kernel-XXX )
+ if [ $? -ne 0 ]; then
+ echo Temporary directory could not be created.
exit 1
fi
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:21 [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env Henning Schild
2015-10-27 12:29 ` [Xenomai] [PATCH v2] " Henning Schild
@ 2015-10-27 12:30 ` Gilles Chanteperdrix
2015-10-27 12:35 ` Henning Schild
1 sibling, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2015-10-27 12:30 UTC (permalink / raw)
To: Henning Schild; +Cc: xenomai
On Tue, Oct 27, 2015 at 01:21:16PM +0100, Henning Schild wrote:
> The environment variable TMPDIR is optional and not always set. We could
> test for it and fall back to /tmp/ or just use the tool mktemp.
I am not sure mktemp is available everywhere. What about setting
TMPDIR to /tmp if not set ?
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Xenomai] [PATCH v3] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:29 ` [Xenomai] [PATCH v2] " Henning Schild
@ 2015-10-27 12:30 ` Henning Schild
2015-10-27 12:32 ` Henning Schild
0 siblings, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-10-27 12:30 UTC (permalink / raw)
To: xenomai
The environment variable TMPDIR is optional and not always set. We could
test for it and fall back to /tmp/ or just use the tool mktemp.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 8e960e8..d7a2cc6 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,9 +238,9 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=$TMPDIR/prepare-kernel-$$
- if ! mkdir $temp_tree; then
- echo Temporary directory $temp_tree already exists, aborting.
+ temp_tree=$( mktemp -d prepare-kernel-XXX --tmpdir )
+ if [ $? -ne 0 ]; then
+ echo Temporary directory could not be created.
exit 1
fi
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH v3] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:30 ` [Xenomai] [PATCH v3] " Henning Schild
@ 2015-10-27 12:32 ` Henning Schild
0 siblings, 0 replies; 16+ messages in thread
From: Henning Schild @ 2015-10-27 12:32 UTC (permalink / raw)
To: xenomai
Sorry for the mess. The 3rd adds the --tmpdir switch, that is the diff
to the first two. The v2 is not different from v1 because i did not
ammend before sending the mail.
Henning
On Tue, 27 Oct 2015 13:30:50 +0100
Henning Schild <henning.schild@siemens.com> wrote:
> The environment variable TMPDIR is optional and not always set. We
> could test for it and fall back to /tmp/ or just use the tool mktemp.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> scripts/prepare-kernel.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
> index 8e960e8..d7a2cc6 100755
> --- a/scripts/prepare-kernel.sh
> +++ b/scripts/prepare-kernel.sh
> @@ -238,9 +238,9 @@ fi
> # Create an empty output patch file, and initialize the temporary
> tree. if test "x$output_patch" != "x"; then
>
> - temp_tree=$TMPDIR/prepare-kernel-$$
> - if ! mkdir $temp_tree; then
> - echo Temporary directory $temp_tree already exists, aborting.
> + temp_tree=$( mktemp -d prepare-kernel-XXX --tmpdir )
> + if [ $? -ne 0 ]; then
> + echo Temporary directory could not be created.
> exit 1
> fi
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:30 ` [Xenomai] [PATCH] " Gilles Chanteperdrix
@ 2015-10-27 12:35 ` Henning Schild
2015-10-28 8:33 ` Henning Schild
0 siblings, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-10-27 12:35 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Tue, 27 Oct 2015 13:30:04 +0100
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> On Tue, Oct 27, 2015 at 01:21:16PM +0100, Henning Schild wrote:
> > The environment variable TMPDIR is optional and not always set. We
> > could test for it and fall back to /tmp/ or just use the tool
> > mktemp.
>
> I am not sure mktemp is available everywhere. What about setting
> TMPDIR to /tmp if not set ?
From what i can tell mktemp is more widely available than TMPDIR. My
gentoo boxes do not have TMPDIR set and i have used a ubuntu system
where it was not set either. mktemp is part of coreutils and even
busybox has one.
I did not feel too good reimplementing whatever else mktemp does, why
reinvent the wheel?
Henning
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-27 12:35 ` Henning Schild
@ 2015-10-28 8:33 ` Henning Schild
2015-10-28 10:51 ` Gilles Chanteperdrix
0 siblings, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-10-28 8:33 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Tue, 27 Oct 2015 13:35:40 +0100
Henning Schild <henning.schild@siemens.com> wrote:
> On Tue, 27 Oct 2015 13:30:04 +0100
> Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
>
> > On Tue, Oct 27, 2015 at 01:21:16PM +0100, Henning Schild wrote:
> > > The environment variable TMPDIR is optional and not always set. We
> > > could test for it and fall back to /tmp/ or just use the tool
> > > mktemp.
> >
> > I am not sure mktemp is available everywhere. What about setting
> > TMPDIR to /tmp if not set ?
>
> From what i can tell mktemp is more widely available than TMPDIR. My
> gentoo boxes do not have TMPDIR set and i have used a ubuntu system
> where it was not set either. mktemp is part of coreutils and even
> busybox has one.
> I did not feel too good reimplementing whatever else mktemp does, why
> reinvent the wheel?
Please let me know whether i was convincing and the current patch
version will be merged.
Henning
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://xenomai.org/mailman/listinfo/xenomai
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-28 8:33 ` Henning Schild
@ 2015-10-28 10:51 ` Gilles Chanteperdrix
2015-10-28 11:15 ` [Xenomai] [PATCH v4] " Henning Schild
0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2015-10-28 10:51 UTC (permalink / raw)
To: Henning Schild; +Cc: xenomai
On Wed, Oct 28, 2015 at 09:33:13AM +0100, Henning Schild wrote:
> On Tue, 27 Oct 2015 13:35:40 +0100
> Henning Schild <henning.schild@siemens.com> wrote:
>
> > On Tue, 27 Oct 2015 13:30:04 +0100
> > Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> >
> > > On Tue, Oct 27, 2015 at 01:21:16PM +0100, Henning Schild wrote:
> > > > The environment variable TMPDIR is optional and not always set. We
> > > > could test for it and fall back to /tmp/ or just use the tool
> > > > mktemp.
> > >
> > > I am not sure mktemp is available everywhere. What about setting
> > > TMPDIR to /tmp if not set ?
> >
> > From what i can tell mktemp is more widely available than TMPDIR. My
> > gentoo boxes do not have TMPDIR set and i have used a ubuntu system
> > where it was not set either. mktemp is part of coreutils and even
> > busybox has one.
> > I did not feel too good reimplementing whatever else mktemp does, why
> > reinvent the wheel?
>
> Please let me know whether i was convincing and the current patch
> version will be merged.
The patch is ok for me minus the use of $() which is used nowhere
else in the script and not strictly necessary (no nesting needed).
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Xenomai] [PATCH v4] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-28 10:51 ` Gilles Chanteperdrix
@ 2015-10-28 11:15 ` Henning Schild
2015-10-28 11:26 ` Philippe Gerum
2015-11-04 7:53 ` Gilles Chanteperdrix
0 siblings, 2 replies; 16+ messages in thread
From: Henning Schild @ 2015-10-28 11:15 UTC (permalink / raw)
To: xenomai; +Cc: Gilles Chanteperdrix
The environment variable TMPDIR is optional and not always set. We could
test for it and fall back to /tmp/ or just use the tool mktemp.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 8e960e8..333d11c 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,9 +238,9 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=$TMPDIR/prepare-kernel-$$
- if ! mkdir $temp_tree; then
- echo Temporary directory $temp_tree already exists, aborting.
+ temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
+ if [ $? -ne 0 ]; then
+ echo Temporary directory could not be created.
exit 1
fi
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH v4] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-28 11:15 ` [Xenomai] [PATCH v4] " Henning Schild
@ 2015-10-28 11:26 ` Philippe Gerum
2015-11-04 7:53 ` Gilles Chanteperdrix
1 sibling, 0 replies; 16+ messages in thread
From: Philippe Gerum @ 2015-10-28 11:26 UTC (permalink / raw)
To: Henning Schild, xenomai; +Cc: Gilles Chanteperdrix
On 10/28/2015 12:15 PM, Henning Schild wrote:
> The environment variable TMPDIR is optional and not always set. We could
> test for it and fall back to /tmp/ or just use the tool mktemp.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> scripts/prepare-kernel.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
> index 8e960e8..333d11c 100755
> --- a/scripts/prepare-kernel.sh
> +++ b/scripts/prepare-kernel.sh
> @@ -238,9 +238,9 @@ fi
> # Create an empty output patch file, and initialize the temporary tree.
> if test "x$output_patch" != "x"; then
>
> - temp_tree=$TMPDIR/prepare-kernel-$$
> - if ! mkdir $temp_tree; then
> - echo Temporary directory $temp_tree already exists, aborting.
> + temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
> + if [ $? -ne 0 ]; then
> + echo Temporary directory could not be created.
> exit 1
> fi
>
>
merged, thanks.
--
Philippe.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH v4] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-10-28 11:15 ` [Xenomai] [PATCH v4] " Henning Schild
2015-10-28 11:26 ` Philippe Gerum
@ 2015-11-04 7:53 ` Gilles Chanteperdrix
2015-11-05 10:31 ` Henning Schild
1 sibling, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-04 7:53 UTC (permalink / raw)
To: Henning Schild; +Cc: xenomai
On Wed, Oct 28, 2015 at 12:15:16PM +0100, Henning Schild wrote:
> The environment variable TMPDIR is optional and not always set. We could
> test for it and fall back to /tmp/ or just use the tool mktemp.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> scripts/prepare-kernel.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
> index 8e960e8..333d11c 100755
> --- a/scripts/prepare-kernel.sh
> +++ b/scripts/prepare-kernel.sh
> @@ -238,9 +238,9 @@ fi
> # Create an empty output patch file, and initialize the temporary tree.
> if test "x$output_patch" != "x"; then
>
> - temp_tree=$TMPDIR/prepare-kernel-$$
> - if ! mkdir $temp_tree; then
> - echo Temporary directory $temp_tree already exists, aborting.
> + temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
> + if [ $? -ne 0 ]; then
> + echo Temporary directory could not be created.
> exit 1
> fi
The version of mktemp installed on my machine requires 6 X in the
template.
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH v4] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-11-04 7:53 ` Gilles Chanteperdrix
@ 2015-11-05 10:31 ` Henning Schild
2015-11-05 10:55 ` Gilles Chanteperdrix
0 siblings, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-11-05 10:31 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Wed, 4 Nov 2015 08:53:11 +0100
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> On Wed, Oct 28, 2015 at 12:15:16PM +0100, Henning Schild wrote:
> > The environment variable TMPDIR is optional and not always set. We
> > could test for it and fall back to /tmp/ or just use the tool
> > mktemp.
> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> > scripts/prepare-kernel.sh | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
> > index 8e960e8..333d11c 100755
> > --- a/scripts/prepare-kernel.sh
> > +++ b/scripts/prepare-kernel.sh
> > @@ -238,9 +238,9 @@ fi
> > # Create an empty output patch file, and initialize the temporary
> > tree. if test "x$output_patch" != "x"; then
> >
> > - temp_tree=$TMPDIR/prepare-kernel-$$
> > - if ! mkdir $temp_tree; then
> > - echo Temporary directory $temp_tree already exists,
> > aborting.
> > + temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
> > + if [ $? -ne 0 ]; then
> > + echo Temporary directory could not be created.
> > exit 1
> > fi
>
> The version of mktemp installed on my machine requires 6 X in the
> template.
That is unfortunate but easy enough to fix. The patch has already been
applied, so we will need another one on top. I suggest you go ahead and
expand the template since you found the problem.
The man-pages on my boxes all say "at least 3".
Henning
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH v4] scripts: use mktemp instead of relying on TMPDIR beeing in env
2015-11-05 10:31 ` Henning Schild
@ 2015-11-05 10:55 ` Gilles Chanteperdrix
2015-11-05 18:22 ` [Xenomai] [PATCH] scripts: increase number of Xs in mktemp template Henning Schild
0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-05 10:55 UTC (permalink / raw)
To: Henning Schild; +Cc: xenomai
On Thu, Nov 05, 2015 at 11:31:28AM +0100, Henning Schild wrote:
> On Wed, 4 Nov 2015 08:53:11 +0100
> Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
>
> > On Wed, Oct 28, 2015 at 12:15:16PM +0100, Henning Schild wrote:
> > > The environment variable TMPDIR is optional and not always set. We
> > > could test for it and fall back to /tmp/ or just use the tool
> > > mktemp.
> > >
> > > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > > ---
> > > scripts/prepare-kernel.sh | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
> > > index 8e960e8..333d11c 100755
> > > --- a/scripts/prepare-kernel.sh
> > > +++ b/scripts/prepare-kernel.sh
> > > @@ -238,9 +238,9 @@ fi
> > > # Create an empty output patch file, and initialize the temporary
> > > tree. if test "x$output_patch" != "x"; then
> > >
> > > - temp_tree=$TMPDIR/prepare-kernel-$$
> > > - if ! mkdir $temp_tree; then
> > > - echo Temporary directory $temp_tree already exists,
> > > aborting.
> > > + temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
> > > + if [ $? -ne 0 ]; then
> > > + echo Temporary directory could not be created.
> > > exit 1
> > > fi
> >
> > The version of mktemp installed on my machine requires 6 X in the
> > template.
>
> That is unfortunate but easy enough to fix. The patch has already been
> applied, so we will need another one on top. I suggest you go ahead and
> expand the template since you found the problem.
> The man-pages on my boxes all say "at least 3".
I suggest your fix it.
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Xenomai] [PATCH] scripts: increase number of Xs in mktemp template
2015-11-05 10:55 ` Gilles Chanteperdrix
@ 2015-11-05 18:22 ` Henning Schild
2015-11-05 18:30 ` Gilles Chanteperdrix
0 siblings, 1 reply; 16+ messages in thread
From: Henning Schild @ 2015-11-05 18:22 UTC (permalink / raw)
To: xenomai; +Cc: Gilles Chanteperdrix
In a5cfe9c9a8dbcc094b0c5043b21fa6cde7fc42e5 the use of mktemp was
introduces. Some versions of mktemp seem to require a template of at
least 6 Xs.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 333d11c..b75acf9 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,7 +238,7 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
+ temp_tree=`mktemp -d prepare-kernel-XXXXXX --tmpdir`
if [ $? -ne 0 ]; then
echo Temporary directory could not be created.
exit 1
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Xenomai] [PATCH] scripts: increase number of Xs in mktemp template
2015-11-05 18:22 ` [Xenomai] [PATCH] scripts: increase number of Xs in mktemp template Henning Schild
@ 2015-11-05 18:30 ` Gilles Chanteperdrix
2015-11-06 10:33 ` [Xenomai] [PATCHv2] " Henning Schild
0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-05 18:30 UTC (permalink / raw)
To: Henning Schild; +Cc: xenomai
On Thu, Nov 05, 2015 at 07:22:32PM +0100, Henning Schild wrote:
> In a5cfe9c9a8dbcc094b0c5043b21fa6cde7fc42e5 the use of mktemp was
> introduces. Some versions of mktemp seem to require a template of at
> least 6 Xs.
not at least. Exactly 6 Xs. And this requirement is actually part of
the POSIX standard:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkstemp.html
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Xenomai] [PATCHv2] scripts: increase number of Xs in mktemp template
2015-11-05 18:30 ` Gilles Chanteperdrix
@ 2015-11-06 10:33 ` Henning Schild
0 siblings, 0 replies; 16+ messages in thread
From: Henning Schild @ 2015-11-06 10:33 UTC (permalink / raw)
To: xenomai; +Cc: Gilles Chanteperdrix
In a5cfe9c9a8dbcc094b0c5043b21fa6cde7fc42e5 the use of mktemp was
introduces. There are version of mktemp that are ok with less than six
Xs, but POSIX requires exactly six.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkstemp.html
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/prepare-kernel.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 333d11c..b75acf9 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -238,7 +238,7 @@ fi
# Create an empty output patch file, and initialize the temporary tree.
if test "x$output_patch" != "x"; then
- temp_tree=`mktemp -d prepare-kernel-XXX --tmpdir`
+ temp_tree=`mktemp -d prepare-kernel-XXXXXX --tmpdir`
if [ $? -ne 0 ]; then
echo Temporary directory could not be created.
exit 1
--
2.4.10
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-11-06 10:33 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 12:21 [Xenomai] [PATCH] scripts: use mktemp instead of relying on TMPDIR beeing in env Henning Schild
2015-10-27 12:29 ` [Xenomai] [PATCH v2] " Henning Schild
2015-10-27 12:30 ` [Xenomai] [PATCH v3] " Henning Schild
2015-10-27 12:32 ` Henning Schild
2015-10-27 12:30 ` [Xenomai] [PATCH] " Gilles Chanteperdrix
2015-10-27 12:35 ` Henning Schild
2015-10-28 8:33 ` Henning Schild
2015-10-28 10:51 ` Gilles Chanteperdrix
2015-10-28 11:15 ` [Xenomai] [PATCH v4] " Henning Schild
2015-10-28 11:26 ` Philippe Gerum
2015-11-04 7:53 ` Gilles Chanteperdrix
2015-11-05 10:31 ` Henning Schild
2015-11-05 10:55 ` Gilles Chanteperdrix
2015-11-05 18:22 ` [Xenomai] [PATCH] scripts: increase number of Xs in mktemp template Henning Schild
2015-11-05 18:30 ` Gilles Chanteperdrix
2015-11-06 10:33 ` [Xenomai] [PATCHv2] " Henning Schild
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.