datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
576 stars 122 forks source link

Won't Build on Ubuntu 24 #394

Open jmaddington opened 3 days ago

jmaddington commented 3 days ago

This is a fresh, fully upgraded install set up only for building the dattobd package. Running make I get this error:

  CC [M]  /home/jr/datto-deb/dattobd/src/blkdev.o
/home/jr/datto-deb/dattobd/src/blkdev.c: In function ‘dattobd_lookup_bdev’:
/home/jr/datto-deb/dattobd/src/blkdev.c:29:26: error: storage size of ‘nd’ isn’t known
   29 |         struct nameidata nd;
      |                          ^~
/home/jr/datto-deb/dattobd/src/blkdev.c:33:18: error: implicit declaration of function ‘path_lookup’; did you mean ‘vfs_path_lookup’? [-Werror=implicit-function-declaration]
   33 |         if ((r = path_lookup(pathname, LOOKUP_FOLLOW, &nd)))
      |                  ^~~~~~~~~~~
      |                  vfs_path_lookup
/home/jr/datto-deb/dattobd/src/blkdev.c:36:17: error: implicit declaration of function ‘dattobd_get_nd_dentry’; did you mean ‘dattobd_get_super’? [-Werror=implicit-function-declaration]
   36 |         inode = dattobd_get_nd_dentry(nd)->d_inode;
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 dattobd_get_super
/home/jr/datto-deb/dattobd/src/blkdev.c:47:17: error: implicit declaration of function ‘open_by_devnum’ [-Werror=implicit-function-declaration]
   47 |         retbd = open_by_devnum(dev, mode);
      |                 ^~~~~~~~~~~~~~
/home/jr/datto-deb/dattobd/src/blkdev.c:47:15: warning: assignment to ‘struct block_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   47 |         retbd = open_by_devnum(dev, mode);
      |               ^
/home/jr/datto-deb/dattobd/src/blkdev.c:29:26: warning: unused variable ‘nd’ [-Wunused-variable]
   29 |         struct nameidata nd;
      |                          ^~
/home/jr/datto-deb/dattobd/src/blkdev.c: In function ‘dattobd_blkdev_put’:
/home/jr/datto-deb/dattobd/src/blkdev.c:186:16: error: implicit declaration of function ‘blkdev_put’ [-Werror=implicit-function-declaration]
  186 |         return blkdev_put(bd, FMODE_READ);
      |                ^~~~~~~~~~
/home/jr/datto-deb/dattobd/src/blkdev.c:186:16: error: ‘return’ with a value, in function returning void [-Werror=return-type]
  186 |         return blkdev_put(bd, FMODE_READ);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jr/datto-deb/dattobd/src/blkdev.c:177:6: note: declared here
  177 | void dattobd_blkdev_put(struct block_device *bd)
      |      ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:243: /home/jr/datto-deb/dattobd/src/blkdev.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.8.0-48-generic/Makefile:1925: /home/jr/datto-deb/dattobd/src] Error 2
make[2]: *** [Makefile:240: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.8.0-48-generic'
make[1]: *** [Makefile:17: default] Error 2
make[1]: Leaving directory '/home/jr/datto-deb/dattobd/src'
make: *** [Makefile:24: driver] Error 2

This matters because it doesn't look like that Datto/Kaseya has released anything for Noble yet:

apt update
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease     
Ign:3 https://cpkg.datto.com/datto-deb/public/noble noble InRelease  
Err:4 https://cpkg.datto.com/datto-deb/public/noble noble Release
  404  Not Found [IP: 8.34.181.206 443]
Hit:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
E: The repository 'https://cpkg.datto.com/datto-deb/public/noble noble Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
yito24 commented 2 days ago

Only the source code below should be able to be built on Ubuntu24. https://github.com/iamandrii/dattobd/tree/ubuntu-24.04-support

However, there is a problem with fallocate, and if the partition size is large, it will take a long time to take a snapshot. https://github.com/datto/dattobd/issues/392

I have built it so you can use it for testing. Ubuntu24_deb_packages.zip

iamandrii commented 2 days ago

Hi, we are actively working on official support of Ubuntu 24. Work in progress for now.