Snap Builds using SVN Unable to Access Internet

Bug #1668358 reported by Nathan Handler
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
launchpad-buildd
Fix Released
Low
Colin Watson

Bug Description

I attempted to build a simple snap from a Launchpad git repository using the snap builders. It failed due to not being able to connect to the internet to do the 'svn checkout'. kyrofa suspected that this might have something to do with the proxy.

Sample Build Log: https://launchpadlibrarian.net/308886188/buildlog_snap_ubuntu_xenial_amd64_labelnation_BUILDING.txt.gz

Relevant Snippet:

Pulling labelnation
svn: E170013: Unable to connect to a repository at URL 'http://svn.red-bean.com/repos/labelnation'
svn: E670002: Name or service not known
Command '['svn', 'checkout', 'http://svn.red-bean.com/repos/labelnation', '/build/labelnation/parts/labelnation/src', '-r', '218']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 202, in main
    builder.pull()
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 139, in pull
    env=env)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 92, in run_build_command
    self.chroot(["/bin/sh", "-c", command], echo=echo)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 66, in chroot
    "/usr/bin/sudo", "/usr/sbin/chroot", self.chroot_path] + args)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-24123/chroot-autobuild', 'linux64', '/bin/sh', '-c', 'cd /build/labelnation && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 SNAPCRAFT_SETUP_CORE=1 http_proxy=http://snap-proxy.launchpad.net:3128 SNAPCRAFT_LOCAL_SOURCES=1 snapcraft pull']' returned non-zero exit status 1

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :

Same error here for https://code.launchpad.net/~osomon/+snap/0ad-svn:

Pulling 0ad-svn-build
svn: E170013: Unable to connect to a repository at URL 'http://svn.wildfiregames.com/public/ps/trunk'
svn: E670002: Name or service not known
Command '['svn', 'checkout', 'http://svn.wildfiregames.com/public/ps/trunk/', '/build/0ad-svn/parts/0ad-svn-build/src']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 240, in main
    builder.pull()
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 177, in pull
    env=env)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 100, in run_build_command
    ["/bin/sh", "-c", command], echo=echo, get_output=get_output)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 71, in chroot
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-38414/chroot-autobuild', 'linux64', '/bin/sh', '-c', 'cd /build/0ad-svn && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 SNAPCRAFT_LOCAL_SOURCES=1 SNAPCRAFT_SETUP_CORE=1 http_proxy=http://snap-proxy.launchpad.net:3128 GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy snapcraft pull']' returned non-zero exit status 1

I’m guessing launchpad-buildd needs something like https://code.launchpad.net/~cjwatson/launchpad-buildd/snap-git-proxy/+merge/323691 for SVN ?

Changed in launchpad-buildd:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

See also bug 1718245.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

Is there a plan on the roadmap to get this fixed? While SVN isn't the RCS du-jour, not supporting it knocks out some significant (if old school) source code hosting providers.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Note: what I did for 0ad is to use a git mirror of the svn repository. This works around the issue.

Revision history for this message
Michael Vogt (mvo) wrote :

I'm also hit by this trying to build a "josm" snap from svn via LP (https://launchpadlibrarian.net/378375793/buildlog_snap_ubuntu_xenial_i386_josm-edge_BUILDING.txt.gz).

It looks like svn simply does not support the http_proxy and custom code for svn must be written to write out the proxy info into the svn configuration at ~/.subversion/servers

Colin Watson (cjwatson)
Changed in launchpad-buildd:
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → Low
status: Confirmed → In Progress
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: In Progress → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

\o/

Revision history for this message
Colin Watson (cjwatson) wrote :

Sorry for the slightly delayed deployment; but this is all rolled out now.

Changed in launchpad-buildd:
status: Fix Committed → Fix Released
Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks Colin!

Airkm (airkm)
Changed in launchpad-buildd:
assignee: Colin Watson (cjwatson) → Airkm (airkm)
information type: Public → Private Security
William Grant (wgrant)
information type: Private Security → Public
Changed in launchpad-buildd:
assignee: Airkm (airkm) → Colin Watson (cjwatson)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.