veeam / blksnap

Nonpersistent block device snapshot with block-level change-tracking capabilities.
GNU General Public License v2.0
84 stars 22 forks source link

Kernel 6.8 dkms build error #88

Closed adi1 closed 6 months ago

adi1 commented 7 months ago

Distribution

Debian 12

Architecture

amd64

Kernel version

6.8.6-3 from linux-image-liquorix-amd64

Blksnap version

6.1.0.1498 from deb [arch=amd64] https://repository.veeam.com/backup/linux/agent/dpkg/debian/public stable veeam

Bug description

Unable to build dkms module when upgrading from kernel 6.7 to 6.8. I have attached the log file make.log

Steps to reproduce

Upgrade kernel using apt upgrade, dkms module fails to build - it worked fine up to and including kernel 6.7.x.

Expected behavior

No response

Additional information

No response

Fantu commented 7 months ago

Hi, have you tried the latest blksnap version from here? The initial part of readme is understandable, or was it perhaps better before and the new need to be improved? The old was: https://github.com/veeam/blksnap/blob/857299472d890901d3e625448dacd16bab1ed619/README.md although it may not be logical, the VAL-6.1 branch has not been updated, but there is a new branch VAL-6.1.2 that contain support for kernel 6.8

adi1 commented 7 months ago

Hi Fantu, thanks for the reply.

I've tried your suggestion and succeeded, building the debian dkms package, with some notes about the README instructions:

Overall, I find the instructions better than the old ones.

lastphoenx commented 7 months ago

Maybe you @adi1 could be more precise as i am facing a similar problem (but i am on proxmox 8.2, Debian 12.5, Kernel 6.8.4-3-pve) but also tried veeam build 6.1.0.1498 and dont get understand how to install.

adi1 commented 7 months ago

Maybe you @adi1 could be more precise as i am facing a similar problem (but i am on proxmox 8.2, Debian 12.5, Kernel 6.8.4-3-pve) but also tried veeam build 6.1.0.1498 and dont get understand how to install.

hi @lastphoenx I did something along these lines:

# get 6.1.2 branch
git clone -b VAL-6.1.2 https://github.com/veeam/blksnap.git

cd blksnap/pkg/deb/
# build package, use same version number that current production veeam build depends on
./build-blksnap-dkms.sh 6.1.0.1498
sudo dpkg -i ../../build/blksnap_6.1.0.1498_all.deb

# prevent it from being upgraded or reinstalled when installing veeam
sudo apt-mark hold blksnap

Then, the veeam installation is the normal one from their apt repository, which is installed following this guide https://helpcenter.veeam.com/docs/agentforlinux/userguide/installation_process.html?ver=60.

I hope I didn't miss anything - I'm just going by my history.

It's only a temporary solution and I'll keep an eye on the releases, both veeam and blksnap. There might be nicer ways of doing it too, like using the proper version number for blksnap build, then telling apt to ignore dependency errors when installing veeam, but I didn't want to spend too much time on it.

SergeiShtepa commented 7 months ago

Hi! Yes, that's right. Support for the 6.8 kernel is implemented in the 6.1.2 branch. Our team is preparing an update for VAL with version number 6.1.2.XXX. It will include support for new kernels and new versions of some GNU/Linux distributions. This version is still in the testing phase.

lastphoenx commented 7 months ago
# prevent it from being upgraded or reinstalled when installing veeam
sudo apt-mark hold blksnap

hi @adi1 thx so much, haven't thought about "sudo apt-mark hold blksnap" thats why it always got overwritten causing the troulbe.

lastphoenx commented 7 months ago

Hi! Yes, that's right. Support for the 6.8 kernel is implemented in the 6.1.2 branch. Our team is preparing an update for VAL with version number 6.1.2.XXX. It will include support for new kernels and new versions of some GNU/Linux distributions. This version is still in the testing phase.

@SergeiShtepa sounds great! in the meanwhile i use the temporarly solution mentionned above.

lastphoenx commented 6 months ago

as i would have found it nice to hava minimal documentation, here is what I have done

please @Fantu be aware of this 2 warnings:

1) dpkg-gencontrol: warning: Depends field of package blksnap: substitution variable ${shlibs:Depends} used, but is not defined dh_md5sums dh_builddeb

2) dh: warning: Compatibility levels before 10 are deprecated (level 9 in use) (for what i have changed combat from 9 to 13! - see below in my steps)

my steps:

  1. preparation (if ever): sudo apt install g++ cmake uuid-dev libboost-program-options-dev libboost-filesystem-dev libssl-dev debhelper

  2. clone git package git clone -b VAL-6.1.2 https://github.com/veeam/blksnap.git blksnap_VAL-6.1.2

  3. change combat value: because it uses version 9 (9 is no longer recomended and out of date), 13 is recommended: https://manpages.debian.org/bookworm/debhelper/debhelper-compat-upgrade-checklist.7.en.html wie look for the files: find ./blksnap_VAL-6.1.2 -name "compat" Result: ./blksnap_VAL-6.1.2/build/pkg/debian/compat ./blksnap_VAL-6.1.2/pkg/deb/blksnap-dkms/compat ./blksnap_VAL-6.1.2/pkg/deb/blksnap/compat change all 3 files: nano into them and change value from 9 tu 13

  4. Next Step: cd ./blksnap_VAL-6.1.2/pkg/deb ./build-blksnap-dkms.sh 6.1.0.1498 Result: dpkg-buildpackage: info: source package blksnap-dkms dpkg-buildpackage: info: source version 6.1.0.1498 dpkg-buildpackage: info: source distribution stable dpkg-buildpackage: info: source changed by Veeam Software Group GmbH <veeam_team@veeam.com> dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules clean dh clean --with dkms dh_clean debian/rules build dh build --with dkms dh_update_autotools_config dh_autoreconf create-stamp debian/debhelper-build-stamp debian/rules binary dh binary --with dkms dh_testroot dh_prep dh_auto_install --destdir=debian/blksnap/ debian/rules override_dh_install make[1]: Entering directory '/root/blksnap_VAL-6.1.2/build/pkg' dh_install src/* usr/src/blksnap-6.1.0.1498/ make[1]: Leaving directory '/root/blksnap_VAL-6.1.2/build/pkg' dh_installdocs dh_installchangelogs debian/rules override_dh_dkms make[1]: Entering directory '/root/blksnap_VAL-6.1.2/build/pkg' dh_dkms -V 6.1.0.1498 -- src/dkms.conf make[1]: Leaving directory '/root/blksnap_VAL-6.1.2/build/pkg' dh_perl dh_link dh_strip_nondeterminism dh_compress dh_fixperms dh_missing dh_installdeb dh_gencontrol dpkg-gencontrol: warning: Depends field of package blksnap: substitution variable ${shlibs:Depends} used, but is not defined dh_md5sums dh_builddeb dpkg-deb: building package 'blksnap' in '../blksnap_6.1.0.1498_all.deb'. dpkg-genbuildinfo --build=binary -O../blksnap-dkms_6.1.0.1498_amd64.buildinfo dpkg-genchanges --build=binary -O../blksnap-dkms_6.1.0.1498_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included)

  5. next step /blksnap_VAL-6.1.2/pkg/deb# sudo dpkg -i ../../build/blksnap_6.1.0.1498_all.deb

  6. next step sudo apt-mark hold blksnap Result: blksnap set on hold.

  7. Check status dkms status result: blksnap/6.1.0.1498, 6.8.4-3-pve, x86_64: installed

  8. finally install veeam (without blksnap): apt-get install veeam and really not apt-get install blksnap veeam meaning without blksnap result: apt-get install veeam Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: veeam 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 0 B/39.1 kB of archives. After this operation, 1,024 kB of additional disk space will be used. Selecting previously unselected package veeam. (Reading database ... 157646 files and directories currently installed.) Preparing to unpack .../veeam_6.1.0.1498_amd64.deb ... Unpacking veeam (6.1.0.1498) ... Setting up veeam (6.1.0.1498) ... Enable veeamservice Synchronizing state of veeamservice.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable veeamservice Created symlink /etc/systemd/system/multi-user.target.wants/veeamservice.service → /lib/systemd/system/veeamservice.service. Try to stop veeamservice Start veeamservice Processing triggers for man-db (2.11.2-2) ... not upgraded might be because of held packages (see above)

  9. check if veeam service enabled (so that it starts automatically): systemctl is-enabled veeamservice if not enable it: sudo systemctl enable veeamservice

  10. check if veeam-service is allready running: sudo systemctl status veeamservice if not start it sudo systemctl start veeamservice

  11. configure veeam: veam

Fantu commented 6 months ago

About point 1 can be ignored, normally show it if there are no shared library used, so the variable remain empty.

About point 2 I know that is not acceptable for official packages (for Debian repository) but for these unofficial @SergeiShtepa wanted them to support all Debian and Ubuntu version still supported, and therefore compat 9 was needed. But now that Ubuntu 14.04 have recently reached EOL and was the only with debhelper <10 (including backports), if I remember good as Debian 8 have it at least in backports, now can be set compat 10 I don't know when I'll have time to improve packaging and test it, even if probably is enough fast as blksnap packaging is small. The most important thing to check increasing compat to 10 should be https://manpages.debian.org/unstable/debhelper/debhelper-compat-upgrade-checklist.7.en.html#v10

SergeiShtepa commented 6 months ago

Hi! Thanks for the feedback. Indeed, it makes sense to change the number 9 to 10.

SergeiShtepa commented 6 months ago

Fixed in 6.1.2.1781.

kneutron commented 3 months ago

I tried the steps from @lastphoenx and got this error, this is affecting me as well. veeam for linux 6.1.2.1781 is broken with proxmox kernel 6.8.12-1-pve

/usr/local/src/blksnap/pkg/deb # ./build-blksnap-dkms.sh 6.1.2.1781 dpkg-buildpackage: info: source package blksnap-dkms dpkg-buildpackage: info: source version 6.1.2.1781 dpkg-buildpackage: info: source distribution stable dpkg-buildpackage: info: source changed by Veeam Software Group GmbH veeam_team@veeam.com dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules clean dh clean --with dkms dh: error: unable to load addon dkms: Can't locate Debian/Debhelper/Sequence/dkms.pm in @INC (you may need to install the Debian::Debhelper::Sequence::dkms module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at (eval 13) line 1. BEGIN failed--compilation aborted at (eval 13) line 1.

make: *** [debian/rules:8: clean] Error 255 dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2

Fantu commented 3 months ago

If you follow the instruction in readme you should avoid this issue: https://github.com/veeam/blksnap/tree/VAL-6.1.2?tab=readme-ov-file#how-to-create-deb-package

sudo apt install debhelper dkms
# on debian >=12 and ubuntu >= 23.04 is needed dh-dkms, not installed anymore as dkms dep.
sudo apt install dh-dkms
cd ./pkg/deb
./build-blksnap-dkms.sh ${VERSION}

Seems you missed sudo apt install dh-dkms, Proxmox 8 is based on Debian 12.

Anyway Proxmox with components like kernel is a rolling release and "too fast" for blksnap module in many cases, Proxmox systems that are kept up to date will not be able to have good blksnap support until blksnap will be accepted and integrated upstream.