[CDRIVER-2297] Shell error parsing "$((" expression produced Versions.m4 Created: 22/Sep/17  Updated: 28/Oct/23  Resolved: 22/Sep/17

Status: Closed
Project: C Driver
Component/s: Build, libbson, libmongoc
Affects Version/s: 1.7.0
Fix Version/s: 1.8.1, 1.9.0

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Alpine Linux, BusyBox v1.24.2


Issue Links:
Depends
is depended on by PHPC-1014 config.m4 produces unterminated quote... Closed
Related
related to CDRIVER-2320 Use "shellcheck" to lint generated sh... Closed

 Description   

In mongodb/mongo-php-driver#655 (PHPC-1014), a user reported an issue installing the PHP driver in Alpine Linux, which uses a BusyBox's shell. Of note, his troubles only started with PHP driver 1.3.0 (bundling libmongoc and libbson 1.8.0). PHP driver 1.2.11, which bundles 1.5.5, had no issues.

Running our configure script through shellcheck reported the following error of interest:

In configure line 12252:
MONGOC_MAJOR_VERSION=$((cat $MONGOC_CURRENT_FILE; echo) | cut -d- -f1 | cut -d. -f1)
                     ^-- SC1073: Couldn't parse this $((..)) expression.
                     ^-- SC1009: The mentioned parser error was in this $((..)) expression.
                            ^-- SC1072: Expected "))". Fix any mentioned problems and try again.

I believe this was introduced by the following commits:



 Comments   
Comment by Githook User [ 12/Oct/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parens
Branch: debian
https://github.com/mongodb/mongo-c-driver/commit/9c38148df7ac2cf6d9534231dd2e0a2abc77d994

Comment by Ramon Fernandez Marina [ 22/Sep/17 ]

Author:

{'username': u'jmikola', 'name': u'Jeremy Mikola', 'email': u'jmikola@gmail.com'}

Message:CDRIVER-2297: Space out parens
Branch:r1.8
https://github.com/mongodb/libbson/commit/93cfe0bb5af68b160d00980775af414033b38332

Comment by Githook User [ 22/Sep/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parens
Branch: r1.8
https://github.com/mongodb/mongo-c-driver/commit/9c38148df7ac2cf6d9534231dd2e0a2abc77d994

Comment by A. Jesse Jiryu Davis [ 22/Sep/17 ]

jmikola go ahead and cherry-pick the commits in libbson and mongo-c-driver to the r1.8 branch. (We use cherry-picking from master to release branches as our backport process.)

Comment by Jeremy Mikola [ 22/Sep/17 ]

Merged to master, but I would like to discuss backporting to 1.8.1 as well.

Comment by Ramon Fernandez Marina [ 22/Sep/17 ]

Author:

{'username': u'jmikola', 'name': u'Jeremy Mikola', 'email': u'jmikola@gmail.com'}

Message:CDRIVER-2297: Space out parens
Branch:jmikola-patch-1
https://github.com/mongodb/libbson/commit/63f580245342b0bc86a7180d6f2b289da2adc089

Comment by Githook User [ 22/Sep/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parens
Branch: master
https://github.com/mongodb/libbson/commit/b980624eb12fddc9a4a6c841b026e8c2c3dce7a2

Comment by Githook User [ 22/Sep/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parens
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a4ea9fc5edfeaf84e32073f1c0e504b26c536ea8

Comment by Githook User [ 22/Sep/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parens
Branch: jmikola-patch-1
https://github.com/mongodb/mongo-c-driver/commit/9b34ce11835bac622767f7ddb23c6650e560c42a

Comment by Jeremy Mikola [ 22/Sep/17 ]

PRs:

Comment by Githook User [ 22/Sep/17 ]

Author:

{'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola', 'username': 'jmikola'}

Message: CDRIVER-2297: Space out parents to avoid unterminated string error
Branch: jmikola-patch-1
https://github.com/mongodb/mongo-c-driver/commit/1c6a1e363c7ee5e64aafa96b23ae1d4cdbb84d33

Generated at Wed Feb 07 21:14:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.