Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350172 - net-misc/logmein-hamachi-2.0.1.13 - LogMeIn Hamachi VPN tunneling engine
Summary: net-misc/logmein-hamachi-2.0.1.13 - LogMeIn Hamachi VPN tunneling engine
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Simone Scanzoni
URL: https://secure.logmein.com/products/h...
Whiteboard:
Keywords: EBUILD, Inclusion, InVCS
Depends on:
Blocks:
 
Reported: 2010-12-30 18:28 UTC by hamachi-gentoo
Modified: 2011-01-24 14:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logmein-hamachi-2.0.1.13 (logmein-hamachi-2.0.1.13.ebuild,1.83 KB, text/plain)
2010-12-30 18:30 UTC, hamachi-gentoo
Details
logmein-hamachi-2.0.1.13 with some changes (logmein-hamachi-2.0.1.13.ebuild,1.78 KB, text/plain)
2011-01-10 04:01 UTC, Simone Scanzoni
Details
logmein-hamachi.initd (logmein-hamachi.initd,1.15 KB, text/plain)
2011-01-10 04:09 UTC, Simone Scanzoni
Details
logmein-hamachi.confd (logmein-hamachi.confd,389 bytes, text/plain)
2011-01-10 04:10 UTC, Simone Scanzoni
Details
logmein-hamachi.initd (logmein-hamachi.initd,1.17 KB, text/plain)
2011-01-10 05:24 UTC, Simone Scanzoni
Details
logmein-hamachi-2.0.1.13.ebuild with RESTRICT="mirror" instead of "fetch" (logmein-hamachi-2.0.1.13.ebuild,1.62 KB, text/plain)
2011-01-10 12:07 UTC, Simone Scanzoni
Details
net-misc/hamachi version bump (hamachi-2.0.1.13.ebuild,1.71 KB, text/plain)
2011-01-10 12:39 UTC, Simone Scanzoni
Details
hamachi-2.0.1.13.ebuild (hamachi-2.0.1.13.ebuild,1.62 KB, text/plain)
2011-01-10 18:19 UTC, Simone Scanzoni
Details
logmein-hamachi-2.0.1.13.ebuild (logmein-hamachi-2.0.1.13.ebuild,1.45 KB, text/plain)
2011-01-12 15:16 UTC, Simone Scanzoni
Details
Hamachi2 license (LogMeIn,38.02 KB, text/plain)
2011-01-12 15:17 UTC, Simone Scanzoni
Details
logmein-hamachi.initd (logmein-hamachi.initd,1.15 KB, text/plain)
2011-01-15 20:16 UTC, Simone Scanzoni
Details
logmein-hamachi.confd (logmein-hamachi.confd,425 bytes, text/plain)
2011-01-15 20:18 UTC, Simone Scanzoni
Details
logmein-hamachi-2.0.1.13.ebuild (logmein-hamachi-2.0.1.13.ebuild,1.59 KB, text/plain)
2011-01-15 20:19 UTC, Simone Scanzoni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hamachi-gentoo 2010-12-30 18:28:52 UTC
LogMeIn Hamachi VPN tunneling engine.

Reproducible: Didn't try




todo : 

files/logmein-hamachi.confd
files/logmein-hamachi.initd
Comment 1 hamachi-gentoo 2010-12-30 18:30:40 UTC
Created attachment 258460 [details]
logmein-hamachi-2.0.1.13
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-12-30 20:02:24 UTC
Is this a version bump or a replacement of the hamachi that exists already in portage?
Comment 3 hamachi-gentoo 2010-12-30 20:25:13 UTC
it could be a version bump but i think it is safer to make a replacement 
to keep old local client keys or not.
Comment 4 Simone Scanzoni 2011-01-10 04:01:32 UTC
Created attachment 259435 [details]
logmein-hamachi-2.0.1.13 with some changes

I made some changes to the ebuild I found here.
I tried Hamachi2 and it seems it needs to be run as root, so there's no use in creating an "hamachi" user and group.
The license was 'as-is' with version 0.9.9.9 but now it seems more like 'free-noncomm' , I think the LICENSE field should reflect that.
I found no way to choose the position of the log files, they are placed in the same directory as the config and identity files, so I used the default /var/lib/${PN} .
Other changes:
uncommented a line to enable installation on amd64 systems (like mine)
let the users see the localized homepage (where available)
put the LICENSE, CHANGES and README files together as in the install.sh script (there is no need for a "licenses" directory anymore)
added some info to let users use the client (and not only root)
hamachid is already stripped so I set: QA_PRESTRIPPED="/opt/${PN}/bin/hamachid"
Comment 5 Simone Scanzoni 2011-01-10 04:09:28 UTC
Created attachment 259437 [details]
logmein-hamachi.initd

I tried to preserve the behavior that version 0.9.9.9 used.
I had to add a delay before the login otherwise it fails saying that it's busy.
I didn't find a way to stop it from setting the nickname to the hostname when I login, so I made it set the nickname after the login.
Comment 6 Simone Scanzoni 2011-01-10 04:10:03 UTC
Created attachment 259439 [details]
logmein-hamachi.confd
Comment 7 Simone Scanzoni 2011-01-10 05:24:51 UTC
Created attachment 259443 [details]
logmein-hamachi.initd

I forgot depend()
Comment 8 Simone Scanzoni 2011-01-10 12:07:26 UTC
Created attachment 259463 [details]
logmein-hamachi-2.0.1.13.ebuild with RESTRICT="mirror" instead of "fetch"

I didn't find the reason to use RESTRICT="fetch" instead of a more friendly RESTRICT="mirror", so I'm attaching a "mirror" version.
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2011-01-10 12:32:04 UTC
Hello, The Gentoo Team would like to firstly thank you for your ebuild 
submission. We also apologize for not being able to accommodate you in a timely
manner. There are simply too many new packages.

Allow me to use this opportunity to introduce you to Gentoo Sunrise. The 
sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to 
commit to and all users can have ebuilds reviewed by Gentoo devs for entry 
into the overlay. So, the sunrise team is suggesting that you look into this 
and submit your ebuild to the overlay where even *you* can commit to. =)

Thanks,
On behalf of the Gentoo Sunrise Team,
Markos.

[1]: http://www.gentoo.org/proj/en/sunrise/
[2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Comment 10 Simone Scanzoni 2011-01-10 12:39:10 UTC
Created attachment 259467 [details]
net-misc/hamachi version bump

hamachi2 doesn't use the local keys from hamachi 0.9.9.9 and they shouldn't be installed together, so I propose to make it a standard version bump (that leaves the directory storing the old configs and keys alone).
I kept the logmein- prefix inside to stay consistent with the README and with the error messages.
Comment 11 Simone Scanzoni 2011-01-10 18:19:47 UTC
Created attachment 259485 [details]
hamachi-2.0.1.13.ebuild

pkg_setup() was broken for x86. Some cleanup.
Comment 12 Simone Scanzoni 2011-01-12 15:16:14 UTC
Created attachment 259621 [details]
logmein-hamachi-2.0.1.13.ebuild

Markos, the old hamachi has a more permissive license, so I think it shouldn't be removed.
Comment 13 Simone Scanzoni 2011-01-12 15:17:37 UTC
Created attachment 259622 [details]
Hamachi2 license

LogMeIn Hamachi2 has its own license.
Comment 14 Markos Chandras (RETIRED) gentoo-dev 2011-01-12 20:32:36 UTC
I have to study the license to make sure that it complies with our policy standards
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2011-01-13 09:54:13 UTC
Looking at your init scripts I am a bit worried about the start() function

testing dev # /etc/init.d/logmein-hamachi start
 * Caching service dependencies ...                                                                                                                                            [ ok ]
 * Starting hamachi ...
Logging in .. failed, busy                                                                                                                                                     [ !! ]
 * ERROR: logmein-hamachi failed to start
testing dev # /etc/init.d/logmein-hamachi start
 * Starting hamachi ...
 * start-stop-daemon: /opt/logmein-hamachi/bin/hamachid is already running                                                                                                     [ !! ]
 * ERROR: logmein-hamachi failed to start

See the problem? The daemon (hamachid) is started just fine, however the hamachi client cannot connect ( I haven't configured it anyway ). I think the init script should not log in the client automatically. You can always have hamachi running but be offline. You are trying to implement two different functionalities in a single init script. Therefore, the $result might not reflect the reality all the time.
Comment 16 Simone Scanzoni 2011-01-13 17:31:18 UTC
(In reply to comment #15)
> [..] I think the
> init script should not log in the client automatically. You can always have
> hamachi running but be offline. You are trying to implement two different
> functionalities in a single init script. Therefore, the $result might not
> reflect the reality all the time.
> 

I tried to preserve the behavior of the init script used for the latest version in portage. Hamachi should auto-configure. That error probably happened because hamachi2 returns before being ready (I suppose the old didn't). I introduced a WAIT variable in conf.d/logmein-hamachi with a default of 1 sec that worked for me, but trying again it isn't enough for the first run when auto-configuration is done. I would remove the logging part if it wasn't that I didn't find a way to keep the nickname I want except by setting it every time after the login. It's more straightforward to set it in conf.d and let it login and set the nick automatically. I understand that the way it is done must be sane, so I'd like to try to make it work right instead of removing it. First, I tested 5 times that 2 secs are enough for auto-configuration, so I'd change the default. Then I could make the auto-login optional with a conf.d variable and fix the $result to actually return the status of the daemon. Could that be fine?
Comment 17 Markos Chandras (RETIRED) gentoo-dev 2011-01-13 17:45:22 UTC
What would be the default behavior when I try to start the init script but without making any configuration? The way it is now, the daemon creates the pidfile but the client fails to start. The init script reports error but the pidfile does not get deleted. Therefore you can't restart or stop the service. The default logic should be 

$daemon started==1 && $client started==1 ; then return success. If the client fails to start/login/whatever, then the init script should delete the pidfile and return an error code.
Comment 18 Simone Scanzoni 2011-01-15 20:16:35 UTC
Created attachment 259945 [details]
logmein-hamachi.initd

This script should follow the default logic, in addition I made auto-login optional and enabled if a nickname is set in conf.d .
Furthermore I removed the custom status function as it ran 'hamachi' to get the daemon status and it sometimes crashes the daemon.
Comment 19 Simone Scanzoni 2011-01-15 20:18:02 UTC
Created attachment 259947 [details]
logmein-hamachi.confd

Updated for the init script above.
Comment 20 Simone Scanzoni 2011-01-15 20:19:53 UTC
Created attachment 259949 [details]
logmein-hamachi-2.0.1.13.ebuild

As above.
Comment 21 Markos Chandras (RETIRED) gentoo-dev 2011-01-15 20:21:54 UTC
Looks better now. I will try again
Comment 22 Markos Chandras (RETIRED) gentoo-dev 2011-01-15 21:12:25 UTC
+*logmein-hamachi-2.0.1.13 (15 Jan 2011)
+
+  15 Jan 2011; Markos Chandras <hwoarang@gentoo.org>
+  +logmein-hamachi-2.0.1.13.ebuild, +files/logmein-hamachi.confd,
+  +files/logmein-hamachi.initd, +metadata.xml:
+  Initial commit of new hamachi client. Bug #350172. The original hamachi
+  client has been renamed to logmein-hamachi which is more a replacement rather
+  than a new version. Thanks to Simone Scanzoni <nonno.cicala@libero.it> for
+  the ebuilds and scripts. He will proxy maintain it. The old client will be
+  removed in 30 days
+
Comment 23 hamachi-gentoo 2011-01-24 14:04:32 UTC
thank you very much