Update to PVE6 and only 6

This commit is contained in:
Andreas Steinel 2020-05-10 10:48:22 +02:00
parent 777717bd68
commit 2ff9f629ab
8 changed files with 49 additions and 143 deletions

View File

@ -10,7 +10,7 @@ install:
@mkdir -p $(DESTDIR)/usr/share/pve-no-subscription
@install -m 644 apt-hook $(DESTDIR)/etc/apt/apt.conf.d/99-pve-no-subscription
@install -m 755 no-subscription-warning.sh $(DESTDIR)/usr/share/pve-no-subscription
@install -m 644 no-subscription-warning-*.patch $(DESTDIR)/usr/share/pve-no-subscription
@install -m 644 *.patch $(DESTDIR)/usr/share/pve-no-subscription
@install -m 644 pve-no-subscription.list $(DESTDIR)/etc/apt/sources.list.d
package-clean:

View File

@ -1,11 +0,0 @@
--- /usr/share/pve-manager/ext4/pvemanagerlib.js.orig 2015-04-28 06:38:55.000000000 +0200
+++ /usr/share/pve-manager/ext4/pvemanagerlib.js 2015-06-19 17:50:05.856801125 +0200
@@ -485,7 +485,7 @@
success: function(response, opts) {
var data = response.result.data;
- if (data.status !== 'Active') {
+ if (false) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,

View File

@ -1,29 +0,0 @@
--- /usr/share/pve-manager/ext6/pvemanagerlib.js.orig 2016-04-25 10:47:04.345151970 +0200
+++ /usr/share/pve-manager/ext6/pvemanagerlib.js 2016-04-25 10:46:35.821675213 +0200
@@ -275,7 +275,7 @@
'p': gettext('Premium')
},
- noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
+ noSubKeyHtml: 'This server is receiving updates from the Proxmox VE No-Subscription Repository. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
other: gettext('Other OS types'),
@@ -507,7 +507,7 @@
success: function(response, opts) {
var data = response.result.data;
+ if (false) {
- if (data.status !== 'Active') {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
@@ -32662,7 +32662,7 @@
alias: 'widget.pveDcSupport',
pveGuidePath: '/pve-docs/index.html',
- invalidHtml: '<h1>No valid subscription</h1>' + PVE.Utils.noSubKeyHtml,
+ invalidHtml: '<h1>Community Edition</h1>' + PVE.Utils.noSubKeyHtml,
communityHtml: 'Please use the public community <a target="_blank" href="http://forum.proxmox.com">forum</a> for any questions.',

View File

@ -1,28 +0,0 @@
--- /usr/share/pve-manager/js/pvemanagerlib.js.orig 2017-03-09 22:09:23.586006455 +0100
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2017-03-09 22:19:03.317402857 +0100
@@ -311,7 +311,7 @@
'p': gettext('Premium')
},
- noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
+ noSubKeyHtml: 'This server is receiving updates from the Proxmox VE No-Subscription Repository. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
other: gettext('Other OS types'),
@@ -799,7 +799,7 @@
success: function(response, opts) {
var data = response.result.data;
- if (data.status !== 'Active') {
+ if (false) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
@@ -34340,7 +34340,7 @@
pveGuidePath: '/pve-docs/index.html',
onlineHelp: 'getting_help',
- invalidHtml: '<h1>No valid subscription</h1>' + PVE.Utils.noSubKeyHtml,
+ invalidHtml: '<h1>Community Edition</h1>' + PVE.Utils.noSubKeyHtml,
communityHtml: 'Please use the public community <a target="_blank" href="http://forum.proxmox.com">forum</a> for any questions.',

View File

@ -1,31 +0,0 @@
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.orig 2018-03-20 21:15:12.881689428 +0100
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2018-03-20 21:15:40.006260631 +0100
@@ -353,7 +353,7 @@
success: function(response, opts) {
var data = response.result.data;
- if (data.status !== 'Active') {
+ if (false) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
--- /usr/share/pve-manager/js/pvemanagerlib.js.orig 2018-03-20 21:08:02.704629461 +0100
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2018-03-20 21:11:08.248537461 +0100
@@ -327,7 +327,7 @@
'p': gettext('Premium')
},
- noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
+ noSubKeyHtml: 'This server is receiving updates from the Proxmox VE No-Subscription Repository. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
'Linux': [
@@ -29941,7 +29941,7 @@
pveGuidePath: '/pve-docs/index.html',
onlineHelp: 'getting_help',
- invalidHtml: '<h1>No valid subscription</h1>' + PVE.Utils.noSubKeyHtml,
+ invalidHtml: '<h1>Community Edition</h1>' + PVE.Utils.noSubKeyHtml,
communityHtml: 'Please use the public community <a target="_blank" href="http://forum.proxmox.com">forum</a> for any questions.',

View File

@ -1,47 +1,21 @@
#!/bin/sh
#!/bin/bash
TYPE=unknown
PATCHED=0
[ -e /usr/share/pve-manager/ext4/pvemanagerlib.js ] && TYPE=ext4
[ -e /usr/share/pve-manager/ext6/pvemanagerlib.js ] && TYPE=ext6
[ -e /usr/share/pve-manager/js/pvemanagerlib.js ] && TYPE=js
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ) -gt 0 ]
then
PATCHED=1
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/proxmoxlib.patch
fi
if [ $( grep -c "<h1>No valid subscription</h1>" /usr/share/pve-manager/js/pvemanagerlib.js ) -gt 0 ]
then
PATCHED=1
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/pvemanagerlib.patch
fi
case "$TYPE" in
ext4)
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/pve-manager/ext4/pvemanagerlib.js ) -gt 0 ]
then
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-ext4.patch
echo "------------------------------------------------------------------------------"
fi
;;
ext6)
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/pve-manager/ext6/pvemanagerlib.js ) -gt 0 ]
then
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-ext6.patch
echo "------------------------------------------------------------------------------"
fi
;;
js)
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/pve-manager/js/pvemanagerlib.js ) -gt 0 ]
then
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-js.patch
echo "------------------------------------------------------------------------------"
fi
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ) -gt 0 ]
then
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-js2.patch
echo "------------------------------------------------------------------------------"
fi
;;
*)
echo "Unknown Type! Sourcefile not found!"
;;
esac
if [ "$PATCHED" == "1" ]
then
systemctl restart pvedaemon
systemctl restart pveproxy
fi

11
proxmoxlib.patch Normal file
View File

@ -0,0 +1,11 @@
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.orig 2020-05-10 09:43:14.824887009 +0200
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2020-05-10 09:43:23.688854213 +0200
@@ -390,7 +390,7 @@
success: function(response, opts) {
var data = response.result.data;
- if (data.status !== 'Active') {
+ if ( false ) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,

20
pvemanagerlib.patch Normal file
View File

@ -0,0 +1,20 @@
--- /usr/share/pve-manager/js/pvemanagerlib.js.orig 2020-05-10 09:44:21.832501834 +0200
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2020-05-10 09:44:47.832272641 +0200
@@ -446,7 +446,7 @@
'p': gettext('Premium')
},
- noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="https://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
+ noSubKeyHtml: 'This server is receiving updates from the Proxmox VE No-Subscription Repository. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
'Linux': [
@@ -41090,7 +41090,7 @@
pveGuidePath: '/pve-docs/index.html',
onlineHelp: 'getting_help',
- invalidHtml: '<h1>No valid subscription</h1>' + PVE.Utils.noSubKeyHtml,
+ invalidHtml: '<h1>Community Edition</h1>' + PVE.Utils.noSubKeyHtml,
communityHtml: 'Please use the public community <a target="_blank" href="https://forum.proxmox.com">forum</a> for any questions.',