Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Lamprecht
50b6531c3f bump version to 5.4-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-26 20:20:04 +02:00
Fabian Grünbichler
4f9e89e6a0 apthook: detect upgrades from PVE 5.x to 6.0
and refer to the upgrade documentation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-26 20:10:07 +02:00
19 changed files with 123 additions and 323 deletions

7
.gitignore vendored
View File

@ -1,7 +0,0 @@
/*.build
/*.buildinfo
/*.changes
/*.deb
/*.dsc
/*.tar*
/proxmox-ve-*/

View File

@ -1,51 +1,35 @@
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/pkg-info.mk
PACKAGE=proxmox-ve
GITVERSION:=$(shell git rev-parse HEAD)
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
PVE_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
PVE_HEADERS_DEB=pve-headers_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
PVE_DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
PVE_HEADERS_DEB=pve-headers_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
BUILD_DIR=build
DEBS=$(PVE_DEB) $(PVE_HEADERS_DEB)
DEBS=${PVE_DEB} ${PVE_HEADERS_DEB}
all: deb
deb: $(DEBS)
deb: ${DEBS}
$(BUILDDIR): debian
rm -rf $@ $@.tmp
mkdir -p $@.tmp/debian
cp -a debian/ $@.tmp/
echo "git clone git://git.proxmox.com/git/proxmox-ve.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
$(PVE_HEADERS_DEB): $(PVE_DEB)
$(PVE_DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
lintian $(DEBS)
dsc: $(DSC)
$(MAKE) clean
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -uc -us
sbuild: $(DSC)
sbuild $(DSC)
${PVE_HEADERS_DEB}: ${PVE_DEB}
${PVE_DEB}: debian
rm -rf ${BUILD_DIR}
mkdir -p ${BUILD_DIR}/debian
cp -ar debian/* ${BUILD_DIR}/debian/
echo "git clone git://git.proxmox.com/git/proxmox-ve.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
lintian ${PVE_DEB}
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
tar cf - $(DEBS)|ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST)
upload: ${DEBS}
tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
.PHONY: distclean
distclean: clean
.PHONY: clean
clean:
rm -rf *~ $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar.* *.deb *.dsc *.changes *.build *.buildinfo
rm -rf *~ ${BUILD_DIR} *.deb *.dsc *.changes *.buildinfo

View File

@ -15,36 +15,23 @@ my $log = sub {
print "W: ($hook_name) $line";
};
if (!defined $fd || $fd == 0 || $fd !~ /^\d+$/) {
if (!defined $fd || $fd == 0) {
$log->("APT_HOOK_INFO_FD not correctly defined, skipping apt-pve-hook checks\n");
exit 0;
}
open(my $fh, "<&=", $fd) or die "E: could not open APT_HOOK_INFO_FD (${fd}) - $!\n";
open(my $fh, "<&=${fd}") or die "E: could not open APT_HOOK_INFO_FD (${fd}) - $!\n";
my $cleanup = sub {
my ($rc, $confirm) = @_;
close($fh);
if ($confirm) {
my $line = <STDIN>;
}
my $line = <STDIN> if $confirm;
exit $rc;
};
my $file_read_firstline = sub {
my ($filename) = @_;
my $fh = IO::File->new($filename, "r");
return undef if !$fh;
my $res = <$fh>;
chomp $res if $res;
$fh->close;
return $res;
};
chomp (my $ver = <$fh>);
if ($ver ne "VERSION 2") {
$log->("apt-pve-hook misconfigured, expecting hook protocol version 2\n");
@ -85,33 +72,16 @@ while (my $line = <$fh>) {
$log->("\t- that you are using 'apt full-upgrade' to upgrade your system\n");
$cleanup->(1);
}
} elsif ($action eq '**CONFIGURE**' && $dir eq '<' && $old =~ /^6\./ && $new =~ /^7\./) {
} elsif ($action eq '**CONFIGURE**' && $dir eq '<' && $old =~ /^5\./ && $new =~ /^6\./) {
$log->("!! ATTENTION !!\n");
$log->("You are attempting to upgrade from proxmox-ve '$old' to proxmox-ve '$new'. Please make sure to read the Upgrade notes at\n");
$log->("\thttps://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0\n");
$log->("\thttps://pve.proxmox.com/wiki/Upgrade_from_5.x_to_6.0\n");
$log->("before proceeding with this operation.\n");
$log->("\n");
$log->("Press enter to continue, or C^c to abort.\n");
$cleanup->(0, 1);
}
}
if ($pkg =~ /^pve-kernel-/) {
if ($action eq '**REMOVE**') {
my $next_boot_ver = $file_read_firstline->("/etc/kernel/next-boot-pin");
my $pinned_ver = $file_read_firstline->("/etc/kernel/proxmox-boot-pin");
my $remove_pinned_ver = ($next_boot_ver && $pkg =~ /$next_boot_ver$/);
$remove_pinned_ver ||= ($pinned_ver && $pkg =~ /$pinned_ver$/);
if ($remove_pinned_ver) {
$log->("!! WARNING !!\n");
$log->("You are attempting to remove the currently pinned kernel '${pkg}'!\n");
$log->("\n");
$log->("If you really do not need the version anymore unpin it by running\n");
$log->("\tproxmox-boot-tool kernel unpin'\n");
$log->("and repeat your apt invocation.\n");
$cleanup->(1);
}
}
}
}
$cleanup->(0);

171
debian/changelog vendored
View File

@ -1,173 +1,8 @@
proxmox-ve (8.3.0) bookworm; urgency=medium
proxmox-ve (5.4-2) unstable; urgency=medium
* bump for Proxmox VE 8.3
* add note regarding upgrade to next major Proxmox VE version in apt hook
-- Proxmox Support Team <support@proxmox.com> Wed, 20 Nov 2024 11:42:06 +0100
proxmox-ve (8.2.0) bookworm; urgency=medium
* drop postinst/rm scripts that managed the links to the current default
kernel for fallback use, this moved to the new separate meta package for
default-kernel
* add systemd-sys to depends to better encode that Proxmox VE only works
with systemd as PID1
* disable the apt hook, that ensures that Proxmox VE is not deinstalled by
accident due to some botched repository configuration from the user, when
the meta package is actually removed to avoid issues on purge.
-- Proxmox Support Team <support@proxmox.com> Wed, 17 Apr 2024 07:38:30 +0200
proxmox-ve (8.1.0) bookworm; urgency=medium
* bump for Proxmox VE 8.1
-- Proxmox Support Team <support@proxmox.com> Thu, 23 Nov 2023 09:25:11 +0100
proxmox-ve (8.0.2) bookworm; urgency=medium
* switch to new Proxmox kernel meta packages
* make pve-headers transitional to switch to proxmox-default-headers
-- Proxmox Support Team <support@proxmox.com> Tue, 01 Aug 2023 11:39:53 +0200
proxmox-ve (8.0.1) bookworm; urgency=medium
* switch dependency over to proxmox-kernel-helper package (again)
-- Proxmox Support Team <support@proxmox.com> Mon, 12 Jun 2023 11:10:13 +0200
proxmox-ve (8.0.0) bookworm; urgency=medium
* re-build for Proxmox VE 8 / Debian 12 Bookworm
* depene on Linux Kernel 6.2 by default
* switch to native versioning scheme
-- Proxmox Support Team <support@proxmox.com> Wed, 24 May 2023 20:06:19 +0200
proxmox-ve (7.4-1) bullseye; urgency=medium
* depend on proxmox-kernel-helper
* bump version for Proxmox VE 7.4
-- Proxmox Support Team <support@proxmox.com> Mon, 20 Mar 2023 21:19:15 +0100
proxmox-ve (7.3-1) bullseye; urgency=medium
* bump version for Proxmox VE 7.3
-- Proxmox Support Team <support@proxmox.com> Sun, 20 Nov 2022 15:19:55 +0100
proxmox-ve (7.2-1) bullseye; urgency=medium
* depend on Linux Kernel 5.15 by default
* bump version for Proxmox VE 7.2
-- Proxmox Support Team <support@proxmox.com> Wed, 20 Apr 2022 15:00:11 +0200
proxmox-ve (7.1-2) bullseye; urgency=medium
* apt-hook: make code more robust for some input to avoid spurious
warnings
* apt-hook: add check preventing the removal of pinned kernels
* d/control: alternatively allow 5.15 kernel to satisfy kernel dependency
-- Proxmox Support Team <support@proxmox.com> Wed, 20 Apr 2022 11:07:46 +0200
proxmox-ve (7.1-1) bullseye; urgency=medium
* depend on Linux Kernel 5.13 by default
* bump version for Proxmox VE 7.1
-- Proxmox Support Team <support@proxmox.com> Thu, 11 Nov 2021 21:46:59 +0100
proxmox-ve (7.0-2) bullseye; urgency=medium
* add grub.d snippet set distributor and disable os-prober
-- Proxmox Support Team <support@proxmox.com> Thu, 24 Jun 2021 13:53:40 +0200
proxmox-ve (7.0-1) bullseye; urgency=medium
* depend on Linux Kernel 5.11 by default
* re-build for Proxmox VE 7 / Debian Bullseye
-- Proxmox Support Team <support@proxmox.com> Mon, 24 May 2021 12:18:54 +0200
proxmox-ve (6.4-1) pve; urgency=medium
* bump version for Proxmox VE 6.4
-- Proxmox Support Team <support@proxmox.com> Wed, 28 Apr 2021 10:29:10 +0200
proxmox-ve (6.3-1) pve; urgency=medium
* bump version for Proxmox VE 6.3
-- Proxmox Support Team <support@proxmox.com> Wed, 25 Nov 2020 11:47:22 +0100
proxmox-ve (6.2-2) pve; urgency=medium
* split out APT repository keys into own package 'proxmox-archive-keyring'
-- Proxmox Support Team <support@proxmox.com> Thu, 6 Aug 2020 16:57:31 +0200
proxmox-ve (6.2-1) pve; urgency=medium
* depend on Linux LTS Kernel 5.4 by default
-- Proxmox Support Team <support@proxmox.com> Wed, 06 May 2020 10:22:11 +0200
proxmox-ve (6.1-2) pve; urgency=medium
* ensure rescue kernel links point over to new 5.3 kernel
-- Proxmox Support Team <support@proxmox.com> Wed, 04 Dec 2019 07:09:33 +0100
proxmox-ve (6.1-1) pve; urgency=medium
* depend on Linux Kernel 5.3 by default
* make pve-headers depend on pve-headers-5.3
-- Proxmox Support Team <support@proxmox.com> Tue, 26 Nov 2019 07:48:12 +0100
proxmox-ve (6.0-2) pve; urgency=medium
* move efiboot and kernel autoremoval postinst hooks to kernel-meta
-- Proxmox Support Team <support@proxmox.com> Wed, 10 Jul 2019 20:21:33 +0200
proxmox-ve (6.0-1) pve; urgency=medium
* add efiboot and kernel autoremoval postinst hooks
-- Proxmox Support Team <support@proxmox.com> Fri, 28 Jun 2019 11:25:40 +0200
proxmox-ve (6.0-0+2) pve; urgency=medium
* make pve-headers depend on pve-headers-5.0
-- Proxmox Support Team <support@proxmox.com> Tue, 28 May 2019 11:49:14 +0200
proxmox-ve (6.0-0+1) pve; urgency=medium
* switch over /boot/pve/vmlinuz and /boot/pve/initrd symlinks to point to
5.0 kernel version series
* re build for Debian Buster / PVE 6
-- Proxmox Support Team <support@proxmox.com> Wed, 22 May 2019 21:45:24 +0200
-- Proxmox Support Team <support@proxmox.com> Wed, 26 Jun 2019 20:18:43 +0200
proxmox-ve (5.4-1) unstable; urgency=medium

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

32
debian/control vendored
View File

@ -1,26 +1,30 @@
Source: proxmox-ve
Section: admin
Priority: optional
Build-Depends: debhelper (>=10~),
lintian,
Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper-compat (= 13), lintian,
Standards-Version: 4.6.2
Homepage: https://www.proxmox.com
Package: proxmox-ve
Architecture: all
Provides: proxmox-virtual-environment,
Conflicts: proxmox-ve-3.10.0,
proxmox-virtual-environment,
pve-kernel,
Replaces: proxmox-ve-3.10.0,
proxmox-virtual-environment,
pve-kernel,
Depends: apt,
libc6 (>= 2.7-18),
openssh-client,
openssh-server,
proxmox-archive-keyring,
proxmox-default-kernel,
proxmox-kernel-helper (>= 8.0.3),
pve-manager (>= 8.0.4),
pve-kernel-4.15,
pve-manager,
pve-qemu-kvm,
qemu-server,
systemd-sysv,
${misc:Depends},
Description: Proxmox Virtual Environment
spiceterm,
vncterm,
Description: The Proxmox Virtual Environment
The Proxmox Virtual Environment is an easy to use Open Source
virtualization platform for running Virtual Appliances and Virtual
Machines. This is a meta package which will install everything
@ -28,8 +32,6 @@ Description: Proxmox Virtual Environment
Package: pve-headers
Architecture: all
Depends: proxmox-default-headers, ${misc:Depends},
Section: oldlibs
Description: Default Proxmox Kernel Headers (transitional package)
This is a dummy transitional package to transition to proxmox-default-headers.
It can be safely removed.
Depends: pve-headers-4.15,
Description: Default Proxmox VE Kernel Headers
This is a virtual package which will install the kernel headers for the current default kernel.

23
debian/copyright vendored
View File

@ -1,14 +1,21 @@
Copyright (C) 2016 - 2024 Proxmox Server Solutions GmbH <support@proxmox.com>
Copyright (C) 2016 Proxmox Server Solutions GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA
The complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.

View File

@ -1,2 +0,0 @@
GRUB_DISTRIBUTOR="Proxmox VE"
GRUB_DISABLE_OS_PROBER=true

21
debian/postinst vendored Executable file
View File

@ -0,0 +1,21 @@
#! /bin/sh
# Abort if any command returns an error value
set -e
case "$1" in
configure)
# cleanup - remove Proxmox Release Key key from /etc/apt/trusted.gpg
/usr/bin/apt-key --keyring /etc/apt/trusted.gpg del 9887F95A >/dev/null 2>&1 || /bin/true
# cleanup - remove old stretch-incompatible variant of installing release key
rm -f /etc/apt/trusted.gpg.d/proxmox-ve.gpg /etc/apt/trusted.gpg.d/proxmox-ve.gpg~
# setup kernel links for installation CD (rescue boot)
mkdir -p /boot/pve
ln -sf /boot/pve/vmlinuz-4.15 /boot/pve/vmlinuz
ln -sf /boot/pve/initrd.img-4.15 /boot/pve/initrd.img
;;
esac
exit 0

19
debian/postrm vendored Executable file
View File

@ -0,0 +1,19 @@
#! /bin/sh
# Abort if any command returns an error value
set -e
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
# remove kernel symlinks
rm -f /boot/pve/vmlinuz
rm -f /boot/pve/initrd.img
rmdir --ignore-fail-on-non-empty /boot/pve/ || true
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

BIN
debian/proxmox-ve-release-5.x.gpg vendored Normal file

Binary file not shown.

BIN
debian/proxmox-ve-release-6.x.gpg vendored Normal file

Binary file not shown.

View File

@ -1,3 +1,4 @@
debian/apthook/10pveapthook etc/apt/apt.conf.d/
debian/apthook/pve-apt-hook usr/share/proxmox-ve/
debian/grub/proxmox-ve.cfg etc/default/grub.d/
debian/proxmox-ve-release-5.x.gpg etc/apt/trusted.gpg.d/
debian/proxmox-ve-release-6.x.gpg etc/apt/trusted.gpg.d/

1
debian/proxmox-ve.lintian-overrides vendored Normal file
View File

@ -0,0 +1 @@
proxmox-ve: package-installs-apt-keyring etc/apt/trusted.gpg.d/proxmox-ve-release-*

View File

@ -1,3 +0,0 @@
# moved to proxmox-archive-keyring under more generic paths
rm_conffile /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg 6.2-2~~
rm_conffile /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg 6.2-2~~

View File

@ -1,35 +0,0 @@
#! /bin/sh
set -e
hook=/etc/apt/apt.conf.d/10pveapthook
case "$1" in
purge)
rm -f $hook.disabled
;;
remove)
if test -f $hook; then
mv $hook $hook.disabled
fi
;;
abort-install)
if test "x$2" != "x" && test -f $hook
then
mv $hook $hook.disabled
fi
;;
upgrade|failed-upgrade|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
#DEBHELPER#
exit 0

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
hook=/etc/apt/apt.conf.d/10pveapthook
if test -f $hook.disabled
then
mv $hook.disabled $hook
fi
#DEBHELPER#
exit 0

24
debian/rules vendored Executable file → Normal file
View File

@ -4,5 +4,25 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
install:
dh_install
dh_installdocs
dh_lintian
dh_installchangelogs
dh_installman
dh_strip_nondeterminism
dh_compress
dh_fixperms
binary: install
dh_strip
dh_makeshlibs
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: build clean
build clean:

View File

@ -1 +0,0 @@
3.0 (native)