7 Commits

Author SHA1 Message Date
ec6b312c35 * Sun Oct 05 2025 Brian Read <brianr@koozali.org> 0.2-21.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
2025-10-05 11:34:03 +01:00
61580fe3c7 * Wed Sep 24 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-20.sme
- relaxed CSP
2025-09-24 15:45:33 -04:00
2cc45c7967 * Tue Sep 23 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-19.sme
- fix /run/BackupPC instead of /var prevents service start
- fix smanager2 display
- add navigation2-conf and routes2-conf action
2025-09-24 15:22:48 -04:00
6ae090f94b * Tue Sep 23 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-19.sme
- fix /run/BackupPC instead of /var prevents service start
- TODO: fix smanager2 display
2025-09-23 17:03:11 -04:00
199dc75778 * Tue Sep 23 2025 Brian Read <brianr@koozali.org> 0.2-18.sme
- Change $config to config in layout file(s) [SME: 13171]
2025-09-23 13:06:15 +01:00
bba6c6b66d Update README with specific Bugzilla links 2024-10-27 15:41:15 +00:00
Trevor Batley
1f4fb3a2ce fix-e-smith-pkg script (#12732) 2024-09-08 17:41:53 +10:00
8 changed files with 53 additions and 70 deletions

View File

@@ -9,7 +9,14 @@ SMEServer Koozali developed git repo for smeserver-BackupPC smecontribs
<br />https://wiki.koozali.org/SME-101.09:_Supplément:_SME_&_BackupPC-4.2 <br />https://wiki.koozali.org/SME-101.09:_Supplément:_SME_&_BackupPC-4.2
## Bugzilla ## Bugzilla
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-BackupPC&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) Show list of outstanding bugs:
[All](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEEDINFO&bug_status=IN_PROGRESS&bug_status=RESOLVED&bug_status=VERIFIED&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Confirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=CONFIRMED&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Unconfirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Need Info](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=NEEDINFO&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[In Progress](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=IN_PROGRESS&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Verified](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=VERIFIED&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Resolved](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=RESOLVED&classification=Contribs&component=smeserver-BackupPC&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
## Description ## Description

View File

@@ -1 +0,0 @@
contribs10

View File

@@ -2,21 +2,6 @@
use esmith::Build::CreateLinks qw(:all); use esmith::Build::CreateLinks qw(:all);
# Start and stop links - SME9
#service_link_enhanced("backuppc", "S98", "7");
#service_link_enhanced("backuppc", "K10", "6");
#service_link_enhanced("backuppc", "K10", "0");
#service_link_enhanced("backuppc", "K10", "1");
#service_link_enhanced("httpd-bkpc", "S86", "7");
#service_link_enhanced("httpd-bkpc", "K15", "6");
#service_link_enhanced("httpd-bkpc", "K15", "0");
#service_link_enhanced("httpd-bkpc", "K15", "1");
#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-bkpc');
#safe_symlink("/var/service/httpd-bkpc" , 'root/service/httpd-bkpc');
# Panel links # Panel links
panel_link("backuppc", 'manager'); panel_link("backuppc", 'manager');
@@ -43,6 +28,8 @@ $event = 'smeserver-BackupPC-update'; #Must match rpm name
#action specific to this package #action specific to this package
event_link("backuppc-checkupgrade", $event, "20"); event_link("backuppc-checkupgrade", $event, "20");
event_link("backuppc-genkey", $event, "10"); event_link("backuppc-genkey", $event, "10");
event_link("navigation2-conf", $event, "80");
event_link("routes2-conf", $event, "80");
event_link("backuppc-checkupgrade", "post-upgrade", "91"); event_link("backuppc-checkupgrade", "post-upgrade", "91");
event_link("backuppc-genkey", "post-upgrade", "90"); event_link("backuppc-genkey", "post-upgrade", "90");
#services we need to restart #services we need to restart

View File

@@ -8,6 +8,7 @@ if [ -e /etc/BackupPC/config.pl ]; then
# Update paths # Update paths
sed -i 's|/opt/backuppc/files|/var/lib/BackupPC|' /etc/BackupPC/config.pl sed -i 's|/opt/backuppc/files|/var/lib/BackupPC|' /etc/BackupPC/config.pl
sed -i 's|/var/run/BackupPC|/run/BackupPC|' /etc/BackupPC/config.pl
sed -i 's|/usr/local/BackupPC|/usr/share/BackupPC|' /etc/BackupPC/config.pl sed -i 's|/usr/local/BackupPC|/usr/share/BackupPC|' /etc/BackupPC/config.pl
sed -i 's|/opt/backuppc/cgi-bin|/usr/share/BackupPC/sbin|' /etc/BackupPC/config.pl sed -i 's|/opt/backuppc/cgi-bin|/usr/share/BackupPC/sbin|' /etc/BackupPC/config.pl
sed -i 's|/opt/backuppc/images|/usr/share/BackupPC/html|' /etc/BackupPC/config.pl sed -i 's|/opt/backuppc/images|/usr/share/BackupPC/html|' /etc/BackupPC/config.pl

View File

@@ -22,6 +22,7 @@
<Location /BackupPC> <Location /BackupPC>
SSLRequireSSL on SSLRequireSSL on
Require ip $localAccess $externalSSLAccess Require ip $localAccess $externalSSLAccess
Header set Content-Security-Policy "script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
</Location> </Location>
HERE HERE

View File

@@ -18,8 +18,8 @@ use SrvMngr::I18N;
use SrvMngr qw(theme_list init_session ip_number_or_blank); use SrvMngr qw(theme_list init_session ip_number_or_blank);
use Quota; use Quota;
use esmith::ConfigDB; use esmith::ConfigDB::UTF8;
use esmith::AccountsDB; use esmith::AccountsDB::UTF8;
use esmith::util; use esmith::util;
use File::Basename; use File::Basename;
@@ -28,23 +28,22 @@ use File::Path qw(make_path remove_tree);
use esmith::Backup; use esmith::Backup;
use esmith::BackupHistoryDB; use esmith::BackupHistoryDB;
use esmith::util;
use esmith::lockfile; use esmith::lockfile;
use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0; use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0;
our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; my $cdb;
our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db"; my $adb;
sub main { sub main {
my $c = shift; my $c = shift;
$c->app->log->info($c->log_req); $c->app->log->info($c->log_req);
#my $modul = get_backuppc( $c ); $cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
my $url = "https://".$c->session->{'SystemName'}.".".$c->session->{"DomainName"}."/BackupPC"; my $url = "https://".$c->session->{'SystemName'}.".".$c->session->{"DomainName"}."/BackupPC";
#my $url = 'https://sme10.thereadclan.me.uk/BackupPC';
$c->stash(url => $url ); $c->stash(url => $url );
$c->render(template => 'backuppc'); $c->render(template => 'backuppc');
@@ -53,52 +52,24 @@ sub main {
sub get_backuppc { sub get_backuppc {
my ($c) = @_; my ($c) = @_;
my $tx = $c->tx;
my $tx = $c->tx; my $req = $tx->req;
my $req = $tx->req;
# 3 env variables for durep.cgi
#$ENV{'SCRIPT_NAME'} = 'durep';
#$ENV{'REQUEST_METHOD'} = $req->method;
#$ENV{'QUERY_STRING'} = $req->url->query->to_string;
my $res = `https:////sme10.thereadclan.me.uk//BackupPC`;
my $res = `/usr/share/BackupPC/sbin/BackupPC_Admin`; # my $res = `/usr/share/BackupPC/sbin/BackupPC_Admin`; #
my $step = 0; my $out; my $step = 0;
my $out;
my @lines = split /\n/, $res; my @lines = split /\n/, $res;
# remove except 'body' # remove except 'body'
foreach my $line (@lines) { foreach my $line (@lines) {
if ( $line =~ m|<body>| ) { if ( $line =~ m|<body>| ) {
$step = 1; $step = 1;
} elsif ( $line =~ m|</body>| ) { } elsif ( $line =~ m|</body>| ) {
$step = 2; $step = 2;
} elsif ( $step == 1 ) { } elsif ( $step == 1 ) {
$out .= $line; $out .= $line;
}
} }
}
return $out; return $out;
} }
#sub main {
# my $c = shift;
# $c->app->log->info($c->log_req);
# BEGIN
# {
# $ENV {'PATH'} = '/bin:/usr/bin:/sbin';
# $ENV {'SHELL'} = '/bin/bash';
# delete $ENV {'ENV'};
# }
#$c = $c->redirect_to("https://".$ENV {'HTTP_X_FORWARDED_HOST'}."/BackupPC");
# $c = $c->redirect_to("https://sme10.thereadclan.me.uk//BackupPC");
#}
1; 1;

View File

@@ -5,7 +5,7 @@
%end %end
% content_for 'module' => begin % content_for 'module' => begin
% if ($config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper stash 'url' %= dumper stash 'url'
</p> </p>

View File

@@ -4,7 +4,7 @@
Name: smeserver-BackupPC Name: smeserver-BackupPC
Version: 0.2 Version: 0.2
Release: 16%{?dist} Release: 21%{?dist}
Summary: BackupPC integration into SME server Summary: BackupPC integration into SME server
Group: Applications/System Group: Applications/System
@@ -15,14 +15,14 @@ Source: %{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}
BuildArch: noarch BuildArch: noarch
BuildRequires: e-smith-devtools BuildRequires: smeserver-devtools
Requires: mod_auth_tkt Requires: mod_auth_tkt
Requires: BackupPC >= 4.0.0 Requires: BackupPC >= 4.0.0
Requires: smeserver-remoteuseraccess Requires: smeserver-remoteuseraccess
Requires: openssl Requires: openssl
#Requires: e-smith-manager >= 2.8.0 #Requires: e-smith-manager >= 2.8.0
Requires: e-smith-apache >= 2.6.0-19 Requires: smeserver-apache >= 2.6.0-19
AutoReqProv: no AutoReqProv: no
#Conflicts: smeserver-backuppc.fws #Conflicts: smeserver-backuppc.fws
@@ -52,6 +52,23 @@ This package contains specific configuration for SME server
#---------------------------------------------------- #----------------------------------------------------
%changelog %changelog
* Sun Oct 05 2025 Brian Read <brianr@koozali.org> 0.2-21.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
* Wed Sep 24 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-20.sme
- relaxed CSP
* Tue Sep 23 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-19.sme
- fix /run/BackupPC instead of /var prevents service start
- fix smanager2 display
- add navigation2-conf and routes2-conf action
* Tue Sep 23 2025 Brian Read <brianr@koozali.org> 0.2-18.sme
- Change $config to config in layout file(s) [SME: 13171]
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 0.2-17.sme
- Fix e-smith references in smeserver-BackupPC [SME: 12732]
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.2-16.sme * Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.2-16.sme
- Roll up patches and move to git repo [SME: 12338] - Roll up patches and move to git repo [SME: 12338]