openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2015
- 1 participants
- 1390 discussions
Hello community,
here is the log from the commit of package taskwarrior for openSUSE:Factory checked in at 2015-02-22 17:26:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/taskwarrior (Old)
and /work/SRC/openSUSE:Factory/.taskwarrior.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "taskwarrior"
Changes:
--------
--- /work/SRC/openSUSE:Factory/taskwarrior/taskwarrior.changes 2015-01-15 15:58:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.taskwarrior.new/taskwarrior.changes 2015-02-22 17:26:44.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Feb 16 20:48:47 UTC 2015 - mvyskocil(a)opensuse.org
+
+- Use standard %cmake and %cmake_install macros
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ taskwarrior.spec ++++++
--- /var/tmp/diff_new_pack.0BNYyD/_old 2015-02-22 17:26:45.000000000 +0100
+++ /var/tmp/diff_new_pack.0BNYyD/_new 2015-02-22 17:26:45.000000000 +0100
@@ -70,17 +70,12 @@
-e "s/__DATE__/\"${DATE}\"/"
%build
-cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_C_FLAGS="%{optflags}" \
- -DCMAKE_CXX_FLAGS="%{optflags}" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_SKIP_RPATH=1 \
- .
+%cmake
make %{?_smp_mflags}
%install
-%make_install
+%cmake_install
# this integration stuff might be in CMakeList.txt, but ...
%define scriptsdir %{buildroot}%{_datadir}/doc/task/scripts/
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rubygem-po_to_json for openSUSE:Factory checked in at 2015-02-22 17:26:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-po_to_json (Old)
and /work/SRC/openSUSE:Factory/.rubygem-po_to_json.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-po_to_json"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-po_to_json/rubygem-po_to_json.changes 2015-02-20 12:01:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-po_to_json.new/rubygem-po_to_json.changes 2015-02-22 17:26:41.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 20 14:13:49 UTC 2015 - tboerger(a)suse.com
+
+- Updated to 0.1.0
+ - Transfer from github.com/nubis/po_to_json
+ - Added TravisCI, Rubocop and Coveralls
+ - Updated structure to my opinionated gem style
+
+-------------------------------------------------------------------
Old:
----
po_to_json-0.0.7.gem
New:
----
po_to_json-0.1.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-po_to_json.spec ++++++
--- /var/tmp/diff_new_pack.GS7OuB/_old 2015-02-22 17:26:42.000000000 +0100
+++ /var/tmp/diff_new_pack.GS7OuB/_new 2015-02-22 17:26:42.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-po_to_json
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,25 +24,24 @@
#
Name: rubygem-po_to_json
-Version: 0.0.7
+Version: 0.1.0
Release: 0
%define mod_name po_to_json
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 5
-BuildRequires: %{ruby}
BuildRequires: %{rubygem gem2rpm}
-Url: https://github.com/nubis/po_to_json
+BuildRequires: %{ruby}
+BuildRequires: ruby-macros >= 5
+Url: https://github.com/webhippie/po_to_json
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
-Summary: Convert gettext PO files to json
+Summary: Convert gettext PO files to JSON
License: MIT
Group: Development/Languages/Ruby
%description
-Convert gettext PO files to json to use in your javascript app, based
-po2json.pl (by DuckDuckGo, Inc. http://duckduckgo.com/, Torsten Raudssus
-<torsten(a)raudss.us>.).
+Convert gettext PO files to JSON objects so that you can use it in your
+application.
%prep
@@ -50,7 +49,7 @@
%install
%gem_install \
- --doc-files="README.md MIT-LICENSE" \
+ --doc-files="CHANGELOG.md README.md LICENSE" \
-f
%gem_packages
++++++ gem2rpm.yml ++++++
--- /var/tmp/diff_new_pack.GS7OuB/_old 2015-02-22 17:26:42.000000000 +0100
+++ /var/tmp/diff_new_pack.GS7OuB/_new 2015-02-22 17:26:42.000000000 +0100
@@ -21,7 +21,7 @@
# ## used by gem2rpm
# :patches:
# foo.patch: -p1
-# bar.patch:
+# bar.patch:
# ## used by gem2rpm
# :sources:
# - foo.desktop
@@ -69,4 +69,4 @@
# /bin/echo foo
#
---
-:license: MIT
+:sources:
++++++ po_to_json-0.0.7.gem -> po_to_json-0.1.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
+++ new/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,7 @@
+# Changelog
+
+## [0.1.0](https://github.com/webhippie/po_to_json/releases/tag/v0.1.0) - 2015-02-19
+
+* Transfer from github.com/nubis/po_to_json
+* Added TravisCI, Rubocop and Coveralls
+* Updated structure to my opinionated gem style
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/LICENSE 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE
--- old/MIT-LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/MIT-LICENSE 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-Copyright 2012 Dropmysite.com. https://dropmyemail.com
-
-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:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/README.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +1,95 @@
-## po_to_json
+# PoToJson
-Convert gettext PO files to json to use in your javascript app, based po2json.pl (by DuckDuckGo, Inc. http://duckduckgo.com/, Torsten Raudssus <torsten(a)raudss.us>.
+[![Gem Version](http://img.shields.io/gem/v/po_to_json.svg)](https://rubygems.org/…
+[![Build Status](https://secure.travis-ci.org/webhippie/po_to_json.svg)](https://tra…
+[![Code Climate](https://codeclimate.com/github/webhippie/po_to_json.svg)](https://…
+[![Test Coverage](https://codeclimate.com/github/webhippie/po_to_json/badges/covera…
+[![Dependency Status](https://gemnasium.com/webhippie/po_to_json.svg)](https://gemnasium.…
-Ideally you'll use this on a rake task that creates json versions of your po files, which can later be used from javascript
-with Jed ( http://slexaxton.github.com/Jed/ )
+Convert gettext PO files to JSON to use in your javascript app, based on
+po2json.pl by [DuckDuckGo, Inc.](http://duckduckgo.com/). Ideally you'll use
+this on a Rake task that creates JSON versions of your PO files, which can
+later be used from javascript with [Jed](http://slexaxton.github.io/Jed/)
-## Installing
-Via rubygems:
-```ruby
-gem install po_to_json
-```
+## Versions
+
+This gem is tested on the following versions automated through TravisCI:
+
+* Ruby
+ * 1.9.3
+ * 2.0.0
+ * 2.1.0
+* Json
+ * 1.6.8
+ * 1.7.7
+ * 1.8.2
+
+
+## Installation
-In your gemfile:
```ruby
-gem 'po_to_json'
+gem "po_to_json", "~> 0.1.0"
```
+
## Usage
-Most common use would be to generate a Jed ready javascript file. For example, in a Rails 3 project:
+Most common use would be to generate a Jed ready javascript file. For example,
+in a Rails project:
```ruby
-require 'po_to_json'
-json_string = PoToJson.new("#{Rails.root}/locale/es/app.po").generate_for_jed('es')
-File.open("#{Rails.root}/app/assets/javascripts/locale/es/app.js",'w').write(json_string)
+require "po_to_json"
+
+json = PoToJson.new(
+ Rails.root.join("locale", "de", "app.po")
+).generate_for_jed("de")
+
+Rails.root.join("app", "assets", "javascripts", "locale", "de", "app.js").write(json)
```
-If you need a pretty json, add `:pretty => true` to `generate_for_jed`, like
+If you need a pretty json, add `pretty: true` to `generate_for_jed`, like the
+following example:
```ruby
-json_string = PoToJson.new("#{Rails.root}/locale/es/app.po").generate_for_jed('es', :pretty => true)
+require "po_to_json"
+
+json = PoToJson.new(
+ Rails.root.join("locale", "de", "app.po")
+).generate_for_jed("de", pretty: true)
+
+Rails.root.join("app", "assets", "javascripts", "locale", "de", "app.js").write(json)
```
-The javascript file generated has a global 'locales' object with an attribute corresponding to the generated language:
+The javascript file generated has a global "locales" object with an attribute
+corresponding to the generated language:
```javascript
-i18n = new Jed(locales['es'])
-i18n.gettext('Hello World') // Should evaluate to 'Hola Mundo'
+i18n = new Jed(locales["de"])
+i18n.gettext("Hello World") // Should evaluate to "Hallo Welt"
```
-## Maintainers
-* eromirou (https://github.com/eromirou)
-* Nubis (https://github.com/nubis)
+## Contributing
+
+Fork -> Patch -> Spec -> Push -> Pull Request
+
+
+## Authors
+
+* [Thomas Boerger](https://github.com/tboerger)
+* [Nubis](https://github.com/nubis)
+* [Other contributors](https://github.com/webhippie/po_to_json/graphs/contributors)
+
## License
-MIT License. Copyright 2012 Dropmysite.com. https://dropmyemail.com
+MIT
+
+
+## Copyright
+
+```
+Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+```
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/po_to_json/version.rb new/lib/po_to_json/version.rb
--- old/lib/po_to_json/version.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/po_to_json/version.rb 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,40 @@
+# -*- coding: UTF-8 -*-
+#
+# Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+# Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+#
+# 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:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# 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.
+#
+
+class PoToJson
+ class Version
+ MAJOR = 0
+ MINOR = 1
+ PATCH = 0
+
+ PRE = nil
+
+ class << self
+ def to_s
+ [MAJOR, MINOR, PATCH, PRE].compact.join(".")
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/po_to_json.rb new/lib/po_to_json.rb
--- old/lib/po_to_json.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/po_to_json.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,172 +1,329 @@
-require 'json'
+# -*- coding: UTF-8 -*-
+#
+# Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+# Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+#
+# 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:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# 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.
+#
+
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
+
+if File.exist? ENV["BUNDLE_GEMFILE"]
+ require "bundler"
+ Bundler.setup(:default)
+else
+ gem "json", version: ">= 1.6.0"
+end
+
+require "json"
class PoToJson
+ autoload :Version, File.expand_path("../po_to_json/version", __FILE__)
+ attr_accessor :files
+ attr_accessor :glue
+ attr_accessor :options
+ attr_accessor :errors
+ attr_accessor :values
+ attr_accessor :buffer
+ attr_accessor :lastkey
+ attr_accessor :trans
+
+ def initialize(files, glue = "|")
+ @files = files
+ @glue = glue
+ end
- # Gettext translations may be contextualized like so User|name
- # The default 'GLUE' in rails gettext is '|' so we use that here too.
- def initialize(path_to_po, context_glue = '|')
- # Gettext translations may be contextualized like so User|name
- # The default 'GLUE' in rails gettext is '|' so we use that here too.
- @context_glue = context_glue
- @path_to_po = path_to_po
+ def generate_for_jed(language, overwrite = {})
+ @options = parse_options(overwrite.merge(language: language))
+ @parsed ||= inject_meta(parse_document)
+
+ generated = build_json_for(build_jed_for(@parsed))
+
+ [
+ "var #{@options[:variable]} = #{@options[:variable]} || {};",
+ "#{@options[:variable]}['#{@options[:language]}'] = #{generated};"
+ ].join(" ")
end
+ def generate_for_json(language, overwrite = {})
+ @options = parse_options(overwrite.merge(language: language))
+ @parsed ||= inject_meta(parse_document)
- # Generates a jed-compatible js file from the current PO.
- # This include adding some wrapping structure to the translations and
- # making sure the minimum headers required by Jed are provided.
- # Jed is a js gettext library ( http://slexaxton.github.com/Jed/ )
- # The generated file leaves the generated json inside a global locales
- # object which you can use to instatiate Jed:
- # >>> i18n = new Jed(locales['es'])
- # >>> i18n.gettext('Hello World')
- # => 'Hola Mundo'
- def generate_for_jed(language_code, opts={})
- @parsed ||= self.parse
-
- @parsed['']['lang'] = language_code
- @parsed['']['domain'] = 'app'
- @parsed['']['plural_forms'] ||= @parsed['']['Plural-Forms']
-
- jed_json = {
- :domain => 'app',
- :locale_data => { :app => @parsed }
- }
+ generated = build_json_for(build_json_for(@parsed))
- if opts[:pretty]
- "var locales = locales || {}; locales['#{language_code}'] = #{JSON.pretty_generate(jed_json)};"
- else
- "var locales = locales || {}; locales['#{language_code}'] = #{JSON.generate(jed_json)};"
- end
+ fail "Not implemented yet, current value is #{generated}!"
end
+ def parse_document
+ reset_buffer
+ reset_result
- # Messages in a PO file are defined as a series of 'key value' pairs,
- # values may span over more than one line. Each key defines an attribute
- # of the message, like message id, context, pluralization options, etc.
- # Each message is separated by a blank line.
- # The parser reads attributes until it finds an empty line, at that point
- # it saves the attributes read so far into a message and stores it in a hash
- # to be later turned into a json object.
- def parse
- @parsed_values = {}
- @buffer = {}
- @last_key_type = ""
- @errors = []
- File.foreach(@path_to_po) do |line|
- line = line.chomp
- case line
- # Empty lines means we have parsed one full message
- # so far and need to flush the buffer
- when /^$/ then flush_buffer
+ File.foreach(files) do |line|
+ matches_values_for(line.chomp)
+ end
- # These are the po file comments
- # The second '#' in the following regex is in square brackets
- # b/c it messed up my syntax highlighter, no other reason.
- when /^(#[^~]|[#]$)/ then next
+ flush_buffer
+ parse_header
- when /^(?:#~ )?msgctxt\s+(.*)/ then add_to_buffer($1, :msgctxt)
+ values
+ end
- when /^(?:#~ )?msgid\s+(.*)/ then add_to_buffer($1, :msgid)
+ def flush_buffer
+ return unless buffer[:msgid]
- when /^(?:#~ )?msgid_plural\s+(.*)/ then add_to_buffer($1, :msgid_plural)
+ build_trans
+ assign_trans
- when /^(?:#~ )?msgstr\s+(.*)/ then add_to_buffer($1, :msgstr_0)
+ reset_buffer
+ end
- when /^(?:#~ )?msgstr\[0\]\s+(.*)/ then add_to_buffer($1, :msgstr_0)
+ def parse_header
+ return if reject_header
- when /^(?:#~ )?msgstr\[(\d+)\]\s+(.*)/ then add_to_buffer($2, "msgstr_#{$1}".to_sym)
+ values[""][1].split("\\n").each do |line|
+ next if line.empty?
+ build_header_for(line)
+ end
- when /^(?:#~ )?"/ then add_to_buffer(line)
+ values[""] = headers
+ end
- else
- @errors << ["Strange line #{line}"]
- end
+ def reject_header
+ if values[""].nil? || values[""][1].nil?
+ values[""] = {}
+ true
+ else
+ false
end
+ end
- # In case the file did not end with a newline, we want to flush the buffer
- # one more time to write the last message too.
- flush_buffer
+ protected
- # This will turn the header values into a friendlier json structure too.
- parse_header_lines
+ def trans
+ @trans ||= []
+ end
- return @parsed_values
+ def errors
+ @errors ||= []
end
- def flush_buffer
- return unless @buffer[:msgid]
+ def values
+ @values ||= {}
+ end
+
+ def buffer
+ @buffer ||= {}
+ end
+
+ def headers
+ @headers ||= {}
+ end
+
+ def lastkey
+ @lastkey ||= ""
+ end
- msg_ctxt_id = if @buffer[:msgctxt] && @buffer[:msgctxt].size > 0
- @buffer[:msgctxt] + @context_glue + @buffer[:msgid]
+ def reset_result
+ @values = {}
+ @errors = []
+ end
+
+ def reset_buffer
+ @buffer = {}
+ @trans = []
+ @lastkey = ""
+ end
+
+ def detect_ctxt
+ msgctxt = buffer[:msgctxt]
+ msgid = buffer[:msgid]
+
+ if msgctxt && msgctxt.size > 0
+ [msgctxt, glue, msgid].join("")
else
- @buffer[:msgid]
+ msgid
end
+ end
- msgid_plural = if @buffer[:msgid_plural] && @buffer[:msgid_plural].size > 0
- @buffer[:msgid_plural]
- end
+ def detect_plural
+ plural = buffer[:msgid_plural]
+ plural if plural && plural.size > 0
+ end
- # find msgstr_* translations and push them on
- trans = []
- @buffer.each do |key, string|
- trans[$1.to_i] = string if key.to_s =~ /^msgstr_(\d+)/
+ def build_trans
+ buffer.each do |key, string|
+ trans[$1.to_i] = string if key.to_s.match(/^msgstr_(\d+)/)
end
- trans.unshift(msgid_plural)
- @parsed_values[msg_ctxt_id] = trans if trans.size > 1
+ trans.unshift(detect_plural)
+ end
- @buffer = {}
- @last_key_type = ""
+ def assign_trans
+ values[detect_ctxt] = trans if trans.size > 1
end
- # The buffer keeps key/value pairs for all the config options
- # defined on an entry, including the message id and value.
- # For continued lines, the key_type can be empty, so the last
- # used key type will be used. Also, the content will be appended
- # to the last key rather than assigned.
- def add_to_buffer(value, key_type = nil)
+ def push_buffer(value, key = nil)
value = $1 if value =~ /^"(.*)"/
- value.gsub(/\\"/, '"')
+ value.gsub(/\\"/, "\"")
- if key_type.nil?
- @buffer[@last_key_type] += value
+ if key.nil?
+ buffer[lastkey] = [
+ buffer[lastkey],
+ value
+ ].join("")
else
- @buffer[key_type] = value
- @last_key_type = key_type
+ buffer[key] = value
+ @lastkey = key
end
end
- # The parsed values are expected to have an empty string key ("")
- # which corresponds to the po file metadata defined in it's header.
- # the header has information like the translator, the pluralization, etc.
- # Each header line is subseqently parsed into a more usable hash.
- def parse_header_lines
- if @parsed_values[""].nil? || @parsed_values[""][1].nil?
- @parsed_values[""] = {}
- return
+ def parse_options(options)
+ defaults = {
+ pretty: false,
+ domain: "app",
+ variable: "locales"
+ }
+
+ defaults.merge(options)
+ end
+
+ def inject_meta(hash)
+ hash[""]["lang"] ||= options[:language]
+ hash[""]["domain"] ||= options[:domain]
+ hash[""]["plural_forms"] ||= hash[""]["Plural-Forms"]
+
+ hash
+ end
+
+ def build_header_for(line)
+ if line =~ /(.*?):(.*)/
+ key, value = $1, $2
+
+ if headers.key? key
+ errors.push "Duplicate header: #{line}"
+ elsif key =~ /#-#-#-#-#/
+ errors.push "Marked header: #{line}"
+ else
+ headers[key] = value.strip
+ end
+ else
+ errors.push "Malformed header: #{line}"
end
+ end
+
+ def build_json_for(hash)
+ if options[:pretty]
+ JSON.pretty_generate(hash)
+ else
+ JSON.generate(hash)
+ end
+ end
+
+ def build_jed_for(hash)
+ {
+ domain: options[:domain],
+ locale_data: {
+ options[:domain] => hash
+ }
+ }
+ end
+
+ def matches_values_for(line)
+ return if generic_rejects? line
+ return if generic_detects? line
- headers = {}
- # Heading lines may have escaped newlines in them
- @parsed_values[""][1].split(/\\n/).each do |line|
- next if line.size == 0
+ return if iterate_detects_for(line)
+
+ errors.push "Strange line #{line}"
+ end
- if line =~ /(.*?):(.*)/
- key, value = $1, $2
- if headers[key] && headers[key].size > 0
- @errors << ["Duplicate header line: #{line}"]
- elsif key =~ /#-#-#-#-#/
- @errors << ["Marker in header line: #{line}"]
+ def iterate_detects_for(line)
+ specific_detects.each do |detect|
+ match = line.match(detect[:regex])
+
+ if match
+ if detect[:index]
+ push_buffer(match[detect[:index]], detect[:key].call(match))
else
- headers[key] = value
+ push_buffer(line)
end
- else
- @errors << ["Malformed header #{line}"]
+
+ return true
end
end
- @parsed_values[""] = headers
+ false
+ end
+
+ def generic_rejects?(line)
+ if line.match(/^$/) || line.match(/^(#[^~]|[#]$)/)
+ flush_buffer && true
+ else
+ false
+ end
+ end
+
+ def generic_detects?(line)
+ match = line.match(/^(?:#~ )?msgctxt\s+(.*)/)
+
+ if match
+ push_buffer(
+ match[1],
+ :msgctxt
+ )
+
+ return true
+ end
+
+ false
+ end
+
+ def specific_detects
+ [{
+ regex: /^(?:#~ )?msgctxt\s+(.*)/,
+ index: 1,
+ key: proc { :msgctxt }
+ }, {
+ regex: /^(?:#~ )?msgid\s+(.*)/,
+ index: 1,
+ key: proc { :msgid }
+ }, {
+ regex: /^(?:#~ )?msgid_plural\s+(.*)/,
+ index: 1,
+ key: proc { :msgid_plural }
+ }, {
+ regex: /^(?:#~ )?msgstr\s+(.*)/,
+ index: 1,
+ key: proc { :msgstr_0 }
+ }, {
+ regex: /^(?:#~ )?msgstr\[0\]\s+(.*)/,
+ index: 1,
+ key: proc { :msgstr_0 }
+ }, {
+ regex: /^(?:#~ )?msgstr\[(\d+)\]\s+(.*)/,
+ index: 2,
+ key: proc { |m| "msgstr_#{m[1]}".to_sym }
+ }, {
+ regex: /^(?:#~ )?"/,
+ index: nil
+ }]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 1970-01-01 01:00:00.000000000 +0100
+++ new/metadata 1970-01-01 01:00:00.000000000 +0100
@@ -1,66 +1,130 @@
--- !ruby/object:Gem::Specification
name: po_to_json
version: !ruby/object:Gem::Version
- version: 0.0.7
- prerelease:
+ version: 0.1.0
platform: ruby
authors:
+- Thomas Boerger
- Nubis
-- eromirou
autorequire:
bindir: bin
cert_chain: []
-date: 2013-05-02 00:00:00.000000000 Z
+date: 2015-02-20 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
- name: json
+ name: bundler
requirement: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - '>='
- !ruby/object:Gem::Version
version: '0'
- type: :runtime
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+- !ruby/object:Gem::Dependency
+ name: rake
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+- !ruby/object:Gem::Dependency
+ name: yard
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - '>='
- !ruby/object:Gem::Version
version: '0'
-description: Convert gettext PO files to json to use in your javascript app, based
- po2json.pl (by DuckDuckGo, Inc. http://duckduckgo.com/, Torsten Raudssus <torsten(a)raudss.us>.)
-email: nubis(a)woobiz.com.ar
+- !ruby/object:Gem::Dependency
+ name: rspec
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: '0'
+- !ruby/object:Gem::Dependency
+ name: json
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: 1.6.0
+ type: :runtime
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - '>='
+ - !ruby/object:Gem::Version
+ version: 1.6.0
+description: |2
+ Convert gettext PO files to JSON objects so that you can use it in your
+ application.
+email:
+- thomas(a)webhippie.de
+- nubis(a)woobiz.com.ar
executables: []
extensions: []
extra_rdoc_files: []
files:
-- lib/po_to_json.rb
+- CHANGELOG.md
- README.md
-- MIT-LICENSE
-homepage: https://github.com/nubis/po_to_json
-licenses: []
+- LICENSE
+- lib/po_to_json.rb
+- lib/po_to_json/version.rb
+- spec/spec_helper.rb
+- spec/fixtures/test.po
+- spec/po_to_json_spec.rb
+homepage: https://github.com/webhippie/po_to_json
+licenses:
+- MIT
+metadata: {}
post_install_message:
rdoc_options: []
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - '>='
- !ruby/object:Gem::Version
version: '0'
required_rubygems_version: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - '>='
- !ruby/object:Gem::Version
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 1.8.23
+rubygems_version: 2.0.3
signing_key:
-specification_version: 3
-summary: Convert gettext PO files to json
-test_files: []
+specification_version: 4
+summary: Convert gettext PO files to JSON
+test_files:
+- spec/spec_helper.rb
+- spec/fixtures/test.po
+- spec/po_to_json_spec.rb
has_rdoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/fixtures/test.po new/spec/fixtures/test.po
--- old/spec/fixtures/test.po 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/fixtures/test.po 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,69 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+msgid ""
+msgstr ""
+"Project-Id-Version: version 0.0.1\n"
+"POT-Creation-Date: 2009-02-26 19:50+0100\n"
+"PO-Revision-Date: 2011-12-04 18:54+0900\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: app/helpers/translation_helper.rb:3
+msgid "%{relative_time} ago"
+msgstr "vor %{relative_time}"
+
+#: app/views/cars/show.html.erb:5
+msgid "Axis"
+msgid_plural "Axis"
+msgstr[0] "Achse"
+msgstr[1] "Achsen"
+
+#: app/controllers/cars_controller.rb:47
+msgid "Car was successfully created."
+msgstr "Auto wurde erfolgreich gespeichert"
+
+#: app/controllers/cars_controller.rb:64
+msgid "Car was successfully updated."
+msgstr "Auto wurde erfolgreich aktualisiert"
+
+#: app/views/cars/show.html.erb:1 locale/model_attributes.rb:3
+msgid "Car|Model"
+msgstr "Modell"
+
+msgid "Untranslated"
+msgstr ""
+
+#: app/views/cars/show.html.erb:3 locale/model_attributes.rb:4
+msgid "Car|Wheels count"
+msgstr "Räderzahl"
+
+#: app/views/cars/show.html.erb:7
+msgid "Created"
+msgstr "Erstellt"
+
+#: app/views/cars/show.html.erb:9
+msgid "Month"
+msgstr "Monat"
+
+#: locale/model_attributes.rb:2
+msgid "car"
+msgstr "Auto"
+
+#: locale/testlog_phrases.rb:2
+msgid "this is a dynamic translation which was found!"
+msgstr ""
+"Dies ist eine dynamische Übersetzung, die "
+"gefunden wurde!"
+
+#: locale/test_escape.rb:2
+msgid "You should escape '\\' as '\\\\'."
+msgstr "Du solltest '\\' als '\\\\' escapen."
+
+msgid "Umläüte"
+msgstr "Umlaute"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/po_to_json_spec.rb new/spec/po_to_json_spec.rb
--- old/spec/po_to_json_spec.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/po_to_json_spec.rb 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,196 @@
+# -*- coding: UTF-8 -*-
+#
+# Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+# Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+#
+# 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:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# 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.
+#
+
+require "spec_helper"
+
+describe PoToJson do
+ let(:po_to_json) do
+ @subject = PoToJson.new(
+ File.expand_path("../fixtures/test.po", __FILE__)
+ )
+ end
+
+ describe "parsing" do
+ subject do
+ po_to_json.parse_document
+ end
+
+ it "should find the last author" do
+ expect(subject[""]["Last-Translator"]).to(
+ eq("FULL NAME <EMAIL@ADDRESS>")
+ )
+ end
+
+ it "should parse embedded variables" do
+ expect(subject["%{relative_time} ago"]).to(
+ eq([nil, "vor %{relative_time}"])
+ )
+ end
+
+ it "should match pluralizations" do
+ expect(subject["Axis"]).to(
+ eq(["Axis", "Achse", "Achsen"])
+ )
+ end
+
+ it "should match glued values" do
+ expect(subject["Car|Model"]).to(
+ eq([nil, "Modell"])
+ )
+ end
+
+ it "should match embedded glue" do
+ expect(subject["Car|Wheels count"]).to(
+ eq([nil, "Räderzahl"])
+ )
+ end
+
+ it "should return empty strings as well" do
+ expect(subject["Untranslated"]).to(
+ eq([nil, ""])
+ )
+ end
+
+ it "should match german umlauts" do
+ expect(subject["Umläüte"]).to(
+ eq([nil, "Umlaute"])
+ )
+ end
+
+ it "should match escaped values" do
+ expect(subject["You should escape '\\\\' as '\\\\\\\\'."]).to(
+ eq([nil, "Du solltest '\\\\' als '\\\\\\\\' escapen."])
+ )
+ end
+
+ it "should match multiline translations" do
+ expect(subject["this is a dynamic translation which was found!"]).to(
+ eq([nil, "Dies ist eine dynamische Übersetzung, die gefunden wurde!"])
+ )
+ end
+
+ it "should match simple strings" do
+ expect(subject["Car was successfully created."]).to(
+ eq([nil, "Auto wurde erfolgreich gespeichert"])
+ )
+
+ expect(subject["Car was successfully updated."]).to(
+ eq([nil, "Auto wurde erfolgreich aktualisiert"])
+ )
+
+ expect(subject["Created"]).to(
+ eq([nil, "Erstellt"])
+ )
+
+ expect(subject["Month"]).to(
+ eq([nil, "Monat"])
+ )
+
+ expect(subject["car"]).to(
+ eq([nil, "Auto"])
+ )
+ end
+ end
+
+ describe "generate jed compatible" do
+ describe "with minified output" do
+ subject do
+ po_to_json.generate_for_jed("de")
+ end
+
+ it "should output the var definition" do
+ expect(
+ subject.include?("var locales = locales || {}; locales['de'] = ")
+ ).to be_truthy
+ end
+
+ it "should include domain string" do
+ expect(
+ subject.include?('"domain":"app"')
+ ).to be_truthy
+ end
+
+ it "should include lang string" do
+ expect(
+ subject.include?('"lang":"de"')
+ ).to be_truthy
+ end
+
+ it "should include pluralization" do
+ val = '"plural_forms":"nplurals=INTEGER; plural=EXPRESSION;"'
+ expect(
+ subject.include? val
+ ).to be_truthy
+ end
+
+ it "should include a single line break" do
+ expect(
+ subject.count("\n")
+ ).to be < 1
+ end
+ end
+
+ context "with pretty output" do
+ subject do
+ po_to_json.generate_for_jed("de", pretty: true)
+ end
+
+ it "should output the var definition" do
+ expect(
+ subject.include?("var locales = locales || {}; locales['de'] = ")
+ ).to be_truthy
+ end
+
+ it "should include domain string" do
+ expect(
+ subject.include?('"domain": "app"')
+ ).to be_truthy
+ end
+
+ it "should include lang string" do
+ expect(
+ subject.include?('"lang": "de"')
+ ).to be_truthy
+ end
+
+ it "should include pluralization" do
+ val = '"plural_forms": "nplurals=INTEGER; plural=EXPRESSION;"'
+ expect(
+ subject.include? val
+ ).to be_truthy
+ end
+
+ it "should include multiple line breaks" do
+ expect(
+ subject.count("\n")
+ ).to be > 0
+ end
+ end
+ end
+
+ # describe "generate simple hashes" do
+ # pending "have to be implemented"
+ # end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,54 @@
+# -*- coding: UTF-8 -*-
+#
+# Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
+# Copyright (c) 2015 Webhippie <http://www.webhippie.de>
+#
+# 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:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# 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.
+#
+
+require "simplecov"
+
+if ENV["CODECLIMATE_REPO_TOKEN"]
+ require "coveralls"
+ require "codeclimate-test-reporter"
+
+ Coveralls.wear!
+ CodeClimate::TestReporter.start
+
+ SimpleCov.start do
+ add_filter "/spec"
+
+ formatter SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ CodeClimate::TestReporter::Formatter
+ ]
+ end
+else
+ SimpleCov.start do
+ add_filter "/spec"
+ end
+end
+
+require "po_to_json"
+require "rspec"
+
+RSpec.configure do |config|
+ config.mock_with :rspec
+end
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package phpMyAdmin for openSUSE:Factory checked in at 2015-02-22 17:26:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/phpMyAdmin (Old)
and /work/SRC/openSUSE:Factory/.phpMyAdmin.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "phpMyAdmin"
Changes:
--------
--- /work/SRC/openSUSE:Factory/phpMyAdmin/phpMyAdmin.changes 2015-02-06 22:38:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.phpMyAdmin.new/phpMyAdmin.changes 2015-02-22 17:26:38.000000000 +0100
@@ -1,0 +2,15 @@
+Fri Feb 20 16:32:21 UTC 2015 - ecsos(a)opensuse.org
+
+- update to 4.3.10 (2015-02-20)
+ - fix bug Undefined index navwork
+ - sf#4744 Opening console scroll down the page
+ - fix bug Remove extra column heading in view structure page
+ - fix bug Add missing confirmation when deleting central columns
+ - fix bug Undefined index DisableIS
+ - sf#4763 Database export with more than 512 tables fails
+ - sf#4769 Previously set column aliases are destroyed if returned
+ to the same table
+ - sf#4752 Incorrect page after creating table
+ - sf#4771 Central Columns not working, showing error
+
+-------------------------------------------------------------------
Old:
----
phpMyAdmin-4.3.9-all-languages.tar.bz2
New:
----
phpMyAdmin-4.3.10-all-languages.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ phpMyAdmin.spec ++++++
--- /var/tmp/diff_new_pack.tC4kq7/_old 2015-02-22 17:26:39.000000000 +0100
+++ /var/tmp/diff_new_pack.tC4kq7/_new 2015-02-22 17:26:39.000000000 +0100
@@ -34,7 +34,7 @@
Summary: Administration of MySQL over the web
License: GPL-2.0+
Group: Productivity/Networking/Web/Frontends
-Version: 4.3.9
+Version: 4.3.10
Release: 0
Url: http://www.phpMyAdmin.net
Source0: http://sourceforge.net/projects/phpmyadmin/files/%{name}-%{version}-all-lan…
++++++ phpMyAdmin-4.3.9-all-languages.tar.bz2 -> phpMyAdmin-4.3.10-all-languages.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/phpMyAdmin/phpMyAdmin-4.3.9-all-languages.tar.bz2 /work/SRC/openSUSE:Factory/.phpMyAdmin.new/phpMyAdmin-4.3.10-all-languages.tar.bz2 differ: char 11, line 1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ooRexx for openSUSE:Factory checked in at 2015-02-22 17:26:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ooRexx (Old)
and /work/SRC/openSUSE:Factory/.ooRexx.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ooRexx"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ooRexx/ooRexx.changes 2015-01-23 15:47:45.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ooRexx.new/ooRexx.changes 2015-02-22 17:26:36.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Feb 20 14:12:48 UTC 2015 - emendonca(a)suse.com
+
+- Fixing BuildRequires for SLE12, as xalan-c is not available anymore.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ooRexx.spec ++++++
--- /var/tmp/diff_new_pack.FqjvMX/_old 2015-02-22 17:26:37.000000000 +0100
+++ /var/tmp/diff_new_pack.FqjvMX/_new 2015-02-22 17:26:37.000000000 +0100
@@ -87,7 +87,12 @@
BuildRequires: subversion
%if 0%{?suse_version} > 1230
+
+# SLE12 does not have xalan-c anymore!
+%if %{suse_version} != 1315
BuildRequires: xalan-c
+%endif
+
Requires: systemd
%define _unitdir /usr/lib/systemd/system
%endif
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package julia for openSUSE:Factory checked in at 2015-02-22 17:26:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/julia (Old)
and /work/SRC/openSUSE:Factory/.julia.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "julia"
Changes:
--------
--- /work/SRC/openSUSE:Factory/julia/julia.changes 2015-01-12 09:49:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.julia.new/julia.changes 2015-02-22 17:26:35.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 20 14:22:10 UTC 2015 - ronisbr(a)gmail.com
+
+- Update to version 0.3.6
+ * Bugfix release, no changelog available
+
+-------------------------------------------------------------------
Old:
----
julia-0.3.5.tar.gz
New:
----
julia-0.3.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ julia.spec ++++++
--- /var/tmp/diff_new_pack.VWmeWp/_old 2015-02-22 17:26:36.000000000 +0100
+++ /var/tmp/diff_new_pack.VWmeWp/_new 2015-02-22 17:26:36.000000000 +0100
@@ -17,7 +17,7 @@
Name: julia
-Version: 0.3.5
+Version: 0.3.6
Release: 0
%define rmath_ver 226598f
%define libuv_ver abcbb0c
++++++ julia-0.3.5.tar.gz -> julia-0.3.6.tar.gz ++++++
++++ 27000 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package htop for openSUSE:Factory checked in at 2015-02-22 17:26:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/htop (Old)
and /work/SRC/openSUSE:Factory/.htop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "htop"
Changes:
--------
--- /work/SRC/openSUSE:Factory/htop/htop.changes 2014-05-31 08:09:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.htop.new/htop.changes 2015-02-22 17:26:32.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 20 13:38:40 UTC 2015 - jhura(a)suse.com
+
+- Cleanup of spec file with spec-cleaner.
+- Enable oom score watching and native-affinity
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ htop.spec ++++++
--- /var/tmp/diff_new_pack.9blltZ/_old 2015-02-22 17:26:33.000000000 +0100
+++ /var/tmp/diff_new_pack.9blltZ/_new 2015-02-22 17:26:33.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package htop
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,13 +26,13 @@
Source0: http://hisham.hm/htop/releases/%{version}/%{name}-%{version}.tar.gz
Patch0: htop-desktop-file-fix-thoenig-01.patch
Patch1: htop-stdgnu.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: automake
BuildRequires: ncurses-devel
BuildRequires: python
BuildRequires: update-desktop-files
-Recommends: strace
Recommends: lsof
+Recommends: strace
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
htop is an interactive text-mode process viewer for Linux. It aims to
@@ -40,30 +40,24 @@
but is also reported to work (and was originally developed) with the
2.4 series.
-
-
-Authors:
---------
- Hisham H. Muhammad
-
%prep
-%setup
-%patch0 -p0
+%setup -q
+%patch0
%patch1 -p1
%build
-export CFLAGS="%{optflags} `ncursesw6-config --cflags`"
-export LDFLAGS="`ncursesw6-config --libs`"
-autoreconf -fiv
+autoreconf -fi
%configure \
- --enable-unicode \
--enable-taskstats \
- --enable-cgroup
+ --enable-unicode \
+ --enable-native-affinity \
+ --enable-cgroup \
+ --enable-oom
make %{?_smp_mflags}
%install
-make install DESTDIR="%buildroot"
-%suse_update_desktop_file -i %name System Monitor
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
+%suse_update_desktop_file -i %{name} System Monitor
%files
%defattr(-,root,root)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xapian-bindings for openSUSE:Factory checked in at 2015-02-22 17:26:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xapian-bindings (Old)
and /work/SRC/openSUSE:Factory/.xapian-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xapian-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xapian-bindings/xapian-bindings.changes 2014-10-22 16:22:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xapian-bindings.new/xapian-bindings.changes 2015-02-22 17:26:31.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 19 16:44:48 UTC 2015 - mpluskal(a)suse.com
+
+- Tiny spec file cleanups
+- Enable tests during build
+- Add gpg signature
+
+-------------------------------------------------------------------
New:
----
xapian-bindings-1.2.19.tar.xz.asc
xapian-bindings.keyring
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xapian-bindings.spec ++++++
--- /var/tmp/diff_new_pack.yCOIvN/_old 2015-02-22 17:26:32.000000000 +0100
+++ /var/tmp/diff_new_pack.yCOIvN/_new 2015-02-22 17:26:32.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xapian-bindings
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,9 @@
License: GPL-2.0
Group: Development/Languages/Other
Url: http://www.xapian.org/
-Source: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
+Source0: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
+Source1: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz.asc
+Source2: %{name}.keyring
Patch0: replaced-swig-zend-error-noreturn-flag.patch
BuildRequires: java-devel
BuildRequires: libuuid-devel
@@ -115,8 +117,11 @@
--docdir=%{_docdir}/%{name}
make %{?_smp_mflags}
+%check
+make check %{?_smp_mflags}
+
%install
-make install DESTDIR=%{?buildroot}
+make install DESTDIR=%{?buildroot} %{?_smp_mflags}
%clean
rm -rf %{buildroot}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package google-cloud-sdk for openSUSE:Factory checked in at 2015-02-22 17:26:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-cloud-sdk (Old)
and /work/SRC/openSUSE:Factory/.google-cloud-sdk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "google-cloud-sdk"
Changes:
--------
--- /work/SRC/openSUSE:Factory/google-cloud-sdk/google-cloud-sdk.changes 2014-03-11 09:32:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.google-cloud-sdk.new/google-cloud-sdk.changes 2015-02-22 17:26:27.000000000 +0100
@@ -1,0 +2,139 @@
+Sat Jan 31 22:26:53 UTC 2015 - rjschwei(a)suse.com
+
+- Add patches:
+ + gsutil_noVersioCheckOrUpdate.patch
+ + gsutil_respectBotoCfgKeyword.patch
+ + hidePathMangeling.patch
+ Remove patches:
+ - gcloudFixPath.patch
+ - gsutilSupportBotoCfgKeyword.patch
+
+- Update to version 0.9.44 bnc#915479
+ + Fixes applied to the google/appengine-gobase image for managed VMs.
+ + Tab completion for gcloud SQL commands.
+ + Support added for authenticating service accounts with JSON keys.
+ If using JSON keys, PyOpenSSL is no longer a dependency.
+ + Suport for local ssds in instance templates for gcloud compute.
+ + Progress Bars.
+ + Compute Instances start/ stop commands.
+ + Bug Fixes.
+ + Added support for local SSD.
+ + Added support for Google Compute Engine Instance Templates in
+ compute component.
+ + Overhaul of 'gcloud sql'
+ ~ Updated the output for all commands.
+ ~ Updated usage for 'gcloud sql ssl-certs create'.
+ + Added support for creating and maintaining Cloud SQL read replica instances.
+ ~ Added --master-instance-name property that can be set during replica
+ creation to indicate the replication master for the read replica instance.
+ ~ Added --enable-database-replication, --no-enable-database-replication
+ flags that can be used to start, stop replication for the read replica
+ instance.
+ ~ Added 'promote-replica' command that promotes a read replica instance into
+ a stand-alone Cloud SQL instance.
+ + Added several new features to the compute component:
+ ~ Implemented new subcommands for interacting with HTTP load balancing:
+ - gcloud compute url-maps add-host-rule
+ - gcloud compute url-maps add-path-matcher
+ - gcloud compute url-maps remove-host-rule
+ - gcloud compute url-maps remove-path-matcher
+ - gcloud compute url-maps set-default-service
+ ~ Added support for automatically generating initial Windows username and
+ password when creating a virtual machine instance from a Windows
+ image or a disk initializaed from a Windows image.
+ ~ Added a new scope alias for Cloud SQL administration: 'sql-admin'.
+ + The compute component is now in General Availability.
+ ~ Added new 'compute/zone' and 'compute/region' properties that
+ can be used to set a default zone and region. To set the
+ properties, run 'gcloud config set compute/zone ZONE' and 'gcloud
+ config set compute/region REGION'.
+ ~ Added support for overriding disk auto-deletion during instance
+ deletion.
+ ~ Updated the output of commands that mutate resources to be more
+ human-friendly. The --format flag can be used for more verbose
+ output.
+ ~ Replaced all 'get' subcommands with 'describe' subcommands (e.g.,
+ 'gcloud compute instances get' has been replaced with 'gcloud
+ compute instances describe').
+ ~ Renamed the 'firewalls' collection to 'firewall-rules'.
+ ~ Added support to the 'addresses' collection for interacting with
+ global addresses.
+ + Updated gcutil to 1.16.3 and various AppEngine runtimes to 1.9.7 binaries.
+ + Support running several modules by gcloud app run and fixed output errors.
+ + Limit gcloud upgrade nags to once per day.
+ + Bring help files up to date (for example improved the documentation
+ for DM 'templates create' and 'deployments create').
+ + Added prompting for regions and zones to most subcommands of the
+ compute component.
+ + Added new subcommands to the compute component for adding and removing
+ backends from backend services.
+ + Added --ssh-flags to 'gcloud compute ssh' for passing additional flags
+ to ssh.
+ + Added image alias support for the --image flag in the compute component.
+ + Added --shell mode to all gcloud commands
+ ~ Type a partial command followed by '--shell' to drop into a sub shell
+ at that point in the command tree.
+ ~ Eg:
+ $ gcloud compute --shell
+ gcloud compute $ instances list
+ gcloud compute $ copy-files ...
+ + Updated gsutil to 4.3
+ + Allow installed crcmod to be used by default with gsutil by enabling
+ site packages
+
+-------------------------------------------------------------------
+Fri Jun 27 14:16:56 UTC 2014 - rschweikert(a)suse.com
+
+- Disable the Google built in "component" management and version upgrade
+ mechanism
+ + add hideImplicitVersionMgmt.patch
+
+-------------------------------------------------------------------
+Sat Jun 21 10:41:36 UTC 2014 - rschweikert(a)suse.com
+
+- Fix setup file to properly include package data embedded in
+ googlecloudsdk package, previously *.json files were missing
+
+-------------------------------------------------------------------
+Tue Jun 17 13:43:52 UTC 2014 - rschweikert(a)suse.com
+
+- Remove debug print from setup.py
+- Include templated html files as data files, these are used by the
+ auth setup workflow
+
+-------------------------------------------------------------------
+Fri Jun 6 14:34:11 UTC 2014 - rschweikert(a)suse.com
+
+- Remove unnecessary dependency on python-oauth2
+
+-------------------------------------------------------------------
+Thu Jun 5 14:11:50 UTC 2014 - rschweikert(a)suse.com
+
+- Update to version 0.9.25
+ + 'gcloud preview app deploy' and '... run' argument updates.
+ + 'gcloud config *' argument updates.
+ + Updated all AppEngine tools to 1.9.5
+ - https://code.google.com/p/googleappengine/wiki/SdkReleaseNotes
+ - https://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
+ + gcloud now has App Engine and Cloud Datastore integration.
+ - Commands can be found under `gcloud preview app` and
+ `gcloud preview datastore`
+ + New `gcloud compute` tool for working with compute engine (RC)
+ - Run `gcloud components update compute` to install
+ - Run `gcloud help compute` for more information
+ + Updated all AppEngine tools to 1.9.4
+ - https://code.google.com/p/googleappengine/wiki/SdkReleaseNotes
+ - https://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
+ + Added color to error and warning messages (on Linux and Mac)
+ - To disable, run `gcloud config set disable_color true`
+ + New 'gcloud help command'
+ - Displays man style extended help for commands (where available).
+ + New 'gcloud auth activate-service-account' command
+ - Used to authenticate with gcloud using a service account key file.
+ - See: https://developers.google.com/storage/docs/authentication#service_accounts
+- Enable "big query" install and use
+ + add patch bqHideDeps.patch
+- Fix use of gcloud command
+ + add patch gcloudFixPath.patch
+
+-------------------------------------------------------------------
Old:
----
google-cloud-sdk-0.9.18.tar.bz2
gsutilSupportBotoCfgKeyword.patch
New:
----
bqHideDeps.patch
google-cloud-sdk-0.9.44.tar.bz2
gsutil_noVersioCheckOrUpdate.patch
gsutil_respectBotoCfgKeyword.patch
hideImplicitVersionMgmt.patch
hidePathMangeling.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ google-cloud-sdk.spec ++++++
--- /var/tmp/diff_new_pack.lO4GAV/_old 2015-02-22 17:26:28.000000000 +0100
+++ /var/tmp/diff_new_pack.lO4GAV/_new 2015-02-22 17:26:28.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package gcutils
+# spec file for package google-cloud-sdk
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,41 +15,54 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: google-cloud-sdk
-Version: 0.9.18
+Version: 0.9.44
Release: 0
-License: Apache-2.0
Summary: Tools for Google Cloud Services
-URL: https://dl.google.com/dl/cloudsdk/release
+License: Apache-2.0
Group: System/Management
+# Get the filename to download from
+# https://dl.google.com/dl/cloudsdk/release/sha1.txt
+Url: https://dl.google.com/dl/cloudsdk/release
Source0: %{name}-%{version}.tar.bz2
Source1: setup.py
Patch1: gsutilHideDeps.patch
Patch2: gcutilHideDeps.patch
-Patch3: gsutilSupportBotoCfgKeyword.patch
-Patch4: gcutilNoInternalVersionCheck.patch
+Patch3: gcutilNoInternalVersionCheck.patch
+Patch4: bqHideDeps.patch
+Patch5: hideImplicitVersionMgmt.patch
+Patch6: hidePathMangeling.patch
+Patch7: gsutil_noVersioCheckOrUpdate.patch
+Patch8: gsutil_respectBotoCfgKeyword.patch
Requires: google-api-python-client => 1.2
Requires: python
+Requires: python-SocksiPy
Requires: python-argcomplete
Requires: python-argparse
-Requires: python-boto
+Requires: python-boto => 2.30.0
Requires: python-crcmod
+Requires: python-docker-py
+Requires: python-gcs-oauth2-boto-plugin
Requires: python-google-apputils
Requires: python-httplib2 => 0.8
Requires: python-ipaddr
Requires: python-iso8601
Requires: python-python-gflags
+Requires: python-python-mimeparse
+Requires: python-requests
Requires: python-retry_decorator
Requires: python-setuptools
-Requires: python-SocksiPy
+Requires: python-six
Requires: python-uritemplate
+Requires: python-websocket-client
Requires: python-yaml
Provides: gcutils > 1.13.0
Provides: gsutils > 3.42
Obsoletes: gcutils <= 1.13.0
Obsoletes: gsutils <= 3.42
BuildRequires: python-setuptools
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
@@ -62,12 +75,34 @@
manage resources on Google Cloud Platform, including App Engine, Compute
Engine, Cloud Storage, Cloud SQL, and BigQuery.
+%package doc
+Summary: Documentation for google-cloud-sdk
+Group: System/Management
+PreReq: google-cloud-sdk = %version
+
+%description doc
+This package provides html documentation for google-cloud-sdk
+
+%package gsutil-tests
+Summary: Test for gsutil
+Group: System/Management
+PreReq: google-cloud-sdk = %version
+
+%description gsutil-tests
+This package provides test cases for gsutil. The functionality for gsutil
+is not yet integrated into the gcloud master command utility.
+
%prep
%setup -q
-%patch1 -p1
+%patch1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
+%patch4
+%patch5
+%patch6
+%patch7
+%patch8
+
cp %{SOURCE1} %{_builddir}/%{name}-%{version}
%build
@@ -78,78 +113,107 @@
pushd platform/gcutil
python setup.py build
popd
+pushd platform/bq
+python setup.py build
+popd
%install
+# Leave it to Google to set silly permissions, fix it
+chmod -x help/man/man1/*
+find . -name "*.html" | xargs chmod -x
+find . -name "*.json" | xargs chmod -x
+find . -name "*_test.py" | xargs chmod +x
+find lib/protorpc -name "*.py" | xargs chmod -x
+# Remove shebang from files intended for import
+sed -i 1d lib/protorpc/*.py
+sed -i 1d lib/protorpc/webapp/*.py
+sed -i 1d lib/protorpc/wsgi/*.py
+# Install gcloud
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+install -d %{buildroot}/%{_bindir}
+install -d %{buildroot}/%{_defaultdocdir}/%{name}
+install -d %{buildroot}/%{_mandir}
+install -d %{buildroot}/%{_sysconfdir}/bash_completion.d
+cp -r help/man/man1 %{buildroot}/%{_mandir}
+cp completion.bash.inc %{buildroot}/%{_sysconfdir}/bash_completion.d/gcloud.sh
+cp -r lib/googlecloudsdk/gcloud/reference/* %{buildroot}/%{_defaultdocdir}/%{name}
+echo "#!/bin/sh" > %{buildroot}/%{_bindir}/gcloud
+echo "python %{python_sitelib}/googlecloudsdk/gcloud/gcloud.py \"\$@\"" >> %{buildroot}/%{_bindir}/gcloud
+chmod +x %{buildroot}/%{_bindir}/gcloud
+# Install gsutil
pushd platform/gsutil
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
+# install gcutil
pushd platform/gcutil
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+popd
+# Install bigquery
+pushd platform/bq
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+popd
%files
%defattr(-,root,root,-)
-%doc LICENSE README RELEASE_NOTES
-# gcloud stuff
+# man pages for gcloud
+%doc %{_mandir}/*
+## gcloud stuff
%dir %{python_sitelib}/google
+%dir %{python_sitelib}/googlecloudapis
+%dir %{python_sitelib}/googlecloudsdk
%dir %{python_sitelib}/google_cloud_sdk-%{version}-py%{py_ver}.egg-info
%{_bindir}/gcloud
%{python_sitelib}/google/*
-%{python_sitelib}/*egg-info/*
+%{python_sitelib}/googlecloudapis/*
+%{python_sitelib}/googlecloudsdk/*
+%{python_sitelib}/google_cloud_sdk-%{version}-py%{py_ver}.egg-info/*
+%config %{_sysconfdir}/bash_completion.d/gcloud.sh
# integrated gsutil
%dir %{python_sitelib}/gslib
%dir %{python_sitelib}/gslib/addlhelp
%dir %{python_sitelib}/gslib/commands
%dir %{python_sitelib}/gslib/data
-%dir %{python_sitelib}/gslib/third_party
+# tests are accessed during regular command execution, go figure
%dir %{python_sitelib}/gslib/tests
-%dir %{python_sitelib}/gsutil-3.42-py%{py_ver}.egg-info
+# Note third_party contains protorpc which appears to be another
+# implementation of the included dependency. Leave it to Google to
+# mis-manage even in house developed dependencies.
+%dir %{python_sitelib}/gslib/third_party
+%dir %{python_sitelib}/gsutil-4.7-py%{py_ver}.egg-info
%doc %{python_sitelib}/gslib/CHECKSUM
%doc %{python_sitelib}/gslib/README
%doc %{python_sitelib}/gslib/VERSION
%{python_sitelib}/gslib/addlhelp/*
%{python_sitelib}/gslib/commands/*
%{python_sitelib}/gslib/data/*
-%{python_sitelib}/gslib/third_party/*
%{python_sitelib}/gslib/tests/*
+%{python_sitelib}/gsutil-4.7-py%{py_ver}.egg-info/*
+%{python_sitelib}/gslib/third_party/*
%{python_sitelib}/gslib/*.py*
%{_bindir}/gsutil
# integrated gcutil
%dir %{python_sitelib}/gcutil_lib
-%dir %{python_sitelib}/gcutil_lib/compute
-%dir %{python_sitelib}/gcutil_lib/table
-%dir %{python_sitelib}/gcutil-1.14.0-py%{py_ver}.egg-info
-%{python_sitelib}/gcutil_lib/__*
-%{python_sitelib}/gcutil_lib/api_context_parser.*
-%{python_sitelib}/gcutil_lib/auth_helper.*
-%{python_sitelib}/gcutil_lib/*_cmds.*
-%{python_sitelib}/gcutil_lib/command_base.*
-%{python_sitelib}/gcutil_lib/compute/*
-%{python_sitelib}/gcutil_lib/flags_cache.*
-%{python_sitelib}/gcutil_lib/gce_api.*
-%{python_sitelib}/gcutil_lib/gcutil.*
-%{python_sitelib}/gcutil_lib/gcutil_*
-%{python_sitelib}/gcutil_lib/metadata.*
-%{python_sitelib}/gcutil_lib/metadata_lib.*
-%{python_sitelib}/gcutil_lib/path_initializer.*
-%{python_sitelib}/gcutil_lib/scopes.*
-%{python_sitelib}/gcutil_lib/ssh_keys.*
-%{python_sitelib}/gcutil_lib/table/*
-%{python_sitelib}/gcutil_lib/thread_pool.*
-%{python_sitelib}/gcutil_lib/utils.*
-%{python_sitelib}/gcutil_lib/version.*
-%{python_sitelib}/gcutil_lib/version_checker.*
-%{python_sitelib}/gcutil_lib/whoami.*
+%dir %{python_sitelib}/gcutil-1.16.5-py%{py_ver}.egg-info
+%{python_sitelib}/gcutil_lib/*
+%{python_sitelib}/gcutil-1.16.5-py%{py_ver}.egg-info/*
%{_bindir}/gcutil
-%{python_sitelib}/gcutil_lib/*_test.*
-%{python_sitelib}/gcutil_lib/mock_api.*
-%{python_sitelib}/gcutil_lib/mock_api_parser.*
-%{python_sitelib}/gcutil_lib/mock_api_server.*
-%{python_sitelib}/gcutil_lib/mock_api_types.*
-%{python_sitelib}/gcutil_lib/mock_lists.*
-%{python_sitelib}/gcutil_lib/mock_metadata.*
-%{python_sitelib}/gcutil_lib/mock_timer.*
-%{python_sitelib}/gcutil_lib/old_mock*
-
+# integrated bq
+%dir %{python_sitelib}/discovery
+%dir %{python_sitelib}/bigquery-2.0.18-py%{py_ver}.egg-info
+%{python_sitelib}/discovery/*
+%{python_sitelib}/bigquery_client.*
+%{python_sitelib}/bq*
+%{python_sitelib}/bigquery-2.0.18-py%{py_ver}.egg-info/*
+%{python_sitelib}/table_formatter.*
+%{_bindir}/bq
+# built in dependency on protorpc, not available as stand alone code stream
+%dir %{python_sitelib}/protorpc
+%{python_sitelib}/protorpc/*
+
+%files doc
+%defattr(-,root,root)
+%dir %{_defaultdocdir}/%{name}
+%doc LICENSE README RELEASE_NOTES
+%doc %{_defaultdocdir}/%{name}/*
%changelog
++++++ bqHideDeps.patch ++++++
--- platform/bq/setup.py.orig
+++ platform/bq/setup.py
@@ -24,13 +24,14 @@ from setuptools import setup # pylint:
# Configure the required packages and scripts to install, depending on
# Python version and OS.
-REQUIRED_PACKAGES = [
- 'google-apputils',
- 'python-gflags',
- 'google-api-python-client==1.2',
- 'oauth2client==1.2',
- 'httplib2',
- ]
+#REQUIRED_PACKAGES = [
+# 'google-apputils',
+# 'python-gflags',
+# 'google-api-python-client==1.2',
+# 'oauth2client==1.2',
+# 'httplib2',
+# ]
+REQUIRED_PACKAGES = []
CONSOLE_SCRIPTS = [
'bq = bq:run_main',
]
++++++ gcutilHideDeps.patch ++++++
--- /var/tmp/diff_new_pack.lO4GAV/_old 2015-02-22 17:26:28.000000000 +0100
+++ /var/tmp/diff_new_pack.lO4GAV/_new 2015-02-22 17:26:28.000000000 +0100
@@ -1,7 +1,7 @@
-Index: google-cloud-sdk-0.9.16/platform/gcutil/setup.py
+Index: google-cloud-sdk-0.9.41/platform/gcutil/setup.py
===================================================================
---- google-cloud-sdk-0.9.16.orig/platform/gcutil/setup.py
-+++ google-cloud-sdk-0.9.16/platform/gcutil/setup.py
+--- google-cloud-sdk-0.9.41.orig/platform/gcutil/setup.py
++++ google-cloud-sdk-0.9.41/platform/gcutil/setup.py
@@ -22,19 +22,19 @@ except ImportError:
ROOT = os.path.dirname(os.path.realpath(__file__))
++++++ gcutilNoInternalVersionCheck.patch ++++++
--- /var/tmp/diff_new_pack.lO4GAV/_old 2015-02-22 17:26:28.000000000 +0100
+++ /var/tmp/diff_new_pack.lO4GAV/_new 2015-02-22 17:26:28.000000000 +0100
@@ -1,7 +1,7 @@
-Index: google-cloud-sdk-0.9.16/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
+Index: google-cloud-sdk-0.9.41/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
===================================================================
---- google-cloud-sdk-0.9.16.orig/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
-+++ google-cloud-sdk-0.9.16/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
+--- google-cloud-sdk-0.9.41.orig/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
++++ google-cloud-sdk-0.9.41/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
@@ -45,7 +45,7 @@ CACHE_TTL_SEC = 24 * 60 * 60
FLAGS = flags.FLAGS
++++++ google-cloud-sdk-0.9.18.tar.bz2 -> google-cloud-sdk-0.9.44.tar.bz2 ++++++
++++ 418345 lines of diff (skipped)
++++++ gsutilHideDeps.patch ++++++
--- /var/tmp/diff_new_pack.lO4GAV/_old 2015-02-22 17:26:31.000000000 +0100
+++ /var/tmp/diff_new_pack.lO4GAV/_new 2015-02-22 17:26:31.000000000 +0100
@@ -1,46 +1,49 @@
-Index: google-cloud-sdk-0.9.16/platform/gsutil/setup.py
-===================================================================
---- google-cloud-sdk-0.9.16.orig/platform/gsutil/setup.py
-+++ google-cloud-sdk-0.9.16/platform/gsutil/setup.py
-@@ -32,24 +32,24 @@ management tasks, including:
+--- platform/gsutil/setup.py.orig
++++ platform/gsutil/setup.py
+@@ -34,27 +34,27 @@ management tasks, including:
* Editing object and bucket ACLs.
"""
-requires = [
-- 'boto==2.22.1',
+- 'boto==2.30.0',
+- 'crcmod>=1.7',
+- 'gcs-oauth2-boto-plugin>=1.8',
- 'httplib2>=0.8',
-- 'python-gflags>=2.0',
-- 'google-api-python-client>=1.1',
+- 'oauth2client>=1.4.1',
- 'pyOpenSSL>=0.13',
-- 'crcmod>=1.7',
+- 'python-gflags>=2.0',
+- 'retry_decorator>=1.0.0',
+- 'six>=1.8.0',
+#requires = [
-+# 'boto==2.22.1',
++# 'boto==2.30.0',
++# 'crcmod>=1.7',
++# 'gcs-oauth2-boto-plugin>=1.8',
+# 'httplib2>=0.8',
-+# 'python-gflags>=2.0',
-+# 'google-api-python-client>=1.1',
++# 'oauth2client>=1.4.1',
+# 'pyOpenSSL>=0.13',
-+# 'crcmod>=1.7',
++# 'python-gflags>=2.0',
++# 'retry_decorator>=1.0.0',
++# 'six>=1.8.0',
# Not using 1.02 because of:
# https://code.google.com/p/socksipy-branch/issues/detail?id=3
- 'SocksiPy-branch==1.01',
-- 'retry_decorator>=1.0.0',
-]
+# 'SocksiPy-branch==1.01',
-+# 'retry_decorator>=1.0.0',
+#]
-dependency_links = [
+#dependency_links = [
# Note: this commit ID should be kept in sync with the 'third_party/boto'
# entry in 'git submodule status'.
-- 'https://github.com/boto/boto/archive/7cb344c382c3acb95038cf54bf8a84d5242318…',
+ # pylint: disable=line-too-long
+- 'https://github.com/boto/boto/archive/34e0dcfaa778ee469ca08ae487a0bd4021a8e0…',
-]
-+# 'https://github.com/boto/boto/archive/7cb344c382c3acb95038cf54bf8a84d5242318…',
++# 'https://github.com/boto/boto/archive/34e0dcfaa778ee469ca08ae487a0bd4021a8e0…',
+#]
CURDIR = os.path.abspath(os.path.dirname(__file__))
BOTO_DIR = os.path.join(CURDIR, 'third_party', 'boto')
-@@ -154,8 +154,8 @@ setup(
+@@ -161,8 +161,8 @@ setup(
'gsutil = gslib.__main__:main',
],
},
++++++ gsutil_noVersioCheckOrUpdate.patch ++++++
--- platform/gsutil/gslib/command_runner.py.orig
+++ platform/gsutil/gslib/command_runner.py
@@ -299,6 +299,7 @@ class CommandRunner(object):
# gsutil tarball).
# - user is using a Cloud SDK install (which should only be updated via
# gcloud components update)
+ return False # Check and update disabled for distribution provided code
logger = logging.getLogger()
gs_host = boto.config.get('Credentials', 'gs_host', None)
if (not IsRunningInteractively()
++++++ gsutil_respectBotoCfgKeyword.patch ++++++
--- platform/gsutil/gslib/util.py.orig
+++ platform/gsutil/gslib/util.py
@@ -378,6 +378,9 @@ def GetCertsFile():
f.close()
disk_certs_file = fname
certs_file = disk_certs_file
+ elif certs_file == 'system':
+ certs_file = None
+
return certs_file
++++++ hideImplicitVersionMgmt.patch ++++++
--- lib/googlecloudsdk/gcloud/gcloud.py.orig
+++ lib/googlecloudsdk/gcloud/gcloud.py
@@ -103,8 +103,8 @@ def CreateCLI():
pkg_root = cli.GoogleCloudSDKPackageRoot()
loader.AddModule('auth', os.path.join(pkg_root, 'gcloud', 'sdktools', 'auth'))
loader.AddModule('bigquery', os.path.join(pkg_root, 'bigquery', 'commands'))
- loader.AddModule('components',
- os.path.join(pkg_root, 'gcloud', 'sdktools', 'components'))
+# loader.AddModule('components',
+# os.path.join(pkg_root, 'gcloud', 'sdktools', 'components'))
loader.AddModule('compute', os.path.join(pkg_root, 'compute', 'subcommands'))
loader.AddModule('config',
os.path.join(pkg_root, 'gcloud', 'sdktools', 'config'))
++++++ hidePathMangeling.patch ++++++
--- lib/googlecloudsdk/gcloud/gcloud.py.orig
+++ lib/googlecloudsdk/gcloud/gcloud.py
@@ -77,7 +77,7 @@ def _DoStartupChecks():
if not platforms.Platform.Current().IsSupported():
sys.exit(1)
-_SetPriorityCloudSDKPath()
+#_SetPriorityCloudSDKPath()
_DoStartupChecks()
++++++ setup.py ++++++
--- /var/tmp/diff_new_pack.lO4GAV/_old 2015-02-22 17:26:31.000000000 +0100
+++ /var/tmp/diff_new_pack.lO4GAV/_new 2015-02-22 17:26:31.000000000 +0100
@@ -16,13 +16,18 @@
if __name__ == '__main__':
os.system('rm -rf lib/google/apputils')
+ os.system('touch lib/googlecloudsdk/gcloud/sdktools/__init__.py')
allPckgs = glob.glob('lib/*')
excludePckgs = []
for name in allPckgs:
- if name.find('google') != -1:
+ if name.find('google') != -1 or name.find('protorpc') != -1:
continue
- excludePckgs.append(name.split(os.sep)[-1])
+ # Creating an exclude list is unreliable, some packages still
+ # get pushed into site-packages. Remove the code instead
+ os.system('rm -rf %s' %name)
+ # excludePckgs.append(name.split(os.sep)[-1])
+ pkg = setuptools.find_packages('lib',exclude=excludePckgs)
setuptools.setup(
name='google-cloud-sdk',
description=(
@@ -31,10 +36,13 @@
license='Apache 2',
author='Google',
author_email='google-cloud-sdk(a)googlegroups.com',
- version='0.9.18',
+ version='0.9.44',
packages=setuptools.find_packages('lib',exclude=excludePckgs),
+ package_data={
+ 'googlecloudsdk' : [os.path.join('core', '*.json'),
+ os.path.join('core', 'credentials', '*.html')],
+ },
package_dir={
'': 'lib',
},
- scripts = ['bin/gcloud']
)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package coccinelle for openSUSE:Factory checked in at 2015-02-22 17:26:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/coccinelle (Old)
and /work/SRC/openSUSE:Factory/.coccinelle.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "coccinelle"
Changes:
--------
--- /work/SRC/openSUSE:Factory/coccinelle/coccinelle.changes 2014-11-28 08:44:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.coccinelle.new/coccinelle.changes 2015-02-22 17:26:25.000000000 +0100
@@ -1,0 +2,16 @@
+Fri Feb 20 00:00:00 CET 2015 - dsterba(a)suse.cz
+
+- Update to new upstream release 1.0.0~rc24
+ * global expression x
+ * Varargs support
+ * Inline in function prototypes
+ * #ifdef on kernel version
+ * Parallelism in Coccinelle
+ * --jobs <int>: Run the specified number of jobs in parallel.
+ * --chunksize <int>. The specified number of files are dispatched as a
+ single unit of parallelism.
+- Update to new upstream release 1.0.0~rc23
+ * Ability to add, but not match or remove, attributes.
+ * Some parsing and pretty printing improvements.
+
+-------------------------------------------------------------------
Old:
----
coccinelle-1.0.0-rc22.tgz
New:
----
coccinelle-1.0.0-rc24.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ coccinelle.spec ++++++
--- /var/tmp/diff_new_pack.KN64Kn/_old 2015-02-22 17:26:26.000000000 +0100
+++ /var/tmp/diff_new_pack.KN64Kn/_new 2015-02-22 17:26:26.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package coccinelle
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: coccinelle
-Version: 1.0.0~rc22
+Version: 1.0.0~rc24
Release: 0
Summary: Semantic patch utility
License: GPL-2.0
Group: Productivity/Text/Utilities
Url: http://coccinelle.lip6.fr/
-%define rversion 1.0.0-rc22
+%define rversion 1.0.0-rc24
#Git-Clone: git://github.com/coccinelle/coccinelle
Source: http://coccinelle.lip6.fr/distrib/%name-%rversion.tgz
++++++ coccinelle-1.0.0-rc22.tgz -> coccinelle-1.0.0-rc24.tgz ++++++
++++ 43225 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package libhugetlbfs for openSUSE:Factory checked in at 2015-02-22 17:26:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libhugetlbfs (Old)
and /work/SRC/openSUSE:Factory/.libhugetlbfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libhugetlbfs"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libhugetlbfs/libhugetlbfs.changes 2014-04-09 18:47:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libhugetlbfs.new/libhugetlbfs.changes 2015-02-22 17:26:22.000000000 +0100
@@ -1,0 +2,13 @@
+Fri Feb 20 12:11:44 UTC 2015 - normand(a)linux.vnet.ibm.com
+
+- update to 2.18
+ to solve build failures for ppc/ppc64.
+ remove following patches now included in 2.18:
+ libhugetlbfs-ppc64le.patch
+ libhugetlbfs.ppc64le.step2.patch
+ libhugetlbfs.ppc64le.step3.patch
+ libhugetlbfs.ppc64le.step4.patch
+- Add fix_plt_extrasz_always_returning_0_on_ppc64le.patch
+ already upstream.
+
+-------------------------------------------------------------------
Old:
----
libhugetlbfs-2.17.tar.gz
libhugetlbfs-ppc64le.patch
libhugetlbfs.ppc64le.step2.patch
libhugetlbfs.ppc64le.step3.patch
libhugetlbfs.ppc64le.step4.patch
New:
----
fix_plt_extrasz_always_returning_0_on_ppc64le.patch
libhugetlbfs-2.18.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libhugetlbfs.spec ++++++
--- /var/tmp/diff_new_pack.n14yqY/_old 2015-02-22 17:26:23.000000000 +0100
+++ /var/tmp/diff_new_pack.n14yqY/_new 2015-02-22 17:26:23.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package libhugetlbfs
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,7 @@
Obsoletes: libhugetlbfs-64bit
%endif
#
-Version: 2.17
+Version: 2.18
Release: 0
Url: http://libhugetlbfs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -42,12 +42,9 @@
Patch4: libhugetlbfs.tests-malloc.patch
Patch7: libhugetlbfs_ia64_fix_missing_test.patch
Patch8: libhugetlbfs_fix_tests.patch
-Patch9: libhugetlbfs-ppc64le.patch
-Patch10: libhugetlbfs.ppc64le.step2.patch
-Patch11: libhugetlbfs.ppc64le.step3.patch
-Patch12: libhugetlbfs.ppc64le.step4.patch
Patch13: ignore-perl-modules.diff
Patch14: disable-rw-on-non-ldscripts.diff
+Patch15: fix_plt_extrasz_always_returning_0_on_ppc64le.patch
%description
The libhugetlbfs package interacts with the Linux hugetlbfs to
@@ -67,12 +64,9 @@
%patch4 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
%patch13
%patch14
+%patch15 -p1
%build
make %{my_make_flags}
++++++ fix_plt_extrasz_always_returning_0_on_ppc64le.patch ++++++
Subject: fix plt_extrasz() always returning 0 on ppc64le
From: Signed-off-by: Jan Stancek <jstancek(a)redhat.com>
libhugetlbfs.so is not linked with elf64lppc.o on ppc64le,
which makes plt_extrasz() always return 0.
This is causing failures (SIGSEGV) in these tests:
HUGETLB_ELFMAP=W linkhuge_rw (16M: 64):
HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64):
HUGETLB_SHARE=0 HUGETLB_ELFMAP=W linkhuge_rw (16M: 64):
HUGETLB_SHARE=1 HUGETLB_ELFMAP=W linkhuge_rw (16M: 64):
HUGETLB_SHARE=0 HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64):
HUGETLB_SHARE=1 HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64):
as they miss some already initialized data when performing
"minimal copy" in get_extracopy().
This patch links also elf64lppc.o, which defines powerpc
specific version of plt_extrasz().
Signed-off-by: Jan Stancek <jstancek(a)redhat.com>
---
Makefile | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index b24bd0f..8cf469f 100644
--- a/Makefile
+++ b/Makefile
@@ -142,6 +142,9 @@ endif
ifeq ($(ELF64),elf64ppc)
LIBOBJS64 += obj64/$(ELF64).o
endif
+ifeq ($(ELF64),elf64lppc)
+LIBOBJS64 += obj64/$(ELF64).o
+endif
LIBOBJS32 += $(LIBOBJS:%=obj32/%)
LIBOBJS64 += $(LIBOBJS:%=obj64/%)
-- 1.7.1
++++++ libhugetlbfs-2.17.tar.gz -> libhugetlbfs-2.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/Makefile new/libhugetlbfs-2.18/Makefile
--- old/libhugetlbfs-2.17/Makefile 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/Makefile 2014-04-06 18:11:46.000000000 +0200
@@ -30,14 +30,14 @@
LDFLAGS += -Wl,-z,noexecstack -ldl
CFLAGS ?= -O2 -g
CFLAGS += -Wall -fPIC
-CPPFLAGS += -D__LIBHUGETLBFS__ -DPPC_NO_SEGMENTS
+CPPFLAGS += -D__LIBHUGETLBFS__
ARCH = $(shell uname -m | sed -e s/i.86/i386/)
CC = gcc
CUSTOM_LDSCRIPTS = yes
-ifeq ($(ARCH),powerpc64)
+ifeq ($(ARCH),ppc64)
CC64 = $(CC) -m64
ELF64 = elf64ppc
TMPLIB64 = lib64
@@ -47,10 +47,17 @@
ELF32 = elf32ppclinux
endif
else
-ifeq ($(ARCH),powerpc)
+ifeq ($(ARCH),ppc64le)
+CC64 = $(CC) -m64
+ELF64 = elf64lppc
+TMPLIB64 = lib64
+CUSTOM_LDSCRIPTS = no
+else
+ifeq ($(ARCH),ppc)
CC32 = $(CC) -m32
ELF32 = elf32ppclinux
TMPLIB32 = lib
+CPPFLAGS += -DPPC_NO_SEGMENTS
else
ifeq ($(ARCH),armv7l)
CC32 = $(CC)
@@ -58,7 +65,7 @@
ELF32 += armelf_linux_eabi
CUSTOM_LDSCRIPTS = no
else
-ifeq ($(ARCH),aarch64)
+ifneq (,$(findstring aarch64,$(ARCH)))
CC64 = gcc
ELF64 = aarch64elf
TMPLIB64 = lib64
@@ -102,6 +109,7 @@
endif
endif
endif
+endif
endif
endif
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/NEWS new/libhugetlbfs-2.18/NEWS
--- old/libhugetlbfs-2.17/NEWS 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/NEWS 2014-04-06 18:11:46.000000000 +0200
@@ -1,3 +1,17 @@
+libhugetlbfs 2.18 "Infinite Corridor"
+======================================================================
+New Features
+* Add support for ppc64le
+* ARM 64 big endian support
+
+Bug Fixes
+* Reverted 3bdd9924 which broke building on PPC64
+* Fix parsing of kernel version string
+* ARM: mark direct_syscall as a FUNC
+
+Test Suite
+* mmap of huge page files with misaligned offset success treated as PASS
+
libhugetlbfs 2.17 "Fowl and Fetus"
======================================================================
New Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/contrib/tlbmiss_cost.sh new/libhugetlbfs-2.18/contrib/tlbmiss_cost.sh
--- old/libhugetlbfs-2.17/contrib/tlbmiss_cost.sh 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/contrib/tlbmiss_cost.sh 2014-04-06 18:11:46.000000000 +0200
@@ -44,7 +44,7 @@
FNAME="cpu MHz"
FINDEX=4
case "`uname -m`" in
- ppc64)
+ ppc64|ppc64le)
FNAME="clock"
FINDEX=3
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/elf64lppc.c new/libhugetlbfs-2.18/elf64lppc.c
--- old/libhugetlbfs-2.17/elf64lppc.c 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-2.18/elf64lppc.c 2015-02-22 17:26:24.000000000 +0100
@@ -0,0 +1 @@
+symbolic link to elf64ppc.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/kernel-features.c new/libhugetlbfs-2.18/kernel-features.c
--- old/libhugetlbfs-2.17/kernel-features.c 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/kernel-features.c 2014-04-06 18:11:46.000000000 +0200
@@ -125,14 +125,18 @@
*(start + 1) == 'r' &&
*(start + 2) == 'e')
start += 3;
+ else {
+ /*
+ * For now we ignore any extraversions besides
+ * pre and rc versions and treat them as equal
+ * to the base version.
+ */
+ return 0;
+ }
ver->pre = strtol(start, &end, 10);
}
- /*
- * For now we ignore any extraversions besides pre and post versions
- * and treat them as equal to the base version.
- */
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/ld.hugetlbfs new/libhugetlbfs-2.18/ld.hugetlbfs
--- old/libhugetlbfs-2.17/ld.hugetlbfs 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/ld.hugetlbfs 2014-04-06 18:11:46.000000000 +0200
@@ -84,6 +84,7 @@
MB=$((1024*1024))
case "$EMU" in
elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
+elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/sys-armelf_linux_eabi.S new/libhugetlbfs-2.18/sys-armelf_linux_eabi.S
--- old/libhugetlbfs-2.17/sys-armelf_linux_eabi.S 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/sys-armelf_linux_eabi.S 2014-04-06 18:11:46.000000000 +0200
@@ -19,6 +19,7 @@
.text
.globl direct_syscall
+ .type direct_syscall,%function
direct_syscall:
mov ip, sp
stmfd sp!, {r4, r5, r6, r7}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/sys-elf64lppc.S new/libhugetlbfs-2.18/sys-elf64lppc.S
--- old/libhugetlbfs-2.17/sys-elf64lppc.S 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-2.18/sys-elf64lppc.S 2015-02-22 17:26:24.000000000 +0100
@@ -0,0 +1 @@
+symbolic link to sys-elf64ppc.S
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/sys-elf64ppc.S new/libhugetlbfs-2.18/sys-elf64ppc.S
--- old/libhugetlbfs-2.17/sys-elf64ppc.S 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/sys-elf64ppc.S 2014-04-06 18:11:46.000000000 +0200
@@ -20,7 +20,7 @@
*/
.text
-
+#if _CALL_ELF != 2
.align 2
.globl direct_syscall
.globl .direct_syscall
@@ -32,6 +32,11 @@
.previous
.type .direct_syscall,@function
.direct_syscall:
+#else
+ .globl direct_syscall
+ .type direct_syscall,@function
+direct_syscall:
+#endif
mr 0,3
mr 3,4
mr 4,5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/tests/misalign.c new/libhugetlbfs-2.18/tests/misalign.c
--- old/libhugetlbfs-2.17/tests/misalign.c 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/tests/misalign.c 2014-04-06 18:11:46.000000000 +0200
@@ -23,6 +23,7 @@
#include <errno.h>
#include <signal.h>
#include <sys/mman.h>
+#include <sys/utsname.h>
#include <hugetlbfs.h>
@@ -40,6 +41,11 @@
* necessary checks for the hugepage paths. This testcase ensures
* that attempted hugepage mappings with parameters which are not
* correctly hugepage aligned are rejected.
+ *
+ * However starting with 3.10-rc1, length passed in mmap() doesn't need
+ * to be aligned because commit af73e4d9506d3b797509f3c030e7dcd554f7d9c4
+ * added ALIGN() to kernel side, in mmap_pgoff(), when mapping huge page
+ * files.
*/
int main(int argc, char *argv[])
{
@@ -47,9 +53,13 @@
int fd;
void *p, *q;
int err;
+ struct utsname buf;
test_init(argc, argv);
+ if (uname(&buf) != 0)
+ FAIL("uname failed %s", strerror(errno));
+
page_size = getpagesize();
hpage_size = check_hugepagesize();
@@ -92,16 +102,30 @@
/* 3) Try a misaligned length */
q = mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
- if (q != MAP_FAILED)
- FAIL("mmap() with misaligned length 0x%lx succeeded",
- page_size);
+
+ if (test_compare_kver(buf.release, "3.10.0") < 0) {
+ if (q != MAP_FAILED)
+ FAIL("mmap() with misaligned length 0x%lx succeeded",
+ page_size);
+ } else {
+ if (q == MAP_FAILED)
+ FAIL("mmap() with misaligned length 0x%lx failed",
+ page_size);
+ }
/* 4) Try a misaligned length with MAP_FIXED */
q = mmap(p, page_size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, fd, 0);
- if (q != MAP_FAILED)
- FAIL("mmap() MAP_FIXED with misaligned length 0x%lx succeeded",
- page_size);
+
+ if (test_compare_kver(buf.release, "3.10.0") < 0) {
+ if (q != MAP_FAILED)
+ FAIL("mmap() MAP_FIXED with misaligned length 0x%lx "
+ "succeeded", page_size);
+ } else {
+ if (q == MAP_FAILED)
+ FAIL("mmap() MAP_FIXED with misaligned length 0x%lx "
+ "failed", page_size);
+ }
/* 5) Try a misaligned offset */
q = mmap(NULL, hpage_size, PROT_READ|PROT_WRITE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/tests/mremap-expand-slice-collision.c new/libhugetlbfs-2.18/tests/mremap-expand-slice-collision.c
--- old/libhugetlbfs-2.17/tests/mremap-expand-slice-collision.c 2013-10-22 03:07:56.000000000 +0200
+++ new/libhugetlbfs-2.18/tests/mremap-expand-slice-collision.c 2014-04-06 18:11:46.000000000 +0200
@@ -36,8 +36,8 @@
void init_slice_boundary(int fd)
{
unsigned long slice_size;
- void *p1, *p2, *heap;
- int slices_ok, i, rc;
+ void *p, *heap;
+ int i, rc;
#if defined(__LP64__) && !defined(__aarch64__)
/* powerpc: 1TB slices starting at 1 TB */
slice_boundary = 0x10000000000;
@@ -52,37 +52,25 @@
heap = malloc(1);
free(heap);
- /* find 2 neighbour slices, which are both free,
+ /* Find 2 neighbour slices with couple huge pages free
+ * around slice boundary.
* 16 is the maximum number of slices (low/high) */
for (i = 0; i < 16-1; i++) {
- slices_ok = 0;
- p1 = mmap((void *)slice_boundary, hpage_size,
- PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0);
- p2 = mmap((void *)(slice_boundary+slice_size), hpage_size,
+ slice_boundary += slice_size;
+ p = mmap((void *)(slice_boundary-2*hpage_size), 4*hpage_size,
PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0);
-
- if (p1 != MAP_FAILED) {
- slices_ok++;
- rc = munmap(p1, hpage_size);
+ if (p == MAP_FAILED) {
+ verbose_printf("can't use slice_boundary: 0x%lx\n",
+ slice_boundary);
+ } else {
+ rc = munmap(p, 4*hpage_size);
if (rc != 0)
FAIL("munmap(p1): %s", strerror(errno));
- }
- if (p2 != MAP_FAILED) {
- slices_ok++;
- rc = munmap(p2, hpage_size);
- if (rc != 0)
- FAIL("munmap(p2): %s", strerror(errno));
- }
-
- slice_boundary += slice_size;
- if (slices_ok == 2)
break;
- else
- verbose_printf("can't use slice_boundary: 0x%lx\n",
- slice_boundary);
+ }
}
- if (slices_ok != 2)
+ if (p == MAP_FAILED)
FAIL("couldn't find 2 free neighbour slices");
verbose_printf("using slice_boundary: 0x%lx\n", slice_boundary);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libhugetlbfs-2.17/version new/libhugetlbfs-2.18/version
--- old/libhugetlbfs-2.17/version 2013-10-22 03:08:56.000000000 +0200
+++ new/libhugetlbfs-2.18/version 2014-04-06 18:15:13.000000000 +0200
@@ -1 +1 @@
-2.17
+2.18
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0