/[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.2 by jpp, Sat Jul 30 03:56:21 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-29 23:51:46.614000000 -0400
4  @@ -0,0 +1,136 @@  @@ -0,0 +1,120 @@
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.1 $ =~ /: (\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  +  +
104  +    unless (-d $dir)  +    unless (-d $dir)
# Line 122  diff -Nur --no-dereference e-smith-devto Line 110  diff -Nur --no-dereference e-smith-devto
110  +        mkpath $core or die "Could not create dir $core: $!";  +        mkpath $core or die "Could not create dir $core: $!";
111  +    }  +    }
112  +  +
 +    open(FH, '>', $filename) or die $!;  
113  +    open(CFH, '>', $corefilename) or die $!;  +    open(CFH, '>', $corefilename) or die $!;
114  +    foreach my $str (@paths)  +    foreach my $str (@paths)
115  +    {  +    {
116  +        $str =~ s|/$||;  +        $str =~ s|/$||;
117  +        print CFH "$str\n";  +        print CFH "$str\n";
 +        $str =~ s|^/||;  
 +        print FH "--prune $str\n";  
118  +    }  +    }
 +    close(FH);  
119  +    close(CFH);  +    close(CFH);
120  +    # add template expand to  smeserver-ContribName-update  +    # add template expand to  smeserver-ContribName-update
121  +    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