pakfire.cgi: Add UI to select repository

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Michael Tremer
2020-02-11 14:28:49 +00:00
committed by Arne Fitzenreiter
parent 131f163ce8
commit f61be862c6
12 changed files with 137 additions and 1 deletions

View File

@@ -829,6 +829,11 @@ WARNING: untranslated string: guardian no entries = unknown string
WARNING: untranslated string: guardian service = unknown string
WARNING: untranslated string: itlb multihit = iTLB MultiHit
WARNING: untranslated string: not validating = Not validating
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: route config changed = unknown string
WARNING: untranslated string: routing config added = unknown string
WARNING: untranslated string: routing config changed = unknown string

View File

@@ -1440,12 +1440,17 @@ WARNING: untranslated string: pakfire core update level = Core-Update-Level
WARNING: untranslated string: pakfire install description = Please choose one or more items from the list below and <br /> click the plus to install.
WARNING: untranslated string: pakfire install package = You want to install the following packages:
WARNING: untranslated string: pakfire installed addons = Installed Addons:
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire last core list update = Last core list update made
WARNING: untranslated string: pakfire last package update = Last packages list update made
WARNING: untranslated string: pakfire last serverlist update = Last server list update made
WARNING: untranslated string: pakfire last update = Last update made
WARNING: untranslated string: pakfire possible dependency = There may be depending packages, here is a list of packages that need to be installed.
WARNING: untranslated string: pakfire system state = System Status
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: pakfire uninstall description = Please choose one or more items from the list below and <br /> click the minus to uninstall.
WARNING: untranslated string: pakfire uninstall package = You want to uninstall the following packages:
WARNING: untranslated string: pakfire working = Pakfire is working ... Please wait until all operations have completed successfully.

View File

@@ -1233,6 +1233,11 @@ WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is no
WARNING: untranslated string: p2p block = P2P networks
WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes.
WARNING: untranslated string: pakfire ago = ago.
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: pptp netconfig = My Net Config
WARNING: untranslated string: pptp peer = Peer

View File

@@ -861,6 +861,11 @@ WARNING: untranslated string: info messages = unknown string
WARNING: untranslated string: no data = unknown string
WARNING: untranslated string: not validating = Not validating
WARNING: untranslated string: pakfire ago = ago.
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: route config changed = unknown string
WARNING: untranslated string: routing config added = unknown string
WARNING: untranslated string: routing config changed = unknown string

View File

@@ -1013,6 +1013,11 @@ WARNING: untranslated string: ovpn error dh = The Diffie-Hellman parameter needs
WARNING: untranslated string: ovpn error md5 = You host certificate uses MD5 for the signature which is not accepted anymore. <br>Please update to the latest IPFire version and generate a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: ovpn tls auth = TLS Channel Protection:
WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant. <br>Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: pptp netconfig = My Net Config
WARNING: untranslated string: pptp peer = Peer

View File

@@ -1045,6 +1045,11 @@ WARNING: untranslated string: ovpn generating the root and host certificates = G
WARNING: untranslated string: ovpn ha = Hash algorithm
WARNING: untranslated string: ovpn tls auth = TLS Channel Protection:
WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant. <br>Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: pptp netconfig = My Net Config
WARNING: untranslated string: pptp peer = Peer

View File

@@ -1233,6 +1233,11 @@ WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is no
WARNING: untranslated string: p2p block = P2P networks
WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes.
WARNING: untranslated string: pakfire ago = ago.
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: pptp netconfig = My Net Config
WARNING: untranslated string: pptp peer = Peer

View File

@@ -1229,6 +1229,11 @@ WARNING: untranslated string: ovpn tls auth = TLS Channel Protection:
WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant. <br>Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: p2p block = P2P networks
WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes.
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: pptp netconfig = My Net Config
WARNING: untranslated string: pptp peer = Peer

View File

@@ -923,6 +923,11 @@ WARNING: untranslated string: ovpn error dh = The Diffie-Hellman parameter needs
WARNING: untranslated string: ovpn error md5 = You host certificate uses MD5 for the signature which is not accepted anymore. <br>Please update to the latest IPFire version and generate a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: ovpn tls auth = TLS Channel Protection:
WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant. <br>Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.</br><br>All OpenVPN clients needs then to be renewed!</br>
WARNING: untranslated string: pakfire invalid tree = Invalid repository selected
WARNING: untranslated string: pakfire tree = Repository
WARNING: untranslated string: pakfire tree stable = Stable
WARNING: untranslated string: pakfire tree testing = Testing
WARNING: untranslated string: pakfire tree unstable = Unstable
WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes
WARNING: untranslated string: processor vulnerability mitigations = Processor Vulnerability Mitigations
WARNING: untranslated string: ptr = PTR

View File

@@ -63,6 +63,11 @@
< notes
< not validating
< okay
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< quick control
< shaping add options
< show areas
@@ -705,6 +710,11 @@
< ovpn warning rfc3280
< p2p block
< p2p block save notice
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< pptp netconfig
< pptp peer
@@ -942,6 +952,11 @@
< dns use protocol for dns queries
< not validating
< okay
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< standard
< strict
< working
@@ -1182,6 +1197,11 @@
< ovpn error md5
< ovpn tls auth
< ovpn warning rfc3280
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< pptp netconfig
< pptp peer
@@ -1564,6 +1584,11 @@
< ovpn reneg sec
< ovpn tls auth
< ovpn warning rfc3280
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< pptp netconfig
< pptp peer
@@ -2285,6 +2310,11 @@
< ovpn warning rfc3280
< p2p block
< p2p block save notice
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< pptp netconfig
< pptp peer
@@ -3121,6 +3151,11 @@
< ovpn warning rfc3280
< p2p block
< p2p block save notice
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< pptp netconfig
< pptp peer
@@ -3429,6 +3464,11 @@
< ovpn error md5
< ovpn tls auth
< ovpn warning rfc3280
< pakfire invalid tree
< pakfire tree
< pakfire tree stable
< pakfire tree testing
< pakfire tree unstable
< please reboot to apply your changes
< processor vulnerability mitigations
< ptr

View File

@@ -143,7 +143,19 @@ END
system("$command");
system("/bin/sleep 1");
} elsif ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") {
&General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings);
$pakfiresettings{"TREE"} = $cgiparams{"TREE"};
# Check for valid input
if ($pakfiresettings{"TREE"} !~ m/^(stable|testing|unstable)$/) {
$errormessage .= $Lang::tr{'pakfire invalid tree'};
}
unless ($errormessage) {
&General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings);
# Update lists
system("/usr/local/bin/pakfire update --force --no-colors &>/dev/null &");
}
}
&General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings);
@@ -151,6 +163,12 @@ END
my %selected=();
my %checked=();
$selected{"TREE"} = ();
$selected{"TREE"}{"stable"} = "";
$selected{"TREE"}{"testing"} = "";
$selected{"TREE"}{"unstable"} = "";
$selected{"TREE"}{$pakfiresettings{"TREE"}} = "selected";
# DPC move error message to top so it is seen!
if ($errormessage) {
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
@@ -263,6 +281,34 @@ print <<END;
</table>
END
&Header::closebox();
&Header::openbox("100%", "center", "$Lang::tr{'settings'}");
print <<END;
<form method='POST' action='$ENV{'SCRIPT_NAME'}'>
<table width='95%'>
<tr>
<td align='left' width='45%'>$Lang::tr{'pakfire tree'}</td>
<td width="55%" align="left">
<select name="TREE">
<option value="stable" $selected{"TREE"}{"stable"}>$Lang::tr{'pakfire tree stable'}</option>
<option value="testing" $selected{"TREE"}{"testing"}>$Lang::tr{'pakfire tree testing'}</option>
<option value="unstable" $selected{"TREE"}{"unstable"}>$Lang::tr{'pakfire tree unstable'}</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="ACTION" value="$Lang::tr{'save'}" />
</td>
</tr>
</table>
</form>
END
&Header::closebox();
&Header::closebigbox();
&Header::closepage();

View File

@@ -1982,6 +1982,7 @@
'pakfire install description' => 'Please choose one or more items from the list below and <br /> click the plus to install.',
'pakfire install package' => 'You want to install the following packages: ',
'pakfire installed addons' => 'Installed Addons:',
'pakfire invalid tree' => 'Invalid repository selected',
'pakfire last core list update' => 'Last core list update made',
'pakfire last package update' => 'Last packages list update made',
'pakfire last serverlist update' => 'Last server list update made',
@@ -1989,6 +1990,10 @@
'pakfire possible dependency' => ' There may be depending packages, here is a list of packages that need to be installed.',
'pakfire register' => 'Register at pakfire-server:',
'pakfire system state' => 'System Status',
'pakfire tree' => 'Repository',
'pakfire tree stable' => 'Stable',
'pakfire tree testing' => 'Testing',
'pakfire tree unstable' => 'Unstable',
'pakfire uninstall description' => 'Please choose one or more items from the list below and <br /> click the minus to uninstall.',
'pakfire uninstall package' => 'You want to uninstall the following packages: ',
'pakfire update daily' => 'Search for updates daily:',