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

MacOS dependency for circumvention for real time data dump unavailability on dmr-marc #866

Closed
jcmurray opened this issue Apr 20, 2018 · 4 comments · Fixed by #867
Closed

Comments

@jcmurray
Copy link
Contributor

The circumvention for the the real time data dump no longer being available on dmr-marc doesn't work on MacOS :-)

The defect

The following line was updated in db/Makefile in commit: ec7550d

dmrmarc.tmp:
	timeout 120 wget --no-check-certificate --wait=3 'https://dmr-marc.net/static/users.csv' -O $@

Unfortunately there is no timeout command on MacOS so the Makefile bails when updating the database ( make updatedb ).

Possible circumventions I've thought of

  • There is a MacOS equivalent called gtimeout which can be installed from Homebrew but that introduces a specific dependency into the Makefile which is not a happy thing :-(

  • I had thought of using the following pattern

some_shell_command & sleep 5; kill $!

which achieves the same effect as timeout -- at least from a shell prompt. However, it doesn't work when executed as a Makefile recipe due to the way that Make launches the system commands in a rule :-(

  • Use of on the various timeout options on wget to achieve the same effect?
  • Remove the timeout command from the command line?

Just some thoughts. My own temporary 'fix' is to remove the timeout for the moment.

@ghost
Copy link

ghost commented Apr 20, 2018

Is the MacOS wget the GNU wget?
Actually, what I'm asking is, does it support the --timeout flag that GNU wget has?
If so, that seems like the best option.

@jcmurray
Copy link
Contributor Author

It's the GNU wget on MacOS if you use Home-brew to install/manage it.

$ brew info wget 
wget: stable 1.19.4 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.1_1 (11 files, 1.6MB)
  Poured from bottle on 2017-06-05 at 19:20:41
/usr/local/Cellar/wget/1.19.2 (11 files, 1.7MB)
  Poured from bottle on 2017-10-29 at 09:29:45
/usr/local/Cellar/wget/1.19.2_1 (50 files, 3.8MB)
  Poured from bottle on 2017-12-19 at 10:25:36
/usr/local/Cellar/wget/1.19.4 (50 files, 3.7MB)
  Poured from bottle on 2018-01-22 at 18:31:42
/usr/local/Cellar/wget/1.19.4_1 (50 files, 3.7MB) *
  Poured from bottle on 2018-01-28 at 19:50:46
...

@ghost
Copy link

ghost commented Apr 21, 2018

@jcmurray I tested with a friend's macbook before pushing, so I believe this solves the problem. Thanks for the bug report and recommendations!

@jcmurray
Copy link
Contributor Author

@mach327 git pull'ed the updated and checked it on my MacBook Pro. Works just fine now. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant