Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 764881

Summary: media-video/aegisub: fails to configure when /bin/sh is a syslink to dash
Product: Gentoo Linux Reporter: James McClain <james>
Component: Current packagesAssignee: Nick Sarnie <sarnex>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, kfm
Priority: Normal Keywords: PATCH, UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: Make configure.ac dash compatible.
build.log + emerge --info.txt
Make configure.ac dash compatible (improved)

Description James McClain 2021-01-10 22:00:30 UTC
Created attachment 682297 [details, diff]
Make configure.ac dash compatible.

Aegisub's configure script fails at the "checking for version" configure
step, because the line '. $srcdir/build/version.sh "$srcdir"' in
'configure.ac' doesn't work in dash.

I've attached a patch that'll make it work by replacing this:

. $srcdir/build/version.sh "$srcdir"

with this:

old=$@
set -- "$srcdir"
. $srcdir/build/version.sh
set -- $old

Which saves the old configure arguments before modifying them with 'set --' and then restores them after sourcing 'version.sh'.
Comment 1 Ionen Wolkens gentoo-dev 2021-01-10 22:18:01 UTC
Created attachment 682309 [details]
build.log + emerge --info.txt

Can confirm, attaching own logs/info for completeness.
Comment 2 Nick Sarnie gentoo-dev 2021-01-10 22:19:54 UTC
Thanks for the patch, can you make a PR please

https://wiki.gentoo.org/wiki/GitHub_Pull_Requests#How_to_make_a_pull_request

Thanks,
Sarnex
Comment 3 kfm 2021-01-10 23:03:14 UTC
The given patch could, in principle, damage the original positional parameter list. There is actually no need to manipulate the positional parameter list at all. I shall attach a cleaner patch momentarily.
Comment 4 kfm 2021-01-10 23:38:41 UTC
Created attachment 682318 [details, diff]
Make configure.ac dash compatible (improved)

Revised patch that works by simply allowing for the sourced file to leverage the fact that the needed variable is already set. The hunk that applies to version.sh could be rendered neater still by instead removing the srcdir="$1" line. However, I had it retain the ability to collect the value from $1 for the reason stated in the commit message.
Comment 5 Nick Sarnie gentoo-dev 2021-01-10 23:46:23 UTC
Thanks, can you make a github PR?
Comment 6 kfm 2021-01-10 23:55:01 UTC
(In reply to Nick Sarnie from comment #5)
> Thanks, can you make a github PR?

I cannot in this instance. I disapprove of GitHub increasingly becoming the bar for open-source participation and cancelled my account some time ago. That said, if anyone else would like to run with it then they are more than welcome to. Alternatively, I could try emailing it to someone involved with the project.
Comment 7 Nick Sarnie gentoo-dev 2021-01-10 23:57:46 UTC
Okay, do you give me your signed-off-by to push the patch to ::gentoo? I know it's in the patch yourself but I want to double check given your last comment about github. Note that Gentoo only uses github for mirroring and PRs and ::gentoo is not hosted by github.
Comment 8 kfm 2021-01-11 00:06:42 UTC
Yes, absolutely. Anyone is free to commit/submit the patch wherever/however they please. It's just that I won't personally interact with anyone in a manner that requires me to register at GitHub and to effectively use it as a communication medium.
Comment 9 Larry the Git Cow gentoo-dev 2021-01-11 00:24:04 UTC
The bug has been closed via the following commit(s):

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

commit 816dd08c61d368ee4f3e82a3bccde83a86bf9de6
Author:     Nick Sarnie <sarnex@gentoo.org>
AuthorDate: 2021-01-11 00:22:15 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2021-01-11 00:23:43 +0000

    media-video/aegisub: Fix build with dash
    
    Closes: https://bugs.gentoo.org/764881
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 .../aegisub/aegisub-3.2.2_p20160518-r101.ebuild    | 158 +++++++++++++++++++++
 ...g-positional-parameters-to-source-builtin.patch |  47 ++++++
 2 files changed, 205 insertions(+)
Comment 10 kfm 2021-01-11 01:25:05 UTC
Apparently, the original patch was submitted as a PR against an up and coming fork: See https://github.com/wangqr/Aegisub/pull/89.