pps-tools: update to 1.0.2.
As the old version scheme was YYYMMDD, we need to use xbps's `revert` feature to make the new version be considered of higher priority.
This commit is contained in:
parent
e52acfa418
commit
a822198a35
41
srcpkgs/pps-tools/patches/makefile-DESTDIR.patch
Normal file
41
srcpkgs/pps-tools/patches/makefile-DESTDIR.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# src: https://github.com/redlab-i/pps-tools/commit/b3eae485a8c759d1ce1727076b2c287deb5f24e1.patch
|
||||||
|
|
||||||
|
From b3eae485a8c759d1ce1727076b2c287deb5f24e1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||||
|
Date: Mon, 3 Dec 2018 13:55:02 +0100
|
||||||
|
Subject: [PATCH] Makefile: fix installation to empty DESTDIR
|
||||||
|
|
||||||
|
When DESTDIR is empty, or at least does not contain usr/bin or
|
||||||
|
usr/include, the installation fails, because install does not create
|
||||||
|
those intermediate directories:
|
||||||
|
|
||||||
|
$ make DESTDIR=/tmp/koin install
|
||||||
|
install -m 755 -t /tmp/koin/usr/bin ppsfind ppstest ppsctl ppswatch ppsldisc
|
||||||
|
install: failed to access '/tmp/koin/usr/bin': No such file or directory
|
||||||
|
|
||||||
|
Using the -D option of install fixes this:
|
||||||
|
|
||||||
|
$ make DESTDIR=/tmp/koin install
|
||||||
|
install -D -m 755 -t /tmp/koin/usr/bin ppsfind ppstest ppsctl ppswatch ppsldisc
|
||||||
|
install -D -m 644 -t /tmp/koin/usr/include/sys timepps.h
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||||
|
---
|
||||||
|
Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 9394668..30672f7 100644
|
||||||
|
--- Makefile
|
||||||
|
+++ Makefile
|
||||||
|
@@ -19,8 +19,8 @@ include .depend
|
||||||
|
endif
|
||||||
|
|
||||||
|
install : all
|
||||||
|
- install -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
|
||||||
|
- install -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
|
||||||
|
+ install -D -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
|
||||||
|
+ install -D -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
|
||||||
|
|
||||||
|
uninstall :
|
||||||
|
for f in $(TARGETS); do rm $(DESTDIR)/usr/bin/$$f; done
|
43
srcpkgs/pps-tools/patches/ppsfind-fixes.patch
Normal file
43
srcpkgs/pps-tools/patches/ppsfind-fixes.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# src: https://github.com/redlab-i/pps-tools/commit/e2b25049df9a4da28168b7378016f1650d0dfa6b.patch
|
||||||
|
|
||||||
|
From e2b25049df9a4da28168b7378016f1650d0dfa6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander GQ Gerasiov <gq@cs.msu.su>
|
||||||
|
Date: Wed, 24 Oct 2018 12:47:07 +0300
|
||||||
|
Subject: [PATCH] ppsfind: Use /bin/sh, fix possible issues.
|
||||||
|
|
||||||
|
Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>
|
||||||
|
---
|
||||||
|
ppsfind | 12 +++++-------
|
||||||
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ppsfind b/ppsfind
|
||||||
|
index 2ff7abc..adbcab9 100644
|
||||||
|
--- ppsfind
|
||||||
|
+++ ppsfind
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/bin/bash
|
||||||
|
+#!/bin/sh
|
||||||
|
# ppsfind -- find pps device by name
|
||||||
|
#
|
||||||
|
# Copyright (C) 2005-2007 Rodolfo Giometti <giometti@linux.it>
|
||||||
|
@@ -15,16 +15,14 @@
|
||||||
|
|
||||||
|
SYS="/sys/class/pps/"
|
||||||
|
|
||||||
|
-if [ $# -lt 1 ] ; then
|
||||||
|
+if [ $# -ne 1 ] ; then
|
||||||
|
echo "usage: ppsfind <name>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
-for d in $(ls $SYS) ; do
|
||||||
|
- if grep $1 $SYS/$d/name >& /dev/null || \
|
||||||
|
- grep $1 $SYS/$d/path >& /dev/null ; then
|
||||||
|
- echo "$d: name=$(cat $SYS/$d/name) path=$(cat $SYS/$d/path)"
|
||||||
|
- fi
|
||||||
|
+for dev in $SYS/* ; do
|
||||||
|
+ grep -q "$1" "$dev/name" || grep -q "$1" "$dev/path" && \
|
||||||
|
+ echo "$(basename "$dev"): name=$(cat $dev/name) path=$(cat $dev/path)"
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
78
srcpkgs/pps-tools/patches/ppswatch-signal.patch
Normal file
78
srcpkgs/pps-tools/patches/ppswatch-signal.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# src: https://github.com/redlab-i/pps-tools/commit/6deb88a80529f76a1ff1bdc9f1d0eb15c46c87e4.patch
|
||||||
|
|
||||||
|
From 6deb88a80529f76a1ff1bdc9f1d0eb15c46c87e4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Konrad=20Gr=C3=A4fe?= <konradgraefe@aol.com>
|
||||||
|
Date: Fri, 10 Aug 2018 09:47:33 +0200
|
||||||
|
Subject: [PATCH] ppswatch: Fix quitting after signal
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The ppswatch quitting mechanism relies on time_pps_fetch() being
|
||||||
|
interrupted by a signal. Therefore when ppswatch receives a signal while
|
||||||
|
it's not within time_pps_fetch() it would print the stastics but not
|
||||||
|
quit the application.
|
||||||
|
|
||||||
|
I can reliably reproduce the issue on my embedded machine (using the
|
||||||
|
pps-gpio driver) by running the following snippet:
|
||||||
|
./ppswatch -a /dev/pps3 &
|
||||||
|
pid=$!
|
||||||
|
sleep 3
|
||||||
|
kill $pid
|
||||||
|
|
||||||
|
This patch fixes the issue.
|
||||||
|
|
||||||
|
Signed-off-by: Konrad Gräfe <konradgraefe@aol.com>
|
||||||
|
---
|
||||||
|
ppswatch.c | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ppswatch.c b/ppswatch.c
|
||||||
|
index eb0500c..5c6202b 100644
|
||||||
|
--- ppswatch.c
|
||||||
|
+++ ppswatch.c
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
@@ -39,6 +40,8 @@ static int max_divergence = 0;
|
||||||
|
static double mean = 0.0;
|
||||||
|
static double M2 = 0.0;
|
||||||
|
|
||||||
|
+static volatile bool quit = false;
|
||||||
|
+
|
||||||
|
int find_source(char *path, pps_handle_t *handle, int *avail_mode)
|
||||||
|
{
|
||||||
|
pps_params_t params;
|
||||||
|
@@ -112,8 +115,8 @@ int fetch_source(pps_handle_t handle, int avail_mode)
|
||||||
|
ret = time_pps_fetch(handle, PPS_TSFMT_TSPEC, &infobuf,
|
||||||
|
&timeout);
|
||||||
|
}
|
||||||
|
- if (ret < 0) {
|
||||||
|
- if (errno == EINTR) {
|
||||||
|
+ if (ret < 0 || quit) {
|
||||||
|
+ if (errno == EINTR || quit) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -244,6 +247,7 @@ void print_stats()
|
||||||
|
|
||||||
|
static void sighandler_exit(int signum) {
|
||||||
|
print_stats();
|
||||||
|
+ quit = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
@@ -272,7 +276,7 @@ int main(int argc, char *argv[])
|
||||||
|
/* loop, printing the most recent timestamp every second or so */
|
||||||
|
while (1) {
|
||||||
|
ret = fetch_source(handle, avail_mode);
|
||||||
|
- if (ret < 0 && errno == EINTR) {
|
||||||
|
+ if ((ret < 0 && errno == EINTR) || quit) {
|
||||||
|
ret = 0;
|
||||||
|
break;
|
||||||
|
}
|
@ -1,21 +1,15 @@
|
|||||||
# Template file for 'pps-tools'
|
# Template file for 'pps-tools'
|
||||||
pkgname=pps-tools
|
pkgname=pps-tools
|
||||||
version=20120407
|
reverts="20120407_1 20120407_2"
|
||||||
revision=2
|
version=1.0.2
|
||||||
_githash="0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
|
revision=1
|
||||||
wrksrc="pps-tools-${_githash}"
|
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
short_desc="Tools for LinuxPPS (pulse-per-second)"
|
short_desc="Tools for LinuxPPS (pulse-per-second)"
|
||||||
maintainer="uriahheep <uriahheep@gmail.com>"
|
maintainer="uriahheep <uriahheep@gmail.com>"
|
||||||
license="GPL-2"
|
license="GPL-2.0-or-later"
|
||||||
homepage="http://linuxpps.org/wiki/index.php/Main_Page"
|
homepage="http://linuxpps.org/"
|
||||||
distfiles="https://github.com/ago/pps-tools/archive/${_githash}.tar.gz"
|
distfiles="https://github.com/ago/pps-tools/archive/v${version}.tar.gz"
|
||||||
checksum=28d4e5aa845f659a6ab4174bbf579e22e2d2c87dc72fd6d07306a6a249c27c76
|
checksum=1a7efd66152e5439b69143f1f380b40ac5decbbbef516b37a017410b8ba7dff4
|
||||||
|
|
||||||
do_install() {
|
|
||||||
mkdir -p ${DESTDIR}/usr/bin ${DESTDIR}/usr/include/sys
|
|
||||||
make DESTDIR=${DESTDIR} install
|
|
||||||
}
|
|
||||||
|
|
||||||
pps-tools-devel_package() {
|
pps-tools-devel_package() {
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user