Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 633564 Details for
Bug 704580
sci-geosciences/gpsd - port to EAPI=7
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make systemd integration work
0002-sci-geosciences-gpsd-Make-systemd-integration-work.patch (text/plain), 7.46 KB, created by
Michael Weiser
on 2020-04-18 10:21:22 UTC
(
hide
)
Description:
Make systemd integration work
Filename:
MIME Type:
Creator:
Michael Weiser
Created:
2020-04-18 10:21:22 UTC
Size:
7.46 KB
patch
obsolete
>From ac14cc6003913115a762d3fcd2ef7686f4161753 Mon Sep 17 00:00:00 2001 >From: Michael Weiser <michael.weiser@gmx.de> >Date: Sat, 18 Apr 2020 12:06:25 +0200 >Subject: [PATCH 2/2] sci-geosciences/gpsd: Make systemd integration work > >Upstream installs systemd units which use path /usr/local/sbin and >therefore don't work. Also, they reference EnvironmentFiles in >/etc/default and /etc/sysconfig. > >This change adds systemd unit files that use correct paths and follow >Gentoo standards. They override the control socket path to /run to avoid >a warning from systemd about the legacy path being used. We eliminate >the use of environment files and provider drop-in snippets according to >Gentoo systemd project guidelines. > >This makes hotplugging via udev work as advertised. > >Signed-off-by: Michael Weiser <michael.weiser@gmx.de> >--- > sci-geosciences/gpsd/files/gpsd.service | 13 +++++++++++++ > sci-geosciences/gpsd/files/gpsd.service.conf | 7 +++++++ > sci-geosciences/gpsd/files/gpsd.socket | 11 +++++++++++ > sci-geosciences/gpsd/files/gpsd.socket.conf | 11 +++++++++++ > sci-geosciences/gpsd/files/gpsdctl.service | 12 ++++++++++++ > sci-geosciences/gpsd/files/gpsdctl.service.conf | 4 ++++ > sci-geosciences/gpsd/gpsd-3.19.ebuild | 7 +++++++ > sci-geosciences/gpsd/gpsd-3.20.ebuild | 9 ++++++++- > sci-geosciences/gpsd/gpsd-9999.ebuild | 7 +++++++ > 9 files changed, 80 insertions(+), 1 deletion(-) > create mode 100644 sci-geosciences/gpsd/files/gpsd.service > create mode 100644 sci-geosciences/gpsd/files/gpsd.service.conf > create mode 100644 sci-geosciences/gpsd/files/gpsd.socket > create mode 100644 sci-geosciences/gpsd/files/gpsd.socket.conf > create mode 100644 sci-geosciences/gpsd/files/gpsdctl.service > create mode 100644 sci-geosciences/gpsd/files/gpsdctl.service.conf > >diff --git a/sci-geosciences/gpsd/files/gpsd.service b/sci-geosciences/gpsd/files/gpsd.service >new file mode 100644 >index 00000000000..9690196cfd2 >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsd.service >@@ -0,0 +1,13 @@ >+[Unit] >+Description=GPS (Global Positioning System) Daemon >+Requires=gpsd.socket >+# Needed with chrony SOCK refclock >+After=chronyd.service >+ >+[Service] >+Type=forking >+ExecStart=/usr/sbin/gpsd -F /run/gpsd.sock >+ >+[Install] >+WantedBy=multi-user.target >+Also=gpsd.socket >diff --git a/sci-geosciences/gpsd/files/gpsd.service.conf b/sci-geosciences/gpsd/files/gpsd.service.conf >new file mode 100644 >index 00000000000..184cf868489 >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsd.service.conf >@@ -0,0 +1,7 @@ >+[Service] >+# explicitly configure devices to monitor in addition to control socket >+#ExecStart=/usr/sbin/gpsd -F /run/gpsd.sock /dev/ttyS0 >+# ... or without control socket >+#ExecStart=/usr/sbin/gpsd /dev/ttyS0 >+# additional options can be added as well >+#ExecStart=/usr/sbin/gpsd -n /dev/ttyS0 >diff --git a/sci-geosciences/gpsd/files/gpsd.socket b/sci-geosciences/gpsd/files/gpsd.socket >new file mode 100644 >index 00000000000..699e530218c >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsd.socket >@@ -0,0 +1,11 @@ >+[Unit] >+Description=GPS (Global Positioning System) Daemon Sockets >+ >+[Socket] >+ListenStream=/run/gpsd.sock >+ListenStream=[::1]:2947 >+ListenStream=127.0.0.1:2947 >+SocketMode=0600 >+ >+[Install] >+WantedBy=sockets.target >diff --git a/sci-geosciences/gpsd/files/gpsd.socket.conf b/sci-geosciences/gpsd/files/gpsd.socket.conf >new file mode 100644 >index 00000000000..dee88c589f2 >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsd.socket.conf >@@ -0,0 +1,11 @@ >+[Socket] >+# maybe reconfigure control socket path >+#ListenStream=/run/gpsd.sock >+# remember to activate these as well to keep them because options here replace >+# those from the stock service unit: >+#ListenStream=[::1]:2947 >+#ListenStream=127.0.0.1:2947 >+# To allow gpsd remote access, start gpsd with the -G option and >+# uncomment the next two lines in addition to the ones above: >+# ListenStream=[::1]:2947 >+# ListenStream=0.0.0.0:2947 >diff --git a/sci-geosciences/gpsd/files/gpsdctl.service b/sci-geosciences/gpsd/files/gpsdctl.service >new file mode 100644 >index 00000000000..57b3ace9ccb >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsdctl.service >@@ -0,0 +1,12 @@ >+[Unit] >+Description=Manage %I for GPS daemon >+Requires=gpsd.socket >+BindsTo=dev-%i.device >+After=dev-%i.device >+ >+[Service] >+Type=oneshot >+Environment="GPSD_SOCKET=/run/gpsd.sock" >+RemainAfterExit=yes >+ExecStart=/usr/sbin/gpsdctl add /dev/%I >+ExecStop=/usr/sbin/gpsdctl remove /dev/%I >diff --git a/sci-geosciences/gpsd/files/gpsdctl.service.conf b/sci-geosciences/gpsd/files/gpsdctl.service.conf >new file mode 100644 >index 00000000000..b94434745c9 >--- /dev/null >+++ b/sci-geosciences/gpsd/files/gpsdctl.service.conf >@@ -0,0 +1,4 @@ >+[Service] >+# override the path to the control socket if also changed in the gpsd service >+# and socket units >+#Environment="GPSD_SOCKET=/run/gpsd.sock" >diff --git a/sci-geosciences/gpsd/gpsd-3.19.ebuild b/sci-geosciences/gpsd/gpsd-3.19.ebuild >index b27571a1349..143c5cbd594 100644 >--- a/sci-geosciences/gpsd/gpsd-3.19.ebuild >+++ b/sci-geosciences/gpsd/gpsd-3.19.ebuild >@@ -182,6 +182,13 @@ src_install() { > newconfd "${FILESDIR}"/gpsd.conf-2 gpsd > newinitd "${FILESDIR}"/gpsd.init-2 gpsd > >+ systemd_dounit "${FILESDIR}"/gpsd.socket >+ systemd_install_serviced "${FILESDIR}"/gpsd.socket.conf >+ systemd_dounit "${FILESDIR}"/gpsd.service >+ systemd_install_serviced "${FILESDIR}"/gpsd.service.conf >+ systemd_newunit "${FILESDIR}"/gpsdctl.service gpsdctl@.service >+ systemd_install_serviced "${FILESDIR}"/gpsdctl.service.conf >+ > # Cleanup bad alt copy due to Scons > rm -rf "${D}"/python-discard/gps* > find "${D}"/python-discard/ -type d -delete >diff --git a/sci-geosciences/gpsd/gpsd-3.20.ebuild b/sci-geosciences/gpsd/gpsd-3.20.ebuild >index 5697883b144..9dd8b1c09b5 100644 >--- a/sci-geosciences/gpsd/gpsd-3.20.ebuild >+++ b/sci-geosciences/gpsd/gpsd-3.20.ebuild >@@ -7,7 +7,7 @@ DISTUTILS_OPTIONAL=1 > PYTHON_COMPAT=( python2_7 python3_{6..8} ) > SCONS_MIN_VERSION="2.3.0" > >-inherit eutils udev user multilib distutils-r1 scons-utils toolchain-funcs >+inherit eutils udev user multilib distutils-r1 scons-utils toolchain-funcs systemd > > if [[ ${PV} == "9999" ]] ; then > EGIT_REPO_URI="https://gitlab.com/gpsd/gpsd.git" >@@ -182,6 +182,13 @@ src_install() { > newconfd "${FILESDIR}"/gpsd.conf-2 gpsd > newinitd "${FILESDIR}"/gpsd.init-2 gpsd > >+ systemd_dounit "${FILESDIR}"/gpsd.socket >+ systemd_install_serviced "${FILESDIR}"/gpsd.socket.conf >+ systemd_dounit "${FILESDIR}"/gpsd.service >+ systemd_install_serviced "${FILESDIR}"/gpsd.service.conf >+ systemd_newunit "${FILESDIR}"/gpsdctl.service gpsdctl@.service >+ systemd_install_serviced "${FILESDIR}"/gpsdctl.service.conf >+ > # Cleanup bad alt copy due to Scons > rm -rf "${D}"/python-discard/gps* > find "${D}"/python-discard/ -type d -delete >diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild b/sci-geosciences/gpsd/gpsd-9999.ebuild >index a700c9fdd94..f4401ab4c08 100644 >--- a/sci-geosciences/gpsd/gpsd-9999.ebuild >+++ b/sci-geosciences/gpsd/gpsd-9999.ebuild >@@ -186,6 +186,13 @@ src_install() { > newconfd "${FILESDIR}"/gpsd.conf-2 gpsd > newinitd "${FILESDIR}"/gpsd.init-2 gpsd > >+ systemd_dounit "${FILESDIR}"/gpsd.socket >+ systemd_install_serviced "${FILESDIR}"/gpsd.socket.conf >+ systemd_dounit "${FILESDIR}"/gpsd.service >+ systemd_install_serviced "${FILESDIR}"/gpsd.service.conf >+ systemd_newunit "${FILESDIR}"/gpsdctl.service gpsdctl@.service >+ systemd_install_serviced "${FILESDIR}"/gpsdctl.service.conf >+ > # Cleanup bad alt copy due to Scons > rm -rf "${D}"/python-discard/gps* > find "${D}"/python-discard/ -type d -delete >-- >2.26.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 704580
:
602326
|
617348
|
617350
|
633108
|
633560
| 633564