Skip to content
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

Add Debian Packaging for Linux #13451

Merged
merged 1 commit into from
Oct 27, 2022
Merged

Conversation

usaleem-ix
Copy link
Contributor

@usaleem-ix usaleem-ix commented May 11, 2022

Motivation and Context

Add Debian Packaging for Linux

Description

Currently, the Debian packages are generated from ALIEN that converts
RPMs to Debian packages. This commit adds native Debian packaging for
Debian based systems from ZFS on Linux.

Proper Debian style packaging can:

  1. Make things easier for developers to have an actively managed packaging for Debian based systems.
  2. Ease the testing and development of ZFS packages on Debian based systems.
  3. It may also serve as a starting point for downstream projects to base their packaging on and add their own customization.
  4. Current .deb packages do not include debug symbols and information to facilitate debugging process.

How Has This Been Tested?

Built the packages from new packaging. Installed the packages on Debian 11 and ran the test suite.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@gdevenyi
Copy link
Contributor

Can you please add a complimentary PR to https://github.com/openzfs/openzfs-docs to update the docs for debian based systems?

@behlendorf behlendorf added the Component: Packaging custom packages label May 11, 2022
@usaleem-ix
Copy link
Contributor Author

Can you please add a complimentary PR to https://github.com/openzfs/openzfs-docs to update the docs for debian based systems?

@gdevenyi Sure, will do.

@rincebrain
Copy link
Contributor

Quite a long way to just fix debuginfo generation, heh. Well done.

My only suggestion is that it might be good to acknowledge that this is a minimally modified copy of the existing Debian maintainers' packaging for OpenZFS somewhere other than debian/copyright? I don't know that it's necessary, but I had to go looking to confirm you hadn't just deleted all references to them, since you emptied the changelog, and I'd rather acknowledge people too many times than too few. :)

debian/copyright Outdated Show resolved Hide resolved
@behlendorf behlendorf requested review from pzakha and tonynguien May 12, 2022 15:47
@usaleem-ix usaleem-ix marked this pull request as ready for review May 13, 2022 15:26
@behlendorf
Copy link
Contributor

@happyaron @xnox @aerusso @cdluminate would you mind commenting on this? We'd like to (finally) add proper debian style packaging to the upstream repository to make it easier to build real packages to test with. However, I want to make sure we avoid stepping on any toes or causing unnecessary problems downstream. What's the right way for us to go about this?

@happyaron
Copy link
Contributor

One of the possible scenario I can think of is people who run a custom build of debian package would like to upgrade to a distro build at a later time, or vice versa. Some care of the package names and dependencies should be taken to make sure they are compatible with the distro ones, so that a valid upgrade path exists.

@pzakha
Copy link
Contributor

pzakha commented May 17, 2022

I'm curious, did you use existing Ubuntu ZFS packages as reference?

@cdluminate
Copy link
Contributor

Ubuntu ZFS package is pulled from Debian with slight modification. I'm continuously synchronizing Ubuntu modifications back to Debian package. But in fact most of the changes made by Ubuntu are Ubuntu-specific, like zsys support. They are not enabled on Debian.

@cdluminate
Copy link
Contributor

I currently have several concerns regarding this:
(1) is it possible to not place the debian directory in root directory? That conflicts with our workflow and will force us to modify the upstream source tarball.
(2) how do we synchronize changes?
(3) are your sure the 2.1.99 version number in debian/changelog is intended? Namely, a locally built, say 2.1.2 in fact will always suppress debian's 2.1.X release because dpkg --compare-versions 2.1.99 gt 2.1.X is always true.

@cdluminate
Copy link
Contributor

Another debian package contributor is also around: @nabijaczleweli

@nabijaczleweli
Copy link
Contributor

nabijaczleweli commented May 17, 2022

Yes, and I consider putting packaging in upstream sources idiotic at best, especially Debian-style packaging that takes over the source directory, especially especially if the downstream heavily patches this and has a particular binary package layout. If it were up to me I'd close this as severely out-of-scope; but it isn't, so I didn't post here at all.

But (a) if you put debian/ in the root then Debian will have to repack, so (b) it's best to move rpm -> contrib/rpm and put this in contrib/debian (or package/ if the Laboratory actively supports the RPM packaging), but then (c) it won't work OOB, obviously, so (d) don't inline Debian packaging.

If you want to build a Debian package off trunk for whatever reason then (a) configure for srpm and make deb-pkg or however we're spelling it via alien or (b) make disting and gbp import-orig in the salsa checkout (or apt source zfs-dkms; gbp import-dscs zfs*.dsc) like usual.

Don't @ me here again, thanks.

@usaleem-ix
Copy link
Contributor Author

I'm curious, did you use existing Ubuntu ZFS packages as reference?

@pzakha I used existing ZFS on Linux packaging for Debian, that is available here.

@usaleem-ix
Copy link
Contributor Author

usaleem-ix commented May 17, 2022

I currently have several concerns regarding this: (1) is it possible to not place the debian directory in root directory? That conflicts with our workflow and will force us to modify the upstream source tarball. (2) how do we synchronize changes? (3) are your sure the 2.1.99 version number in debian/changelog is intended? Namely, a locally built, say 2.1.2 in fact will always suppress debian's 2.1.X release because dpkg --compare-versions 2.1.99 gt 2.1.X is always true.

@cdluminate

  1. I think Debian packaging requires that debian directory should be placed on the root of the source directory. If we want to change the location of this directory and we would have to place it on root afterwards when we would want to build. Please let me know if we would want to do that.
  2. We would either be required to synchronize this as is, or we can take it from this point and continue to maintain this.
  3. Actually I had used 2.1.X as version number in debian/changelog but I changed it to 2.1.99 to make it consistent with META. If you recommend, I can change it back to 2.1.X.

@cdluminate
Copy link
Contributor

(1): True. But as said by more than one person that, once debian is imported to the root of upstream source, we (debian) are forced to modify the upstream (openzfs) tarball when importing it to our workflow (salsa.debian.org) due to file conflict. The conflict means openzfs debian directory with old files will overwrite Debian's debian directory with our (debian) own new changes.

Let me say this again: if debian is imported to the source directory of openzfs/zfs, it will cause trouble for us (Debian).

@cdluminate
Copy link
Contributor

cdluminate commented May 17, 2022

(2) I can't agree with this as a good engineering practice. Assume Debian's packaging commit A has a bug. This snapshot is also imported to openzfs upstream. Is this bug debian bug or upstream bug?
As time goes by, we debian fixed that bug and commited as B. But openzfs/zfs still use debian packaging commit A. Is this bug debian bug or upstream bug then? Debian packaging bug DO EXIST.

With alien, such packaging bugs are uniform across distribution. But if native debian packaging is imported, a bug will involve too much participants and may even be distribution-specific. Please be aware of such implication on maintenance burden for openzfs/zfs upstream. I think the upstream don't have to be distracted by such issue.

@usaleem-ix
Copy link
Contributor Author

We do agree that this is not a good approach. Moving debian to contrib and rename the packages to openzfs-* can help clarify that this is not expected to be Debian zfsonlinux package set. I am working on that front. This can hopefully make things easier for many developers to have an actively maintained packaging for Debian based systems.

For synchronizing changes, any changes downstream that seem generally useful may be contributed back to upstream since git allows to merge into a sub-directory.

@cdluminate
Copy link
Contributor

We do agree that this is not a good approach. Moving debian to contrib and rename the packages to openzfs-* can help clarify that this is not expected to be Debian zfsonlinux package set. I am working on that front. This can hopefully make things easier for many developers to have an actively maintained packaging for Debian based systems.

For synchronizing changes, any changes downstream that seem generally useful may be contributed back to upstream since git allows to merge into a sub-directory.

In that case please specify Conflicts+Replaces in debian/control to make sure locally-packaged openzfs-* packages cannot coinstall with zfs-*. We will have to add that from Debian side as well. https://www.debian.org/doc/debian-policy/ch-relationships.html

@Fabian-Gruenbichler
Copy link
Contributor

as a former occasional Debian zfs contributor, and one of the downstream maintainers of ZFS packages derived from Debian's - another option instead of fully renaming the packages is to use a version suffix but keep the names/contents broadly in sync. we do this in our downstream distros (which are using the main Debian repositories and a downstream specific one, with the latter shipping higher versions of packages also shipped by Debian). Debian backports does the inverse (using a suffix that sorts lower than the actual package, so that upgrading from N-backports to N+1 works), Ubuntu uses a similar scheme for some packages.

obviously, this requires some amount of coordination but not that much:

  • patches cherry-picked for compat/bug fix reasons in Debian obviously shouldn't be included upstream, but patches which exist to smooth building as part of the package should
  • conflicts arising from upstream changes can be fixed in upstream packaging and Debian notified (since they likely need to be included when the upstream version including these changes is included in Debian)
  • bugs in packaging fixed in Debian should be pushed upstream as well (either to the release branch only or both master and release branches, depending on where they are relevant)

IMHO the most important requirement is that there needs to be someone available for reviewing changes to the upstream/forked packaging that (really) understands how Debian packaging works, and has a good working relationship with downstream (Debian/Ubuntu) maintainers. not sure whether such a person exists or whether any of the existing downstream maintainers want/have capacity to fill that role.

dpkg-buildpackage operates on unpacked source trees, so if debian/ is not included directly in the source tree some sort of wrangling needs to be employed by the Makefile (e.g., copying the debian/ dir to the top level as part of building the packages), but that doesn't hurt that much and is probably preferable to annoying downstream packagers ;)

@usaleem-ix
Copy link
Contributor Author

We do agree that this is not a good approach. Moving debian to contrib and rename the packages to openzfs-* can help clarify that this is not expected to be Debian zfsonlinux package set. I am working on that front. This can hopefully make things easier for many developers to have an actively maintained packaging for Debian based systems.
For synchronizing changes, any changes downstream that seem generally useful may be contributed back to upstream since git allows to merge into a sub-directory.

In that case please specify Conflicts+Replaces in debian/control to make sure locally-packaged openzfs-* packages cannot coinstall with zfs-*. We will have to add that from Debian side as well. https://www.debian.org/doc/debian-policy/ch-relationships.html

Sure, will do.

@cdluminate
Copy link
Contributor

Let me add my disclaimer here: As an active downstream Debian ZFS package maintainer, I will not keep track of the status and bugs of this copy of imported debian packaging. When new commits are made on the Debian side, I'll not inform the upstream to update the code copy. As long as (1) packaging incorporation does not interfere with the downstream (Debian) workflow, (2) copyright, changelog, credit to contributors and license are intact, I'm not going to stand in the way of anyone.

@cdluminate
Copy link
Contributor

Another detail -- the debian packaging is licensed under GPL-2+ due to historical reasons: https://salsa.debian.org/zfsonlinux-team/zfs/-/blob/master/debian/copyright#L194-204 -- please be aware.

@xnox
Copy link
Contributor

xnox commented May 18, 2022

If motivation is described a bit better, different solutions and approaches can be done to make things easy to achieve the desired goal and make it easy to share packaging.

Are you planning to start providing snapshot / daily builds of openzfs for debian/ubuntu? Or is it an advanced-user / developer enhancement to allow one to self-build .debs and install them to see how things are interacting?

From Ubuntu point of view, it would be nice to use different package names, and maybe even have extra conflicts. This is because systems that are installed with zsys feature is currently trivially to irreversably make unbootable, and loose automatic snapshots and rollbacks. Thus ideally the packaging upstream should intentionally use different package names. Also in Ubuntu, zfs.ko is signed to support secureboot with enforced module signature checking. Care should be taken to ensure that packages provided here, do not allow installing dkms based zfs.ko module without signatures from an enrolled MOK key.

@usaleem-ix
Copy link
Contributor Author

If motivation is described a bit better, different solutions and approaches can be done to make things easy to achieve the desired goal and make it easy to share packaging.

Are you planning to start providing snapshot / daily builds of openzfs for debian/ubuntu? Or is it an advanced-user / developer enhancement to allow one to self-build .debs and install them to see how things are interacting?

From Ubuntu point of view, it would be nice to use different package names, and maybe even have extra conflicts. This is because systems that are installed with zsys feature is currently trivially to irreversably make unbootable, and loose automatic snapshots and rollbacks. Thus ideally the packaging upstream should intentionally use different package names. Also in Ubuntu, zfs.ko is signed to support secureboot with enforced module signature checking. Care should be taken to ensure that packages provided here, do not allow installing dkms based zfs.ko module without signatures from an enrolled MOK key.

The need for proper Debian style packaging was felt to:

(1) Make things easier for developers to have an actively managed packaging for Debian based systems.
(2) Ease the testing and development of ZFS packages on Debian based systems.
(3) It may also serve as a starting point for downstream projects to base their packaging on and add their own customization.
(4) Current .deb packages for OpenZFS do not include debug symbols and information to facilitate debugging process.

Ease of development, testing and debugging for Debian based systems is the only goal here.

@cdluminate
Copy link
Contributor

As for (4). Debian packages built using the standard process do not include debug symbols neither. Debugging information will be split into -dbgsym packages. Why not try to prevent rpm/alient from stripping binaries at the first place? But prefer adding 3000+ lines of code?

@usaleem-ix
Copy link
Contributor Author

As for (4). Debian packages built using the standard process do not include debug symbols neither. Debugging information will be split into -dbgsym packages. Why not try to prevent rpm/alient from stripping binaries at the first place? But prefer adding 3000+ lines of code?

I did take that route first. But after discussing it on the slack channel for OpenZFS, it was recommended we take this as a shorter path than trying to convince alien to emit debugging information. And that we should try to switch to a less alien based generation system.

usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 27, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags e.g. '--enable-debug' are passed to
contrib/debian/rules.

Additional packages on top  ofexisting zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 27, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags e.g. '--enable-debug' are passed to
contrib/debian/rules.

Additional packages on top  ofexisting zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 27, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags like --enable-debug are passed to
contrib/debian/rules.

Additional packages on top existing zfs packages required to build
native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be update with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 28, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags like --enable-debug are passed to
contrib/debian/rules.

Additional packages on top existing zfs packages required to build
native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be update with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 28, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags e.g. '--enable-debug' are passed to
contrib/debian/rules.

Additional packages on top  ofexisting zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Nov 29, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages on Ubuntu 20.04.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the rules
file). Initial config flags e.g. '--enable-debug' are passed to
contrib/debian/rules.

Additional packages on top  ofexisting zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with release
version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 1, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top  of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with
release version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 1, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top  of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with
release version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 1, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top  of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with
release version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 1, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top  of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with
release version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 1, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets to build native debian packages and updates the Github
workflows to build and test native packages.

Ubuntu 18.04 workflow would still build and test the Alien
converted Debian packages due to unmet build and install
dependencies.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top  of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

For release, contrib/debian/changelog should be updated with
release version.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 3, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 4, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 4, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Signed-off-by: Umer Saleem <[email protected]>
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 6, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Signed-off-by: Umer Saleem <[email protected]>
behlendorf pushed a commit that referenced this pull request Dec 14, 2022
In continuation of previous #13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes #14265
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 14, 2022
Currently, the Debian packages are generated from ALIEN that converts
RPMs to Debian packages. This commit adds native Debian packaging for
Debian based systems.

This packaging is a fork of Debian zfs-linux 2.1.6-2 release.
(source: https://salsa.debian.org/zfsonlinux-team/zfs)

Some updates have been made to keep the footprint minimal that
include removing the tests, translation files, patches directory etc.
All credits go to Debian ZFS on Linux Packaging Team.

For copyright information, please refer to contrib/debian/copyright.

scripts/debian-packaging.sh can be used to invoke the build.

Reviewed-by: Mo Zhou <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#13451
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 14, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#14265
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 17, 2022
Currently, the Debian packages are generated from ALIEN that converts
RPMs to Debian packages. This commit adds native Debian packaging for
Debian based systems.

This packaging is a fork of Debian zfs-linux 2.1.6-2 release.
(source: https://salsa.debian.org/zfsonlinux-team/zfs)

Some updates have been made to keep the footprint minimal that
include removing the tests, translation files, patches directory etc.
All credits go to Debian ZFS on Linux Packaging Team.

For copyright information, please refer to contrib/debian/copyright.

scripts/debian-packaging.sh can be used to invoke the build.

Reviewed-by: Mo Zhou <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#13451
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 17, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#14265
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Dec 17, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#14265
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 22, 2022
Currently, the Debian packages are generated from ALIEN that converts
RPMs to Debian packages. This commit adds native Debian packaging for
Debian based systems.

This packaging is a fork of Debian zfs-linux 2.1.6-2 release.
(source: https://salsa.debian.org/zfsonlinux-team/zfs)

Some updates have been made to keep the footprint minimal that
include removing the tests, translation files, patches directory etc.
All credits go to Debian ZFS on Linux Packaging Team.

For copyright information, please refer to contrib/debian/copyright.

scripts/debian-packaging.sh can be used to invoke the build.

Reviewed-by: Mo Zhou <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#13451
usaleem-ix added a commit to truenas/zfs that referenced this pull request Dec 22, 2022
In continuation of previous openzfs#13451, this commits adds native-deb*
targets for make to build native debian packages. Github workflows
are updated to build and test native Debian packages.

Native packages only build with pre-configured paths (see the
dh_auto_configure section in contrib/debian/rules.in). While
building native packages, paths should not be configured. Initial
config flags e.g. '--enable-debug' are replaced in
contrib/debian/rules.in.

Additional packages on top of existing zfs packages required to
build native packages include debhelper-compat, dh-python, dkms,
po-debconf, python3-all-dev, python3-sphinx.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#14265
@dalbani
Copy link
Contributor

dalbani commented Mar 9, 2023

I'm obviously commenting on a long closed ticket, but has this new capability been documented somewhere?
I've personally discovered it by browsing through the Git repo.
If I look at https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#configure-and-build, it says:

make deb #example for Debian/Ubuntu

I suppose it should also mention that make native-deb is available (even preferable?).
Unless I've missed something, I couldn't find a related commit in https://github.com/openzfs/openzfs-docs, as it was suggested in #13451 (comment).

@usaleem-ix
Copy link
Contributor Author

Thanks for the reminder @dalbani , I will create a PR for documenting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Packaging custom packages Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.