openSUSE Commits
Threads by month
- ----- 2024 -----
- 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
August 2018
- 1 participants
- 1600 discussions
Hello community,
here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack for openSUSE:Factory checked in at 2018-08-31 10:42:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack (Old)
and /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious-Plugin-AssetPack"
Fri Aug 31 10:42:50 2018 rev:40 rq:631318 version:2.05
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack/perl-Mojolicious-Plugin-AssetPack.changes 2018-07-22 23:05:37.000899877 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes 2018-08-31 10:43:53.959163490 +0200
@@ -1,0 +2,13 @@
+Thu Aug 2 05:38:47 UTC 2018 - coolo(a)suse.com
+
+- updated to 2.05
+ see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+ 2.05 2018-08-01T14:19:35+0800
+ - Fix s///r is not supported in older Perls #136
+ - Fix Favicon rendering of manifest and browserconfig
+ - Add Asset::renderer() for dynamic assets
+ - Add fallback for serving assets with wrong checksum
+ - Renamed Asset::renderer() to tag_for()
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-Plugin-AssetPack-2.04.tar.gz
New:
----
Mojolicious-Plugin-AssetPack-2.05.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.CkYQNZ/_old 2018-08-31 10:43:54.495164128 +0200
+++ /var/tmp/diff_new_pack.CkYQNZ/_new 2018-08-31 10:43:54.495164128 +0200
@@ -17,7 +17,7 @@
Name: perl-Mojolicious-Plugin-AssetPack
-Version: 2.04
+Version: 2.05
Release: 0
%define cpan_name Mojolicious-Plugin-AssetPack
Summary: Compress and convert css, less, sass, javascript and coffeescript files
++++++ Mojolicious-Plugin-AssetPack-2.04.tar.gz -> Mojolicious-Plugin-AssetPack-2.05.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/.travis.yml new/Mojolicious-Plugin-AssetPack-2.05/.travis.yml
--- old/Mojolicious-Plugin-AssetPack-2.04/.travis.yml 2017-01-10 23:20:45.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-2.05/.travis.yml 2018-08-01 05:18:20.000000000 +0200
@@ -1,8 +1,9 @@
sudo: false
language: perl
perl:
- - "5.20"
+ - "5.26"
- "5.16"
+ - "5.10"
addons:
apt:
packages:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/Changes new/Mojolicious-Plugin-AssetPack-2.05/Changes
--- old/Mojolicious-Plugin-AssetPack-2.04/Changes 2018-07-19 11:39:06.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/Changes 2018-08-01 08:19:35.000000000 +0200
@@ -1,5 +1,12 @@
Revision history for perl distribution Mojolicious-Plugin-AssetPack
+2.05 2018-08-01T14:19:35+0800
+ - Fix s///r is not supported in older Perls #136
+ - Fix Favicon rendering of manifest and browserconfig
+ - Add Asset::renderer() for dynamic assets
+ - Add fallback for serving assets with wrong checksum
+ - Renamed Asset::renderer() to tag_for()
+
2.04 2018-07-19T17:39:06+0800
- Add support for generating manifest with Favicon pipe
- Marked AssetPack::tag_for() as deprecated
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/MANIFEST new/Mojolicious-Plugin-AssetPack-2.05/MANIFEST
--- old/Mojolicious-Plugin-AssetPack-2.04/MANIFEST 2018-07-19 11:39:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/MANIFEST 2018-08-01 08:19:36.000000000 +0200
@@ -4,6 +4,7 @@
.vscode/tasks.json
Changes
cpanfile
+examples/not-found.pl
examples/rollup.pl
examples/sprites.pl
lib/Mojolicious/Plugin/AssetPack.pm
@@ -44,6 +45,7 @@
t/assets/image/photo-1429734160945-4f85244d6a5a.jpg
t/assets/image/sample.png
t/assets/js/export.js
+t/assets/js/not-found.js
t/assets/js/some-lib.js
t/assets/js/vue-app.js
t/assets/other/dummy.gif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/META.json new/Mojolicious-Plugin-AssetPack-2.05/META.json
--- old/Mojolicious-Plugin-AssetPack-2.04/META.json 2018-07-19 11:39:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/META.json 2018-08-01 08:19:36.000000000 +0200
@@ -53,6 +53,6 @@
"web" : "https://github.com/jhthorsen/mojolicious-plugin-assetpack"
}
},
- "version" : "2.04",
+ "version" : "2.05",
"x_serialization_backend" : "JSON::PP version 2.97001"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/META.yml new/Mojolicious-Plugin-AssetPack-2.05/META.yml
--- old/Mojolicious-Plugin-AssetPack-2.04/META.yml 2018-07-19 11:39:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/META.yml 2018-08-01 08:19:36.000000000 +0200
@@ -25,5 +25,5 @@
bugtracker: https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues
homepage: https://github.com/jhthorsen/mojolicious-plugin-assetpack
repository: https://github.com/jhthorsen/mojolicious-plugin-assetpack.git
-version: '2.04'
+version: '2.05'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/examples/not-found.pl new/Mojolicious-Plugin-AssetPack-2.05/examples/not-found.pl
--- old/Mojolicious-Plugin-AssetPack-2.04/examples/not-found.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-2.05/examples/not-found.pl 2018-08-01 07:31:57.000000000 +0200
@@ -0,0 +1,28 @@
+#!/usr/bin/env perl
+die "Run $0 from ./mojolicious-plugin-assetpack/ root" unless -d 't/assets';
+use lib 'lib';
+use Mojolicious::Lite;
+
+plugin 'AssetPack' => {pipes => [qw(Css JavaScript)]};
+app->asset->store->paths(['t/assets']);
+
+app->asset->process('app.css' => 'css/c.css');
+app->asset->process('app.js' => 'js/not-found.js');
+
+# Set up the mojo lite application and start it
+get '/' => 'index';
+app->start;
+
+__DATA__
+@@ index.html.ep
+<html>
+<head>
+ <title>Test!</title>
+ <link rel="stylesheet" href="/asset/fallback/app.css">
+</head>
+<body>
+ <h1>Check the console for debug messages</h1>
+ <p>And the background should be gray.</p>
+ <script src="/asset/fallback/app.js"></script>
+</body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Asset.pm new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Asset.pm
--- old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Asset.pm 2018-07-19 11:08:22.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Asset.pm 2018-08-01 07:00:22.000000000 +0200
@@ -25,7 +25,8 @@
};
has minified => sub { shift->url =~ /\bmin\b/ ? 1 : 0 };
-has renderer => sub { \&_default_renderer };
+has renderer => undef;
+has tag_for => sub { \&_default_tag_for };
has _asset => sub {
my $self = shift;
@@ -90,7 +91,7 @@
sub url_for { $_[1]->url_for(assetpack => $_[0]->TO_JSON); }
-sub _default_renderer {
+sub _default_tag_for {
my ($asset, $c, $args, @attrs) = @_;
my $url = $asset->url_for($c);
my @template = @{$TAG_TEMPLATE{$asset->format} || $TAG_TEMPLATE{css}};
@@ -159,10 +160,18 @@
=head2 renderer
$code = $self->renderer;
- $self = $self->renderer(sub { my ($c, \%args, @attrs) = @_; return qq(<link rel="...">) });
+ $self = $self->renderer(sub { my ($self, $c) = @_; $c->render(data => "...""); })
-Used to register a custom renderer for this asset. The arguments passed in
-are:
+Can be used to register a custom render method for this asset. This is called
+by L<Mojolicious::Plugin::AssetPack::Store/serve_asset>.
+
+=head2 tag_for
+
+ $code = $self->tag_for;
+ $self = $self->tag_for(sub { my ($c, \%args, @attrs) = @_; return qq(<link rel="...">) });
+
+Used to register a custom tag renderer for this asset. The arguments passed
+in are:
=over 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm
--- old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm 2018-07-19 11:34:22.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Pipe/Favicon.pm 2018-08-01 06:42:23.000000000 +0200
@@ -37,20 +37,29 @@
$store->save(\$db, $attrs);
}
+ my $renderer = sub {
+ my ($asset, $c, $args, @attrs) = @_;
+ my $content = $asset->content;
+ $content
+ =~ s!"/([^.]+\.\w{3,})"!sprintf '"%s"', $sub_assets{$1} ? $sub_assets{$1}->url_for($c) : $1!ge;
+ return $content if $args;
+ return $c->render(data => $content);
+ };
+
for my $url (@$urls) {
my $asset = $store->asset($url)
or die "AssetPack was unable to fetch icons/assets asset $url";
$sub_assets{join '.', $asset->name, $asset->format} = $asset;
+ $asset->renderer($renderer) if $asset->format =~ m!(manifest|xml|webapp)$!;
$self->assetpack->{by_checksum}{$asset->checksum} = $asset;
}
- $asset->renderer(
- sub {
- my ($asset, $c, $args, @attrs) = @_;
- $markup
- =~ s!href="(/?)([^"]+)"!sprintf 'href="%s"', $sub_assets{$2} ? $sub_assets{$2}->url_for($c) : "$1$2"!ger;
- }
- );
+ unless ($markup =~ m!msapplication-config!) {
+ $markup =~ s![\r\n]+$!!;
+ $markup .= qq(\n<meta name="msapplication-config" content="/browserconfig.xml">);
+ }
+
+ $asset->content($markup)->tag_for($renderer);
}
sub _build_design {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Store.pm new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Store.pm
--- old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack/Store.pm 2018-01-29 22:43:27.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack/Store.pm 2018-08-01 07:51:24.000000000 +0200
@@ -2,6 +2,8 @@
use Mojo::Base 'Mojolicious::Static';
use Mojo::File 'path';
+use Mojo::Loader 'data_section';
+use Mojo::Template;
use Mojo::URL;
use Mojolicious::Types;
use Mojolicious::Plugin::AssetPack::Asset;
@@ -12,9 +14,19 @@
# MOJO_ASSETPACK_DB_FILE is used in tests
use constant DB_FILE => $ENV{MOJO_ASSETPACK_DB_FILE} || 'assetpack.db';
our %DB_KEYS = map { $_ => 1 } qw(checksum format minified rel);
+our %FALLBACK_TEMPLATES = %{data_section(__PACKAGE__)};
-has asset_class => 'Mojolicious::Plugin::AssetPack::Asset';
-has default_headers => sub { +{"Cache-Control" => "max-age=31536000"} };
+for my $name (keys %FALLBACK_TEMPLATES) {
+ my $text = delete $FALLBACK_TEMPLATES{$name};
+ $name =~ m!(\w+)\.ep$!;
+ $FALLBACK_TEMPLATES{$1}
+ = Mojo::Template->new->parse($text)->prepend('my ($c, $assets) = @_;');
+}
+
+has asset_class => 'Mojolicious::Plugin::AssetPack::Asset';
+has default_headers => sub { +{"Cache-Control" => "max-age=31536000"} };
+has fallback_headers => sub { +{"Cache-Control" => "max-age=60"} };
+has fallback_templates => sub { +{%FALLBACK_TEMPLATES} };
has _types => sub {
my $t = Mojolicious::Types->new;
@@ -133,14 +145,44 @@
sub serve_asset {
my ($self, $c, $asset) = @_;
- my $d = $self->default_headers;
+ my $dh = $self->default_headers;
my $h = $c->res->headers;
- my $ct = $self->_types->type($asset->format) || 'application/octet-stream';
- $h->header($_ => $d->{$_}) for keys %$d;
- $h->content_type($ct);
- $self->SUPER::serve_asset($c, $asset->can('asset') ? $asset->asset : $asset);
- $self;
+ $h->header($_ => $dh->{$_}) for keys %$dh;
+ $h->content_type($self->_types->type($asset->format) || 'application/octet-stream');
+
+ if (my $renderer = $asset->renderer) {
+ $renderer->($asset, $c);
+ }
+ else {
+ $self->SUPER::serve_asset($c, $asset->can('asset') ? $asset->asset : $asset);
+ }
+
+ return $self;
+}
+
+sub serve_fallback_for_assets {
+ my ($self, $c, $topic, $assets) = @_;
+ my $fh = $self->fallback_headers;
+ my $format = $topic =~ m!\.(\w+)$! ? $1 : 'css';
+ my $h = $c->res->headers;
+
+ $h->header($_ => $fh->{$_}) for keys %$fh;
+ $h->content_type($self->_types->type($format) || 'application/octet-stream');
+
+ if (my $template = $self->fallback_templates->{$format}) {
+ $c->render(data => $template->process($c, $assets));
+ }
+ elsif (@$assets == 1) {
+ my $url = $assets->[0]->url_for($c);
+ $url->path->[-1] = $topic;
+ $c->redirect_to($url);
+ }
+ else {
+ $c->render(text => "// Invalid checksum for topic '$topic'\n", status => 404);
+ }
+
+ return $self;
}
sub _already_downloaded {
@@ -323,7 +365,25 @@
$hash_ref = $self->default_headers;
$self = $self->default_headers({"Cache-Control" => "max-age=31536000"});
-Used to set default headers used by L</serve_asset>.
+Used to set headers used by L</serve_asset>.
+
+=head2 fallback_headers
+
+ $hash_ref = $self->fallback_headers;
+ $self = $self->fallback_headers({"Cache-Control" => "max-age=300"});
+
+Used to set headers used by L</serve_fallback_for_assets>.
+
+This is currently an EXPERIMENTAL feature.
+
+=head2 fallback_templates
+
+ $hash_ref = $self->fallback_templates;
+ $self = $self->fallback_templates->{"css"} = Mojo::Template->new;
+
+Used to set up templates used by L</serve_fallback_for_assets>.
+
+This is currently an EXPERIMENTAL feature.
=head2 paths
@@ -412,11 +472,46 @@
=head2 serve_asset
+ $self = $self->serve_asset($c, $asset);
+
Override L<Mojolicious::Static/serve_asset> with the functionality to set
response headers first, from L</default_headers>.
+Will call L<Mojolicious::Plugin::AssetPack::Asset/render> if available, after
+setting Content-Type header and other L</default_headers>.
+
+=head2 serve_fallback_for_assets
+
+ $self = $self->serve_fallback_for_assets($c, $topic, $assets);
+
+Used to serve a fallback response for given C<$topic> and a
+L<Mojo::Collection> of C<Mojolicious::Plugin::AssetPack::Asset> objects.
+
+Will set the headers in L</fallback_headers> and then either render either a
+template matching the extension from C<$topic> from L</fallback_templates>, a
+302 redirect to the actual asset, or a 404 Not Found.
+
+This is currently an EXPERIMENTAL feature.
+
=head1 SEE ALSO
L<Mojolicious::Plugin::AssetPack>.
=cut
+
+__DATA__
+@@ fallback.css.ep
+% for my $asset (@$assets) {
+@import "<%= $asset->url_for($c) %>";
+% }
+@@ fallback.js.ep
+% use Mojo::JSON 'to_json';
+(function(w,d,a,b){
+var c=function(){
+var t=d.createElement("script");
+t.src=b.shift();
+if(b.length) t.addEventListener("load",c);
+a.parentNode.insertBefore(t,a);
+};
+c();
+})(window,document,document.getElementsByTagName("script")[0],<%= to_json([map { $_->url_for($c) } @$assets]) %>);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack.pm new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-2.04/lib/Mojolicious/Plugin/AssetPack.pm 2018-07-19 11:39:06.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/lib/Mojolicious/Plugin/AssetPack.pm 2018-08-01 08:19:35.000000000 +0200
@@ -6,7 +6,7 @@
use Mojolicious::Plugin::AssetPack::Store;
use Mojolicious::Plugin::AssetPack::Util qw(diag has_ro load_module DEBUG);
-our $VERSION = '2.04';
+our $VERSION = '2.05';
has minify => sub { shift->_app->mode eq 'development' ? 0 : 1 };
@@ -86,7 +86,7 @@
sub tag_for {
my $self = shift;
deprecated
- 'tag_for() is DEPRECATED in favor of Mojolicious::Plugin::AssetPack::Asset::renderer()';
+ 'tag_for() is DEPRECATED in favor of Mojolicious::Plugin::AssetPack::Asset::tag_for()';
return $self->{tag_for} unless @_;
$self->{tag_for} = shift;
return $self;
@@ -144,8 +144,8 @@
}
}
- if (my $renderer = $self->{tag_for}) {
- $_->{renderer} or $_->{renderer} = $renderer for @$assets;
+ if (my $tag_for = $self->{tag_for}) {
+ $_->{tag_for} or $_->{tag_for} = $tag_for for @$assets;
}
my @checksum = map { $_->checksum } @$assets;
@@ -195,25 +195,25 @@
return Mojo::ByteStream->new(
join "\n",
- map { $_->renderer->($_, $c, \%args, @attrs) }
+ map { $_->tag_for->($_, $c, \%args, @attrs) }
grep { !$_->isa('Mojolicious::Plugin::AssetPack::Asset::Null') } @$assets
);
}
sub _serve {
- my $c = shift;
- my $checksum = $c->stash('checksum');
- my $helper = $c->stash('assetpack.helper');
- my $self = $c->$helper;
+ my $c = shift;
+ my $helper = $c->stash('assetpack.helper');
+ my $self = $c->$helper;
- if (my $f = $self->{by_checksum}{$checksum}) {
- $self->store->serve_asset($c, $f);
+ my $checksum = $c->stash('checksum');
+ if (my $asset = $self->{by_checksum}{$checksum}) {
+ $self->store->serve_asset($c, $asset);
return $c->rendered;
}
my $topic = $c->stash('name');
- if ($self->{by_topic}{$topic}) {
- return $c->render(text => "// Invalid checksum for topic '$topic'\n", status => 404);
+ if (my $assets = $self->{by_topic}{$topic}) {
+ return $self->store->serve_fallback_for_assets($c, $topic, $assets);
}
$c->render(text => "// No such asset '$topic'\n", status => 404);
@@ -238,7 +238,7 @@
=head1 VERSION
-2.04
+2.05
=head1 SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/t/assets/js/not-found.js new/Mojolicious-Plugin-AssetPack-2.05/t/assets/js/not-found.js
--- old/Mojolicious-Plugin-AssetPack-2.04/t/assets/js/not-found.js 1970-01-01 01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-2.05/t/assets/js/not-found.js 2018-08-01 07:30:45.000000000 +0200
@@ -0,0 +1,3 @@
+(function(w,d) {
+ console.log("I'm loaded!");
+})();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/t/favicon.t new/Mojolicious-Plugin-AssetPack-2.05/t/favicon.t
--- old/Mojolicious-Plugin-AssetPack-2.04/t/favicon.t 2018-07-19 11:34:36.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.05/t/favicon.t 2018-08-01 06:42:23.000000000 +0200
@@ -1,10 +1,13 @@
use lib '.';
+use File::Basename 'basename';
use t::Helper;
plan skip_all => 'TEST_REALFAVICONGENERATOR_API_KEY=is_not_set'
unless $ENV{TEST_REALFAVICONGENERATOR_API_KEY};
my $t = t::Helper->t(pipes => [qw(Favicon)]);
+my %sub_asset;
+
$t->app->asset->pipe('Favicon')->api_key($ENV{TEST_REALFAVICONGENERATOR_API_KEY});
$t->app->asset->process('favicon.ico' => '/image/master_favicon_thumbnail.png');
@@ -19,16 +22,31 @@
->element_exists('[href$="32x32.png"][rel="icon"][sizes="32x32"][type="image/png"]')
->element_exists('[href$="safari-pinned-tab.svg"][color="#536DFE"][rel="mask-icon"]')
->element_exists('[href$="site.webmanifest"][rel="manifest"]')
+ ->element_exists('[name="msapplication-config"][content$="browserconfig.xml"]')
->element_exists('[name="msapplication-TileColor"][content="#536DFE"]')
->element_exists('[name="theme-color"][content="#536DFE"]');
# Make sure that all the [href] above looks like /asset/19b5e7c873/apple-touch-icon-57x57.png
-$t->tx->res->dom->find("[href]")->each(
+$t->tx->res->dom->find("[href], [content]")->each(
sub {
- like $_->{href}, qr{^/asset/\w+/\w+.*$}, "href $_->{href}";
+ my $src = $_->{href} || $_->{content};
+ return if $src =~ m!\#!; # Skip content="#536DFE"
+ my $name = basename $src;
+ $sub_asset{$name} = $src;
+ like $src, qr{^/asset/\w+/\w+.*$}, "meta $src";
}
);
+$t->get_ok($sub_asset{'site.webmanifest'})->status_is(200)
+ ->json_like('/icons/0/src', qr{^/asset/\w+/[\w-]+\.png$})
+ ->json_like('/icons/1/src', qr{^/asset/\w+/[\w-]+\.png$});
+
+$t->get_ok($sub_asset{'browserconfig.xml'})->status_is(200);
+like $t->tx->res->dom->at('square150x150logo[src]')->{src},
+ qr{^/asset/\w+/mstile-150x150.png}, 'browserconfig.xml square150x150logo';
+
+#$t->get_ok($sub_asset{'manifest.webapp'})->content_is(1);
+
{
no warnings 'redefine';
local *Mojolicious::Plugin::AssetPack::Pipe::Favicon::_request = sub { die $_[1] };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.04/t/not-found.t new/Mojolicious-Plugin-AssetPack-2.05/t/not-found.t
--- old/Mojolicious-Plugin-AssetPack-2.04/t/not-found.t 2016-11-18 15:11:14.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-2.05/t/not-found.t 2018-08-01 07:51:55.000000000 +0200
@@ -5,7 +5,9 @@
eval { $t->app->asset->process };
like $@, qr{Could not find input asset "no-such-stylesheet\.css"}, 'could not find asset';
-$t->app->asset->process('app.css', 'input.css');
+$t->app->asset->process('something.png', 'image/sample.png');
+$t->app->asset->process('app.css', 'input.css');
+
$t->get_ok('/')->status_is(200)
->element_exists(qq(link[href="/asset/f956a3f925/input.css"]));
@@ -16,13 +18,17 @@
$t->get_ok('/asset/f956a3f925/foo.css')->status_is(200);
# This is useful when assets are combined
-$t->get_ok('/asset/aaaaaaaaaa/app.css')->status_is(404)
- ->content_is("// Invalid checksum for topic 'app.css'\n");
+$t->get_ok('/asset/aaaaaaaaaa/app.css')->status_is(200)
+ ->content_is(qq(\@import "/asset/f956a3f925/input.css";\n));
# Both checksum and topic is invalid
$t->get_ok('/asset/aaaaaaaaaa/foo.css')->status_is(404)
->content_is("// No such asset 'foo.css'\n");
+$t->get_ok('/asset/aaaaaaaaaa/something.png')->status_is(302)
+ ->header_like(Location => qr{^/asset/\w+/something.png$});
+$t->get_ok($t->tx->res->headers->location)->status_is(200);
+
done_testing;
__DATA__
1
0
Hello community,
here is the log from the commit of package perl-Log-Dispatch-FileRotate for openSUSE:Factory checked in at 2018-08-31 10:42:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Log-Dispatch-FileRotate (Old)
and /work/SRC/openSUSE:Factory/.perl-Log-Dispatch-FileRotate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Log-Dispatch-FileRotate"
Fri Aug 31 10:42:46 2018 rev:27 rq:631297 version:1.36
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Log-Dispatch-FileRotate/perl-Log-Dispatch-FileRotate.changes 2018-03-14 19:38:07.687140947 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Log-Dispatch-FileRotate.new/perl-Log-Dispatch-FileRotate.changes 2018-08-31 10:43:51.759160872 +0200
@@ -1,0 +2,10 @@
+Mon Jul 30 05:32:22 UTC 2018 - coolo(a)suse.com
+
+- updated to 1.36
+ see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes
+
+ 1.36 Sun 24 29 2018
+ - If the "permissions" param is set, use the same permissions for the lock
+ file that the log file will use. [github #21]
+
+-------------------------------------------------------------------
Old:
----
Log-Dispatch-FileRotate-1.35.tar.gz
New:
----
Log-Dispatch-FileRotate-1.36.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Log-Dispatch-FileRotate.spec ++++++
--- /var/tmp/diff_new_pack.PhzTD5/_old 2018-08-31 10:43:52.379161609 +0200
+++ /var/tmp/diff_new_pack.PhzTD5/_new 2018-08-31 10:43:52.379161609 +0200
@@ -17,7 +17,7 @@
Name: perl-Log-Dispatch-FileRotate
-Version: 1.35
+Version: 1.36
Release: 0
%define cpan_name Log-Dispatch-FileRotate
Summary: Log to Files that Archive/Rotate Themselves
++++++ Log-Dispatch-FileRotate-1.35.tar.gz -> Log-Dispatch-FileRotate-1.36.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/Changes new/Log-Dispatch-FileRotate-1.36/Changes
--- old/Log-Dispatch-FileRotate-1.35/Changes 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/Changes 2018-07-29 21:24:44.000000000 +0200
@@ -1,5 +1,9 @@
Revision history for Perl extension Log::Dispatch::FileRotate.
+1.36 Sun 24 29 2018
+ - If the "permissions" param is set, use the same permissions for the lock
+ file that the log file will use. [github #21]
+
1.35 Wed 43 07 2018
- Fix lockfile race condition test in Strawberry Perl (Thanks Zak B. Elep)
- Skip file open failure test on Cygwin - chmod bahaviour varies on Cygwin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/MANIFEST new/Log-Dispatch-FileRotate-1.36/MANIFEST
--- old/Log-Dispatch-FileRotate-1.35/MANIFEST 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/MANIFEST 2018-07-29 21:24:44.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
Changes
LICENSE
MANIFEST
@@ -18,6 +18,7 @@
t/basic.t
t/file-open-failure.t
t/lockfile-open-failure.t
+t/lockfile-permissions.t
t/no-activity-bug.t
t/sig-warn-deadlock.t
t/size-with-underscore.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/META.json new/Log-Dispatch-FileRotate-1.36/META.json
--- old/Log-Dispatch-FileRotate-1.35/META.json 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/META.json 2018-07-29 21:24:44.000000000 +0200
@@ -4,7 +4,7 @@
"Michael Schout <mschout(a)cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -31,6 +31,7 @@
},
"runtime" : {
"requires" : {
+ "Carp" : "0",
"Date::Manip" : "0",
"Exporter" : "0",
"Fcntl" : "0",
@@ -61,15 +62,15 @@
"provides" : {
"Log::Dispatch::FileRotate" : {
"file" : "lib/Log/Dispatch/FileRotate.pm",
- "version" : "1.35"
+ "version" : "1.36"
},
"Log::Dispatch::FileRotate::Flock" : {
"file" : "lib/Log/Dispatch/FileRotate/Flock.pm",
- "version" : "1.35"
+ "version" : "1.36"
},
"Log::Dispatch::FileRotate::Mutex" : {
"file" : "lib/Log/Dispatch/FileRotate/Mutex.pm",
- "version" : "1.35"
+ "version" : "1.36"
}
},
"release_status" : "stable",
@@ -84,7 +85,8 @@
"web" : "https://github.com/mschout/perl-log-dispatch-filerotate"
}
},
- "version" : "1.35",
- "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
+ "version" : "1.36",
+ "x_generated_by_perl" : "v5.26.2",
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.04"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/META.yml new/Log-Dispatch-FileRotate-1.36/META.yml
--- old/Log-Dispatch-FileRotate-1.35/META.yml 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/META.yml 2018-07-29 21:24:44.000000000 +0200
@@ -16,7 +16,7 @@
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,14 +25,15 @@
provides:
Log::Dispatch::FileRotate:
file: lib/Log/Dispatch/FileRotate.pm
- version: '1.35'
+ version: '1.36'
Log::Dispatch::FileRotate::Flock:
file: lib/Log/Dispatch/FileRotate/Flock.pm
- version: '1.35'
+ version: '1.36'
Log::Dispatch::FileRotate::Mutex:
file: lib/Log/Dispatch/FileRotate/Mutex.pm
- version: '1.35'
+ version: '1.36'
requires:
+ Carp: '0'
Date::Manip: '0'
Exporter: '0'
Fcntl: '0'
@@ -48,5 +49,6 @@
bugtracker: https://github.com/mschout/perl-log-dispatch-filerotate/issues
homepage: https://github.com/mschout/perl-log-dispatch-filerotate
repository: https://github.com/mschout/perl-log-dispatch-filerotate.git
-version: '1.35'
-x_serialization_backend: 'YAML::Tiny version 1.70'
+version: '1.36'
+x_generated_by_perl: v5.26.2
+x_serialization_backend: 'YAML::Tiny version 1.73'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/Makefile.PL new/Log-Dispatch-FileRotate-1.36/Makefile.PL
--- old/Log-Dispatch-FileRotate-1.35/Makefile.PL 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/Makefile.PL 2018-07-29 21:24:44.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
use strict;
use warnings;
@@ -17,6 +17,7 @@
"MIN_PERL_VERSION" => "5.008",
"NAME" => "Log::Dispatch::FileRotate",
"PREREQ_PM" => {
+ "Carp" => 0,
"Date::Manip" => 0,
"Exporter" => 0,
"Fcntl" => 0,
@@ -38,7 +39,7 @@
"Test::Warn" => 0,
"utf8" => 0
},
- "VERSION" => "1.35",
+ "VERSION" => "1.36",
"test" => {
"TESTS" => "t/*.t"
}
@@ -46,6 +47,7 @@
my %FallbackPrereqs = (
+ "Carp" => 0,
"Date::Manip" => 0,
"Encode" => 0,
"Exporter" => 0,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/README new/Log-Dispatch-FileRotate-1.36/README
--- old/Log-Dispatch-FileRotate-1.35/README 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/README 2018-07-29 21:24:44.000000000 +0200
@@ -1,7 +1,5 @@
-
-
This archive contains the distribution Log-Dispatch-FileRotate,
-version 1.35:
+version 1.36:
Log to Files that Archive/Rotate Themselves
@@ -11,5 +9,4 @@
the same terms as the Perl 5 programming language system itself.
-This README file was generated by Dist::Zilla::Plugin::Readme v6.010.
-
+This README file was generated by Dist::Zilla::Plugin::Readme v6.012.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/SIGNATURE new/Log-Dispatch-FileRotate-1.36/SIGNATURE
--- old/Log-Dispatch-FileRotate-1.35/SIGNATURE 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/SIGNATURE 2018-07-29 21:24:44.000000000 +0200
@@ -14,17 +14,17 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-SHA1 cdf7fba8ff1f3c869c591f9c8c3996af0ecc3ada Changes
+SHA1 e6c8d40466352641bcbe58f3232e641f7b0cd06f Changes
SHA1 bab88f54ea8c7c2588e407bd69fad8bf7cb47c1b LICENSE
-SHA1 4a8c203bb26d5f0f85bde3f70f17b8699eaf80de MANIFEST
+SHA1 282ad62658f3e13a2132d6d69882e3e3cb5cace6 MANIFEST
SHA1 c752e09ba9b675ae4b45d2c73716f7848afed367 MANIFEST.SKIP
-SHA1 34f7aa07c4a4ee5798e4071eef9e63030a8f21bf META.json
-SHA1 9b2cd8db6cc41d5a73a169dd4c511ca43741518b META.yml
-SHA1 a4674c4eb785d34c7d39a7de8da9f256d0ff29e3 Makefile.PL
-SHA1 72ecd7552231723f37db35dbca4b331c97adab09 README
-SHA1 f0cbdb308726036dce2b9af560c401d4aeae2ca6 lib/Log/Dispatch/FileRotate.pm
-SHA1 5bc3993670708b19cbb9911cd7f75d8b4f9c5fb7 lib/Log/Dispatch/FileRotate/Flock.pm
-SHA1 e0e35d94d1884d46eae9635e81a7295b894afe2c lib/Log/Dispatch/FileRotate/Mutex.pm
+SHA1 c19ffa7ff172aa45f56e8719d736b41e3697fad6 META.json
+SHA1 7215b40efc8bf9ffd64e4e9c8e0526a8f97c57af META.yml
+SHA1 d66c1f677a57b1686e2d96beac3c024b931e8a89 Makefile.PL
+SHA1 969a95f3419292e14c7620cd76bc2844af91d2bc README
+SHA1 c0de854522c5fd520298f278ed9b0cabd42cedcc lib/Log/Dispatch/FileRotate.pm
+SHA1 e3ecb53d0a360e2166339aa3bd4cd310fc864585 lib/Log/Dispatch/FileRotate/Flock.pm
+SHA1 626a12607cac66b3d22186d405b694a7302b3e15 lib/Log/Dispatch/FileRotate/Mutex.pm
SHA1 1b96fc5899c6b1cfb809c9b285e4b54ba0af7ba4 t/00-compile.t
SHA1 df7f66f7d541240ca93c857a4141a3fcbdcd168e t/author-lockfile-race-condition.t
SHA1 8efad25309730a4d501fb40fc03eda4697303372 t/author-pod-syntax.t
@@ -32,23 +32,24 @@
SHA1 0e260151375307dbd52a720d92c0420351202914 t/basic.t
SHA1 5c49325ec5e88b5b2fa4a62b3168d6e2b4ac0946 t/file-open-failure.t
SHA1 c41015ddd96ccd55280128c9a062e0885956dbfa t/lockfile-open-failure.t
+SHA1 62741f7b411bffea6f8d9cb6e2175293f714bef0 t/lockfile-permissions.t
SHA1 bf6691953ae08b994913244e559bb8cbb59a1fc5 t/no-activity-bug.t
SHA1 8c6299f93ea1882d10d2b502207a04920ecd1f1b t/sig-warn-deadlock.t
SHA1 795ff4c3ebb7dcc9bf59a2de7b2c84726e1ae249 t/size-with-underscore.t
-----BEGIN PGP SIGNATURE-----
-iQJFBAEBCAAvFiEE2EtuRfhGgngE8PsARAzvLrlUzY4FAlqgCJgRHG1zY2hvdXRA
-Y3Bhbi5vcmcACgkQRAzvLrlUzY6yKQ//Yk3zxO/Bvi/vjq5TrHqTG/oo6t9WGYoX
-af+MscoG+hJXtTNsHYcai31EDJr+W+TeOstDGj2iY4Xu8PjhfOJ7xaZTtsz9Y1nQ
-fJF+QVaSy95CLkP1yOWKIrT9/XJfcFmeCTPoBjs2+kCs97YICMoPxBkuziFZiZOs
-lBk7r+G7Px3wlq2oczkuKoKLGWW6qnGqRBCBW5gJCuVpQ9/caJ3NGjB0FvbBQ9iR
-iqp0MiiYuFawzjLRZWAjKGLX/Gzh1+7UdFDyDdjAATgWdTJQWh6XsZk/bHF+G3Yv
-PwEQyqTzizDtjC8pduE5GvzaiD2gfa9ndUjN7PD1uzo0qgx5bxv9AUEr50/Pm4P5
-RIS3Oi0ImW1NN9FQtqK+oZO+G36g0VRW4XFx8iPMyngIcYLA0CkVGHKTGD4J2Edi
-R7KU2jRmlrI+yiTkGikfn37wUTuJBeE3IGDSfp/CrlJY1+LcGYAz+/owlbspLc9e
-KrV5iQ0HB1xfbdaKZqiE4HTvye3SyyBI5/5uxp8HxDYdnEyoD+bRv1d+aTOQJalL
-2c3fbG+I86Ri3Y50u8cYZctXxzM+qBOU1Us47lpAe6JB8XUVh1N5wG/cYIDUODGA
-zaXLxpJVtBcysDDXQ6nX3R/PbSFla1+58Sk1nJ6OipQuj/X+qQ9nVu7+7ajUcJjv
-DPDmrlJR+Yw=
-=mz5R
+iQJFBAEBCAAvFiEE2EtuRfhGgngE8PsARAzvLrlUzY4FAlteFHYRHG1zY2hvdXRA
+Y3Bhbi5vcmcACgkQRAzvLrlUzY6y9RAAmRGNr0WT1F4c3nXKZNVXRI87w6lC2LrD
+2sIqPjvVx0WBXiYBWXEQSV65W2hlHNHtaPFsRiBUoAUeggHNzBh/QSO6GoH0TIdw
+JtWUupXqmGnpzH2ePPDx/OvUTnZU+EZ5VCf1yX8beVnboqKmRBnSE4R/bBUGRYO2
+T3brQKIVdjL54MHvS4EARuc7zCwHPD+UgIKarg7cQ6+Bp6G2hjTOP0JFcc9CQYDA
+ZNTjbTE5GxjRHn6RX6UWIZuo2MGhDTFbnIGwrZdwTS5loxovM0ZVyvx4o0Z2rZJt
+luKRx7OYAPRD7DwGrwCCpvCAgr4r0bAy79OqhowjAGPNyg4mrxiMP/w58ZxqYn3R
+BamS18HIvSRc7Bo/TOn4iM4t5cuSD59ZI1vlMSDjF17wQlV3whphgUBskr53ckVM
+nZQ6uSspWb6dP0b1Qpzm4KNeScyvF4RRs+JkNJR45u3Nrbi2alwe1tsIECgjfwxF
+rKWa7l29PxWLd7eCJ/eiqCxdlVk6ZtZNkjBQJPK2QR4d5dCmynben2nML9RKjnXS
+VwqOKxsrtMccQCIoQ25d1AFusnERxjGqmsLpkPcO11W9QD6BLunaOTEAFEqXY+Hl
+wD9pO9YO08lFUud/OSS6nWq863x0s8gn17mZ1KhMjtJNYQhhsvCjt5rq1HvgupWw
+r1VAHaVyqAw=
+=ZSxO
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate/Flock.pm new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate/Flock.pm
--- old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate/Flock.pm 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate/Flock.pm 2018-07-29 21:24:44.000000000 +0200
@@ -8,7 +8,7 @@
#
package Log::Dispatch::FileRotate::Flock;
-$Log::Dispatch::FileRotate::Flock::VERSION = '1.35';
+$Log::Dispatch::FileRotate::Flock::VERSION = '1.36';
# ABSTRACT: File Locking Functions for L<Log::Dispatch::FileRotate>
use strict;
@@ -93,13 +93,15 @@
=pod
+=encoding UTF-8
+
=head1 NAME
Log::Dispatch::FileRotate::Flock - File Locking Functions for L<Log::Dispatch::FileRotate>
=head1 VERSION
-version 1.35
+version 1.36
=head1 SYNOPSIS
@@ -125,7 +127,7 @@
=head1 SOURCE
-The development version is on github at L<http://https://github.com/mschout/perl-log-dispatch-filerotate>
+The development version is on github at L<https://https://github.com/mschout/perl-log-dispatch-filerotate>
and may be cloned from L<git://https://github.com/mschout/perl-log-dispatch-filerotate.git>
=head1 BUGS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate/Mutex.pm new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate/Mutex.pm
--- old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate/Mutex.pm 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate/Mutex.pm 2018-07-29 21:24:44.000000000 +0200
@@ -8,11 +8,12 @@
#
package Log::Dispatch::FileRotate::Mutex;
-$Log::Dispatch::FileRotate::Mutex::VERSION = '1.35';
+$Log::Dispatch::FileRotate::Mutex::VERSION = '1.36';
# ABSTRACT: Flock Based File Mutex.
use strict;
use warnings;
+use Carp 'croak';
use Log::Dispatch::FileRotate::Flock qw(safe_flock flopen);
use Fcntl ':flock';
@@ -39,12 +40,13 @@
sub new {
- my ($class, $path) = @_;
+ my ($class, $path, %args) = @_;
$class = ref $class || $class;
my $self = bless {
- _path => $path
+ _path => $path,
+ %args
}, $class;
return $self;
@@ -60,6 +62,8 @@
# we have not opened the lockfile in this thread.
my ($fh, $inode) = flopen($self->{_path});
+ $self->_set_permissions;
+
unless (defined $fh) {
return 0;
}
@@ -89,11 +93,29 @@
}
}
- # otherwise this $pid is alraedy holding the lock
+ # otherwise this $pid is already holding the lock
return $self->{$pid} || 0;
}
+sub _set_permissions {
+ my $self = shift;
+
+ unless (defined $self->{permissions}) {
+ return;
+ }
+
+ my $file = $self->{_path};
+
+ my $current_mode = (stat $self->{_path})[2] & 07777;
+
+ if ($current_mode ne $self->{permissions}) {
+ chmod $self->{permissions}, $self->{_path}
+ or croak sprintf 'Failed to chmod %s to %04o: %s',
+ $self->{_path}, $self->{permissions} & 07777, $!;
+ }
+}
+
sub unlock {
my $self = shift;
@@ -119,13 +141,15 @@
=pod
+=encoding UTF-8
+
=head1 NAME
Log::Dispatch::FileRotate::Mutex - Flock Based File Mutex.
=head1 VERSION
-version 1.35
+version 1.36
=head1 SYNOPSIS
@@ -157,7 +181,7 @@
=head1 SOURCE
-The development version is on github at L<http://https://github.com/mschout/perl-log-dispatch-filerotate>
+The development version is on github at L<https://https://github.com/mschout/perl-log-dispatch-filerotate>
and may be cloned from L<git://https://github.com/mschout/perl-log-dispatch-filerotate.git>
=head1 BUGS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate.pm new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate.pm
--- old/Log-Dispatch-FileRotate-1.35/lib/Log/Dispatch/FileRotate.pm 2018-03-07 16:43:20.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/lib/Log/Dispatch/FileRotate.pm 2018-07-29 21:24:44.000000000 +0200
@@ -1,5 +1,5 @@
package Log::Dispatch::FileRotate;
-$Log::Dispatch::FileRotate::VERSION = '1.35';
+$Log::Dispatch::FileRotate::VERSION = '1.36';
# ABSTRACT: Log to Files that Archive/Rotate Themselves
require 5.005;
@@ -378,7 +378,14 @@
sub mutex_for_path {
my ($self, $path) = @_;
- $MUTEXES{$path} ||= Log::Dispatch::FileRotate::Mutex->new($path);
+ my %args;
+
+ # use same permissions for the Mutex file
+ if (exists $self->{params}{permissions}) {
+ $args{permissions} = $self->{params}{permissions};
+ }
+
+ $MUTEXES{$path} ||= Log::Dispatch::FileRotate::Mutex->new($path, %args);
}
}
@@ -666,13 +673,15 @@
=pod
+=encoding UTF-8
+
=head1 NAME
Log::Dispatch::FileRotate - Log to Files that Archive/Rotate Themselves
=head1 VERSION
-version 1.35
+version 1.36
=head1 SYNOPSIS
@@ -994,7 +1003,7 @@
=head1 SOURCE
-The development version is on github at L<http://https://github.com/mschout/perl-log-dispatch-filerotate>
+The development version is on github at L<https://https://github.com/mschout/perl-log-dispatch-filerotate>
and may be cloned from L<git://https://github.com/mschout/perl-log-dispatch-filerotate.git>
=head1 BUGS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Dispatch-FileRotate-1.35/t/lockfile-permissions.t new/Log-Dispatch-FileRotate-1.36/t/lockfile-permissions.t
--- old/Log-Dispatch-FileRotate-1.35/t/lockfile-permissions.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Log-Dispatch-FileRotate-1.36/t/lockfile-permissions.t 2018-07-29 21:24:44.000000000 +0200
@@ -0,0 +1,34 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Test::More;
+use Path::Tiny;
+use Log::Dispatch::FileRotate;
+
+for my $mode (0666, 0644, 0600) {
+ my $tempdir = Path::Tiny->tempdir;
+
+ my $dispatcher = Log::Dispatch->new;
+ isa_ok $dispatcher, 'Log::Dispatch';
+
+ my $file_logger = Log::Dispatch::FileRotate->new(
+ filename => $tempdir->child('myerrs.log')->stringify,
+ permissions => 0666,
+ min_level => 'debug',
+ mode => 'append',
+ size => 20000,
+ max => 5,
+ newline => 1,
+ DatePattern => 'YYYY-dd-HH');
+
+ isa_ok $file_logger, 'Log::Dispatch::FileRotate';
+ $dispatcher->add($file_logger);
+
+ $dispatcher->log(level => 'info', message => 'Hello world');
+
+ my $permissions = (stat $file_logger->{lf})[2] & 07777;
+ cmp_ok $permissions, '==', 0666;
+}
+
+done_testing;
1
0
Hello community,
here is the log from the commit of package perl-Lingua-EN-Sentence for openSUSE:Factory checked in at 2018-08-31 10:42:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Lingua-EN-Sentence (Old)
and /work/SRC/openSUSE:Factory/.perl-Lingua-EN-Sentence.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Lingua-EN-Sentence"
Fri Aug 31 10:42:43 2018 rev:15 rq:631291 version:0.31
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Lingua-EN-Sentence/perl-Lingua-EN-Sentence.changes 2016-08-12 15:43:40.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Lingua-EN-Sentence.new/perl-Lingua-EN-Sentence.changes 2018-08-31 10:43:51.167160167 +0200
@@ -1,0 +2,9 @@
+Mon Aug 20 05:37:18 UTC 2018 - coolo(a)suse.com
+
+- updated to 0.31
+ see /usr/share/doc/packages/perl-Lingua-EN-Sentence/Changes
+
+ 0.31 Aug 19 2018
+ Declared min version of Perl. Fix for RT bug #124686
+
+-------------------------------------------------------------------
Old:
----
Lingua-EN-Sentence-0.30.tar.gz
New:
----
Lingua-EN-Sentence-0.31.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Lingua-EN-Sentence.spec ++++++
--- /var/tmp/diff_new_pack.wpyDYK/_old 2018-08-31 10:43:51.567160643 +0200
+++ /var/tmp/diff_new_pack.wpyDYK/_new 2018-08-31 10:43:51.571160648 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Lingua-EN-Sentence
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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,14 +17,14 @@
Name: perl-Lingua-EN-Sentence
-Version: 0.30
+Version: 0.31
Release: 0
%define cpan_name Lingua-EN-Sentence
Summary: Split Text Into Sentences
-License: Artistic-1.0 or GPL-1.0+
+License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Lingua-EN-Sentence/
-Source0: http://www.cpan.org/authors/id/K/KI/KIMRYAN/%{cpan_name}-%{version}.tar.gz
+Source0: https://cpan.metacpan.org/authors/id/K/KI/KIMRYAN/%{cpan_name}-%{version}.t…
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -32,9 +32,7 @@
BuildRequires: perl-macros
BuildRequires: perl(Module::Build) >= 0.380000
BuildRequires: perl(Test::More) >= 0.94
-BuildRequires: perl(utf8) >= 1.09
BuildRequires: perl(warnings) >= 1.12
-Requires: perl(utf8) >= 1.09
Requires: perl(warnings) >= 1.12
%{perl_requires}
@@ -46,8 +44,8 @@
Certain well know exceptions, such as abbreviations, may cause incorrect
segmentations. But some of them are already integrated into this code and
are being taken care of. Still, if you see that there are words causing the
-get_sentences() to fail, you can add those to the module, so it notices
-them.
+get_sentences function to fail, you can add those to the module, so it
+notices them.
%prep
%setup -q -n %{cpan_name}-%{version}
++++++ Lingua-EN-Sentence-0.30.tar.gz -> Lingua-EN-Sentence-0.31.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/Changes new/Lingua-EN-Sentence-0.31/Changes
--- old/Lingua-EN-Sentence-0.30/Changes 2016-08-08 09:08:48.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/Changes 2018-08-19 10:06:56.000000000 +0200
@@ -101,3 +101,7 @@
set the default character set to en_US.UTF-8
added example/demo.pl script
+0.31 Aug 19 2018
+ Declared min version of Perl. Fix for RT bug #124686
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/LICENCE new/Lingua-EN-Sentence-0.31/LICENCE
--- old/Lingua-EN-Sentence-0.30/LICENCE 2016-07-04 08:12:54.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/LICENCE 2018-08-19 10:15:52.000000000 +0200
@@ -1,4 +1,4 @@
-This software is copyright (c) 2016 by Kim Ryan.
+This software is copyright (c) 2018 by Kim Ryan.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/META.json new/Lingua-EN-Sentence-0.31/META.json
--- old/Lingua-EN-Sentence-0.30/META.json 2016-08-08 09:09:00.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/META.json 2018-08-19 10:26:07.000000000 +0200
@@ -26,6 +26,7 @@
},
"runtime" : {
"requires" : {
+ "perl" : "5.1",
"warnings" : "1.12"
}
}
@@ -33,7 +34,7 @@
"provides" : {
"Lingua::EN::Sentence" : {
"file" : "lib/Lingua/EN/Sentence.pm",
- "version" : "0.30"
+ "version" : "0.31"
}
},
"release_status" : "stable",
@@ -45,6 +46,6 @@
"url" : "https://github.com/kimryan/Lingua-EN-Sentence"
}
},
- "version" : "0.30",
+ "version" : "0.31",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/META.yml new/Lingua-EN-Sentence-0.31/META.yml
--- old/Lingua-EN-Sentence-0.30/META.yml 2016-08-08 09:09:00.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/META.yml 2018-08-19 10:26:07.000000000 +0200
@@ -16,11 +16,12 @@
provides:
Lingua::EN::Sentence:
file: lib/Lingua/EN/Sentence.pm
- version: '0.30'
+ version: '0.31'
requires:
+ perl: '5.1'
warnings: '1.12'
resources:
license: http://dev.perl.org/licenses/
repository: https://github.com/kimryan/Lingua-EN-Sentence
-version: '0.30'
+version: '0.31'
x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/Makefile.PL new/Lingua-EN-Sentence-0.31/Makefile.PL
--- old/Lingua-EN-Sentence-0.30/Makefile.PL 2016-08-08 08:47:10.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/Makefile.PL 2016-08-08 09:09:39.000000000 +0200
@@ -7,8 +7,7 @@
'VERSION_FROM' => 'lib/Lingua/EN/Sentence.pm', # finds $VERSION
'PREREQ_PM' =>
{
- 'utf8' => 1.09,
- 'warnings' => 1.12,
+ 'warnings' => 1.12
},
'AUTHOR' => 'Shlomo Yona, Kim Ryan',
'LICENSE' => 'perl',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/README new/Lingua-EN-Sentence-0.31/README
--- old/Lingua-EN-Sentence-0.30/README 2016-08-08 08:37:03.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/README 2016-08-09 03:22:18.000000000 +0200
@@ -1,7 +1,7 @@
NAME
- Lingua::EN::Sentence - split text into sentences
+ Lingua::EN::Sentence - split text into sentences
SYNOPSIS
@@ -15,14 +15,14 @@
DESCRIPTION
-The C<Lingua::EN::Sentence> module contains the function get_sentences, which
+The Lingua::EN::Sentence module contains the function get_sentences, which
splits text into its constituent sentences, based on a regular expression and a
list of abbreviations (built in and given).
Certain well know exceptions, such as abbreviations, may cause incorrect
segmentations. But some of them are already integrated into this code and are
being taken care of. Still, if you see that there are words causing the
-get_sentences() to fail, you can add those to the module, so it notices them.
+get_sentences function to fail, you can add those to the module, so it notices them.
INSTALLATION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Lingua-EN-Sentence-0.30/lib/Lingua/EN/Sentence.pm new/Lingua-EN-Sentence-0.31/lib/Lingua/EN/Sentence.pm
--- old/Lingua-EN-Sentence-0.30/lib/Lingua/EN/Sentence.pm 2016-08-08 08:37:29.000000000 +0200
+++ new/Lingua-EN-Sentence-0.31/lib/Lingua/EN/Sentence.pm 2018-08-19 10:19:59.000000000 +0200
@@ -30,7 +30,7 @@
Certain well know exceptions, such as abbreviations, may cause incorrect
segmentations. But some of them are already integrated into this code and are
being taken care of. Still, if you see that there are words causing the
-get_sentences() to fail, you can add those to the module, so it notices them.
+get_sentences function to fail, you can add those to the module, so it notices them.
=head1 ALGORITHM
@@ -40,7 +40,7 @@
mistake. In case of a mistake, the end-of-sentence mark is removed.
What are such mistakes? Cases of abbreviations, for example. I have a list of
-such abbreviations (Please see `Acronym/Abbreviations list' section), and more
+such abbreviations (Please see public globals belwo for a list), and more
general rules (for example, the abbreviations 'i.e.' and '.e.g.' need not to be
in the list as a special rule takes care of all single letter abbreviations).
@@ -69,7 +69,7 @@
(e.g. "U.S.A."), as these are found automatically. Note also that acronyms
are searched for on a case insensitive basis.
-Please see`Acronym/Abbreviations list' section for the abbreviations already
+Please see 'Acronym/Abbreviations list' section for the abbreviations already
supported by this module.
=item get_acronyms( )
@@ -144,10 +144,14 @@
Currently being maintained by Kim Ryan, kimryan at CPAN d o t org
-=head1 COPYRIGHT
+
+=head1 COPYRIGHT AND LICENSE
Copyright (c) 2001-2016 Shlomo Yona. All rights reserved.
+Copyright (c) 2018 Kim Ryan. All rights reserved.
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
=cut
@@ -183,7 +187,7 @@
use Carp qw/cluck/;
use English;
-our $VERSION = '0.30';
+our $VERSION = '0.31';
our $LOC;
if ($OSNAME ne 'android') {
1
0
Hello community,
here is the log from the commit of package perl-Mojo-Pg for openSUSE:Factory checked in at 2018-08-31 10:42:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Pg (Old)
and /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojo-Pg"
Fri Aug 31 10:42:33 2018 rev:12 rq:631274 version:4.09
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-Pg/perl-Mojo-Pg.changes 2018-02-03 15:42:25.601583722 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new/perl-Mojo-Pg.changes 2018-08-31 10:43:43.859151476 +0200
@@ -1,0 +2,6 @@
+Fri Aug 3 05:37:58 UTC 2018 - coolo(a)suse.com
+
+- updated to 4.09
+ see /usr/share/doc/packages/perl-Mojo-Pg/Changes
+
+-------------------------------------------------------------------
Old:
----
Mojo-Pg-4.08.tar.gz
New:
----
Mojo-Pg-4.09.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojo-Pg.spec ++++++
--- /var/tmp/diff_new_pack.iud2tz/_old 2018-08-31 10:43:44.271151965 +0200
+++ /var/tmp/diff_new_pack.iud2tz/_new 2018-08-31 10:43:44.271151965 +0200
@@ -17,7 +17,7 @@
Name: perl-Mojo-Pg
-Version: 4.08
+Version: 4.09
Release: 0
%define cpan_name Mojo-Pg
Summary: Mojolicious ♥ PostgreSQL
@@ -32,16 +32,16 @@
BuildRequires: perl-macros
BuildRequires: perl(DBD::Pg) >= 3.005001
BuildRequires: perl(Mojolicious) >= 7.53
-BuildRequires: perl(SQL::Abstract) >= 1.85
+BuildRequires: perl(SQL::Abstract) >= 1.86
Requires: perl(DBD::Pg) >= 3.005001
Requires: perl(Mojolicious) >= 7.53
-Requires: perl(SQL::Abstract) >= 1.85
+Requires: perl(SQL::Abstract) >= 1.86
%{perl_requires}
%description
Mojo::Pg is a tiny wrapper around DBD::Pg that makes at
http://www.postgresql.org a lot of fun to use with the at
-http://mojolicious.org real-time web framework. Perform queries blocking
+https://mojolicious.org real-time web framework. Perform queries blocking
and non-blocking, use all at
https://www.postgresql.org/docs/current/static/sql.html PostgreSQL has to
offer, generate CRUD queries from data structures, manage your database
++++++ Mojo-Pg-4.08.tar.gz -> Mojo-Pg-4.09.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/Changes new/Mojo-Pg-4.09/Changes
--- old/Mojo-Pg-4.08/Changes 2018-01-29 18:59:30.000000000 +0100
+++ new/Mojo-Pg-4.09/Changes 2018-08-02 01:02:41.000000000 +0200
@@ -1,4 +1,11 @@
+4.09 2018-08-02
+ - Added support for -json unary op to SQL::Abstract::Pg.
+ - Added support for multi-column unique constraints in upserts to
+ SQL::Abstract::Pg.
+ - Added support for literal SQL with bind values in select fields to
+ SQL::Abstract::Pg.
+
4.08 2018-01-29
- Improved on_conflict option of insert and insert_p methods in
Mojo::Pg::Database with a shortcut for simple conflict targets.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/META.json new/Mojo-Pg-4.09/META.json
--- old/Mojo-Pg-4.08/META.json 2018-01-29 19:29:36.000000000 +0100
+++ new/Mojo-Pg-4.09/META.json 2018-08-02 01:03:45.000000000 +0200
@@ -4,7 +4,7 @@
"Sebastian Riedel <sri(a)cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
"license" : [
"artistic_2"
],
@@ -36,7 +36,7 @@
"requires" : {
"DBD::Pg" : "3.005001",
"Mojolicious" : "7.53",
- "SQL::Abstract" : "1.85",
+ "SQL::Abstract" : "1.86",
"perl" : "5.010001"
}
}
@@ -46,7 +46,7 @@
"bugtracker" : {
"web" : "https://github.com/kraih/mojo-pg/issues"
},
- "homepage" : "http://mojolicious.org",
+ "homepage" : "https://mojolicious.org",
"license" : [
"http://www.opensource.org/licenses/artistic-license-2.0"
],
@@ -57,6 +57,6 @@
},
"x_IRC" : "irc://irc.perl.org/#mojo"
},
- "version" : "4.08",
+ "version" : "4.09",
"x_serialization_backend" : "JSON::PP version 2.97001"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/META.yml new/Mojo-Pg-4.09/META.yml
--- old/Mojo-Pg-4.08/META.yml 2018-01-29 19:29:36.000000000 +0100
+++ new/Mojo-Pg-4.09/META.yml 2018-08-02 01:03:45.000000000 +0200
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,13 +22,13 @@
requires:
DBD::Pg: '3.005001'
Mojolicious: '7.53'
- SQL::Abstract: '1.85'
+ SQL::Abstract: '1.86'
perl: '5.010001'
resources:
IRC: irc://irc.perl.org/#mojo
bugtracker: https://github.com/kraih/mojo-pg/issues
- homepage: http://mojolicious.org
+ homepage: https://mojolicious.org
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/kraih/mojo-pg.git
-version: '4.08'
+version: '4.09'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/Makefile.PL new/Mojo-Pg-4.09/Makefile.PL
--- old/Mojo-Pg-4.08/Makefile.PL 2018-01-27 13:36:58.000000000 +0100
+++ new/Mojo-Pg-4.09/Makefile.PL 2018-08-02 00:32:41.000000000 +0200
@@ -19,7 +19,7 @@
prereqs => {runtime => {requires => {perl => '5.010001'}}},
resources => {
bugtracker => {web => 'https://github.com/kraih/mojo-pg/issues'},
- homepage => 'http://mojolicious.org',
+ homepage => 'https://mojolicious.org',
license => ['http://www.opensource.org/licenses/artistic-license-2.0'],
repository => {
type => 'git',
@@ -30,6 +30,6 @@
},
},
PREREQ_PM =>
- {'DBD::Pg' => 3.005001, Mojolicious => '7.53', 'SQL::Abstract' => '1.85'},
+ {'DBD::Pg' => 3.005001, Mojolicious => '7.53', 'SQL::Abstract' => '1.86'},
test => {TESTS => 't/*.t t/*/*.t'}
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/README.md new/Mojo-Pg-4.09/README.md
--- old/Mojo-Pg-4.08/README.md 2017-11-02 20:12:50.000000000 +0100
+++ new/Mojo-Pg-4.09/README.md 2018-05-10 17:18:14.000000000 +0200
@@ -1,9 +1,9 @@
-# Mojo::Pg [![Build Status](https://travis-ci.org/kraih/mojo-pg.svg?branch=master)](https://tra…
+# Mojo::Pg [![Build Status](https://travis-ci.com/kraih/mojo-pg.svg?branch=master)](https://tra…
A tiny wrapper around [DBD::Pg](https://metacpan.org/pod/DBD::Pg) that makes
- [PostgreSQL](http://www.postgresql.org) a lot of fun to use with the
- [Mojolicious](http://mojolicious.org) real-time web framework.
+ [PostgreSQL](https://www.postgresql.org) a lot of fun to use with the
+ [Mojolicious](https://mojolicious.org) real-time web framework.
```perl
use Mojolicious::Lite -signatures;
@@ -52,4 +52,4 @@
## Want to know more?
Take a look at our excellent
- [documentation](http://mojolicious.org/perldoc/Mojo/Pg)!
+ [documentation](https://mojolicious.org/perldoc/Mojo/Pg)!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/examples/blog/lib/Blog/Controller/Posts.pm new/Mojo-Pg-4.09/examples/blog/lib/Blog/Controller/Posts.pm
--- old/Mojo-Pg-4.08/examples/blog/lib/Blog/Controller/Posts.pm 2017-12-14 19:43:40.000000000 +0100
+++ new/Mojo-Pg-4.09/examples/blog/lib/Blog/Controller/Posts.pm 2018-04-04 02:31:11.000000000 +0200
@@ -27,33 +27,32 @@
sub store {
my $self = shift;
- my $validation = $self->_validation;
- return $self->render(action => 'create', post => {})
- if $validation->has_error;
+ my $v = $self->_validation;
+ return $self->render(action => 'create', post => {}) if $v->has_error;
- my $id = $self->posts->add($validation->output);
+ my $id = $self->posts->add($v->output);
$self->redirect_to('show_post', id => $id);
}
sub update {
my $self = shift;
- my $validation = $self->_validation;
- return $self->render(action => 'edit', post => {}) if $validation->has_error;
+ my $v = $self->_validation;
+ return $self->render(action => 'edit', post => {}) if $v->has_error;
my $id = $self->param('id');
- $self->posts->save($id, $validation->output);
+ $self->posts->save($id, $v->output);
$self->redirect_to('show_post', id => $id);
}
sub _validation {
my $self = shift;
- my $validation = $self->validation;
- $validation->required('title');
- $validation->required('body');
+ my $v = $self->validation;
+ $v->required('title');
+ $v->required('body');
- return $validation;
+ return $v;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg/Database.pm new/Mojo-Pg-4.09/lib/Mojo/Pg/Database.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg/Database.pm 2018-01-29 19:25:20.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg/Database.pm 2018-08-02 01:00:59.000000000 +0200
@@ -374,6 +374,11 @@
# "insert into t (a) values ('b') on conflict (a) do update set a = 'c'"
$db->insert('t', {a => 'b'}, {on_conflict => [a => {a => 'c'}]});
+ # "insert into t (a, b) values ('c', 'd')
+ # on conflict (a, b) do update set a = 'e'"
+ $db->insert(
+ 't', {a => 'c', b => 'd'}, {on_conflict => [['a', 'b'] => {a => 'e'}]});
+
=head2 insert_p
my $promise = $db->insert_p($table, \@values || \%fieldvals, \%options);
@@ -511,9 +516,15 @@
# "select foo as bar from some_table"
$db->select('some_table', [[foo => 'bar']]);
+ # "select * from some_table where foo = '[1,2,3]'"
+ $db->select('some_table', '*', {foo => {'=' => {-json => [1, 2, 3]}}});
+
# "select extract(epoch from foo) as foo, bar from some_table"
$db->select('some_table', [\'extract(epoch from foo) as foo', 'bar']);
+ # "select 'test' as foo, bar from some_table"
+ $db->select('some_table', [\['? as foo', 'test'], 'bar']);
+
Including a new last argument to pass many new options.
# "select * from some_table where foo = 'bar' order by id desc"
@@ -595,6 +606,9 @@
# "update some_table set foo = 'bar' where id = 23 returning id"
$db->update('some_table', {foo => 'bar'}, {id => 23}, {returning => 'id'});
+ # "update some_table set foo = '[1,2,3]' where bar = 23"
+ $db->update('some_table', {foo => {-json => [1, 2, 3]}}, {bar => 23});
+
=head2 update_p
my $promise = $db->update_p($table, \%fieldvals, \%where, \%options);
@@ -613,6 +627,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg/Migrations.pm new/Mojo-Pg-4.09/lib/Mojo/Pg/Migrations.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg/Migrations.pm 2017-12-14 19:43:41.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg/Migrations.pm 2018-05-08 13:42:25.000000000 +0200
@@ -243,6 +243,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg/PubSub.pm new/Mojo-Pg-4.09/lib/Mojo/Pg/PubSub.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg/PubSub.pm 2018-01-27 02:47:09.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg/PubSub.pm 2018-05-08 13:42:32.000000000 +0200
@@ -175,6 +175,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg/Results.pm new/Mojo-Pg-4.09/lib/Mojo/Pg/Results.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg/Results.pm 2017-12-17 19:00:44.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg/Results.pm 2018-05-08 13:42:43.000000000 +0200
@@ -197,6 +197,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg/Transaction.pm new/Mojo-Pg-4.09/lib/Mojo/Pg/Transaction.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg/Transaction.pm 2018-01-26 01:24:06.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg/Transaction.pm 2018-05-08 13:42:50.000000000 +0200
@@ -73,6 +73,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/Mojo/Pg.pm new/Mojo-Pg-4.09/lib/Mojo/Pg.pm
--- old/Mojo-Pg-4.08/lib/Mojo/Pg.pm 2018-01-28 20:04:51.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/Mojo/Pg.pm 2018-05-08 13:42:08.000000000 +0200
@@ -42,7 +42,7 @@
return $pubsub;
};
-our $VERSION = '4.08';
+our $VERSION = '4.09';
sub db { $_[0]->database_class->new(dbh => $_[0]->_prepare, pg => $_[0]) }
@@ -216,7 +216,7 @@
L<Mojo::Pg> is a tiny wrapper around L<DBD::Pg> that makes
L<PostgreSQL|http://www.postgresql.org> a lot of fun to use with the
-L<Mojolicious|http://mojolicious.org> real-time web framework. Perform queries
+L<Mojolicious|https://mojolicious.org> real-time web framework. Perform queries
blocking and non-blocking, use all
L<SQL features|https://www.postgresql.org/docs/current/static/sql.html>
PostgreSQL has to offer, generate CRUD queries from data structures, manage your
@@ -559,6 +559,8 @@
Hernan Lopes
+Matt S Trout
+
Peter Rabbitson
William Lindley
@@ -575,6 +577,6 @@
=head1 SEE ALSO
L<https://github.com/kraih/mojo-pg>, L<Mojolicious::Guides>,
-L<http://mojolicious.org>.
+L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/lib/SQL/Abstract/Pg.pm new/Mojo-Pg-4.09/lib/SQL/Abstract/Pg.pm
--- old/Mojo-Pg-4.08/lib/SQL/Abstract/Pg.pm 2018-01-29 19:28:37.000000000 +0100
+++ new/Mojo-Pg-4.09/lib/SQL/Abstract/Pg.pm 2018-08-02 00:59:59.000000000 +0200
@@ -10,26 +10,16 @@
return $self->SUPER::insert($table, $data, $options);
}
-sub select {
- my ($self, $table, $fields, @args) = @_;
+sub new {
+ my $self = shift->SUPER::new(@_);
- if (ref $fields eq 'ARRAY') {
- my @fields;
- for my $field (@$fields) {
- if (ref $field eq 'ARRAY') {
- puke 'field alias must be in the form [$name => $alias]' if @$field < 2;
- push @fields,
- $self->_quote($field->[0])
- . $self->_sqlcase(' as ')
- . $self->_quote($field->[1]);
- }
- elsif (ref $field eq 'SCALAR') { push @fields, $$field }
- else { push @fields, $self->_quote($field) }
- }
- $fields = join ', ', @fields;
- }
+ # -json op
+ push @{$self->{unary_ops}}, {
+ regex => qr/^json$/,
+ handler => sub { '?', {json => $_[2]} }
+ };
- return $self->SUPER::select($table, $fields, @args);
+ return $self;
}
sub _insert_returning {
@@ -49,8 +39,10 @@
my ($target, $set) = @$conflict;
puke 'on_conflict value must be in the form [$target, \%set]'
unless ref $set eq 'HASH';
+ $target = [$target] unless ref $target eq 'ARRAY';
- $conflict_sql = '(' . $self->_quote($target) . ')';
+ $conflict_sql
+ = '(' . join(', ', map { $self->_quote($_) } @$target) . ')';
$conflict_sql .= $self->_sqlcase(' do update set ');
my ($set_sql, @set_bind) = $self->_update_set_values($set);
$conflict_sql .= $set_sql;
@@ -58,7 +50,7 @@
},
ARRAYREFREF => sub { ($conflict_sql, @conflict_bind) = @$$conflict },
SCALARREF => sub { $conflict_sql = $$conflict },
- UNDEF => sub { $conflict_sql = $self->_sqlcase('do nothing') }
+ UNDEF => sub { $conflict_sql = $self->_sqlcase('do nothing') }
}
);
$sql .= $self->_sqlcase(' on conflict ') . $conflict_sql;
@@ -135,6 +127,36 @@
return $sql, @bind;
}
+sub _select_fields {
+ my ($self, $fields) = @_;
+
+ return $fields unless ref $fields eq 'ARRAY';
+
+ my (@fields, @bind);
+ for my $field (@$fields) {
+ $self->_SWITCH_refkind(
+ $field => {
+ ARRAYREF => sub {
+ puke 'field alias must be in the form [$name => $alias]'
+ if @$field < 2;
+ push @fields,
+ $self->_quote($field->[0])
+ . $self->_sqlcase(' as ')
+ . $self->_quote($field->[1]);
+ },
+ ARRAYREFREF => sub {
+ push @fields, shift @$$field;
+ push @bind, @$$field;
+ },
+ SCALARREF => sub { push @fields, $$field },
+ FALLBACK => sub { push @fields, $self->_quote($field) }
+ }
+ );
+ }
+
+ return join(', ', @fields), @bind;
+}
+
sub _table {
my ($self, $table) = @_;
@@ -183,6 +205,17 @@
L<SQL::Abstract::Pg> extends L<SQL::Abstract> with a few PostgreSQL features
used by L<Mojo::Pg>.
+=head2 JSON
+
+In many places (as supported by L<SQL::Abstract>) you can use the C<-json> unary
+op to encode JSON from Perl data structures.
+
+ # "update some_table set foo = '[1,2,3]' where bar = 23"
+ $abstract->update('some_table', {foo => {-json => [1, 2, 3]}}, {bar => 23});
+
+ # "select * from some_table where foo = '[1,2,3]'"
+ $abstract->select('some_table', '*', {foo => {'=' => {-json => [1, 2, 3]}}});
+
=head1 INSERT
$abstract->insert($table, \@values || \%fieldvals, \%options);
@@ -206,6 +239,11 @@
# "insert into t (a) values ('b') on conflict (a) do update set a = 'c'"
$abstract->insert('t', {a => 'b'}, {on_conflict => [a => {a => 'c'}]});
+ # "insert into t (a, b) values ('c', 'd')
+ # on conflict (a, b) do update set a = 'e'"
+ $abstract->insert(
+ 't', {a => 'c', b => 'd'}, {on_conflict => [['a', 'b'] => {a => 'e'}]});
+
# "insert into t (a) values ('b') on conflict (a) do update set a = 'c'"
$abstract->insert(
't', {a => 'b'}, {on_conflict => \['(a) do update set a = ?', 'c']});
@@ -219,7 +257,8 @@
The C<$fields> argument now also accepts array references containing array
references with field names and aliases, as well as array references containing
-scalar references to pass literal SQL.
+scalar references to pass literal SQL and array reference references to pass
+literal SQL with bind values.
# "select foo as bar from some_table"
$abstract->select('some_table', [[foo => 'bar']]);
@@ -230,6 +269,9 @@
# "select extract(epoch from foo) as foo, bar from some_table"
$abstract->select('some_table', [\'extract(epoch from foo) as foo', 'bar']);
+ # "select 'test' as foo, bar from some_table"
+ $abstract->select('some_table', [\['? as foo', 'test'], 'bar']);
+
=head2 JOIN
The C<$source> argument now also accepts array references containing not only
@@ -309,6 +351,6 @@
=head1 SEE ALSO
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<http://mojolicious.org>.
+L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/t/crud.t new/Mojo-Pg-4.09/t/crud.t
--- old/Mojo-Pg-4.08/t/crud.t 2018-01-29 19:24:45.000000000 +0100
+++ new/Mojo-Pg-4.09/t/crud.t 2018-08-02 00:58:56.000000000 +0200
@@ -33,7 +33,7 @@
$db->insert('crud_test', {id => 1, name => 'foo'}, {on_conflict => undef});
$db->insert(
'crud_test',
- {id => 2, name => 'bar'},
+ {id => 2, name => 'bar'},
{on_conflict => [id => {name => 'baz'}]}
);
@@ -117,12 +117,10 @@
$result = undef;
my $first = $pg->db->query_p("select * from crud_test where name = 'promise'");
my $second = $pg->db->query_p("select * from crud_test where name = 'promise'");
-Mojo::Promise->all($first, $second)->then(
- sub {
- my ($first, $second) = @_;
- $result = [$first->[0]->hash, $second->[0]->hash];
- }
-)->wait;
+Mojo::Promise->all($first, $second)->then(sub {
+ my ($first, $second) = @_;
+ $result = [$first->[0]->hash, $second->[0]->hash];
+})->wait;
is $result->[0]{name}, 'promise', 'right result';
is $result->[1]{name}, 'promise', 'right result';
$result = undef;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/t/database.t new/Mojo-Pg-4.09/t/database.t
--- old/Mojo-Pg-4.08/t/database.t 2017-12-16 16:37:38.000000000 +0100
+++ new/Mojo-Pg-4.09/t/database.t 2018-02-19 00:54:41.000000000 +0100
@@ -243,12 +243,10 @@
push @notifications, [$name, $pid, $payload];
$db2->once(notification => $delay->begin);
my $tx = $db2->begin;
- Mojo::IOLoop->next_tick(
- sub {
- $db2->notify(dbtest2 => 'baz');
- $tx->commit;
- }
- );
+ Mojo::IOLoop->next_tick(sub {
+ $db2->notify(dbtest2 => 'baz');
+ $tx->commit;
+ });
},
sub {
my ($delay, $name, $pid, $payload) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/t/pod_coverage.t new/Mojo-Pg-4.09/t/pod_coverage.t
--- old/Mojo-Pg-4.08/t/pod_coverage.t 2018-01-28 15:13:40.000000000 +0100
+++ new/Mojo-Pg-4.09/t/pod_coverage.t 2018-03-17 23:38:52.000000000 +0100
@@ -7,8 +7,8 @@
plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!'
unless eval 'use Test::Pod::Coverage 1.04; 1';
-my %RULES
- = ('SQL::Abstract::Pg' => {also_private => ['insert', 'puke', 'select']},);
+my $private = ['insert', 'new', 'puke', 'select'];
+my %RULES = ('SQL::Abstract::Pg' => {also_private => $private},);
pod_coverage_ok($_, $RULES{$_} || {}) for all_modules();
done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/t/pubsub.t new/Mojo-Pg-4.09/t/pubsub.t
--- old/Mojo-Pg-4.08/t/pubsub.t 2017-06-24 15:01:30.000000000 +0200
+++ new/Mojo-Pg-4.09/t/pubsub.t 2018-02-19 00:54:40.000000000 +0100
@@ -45,14 +45,12 @@
push @raw, $payload;
}
);
-Mojo::IOLoop->next_tick(
- sub {
- $pg->db->notify(pstest => 'fail');
- $pg->pubsub->notify('pstest')->notify(pstest => {msg => '♥works♥'})
- ->notify(pstest => [1, 2, 3])->notify(pstest => true)
- ->notify(pstest2 => '♥works♥')->notify(pstest => {msg => 'stop'});
- }
-);
+Mojo::IOLoop->next_tick(sub {
+ $pg->db->notify(pstest => 'fail');
+ $pg->pubsub->notify('pstest')->notify(pstest => {msg => '♥works♥'})
+ ->notify(pstest => [1, 2, 3])->notify(pstest => true)
+ ->notify(pstest2 => '♥works♥')->notify(pstest => {msg => 'stop'});
+});
Mojo::IOLoop->start;
is_deeply \@json,
[undef, undef, {msg => '♥works♥'}, [1, 2, 3], true, {msg => 'stop'}],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Pg-4.08/t/sql.t new/Mojo-Pg-4.09/t/sql.t
--- old/Mojo-Pg-4.08/t/sql.t 2018-01-29 19:24:41.000000000 +0100
+++ new/Mojo-Pg-4.09/t/sql.t 2018-08-02 00:58:59.000000000 +0200
@@ -55,6 +55,17 @@
'baz', 'yada'
];
is_deeply \@sql, $result, 'right query';
+@sql = $abstract->insert(
+ 'foo',
+ {bar => 'baz'},
+ {on_conflict => [['foo', 'bar'] => {foo => 'yada'}]}
+);
+$result = [
+ 'INSERT INTO "foo" ( "bar") VALUES ( ? )'
+ . ' ON CONFLICT ("foo", "bar") DO UPDATE SET "foo" = ?',
+ 'baz', 'yada'
+];
+is_deeply \@sql, $result, 'right query';
# ON CONFLICT (unsupported value)
eval { $abstract->insert('foo', {bar => 'baz'}, {on_conflict => [[], []]}) };
@@ -92,7 +103,7 @@
'right query';
@sql = $abstract->select(
'foo', '*',
- {bar => {'>' => 'baz'}},
+ {bar => {'>' => 'baz'}},
{group_by => ['bar'], having => {baz => {'<' => 'bar'}}}
);
$result = [
@@ -126,12 +137,24 @@
is_deeply \@sql,
['SELECT "bar", extract(epoch from baz) as baz, "yada" FROM "foo"'],
'right query';
+@sql = $abstract->select('foo', ['bar', \['? as baz', 'test'], 'yada']);
+is_deeply \@sql, ['SELECT "bar", ? as baz, "yada" FROM "foo"', 'test'],
+ 'right query';
# AS (unsupported value)
eval { $abstract->select('foo', [[]]) };
like $@, qr/field alias must be in the form \[\$name => \$alias\]/,
'right error';
+# JSON
+@sql = $abstract->update('foo', {bar => {-json => [1, 2, 3]}});
+is_deeply \@sql, ['UPDATE "foo" SET "bar" = ?', {json => [1, 2, 3]}],
+ 'right query';
+@sql = $abstract->select('foo', '*', {bar => {'=' => {-json => [1, 2, 3]}}});
+is_deeply \@sql,
+ ['SELECT * FROM "foo" WHERE ( "bar" = ? )', {json => [1, 2, 3]}],
+ 'right query';
+
# JOIN
@sql = $abstract->select(['foo', ['bar', foo_id => 'id']]);
is_deeply \@sql,
@@ -141,8 +164,9 @@
is_deeply \@sql,
['SELECT * FROM "foo" JOIN "bar" ON ("foo"."id" = "bar"."foo_id")'],
'right query';
-@sql = $abstract->select(
- ['foo', ['bar', foo_id => 'id'], ['baz', foo_id => 'id']]);
+@sql
+ = $abstract->select(['foo', ['bar', foo_id => 'id'], ['baz', foo_id => 'id']
+ ]);
$result
= [ 'SELECT * FROM "foo"'
. ' JOIN "bar" ON ("bar"."foo_id" = "foo"."id")'
1
0
Hello community,
here is the log from the commit of package byobu for openSUSE:Factory checked in at 2018-08-31 10:42:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/byobu (Old)
and /work/SRC/openSUSE:Factory/.byobu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "byobu"
Fri Aug 31 10:42:30 2018 rev:5 rq:631190 version:5.127
Changes:
--------
--- /work/SRC/openSUSE:Factory/byobu/byobu.changes 2018-05-29 10:48:21.728871573 +0200
+++ /work/SRC/openSUSE:Factory/.byobu.new/byobu.changes 2018-08-31 10:43:42.999150453 +0200
@@ -1,0 +2,47 @@
+Mon Aug 13 21:53:25 UTC 2018 - tejas.guruswamy(a)opensuse.org
+
+- update to 5.127. key changes:
+ * usr/share/byobu/profiles/bashrc:
+ - Googley PS1 for non-Ubuntu distros
+ * usr/lib/byobu/include/shutil, usr/lib/byobu/Makefile.am,
+ usr/lib/byobu/rcs_cost, usr/share/byobu/status/status,
+ usr/share/man/man1/byobu.1,
+ usr/lib/byobu/ec2_cost,
+ usr/lib/byobu/include/ec2instancespricing.py,
+ usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/shutil,
+ usr/lib/byobu/Makefile.am, usr/share/byobu/status/status,
+ usr/share/man/man1/byobu.1,
+ * usr/bin/byobu-janitor.in:
+ - deprecate unmaintained ec2/rcs pricing functionality
+ - this never really worked well, and these prices are constantly changing
+ - clear out stale status cache
+ * debian/control, usr/lib/byobu/ip_address, usr/lib/byobu/network,
+ usr/share/man/man1/wifi-status.1: LP: #1748956
+ - switch entirely to iproute2, away from net-tools and ifconfig
+ - only remaining ifconfig is fall-back logic, in case /sbin/ip is
+ not found
+ * usr/bin/byobu-select-profile.in, usr/share/man/man1/byobu-select-
+ profile.1: LP: #1717746
+ - deprecate interactive mode for byobu-select-profile
+ * usr/lib/byobu/include/toggle-utf8.in: LP: #1696546
+ - try to support zsh and other shells in addition to bash
+ * usr/share/byobu/profiles/bashrc:
+ - fix missing bash 256 ps1 colors
+ * usr/lib/byobu/include/constants, usr/share/byobu/keybindings/f-
+ keys.screen, usr/share/byobu/keybindings/f-keys.tmux:
+ - create a $BYOBU_EDITOR variable, using "sensible-editor" if found
+ (it will be on Debian/Ubuntu systems), or $EDITOR if not, and falling
+ back to "vim" in the case where none are found
+ - use $BYOBU_EDITOR with Shift-F7 to open the printscreen buffer in
+ a new window; this fixes a bug on some distros where $EDITOR might
+ be undefined
+ * usr/lib/byobu/session:
+ - don't count sessions that start with _ BUG: #892489
+ * usr/lib/byobu/updates_available:
+ - Fix rare race condition for update_needed and cache file (#26)
+ - https://github.com/dustinkirkland/byobu/pull/26
+ * byobu.desktop:
+ - give some hints for GNOME Shell to correctly match byobu desktop file
+ (LP: #1718482); partial fix, not entirely working yet
+
+-------------------------------------------------------------------
Old:
----
byobu_5.125.orig.tar.gz
byobu_5.125.orig.tar.gz.asc
New:
----
byobu_5.127.orig.tar.gz
byobu_5.127.orig.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ byobu.spec ++++++
--- /var/tmp/diff_new_pack.UMuTbY/_old 2018-08-31 10:43:43.543151100 +0200
+++ /var/tmp/diff_new_pack.UMuTbY/_new 2018-08-31 10:43:43.547151105 +0200
@@ -2,6 +2,7 @@
# spec file for package byobu
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 Tejas Guruswamy <tejas.guruswamy(a)opensuse.org>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +18,12 @@
Name: byobu
-Version: 5.125
+Version: 5.127
Release: 0
Summary: Enhanced profile and configuration utilities for GNU Screen and tmux
License: GPL-3.0-only
Group: System/Console
-Url: http://byobu.org/
+URL: http://byobu.org/
Source: https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}_%{version}…
Source1: https://launchpad.net/%{name}/trunk/%{version}/+download/..-%{name}_%{versi…
Source2: %{name}.keyring
@@ -39,14 +40,13 @@
Requires: net-tools
Requires: snack
Recommends: pastebinit
-Recommends: tmux
Recommends: sensible-utils
+Recommends: tmux
Suggests: %{name}-doc
Suggests: screen
Suggests: wireless-tools
BuildArch: noarch
%{perl_requires}
-%py_requires
%package doc
Summary: Documentation files for byobu
@@ -85,7 +85,8 @@
%fdupes %{buildroot}%{_mandir}/
%files
-%doc AUTHORS COPYING README
+%license COPYING
+%doc AUTHORS README
%config %{_sysconfdir}/profile.d/Z97-%{name}.*sh
%dir %{_sysconfdir}/%{name}/
%config(noreplace) %{_sysconfdir}/%{name}/*
++++++ byobu_5.125.orig.tar.gz -> byobu_5.127.orig.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/ChangeLog new/byobu-5.127/ChangeLog
--- old/byobu-5.125/ChangeLog 2018-03-16 17:28:28.000000000 +0100
+++ new/byobu-5.127/ChangeLog 2018-08-12 18:35:59.000000000 +0200
@@ -1,4 +1,90 @@
-byobu (5.125) released; urgency=medium
+byobu (5.127) released; urgency=medium
+
+ * usr/share/byobu/profiles/bashrc:
+ - Googley PS1 for non-Ubuntu distros
+ * usr/lib/byobu/logo, usr/share/byobu/profiles/bashrc:
+ - use Google lego logo for gLinux
+ * usr/lib/byobu/logo: LP: #1769676
+ - don't use the Ubuntu logo in the status line, as this breaks ssh
+ clients coming to Ubuntu from other OSes without the Ubuntu font
+ * usr/lib/byobu/include/shutil, usr/lib/byobu/Makefile.am,
+ usr/lib/byobu/rcs_cost, usr/share/byobu/status/status,
+ usr/share/man/man1/byobu.1,
+ usr/lib/byobu/ec2_cost,
+ usr/lib/byobu/include/ec2instancespricing.py,
+ usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/shutil,
+ usr/lib/byobu/Makefile.am, usr/share/byobu/status/status,
+ usr/share/man/man1/byobu.1,
+ * usr/bin/byobu-janitor.in:
+ - deprecate unmaintained ec2/rcs pricing functionality
+ - this never really worked well, and these prices are constantly changing
+ - clear out stale status cache
+ * debian/control, usr/lib/byobu/ip_address, usr/lib/byobu/network,
+ usr/share/man/man1/wifi-status.1: LP: #1748956
+ - switch entirely to iproute2, away from net-tools and ifconfig
+ - only remaining ifconfig is fall-back logic, in case /sbin/ip is
+ not found
+ * usr/share/byobu/desktop/byobu.desktop: LP: #1739708
+ - update categories so that Byobu can show up in Cinnamon/Mint's
+ preferred applications list
+ * usr/share/byobu/pixmaps/byobu.14.png,
+ usr/share/byobu/pixmaps/byobu.192.png,
+ usr/share/byobu/pixmaps/byobu.64.png,
+ usr/share/byobu/pixmaps/byobu.png:
+ - re-render png's, as Chrome started rendering middle color wrong
+ * usr/bin/byobu-select-profile.in, usr/share/man/man1/byobu-select-
+ profile.1: LP: #1717746
+ - deprecate interactive mode for byobu-select-profile
+ * usr/lib/byobu/include/toggle-utf8.in: LP: #1696546
+ - try to support zsh and other shells in addition to bash
+ * usr/bin/byobu-shell.in:
+ - update getting started to byobu.org
+ * usr/share/byobu/profiles/tmux: LP: #1617689
+ - add a comment about motd printing
+ * usr/share/man/man1/byobu.1: LP: #1618185
+ - update documentation on setting a logo
+ * debian/compat, debian/control:
+ * debian/compat, debian/control, usr/lib/byobu/include/config.py.in,
+ usr/lib/byobu/include/select-session.py:
+ - neverending fight with lintian
+ - hardcode python3 as our interpreter
+ * usr/lib/byobu/include/shutil:
+ - check for lsb-release before using (not present on Debian)
+ * usr/share/byobu/profiles/bashrc:
+ - fix missing bash 256 ps1 colors
+
+ -- Dustin Kirkland <kirkland(a)ubuntu.com> Sun, 27 May 2018 18:07:11 -0500
+
+byobu (5.126-0ubuntu1) cosmic; urgency=medium
+
+ [ Dustin Kirkland ]
+ * usr/lib/byobu/include/constants, usr/share/byobu/keybindings/f-
+ keys.screen, usr/share/byobu/keybindings/f-keys.tmux:
+ - create a $BYOBU_EDITOR variable, using "sensible-editor" if found
+ (it will be on Debian/Ubuntu systems), or $EDITOR if not, and falling
+ back to "vim" in the case where none are found
+ - use $BYOBU_EDITOR with Shift-F7 to open the printscreen buffer in
+ a new window; this fixes a bug on some distros where $EDITOR might
+ be undefined
+ * usr/lib/byobu/session:
+ - don't count sessions that start with _
+ - BUG: #892489
+ * usr/lib/byobu/include/shutil, usr/lib/byobu/logo:
+ - add a logo for gLinux
+
+ [ Mark Kelly ]
+ * usr/lib/byobu/updates_available:
+ - Fix rare race condition for update_needed and cache file (#26)
+ - https://github.com/dustinkirkland/byobu/pull/26
+
+ [ Didier Roche ]
+ * byobu.desktop:
+ - give some hints for GNOME Shell to correctly match byobu desktop file
+ (LP: #1718482); partial fix, not entirely working yet
+
+ -- Dustin Kirkland <kirkland(a)ubuntu.com> Sun, 27 May 2018 18:07:09 -0500
+
+byobu (5.125-0ubuntu1) bionic; urgency=medium
[ Jean-Baptiste Lallement ]
* usr/share/byobu/profiles/dircolors: LP: #1752352
@@ -15,7 +101,7 @@
* debian/control:
- need sensible-utils
- -- Dustin Kirkland <kirkland(a)ubuntu.com> Mon, 04 Dec 2017 07:46:48 -0600
+ -- Dustin Kirkland <kirkland(a)ubuntu.com> Fri, 16 Mar 2018 10:09:55 -0700
byobu (5.124-0ubuntu1) bionic; urgency=medium
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/bin/byobu-janitor.in new/byobu-5.127/usr/bin/byobu-janitor.in
--- old/byobu-5.125/usr/bin/byobu-janitor.in 2016-09-15 21:22:48.000000000 +0200
+++ new/byobu-5.127/usr/bin/byobu-janitor.in 2018-08-12 16:01:44.000000000 +0200
@@ -125,4 +125,7 @@
fi
[ -r "$BYOBU_CONFIG_DIR/prompt" ] || printf "[ -r ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc ] && . ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt"
+# Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses
+rm -f "$BYOBU_RUN_DIR"/cache.tmux/ec2_cost* "$BYOBU_RUN_DIR"/cache.tmux/rcs_cost* "$BYOBU_RUN_DIR"/status.tmux/ec2_cost* "$BYOBU_RUN_DIR"/status.tmux/rcs_cost*
+
# vi: syntax=sh ts=4 noexpandtab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/bin/byobu-select-profile.in new/byobu-5.127/usr/bin/byobu-select-profile.in
--- old/byobu-5.125/usr/bin/byobu-select-profile.in 2016-09-15 21:22:48.000000000 +0200
+++ new/byobu-5.127/usr/bin/byobu-select-profile.in 2018-08-12 16:41:24.000000000 +0200
@@ -59,13 +59,14 @@
usage () {
cat <<EOT
-Usage: $0 [(-l|--list)][(-h|--help)]
- -l,--list list available profiles
- -b,--background set the background color
- -f,--foreground set the foreground color
- -h,--help this help
-
- Without any parameters, runs interactively.
+Usage: $0 [OPTION]
+ -l,--list list available profiles
+ -b,--background COLOR set the background color
+ -f,--foreground COLOR set the foreground color
+ -h,--hostnmae set the colors based on a hash of the hostname
+ -i,--ip set the colors based on a hash of the ip
+ -r,--random set the colors randomly
+ --help this help
EOT
}
@@ -83,60 +84,6 @@
done
}
-prompt() {
- which="$1"
- count=1
- selected=-1
- while /bin/true; do
- if [ $count -gt 5 ]; then
- echo `gettext "ERROR: Invalid selection"`
- exit 1
- fi
- count=$(expr $count + 1)
- echo
- if [ "$which" = "foreground" ]; then
- echo `gettext 'Select the foreground color: '`
- simple="white"
- else
- echo `gettext 'Select the background color: '`
- simple="black"
- fi
- i=1
- for x in $COLORS; do
- test $i -lt 10 2>/dev/null && printf " " || printf " "
- echo "$i. $x"
- i=$(expr $i + 1)
- [ "$simple" = "$x" ] && simple=$i
- done
- echo
- if [ -z "$selected" -a -n "$simple" ]; then
- selected="$simple"
- elif ! test $selected -gt 0 2>/dev/null; then
- printf "`gettext 'Choose'` 1-$i [$simple]: "
- selected=`head -n1`
- elif ! test $selected -le $i 2>/dev/null; then
- printf "`gettext 'Choose'` 1-$i [$simple]: "
- selected=`head -n1`
- else
- i=1
- for color in $COLORS; do
- [ "$i" = "$selected" ] && break
- i=$(expr $i + 1)
- done
- echo `gettext "Selected"` "$which [$color]"
- case "$BYOBU_BACKEND" in
- screen)
- setcolor_screen "$which" "$color"
- ;;
- tmux|*)
- setcolor_tmux "$color"
- ;;
- esac
- return 0
- fi
- done
-}
-
getletter() {
count=$(echo "$1" | wc -c)
if [ "$count" = "2" ]; then
@@ -214,12 +161,7 @@
}
if [ $# -eq 0 ]; then
- prompt "background"
- case "$BYOBU_BACKEND" in
- screen)
- prompt "foreground"
- ;;
- esac
+ usage
else
while true; do
case "$1" in
@@ -231,11 +173,6 @@
setcolor_screen "foreground" "$2"
shift 2
;;
- -l|--list)
- listprofiles
- shift
- break
- ;;
-h|--hostname)
color=$(hostname | $HASH | head -c 6)
setcolor_tmux "$color"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/bin/byobu-shell.in new/byobu-5.127/usr/bin/byobu-shell.in
--- old/byobu-5.125/usr/bin/byobu-shell.in 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/bin/byobu-shell.in 2018-08-12 17:24:20.000000000 +0200
@@ -36,7 +36,7 @@
echo " 'byobu-disable' and 'byobu-enable'"
echo
echo "For tips, tricks, and more information, see:"
- echo " * http://bit.ly/byobu-help"
+ echo " * https://bit.ly/byobu-tips"
echo
touch "$FLAG"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/bin/byobu.in new/byobu-5.127/usr/bin/byobu.in
--- old/byobu-5.125/usr/bin/byobu.in 2017-12-04 14:46:48.000000000 +0100
+++ new/byobu-5.127/usr/bin/byobu.in 2018-08-12 17:40:31.000000000 +0200
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-VERSION=5.125
+VERSION=5.127
PKG="byobu"
# All sorts of things go wrong if you don't own your $HOME dir.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/Makefile.am new/byobu-5.127/usr/lib/byobu/Makefile.am
--- old/byobu-5.125/usr/lib/byobu/Makefile.am 2013-12-03 19:02:14.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/Makefile.am 2018-08-12 15:53:44.000000000 +0200
@@ -1,3 +1,3 @@
libdirdir = $(prefix)/lib/@PACKAGE@
-libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
+libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy fan_speed hostname ip_address load_average logo mail memory menu network processes raid reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/Makefile.in new/byobu-5.127/usr/lib/byobu/Makefile.in
--- old/byobu-5.125/usr/lib/byobu/Makefile.in 2018-03-16 17:28:28.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/Makefile.in 2018-08-12 18:35:59.000000000 +0200
@@ -222,7 +222,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libdirdir = $(prefix)/lib/@PACKAGE@
-libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
+libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy fan_speed hostname ip_address load_average logo mail memory menu network processes raid reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
all: all-am
.SUFFIXES:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/ec2_cost new/byobu-5.127/usr/lib/byobu/ec2_cost
--- old/byobu-5.125/usr/lib/byobu/ec2_cost 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/ec2_cost 1970-01-01 01:00:00.000000000 +0100
@@ -1,107 +0,0 @@
-#!/bin/sh -e
-#
-# ec2_cost: approximate EC2 cost (USD) of the current instance
-#
-# Copyright (C) 2008 Canonical Ltd.
-# Copyright (C) 2011-2014 Dustin Kirkland
-#
-# Authors: Dustin Kirkland <kirkland(a)byobu.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, version 3 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Data Transfer Cost Basis
-# Incoming $0.01/GB
-# Outgoing $0.12/GB
-# (This gets more complex if you use >10TB/mo)
-RX_RATE="0.01"
-TX_RATE="0.12"
-
-__ec2_cost_detail() {
- DETAIL=1
- __ec2_cost
-}
-
-__ec2_cost() {
- local zone type file_to_stat cpu mem rate hours tx_gb rx_gb network_cost uptime_cost total_cost interface cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/ec2_cost"
- if [ -s "$cache.rate" ]; then
- read rate < "$cache.rate"
- elif metadata_available; then
- # Try to use metadata service
- [ -s "$cache.zone" ] || timeout 0.2 wget -q -O- http://169.254.169.254/latest/meta-data/placement/availability-zone </dev/null >"$cache.zone" 2>/dev/null &
- sleep 0.02
- [ -s "$cache.zone" ] && read zone < "$cache.zone"
- zone=${zone%%[a-z]}
- [ -s "$cache.type" ] || timeout 0.2 wget -q -O- http://169.254.169.254/latest/meta-data/instance-type </dev/null >"$cache.type" 2>/dev/null &
- sleep 0.02
- [ -s "$cache.type" ] && read type < "$cache.type"
- $BYOBU_PREFIX/lib/byobu/include/ec2instancespricing.py --type ondemand --filter-region $zone --filter-type $type --filter-os-type linux --format csv | tail -n1 > "$cache.rate"
- read rate < "$cache.rate"
- fi
- if [ -z "$rate" ]; then
- # Unknown rate, exit immediately
- # Rate estimation is now deprecated
- return
- fi
- rate=${rate##*,}
- file_to_stat="/etc/hostname"
- hours=$(((`date +%s` - `stat --printf %Y $file_to_stat`) / 60 / 60 + 1))
- # Auto detect network interface
- [ -r "/proc/net/route" ] || return
- interface=$(tail -n1 /proc/net/route | awk '{print $1}')
- local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed
- while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
- case "$iface" in
- ${interface}:)
- tx_gb=${tbytes}
- rx_gb=${rbytes}
- break;
- ;;
- ${interface}:*)
- # Interface and rbytes got munged together
- tx_gb=${rmulticast##*:}
- rx_gb=${iface##*:}
- break;
- ;;
- esac
- if [ "$iface" = "${interface}:" ]; then
- tx_gb=${tbytes}
- rx_gb=${rbytes}
- break
- fi
- done < /proc/net/dev
- tx_gb=$(printf "%s" ${tx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
- rx_gb=$(printf "%s" ${rx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
- network_cost=`printf "%s %s %s %s" "$tx_gb" "$TX_RATE" "$rx_gb" "$RX_RATE" | awk '{printf "%f %f", $1*$2, $3*$4}' | awk '{printf "%f", $1 + $2}'`
- # Calculate uptime cost
- uptime_cost=`printf "%s" "$hours" | awk "{printf \"%f\", "$rate" * $hours}"`
- total_cost=`printf "%s %s" "$network_cost" "$uptime_cost" | awk '{printf "%.2f", $1 + $2}'`
- if [ "$DETAIL" = "1" ]; then
- echo "================================================"
- echo "Estimated cost in Amazon's EC2 since last reboot"
- echo "================================================"
- echo " Network sent: $tx_gb GB @ \$$RX_RATE/GB"
- echo " Network recv: $rx_gb GB @ \$$TX_RATE/GB"
- echo " Network cost: \$$network_cost"
- echo "------------------------------------------------"
- echo " Uptime: $hours hr @ \$$rate/hr"
- echo " Uptime cost: \$$uptime_cost"
- echo "------------------------------------------------"
- echo "Total cost: ~\$$total_cost"
- echo "================================================"
- return
- fi
- [ -n "$total_cost" ] || return
- color K G; printf "A\$"; color -; color b K G; printf "%s" "$total_cost"; color --
-}
-
-# vi: syntax=sh ts=4 noexpandtab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/Makefile.am new/byobu-5.127/usr/lib/byobu/include/Makefile.am
--- old/byobu-5.125/usr/lib/byobu/include/Makefile.am 2016-07-05 17:37:45.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/include/Makefile.am 2018-08-12 15:54:59.000000000 +0200
@@ -1,2 +1,2 @@
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
-inclibdir_SCRIPTS = common colors config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8
+inclibdir_SCRIPTS = common colors config.py constants cycle-status dirs icons mondrian notify_osd shutil select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/Makefile.in new/byobu-5.127/usr/lib/byobu/include/Makefile.in
--- old/byobu-5.125/usr/lib/byobu/include/Makefile.in 2018-03-16 17:28:28.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/include/Makefile.in 2018-08-12 18:35:59.000000000 +0200
@@ -223,7 +223,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
-inclibdir_SCRIPTS = common colors config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8
+inclibdir_SCRIPTS = common colors config.py constants cycle-status dirs icons mondrian notify_osd shutil select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8
all: all-am
.SUFFIXES:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/config.py.in new/byobu-5.127/usr/lib/byobu/include/config.py.in
--- old/byobu-5.125/usr/lib/byobu/include/config.py.in 2017-08-17 23:53:22.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/include/config.py.in 2018-08-12 18:17:32.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# config.py
# Copyright (C) 2008 Canonical Ltd.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/constants new/byobu-5.127/usr/lib/byobu/include/constants
--- old/byobu-5.125/usr/lib/byobu/include/constants 2016-09-15 21:22:48.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/include/constants 2018-05-27 21:30:52.000000000 +0200
@@ -47,6 +47,9 @@
eval $BYOBU_TEST gsed >/dev/null 2>&1 && export BYOBU_SED="gsed" || export BYOBU_SED="sed"
eval $BYOBU_TEST greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
eval $BYOBU_TEST sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
+eval $BYOBU_TEST sensible-editor >/dev/null 2>&1 && export BYOBU_EDITOR="sensible-editor" || export BYOBU_EDITOR="$EDITOR"
+eval $BYOBU_TEST "$BYOBU_EDITOR" >/dev/null 2>&1 || export BYOBU_EDITOR="vim"
+
# Check sed's follow-symlinks feature
$BYOBU_SED --follow-symlinks "s///" /dev/null 2>/dev/null && BYOBU_SED_INLINE="$BYOBU_SED -i --follow-symlinks" || BYOBU_SED_INLINE="$BYOBU_SED -i"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/ec2instancespricing.py new/byobu-5.127/usr/lib/byobu/include/ec2instancespricing.py
--- old/byobu-5.125/usr/lib/byobu/include/ec2instancespricing.py 2015-11-16 04:11:27.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/include/ec2instancespricing.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,582 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2012 Eran Sandler (eran(a)sandler.co.il), http://eran.sandler.co.il, http://forecastcloudy.net
-#
-# 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.
-#
-from __future__ import print_function
-from future import standard_library
-standard_library.install_aliases()
-from builtins import object
-import urllib.request, urllib.error, urllib.parse
-import argparse
-import datetime
-try:
- import simplejson as json
-except ImportError:
- import json
-
-EC2_REGIONS = [
- "us-east-1",
- "us-west-1",
- "us-west-2",
- "eu-west-1",
- "ap-southeast-1",
- "ap-southeast-2",
- "ap-northeast-1",
- "sa-east-1"
-]
-
-EC2_INSTANCE_TYPES = [
- "t1.micro",
- "m1.small",
- "m1.medium",
- "m1.large",
- "m1.xlarge",
- "m2.xlarge",
- "m2.2xlarge",
- "m2.4xlarge",
- "c1.medium",
- "c1.xlarge",
- "cc1.4xlarge",
- "cc2.8xlarge",
- "cg1.4xlarge",
- "cr1.8xlarge",
- "m3.xlarge",
- "m3.2xlarge",
- "hi1.4xlarge",
- "hs1.8xlarge",
- "g2.2xlarge"
-]
-
-EC2_OS_TYPES = [
- "linux", # api platform name = "linux"
- "mswin", # api platform name = "windows"
- "rhel", # api platform name = ""
- "sles", # api platform name = ""
- "mswinSQL", # api platform name = "windows"
- "mswinSQLWeb", # api platform name = "windows"
-]
-
-JSON_NAME_TO_EC2_REGIONS_API = {
- "us-east" : "us-east-1",
- "us-east-1" : "us-east-1",
- "us-west" : "us-west-1",
- "us-west-1" : "us-west-1",
- "us-west-2" : "us-west-2",
- "eu-ireland" : "eu-west-1",
- "eu-west-1" : "eu-west-1",
- "apac-sin" : "ap-southeast-1",
- "ap-southeast-1" : "ap-southeast-1",
- "ap-southeast-2" : "ap-southeast-2",
- "apac-syd" : "ap-southeast-2",
- "apac-tokyo" : "ap-northeast-1",
- "ap-northeast-1" : "ap-northeast-1",
- "sa-east-1" : "sa-east-1"
-}
-
-EC2_REGIONS_API_TO_JSON_NAME = {
- "us-east-1" : "us-east",
- "us-west-1" : "us-west",
- "us-west-2" : "us-west-2",
- "eu-west-1" : "eu-ireland",
- "ap-southeast-1" : "apac-sin",
- "ap-southeast-2" : "apac-syd",
- "ap-northeast-1" : "apac-tokyo",
- "sa-east-1" : "sa-east-1"
-}
-
-INSTANCES_ON_DEMAND_LINUX_URL = "http://aws.amazon.com/ec2/pricing/json/linux-od.json"
-INSTANCES_ON_DEMAND_RHEL_URL = "http://aws.amazon.com/ec2/pricing/json/rhel-od.json"
-INSTANCES_ON_DEMAND_SLES_URL = "http://aws.amazon.com/ec2/pricing/json/sles-od.json"
-INSTANCES_ON_DEMAND_WINDOWS_URL = "http://aws.amazon.com/ec2/pricing/json/mswin-od.json"
-INSTANCES_ON_DEMAND_WINSQL_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQL-od.json"
-INSTANCES_ON_DEMAND_WINSQLWEB_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQLWeb-od.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_LINUX_URL = "http://aws.amazon.com/ec2/pricing/json/linux-ri-light.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_RHEL_URL = "http://aws.amazon.com/ec2/pricing/json/rhel-ri-light.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_SLES_URL = "http://aws.amazon.com/ec2/pricing/json/sles-ri-light.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_WINDOWS_URL = "http://aws.amazon.com/ec2/pricing/json/mswin-ri-light.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQL_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQL-ri-light.json"
-INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQLWEB_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQLWeb-ri-light.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_LINUX_URL = "http://aws.amazon.com/ec2/pricing/json/linux-ri-medium.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_RHEL_URL = "http://aws.amazon.com/ec2/pricing/json/rhel-ri-medium.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_SLES_URL = "http://aws.amazon.com/ec2/pricing/json/sles-ri-medium.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINDOWS_URL = "http://aws.amazon.com/ec2/pricing/json/mswin-ri-medium.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQL_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQL-ri-medium.json"
-INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQLWEB_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQLWeb-ri-medium.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_LINUX_URL = "http://aws.amazon.com/ec2/pricing/json/linux-ri-heavy.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_RHEL_URL = "http://aws.amazon.com/ec2/pricing/json/rhel-ri-heavy.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_SLES_URL = "http://aws.amazon.com/ec2/pricing/json/sles-ri-heavy.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_WINDOWS_URL = "http://aws.amazon.com/ec2/pricing/json/mswin-ri-heavy.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQL_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQL-ri-heavy.json"
-INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQLWEB_URL = "http://aws.amazon.com/ec2/pricing/json/mswinSQLWeb-ri-heavy.json"
-
-INSTANCES_ONDEMAND_OS_TYPE_BY_URL = {
- INSTANCES_ON_DEMAND_LINUX_URL : "linux",
- INSTANCES_ON_DEMAND_RHEL_URL : "rhel",
- INSTANCES_ON_DEMAND_SLES_URL : "sles",
- INSTANCES_ON_DEMAND_WINDOWS_URL : "mswin",
- INSTANCES_ON_DEMAND_WINSQL_URL : "mswinSQL",
- INSTANCES_ON_DEMAND_WINSQLWEB_URL : "mswinSQLWeb",
-}
-
-INSTANCES_RESERVED_OS_TYPE_BY_URL = {
- INSTANCES_RESERVED_LIGHT_UTILIZATION_LINUX_URL : "linux",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_RHEL_URL : "rhel",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_SLES_URL : "sles",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINDOWS_URL : "mswin",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQL_URL : "mswinSQL",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQLWEB_URL : "mswinSQLWeb",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_LINUX_URL : "linux",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_RHEL_URL : "rhel",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_SLES_URL : "sles",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINDOWS_URL : "mswin",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQL_URL : "mswinSQL",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQLWEB_URL : "mswinSQLWeb",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_LINUX_URL : "linux",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_RHEL_URL : "rhel",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_SLES_URL : "sles",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINDOWS_URL : "mswin",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQL_URL : "mswinSQL",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQLWEB_URL : "mswinSQLWeb",
-}
-
-INSTANCES_RESERVED_UTILIZATION_TYPE_BY_URL = {
- INSTANCES_RESERVED_LIGHT_UTILIZATION_LINUX_URL : "light",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_RHEL_URL : "light",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_SLES_URL : "light",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINDOWS_URL : "light",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQL_URL : "light",
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQLWEB_URL : "light",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_LINUX_URL : "medium",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_RHEL_URL : "medium",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_SLES_URL : "medium",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINDOWS_URL : "medium",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQL_URL : "medium",
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQLWEB_URL : "medium",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_LINUX_URL : "heavy",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_RHEL_URL : "heavy",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_SLES_URL : "heavy",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINDOWS_URL : "heavy",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQL_URL : "heavy",
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQLWEB_URL : "heavy",
-}
-
-DEFAULT_CURRENCY = "USD"
-
-INSTANCE_TYPE_MAPPING = {
- "stdODI" : "m1",
- "uODI" : "t1",
- "hiMemODI" : "m2",
- "hiCPUODI" : "c1",
- "clusterComputeI" : "cc1",
- "clusterGPUI" : "cg1",
- "hiIoODI" : "hi1",
- "secgenstdODI" : "m3",
- "hiStoreODI": "hs1",
- "clusterHiMemODI": "cr1",
-
- # Reserved Instance Types
- "stdResI" : "m1",
- "uResI" : "t1",
- "hiMemResI" : "m2",
- "hiCPUResI" : "c1",
- "clusterCompResI" : "cc1",
- "clusterGPUResI" : "cg1",
- "hiIoResI" : "hi1",
- "secgenstdResI" : "m3",
- "hiStoreResI": "hs1",
- "clusterHiMemResI": "cr1"
-}
-
-INSTANCE_SIZE_MAPPING = {
- "u" : "micro",
- "sm" : "small",
- "med" : "medium",
- "lg" : "large",
- "xl" : "xlarge",
- "xxl" : "2xlarge",
- "xxxxl" : "4xlarge",
- "xxxxxxxxl" : "8xlarge"
-}
-
-class ResultsCacheBase(object):
- _instance = None
-
- def __new__(cls, *args, **kwargs):
- if not cls._instance:
- cls._instance = super(ResultsCacheBase, cls).__new__(cls, *args, **kwargs)
-
- return cls._instance
-
- def get(self, key):
- pass
-
- def set(self, key, value):
- pass
-
-
-class SimpleResultsCache(ResultsCacheBase):
- _cache = {}
-
- def get(self, key):
- if key in self._cache:
- return self._cache[key]
-
- return None
-
- def set(self, key, value):
- self._cache[key] = value
-
-
-class TimeBasedResultsCache(ResultsCacheBase):
- _cache = {}
- _cache_expiration = {}
-
- # If you wish to chance this expiration use the following (a bit ugly) code:
- #
- # TimeBasedResultsCache()._default_expiration_in_seconds = 86400 # 1 day
- #
- # Since all cache classes inherit from ResultsCacheBase and are singletons that should set it correctly.
- #
- _default_expiration_in_seconds = 3600 # 1 hour
-
- def get(self, key):
- if key not in self._cache or key not in self._cache_expiration:
- return None
-
- # If key has expired return None
- if self._cache_expiration[key] < datetime.datetime.utcnow():
- if key in self._cache: del self._cache[key]
- if key in self._cache_expiration: del self._cache_expiration[key]
-
- return None
-
- return self._cache[key]
-
- def set(self, key, value):
- self._cache[key] = value
- self._cache_expiration[key] = datetime.datetime.utcnow() + datetime.timedelta(seconds=self._default_expiration_in_seconds)
-
-
-def _load_data(url, use_cache=False, cache_class=SimpleResultsCache):
- cache_object = None
- if use_cache:
- cache_object = cache_class()
- result = cache_object.get(url)
- if result is not None:
- return result
-
- f = urllib.request.urlopen(url)
- result = json.loads(f.read())
-
- if use_cache:
- cache_object.set(url, result)
-
- return result
-
-def get_ec2_reserved_instances_prices(filter_region=None, filter_instance_type=None, filter_os_type=None, use_cache=False, cache_class=SimpleResultsCache):
- """ Get EC2 reserved instances prices. Results can be filtered by region """
-
- get_specific_region = (filter_region is not None)
- if get_specific_region:
- filter_region = EC2_REGIONS_API_TO_JSON_NAME[filter_region]
- get_specific_instance_type = (filter_instance_type is not None)
- get_specific_os_type = (filter_os_type is not None)
-
- currency = DEFAULT_CURRENCY
-
- urls = [
- INSTANCES_RESERVED_LIGHT_UTILIZATION_LINUX_URL,
- INSTANCES_RESERVED_LIGHT_UTILIZATION_RHEL_URL,
- INSTANCES_RESERVED_LIGHT_UTILIZATION_SLES_URL,
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINDOWS_URL,
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQL_URL,
- INSTANCES_RESERVED_LIGHT_UTILIZATION_WINSQLWEB_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_LINUX_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_RHEL_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_SLES_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINDOWS_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQL_URL,
- INSTANCES_RESERVED_MEDIUM_UTILIZATION_WINSQLWEB_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_LINUX_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_RHEL_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_SLES_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINDOWS_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQL_URL,
- INSTANCES_RESERVED_HEAVY_UTILIZATION_WINSQLWEB_URL,
- ]
-
- result_regions = []
- result_regions_index = {}
- result = {
- "config" : {
- "currency" : currency,
- },
- "regions" : result_regions
- }
-
- for u in urls:
- os_type = INSTANCES_RESERVED_OS_TYPE_BY_URL[u]
- if get_specific_os_type and os_type != filter_os_type:
- continue
- utilization_type = INSTANCES_RESERVED_UTILIZATION_TYPE_BY_URL[u]
- data = _load_data(u, use_cache=use_cache, cache_class=cache_class)
- if "config" in data and data["config"] and "regions" in data["config"] and data["config"]["regions"]:
- for r in data["config"]["regions"]:
- if "region" in r and r["region"]:
- if get_specific_region and filter_region != r["region"]:
- continue
-
- region_name = JSON_NAME_TO_EC2_REGIONS_API[r["region"]]
- if region_name in result_regions_index:
- instance_types = result_regions_index[region_name]["instanceTypes"]
- else:
- instance_types = []
- result_regions.append({
- "region" : region_name,
- "instanceTypes" : instance_types
- })
- result_regions_index[region_name] = result_regions[-1]
-
- if "instanceTypes" in r:
- for it in r["instanceTypes"]:
- instance_type = it["type"]
- if "sizes" in it:
- for s in it["sizes"]:
- instance_size = s["size"]
-
- prices = {
- "1year" : {
- "hourly" : None,
- "upfront" : None
- },
- "3year" : {
- "hourly" : None,
- "upfront" : None
- }
- }
-
- _type = instance_size
- if _type == "cc1.8xlarge":
- # Fix conflict where cc1 and cc2 share the same type
- _type = "cc2.8xlarge"
-
- if get_specific_instance_type and _type != filter_instance_type:
- continue
-
- if get_specific_os_type and os_type != filter_os_type:
- continue
-
- instance_types.append({
- "type" : _type,
- "os" : os_type,
- "utilization" : utilization_type,
- "prices" : prices
- })
-
- for price_data in s["valueColumns"]:
- price = None
- try:
- price = float(price_data["prices"][currency])
- except ValueError:
- price = None
-
- if price_data["name"] == "yrTerm1":
- prices["1year"]["upfront"] = price
- elif price_data["name"] == "yrTerm1Hourly":
- prices["1year"]["hourly"] = price
- elif price_data["name"] == "yrTerm3":
- prices["3year"]["upfront"] = price
- elif price_data["name"] == "yrTerm3Hourly":
- prices["3year"]["hourly"] = price
-
- return result
-
-def get_ec2_ondemand_instances_prices(filter_region=None, filter_instance_type=None, filter_os_type=None, use_cache=False, cache_class=SimpleResultsCache):
- """ Get EC2 on-demand instances prices. Results can be filtered by region """
-
- get_specific_region = (filter_region is not None)
- if get_specific_region:
- filter_region = EC2_REGIONS_API_TO_JSON_NAME[filter_region]
-
- get_specific_instance_type = (filter_instance_type is not None)
- get_specific_os_type = (filter_os_type is not None)
-
- currency = DEFAULT_CURRENCY
-
- urls = [
- INSTANCES_ON_DEMAND_LINUX_URL,
- INSTANCES_ON_DEMAND_RHEL_URL,
- INSTANCES_ON_DEMAND_SLES_URL,
- INSTANCES_ON_DEMAND_WINDOWS_URL,
- INSTANCES_ON_DEMAND_WINSQL_URL,
- INSTANCES_ON_DEMAND_WINSQLWEB_URL
- ]
-
- result_regions = []
- result = {
- "config" : {
- "currency" : currency,
- "unit" : "perhr"
- },
- "regions" : result_regions
- }
-
- for u in urls:
- if get_specific_os_type and INSTANCES_ONDEMAND_OS_TYPE_BY_URL[u] != filter_os_type:
- continue
-
- data = _load_data(u, use_cache=use_cache, cache_class=cache_class)
- if "config" in data and data["config"] and "regions" in data["config"] and data["config"]["regions"]:
- for r in data["config"]["regions"]:
- if "region" in r and r["region"]:
- if get_specific_region and filter_region != r["region"]:
- continue
-
- region_name = JSON_NAME_TO_EC2_REGIONS_API[r["region"]]
- instance_types = []
- if "instanceTypes" in r:
- for it in r["instanceTypes"]:
- instance_type = it["type"]
- if "sizes" in it:
- for s in it["sizes"]:
- instance_size = s["size"]
-
- for price_data in s["valueColumns"]:
- price = None
- try:
- price = float(price_data["prices"][currency])
- except ValueError:
- price = None
-
- _type = instance_size
- if _type == "cc1.8xlarge":
- # Fix conflict where cc1 and cc2 share the same type
- _type = "cc2.8xlarge"
-
- if get_specific_instance_type and _type != filter_instance_type:
- continue
-
- if get_specific_os_type and price_data["name"] != filter_os_type:
- continue
-
- instance_types.append({
- "type" : _type,
- "os" : price_data["name"],
- "price" : price
- })
-
- result_regions.append({
- "region" : region_name,
- "instanceTypes" : instance_types
- })
-
- return result
-
-
-if __name__ == "__main__":
- def none_as_string(v):
- if not v:
- return ""
- else:
- return v
-
- try:
- import argparse
- except ImportError:
- print("ERROR: You are running Python < 2.7. Please use pip to install argparse: pip install argparse")
-
-
- parser = argparse.ArgumentParser(add_help=True, description="Print out the current prices of EC2 instances")
- parser.add_argument("--type", "-t", help="Show ondemand or reserved instances", choices=["ondemand", "reserved"], required=True)
- parser.add_argument("--filter-region", "-fr", help="Filter results to a specific region", choices=EC2_REGIONS, default=None)
- parser.add_argument("--filter-type", "-ft", help="Filter results to a specific instance type", choices=EC2_INSTANCE_TYPES, default=None)
- parser.add_argument("--filter-os-type", "-fo", help="Filter results to a specific os type", choices=EC2_OS_TYPES, default=None)
- parser.add_argument("--format", "-f", choices=["json", "table", "csv"], help="Output format", default="table")
-
- args = parser.parse_args()
-
- if args.format == "table":
- try:
- from prettytable import PrettyTable
- except ImportError:
- print("ERROR: Please install 'prettytable' using pip: pip install prettytable")
-
- data = None
- if args.type == "ondemand":
- data = get_ec2_ondemand_instances_prices(args.filter_region, args.filter_type, args.filter_os_type)
- elif args.type == "reserved":
- data = get_ec2_reserved_instances_prices(args.filter_region, args.filter_type, args.filter_os_type)
-
- if args.format == "json":
- print(json.dumps(data))
- elif args.format == "table":
- x = PrettyTable()
-
- if args.type == "ondemand":
- try:
- x.set_field_names(["region", "type", "os", "price"])
- except AttributeError:
- x.field_names = ["region", "type", "os", "price"]
-
- try:
- x.aligns[-1] = "l"
- except AttributeError:
- x.align["price"] = "l"
-
- for r in data["regions"]:
- region_name = r["region"]
- for it in r["instanceTypes"]:
- x.add_row([region_name, it["type"], it["os"], none_as_string(it["price"])])
- elif args.type == "reserved":
- try:
- x.set_field_names(["region", "type", "os", "utilization", "term", "price", "upfront"])
- except AttributeError:
- x.field_names = ["region", "type", "os", "utilization", "term", "price", "upfront"]
-
- try:
- x.aligns[-1] = "l"
- x.aligns[-2] = "l"
- except AttributeError:
- x.align["price"] = "l"
- x.align["upfront"] = "l"
-
- for r in data["regions"]:
- region_name = r["region"]
- for it in r["instanceTypes"]:
- for term in it["prices"]:
- x.add_row([region_name, it["type"], it["os"], it["utilization"], term, none_as_string(it["prices"][term]["hourly"]), none_as_string(it["prices"][term]["upfront"])])
-
- print(x)
- elif args.format == "csv":
- if args.type == "ondemand":
- print("region,type,os,price")
- for r in data["regions"]:
- region_name = r["region"]
- for it in r["instanceTypes"]:
- print("%s,%s,%s,%s" % (region_name, it["type"], it["os"], none_as_string(it["price"])))
- elif args.type == "reserved":
- print("region,type,os,utilization,term,price,upfront")
- for r in data["regions"]:
- region_name = r["region"]
- for it in r["instanceTypes"]:
- for term in it["prices"]:
- print("%s,%s,%s,%s,%s,%s,%s" % (region_name, it["type"], it["os"], it["utilization"], term, none_as_string(it["prices"][term]["hourly"]), none_as_string(it["prices"][term]["upfront"])))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/select-session.py new/byobu-5.127/usr/lib/byobu/include/select-session.py
--- old/byobu-5.125/usr/lib/byobu/include/select-session.py 2018-03-15 22:26:45.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/include/select-session.py 2018-08-12 18:17:29.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# select-session.py
# Copyright (C) 2010 Canonical Ltd.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/shutil new/byobu-5.127/usr/lib/byobu/include/shutil
--- old/byobu-5.125/usr/lib/byobu/include/shutil 2017-06-02 15:28:30.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/include/shutil 2018-08-12 18:26:49.000000000 +0200
@@ -247,7 +247,6 @@
disk) _RET=13 ;;
disk_io) _RET=3 ;;
distro) _RET=9999991 ;;
- ec2_cost) _RET=601 ;;
entropy) _RET=5 ;;
fan_speed) _RET=23 ;;
hostname) _RET=607 ;;
@@ -261,7 +260,6 @@
notify_osd) _RET=9999991 ;;
processes) _RET=7 ;;
raid) _RET=59 ;;
- rcs_cost) _RET=613 ;;
reboot_required) _RET=5 ;;
release) _RET=599 ;;
services) _RET=53 ;;
@@ -318,6 +316,11 @@
true
elif [ -r "/etc/os-release" ]; then
distro=$(. /etc/os-release && echo "$NAME")
+ case "$distro" in
+ Debian*)
+ [ -r /etc/lsb-release ] && distro=$(. /etc/lsb-release && [ -n "$GOOGLE_ID" ] && echo "gLinux" || echo "Debian")
+ ;;
+ esac
elif [ -r "/etc/issue" ]; then
# lsb_release is *really* slow; try to use /etc/issue first
local issue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/include/toggle-utf8.in new/byobu-5.127/usr/lib/byobu/include/toggle-utf8.in
--- old/byobu-5.125/usr/lib/byobu/include/toggle-utf8.in 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/include/toggle-utf8.in 2018-08-12 17:09:35.000000000 +0200
@@ -39,7 +39,8 @@
export BYOBU_CHARMAP=UTF-8
fi
if [ -n "$TMUX" ]; then
- tmux send-keys " export BYOBU_CHARMAP=$BYOBU_CHARMAP ; . ~/.bashrc" \; send-keys Enter
+ RC_FILE=$(echo "$SHELL" | $BYOBU_SED "s:.*/::")
+ tmux send-keys " export BYOBU_CHARMAP=$BYOBU_CHARMAP ; . ~/.${RC_FILE}rc" \; send-keys Enter
fi
# vi: syntax=sh ts=4 noexpandtab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/ip_address new/byobu-5.127/usr/lib/byobu/ip_address
--- old/byobu-5.125/usr/lib/byobu/ip_address 2016-09-15 21:22:48.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/ip_address 2018-08-12 16:06:06.000000000 +0200
@@ -20,7 +20,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__ip_address_detail() {
- [ -x /sbin/ifconfig ] && /sbin/ifconfig
if [ -x /sbin/ip ]; then
/sbin/ip -4 addr list
/sbin/ip -6 addr list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/logo new/byobu-5.127/usr/lib/byobu/logo
--- old/byobu-5.125/usr/lib/byobu/logo 2016-07-29 15:00:36.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/logo 2018-08-12 15:42:11.000000000 +0200
@@ -37,7 +37,10 @@
if $MARKUP; then
if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
if [ ! "$VTE_CJK_WIDTH" = "1" ] && [ ! "$VTE_CJK_WIDTH" = "wide" ] ; then
- color "colour202" "colour255" ; printf " u "; color -
+ # color "colour202" "colour255" ; printf " u "; color -
+ # Ubuntu's logo doesn't display anywhere, except for on Ubuntu itself, which has the Ubuntu font with the logo
+ # which breaks when you ssh into Ubuntu from elsewhere (Windows, Debian, Mac)
+ color "colour202" "colour255" ; printf " u "; color -
else
color m W; printf " u "; color -
fi
@@ -84,6 +87,11 @@
logo=" > "
$MARKUP && printf "$(color b c w)%s$(color -)" "$logo" || printf "$logo"
;;
+ *glinux*)
+ logo=" G "
+ # Green: 3cba54=71, Yellow: f4c20d=214, Red: db3236=167, Blue: 4885ed=69
+ $MARKUP && printf "$(color colour0 colour69)██$(color colour0 colour167)■$(color colour0 colour214)■$(color colour0 colour69)▄$(color colour0 colour71)█$(color colour0 colour167)■$(color -)" || printf "$logo"
+ ;;
*mac*|*darwin*)
if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
# The Apple option character
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/network new/byobu-5.127/usr/lib/byobu/network
--- old/byobu-5.125/usr/lib/byobu/network 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/network 2018-08-12 16:05:18.000000000 +0200
@@ -21,7 +21,7 @@
__network_detail() {
get_network_interface; local interface="$_RET"
- LC_ALL=C /sbin/ifconfig "$interface" | $BYOBU_SED 's/\s*$//'
+ LC_ALL=C /sbin/ip addr show "$interface" | $BYOBU_SED 's/\s*$//'
}
__network() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/rcs_cost new/byobu-5.127/usr/lib/byobu/rcs_cost
--- old/byobu-5.125/usr/lib/byobu/rcs_cost 2016-01-14 13:15:11.000000000 +0100
+++ new/byobu-5.127/usr/lib/byobu/rcs_cost 1970-01-01 01:00:00.000000000 +0100
@@ -1,99 +0,0 @@
-#!/bin/sh -e
-#
-# rcs_cost: approximate Rackspace Cloud Server cost (USD) of the current instance
-#
-# Copyright (C) 2009-2010 Jon Bernard
-# Copyright (C) 2011-2014 Dustin Kirkland
-#
-# Author(s): Jon Bernard <jbernard(a)debian.org>
-# Dustin Kirkland <kirkland(a)byobu.org>
-#
-# Derived from byobu's ec2_cost written by Dustin Kirkland, see
-# Byobu's project page: http://byobu.org for more information
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, version 3 of the License.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-
-__rcs_cost_detail() {
- DETAIL=1
- __rcs_cost
-}
-
-__rcs_cost() {
- # Approximate Instance Cost Basis
- # Memory US
- # 256MB $0.015/h
- # 512MB $0.030/h
- # 1024MB $0.060/h
- # 2048MB $0.120/h
- # 4096MB $0.240/h
- # 8192MB $0.480/h
- # 15872MB $0.960/h
-
- # Instance memory
- memory=`grep "^MemTotal:" /proc/meminfo | awk '{print $2}'`
-
- # Round memory down to the nearest multiple of 64MB
- memory=$((${memory} - (${memory} % (64 * 1024))))
-
- # Apply the going rate
- INCREMENTS="256 512 1024 2048 4096 8192 16384 32768 65536"
- for X in ${INCREMENTS}; do
- test "$((${X} * 1024 + 65536))" -ge ${memory} && break
- done
- MEMORY_RATE=`printf "%s" "$X" | awk '{printf "%f", $1 / 256 * 15 / 1000}'`
-
- # Data Transfer Cost Basis
- # Incoming $0.08/GB
- # Outgoing $0.22/GB
- RX_RATE="0.08"
- TX_RATE="0.22"
-
- # Auto detect network interface
- [ -r "/proc/net/route" ] || return
- IF=$(tail -n1 /proc/net/route | awk '{print $1}')
-
- ifconfig_out=`LC_ALL=C /sbin/ifconfig "$IF"`
-
- # Calculate bandwidth cost
- tx_gb=${ifconfig_out#*RX bytes:}
- tx_gb=$(printf "%s" ${tx_gb%% *} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
- rx_gb=${ifconfig_out#*TX bytes:}
- rx_gb=$(printf "%s" ${rx_gb%% *} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
- network_cost=`printf "%s" "$tx_gb" "$TX_RATE" "$rx_gb" "$RX_RATE" | awk '{printf "%f %f", $1*$2, $3*$4}' | awk '{printf "%f", $1 + $2}'`
-
- # Calculate uptime cost
- hours=$(((`date +%s` - `stat --printf %Z /etc/hostname`) / 60 / 60 + 1))
- uptime_cost=`printf "%s" "$hours" | awk "{printf \"%f\", "$MEMORY_RATE" * $hours}"`
- total_cost=`printf "%s %s" "$network_cost" "$uptime_cost" | awk '{printf "%.2f", $1 + $2}'`
-
- if [ "$DETAIL" = "1" ]; then
- echo "=========================================================="
- echo "Estimated cost in Rackspace Cloud Server since last reboot"
- echo "=========================================================="
- echo " Network sent: $tx_gb GB @ \$$RX_RATE/GB"
- echo " Network recv: $rx_gb GB @ \$$TX_RATE/GB"
- echo " Network cost: \$$network_cost"
- echo "----------------------------------------------------------"
- echo " Uptime: $hours hr @ \$$MEMORY_RATE/hr"
- echo " Uptime cost: \$$uptime_cost"
- echo "----------------------------------------------------------"
- echo "Total cost: ~\$$total_cost"
- echo "=========================================================="
- return
- fi
-
- [ -n "$total_cost" ] || return
- color K G; printf "R\$%s"; color -; color b K G; printf "%s" "$total_cost"; color --
-}
-
-# vi: syntax=sh ts=4 noexpandtab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/session new/byobu-5.127/usr/lib/byobu/session
--- old/byobu-5.125/usr/lib/byobu/session 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/session 2018-05-27 21:30:52.000000000 +0200
@@ -26,7 +26,7 @@
# Note: This will only work in byobu-tmux
case "$BYOBU_BACKEND" in
tmux)
- local count=$(tmux list-sessions 2>/dev/null | wc -l)
+ local count=$(tmux list-sessions 2>/dev/null | grep -v "^_" | wc -l)
if [ $count -gt 1 ]; then
color u W k; printf "${ICON_SESSION}#S"; color --
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/lib/byobu/updates_available new/byobu-5.127/usr/lib/byobu/updates_available
--- old/byobu-5.125/usr/lib/byobu/updates_available 2016-09-15 21:22:48.000000000 +0200
+++ new/byobu-5.127/usr/lib/byobu/updates_available 2018-05-27 21:53:59.000000000 +0200
@@ -50,7 +50,7 @@
# Ensure that no more than one of these run at a given time
if [ -x /usr/lib/update-notifier/apt-check ]; then
# If apt-check binary exists, use it
- flock -xn "$flock" /usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print $1, $2 }' >"$mycache" 2>/dev/null &
+ flock -xn "$flock" sh -c "(/usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print \$1, \$2 }' >\"${mycache}-x\" 2>/dev/null ; mv \"${mycache}-x\" \"$mycache\")" &
elif eval $BYOBU_TEST apt-get >/dev/null; then
# If apt-get exists, use it
flock -xn "$flock" apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst >$mycache 2>/dev/null &
@@ -85,8 +85,17 @@
[ ! -e "$mycache" ] && return 0
if eval $BYOBU_TEST apt-get >/dev/null; then
# Debian/ubuntu
- [ "/var/lib/apt" -nt "$mycache" ] || [ "/var/lib/apt/lists" -nt "$mycache" ]
- return $?
+ d0=$(($(stat -c %Y $mycache 2>/dev/null)-5))
+ d1=$(stat -c %Y /var/lib/apt)
+ d2=$(stat -c %Y /var/lib/apt/lists)
+ d3=$(stat -c %Y /var/log/dpkg.log)
+ now=$(date +%s)
+ delta=$(($now-$d0))
+ if [ $d0 -lt 0 ] || [ $d0 -lt $d1 ] || [ $d0 -lt $d2 ] || [ $d0 -lt $d3 ] || [ 3605 -lt $delta ] ; then
+ return 0
+ else
+ return 1
+ fi
elif [ -e "/var/lib/PackageKit/transactions.db" ]; then
[ "/var/lib/PackageKit/transactions.db" -nt "$mycache" ]
return $?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/desktop/byobu.desktop new/byobu-5.127/usr/share/byobu/desktop/byobu.desktop
--- old/byobu-5.125/usr/share/byobu/desktop/byobu.desktop 2017-11-07 07:12:38.000000000 +0100
+++ new/byobu-5.127/usr/share/byobu/desktop/byobu.desktop 2018-08-12 16:09:35.000000000 +0200
@@ -2,7 +2,8 @@
Name=Byobu Terminal
Comment=Advanced Command Line and Text Window Manager
Icon=byobu
-Exec=gnome-terminal --app-id us.kirkland.terminals.byobu -e byobu
+Exec=gnome-terminal --app-id us.kirkland.terminals.byobu --class=us.kirkland.terminals.byobu -e byobu
Type=Application
-Categories=GNOME;GTK;Utility;
+Categories=GNOME;GTK;System;Utility;TerminalEmulator;
+StartupWMClass=us.kirkland.terminals.byobu
X-GNOME-Gettext-Domain=byobu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/keybindings/f-keys.screen new/byobu-5.127/usr/share/byobu/keybindings/f-keys.screen
--- old/byobu-5.125/usr/share/byobu/keybindings/f-keys.screen 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/share/byobu/keybindings/f-keys.screen 2018-08-12 16:35:30.000000000 +0200
@@ -74,7 +74,7 @@
# No ctrl-shift-F8 (save layout) in Screen
bindkey -k k9 $BYOBU_BACKEND -t config 0 byobu-config # F9 | Configuration
register s "[g G$>^h" # Goes with Shift-F7 and F12 ~ definition
-bindkey "^[[18;2~" eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $EDITOR $BYOBU_RUN_DIR/printscreen' # Shift-F7 | write the buffer to file, open in a new window
+bindkey "^[[18;2~" eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen' # Shift-F7 | write the buffer to file, open in a new window
# F10 | 'toolbar' in gnome-terminal
# F11 | 'Full Screen' in gnome-terminal
# No alt-F11 (break pane) in Screen
@@ -84,7 +84,7 @@
bind $ $BYOBU_BACKEND -t status 0 byobu-status-detail # F12 $ | show detailed status
bind @ $BYOBU_BACKEND -t config 0 byobu-config # F12 @ | Configuration
bind R process r # F12 R | Reload profile
-bind ~ eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $EDITOR $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
+bind ~ eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
register d ":source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable^M"
bind ! eval 'process x' 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys' # F12 ! | toggle on/off f-keys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/keybindings/f-keys.tmux new/byobu-5.127/usr/share/byobu/keybindings/f-keys.tmux
--- old/byobu-5.125/usr/share/byobu/keybindings/f-keys.tmux 2016-04-08 00:05:52.000000000 +0200
+++ new/byobu-5.127/usr/share/byobu/keybindings/f-keys.tmux 2018-05-27 21:30:52.000000000 +0200
@@ -62,7 +62,7 @@
bind-key -n S-F6 run-shell 'exec touch $BYOBU_RUN_DIR/no-logout' \; detach
bind-key -n C-F6 kill-pane
bind-key -n F7 copy-mode
-bind-key -n S-F7 capture-pane -S -32768 \; save-buffer "$BYOBU_RUN_DIR/printscreen" \; delete-buffer \; new-window -n "PRINTSCREEN" "$EDITOR $BYOBU_RUN_DIR/printscreen"
+bind-key -n S-F7 capture-pane -S -32768 \; save-buffer "$BYOBU_RUN_DIR/printscreen" \; delete-buffer \; new-window -n "PRINTSCREEN" "$BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen"
bind-key -n M-NPage copy-mode \; send-keys NPage
bind-key -n M-PPage copy-mode \; send-keys PPage
bind-key -n F8 command-prompt -p "(rename-window) " "rename-window '%%'"
Binary files old/byobu-5.125/usr/share/byobu/pixmaps/byobu.14.png and new/byobu-5.127/usr/share/byobu/pixmaps/byobu.14.png differ
Binary files old/byobu-5.125/usr/share/byobu/pixmaps/byobu.192.png and new/byobu-5.127/usr/share/byobu/pixmaps/byobu.192.png differ
Binary files old/byobu-5.125/usr/share/byobu/pixmaps/byobu.64.png and new/byobu-5.127/usr/share/byobu/pixmaps/byobu.64.png differ
Binary files old/byobu-5.125/usr/share/byobu/pixmaps/byobu.png and new/byobu-5.127/usr/share/byobu/pixmaps/byobu.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/profiles/bashrc new/byobu-5.127/usr/share/byobu/profiles/bashrc
--- old/byobu-5.125/usr/share/byobu/profiles/bashrc 2017-10-11 23:08:33.000000000 +0200
+++ new/byobu-5.127/usr/share/byobu/profiles/bashrc 2018-08-12 18:32:10.000000000 +0200
@@ -53,8 +53,8 @@
fi
;;
*)
- # Use nice colors (green / red / blue)
- PS1="${debian_chroot:+($debian_chroot)}\[\e[31m\]\$(byobu_prompt_status)\[\e[00;32m\]\u\[\e[00m\]@\[\e[00;31m\]\h\[\e[00m\]:\[\e[00;36m\]\w\[\e[00m\]\$(byobu_prompt_symbol) "
+ # Use Googley colors (blue / red / yellow / blue / green / red )
+ PS1="${debian_chroot:+($debian_chroot)}\[\e[31m\]\$(byobu_prompt_status)\[\e[38;5;69m\]\u\[\e[38;5;214m\]@\[\e[38;5;167m\]\h\[\e[38;5;214m\]:\[\e[38;5;71m\]\w\[\e[38;5;214m\]\$(byobu_prompt_symbol)\e[00m\] "
;;
esac
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/profiles/tmux new/byobu-5.127/usr/share/byobu/profiles/tmux
--- old/byobu-5.125/usr/share/byobu/profiles/tmux 2017-02-09 20:59:51.000000000 +0100
+++ new/byobu-5.127/usr/share/byobu/profiles/tmux 2018-08-12 17:52:36.000000000 +0200
@@ -75,6 +75,8 @@
# Must set default-command to $SHELL, in order to not source ~/.profile
# BUG: Should *not* hardcode /bin/bash here
+# Use byobu-shell here, to show MOTD, but would do so with every new window and split
+#set -g default-command 'exec byobu-shell'
set -g default-command $SHELL
set -g status-bg $BYOBU_DARK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/byobu/status/status new/byobu-5.127/usr/share/byobu/status/status
--- old/byobu-5.125/usr/share/byobu/status/status 2016-07-29 17:16:14.000000000 +0200
+++ new/byobu-5.127/usr/share/byobu/status/status 2018-08-12 15:54:04.000000000 +0200
@@ -26,12 +26,12 @@
screen_upper_left="color"
screen_upper_right="color whoami hostname ip_address menu"
screen_lower_left="color logo distro release #arch session"
-screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time"
+screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time"
# Tmux has one status line, with 2 halves for status
tmux_left="logo #distro release #arch session"
# You can have as many tmux right lines below here, and cycle through them using Shift-F5
-tmux_right="#network #disk_io #custom #entropy raid reboot_required updates_available #apport #services #mail #users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #whoami #hostname #ip_address #time_utc date time"
-#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time"
-#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time"
-#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime #ec2_cost #rcs_cost fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time"
+tmux_right="#network #disk_io #custom #entropy raid reboot_required updates_available #apport #services #mail #users uptime #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #whoami #hostname #ip_address #time_utc date time"
+#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time"
+#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time"
+#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/man/man1/byobu-select-profile.1 new/byobu-5.127/usr/share/man/man1/byobu-select-profile.1
--- old/byobu-5.125/usr/share/man/man1/byobu-select-profile.1 2016-01-14 13:19:11.000000000 +0100
+++ new/byobu-5.127/usr/share/man/man1/byobu-select-profile.1 2018-08-12 16:42:39.000000000 +0200
@@ -3,7 +3,23 @@
byobu\-select\-profile \- select your Byobu foreground and background colors
.SH DESCRIPTION
-\fBbyobu\-select\-profile\fP is an application that lists the available Byobu colors and allows you to select the foreground and background color.
+\fBbyobu\-select\-profile\fP is an application that changes Byobu's status bar foreground and background colors
+
+.SH OPTIONS
+
+ -l,--list list available profiles
+
+ -b,--background COLOR set the background color
+
+ -f,--foreground COLOR set the foreground color
+
+ -h,--hostnmae set the colors based on a hash of the hostname
+
+ -i,--ip set the colors based on a hash of the ip
+
+ -r,--random set the colors randomly
+
+ --help this help
.SH "SEE ALSO"
.PD 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/man/man1/byobu.1 new/byobu-5.127/usr/share/man/man1/byobu.1
--- old/byobu-5.125/usr/share/man/man1/byobu.1 2016-11-28 18:33:06.000000000 +0100
+++ new/byobu-5.127/usr/share/man/man1/byobu.1 2018-08-12 17:55:20.000000000 +0200
@@ -51,14 +51,10 @@
\fBdistro\fP \- OS/distribution name of the release running on the current system as reported by \fBlsb_release(1)\fP or \fI/etc/issue\fP; displayed in the lower bar in bold black text toward the left on a grey background; you may override the detected release with DISTRO=Whatever in \fI$BYOBU_CONFIG_DIR/statusrc\fP
-\fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a black background; the monetary units are US Dollars '$'; this plugin only works when an AWS-compatible metadata server is available at \fIhttp://169.254.169.254\fP
-
\fBentropy\fP \- a count of the system's current entropy in bytes; displayed in the lower bar toward the right in yellow text on a dark grey background; there is a leading 'e' to indicate 'entropy'
\fBraid\fP \- note very prominently if there is a RAID failure detected, in red blinking text on a white background; the term 'RAID' notes that there is something wrong with the RAID, and if there is a rebuild/resync in progress, the percent complete is also shown
-\fBrcs_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Rackspace Cloud Server billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
-
\fBfan_speed\fP \- cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units; you may override the detected fan by setting FAN=/sys/path/to/your/fan1_input in \fI$BYOBU_CONFIG_DIR/statusrc\fP
\fBhostname\fP \- the hostname of the system; displayed in the upper bar on the far right in bold black text on a grey background; there is a leading '@' symbol if the username status is also enabled
@@ -71,7 +67,7 @@
\fBload_average\fP \- the system load average over the last 1 minute; displayed in the lower bar toward the right in black text on a yellow background
-\fBlogo\fP \- an approximation of the current operating system's logo; displayed in the lower bar on the far left; you may customize this logo by setting a chosen logo in \fI$BYOBU_CONFIG_DIR/logo\fP, or you may override this with LOGO=:-D in \fI$BYOBU_CONFIG_DIR/statusrc\fP
+\fBlogo\fP \- an approximation of the current operating system's logo; displayed in the lower bar on the far left; you may customize this logo by setting a chosen logo with LOGO=:-D in \fI$BYOBU_CONFIG_DIR/statusrc\fP
\fBmail\fP \- system mail for the current user; the letter '[M]' is displayed in the lower bar toward the left in black text on a grey background
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byobu-5.125/usr/share/man/man1/wifi-status.1 new/byobu-5.127/usr/share/man/man1/wifi-status.1
--- old/byobu-5.125/usr/share/man/man1/wifi-status.1 2014-06-18 19:47:13.000000000 +0200
+++ new/byobu-5.127/usr/share/man/man1/wifi-status.1 2018-08-12 16:03:21.000000000 +0200
@@ -10,31 +10,8 @@
This is often useful when trying to associate with an access point.
-.SH EXAMPLE
- $ wifi-status
-
-Every 1.0s: iwconfig wlan0; ifconfig wlan0
-
-wlan0 IEEE 802.11abgn ESSID:"default"
- Mode:Managed Frequency:2.462 GHz Access Point: 00:11:22:33:44:55
- Bit Rate=81 Mb/s Tx-Power=15 dBm
- Retry long limit:7 RTS thr:off Fragment thr:off
- Power Management:on
- Link Quality=70/70 Signal level=-35 dBm
- Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
- Tx excessive retries:0 Invalid misc:0 Missed beacon:0
-
-wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
- inet addr:10.10.10.103 Bcast:10.9.8.255 Mask:255.255.255.0
- inet6 addr: aaaa::bbb:cccc:dddd:eeee/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:10582 errors:0 dropped:0 overruns:0 frame:0
- TX packets:6383 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:8243607 (8.2 MB) TX bytes:1077323 (1.0 MB)
-
.SH SEE ALSO
-\fBiwconfig\fP(8)\fP, \fBifconfig\fP(8)
+\fBiwconfig\fP(8)\fP, \fBip\fP(8)
.SH AUTHOR
This manpage and the utility was written by Dustin Kirkland <kirkland(a)ubuntu.com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.
1
0
Hello community,
here is the log from the commit of package lammps for openSUSE:Factory checked in at 2018-08-31 10:42:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lammps (Old)
and /work/SRC/openSUSE:Factory/.lammps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lammps"
Fri Aug 31 10:42:22 2018 rev:10 rq:631123 version:20180822
Changes:
--------
--- /work/SRC/openSUSE:Factory/lammps/lammps.changes 2018-03-29 11:59:39.393612639 +0200
+++ /work/SRC/openSUSE:Factory/.lammps.new/lammps.changes 2018-08-31 10:43:38.759145416 +0200
@@ -1,0 +2,15 @@
+Wed Aug 22 18:56:58 UTC 2018 - junghans(a)votca.org
+
+- bump version to 20180822 (stable)
+ * New CMake option for building LAMMPS and all of its packages, as an alternative to traditional make
+ * Restructured documentation
+ * DEM polygonal and polyhedron particles
+ * new compute entropy/atom command
+ * New SPIN package for modeling the dynamics of magnetic atomic spins
+ * New fix bond/react command to enable simulation of one or more complex heuristic reactions
+ * New USER-BOCS package
+ * Fixes memory leaks caused when using the GPU package and OpenCL
+ * Various other small updates and bugfixes
+- drop 858.patch - merged upstream
+
+-------------------------------------------------------------------
Old:
----
858.patch
lammps-stable_16Mar2018.tar.gz
New:
----
lammps-stable_22Aug2018.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lammps.spec ++++++
--- /var/tmp/diff_new_pack.bKWtvh/_old 2018-08-31 10:43:41.151148257 +0200
+++ /var/tmp/diff_new_pack.bKWtvh/_new 2018-08-31 10:43:41.151148257 +0200
@@ -17,16 +17,14 @@
#
Name: lammps
-Version: 20180316
-%define uversion stable_16Mar2018
+Version: 20180822
+%define uversion stable_22Aug2018
Release: 0
Summary: Molecular Dynamics Simulator
License: GPL-2.0 and GPL-3.0+
Group: Productivity/Scientific/Chemistry
Url: http://lammps.sandia.gov
Source0: https://github.com/lammps/lammps/archive/%{uversion}.tar.gz#/%{name}-%{uver…
-# PATCH-FIX-UPSTREAM 858.patch, https://github.com/lammps/lammps/pull/858 - fix return value on ppc64
-Patch0: https://github.com/lammps/lammps/pull/858.patch
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
@@ -41,8 +39,10 @@
BuildRequires: cmake
BuildRequires: opencl-headers
BuildRequires: ocl-icd-devel
+Requires: %{name}-data
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
%description
LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale
Atomic/Molecular Massively Parallel Simulator.
@@ -116,14 +116,34 @@
This subpackage contains LAMMPS's Python module.
+%package data
+Summary: LAMMPS data
+Group: Productivity/Scientific/Chemistry
+BuildArch: noarch
+
+%description data
+LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale
+Atomic/Molecular Massively Parallel Simulator.
+
+LAMMPS has potentials for soft materials (biomolecules, polymers) and
+solid-state materials (metals, semiconductors) and coarse-grained or
+mesoscopic systems. It can be used to model atoms or, more generically, as a
+parallel particle simulator at the atomic, meso, or continuum scale.
+
+LAMMPS runs on single processors or in parallel using message-passing
+techniques and a spatial-decomposition of the simulation domain. The code is
+designed to be easy to modify or extend with new functionality.
+
+This subpackage contains LAMMPS's potential files
+
+
%prep
%setup -q -n %{name}-%{uversion}
-%patch0 -p1
%build
source %{_libdir}/mpi/gcc/openmpi/bin/mpivars.sh
-%{cmake} -DENABLE_ALL=ON -DENABLE_MPI=ON -DENABLE_PYTHON=ON -DENABLE_TESTING=ON -DENABLE_VORONOI=ON -DENABLE_GPU=ON -DGPU_API=OpenCL -DFFT=FFTW3 -DPYTHON_INSTDIR=%{python_sitearch} ../cmake
+%{cmake} -C ../cmake/presets/std_nolib.cmake -DBUILD_LIB=ON -DBUILD_MPI=ON -DPKG_PYTHON=ON -DENABLE_TESTING=ON -DPKG_VORONOI=ON -DPKG_GPU=ON -DGPU_API=OpenCL -DFFT=FFTW3 -DPYTHON_INSTDIR=%{python_sitearch} -DLIB_SUFFIX= -DCMAKE_INSTALL_SYSCONFDIR=/etc ../cmake
make %{?_smp_mflags}
%install
@@ -137,7 +157,8 @@
%files
%defattr(-,root,root)
-%doc LICENSE README
+%doc README
+%license LICENSE
%{_bindir}/lmp
%files -n liblammps0
@@ -146,7 +167,7 @@
%files devel
%defattr(-,root,root)
-%doc LICENSE
+%license LICENSE
%{_includedir}/%{name}
%{_libdir}/liblammps.so
%{_libdir}/pkgconfig/liblammps.pc
@@ -155,4 +176,10 @@
%defattr(-,root,root,-)
%{python_sitearch}/%{name}.py
+%files data
+%defattr(-,root,root,-)
+%license LICENSE
+%{_datadir}/%{name}
+%config %{_sysconfdir}/profile.d/lammps.*
+
%changelog
1
0
Hello community,
here is the log from the commit of package gnubg for openSUSE:Factory checked in at 2018-08-31 10:42:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnubg (Old)
and /work/SRC/openSUSE:Factory/.gnubg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnubg"
Fri Aug 31 10:42:17 2018 rev:12 rq:631112 version:1.06.002
Changes:
--------
--- /work/SRC/openSUSE:Factory/gnubg/gnubg.changes 2018-08-02 14:58:00.848264430 +0200
+++ /work/SRC/openSUSE:Factory/.gnubg.new/gnubg.changes 2018-08-31 10:43:34.967140914 +0200
@@ -1,0 +2,24 @@
+Thu Aug 16 10:29:34 UTC 2018 - jengelh(a)inai.de
+
+- Use noun phrase in summary.
+
+-------------------------------------------------------------------
+Mon Aug 13 10:23:31 UTC 2018 - cwh(a)suse.com
+
+- Update to version 1.06.002
+ + fixed export and import of .mat files containing beavers. Such files
+ from JellyFish, Snowie and XG should import but not the flawed ones
+ created by earlier versions of GNUbg (use .sgf files in this case).
+ If exporting from GNUbg to other software, note that the latter may
+ not support raccoons or further redoubles and may assume that beavers
+ cannot be dropped.
+ + due to different versions of the GTK graphical libraries, the look of
+ the GUI is slightly different from that of the previous versions.
+ + the minor version of the Python interpreter is different (major
+ version is unchanged at 2.7). Python modules included with GNUbg may
+ differ in more significant ways.
+
+ Includes changes from 1.05.000:
+ + upgrade of the random.org code to support https protocol
+
+-------------------------------------------------------------------
Old:
----
gnubg-release-1.04.001-sources.tar.gz
New:
----
gnubg-release-1.06.002-sources.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnubg.spec ++++++
--- /var/tmp/diff_new_pack.7bcvJF/_old 2018-08-31 10:43:35.715141801 +0200
+++ /var/tmp/diff_new_pack.7bcvJF/_new 2018-08-31 10:43:35.719141806 +0200
@@ -1,7 +1,7 @@
#
# spec file for package gnubg
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2003 Achim Mueller, Germany.
# Updated by Christopher Hofmann in 2010
#
@@ -19,10 +19,10 @@
Name: gnubg
-Version: 1.04.001
+Version: 1.06.002
Release: 0
-Summary: Plays and analyzes backgammon games and matches on a world class level
-License: GPL-3.0+
+Summary: Backgammon game with analysis tools and neural network AI
+License: GPL-3.0-or-later
Group: Amusements/Games/Board/Other
Url: http://www.gnubg.org
Source: http://gnubg.org/media/sources/gnubg-release-%{version}-sources.tar.gz
@@ -74,7 +74,7 @@
%package databases
Summary: Bearoff databases for gnubg
-License: GPL-3.0+
+License: GPL-3.0-or-later
Group: Amusements/Games/Board/Other
Requires: %{name} = %{version}
@@ -85,7 +85,7 @@
%package sounds
Summary: Sounds for gnubg
-License: GPL-3.0+
+License: GPL-3.0-or-later
Group: Amusements/Games/Board/Other
Requires: %{name} = %{version}
@@ -94,7 +94,7 @@
%package doc
Summary: Documentation for gnubg
-License: GFDL-1.3
+License: GFDL-1.3-only
Group: Amusements/Games/Board/Other
%description doc
++++++ gnubg-release-1.04.001-sources.tar.gz -> gnubg-release-1.06.002-sources.tar.gz ++++++
/work/SRC/openSUSE:Factory/gnubg/gnubg-release-1.04.001-sources.tar.gz /work/SRC/openSUSE:Factory/.gnubg.new/gnubg-release-1.06.002-sources.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package python-pymol for openSUSE:Factory checked in at 2018-08-31 10:42:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pymol (Old)
and /work/SRC/openSUSE:Factory/.python-pymol.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pymol"
Fri Aug 31 10:42:08 2018 rev:3 rq:631103 version:2.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pymol/python-pymol.changes 2018-06-22 13:30:11.594161091 +0200
+++ /work/SRC/openSUSE:Factory/.python-pymol.new/python-pymol.changes 2018-08-31 10:43:31.899137274 +0200
@@ -1,0 +2,14 @@
+Thu Aug 23 11:33:41 UTC 2018 - tchvatal(a)suse.com
+
+- Version update to 2.2.0:
+ * Switch devel links to github
+ * No finegraned news file see ChangeLog for commit info
+- Rebase patch no-o3.patch
+
+-------------------------------------------------------------------
+Thu Aug 23 11:30:41 UTC 2018 - tchvatal(a)suse.com
+
+- Fix fdupes call
+- Install license and docu files
+
+-------------------------------------------------------------------
Old:
----
pymol-v2.1.0.tar.bz2
New:
----
v2.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pymol.spec ++++++
--- /var/tmp/diff_new_pack.EDbnvk/_old 2018-08-31 10:43:33.859139599 +0200
+++ /var/tmp/diff_new_pack.EDbnvk/_new 2018-08-31 10:43:33.859139599 +0200
@@ -19,13 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-pymol
-Version: 2.1.0
+Version: 2.2.0
Release: 0
Summary: A Molecular Viewer
License: Python-2.0
Group: Productivity/Scientific/Chemistry
URL: http://pymol.org
-Source: https://download.sourceforge.net/pymol/pymol/2/pymol-v%{version}.tar.bz2
+Source: https://github.com/schrodinger/pymol-open-source/archive/v%{version}.tar.gz
# PATCH-FIX-OPENSUSE no-build-date.patch dhall(a)wustl.edu -- patch eliminates build date
Patch0: no-build-date.patch
# PATCH-FIX-OPENSUSE no-o3.patch tchvatal(a)suse.com -- do not add O3 to the code
@@ -39,6 +39,7 @@
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: glew-devel
+BuildRequires: glm-devel
BuildRequires: libmsgpack-devel
BuildRequires: libpng-devel
BuildRequires: libxml2-devel
@@ -69,7 +70,7 @@
ChemDraw, CCP4 maps, XPLOR maps and Gaussian cube maps.
%prep
-%setup -q -n pymol
+%setup -q -n pymol-open-source-%{version}
%patch0
%patch1 -p1
sed -i "1d" modules/pmg_tk/startup/apbs_tools.py # Remove she-bang line
@@ -81,7 +82,7 @@
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pymol
-%fdupes %{buildroot}%{_prefix}
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
%post
%python_install_alternative pymol
@@ -90,6 +91,8 @@
%python_uninstall_alternative pymol
%files %{python_files}
+%doc README ChangeLog
+%license LICENSE
%python_alternative %{_bindir}/pymol
%{python_sitearch}*
++++++ no-o3.patch ++++++
--- /var/tmp/diff_new_pack.EDbnvk/_old 2018-08-31 10:43:33.875139618 +0200
+++ /var/tmp/diff_new_pack.EDbnvk/_new 2018-08-31 10:43:33.875139618 +0200
@@ -1,16 +1,16 @@
-Index: pymol/setup.py
+Index: pymol-open-source-2.2.0/setup.py
===================================================================
---- pymol.orig/setup.py
-+++ pymol/setup.py
-@@ -394,11 +394,6 @@ else: # unix style (linux, mac, ...)
-
- ext_comp_args += ["-ffast-math", "-funroll-loops", "-fcommon"]
-
-- # optimization currently causes a clang segfault on OS X 10.9 when
-- # compiling layer2/RepCylBond.cpp
-- if sys.platform != 'darwin':
-- ext_comp_args += ["-O3"]
--
- def get_pymol_version():
- return re.findall(r'_PyMOL_VERSION "(.*)"', open('layer0/Version.h').read())[0]
-
+--- pymol-open-source-2.2.0.orig/setup.py
++++ pymol-open-source-2.2.0/setup.py
+@@ -275,11 +275,6 @@ ext_comp_args = [
+ # legacy stuff
+ '-Wno-unused-function',
+ '-Wno-char-subscripts',
+- # optimizations
+- "-ffast-math",
+- "-funroll-loops",
+- "-O3",
+- "-fcommon",
+ ]
+ ext_link_args = []
+ ext_objects = []
1
0
Hello community,
here is the log from the commit of package python-qet_tb_generator for openSUSE:Factory checked in at 2018-08-31 10:42:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qet_tb_generator (Old)
and /work/SRC/openSUSE:Factory/.python-qet_tb_generator.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-qet_tb_generator"
Fri Aug 31 10:42:04 2018 rev:2 rq:631080 version:1.0.16
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qet_tb_generator/python-qet_tb_generator.changes 2018-03-06 10:45:49.539453629 +0100
+++ /work/SRC/openSUSE:Factory/.python-qet_tb_generator.new/python-qet_tb_generator.changes 2018-08-31 10:43:30.127135172 +0200
@@ -1,0 +2,5 @@
+Thu Aug 23 09:17:06 UTC 2018 - aloisio(a)gmx.com
+
+- Update to version 1.0.16 (no changelog supplied)
+
+-------------------------------------------------------------------
Old:
----
qet_tb_generator-0.7.74.tar.gz
New:
----
qet_tb_generator-1.0.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-qet_tb_generator.spec ++++++
--- /var/tmp/diff_new_pack.00db6m/_old 2018-08-31 10:43:31.727137069 +0200
+++ /var/tmp/diff_new_pack.00db6m/_new 2018-08-31 10:43:31.731137074 +0200
@@ -20,10 +20,10 @@
%define modname qet_tb_generator
%define skip_python2 1
Name: python-%{modname}
-Version: 0.7.74
+Version: 1.0.16
Release: 0
Summary: Generates terminal blocks & connectors for QElectroTech
-License: GPL-2.0
+License: GPL-2.0-only
Group: Development/Languages/Python
URL: https://pypi.python.org/pypi/qet-tb-generator
Source0: https://files.pythonhosted.org/packages/source/q/qet_tb_generator/%{modname…
@@ -43,8 +43,7 @@
%prep
%setup -q -n %{modname}-%{version}
rm -rf *.egg-info
-sed -i '/^#!\/usr\/bin\/python3/d' -i src/main.py
-chmod -x README
+sed -i '/^#!\/usr\/bin\/env python3/d' -i src/main.py
%build
%python_build
++++++ qet_tb_generator-0.7.74.tar.gz -> qet_tb_generator-1.0.16.tar.gz ++++++
++++ 3576 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-pyxb for openSUSE:Factory checked in at 2018-08-31 10:41:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyxb (Old)
and /work/SRC/openSUSE:Factory/.python-pyxb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyxb"
Fri Aug 31 10:41:56 2018 rev:3 rq:631076 version:1.2.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyxb/python-pyxb.changes 2015-03-18 13:08:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyxb.new/python-pyxb.changes 2018-08-31 10:43:28.695133473 +0200
@@ -1,0 +2,8 @@
+Thu Aug 23 09:38:47 UTC 2018 - tchvatal(a)suse.com
+
+- Version update to 1.2.6:
+ * Support for python3
+- Add patch to unbundle six:
+ * PyXB-unbundle-six.patch
+
+-------------------------------------------------------------------
Old:
----
PyXB-1.2.4.tar.gz
New:
----
PyXB-1.2.6.tar.gz
PyXB-unbundle-six.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyxb.spec ++++++
--- /var/tmp/diff_new_pack.G9bKYP/_old 2018-08-31 10:43:29.355134256 +0200
+++ /var/tmp/diff_new_pack.G9bKYP/_new 2018-08-31 10:43:29.359134260 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pyxb
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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,25 +17,25 @@
%define realnam PyXB
-%if 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%else
-BuildArch: noarch
-%py_requires
-%endif
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyxb
-Version: 1.2.4
+Version: 1.2.6
Release: 0
Summary: Python class code generator based on XMLSchemas
License: Apache-2.0
-Group: Development/Tools
-Url: http://pyxb.sourceforge.net/
+Group: Development/Languages/Python
+URL: http://pyxb.sourceforge.net/
Source0: http://downloads.sourceforge.net/pyxb/%{realnam}-%{version}.tar.gz
+Patch0: PyXB-unbundle-six.patch
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module six}
+BuildRequires: %{python_module xml}
BuildRequires: fdupes
-BuildRequires: python-devel
-BuildRequires: python-xml
+BuildRequires: python-rpm-macros
+Requires: python-six
Requires: python-xml
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildArch: noarch
+%python_subpackages
%description
PyXB is a pure Python package that generates Python code for classes that correspond to data structures defined by XMLSchema.
@@ -43,24 +43,26 @@
%prep
%setup -q -n %{realnam}-%{version}
+%patch0 -p1
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-%fdupes -s %{buildroot}
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-python setup.py test
+export LANG=en_US.UTF-8
+%python_exec setup.py test
-%files
-%defattr(-,root,root)
-%doc LICENSE NOTICE PKG-INFO README.txt
+%files %{python_files}
+%license LICENSE
+%doc NOTICE PKG-INFO README.txt
%{python_sitelib}/pyxb/
%{python_sitelib}/PyXB-%{version}-*.egg-info
-%{_bindir}/pyxbdump
-%{_bindir}/pyxbgen
-%{_bindir}/pyxbwsdl
+%python3_only %{_bindir}/pyxbdump
+%python3_only %{_bindir}/pyxbgen
+%python3_only %{_bindir}/pyxbwsdl
%changelog
++++++ PyXB-1.2.4.tar.gz -> PyXB-1.2.6.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-pyxb/PyXB-1.2.4.tar.gz /work/SRC/openSUSE:Factory/.python-pyxb.new/PyXB-1.2.6.tar.gz differ: char 5, line 1
++++++ PyXB-unbundle-six.patch ++++++
++++ 1171 lines (skipped)
1
0