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

Bug 548736

Summary: net-misc/chrony-2.0: configure script breaks when /bin/sh = dash
Product: Gentoo Linux Reporter: Enne Eziarc <gentoo+bugs>
Component: [OLD] ServerAssignee: Jeroen Roovers (RETIRED) <jer>
Status: RESOLVED FIXED    
Severity: normal CC: alex_y_xu
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: /var/tmp/portage/net-misc/chrony-2.0/temp/build.log

Description Enne Eziarc 2015-05-06 04:00:31 UTC
Created attachment 402736 [details]
/var/tmp/portage/net-misc/chrony-2.0/temp/build.log

chrony-2.0 has a hand-written configure script, and it makes heavy use of "echo -n". The echo builtin in dash just outputs a literal "-n" for this, instead of suppressing the \n, and in this case causes a huge mess that gcc isn't happy with (see attached build log if you're curious). I have "eselect sh" more or less evenly split between machines, and only the ones using dash fail here.

I've seen the related discussion in bug 523874 which seems to share the same root cause, and it seems like dash is being (unhelpfully) posixly-correct.

Adding 2 chars to a file in chrony's source seems by far the easiest fix and is probably what the original author intended, so here:

--- chrony-2.0/configure.orig	2015-04-27 11:58:19.000000000 +0100
+++ chrony-2.0/configure	2015-05-06 04:32:22.066289557 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # =======================================================================
 #
 # chronyd/chronyc - Programs for keeping computer clocks accurate.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-05-11 04:36:13 UTC
Fixed without revision bump.