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

Bug 932015

Summary: net-misc/sslh-2.1.2 fail to install with systemd use flag
Product: Gentoo Linux Reporter: François Valenduc <francoisvalenduc>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, francoisvalenduc, william
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Adapted ebuild for sslh-2.1.2
adapyed sslh systemd unit file

Description François Valenduc 2024-05-17 06:10:58 UTC
sslh fails to install with this error when the systemd use flag is enabled:

>>> Install net-misc/sslh-2.1.2 into /var/tmp/portage/net-misc/sslh-2.1.2/image
sed: can't read scripts/systemd.sslh.service: No such file or directory

There was indeed a systemd.sslh.service in the 2.1.1 version, now  there are these 2 scripts: systemd.sslh-select@.service and systemd.sslh@.service.

So these lines in the ebuild needs to be adapted:

                sed -i -e 's~/usr/bin/~/usr/sbin/~g' scripts/systemd.sslh.service || die
                systemd_newunit scripts/systemd.sslh.service sslh.service
                exeinto /usr/lib/systemd/system-generators/
                doexe systemd-sslh-generator
        fi

The sed command is probably unneeded, because both files contains this line already:
ExecStart=/usr/sbin/sslh-select -F/etc/sslh/%I.cfg -f $DAEMON_OPTS


Reproducible: Always
Comment 1 François Valenduc 2024-05-17 12:44:39 UTC
Created attachment 893149 [details]
Adapted ebuild for sslh-2.1.2

Here an ebuild that works more or less. I removed  the sed line in the src_install function and I only kept this line to install the systemd unit file:

 systemd_newunit scripts/systemd.sslh@.service sslh.service

Then sslh installs correcly. However, the unit file poses other problems.
Comment 2 François Valenduc 2024-05-17 12:47:17 UTC
Created attachment 893150 [details]
adapyed sslh systemd unit file

Here a systemd unit file which works under gentoo. I replaced /etc/default/sslh by /etc/conf.d/sslh and I also removed -F/etc/sslh/%I.cfg in the ExecStart line because this file does not exists in gentoo.
Comment 3 Craig Andrews gentoo-dev 2024-05-17 19:28:32 UTC
Fixed with 2069b41a2cd93fde9598508690671175b38e1cd0

Thank you!