diff -Nru tgt-1.0.62/debian/changelog tgt-1.0.63/debian/changelog --- tgt-1.0.62/debian/changelog 2016-02-05 02:12:57.000000000 -0600 +++ tgt-1.0.63/debian/changelog 2016-02-08 03:44:36.000000000 -0600 @@ -1,30 +1,18 @@ -tgt (1:1.0.62-1ubuntu2) xenial; urgency=medium +tgt (1:1.0.63-1) unstable; urgency=medium - * debian/patches/tgtd_dont_fail_on_eacces.patch - tgtd: fix root-under-userns errors when attempting oom_score_adj - (Closes: LP:#1518440) - - -- Ryan Harper Mon, 01 Feb 2016 02:18:57 -0600 - -tgt (1:1.0.62-1ubuntu1) xenial; urgency=low - - * Merge from Debian unstable (LP: #1524982, LP: #1518440). Remaining - changes: - - Drop glusterfs support, since it is not in main. - * debian/upstart: - - Dropped, we no longer use upstart (except on Touch, where tgt - isn't used). Isn't worth a delta. - * debian/watch: - - Drop merge conflict markers accidentally left in. - * debian/tests/*: - - Drop delta with Debian here, they imported our tests and improved - them a while back. - * debian/tgt.service: - - Drop delta here, Debian made the same change. - * debian/bash-completion: - - Dropped, Debian has the same thing, just as tgt.bash-completion. + * New upstream release: + + Do not fail on EACCESS on oom_adjust; tgtd can now run in a different + user namespace (Closes: #813368). + * d/control: Use HTTPS URLs for Vcs-* fields. + * d/tests: Check for aio support (alongside rbd and glusterfs). + + -- Apollon Oikonomopoulos Sun, 07 Feb 2016 03:23:45 +0200 + +tgt (1:1.0.62-2) unstable; urgency=medium - -- Michael Terry Mon, 21 Dec 2015 14:20:23 -0500 + * Enable aio support, thanks to Harald Dunkel! (Closes: #811404) + + -- Apollon Oikonomopoulos Tue, 19 Jan 2016 11:22:35 +0200 tgt (1:1.0.62-1) unstable; urgency=medium @@ -75,26 +63,6 @@ -- Apollon Oikonomopoulos Tue, 26 May 2015 12:35:44 +0300 -tgt (1:1.0.57-1ubuntu2) wily; urgency=medium - - * debian/tgt.service: remove spaces between key, = and value for WantedBy, - since it appears to confuse deb-systemd-helper. - - -- Mathieu Trudel-Lapierre Mon, 06 Jul 2015 21:21:58 -0400 - -tgt (1:1.0.57-1ubuntu1) wily; urgency=low - - * Merge from Debian unstable. Remaining changes: - - Drop glusterfs support, since it is not in main. - - debian/patches/fix-config-regression.patch: Dropped no longer - needed. - - debian/patches/fix_delayed_management_request.patch: Dropped - no longer needed. - - debian/patches/fix_leak_of_task_in_scsi_flag.patch: Dropped - no longer needed. - - -- Chuck Short Thu, 07 May 2015 09:29:12 -0400 - tgt (1:1.0.57-1) unstable; urgency=medium * New upstream version: @@ -220,78 +188,6 @@ -- Apollon Oikonomopoulos Mon, 19 May 2014 15:41:46 +0300 -tgt (1:1.0.43-0ubuntu4) trusty; urgency=medium - - * debian/patches/fix_delayed_management_request.patch: Adjust patch to fix - a FTBFS. - * debian/patches/fix_leak_of_task_in_scsi_flag.patch: Adjust patch to fix - a FTBFS. - - -- Chuck Short Fri, 11 Apr 2014 09:14:03 -0400 - -tgt (1:1.0.43-0ubuntu3) trusty; urgency=medium - - * Fix tgt connection issues under heavy load (LP: #1305343) - - debian/patches/fix_delayed_management_request.patch: Fix a crash - of tgtd which occured when removing a target with the --force option - (https://github.com/fujita/tgt/commit/e6e8d0fd3b83208278fb7ed765c3665ae7c5ab49) - - debian/patches/fix_leak_of_task_in_scsi_flag.patch: Clear task_in_scsi flag - when exiting iscsi_tm_execute() and iser_tm_exec() functions. - (https://github.com/fujita/tgt/commit/05fc2cb424863fbf2f3c60a8b617308ef1e370c5) - - -- Chuck Short Wed, 09 Apr 2014 19:35:20 -0400 - -tgt (1:1.0.43-0ubuntu2) trusty; urgency=medium - - * d/p/fix-config-regression.patch: Cherry picked fix from upstream VCS - to resolve regression on configuration of control port. - - -- James Page Tue, 14 Jan 2014 15:11:35 +0000 - -tgt (1:1.0.43-0ubuntu1) trusty; urgency=medium - - * New upstream release. - - -- James Page Tue, 14 Jan 2014 12:05:08 +0000 - -tgt (1:1.0.41-0ubuntu1) trusty; urgency=low - - * New upstream release: - - debian/patches/fix-tgt-admin-bashism: Dropped, included upstream. - * d/control,rules,bash-completion: Enable bash completion support - for tgt commands. - - -- James Page Mon, 11 Nov 2013 15:00:10 +0000 - -tgt (1:1.0.38-0ubuntu1) saucy; urgency=low - - * New upstream release: - - d/p/include-rbd-docs.patch,example-config-use-conf-dot-dee: - Dropped, included upstream. - - Refreshed other patches. - * d/watch: Really update to track github repository for releases. - - -- James Page Tue, 06 Aug 2013 17:38:27 +0100 - -tgt (1:1.0.37-0ubuntu1) saucy; urgency=low - - * Merge from Debian unstable: - - d/control: Drop depends on lsb-base; handled by debhelper. - * d/watch: Updated to track github upstream repository. - * New upstream release (LP: #1191180): - - d/control: Add xsltproc and docbook-xsl to BD's. - - d/p: Refreshed and tidied patches. - * Enable support for Ceph RBD backend: - - d/rules: Add CEPH_RBD=1 to options. - - d/control: Add BD on librbd-dev. - - d/p/include-rbd-docs.patch: Include README.rbd docs. - * Switch to debhelper compat level 8: - - d/rules: Rewrite to use debhelper overrides. - - d/compat,control: Bump compat level and minimum version - requirement for debhelper. - - -- James Page Tue, 18 Jun 2013 13:08:34 +0100 - tgt (1:1.0.17-1.1) unstable; urgency=low * Non-maintainer upload. @@ -302,36 +198,6 @@ -- Thomas Goirand Thu, 11 Apr 2013 23:25:08 +0800 -tgt (1:1.0.17-1ubuntu4) saucy; urgency=low - - * d/tests: added dep-8-tests - - -- Yolanda Tue, 21 May 2013 10:41:18 +0200 - -tgt (1:1.0.17-1ubuntu3) quantal; urgency=low - - * Rebuild for new armel compiler default of ARMv5t. - - -- Colin Watson Mon, 08 Oct 2012 23:02:42 +0100 - -tgt (1:1.0.17-1ubuntu2) precise; urgency=low - - * change /etc/tgt/tgt.conf to support adding config.d format - snippets in /etc/tgt/conf.d (LP: #978507) - * start tgt on installation (LP: #977621) - * stop tgt on shutdown (LP: #820699) - - -- Scott Moser Tue, 10 Apr 2012 23:11:00 -0400 - -tgt (1:1.0.17-1ubuntu1) oneiric; urgency=low - - * Merge from debian remaining changes: - - debian/usptart: Add upstart job. - - Dropped: - - debian/patches/CVE-2011-0001.patch: No longer needed, use debian instead. - - -- Chuck Short Mon, 08 Aug 2011 04:45:03 -0400 - tgt (1:1.0.17-1) unstable; urgency=low * New upstream release. @@ -344,70 +210,12 @@ -- Ben Hutchings Mon, 21 Mar 2011 03:32:59 +0000 -tgt (1:1.0.13-0ubuntu3) oneiric; urgency=low - - * SECURITY UPDATE: denial of service and possible code execution via - double free in iscsi_rx_handler function - - debian/patches/CVE-2011-0001.patch: make sure the received data isn't - larger than INCOMING_BUFSIZE in usr/iscsi/iscsid.c. - - CVE-2011-0001 - - -- Marc Deslauriers Tue, 21 Jun 2011 09:01:03 -0400 - -tgt (1:1.0.13-0ubuntu2) natty; urgency=low - - * debian/upstart: Add respawn to upstart job. (LP: #715686) - - -- Chuck Short Mon, 14 Feb 2011 10:31:26 -0500 - -tgt (1:1.0.13-0ubuntu1) natty; urgency=low - - * New upstream release. - * debian/patches/make-tgt-setup-lun-executable: Dropped no longer needed. - - -- Chuck Short Tue, 08 Feb 2011 10:31:04 -0500 - -tgt (1:1.0.4-2ubuntu1) natty; urgency=low - - * Merge from debian unstable. Remaining changes: - - debian/upstart: Add upstart job. - - Dropped: - + debian/patches/scripts-tgt-admin: Use debian's instead. - - -- Chuck Short Fri, 10 Sep 2010 16:19:59 +0100 - tgt (1:1.0.4-2) unstable; urgency=low * Fix bashism in tgt-admin, thanks to Chris Cheney (Closes: #589716) -- Ben Hutchings Sun, 05 Sep 2010 22:13:52 +0100 -tgt (1:1.0.4-1ubuntu4) maverick; urgency=low - - * debian/upstart: Corrected typo with post-start command; Resolving - "unknown job" error. (LP: #574554) - - -- Dave Walker (Daviey) Mon, 09 Aug 2010 23:49:42 +0100 - -tgt (1:1.0.4-1ubuntu3) maverick; urgency=low - - * tgtd target will not start unless it's configured with "allow-in-use yes" - (LP: 605721) - - -- Chris Cheney Tue, 20 Jul 2010 04:29:56 -0500 - -tgt (1:1.0.4-1ubuntu2) maverick; urgency=low - - * debian/usptart: Add post-start exec to upstart script. (LP: #574554) - - -- Chuck Short Fri, 16 Jul 2010 10:47:33 -0400 - -tgt (1:1.0.4-1ubuntu1) maverick; urgency=low - - * debian/rules, debian/tgt.tgtd.upstart: Add upstart script. (LP: #574554) - - -- Chuck Short Thu, 17 Jun 2010 10:22:39 -0400 - tgt (1:1.0.4-1) unstable; urgency=low * New upstream release. diff -Nru tgt-1.0.62/debian/control tgt-1.0.63/debian/control --- tgt-1.0.62/debian/control 2015-12-10 22:14:18.000000000 -0600 +++ tgt-1.0.63/debian/control 2016-02-07 06:51:38.000000000 -0600 @@ -1,20 +1,19 @@ Source: tgt Section: net Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Apollon Oikonomopoulos +Maintainer: Apollon Oikonomopoulos Build-Depends: debhelper (>= 9), libibverbs-dev, librdmacm-dev (>= 1.0.16), xsltproc, docbook-xsl, dh-systemd (>= 1.5), librbd-dev, - bash-completion, libsystemd-dev -Vcs-Git: git://anonscm.debian.org/collab-maint/tgt.git -Vcs-Browser: http://anonscm.debian.org/gitweb?p=collab-maint/tgt.git;a=summary + glusterfs-common, bash-completion, libsystemd-dev, libaio-dev +Vcs-Git: https://anonscm.debian.org/git/collab-maint/tgt.git +Vcs-Browser: https://anonscm.debian.org/gitweb?p=collab-maint/tgt.git;a=summary Standards-Version: 3.9.6 Homepage: http://stgt.sourceforge.net/ Package: tgt Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, libconfig-general-perl, sg3-utils -Suggests: tgt-rbd +Suggests: tgt-glusterfs, tgt-rbd Description: Linux SCSI target user-space daemon and tools The Linux target framework (tgt) allows a Linux system to provide SCSI devices (targets) over networked SCSI transports. @@ -57,6 +56,29 @@ This package enables tgt to use Ceph/RADOS block devices (RBD) as backing store for SCSI Logical Units. +Package: tgt-glusterfs +Architecture: linux-any +Depends: tgt (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Linux SCSI target user-space daemon and tools - GlusterFS support + The Linux target framework (tgt) allows a Linux system to provide SCSI + devices (targets) over networked SCSI transports. + . + tgt consists of a user-space daemon and user-space tools currently + supporting the following transports: + . + - iSCSI (SCSI over IP) + - iSER (iSCSI over RDMA, using Infiniband) + . + tgt also supports different storage types for use as backing stores for SCSI + Logical Units: + . + - Plain files and block devices + - Ceph/RADOS RBD volumes + - GlusterFS volumes + . + This package enables tgt to use GlusterFS volumes as backing store for SCSI + Logical Units. + Package: tgt-dbg Architecture: linux-any Section: debug diff -Nru tgt-1.0.62/debian/patches/fix-aio-detection.patch tgt-1.0.63/debian/patches/fix-aio-detection.patch --- tgt-1.0.62/debian/patches/fix-aio-detection.patch 1969-12-31 18:00:00.000000000 -0600 +++ tgt-1.0.63/debian/patches/fix-aio-detection.patch 2016-01-19 03:22:12.000000000 -0600 @@ -0,0 +1,16 @@ +Author: Apollon Oikonomopoulos +Description: Search for eventfd.h in /usr/include/ + +Last-Update: 2016-01-19 +Forwarded: no (Debian-specific) +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -25,7 +25,7 @@ + CFLAGS += -DUSE_SYSTEMD + endif + +-ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),) ++ifneq ($(shell test -e /usr/include/$(DEB_HOST_MULTIARCH)/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),) + CFLAGS += -DUSE_EVENTFD + TGTD_OBJS += bs_aio.o + LIBS += -laio diff -Nru tgt-1.0.62/debian/patches/series tgt-1.0.63/debian/patches/series --- tgt-1.0.62/debian/patches/series 2016-02-05 02:12:26.000000000 -0600 +++ tgt-1.0.63/debian/patches/series 2016-01-19 03:18:13.000000000 -0600 @@ -2,4 +2,4 @@ use-docbook-xsl.patch use-dpkg-buildflags.patch do-not-build-html-manpages.patch -tgtd_dont_fail_on_eacces.patch +fix-aio-detection.patch diff -Nru tgt-1.0.62/debian/patches/tgtd_dont_fail_on_eacces.patch tgt-1.0.63/debian/patches/tgtd_dont_fail_on_eacces.patch --- tgt-1.0.62/debian/patches/tgtd_dont_fail_on_eacces.patch 2016-02-05 02:12:26.000000000 -0600 +++ tgt-1.0.63/debian/patches/tgtd_dont_fail_on_eacces.patch 1969-12-31 18:00:00.000000000 -0600 @@ -1,17 +0,0 @@ -Description: tgtd.c: don't fail oom_adjust on EACCESS - Under user-namespace, uid=0 only has user privs and - fails to adjust oom score; this is non-fatal. -Author: Ryan Harper -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1518440 -Last-Update: 2016-01-07 ---- a/usr/tgtd.c -+++ b/usr/tgtd.c -@@ -604,7 +604,7 @@ - } - - err = oom_adjust(); -- if (err && getuid() == 0) -+ if (err && (errno != EACCES) && getuid() == 0) - exit(1); - - err = nr_file_adjust(); diff -Nru tgt-1.0.62/debian/rules tgt-1.0.63/debian/rules --- tgt-1.0.62/debian/rules 2015-12-10 22:14:18.000000000 -0600 +++ tgt-1.0.63/debian/rules 2015-11-09 11:41:01.000000000 -0600 @@ -1,7 +1,7 @@ #!/usr/bin/make -f #export DH_VERBOSE=1 -FEATURES = ISCSI_RDMA=1 CEPH_RBD=1 SD_NOTIFY=1 +FEATURES = ISCSI_RDMA=1 CEPH_RBD=1 GLFS_BD=1 SD_NOTIFY=1 %: dh $@ --parallel --with systemd,bash-completion diff -Nru tgt-1.0.62/debian/tests/control tgt-1.0.63/debian/tests/control --- tgt-1.0.62/debian/tests/control 2015-12-21 13:30:36.000000000 -0600 +++ tgt-1.0.63/debian/tests/control 2016-02-08 03:44:10.000000000 -0600 @@ -1,6 +1,6 @@ Tests: daemon admin Depends: tgt -Tests: modules -Depends: tgt, tgt-rbd +Tests: storage +Depends: tgt, tgt-rbd, tgt-glusterfs Restrictions: needs-root isolation-container allow-stderr diff -Nru tgt-1.0.62/debian/tests/modules tgt-1.0.63/debian/tests/modules --- tgt-1.0.62/debian/tests/modules 2015-12-21 13:38:17.000000000 -0600 +++ tgt-1.0.63/debian/tests/modules 1969-12-31 18:00:00.000000000 -0600 @@ -1,25 +0,0 @@ -#!/bin/sh - -# Restart tgtd to make sure modules are loaded -invoke-rc.d tgt restart || echo "Failed to restart tgt" >&2 - -# Test tgtd module usability -loaded_modules=$(tgtadm --mode sys --op show | \ - awk ' - BEGIN { p = 0 }; - /^[a-zA-Z]/ { p = 0 }; - /^Backing stores/ { p = 1; getline; }; - { if (p) { gsub("^ +", ""); print }; - }') -ret=0 - -for mod in rbd; do - if echo "$loaded_modules" | grep -q "\b$mod\b"; then - echo "OK - $mod module loaded" - else - echo "ERROR - $mod module not loaded" >&2 - ret=1 - fi -done - -exit $ret diff -Nru tgt-1.0.62/debian/tests/storage tgt-1.0.63/debian/tests/storage --- tgt-1.0.62/debian/tests/storage 1969-12-31 18:00:00.000000000 -0600 +++ tgt-1.0.63/debian/tests/storage 2016-02-08 03:44:10.000000000 -0600 @@ -0,0 +1,25 @@ +#!/bin/sh + +# Restart tgtd to make sure modules are loaded +invoke-rc.d tgt restart || echo "Failed to restart tgt" >&2 + +# Test tgtd module usability +supported_bs=$(tgtadm --mode sys --op show | \ + awk ' + BEGIN { p = 0 }; + /^[a-zA-Z]/ { p = 0 }; + /^Backing stores/ { p = 1; getline; }; + { if (p) { gsub("^ +", ""); print }; + }') +ret=0 + +for bs in glfs rbd aio; do + if echo "$supported_bs" | grep -q "\b$bs\b"; then + echo "OK - $bs supported" + else + echo "ERROR - $bs not supported" >&2 + ret=1 + fi +done + +exit $ret diff -Nru tgt-1.0.62/debian/tgt-glusterfs.install tgt-1.0.63/debian/tgt-glusterfs.install --- tgt-1.0.62/debian/tgt-glusterfs.install 1969-12-31 18:00:00.000000000 -0600 +++ tgt-1.0.63/debian/tgt-glusterfs.install 2015-11-09 11:41:01.000000000 -0600 @@ -0,0 +1 @@ +debian/tgt/usr/lib/tgt/backing-store/bs_glfs.so usr/lib/tgt/backing-store diff -Nru tgt-1.0.62/doc/targets.conf.5.xml tgt-1.0.63/doc/targets.conf.5.xml --- tgt-1.0.62/doc/targets.conf.5.xml 2015-12-01 18:27:15.000000000 -0600 +++ tgt-1.0.63/doc/targets.conf.5.xml 2016-02-01 18:18:48.000000000 -0600 @@ -50,8 +50,7 @@ Defines a the start of a target definition. IQN is an ISCSI Qualified - Name such as "iqn.2001-04.com.example:storage1". See "ISCSI" on - Wikipedia for more information on IQNs. + Name such as "iqn.2001-04.com.example:storage1". Within this block should be target-level directives, as diff -Nru tgt-1.0.62/Makefile tgt-1.0.63/Makefile --- tgt-1.0.62/Makefile 2015-12-01 18:27:15.000000000 -0600 +++ tgt-1.0.63/Makefile 2016-02-01 18:18:48.000000000 -0600 @@ -1,4 +1,4 @@ -VERSION ?= 1.0.62 +VERSION ?= 1.0.63 CHECK_CC = cgcc CHECK_CC_FLAGS = '$(CHECK_CC) -Wbitwise -Wno-return-void -no-compile $(ARCH)' diff -Nru tgt-1.0.62/usr/tgtd.c tgt-1.0.63/usr/tgtd.c --- tgt-1.0.62/usr/tgtd.c 2015-12-01 18:27:15.000000000 -0600 +++ tgt-1.0.63/usr/tgtd.c 2016-02-01 18:18:48.000000000 -0600 @@ -604,7 +604,7 @@ } err = oom_adjust(); - if (err && getuid() == 0) + if (err && (errno != EACCES) && getuid() == 0) exit(1); err = nr_file_adjust();