Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: dkms

dkms (2.8.1-5ubuntu1) focal; urgency=low * Merge from Debian unstable. Remaining changes: - break shim-signed -- Gianfranco Costamagna <locutusofborg@debian.org> Sat, 25 Jan 2020 15:14:40 +0100

Modifications :
  1. Download patch debian/control

    --- 2.8.1-5/debian/control 2020-01-22 11:42:37.000000000 +0000 +++ 2.8.1-5ubuntu1/debian/control 2020-01-22 15:43:24.000000000 +0000 @@ -27,7 +27,7 @@ Recommends: fakeroot, sudo, linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers, Suggests: menu, e2fsprogs -#Breaks: shim-signed (<< 1.34~) +Breaks: shim-signed (<< 1.34~) Description: Dynamic Kernel Module Support Framework DKMS is a framework designed to allow individual kernel modules to be upgraded without changing the whole kernel. It is also very easy to rebuild modules as

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: libpyzy

libpyzy (1.0.1-6ubuntu1) focal; urgency=medium * Build using python2. -- Matthias Klose <doko@ubuntu.com> Tue, 31 Mar 2020 15:32:40 +0200 libpyzy (1.0.1-6build1) focal; urgency=medium * No-change rebuild for libgcc-s1 package name change. -- Matthias Klose <doko@ubuntu.com> Sun, 22 Mar 2020 16:46:32 +0100

Modifications :
  1. Download patch debian/control

    --- 1.0.1-6/debian/control 2018-08-26 20:35:54.000000000 +0000 +++ 1.0.1-6ubuntu1/debian/control 2020-03-31 13:32:27.000000000 +0000 @@ -10,7 +10,7 @@ Build-Depends: libglib2.0-dev, libopencc-dev, libsqlite3-dev, - python, + python2, sqlite3, uuid-dev, Standards-Version: 4.2.1
  2. Download patch debian/patches/series

    --- 1.0.1-6/debian/patches/series 2018-08-26 20:29:36.000000000 +0000 +++ 1.0.1-6ubuntu1/debian/patches/series 2020-03-31 13:31:35.000000000 +0000 @@ -1,3 +1,4 @@ PINYIN_ID_VOID_should_be_char.diff enable-static.diff no-download-db.diff +python2.diff
  3. Download patch debian/patches/python2.diff

    --- 1.0.1-6/debian/patches/python2.diff 1970-01-01 00:00:00.000000000 +0000 +++ 1.0.1-6ubuntu1/debian/patches/python2.diff 2020-03-31 13:32:40.000000000 +0000 @@ -0,0 +1,40 @@ +Index: b/data/db/android/create_db.py +=================================================================== +--- a/data/db/android/create_db.py ++++ b/data/db/android/create_db.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + from pydict import * + from id import * + from valid_hanzi import * +Index: b/scripts/addheader.py +=================================================================== +--- a/scripts/addheader.py ++++ b/scripts/addheader.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + import sys + + def add_header(name, header): +Index: b/scripts/update-simptrad-table.py +=================================================================== +--- a/scripts/update-simptrad-table.py ++++ b/scripts/update-simptrad-table.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + import sys + sys.path.append(".") + +Index: b/tools/googlecode_upload.py +=================================================================== +--- a/tools/googlecode_upload.py ++++ b/tools/googlecode_upload.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # + # Copyright 2006, 2007 Google Inc. All Rights Reserved. + # Author: danderson@google.com (David Anderson)

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: network-manager

network-manager (1.22.10-1ubuntu3) groovy; urgency=medium * No-change rebuild to bump Groovy version number. -- Dan Streetman <ddstreet@canonical.com> Thu, 30 Apr 2020 07:47:49 -0400 network-manager (1.22.10-1ubuntu2) focal; urgency=medium * d/t/killswitches-no-urfkill - Call udevadm settle before nmcli radio wifi To make sure that change is updated. (LP: #1733321) -- Seyeong Kim <seyeong.kim@canonical.com> Mon, 20 Apr 2020 22:40:44 -0700 network-manager (1.22.10-1ubuntu1) focal; urgency=medium * Update to the current stable version, merging from Debian -- Sebastien Bacher <seb128@ubuntu.com> Fri, 13 Mar 2020 16:27:29 +0100

Modifications :
  1. Download patch debian/network-manager.install

    --- 1.22.10-1/debian/network-manager.install 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/network-manager.install 2020-04-29 16:43:35.000000000 +0000 @@ -23,5 +23,7 @@ lib/systemd/system/NetworkManager-dispat lib/systemd/system/NetworkManager-wait-online.service debian/NetworkManager.conf etc/NetworkManager/ debian/org.freedesktop.NetworkManager.pkla var/lib/polkit-1/localauthority/10-vendor.d/ +debian/10-*.conf usr/lib/NetworkManager/conf.d/ debian/60-network-manager.rules usr/share/polkit-1/rules.d/ debian/01-ifupdown etc/NetworkManager/dispatcher.d/ +debian/source_network-manager.py /usr/share/apport/package-hooks/
  2. Download patch debian/default-wifi-powersave-on.conf

    --- 1.22.10-1/debian/default-wifi-powersave-on.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/default-wifi-powersave-on.conf 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,2 @@ +[connection] +wifi.powersave = 3
  3. Download patch debian/network-manager.links
  4. Download patch debian/tests/control

    --- 1.22.10-1/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/tests/control 2020-04-29 16:43:35.000000000 +0000 @@ -0,0 +1,15 @@ +Tests: wpa-dhclient +Depends: python3, hostapd, dnsmasq-base, wpasupplicant, isc-dhcp-client, iw +Restrictions: needs-root allow-stderr isolation-machine skippable + +Tests: nm.py +Depends: python3, dnsmasq-base, isc-dhcp-client, gir1.2-nm-1.0, network-manager, hostapd, iw, python3-dbusmock, python3-netaddr +Restrictions: needs-root isolation-machine skippable + +Tests: killswitches-no-urfkill +Depends: network-manager, build-essential, linux-headers-generic [!i386], rfkill +Restrictions: needs-root allow-stderr isolation-machine skippable + +Tests: urfkill-integration +Depends: network-manager, build-essential, linux-headers-generic [!i386], rfkill, urfkill +Restrictions: needs-root allow-stderr isolation-machine skippable
  5. Download patch debian/tests/network_test_base.py
  6. Download patch debian/rules

    --- 1.22.10-1/debian/rules 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/rules 2020-04-29 16:43:35.000000000 +0000 @@ -2,12 +2,20 @@ include /usr/share/dpkg/architecture.mk +# Without that the tests fail, cannot register existing type 'NMAgentManagerError' +LDFLAGS=$(shell echo $$LDFLAGS | sed -e 's/-Wl,-Bsymbolic-functions//') +export LDFLAGS + +ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes) $(DEB_HOST_ARCH), yes i386) + BUILD_PACKAGES += -Nnetwork-manager +endif + export PYTHON=/usr/bin/python3 PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir) %: - dh $@ --with gir,ppp + dh $@ --with gir,ppp $(BUILD_PACKAGES) autoreconf: gtkdocize --copy @@ -23,7 +31,7 @@ override_dh_auto_configure: --runstatedir=/run \ --with-pppd-plugin-dir=$(PPPD_PLUGIN_DIR) \ --with-pppd=/usr/sbin/pppd \ - --with-resolvconf=/sbin/resolvconf \ + --with-resolvconf=no \ --with-dhclient=/sbin/dhclient \ --with-iptables=/sbin/iptables \ --with-dnsmasq=/usr/sbin/dnsmasq \ @@ -38,6 +46,7 @@ override_dh_auto_configure: --with-nmtui \ --with-nmcli \ --with-selinux \ + --with-tests \ --with-libaudit \ --with-iwd \ --without-dhcpcanon \ @@ -59,11 +68,19 @@ override_dh_auto_configure: override_dh_install: find debian/tmp -name '*.la' -print -delete + rm -vf $(CURDIR)/debian/tmp/etc/init.d/NetworkManager dh_install override_dh_missing: dh_missing --fail-missing + # copy powersave configuration + mkdir -p debian/network-manager/etc/NetworkManager/conf.d + cp debian/default-wifi-powersave-on.conf debian/network-manager/etc/NetworkManager/conf.d/ + +override_dh_installinit: + dh_installinit --noscripts + override_dh_makeshlibs: dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/ -X/usr/lib/pppd/ @@ -73,3 +90,8 @@ override_dh_installsystemd: override_dh_ppp: dh_ppp --breaks + +override_dh_auto_test: +ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS))) + make check || ( find . -name test-suite.log -exec cat {} \;; exit 1; ) +endif
  7. Download patch debian/tests/killswitches-no-urfkill

    --- 1.22.10-1/debian/tests/killswitches-no-urfkill 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/tests/killswitches-no-urfkill 2020-04-30 11:47:44.000000000 +0000 @@ -0,0 +1,67 @@ +#!/bin/sh + +if dpkg --print-architecture | grep s390; then + echo "Skipping rfkill tests on s390 (LP: #1855009)" + exit 77 +fi + +if dpkg --print-architecture | grep i386; then + echo "Skipping rfkill tests on i386 (LP: #1855183)" + exit 77 +fi + +set -e + +make -f debian/tests/Makefile fake-rfkill +# poor man's dependency resolver +DEPS=$(modinfo debian/tests/fake-rfkill.ko | sed -n '/depends:/ {s/^.*://; s/[[:space:]]*$//; p}') +[ -z "$DEPS" ] || modprobe "$DEPS" +insmod debian/tests/fake-rfkill.ko + +fake_id=$(rfkill list | grep fake | awk -F: '{ print $1; }') + +service network-manager start +sleep 30 + +# test blocking the device +rfkill block $fake_id +if ! rfkill list $fake_id | grep 'Soft' | awk '{ print $3; }' | grep -qc yes; then + echo "ERROR: could not block fake device" + rmmod fake-rfkill || true + exit 1 +fi + +# The systemd-rfkill service starts up whenever rfkill changes state, so on a +# 1-cpu system that might delay the event change from reaching nm before the +# check below, causing this test to fail. The settle added here delays the +# nmcli check until after the rfkill uevent has definitely been processed. +udevadm settle + +if ! LC_MESSAGES=C nmcli radio wifi | grep -qc disabled; then + echo "ERROR: NM could not track device state." + rmmod fake-rfkill || true + exit 1 +fi + +# test unblocking the device +rfkill unblock $fake_id +if ! rfkill list $fake_id | grep 'Soft' | awk '{ print $3; }' | grep -qc no; then + echo "ERROR: could not unblock fake device" + rmmod fake-rfkill || true + exit 1 +fi + +# same reason as above, however since systemd-rfkill stays running for 30 secs or so +# it's unlikely that it would start up again here, but it's still safer to call settle +udevadm settle + +if ! LC_MESSAGES=C nmcli radio wifi | grep -qc enabled; then + echo "ERROR: NM could not track device state to enabled." + rmmod fake-rfkill || true + exit 1 +fi + +rmmod fake-rfkill +make -f debian/tests/Makefile clean-rfkill + +echo OK
  8. Download patch debian/control

    --- 1.22.10-1/debian/control 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/control 2020-04-29 16:43:35.000000000 +0000 @@ -1,7 +1,8 @@ Source: network-manager Section: net Priority: optional -Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org> Uploaders: Michael Biebl <biebl@debian.org>, Sjoerd Simons <sjoerd@debian.org>, Aron Xu <aron@debian.org> @@ -41,8 +42,10 @@ Build-Depends: debhelper-compat (= 12), python3-dbus <!nocheck> Standards-Version: 4.5.0 Rules-Requires-Root: no -Vcs-Git: https://salsa.debian.org/utopia-team/network-manager.git -Vcs-Browser: https://salsa.debian.org/utopia-team/network-manager +XS-Debian-Vcs-Git: https://salsa.debian.org/utopia-team/network-manager.git +XS-Debian-Vcs-Browser: https://salsa.debian.org/utopia-team/network-manager +Vcs-Git: https://git.launchpad.net/network-manager +Vcs-Browser: https://git.launchpad.net/network-manager Homepage: https://wiki.gnome.org/Projects/NetworkManager Package: network-manager @@ -61,8 +64,10 @@ Recommends: ppp, dnsmasq-base, iptables, modemmanager, + network-manager-pptp, crda, -Suggests: libteam-utils, +Suggests: avahi-autoipd, + libteam-utils, isc-dhcp-client, Breaks: ${misc:Breaks} Description: network management framework (daemon and userspace tools) @@ -76,6 +81,8 @@ Description: network management framewor interact with NetworkManager. . Optional dependencies: + * avahi-autoipd: Used for IPv4LL, a protocol for automatic Link-Local IP + address configuration. * ppp: Required for establishing dial-up connections (e.g. via GSM). * dnsmasq-base/iptables: Required for creating Ad-hoc connections and connection sharing. @@ -165,3 +172,21 @@ Description: NetworkManager configuratio No user data is transmitted in the connectivity checks, but merely contacting the Debian connectivity check servers reveals that the user is running a Debian(-based) operating system with NetworkManager. + +Package: network-manager-config-connectivity-ubuntu +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, + network-manager (>= ${source:Version}) +Description: NetworkManager configuration to enable connectivity checking + This package contains a configuration file which enables NetworkManager's + connectivity checking functionality. + . + NetworkManager will try to connect to an Ubuntu server to determine the + connection status. + . + This is particularly useful for captive portal detection. + . + No user data is transmitted in the connectivity checks, but merely contacting + the Ubuntu connectivity check servers reveals that the user is running an + Ubuntu(-based) operating system with NetworkManager.
  9. Download patch debian/tests/urfkill-integration

    --- 1.22.10-1/debian/tests/urfkill-integration 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/tests/urfkill-integration 2020-04-29 16:43:35.000000000 +0000 @@ -0,0 +1,108 @@ +#!/bin/sh + +if dpkg --print-architecture | grep s390; then + echo "Skipping rfkill tests on s390 (LP: #1855009)" + exit 77 +fi + +if dpkg --print-architecture | grep i386; then + echo "Skipping rfkill tests on i386 (LP: #1855183)" + exit 77 +fi + +set -e + +echo "+++ Building / adding fake-rfkill.ko" +make -f debian/tests/Makefile fake-rfkill +# poor man's dependency resolver +DEPS=$(modinfo debian/tests/fake-rfkill.ko | sed -n '/depends:/ {s/^.*://; s/[[:space:]]*$//; p}') +[ -z "$DEPS" ] || modprobe "$DEPS" +insmod debian/tests/fake-rfkill.ko + +fake_id=$(rfkill list | grep fake | awk -F: '{ print $1; }') +echo "+++ fake-rfkill.ko is device $fake_id" +echo + + +echo "--- Testing killswitch bringup to match NM state: when URFKILL doesn't run" +echo "+++ stopping urfkill" +# ignore failure, only here, because urfkill probably isn't running yet. +service urfkill stop || true +echo "+++ unblocking device $fake_id" +rfkill unblock $fake_id +echo "+++ stopping network-manager" +service network-manager stop || true +echo "+++ blocking device $fake_id" +rfkill block $fake_id +echo "+++ starting network-manager" +service network-manager start + +echo "+++ Waiting for the devices to settle" +sleep 30 + +echo -n "=== NetworkManager state should now be \"enabled\": " +LC_MESSAGES=C nmcli radio wifi +LC_MESSAGES=C nmcli radio wifi | grep -qc enabled +echo + +echo -n "=== NM saved state: " +grep WirelessEnabled /var/lib/NetworkManager/NetworkManager.state +grep -qc WirelessEnabled=true /var/lib/NetworkManager/NetworkManager.state +echo +echo + +echo "--- Testing killswitch bringup when URFKILL is running: follow URfkill signals" +echo "+++ starting urfkill" +service urfkill start +sleep 15 +echo "+++ blocking device $fake_id" +rfkill block $fake_id +rfkill list + +echo "+++ Waiting for the devices to settle" +sleep 30 + +echo -n "=== NetworkManager state should now be \"disabled\": " +LC_MESSAGES=C nmcli radio wifi +LC_MESSAGES=C nmcli radio wifi | grep -qc disabled +echo + +echo -n "=== NM saved state: " +grep WirelessEnabled /var/lib/NetworkManager/NetworkManager.state +#grep -qc WirelessEnabled=false /var/lib/NetworkManager/NetworkManager.state +echo +echo + +echo "+++ Asking urfkill to unblock device $fake_id" +dbus-send --print-reply --system --dest=org.freedesktop.URfkill /org/freedesktop/URfkill org.freedesktop.URfkill.BlockIdx uint32:$fake_id boolean:false +sleep 5 +echo -n "=== NetworkManager state should now be \"enabled\": " +LC_MESSAGES=C nmcli radio wifi +LC_MESSAGES=C nmcli radio wifi | grep -qc enabled +echo + +echo "+++ Asking urfkill to block device $fake_id again" +dbus-send --print-reply --system --dest=org.freedesktop.URfkill /org/freedesktop/URfkill org.freedesktop.URfkill.BlockIdx uint32:$fake_id boolean:true +sleep 5 +echo -n "=== NetworkManager state should now be \"disabled\": " +LC_MESSAGES=C nmcli radio wifi +LC_MESSAGES=C nmcli radio wifi | grep -qc disabled +echo +echo + +echo "--- Removing fake-rfkill, aggregate state should get back to enabled" +rmmod fake-rfkill +sleep 5 +echo -n "=== Checking that the fake device $fake_id has disappeared: " +rfkill list | ( ! grep -qc fake || exit 1 ) && echo yes || echo no + +echo -n "=== NetworkManager state should now be \"enabled\": " +LC_MESSAGES=C nmcli radio wifi +LC_MESSAGES=C nmcli radio wifi | grep -qc enabled +echo + +#cleanup +make -f debian/tests/Makefile clean-rfkill + +echo OK +exit 0
  10. Download patch debian/source_network-manager.py

    --- 1.22.10-1/debian/source_network-manager.py 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/source_network-manager.py 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,82 @@ +'''Apport package hook for Network Manager + +(c) 2008 Canonical Ltd. +Contributors: +Matt Zimmerman <mdz@canonical.com> +Martin Pitt <martin.pitt@canonical.com> +Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Thomas Bechtold <thomasbechtold@jpberlin.de> + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. See http://www.gnu.org/copyleft/gpl.html for +the full text of the license. +''' + +import os +import subprocess +from apport.hookutils import * + +def _network_interfaces(): + interfaces = [] + output = command_output(['ls', '-1', '/sys/class/net']) + for device in output.split('\n'): + interfaces.append(device) + + return interfaces + +def _device_details(device): + details = command_output(['udevadm', 'info', '--query=all', '--path', '/sys/class/net/%s' % device]) + + # add the only extra thing of use from hal we don't get from udev. + details = details + "\nX: INTERFACE_MAC=" + details = details + command_output(['cat', '/sys/class/net/%s/address' % device]) + return details + +def add_info(report, ui=None): + attach_network(report) + attach_wifi(report) + + #this is the old config file (still read by NM if available) + attach_file_if_exists(report, '/etc/NetworkManager/nm-system-settings.conf', 'nm-system-settings.conf') + + #the new default config file + attach_file_if_exists(report, '/etc/NetworkManager/NetworkManager.conf', 'NetworkManager.conf') + + # attach NetworkManager.state: it gives us good hints in rfkill-related bugs. + attach_file_if_exists(report, '/var/lib/NetworkManager/NetworkManager.state', 'NetworkManager.state') + + for interface in _network_interfaces(): + key = 'NetDevice.%s' % interface + report[key] = _device_details(interface) + + interesting_modules = { 'ndiswrapper' : 'driver-ndiswrapper', + 'ath_hal' : 'driver-madwifi', + 'b44' : 'driver-b44' } + interesting_modules_loaded = [] + tags = [] + for line in open('/proc/modules'): + module = line.split()[0] + if module in interesting_modules: + tags.append(interesting_modules[module]) + interesting_modules_loaded.append(module) + + if interesting_modules_loaded: + report['InterestingModules'] = ' '.join(interesting_modules_loaded) + report.setdefault('Tags', '') + report['Tags'] += ' ' + ' '.join(tags) + + #add output of nmcli + report['nmcli-nm'] = command_output(['nmcli', '-f', 'all', 'gen']) + report['nmcli-dev'] = command_output(['nmcli', '-f', 'all', 'dev']) + report['nmcli-con'] = command_output(['nmcli', '-f', 'all', 'con']) + + +## Only for debugging ## +if __name__ == '__main__': + report = {} + report['CrashDB'] = 'ubuntu' + add_info(report, None) + for key in report: + print('%s: %s' % (key, report[key]))
  11. Download patch debian/tests/wpa-dhclient
  12. Download patch debian/patches/Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch

    --- 1.22.10-1/debian/patches/Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/patches/Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,35 @@ +From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Date: Thu, 12 May 2016 22:25:32 +0800 +Subject: Provide access to some of NM's interfaces to whoopsie. + +Whoopsie is the crash database reporting daemon. It needs access to some of +the information NM keeps about devices to avoid sending data over the network +when connected to 3G or other systems that are potentially billable. +--- + src/org.freedesktop.NetworkManager.conf | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/org.freedesktop.NetworkManager.conf b/src/org.freedesktop.NetworkManager.conf +index 6be1feb..3dd2350 100644 +--- a/src/org.freedesktop.NetworkManager.conf ++++ b/src/org.freedesktop.NetworkManager.conf +@@ -36,6 +36,19 @@ + <allow own="org.freedesktop.NetworkManager.dnsmasq"/> + <allow send_destination="org.freedesktop.NetworkManager.dnsmasq"/> + </policy> ++ <policy user="whoopsie"> ++ <allow send_destination="org.freedesktop.NetworkManager"/> ++ <allow send_destination="org.freedesktop.NetworkManager" ++ send_interface="org.freedesktop.DBus.Introspectable"/> ++ <allow send_destination="org.freedesktop.NetworkManager" ++ send_interface="org.freedesktop.DBus.Properties"/> ++ <allow send_destination="org.freedesktop.NetworkManager" ++ send_interface="org.freedesktop.NetworkManager"/> ++ <allow send_destination="org.freedesktop.NetworkManager" ++ send_interface="org.freedesktop.NetworkManager.Connection.Active"/> ++ <allow send_destination="org.freedesktop.NetworkManager" ++ send_interface="org.freedesktop.NetworkManager.Device"/> ++ </policy> + <policy context="default"> + <deny own="org.freedesktop.NetworkManager"/> +
  13. Download patch debian/tests/nm.py
  14. Download patch debian/network-manager-config-connectivity-ubuntu.install

    --- 1.22.10-1/debian/network-manager-config-connectivity-ubuntu.install 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/network-manager-config-connectivity-ubuntu.install 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1 @@ +debian/20-connectivity-ubuntu.conf usr/lib/NetworkManager/conf.d/
  15. Download patch debian/network-manager.postinst

    --- 1.22.10-1/debian/network-manager.postinst 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/network-manager.postinst 2020-04-29 16:43:35.000000000 +0000 @@ -20,9 +20,16 @@ set -e case "$1" in configure) - # Create netdev group. Members of group netdev get access to the PolicyKit action - # org.freedesktop.NetworkManager.settings.modify.system without prior authentication - addgroup --quiet --system netdev + # request a reboot (NM tears down interfaces on restart + # which is not the way we want to go) + [ -x /usr/share/update-notifier/notify-reboot-required ] && \ + /usr/share/update-notifier/notify-reboot-required + + update-rc.d -f NetworkManager remove >/dev/null + + if [ -x "/etc/init.d/dbus" ]; then + invoke-rc.d dbus force-reload || true + fi # This directory can contain sensitive data and should not be world-readable chmod 0700 /var/lib/NetworkManager @@ -48,6 +55,15 @@ case "$1" in fi fi + if dpkg --compare-versions "$2" le-nl "9999"; then + mkdir -p /etc/NetworkManager/conf.d || true + # for old versions, override the global config with a null config, + # but only if the netplan config has not been modified by an user. + if find /etc/netplan -name "*.yaml" | wc -l | grep -qc 0; then + touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf + fi + fi + if dpkg --compare-versions "$2" lt-nl "1.20.4-2"; then if [ -f /var/lib/NetworkManager/secret_key ]; then chmod 0600 /var/lib/NetworkManager/secret_key
  16. Download patch debian/NetworkManager.conf

    --- 1.22.10-1/debian/NetworkManager.conf 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/NetworkManager.conf 2019-12-06 14:21:02.000000000 +0000 @@ -3,3 +3,6 @@ plugins=ifupdown,keyfile [ifupdown] managed=false + +[device] +wifi.scan-rand-mac-address=no
  17. Download patch debian/patches/gitlab_connection_ready.patch

    --- 1.22.10-1/debian/patches/gitlab_connection_ready.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/patches/gitlab_connection_ready.patch 2020-04-29 16:43:35.000000000 +0000 @@ -0,0 +1,115 @@ + +From 1043189ef6bd12475304bbe87f4f8daaf67402ec Mon Sep 17 00:00:00 2001 +From: Thomas Haller <thaller@redhat.com> +Date: Fri, 31 Jan 2020 00:54:46 +0100 +Subject: [PATCH 2/2] libnm: hide NMActiveConnection until NMRemoteConnection + is ready + +Generally, libnm's NMClient cache only wants to expose NMObjects that +are fully initalized. Most objects don't require anything special, +except NMRemoteConnection waits for the GetSettings() call to complete. + +NMObjects reference each other. For example, NMActiveConnection +references NMDevice and NMRemoteConnection. There is a desire that an +object is only ready, if the objects that it references are ready too. +In practice that is not done, because usually every objects references +other objects, that means all objects would be declared as non-ready +until they are all ready at the same time. Only NMRemoteConnection +implements is_ready() function. All other objects are declared ready +as they appear. This is also done this way, to cope with cycles where +objects reference each other. In practice, such cycles should not be +exposed by NetworkManager. However, libnm should be robust against that. + +This has the undesired effect that when you call AddAndActivate(), then +the NMActiveConnection might already be ready while its +NMRemoteConnection isn't. That means, ac.get_connection() will +initially return NULL, until the remote connection becomes ready. +Also add a special handling that NMActiveConnection waits for their +NMRemoteConnection to be ready, before being ready itself. +--- + libnm/nm-active-connection.c | 29 +++++++++++++++++++++++++++++ + libnm/nm-client.c | 8 ++++++++ + libnm/nm-libnm-utils.h | 2 ++ + 3 files changed, 39 insertions(+) + +diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c +index aa8504e61d..ade2edbe73 100644 +--- a/libnm/nm-active-connection.c ++++ b/libnm/nm-active-connection.c +@@ -425,6 +425,33 @@ _nm_active_connection_state_changed_commit (NMActiveConnection *self, + _notify_event_state_changed, + g_object_ref (self)); + } ++/*****************************************************************************/ ++ ++static gboolean ++is_ready (NMObject *nmobj) ++{ ++ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (nmobj); ++ ++ /* Usually, we don't want to expose our NMObject instances until they are fully initialized. ++ * For NMRemoteSetting this means to wait until GetSettings() returns. ++ * ++ * Note that most object types reference each other (directly or indirectly). E.g. the ++ * NMActiveConnection refers to the NMRemoteConnection and the NMDevice instance. So, ++ * we don't want to hide them too long, otherwise basically the entire set of objects ++ * will be hidden until they are all initialized. So, usually, when a NMObject references ++ * objects that are not yet initialized, that reference will just be NULL but the object ++ * will be considered ready already. ++ * ++ * For NMActiveConnection referencing a NMRemoteConnection don't do that. Here we wait for the ++ * NMRemoteConnection to be ready as well. This is somewhat arbitrary special casing, but ++ * the effect is that when nm_client_add_and_activate*() returns, the NMActiveConnection already ++ * references a initialized NMRemoteConnection. ++ */ ++ if (!nml_dbus_property_o_is_ready_fully (&priv->property_o[PROPERTY_O_IDX_CONNECTION])) ++ return FALSE; ++ ++ return NM_OBJECT_CLASS (nm_active_connection_parent_class)->is_ready (nmobj); ++} + + /*****************************************************************************/ + +@@ -550,6 +577,8 @@ nm_active_connection_class_init (NMActiveConnectionClass *klass) + object_class->get_property = get_property; + object_class->finalize = finalize; + ++ nm_object_class->is_ready = is_ready; ++ + _NM_OBJECT_CLASS_INIT_PRIV_PTR_INDIRECT (nm_object_class, NMActiveConnection); + + _NM_OBJECT_CLASS_INIT_PROPERTY_O_FIELDS_N (nm_object_class, NMActiveConnectionPrivate, property_o); +diff --git a/libnm/nm-client.c b/libnm/nm-client.c +index 154ad1c992..a93a81c353 100644 +--- a/libnm/nm-client.c ++++ b/libnm/nm-client.c +@@ -1594,6 +1594,14 @@ nml_dbus_property_o_is_ready (const NMLDBusPropertyO *pr_o) + || !pr_o->owner_dbobj; + } + ++gboolean ++nml_dbus_property_o_is_ready_fully (const NMLDBusPropertyO *pr_o) ++{ ++ return !pr_o->owner_dbobj ++ || !pr_o->obj_watcher ++ || pr_o->nmobj; ++} ++ + static void + nml_dbus_property_o_notify_changed (NMLDBusPropertyO *pr_o, + NMClient *self) +diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h +index f2affc5f62..28c9c1164c 100644 +--- a/libnm/nm-libnm-utils.h ++++ b/libnm/nm-libnm-utils.h +@@ -260,6 +260,8 @@ gpointer nml_dbus_property_o_get_obj (NMLDBusPropertyO *pr_o); + + gboolean nml_dbus_property_o_is_ready (const NMLDBusPropertyO *pr_o); + ++gboolean nml_dbus_property_o_is_ready_fully (const NMLDBusPropertyO *pr_o); ++ + void nml_dbus_property_o_clear (NMLDBusPropertyO *pr_o, + NMClient *client); + +-- +2.24.1
  18. Download patch debian/patches/Update-dnsmasq-parameters.patch

    --- 1.22.10-1/debian/patches/Update-dnsmasq-parameters.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/patches/Update-dnsmasq-parameters.patch 2020-04-29 16:43:35.000000000 +0000 @@ -0,0 +1,55 @@ +From: =?utf-8?q?St=C3=A9phane_Graber?= <stephane.graber@canonical.com> +Date: Thu, 12 May 2016 22:44:06 +0800 +Subject: Update dnsmasq parameters + +Disable caching since it's a potential security issue (local dns cache poisoning). + +See also: https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-dns-resolving +--- + src/dns/nm-dns-dnsmasq.c | 4 ++-- + src/dns/nm-dns-manager.c | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +Index: network-manager-1.22.2/src/dns/nm-dns-dnsmasq.c +=================================================================== +--- network-manager-1.22.2.orig/src/dns/nm-dns-dnsmasq.c ++++ network-manager-1.22.2/src/dns/nm-dns-dnsmasq.c +@@ -494,8 +494,8 @@ _gl_pid_spawn_next_step (void) + argv[argv_idx++] = "--no-hosts"; /* don't use /etc/hosts to resolve */ + argv[argv_idx++] = "--bind-interfaces"; + argv[argv_idx++] = "--pid-file=" PIDFILE; +- argv[argv_idx++] = "--listen-address=127.0.0.1"; /* Should work for both 4 and 6 */ +- argv[argv_idx++] = "--cache-size=400"; ++ argv[argv_idx++] = "--listen-address=127.0.1.1"; /* Should work for both 4 and 6 */ ++ argv[argv_idx++] = "--cache-size=0"; + argv[argv_idx++] = "--clear-on-reload"; /* clear cache when dns server changes */ + argv[argv_idx++] = "--conf-file=/dev/null"; /* avoid loading /etc/dnsmasq.conf */ + argv[argv_idx++] = "--proxy-dnssec"; /* Allow DNSSEC to pass through */ +Index: network-manager-1.22.2/src/dns/nm-dns-manager.c +=================================================================== +--- network-manager-1.22.2.orig/src/dns/nm-dns-manager.c ++++ network-manager-1.22.2/src/dns/nm-dns-manager.c +@@ -1469,12 +1469,12 @@ update_dns (NMDnsManager *self, + NM_CAST_STRV_CC (nameservers), + NM_CAST_STRV_CC (options)); + +- /* If caching was successful, we only send 127.0.0.1 to /etc/resolv.conf ++ /* If caching was successful, we only send 127.0.1.1 to /etc/resolv.conf + * to ensure that the glibc resolver doesn't try to round-robin nameservers, + * but only uses the local caching nameserver. + */ + if (caching) { +- const char *lladdr = "127.0.0.1"; ++ const char *lladdr = "127.0.1.1"; + + if (NM_IS_DNS_SYSTEMD_RESOLVED (priv->plugin)) { + /* systemd-resolved uses a different link-local address */ +@@ -1757,7 +1757,7 @@ nm_dns_manager_stop (NMDnsManager *self) + _LOGT ("stopping..."); + + /* If we're quitting, leave a valid resolv.conf in place, not one +- * pointing to 127.0.0.1 if dnsmasq was active. But if we haven't ++ * pointing to 127.0.1.1 if dnsmasq was active. But if we haven't + * done any DNS updates yet, there's no reason to touch resolv.conf + * on shutdown. + */
  19. Download patch debian/patches/series

    --- 1.22.10-1/debian/patches/series 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/patches/series 2020-04-29 16:43:35.000000000 +0000 @@ -1,2 +1,7 @@ Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch + +# Ubuntu patches +Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch +Update-dnsmasq-parameters.patch +
  20. Download patch debian/network-manager-config-connectivity-ubuntu.postinst

    --- 1.22.10-1/debian/network-manager-config-connectivity-ubuntu.postinst 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/network-manager-config-connectivity-ubuntu.postinst 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = configure ]; then + invoke-rc.d network-manager force-reload || true +fi + +#DEBHELPER#
  21. Download patch debian/tests/fake-rfkill.c

    --- 1.22.10-1/debian/tests/fake-rfkill.c 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/tests/fake-rfkill.c 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,51 @@ +#include <linux/rfkill.h> +#include <linux/module.h> + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); + +static struct rfkill *rfk; + +static void test_poll(struct rfkill *rfkill, void *data) +{ + printk(KERN_DEBUG "poll test rfkill\n"); +} + +static void test_query(struct rfkill *rfkill, void *data) +{ + printk(KERN_DEBUG "query test rfkill\n"); +} + +static int test_set_block(void *data, bool blocked) +{ + printk(KERN_DEBUG "set test rfkill (%s)\n", + blocked ? "blocked" : "active"); + return 0; +} + +static struct rfkill_ops ops = { + .poll = test_poll, + .query = test_query, + .set_block = test_set_block, +}; + +int mod_init(void) +{ + int err; + + rfk = rfkill_alloc("fake", NULL, RFKILL_TYPE_WLAN, &ops, NULL); + if (!rfk) + return -ENOMEM; + err = rfkill_register(rfk); + if (err) + rfkill_destroy(rfk); + return err; +} +module_init(mod_init); + +void mod_exit(void) +{ + rfkill_unregister(rfk); + rfkill_destroy(rfk); +} +module_exit(mod_exit);
  22. Download patch debian/20-connectivity-ubuntu.conf

    --- 1.22.10-1/debian/20-connectivity-ubuntu.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/20-connectivity-ubuntu.conf 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,2 @@ +[connectivity] +uri=http://connectivity-check.ubuntu.com/
  23. Download patch debian/10-dns-resolved.conf

    --- 1.22.10-1/debian/10-dns-resolved.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/10-dns-resolved.conf 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,5 @@ +[main] +# We need to specify "dns=systemd-resolved" as for the time being our +# /etc/resolv.conf points to resolvconf's generated file instead of +# systemd-resolved's, so the auto-detection does not work. +dns=systemd-resolved
  24. Download patch debian/10-globally-managed-devices.conf

    --- 1.22.10-1/debian/10-globally-managed-devices.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/10-globally-managed-devices.conf 2020-04-29 16:43:35.000000000 +0000 @@ -0,0 +1,2 @@ +[keyfile] +unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma
  25. Download patch debian/patches/Import-some-missing-WoWLAN-patches.patch
  26. Download patch debian/patches/dns-manager-don-t-merge-split-DNS-search-domains.patch

    --- 1.22.10-1/debian/patches/dns-manager-don-t-merge-split-DNS-search-domains.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/patches/dns-manager-don-t-merge-split-DNS-search-domains.patch 2019-12-06 14:21:02.000000000 +0000 @@ -0,0 +1,88 @@ +From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Date: Wed, 15 Jun 2016 16:07:27 +0300 +Subject: dns-manager: don't merge split-DNS search domains + +Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1592721 +--- + src/dns/nm-dns-manager.c | 36 ++++++++++++++++++++---------------- + 1 file changed, 20 insertions(+), 16 deletions(-) + +Index: b/src/dns/nm-dns-manager.c +=================================================================== +--- a/src/dns/nm-dns-manager.c ++++ b/src/dns/nm-dns-manager.c +@@ -295,7 +295,7 @@ + } + + static void +-merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) ++merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src, gboolean never_default) + { + guint32 num, num_domains, num_searches, i; + +@@ -308,13 +308,14 @@ + num_domains = nm_ip4_config_get_num_domains (src); + num_searches = nm_ip4_config_get_num_searches (src); + +- for (i = 0; i < num_searches; i++) { +- const char *search; +- +- search = nm_ip4_config_get_search (src, i); +- if (!domain_is_valid (search, FALSE)) +- continue; +- add_string_item (rc->searches, search); ++ if (!never_default) { ++ for (i = 0; i < num_searches; i++) { ++ const char *search; ++ search = nm_ip4_config_get_search (src, i); ++ if (!domain_is_valid (search, FALSE)) ++ continue; ++ add_string_item (rc->searches, search); ++ } + } + + if (num_domains > 1 || !num_searches) { +@@ -351,7 +352,7 @@ + } + + static void +-merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface) ++merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface, gboolean never_default) + { + guint32 num, num_domains, num_searches, i; + +@@ -378,13 +379,14 @@ + num_domains = nm_ip6_config_get_num_domains (src); + num_searches = nm_ip6_config_get_num_searches (src); + +- for (i = 0; i < num_searches; i++) { +- const char *search; +- +- search = nm_ip6_config_get_search (src, i); +- if (!domain_is_valid (search, FALSE)) +- continue; +- add_string_item (rc->searches, search); ++ if (!never_default) { ++ for (i = 0; i < num_searches; i++) { ++ const char *search; ++ search = nm_ip6_config_get_search (src, i); ++ if (!domain_is_valid (search, FALSE)) ++ continue; ++ add_string_item (rc->searches, search); ++ } + } + + if (num_domains > 1 || !num_searches) { +@@ -412,9 +414,9 @@ + NMDnsIPConfigData *data) + { + if (NM_IS_IP4_CONFIG (data->config)) +- merge_one_ip4_config (rc, (NMIP4Config *) data->config); ++ merge_one_ip4_config (rc, (NMIP4Config *) data->config, nm_ip4_config_get_never_default (data->config)); + else if (NM_IS_IP6_CONFIG (data->config)) +- merge_one_ip6_config (rc, (NMIP6Config *) data->config, data->iface); ++ merge_one_ip6_config (rc, (NMIP6Config *) data->config, data->iface, nm_ip4_config_get_never_default (data->config)); + else + g_return_if_reached (); + }
  27. Download patch debian/tests/Makefile

    --- 1.22.10-1/debian/tests/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/tests/Makefile 2019-04-23 07:50:37.000000000 +0000 @@ -0,0 +1,8 @@ + +obj-m += fake-rfkill.o + +fake-rfkill: + make -C /lib/modules/$(shell uname -r)/build KBUILD_SRC=/lib/modules/$(shell uname -r)/build M=$(shell pwd)/debian/tests + +clean-rfkill: + make -C /lib/modules/$(shell uname -r)/build KBUILD_SRC=/lib/modules/$(shell uname -r)/build M=$(shell pwd)/debian/tests clean
  28. Download patch debian/gbp.conf

    --- 1.22.10-1/debian/gbp.conf 2020-03-12 23:58:03.000000000 +0000 +++ 1.22.10-1ubuntu3/debian/gbp.conf 2020-04-29 16:43:35.000000000 +0000 @@ -1,5 +1,6 @@ [DEFAULT] pristine-tar = True patch-numbers = False -debian-branch = debian/master +debian-branch = ubuntu/master +debian-tag = ubuntu/%(version)s upstream-branch = upstream/latest

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: zfs-linux

zfs-linux (0.8.3-1ubuntu14) groovy; urgency=medium * Backport 5.7 compat changes (LP: #1872373) - backport of upstream commit 68dde63d138882860109178f4ab0b7b1b1bb3cfd ("Linux 5.7 compat: blk_alloc_queue()") -- Colin Ian King <colin.king@canonical.com> Mon, 18 May 2020 16:13:22 +0100 zfs-linux (0.8.3-1ubuntu13) groovy; urgency=medium * Backport AES-GCM performance accelleration - backport of upstream zfs commit 31b160f0a6c673c8f926233af2ed6d5354808393 ("ICP: Improve AES-GCM performance"). tests on a memory backed pool show performance improvements of ~15-22% for AES-CCM writes, ~17-20% AES-CCM reads, 34-36% AES-GCM writes and ~79-80% AES-GCM reads. -- Colin Ian King <colin.king@canonical.com> Tue, 5 May 2020 15:53:12 +0100 zfs-linux (0.8.3-1ubuntu12) focal; urgency=medium [ Jean-Baptiste Lallement ] [ Didier Roche ] * debian/patches/4100-disable-bpool-upgrade.patch: - On ubuntu, upgrade of bpool is disabled to prevent users to break their system by upgrading to features not supported by GRUB. (LP: #1847389) -- Jean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com> Tue, 14 Apr 2020 11:14:33 +0200 zfs-linux (0.8.3-1ubuntu11) focal; urgency=medium * Fix generator not detecting zsys on boot, messing up ZFS datasets on first boot. -- Didier Roche <didrocks@ubuntu.com> Thu, 02 Apr 2020 12:35:22 +0200 zfs-linux (0.8.3-1ubuntu10) focal; urgency=medium [ Jean-Baptiste Lallement ] [ Didier Roche ] * Make debian/patches/4000-zsys-support.patch more robust in case of corruption and faster: - Don’t call out zsys if the system hasn’t changed compared to its cache. This drastically speed up boot by some seconds. - Drop into emergency mode with some error message in dmesg with the failing command output in case some errors happen during revert. Prevents thus booting which would have screwed over root partition by creating a /boot non empty directory (like /boot/grub) in mounting over. Let now user still boot without reverting to be able to fix the issue. - Base what we import on cache file so that in the future (once grub is fixed) booting with multiple rpool and bpool. (LP: #1867007) * debian/patches/4500-fix-generator-invalid-cache.patch: - Removed, not needed anymore with previous patch enhancement. -- Didier Roche <didrocks@ubuntu.com> Mon, 30 Mar 2020 17:05:32 +0200 zfs-linux (0.8.3-1ubuntu9) focal; urgency=medium * debian/patches/4000-zsys-support.patch: - Fix import of external pools by preserving original cache file on zpool detection imports (LP: #1850130) -- Didier Roche <didrocks@ubuntu.com> Fri, 27 Mar 2020 14:56:47 +0100 zfs-linux (0.8.3-1ubuntu8) focal; urgency=medium * Add 5.5 low-latency compat fixe (LP: #1866730) - Apply backported upstream zfs fix for Linux 5.5 compat fix - 2fcab8795c7c ("Linux 5.5 compat: blkg_tryget()") -- Colin Ian King <colin.king@canonical.com> Tue, 10 Mar 2020 09:52:11 +0000 zfs-linux (0.8.3-1ubuntu7) focal; urgency=medium * Start zfs-mount.service after zfs-load-module.service, and if zfs module was actually loaded. This should allow installation of probert in containers, which pull in zfs-linux utilities. -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 05 Mar 2020 16:25:36 +0000 zfs-linux (0.8.3-1ubuntu6) focal; urgency=medium * Add 5.6 compat fixes (LP: #1863136) - Backport 4 upstream zfs fixes that allow zfs to build on Linux 5.6: - 2c3a83701dd1 ("Linux 5.6 compat: time_t") - 0dd73648532e ("Linux 5.6 compat: struct proc_ops") - 795699a6cc28 ("Linux 5.6 compat: timestamp_truncate()") - ff5587d65137 ("Linux 5.6 compat: ktime_get_raw_ts64()") -- Colin Ian King <colin.king@canonical.com> Fri, 28 Feb 2020 13:55:15 +0000 zfs-linux (0.8.3-1ubuntu5) focal; urgency=medium * debian/patches/4000-zsys-support.patch: Handle special syntax on zsys autosnapshot, while still being compatible with manually snapshots taken by users. -- Didier Roche <didrocks@ubuntu.com> Wed, 26 Feb 2020 14:50:05 +0100 zfs-linux (0.8.3-1ubuntu4) focal; urgency=medium * debian/patches/4000-zsys-support.patch: - use new zsysd command instead of eoan-based zsys * debian/patches/4500-fix-generator-invalid-cache.patch: - refresh -- Didier Roche <didrocks@ubuntu.com> Tue, 25 Feb 2020 17:02:07 +0100 zfs-linux (0.8.3-1ubuntu3) focal; urgency=medium * Relax zfsutils-linux Breaks on zfs-dksm (LP: #1862101) - we're a bit more flexible than the current breaks rule, so relax it -- Colin Ian King <colin.king@canonical.com> Thu, 6 Feb 2020 08:51:22 +0000 zfs-linux (0.8.3-1ubuntu2) focal; urgency=medium * Remove 4703-Enable-SIMD-for-encryption.patch - this already exists in a squished patch in 0.8.3 and the inclusion breaks z390 and ppc64el encryption, so remove it. -- Colin Ian King <colin.king@canonical.com> Fri, 31 Jan 2020 16:37:23 +0000 zfs-linux (0.8.3-1ubuntu1) focal; urgency=medium * Sync with debian 0.8.3-1 * Ubuntu specific changes: - drop dkms tests in debian/tests/control - Add lib/systemd/system/zfs-load-module.service to debian/zfsutils-linux.install - debian/control*: Drop all zfs-modules deps, as our 64-bit kernels all provide the modules, and we already didn't depend on them on 32-bit. - Restrict zfs-modules deps to 64-bit arches only to avoid zfs-dkms in main. -- Colin Ian King <colin.king@canonical.com> Wed, 29 Jan 2020 10:12:11 +0000

Modifications :
  1. Download patch debian/patches/4604-Linux-5.7-compat-blk_alloc_queue.patch
  2. Download patch debian/tests/control

    --- 0.8.3-1/debian/tests/control 2019-11-22 04:01:06.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/tests/control 2020-01-29 10:28:13.000000000 +0000 @@ -1,24 +1,7 @@ -Tests: kernel-smoke-test, kernel-ztest +Tests: kernel-smoke-test Restrictions: needs-root, isolation-machine Depends: zfs-dkms [ amd64 arm64 ppc64el s390x ], zfs-initramfs [ amd64 arm64 ppc64el s390x ], zfs-test [ amd64 arm64 ppc64el s390x ], zfs-zed [ amd64 arm64 ppc64el s390x ], zfsutils-linux [ amd64 arm64 ppc64el s390x ] - -Tests: dkms-zfs-test -Restrictions: needs-root, allow-stderr -Depends: dkms, - linux-headers-amd64 [amd64], - linux-headers-arm64 [arm64], - linux-headers-powerpc64le [ppc64el], - linux-headers-s390x [s390x] - -Tests: binary-debs-modules, binary-debs-modules-udeb -Restrictions: needs-root, allow-stderr, -Depends: fakeroot, - linux-headers-amd64 [amd64], - linux-headers-arm64 [arm64], - linux-headers-powerpc64le [ppc64el], - linux-headers-s390x [s390x], - @builddeps@
  3. Download patch debian/patches/4000-zsys-support.patch
  4. Download patch debian/patches/4550-Linux-5.5-compat-blkg_tryget.patch

    --- 0.8.3-1/debian/patches/4550-Linux-5.5-compat-blkg_tryget.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/4550-Linux-5.5-compat-blkg_tryget.patch 2020-03-10 09:48:23.000000000 +0000 @@ -0,0 +1,136 @@ +From 2fcab8795c7c493845bfa277d44bc443802000b8 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Fri, 28 Feb 2020 08:58:39 -0800 +Subject: [PATCH] Linux 5.5 compat: blkg_tryget() + +Commit https://github.com/torvalds/linux/commit/9e8d42a0f accidentally +converted the static inline function blkg_tryget() to GPL-only for +kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. + +Resolve the build issue by providing our own equivalent functionality +when needed which uses rcu_read_lock_sched() internally as before. + +Reviewed-by: Tony Hutter <hutter2@llnl.gov> +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Closes #9745 +Closes #10072 +--- + config/kernel-blkg-tryget.m4 | 37 ++++++++++++++++++++++++++++++++++++ + config/kernel.m4 | 2 ++ + module/zfs/vdev_disk.c | 32 ++++++++++++++++++++++++++++++- + 3 files changed, 70 insertions(+), 1 deletion(-) + create mode 100644 config/kernel-blkg-tryget.m4 + +diff --git a/config/kernel-blkg-tryget.m4 b/config/kernel-blkg-tryget.m4 +new file mode 100644 +index 00000000000..fb831ca3b3e +--- /dev/null ++++ b/config/kernel-blkg-tryget.m4 +@@ -0,0 +1,37 @@ ++dnl # ++dnl # Linux 5.5 API, ++dnl # ++dnl # The Linux 5.5 kernel updated percpu_ref_tryget() which is inlined by ++dnl # blkg_tryget() to use rcu_read_lock() instead of rcu_read_lock_sched(). ++dnl # As a side effect the function was converted to GPL-only. ++dnl # ++AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKG_TRYGET], [ ++ ZFS_LINUX_TEST_SRC([blkg_tryget], [ ++ #include <linux/blk-cgroup.h> ++ #include <linux/bio.h> ++ #include <linux/fs.h> ++ ],[ ++ struct blkcg_gq blkg __attribute__ ((unused)); ++ bool rc __attribute__ ((unused)); ++ rc = blkg_tryget(&blkg); ++ ], [], [$ZFS_META_LICENSE]) ++]) ++ ++AC_DEFUN([ZFS_AC_KERNEL_BLKG_TRYGET], [ ++ AC_MSG_CHECKING([whether blkg_tryget() is available]) ++ ZFS_LINUX_TEST_RESULT([blkg_tryget], [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_BLKG_TRYGET, 1, [blkg_tryget() is available]) ++ ++ AC_MSG_CHECKING([whether blkg_tryget() is GPL-only]) ++ ZFS_LINUX_TEST_RESULT([blkg_tryget_license], [ ++ AC_MSG_RESULT(no) ++ ],[ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_BLKG_TRYGET_GPL_ONLY, 1, ++ [blkg_tryget() GPL-only]) ++ ]) ++ ],[ ++ AC_MSG_RESULT(no) ++ ]) ++]) +diff --git a/config/kernel.m4 b/config/kernel.m4 +index dce619729d4..bea6f9b1bbf 100644 +--- a/config/kernel.m4 ++++ b/config/kernel.m4 +@@ -70,6 +70,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ + ZFS_AC_KERNEL_SRC_BIO_BI_STATUS + ZFS_AC_KERNEL_SRC_BIO_RW_BARRIER + ZFS_AC_KERNEL_SRC_BIO_RW_DISCARD ++ ZFS_AC_KERNEL_SRC_BLKG_TRYGET + ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI + ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISCARD + ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE +@@ -186,6 +187,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ + ZFS_AC_KERNEL_BIO_BI_STATUS + ZFS_AC_KERNEL_BIO_RW_BARRIER + ZFS_AC_KERNEL_BIO_RW_DISCARD ++ ZFS_AC_KERNEL_BLKG_TRYGET + ZFS_AC_KERNEL_BLK_QUEUE_BDI + ZFS_AC_KERNEL_BLK_QUEUE_DISCARD + ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE +diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c +index 661f0f1b727..8544bb8ffb6 100644 +--- a/module/zfs/vdev_disk.c ++++ b/module/zfs/vdev_disk.c +@@ -473,6 +473,36 @@ vdev_submit_bio_impl(struct bio *bio) + + #ifdef HAVE_BIO_SET_DEV + #if defined(CONFIG_BLK_CGROUP) && defined(HAVE_BIO_SET_DEV_GPL_ONLY) ++/* ++ * The Linux 5.5 kernel updated percpu_ref_tryget() which is inlined by ++ * blkg_tryget() to use rcu_read_lock() instead of rcu_read_lock_sched(). ++ * As a side effect the function was converted to GPL-only. Define our ++ * own version when needed which uses rcu_read_lock_sched(). ++ */ ++#if defined(HAVE_BLKG_TRYGET_GPL_ONLY) ++static inline bool ++vdev_blkg_tryget(struct blkcg_gq *blkg) ++{ ++ struct percpu_ref *ref = &blkg->refcnt; ++ unsigned long __percpu *count; ++ bool rc; ++ ++ rcu_read_lock_sched(); ++ ++ if (__ref_is_percpu(ref, &count)) { ++ this_cpu_inc(*count); ++ rc = true; ++ } else { ++ rc = atomic_long_inc_not_zero(&ref->count); ++ } ++ ++ rcu_read_unlock_sched(); ++ ++ return (rc); ++} ++#elif defined(HAVE_BLKG_TRYGET) ++#define vdev_blkg_tryget(bg) blkg_tryget(bg) ++#endif + /* + * The Linux 5.0 kernel updated the bio_set_dev() macro so it calls the + * GPL-only bio_associate_blkg() symbol thus inadvertently converting +@@ -487,7 +517,7 @@ vdev_bio_associate_blkg(struct bio *bio) + ASSERT3P(q, !=, NULL); + ASSERT3P(bio->bi_blkg, ==, NULL); + +- if (q->root_blkg && blkg_tryget(q->root_blkg)) ++ if (q->root_blkg && vdev_blkg_tryget(q->root_blkg)) + bio->bi_blkg = q->root_blkg; + } + #define bio_associate_blkg vdev_bio_associate_blkg
  5. Download patch debian/control

    --- 0.8.3-1/debian/control 2020-01-21 12:40:40.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/control 2020-02-06 08:49:54.000000000 +0000 @@ -1,7 +1,8 @@ Source: zfs-linux Section: contrib/kernel Priority: optional -Maintainer: Debian ZFS on Linux maintainers <pkg-zfsonlinux-devel@alioth-lists.debian.net> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian ZFS on Linux maintainers <pkg-zfsonlinux-devel@alioth-lists.debian.net> Uploaders: Aron Xu <aron@debian.org>, Petter Reinholdtsen <pere@debian.org>, Carlos Alberto Lopez Perez <clopez@igalia.com>, @@ -166,10 +167,9 @@ Description: OpenZFS filesystem kernel m OpenZFS. Package: zfs-initramfs -Architecture: all +Architecture: amd64 arm64 ppc64el s390x Depends: busybox-initramfs | busybox-static | busybox, initramfs-tools, - zfs-modules | zfs-dkms, zfsutils-linux (>= ${binary:Version}), ${misc:Depends} Breaks: zfsutils-linux (<= 0.7.11-2) @@ -183,9 +183,8 @@ Description: OpenZFS root filesystem cap for the initramfs-tools infrastructure. Package: zfs-dracut -Architecture: all +Architecture: amd64 arm64 ppc64el s390x Depends: dracut, - zfs-modules | zfs-dkms, zfsutils-linux (>= ${binary:Version}), ${misc:Depends} Description: OpenZFS root filesystem capabilities for Linux - dracut @@ -206,12 +205,11 @@ Depends: libnvpair1linux (= ${binary:Ver python3, ${misc:Depends}, ${shlibs:Depends} -Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed +Recommends: lsb-base, zfs-zed Breaks: openrc, spl (<< 0.7.9-2), spl-dkms (<< 0.8.0~rc1), - zfs-dkms (<< ${binary:Version}), - zfs-dkms (>> ${binary:Version}) + zfs-dkms (<< 0.7.9-2) Replaces: spl (<< 0.7.9-2), spl-dkms Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), @@ -229,8 +227,7 @@ Description: command-line tools to manag Package: zfs-zed Section: contrib/admin Architecture: linux-any -Depends: zfs-modules | zfs-dkms, - zfsutils-linux (>= ${binary:Version}), +Depends: zfsutils-linux (>= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: OpenZFS Event Daemon @@ -254,7 +251,6 @@ Depends: acl, python3-pyzfs, sudo, sysstat, - zfs-modules | zfs-dkms, zfsutils-linux (>=${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
  6. Download patch debian/patches/4100-disable-bpool-upgrade.patch

    --- 0.8.3-1/debian/patches/4100-disable-bpool-upgrade.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/4100-disable-bpool-upgrade.patch 2020-04-14 09:14:33.000000000 +0000 @@ -0,0 +1,45 @@ +Description: Disable bpool upgrade + On ubuntu, upgrade of bpool is disabled to prevent users to break their + system by upgrading to features not supported by GRUB. +Author: Jean-Baptiste Lallement <jean.baptiste@ubuntu.com> + Didier Roche <didrocks@ubuntu.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1847389 +Forwarded: not-needed +Last-Update: 2020-04-14 +=================================================================== +--- a/cmd/zpool/zpool_main.c ++++ b/cmd/zpool/zpool_main.c +@@ -7989,6 +7989,16 @@ upgrade_enable_all(zpool_handle_t *zhp, + { + int i, ret, count; + boolean_t firstff = B_TRUE; ++ ++ // On ubuntu, upgrade of bpool is disabled to prevent users to break their ++ // system by upgrading to features not supported by GRUB ++ if (strcmp("bpool", zpool_get_name(zhp)) == 0) { ++ (void) fprintf(stderr, gettext("'zpool upgrade' is disabled for" ++ " 'bpool' to keep compatibility with GRUB.\n" ++ "Skipping upgrade.\n")); ++ return (0); ++ } ++ + nvlist_t *enabled = zpool_get_features(zhp); + + count = 0; +--- a/lib/libzfs/libzfs_status.c ++++ b/lib/libzfs/libzfs_status.c +@@ -425,6 +425,14 @@ zpool_get_status(zpool_handle_t *zhp, ch + else + *msgid = zfs_msgid_table[ret]; + } ++ ++ // On Ubuntu GRUB is incompatible with newest features of zfs. In order to ++ // prevent people from upgrading bpool, the message to suggest to upgrade ++ // the pool is removed. ++ if (ret == ZPOOL_STATUS_FEAT_DISABLED && strcmp(zpool_get_name(zhp), "bpool") == 0) { ++ ret = ZPOOL_STATUS_OK; ++ } ++ + return (ret); + } +
  7. Download patch debian/patches/4602-Linux-5.6-compat-ktime_get_raw_ts64.patch

    --- 0.8.3-1/debian/patches/4602-Linux-5.6-compat-ktime_get_raw_ts64.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/4602-Linux-5.6-compat-ktime_get_raw_ts64.patch 2020-03-10 09:50:18.000000000 +0000 @@ -0,0 +1,153 @@ +From ff5587d651371ab496f7962e85fe2c337fdb8a59 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Wed, 26 Feb 2020 12:42:33 -0800 +Subject: [PATCH] Linux 5.6 compat: ktime_get_raw_ts64() +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +The getrawmonotonic() and getrawmonotonic64() interfaces have been +fully retired. Update gethrtime() to use the replacement interface +ktime_get_raw_ts64() which was introduced in the 4.18 kernel. + +Reviewed-by: Tony Hutter <hutter2@llnl.gov> +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Closes #10052 +Closes #10064 +Signed-off-by: Colin Ian King <colin.king@canonical.com> +--- + config/kernel-ktime.m4 | 55 +++++++++++++++++++++ + config/kernel-ktime_get_coarse_real_ts64.m4 | 23 --------- + config/kernel.m4 | 4 +- + include/spl/sys/time.h | 5 ++ + 4 files changed, 62 insertions(+), 25 deletions(-) + create mode 100644 config/kernel-ktime.m4 + delete mode 100644 config/kernel-ktime_get_coarse_real_ts64.m4 + +Index: zfs-linux-0.8.3/config/kernel-ktime.m4 +=================================================================== +--- /dev/null ++++ zfs-linux-0.8.3/config/kernel-ktime.m4 +@@ -0,0 +1,55 @@ ++dnl # ++dnl # 4.18: ktime_get_coarse_real_ts64() replaces current_kernel_time64(). ++dnl # ++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [ ++ ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [ ++ #include <linux/mm.h> ++ ], [ ++ struct timespec64 ts; ++ ktime_get_coarse_real_ts64(&ts); ++ ]) ++]) ++ ++AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [ ++ AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists]) ++ ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1, ++ [ktime_get_coarse_real_ts64() exists]) ++ ], [ ++ AC_MSG_RESULT(no) ++ ]) ++]) ++ ++dnl # ++dnl # 4.18: ktime_get_raw_ts64() replaces getrawmonotonic64(). ++dnl # ++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64], [ ++ ZFS_LINUX_TEST_SRC([ktime_get_raw_ts64], [ ++ #include <linux/mm.h> ++ ], [ ++ struct timespec64 ts; ++ ktime_get_raw_ts64(&ts); ++ ]) ++]) ++ ++AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_RAW_TS64], [ ++ AC_MSG_CHECKING([whether ktime_get_raw_ts64() exists]) ++ ZFS_LINUX_TEST_RESULT([ktime_get_raw_ts64], [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_KTIME_GET_RAW_TS64, 1, ++ [ktime_get_raw_ts64() exists]) ++ ], [ ++ AC_MSG_RESULT(no) ++ ]) ++]) ++ ++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME], [ ++ ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64 ++ ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64 ++]) ++ ++AC_DEFUN([ZFS_AC_KERNEL_KTIME], [ ++ ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64 ++ ZFS_AC_KERNEL_KTIME_GET_RAW_TS64 ++]) +Index: zfs-linux-0.8.3/config/kernel-ktime_get_coarse_real_ts64.m4 +=================================================================== +--- zfs-linux-0.8.3.orig/config/kernel-ktime_get_coarse_real_ts64.m4 ++++ /dev/null +@@ -1,23 +0,0 @@ +-dnl # +-dnl # 4.18: ktime_get_coarse_real_ts64() added. Use it in place of +-dnl # current_kernel_time64(). +-dnl # +-AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [ +- ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [ +- #include <linux/mm.h> +- ], [ +- struct timespec64 ts; +- ktime_get_coarse_real_ts64(&ts); +- ]) +-]) +- +-AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [ +- AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists]) +- ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1, +- [ktime_get_coarse_real_ts64() exists]) +- ], [ +- AC_MSG_RESULT(no) +- ]) +-]) +Index: zfs-linux-0.8.3/config/kernel.m4 +=================================================================== +--- zfs-linux-0.8.3.orig/config/kernel.m4 ++++ zfs-linux-0.8.3/config/kernel.m4 +@@ -138,7 +138,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ + ZFS_AC_KERNEL_SRC_CURRENT_TIME + ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES + ZFS_AC_KERNEL_SRC_IN_COMPAT_SYSCALL +- ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64 ++ ZFS_AC_KERNEL_SRC_KTIME + ZFS_AC_KERNEL_SRC_TOTALRAM_PAGES_FUNC + ZFS_AC_KERNEL_SRC_TOTALHIGH_PAGES + ZFS_AC_KERNEL_SRC_KSTRTOUL +@@ -256,7 +256,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ + ZFS_AC_KERNEL_CURRENT_TIME + ZFS_AC_KERNEL_USERNS_CAPABILITIES + ZFS_AC_KERNEL_IN_COMPAT_SYSCALL +- ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64 ++ ZFS_AC_KERNEL_KTIME + ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC + ZFS_AC_KERNEL_TOTALHIGH_PAGES + ZFS_AC_KERNEL_KSTRTOUL +Index: zfs-linux-0.8.3/include/spl/sys/time.h +=================================================================== +--- zfs-linux-0.8.3.orig/include/spl/sys/time.h ++++ zfs-linux-0.8.3/include/spl/sys/time.h +@@ -105,8 +105,13 @@ gethrestime_sec(void) + static inline hrtime_t + gethrtime(void) + { ++#if defined(HAVE_KTIME_GET_RAW_TS64) ++ struct timespec64 ts; ++ ktime_get_raw_ts64(&ts); ++#else + struct timespec ts; + getrawmonotonic(&ts); ++#endif + return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); + } +
  8. Download patch debian/patches/4603-Linux-5.6-compat-time_t.patch

    --- 0.8.3-1/debian/patches/4603-Linux-5.6-compat-time_t.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/4603-Linux-5.6-compat-time_t.patch 2020-02-28 13:55:15.000000000 +0000 @@ -0,0 +1,120 @@ +From 2c3a83701dd185cadb30db4556256534e2930c7d Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Wed, 26 Feb 2020 13:18:07 -0800 +Subject: [PATCH] Linux 5.6 compat: time_t +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +As part of the Linux kernel's y2038 changes the time_t type has been +fully retired. Callers are now required to use the time64_t type. + +Rather than move to the new type, I've removed the few remaining +places where a time_t is used in the kernel code. They've been +replaced with a uint64_t which is already how ZFS internally +handled these values. + +Going forward we should work towards updating the remaining user +space time_t consumers to the 64-bit interfaces. + +Reviewed-by: Matthew Macy <mmacy@freebsd.org> +Reviewed-by: Tony Hutter <hutter2@llnl.gov> +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Closes #10052 +Closes #10064 +Signed-off-by: Colin Ian King <colin.king@canonical.com> +--- + include/spl/sys/time.h | 2 +- + include/sys/vdev_impl.h | 4 ++-- + lib/libspl/include/sys/time.h | 2 +- + module/zfs/zfs_debug.c | 2 +- + module/zfs/vdev_initialize.c | 2 +- + module/zfs/vdev_trim.c | 2 +- + 6 files changed, 7 insertions(+), 7 deletions(-) + +Index: zfs-linux-0.8.3/include/spl/sys/time.h +=================================================================== +--- zfs-linux-0.8.3.orig/include/spl/sys/time.h ++++ zfs-linux-0.8.3/include/spl/sys/time.h +@@ -85,7 +85,7 @@ gethrestime(inode_timespec_t *ts) + #endif + } + +-static inline time_t ++static inline uint64_t + gethrestime_sec(void) + { + #if defined(HAVE_INODE_TIMESPEC64_TIMES) +Index: zfs-linux-0.8.3/include/sys/vdev_impl.h +=================================================================== +--- zfs-linux-0.8.3.orig/include/sys/vdev_impl.h ++++ zfs-linux-0.8.3/include/sys/vdev_impl.h +@@ -274,7 +274,7 @@ struct vdev { + range_tree_t *vdev_initialize_tree; /* valid while initializing */ + uint64_t vdev_initialize_bytes_est; + uint64_t vdev_initialize_bytes_done; +- time_t vdev_initialize_action_time; /* start and end time */ ++ uint64_t vdev_initialize_action_time; /* start and end time */ + + /* TRIM related */ + boolean_t vdev_trim_exit_wanted; +@@ -295,7 +295,7 @@ struct vdev { + uint64_t vdev_trim_rate; /* requested rate (bytes/sec) */ + uint64_t vdev_trim_partial; /* requested partial TRIM */ + uint64_t vdev_trim_secure; /* requested secure TRIM */ +- time_t vdev_trim_action_time; /* start and end time */ ++ uint64_t vdev_trim_action_time; /* start and end time */ + + /* for limiting outstanding I/Os (initialize and TRIM) */ + kmutex_t vdev_initialize_io_lock; +Index: zfs-linux-0.8.3/lib/libspl/include/sys/time.h +=================================================================== +--- zfs-linux-0.8.3.orig/lib/libspl/include/sys/time.h ++++ zfs-linux-0.8.3/lib/libspl/include/sys/time.h +@@ -88,7 +88,7 @@ gethrestime(inode_timespec_t *ts) + ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC; + } + +-static inline time_t ++static inline uint64_t + gethrestime_sec(void) + { + struct timeval tv; +Index: zfs-linux-0.8.3/module/zfs/zfs_debug.c +=================================================================== +--- zfs-linux-0.8.3.orig/module/zfs/zfs_debug.c ++++ zfs-linux-0.8.3/module/zfs/zfs_debug.c +@@ -27,7 +27,7 @@ + + typedef struct zfs_dbgmsg { + procfs_list_node_t zdm_node; +- time_t zdm_timestamp; ++ uint64_t zdm_timestamp; + int zdm_size; + char zdm_msg[1]; /* variable length allocation */ + } zfs_dbgmsg_t; +Index: zfs-linux-0.8.3/module/zfs/vdev_initialize.c +=================================================================== +--- zfs-linux-0.8.3.orig/module/zfs/vdev_initialize.c ++++ zfs-linux-0.8.3/module/zfs/vdev_initialize.c +@@ -700,7 +700,7 @@ vdev_initialize_restart(vdev_t *vd) + vd->vdev_leaf_zap, VDEV_LEAF_ZAP_INITIALIZE_ACTION_TIME, + sizeof (timestamp), 1, &timestamp); + ASSERT(err == 0 || err == ENOENT); +- vd->vdev_initialize_action_time = (time_t)timestamp; ++ vd->vdev_initialize_action_time = timestamp; + + if (vd->vdev_initialize_state == VDEV_INITIALIZE_SUSPENDED || + vd->vdev_offline) { +Index: zfs-linux-0.8.3/module/zfs/vdev_trim.c +=================================================================== +--- zfs-linux-0.8.3.orig/module/zfs/vdev_trim.c ++++ zfs-linux-0.8.3/module/zfs/vdev_trim.c +@@ -1046,7 +1046,7 @@ vdev_trim_restart(vdev_t *vd) + vd->vdev_leaf_zap, VDEV_LEAF_ZAP_TRIM_ACTION_TIME, + sizeof (timestamp), 1, &timestamp); + ASSERT(err == 0 || err == ENOENT); +- vd->vdev_trim_action_time = (time_t)timestamp; ++ vd->vdev_trim_action_time = timestamp; + + if (vd->vdev_trim_state == VDEV_TRIM_SUSPENDED || + vd->vdev_offline) {
  9. Download patch debian/patches/series

    --- 0.8.3-1/debian/patches/series 2020-01-24 13:11:45.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/series 2020-05-18 15:12:03.000000000 +0000 @@ -3,7 +3,20 @@ 0003-relocate-zvol_wait.patch enable-zed.patch 1004-zed-service-bindir.patch +2100-zfs-load-module.patch +2200-add-zfs-0.6.x-ioctl-compat-shim.patch 3100-remove-libzfs-module-timeout.patch +3302-Use-obj-m-instead-of-subdir-m.patch +4000-zsys-support.patch +4100-disable-bpool-upgrade.patch force-verbose-rules.patch #unapplied/init-debian-openrc-workaround.patch # OpenRC users can apply this locally +4550-Linux-5.5-compat-blkg_tryget.patch +4600-Linux-5.6-compat-struct-proc_ops.patch +4601-Linux-5.6-compat-timestamp_truncate.patch +4602-Linux-5.6-compat-ktime_get_raw_ts64.patch +4603-Linux-5.6-compat-time_t.patch +4604-Linux-5.7-compat-blk_alloc_queue.patch +zfs-mount-container-start.patch +4610-ICP-Improve-AES-GCM-performance.patch
  10. Download patch debian/patches/2200-add-zfs-0.6.x-ioctl-compat-shim.patch
  11. Download patch debian/patches/3302-Use-obj-m-instead-of-subdir-m.patch

    --- 0.8.3-1/debian/patches/3302-Use-obj-m-instead-of-subdir-m.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/3302-Use-obj-m-instead-of-subdir-m.patch 2020-01-29 09:44:11.000000000 +0000 @@ -0,0 +1,39 @@ +Index: zfs-linux-0.8.3/module/Makefile.in +=================================================================== +--- zfs-linux-0.8.3.orig/module/Makefile.in ++++ zfs-linux-0.8.3/module/Makefile.in +@@ -1,11 +1,11 @@ +-obj-m += avl/ +-obj-m += icp/ +-obj-m += lua/ +-obj-m += nvpair/ +-obj-m += spl/ +-obj-m += unicode/ +-obj-m += zcommon/ +-obj-m += zfs/ ++obj-y += avl/ ++obj-y += icp/ ++obj-y += lua/ ++obj-y += nvpair/ ++obj-y += spl/ ++obj-y += unicode/ ++obj-y += zcommon/ ++obj-y += zfs/ + + INSTALL_MOD_DIR ?= extra + +@@ -60,12 +60,12 @@ modules_install: + modules_uninstall: + @# Uninstall the kernel modules + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ +- list='$(obj-m)'; for objdir in $$list; do \ ++ list='$(obj-y)'; for objdir in $$list; do \ + $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \ + done + + distdir: +- list='$(obj-m)'; for objdir in $$list; do \ ++ list='$(obj-y)'; for objdir in $$list; do \ + (cd @top_srcdir@/module && find $$objdir \ + -name '*.c' -o -name '*.h' -o -name '*.S' | \ + xargs -r cp --parents -t @abs_top_builddir@/module/$$distdir); \
  12. Download patch debian/zfsutils-linux.install

    --- 0.8.3-1/debian/zfsutils-linux.install 2019-11-22 04:01:19.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/zfsutils-linux.install 2020-01-29 10:25:39.000000000 +0000 @@ -12,6 +12,7 @@ lib/systemd/system/zfs-share.service lib/systemd/system/zfs-volume-wait.service lib/systemd/system/zfs-volumes.target lib/systemd/system/zfs.target +lib/systemd/system/zfs-load-module.service lib/udev/ sbin/fsck.zfs sbin/mount.zfs
  13. Download patch debian/patches/4601-Linux-5.6-compat-timestamp_truncate.patch

    --- 0.8.3-1/debian/patches/4601-Linux-5.6-compat-timestamp_truncate.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/4601-Linux-5.6-compat-timestamp_truncate.patch 2020-02-28 13:55:15.000000000 +0000 @@ -0,0 +1,139 @@ +From 795699a6cc28b8f1059397e03d1a86d576bfc7dc Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Thu, 6 Feb 2020 12:37:25 -0800 +Subject: [PATCH] Linux 5.6 compat: timestamp_truncate() +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +The timestamp_truncate() function was added, it replaces the existing +timespec64_trunc() function. This change renames our wrapper function +to be consistent with the upstream name and updates the compatibility +code for older kernels accordingly. + +Reviewed-by: Tony Hutter <hutter2@llnl.gov> +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Closes #9956 +Closes #9961 +Signed-off-by: Colin Ian King <colin.king@canonical.com> +--- + config/kernel-inode-times.m4 | 31 +++++++++++++++++++++++++++---- + include/sys/zpl.h | 13 +++++++------ + module/zfs/zfs_vnops.c | 8 ++++---- + module/zfs/zpl_inode.c | 6 ++---- + 4 files changed, 40 insertions(+), 18 deletions(-) + +Index: zfs-linux-0.8.3/config/kernel-inode-times.m4 +=================================================================== +--- zfs-linux-0.8.3.orig/config/kernel-inode-times.m4 ++++ zfs-linux-0.8.3/config/kernel-inode-times.m4 +@@ -1,8 +1,22 @@ +-dnl # +-dnl # 4.18 API change +-dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64. +-dnl # + AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [ ++ ++ dnl # ++ dnl # 5.6 API change ++ dnl # timespec64_trunc() replaced by timestamp_truncate() interface. ++ dnl # ++ ZFS_LINUX_TEST_SRC([timestamp_truncate], [ ++ #include <linux/fs.h> ++ ],[ ++ struct timespec64 ts; ++ struct inode ip; ++ ++ ts = timestamp_truncate(ts, &ip); ++ ]) ++ ++ dnl # ++ dnl # 4.18 API change ++ dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64. ++ dnl # + ZFS_LINUX_TEST_SRC([inode_times], [ + #include <linux/fs.h> + ],[ +@@ -15,6 +29,15 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES] + ]) + + AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [ ++ AC_MSG_CHECKING([whether timestamp_truncate() exists]) ++ ZFS_LINUX_TEST_RESULT([timestamp_truncate], [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1, ++ [timestamp_truncate() exists]) ++ ],[ ++ AC_MSG_RESULT(no) ++ ]) ++ + AC_MSG_CHECKING([whether inode->i_*time's are timespec64]) + ZFS_LINUX_TEST_RESULT([inode_times], [ + AC_MSG_RESULT(no) +Index: zfs-linux-0.8.3/include/sys/zpl.h +=================================================================== +--- zfs-linux-0.8.3.orig/include/sys/zpl.h ++++ zfs-linux-0.8.3/include/sys/zpl.h +@@ -188,13 +188,14 @@ zpl_dir_emit_dots(struct file *file, zpl + } + #endif /* HAVE_VFS_ITERATE */ + +-/* +- * Linux 4.18, inode times converted from timespec to timespec64. +- */ +-#if defined(HAVE_INODE_TIMESPEC64_TIMES) +-#define zpl_inode_timespec_trunc(ts, gran) timespec64_trunc(ts, gran) ++#if defined(HAVE_INODE_TIMESTAMP_TRUNCATE) ++#define zpl_inode_timestamp_truncate(ts, ip) timestamp_truncate(ts, ip) ++#elif defined(HAVE_INODE_TIMESPEC64_TIMES) ++#define zpl_inode_timestamp_truncate(ts, ip) \ ++ timespec64_trunc(ts, (ip)->i_sb->s_time_gran) + #else +-#define zpl_inode_timespec_trunc(ts, gran) timespec_trunc(ts, gran) ++#define zpl_inode_timestamp_truncate(ts, ip) \ ++ timespec_trunc(ts, (ip)->i_sb->s_time_gran) + #endif + + #endif /* _SYS_ZPL_H */ +Index: zfs-linux-0.8.3/module/zfs/zfs_vnops.c +=================================================================== +--- zfs-linux-0.8.3.orig/module/zfs/zfs_vnops.c ++++ zfs-linux-0.8.3/module/zfs/zfs_vnops.c +@@ -3415,8 +3415,8 @@ top: + + if (mask & (ATTR_MTIME | ATTR_SIZE)) { + ZFS_TIME_ENCODE(&vap->va_mtime, mtime); +- ZTOI(zp)->i_mtime = zpl_inode_timespec_trunc(vap->va_mtime, +- ZTOI(zp)->i_sb->s_time_gran); ++ ZTOI(zp)->i_mtime = zpl_inode_timestamp_truncate( ++ vap->va_mtime, ZTOI(zp)); + + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, + mtime, sizeof (mtime)); +@@ -3424,8 +3424,8 @@ top: + + if (mask & (ATTR_CTIME | ATTR_SIZE)) { + ZFS_TIME_ENCODE(&vap->va_ctime, ctime); +- ZTOI(zp)->i_ctime = zpl_inode_timespec_trunc(vap->va_ctime, +- ZTOI(zp)->i_sb->s_time_gran); ++ ZTOI(zp)->i_ctime = zpl_inode_timestamp_truncate(vap->va_ctime, ++ ZTOI(zp)); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, + ctime, sizeof (ctime)); + } +Index: zfs-linux-0.8.3/module/zfs/zpl_inode.c +=================================================================== +--- zfs-linux-0.8.3.orig/module/zfs/zpl_inode.c ++++ zfs-linux-0.8.3/module/zfs/zpl_inode.c +@@ -390,10 +390,8 @@ zpl_setattr(struct dentry *dentry, struc + vap->va_mtime = ia->ia_mtime; + vap->va_ctime = ia->ia_ctime; + +- if (vap->va_mask & ATTR_ATIME) { +- ip->i_atime = zpl_inode_timespec_trunc(ia->ia_atime, +- ip->i_sb->s_time_gran); +- } ++ if (vap->va_mask & ATTR_ATIME) ++ ip->i_atime = zpl_inode_timestamp_truncate(ia->ia_atime, ip); + + cookie = spl_fstrans_mark(); + error = -zfs_setattr(ip, vap, 0, cr);
  14. Download patch debian/patches/4600-Linux-5.6-compat-struct-proc_ops.patch
  15. Download patch debian/patches/force-verbose-rules.patch

    --- 0.8.3-1/debian/patches/force-verbose-rules.patch 2020-01-21 12:40:40.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/force-verbose-rules.patch 2020-02-26 13:03:59.000000000 +0000 @@ -1,8 +1,10 @@ Description: force libtool to produce verbose output Author: Mo Zhou Forwarded: no need ---- a/config/Rules.am -+++ b/config/Rules.am +Index: zfs-linux-0.8.3/config/Rules.am +=================================================================== +--- zfs-linux-0.8.3.orig/config/Rules.am ++++ zfs-linux-0.8.3/config/Rules.am @@ -5,7 +5,7 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h
  16. Download patch debian/patches/3100-remove-libzfs-module-timeout.patch

    --- 0.8.3-1/debian/patches/3100-remove-libzfs-module-timeout.patch 2020-01-21 12:40:40.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/3100-remove-libzfs-module-timeout.patch 2020-01-29 09:39:04.000000000 +0000 @@ -6,10 +6,10 @@ container and set the timeout to zero in --- -Index: zfs-linux-0.8.2/lib/libzfs/libzfs_util.c +Index: zfs-linux-0.8.3/lib/libzfs/libzfs_util.c =================================================================== ---- zfs-linux-0.8.2.orig/lib/libzfs/libzfs_util.c -+++ zfs-linux-0.8.2/lib/libzfs/libzfs_util.c +--- zfs-linux-0.8.3.orig/lib/libzfs/libzfs_util.c ++++ zfs-linux-0.8.3/lib/libzfs/libzfs_util.c @@ -934,6 +934,15 @@ libzfs_load_module(const char *module) int load = 0, fd; hrtime_t start;
  17. Download patch debian/patches/4610-ICP-Improve-AES-GCM-performance.patch
  18. Download patch debian/patches/2100-zfs-load-module.patch

    --- 0.8.3-1/debian/patches/2100-zfs-load-module.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/2100-zfs-load-module.patch 2020-01-29 09:35:55.000000000 +0000 @@ -0,0 +1,79 @@ +Index: zfs-linux-0.8.2/etc/systemd/system/Makefile.am +=================================================================== +--- zfs-linux-0.8.2.orig/etc/systemd/system/Makefile.am ++++ zfs-linux-0.8.2/etc/systemd/system/Makefile.am +@@ -2,6 +2,7 @@ systemdpreset_DATA = \ + 50-zfs.preset + + systemdunit_DATA = \ ++ zfs-load-module.service \ + zfs-zed.service \ + zfs-import-cache.service \ + zfs-import-scan.service \ +@@ -13,6 +14,7 @@ systemdunit_DATA = \ + zfs.target + + EXTRA_DIST = \ ++ $(top_srcdir)/etc/systemd/system/zfs-load-module.service.in \ + $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \ + $(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \ + $(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \ +Index: zfs-linux-0.8.2/etc/systemd/system/zfs-import-cache.service.in +=================================================================== +--- zfs-linux-0.8.2.orig/etc/systemd/system/zfs-import-cache.service.in ++++ zfs-linux-0.8.2/etc/systemd/system/zfs-import-cache.service.in +@@ -3,7 +3,9 @@ Description=Import ZFS pools by cache fi + Documentation=man:zpool(8) + DefaultDependencies=no + Requires=systemd-udev-settle.service ++Requires=zfs-load-module.service + After=systemd-udev-settle.service ++After=zfs-load-module.service + After=cryptsetup.target + After=systemd-remount-fs.service + Before=zfs-import.target +Index: zfs-linux-0.8.2/etc/systemd/system/zfs-import-scan.service.in +=================================================================== +--- zfs-linux-0.8.2.orig/etc/systemd/system/zfs-import-scan.service.in ++++ zfs-linux-0.8.2/etc/systemd/system/zfs-import-scan.service.in +@@ -3,7 +3,9 @@ Description=Import ZFS pools by device s + Documentation=man:zpool(8) + DefaultDependencies=no + Requires=systemd-udev-settle.service ++Requires=zfs-load-module.service + After=systemd-udev-settle.service ++Requires=zfs-load-module.service + After=cryptsetup.target + Before=zfs-import.target + ConditionPathExists=!@sysconfdir@/zfs/zpool.cache +Index: zfs-linux-0.8.2/etc/systemd/system/zfs-load-module.service.in +=================================================================== +--- /dev/null ++++ zfs-linux-0.8.2/etc/systemd/system/zfs-load-module.service.in +@@ -0,0 +1,17 @@ ++[Unit] ++Description=Install ZFS kernel module ++DefaultDependencies=no ++Requires=systemd-udev-settle.service ++After=systemd-udev-settle.service ++After=cryptsetup.target ++Before=dracut-mount.service ++After=systemd-remount-fs.service ++ ++[Service] ++Type=oneshot ++RemainAfterExit=yes ++ExecStart=/sbin/modprobe zfs ++ ++[Install] ++WantedBy=zfs-mount.service ++WantedBy=zfs.target +Index: zfs-linux-0.8.2/etc/systemd/system/50-zfs.preset.in +=================================================================== +--- zfs-linux-0.8.2.orig/etc/systemd/system/50-zfs.preset.in ++++ zfs-linux-0.8.2/etc/systemd/system/50-zfs.preset.in +@@ -7,3 +7,4 @@ enable zfs-share.service + enable zfs-zed.service + enable zfs-volume-wait.service + enable zfs.target ++enable zfs-load-module.service
  19. Download patch debian/patches/zfs-mount-container-start.patch

    --- 0.8.3-1/debian/patches/zfs-mount-container-start.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.8.3-1ubuntu14/debian/patches/zfs-mount-container-start.patch 2020-03-27 13:56:47.000000000 +0000 @@ -0,0 +1,19 @@ +Description: Start zfs-mount.service after zfs-load-module.service, and if zfs + module was actually loaded. This should allow installation of probert in + containers, which pulls in zfs-linux utilities. +Author: Dimitri John Ledkov <xnox@ubuntu.com> + + +Index: zfs-linux-0.8.3/etc/systemd/system/zfs-mount.service.in +=================================================================== +--- zfs-linux-0.8.3.orig/etc/systemd/system/zfs-mount.service.in ++++ zfs-linux-0.8.3/etc/systemd/system/zfs-mount.service.in +@@ -7,6 +7,8 @@ After=zfs-import.target + After=systemd-remount-fs.service + Before=local-fs.target + Before=systemd-random-seed.service ++After=zfs-load-module.service ++ConditionPathExists=/sys/module/zfs + + [Service] + Type=oneshot
  1. dkms
  2. libpyzy
  3. network-manager
  4. zfs-linux