Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 848474 - media-video/mjpg-streamer-0_pre20200524-r1 installs shell script that uses non-POSIX features
Summary: media-video/mjpg-streamer-0_pre20200524-r1 installs shell script that uses no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: ChaosEngine
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 609070
  Show dependency tree
 
Reported: 2022-05-30 08:42 UTC by Agostino Sarubbo
Modified: 2022-07-03 15:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,48.77 KB, text/plain)
2022-05-30 08:42 UTC, Agostino Sarubbo
Details
0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch (0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch,2.41 KB, patch)
2022-07-02 18:06 UTC, Kerin Millar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-05-30 08:42:20 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-video/mjpg-streamer-0_pre20200524-r1 installs shell script that uses non-POSIX features.
Discovered on: amd64 (internal ref: tinderbox)
Comment 1 Agostino Sarubbo gentoo-dev 2022-05-30 08:42:22 UTC
Created attachment 781403 [details]
build.log

build log and emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2022-07-02 17:35:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a15764fea542d473a1abf67ccccd8fd5dee68d5

commit 1a15764fea542d473a1abf67ccccd8fd5dee68d5
Author:     ChaosEngine <andrzej.pauli@gmail.com>
AuthorDate: 2022-06-12 15:38:23 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-07-02 17:35:14 +0000

    media-video/mjpg-streamer: fix init script's non-POSIX features
    
    Closes: https://bugs.gentoo.org/848474
    Signed-off-by: Andrzej Pauli (@ChaosEngine) <andrzej.pauli@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/25865
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/mjpg-streamer/files/mjpg-streamer.initd | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Comment 3 Kerin Millar 2022-07-02 17:58:31 UTC
Re-opening because the referenced commit does not fix all of the POSIX violations. The matter of [[ vs [ is only one of several conformance issues in the runscript. If you don't mind waiting, I already have a commit that deals with all of them in a branch I'm presently working on (I'm examining all of the 609070 blockers in detail).
Comment 4 Kerin Millar 2022-07-02 18:06:21 UTC
Created attachment 789647 [details, diff]
0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch

I didn't want to publish any patches before I'd finished but I'll make an exception in this case. This attachment actually rectifies all of the issues.
Comment 5 Joonas Niilola gentoo-dev 2022-07-03 06:06:15 UTC
Thanks! I'm not too familiar with POSIX but dev-util/checkbashisms didn't complain if I remember correctly so I just trusted that.
Comment 6 Larry the Git Cow gentoo-dev 2022-07-03 06:06:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e565ecb9cc44e7af96faf0f1b50c2a5a142dc7ca

commit e565ecb9cc44e7af96faf0f1b50c2a5a142dc7ca
Author:     Kerin Millar <kfm@plushkava.net>
AuthorDate: 2022-07-01 20:01:32 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-07-03 06:06:43 +0000

    media-video/mjpg-streamer: Avoid non-POSIX features in runscript
    
    Use [ rather than [[ (SC3010). Don't use += (SC3024). Don't use string
    replacing forms of parameter expansion (SC3060); instead use tr(1).
    
    Closes: https://bugs.gentoo.org/848474
    Signed-off-by: Kerin Millar <kfm@plushkava.net>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/mjpg-streamer/files/mjpg-streamer.initd | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
Comment 7 ChaosEngine 2022-07-03 12:27:56 UTC
Thanks (In reply to Kerin Millar from comment #4)
> Created attachment 789647 [details, diff] [details, diff]
> 0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch
> 
> I didn't want to publish any patches before I'd finished but I'll make an
> exception in this case. This attachment actually rectifies all of the issues.

Thanks Kerin, it never occurred to me that there may be other POSIX-bashism, never was a specialist on this matter.
Much apprieciated.
Comment 8 Kerin Millar 2022-07-03 15:51:54 UTC
(In reply to ChaosEngine from comment #7)
> Thanks Kerin, it never occurred to me that there may be other POSIX-bashism,
> never was a specialist on this matter.
> Much apprieciated.

You are quite welcome.