From 837d657667a1e37c324708094274b1f6a38a3cecc7e327a6e74d2a3b19273133 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 12 Dec 2018 08:34:43 +0000 Subject: [PATCH] Accepting request 656930 from home:adkorte:branches:Application:Geo - Correct flag to disable stripping (nostrip=True) - Add gpsd-declaration-in-for-loop.patch to remove c99 construction (backport from upstream) - Upstream changed location of gpsd in systemd gpsd.service file (change it back to {_sbindir}) OBS-URL: https://build.opensuse.org/request/show/656930 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gpsd?expand=0&rev=123 --- gpsd-declaration-in-for-loop.patch | 19 +++++++++++++++++++ gpsd.changes | 9 +++++++++ gpsd.spec | 16 +++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 gpsd-declaration-in-for-loop.patch diff --git a/gpsd-declaration-in-for-loop.patch b/gpsd-declaration-in-for-loop.patch new file mode 100644 index 0000000..6b483cd --- /dev/null +++ b/gpsd-declaration-in-for-loop.patch @@ -0,0 +1,19 @@ +--- gpsd-3.18.1.orig/driver_ubx.c ++++ gpsd-3.18.1/driver_ubx.c +@@ -813,6 +813,7 @@ + int8_t leapS; + uint8_t numMeas; + uint8_t recStat; ++ int i; + + if (16 > data_len) { + gpsd_log(&session->context->errout, LOG_WARN, +@@ -830,7 +831,7 @@ + "UBX_RXM_RAWX: rcvTow %f week %u leapS %d numMeas %u recStat %d\n", + rcvTow, week, leapS, numMeas, recStat); + +- for (int i = 0; i < numMeas; i++) { ++ for (i = 0; i < numMeas; i++) { + int off = 32 * i; + double prMes = getled64((const char *)buf, off + 16); + double cpMes = getled64((const char *)buf, off + 24); diff --git a/gpsd.changes b/gpsd.changes index 42766a3..89c3d7e 100644 --- a/gpsd.changes +++ b/gpsd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Dec 10 19:12:14 UTC 2018 - Arjen de Korte + +- Correct flag to disable stripping (nostrip=True) +- Add gpsd-declaration-in-for-loop.patch to remove c99 construction + (backport from upstream) +- Upstream changed location of gpsd in systemd gpsd.service file + (change it back to {_sbindir}) + ------------------------------------------------------------------- Sun Nov 25 16:07:56 UTC 2018 - mardnh@gmx.de diff --git a/gpsd.spec b/gpsd.spec index 10e4e2b..1390d14 100644 --- a/gpsd.spec +++ b/gpsd.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -33,6 +33,7 @@ Source2: udev.gpsd Source3: sysconfig.gpsd Source98: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz.sig Source99: %{name}.keyring +Source100: gpsd-declaration-in-for-loop.patch BuildRequires: chrpath BuildRequires: fdupes BuildRequires: gcc-c++ @@ -160,6 +161,12 @@ mkdir -p %{name}-%{version}/python2 mkdir -p %{name}-%{version}/python3 tar -xf %{SOURCE0} -C %{name}-%{version}/python2 tar -xf %{SOURCE0} -C %{name}-%{version}/python3 +pushd %{name}-%{version}/python2/%{name}-%{version} +patch -p1 < %{SOURCE100} +popd +pushd %{name}-%{version}/python3/%{name}-%{version} +patch -p1 < %{SOURCE100} +popd cd %{name}-%{version} # fix systemd path @@ -171,6 +178,9 @@ sed -i 's|systemctl daemon-reload|true|' python*/%{name}-%{version}/SConstruct # don't set RPATH sed -i 's|env.Prepend.*RPATH.*|pass #\0|' python*/%{name}-%{version}/SConstruct +# fix gpsd path +sed -i 's|ExecStart=.*/gpsd|ExecStart=%{_sbindir}/gpsd|' python*/%{name}-%{version}/systemd/gpsd.service + %build # The SCons description does not handle CXXFLAGS correctly, pass C++ flags also in CFLAGS export CFLAGS="%{optflags}" @@ -221,7 +231,7 @@ export CPPFLAGS="%{optflags}" # Install python2 first pushd %{name}-%{version}/python2/%{name}-%{version} -DESTDIR=%{buildroot} scons strip=False install +DESTDIR=%{buildroot} scons nostrip=True install # Now delete all the installed files except the python2 files find %{buildroot} \( -not -type d -a -not -path "*/python2.*/*" \) -delete @@ -229,7 +239,7 @@ find %{buildroot} \( -not -type d -a -not -path "*/python2.*/*" \) -delete popd pushd %{name}-%{version}/python3/%{name}-%{version} -DESTDIR=%{buildroot} scons strip=False install +DESTDIR=%{buildroot} scons nostrip=True install install -d -m 755 %{buildroot}%{_udevdir} install -d -m 755 %{buildroot}%{_udevdir}/rules.d