/[smeserver]/rpms/e-smith-devtools/sme10/e-smith-devtools-2.6.0-bz11993-backup.patch
ViewVC logotype

Diff of /rpms/e-smith-devtools/sme10/e-smith-devtools-2.6.0-bz11993-backup.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Tue Jun 14 04:12:44 2022 UTC Revision 1.3 by jpp, Sat Jul 30 04:30:09 2022 UTC
# Line 1  Line 1 
1  diff -Nur --no-dereference e-smith-devtools-2.6.0.old/Backup.pm e-smith-devtools-2.6.0/Backup.pm  diff -Nur --no-dereference e-smith-devtools-2.6.0.old/Backup.pm e-smith-devtools-2.6.0/Backup.pm
2  --- e-smith-devtools-2.6.0.old/Backup.pm        1969-12-31 19:00:00.000000000 -0500  --- e-smith-devtools-2.6.0.old/Backup.pm        1969-12-31 19:00:00.000000000 -0500
3  +++ e-smith-devtools-2.6.0/Backup.pm    2022-06-14 00:05:43.785000000 -0400  +++ e-smith-devtools-2.6.0/Backup.pm    2022-07-30 00:28:03.796000000 -0400
4  @@ -0,0 +1,136 @@  @@ -0,0 +1,116 @@
5  +#----------------------------------------------------------------------  +#----------------------------------------------------------------------
6  +# copyright (C) 2013-2022 Koozali Foundation  +# copyright (C) 2013-2022 Koozali Foundation
7  +#  +#
# Line 38  diff -Nur --no-dereference e-smith-devto Line 38  diff -Nur --no-dereference e-smith-devto
38  +        all => [ qw!backup_excludes backup_includes! ]  +        all => [ qw!backup_excludes backup_includes! ]
39  +        );  +        );
40  +  +
41  +our $VERSION = sprintf '%d.%03d', q$Revision: 1.0 $ =~ /: (\d+).(\d+)/;  +our $VERSION = sprintf '%d.%03d', q$Revision: 1.2 $ =~ /: (\d+).(\d+)/;
42  +  +
43  +=head1 NAME  +=head1 NAME
44  +  +
# Line 66  diff -Nur --no-dereference e-smith-devto Line 66  diff -Nur --no-dereference e-smith-devto
66  +sub backup_includes  +sub backup_includes
67  +{  +{
68  +    my ($name, @paths) = @_;  +    my ($name, @paths) = @_;
 +    my $dir = "root/etc/e-smith/templates/etc/dar/DailyBackup.dcf";  
69  +    my $core = "root/etc/backup-data.d";  +    my $core = "root/etc/backup-data.d";
 +    my $filename = "$dir/41go-into-$name";  
70  +    my $corefilename = "$core/${name}.include";  +    my $corefilename = "$core/${name}.include";
71  +  +
 +    unless (-d $dir)  
 +    {  
 +        mkpath $dir or die "Could not create dir $dir: $!";  
 +    }  
72  +    unless (-d $core)  +    unless (-d $core)
73  +    {  +    {
74  +        mkpath $core or die "Could not create dir $core: $!";  +        mkpath $core or die "Could not create dir $core: $!";
75  +    }  +    }
76  +  +
 +    open(FH, '>', $filename) or die $!;  
77  +    open(CFH, '>', $corefilename) or die $!;  +    open(CFH, '>', $corefilename) or die $!;
78  +    foreach my $str (@paths)  +    foreach my $str (@paths)
79  +    {  +    {
80  +        $str =~ s|/$||;  +        $str =~ s|/$||;
81  +        print CFH "$str\n";  +        print CFH "$str\n";
 +        $str =~ s|^/||;  
 +        print FH "--go-into $str\n";  
82  +    }  +    }
 +    close(FH);  
83  +    close(CFH);  +    close(CFH);
84  +    # add template expand to  smeserver-ContribName-update  +    # add template expand to  smeserver-ContribName-update
85  +    use esmith::Build::CreateLinks qw(templates2events);  +    use esmith::Build::CreateLinks qw(templates2events);
# Line 108  diff -Nur --no-dereference e-smith-devto Line 98  diff -Nur --no-dereference e-smith-devto
98  +sub backup_excludes  +sub backup_excludes
99  +{  +{
100  +    my ($name, @paths) = @_;  +    my ($name, @paths) = @_;
 +    my $dir = "root/etc/e-smith/templates/etc/dar/DailyBackup.dcf";  
101  +    my $core = "root/etc/backup-data.d";  +    my $core = "root/etc/backup-data.d";
 +    my $filename = "$dir/46prune-$name";  
102  +    my $corefilename = "$core/${name}.exclude";  +    my $corefilename = "$core/${name}.exclude";
103  +  +
 +    unless (-d $dir)  
 +    {  
 +        mkpath $dir or die "Could not create dir $dir: $!";  
 +    }  
104  +    unless (-d $core)  +    unless (-d $core)
105  +    {  +    {
106  +        mkpath $core or die "Could not create dir $core: $!";  +        mkpath $core or die "Could not create dir $core: $!";
107  +    }  +    }
108  +  +
 +    open(FH, '>', $filename) or die $!;  
109  +    open(CFH, '>', $corefilename) or die $!;  +    open(CFH, '>', $corefilename) or die $!;
110  +    foreach my $str (@paths)  +    foreach my $str (@paths)
111  +    {  +    {
112  +        $str =~ s|/$||;  +        $str =~ s|/$||;
113  +        print CFH "$str\n";  +        print CFH "$str\n";
 +        $str =~ s|^/||;  
 +        print FH "--prune $str\n";  
114  +    }  +    }
 +    close(FH);  
115  +    close(CFH);  +    close(CFH);
116  +    # add template expand to  smeserver-ContribName-update  +    # add template expand to  smeserver-ContribName-update
117  +    use esmith::Build::CreateLinks qw(templates2events);  +    use esmith::Build::CreateLinks qw(templates2events);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed