[Git][haskell-team/haskell-devscripts][master] 2 commits: Fix parsing of DEB_SETUP_GHC*_CONFIGURE_ARGS (Closes: #1010703)

Scott Talbert (@swt2c) gitlab at salsa.debian.org
Tue May 17 04:16:57 BST 2022



Scott Talbert pushed to branch master at Debian Haskell Group / haskell-devscripts


Commits:
1dffd753 by Scott Talbert at 2022-05-16T23:03:26-04:00
Fix parsing of DEB_SETUP_GHC*_CONFIGURE_ARGS (Closes: #1010703)

Replace the broken shell expansion with calls to
Text::ParseWords::shellwords() which seems to be the Perl way of parsing
command line arguments into an array.

- - - - -
d86d5e8f by Scott Talbert at 2022-05-16T23:08:35-04:00
Release version 0.16.15 into unstable

- - - - -


2 changed files:

- debian/changelog
- lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+haskell-devscripts (0.16.15) unstable; urgency=medium
+
+  * Team Upload.
+  * Fix parsing of DEB_SETUP_GHC*_CONFIGURE_ARGS (Closes: #1010703)
+
+ -- Scott Talbert <swt at techie.net>  Mon, 16 May 2022 23:07:58 -0400
+
 haskell-devscripts (0.16.14) unstable; urgency=medium
 
   * Team Upload.


=====================================
lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm
=====================================
@@ -59,6 +59,7 @@ use Date::Parse qw(str2time);
 use IPC::Run3;
 use List::SomeUtils qw(uniq any first_value);
 use Path::Tiny;
+use Text::ParseWords qw(shellwords);
 use Unicode::UTF8 qw(encode_utf8 decode_utf8);
 
 const my $EMPTY => q{};
@@ -594,16 +595,6 @@ sub configure_recipe {
       = hc_docdir($compiler, $ENV{CABAL_PACKAGE}, $ENV{CABAL_VERSION});
     my $htmldir = hc_htmldir($compiler, $ENV{CABAL_PACKAGE});
 
-    # DEB_SETUP_GHC_CONFIGURE_ARGS can contain multiple arguments
-    # with their own quoting so run through a shell expansion
-    my $ghc_configure_args = run_quiet(
-        qw{sh -c},
-        'echo -n '
-          . $DOUBLE_QUOTE
-          . ($ENV{DEB_SETUP_GHC_CONFIGURE_ARGS} // $EMPTY)
-          . $DOUBLE_QUOTE
-    );
-
     # the versioned form DEB_SETUP_GHC6_CONFIGURE_ARGS should perhaps be
     # abandoned in favor of the unversioned DEB_SETUP_GHC_CONFIGURE_ARGS
 
@@ -623,8 +614,8 @@ sub configure_recipe {
         "--htmldir=/$htmldir",
         $profiling,
         $ENV{NO_GHCI_FLAG},
-        split($SPACE, $ENV{DEB_SETUP_GHC6_CONFIGURE_ARGS} // $EMPTY),
-        split($SPACE, $ghc_configure_args // $EMPTY),
+        shellwords($ENV{DEB_SETUP_GHC6_CONFIGURE_ARGS} // $EMPTY),
+        shellwords($ENV{DEB_SETUP_GHC_CONFIGURE_ARGS} // $EMPTY),
         split($SPACE, $ENV{OPTIMIZATION} // $EMPTY),
         split($SPACE, $ENV{TESTS} // $EMPTY));
 



View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/e073b11a41256239a4266dc7ce644e7329b76cb0...d86d5e8f0af6306b1ab90355e30ec2398a419946

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/e073b11a41256239a4266dc7ce644e7329b76cb0...d86d5e8f0af6306b1ab90355e30ec2398a419946
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220517/4b5e4e52/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list