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

Bug 502196

Summary: net-misc/sslh-1.16 VERSION string in version.h not set to correct value
Product: Gentoo Linux Reporter: James Taylor <james>
Component: Current packagesAssignee: Michael Palimaka (kensington) <kensington>
Status: RESOLVED FIXED    
Severity: normal CC: james, yaleks
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sslh version fix
Fixed patch without changing USELIBCAP= default

Description James Taylor 2014-02-23 05:59:23 UTC
The tarball version of sslh-1.16 doesn't have the version string set correctly in version.h, and instead prints an ambiguous version string.

Steps to Reproduce:
1. Install sslh-1.16
2. root@server ~ # sslh -V

Actual results:
sslh-fork zip-2014-02-11

Expected results:
sslh-fork 1.16
Comment 1 James Taylor 2014-02-23 06:08:09 UTC
Just compiled using the git version and checking out the v1.16 tag from github, and it has the correct version number. Not sure where genver.sh is going wrong with the tarballed version, may report upstream to see if there is any logic behind this.
Comment 2 Michael Palimaka (kensington) gentoo-dev 2014-02-23 16:30:36 UTC
Looking at genver.sh, this appears to be a deliberate upstream design:

if ! `(git status | grep -q "On branch") 2> /dev/null`; then
        # If we don't have git, we can't work out what
        # version this is. It must have been downloaded as a
        # zip file. Github creates the zip file with all
        # files dated from the last change: use the
        # Makefile's modification time as a release number
        release=zip-`stat -c "%y" Makefile | sed 's/ .*//'`
fi

However, since there is a release target that appears to be in use:

release:
        git archive master --prefix="sslh-$(VERSION)/" | gzip > /tmp/sslh-$(VERSION).tar.gz

if you are speaking to upstream perhaps they would be interested in modifying this to inject the correct version.
Comment 3 James Taylor 2014-02-24 04:16:17 UTC
Hi, the issue has been fixed upstream changing the way the script grabs the version:
https://github.com/yrutschle/sslh/commit/9beacc63f9235ceec1af6e81bc69f1ffc33b84ff

It's been changed to grab the version from the directory instead of just making up a version on the fly.
Comment 4 Anton Bolshakov 2014-03-21 09:51:38 UTC
It fails to compile here, I guess it's the same issue?

>>> Compiling source in /var/tmp/portage/net-misc/sslh-1.16/work/sslh-v1.16 ...
make -j4 CC=x86_64-pc-linux-gnu-gcc USELIBCAP= USELIBWRAP=tcpd 
./genver.sh >version.h
x86_64-pc-linux-gnu-gcc -O2 -pipe -DLIBWRAP -DLIBCONFIG -c common.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DLIBWRAP -DLIBCONFIG -c sslh-main.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DLIBWRAP -DLIBCONFIG -c probe.c
sslh-main.c:34:9: error: expected ‘,’ or ‘;’ before ‘VERSION’
sslh-main.c: In function ‘parse_cmdline’:
sslh-main.c:442:44: error: ‘VERSION’ undeclared (first use in this function)
sslh-main.c:442:44: note: each undeclared identifier is reported only once for each function it appears in
make: *** [sslh-main.o] Error 1

Please apply the patch.
Comment 5 Anton Bolshakov 2014-03-21 10:09:19 UTC
Created attachment 373172 [details, diff]
sslh version fix

I confirm that patch highlighted in comment #3 fixes the problem
Comment 6 James Taylor 2014-03-21 10:19:31 UTC
Created attachment 373174 [details, diff]
Fixed patch without changing USELIBCAP= default
Comment 7 Michael Palimaka (kensington) gentoo-dev 2014-03-21 14:36:41 UTC
(In reply to Anton Bolshakov from comment #4)
> It fails to compile here, I guess it's the same issue?
That's weird, what's the contents of your /var/tmp/portage/net-misc/sslh-1.16/work/sslh-v1.16/version.h ?
Comment 8 Michael Palimaka (kensington) gentoo-dev 2015-03-10 13:46:31 UTC
1.17 is now in the tree which fixes the issue.