/[smecontribs]/rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz12008-backup.patch
ViewVC logotype

Annotation of /rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz12008-backup.patch

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


Revision 1.2 - (hide annotations) (download)
Sat Jul 30 03:27:03 2022 UTC (2 years, 4 months ago) by jpp
Branch: MAIN
Changes since 1.1: +4 -28 lines
* Fri Jul 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.18-30.sme
- add to core backup [SME: 12008]
- add local 2022-07-30 patch

1 jpp 1.1 diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/createlinks smeserver-fail2ban-0.1.18/createlinks
2     --- smeserver-fail2ban-0.1.18.old/createlinks 2022-07-29 22:37:24.969000000 -0400
3     +++ smeserver-fail2ban-0.1.18/createlinks 2022-07-29 23:04:07.547000000 -0400
4     @@ -9,6 +9,8 @@
5    
6     foreach my $file (qw(
7     /etc/systemd/system-preset/49-koozali.preset
8     + /etc/backup-data.d/smeserver-fail2ban.include
9     + /etc/e-smith/templates/etc/dar/DailyBackup.dcf
10     ))
11     {
12     templates2events( $file, $event );
13     diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin
14     --- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 1969-12-31 19:00:00.000000000 -0500
15     +++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 2022-07-29 22:59:07.986000000 -0400
16 jpp 1.2 @@ -0,0 +1,22 @@
17 jpp 1.1 +#Only non rpm owned files are backupe there
18     +{
19     +use RPM2;
20     +my $rpm_db = RPM2->open_rpm_db();
21     +
22 jpp 1.2 +my @dirs = qw(
23     +/etc/fail2ban
24     +/etc/fail2ban/action.d
25 jpp 1.1 +/etc/fail2ban/fail2ban.d
26     +/etc/fail2ban/filter.d
27     +/etc/fail2ban/jail.d
28     +);
29     +
30     +foreach my $some_dir (@dirs) {
31     + opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!";
32     + while ( (my $file = readdir $dh) ) {
33     + next if $file =~ /^\.{1,2}$/;
34     + $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file");
35     + }
36     + closedir $dh;
37     +}
38     +}

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