~jslarraz/ubuntu-security-tools:add-apt-source-to-autopkgtest

Last commit made on 2024-02-28
Get this branch:
git clone -b add-apt-source-to-autopkgtest https://git.launchpad.net/~jslarraz/ubuntu-security-tools
Only Jorge Sancho Larraz can upload to this branch. If you are Jorge Sancho Larraz please log in for upload directions.

Branch merges

Branch information

Name:
add-apt-source-to-autopkgtest
Repository:
lp:~jslarraz/ubuntu-security-tools

Recent commits

262bcc7... by Jorge Sancho Larraz

umt/autopkgtest: hack around missing deb-src entries in cloud-image

Succeeded
[SUCCEEDED] unit-tests:0 (build)
11 of 1 result
0e9fc5c... by Jorge Sancho Larraz

umt/autopkgtest: add add apt source by default

Succeeded
[SUCCEEDED] unit-tests:0 (build)
11 of 1 result
fe0ee66... by Alex Murray

build-tools/umt: fix invalid escape sequence in regexes

With Python 3.12 (default now in noble) the python interpreter complains about
these at runtime, so fix them up to avoid the noise - see example as follows:

[amurray:/tmp] $ umt download gtk+3.0 -r noble
/home/amurray/bin/umt:129: SyntaxWarning: invalid escape sequence '\d'
  (rc4, _) = runcmd(['grep', '-P', '\d+:\s+[0-9A-F]+:0050', "/proc/net/tcp" ])
/home/amurray/bin/umt:130: SyntaxWarning: invalid escape sequence '\d'
  (rc6, _) = runcmd(['grep', '-P', '\d+:\s+[0-9A-F]+:0050', "/proc/net/tcp6" ])
/home/amurray/bin/umt:1067: SyntaxWarning: invalid escape sequence '\+'
  pattern = re.compile(r' %s( |_)%s ' % (pkg.replace('+', '\+'), ver.replace('+', '\+')))
/home/amurray/bin/umt:1067: SyntaxWarning: invalid escape sequence '\+'
  pattern = re.compile(r' %s( |_)%s ' % (pkg.replace('+', '\+'), ver.replace('+', '\+')))
/home/amurray/bin/umt:1536: SyntaxWarning: invalid escape sequence '\/'
  if re.search('[WE]: Failed to fetch .*\/debian-installer\/', report):
/home/amurray/bin/umt:1946: SyntaxWarning: invalid escape sequence '\+'
  esm_version_match = re.search("[\+~]esm\d+", details['version'])
/home/amurray/bin/umt:4338: SyntaxWarning: invalid escape sequence '\-'
  build_script = build_script + '''
/home/amurray/bin/umt:4351: SyntaxWarning: invalid escape sequence '\-'
  build_script = build_script + '''
/home/amurray/bin/umt:4503: SyntaxWarning: invalid escape sequence '\s'
  build_script = build_script + '''
/home/amurray/bin/umt:4738: SyntaxWarning: invalid escape sequence '\.'
  if re.search('^[a-z0-9][a-z0-9+\.\-]+$', details['package']) == None:
/home/amurray/bin/umt:4754: SyntaxWarning: invalid escape sequence '\.'
  magic = '^[^-]+-(.*~ppa[0-9]+|(0(\.0)?ubuntu)?(1|0\.1|0\.(6.06|6.10|7.04|7.10|8.04|8.10|9.04)(\.1)?))$'
/home/amurray/bin/umt:5047: SyntaxWarning: invalid escape sequence '\s'
  changelog_text = snip(report, '^Changes:\s*$', '^[^ ]')
/home/amurray/bin/umt:5053: SyntaxWarning: invalid escape sequence '\+'
  if re.search('^ ' + details['source'].replace('+', '\+'), line):
/home/amurray/bin/umt:5062: SyntaxWarning: invalid escape sequence '\s'
  changes_text = snip(changes.read(), '^Changes:\s*$', '^[^ ]')
/home/amurray/bin/umt:5065: SyntaxWarning: invalid escape sequence '\+'
  if re.search('^ ' + details['source'].replace('+', '\+'), line):
/home/amurray/bin/umt:5609: SyntaxWarning: invalid escape sequence '\$'
  if re.search('^\$maintainer_name', line):
/home/amurray/bin/umt:5610: SyntaxWarning: invalid escape sequence '\g'
  keyid = re.sub(".*<(.*)>.*", "\g<1>", line.strip())
Downloading 'gtk+3.0' version '3.24.40-2ubuntu1' for release 'noble'.

Signed-off-by: Alex Murray <email address hidden>

1790b31... by Camila Camargo de Matos

Adding ccdm94 monument (thank you all for the amazing times)

1cd82ca... by David Fernandez Gonzalez

[UMT] Build the first ESM version inside ESM schroot.

When we create the first ESM version of a package,
the tool will suggest a regular schroot for the
build since that's the only version it's aware of.

This changes the behavior to use the right
ESM schroot when building, since the package
will be built on LP using the ESM PPAs.

Signed-off-by: David Fernandez Gonzalez <email address hidden>

b9690b1... by Alex Murray

package-tools/debcompare: fix handling of files which become symlinks

Ensure we can still compare a package where a file then comes a symlink without
failing internally with errors like the following:

Filetypes have changed on the following files:

./usr/lib/x86_64-linux-gnu/libdbus-1.so:
old filetype: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped (symbolic link)
new filetype: broken symbolic link to libdbus-1.so.3.32.4
Traceback (most recent call last):
  File "/home/amurray/ubuntu/git/ubuntu-security-tools/package-tools/debcompare", line 682, in <module>
    compare_debs(old_deb, new_deb)
  File "/home/amurray/ubuntu/git/ubuntu-security-tools/package-tools/debcompare", line 661, in compare_debs
    compare_files(old_deb.deb_files, new_deb.deb_files)
  File "/home/amurray/ubuntu/git/ubuntu-security-tools/package-tools/debcompare", line 536, in compare_files
    different_libdeps = find_different_libdeps(old, new)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amurray/ubuntu/git/ubuntu-security-tools/package-tools/debcompare", line 377, in find_different_libdeps
    new[filename]['libdeps'].sort()
    ~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'libdeps'

Signed-off-by: Alex Murray <email address hidden>

8bcd5f1... by Marc Deslauriers

umt: fix typo in openssl warning, and limit it to bionic

7323913... by Marc Deslauriers

umt: clarify bind9 warning

7838e3c... by Marc Deslauriers

umt: clarify bind9 warning

03a11dc... by Alex Murray

build-tools/umt: don't set -a for autopkgtest by default

This should only be used when doing cross-arch testing (ie. i386 on amd64 VM)
not when doing say armhf on a armhf VM - in that case all that is needed is to
pass the --qemu-architecture flag as we are already doing.

See https://wiki.ubuntu.com/ProposedMigration?action=diff&rev1=75&rev2=76 for
details.

Signed-off-by: Alex Murray <email address hidden>