Created attachment 571440 [details] Modified gpsd-3.17-r3.ebuild Hello, thank you very much for the gpsd ebuilds in the Portage tree. This is very much appreciated. I stumbled uppon the following behaviour, which should not occur, when installing on non systemd systems. The gpsd build system sets the systemd env when it finds the /lib/systemd/system directory on the system. Given, that /lib/systemd/system is present on non systemd systems in Gentoo, this systemd env is set always, rsulting in udev rules for systemd rather then for non systemd systems. If you look in the SConstruct file in the gpsd sources you'll find the following passages: http://git.savannah.gnu.org/cgit/gpsd.git/tree/SConstruct?h=release-3.18.1 (this behaviour is regardles of the version) line 151: systemd_dir = '/lib/systemd/system' systemd = os.path.exists(systemd_dir) this sets the systemd env; line 1653: if env['systemd']: udevcommand = 'TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"' else: udevcommand = 'RUN+="%s/gpsd.hotplug"' % (env['udevdir'], ) which affects how the 25-gpsd.rules are generated; Further looking in line 2433 you'll find this: if env['systemd']: hotplug_wrapper_install = [] else: hotplug_wrapper_install = [ 'cp $SRCDIR/gpsd.hotplug ' + DESTDIR + env['udevdir'], 'chmod a+x ' + DESTDIR + env['udevdir'] + '/gpsd.hotplug' ] The behaviour of the gpsd build is to set the systemd env when /lib/systemd/system is found. From then on the build is build for a systemd system. Solution: Although one should not use a systemd use flag, I did in my proof of concept ebuild. 1.) add a systemd use flag to IUSE 2.) add $(use_scons systemd) to myesconsargs Having this generates the 25-gpsd.rules as desired on non systemd system and also installs the gpsd.hotplug script to /lib/udev. See the attached modified ebuild. Thank you very much in advance ;)
I encounter this bug on my system. Using the supplied modified ebuild fixed it. Have you created a pull request in github gentoo?
Hey, is this still an issue?
@Sam James yes, it is. The $(use_scons systemd) is still not set in the recent ebuilds. I have not opened a PR since I was unsure about whether it is allowed to use "systemd" as a "use" argument.
(In reply to Vladimir Datsevich from comment #3) > @Sam James > > yes, it is. The $(use_scons systemd) is still not set in the recent ebuilds. > > I have not opened a PR since I was unsure about whether it is allowed to use > "systemd" as a "use" argument. It's generally OK for stuff like this where it affects the installed files, so let's go with it. On it..
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e0c0ea184a60062250520ced7bf6e319a2e609 commit 82e0c0ea184a60062250520ced7bf6e319a2e609 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-08-10 23:50:11 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-08-10 23:50:42 +0000 sci-geosciences/gpsd: adjust udev rule based on USE=systemd Closes: https://bugs.gentoo.org/682226 Signed-off-by: Sam James <sam@gentoo.org> sci-geosciences/gpsd/gpsd-3.23.ebuild | 4 ++-- sci-geosciences/gpsd/gpsd-9999.ebuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)