Hello community,
here is the log from the commit of package rubygem-daemons for openSUSE:Factory checked in at 2019-03-04 09:19:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-daemons (Old)
and /work/SRC/openSUSE:Factory/.rubygem-daemons.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-daemons"
Mon Mar 4 09:19:42 2019 rev:14 rq:679518 version:1.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-daemons/rubygem-daemons.changes 2018-01-02 16:36:00.759967396 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-daemons.new.28833/rubygem-daemons.changes 2019-03-04 09:19:47.576607268 +0100
@@ -1,0 +2,6 @@
+Wed Dec 19 07:05:30 UTC 2018 - Stephan Kulow
+
+- updated to version 1.3.1
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
daemons-1.2.6.gem
New:
----
daemons-1.3.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-daemons.spec ++++++
--- /var/tmp/diff_new_pack.xHxPXW/_old 2019-03-04 09:19:49.804606867 +0100
+++ /var/tmp/diff_new_pack.xHxPXW/_new 2019-03-04 09:19:49.804606867 +0100
@@ -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/
#
@@ -24,7 +24,7 @@
#
Name: rubygem-daemons
-Version: 1.2.6
+Version: 1.3.1
Release: 0
%define mod_name daemons
%define mod_full_name %{mod_name}-%{version}
++++++ daemons-1.2.6.gem -> daemons-1.3.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2017-12-24 13:54:50.000000000 +0100
+++ new/LICENSE 2018-12-14 20:59:50.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2017 Thomas Uehlinger, 2014-2016 Aaron Stone
+Copyright (c) 2005-2018 Thomas Uehlinger, 2014-2016 Aaron Stone
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2017-12-24 13:54:50.000000000 +0100
+++ new/README.md 2018-12-14 20:59:50.000000000 +0100
@@ -201,7 +201,7 @@
Daemons.run('myserver.rb', { show_status_callback: :custom_show_status })
```
-Documenation
+Documentation
-------------------
Documentation can be found at http://www.rubydoc.info/gems/daemons.
@@ -209,4 +209,4 @@
Author
------
-Written 2005-2017 by Thomas Uehlinger, 2014-2016 by Aaron Stone.
+Written 2005-2018 by Thomas Uehlinger, 2014-2016 by Aaron Stone.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Releases new/Releases
--- old/Releases 2017-12-24 13:54:50.000000000 +0100
+++ new/Releases 2018-12-14 20:59:50.000000000 +0100
@@ -1,5 +1,15 @@
= Daemons Release History
+== Release 1.3.1: December 14, 2018
+
+* Fix undefined local variable or method `pid_delimiter'
+
+== Release 1.3.0: December 10, 2018
+
+* Make logging more configurable.
+* Add configuration options for pid file delimters, force_kill_waittime
+* All status callback to be anything callable.
+
== Release 1.2.6: December 24, 2017
* Add links to rubydoc.info documentation.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons/application.rb new/lib/daemons/application.rb
--- old/lib/daemons/application.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons/application.rb 2018-12-14 20:59:50.000000000 +0100
@@ -31,7 +31,7 @@
['dir', 'log_dir', 'logfilename', 'output_logfilename'].each do |k|
@options[k] = File.expand_path(@options[k]) if @options.key?(k)
end
-
+
@dir_mode = @dir = @script = nil
@force_kill_waittime = @options[:force_kill_waittime] || 20
@@ -44,7 +44,7 @@
if @options[:no_pidfiles]
@pid = PidMem.new
elsif dir = pidfile_dir
- @pid = PidFile.new(dir, @group.app_name, @group.multiple)
+ @pid = PidFile.new(dir, @group.app_name, @group.multiple, @options[:pid_delimiter])
else
@pid = PidMem.new
end
@@ -52,7 +52,12 @@
end
def show_status_callback=(function)
- @show_status_callback = method(function)
+ @show_status_callback =
+ if function.respond_to?(:call)
+ function
+ else
+ method(function)
+ end
end
def change_privilege
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons/application_group.rb new/lib/daemons/application_group.rb
--- old/lib/daemons/application_group.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons/application_group.rb 2018-12-14 20:59:50.000000000 +0100
@@ -38,8 +38,11 @@
@dir = @options[:dir] || ''
@keep_pid_files = @options[:keep_pid_files] || false
+
@no_pidfiles = @options[:no_pidfiles] || false
+ @pid_delimiter = @options[:pid_delimiter]
+
@applications = []
end
@@ -94,7 +97,7 @@
@monitor = Monitor.find(dir, app_name + '_monitor')
reporter = Reporter.new(options)
- pid_files = PidFile.find_files(dir, app_name, ! @keep_pid_files) do |pid, file|
+ pid_files = PidFile.find_files(dir, app_name, ! @keep_pid_files, @pid_delimiter) do |pid, file|
reporter.deleted_found_pidfile(pid, file)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons/cmdline.rb new/lib/daemons/cmdline.rb
--- old/lib/daemons/cmdline.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons/cmdline.rb 2018-12-14 20:59:50.000000000 +0100
@@ -12,7 +12,7 @@
opts.on('-t', '--ontop', 'Stay on top (does not daemonize)') do |t|
@options[:ontop] = t
end
-
+
opts.on('-s', '--shush', 'Silent mode (no output to the terminal)') do |t|
@options[:shush] = t
end
@@ -25,9 +25,37 @@
@options[:no_wait] = t
end
+ opts.on('-w', '--force_kill_waittime SECONDS', Integer, 'Maximum time to wait for processes to stop before force-killing') do |t|
+ @options[:force_kill_waittime] = t
+ end
+
+ opts.on('--pid_delimiter STRING', 'Text used to separate process number in full process name and pid-file name') do |value|
+ @options[:pid_delimiter] = value
+ end
+
opts.separator ''
opts.separator 'Common options:'
+ opts.on('-l', '--log_output', 'Enable input/output stream redirection') do |value|
+ @options[:log_output] = value
+ end
+
+ opts.on('--logfilename FILE', String, 'Custom log file name for exceptions') do |value|
+ @options[:logfilename] = value
+ end
+
+ opts.on('--output_logfilename FILE', String, 'Custom file name for input/output stream redirection log') do |value|
+ @options[:output_logfilename] = value
+ end
+
+ opts.on('--log_dir DIR', String, 'Directory for log files') do |value|
+ @options[:log_dir] = value
+ end
+
+ opts.on('--syslog', 'Enable output redirction into SYSLOG instead of a file') do |value|
+ @options[:log_output_syslog] = value
+ end
+
# No argument, shows at tail. This will print an options summary
opts.on_tail('-h', '--help', 'Show this message') do
controller.print_usage
@@ -62,7 +90,7 @@
def parse(args)
# The options specified on the command line will be collected in *options*.
# We set default values here.
-
+
@opts.parse(args)
@options
@@ -71,20 +99,21 @@
class Controller
def print_usage
- puts "Usage: #{@app_name} <command> <options> -- <application options>"
- puts
- puts '* where <command> is one of:'
- puts ' start start an instance of the application'
- puts ' stop stop all instances of the application'
- puts ' restart stop all instances and restart them afterwards'
- puts ' reload send a SIGHUP to all instances of the application'
- puts ' run start the application and stay on top'
- puts ' zap set the application to a stopped state'
- puts ' status show status (PID) of application instances'
- puts
- puts '* and where <options> may contain several of the following:'
+ puts <<-USAGE.gsub(/^ {6}/, '')
+ Usage: #{@app_name} <command> <options> -- <application options>
- puts @optparse.usage
+ * where <command> is one of:
+ start start an instance of the application
+ stop stop all instances of the application
+ restart stop all instances and restart them afterwards
+ reload send a SIGHUP to all instances of the application
+ run run the application in the foreground (same as start -t)
+ zap set the application to a stopped state
+ status show status (PID) of application instances
+
+ * and where <options> may contain several of the following:
+ #{@optparse.usage}
+ USAGE
end
def catch_exceptions(&block)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons/pidfile.rb new/lib/daemons/pidfile.rb
--- old/lib/daemons/pidfile.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons/pidfile.rb 2018-12-14 20:59:50.000000000 +0100
@@ -13,8 +13,8 @@
# === How does a Pid-File look like?
#
# Pid-Files generated by Daemons have to following format:
- # <scriptname>.rb<number>.pid
- # (Note that <tt><number></tt> is omitted if only one instance of the script can
+ # <scriptname>_num<number>.pid
+ # (Note that <tt>_num<number></tt> is omitted if only one instance of the script can
# run at any time)
#
# Each file just contains one line with the pid as string (for example <tt>6432</tt>).
@@ -28,10 +28,11 @@
# 3. in the preconfigured directory <tt>/var/run</tt> (<tt>:system</tt> option for <tt>:dir_mode</tt>)
#
class PidFile < Pid
- attr_reader :dir, :progname, :multiple, :number
+ DEFAULT_PID_DELIMITER = '_num'
+ attr_reader :dir, :progname, :multiple, :number, :pid_delimiter
- def self.find_files(dir, progname, delete = false)
- files = Dir[File.join(dir, "#{progname}_num*.pid")]
+ def self.find_files(dir, progname, delete = false, pid_delimiter = nil)
+ files = Dir[File.join(dir, "#{progname}#{pid_delimiter || DEFAULT_PID_DELIMITER}*.pid")]
files = Dir[File.join(dir, "#{progname}.pid")] if files.size == 0
files.delete_if { |f| not (File.file?(f) and File.readable?(f)) }
@@ -62,10 +63,11 @@
new_instance
end
- def initialize(dir, progname, multiple = false)
+ def initialize(dir, progname, multiple = false, pid_delimiter = nil)
@dir = File.expand_path(dir)
@progname = progname
@multiple = multiple
+ @pid_delimiter = pid_delimiter || DEFAULT_PID_DELIMITER
@number = nil
@number = 0 if multiple
@@ -81,7 +83,8 @@
end
def filename
- File.join(@dir, "#{@progname}#{@number ? '_num' + @number.to_s : '' }.pid")
+ suffix = "#{pid_delimiter}#{@number}" if @number
+ File.join(@dir, "#{@progname}#{suffix}.pid")
end
def exist?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons/version.rb new/lib/daemons/version.rb
--- old/lib/daemons/version.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons/version.rb 2018-12-14 20:59:50.000000000 +0100
@@ -1,3 +1,3 @@
module Daemons
- VERSION = '1.2.6'
+ VERSION = '1.3.1'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/daemons.rb new/lib/daemons.rb
--- old/lib/daemons.rb 2017-12-24 13:54:50.000000000 +0100
+++ new/lib/daemons.rb 2018-12-14 20:59:50.000000000 +0100
@@ -99,6 +99,7 @@
# <tt>:dir</tt>:: Used in combination with <tt>:dir_mode</tt> (description above)
# <tt>:multiple</tt>:: Specifies whether multiple instances of the same script are allowed to run at the
# same time
+ # <tt>:pid_delimiter</tt>:: Specifies the separator used when enumerating multiple process names/pid-files. Default is '_num'.
# <tt>:ontop</tt>:: When given (i.e. set to true), stay on top, i.e. do not daemonize the application
# (but the pid-file and other things are written as usual)
# <tt>:shush</tt>:: When given (i.e. set to true), turn on silent mode (no output to the terminal)
@@ -129,6 +130,7 @@
# :dir_mode => :script,
# :dir => 'pids',
# :multiple => true,
+ # :pid_delimiter => '.n',
# :ontop => true,
# :shush => false,
# :mode => :exec,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2017-12-24 13:54:50.000000000 +0100
+++ new/metadata 2018-12-14 20:59:50.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: daemons
version: !ruby/object:Gem::Version
- version: 1.2.6
+ version: 1.3.1
platform: ruby
authors:
- Thomas Uehlinger
autorequire:
bindir: bin
cert_chain: []
-date: 2017-12-24 00:00:00.000000000 Z
+date: 2018-12-14 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake
@@ -148,7 +148,7 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.5.2
+rubygems_version: 2.5.2.3
signing_key:
specification_version: 4
summary: A toolkit to create and control daemons in different ways