r31901 - in /branches/upstream/libconfig-model-itself-perl/current: ./ data/ data/MasterModel/ lib/Config/Model/ lib/Config/Model/models/Itself/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Tue Mar 10 19:31:02 UTC 2009
Author: gregoa
Date: Tue Mar 10 19:30:58 2009
New Revision: 31901
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31901
Log:
[svn-upgrade] Integrating new upstream version, libconfig-model-itself-perl (1.209)
Modified:
branches/upstream/libconfig-model-itself-perl/current/Build.PL
branches/upstream/libconfig-model-itself-perl/current/ChangeLog
branches/upstream/libconfig-model-itself-perl/current/META.yml
branches/upstream/libconfig-model-itself-perl/current/README
branches/upstream/libconfig-model-itself-perl/current/config-model-edit
branches/upstream/libconfig-model-itself-perl/current/data/MasterModel.pl
branches/upstream/libconfig-model-itself-perl/current/data/MasterModel/WarpedId.pl
branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/Itself.pm
branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/models/Itself/WarpableElement.pl
branches/upstream/libconfig-model-itself-perl/current/t/itself-editor.t
branches/upstream/libconfig-model-itself-perl/current/t/itself.t
branches/upstream/libconfig-model-itself-perl/current/t/list_itself_structure.t
branches/upstream/libconfig-model-itself-perl/current/t/load_write_itself.t
Modified: branches/upstream/libconfig-model-itself-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/Build.PL?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/Build.PL (original)
+++ branches/upstream/libconfig-model-itself-perl/current/Build.PL Tue Mar 10 19:30:58 2009
@@ -35,7 +35,7 @@
dist_author => "Dominique Dumont (ddumont at cpan dot org)",
dist_abstract => "Graphical model editor for Config::Model",
requires => {
- 'Config::Model' => '0.633',
+ 'Config::Model' => '0.634',
'Log::Log4perl' => 0 ,
'Config::Model::TkUI' => '1.203',
},
Modified: branches/upstream/libconfig-model-itself-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/ChangeLog?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/ChangeLog (original)
+++ branches/upstream/libconfig-model-itself-perl/current/ChangeLog Tue Mar 10 19:30:58 2009
@@ -1,3 +1,14 @@
+2009-03-10 Dominique Dumont <dominique.dumont at hp.com> v1.209
+
+ * t/*.t: Backported mkpath calls to File::Path delivered by perl
+ 5.8.8
+
+2009-02-24 Dominique Dumont <dominique.dumont at hp.com>
+
+ * lib/Config/Model/models/Itself/WarpableElement.pl: changed
+ auto_create in auto_create_keys and auto_create_ids (required by
+ Config::Model 0.634)
+
2009-01-09 Dominique Dumont <dominique.dumont at hp.com> v1.208
* lib/Config/Model/models/Itself/Class.pl: Added allow_empty
Modified: branches/upstream/libconfig-model-itself-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/META.yml?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/META.yml (original)
+++ branches/upstream/libconfig-model-itself-perl/current/META.yml Tue Mar 10 19:30:58 2009
@@ -1,6 +1,6 @@
---
name: Config-Model-Itself
-version: 1.208
+version: 1.209
author:
- Dominique Dumont (ddumont at cpan dot org)
abstract: Graphical model editor for Config::Model
@@ -8,13 +8,13 @@
resources:
license: http://opensource.org/licenses/lgpl-license.php
requires:
- Config::Model: 0.633
+ Config::Model: 0.634
Config::Model::TkUI: 1.203
Log::Log4perl: 0
provides:
Config::Model::Itself:
file: lib/Config/Model/Itself.pm
- version: 1.208
+ version: 1.209
Config::Model::Itself::TkEditUI:
file: lib/Config/Model/Itself/TkEditUI.pm
version: 1.0615
Modified: branches/upstream/libconfig-model-itself-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/README?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/README (original)
+++ branches/upstream/libconfig-model-itself-perl/current/README Tue Mar 10 19:30:58 2009
@@ -30,19 +30,19 @@
Since the model editor and the configuration data editor are based on
the same graphical module, you will use similar UIs to edit
-configuration data (for instance Xorg configuration data from
-xorg.conf) and Xorg model (if you need to add new parameters in Xorg
-model)
+configuration data (for instance OpenSsh configuration data from
+sshd_config) and OpenSsh model (if you need to add new parameters in
+OpenSsh model)
Once this module is installed, you can run:
# config-model-edit -model <model_name>
-For instance, if you have installed Config::Model::Xorg, you can run
+For instance, if you have installed Config::Model::OpenSsh, you can run
- # config-model-edit -model Xorg
+ # config-model-edit -model OpenSsh
-If you save Xorg configuration model, it will create a lib directory and
+If you save OpenSsh configuration model, it will create a lib directory and
write the modified model there.
Modified: branches/upstream/libconfig-model-itself-perl/current/config-model-edit
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/config-model-edit?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/config-model-edit (original)
+++ branches/upstream/libconfig-model-itself-perl/current/config-model-edit Tue Mar 10 19:30:58 2009
@@ -34,7 +34,7 @@
# lame tracing that will be replaced by Log4perl
use vars qw/$verbose $debug $VERSION/ ;
-$VERSION = sprintf "1.%04d", q$Revision: 680 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 841 $ =~ /(\d+)/;
$verbose = 0;
$debug = 0;
@@ -65,7 +65,7 @@
=head1 NAME
-config-model-edit - Edit Config::Model models
+config-model-edit - Graphical model editor for Config::Model
=head1 SYNOPSIS
@@ -73,8 +73,11 @@
=head1 DESCRIPTION
-Config-model is a general purpose configuration framework based
-on configuration models (See L<Config::Model> for details).
+config-model-edit will provides a Perl/Tk graphical interface to edit
+configuration models that will be used by Config::Model.
+
+Config::Model is a general purpose configuration framework based on
+configuration models (See L<Config::Model> for details).
This configuration model is also expressed as structured data. This
structure data is structured and follow a set of rules which are
@@ -84,8 +87,8 @@
in a model in the files provided with L<Config::Model::Itself>.
Hence the possibity to verify, modify configuration data provided by
-Config::Model can also be applied on configuration models. Using the
-same user interface.
+Config::Model can also be applied on configuration models using the
+same user interface as L<config-edit>.
The model editor program is config-model-edit.
Modified: branches/upstream/libconfig-model-itself-perl/current/data/MasterModel.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/data/MasterModel.pl?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/data/MasterModel.pl (original)
+++ branches/upstream/libconfig-model-itself-perl/current/data/MasterModel.pl Tue Mar 10 19:30:58 2009
@@ -96,6 +96,11 @@
cargo_type => 'leaf',
cargo_args => {value_type => 'string'},
},
+ [qw/ac_list/] => { type => 'list',
+ cargo_type => 'leaf',
+ auto_create_ids => 3,
+ cargo_args => {value_type => 'string'},
+ },
"list_XLeds" => { type => 'list',
cargo_type => 'leaf',
cargo_args => { value_type => 'integer',
Modified: branches/upstream/libconfig-model-itself-perl/current/data/MasterModel/WarpedId.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/data/MasterModel/WarpedId.pl?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/data/MasterModel/WarpedId.pl (original)
+++ branches/upstream/libconfig-model-itself-perl/current/data/MasterModel/WarpedId.pl Tue Mar 10 19:30:58 2009
@@ -83,8 +83,8 @@
'warp'
=> { follow => [ '- version', '- macro' ],
'rules'
- => [ [ '2', 'C' ] => { max => 7, auto_create => [ 0 .. 7 ] },
- [ '2', 'A' ] => { max => 7, auto_create => [ 0 .. 7 ] }
+ => [ [ '2', 'C' ] => { max => 7, auto_create_keys => [ 0 .. 7 ] },
+ [ '2', 'A' ] => { max => 7, auto_create_keys => [ 0 .. 7 ] }
],
},
cargo_type => 'node',
Modified: branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/Itself.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/Itself.pm?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/Itself.pm (original)
+++ branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/Itself.pm Tue Mar 10 19:30:58 2009
@@ -1,6 +1,6 @@
# $Author: ddumont $
-# $Date: 2009-01-09 14:02:06 +0100 (Fri, 09 Jan 2009) $
-# $Revision: 831 $
+# $Date: 2009-03-10 12:57:46 +0100 (Tue, 10 Mar 2009) $
+# $Revision: 877 $
# Copyright (c) 2007-2009 Dominique Dumont.
#
@@ -34,7 +34,7 @@
use vars qw($VERSION) ;
-$VERSION = '1.208';
+$VERSION = '1.209';
my $logger = Log::Log4perl::get_logger(__PACKAGE__);
@@ -79,9 +79,7 @@
=head1 DESCRIPTION
The Config::Itself and its model files provide a model of Config:Model
-(hence the Itself name). If you install also Config::Model::TkUI, you
-get a graphical configuration model editor. In others words, you get a
-GUI to edit configuration models like Xorg model.
+(hence the Itself name).
Let's step back a little to explain. Any configuration data is, in
essence, structured data. This data could be stored in an XML file. A
Modified: branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/models/Itself/WarpableElement.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/models/Itself/WarpableElement.pl?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/models/Itself/WarpableElement.pl (original)
+++ branches/upstream/libconfig-model-itself-perl/current/lib/Config/Model/models/Itself/WarpableElement.pl Tue Mar 10 19:30:58 2009
@@ -1,6 +1,6 @@
# $Author: ddumont $
-# $Date: 2008-10-13 16:40:22 +0200 (Mon, 13 Oct 2008) $
-# $Revision: 775 $
+# $Date: 2009-02-24 13:08:18 +0100 (Tue, 24 Feb 2009) $
+# $Revision: 861 $
# Copyright (c) 2007-2008 Dominique Dumont.
#
@@ -58,13 +58,27 @@
},
- [qw/default_keys auto_create allow_keys/]
+ [qw/default_keys auto_create_keys allow_keys/]
=> { type => 'list',
level => 'hidden',
cargo => { type => 'leaf', value_type => 'string'} ,
warp => { follow => { 't' => '?type' },
'rules'
- => [ '$t eq "hash" or $t eq "list"'
+ => [ '$t eq "hash"'
+ => {
+ level => 'normal',
+ }
+ ]
+ }
+ },
+
+ [qw/auto_create_ids/]
+ => { type => 'leaf',
+ level => 'hidden',
+ value_type => 'string' ,
+ warp => { follow => { 't' => '?type' },
+ 'rules'
+ => [ '$t eq "list"'
=> {
level => 'normal',
}
@@ -133,7 +147,8 @@
allow_keys_from =>'this hash will allow keys from the keys of the hash pointed by the path string',
ordered => 'keep track of the order of the elements of this hash',
default_keys => 'default keys hashes.',
- auto_create => 'always create a set of keys',
+ auto_create_keys => 'always create a set of keys specified in this list',
+ auto_create_ids => 'always create the number of id specified in this integer',
allow_keys => 'specify a set of allowed keys',
default_with_init => 'specify a set of keys to create and initialization on some elements . E.g. \' foo => "X=Av Y=Bv", bar => "Y=Av Z=Cz"\' ',
convert => 'When stored, the value will be converted to uppercase (uc) or lowercase (lc).',
Modified: branches/upstream/libconfig-model-itself-perl/current/t/itself-editor.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/t/itself-editor.t?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/t/itself-editor.t (original)
+++ branches/upstream/libconfig-model-itself-perl/current/t/itself-editor.t Tue Mar 10 19:30:58 2009
@@ -57,7 +57,7 @@
rmtree($wr_test) if -d $wr_test ;
-mkpath($wr_conf1, $wr_model1, "$wr_conf1/etc/ssh/",{mode => 0755}) ;
+mkpath([$wr_conf1, $wr_model1, "$wr_conf1/etc/ssh/"], 0, 0755) ;
copy('augeas_box/etc/ssh/sshd_config', "$wr_conf1/etc/ssh/") ;
my $model = Config::Model->new(legacy => 'ignore',model_dir => $read_dir ) ;
Modified: branches/upstream/libconfig-model-itself-perl/current/t/itself.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/t/itself.t?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/t/itself.t (original)
+++ branches/upstream/libconfig-model-itself-perl/current/t/itself.t Tue Mar 10 19:30:58 2009
@@ -11,6 +11,7 @@
use Data::Dumper ;
use File::Path ;
use File::Copy ;
+use File::Find ;
use Config::Model::Itself ;
use warnings;
@@ -22,7 +23,8 @@
my $trace = $arg =~ /t/ ? 1 : 0 ;
$::verbose = 1 if $arg =~ /v/;
$::debug = 1 if $arg =~ /d/;
-my $log = 1 if $arg =~ /l/;
+
+Log::Log4perl->easy_init($arg =~ /l/ ? $DEBUG: $WARN);
my $wr_test = 'wr_test' ;
my $wr_conf1 = "$wr_test/wr_conf1";
@@ -41,7 +43,6 @@
$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /unknown backend/};
}
-Log::Log4perl->easy_init($log ? $DEBUG: $WARN);
my $meta_model = Config::Model -> new ( ) ;# model_dir => '.' );
@@ -51,14 +52,18 @@
rmtree($wr_test) if -d $wr_test ;
-mkpath($wr_conf1, $wr_model1, "$wr_conf1/etc/ssh/",{mode => 0755}) ;
+# "modern" API of File::Path does not work with perl 5.8.8
+mkpath( [$wr_conf1, $wr_model1, "$wr_conf1/etc/ssh/"] , 0, 0755) ;
copy('augeas_box/etc/ssh/sshd_config', "$wr_conf1/etc/ssh/") ;
-#mkdir("$wr_dir/conf_data") ;
-#open(OUT,"> $wr_dir/conf_data/test_orig.cds");
-#print OUT "\n";
-#close OUT;
-
+# copy test model
+my $wanted = sub {
+ return if /svn|data$|~$/ ;
+ s!data/!! ;
+ -d $File::Find::name && mkpath( "$wr_model1/$_", {mode => 0755}) ;
+ -f $File::Find::name && copy($File::Find::name,"$wr_model1/$_") ;
+};
+find ({ wanted =>$wanted, no_chdir=>1} ,'data') ;
my $model = Config::Model->new(legacy => 'ignore',model_dir => 'data' ) ;
@@ -84,11 +89,11 @@
# ok now we can load test model in Itself
-my $meta_inst = $meta_model->instance (root_class_name => 'Itself::Model',
- instance_name => 'itself_instance',
- 'read_directory' => "data",
- 'write_directory' => $wr_model1,
- );
+my $meta_inst = $meta_model
+ -> instance (root_class_name => 'Itself::Model',
+ instance_name => 'itself_instance',
+ root_dir => $wr_model1,
+ );
ok($meta_inst,"Read Itself::Model and created instance") ;
Modified: branches/upstream/libconfig-model-itself-perl/current/t/list_itself_structure.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/t/list_itself_structure.t?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/t/list_itself_structure.t (original)
+++ branches/upstream/libconfig-model-itself-perl/current/t/list_itself_structure.t Tue Mar 10 19:30:58 2009
@@ -31,16 +31,16 @@
mkdir('wr_test') unless -d 'wr_test' ;
-my $inst = $meta_model->instance (root_class_name => 'Itself::Model',
- instance_name => 'itself_instance',
- 'read_directory' => "data",
- 'write_directory' => "wr_test",
- );
-ok($inst,"Read Itself::Model and created instance") ;
+my $meta_inst = $meta_model
+ -> instance (root_class_name => 'Itself::Model',
+ instance_name => 'itself_instance',
+ root_dir => "data",
+ );
+ok($meta_inst,"Read Itself::Model and created instance") ;
-my $root = $inst -> config_root ;
+my $meta_root = $meta_inst -> config_root ;
-my $rw_obj = Config::Model::Itself -> new(model_object => $root ) ;
+my $rw_obj = Config::Model::Itself -> new(model_object => $meta_root ) ;
my $model_dir = 'lib/Config/Model/models' ;
my $map = $rw_obj -> read_all( model_dir => $model_dir,
Modified: branches/upstream/libconfig-model-itself-perl/current/t/load_write_itself.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-itself-perl/current/t/load_write_itself.t?rev=31901&op=diff
==============================================================================
--- branches/upstream/libconfig-model-itself-perl/current/t/load_write_itself.t (original)
+++ branches/upstream/libconfig-model-itself-perl/current/t/load_write_itself.t Tue Mar 10 19:30:58 2009
@@ -10,6 +10,9 @@
use Log::Log4perl qw(:easy) ;
use Data::Dumper ;
use Config::Model::Itself ;
+use File::Path ;
+use File::Find ;
+use File::Copy ;
use warnings;
no warnings qw(once);
@@ -30,12 +33,22 @@
ok(1,"compiled");
-mkdir('wr_test') unless -d 'wr_test' ;
+my $wr_test = "wr_test" ;
+rmtree($wr_test) if -d $wr_test ;
+mkdir($wr_test) ;
+
+# copy test model
+my $wanted = sub {
+ return if /svn|data$|~$/ ;
+ s!data/!! ;
+ -d $File::Find::name && mkpath( ["$wr_test/$_"], 0, 0755) ;
+ -f $File::Find::name && copy($File::Find::name,"$wr_test/$_") ;
+};
+find ({ wanted =>$wanted, no_chdir=>1} ,'data') ;
my $inst = $meta_model->instance (root_class_name => 'Itself::Model',
instance_name => 'itself_instance',
- 'read_directory' => "data",
- 'write_directory' => "wr_test",
+ root_dir => $wr_test,
);
ok($inst,"Read Itself::Model and created instance") ;
More information about the Pkg-perl-cvs-commits
mailing list