Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing dependency, bump up compatibility level and standards version #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
mrfioc2 (2.2.0-3) unstable; urgency=medium

* Add missing dependency
* Bump up debhelper compatibility level to 9
* Update standards-version to 4.3.0
* Add patch fixing crash when calling time2ntp IOC shell fct

-- Martin Konrad <[email protected]> Thu, 21 Feb 2019 13:45:59 -0500

mrfioc2 (2.2.0-2) unstable; urgency=medium

* Use build profile to enable RTEMS cross build
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7
9
8 changes: 5 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
Source: mrfioc2
Section: devel
Priority: extra
Priority: optional
Maintainer: Martin Konrad <[email protected]>
Build-Depends: debhelper (>= 9.20141010), dpkg-dev (>= 1.17.14),
epics-debhelper (>= 6~), epics-dev (>= 3.14.11-2),
epics-msi,
epics-devlib2-dev (>= 2.8), epics-msi,
rtems-devlib2-mvme2100 (>=2.8) <pkg.epics-base.rtems>,
rtems-devlib2-mvme2307 (>=2.8) <pkg.epics-base.rtems>,
rtems-devlib2-mvme3100 (>=2.8) <pkg.epics-base.rtems>,
rtems-devlib2-mvme5500 (>=2.8) <pkg.epics-base.rtems>,
dkms,
XS-Rtems-Build-Depends: rtems-epics, rtems-devlib2 (>=2.8)
X-Epics-Targets: .*
Standards-Version: 3.8.0
Standards-Version: 4.3.0
Vcs-Git: https://github.com/epicsdeb/mrfioc2.git
Vcs-Browser: https://github.com/epicsdeb/mrfioc2
Homepage: http://epics.sf.net/mrfioc2

Package: libmrfioc2.8
Expand Down
91 changes: 91 additions & 0 deletions debian/patches/0002-time2ntp-catch-exceptions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
From: Michael Davidsaver <[email protected]>
Date: Tue, 29 Jan 2019 19:41:44 -0800
Subject: time2ntp() catch exceptions

---
evrApp/src/ntpShm.cpp | 66 +++++++++++++++++++++++++++------------------------
1 file changed, 35 insertions(+), 31 deletions(-)

diff --git a/evrApp/src/ntpShm.cpp b/evrApp/src/ntpShm.cpp
index 8f5dbc0..c572e9f 100644
--- a/evrApp/src/ntpShm.cpp
+++ b/evrApp/src/ntpShm.cpp
@@ -264,43 +264,47 @@ static void ntpshmhooks(initHookState state)

void time2ntp(const char* evrname, int segid, int event)
{
- if(event==0)
- event = MRF_EVENT_TS_COUNTER_RST;
- else if(event<=0 || event >255) {
- fprintf(stderr, "Invalid 1Hz event # %d\n", event);
- return;
- }
- if(segid<0 || segid>4) {
- fprintf(stderr, "Invalid segment ID %d\n", segid);
- return;
- }
- mrf::Object *obj = mrf::Object::getObject(evrname);
- if(!obj) {
- fprintf(stderr, "Unknown EVR: %s\n", evrname);
- return;
- }
+ try {
+ if(event==0)
+ event = MRF_EVENT_TS_COUNTER_RST;
+ else if(event<=0 || event >255) {
+ fprintf(stderr, "Invalid 1Hz event # %d\n", event);
+ return;
+ }
+ if(segid<0 || segid>4) {
+ fprintf(stderr, "Invalid segment ID %d\n", segid);
+ return;
+ }
+ mrf::Object *obj = mrf::Object::getObject(evrname);
+ if(!obj) {
+ fprintf(stderr, "Unknown EVR: %s\n", evrname);
+ return;
+ }

- EVR *evr = dynamic_cast<EVR*>(obj);
- if(!evr) {
- fprintf(stderr, "\"%s\" is not an EVR\n", evrname);
- return;
- }
+ EVR *evr = dynamic_cast<EVR*>(obj);
+ if(!evr) {
+ fprintf(stderr, "\"%s\" is not an EVR\n", evrname);
+ return;
+ }

- epicsThreadOnce(&ntponce, &ntpshminit, 0);
+ epicsThreadOnce(&ntponce, &ntpshminit, 0);

- epicsMutexMustLock(ntpShm.ntplock);
+ epicsMutexMustLock(ntpShm.ntplock);

- if(ntpShm.evr) {
- epicsMutexUnlock(ntpShm.ntplock);
- fprintf(stderr, "ntpShm already initialized.\n");
- return;
- }
+ if(ntpShm.evr) {
+ epicsMutexUnlock(ntpShm.ntplock);
+ fprintf(stderr, "ntpShm already initialized.\n");
+ return;
+ }

- ntpShm.event = event;
- ntpShm.evr = evr;
- ntpShm.segid = segid;
+ ntpShm.event = event;
+ ntpShm.evr = evr;
+ ntpShm.segid = segid;

- epicsMutexUnlock(ntpShm.ntplock);
+ epicsMutexUnlock(ntpShm.ntplock);
+ } catch(std::exception& e) {
+ fprintf(stderr, "Error: %s\n", e.what());
+ }
}

static const iocshArg time2ntpArg0 = { "evr name",iocshArgString};
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0001-link-with-as-needed.patch
0002-time2ntp-catch-exceptions.patch