GNOME Bugzilla – Bug 780215
Fix bashism in autogen.sh
Last modified: 2017-05-24 14:53:28 UTC
pushd and popd are not available in dash and thus autogen.sh fails when /bin/sh is symlinked to dash
Created attachment 348198 [details] [review] Fix bashism in autogen.sh
Review of attachment 348198 [details] [review]: Sure
Created attachment 350136 [details] [review] build: Use subshell instead of pushd to avoid requiring bash This patch uses a subshell, so it doesn't have to save the working directory before switching to srcdir.
Review of attachment 348198 [details] [review]: ::: autogen.sh @@ +7,3 @@ REQUIRED_AUTOMAKE_VERSION=1.11 +olddir=`pwd` I suspect this needs to be olddir="$(pwd)" to not regress. @@ +22,3 @@ autoreconf --verbose --force --install || exit 1 +cd $olddir And this needs to be cd "$olddir"
Created attachment 350183 [details] [review] build: Use subshell instead of pushd to avoid requiring bash
Created attachment 350184 [details] [review] Fix bashism in autogen.sh
Sry, I didn't notice the other patch here and redid the original patch after I got the mail with the patch review from Jonas Ådahl. Feel free to apply either version.
Can we get patches reviewed again? It is still not fixed in git master and 3.24 releases. Both mutter and gnome-shell have the same bug.
Review of attachment 350184 [details] [review]: LGTM
Review of attachment 350183 [details] [review]: The other patch is closer to https://wiki.gnome.org/Projects/GnomeCommon/Migration, so let's go with that one
Attachment 350184 [details] pushed as e146428 - Fix bashism in autogen.sh
Thanks for your review. Can we commit the accepted patch to gnome-shell, too?
Done, but it missed 3.24.2.
nice: /home/lantw44/gnome/source/gnome-shell/autogen.sh: No such file or directory Can we replace #!/bin/bash in gnome-shell autogen.sh with #!/bin/sh?
(In reply to Ting-Wei Lan from comment #14) > nice: /home/lantw44/gnome/source/gnome-shell/autogen.sh: No such file or > directory > > Can we replace #!/bin/bash in gnome-shell autogen.sh with #!/bin/sh? I don't see why not.
Created attachment 352504 [details] [review] build: Use #!/bin/sh instead of #!/bin/bash There is no bashism in autogen.sh now.
Review of attachment 352504 [details] [review]: Sure
Comment on attachment 352504 [details] [review] build: Use #!/bin/sh instead of #!/bin/bash Attachment 352504 [details] pushed as 63f2fdd - build: Use #!/bin/sh instead of #!/bin/bash