Bug#879755: debootstrap fails with current sid without apt-transport-https and https URLs
Hi, I was wondering if there are any updates on this issue? I have a user reporting this problem on downstream code: https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1772556 And I would like to make sure to not conflict with any upstream debian fixes. Thank you in advance.
Bug#860590: ebtables: Use real locking in ebtables (LP: #1645324)
Package: ebtables Version: 2.0.10.4-3.5 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu zesty ubuntu-patch Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: * Use real locking in ebtables (LP: #1645324) - Prior use of locking by file exclusive access is inadequate because if ebtables crashes or is killed it will leave a stale lock file behind which then blocks new ebtables from running. Thanks for considering the patch. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-70-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) diff -Nru ebtables-2.0.10.4/debian/control ebtables-2.0.10.4/debian/control --- ebtables-2.0.10.4/debian/control 2016-07-28 07:38:12.0 -0500 +++ ebtables-2.0.10.4/debian/control 2017-04-18 19:24:58.0 -0500 @@ -1,8 +1,7 @@ Source: ebtables Section: net Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Jochen Friedrich +Maintainer: Jochen Friedrich Uploaders: William Dauchy Standards-Version: 3.9.6 Build-Depends: debhelper (>= 9), cdbs (>= 0.4.127), dh-systemd (>= 1.5) diff -Nru ebtables-2.0.10.4/debian/patches/series ebtables-2.0.10.4/debian/patches/series --- ebtables-2.0.10.4/debian/patches/series 2016-07-28 07:38:12.0 -0500 +++ ebtables-2.0.10.4/debian/patches/series 2017-04-18 17:29:23.0 -0500 @@ -4,3 +4,4 @@ compensate-for-missing-aligned-u64.patch lockdirfix.patch link_with_no-as-needed.patch +use_real_locking.patch diff -Nru ebtables-2.0.10.4/debian/patches/use_real_locking.patch ebtables-2.0.10.4/debian/patches/use_real_locking.patch --- ebtables-2.0.10.4/debian/patches/use_real_locking.patch 1969-12-31 18:00:00.0 -0600 +++ ebtables-2.0.10.4/debian/patches/use_real_locking.patch 2017-04-18 17:32:14.0 -0500 @@ -0,0 +1,76 @@ +Description: Use real locking in ebtables + Prior use of locking by file exclusive access is inadequate + because if ebtables crashes or is killed it will leave a + stale lock file behind which then blocks new ebtables from + running. +Author: dragan.stance...@canonical.com +Bug: https://bugs.launchpad.net/ubuntu/+source/ebtables/+bug/1645324 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ebtables-2.0.10.4/libebtc.c +=== +--- ebtables-2.0.10.4.orig/libebtc.c ebtables-2.0.10.4/libebtc.c +@@ -137,28 +137,19 @@ void ebt_list_extensions() + #define LOCKDIR "/run" + #define LOCKFILE LOCKDIR"/ebtables.lock" + #endif +-static int lockfd = -1, locked; ++static volatile int lockfd = -1; + int use_lockfd; + /* Returns 0 on success, -1 when the file is locked by another process + * or -2 on any other error. */ + static int lock_file() + { +- int try = 0; +- int ret = 0; +- sigset_t sigset; ++ int try = 0, ret = 0; ++ struct flock fl = {0,}; + + tryagain: +- /* the SIGINT handler will call unlock_file. To make sure the state +- * of the variable locked is correct, we need to temporarily mask the +- * SIGINT interrupt. */ +- sigemptyset(&sigset); +- sigaddset(&sigset, SIGINT); +- sigprocmask(SIG_BLOCK, &sigset, NULL); +- lockfd = open(LOCKFILE, O_CREAT | O_EXCL | O_WRONLY, 00600); ++ lockfd = open(LOCKFILE, O_CREAT | O_WRONLY, 00600); + if (lockfd < 0) { +- if (errno == EEXIST) +- ret = -1; +- else if (try == 1) ++ if (try == 1) + ret = -2; + else { + if (mkdir(LOCKDIR, 00700)) +@@ -169,18 +160,22 @@ tryagain: + } + } + } else { +- close(lockfd); +- locked = 1; ++ fl.l_type = F_WRLCK; ++ ret = fcntl(lockfd, F_SETLK, &fl); ++ if (ret == -1 && errno != (EAGAIN || EACCES)) ++ ret = -2; + } +- sigprocmask(SIG_UNBLOCK, &sigset, NULL); + return ret; + } + + void unlock_file() + { +- if (locked) { +- remove(LOCKFILE); +- locked = 0; ++ struct flock fl = {0,}; ++ ++ if (lockfd > -1) { ++ fl.l_type = F_UNLCK; ++ fcntl(lockfd, F_SETLK, &fl); ++ close(lockfd); + } + } +
Bug#830882: multipath-tools: fix dm- device filtering
Package: multipath-tools Version: 0.5.0+git1.656f8865-5 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu yakkety ubuntu-patch Dear Maintainer, During "service multipath-tools start" /sbin/multipath is called on dm- devices that are filtered but due to a condition conf->dev_type == DEV_DEVNODE in filtering code multipath binary wasn't dropping out when hitting a dm- device. This was due to the fact that in this case conf->dev_type is set to DEV_UEVENT. This is causing the logs to be filled with following messages: multipath: dm-6: failed to get udev uid: Invalid argument multipath: dm-6: failed to get sysfs uid: Invalid argument multipath: dm-6: failed to get sgio uid: No such file or directory In Ubuntu, the attached patch was applied to achieve the following: This change alows the filtering to happen. * multipath-tools: fix dm- device filtering - Allow filtering of DEV_UEVENT dev_type - Resolves LP: #1570093 Thanks for considering the patch. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-28-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/control multipath-tools-0.5.0+git1.656f8865/debian/control --- multipath-tools-0.5.0+git1.656f8865/debian/control 2016-03-23 10:36:54.0 -0500 +++ multipath-tools-0.5.0+git1.656f8865/debian/control 2016-07-12 11:20:25.0 -0500 @@ -1,8 +1,7 @@ Source: multipath-tools Section: admin Priority: extra -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian LVM Team +Maintainer: Debian LVM Team Uploaders: Guido Günther , Ritesh Raj Sarraf Build-Depends: debhelper (>= 7.0.17ubuntu2), po-debconf, libdevmapper-dev (>= 2:1.02.20), libreadline-dev, libaio-dev, libsystemd-dev, systemd, dh-systemd Vcs-Git: git://anonscm.debian.org/pkg-lvm/multipath-tools.git diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch --- multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch 1969-12-31 18:00:00.0 -0600 +++ multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch 2016-07-08 10:13:45.0 -0500 @@ -0,0 +1,43 @@ +From 7dcf982221f1aa63226babaee2c41d8b0652b6d8 Mon Sep 17 00:00:00 2001 +From: Dragan Stancevic +Date: Thu, 23 Jun 2016 15:29:37 -0500 +Subject: [PATCH 1/1] multipath-tools: fix dm- device filtering + +During "service multipath-tools start" /sbin/multipath is +called on dm- devices that are filtered but due to a condition +conf->dev_type == DEV_DEVNODE in filtering code multipath +binary wasn't dropping out when hitting a dm- device. This +was due to the fact that in this case conf->dev_type is +set to DEV_UEVENT. + +This is causing the logs to be filled with following +messages: + +multipath: dm-6: failed to get udev uid: Invalid argument +multipath: dm-6: failed to get sysfs uid: Invalid argument +multipath: dm-6: failed to get sgio uid: No such file or directory + +This change alows the filtering to happen. + +Cc: Christophe Varoqui +Cc: device-mapper development + +Signed-off-by: Dragan Stancevic +--- + multipath/main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: multipath-tools-0.5.0+git1.656f8865/multipath/main.c +=== +--- multipath-tools-0.5.0+git1.656f8865.orig/multipath/main.c multipath-tools-0.5.0+git1.656f8865/multipath/main.c +@@ -267,7 +267,8 @@ configure (void) + /* + * if we have a blacklisted device parameter, exit early + */ +- if (dev && conf->dev_type == DEV_DEVNODE && ++ if (dev && (conf->dev_type == DEV_DEVNODE || ++ conf->dev_type == DEV_UEVENT) && + conf->cmd != CMD_REMOVE_WWID && + (filter_devnode(conf->blist_devnode, + conf->elist_devnode, dev) > 0)) { diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/patches/series multipath-tools-0.5.0+git1.656f8865/debian/patches/series --- multipath-tools-0.5.0+git1.656f8865/debian/patches/series 2016-04-04 21:36:42.0 -0500 +++ multipath-tools-0.5.0+git1.656f8865/debian/patches/series 2016-07-08 10:10:19.0 -0500 @@ -16,3 +16,4 @@ git-kpartx-support-spaces-in-dev-names-b407050a.patch kpartx_more_loopback_fixes.patch enable-find-multipaths.patch +0001-multipath-tools-fix-dm-device-filtering.patch