Skip to content

Commit 49cb117

Browse files
author
Umer Saleem
committed
Build instructions for native Debian packages
This commit updates the build instructions for native Debian packages. Signed-off-by: Umer Saleem <[email protected]>
1 parent a69befb commit 49cb117

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

docs/Developer Resources/Building ZFS.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The following dependencies should be installed to build the latest ZFS
5454

5555
.. code:: sh
5656
57-
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
57+
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
5858
5959
Build Options
6060
~~~~~~~~~~~~~
@@ -131,7 +131,20 @@ the ZFS and SPL source in the traditional autotools fashion.
131131

132132
::
133133

134-
make deb #example for Debian/Ubuntu
134+
make rpm #Builds RPM packages for CentOS/Fedora
135+
make deb #Builds RPM converted DEB packages for Debian/Ubuntu
136+
make native-deb #Builds native DEB packages for Debian/Ubuntu
137+
138+
| **tip:** Native Debian packages build with pre-configured paths for
139+
Debian and Ubuntu. It's best not to override the paths during
140+
configure.
141+
| **tip:** For native Debain packages, ``KVERS``, ``KSRC`` and ``KOBJ``
142+
environment variables can be exported to specify the kernel installed
143+
in non-default location.
144+
145+
.. note::
146+
Support for native Debian packaging will be available starting from
147+
openzfs-2.2 release.
135148

136149
Install
137150
^^^^^^^

docs/Developer Resources/Custom Packages.rst

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Make sure that the required packages are installed:
144144

145145
.. code:: sh
146146
147-
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
147+
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
148148
149149
`Get the source code <#get-the-source-code>`__.
150150

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

164+
To build RPM converted Debian packages:
165+
164166
.. code:: sh
165167
166168
$ cd zfs
167169
$ ./configure --enable-systemd
168170
$ make -j1 deb-utils deb-kmod
169171
$ for file in *.deb; do sudo gdebi -q --non-interactive $file; done
170172
173+
Starting from openzfs-2.2 release, native Debian packages can be built
174+
as follows:
175+
176+
.. code:: sh
177+
178+
$ cd zfs
179+
$ ./configure
180+
$ make native-deb-utils native-deb-kmod
181+
$ rm ../openzfs-zfs-dkms_*.deb
182+
$ for file in ../*.deb; do sudo gdebi -q --non-interactive $file; done
183+
184+
Native Debian packages build with pre-configured paths for Debian and
185+
Ubuntu. It's best not to override the paths during configure.
186+
``KVERS``, ``KSRC`` and ``KOBJ`` environment variables can be exported
187+
to specify the kernel installed in non-default location.
188+
171189
.. _dkms-1:
172190

173191
DKMS
174192
~~~~
175193

176-
Building deb-based DKMS and user packages can be done as follows:
194+
Building RPM converted deb-based DKMS and user packages can be done as
195+
follows:
177196

178197
.. code:: sh
179198
@@ -183,6 +202,17 @@ Building deb-based DKMS and user packages can be done as follows:
183202
$ make -j1 deb-utils deb-dkms
184203
$ for file in *.deb; do sudo gdebi -q --non-interactive $file; done
185204
205+
Starting from openzfs-2.2 release, native deb-based DKMS and user
206+
packages can be built as follows:
207+
208+
.. code:: sh
209+
210+
$ sudo apt-get install dkms
211+
$ cd zfs
212+
$ ./configure
213+
$ make native-deb-utils
214+
$ for file in ../*.deb; do sudo gdebi -q --non-interactive $file; done
215+
186216
Get the Source Code
187217
-------------------
188218

0 commit comments

Comments
 (0)