diff -Nru libapache-session-browseable-perl-1.3.11/Build.PL libapache-session-browseable-perl-1.3.13/Build.PL --- libapache-session-browseable-perl-1.3.11/Build.PL 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/Build.PL 2023-07-06 11:36:57.000000000 +0000 @@ -3,17 +3,23 @@ # See perldoc Module::Build for details of how this works Module::Build->new( - module_name => 'Apache::Session::Browseable', - license => 'perl', - requires => { 'Apache::Session' => 0, 'JSON' => 0, }, - recommends => { 'DBI' => 0, 'Net::LDAP' => 0.38, }, - test_requires => { DBI => 0, 'DBD::SQLite' => 0, }, - dist_version => '1.3.11', - autosplit => [qw(lib/Apache/Session/Browseable/_common.pm)], + module_name => 'Apache::Session::Browseable', + license => 'perl', + requires => { 'Apache::Session' => 0, 'JSON' => 0, }, + recommends => { + 'DBI' => 0, + 'Net::LDAP' => 0.38, + 'DBD::Cassandra' => 0, + 'Redis' => 0, + }, + test_requires => { DBI => 0, 'DBD::SQLite' => 0, }, + dist_version => '1.3.13', + autosplit => [qw(lib/Apache/Session/Browseable/_common.pm)], configure_requires => { 'Module::Build' => 0, }, - meta_merge => { + meta_merge => { resources => { - repository => 'https://github.com/LemonLDAPNG/Apache-Session-Browseable' + repository => + 'https://github.com/LemonLDAPNG/Apache-Session-Browseable' } }, )->create_build_script; diff -Nru libapache-session-browseable-perl-1.3.11/Changes libapache-session-browseable-perl-1.3.13/Changes --- libapache-session-browseable-perl-1.3.11/Changes 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/Changes 2023-07-06 11:36:57.000000000 +0000 @@ -1,5 +1,12 @@ Revision history for Perl extension Apache::Session::Browseable. +1.3.13 + - Fix versions + - Update Cassandra doc + +1.3.12 + - Add Cassandra support via DBD::Cassandra + 1.3.11 - Revert 1.3.10 changes diff -Nru libapache-session-browseable-perl-1.3.11/debian/changelog libapache-session-browseable-perl-1.3.13/debian/changelog --- libapache-session-browseable-perl-1.3.11/debian/changelog 2022-12-07 22:17:07.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/debian/changelog 2023-09-24 16:31:41.000000000 +0000 @@ -1,3 +1,14 @@ +libapache-session-browseable-perl (1.3.13-1) unstable; urgency=medium + + * Team upload. + * Import upstream version 1.3.13. + * Update debian/upstream/metadata. + * Add more packages to Build-Depends-Indep and Suggests. + * Declare compliance with Debian Policy 4.6.2. + * Annotate test-only build dependencies with . + + -- gregor herrmann Sun, 24 Sep 2023 18:31:41 +0200 + libapache-session-browseable-perl (1.3.11-3) unstable; urgency=medium [ Debian Janitor ] diff -Nru libapache-session-browseable-perl-1.3.11/debian/control libapache-session-browseable-perl-1.3.13/debian/control --- libapache-session-browseable-perl-1.3.11/debian/control 2022-12-07 22:17:07.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/debian/control 2023-09-24 16:31:41.000000000 +0000 @@ -7,14 +7,15 @@ Build-Depends: debhelper-compat (= 13), libmodule-build-perl, perl -Build-Depends-Indep: libapache-session-perl, - libdbd-sqlite3-perl, - libdbd-mysql-perl, - libdbi-perl, - libjson-perl, - libnet-ldap-perl, - libredis-perl -Standards-Version: 4.6.1 +Build-Depends-Indep: libapache-session-perl , + libdbd-cassandra-perl , + libdbd-mysql-perl , + libdbd-sqlite3-perl , + libdbi-perl , + libjson-perl , + libnet-ldap-perl , + libredis-perl +Standards-Version: 4.6.2 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libapache-session-browseable-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libapache-session-browseable-perl.git Homepage: https://metacpan.org/release/Apache-Session-Browseable @@ -22,12 +23,15 @@ Package: libapache-session-browseable-perl Architecture: all +Multi-Arch: foreign Depends: ${misc:Depends}, ${perl:Depends}, libapache-session-perl, libjson-perl -Suggests: libdbi-perl -Multi-Arch: foreign +Suggests: libdbd-cassandra-perl, + libdbi-perl, + libnet-ldap-perl, + libredis-perl Description: module adding index and search methods to Apache::Session Apache::Session::Browseable provides some class methods to manipulate all sessions and add the capability to index some fields to make research faster. diff -Nru libapache-session-browseable-perl-1.3.11/debian/upstream/metadata libapache-session-browseable-perl-1.3.13/debian/upstream/metadata --- libapache-session-browseable-perl-1.3.11/debian/upstream/metadata 2022-12-07 22:17:07.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/debian/upstream/metadata 2023-09-24 16:31:41.000000000 +0000 @@ -1,7 +1,6 @@ --- -Archive: GitHub +Archive: CPAN Bug-Database: https://github.com/LemonLDAPNG/Apache-Session-Browseable/issues -Contact: https://github.com/coudot/Apache-Session-Browseable/issues Bug-Submit: https://github.com/LemonLDAPNG/Apache-Session-Browseable/issues/new Repository: https://github.com/LemonLDAPNG/Apache-Session-Browseable.git Repository-Browse: https://github.com/LemonLDAPNG/Apache-Session-Browseable diff -Nru libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Cassandra.pm libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Cassandra.pm --- libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Cassandra.pm 1970-01-01 00:00:00.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Cassandra.pm 2023-07-06 11:36:57.000000000 +0000 @@ -0,0 +1,109 @@ +package Apache::Session::Browseable::Cassandra; + +use strict; + +use Apache::Session; +use Apache::Session::Lock::Null; +use Apache::Session::Browseable::Store::Cassandra; +use Apache::Session::Generate::SHA256; +use Apache::Session::Serialize::JSON; +use Apache::Session::Browseable::DBI; + +our $VERSION = '1.3.13'; +our @ISA = qw(Apache::Session::Browseable::DBI Apache::Session); + +sub populate { + my $self = shift; + + $self->{object_store} = + new Apache::Session::Browseable::Store::Cassandra $self; + $self->{lock_manager} = new Apache::Session::Lock::Null $self; + $self->{generate} = \&Apache::Session::Generate::SHA256::generate; + $self->{validate} = \&Apache::Session::Generate::SHA256::validate; + $self->{serialize} = \&Apache::Session::Serialize::JSON::serialize; + $self->{unserialize} = \&Apache::Session::Serialize::JSON::unserialize; + + return $self; +} + +1; + +=pod + +=head1 NAME + +Apache::Session::Browseable::Cassandra - Apache::Session backend to store +sessions in a Cassadra database. + +=head1 SYNOPSIS + + use Apache::Session::Browseable::Cassandra; + + my $args = { + DataSource => 'dbi:Cassandra:host=localhost;keyspace=llng', + UserName => $db_user, + Password => $db_pass, + + # Choose your browseable fileds + Index => '_whatToTrace _session_kind _utime iAddr', + }; + + # Use it like Apache::Session + my %session; + tie %session, 'Apache::Session::Browseable::Cassandra', $id, $args; + $session{uid} = 'me'; + $session{mail} = 'me@me.com'; + $session{unindexedField} = 'zz'; + untie %session; + +=head1 DESCRIPTION + +Apache::Session::Browseable::Cassandra is an implementation of Apache::Session +for Cassandra database. + +=head1 SCHEMA + +To use this module, you will need at least these columns in a table +called 'sessions': + + id text + a_session text + +To create this schema, you can execute this command using cqlsh: + + CREATE TABLE sessions ( + id text PRIMARY KEY, + a_session text + ); + +=head1 CONFIGURATION + +The module must know what datasource, username, and password to use when +connecting to the database. These values can be set using the options hash +(see Apache::Session documentation). The options are DataSource, UserName, +and Password. + +Example: + + tie %hash, 'Apache::Session::Cassandra', $id, { + DataSource => 'dbi:Cassandra:host=localhost;keyspace=llng', + UserName => 'database_user', + Password => 'K00l' + }; + +Instead, you may pass in an already-opened DBI handle to your database. + + tie %hash, 'Apache::Session::Cassandra', $id, { + Handle => $dbh + }; + +=head1 AUTHOR + +This module was written by Mike Langen , based +on the original for Oracle. + +=head1 SEE ALSO + +L, L +1; + diff -Nru libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Redis.pm libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Redis.pm --- libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Redis.pm 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Redis.pm 2023-07-06 11:36:57.000000000 +0000 @@ -97,6 +97,7 @@ next if ( !$k or $k =~ /_/ ); eval { my $v = $redisObj->get($k); + next unless $v; my $tmp = unserialize($v); if ( ref($data) eq 'CODE' ) { $tmp = &$data( $tmp, $k ); diff -Nru libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Store/Cassandra.pm libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Store/Cassandra.pm --- libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Store/Cassandra.pm 1970-01-01 00:00:00.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Store/Cassandra.pm 2023-07-06 11:36:57.000000000 +0000 @@ -0,0 +1,150 @@ +package Apache::Session::Browseable::Store::Cassandra; + +use strict; + +use Apache::Session::Store::DBI; +use Apache::Session::Browseable::Store::DBI; +use Apache::Session::Browseable::Store::Cassandra; + +our @ISA = qw(Apache::Session::Browseable::Store::DBI); +our $VERSION = '1.3.13'; + +our $DataSource = undef; +our $UserName = undef; +our $Password = undef; + +sub connection { + my $self = shift; + my $session = shift; + + return if ( defined $self->{dbh} ); + + if ( exists $session->{args}->{Handle} ) { + $self->{dbh} = $session->{args}->{Handle}; + return; + } + + my $datasource = $session->{args}->{DataSource} + || $DataSource; + my $username = $session->{args}->{UserName} + || $UserName; + my $password = $session->{args}->{Password} + || $Password; + + $self->{dbh} = + DBI->connect( $datasource, $username, $password, { RaiseError => 1 } ) + || die $DBI::errstr; + + #If we open the connection, we close the connection + $self->{disconnect} = 1; +} + +sub materialize { + my $self = shift; + my $session = shift; + + $self->connection($session); + + local $self->{dbh}->{RaiseError} = 1; + local $self->{dbh}->{LongReadLen} = + $session->{args}->{LongReadLen} || 8 * 2**10; + + if ( !defined $self->{materialize_sth} ) { + $self->{materialize_sth} = $self->{dbh}->prepare_cached( + qq{ + SELECT a_session FROM sessions WHERE id = ? FOR UPDATE} + ); + } + + $self->{materialize_sth}->bind_param( 1, $session->{data}->{_session_id} ); + $self->{materialize_sth}->execute; + + my $results = $self->{materialize_sth}->fetchrow_arrayref; + + if ( !( defined $results ) ) { + die "Object does not exist in the data store"; + } + + $self->{materialize_sth}->finish; + + $session->{serialized} = $results->[0]; +} + +sub DESTROY { + my $self = shift; + + if ( $self->{disconnect} ) { + $self->{dbh}->disconnect; + } +} + +1; + +=pod + +=head1 NAME + +Apache::Session::Browseable::Store::Cassandra - Store persistent data in a Cassandra database + +=head1 SYNOPSIS + + use Apache::Session::Browseable::Store::Cassandra; + + my $store = new Apache::Session::Browseable::Store::Cassandra; + + $store->insert($ref); + $store->update($ref); + $store->materialize($ref); + $store->remove($ref); + +=head1 DESCRIPTION + +Apache::Session::Browseable::Store::Cassandra fulfills the storage interface of +Apache::Session. Session data is stored in a Cassandra database. + +=head1 SCHEMA + +To use this module, you will need at least these columns in a table +called 'sessions': + + id text + a_session text + +To create this schema, you can execute this command using cqlsh: + + CREATE TABLE sessions ( + id text PRIMARY KEY, + a_session text + ); + +=head1 CONFIGURATION + +The module must know what datasource, username, and password to use when +connecting to the database. These values can be set using the options hash +(see Apache::Session documentation). The options are DataSource, UserName, +and Password. + +Example: + + tie %hash, 'Apache::Session::Cassandra', $id, { + DataSource => 'dbi:Cassandra:host=localhost;keyspace=llng', + UserName => 'database_user', + Password => 'K00l' + }; + +Instead, you may pass in an already-opened DBI handle to your database. + + tie %hash, 'Apache::Session::Cassandra', $id, { + Handle => $dbh + }; + +=head1 AUTHOR + +This module was written by Mike Langen , based +on the original for Oracle. + +=head1 SEE ALSO + +L, L +1; + diff -Nru libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Store/SQLite.pm libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Store/SQLite.pm --- libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable/Store/SQLite.pm 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable/Store/SQLite.pm 2023-07-06 11:36:57.000000000 +0000 @@ -124,7 +124,7 @@ =head1 SCHEMA -To use this module, you will need at least these columns in a table +To use this module, you will need at least these columns in a table called 'sessions', or another name if you supply the TableName parameter. id char(32) # or however long your session IDs are. diff -Nru libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable.pm libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable.pm --- libapache-session-browseable-perl-1.3.11/lib/Apache/Session/Browseable.pm 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/lib/Apache/Session/Browseable.pm 2023-07-06 11:36:57.000000000 +0000 @@ -1,6 +1,6 @@ package Apache::Session::Browseable; -our $VERSION = '1.3.11'; +our $VERSION = '1.3.13'; print STDERR "Use a sub module of Apache::Session::Browseable such as Apache::Session::Browseable::File"; @@ -63,6 +63,8 @@ =item L +=item L + =back =head1 SEE ALSO diff -Nru libapache-session-browseable-perl-1.3.11/LICENSE libapache-session-browseable-perl-1.3.13/LICENSE --- libapache-session-browseable-perl-1.3.11/LICENSE 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/LICENSE 2023-07-06 11:36:57.000000000 +0000 @@ -285,21 +285,21 @@ - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual - modification. + modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright - Holder. + Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for - the package. + the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the - computing community at large as a market that must bear the fee.) + computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they - received it. + received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate diff -Nru libapache-session-browseable-perl-1.3.11/MANIFEST libapache-session-browseable-perl-1.3.13/MANIFEST --- libapache-session-browseable-perl-1.3.11/MANIFEST 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/MANIFEST 2023-07-06 11:36:57.000000000 +0000 @@ -1,9 +1,9 @@ -.travis.yml Build.PL Changes COPYRIGHT lib/Apache/Session/Browseable.pm lib/Apache/Session/Browseable/_common.pm +lib/Apache/Session/Browseable/Cassandra.pm lib/Apache/Session/Browseable/DBI.pm lib/Apache/Session/Browseable/File.pm lib/Apache/Session/Browseable/Informix.pm @@ -16,6 +16,7 @@ lib/Apache/Session/Browseable/Postgres.pm lib/Apache/Session/Browseable/Redis.pm lib/Apache/Session/Browseable/SQLite.pm +lib/Apache/Session/Browseable/Store/Cassandra.pm lib/Apache/Session/Browseable/Store/DBI.pm lib/Apache/Session/Browseable/Store/File.pm lib/Apache/Session/Browseable/Store/Informix.pm @@ -36,6 +37,7 @@ META.yml Module meta-data (added by MakeMaker) README.md rpm/Apache-Session-Browseable.spec +t/Apache-Session-Browseable-Cassandra.t t/Apache-Session-Browseable-common.t t/Apache-Session-Browseable-DBI.t t/Apache-Session-Browseable-File.t diff -Nru libapache-session-browseable-perl-1.3.11/META.json libapache-session-browseable-perl-1.3.13/META.json --- libapache-session-browseable-perl-1.3.11/META.json 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/META.json 2023-07-06 11:36:57.000000000 +0000 @@ -4,7 +4,7 @@ "Xavier Guimard, Ex.guimard@free.frE" ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4231", + "generated_by" : "Module::Build version 0.4234", "license" : [ "perl_5" ], @@ -21,8 +21,10 @@ }, "runtime" : { "recommends" : { + "DBD::Cassandra" : "0", "DBI" : "0", - "Net::LDAP" : "0.38" + "Net::LDAP" : "0.38", + "Redis" : "0" }, "requires" : { "Apache::Session" : "0", @@ -39,7 +41,11 @@ "provides" : { "Apache::Session::Browseable" : { "file" : "lib/Apache/Session/Browseable.pm", - "version" : "v1.3.11" + "version" : "v1.3.13" + }, + "Apache::Session::Browseable::Cassandra" : { + "file" : "lib/Apache/Session/Browseable/Cassandra.pm", + "version" : "v1.3.13" }, "Apache::Session::Browseable::DBI" : { "file" : "lib/Apache/Session/Browseable/DBI.pm", @@ -89,6 +95,10 @@ "file" : "lib/Apache/Session/Browseable/SQLite.pm", "version" : "v1.2.2" }, + "Apache::Session::Browseable::Store::Cassandra" : { + "file" : "lib/Apache/Session/Browseable/Store/Cassandra.pm", + "version" : "v1.3.13" + }, "Apache::Session::Browseable::Store::DBI" : { "file" : "lib/Apache/Session/Browseable/Store/DBI.pm", "version" : "v1.3.11" @@ -155,6 +165,6 @@ "url" : "https://github.com/LemonLDAPNG/Apache-Session-Browseable" } }, - "version" : "v1.3.11", - "x_serialization_backend" : "JSON::PP version 4.06" + "version" : "v1.3.13", + "x_serialization_backend" : "JSON::PP version 4.07" } diff -Nru libapache-session-browseable-perl-1.3.11/META.yml libapache-session-browseable-perl-1.3.13/META.yml --- libapache-session-browseable-perl-1.3.11/META.yml 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/META.yml 2023-07-06 11:36:57.000000000 +0000 @@ -8,7 +8,7 @@ configure_requires: Module::Build: '0' dynamic_config: 1 -generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010' +generated_by: 'Module::Build version 0.4234, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -17,7 +17,10 @@ provides: Apache::Session::Browseable: file: lib/Apache/Session/Browseable.pm - version: v1.3.11 + version: v1.3.13 + Apache::Session::Browseable::Cassandra: + file: lib/Apache/Session/Browseable/Cassandra.pm + version: v1.3.13 Apache::Session::Browseable::DBI: file: lib/Apache/Session/Browseable/DBI.pm version: v1.3.9 @@ -54,6 +57,9 @@ Apache::Session::Browseable::SQLite: file: lib/Apache/Session/Browseable/SQLite.pm version: v1.2.2 + Apache::Session::Browseable::Store::Cassandra: + file: lib/Apache/Session/Browseable/Store/Cassandra.pm + version: v1.3.13 Apache::Session::Browseable::Store::DBI: file: lib/Apache/Session/Browseable/Store/DBI.pm version: v1.3.11 @@ -97,13 +103,15 @@ file: lib/Apache/Session/Serialize/JSON.pm version: v1.2.6 recommends: + DBD::Cassandra: '0' DBI: '0' Net::LDAP: '0.38' + Redis: '0' requires: Apache::Session: '0' JSON: '0' resources: license: http://dev.perl.org/licenses/ repository: https://github.com/LemonLDAPNG/Apache-Session-Browseable -version: v1.3.11 +version: v1.3.13 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libapache-session-browseable-perl-1.3.11/t/Apache-Session-Browseable-Cassandra.t libapache-session-browseable-perl-1.3.13/t/Apache-Session-Browseable-Cassandra.t --- libapache-session-browseable-perl-1.3.11/t/Apache-Session-Browseable-Cassandra.t 1970-01-01 00:00:00.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/t/Apache-Session-Browseable-Cassandra.t 2023-07-06 11:36:57.000000000 +0000 @@ -0,0 +1,10 @@ +use Test::More; + +plan skip_all => "Optional modules (DBD::Cassandra) not installed" + unless eval { + require DBD::Cassandra; + }; + +plan tests => 1; + +use_ok('Apache::Session::Browseable::Cassandra'); diff -Nru libapache-session-browseable-perl-1.3.11/.travis.yml libapache-session-browseable-perl-1.3.13/.travis.yml --- libapache-session-browseable-perl-1.3.11/.travis.yml 2022-09-26 16:38:10.000000000 +0000 +++ libapache-session-browseable-perl-1.3.13/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -language: perl -perl: - - "5.22" - - "5.20" - - "5.18" - - "5.16" - - "5.14" - -notifications: - irc: "irc.freenode.org#lemonldap-ng"