Control: tags -1 patch Hi Antonio,
On Thu, Apr 27, 2017 at 2:49 PM, Antonio Terceiro <terce...@debian.org> wrote: > On Tue, Apr 18, 2017 at 03:50:15PM +0200, Balint Reczey wrote: >> Package: autopkgtest >> Version: 4.3 >> >> Dear Maintainers, >> >> Running autopkgtest testsuite of libdbd-mysql-perl fails on s390x due >> to the long socket filename: >> >> ( From https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1680577 ) >> ... >> 2017-03-29T08:40:18.627231Z 0 [Warning] Failed to set up SSL because >> of the following SSL library error: SSL context is not usable without >> certificate and private key >> 2017-03-29T08:40:18.627257Z 0 [ERROR] The socket file path is too long >> (> 107): >> /data/adttmp/autopkgtest-virt-lxc.shared.y4ui3net/downtmp/build.R3s/libdbd-mysql-perl-4.041/t/testdb/mysql.sock >> 2017-03-29T08:40:18.627267Z 0 [ERROR] Aborting >> >> 2017-03-29T08:40:18.627278Z 0 [Note] Binlog end >> 2017-03-29T08:40:18.627315Z 0 [Note] Shutting down plugin 'ngram' >> 2017-03-29T08:40:18.627328Z 0 [Note] Shutting down plugin 'partition' >> 2017-03-29T08:40:18.627337Z 0 [Note] Shutting down plugin 'BLACKHOLE' >> ... >> >> A few characters could be cut in the package's test itself, but the >> same problem may affect many other packages and fixing the issue in >> autopkgtest seems bring more benefits. >> >> The system configuration addst the beginning of the path, but it is >> not very long compared to the standard "/tmp": >> "/data/adttmp/" >> >> The test itself generates the following path inside the source >> directory which is not a huge portion of the path either: >> "t/testdb/mysql.sock" >> >> Autopkgtest generates the longest part: >> "autopkgtest-virt-lxc.shared.y4ui3net/downtmp/build.R3s/libdbd-mysql-perl-4.041" >> >> I proposed a patch which cuts a few characters from the prefix by >> abbreviating "autopkgtest-virt-lxc.shared.", but the source directory >> for the package could also be just "src" instead of the full package >> name with version especially since this can be much longer than in the >> current case. >> >> Before preparing an updated patch I wanted to ask for your opinion >> regarding the path to be taken ( :-) ). > > I am not an autopkgtest maintainer, but I think we could maybe have the > source tree in a very short path right on top of /, like /src, or > /autopkgtest/src ... however I am not sure how that would impact the > current codebase. I have implemented this in the attached patch. I hope the maintainter likes it as it worked nicely for me. Cheers, Balint -- Balint Reczey Debian & Ubuntu Developer
From cf86f2f2f640dd2880c41c73e2b90afbbf2abdb9 Mon Sep 17 00:00:00 2001 From: Balint Reczey <balint.rec...@canonical.com> Date: Thu, 4 May 2017 02:01:56 +0200 Subject: [PATCH] Use ".../src" as temporary package build directory instead of <package name>-<version>. This makes build path predictably shorter. Closes: #860554 --- runner/autopkgtest | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runner/autopkgtest b/runner/autopkgtest index 2f43446..fe7e93d 100755 --- a/runner/autopkgtest +++ b/runner/autopkgtest @@ -321,7 +321,7 @@ def build_source(kind, arg, built_binaries): p = adt_testbed.Path(testbed, part, os.path.join(testbed.scratch, os.path.basename(part))) p.copydown() - create_command = 'dpkg-source -x "%s"' % dsc_tb + create_command = 'dpkg-source -x "%s" src' % dsc_tb elif kind == 'unbuilt-tree': dsc = os.path.join(tmp, 'fake.dsc') @@ -385,10 +385,10 @@ def build_source(kind, arg, built_binaries): ' ver=${srcversion:-$pkg_candidate};' ' dpkg --compare-versions "$ver" lt "$maxver" || maxver="$ver";' 'done;' - '[ -z "$maxver" ] || maxver="=$maxver";' - 'OUT=$(apt-get source -q --only-source %(src)s$maxver 2>&1) || RC=$?;' + '[ -z "$maxver" ] || maxver="$maxver";' + 'OUT=$(apt-get source -d -q --only-source %(src)s=$maxver 2>&1) || RC=$?;' 'if [ -n "$RC" ]; then if echo "$OUT" | grep -q "Unable to find a source package"; then exit 1; else exit $RC; fi; fi;' - 'echo "$OUT" | grep ^Get: || true' % {'src': arg}) + 'echo "$OUT" | grep ^Get: ; dpkg-source -x %(src)s_$maxver.dsc src' % {'src': arg}) elif kind == 'git-source': url, _, branch = arg.partition('#') create_command = "git clone '%s' || { sleep 15; git clone '%s'; }" % (url, url) -- 2.7.4