Skip to content

Build instructions for native Debian packages #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/Developer Resources/Building ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following dependencies should be installed to build the latest ZFS

.. code:: sh

sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev
sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx

Build Options
~~~~~~~~~~~~~
Expand Down Expand Up @@ -131,7 +131,20 @@ the ZFS and SPL source in the traditional autotools fashion.

::

make deb #example for Debian/Ubuntu
make rpm #Builds RPM packages for CentOS/Fedora
make deb #Builds RPM converted DEB packages for Debian/Ubuntu
make native-deb #Builds native DEB packages for Debian/Ubuntu

| **tip:** Native Debian packages build with pre-configured paths for
Debian and Ubuntu. It's best not to override the paths during
configure.
| **tip:** For native Debain packages, ``KVERS``, ``KSRC`` and ``KOBJ``
environment variables can be exported to specify the kernel installed
in non-default location.

.. note::
Support for native Debian packaging will be available starting from
openzfs-2.2 release.

Install
^^^^^^^
Expand Down
34 changes: 32 additions & 2 deletions docs/Developer Resources/Custom Packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Make sure that the required packages are installed:

.. code:: sh

sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging
sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx

`Get the source code <#get-the-source-code>`__.

Expand All @@ -161,19 +161,38 @@ headers, or you want to build against a different kernel, you must
specify the exact path with the *--with-linux* and *--with-linux-obj*
options.

To build RPM converted Debian packages:

.. code:: sh

$ cd zfs
$ ./configure --enable-systemd
$ make -j1 deb-utils deb-kmod
$ for file in *.deb; do sudo gdebi -q --non-interactive $file; done

Starting from openzfs-2.2 release, native Debian packages can be built
as follows:

.. code:: sh

$ cd zfs
$ ./configure
$ make native-deb-utils native-deb-kmod
$ rm ../openzfs-zfs-dkms_*.deb
$ for file in ../*.deb; do sudo gdebi -q --non-interactive $file; done

Native Debian packages build with pre-configured paths for Debian and
Ubuntu. It's best not to override the paths during configure.
``KVERS``, ``KSRC`` and ``KOBJ`` environment variables can be exported
to specify the kernel installed in non-default location.

.. _dkms-1:

DKMS
~~~~

Building deb-based DKMS and user packages can be done as follows:
Building RPM converted deb-based DKMS and user packages can be done as
follows:

.. code:: sh

Expand All @@ -183,6 +202,17 @@ Building deb-based DKMS and user packages can be done as follows:
$ make -j1 deb-utils deb-dkms
$ for file in *.deb; do sudo gdebi -q --non-interactive $file; done

Starting from openzfs-2.2 release, native deb-based DKMS and user
packages can be built as follows:

.. code:: sh

$ sudo apt-get install dkms
$ cd zfs
$ ./configure
$ make native-deb-utils
Copy link

@aamkye aamkye Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it miss native-deb-dkms at line 213?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And found out that the DKMS package does not need to be "native".

$ for file in ../*.deb; do sudo gdebi -q --non-interactive $file; done

Get the Source Code
-------------------

Expand Down