Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: Don't unset IFS
@ 2024-01-28 14:29 heindsight
  2024-02-08 19:17 ` [PR PATCH] [Updated] " heindsight
  2024-05-09  1:46 ` github-actions
  0 siblings, 2 replies; 3+ messages in thread
From: heindsight @ 2024-01-28 14:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

There is a new pull request by heindsight against master on the void-packages repository

https://github.com/heindsight/void-packages xbps-src-ifs
https://github.com/void-linux/void-packages/pull/48402

xbps-src: Don't unset IFS
If IFS is unset, the shell behaves as if it has the default value of `<space><tab><newline>`. However, after unsetting IFS, constructs like
```
OFS="$IFS"; IFS=','
...
IFS="$OIFS"
```
(for example in [common/xbps-src/shutils/common.sh lines 246-253](https://github.com/void-linux/void-packages/blob/d2fbe47cac44061f1154db62f6f939178f204d15/common/xbps-src/shutils/common.sh#L246)) have the effect of setting IFS with an empty value, which breaks word-splitting. This results in an error like
```
./common/xbps-src/shutils/bulk.sh: line 125: sudo /bin/sh -c: No such file or directory
```
when running `./xbps-src update-sys` with `XBPS_SUCMD` set to the default value (`sudo /bin/sh -c`).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48402.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-ifs-48402.patch --]
[-- Type: text/x-diff, Size: 1471 bytes --]

From 6d869019bff05e4e08cf8b32887ac468ca9d2691 Mon Sep 17 00:00:00 2001
From: Heinrich Kruger <heindsight@kruger.dev>
Date: Sun, 28 Jan 2024 14:07:36 +0000
Subject: [PATCH] xbps-src: Don't unset IFS

If IFS is unset, the shell behaves as if it has the default value of
`<space><tab><newline>`. However, after unsetting IFS, constructs like
```
OFS="$IFS"; IFS=','
...
IFS="$OIFS"
```
(for example in common/xbps-src/shutils/common.sh lines 246-253) have
the effect of setting IFS with an empty value, which breaks
word-splitting. This results in an error like
```
./common/xbps-src/shutils/bulk.sh: line 125: sudo /bin/sh -c: No such file or directory
```
when running `./xbps-src update-sys` with `XBPS_SUCMD` set to the
default value (`sudo /bin/sh -c`).
---
 common/environment/setup/sourcepkg.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh
index b08379acdd35f..ded61bddc08b6 100644
--- a/common/environment/setup/sourcepkg.sh
+++ b/common/environment/setup/sourcepkg.sh
@@ -20,7 +20,7 @@ for var in $(awk 'BEGIN{for (i in ENVIRON) {print i}}' </dev/null); do
 		;;
 	FREEDESKTOP_SITE | KDE_SITE | VIDEOLAN_SITE | UBUNTU_SITE)
 		;;
-	_ | PWD | SHLVL | USER | PATH | SHELL | HOME | LC_COLLATE | LANG | TERM | PS1)
+	_ | PWD | SHLVL | USER | PATH | SHELL | HOME | LC_COLLATE | LANG | TERM | PS1 | IFS)
 		# known variables for shell
 		;;
 	DISTCC_HOSTS | DISTCC_DIR)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] xbps-src: Don't unset IFS
  2024-01-28 14:29 [PR PATCH] xbps-src: Don't unset IFS heindsight
@ 2024-02-08 19:17 ` heindsight
  2024-05-09  1:46 ` github-actions
  1 sibling, 0 replies; 3+ messages in thread
From: heindsight @ 2024-02-08 19:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

There is an updated pull request by heindsight against master on the void-packages repository

https://github.com/heindsight/void-packages xbps-src-ifs
https://github.com/void-linux/void-packages/pull/48402

xbps-src: Don't unset IFS
If IFS is unset, the shell behaves as if it has the default value of `<space><tab><newline>`. However, after unsetting IFS, constructs like
```
OFS="$IFS"; IFS=','
...
IFS="$OIFS"
```
(for example in [common/xbps-src/shutils/common.sh lines 246-253](https://github.com/void-linux/void-packages/blob/d2fbe47cac44061f1154db62f6f939178f204d15/common/xbps-src/shutils/common.sh#L246)) have the effect of setting IFS with an empty value, which breaks word-splitting. This results in an error like
```
./common/xbps-src/shutils/bulk.sh: line 125: sudo /bin/sh -c: No such file or directory
```
when running `./xbps-src update-sys` with `XBPS_SUCMD` set to the default value (`sudo /bin/sh -c`).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48402.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-ifs-48402.patch --]
[-- Type: text/x-diff, Size: 1471 bytes --]

From 1197cd24344c9830fe88ad367e542bdf056ef6a6 Mon Sep 17 00:00:00 2001
From: Heinrich Kruger <heindsight@kruger.dev>
Date: Sun, 28 Jan 2024 14:07:36 +0000
Subject: [PATCH] xbps-src: Don't unset IFS

If IFS is unset, the shell behaves as if it has the default value of
`<space><tab><newline>`. However, after unsetting IFS, constructs like
```
OFS="$IFS"; IFS=','
...
IFS="$OIFS"
```
(for example in common/xbps-src/shutils/common.sh lines 246-253) have
the effect of setting IFS with an empty value, which breaks
word-splitting. This results in an error like
```
./common/xbps-src/shutils/bulk.sh: line 125: sudo /bin/sh -c: No such file or directory
```
when running `./xbps-src update-sys` with `XBPS_SUCMD` set to the
default value (`sudo /bin/sh -c`).
---
 common/environment/setup/sourcepkg.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh
index b08379acdd35f..ded61bddc08b6 100644
--- a/common/environment/setup/sourcepkg.sh
+++ b/common/environment/setup/sourcepkg.sh
@@ -20,7 +20,7 @@ for var in $(awk 'BEGIN{for (i in ENVIRON) {print i}}' </dev/null); do
 		;;
 	FREEDESKTOP_SITE | KDE_SITE | VIDEOLAN_SITE | UBUNTU_SITE)
 		;;
-	_ | PWD | SHLVL | USER | PATH | SHELL | HOME | LC_COLLATE | LANG | TERM | PS1)
+	_ | PWD | SHLVL | USER | PATH | SHELL | HOME | LC_COLLATE | LANG | TERM | PS1 | IFS)
 		# known variables for shell
 		;;
 	DISTCC_HOSTS | DISTCC_DIR)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xbps-src: Don't unset IFS
  2024-01-28 14:29 [PR PATCH] xbps-src: Don't unset IFS heindsight
  2024-02-08 19:17 ` [PR PATCH] [Updated] " heindsight
@ 2024-05-09  1:46 ` github-actions
  1 sibling, 0 replies; 3+ messages in thread
From: github-actions @ 2024-05-09  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/48402#issuecomment-2101780976

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-09  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 14:29 [PR PATCH] xbps-src: Don't unset IFS heindsight
2024-02-08 19:17 ` [PR PATCH] [Updated] " heindsight
2024-05-09  1:46 ` github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).