openSUSE Commits
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
November 2013
- 1 participants
- 1122 discussions
Hello community,
here is the log from the commit of package perl-strictures for openSUSE:Factory checked in at 2013-11-29 12:04:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-strictures (Old)
and /work/SRC/openSUSE:Factory/.perl-strictures.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-strictures"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-strictures/perl-strictures.changes 2013-06-06 13:27:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-strictures.new/perl-strictures.changes 2013-11-29 12:04:39.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Nov 25 07:38:55 UTC 2013 - coolo(a)suse.com
+
+- updated to 1.005001
+ - fix skip on old perl on test script
+ - detect mercurial when checking for development trees
+ - avoid using constant.pm to save a bit of memory on older perls
+ - update to v2 metadata
+ - fix crash in 1.004003 due to qw() list being readonly
+
+-------------------------------------------------------------------
Old:
----
strictures-1.004004.tar.gz
New:
----
strictures-1.005001.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-strictures.spec ++++++
--- /var/tmp/diff_new_pack.wu5M3h/_old 2013-11-29 12:04:40.000000000 +0100
+++ /var/tmp/diff_new_pack.wu5M3h/_new 2013-11-29 12:04:40.000000000 +0100
@@ -17,14 +17,14 @@
Name: perl-strictures
-Version: 1.004004
+Version: 1.005001
Release: 0
%define cpan_name strictures
Summary: turn on strict and make all warnings fatal
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/strictures/
-Source: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
+Source: http://www.cpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
++++++ strictures-1.004004.tar.gz -> strictures-1.005001.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/Changes new/strictures-1.005001/Changes
--- old/strictures-1.004004/Changes 2012-11-12 20:05:20.000000000 +0100
+++ new/strictures-1.005001/Changes 2013-11-07 18:23:09.000000000 +0100
@@ -1,33 +1,55 @@
-1.004004 - 2012-11-12
- - fix 5.16 crash due to qw() list being readonly
-1.004003 - 2012-11-10
+Release history for strictures
+
+1.005001 2013-11-07
+ - fix skip on old perl on test script
+
+1.005000 2013-11-05
+ - detect mercurial when checking for development trees
+ - avoid using constant.pm to save a bit of memory on older perls
+ - update to v2 metadata
+
+1.004004 2012-11-12
+ - fix crash in 1.004003 due to qw() list being readonly
+
+1.004003 2012-11-10
- check only once for presence of extra testing prereqs
- explicitly specify no dynamic_config in META
-1.004002 - 2012-09-08
+
+1.004002 2012-09-08
- add better rationale for the extra testing heuristic
-1.004001 - 2012-07-12
+
+1.004001 2012-07-12
- test-specific strictures now enabled during 'dzil test'
-1.004000 - 2012-07-12
+
+1.004000 2012-07-12
- switch to testing calling file to avoid firing on dependencies
-1.003001 - 2012-04-08
+
+1.003001 2012-04-08
- fix test to handle defatalization
-1.003000 - 2012-04-07
+
+1.003000 2012-04-07
- try and run for any checkout t/ now we don't blow up the process
- defatalize lack of extra testing modules
- disable extra tests on perls <= 5.008003, things do not work there as
expected
-1.002002 - 2011-02-25
+
+1.002002 2011-02-25
- only try and mkdir the .git if it doesn't already exist so repeated
test runs don't explode
-1.002001 - 2011-02-25
+
+1.002001 2011-02-25
- switch .svn to .git in smells-of-vcs test and create it ourselves
to ease importing of this dist into subversion repositories
-1.002000 - 2011-02-16
+
+1.002000 2011-02-16
- add multidimensional and bareword::filehandles in author mode
-1.1.1 Dec 05 2010
+
+1.1.1 2010-12-05
- disable uninitialized warnings before calling ->SUPER::VERSION
-1.1.0 Nov 22 2010
+
+1.1.0 2010-11-22
- enable extra testing only if .git or .svn present to keep requirement
for extra modules author-side
-1.0.0 Jul 18 2010
+
+1.0.0 2010-07-18
- initial release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/MANIFEST new/strictures-1.005001/MANIFEST
--- old/strictures-1.004004/MANIFEST 2012-11-12 20:05:36.000000000 +0100
+++ new/strictures-1.005001/MANIFEST 2013-11-07 18:23:21.000000000 +0100
@@ -6,6 +6,9 @@
Makefile.PL
MANIFEST This list of files
t/crash.t
+t/dep_constellations/broken/bareword/filehandles.pm
+t/dep_constellations/broken/indirect.pm
+t/dep_constellations/broken/multidimensional.pm
t/smells-of-vcs/.exists
t/smells-of-vcs/lib/one.pm
t/smells-of-vcs/other/one.pl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/META.json new/strictures-1.005001/META.json
--- old/strictures-1.004004/META.json 2012-11-12 20:05:35.000000000 +0100
+++ new/strictures-1.005001/META.json 2013-11-07 18:23:20.000000000 +0100
@@ -4,7 +4,7 @@
"mst - Matt S. Trout (cpan:MSTROUT) <mst(a)shadowcat.co.uk>"
],
"dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.132830",
"license" : [
"perl_5"
],
@@ -25,26 +25,28 @@
"ExtUtils::MakeMaker" : "0"
}
},
- "configure" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
"runtime" : {
"recommends" : {
"bareword::filehandles" : "0",
"indirect" : "0",
"multidimensional" : "0"
},
- "requires" : {}
+ "requires" : {
+ "perl" : "5.006"
+ }
}
},
"release_status" : "stable",
"resources" : {
- "homepage" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git",
+ "bugtracker" : {
+ "mailto" : "bug-strictures(a)rt.cpan.org",
+ "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=strictures"
+ },
"repository" : {
- "url" : "git://git.shadowcat.co.uk/p5sagit/strictures.git"
+ "type" : "git",
+ "url" : "git://git.shadowcat.co.uk/p5sagit/strictures.git",
+ "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git"
}
},
- "version" : "1.004004"
+ "version" : "1.005001"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/META.yml new/strictures-1.005001/META.yml
--- old/strictures-1.004004/META.yml 2012-11-12 20:05:35.000000000 +0100
+++ new/strictures-1.005001/META.yml 2013-11-07 18:23:20.000000000 +0100
@@ -4,10 +4,8 @@
- 'mst - Matt S. Trout (cpan:MSTROUT) <mst(a)shadowcat.co.uk>'
build_requires:
ExtUtils::MakeMaker: 0
-configure_requires:
- ExtUtils::MakeMaker: 0
dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.132830'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,8 +19,9 @@
bareword::filehandles: 0
indirect: 0
multidimensional: 0
-requires: {}
+requires:
+ perl: 5.006
resources:
- homepage: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git
+ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=strictures
repository: git://git.shadowcat.co.uk/p5sagit/strictures.git
-version: 1.004004
+version: 1.005001
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/Makefile.PL new/strictures-1.005001/Makefile.PL
--- old/strictures-1.004004/Makefile.PL 2012-11-10 19:34:06.000000000 +0100
+++ new/strictures-1.005001/Makefile.PL 2013-11-06 00:43:35.000000000 +0100
@@ -7,20 +7,33 @@
WriteMakefile(
NAME => 'strictures',
VERSION_FROM => 'lib/strictures.pm',
+ MIN_PERL_VERSION => '5.006',
META_MERGE => {
+ 'meta-spec' => { version => 2 },
dynamic_config => 0,
resources => {
# r/w: p5sagit@git.shadowcat.co.uk:strictures.git
- repository => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
- homepage => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
+ repository => {
+ url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
+ web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
+ type => 'git',
+ },
+ bugtracker => {
+ mailto => 'bug-strictures(a)rt.cpan.org',
+ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
+ },
},
- recommends => {
- indirect => 0,
- multidimensional => 0,
- 'bareword::filehandles' => 0,
+ prereqs => {
+ runtime => {
+ recommends => {
+ indirect => 0,
+ multidimensional => 0,
+ 'bareword::filehandles' => 0,
+ },
+ },
},
},
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/README new/strictures-1.005001/README
--- old/strictures-1.004004/README 2012-11-12 20:05:35.000000000 +0100
+++ new/strictures-1.005001/README 2013-11-07 18:23:21.000000000 +0100
@@ -13,12 +13,12 @@
(caller)[1] =~ /^(?:t|xt|lib|blib)/
- and when either ".git" or ".svn" is present in the current directory
- (with the intention of only forcing extra tests on the author side) --
- or when ".git" or ".svn" is present two directories up along with
- "dist.ini" (which would indicate we are in a "dzil test" operation, via
- Dist::Zilla) -- or when the "PERL_STRICTURES_EXTRA" environment variable
- is set, in which case
+ and when either ".git", ".svn", or ".hg" is present in the current
+ directory (with the intention of only forcing extra tests on the author
+ side) -- or when ".git", ".svn", or ".hg" is present two directories up
+ along with "dist.ini" (which would indicate we are in a "dzil test"
+ operation, via Dist::Zilla) -- or when the "PERL_STRICTURES_EXTRA"
+ environment variable is set, in which case
use strictures 1;
@@ -139,6 +139,13 @@
discussion on the subject to focus on "how do we minimise annoyance to
people deploying from checkouts intentionally".
+SEE ALSO
+ * indirect
+
+ * multidimensional
+
+ * bareword::filehandles
+
COMMUNITY AND SUPPORT
IRC channel
irc.perl.org #toolchain
@@ -158,7 +165,11 @@
mst - Matt S. Trout (cpan:MSTROUT) <mst(a)shadowcat.co.uk>
CONTRIBUTORS
- None required yet. Maybe this module is perfect (hahahahaha ...).
+ Karen Etheridge (cpan:ETHER) <ether(a)cpan.org>
+
+ Mithaldu - Christian Walde (cpan:MITHALDU) <walde.christian(a)gmail.com>
+
+ haarg - Graham Knop (cpan:HAARG) <haarg(a)haarg.org>
COPYRIGHT
Copyright (c) 2010 the strictures "AUTHOR" and "CONTRIBUTORS" as listed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/lib/strictures.pm new/strictures-1.005001/lib/strictures.pm
--- old/strictures-1.004004/lib/strictures.pm 2012-11-12 20:04:07.000000000 +0100
+++ new/strictures-1.005001/lib/strictures.pm 2013-11-07 18:18:27.000000000 +0100
@@ -3,9 +3,11 @@
use strict;
use warnings FATAL => 'all';
-use constant _PERL_LT_5_8_4 => ($] < 5.008004) ? 1 : 0;
+BEGIN {
+ *_PERL_LT_5_8_4 = ($] < 5.008004) ? sub(){1} : sub(){0};
+}
-our $VERSION = '1.004004'; # 1.4.4
+our $VERSION = '1.005001'; # 1.5.1
sub VERSION {
for ($_[1]) {
@@ -21,10 +23,11 @@
shift->SUPER::VERSION(@_);
}
-my $extra_load_states;
+our $extra_load_states;
-our $Smells_Like_VCS = (-e '.git' || -e '.svn'
- || (-e '../../dist.ini' && (-e '../../.git' || -e '../../.svn')));
+our $Smells_Like_VCS = (-e '.git' || -e '.svn' || -e '.hg'
+ || (-e '../../dist.ini'
+ && (-e '../../.git' || -e '../../.svn' || -e '../../.hg' )));
sub import {
strict->import;
@@ -104,9 +107,9 @@
(caller)[1] =~ /^(?:t|xt|lib|blib)/
-and when either C<.git> or C<.svn> is present in the current directory (with
-the intention of only forcing extra tests on the author side) -- or when C<.git>
-or C<.svn> is present two directories up along with C<dist.ini> (which would
+and when either C<.git>, C<.svn>, or C<.hg> is present in the current directory (with
+the intention of only forcing extra tests on the author side) -- or when C<.git>,
+C<.svn>, or C<.hg> is present two directories up along with C<dist.ini> (which would
indicate we are in a C<dzil test> operation, via L<Dist::Zilla>) --
or when the C<PERL_STRICTURES_EXTRA> environment variable is set, in which case
@@ -232,6 +235,24 @@
and will allow any future discussion on the subject to focus on "how do we
minimise annoyance to people deploying from checkouts intentionally".
+=head1 SEE ALSO
+
+=over 4
+
+=item *
+
+L<indirect>
+
+=item *
+
+L<multidimensional>
+
+=item *
+
+L<bareword::filehandles>
+
+=back
+
=head1 COMMUNITY AND SUPPORT
=head2 IRC channel
@@ -256,7 +277,11 @@
=head1 CONTRIBUTORS
-None required yet. Maybe this module is perfect (hahahahaha ...).
+Karen Etheridge (cpan:ETHER) <ether(a)cpan.org>
+
+Mithaldu - Christian Walde (cpan:MITHALDU) <walde.christian(a)gmail.com>
+
+haarg - Graham Knop (cpan:HAARG) <haarg(a)haarg.org>
=head1 COPYRIGHT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/maint/Makefile.PL.include new/strictures-1.005001/maint/Makefile.PL.include
--- old/strictures-1.004004/maint/Makefile.PL.include 2012-07-12 22:52:17.000000000 +0200
+++ new/strictures-1.005001/maint/Makefile.PL.include 2013-11-06 00:43:35.000000000 +0100
@@ -6,4 +6,5 @@
manifest_include(
't/smells-of-vcs' => qr{.*},
+ 't/dep_constellations' => '.pm',
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.004004/t/strictures.t new/strictures-1.005001/t/strictures.t
--- old/strictures-1.004004/t/strictures.t 2012-11-10 18:20:45.000000000 +0100
+++ new/strictures-1.005001/t/strictures.t 2013-11-06 17:17:49.000000000 +0100
@@ -52,6 +52,36 @@
like($@, qr{Indirect call of method}, "Failed due to indirect.pm, ok");
}
ok(eval { require "other/one.pl"; 1 }, "Loaded other/one.pl ok");
+ chdir("../..");
}
ok(!eval q{use strictures 2; 1; }, "Can't use strictures 2 (this is version 1)");
+
+SKIP: {
+ skip 'Extra tests disabled on perls <= 5.008003', 1
+ if $] < 5.008004;
+ local $ENV{PERL_STRICTURES_EXTRA} = 1;
+ local $strictures::extra_load_states = undef;
+ local @INC = ("t/dep_constellations/broken", @INC);
+ local %INC = %INC;
+ delete $INC{$_}
+ for qw( indirect.pm multidimensional.pm bareword/filehandles.pm );
+
+ {
+ open my $fh, '>', \my $str;
+ local *STDERR = $fh;
+ strictures->import;
+ like(
+ $str,
+ qr/Missing were:\n\n indirect multidimensional bareword::filehandles/,
+ "failure to load all three extra deps is reported"
+ );
+ }
+
+ {
+ open my $fh, '>', \my $str;
+ local *STDERR = $fh;
+ strictures->import;
+ ok( !$str, "extra dep load failure is not reported a second time" );
+ }
+}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-PPIx-Regexp for openSUSE:Factory checked in at 2013-11-29 12:04:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-PPIx-Regexp (Old)
and /work/SRC/openSUSE:Factory/.perl-PPIx-Regexp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-PPIx-Regexp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-PPIx-Regexp/perl-PPIx-Regexp.changes 2013-06-13 20:10:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-PPIx-Regexp.new/perl-PPIx-Regexp.changes 2013-11-29 12:04:34.000000000 +0100
@@ -1,0 +2,17 @@
+Tue Nov 26 07:35:43 UTC 2013 - coolo(a)suse.com
+
+- updated to 0.035
+ Properly handle multi-character modifiers like /ee. We now handle /eie
+ as being the same as /eei. Thanks to Anonymous Monk for finding
+ this.
+ Properly handle \g and \k back references that do not correspond to an
+ actual capture group. They are now reblessed into the unknown token,
+ and counted as errors. Thanks to Anonymous Monk for finding this.
+ Add method error() to PPIx::Regexp::Element. This should return an
+ error message when the element is in error -- normally when it has
+ been blessed into the unknown token or structure.
+ Add method modifier_asserted() to PPIx::Regexp::Element. This walks
+ the parse tree backward to determine if the given modifier is in
+ effect for the element.
+
+-------------------------------------------------------------------
Old:
----
PPIx-Regexp-0.034.tar.gz
New:
----
PPIx-Regexp-0.035.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-PPIx-Regexp.spec ++++++
--- /var/tmp/diff_new_pack.9aSiFV/_old 2013-11-29 12:04:34.000000000 +0100
+++ /var/tmp/diff_new_pack.9aSiFV/_new 2013-11-29 12:04:34.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-PPIx-Regexp
-Version: 0.034
+Version: 0.035
Release: 0
%define cpan_name PPIx-Regexp
Summary: Represent a regular expression of some sort
++++++ PPIx-Regexp-0.034.tar.gz -> PPIx-Regexp-0.035.tar.gz ++++++
++++ 2546 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-DateTime-TimeZone for openSUSE:Factory checked in at 2013-11-29 12:04:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DateTime-TimeZone (Old)
and /work/SRC/openSUSE:Factory/.perl-DateTime-TimeZone.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DateTime-TimeZone"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-DateTime-TimeZone/perl-DateTime-TimeZone.changes 2013-11-04 12:46:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-DateTime-TimeZone.new/perl-DateTime-TimeZone.changes 2013-11-29 12:04:26.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Nov 26 07:35:54 UTC 2013 - coolo(a)suse.com
+
+- updated to 1.63
+ - This release is based on version 2013h of the Olson database. This release
+ includes contemporary changes for Morocco, Librya, and Western Sahara (El
+ Aaiun).
+
+-------------------------------------------------------------------
Old:
----
DateTime-TimeZone-1.62.tar.gz
New:
----
DateTime-TimeZone-1.63.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DateTime-TimeZone.spec ++++++
--- /var/tmp/diff_new_pack.A6wJmW/_old 2013-11-29 12:04:26.000000000 +0100
+++ /var/tmp/diff_new_pack.A6wJmW/_new 2013-11-29 12:04:26.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-DateTime-TimeZone
-Version: 1.62
+Version: 1.63
Release: 0
%define cpan_name DateTime-TimeZone
Summary: Time zone object base class and factory
++++++ DateTime-TimeZone-1.62.tar.gz -> DateTime-TimeZone-1.63.tar.gz ++++++
++++ 15572 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mc for openSUSE:Factory checked in at 2013-11-29 12:03:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mc (Old)
and /work/SRC/openSUSE:Factory/.mc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mc/mc.changes 2013-11-17 20:20:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mc.new/mc.changes 2013-11-29 12:03:58.000000000 +0100
@@ -1,0 +2,31 @@
+Mon Nov 25 22:45:29 UTC 2013 - dnh(a)opensuse.org
+
+- What a ghastly %description ... Where'd that come from? ;) Fixed
+ with text from the README and a little added mention of Norton Cmdr
+
+-------------------------------------------------------------------
+Mon Nov 25 22:12:19 UTC 2013 - dnh(a)opensuse.org
+
+- What's with those "trailing spaces" for filenames with length <13?
+
+-------------------------------------------------------------------
+Mon Nov 25 03:47:18 UTC 2013 - dnh(a)opensuse.org
+
+- fix the urar patch (add trailing whitespace) (thanks to D. Werner again)
+
+-------------------------------------------------------------------
+Sat Nov 23 18:11:35 UTC 2013 - dnh(a)opensuse.org
+
+- fix the urar patch (thanks to D. Werner again)
+
+-------------------------------------------------------------------
+Sat Nov 23 05:42:12 UTC 2013 - dnh(a)opensuse.org
+
+- fix SLE* %post scriptlet error (%set_permissions not available)
+
+-------------------------------------------------------------------
+Fri Nov 22 18:34:57 UTC 2013 - dnh(a)opensuse.org
+
+- make urar-helper patch portable (tested with busybox awk)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mc.spec ++++++
--- /var/tmp/diff_new_pack.tyr3Db/_old 2013-11-29 12:03:59.000000000 +0100
+++ /var/tmp/diff_new_pack.tyr3Db/_new 2013-11-29 12:03:59.000000000 +0100
@@ -44,12 +44,7 @@
Patch21: mc-extfs-helpers-deb.patch
# add mc-extfs-helpers-urar.patch (by dnh(a)opensuse.org) - Fix urar
-# extfs failing on files with spaces (bnc#849082), needs gawk >= 4.0.0
-# and is not portable to other awks, so expect upstream changes. As of
-# now (Fri Nov 15 09:43:39 2013), upstream uses a "index by the CRC
-# field" approach as mentioned in bnc#849082. I prefer the gawk >=
-# 4.0.0 version with the "seps" fourth argument to the "split"
-# function. YOpinionMV ;)
+# extfs failing on files with spaces (bnc#849082). Forwarded to upstream.
Patch22: mc-extfs-helpers-urar.patch
#debian fixes for vfs
@@ -89,28 +84,17 @@
BuildRequires: xorg-x11-devel
BuildRequires: xz
Requires(pre): permissions
-Requires: gawk >= 4.0.0
Recommends: %{name}-lang = %{version}
%description
-Midnight Commander is a Norton Commander clone, a program that
-manipulates and manages files and directories. It is useful, fast, and
-has color display on the Linux console. It also has mouse support if
-you run the gpm mouse server. This program requires the terminal
-description files in /usr/lib/terminfo, which are found in ncurses.rpm
-(the essential ones) or terminfo.rpm (the rest).
-
-You can also use Midnight Commander under the X Window System with your
-mouse. If you enter 'mc -c', colors are used.
-
-In Midnight Commander, the screen is divided into four sections: The
-majority of the screen is covered by two directory panels. The second
-to last line on the screen is the shell command line. The last line
-displays the function key assignments. At the very top, the menu list
-is shown. One of the directories displayed is the current working
-directory. This is where most of the commands are found. For certain
-commands, like copy and move, the second directory is used as the
-target directory.
+GNU Midnight Commander (also referred to as MC) is a user shell much
+like the (in)famous Norton Commander with text-mode full-screen
+interface. It can be run on the OS console, in xterm and other
+terminal emulators.
+
+GNU Midnight Commander allows you to manage files while making most of
+your screen and giving you a clear representation of the filesystem, yet
+it's simple enough to be run over a telnet or ssh session.
%lang_package
@@ -129,7 +113,7 @@
%patch18
%patch20
%patch21
-%patch22
+%patch22 -p1
%patch24
%patch31
%patch32
@@ -177,7 +161,11 @@
rm -rf %{buildroot}
%post
+%if 0%{?suse_version} >= 1140
%set_permissions %{_libexecdir}/mc/cons.saver
+%else
+%run_permissions
+%endif
%verifyscript
%verify_permissions -e %{_libexecdir}/mc/cons.saver
@@ -220,6 +208,13 @@
%files lang -f %name.lang
%defattr(-, root, root)
+%if 0%{?suse_version} < 1140 || 0%{?sles_version} && 0%{?sles_version} <= 11
+%lang(sv) %dir %{_datadir}/locale/sv_SE
+%lang(sv) %dir %{_datadir}/locale/sv_SE/LC_MESSAGES
+%lang(szl) %dir %{_datadir}/locale/szl
+%lang(szl) %dir %{_datadir}/locale/szl/LC_MESSAGES
+%endif
+
%lang(hu) %dir %{_mandir}/hu/
%lang(hu) %dir %{_mandir}/hu/man1/
%lang(hu) %{_mandir}/hu/man1/mc.1.gz
++++++ mc-extfs-helpers-urar.patch ++++++
--- /var/tmp/diff_new_pack.tyr3Db/_old 2013-11-29 12:03:59.000000000 +0100
+++ /var/tmp/diff_new_pack.tyr3Db/_new 2013-11-29 12:03:59.000000000 +0100
@@ -1,6 +1,7 @@
---- src/vfs/extfs/helpers/urar.in.orig 2013-11-12 18:27:16.000000000 +0100
-+++ src/vfs/extfs/helpers/urar.in 2013-11-12 19:05:31.000000000 +0100
-@@ -42,14 +42,36 @@
+diff -urN -x '*~' mc-4.8.10.orig/src/vfs/extfs/helpers/urar.in mc-4.8.10/src/vfs/extfs/helpers/urar.in
+--- mc-4.8.10.orig/src/vfs/extfs/helpers/urar.in 2013-08-02 17:02:39.000000000 +0200
++++ mc-4.8.10/src/vfs/extfs/helpers/urar.in 2013-11-25 23:10:36.000000000 +0100
+@@ -42,14 +42,43 @@
$UNRAR v -c- -cfg- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
BEGIN { flag=0 }
/^-----------/ { flag++; if (flag > 1) exit 0; next }
@@ -13,10 +14,13 @@
- $1="-rw-r--r--"
- printf "%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", $1, uid, gid, $2, a[2], a[1], a[3], $6, $8
+flag == 1 {
-+ name="";
++ name=""; delete fields; delete seps;
+
-+ ### split line, save n-fields and save seperators in 'seps'
-+ nf = split($0, fields, " ", seps);
++ ### split line, save n-fields and save seperators in "seps"
++ ### tested with busybox awk
++ nameparts = split($0, fields, " ");
++ split($0, seps, "[^ \t]+");
++ sub("^ ", "", seps[8]);
+
+ ### split date for reformatting
+ split(fields[5], date, "-");
@@ -30,14 +34,18 @@
+ }
+ }
+
-+ ### join filename from fields 8 .. nf (saved above)
-+ for(i = 8; i <= nf; i++) {
-+ name=name fields[i] seps[i];
-+ }
-+ ### remove padding blanks from short names
-+ if (length(name)<13) {
-+ sub(" *$", "", name);
++ ### join filename from fields 8 .. nameparts (saved above)
++ for(i = 8; i <= nameparts; i++) {
++ name=name seps[i] fields[i];
+ }
++ name=name seps[i];
++
++# ### where did this come from? I say: if in doubt: pass on the
++# ### unrar bug to our users ... I leave this in for reference.
++# ### remove padding blanks from short names
++# if (length(name)<13) {
++# sub(" *$", "", name);
++# }
+
+ printf("%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n",
+ fields[1], uid, gid, fields[2], date[2],
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package cyrus-sasl for openSUSE:Factory checked in at 2013-11-29 12:03:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cyrus-sasl (Old)
and /work/SRC/openSUSE:Factory/.cyrus-sasl.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cyrus-sasl"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cyrus-sasl/cyrus-sasl-saslauthd.changes 2013-09-27 19:47:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cyrus-sasl.new/cyrus-sasl-saslauthd.changes 2013-11-29 12:03:39.000000000 +0100
@@ -2 +2,29 @@
-Sun Sep 8 21:11:27 UTC 2013 - jcnengel(a)googlemail.com
+Sat Nov 2 20:47:58 UTC 2013 - jengelh(a)inai.de
+
+- Implement shlib packaging guidelines: make subpackage libsasl2-3.
+ (All other .so files are _server_ plugins AFAICS, loaded via
+ dlopen.)
+- Ensure directories are owned by packages and thus get torn down
+ on package removal
+
+-------------------------------------------------------------------
+Sat Oct 5 19:10:55 UTC 2013 - tchvatal(a)suse.com
+
+- Put back the .so files to sasl auth packages from devel file.
+ The .so files are read by some application instead of full path
+ so in order for auth to work this files must be available
+
+-------------------------------------------------------------------
+Sun Sep 29 08:11:05 UTC 2013 - tittiatcoke(a)gmail.com
+
+- Add patch fix-sasl-header.diff to resolve build issues that
+ are failing due to typedef 'sasl_malloc_t' is initialized.
+ (see gentoo#458870, fedora#906519)
+
+-------------------------------------------------------------------
+Wed Sep 11 07:16:23 UTC 2013 - jcnengel(a)gmail.com
+
+- Removed server side service to comply with Factory rules
+
+-------------------------------------------------------------------
+Tue Sep 3 22:07:15 UTC 2013 - jcnengel(a)gmail.com
@@ -11,0 +40,16 @@
+ - GSSAPI plugin:
+ + Fixed a segfault in gssapi.c introduced in 2.1.25.
+ + Code refactoring
+ + Added support for GSS-SPNEGO SASL mechanism (Unix only), which is also HTTP capable
+ - GS2 plugin:
+ + Updated GS2 plugin not to lose minor GSS-API status codes on errors
+ - DIGEST-MD5 plugin:
+ + Correctly send "stale" directive to prevent clients from (re)promtping for password
+ + Better handling of HTTP reauthentication cases
+ + fixed some memory leaks
+ - SASLDB plugin:
+ + Added support for BerkleyDB 5.X or later
+ - OTP plugin:
+ + Removed calling of EVP_cleanup() on plugin shutdown in order to prevent TLS from failing in calling applications
+ - SRP plugin:
+ + Removed calling of EVP_cleanup() on plugin shutdown in order to prevent TLS from failing in calling applications
@@ -16,0 +61 @@
+- New BuildRequires for pkgconfig since pkgconfig file is generated
@@ -22,0 +68 @@
+- Move *.so files into devel package
--- /work/SRC/openSUSE:Factory/cyrus-sasl/cyrus-sasl.changes 2013-10-06 19:31:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cyrus-sasl.new/cyrus-sasl.changes 2013-11-29 12:03:39.000000000 +0100
@@ -1,0 +2,9 @@
+Sat Nov 2 20:47:58 UTC 2013 - jengelh(a)inai.de
+
+- Implement shlib packaging guidelines: make subpackage libsasl2-3.
+ (All other .so files are _server_ plugins AFAICS, loaded via
+ dlopen.)
+- Ensure directories are owned by packages and thus get torn down
+ on package removal
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cyrus-sasl-saslauthd.spec ++++++
--- /var/tmp/diff_new_pack.Ypu8Un/_old 2013-11-29 12:03:40.000000000 +0100
+++ /var/tmp/diff_new_pack.Ypu8Un/_new 2013-11-29 12:03:40.000000000 +0100
@@ -17,20 +17,13 @@
Name: cyrus-sasl-saslauthd
-BuildRequires: db-devel
-BuildRequires: krb5-devel
-BuildRequires: libtool
-BuildRequires: mysql-devel
-BuildRequires: openldap2-devel
-BuildRequires: opie
-BuildRequires: pam-devel
-BuildRequires: postgresql-devel
-Url: http://asg.web.cmu.edu/sasl/
+Version: 2.1.26
+Release: 0
Summary: The SASL Authentication Server
License: BSD-4-Clause
Group: Productivity/Networking/Other
-Version: 2.1.26
-Release: 0
+Url: http://asg.web.cmu.edu/sasl/
+
Source: ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-%{version}.tar.gz
Source1: cyrus-sasl-rc.tar.bz2
Source2: README.Source
@@ -42,6 +35,14 @@
Patch7: fix-sasl-header.diff
PreReq: %insserv_prereq %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: db-devel
+BuildRequires: krb5-devel
+BuildRequires: libtool
+BuildRequires: mysql-devel
+BuildRequires: openldap2-devel
+BuildRequires: opie
+BuildRequires: pam-devel
+BuildRequires: postgresql-devel
%description
This daemon is required when using cyrus-sasl in server software that
@@ -73,7 +74,7 @@
%patch7 -p1
%build
-find . -name \*.cvsignore -print0 | xargs -0 rm -vf
+find . -name "*.cvsignore" -exec rm -fv "{}" "+"
autoreconf -f -i
export CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS -DLDAP_DEPRECATED"
%configure --with-plugindir=%{_libdir}/sasl2 \
@@ -146,10 +147,12 @@
%files -n cyrus-sasl-sqlauxprop
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libsql.so*
%files -n cyrus-sasl-ldap-auxprop
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libldapdb.so*
%changelog
++++++ cyrus-sasl.spec ++++++
--- /var/tmp/diff_new_pack.Ypu8Un/_old 2013-11-29 12:03:40.000000000 +0100
+++ /var/tmp/diff_new_pack.Ypu8Un/_new 2013-11-29 12:03:40.000000000 +0100
@@ -17,24 +17,14 @@
Name: cyrus-sasl
+%define lname libsasl2-3
Version: 2.1.26
Release: 0
-BuildRequires: db-devel
-BuildRequires: krb5-mini-devel
-BuildRequires: libtool
-BuildRequires: openssl-devel
-BuildRequires: opie
-BuildRequires: pam-devel
-BuildRequires: pkg-config
Url: http://asg.web.cmu.edu/sasl/
-# bug437293
-%ifarch ppc64
-Obsoletes: cyrus-sasl-64bit
-%endif
-#
Summary: Implementation of Cyrus SASL API
License: BSD-4-Clause
Group: Productivity/Networking/Other
+
Source: ftp://ftp.cyrusimap.org/%{name}/%{name}-%{version}.tar.gz
Source1: cyrus-sasl-rc.tar.bz2
Source2: README.Source
@@ -46,30 +36,41 @@
Patch7: fix-sasl-header.diff
PreReq: %insserv_prereq %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: db-devel
+BuildRequires: krb5-mini-devel
+BuildRequires: libtool
+BuildRequires: openssl-devel
+BuildRequires: opie
+BuildRequires: pam-devel
+BuildRequires: pkg-config
+%ifarch ppc64
+# bug437293
+Obsoletes: cyrus-sasl-64bit
+%endif
%package gssapi
Summary: Plugin for the GSSAPI SASL mechanism
-Group: Development/Libraries/C and C++
+Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package crammd5
Summary: Plugin for the CRAMMD5 SASL mechanism
-Group: Development/Libraries/C and C++
+Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package digestmd5
Summary: Plugin for the DIGESTMD5 SASL mechanism
-Group: Development/Libraries/C and C++
+Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package otp
Summary: Plugin for the OTP SASL mechanism
-Group: Development/Libraries/C and C++
+Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package plain
Summary: Plugin for the PLAIN SASL mechanism
-Group: Development/Libraries/C and C++
+Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package ntlm
@@ -95,9 +96,13 @@
#
Summary: Cyrus SASL API Implementation, Libraries and Header Files
Group: Development/Libraries/C and C++
-Requires: %{name} = %{version}
+Requires: %lname = %version
Requires: glibc-devel
+%package -n libsasl2-3
+Summary: Simple Authentication and Security Layer (SASL) library
+Group: System/Libraries
+
%description
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.
@@ -145,6 +150,14 @@
or server side to provide authentication. See RFC 2222 for more
information.
+%description -n libsasl2-3
+Simple Authentication and Security Layer (SASL) is a framework for
+authentication and data security in Internet protocols.
+
+This is the Cyrus SASL API implementation. It can be used on the client
+or server side to provide authentication. See RFC 2222 for more
+information.
+
%prep
%setup -q -n cyrus-sasl-%{version} -a 1
if [ -e %{_builddir}/%{name}-%{version}/dlcompat-*/ ]
@@ -159,7 +172,7 @@
%patch7 -p1
%build
-find . -name \*.cvsignore -print0 | xargs -0 rm -fv
+find . -name "*.cvsignore" -exec rm -fv "{}" "+"
autoreconf -f -i
export CFLAGS="%optflags -fno-strict-aliasing"
%configure --with-pic \
@@ -190,18 +203,20 @@
rm -f $RPM_BUILD_ROOT/usr/sbin/testsaslauthd
find "%buildroot" -type f -name "*.la" -print -delete
-%post -p /sbin/ldconfig
+%post -n %lname -p /sbin/ldconfig
+%postun -n %lname -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%files -n %lname
+%defattr(-,root,root)
+%{_libdir}/libsasl2.so.3*
%files
%defattr(-,root,root)
%dir %{_libdir}/sasl2
-%dir /etc/sasl2/
%{_libdir}/sasl2/libanonymous.so*
%{_libdir}/sasl2/liblogin.so*
%{_libdir}/sasl2/libsasldb.so*
-%{_libdir}/libsasl2.so.*
+%dir /etc/sasl2/
/usr/sbin/*
/usr/bin/*
%doc %{_mandir}/man3/sasl.*.gz
@@ -210,40 +225,48 @@
%files gssapi
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libgssapiv2.so*
%files crammd5
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libcrammd5.so*
%files digestmd5
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libdigestmd5.so*
%files otp
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libotp.so*
%files plain
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libplain.so*
%files ntlm
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libntlm.so*
%files gs2
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libgs2.so*
%files scram
%defattr(-,root,root)
+%dir %_libdir/sasl2/
%{_libdir}/sasl2/libscram.so*
%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README doc
-/usr/include/sasl
+%_includedir/sasl/
%doc %{_mandir}/man3/sasl_*.gz
%{_libdir}/libsasl2.so
%{_libdir}/pkgconfig/*
++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.Ypu8Un/_old 2013-11-29 12:03:40.000000000 +0100
+++ /var/tmp/diff_new_pack.Ypu8Un/_new 2013-11-29 12:03:40.000000000 +0100
@@ -1,5 +1,8 @@
+libsasl2-3
cyrus-sasl
cyrus-sasl-devel
+ requires -cyrus-sasl-<targettype>
+ requires "libsasl2-3-<targettype> = <version>"
cyrus-sasl-crammd5
cyrus-sasl-digestmd5
cyrus-sasl-gssapi
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package usbmuxd for openSUSE:Factory checked in at 2013-11-29 07:05:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/usbmuxd (Old)
and /work/SRC/openSUSE:Factory/.usbmuxd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "usbmuxd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/usbmuxd/usbmuxd.changes 2013-04-05 09:35:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.usbmuxd.new/usbmuxd.changes 2013-11-29 07:05:35.000000000 +0100
@@ -1,0 +2,7 @@
+Sun Nov 24 18:18:20 UTC 2013 - crrodriguez(a)opensuse.org
+
+- define _udevrulesdir only if not already in place
+- add systemd service %pre %post scriptlets
+- run %udev_rules_update if such macro is defined
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ usbmuxd.spec ++++++
--- /var/tmp/diff_new_pack.iPWmEv/_old 2013-11-29 07:05:35.000000000 +0100
+++ /var/tmp/diff_new_pack.iPWmEv/_new 2013-11-29 07:05:35.000000000 +0100
@@ -16,11 +16,7 @@
#
-%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190
-%define _udevrulesdir /usr/lib/udev/rules.d
-%else
-%define _udevrulesdir /lib/udev/rules.d
-%endif
+%{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d}
Name: usbmuxd
%define _libname libusbmuxd
@@ -32,18 +28,16 @@
Url: http://cgit.sukimashita.com/usbmuxd.git/
Source: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
Patch0: 0001-Add-support-for-automatic-activation-as-systemd-serv.patch
-%if 0%{?suse_version} >= 1230
-%{?systemd_requires}
-BuildRequires: systemd
-%endif
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libplist-devel
BuildRequires: libusb-1_0-devel >= 1.0.3
BuildRequires: pkg-config
-BuildRequires: udev
+BuildRequires: pkgconfig(systemd)
+BuildRequires: pkgconfig(udev)
Requires(pre): pwdutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%{?systemd_requires}
%description
This package provides the usbmuxd daemon for software to use through the
@@ -88,8 +82,19 @@
%pre
getent passwd usbmux >/dev/null || useradd -r -g nogroup -d /var/lib/%{name} -s /sbin/nologin -c "%{name} daemon" usbmux
+%service_add_pre usbmuxd.service
exit 0
+%preun
+%service_del_preun usbmuxd.service
+
+%post
+%{?udev_rules_update:%udev_rules_update}
+%service_add_post usbmuxd.service
+
+%postun
+%service_del_postun usbmuxd.service
+
%prep
%setup -q
%patch0 -p1
@@ -115,9 +120,7 @@
%if %{undefined suse_version}
-DCMAKE_INSTALL_DO_STRIP=1 \
%endif
-%if 0%{?suse_version} >= 1230
-DWANT_SYSTEMD=ON \
-%endif
..
make %{?_smp_mflags}
@@ -137,9 +140,7 @@
%doc AUTHORS COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 README
%{_sbindir}/usbmuxd
%{_udevrulesdir}/85-usbmuxd.rules
-%if 0%{?suse_version} >= 1230
%{_unitdir}/usbmuxd.service
-%endif
%files -n %{_libname}2
%defattr(-,root,root)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package snapper for openSUSE:Factory checked in at 2013-11-29 07:05:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/snapper (Old)
and /work/SRC/openSUSE:Factory/.snapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper"
Changes:
--------
--- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2013-11-07 09:04:02.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2013-11-29 07:05:11.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Nov 25 11:38:43 CET 2013 - aschnell(a)suse.de
+
+- allow to configure snapshotting from zypp-plugin depending on
+ package list (fate#316203)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ snapper.spec ++++++
--- /var/tmp/diff_new_pack.eyM94v/_old 2013-11-29 07:05:12.000000000 +0100
+++ /var/tmp/diff_new_pack.eyM94v/_new 2013-11-29 07:05:12.000000000 +0100
@@ -99,7 +99,9 @@
%defattr(-,root,root)
%{prefix}/bin/snapper
%{prefix}/sbin/snapperd
-%doc %{_mandir}/*/snapper*.*
+%doc %{_mandir}/*/snapper.8*
+%doc %{_mandir}/*/snapperd.8*
+%doc %{_mandir}/*/snapper-configs.5*
%config(noreplace) %{_sysconfdir}/logrotate.d/snapper
/etc/cron.hourly/suse.de-snapper
/etc/cron.daily/suse.de-snapper
@@ -173,9 +175,10 @@
%package -n snapper-zypp-plugin
Requires: dbus-1-python
+Requires: python-xml
Requires: snapper = %version
Requires: zypp-plugin-python
-Requires: libzypp(plugin:commit)
+Requires: libzypp(plugin:commit) = 1
Summary: A zypp commit plugin for calling snapper
Group: System/Packages
@@ -189,12 +192,15 @@
%files -n snapper-zypp-plugin
%defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf
%if 0%{?suse_version} < 1210
%dir /usr/lib/zypp
%dir /usr/lib/zypp/plugins
%dir /usr/lib/zypp/plugins/commit
%endif
/usr/lib/zypp/plugins/commit/snapper.py*
+%doc %{_mandir}/*/snapper-zypp-plugin.8*
+%doc %{_mandir}/*/snapper-zypp-plugin.conf.5*
%package -n grub-snapper-plugin
Requires: python
@@ -236,6 +242,6 @@
/%{_lib}/security/pam_snapper.so
%dir /usr/lib/pam_snapper
/usr/lib/pam_snapper/*.sh
-%doc %{_mandir}/*/pam_snapper*.*
+%doc %{_mandir}/*/pam_snapper.8*
%changelog
++++++ snapper-0.1.7.tar.bz2 ++++++
++++ 7780 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/README new/snapper-0.1.7/README
--- old/snapper-0.1.7/README 1970-01-01 01:00:00.000000000 +0100
+++ new/snapper-0.1.7/README 2013-11-19 17:40:27.000000000 +0100
@@ -0,0 +1,8 @@
+
+Snapper is a tool for Linux filesystem snapshot management. Apart from the
+obvious creation and deletion of snapshots, it can compare snapshots and
+revert differences between snapshots. In simple terms, this allows root and
+non-root users to view older versions of files and revert changes.
+
+For more information visit http://snapper.io/.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/configure.ac new/snapper-0.1.7/configure.ac
--- old/snapper-0.1.7/configure.ac 2013-10-11 16:20:30.000000000 +0200
+++ new/snapper-0.1.7/configure.ac 2013-11-22 16:57:19.000000000 +0100
@@ -144,6 +144,8 @@
doc/snapper.xml:doc/snapper.xml.in
doc/snapperd.xml:doc/snapperd.xml.in
doc/snapper-configs.xml:doc/snapper-configs.xml.in
+ doc/snapper-zypp-plugin.xml:doc/snapper-zypp-plugin.xml.in
+ doc/snapper-zypp-plugin.conf.xml:doc/snapper-zypp-plugin.conf.xml.in
doc/pam_snapper.xml:doc/pam_snapper.xml.in
po/Makefile
testsuite/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/data/Makefile.am new/snapper-0.1.7/data/Makefile.am
--- old/snapper-0.1.7/data/Makefile.am 2013-02-28 18:38:53.000000000 +0100
+++ new/snapper-0.1.7/data/Makefile.am 2013-11-25 11:05:58.000000000 +0100
@@ -3,7 +3,8 @@
#
EXTRA_DIST = sysconfig.snapper base.txt lvm.txt x11.txt snapper.logrotate \
- default-config org.opensuse.Snapper.conf org.opensuse.Snapper.service
+ default-config org.opensuse.Snapper.conf org.opensuse.Snapper.service \
+ zypp-plugin.conf
install-data-local:
install -D -m 644 snapper.logrotate $(DESTDIR)/etc/logrotate.d/snapper
@@ -15,3 +16,4 @@
install -D -m 644 x11.txt $(DESTDIR)/etc/snapper/filters/x11.txt
install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/etc/dbus-1/system.d/org.opensuse.Snapper.conf
install -D -m 644 org.opensuse.Snapper.service $(DESTDIR)/usr/share/dbus-1/system-services/org.opensuse.Snapper.service
+ install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/data/zypp-plugin.conf new/snapper-0.1.7/data/zypp-plugin.conf
--- old/snapper-0.1.7/data/zypp-plugin.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/snapper-0.1.7/data/zypp-plugin.conf 2013-11-26 17:51:23.000000000 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<snapper-zypp-plugin-conf>
+
+ <!-- List of solvables. If the zypp commit transaction includes any solvable
+ listed below, snapper will create pre and post snapshots. The match
+ attribute defines whether the pattern is a Unix shell-style wildcard
+ ("w") or a regular expression ("re"). If any of the matching solvables
+ is marked as important, the snapshots are also marked as important. -->
+ <solvables>
+ <solvable match="w" important="true">kernel-*</solvable>
+ <solvable match="w" important="true">mkinitrd</solvable>
+ <solvable match="w" important="true">glibc</solvable>
+ <solvable match="w" important="true">systemd</solvable>
+ <solvable match="w" important="true">udev</solvable>
+ <solvable match="w">*</solvable>
+ </solvables>
+
+</snapper-zypp-plugin-conf>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/Makefile.am new/snapper-0.1.7/doc/Makefile.am
--- old/snapper-0.1.7/doc/Makefile.am 2013-07-09 10:27:18.000000000 +0200
+++ new/snapper-0.1.7/doc/Makefile.am 2013-11-22 17:52:13.000000000 +0100
@@ -2,7 +2,8 @@
# Makefile.am for snapper/doc
#
-man_MANS = snapper.8 snapperd.8 snapper-configs.5
+man_MANS = snapper.8 snapperd.8 snapper-configs.5 snapper-zypp-plugin.8 \
+ snapper-zypp-plugin.conf.5
if HAVE_PAM
man_MANS += pam_snapper.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in new/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in
--- old/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in 1970-01-01 01:00:00.000000000 +0100
+++ new/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in 2013-11-26 10:45:16.000000000 +0100
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<refentry id='snapper-zypp-plugin.conf5'>
+
+ <refentryinfo>
+ <date>2013-11-22</date>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>snapper-zypp-plugin.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ <refmiscinfo class='date'>2013-11-22</refmiscinfo>
+ <refmiscinfo class='version'>@VERSION@</refmiscinfo>
+ <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>snapper-zypp-plugin.conf</refname>
+ <refpurpose>Configuration file for snapper-zypp-plugin</refpurpose>
+ </refnamediv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para>The file <filename>/etc/snapper/zypp-plugin.conf</filename> contains
+ the configuation for snapper-zypp-plugin.</para>
+
+ <para>The file uses XML syntax. For the XML structure have a look at the
+ provided default config.</para>
+ </refsect1>
+
+ <refsect1 id='homepage'>
+ <title>HOMEPAGE</title>
+ <para><ulink url='http://snapper.io/'>http://snapper.io/</ulink></para>
+ </refsect1>
+
+ <refsect1 id='authors'>
+ <title>AUTHORS</title>
+ <para>Arvin Schnell <email>aschnell(a)suse.de</email></para>
+ </refsect1>
+
+ <refsect1 id='see_also'>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry><refentrytitle>snapper-zypp-plugin</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in new/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in
--- old/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in 1970-01-01 01:00:00.000000000 +0100
+++ new/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in 2013-11-26 10:35:11.000000000 +0100
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<refentry id='snapper-zypp-plugin8'>
+
+ <refentryinfo>
+ <date>2013-11-22</date>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>snapper-zypp-plugin</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo class='date'>2013-11-22</refmiscinfo>
+ <refmiscinfo class='version'>@VERSION@</refmiscinfo>
+ <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>snapper-zypp-plugin</refname>
+ <refpurpose>Snapper plugin for libzypp</refpurpose>
+ </refnamediv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para>With the snapper-zypp-plugin, snapper can create snapshots whenever
+ libzypp, and thus e.g. zypper and YaST, installs, updates or removes
+ packages. </para>
+ </refsect1>
+
+ <refsect1 id='files'>
+ <title>FILES</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename>/etc/snapper/zypp-plugin.conf</filename></term>
+ <listitem>
+ <para>Configuration file. New in version 0.1.8.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id='homepage'>
+ <title>HOMEPAGE</title>
+ <para><ulink url='http://snapper.io/'>http://snapper.io/</ulink></para>
+ </refsect1>
+
+ <refsect1 id='authors'>
+ <title>AUTHORS</title>
+ <para>Arvin Schnell <email>aschnell(a)suse.de</email></para>
+ </refsect1>
+
+ <refsect1 id='see_also'>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry><refentrytitle>snapper-zypp-plugin.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>snapper</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>zypper</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>YaST</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper.xml.in new/snapper-0.1.7/doc/snapper.xml.in
--- old/snapper-0.1.7/doc/snapper.xml.in 2013-09-06 16:28:04.000000000 +0200
+++ new/snapper-0.1.7/doc/snapper.xml.in 2013-10-31 11:25:16.000000000 +0100
@@ -555,6 +555,7 @@
<title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>snapper-configs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>pam_snapper</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>lvm</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>attr</refentrytitle><manvolnum>5</manvolnum></citerefentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/examples/c++-lib/Create.cc new/snapper-0.1.7/examples/c++-lib/Create.cc
--- old/snapper-0.1.7/examples/c++-lib/Create.cc 2013-10-09 13:45:49.000000000 +0200
+++ new/snapper-0.1.7/examples/c++-lib/Create.cc 2013-10-25 10:57:47.000000000 +0200
@@ -1,4 +1,6 @@
+#include <unistd.h>
+#include <sys/types.h>
#include <stdlib.h>
#include <iostream>
@@ -12,7 +14,7 @@
{
Snapper* sh = new Snapper();
- sh->createSingleSnapshot("test");
+ sh->createSingleSnapshot(getuid(), "test", "number", map<string, string>());
delete sh;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/examples/c++-lib/SnapTest.cc new/snapper-0.1.7/examples/c++-lib/SnapTest.cc
--- old/snapper-0.1.7/examples/c++-lib/SnapTest.cc 2013-10-09 13:45:51.000000000 +0200
+++ new/snapper-0.1.7/examples/c++-lib/SnapTest.cc 2013-10-25 11:41:28.000000000 +0200
@@ -84,11 +84,11 @@
print_snap_info( j, snap.end() );
string desc = j->getDescription();
desc += " 1";
- j->setDescription(desc);
+ sh->modifySnapshot(j, desc, j->getCleanup(), j->getUserdata());
j = snap.findPost(s);
print_snap_info( j, snap.end() );
desc.erase( desc.size()-2 );
- j->setDescription(desc);
+ sh->modifySnapshot(j, desc, j->getCleanup(), j->getUserdata());
// testing handling userdata
j = snap.findPost(s);
@@ -98,11 +98,11 @@
sm["key1"] = "value1";
sm["key2"] = "value2";
sm["key3"] = "value3";
- j->setUserdata( sm );
+ sh->modifySnapshot(j, j->getDescription(), j->getCleanup(), sm);
map<string,string> sn=j->getUserdata();
print_smap_info( sn );
sn.clear();
- j->setUserdata( sn );
+ sh->modifySnapshot(j, j->getDescription(), j->getCleanup(), sn);
print_smap_info( j->getUserdata() );
// testing compare functionality
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/missing new/snapper-0.1.7/missing
--- old/snapper-0.1.7/missing 2013-10-24 17:46:46.000000000 +0200
+++ new/snapper-0.1.7/missing 2013-11-27 16:42:09.000000000 +0100
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-06-26.16; # UTC
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard(a)iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard(a)iro.umontreal.ca>, 1996.
# 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
@@ -29,61 +29,33 @@
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -98,228 +70,141 @@
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: '$1' $msg. You should only need it if
- you modified a '.y' file. You may need the Bison package
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.l' file. You may need the Flex package
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.texi' or '.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
- ;;
-esac
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/pam/Makefile.am new/snapper-0.1.7/pam/Makefile.am
--- old/snapper-0.1.7/pam/Makefile.am 2013-06-04 10:19:10.000000000 +0200
+++ new/snapper-0.1.7/pam/Makefile.am 2013-10-25 17:38:26.000000000 +0200
@@ -4,7 +4,7 @@
if HAVE_PAM
-AM_CFLAGS = -D_GNU_SOURCE
+AM_CFLAGS = -D_GNU_SOURCE -Wwrite-strings
INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/scripts/grub-plugin.py new/snapper-0.1.7/scripts/grub-plugin.py
--- old/snapper-0.1.7/scripts/grub-plugin.py 2013-10-15 16:25:42.000000000 +0200
+++ new/snapper-0.1.7/scripts/grub-plugin.py 2013-11-25 14:29:30.000000000 +0100
@@ -1,9 +1,31 @@
#!/usr/bin/python
+#
+# Copyright (c) [2011-2013] Novell, Inc.
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may
+# find current contact information at www.novell.com.
+#
+# Author: Arvin Schnell <aschnell(a)suse.de>
+#
+
from subprocess import check_output
from datetime import datetime
from xattr import xattr
-from array import array
from fcntl import ioctl
from os import open, close, O_RDONLY
from ctypes import c_ulonglong
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/scripts/zypp-plugin.py new/snapper-0.1.7/scripts/zypp-plugin.py
--- old/snapper-0.1.7/scripts/zypp-plugin.py 2013-10-08 13:22:32.000000000 +0200
+++ new/snapper-0.1.7/scripts/zypp-plugin.py 2013-11-27 16:41:27.000000000 +0100
@@ -1,50 +1,226 @@
#!/usr/bin/python
+#
+# Copyright (c) [2011-2013] Novell, Inc.
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may
+# find current contact information at www.novell.com.
+#
+# Author: Arvin Schnell <aschnell(a)suse.de>
+#
+
from os import readlink, getppid
from os.path import basename
-from sys import stderr
+import fnmatch
+import re
+import logging
from dbus import SystemBus, Interface
+import xml.dom.minidom as minidom
+import xml.parsers.expat as expat
+import json
from zypp_plugin import Plugin
+
+class Solvable:
+
+ def __init__(self, pattern, important):
+ self.pattern = re.compile(pattern)
+ self.important = important
+
+ def __repr__(self):
+ return "pattern:%s important:%s" % (self.pattern, self.important)
+
+ def match(self, name):
+ return self.pattern.match(name)
+
+
+
+class Config:
+
+ def __init__(self):
+ self.solvables = []
+ self.load_file("/etc/snapper/zypp-plugin.conf")
+
+
+ def load_file(self, filename):
+ try:
+ self.load_dom(minidom.parse(filename))
+ except IOError:
+ logging.error("failed to open %s" % filename)
+ except expat.ExpatError:
+ logging.error("failed to parse %s" % filename)
+ except:
+ logging.error("failed to load %s" % filename)
+
+
+ def load_dom(self, dom):
+ try:
+ for tmp1 in dom.getElementsByTagName("solvables"):
+ for tmp2 in tmp1.getElementsByTagName("solvable"):
+
+ pattern = tmp2.childNodes[0].data
+ match = tmp2.getAttribute("match")
+ important = tmp2.getAttribute("important") == "true"
+
+ if not match in [ "w", "re" ]:
+ logging.error("unknown match attribute %s" % match)
+ continue
+
+ if match == "w":
+ pattern = fnmatch.translate(pattern)
+
+ self.solvables.append(Solvable(pattern, important))
+
+ except:
+ pass
+
+
+
class MyPlugin(Plugin):
+ def __init__(self):
+ Plugin.__init__(self)
+ self.num1 = self.num2 = None
+ self.description = ""
+ self.cleanup = "number"
+ self.userdata = {}
+
+
+ def parse_userdata(self, s):
+ userdata = {}
+ for kv in s.split(","):
+ k, v = kv.split("=", 1)
+ k = k.strip()
+ if not k:
+ raise ValueError
+ userdata[k] = v.strip()
+ return userdata
+
+
+ def get_userdata(self, headers):
+ try:
+ return self.parse_userdata(headers['userdata'])
+ except KeyError:
+ pass
+ except ValueError:
+ logging.error("invalid userdata")
+ return {}
+
+
+ def get_solvables(self, body, todo):
+ tmp = json.loads(body)
+ tsl = tmp["TransactionStepList"]
+ solvables = set()
+ for ts in tsl:
+ if "type" in ts:
+ if todo or "stage" in ts:
+ solvables.add(ts["solvable"]["n"])
+ return solvables
+
+
+ def match_solvables(self, names):
+ found = important = False
+ for name in names:
+ for solvable in config.solvables:
+ if solvable.match(name):
+ found = True
+ important = important or solvable.important
+ if found and important:
+ return True, True
+ return found, important
+
+
+ def PLUGINBEGIN(self, headers, body):
+
+ logging.info("PLUGINBEGIN")
+
+ logging.debug("headers: %s" % headers)
+
+ self.description = "zypp(%s)" % basename(readlink("/proc/%d/exe" % getppid()))
+ self.userdata = self.get_userdata(headers)
+
+ self.ack()
+
+
+ def COMMITBEGIN(self, headers, body):
+
+ logging.info("COMMITBEGIN")
+
+ solvables = self.get_solvables(body, True)
+ logging.debug("solvables: %s" % solvables)
+
+ found, important = self.match_solvables(solvables)
+ logging.info("found: %s, important: %s" % (found, important))
+
+ if found or important:
+
+ self.userdata["important"] = "yes" if important else "no"
+
+ logging.info("creating pre snapshot")
+ self.num1 = snapper.CreatePreSnapshot("root", self.description, self.cleanup,
+ self.userdata)
+ logging.debug("created pre snapshot %d" % self.num1)
+
+ self.ack()
+
+
+ def COMMITEND(self, headers, body):
+
+ logging.info("COMMITEND")
+
+ if self.num1:
+
+ solvables = self.get_solvables(body, False)
+ logging.debug("solvables: %s" % solvables)
+
+ found, important = self.match_solvables(solvables)
+ logging.info("found: %s, important: %s" % (found, important))
+
+ if found or important:
- def parse_userdata(self, s):
- ud = {}
- for kv in s.split(","):
- k, v = kv.split("=", 1)
- k = k.strip()
- if not k:
- raise ValueError
- ud[k] = v.strip()
- return ud
+ self.userdata["important"] = "yes" if important else "no"
+ snapper.SetSnapshot("root", self.num1, self.description, self.cleanup,
+ self.userdata)
- def PLUGINBEGIN(self, headers, body):
+ logging.info("creating post snapshot")
+ self.num2 = snapper.CreatePostSnapshot("root", self.num1, "", self.cleanup,
+ self.userdata)
+ logging.debug("created post snapshot %d" % self.num2)
- exe = basename(readlink("/proc/%d/exe" % getppid()))
+ else:
- self.userdata = {}
+ logging.info("deleting pre snapshot")
+ snapper.DeleteSnapshots("root", [ self.num1 ])
+ logging.debug("deleted pre snapshot %d" % self.num1)
- try:
- self.userdata = self.parse_userdata(headers['userdata'])
- except KeyError:
- pass
- except ValueError:
- stderr.write("invalid userdata")
+ self.ack()
- self.num1 = snapper.CreatePreSnapshot("root", "zypp(%s)" % exe, "number", self.userdata)
- self.ack()
+ def PLUGINEND(self, headers, body):
+ logging.info("PLUGINEND")
- def PLUGINEND(self, headers, body):
+ self.ack()
- self.num2 = snapper.CreatePostSnapshot("root", self.num1, "", "number", self.userdata)
- self.ack()
+config = Config()
bus = SystemBus()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/snapper.spec.in new/snapper-0.1.7/snapper.spec.in
--- old/snapper-0.1.7/snapper.spec.in 2013-10-15 17:38:42.000000000 +0200
+++ new/snapper-0.1.7/snapper.spec.in 2013-11-25 16:29:38.000000000 +0100
@@ -99,7 +99,9 @@
%defattr(-,root,root)
%{prefix}/bin/snapper
%{prefix}/sbin/snapperd
-%doc %{_mandir}/*/snapper*.*
+%doc %{_mandir}/*/snapper.8*
+%doc %{_mandir}/*/snapperd.8*
+%doc %{_mandir}/*/snapper-configs.5*
%config(noreplace) %{_sysconfdir}/logrotate.d/snapper
/etc/cron.hourly/suse.de-snapper
/etc/cron.daily/suse.de-snapper
@@ -173,9 +175,10 @@
%package -n snapper-zypp-plugin
Requires: dbus-1-python
+Requires: libzypp(plugin:commit) = 1
+Requires: python-xml
Requires: snapper = %version
Requires: zypp-plugin-python
-Requires: libzypp(plugin:commit)
Summary: A zypp commit plugin for calling snapper
Group: System/Packages
@@ -189,12 +192,15 @@
%files -n snapper-zypp-plugin
%defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf
%if 0%{?suse_version} < 1210
%dir /usr/lib/zypp
%dir /usr/lib/zypp/plugins
%dir /usr/lib/zypp/plugins/commit
%endif
/usr/lib/zypp/plugins/commit/snapper.py*
+%doc %{_mandir}/*/snapper-zypp-plugin.8*
+%doc %{_mandir}/*/snapper-zypp-plugin.conf.5*
%package -n grub-snapper-plugin
Requires: python
@@ -236,6 +242,6 @@
/%{_lib}/security/pam_snapper.so
%dir /usr/lib/pam_snapper
/usr/lib/pam_snapper/*.sh
-%doc %{_mandir}/*/pam_snapper*.*
+%doc %{_mandir}/*/pam_snapper.8*
%changelog
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-py-bcrypt for openSUSE:Factory checked in at 2013-11-29 07:05:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py-bcrypt (Old)
and /work/SRC/openSUSE:Factory/.python-py-bcrypt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-py-bcrypt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py-bcrypt/python-py-bcrypt.changes 2012-06-13 13:33:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-py-bcrypt.new/python-py-bcrypt.changes 2013-11-29 07:05:03.000000000 +0100
@@ -1,0 +2,11 @@
+Wed Nov 27 21:20:35 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to version 0.4
+ + No changelog available
+- Remove unwanted %py_requires macro
+- %{python_sitearch} need to get define only with SLE11; add conditional
+ version macro
+- Add download Url as source
+- Add usual documentation from tarball
+
+-------------------------------------------------------------------
Old:
----
py-bcrypt-0.2.tar.gz
New:
----
py-bcrypt-0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-py-bcrypt.spec ++++++
--- /var/tmp/diff_new_pack.WkNEGi/_old 2013-11-29 07:05:05.000000000 +0100
+++ /var/tmp/diff_new_pack.WkNEGi/_new 2013-11-29 07:05:05.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-py-bcrypt
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,18 @@
#
Name: python-py-bcrypt
-Version: 0.2
+Version: 0.4
Release: 0
Url: http://www.mindrot.org/py-bcrypt.html
Summary: Blowfish password hashing
License: BSD-3-Clause and BSD-4-Clause
Group: Development/Languages/Python
-Source: py-bcrypt-%{version}.tar.gz
+Source: https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-%{version}.ta…
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
-%if 0%{?suse_version}
-%py_requires
-%endif
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%endif
%description
py-bcrypt is an implementation the OpenBSD Blowfish password hashing
@@ -53,7 +51,7 @@
%files
%defattr(-,root,root,-)
-# You may have to add additional files here (documentation and binaries mostly)
+%doc LICENSE README TODO
%{python_sitearch}/*
%changelog
++++++ py-bcrypt-0.2.tar.gz -> py-bcrypt-0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/ChangeLog new/py-bcrypt-0.4/ChangeLog
--- old/py-bcrypt-0.2/ChangeLog 2010-06-14 01:19:27.000000000 +0200
+++ new/py-bcrypt-0.4/ChangeLog 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-20100614
- - (djm) Prefer setuptools for packaging. Based on patch from Niall
- O'Higgins.
- - (djm) Release py-bcrypt-0.2
-
-20091001
- - (djm) Allow Python threads to run during (potentially lengthy) bcrypt
- operation. Patch from vijay AT meebo-inc.com
-
-20060808
- - (djm) Add support for Win32
-
-20060522
- - (djm) Start
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/LICENSE new/py-bcrypt-0.4/LICENSE
--- old/py-bcrypt-0.2/LICENSE 2006-05-22 13:53:27.000000000 +0200
+++ new/py-bcrypt-0.4/LICENSE 2013-07-29 06:55:08.000000000 +0200
@@ -85,3 +85,76 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+The KDF code is from OpenBSD libutil and is subject to the following licence:
+
+/*
+ * Copyright (c) 2013 Ted Unangst <tedu(a)openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+The SHA512 code is from OpenBSD libc and is subject to the following license:
+
+/*
+ * FILE: sha2.c
+ * AUTHOR: Aaron D. Gifford <me(a)aarongifford.com>
+ *
+ * Copyright (c) 2000-2001, Aaron D. Gifford
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
+ */
+
+The timingsafe_bcmp is from OpenBSD libc and is subject to the following
+license:
+
+/*
+ * Copyright (c) 2010 Damien Miller. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/MANIFEST new/py-bcrypt-0.4/MANIFEST
--- old/py-bcrypt-0.2/MANIFEST 2006-05-22 13:53:27.000000000 +0200
+++ new/py-bcrypt-0.4/MANIFEST 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-README
-PKG-INFO
-LICENSE
-ChangeLog
-TODO
-setup.py
-bcrypt/__init__.py
-bcrypt/bcrypt.c
-bcrypt/bcrypt_python.c
-bcrypt/blowfish.c
-bcrypt/pybc_blf.h
-test/test.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/PKG-INFO new/py-bcrypt-0.4/PKG-INFO
--- old/py-bcrypt-0.2/PKG-INFO 2010-06-14 01:18:52.000000000 +0200
+++ new/py-bcrypt-0.4/PKG-INFO 2013-08-25 02:36:53.000000000 +0200
@@ -1,19 +1,23 @@
Metadata-Version: 1.0
Name: py-bcrypt
-Version: 0.2
-Summary: Blowfish password hashing library
-Home-page: http://www.mindrot.org/py-bcrypt.html
+Version: 0.4
+Summary: bcrypt password hashing and key derivation
+Home-page: https://code.google.com/p/py-bcrypt
Author: Damien Miller
Author-email: djm(a)mindrot.org
License: BSD
-Download-URL: http://www2.mindrot.org/files/py-bcrypt/
-Description: py-bcrypt is an implementation of the OpenBSD blowfish
- password hashing algorithm, as described in the paper
- "A Future-Adaptable Password Scheme", Niels Provos and
- David Mazieres
-Keywords: password,hash,crypt,python,blowfish,crypto
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Natural Language :: English
-Classifier: Programming Language :: Python
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Description: py-bcrypt is an implementation the OpenBSD Blowfish password hashing
+ algorithm, as described in "A Future-Adaptable Password Scheme" by
+ Niels Provos and David Mazieres and related bcrypt-based key derivation
+ function implemented in OpenBSD libutil.
+
+ This system hashes passwords using a version of Bruce Schneier's
+ Blowfish block cipher with modifications designed to raise the cost
+ of off-line password cracking. The computation cost of the algorithm
+ is parametised, so it can be increased as computers get faster.
+
+ Two interfaces are supported: a classic password hashing interface and
+ a key derivation function (KDF) intended for generating cryptographic
+ keys.
+
+Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/README new/py-bcrypt-0.4/README
--- old/py-bcrypt-0.2/README 2006-05-22 13:53:27.000000000 +0200
+++ new/py-bcrypt-0.4/README 2013-07-29 14:08:34.000000000 +0200
@@ -18,7 +18,8 @@
Regression tests are in the test/test.py file. This is deliberately in
a subdirectory so it does not mistakenly pick up the top-level bcrypt/
-directory.
+directory. ***PLEASE*** run the regress tests and ensure they pass before
+installing this module.
py-bcrypt is licensed under a ISC/BSD licence. The underlying Blowfish
and password hashing code is taken from OpenBSD's libc. See the LICENSE
@@ -40,10 +41,13 @@
hashed = bcrypt.hashpw(password, bcrypt.gensalt(10))
# Check that an unencrypted password matches one that has
- # previously been hashed
- if bcrypt.hashpw(plaintext, hashed) == hashed:
+ # previously been hashed.
+ if bcrypt.checkpw(plaintext, hashed):
print "It matches"
else:
print "It does not match"
-$Id: README,v 1.1.1.1 2006/05/22 11:53:27 djm Exp $
+ # Generate a 256-bit cryptographic key
+ key = bcrypt.kdf(password, salt, 100, 256/8)
+
+$Id$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/TODO new/py-bcrypt-0.4/TODO
--- old/py-bcrypt-0.2/TODO 2010-06-14 01:18:52.000000000 +0200
+++ new/py-bcrypt-0.4/TODO 2013-07-29 06:54:32.000000000 +0200
@@ -1,3 +1,3 @@
-Python 3 support
+Improve regress tests: tests for bad parameters
-$Id: TODO,v 1.2 2010/06/13 23:18:52 djm Exp $
+$Id$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/__init__.py new/py-bcrypt-0.4/bcrypt/__init__.py
--- old/py-bcrypt-0.2/bcrypt/__init__.py 2006-05-22 13:53:27.000000000 +0200
+++ new/py-bcrypt-0.4/bcrypt/__init__.py 2013-07-29 06:54:32.000000000 +0200
@@ -20,10 +20,32 @@
The parameter "log_rounds" defines the complexity of the hashing. The
cost increases as 2**log_rounds.
+
+Passwords can be checked against a hashed copy using the checkpw() routine:
+
+ checkpw(password, hashed_password) -> boolean (true if matched)
+
+Passwords and salts for the hashpw and gensalt functions are text strings
+that must not contain embedded nul (ASCII 0) characters.
+
+This module also operates as a key derivation function (KDF) to transform a
+password and salt into bytes suitable for use as cryptographic key material:
+
+ kdf(password, salt, desired_length, rounds) -> key
+
+This will generate a key of "desired_length" in bytes (NB. not bits). For the
+KDF mode the "rounds" parameter is the literal rounds, not the logarithm as
+for gensalt. For the KDF case, "salt" and "password" may be binary strings
+containing embedded nul characters. Note also that the "salt" for the KDF
+should just be a random sequence of bytes (e.g. as generated by os.urandom)
+and not one prepared with gensalt().
+
+The KDF mode is recommended for generating symmetric cipher keys, IVs, hash
+and MAC keys, etc. It should not be used a keystream for encryption itself.
"""
import os
-from _bcrypt import *
+from bcrypt._bcrypt import *
def gensalt(log_rounds = 12):
"""Generate a random text salt for use with hashpw(). "log_rounds"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/bcrypt.c new/py-bcrypt-0.4/bcrypt/bcrypt.c
--- old/py-bcrypt-0.2/bcrypt/bcrypt.c 2006-08-08 04:34:02.000000000 +0200
+++ new/py-bcrypt-0.4/bcrypt/bcrypt.c 2013-07-28 01:49:08.000000000 +0200
@@ -52,8 +52,9 @@
#include "pybc_blf.h"
-#if defined(_MSC_VER)
+#if defined(_WIN32)
#define snprintf _snprintf
+#define bzero(s,n) memset(s, '\0', n)
#endif
/* This implementation is adaptable to current computing power.
@@ -66,15 +67,12 @@
#define BCRYPT_BLOCKS 6 /* Ciphertext blocks */
#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */
-char *pybc_bcrypt(const char *, const char *);
+int pybc_bcrypt(const char *, const char *, char *, size_t);
void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
static void decode_base64(u_int8_t *, u_int16_t, u_int8_t *);
-static char encrypted[128];
-static char error[] = ":";
-
const static u_int8_t Base64Code[] =
"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
@@ -146,8 +144,8 @@
/* We handle $Vers$log2(NumRounds)$salt+passwd$
i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
-char *
-pybc_bcrypt(const char *key, const char *salt)
+int
+pybc_bcrypt(const char *key, const char *salt, char *result, size_t result_len)
{
pybc_blf_ctx state;
u_int32_t rounds, i, k;
@@ -157,14 +155,18 @@
u_int8_t csalt[BCRYPT_MAXSALT];
u_int32_t cdata[BCRYPT_BLOCKS];
int n;
+ char encrypted[128];
+ size_t elen;
+
+ /* Return the error marker unless otherwise specified */
+ bzero(result, result_len);
+ *result = ':';
/* Discard "$" identifier */
salt++;
- if (*salt > BCRYPT_VERSION) {
- /* How do I handle errors ? Return ':' */
- return error;
- }
+ if (*salt > BCRYPT_VERSION)
+ return -1;
/* Check for minor versions */
if (salt[1] != '$') {
@@ -175,7 +177,7 @@
salt++;
break;
default:
- return error;
+ return -1;
}
} else
minor = 0;
@@ -185,21 +187,21 @@
if (salt[2] != '$')
/* Out of sync with passwd entry */
- return error;
+ return -1;
/* Computer power doesn't increase linear, 2^x should be fine */
n = atoi(salt);
if (n > 31 || n < 0)
- return error;
+ return -1;
logr = (u_int8_t)n;
if ((rounds = (u_int32_t) 1 << logr) < BCRYPT_MINROUNDS)
- return error;
+ return -1;
/* Discard num rounds + "$" identifier */
salt += 3;
if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT)
- return error;
+ return -1;
/* We dont want the base64 salt but the raw data */
decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt);
@@ -249,7 +251,14 @@
encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT);
encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext,
4 * BCRYPT_BLOCKS - 1);
- return encrypted;
+ elen = strlen(encrypted);
+ if (result_len <= elen) {
+ bzero(encrypted, sizeof(encrypted));
+ return -1;
+ }
+ memcpy(result, encrypted, elen + 1);
+ bzero(encrypted, sizeof(encrypted));
+ return 0;
}
static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/bcrypt_pbkdf.c new/py-bcrypt-0.4/bcrypt/bcrypt_pbkdf.c
--- old/py-bcrypt-0.2/bcrypt/bcrypt_pbkdf.c 1970-01-01 01:00:00.000000000 +0100
+++ new/py-bcrypt-0.4/bcrypt/bcrypt_pbkdf.c 2013-07-29 14:16:52.000000000 +0200
@@ -0,0 +1,160 @@
+/* $OpenBSD: bcrypt_pbkdf.c,v 1.3 2013/06/04 15:55:50 tedu Exp $ */
+/*
+ * Copyright (c) 2013 Ted Unangst <tedu(a)openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "pybc_blf.h"
+#include "pybc_sha2.h"
+
+/*
+ * pkcs #5 pbkdf2 implementation using the "bcrypt" hash
+ *
+ * The bcrypt hash function is derived from the bcrypt password hashing
+ * function with the following modifications:
+ * 1. The input password and salt are preprocessed with SHA512.
+ * 2. The output length is expanded to 256 bits.
+ * 3. Subsequently the magic string to be encrypted is lengthened and modifed
+ * to "OxychromaticBlowfishSwatDynamite"
+ * 4. The hash function is defined to perform 64 rounds of initial state
+ * expansion. (More rounds are performed by iterating the hash.)
+ *
+ * Note that this implementation pulls the SHA512 operations into the caller
+ * as a performance optimization.
+ *
+ * One modification from official pbkdf2. Instead of outputting key material
+ * linearly, we mix it. pbkdf2 has a known weakness where if one uses it to
+ * generate (i.e.) 512 bits of key material for use as two 256 bit keys, an
+ * attacker can merely run once through the outer loop below, but the user
+ * always runs it twice. Shuffling output bytes requires computing the
+ * entirety of the key material to assemble any subkey. This is something a
+ * wise caller could do; we just do it for you.
+ */
+
+#define BCRYPT_BLOCKS 8
+#define BCRYPT_HASHSIZE (BCRYPT_BLOCKS * 4)
+
+static void
+bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, u_int8_t *out)
+{
+ pybc_blf_ctx state;
+ u_int8_t ciphertext[BCRYPT_HASHSIZE] =
+ "OxychromaticBlowfishSwatDynamite";
+ u_int32_t cdata[BCRYPT_BLOCKS];
+ int i;
+ u_int16_t j;
+ size_t shalen = PYBC_SHA512_DIGEST_LENGTH;
+
+ /* key expansion */
+ pybc_Blowfish_initstate(&state);
+ pybc_Blowfish_expandstate(&state, sha2salt, shalen, sha2pass, shalen);
+ for (i = 0; i < 64; i++) {
+ pybc_Blowfish_expand0state(&state, sha2salt, shalen);
+ pybc_Blowfish_expand0state(&state, sha2pass, shalen);
+ }
+
+ /* encryption */
+ j = 0;
+ for (i = 0; i < BCRYPT_BLOCKS; i++)
+ cdata[i] = pybc_Blowfish_stream2word(ciphertext, sizeof(ciphertext),
+ &j);
+ for (i = 0; i < 64; i++)
+ pybc_blf_enc(&state, cdata, sizeof(cdata) / sizeof(u_int64_t));
+
+ /* copy out */
+ for (i = 0; i < BCRYPT_BLOCKS; i++) {
+ out[4 * i + 3] = (cdata[i] >> 24) & 0xff;
+ out[4 * i + 2] = (cdata[i] >> 16) & 0xff;
+ out[4 * i + 1] = (cdata[i] >> 8) & 0xff;
+ out[4 * i + 0] = cdata[i] & 0xff;
+ }
+
+ /* zap */
+ memset(ciphertext, 0, sizeof(ciphertext));
+ memset(cdata, 0, sizeof(cdata));
+ memset(&state, 0, sizeof(state));
+}
+
+int
+bcrypt_pbkdf(const u_int8_t *pass, size_t passlen, const u_int8_t *salt, size_t saltlen,
+ u_int8_t *key, size_t keylen, unsigned int rounds)
+{
+ PYBC_SHA2_CTX ctx;
+ u_int8_t sha2pass[PYBC_SHA512_DIGEST_LENGTH];
+ u_int8_t sha2salt[PYBC_SHA512_DIGEST_LENGTH];
+ u_int8_t out[BCRYPT_HASHSIZE];
+ u_int8_t tmpout[BCRYPT_HASHSIZE];
+ u_int8_t countsalt[4];
+ size_t i, j, amt, stride;
+ u_int32_t count;
+
+ /* nothing crazy */
+ if (rounds < 1)
+ return -1;
+ if (passlen == 0 || saltlen == 0 || keylen == 0 ||
+ keylen > sizeof(out) * sizeof(out))
+ return -1;
+ stride = (keylen + sizeof(out) - 1) / sizeof(out);
+ amt = (keylen + stride - 1) / stride;
+
+ /* collapse password */
+ PYBC_SHA512Init(&ctx);
+ PYBC_SHA512Update(&ctx, pass, passlen);
+ PYBC_SHA512Final(sha2pass, &ctx);
+
+ /* generate key, sizeof(out) at a time */
+ for (count = 1; keylen > 0; count++) {
+ countsalt[0] = (count >> 24) & 0xff;
+ countsalt[1] = (count >> 16) & 0xff;
+ countsalt[2] = (count >> 8) & 0xff;
+ countsalt[3] = count & 0xff;
+
+ /* first round, salt is salt */
+ PYBC_SHA512Init(&ctx);
+ PYBC_SHA512Update(&ctx, salt, saltlen);
+ PYBC_SHA512Update(&ctx, countsalt, sizeof(countsalt));
+ PYBC_SHA512Final(sha2salt, &ctx);
+ bcrypt_hash(sha2pass, sha2salt, tmpout);
+ memcpy(out, tmpout, sizeof(out));
+
+ for (i = 1; i < rounds; i++) {
+ /* subsequent rounds, salt is previous output */
+ PYBC_SHA512Init(&ctx);
+ PYBC_SHA512Update(&ctx, tmpout, sizeof(tmpout));
+ PYBC_SHA512Final(sha2salt, &ctx);
+ bcrypt_hash(sha2pass, sha2salt, tmpout);
+ for (j = 0; j < sizeof(out); j++)
+ out[j] ^= tmpout[j];
+ }
+
+ /*
+ * pbkdf2 deviation: ouput the key material non-linearly.
+ */
+ if (keylen < amt)
+ amt = keylen;
+ for (i = 0; i < amt; i++)
+ key[i * stride + (count - 1)] = out[i];
+ keylen -= amt;
+ }
+
+ /* zap */
+ memset(&ctx, 0, sizeof(ctx));
+ memset(out, 0, sizeof(out));
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/bcrypt_python.c new/py-bcrypt-0.4/bcrypt/bcrypt_python.c
--- old/py-bcrypt-0.2/bcrypt/bcrypt_python.c 2009-10-01 15:09:52.000000000 +0200
+++ new/py-bcrypt-0.4/bcrypt/bcrypt_python.c 2013-08-25 02:31:16.000000000 +0200
@@ -14,18 +14,25 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#if defined(_MSC_VER)
-typedef unsigned __int8 u_int8_t;
-typedef unsigned __int16 u_int16_t;
-typedef unsigned __int32 u_int32_t;
+#include "pybc_blf.h"
+
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
#endif
-/* $Id: bcrypt_python.c,v 1.3 2009/10/01 13:09:52 djm Exp $ */
+#define PYBCRYPT_VERSION "0.4"
+
+#if defined(_WIN32)
+#define bzero(s,n) memset(s, '\0', n)
+#endif
+
+/* $Id$ */
/* Import */
-char *pybc_bcrypt(const char *, const char *);
+int pybc_bcrypt(const char *, const char *, char *, size_t);
void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
PyDoc_STRVAR(bcrypt_encode_salt_doc,
@@ -37,8 +44,8 @@
bcrypt_encode_salt(PyObject *self, PyObject *args, PyObject *kw_args)
{
static char *keywords[] = { "csalt", "log_rounds", NULL };
- char *csalt = NULL;
- int csaltlen = -1;
+ u_int8_t *csalt = NULL;
+ Py_ssize_t csaltlen = -1;
long log_rounds = -1;
char ret[64];
@@ -54,7 +61,31 @@
return NULL;
}
encode_salt(ret, csalt, csaltlen, log_rounds);
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(ret);
+#else
return PyString_FromString(ret);
+#endif
+}
+
+/* Check that a string has no embedded '\0' characters and duplicate it. */
+static char *
+checkdup(const char *s, Py_ssize_t len)
+{
+ Py_ssize_t i;
+ char *ret;
+
+ if (len < 0)
+ return NULL;
+ for (i = 0; i < len; i++) {
+ if (s[i] == '\0')
+ return NULL;
+ }
+ if ((ret = malloc(len + 1)) == NULL)
+ return NULL;
+ memcpy(ret, s, len);
+ ret[len] = '\0';
+ return ret;
}
PyDoc_STRVAR(bcrypt_hashpw_doc,
@@ -67,46 +98,236 @@
{
static char *keywords[] = { "password", "salt", NULL };
char *password = NULL, *salt = NULL;
- char *ret;
+ char hashed[128], *password_copy, *salt_copy;
+ Py_ssize_t password_len = -1, salt_len = -1;
+ int ret;
- if (!PyArg_ParseTupleAndKeywords(args, kw_args, "ss:hashpw", keywords,
- &password, &salt))
+ if (!PyArg_ParseTupleAndKeywords(args, kw_args, "s#s#:hashpw", keywords,
+ &password, &password_len, &salt, &salt_len))
return NULL;
- char *password_copy = strdup(password);
- char *salt_copy = strdup(salt);
-
+ if (password_len < 0 || password_len > 65535) {
+ PyErr_SetString(PyExc_ValueError,
+ "unsupported password length");
+ return NULL;
+ }
+ if (salt_len < 0 || salt_len > 65535) {
+ PyErr_SetString(PyExc_ValueError, "unsupported salt length");
+ return NULL;
+ }
+ if ((password_copy = checkdup(password, password_len)) == NULL) {
+ PyErr_SetString(PyExc_ValueError,
+ "password must not contain nul characters");
+ return NULL;
+ }
+ password_len = 0;
+ if ((salt_copy = checkdup(salt, salt_len)) == NULL) {
+ PyErr_SetString(PyExc_ValueError,
+ "salt must not contain nul characters");
+ bzero(password_copy, strlen(password_copy));
+ free(password_copy);
+ return NULL;
+ }
Py_BEGIN_ALLOW_THREADS;
- ret = pybc_bcrypt(password_copy, salt_copy);
+ ret = pybc_bcrypt(password_copy, salt_copy, hashed, sizeof(hashed));
Py_END_ALLOW_THREADS;
+ bzero(password_copy, strlen(password_copy));
free(password_copy);
+ bzero(salt_copy, strlen(salt_copy));
free(salt_copy);
- if ((ret == NULL) ||
- strcmp(ret, ":") == 0) {
+ if (ret != 0 || strlen(hashed) < 32) {
PyErr_SetString(PyExc_ValueError, "Invalid salt");
return NULL;
}
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(hashed);
+#else
+ return PyString_FromString(hashed);
+#endif
+}
- return PyString_FromString(ret);
+PyDoc_STRVAR(bcrypt_checkpw_doc,
+"checkpw(password, hashed_password) -> boolean\n\
+ Verify that the plaintext password matches hashed_password. Returns true\n\
+ if it matches or false otherwise.\n");
+
+static PyObject *
+bcrypt_checkpw(PyObject *self, PyObject *args, PyObject *kw_args)
+{
+ static char *keywords[] = { "password", "hashed_password", NULL };
+ char *password = NULL, *expected = NULL;
+ char hashed[128], *password_copy, *expected_copy;
+ Py_ssize_t password_len = -1, expected_len = -1, hashed_len;
+ int ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kw_args, "s#s#:checkpw",
+ keywords,
+ &password, &password_len, &expected, &expected_len))
+ return NULL;
+
+ if (password_len < 0 || password_len > 65535) {
+ PyErr_SetString(PyExc_ValueError,
+ "unsupported password length");
+ return NULL;
+ }
+ if (expected_len < 0 || expected_len > 65535) {
+ PyErr_SetString(PyExc_ValueError,
+ "unsupported hashed_password length");
+ return NULL;
+ }
+ if ((password_copy = checkdup(password, password_len)) == NULL) {
+ PyErr_SetString(PyExc_ValueError,
+ "password must not contain nul characters");
+ return NULL;
+ }
+ password_len = 0;
+ if ((expected_copy = checkdup(expected, expected_len)) == NULL) {
+ PyErr_SetString(PyExc_ValueError,
+ "hashed_password must not contain nul characters");
+ bzero(password_copy, strlen(password_copy));
+ free(password_copy);
+ return NULL;
+ }
+
+ Py_BEGIN_ALLOW_THREADS;
+ ret = pybc_bcrypt(password_copy, expected_copy, hashed, sizeof(hashed));
+ Py_END_ALLOW_THREADS;
+
+ bzero(password_copy, strlen(password_copy));
+ free(password_copy);
+ hashed_len = strlen(hashed);
+ if (ret != 0 || hashed_len < 32) {
+ PyErr_SetString(PyExc_ValueError,
+ "Invalid hashed_password salt");
+ bzero(expected_copy, strlen(expected_copy));
+ free(expected_copy);
+ return NULL;
+ }
+ ret = 1; /* fail unless timingsafe_bcmp runs and succeeds */
+ if (hashed_len == strlen(expected_copy))
+ ret = pybc_timingsafe_bcmp(expected_copy, hashed, hashed_len);
+ bzero(hashed, sizeof(hashed));
+ bzero(expected_copy, strlen(expected_copy));
+ free(expected_copy);
+ if (ret == 0)
+ Py_RETURN_TRUE;
+ else
+ Py_RETURN_FALSE;
+}
+
+PyDoc_STRVAR(bcrypt_kdf_doc,
+"kdf(password, salt, desired_key_bytes, rounds) -> key\n\
+ Derive \"desired_key_bytes\" (up to 512) cryptographic key material from\n\
+ a password and salt. NB. rounds is linear (not an exponent like\n\
+ gensalt). Recommended minimum salt length is 16 bytes\n");
+
+#if 0
+static void
+xdump(const u_int8_t *s, size_t l)
+{
+ size_t i;
+
+ for (i = 0; i < l; i++)
+ printf("\\x%02x", s[i]);
+}
+#endif
+
+static PyObject *
+bcrypt_kdf(PyObject *self, PyObject *args, PyObject *kw_args)
+{
+ static char *keywords[] = {
+ "password",
+ "salt",
+ "desired_key_bytes",
+ "rounds",
+ NULL
+ };
+ const u_int8_t *password = NULL, *salt = NULL;
+ Py_ssize_t password_len = -1, salt_len = -1;
+ long desired_key_bytes = -1, rounds = -1;
+ u_int8_t *key;
+ int ret;
+ PyObject *o = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kw_args, "s#s#ll:kdf", keywords,
+ &password, &password_len, &salt, &salt_len,
+ &desired_key_bytes, &rounds))
+ return NULL;
+ if (password_len <= 0) {
+ PyErr_SetString(PyExc_ValueError, "Invalid password length");
+ return NULL;
+ }
+ if (salt_len <= 0) {
+ PyErr_SetString(PyExc_ValueError, "Invalid salt length");
+ return NULL;
+ }
+ if (desired_key_bytes <= 0 || desired_key_bytes > 512) {
+ PyErr_SetString(PyExc_ValueError, "Invalid output length");
+ return NULL;
+ }
+ if (rounds < 1) {
+ PyErr_SetString(PyExc_ValueError, "Invalid number of rounds");
+ return NULL;
+ }
+ if ((key = malloc(desired_key_bytes)) == NULL)
+ return NULL;
+ Py_BEGIN_ALLOW_THREADS;
+ ret = bcrypt_pbkdf(password, password_len, salt, salt_len,
+ key, desired_key_bytes, rounds);
+ Py_END_ALLOW_THREADS;
+ if (ret != 0)
+ PyErr_SetString(PyExc_ValueError, "kdf failed");
+ else
+ o = PyBytes_FromStringAndSize((char *)key, desired_key_bytes);
+ bzero(key, desired_key_bytes);
+ free(key);
+ return o;
}
static PyMethodDef bcrypt_methods[] = {
+ { "checkpw", (PyCFunction)bcrypt_checkpw,
+ METH_VARARGS|METH_KEYWORDS, bcrypt_checkpw_doc },
{ "hashpw", (PyCFunction)bcrypt_hashpw,
METH_VARARGS|METH_KEYWORDS, bcrypt_hashpw_doc },
{ "encode_salt", (PyCFunction)bcrypt_encode_salt,
METH_VARARGS|METH_KEYWORDS, bcrypt_encode_salt_doc },
+ { "kdf", (PyCFunction)bcrypt_kdf,
+ METH_VARARGS|METH_KEYWORDS, bcrypt_kdf_doc },
{NULL, NULL} /* sentinel */
};
PyDoc_STRVAR(module_doc, "Internal module used by bcrypt.\n");
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef bcrypt_module = {
+ PyModuleDef_HEAD_INIT,
+ "bcrypt._bcrypt", /* m_name */
+ module_doc, /* m_doc */
+ -1, /* m_size */
+ bcrypt_methods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC
+PyInit__bcrypt(void)
+{
+ PyObject *m;
+
+ m = PyModule_Create(&bcrypt_module);
+ PyModule_AddStringConstant(m, "__version__", PYBCRYPT_VERSION);
+ return m;
+}
+#else
PyMODINIT_FUNC
init_bcrypt(void)
{
PyObject *m;
m = Py_InitModule3("bcrypt._bcrypt", bcrypt_methods, module_doc);
- PyModule_AddStringConstant(m, "__version__", "0.1");
+ PyModule_AddStringConstant(m, "__version__", PYBCRYPT_VERSION);
}
-
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/pybc_blf.h new/py-bcrypt-0.4/bcrypt/pybc_blf.h
--- old/py-bcrypt-0.2/bcrypt/pybc_blf.h 2006-08-08 04:34:02.000000000 +0200
+++ new/py-bcrypt-0.4/bcrypt/pybc_blf.h 2013-07-31 02:44:31.000000000 +0200
@@ -34,10 +34,18 @@
#ifndef _PYBC_BLF_H_
#define _PYBC_BLF_H_
-#if defined(_MSC_VER)
-typedef unsigned __int8 u_int8_t;
-typedef unsigned __int16 u_int16_t;
-typedef unsigned __int32 u_int32_t;
+#include <sys/types.h>
+#if __STDC_VERSION__ >= 199901L /* C99 or later */
+#include <stdint.h>
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+typedef uint64_t u_int64_t;
+#elif defined(_WIN32)
+typedef unsigned __int8 u_int8_t;
+typedef unsigned __int16 u_int16_t;
+typedef unsigned __int32 u_int32_t;
+typedef unsigned __int64 u_int64_t;
#endif
/* Schneier specifies a maximum key length of 56 bytes.
@@ -74,4 +82,12 @@
/* Converts u_int8_t to u_int32_t */
u_int32_t pybc_Blowfish_stream2word(const u_int8_t *, u_int16_t, u_int16_t *);
+/* KDF interface */
+int bcrypt_pbkdf(const u_int8_t *pass, size_t passlen,
+ const u_int8_t *salt, size_t saltlen,
+ u_int8_t *key, size_t keylen, unsigned int rounds);
+
+/* timingsafe_bcmp */
+int pybc_timingsafe_bcmp(const void *b1, const void *b2, size_t n);
+
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/pybc_sha2.h new/py-bcrypt-0.4/bcrypt/pybc_sha2.h
--- old/py-bcrypt-0.2/bcrypt/pybc_sha2.h 1970-01-01 01:00:00.000000000 +0100
+++ new/py-bcrypt-0.4/bcrypt/pybc_sha2.h 2013-07-29 06:54:32.000000000 +0200
@@ -0,0 +1,63 @@
+/* $OpenBSD: sha2.h,v 1.9 2013/04/15 15:54:17 millert Exp $ */
+
+/*
+ * FILE: sha2.h
+ * AUTHOR: Aaron D. Gifford <me(a)aarongifford.com>
+ *
+ * Copyright (c) 2000-2001, Aaron D. Gifford
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
+ */
+
+#ifndef _PYBC_SHA2_H
+#define _PYBC_SHA2_H
+
+/*** SHA-256/384/512 Various Length Definitions ***********************/
+#define PYBC_SHA512_BLOCK_LENGTH 128
+#define PYBC_SHA512_DIGEST_LENGTH 64
+#define PYBC_SHA512_DIGEST_STRING_LENGTH (PYBC_SHA512_DIGEST_LENGTH * 2 + 1)
+
+
+/*** SHA-224/256/384/512 Context Structure *******************************/
+typedef struct _PYBC_SHA2_CTX {
+ union {
+ u_int32_t st32[8];
+ u_int64_t st64[8];
+ } state;
+ u_int64_t bitcount[2];
+ u_int8_t buffer[PYBC_SHA512_BLOCK_LENGTH];
+} PYBC_SHA2_CTX;
+
+void PYBC_SHA512Init(PYBC_SHA2_CTX *);
+void PYBC_SHA512Transform(u_int64_t state[8], const u_int8_t [PYBC_SHA512_BLOCK_LENGTH]);
+void PYBC_SHA512Update(PYBC_SHA2_CTX *, const u_int8_t *, size_t);
+void PYBC_SHA512Pad(PYBC_SHA2_CTX *);
+void PYBC_SHA512Final(u_int8_t [PYBC_SHA512_DIGEST_LENGTH], PYBC_SHA2_CTX *);
+char *PYBC_SHA512End(PYBC_SHA2_CTX *, char *);
+
+#endif /* _PYBC_SHA2_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/sha2.c new/py-bcrypt-0.4/bcrypt/sha2.c
--- old/py-bcrypt-0.2/bcrypt/sha2.c 1970-01-01 01:00:00.000000000 +0100
+++ new/py-bcrypt-0.4/bcrypt/sha2.c 2013-08-25 02:31:16.000000000 +0200
@@ -0,0 +1,394 @@
+/* $OpenBSD: sha2.c,v 1.14 2013/04/15 15:54:17 millert Exp $ */
+
+/*
+ * FILE: sha2.c
+ * AUTHOR: Aaron D. Gifford <me(a)aarongifford.com>
+ *
+ * Copyright (c) 2000-2001, Aaron D. Gifford
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
+ */
+
+#define _BSD_SOURCE
+#include <sys/types.h>
+
+/* PYBC_SHA512Final needs to know the host endian, so try to figure it out */
+#ifdef __linux__
+#include <endian.h>
+#elif __OpenBSD__
+#include <sys/endian.h>
+#endif
+#if defined(BYTE_ORDER)
+# if BYTE_ORDER == LITTLE_ENDIAN
+# define PYBC_IS_LITTLE_ENDIAN() 1
+# elif BYTE_ORDER == BIG_ENDIAN
+# define PYBC_IS_LITTLE_ENDIAN() 0
+# endif
+#elif defined(_M_IX86) || defined(_M_X64) || \
+ defined(__x86_64__) || defined(__i386__)
+# define PYBC_IS_LITTLE_ENDIAN() 1 /* little endian */
+#endif
+
+/* If endianness is indiscernable at preprocess time, then detect at runtime */
+#ifndef PYBC_IS_LITTLE_ENDIAN
+static const u_int32_t endian_test = 0x12345678;
+# define PYBC_IS_LITTLE_ENDIAN() (*(u_int8_t *)&endian_test == 0x78)
+#endif
+
+#include <string.h>
+
+#include "pybc_blf.h"
+#include "pybc_sha2.h"
+
+/*** SHA-224/256/384/512 Various Length Definitions ***********************/
+/* NOTE: Most of these are in sha2.h */
+#define PYBC_SHA512_SHORT_BLOCK_LENGTH (PYBC_SHA512_BLOCK_LENGTH - 16)
+
+/*** ENDIAN SPECIFIC COPY MACROS **************************************/
+#define BE_8_TO_32(dst, cp) do { \
+ (dst) = (u_int32_t)(cp)[3] | ((u_int32_t)(cp)[2] << 8) | \
+ ((u_int32_t)(cp)[1] << 16) | ((u_int32_t)(cp)[0] << 24); \
+} while(0)
+
+#define BE_8_TO_64(dst, cp) do { \
+ (dst) = (u_int64_t)(cp)[7] | ((u_int64_t)(cp)[6] << 8) | \
+ ((u_int64_t)(cp)[5] << 16) | ((u_int64_t)(cp)[4] << 24) | \
+ ((u_int64_t)(cp)[3] << 32) | ((u_int64_t)(cp)[2] << 40) | \
+ ((u_int64_t)(cp)[1] << 48) | ((u_int64_t)(cp)[0] << 56); \
+} while (0)
+
+#define BE_64_TO_8(cp, src) do { \
+ (cp)[0] = (src) >> 56; \
+ (cp)[1] = (src) >> 48; \
+ (cp)[2] = (src) >> 40; \
+ (cp)[3] = (src) >> 32; \
+ (cp)[4] = (src) >> 24; \
+ (cp)[5] = (src) >> 16; \
+ (cp)[6] = (src) >> 8; \
+ (cp)[7] = (src); \
+} while (0)
+
+#define BE_32_TO_8(cp, src) do { \
+ (cp)[0] = (src) >> 24; \
+ (cp)[1] = (src) >> 16; \
+ (cp)[2] = (src) >> 8; \
+ (cp)[3] = (src); \
+} while (0)
+
+/*
+ * Macro for incrementally adding the unsigned 64-bit integer n to the
+ * unsigned 128-bit integer (represented using a two-element array of
+ * 64-bit words):
+ */
+#define ADDINC128(w,n) do { \
+ (w)[0] += (u_int64_t)(n); \
+ if ((w)[0] < (n)) { \
+ (w)[1]++; \
+ } \
+} while (0)
+
+/*** THE SIX LOGICAL FUNCTIONS ****************************************/
+/*
+ * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
+ *
+ * NOTE: The naming of R and S appears backwards here (R is a SHIFT and
+ * S is a ROTATION) because the SHA-224/256/384/512 description document
+ * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
+ * same "backwards" definition.
+ */
+/* Shift-right (used in SHA-224, SHA-256, SHA-384, and SHA-512): */
+#define R(b,x) ((x) >> (b))
+/* 32-bit Rotate-right (used in SHA-224 and SHA-256): */
+#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b))))
+/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
+#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b))))
+
+/* Two of six logical functions used in SHA-224, SHA-256, SHA-384, and SHA-512: */
+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
+
+/* Four of six logical functions used in SHA-384 and SHA-512: */
+#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
+#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
+#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x)))
+#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
+
+
+/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
+
+/* Hash constant words K for SHA-384 and SHA-512: */
+const static u_int64_t K512[80] = {
+ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
+ 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
+ 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
+ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
+ 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
+ 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
+ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
+ 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
+ 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
+ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
+ 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
+ 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
+ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
+ 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
+ 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
+ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
+ 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
+ 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
+ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
+ 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
+ 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
+ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
+ 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
+ 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
+ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
+ 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
+ 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
+ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
+ 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
+ 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
+ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
+ 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
+ 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
+ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
+ 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
+ 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
+ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
+ 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
+ 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
+ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
+};
+
+/* Initial hash value H for SHA-512 */
+const static u_int64_t sha512_initial_hash_value[8] = {
+ 0x6a09e667f3bcc908ULL,
+ 0xbb67ae8584caa73bULL,
+ 0x3c6ef372fe94f82bULL,
+ 0xa54ff53a5f1d36f1ULL,
+ 0x510e527fade682d1ULL,
+ 0x9b05688c2b3e6c1fULL,
+ 0x1f83d9abfb41bd6bULL,
+ 0x5be0cd19137e2179ULL
+};
+
+/*** PYBC_SHA-512: *********************************************************/
+void
+PYBC_SHA512Init(PYBC_SHA2_CTX *context)
+{
+ if (context == NULL)
+ return;
+ memcpy(context->state.st64, sha512_initial_hash_value,
+ sizeof(sha512_initial_hash_value));
+ memset(context->buffer, 0, sizeof(context->buffer));
+ context->bitcount[0] = context->bitcount[1] = 0;
+}
+
+void
+PYBC_SHA512Transform(u_int64_t state[8], const u_int8_t data[PYBC_SHA512_BLOCK_LENGTH])
+{
+ u_int64_t a, b, c, d, e, f, g, h, s0, s1;
+ u_int64_t T1, T2, W512[16];
+ int j;
+
+ /* Initialize registers with the prev. intermediate value */
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ j = 0;
+ do {
+ BE_8_TO_64(W512[j], data);
+ data += 8;
+ /* Apply the SHA-512 compression function to update a..h */
+ T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
+ T2 = Sigma0_512(a) + Maj(a, b, c);
+ h = g;
+ g = f;
+ f = e;
+ e = d + T1;
+ d = c;
+ c = b;
+ b = a;
+ a = T1 + T2;
+
+ j++;
+ } while (j < 16);
+
+ do {
+ /* Part of the message block expansion: */
+ s0 = W512[(j+1)&0x0f];
+ s0 = sigma0_512(s0);
+ s1 = W512[(j+14)&0x0f];
+ s1 = sigma1_512(s1);
+
+ /* Apply the SHA-512 compression function to update a..h */
+ T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
+ (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
+ T2 = Sigma0_512(a) + Maj(a, b, c);
+ h = g;
+ g = f;
+ f = e;
+ e = d + T1;
+ d = c;
+ c = b;
+ b = a;
+ a = T1 + T2;
+
+ j++;
+ } while (j < 80);
+
+ /* Compute the current intermediate hash value */
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+
+ /* Clean up */
+ a = b = c = d = e = f = g = h = T1 = T2 = 0;
+}
+
+void
+PYBC_SHA512Update(PYBC_SHA2_CTX *context, const u_int8_t *data, size_t len)
+{
+ size_t freespace, usedspace;
+
+ /* Calling with no data is valid (we do nothing) */
+ if (len == 0)
+ return;
+
+ usedspace = (context->bitcount[0] >> 3) % PYBC_SHA512_BLOCK_LENGTH;
+ if (usedspace > 0) {
+ /* Calculate how much free space is available in the buffer */
+ freespace = PYBC_SHA512_BLOCK_LENGTH - usedspace;
+
+ if (len >= freespace) {
+ /* Fill the buffer completely and process it */
+ memcpy(&context->buffer[usedspace], data, freespace);
+ ADDINC128(context->bitcount, freespace << 3);
+ len -= freespace;
+ data += freespace;
+ PYBC_SHA512Transform(context->state.st64, context->buffer);
+ } else {
+ /* The buffer is not yet full */
+ memcpy(&context->buffer[usedspace], data, len);
+ ADDINC128(context->bitcount, len << 3);
+ /* Clean up: */
+ usedspace = freespace = 0;
+ return;
+ }
+ }
+ while (len >= PYBC_SHA512_BLOCK_LENGTH) {
+ /* Process as many complete blocks as we can */
+ PYBC_SHA512Transform(context->state.st64, data);
+ ADDINC128(context->bitcount, PYBC_SHA512_BLOCK_LENGTH << 3);
+ len -= PYBC_SHA512_BLOCK_LENGTH;
+ data += PYBC_SHA512_BLOCK_LENGTH;
+ }
+ if (len > 0) {
+ /* There's left-overs, so save 'em */
+ memcpy(context->buffer, data, len);
+ ADDINC128(context->bitcount, len << 3);
+ }
+ /* Clean up: */
+ usedspace = freespace = 0;
+}
+
+void
+PYBC_SHA512Pad(PYBC_SHA2_CTX *context)
+{
+ unsigned int usedspace;
+
+ usedspace = (context->bitcount[0] >> 3) % PYBC_SHA512_BLOCK_LENGTH;
+ if (usedspace > 0) {
+ /* Begin padding with a 1 bit: */
+ context->buffer[usedspace++] = 0x80;
+
+ if (usedspace <= PYBC_SHA512_SHORT_BLOCK_LENGTH) {
+ /* Set-up for the last transform: */
+ memset(&context->buffer[usedspace], 0, PYBC_SHA512_SHORT_BLOCK_LENGTH - usedspace);
+ } else {
+ if (usedspace < PYBC_SHA512_BLOCK_LENGTH) {
+ memset(&context->buffer[usedspace], 0, PYBC_SHA512_BLOCK_LENGTH - usedspace);
+ }
+ /* Do second-to-last transform: */
+ PYBC_SHA512Transform(context->state.st64, context->buffer);
+
+ /* And set-up for the last transform: */
+ memset(context->buffer, 0, PYBC_SHA512_BLOCK_LENGTH - 2);
+ }
+ } else {
+ /* Prepare for final transform: */
+ memset(context->buffer, 0, PYBC_SHA512_SHORT_BLOCK_LENGTH);
+
+ /* Begin padding with a 1 bit: */
+ *context->buffer = 0x80;
+ }
+ /* Store the length of input data (in bits) in big endian format: */
+ BE_64_TO_8(&context->buffer[PYBC_SHA512_SHORT_BLOCK_LENGTH],
+ context->bitcount[1]);
+ BE_64_TO_8(&context->buffer[PYBC_SHA512_SHORT_BLOCK_LENGTH + 8],
+ context->bitcount[0]);
+
+ /* Final transform: */
+ PYBC_SHA512Transform(context->state.st64, context->buffer);
+
+ /* Clean up: */
+ usedspace = 0;
+}
+
+void
+PYBC_SHA512Final(u_int8_t digest[PYBC_SHA512_DIGEST_LENGTH], PYBC_SHA2_CTX *context)
+{
+ int i;
+
+ PYBC_SHA512Pad(context);
+
+ /* If no digest buffer is passed, we don't bother doing this: */
+ if (digest != NULL) {
+ if (PYBC_IS_LITTLE_ENDIAN()) {
+ /* Convert to LE host byte order */
+ for (i = 0; i < 8; i++)
+ BE_64_TO_8(digest + i * 8,
+ context->state.st64[i]);
+ } else {
+ memcpy(digest, context->state.st64,
+ PYBC_SHA512_DIGEST_LENGTH);
+ }
+ memset(context, 0, sizeof(*context));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/bcrypt/timingsafe_bcmp.c new/py-bcrypt-0.4/bcrypt/timingsafe_bcmp.c
--- old/py-bcrypt-0.2/bcrypt/timingsafe_bcmp.c 1970-01-01 01:00:00.000000000 +0100
+++ new/py-bcrypt-0.4/bcrypt/timingsafe_bcmp.c 2013-07-29 06:54:32.000000000 +0200
@@ -0,0 +1,29 @@
+/* $OpenBSD: timingsafe_bcmp.c,v 1.1 2010/09/24 13:33:00 matthew Exp $ */
+/*
+ * Copyright (c) 2010 Damien Miller. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "pybc_blf.h"
+
+int
+pybc_timingsafe_bcmp(const void *b1, const void *b2, size_t n)
+{
+ const unsigned char *p1 = b1, *p2 = b2;
+ int ret = 0;
+
+ for (; n > 0; n--)
+ ret |= *p1++ ^ *p2++;
+ return (ret != 0);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/setup.py new/py-bcrypt-0.4/setup.py
--- old/py-bcrypt-0.2/setup.py 2010-06-14 01:18:52.000000000 +0200
+++ new/py-bcrypt-0.4/setup.py 2013-08-25 02:34:58.000000000 +0200
@@ -14,7 +14,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# $Id: setup.py,v 1.3 2010/06/13 23:18:52 djm Exp $
+# $Id$
import sys
try:
@@ -22,27 +22,39 @@
except ImportError:
from distutils.core import setup, Extension
-VERSION = "0.2"
+VERSION = "0.4"
if __name__ == '__main__':
bcrypt = Extension('bcrypt._bcrypt',
- sources = ['bcrypt/bcrypt_python.c', 'bcrypt/blowfish.c',
- 'bcrypt/bcrypt.c'])
+ sources = [
+ 'bcrypt/bcrypt.c',
+ 'bcrypt/bcrypt_pbkdf.c',
+ 'bcrypt/bcrypt_python.c',
+ 'bcrypt/blowfish.c',
+ 'bcrypt/sha2.c',
+ 'bcrypt/timingsafe_bcmp.c',
+ ],
+ )
setup( name = "py-bcrypt",
version = VERSION,
author = "Damien Miller",
author_email = "djm(a)mindrot.org",
- url = "http://www.mindrot.org/py-bcrypt.html",
- description = "Blowfish password hashing",
+ url = "https://code.google.com/p/py-bcrypt",
+ description = "bcrypt password hashing and key derivation",
long_description = """\
py-bcrypt is an implementation the OpenBSD Blowfish password hashing
algorithm, as described in "A Future-Adaptable Password Scheme" by
-Niels Provos and David Mazieres.
+Niels Provos and David Mazieres and related bcrypt-based key derivation
+function implemented in OpenBSD libutil.
This system hashes passwords using a version of Bruce Schneier's
Blowfish block cipher with modifications designed to raise the cost
of off-line password cracking. The computation cost of the algorithm
is parametised, so it can be increased as computers get faster.
+
+Two interfaces are supported: a classic password hashing interface and
+a key derivation function (KDF) intended for generating cryptographic
+keys.
""",
license = "BSD",
packages = ['bcrypt'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-bcrypt-0.2/test/test.py new/py-bcrypt-0.4/test/test.py
--- old/py-bcrypt-0.2/test/test.py 2006-05-22 13:53:27.000000000 +0200
+++ new/py-bcrypt-0.4/test/test.py 2013-07-29 06:54:32.000000000 +0200
@@ -14,10 +14,20 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# $Id: test.py,v 1.1.1.1 2006/05/22 11:53:27 djm Exp $
+# $Id$
import bcrypt
import unittest
+import sys
+
+PY3 = (sys.version_info >= (3,0))
+
+def b(s):
+ "b'xxx' replacement for py3 compat"
+ if PY3:
+ return s.encode("latin-1")
+ else:
+ return s
test_vectors = [
[ '', '$2a$06$DCq7YPn5Rq63x1Lad4cll.',
@@ -60,9 +70,24 @@
'$2a$10$LgfYWkbzEvQ4JakH7rOvHe0y8pHKF9OaFgwUZ2q7W2FFZmZzJYlfS' ],
[ '~!@#$%^&*() ~!@#$%^&*()PNBFRD', '$2a$12$WApznUOJfkEGSmYRfnkrPO',
'$2a$12$WApznUOJfkEGSmYRfnkrPOr466oFDCaj4b6HY3EXGvfxm43seyhgC' ],
+ [ 'abc', '$2a$10$WvvTPHKwdBJ3uk0Z37EMR.',
+ '$2a$10$WvvTPHKwdBJ3uk0Z37EMR.hLA2W6N9AEBhEgrAOljy2Ae5MtaSIUi' ],
+
+ [ b('\xa3'), '$2a$05$CCCCCCCCCCCCCCCCCCCCC.', # latin-1 POUND SIGN
+ '$2a$05$CCCCCCCCCCCCCCCCCCCCC.BvtRGGx3p8o0C5C36uS442Qqnrwofrq' ],
+ [ b('\xc2\xa3'), '$2a$05$CCCCCCCCCCCCCCCCCCCCC.', # utf-8 POUND SIGN
+ '$2a$05$CCCCCCCCCCCCCCCCCCCCC.CAzSxlf0FLW7g1A5q7W/ZCj1xsN6A.e' ],
]
-class TestRadix(unittest.TestCase):
+if PY3:
+ # add 8-bit unicode test as well; to verify PY3 encodes it as UTF-8.
+ test_vectors.append([
+ '\u00A3',
+ '$2a$05$CCCCCCCCCCCCCCCCCCCCC.', # unicode POUND SIGN
+ '$2a$05$CCCCCCCCCCCCCCCCCCCCC.CAzSxlf0FLW7g1A5q7W/ZCj1xsN6A.e'
+ ])
+
+class TestBcrypt(unittest.TestCase):
def test_00__test_vectors(self):
for plain, salt, expected in test_vectors:
self.assertEqual(bcrypt.hashpw(plain, salt), expected)
@@ -75,6 +100,114 @@
crypted2 = bcrypt.hashpw(plain, crypted)
self.assertEqual(crypted, crypted2)
+ def test_02__checkpw_success(self):
+ for plain, salt, expected in test_vectors:
+ self.assertTrue(bcrypt.checkpw(plain, expected))
+
+ def test_03__checkpw_fail(self):
+ for plain, salt, expected in test_vectors:
+ self.assertFalse(bcrypt.checkpw("foo", expected))
+
+
+# rounds, password, salt, expected_key
+kdf_test_vectors = [
+ [ 4, "password", "salt",
+ b("\x5b\xbf\x0c\xc2\x93\x58\x7f\x1c\x36\x35\x55\x5c\x27\x79\x65\x98"
+ "\xd4\x7e\x57\x90\x71\xbf\x42\x7e\x9d\x8f\xbe\x84\x2a\xba\x34\xd9")
+ ],
+ [ 4, "password", b("\x00"),
+ b("\xc1\x2b\x56\x62\x35\xee\xe0\x4c\x21\x25\x98\x97\x0a\x57\x9a\x67")
+ ],
+ [ 4, b("\x00"), "salt",
+ b("\x60\x51\xbe\x18\xc2\xf4\xf8\x2c\xbf\x0e\xfe\xe5\x47\x1b\x4b\xb9")
+ ],
+ # nul bytes in password and string
+ [ 4, "password\x00", "salt\x00",
+ b("\x74\x10\xe4\x4c\xf4\xfa\x07\xbf\xaa\xc8\xa9\x28\xb1\x72\x7f\xac"
+ "\x00\x13\x75\xe7\xbf\x73\x84\x37\x0f\x48\xef\xd1\x21\x74\x30\x50")
+ ],
+ [ 4, b("pass\x00wor"), b("sa\0l"),
+ b("\xc2\xbf\xfd\x9d\xb3\x8f\x65\x69\xef\xef\x43\x72\xf4\xde\x83\xc0")
+ ],
+ [ 4, b("pass\x00word"), b("sa\0lt"),
+ b("\x4b\xa4\xac\x39\x25\xc0\xe8\xd7\xf0\xcd\xb6\xbb\x16\x84\xa5\x6f")
+ ],
+ # bigger key
+ [ 8, "password", "salt",
+ b("\xe1\x36\x7e\xc5\x15\x1a\x33\xfa\xac\x4c\xc1\xc1\x44\xcd\x23\xfa"
+ "\x15\xd5\x54\x84\x93\xec\xc9\x9b\x9b\x5d\x9c\x0d\x3b\x27\xbe\xc7"
+ "\x62\x27\xea\x66\x08\x8b\x84\x9b\x20\xab\x7a\xa4\x78\x01\x02\x46"
+ "\xe7\x4b\xba\x51\x72\x3f\xef\xa9\xf9\x47\x4d\x65\x08\x84\x5e\x8d")
+ ],
+ # more rounds
+ [ 42, "password", "salt",
+ b("\x83\x3c\xf0\xdc\xf5\x6d\xb6\x56\x08\xe8\xf0\xdc\x0c\xe8\x82\xbd")
+ ],
+ # longer password
+ [ 8,
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do "
+ "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut "
+ "enim ad minim veniam, quis nostrud exercitation ullamco laboris "
+ "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor "
+ "in reprehenderit in voluptate velit esse cillum dolore eu fugiat "
+ "nulla pariatur. Excepteur sint occaecat cupidatat non proident, "
+ "sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ b("salis\x00"),
+ b("\x10\x97\x8b\x07\x25\x3d\xf5\x7f\x71\xa1\x62\xeb\x0e\x8a\xd3\x0a")
+ ],
+ # "unicode"
+ [ 8,
+ b("\x0d\xb3\xac\x94\xb3\xee\x53\x28\x4f\x4a\x22\x89\x3b\x3c\x24\xae"),
+ b("\x3a\x62\xf0\xf0\xdb\xce\xf8\x23\xcf\xcc\x85\x48\x56\xea\x10\x28"),
+ b("\x20\x44\x38\x17\x5e\xee\x7c\xe1\x36\xc9\x1b\x49\xa6\x79\x23\xff")
+ ],
+ # very large key
+ [ 8,
+ b("\x0d\xb3\xac\x94\xb3\xee\x53\x28\x4f\x4a\x22\x89\x3b\x3c\x24\xae"),
+ b("\x3a\x62\xf0\xf0\xdb\xce\xf8\x23\xcf\xcc\x85\x48\x56\xea\x10\x28"),
+ b("\x20\x54\xb9\xff\xf3\x4e\x37\x21\x44\x03\x34\x74\x68\x28\xe9\xed"
+ "\x38\xde\x4b\x72\xe0\xa6\x9a\xdc\x17\x0a\x13\xb5\xe8\xd6\x46\x38"
+ "\x5e\xa4\x03\x4a\xe6\xd2\x66\x00\xee\x23\x32\xc5\xed\x40\xad\x55"
+ "\x7c\x86\xe3\x40\x3f\xbb\x30\xe4\xe1\xdc\x1a\xe0\x6b\x99\xa0\x71"
+ "\x36\x8f\x51\x8d\x2c\x42\x66\x51\xc9\xe7\xe4\x37\xfd\x6c\x91\x5b"
+ "\x1b\xbf\xc3\xa4\xce\xa7\x14\x91\x49\x0e\xa7\xaf\xb7\xdd\x02\x90"
+ "\xa6\x78\xa4\xf4\x41\x12\x8d\xb1\x79\x2e\xab\x27\x76\xb2\x1e\xb4"
+ "\x23\x8e\x07\x15\xad\xd4\x12\x7d\xff\x44\xe4\xb3\xe4\xcc\x4c\x4f"
+ "\x99\x70\x08\x3f\x3f\x74\xbd\x69\x88\x73\xfd\xf6\x48\x84\x4f\x75"
+ "\xc9\xbf\x7f\x9e\x0c\x4d\x9e\x5d\x89\xa7\x78\x39\x97\x49\x29\x66"
+ "\x61\x67\x07\x61\x1c\xb9\x01\xde\x31\xa1\x97\x26\xb6\xe0\x8c\x3a"
+ "\x80\x01\x66\x1f\x2d\x5c\x9d\xcc\x33\xb4\xaa\x07\x2f\x90\xdd\x0b"
+ "\x3f\x54\x8d\x5e\xeb\xa4\x21\x13\x97\xe2\xfb\x06\x2e\x52\x6e\x1d"
+ "\x68\xf4\x6a\x4c\xe2\x56\x18\x5b\x4b\xad\xc2\x68\x5f\xbe\x78\xe1"
+ "\xc7\x65\x7b\x59\xf8\x3a\xb9\xab\x80\xcf\x93\x18\xd6\xad\xd1\xf5"
+ "\x93\x3f\x12\xd6\xf3\x61\x82\xc8\xe8\x11\x5f\x68\x03\x0a\x12\x44")
+ ],
+ # UTF-8 Greek characters "odysseus" / "telemachos"
+ [ 8,
+ b("\xe1\xbd\x88\xce\xb4\xcf\x85\xcf\x83\xcf\x83\xce\xb5\xcf\x8d\xcf"
+ "\x82"),
+ b("\xce\xa4\xce\xb7\xce\xbb\xce\xad\xce\xbc\xce\xb1\xcf\x87\xce\xbf"
+ "\xcf\x82"),
+ b("\x43\x66\x6c\x9b\x09\xef\x33\xed\x8c\x27\xe8\xe8\xf3\xe2\xd8\xe6")
+ ],
+]
+
+if PY3:
+ # Unicode Greek characters "odysseus" / "telemachos"
+ kdf_test_vectors.append([
+ 8,
+ "\u1f48\u03b4\u03c5\u03c3\u03c3\u03b5\u03cd\u03c2",
+ "\u03a4\u03b7\u03bb\u03ad\u03bc\u03b1\u03c7\u03bf\u03c2",
+ b("\x43\x66\x6c\x9b\x09\xef\x33\xed\x8c\x27\xe8\xe8\xf3"
+ "\xe2\xd8\xe6")
+ ])
+
+class TestKDF(unittest.TestCase):
+ def test_00__test_vectors(self):
+ for rounds, password, salt, expected in kdf_test_vectors:
+ key = bcrypt.kdf(password, salt, len(expected), rounds)
+ self.assertEqual(key, expected)
+
def main():
unittest.main()
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-String-Formatter for openSUSE:Factory checked in at 2013-11-29 07:04:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-String-Formatter (Old)
and /work/SRC/openSUSE:Factory/.perl-String-Formatter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-String-Formatter"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-String-Formatter/perl-String-Formatter.changes 2012-02-08 16:08:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-String-Formatter.new/perl-String-Formatter.changes 2013-11-29 07:04:50.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Nov 25 07:38:07 UTC 2013 - coolo(a)suse.com
+
+- updated to 0.102084
+ - typo fixes
+ - update repo and bugtracker links
+
+-------------------------------------------------------------------
Old:
----
String-Formatter-0.102082.tar.gz
New:
----
String-Formatter-0.102084.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-String-Formatter.spec ++++++
--- /var/tmp/diff_new_pack.i5tIDz/_old 2013-11-29 07:04:50.000000000 +0100
+++ /var/tmp/diff_new_pack.i5tIDz/_new 2013-11-29 07:04:50.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-String-Formatter
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,24 +17,22 @@
Name: perl-String-Formatter
-Version: 0.102082
+Version: 0.102084
Release: 0
%define cpan_name String-Formatter
-Summary: Build sprintf-like functions of your own
+Summary: build sprintf-like functions of your own
License: GPL-2.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/String-Formatter/
-Source: http://www.cpan.org/authors/id/R/RJ/RJBS/String-Formatter-%{version}.tar.gz
+Source: http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl(ExtUtils::MakeMaker) >= 6.31
-%if 0%{?suse_version} >= 1120
-BuildRequires: perl(Test::More) >= 0.88
-%endif
BuildRequires: perl(Params::Util)
BuildRequires: perl(Sub::Exporter)
+BuildRequires: perl(Test::More) >= 0.96
+#BuildRequires: perl(String::Formatter)
Requires: perl(Params::Util)
Requires: perl(Sub::Exporter)
%{perl_requires}
@@ -93,12 +91,6 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
-%if 0%{?suse_version} < 1120 || 0%{?rhel_version} || 0%{?centos_version}
- %{__perl} -p -i -e 's|6.31|6.30|' Makefile.PL
- %{__perl} -p -i\
- -e 's|(use Test::More).*;|\1 qw(no_plan);|,s|(done_testing.*)|#\1|' t/stringf.t
-%endif
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -112,11 +104,8 @@
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
-%defattr(644,root,root,755)
-%doc Changes dist.ini LICENSE README
+%defattr(-,root,root,755)
+%doc Changes LICENSE README
%changelog
++++++ String-Formatter-0.102082.tar.gz -> String-Formatter-0.102084.tar.gz ++++++
++++ 1753 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-SQL-Translator for openSUSE:Factory checked in at 2013-11-29 07:04:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-SQL-Translator (Old)
and /work/SRC/openSUSE:Factory/.perl-SQL-Translator.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-SQL-Translator"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-SQL-Translator/perl-SQL-Translator.changes 2013-08-06 11:46:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-SQL-Translator.new/perl-SQL-Translator.changes 2013-11-29 07:04:25.000000000 +0100
@@ -1,0 +2,19 @@
+Mon Nov 25 07:38:44 UTC 2013 - coolo(a)suse.com
+
+- updated to 0.11018
+ * Apply quotes to fix tables that are reserved words, DBI::SQLServer (Jonathan C. Otsuka)
+ * Add DECIMAL_DIGITS to field size for scale info, DBI::SQLServer (Jonathan C. Otsuka)
+ * De-linkify XML namespace in docs (RT#81838)
+ * Allow both single and double quotes for values in MySQL parser
+ * Fix diff for altering two things per column - add ; at the end
+ * Call all diff methods in list context (it can be merged later)
+ * Fix Pg diff issue with drop constraint on primary keys
+ * SQLite support for SET NULL, SET DEFAULT and NO ACTION in FK clauses
+ * Clean up properly after Parser::DBI::PostgreSQL tests
+ * Fix typos in error messages
+ * Add SQL_TINYINT and SQL_BIGINT to the type map in
+ SQL::Translator::Schema::Field
+ * Add JSON parser and producer (Jon Jensen)
+ * Clean up TTSchema doc some (Gavin Shelley)
+
+-------------------------------------------------------------------
Old:
----
SQL-Translator-0.11016.tar.gz
New:
----
SQL-Translator-0.11018.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-SQL-Translator.spec ++++++
--- /var/tmp/diff_new_pack.ZHsbKe/_old 2013-11-29 07:04:26.000000000 +0100
+++ /var/tmp/diff_new_pack.ZHsbKe/_new 2013-11-29 07:04:26.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-SQL-Translator
-Version: 0.11016
+Version: 0.11018
Release: 0
%define cpan_name SQL-Translator
Summary: Manipulate structured data definitions (SQL and more)
@@ -30,9 +30,10 @@
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Carp::Clan)
-BuildRequires: perl(DBI)
+BuildRequires: perl(DBI) >= 1.54
BuildRequires: perl(Digest::SHA)
BuildRequires: perl(File::ShareDir) >= 1.0
+BuildRequires: perl(JSON) >= 2.0
BuildRequires: perl(List::MoreUtils) >= 0.09
BuildRequires: perl(Moo) >= 1.000003
BuildRequires: perl(Package::Variant) >= 1.001001
@@ -45,7 +46,7 @@
BuildRequires: perl(XML::Writer) >= 0.500
BuildRequires: perl(YAML) >= 0.66
Requires: perl(Carp::Clan)
-Requires: perl(DBI)
+Requires: perl(DBI) >= 1.54
Requires: perl(Digest::SHA)
Requires: perl(File::ShareDir) >= 1.0
Requires: perl(List::MoreUtils) >= 0.09
++++++ SQL-Translator-0.11016.tar.gz -> SQL-Translator-0.11018.tar.gz ++++++
++++ 3113 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0