diff options
Diffstat (limited to 'infra/base-images/base-sanitizer-libs-builder/packages')
15 files changed, 0 insertions, 520 deletions
diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/__init__.py b/infra/base-images/base-sanitizer-libs-builder/packages/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/__init__.py +++ /dev/null diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/boost1_58.py b/infra/base-images/base-sanitizer-libs-builder/packages/boost1_58.py deleted file mode 100644 index 8071b7ecd..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/boost1_58.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import package - - -class Package(package.Package): - """boost1.58 package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('boost1.58', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - # Otherwise py_nonblocking.cpp fails to build. - env['DEB_CXXFLAGS_APPEND'] += ' -std=c++98' diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/gnutls28.py b/infra/base-images/base-sanitizer-libs-builder/packages/gnutls28.py deleted file mode 100644 index f8407a668..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/gnutls28.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import shutil - -import package -import wrapper_utils - - -class Package(package.Package): - """gnutls28 package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('gnutls28', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - configure_wrapper = ( - '#!/bin/bash\n' - '/usr/bin/dh_auto_configure "$@" --disable-hardware-acceleration') - - wrapper_utils.InstallWrapper( - custom_bin_dir, 'dh_auto_configure', configure_wrapper) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/libgcrypt20.py b/infra/base-images/base-sanitizer-libs-builder/packages/libgcrypt20.py deleted file mode 100644 index 9d200af6f..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/libgcrypt20.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import shutil - -import package -import wrapper_utils - - -class Package(package.Package): - """libgcrypt20 package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('libgcrypt20', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - configure_wrapper = ( - '#!/bin/bash\n' - '/usr/bin/dh_auto_configure "$@" --disable-asm') - - wrapper_utils.InstallWrapper( - custom_bin_dir, 'dh_auto_configure', configure_wrapper) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/mesa.py b/infra/base-images/base-sanitizer-libs-builder/packages/mesa.py deleted file mode 100644 index ec2e9d217..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/mesa.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import package - - -class Package(package.Package): - """mesa package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('mesa', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - env['DEB_CXXFLAGS_APPEND'] += ' -std=c++11' diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py b/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py deleted file mode 100644 index e1b0e2f81..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import shutil - -import package - - -def AddNoAsmArg(config_path): - """Add --disable-assembler to config scripts.""" - shutil.move(config_path, config_path + '.real') - with open(config_path, 'w') as f: - f.write( - '#!/bin/sh\n' - '%s.real --disable-assembler "$@"\n' % config_path) - os.chmod(config_path, 0755) - - -class Package(package.Package): - """nettle package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('nettle', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - AddNoAsmArg(os.path.join(source_directory, 'configure')) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py b/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py deleted file mode 100644 index e24ccc588..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import shutil - -import package - - -def AddNoAsmArg(config_path): - """Add --no-asm to config scripts.""" - shutil.move(config_path, config_path + '.real') - with open(config_path, 'w') as f: - f.write( - '#!/bin/sh\n' - '%s.real no-asm "$@"\n' % config_path) - os.chmod(config_path, 0755) - - -class Package(package.Package): - """openssl package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('openssl', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - AddNoAsmArg(os.path.join(source_directory, 'Configure')) - AddNoAsmArg(os.path.join(source_directory, 'config')) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/package.py b/infra/base-images/base-sanitizer-libs-builder/packages/package.py deleted file mode 100644 index 059c23587..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/package.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import subprocess - -import apt - -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) - - -def ApplyPatch(source_directory, patch_name): - """Apply custom patch.""" - subprocess.check_call(['patch', '-p1', '-i', - os.path.join(SCRIPT_DIR, patch_name)], - cwd=source_directory) - - -class PackageException(Exception): - """Base package exception.""" - - -class Package(object): - """Base package.""" - - def __init__(self, name, apt_version): - self.name = name - self.apt_version = apt_version - - def PreBuild(self, source_directory, env, custom_bin_dir): - return - - def PostBuild(self, source_directory, env, custom_bin_dir): - return - - def PreDownload(self, download_directory): - return - - def PostDownload(self, source_directory): - return - - def InstallBuildDeps(self): - """Install build dependencies for a package.""" - subprocess.check_call(['apt-get', 'update']) - subprocess.check_call(['apt-get', 'build-dep', '-y', self.name]) - - # Reload package after update. - self.apt_version = ( - apt.Cache()[self.apt_version.package.name].candidate) - - def DownloadSource(self, download_directory): - """Download the source for a package.""" - self.PreDownload(download_directory) - - source_directory = self.apt_version.fetch_source(download_directory) - - self.PostDownload(source_directory) - return source_directory - - def Build(self, source_directory, env, custom_bin_dir): - """Build .deb packages.""" - self.PreBuild(source_directory, env, custom_bin_dir) - subprocess.check_call( - ['dpkg-buildpackage', '-us', '-uc', '-B'], - cwd=source_directory, env=env) - self.PostBuild(source_directory, env, custom_bin_dir) - - diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/pixman.py b/infra/base-images/base-sanitizer-libs-builder/packages/pixman.py deleted file mode 100644 index 52512461e..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/pixman.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os -import shutil - -import package - - -class Package(package.Package): - """pixman package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('pixman', apt_version) - - def PostDownload(self, source_directory): - # Incorrect checking of GCC vector extension availability. - os.system('sed s/support_for_gcc_vector_extensions=yes/' - 'support_for_gcc_vector_extensions=no/ -i %s/configure.ac' % - source_directory) - - def PreBuild(self, source_directory, env, custom_bin_dir): - blocklist_flag = ' -fsanitize-blacklist=' + os.path.join( - os.path.dirname(os.path.abspath(__file__)), 'pixman_blocklist.txt') - env['DEB_CXXFLAGS_APPEND'] += blocklist_flag - env['DEB_CFLAGS_APPEND'] += blocklist_flag diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/pixman_blocklist.txt b/infra/base-images/base-sanitizer-libs-builder/packages/pixman_blocklist.txt deleted file mode 100644 index 69cf159dd..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/pixman_blocklist.txt +++ /dev/null @@ -1 +0,0 @@ -src:*/pixman-sse2.c diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio.py b/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio.py deleted file mode 100644 index d3ce7a113..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -from __future__ import print_function -import glob -import os -import subprocess - -import package - - -class Package(package.Package): - """PulseAudio package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('pulseaudio', apt_version) - - def PostDownload(self, source_directory): - """Remove blocklisted patches.""" - # Fix *droid* patches. - bad_patch_path = os.path.join( - source_directory, 'debian', 'patches', - '0600-droid-sync-with-upstream-for-Android-5-support-and-b.patch') - if not os.path.exists(bad_patch_path): - return - - print('Applying custom patches.') - package.ApplyPatch(source_directory, 'pulseaudio_fix_android.patch') diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio_fix_android.patch b/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio_fix_android.patch deleted file mode 100644 index e86f79823..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/pulseaudio_fix_android.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- pulseaudio-8.0/src/modules/droid/module-droid-card.c 2017-11-27 22:09:42.533589970 +0000 -+++ pulseaudio-8.0.fixed/src/modules/droid/module-droid-card.c 2017-11-27 22:28:23.847250467 +0000 -@@ -66,10 +66,11 @@ - #include "droid-extcon.h" - #endif - --#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 2 -+#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 4 - #include "module-droid-card-19-symdef.h" - #elif ANDROID_VERSION_MAJOR == 5 && ANDROID_VERSION_MINOR == 1 - #include "module-droid-card-22-symdef.h" -+#else - #endif - - PA_MODULE_AUTHOR("Juho Hämäläinen"); -diff -ru pulseaudio-8.0/src/modules/droid/module-droid-sink.c pulseaudio-8.0.fixed/src/modules/droid/module-droid-sink.c ---- pulseaudio-8.0/src/modules/droid/module-droid-sink.c 2017-11-27 22:09:42.533589970 +0000 -+++ pulseaudio-8.0.fixed/src/modules/droid/module-droid-sink.c 2017-11-27 22:29:53.776348900 +0000 -@@ -40,7 +40,7 @@ - #include "droid-util.h" - #include "droid-sink.h" - --#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 2 -+#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 4 - #include "module-droid-sink-19-symdef.h" - #elif ANDROID_VERSION_MAJOR == 5 && ANDROID_VERSION_MINOR == 1 - #include "module-droid-sink-22-symdef.h" -diff -ru pulseaudio-8.0/src/modules/droid/module-droid-source.c pulseaudio-8.0.fixed/src/modules/droid/module-droid-source.c ---- pulseaudio-8.0/src/modules/droid/module-droid-source.c 2017-11-27 22:09:42.533589970 +0000 -+++ pulseaudio-8.0.fixed/src/modules/droid/module-droid-source.c 2017-11-27 22:30:03.920472828 +0000 -@@ -40,7 +40,7 @@ - #include "droid-util.h" - #include "droid-source.h" - --#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 2 -+#if ANDROID_VERSION_MAJOR == 4 && ANDROID_VERSION_MINOR == 4 - #include "module-droid-source-19-symdef.h" - #elif ANDROID_VERSION_MAJOR == 5 && ANDROID_VERSION_MINOR == 1 - #include "module-droid-source-22-symdef.h" diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/sqlite3.py b/infra/base-images/base-sanitizer-libs-builder/packages/sqlite3.py deleted file mode 100644 index 3e1a1070f..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/sqlite3.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import os - -import package - - -class Package(package.Package): - """sqlite3 package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('sqlite3', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - os.system( - 'sed -i "s/package ifneeded sqlite3//" %s/debian/rules' % - source_directory) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/systemd.py b/infra/base-images/base-sanitizer-libs-builder/packages/systemd.py deleted file mode 100644 index 5cb6d60be..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/systemd.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -from __future__ import print_function -import glob -import os -import subprocess - -import package -import wrapper_utils - - -class Package(package.Package): - """systemd package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('systemd', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - # Hide msan symbols from nm. the systemd build system uses this to find - # undefined symbols and errors out if it does. - nm_wrapper = ( - '#!/bin/bash\n' - '/usr/bin/nm "$@" | grep -E -v "U (__msan|memset)"\n' - 'exit ${PIPESTATUS[0]}\n') - - wrapper_utils.InstallWrapper(custom_bin_dir, 'nm', nm_wrapper, - [wrapper_utils.DpkgHostArchitecture() + '-nm']) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/tar.py b/infra/base-images/base-sanitizer-libs-builder/packages/tar.py deleted file mode 100644 index 74abd5c72..000000000 --- a/infra/base-images/base-sanitizer-libs-builder/packages/tar.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -import package - - -class Package(package.Package): - """tar package.""" - - def __init__(self, apt_version): - super(Package, self).__init__('tar', apt_version) - - def PreBuild(self, source_directory, env, custom_bin_dir): - env['FORCE_UNSAFE_CONFIGURE'] = '1' |