[DRE-commits] [ruby-logging] 02/03: A bit of packaging work
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Wed Jul 22 18:30:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-logging.
commit a863811aa5f2641402c8ac08391854bf80c138a4
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Wed Jul 15 12:32:44 2015 +0300
A bit of packaging work
---
debian/control | 2 +-
debian/copyright | 42 +++++++++----------
...kport-7b1f872-to-fix-failures-when-LANG-C.patch | 49 ++++++++++++++++++++++
...e-assertions-not-working-when-run-by-root.patch | 31 ++++++++++++++
debian/patches/series | 2 +
debian/tests/control.ex | 13 ------
6 files changed, 102 insertions(+), 37 deletions(-)
diff --git a/debian/control b/debian/control
index 94963f2..df55987 100644
--- a/debian/control
+++ b/debian/control
@@ -22,7 +22,7 @@ Depends: ruby | ruby-interpreter,
ruby-multi-json (>= 1.10),
${misc:Depends},
${shlibs:Depends}
-Description: A flexible and extendable logging library for Ruby
+Description: flexible and extendable logging library for Ruby
Logging is a flexible logging library for use in Ruby programs based on the
design of Java's log4j library. It features a hierarchical logging system,
custom level names, multiple output destinations per log event, custom
diff --git a/debian/copyright b/debian/copyright
index 0949c00..58168c1 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,33 +3,29 @@ Upstream-Name: logging
Source: FIXME <http://example.com/>
Files: *
-Copyright: <years> <put author's name and email here>
- <years> <likewise for another author>
-License: GPL-2+ (FIXME)
+Copyright: 2009-2015 Tim Pease <tim.pease at gmail.com>
+License: Expat
Files: debian/*
Copyright: 2015 Hleb Valoshka <375gnu at gmail.com>
-License: GPL-2+ (FIXME)
+License: Expat
Comment: the Debian packaging is licensed under the same terms as the original package.
-License: GPL-2+ (FIXME)
- This program is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the 'Software'), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
.
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU General Public License for more
- details.
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
.
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301 USA
- .
- On Debian systems, the full text of the GNU General Public
- License version 2 can be found in the file
- `/usr/share/common-licenses/GPL-2'.
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/debian/patches/0001-Backport-7b1f872-to-fix-failures-when-LANG-C.patch b/debian/patches/0001-Backport-7b1f872-to-fix-failures-when-LANG-C.patch
new file mode 100644
index 0000000..8a7b4e2
--- /dev/null
+++ b/debian/patches/0001-Backport-7b1f872-to-fix-failures-when-LANG-C.patch
@@ -0,0 +1,49 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Wed, 15 Jul 2015 12:38:01 +0300
+Subject: Backport 7b1f872 to fix failures when LANG=C
+
+---
+ test/appenders/test_buffered_io.rb | 9 ++++++---
+ test/appenders/test_file.rb | 3 +--
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/test/appenders/test_buffered_io.rb b/test/appenders/test_buffered_io.rb
+index 8b7e850..62642b4 100644
+--- a/test/appenders/test_buffered_io.rb
++++ b/test/appenders/test_buffered_io.rb
+@@ -10,9 +10,12 @@ module TestAppenders
+
+ def setup
+ super
+- @appender = Logging.appenders.string_io(
+- 'test_appender', :auto_flushing => 3, :immediate_at => :error
+- )
++ @appender = Logging.appenders.string_io \
++ 'test_appender',
++ :auto_flushing => 3,
++ :immediate_at => :error,
++ :encoding => 'UTF-8'
++
+ @appender.clear
+ @sio = @appender.sio
+ @levels = Logging::LEVELS
+diff --git a/test/appenders/test_file.rb b/test/appenders/test_file.rb
+index a71f4bd..a31dd89 100644
+--- a/test/appenders/test_file.rb
++++ b/test/appenders/test_file.rb
+@@ -100,14 +100,13 @@ module TestAppenders
+
+ def test_encoding
+ log = File.join(TMP, 'file-encoding.log')
+- #appender = Logging.appenders.file(NAME, :filename => log, :encoding => 'ISO-8859-16')
+ appender = Logging.appenders.file(NAME, :filename => log, :encoding => 'ASCII')
+
+ appender << "A normal line of text\n"
+ appender << "ümlaut\n"
+ appender.close
+
+- lines = File.readlines(log)
++ lines = File.readlines(log, :encoding => 'UTF-8')
+ assert_equal "A normal line of text\n", lines[0]
+ assert_equal "ümlaut\n", lines[1]
+
diff --git a/debian/patches/0002-Disable-assertions-not-working-when-run-by-root.patch b/debian/patches/0002-Disable-assertions-not-working-when-run-by-root.patch
new file mode 100644
index 0000000..5cfd3a1
--- /dev/null
+++ b/debian/patches/0002-Disable-assertions-not-working-when-run-by-root.patch
@@ -0,0 +1,31 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Wed, 15 Jul 2015 12:58:23 +0300
+Subject: Disable assertions not working when run by root
+
+ Root user can write to readonly files
+---
+ test/appenders/test_file.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/appenders/test_file.rb b/test/appenders/test_file.rb
+index a31dd89..c3b83b2 100644
+--- a/test/appenders/test_file.rb
++++ b/test/appenders/test_file.rb
+@@ -24,7 +24,7 @@ module TestAppenders
+ log = File.join(TMP, 'uw_dir', 'file.log')
+ assert_raise(ArgumentError) do
+ Logging.appenders.file.assert_valid_logfile(log)
+- end
++ end if Process.euid != 0
+
+ log = File.join(TMP, 'dir')
+ assert_raise(ArgumentError) do
+@@ -34,7 +34,7 @@ module TestAppenders
+ log = File.join(TMP, 'uw_file')
+ assert_raise(ArgumentError) do
+ Logging.appenders.file.assert_valid_logfile(log)
+- end
++ end if Process.euid != 0
+
+ log = File.join(TMP, 'file.log')
+ assert Logging.appenders.file.assert_valid_logfile(log)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2eaca49
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Backport-7b1f872-to-fix-failures-when-LANG-C.patch
+0002-Disable-assertions-not-working-when-run-by-root.patch
diff --git a/debian/tests/control.ex b/debian/tests/control.ex
deleted file mode 100644
index d604201..0000000
--- a/debian/tests/control.ex
+++ /dev/null
@@ -1,13 +0,0 @@
-# AUTOGENERATED FILE
-#
-# As of autopkgtest 3.5, Ruby packages that use gem2deb are automatically
-# detected, and if debian/tests/control does not exist the contents below will
-# be assumed (with the exception of gem2deb being filtered out from
-# @builddeps@):
-
-Test-Command: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
-Depends: @, @builddeps@, gem2deb-test-runner
-
-# if you would need to change something to the above, to that and rename this
-# file to `control`. Otherwise, you should probably delete this file
-# (recommended).
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-logging.git
More information about the Pkg-ruby-extras-commits
mailing list