Ubuntu – Checking if Ubuntu package contains desired update

aptrepositoryupdates

Let us consider the example of Clang. ABI compatibility of Clang diverged from GCC5 and compiling things with Clang became quite a challenge in Ubuntu 16.04. At some point, a patch was committed and eventually merged to Clang 3.8.

Clang 3.8 is also available in Ubuntu repos, and when I add LLVM repo myself and update source list and try to install Clang-3.8, the version from Ubuntu repos gets installed as the latest (apt is set to always prefer the highest version).

Without trying to compile code with it to see what happens, is there a good way to check if that patch is already in the Ubuntu repos or not?

Best Answer

One way is to inspect the package changelog:

$ zgrep abi_tag /usr/share/doc/clang-3.8/changelog.Debian.gz
  * Add support for gcc's attribute abi_tag (needed for compatibility with

The changelog is also available online at http://packages.ubuntu.com.

So it looks like the patch you want is included.


The other way is to inspect the patches applied while packaging. You can download the packaging source code and inspect it:

$ apt-get source clang-3.8
Reading package lists... Done
Picking 'llvm-toolchain-3.8' as source package instead of 'clang-3.8'
NOTICE: 'llvm-toolchain-3.8' packaging is maintained in the 'Svn' version control system at:
svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/3.8/
Need to get 37.8 MB of source archives.
Get:1 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (dsc) [5,787 B]
Get:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [358 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [10.6 MB]
Get:4 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [1,641 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [3,974 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [1,996 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (tar) [19.2 MB]
Get:8 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main llvm-toolchain-3.8 1:3.8-2ubuntu4 (diff) [60.1 kB]
Fetched 37.8 MB in 2s (14.7 MB/s)
dpkg-source: info: extracting llvm-toolchain-3.8 in llvm-toolchain-3.8-3.8
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig-clang.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig-clang-tools-extra.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig-compiler-rt.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig-lldb.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8.orig-polly.tar.bz2
dpkg-source: info: unpacking llvm-toolchain-3.8_3.8-2ubuntu4.debian.tar.xz
dpkg-source: info: applying 18-soname.patch
dpkg-source: info: applying 19-clang_debian_version.patch
dpkg-source: info: applying 23-strlcpy_strlcat_warning_removed.diff
dpkg-source: info: applying 27-fix_clang_stdint.diff
dpkg-source: info: applying 26-set-correct-float-abi.diff
dpkg-source: info: applying 0003-Debian-version-info-and-bugreport.patch
dpkg-source: info: applying 0021-shared-lib-debian.patch
dpkg-source: info: applying 0023-link-libopagent.patch
dpkg-source: info: applying 0044-soname.diff
dpkg-source: info: applying scan-build-clang-path.diff
dpkg-source: info: applying declare_clear_cache.diff
dpkg-source: info: applying 31-powerpcspe.diff
dpkg-source: info: applying 34-powerpc-no-altivec.diff
dpkg-source: info: applying clang-format-version.diff
dpkg-source: info: applying disable-execinfo-usage.diff
dpkg-source: info: applying unwind-chain-inclusion.diff
dpkg-source: info: applying hurd-pathmax.diff
dpkg-source: info: applying use-deb-json.diff
dpkg-source: info: applying atomic_library_1.diff
dpkg-source: info: applying atomic_library_2.diff
dpkg-source: info: applying python-clangpath.diff
dpkg-source: info: applying removeduplicatedeclaration.diff
dpkg-source: info: applying fix-clang-path-and-build.diff
dpkg-source: info: applying do-not-fail-on-unexpected-pass.diff
dpkg-source: info: applying silent-more-tests.diff
dpkg-source: info: applying disable-display-PASS-UNSUPPORTED-XFAIL.diff
dpkg-source: info: applying lldb-link-atomic.diff
dpkg-source: info: applying fix-llvm-config-obj-src-root.patch
dpkg-source: info: applying compiler-rt-path.diff
dpkg-source: info: applying lldb-soname.diff
dpkg-source: info: applying force-link-pass.o.diff
dpkg-source: info: applying follow-parallel-var.diff
dpkg-source: info: applying hurd-EIEIO-undef.diff
dpkg-source: info: applying silent-MCJIIT-tests.diff
dpkg-source: info: applying lldb-libname.diff
dpkg-source: info: applying compiler-rt-i586.diff
dpkg-source: info: applying clang-analyzer-force-version.diff
dpkg-source: info: applying fix-cmake-config-prefix.diff
dpkg-source: info: applying llvm25468-lldb-swig-format-security.diff
dpkg-source: info: applying llvm26003-sanitizer-check-env.diff
dpkg-source: info: applying drop-avx512-from-skylake.diff
dpkg-source: info: applying D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff
dpkg-source: info: applying D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff

There are a lot of patches being applied, among them:

$ grep abi_tag llvm-toolchain-3.8-3.8/debian/patches -Rm1
llvm-toolchain-3.8-3.8/debian/patches/D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff:+  // abi_tag is a gcc attribute, taking one or more strings called "tags".
llvm-toolchain-3.8-3.8/debian/patches/series:D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff
llvm-toolchain-3.8-3.8/debian/patches/D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff:+This text tries to describe gcc semantic for mangling "abi_tag" attributes

So you have at least two patches applied for abi_tag.

Related Question