Commit 88bba03a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove tons of duplicate codes.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40611 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1693790e
...@@ -159,6 +159,19 @@ class AssertSoftwareMixin(unittest.TestCase): ...@@ -159,6 +159,19 @@ class AssertSoftwareMixin(unittest.TestCase):
else: else:
raise raise
def assertLibraryList(self, path, library_list=None, software_list=None,
additional_runpath_list=None):
elf_dict = readElfAsDict(path)
if library_list is not None:
self.assertEqual(sorted(library_list), elf_dict['library_list'], path)
if software_list is not None:
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
runpath_list = [os.path.join(soft_dir, software, 'lib') for
software in software_list]
if additional_runpath_list is not None:
runpath_list.extend(additional_runpath_list)
self.assertEqual(sorted(runpath_list), elf_dict['runpath_list'], path)
def assertSoftwareDictEmpty(self, first, msg=None): def assertSoftwareDictEmpty(self, first, msg=None):
try: try:
return unittest.TestCase.assertEqual(self, first, {}, msg) return unittest.TestCase.assertEqual(self, first, {}, msg)
...@@ -231,8 +244,7 @@ class AssertSoftwareRunable(AssertSoftwareMixin): ...@@ -231,8 +244,7 @@ class AssertSoftwareRunable(AssertSoftwareMixin):
class AssertMysql50Tritonn(AssertSoftwareMixin): class AssertMysql50Tritonn(AssertSoftwareMixin):
def test_ld_mysqld(self): def test_ld_mysqld(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/libexec/mysqld') self.assertLibraryList('parts/mysql-tritonn-5.0/libexec/mysqld', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -246,21 +258,16 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -246,21 +258,16 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libssl', 'libssl',
'libstdc++', 'libstdc++',
'libz', 'libz',
]), elf_dict['library_list']) ], [
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'openssl', 'openssl',
'readline', 'readline',
'senna', 'senna',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqlmanager(self): def test_ld_mysqlmanager(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/libexec/mysqlmanager') self.assertLibraryList('parts/mysql-tritonn-5.0/libexec/mysqlmanager', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -271,21 +278,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -271,21 +278,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libssl', 'libssl',
'libstdc++', 'libstdc++',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'zlib', 'zlib',
'readline', 'readline',
'openssl', 'openssl',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libmysqlclient_r(self): def test_ld_libmysqlclient_r(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/lib/mysql/libmysqlclient_r.so') self.assertLibraryList('parts/mysql-tritonn-5.0/lib/mysql/libmysqlclient_r.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -294,21 +295,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -294,21 +295,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libpthread', 'libpthread',
'libssl', 'libssl',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'openssl', 'openssl',
'readline', 'readline',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libmysqlclient(self): def test_ld_libmysqlclient(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/lib/mysql/libmysqlclient.so') self.assertLibraryList('parts/mysql-tritonn-5.0/lib/mysql/libmysqlclient.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -316,21 +311,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -316,21 +311,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libnsl', 'libnsl',
'libssl', 'libssl',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'openssl', 'openssl',
'readline', 'readline',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_sphinx(self): def test_ld_sphinx(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/lib/mysql/sphinx.so') self.assertLibraryList('parts/mysql-tritonn-5.0/lib/mysql/sphinx.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libgcc_s', 'libgcc_s',
...@@ -338,21 +327,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -338,21 +327,15 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libnsl', 'libnsl',
'libpthread', 'libpthread',
'libstdc++', 'libstdc++',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'openssl', 'openssl',
'readline', 'readline',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysql(self): def test_ld_mysql(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/bin/mysql') self.assertLibraryList('parts/mysql-tritonn-5.0/bin/mysql', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -365,22 +348,16 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -365,22 +348,16 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libssl', 'libssl',
'libstdc++', 'libstdc++',
'libz', 'libz',
]), elf_dict['library_list']) ], [
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'zlib', 'zlib',
'readline', 'readline',
'openssl', 'openssl',
]] ], [os.path.join(os.path.abspath(os.curdir),
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir), 'parts', 'mysql-tritonn-5.0', 'lib', 'mysql')])
'parts', 'mysql-tritonn-5.0', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqladmin(self): def test_ld_mysqladmin(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/bin/mysqladmin') self.assertLibraryList('parts/mysql-tritonn-5.0/bin/mysqladmin', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libcrypto', 'libcrypto',
...@@ -391,138 +368,73 @@ class AssertMysql50Tritonn(AssertSoftwareMixin): ...@@ -391,138 +368,73 @@ class AssertMysql50Tritonn(AssertSoftwareMixin):
'libssl', 'libssl',
'libstdc++', 'libstdc++',
'libz', 'libz',
]), elf_dict['library_list']) ], [
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'openssl', 'openssl',
'readline', 'readline',
'zlib', 'zlib',
]] ], [os.path.join(os.path.abspath(os.curdir),
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir), 'parts', 'mysql-tritonn-5.0', 'lib', 'mysql')])
'parts', 'mysql-tritonn-5.0', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqldump(self): def test_ld_mysqldump(self):
elf_dict = readElfAsDict('parts/mysql-tritonn-5.0/bin/mysqldump') self.assertLibraryList('parts/mysql-tritonn-5.0/bin/mysqldump', ['libc', 'libcrypt', 'libcrypto', 'libm',
self.assertEqual(sorted(['libc', 'libcrypt', 'libcrypto', 'libm', 'libmysqlclient', 'libnsl', 'libssl', 'libz'], ['ncurses', 'zlib', 'readline', 'openssl'], [os.path.join(os.path.abspath(os.curdir),
'libmysqlclient', 'libnsl', 'libssl', 'libz']), elf_dict['library_list']) 'parts', 'mysql-tritonn-5.0', 'lib', 'mysql')])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline', 'openssl']]
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir),
'parts', 'mysql-tritonn-5.0', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertMysql51(AssertSoftwareMixin): class AssertMysql51(AssertSoftwareMixin):
def test_ld_mysqld(self): def test_ld_mysqld(self):
elf_dict = readElfAsDict('parts/mysql-5.1/libexec/mysqld') self.assertLibraryList('parts/mysql-5.1/libexec/mysqld', ['libc', 'libcrypt', 'libdl', 'libgcc_s', 'libm', 'libnsl',
self.assertEqual(sorted(['libc', 'libcrypt', 'libdl', 'libgcc_s', 'libm', 'libnsl', 'libpthread', 'libstdc++', 'libz'], ['ncurses', 'zlib', 'readline'])
'libpthread', 'libstdc++', 'libz']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqlmanager(self): def test_ld_mysqlmanager(self):
elf_dict = readElfAsDict('parts/mysql-5.1/libexec/mysqlmanager') self.assertLibraryList('parts/mysql-5.1/libexec/mysqlmanager', ['libc', 'libcrypt', 'libgcc_s', 'libm', 'libnsl',
self.assertEqual(sorted(['libc', 'libcrypt', 'libgcc_s', 'libm', 'libnsl', 'libpthread', 'libstdc++', 'libz'], ['ncurses', 'zlib', 'readline'])
'libpthread', 'libstdc++', 'libz']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libmysqlclient_r(self): def test_ld_libmysqlclient_r(self):
elf_dict = readElfAsDict('parts/mysql-5.1/lib/mysql/libmysqlclient_r.so') self.assertLibraryList('parts/mysql-5.1/lib/mysql/libmysqlclient_r.so', ['libc', 'libz', 'libcrypt', 'libm', 'libnsl', 'libpthread'], ['ncurses', 'zlib', 'readline'])
self.assertEqual(sorted(['libc', 'libz', 'libcrypt', 'libm', 'libnsl', 'libpthread']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libmysqlclient(self): def test_ld_libmysqlclient(self):
elf_dict = readElfAsDict('parts/mysql-5.1/lib/mysql/libmysqlclient.so') self.assertLibraryList('parts/mysql-5.1/lib/mysql/libmysqlclient.so', ['libc', 'libz', 'libcrypt', 'libm', 'libnsl', 'libpthread'], ['ncurses', 'readline', 'zlib'])
self.assertEqual(sorted(['libc', 'libz', 'libcrypt', 'libm', 'libnsl', 'libpthread']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'readline', 'zlib']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysql(self): def test_ld_mysql(self):
elf_dict = readElfAsDict('parts/mysql-5.1/bin/mysql') self.assertLibraryList('parts/mysql-5.1/bin/mysql', ['libc', 'libz', 'libcrypt', 'libgcc_s', 'libm',
self.assertEqual(sorted(['libc', 'libz', 'libcrypt', 'libgcc_s', 'libm',
'libmysqlclient', 'libncurses', 'libnsl', 'libpthread', 'libreadline', 'libmysqlclient', 'libncurses', 'libnsl', 'libpthread', 'libreadline',
'libstdc++']), elf_dict['library_list']) 'libstdc++'], ['ncurses', 'zlib', 'readline'],
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts') [os.path.join(os.path.abspath(os.curdir),
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for 'parts', 'mysql-5.1', 'lib', 'mysql')])
software in ['ncurses', 'zlib', 'readline']]
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir),
'parts', 'mysql-5.1', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqladmin(self): def test_ld_mysqladmin(self):
elf_dict = readElfAsDict('parts/mysql-5.1/bin/mysqladmin') self.assertLibraryList('parts/mysql-5.1/bin/mysqladmin', ['libc', 'libz', 'libcrypt', 'libgcc_s', 'libm',
self.assertEqual(sorted(['libc', 'libz', 'libcrypt', 'libgcc_s', 'libm', 'libmysqlclient', 'libnsl', 'libpthread', 'libstdc++'], ['ncurses', 'zlib', 'readline'],
'libmysqlclient', 'libnsl', 'libpthread', 'libstdc++']), [os.path.join(os.path.abspath(os.curdir),
elf_dict['library_list']) 'parts', 'mysql-5.1', 'lib', 'mysql')])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline']]
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir),
'parts', 'mysql-5.1', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_mysqldump(self): def test_ld_mysqldump(self):
elf_dict = readElfAsDict('parts/mysql-5.1/bin/mysqldump') self.assertLibraryList('parts/mysql-5.1/bin/mysqldump', ['libc', 'libz', 'libcrypt', 'libm', 'libmysqlclient',
self.assertEqual(sorted(['libc', 'libz', 'libcrypt', 'libm', 'libmysqlclient', 'libnsl', 'libpthread'], ['ncurses', 'zlib', 'readline'],
'libnsl', 'libpthread']), elf_dict['library_list']) [os.path.join(os.path.abspath(os.curdir),
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts') 'parts', 'mysql-5.1', 'lib', 'mysql')])
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['ncurses', 'zlib', 'readline']]
expected_rpath_list.append(os.path.join(os.path.abspath(os.curdir),
'parts', 'mysql-5.1', 'lib', 'mysql'))
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertSqlite3(AssertSoftwareMixin): class AssertSqlite3(AssertSoftwareMixin):
"""Tests for built memcached""" """Tests for built memcached"""
def test_ld_bin_sqlite3(self): def test_ld_bin_sqlite3(self):
elf_dict = readElfAsDict('parts/sqlite3/bin/sqlite3') self.assertLibraryList('parts/sqlite3/bin/sqlite3', ['libpthread', 'libc', 'libdl', 'libsqlite3'], ['sqlite3'])
self.assertEqual(sorted(['libpthread', 'libc', 'libdl', 'libsqlite3']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['sqlite3']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsqlite3(self): def test_ld_libsqlite3(self):
elf_dict = readElfAsDict('parts/sqlite3/lib/libsqlite3.so') self.assertLibraryList('parts/sqlite3/lib/libsqlite3.so', ['libpthread', 'libc', 'libdl'], [])
self.assertEqual(sorted(['libpthread', 'libc', 'libdl']),
elf_dict['library_list'])
self.assertEqual([], elf_dict['runpath_list'])
class AssertMemcached(AssertSoftwareMixin): class AssertMemcached(AssertSoftwareMixin):
"""Tests for built memcached""" """Tests for built memcached"""
def test_ld_memcached(self): def test_ld_memcached(self):
"""Checks proper linking to libevent from memcached""" """Checks proper linking to libevent from memcached"""
elf_dict = readElfAsDict('parts/memcached/bin/memcached') self.assertLibraryList('parts/memcached/bin/memcached', ['libpthread', 'libevent-1.4', 'libc'], ['libevent'])
self.assertEqual(sorted(['libpthread', 'libevent-1.4', 'libc']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['libevent']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertSubversion(AssertSoftwareMixin): class AssertSubversion(AssertSoftwareMixin):
"""Tests for built subversion""" """Tests for built subversion"""
def test_ld_svn(self): def test_ld_svn(self):
elf_dict = readElfAsDict('parts/subversion/bin/svn') self.assertLibraryList('parts/subversion/bin/svn', ['libsvn_client-1', 'libsvn_wc-1', 'libsvn_ra-1',
self.assertEqual(sorted(['libsvn_client-1', 'libsvn_wc-1', 'libsvn_ra-1',
'libsvn_diff-1', 'libsvn_ra_local-1', 'libsvn_repos-1', 'libsvn_fs-1', 'libsvn_diff-1', 'libsvn_ra_local-1', 'libsvn_repos-1', 'libsvn_fs-1',
'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_ra_svn-1', 'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_ra_svn-1',
'libsvn_delta-1', 'libsvn_subr-1', 'libsqlite3', 'libxml2', 'libsvn_delta-1', 'libsvn_subr-1', 'libsqlite3', 'libxml2',
...@@ -530,73 +442,43 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -530,73 +442,43 @@ class AssertSubversion(AssertSoftwareMixin):
'libz', 'libssl', 'libcrypto', 'libsvn_ra_neon-1', 'libz', 'libssl', 'libcrypto', 'libsvn_ra_neon-1',
'libc', 'libcrypt', 'libdl', 'libm', 'libc', 'libcrypt', 'libdl', 'libm',
'libpthread', 'libneon' 'libpthread', 'libneon'
]), ], ['apache', 'libexpat', 'openssl', 'neon', 'libxml2',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'openssl', 'neon', 'libxml2',
'sqlite3', 'subversion', 'zlib', 'libuuid']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svnadmin(self): def test_ld_svnadmin(self):
elf_dict = readElfAsDict('parts/subversion/bin/svnadmin') self.assertLibraryList('parts/subversion/bin/svnadmin', ['libsvn_repos-1', 'libsvn_fs-1',
self.assertEqual(sorted(['libsvn_repos-1', 'libsvn_fs-1',
'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1',
'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt',
'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svndumpfilter(self): def test_ld_svndumpfilter(self):
elf_dict = readElfAsDict('parts/subversion/bin/svndumpfilter') self.assertLibraryList('parts/subversion/bin/svndumpfilter', ['libsvn_repos-1', 'libsvn_fs-1',
self.assertEqual(sorted(['libsvn_repos-1', 'libsvn_fs-1',
'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1',
'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt',
'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svnlook(self): def test_ld_svnlook(self):
elf_dict = readElfAsDict('parts/subversion/bin/svnlook') self.assertLibraryList('parts/subversion/bin/svnlook', ['libsvn_repos-1', 'libsvn_fs-1', 'libsvn_diff-1',
self.assertEqual(sorted(['libsvn_repos-1', 'libsvn_fs-1', 'libsvn_diff-1',
'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1',
'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt',
'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svnserve(self): def test_ld_svnserve(self):
elf_dict = readElfAsDict('parts/subversion/bin/svnserve') self.assertLibraryList('parts/subversion/bin/svnserve', ['libsvn_repos-1', 'libsvn_fs-1', 'libsvn_ra_svn-1',
self.assertEqual(sorted(['libsvn_repos-1', 'libsvn_fs-1', 'libsvn_ra_svn-1',
'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_fs_fs-1', 'libsvn_fs_util-1', 'libsvn_delta-1', 'libsvn_subr-1',
'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libsqlite3', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt',
'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libexpat', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svnsync(self): def test_ld_svnsync(self):
elf_dict = readElfAsDict('parts/subversion/bin/svnsync') self.assertLibraryList('parts/subversion/bin/svnsync', [
self.assertEqual(sorted([
'libapr-1', 'libapr-1',
'libaprutil-1', 'libaprutil-1',
'libc', 'libc',
...@@ -623,11 +505,7 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -623,11 +505,7 @@ class AssertSubversion(AssertSoftwareMixin):
'libuuid', 'libuuid',
'libxml2', 'libxml2',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'apache', 'apache',
'libexpat', 'libexpat',
'libuuid', 'libuuid',
...@@ -637,67 +515,41 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -637,67 +515,41 @@ class AssertSubversion(AssertSoftwareMixin):
'sqlite3', 'sqlite3',
'subversion', 'subversion',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_svnversion(self): def test_ld_svnversion(self):
elf_dict = readElfAsDict('parts/subversion/bin/svnversion') self.assertLibraryList('parts/subversion/bin/svnversion', ['libsvn_diff-1', 'libsvn_wc-1',
self.assertEqual(sorted(['libsvn_diff-1', 'libsvn_wc-1',
'libsvn_delta-1', 'libsvn_subr-1', 'libsqlite3', 'libsvn_delta-1', 'libsvn_subr-1', 'libsqlite3',
'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat',
'libz', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libz', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_client(self): def test_ld_libsvn_client(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_client-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_client-1.so', ['libsvn_diff-1', 'libsvn_wc-1',
self.assertEqual(sorted(['libsvn_diff-1', 'libsvn_wc-1',
'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_ra-1', 'libsvn_delta-1', 'libsvn_subr-1', 'libsvn_ra-1',
'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat',
'libc', 'libcrypt', 'libdl', 'libpthread', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
elf_dict['library_list']) 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_delta(self): def test_ld_libsvn_delta(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_delta-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_delta-1.so', [
self.assertEqual(sorted([
'libsvn_subr-1', 'libz', 'libsvn_subr-1', 'libz',
'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libexpat',
'libc', 'libcrypt', 'libdl', 'libpthread', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
elf_dict['library_list']) 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_diff(self): def test_ld_libsvn_diff(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_diff-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_diff-1.so', [
self.assertEqual(sorted([
'libsvn_subr-1', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt', 'libsvn_subr-1', 'libaprutil-1', 'libapr-1', 'libuuid', 'librt',
'libexpat', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libexpat', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
elf_dict['library_list']) 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_fs(self): def test_ld_libsvn_fs(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_fs-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_fs-1.so', [
self.assertEqual(sorted([
'libapr-1', 'libapr-1',
'libc', 'libc',
'libcrypt', 'libcrypt',
...@@ -709,76 +561,46 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -709,76 +561,46 @@ class AssertSubversion(AssertSoftwareMixin):
'libsvn_fs_util-1', 'libsvn_fs_util-1',
'libsvn_subr-1', 'libsvn_subr-1',
'libuuid', 'libuuid',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'apache', 'apache',
'libuuid', 'libuuid',
'neon', 'neon',
'sqlite3', 'sqlite3',
'subversion', 'subversion',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_fs_fs(self): def test_ld_libsvn_fs_fs(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_fs_fs-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_fs_fs-1.so', ['libsvn_delta-1', 'libaprutil-1', 'libexpat',
self.assertEqual(sorted(['libsvn_delta-1', 'libaprutil-1', 'libexpat',
'libsvn_fs_util-1', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'librt', 'libsvn_fs_util-1', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'librt',
'libc', 'libcrypt', 'libdl', 'libpthread', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
elf_dict['library_list']) 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_fs_util(self): def test_ld_libsvn_fs_util(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_fs_util-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_fs_util-1.so', ['libaprutil-1', 'libexpat',
self.assertEqual(sorted(['libaprutil-1', 'libexpat',
'libsvn_subr-1', 'libapr-1', 'libuuid', 'librt', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'librt',
'libc', 'libcrypt', 'libdl', 'libpthread', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
elf_dict['library_list']) 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'sqlite3', 'subversion', 'zlib',
'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_ra(self): def test_ld_libsvn_ra(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_ra-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_ra-1.so', ['libaprutil-1', 'libsvn_delta-1', 'libsvn_fs-1',
self.assertEqual(sorted(['libaprutil-1', 'libsvn_delta-1', 'libsvn_fs-1',
'libsvn_ra_local-1', 'libsvn_ra_neon-1', 'libsvn_ra_svn-1', 'libsvn_ra_local-1', 'libsvn_ra_neon-1', 'libsvn_ra_svn-1',
'libsvn_repos-1', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'libsvn_repos-1', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid',
'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_ra_local(self): def test_ld_libsvn_ra_local(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_ra_local-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_ra_local-1.so', ['libaprutil-1', 'libsvn_delta-1', 'libsvn_fs-1',
self.assertEqual(sorted(['libaprutil-1', 'libsvn_delta-1', 'libsvn_fs-1',
'libsvn_repos-1', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'libsvn_repos-1', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid',
'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_ra_neon(self): def test_ld_libsvn_ra_neon(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_ra_neon-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_ra_neon-1.so', [
self.assertEqual(sorted([
'libapr-1', 'libapr-1',
'libaprutil-1', 'libaprutil-1',
'libc', 'libc',
...@@ -796,11 +618,7 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -796,11 +618,7 @@ class AssertSubversion(AssertSoftwareMixin):
'libuuid', 'libuuid',
'libxml2', 'libxml2',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'apache', 'apache',
'libexpat', 'libexpat',
'libuuid', 'libuuid',
...@@ -810,66 +628,40 @@ class AssertSubversion(AssertSoftwareMixin): ...@@ -810,66 +628,40 @@ class AssertSubversion(AssertSoftwareMixin):
'sqlite3', 'sqlite3',
'subversion', 'subversion',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_ra_svn(self): def test_ld_libsvn_ra_svn(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_ra_svn-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_ra_svn-1.so', ['libaprutil-1', 'libsvn_delta-1',
self.assertEqual(sorted(['libaprutil-1', 'libsvn_delta-1',
'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid',
'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_repos(self): def test_ld_libsvn_repos(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_repos-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_repos-1.so', ['libaprutil-1', 'libsvn_delta-1',
self.assertEqual(sorted(['libaprutil-1', 'libsvn_delta-1',
'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'libsvn_fs-1', 'libexpat', 'libsvn_subr-1', 'libapr-1', 'libuuid', 'libsvn_fs-1',
'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'subversion', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_subr(self): def test_ld_libsvn_subr(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_subr-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_subr-1.so', ['libaprutil-1', 'libexpat', 'libapr-1',
self.assertEqual(sorted(['libaprutil-1', 'libexpat', 'libapr-1',
'libuuid', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libuuid', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
'libsqlite3', 'libz', 'libsqlite3', 'libz',
]), ], ['apache', 'libexpat',
elf_dict['library_list']) 'sqlite3', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat',
'sqlite3', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsvn_wc(self): def test_ld_libsvn_wc(self):
elf_dict = readElfAsDict('parts/subversion/lib/libsvn_wc-1.so') self.assertLibraryList('parts/subversion/lib/libsvn_wc-1.so', ['libaprutil-1', 'libexpat', 'libapr-1',
self.assertEqual(sorted(['libaprutil-1', 'libexpat', 'libapr-1',
'libsvn_delta-1', 'libsvn_diff-1', 'libsvn_subr-1', 'libsvn_delta-1', 'libsvn_diff-1', 'libsvn_subr-1',
'libuuid', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread', 'libuuid', 'librt', 'libc', 'libcrypt', 'libdl', 'libpthread',
]), ], ['apache', 'libexpat', 'subversion',
elf_dict['library_list']) 'sqlite3', 'zlib', 'libuuid', 'neon'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'libexpat', 'subversion',
'sqlite3', 'zlib', 'libuuid', 'neon']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertNeon(AssertSoftwareMixin): class AssertNeon(AssertSoftwareMixin):
"""Tests for built neon""" """Tests for built neon"""
def test_ld_libneon(self): def test_ld_libneon(self):
elf_dict = readElfAsDict('parts/neon/lib/libneon.so') self.assertLibraryList('parts/neon/lib/libneon.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypto', 'libcrypto',
'libdl', 'libdl',
...@@ -877,16 +669,11 @@ class AssertNeon(AssertSoftwareMixin): ...@@ -877,16 +669,11 @@ class AssertNeon(AssertSoftwareMixin):
'libssl', 'libssl',
'libxml2', 'libxml2',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'libxml2', 'libxml2',
'openssl', 'openssl',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_neonconfig(self): def test_neonconfig(self):
popen = subprocess.Popen([os.path.join('parts', 'neon', 'bin', 'neon-config'), popen = subprocess.Popen([os.path.join('parts', 'neon', 'bin', 'neon-config'),
...@@ -941,23 +728,13 @@ class AssertApache(AssertSoftwareMixin): ...@@ -941,23 +728,13 @@ class AssertApache(AssertSoftwareMixin):
def test_ld_libaprutil1(self): def test_ld_libaprutil1(self):
"""Checks proper linking of libaprutil-1.so""" """Checks proper linking of libaprutil-1.so"""
elf_dict = readElfAsDict('parts/apache/lib/libaprutil-1.so') self.assertLibraryList('parts/apache/lib/libaprutil-1.so', ['libexpat', 'libapr-1', 'librt', 'libcrypt',
self.assertEqual(sorted(['libexpat', 'libapr-1', 'librt', 'libcrypt', 'libpthread', 'libdl', 'libc', 'libuuid'], ['apache', 'zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
'libpthread', 'libdl', 'libc', 'libuuid']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['apache', 'zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libapr1(self): def test_ld_libapr1(self):
"""Checks proper linking of libapr-1.so""" """Checks proper linking of libapr-1.so"""
elf_dict = readElfAsDict('parts/apache/lib/libapr-1.so') self.assertLibraryList('parts/apache/lib/libapr-1.so', ['librt', 'libcrypt', 'libuuid',
self.assertEqual(sorted(['librt', 'libcrypt', 'libuuid', 'libpthread', 'libdl', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
'libpthread', 'libdl', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_modules(self): def test_modules(self):
required_module_list = sorted([q.strip() for q in """ required_module_list = sorted([q.strip() for q in """
...@@ -1048,687 +825,279 @@ class AssertApache(AssertSoftwareMixin): ...@@ -1048,687 +825,279 @@ class AssertApache(AssertSoftwareMixin):
self.assertEqual(loaded_module_list, required_module_list) self.assertEqual(loaded_module_list, required_module_list)
def test_ld_module_mod_actions(self): def test_ld_module_mod_actions(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_actions.so') self.assertLibraryList('parts/apache/modules/mod_actions.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_alias(self): def test_ld_module_mod_alias(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_alias.so') self.assertLibraryList('parts/apache/modules/mod_alias.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_asis(self): def test_ld_module_mod_asis(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_asis.so') self.assertLibraryList('parts/apache/modules/mod_asis.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_auth_basic(self): def test_ld_module_mod_auth_basic(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_auth_basic.so') self.assertLibraryList('parts/apache/modules/mod_auth_basic.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_auth_digest(self): def test_ld_module_mod_auth_digest(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_auth_digest.so') self.assertLibraryList('parts/apache/modules/mod_auth_digest.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_alias(self): def test_ld_module_mod_authn_alias(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_alias.so') self.assertLibraryList('parts/apache/modules/mod_authn_alias.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_anon(self): def test_ld_module_mod_authn_anon(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_anon.so') self.assertLibraryList('parts/apache/modules/mod_authn_anon.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_dbd(self): def test_ld_module_mod_authn_dbd(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_dbd.so') self.assertLibraryList('parts/apache/modules/mod_authn_dbd.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_dbm(self): def test_ld_module_mod_authn_dbm(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_dbm.so') self.assertLibraryList('parts/apache/modules/mod_authn_dbm.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_default(self): def test_ld_module_mod_authn_default(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_default.so') self.assertLibraryList('parts/apache/modules/mod_authn_default.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authn_file(self): def test_ld_module_mod_authn_file(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authn_file.so') self.assertLibraryList('parts/apache/modules/mod_authn_file.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_dbm(self): def test_ld_module_mod_authz_dbm(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_dbm.so') self.assertLibraryList('parts/apache/modules/mod_authz_dbm.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_default(self): def test_ld_module_mod_authz_default(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_default.so') self.assertLibraryList('parts/apache/modules/mod_authz_default.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_groupfile(self): def test_ld_module_mod_authz_groupfile(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_groupfile.so') self.assertLibraryList('parts/apache/modules/mod_authz_groupfile.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_host(self): def test_ld_module_mod_authz_host(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_host.so') self.assertLibraryList('parts/apache/modules/mod_authz_host.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_owner(self): def test_ld_module_mod_authz_owner(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_owner.so') self.assertLibraryList('parts/apache/modules/mod_authz_owner.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_authz_user(self): def test_ld_module_mod_authz_user(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_authz_user.so') self.assertLibraryList('parts/apache/modules/mod_authz_user.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_autoindex(self): def test_ld_module_mod_autoindex(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_autoindex.so') self.assertLibraryList('parts/apache/modules/mod_autoindex.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_bucketeer(self): def test_ld_module_mod_bucketeer(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_bucketeer.so') self.assertLibraryList('parts/apache/modules/mod_bucketeer.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_cache(self): def test_ld_module_mod_cache(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_cache.so') self.assertLibraryList('parts/apache/modules/mod_cache.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_case_filter(self): def test_ld_module_mod_case_filter(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_case_filter.so') self.assertLibraryList('parts/apache/modules/mod_case_filter.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_case_filter_in(self): def test_ld_module_mod_case_filter_in(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_case_filter_in.so') self.assertLibraryList('parts/apache/modules/mod_case_filter_in.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_cern_meta(self): def test_ld_module_mod_cern_meta(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_cern_meta.so') self.assertLibraryList('parts/apache/modules/mod_cern_meta.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_cgi(self): def test_ld_module_mod_cgi(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_cgi.so') self.assertLibraryList('parts/apache/modules/mod_cgi.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_cgid(self): def test_ld_module_mod_cgid(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_cgid.so') self.assertLibraryList('parts/apache/modules/mod_cgid.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_charset_lite(self): def test_ld_module_mod_charset_lite(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_charset_lite.so') self.assertLibraryList('parts/apache/modules/mod_charset_lite.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_dav(self): def test_ld_module_mod_dav(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_dav.so') self.assertLibraryList('parts/apache/modules/mod_dav.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_dav_fs(self): def test_ld_module_mod_dav_fs(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_dav_fs.so') self.assertLibraryList('parts/apache/modules/mod_dav_fs.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_dbd(self): def test_ld_module_mod_dbd(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_dbd.so') self.assertLibraryList('parts/apache/modules/mod_dbd.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_deflate(self): def test_ld_module_mod_deflate(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_deflate.so') self.assertLibraryList('parts/apache/modules/mod_deflate.so', ['libpthread', 'libc', 'libz'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc', 'libz']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_dir(self): def test_ld_module_mod_dir(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_dir.so') self.assertLibraryList('parts/apache/modules/mod_dir.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_disk_cache(self): def test_ld_module_mod_disk_cache(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_disk_cache.so') self.assertLibraryList('parts/apache/modules/mod_disk_cache.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_dumpio(self): def test_ld_module_mod_dumpio(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_dumpio.so') self.assertLibraryList('parts/apache/modules/mod_dumpio.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_echo(self): def test_ld_module_mod_echo(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_echo.so') self.assertLibraryList('parts/apache/modules/mod_echo.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_env(self): def test_ld_module_mod_env(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_env.so') self.assertLibraryList('parts/apache/modules/mod_env.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_expires(self): def test_ld_module_mod_expires(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_expires.so') self.assertLibraryList('parts/apache/modules/mod_expires.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_ext_filter(self): def test_ld_module_mod_ext_filter(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_ext_filter.so') self.assertLibraryList('parts/apache/modules/mod_ext_filter.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_filter(self): def test_ld_module_mod_filter(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_filter.so') self.assertLibraryList('parts/apache/modules/mod_filter.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_headers(self): def test_ld_module_mod_headers(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_headers.so') self.assertLibraryList('parts/apache/modules/mod_headers.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_ident(self): def test_ld_module_mod_ident(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_ident.so') self.assertLibraryList('parts/apache/modules/mod_ident.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_imagemap(self): def test_ld_module_mod_imagemap(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_imagemap.so') self.assertLibraryList('parts/apache/modules/mod_imagemap.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_include(self): def test_ld_module_mod_include(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_include.so') self.assertLibraryList('parts/apache/modules/mod_include.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_info(self): def test_ld_module_mod_info(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_info.so') self.assertLibraryList('parts/apache/modules/mod_info.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_log_config(self): def test_ld_module_mod_log_config(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_log_config.so') self.assertLibraryList('parts/apache/modules/mod_log_config.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_log_forensic(self): def test_ld_module_mod_log_forensic(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_log_forensic.so') self.assertLibraryList('parts/apache/modules/mod_log_forensic.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_logio(self): def test_ld_module_mod_logio(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_logio.so') self.assertLibraryList('parts/apache/modules/mod_logio.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_mime(self): def test_ld_module_mod_mime(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_mime.so') self.assertLibraryList('parts/apache/modules/mod_mime.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_mime_magic(self): def test_ld_module_mod_mime_magic(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_mime_magic.so') self.assertLibraryList('parts/apache/modules/mod_mime_magic.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_negotiation(self): def test_ld_module_mod_negotiation(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_negotiation.so') self.assertLibraryList('parts/apache/modules/mod_negotiation.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_optional_fn_export(self): def test_ld_module_mod_optional_fn_export(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_optional_fn_export.so') self.assertLibraryList('parts/apache/modules/mod_optional_fn_export.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_optional_fn_import(self): def test_ld_module_mod_optional_fn_import(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_optional_fn_import.so') self.assertLibraryList('parts/apache/modules/mod_optional_fn_import.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_optional_hook_export(self): def test_ld_module_mod_optional_hook_export(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_optional_hook_export.so') self.assertLibraryList('parts/apache/modules/mod_optional_hook_export.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_optional_hook_import(self): def test_ld_module_mod_optional_hook_import(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_optional_hook_import.so') self.assertLibraryList('parts/apache/modules/mod_optional_hook_import.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy(self): def test_ld_module_mod_proxy(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy.so') self.assertLibraryList('parts/apache/modules/mod_proxy.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_ajp(self): def test_ld_module_mod_proxy_ajp(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_ajp.so') self.assertLibraryList('parts/apache/modules/mod_proxy_ajp.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_balancer(self): def test_ld_module_mod_proxy_balancer(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_balancer.so') self.assertLibraryList('parts/apache/modules/mod_proxy_balancer.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_connect(self): def test_ld_module_mod_proxy_connect(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_connect.so') self.assertLibraryList('parts/apache/modules/mod_proxy_connect.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_ftp(self): def test_ld_module_mod_proxy_ftp(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_ftp.so') self.assertLibraryList('parts/apache/modules/mod_proxy_ftp.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_http(self): def test_ld_module_mod_proxy_http(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_http.so') self.assertLibraryList('parts/apache/modules/mod_proxy_http.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_proxy_scgi(self): def test_ld_module_mod_proxy_scgi(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_proxy_scgi.so') self.assertLibraryList('parts/apache/modules/mod_proxy_scgi.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_reqtimeout(self): def test_ld_module_mod_reqtimeout(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_reqtimeout.so') self.assertLibraryList('parts/apache/modules/mod_reqtimeout.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_rewrite(self): def test_ld_module_mod_rewrite(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_rewrite.so') self.assertLibraryList('parts/apache/modules/mod_rewrite.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_setenvif(self): def test_ld_module_mod_setenvif(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_setenvif.so') self.assertLibraryList('parts/apache/modules/mod_setenvif.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_speling(self): def test_ld_module_mod_speling(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_speling.so') self.assertLibraryList('parts/apache/modules/mod_speling.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_ssl(self): def test_ld_module_mod_ssl(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_ssl.so') self.assertLibraryList('parts/apache/modules/mod_ssl.so', ['libpthread', 'libc', 'libcrypto', 'libdl',
self.assertEqual(sorted(['libpthread', 'libc', 'libcrypto', 'libdl', 'libssl', 'libz'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
'libssl', 'libz']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_status(self): def test_ld_module_mod_status(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_status.so') self.assertLibraryList('parts/apache/modules/mod_status.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_substitute(self): def test_ld_module_mod_substitute(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_substitute.so') self.assertLibraryList('parts/apache/modules/mod_substitute.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_unique_id(self): def test_ld_module_mod_unique_id(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_unique_id.so') self.assertLibraryList('parts/apache/modules/mod_unique_id.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_userdir(self): def test_ld_module_mod_userdir(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_userdir.so') self.assertLibraryList('parts/apache/modules/mod_userdir.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_usertrack(self): def test_ld_module_mod_usertrack(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_usertrack.so') self.assertLibraryList('parts/apache/modules/mod_usertrack.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_version(self): def test_ld_module_mod_version(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_version.so') self.assertLibraryList('parts/apache/modules/mod_version.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_module_mod_vhost_alias(self): def test_ld_module_mod_vhost_alias(self):
elf_dict = readElfAsDict('parts/apache/modules/mod_vhost_alias.so') self.assertLibraryList('parts/apache/modules/mod_vhost_alias.so', ['libpthread', 'libc'], ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre'])
self.assertEqual(sorted(['libpthread', 'libc']), elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['zlib', 'openssl', 'libuuid', 'libexpat', 'pcre']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertItools(AssertSoftwareMixin): class AssertItools(AssertSoftwareMixin):
def test_ld_parserso(self): def test_ld_parserso(self):
elf_dict = readElfAsDict('parts/itools/lib/itools/xml/parser.so') self.assertLibraryList('parts/itools/lib/itools/xml/parser.so', ['libc', 'libglib-2.0', 'libpthread'], ['glib'])
self.assertEqual(sorted(['libc', 'libglib-2.0', 'libpthread']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['glib']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertOpenssl(AssertSoftwareMixin): class AssertOpenssl(AssertSoftwareMixin):
def test_ld_openssl(self): def test_ld_openssl(self):
elf_dict = readElfAsDict('parts/openssl/bin/openssl') self.assertLibraryList('parts/openssl/bin/openssl', ['libc', 'libcrypto', 'libdl', 'libssl'], ['openssl'])
self.assertEqual(sorted(['libc', 'libcrypto', 'libdl', 'libssl']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['openssl']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertCyrusSasl(AssertSoftwareMixin): class AssertCyrusSasl(AssertSoftwareMixin):
def test_ld_pluginviewer(self): def test_ld_pluginviewer(self):
elf_dict = readElfAsDict('parts/cyrus-sasl/sbin/pluginviewer') self.assertLibraryList('parts/cyrus-sasl/sbin/pluginviewer', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libresolv', 'libresolv',
'libsasl2', 'libsasl2',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'cyrus-sasl', 'cyrus-sasl',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libsasl2(self): def test_ld_libsasl2(self):
elf_dict = readElfAsDict('parts/cyrus-sasl/lib/libsasl2.so') self.assertLibraryList('parts/cyrus-sasl/lib/libsasl2.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libresolv', 'libresolv',
]), ], [
elf_dict['library_list']) ])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
]]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_sasl2_libanonymous(self): def test_ld_sasl2_libanonymous(self):
elf_dict = readElfAsDict('parts/cyrus-sasl/lib/sasl2/libanonymous.so') self.assertLibraryList('parts/cyrus-sasl/lib/sasl2/libanonymous.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libresolv', 'libresolv',
]), ], [
elf_dict['library_list']) ])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
]]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_sasl2_libcrammd5(self): def test_ld_sasl2_libcrammd5(self):
elf_dict = readElfAsDict('parts/cyrus-sasl/lib/sasl2/libcrammd5.so') self.assertLibraryList('parts/cyrus-sasl/lib/sasl2/libcrammd5.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libresolv', 'libresolv',
]), ], [
elf_dict['library_list']) ])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
]]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_sasl2_libplain(self): def test_ld_sasl2_libplain(self):
elf_dict = readElfAsDict('parts/cyrus-sasl/lib/sasl2/libplain.so') self.assertLibraryList('parts/cyrus-sasl/lib/sasl2/libplain.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libcrypt', 'libcrypt',
'libresolv', 'libresolv',
]), ], [
elf_dict['library_list']) ])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
]]
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertPython26(AssertSoftwareMixin): class AssertPython26(AssertSoftwareMixin):
def test_ld_dyn_locale(self): def test_ld_dyn_locale(self):
elf_dict = readElfAsDict('parts/python2.6/lib/python2.6/lib-dynload/_locale.so') self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/_locale.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libintl', 'libintl',
'libpthread', 'libpthread',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'bzip2', 'bzip2',
'gdbm', 'gdbm',
'gettext', 'gettext',
...@@ -1738,46 +1107,32 @@ class AssertPython26(AssertSoftwareMixin): ...@@ -1738,46 +1107,32 @@ class AssertPython26(AssertSoftwareMixin):
'readline', 'readline',
'sqlite3', 'sqlite3',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertGettext(AssertSoftwareMixin): class AssertGettext(AssertSoftwareMixin):
def test_ld_libintl(self): def test_ld_libintl(self):
elf_dict = readElfAsDict('parts/gettext/lib/libintl.so') self.assertLibraryList('parts/gettext/lib/libintl.so', [
self.assertEqual(sorted([
'libc', 'libc',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'libxml2', 'libxml2',
'ncurses', 'ncurses',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libasprintf(self): def test_ld_libasprintf(self):
elf_dict = readElfAsDict('parts/gettext/lib/libasprintf.so') self.assertLibraryList('parts/gettext/lib/libasprintf.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libgcc_s', 'libgcc_s',
'libm', 'libm',
'libstdc++', 'libstdc++',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'libxml2', 'libxml2',
'ncurses', 'ncurses',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libgettextlib(self): def test_ld_libgettextlib(self):
elf_dict = readElfAsDict('parts/gettext/lib/libgettextlib.so') self.assertLibraryList('parts/gettext/lib/libgettextlib.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libintl', 'libintl',
...@@ -1785,38 +1140,26 @@ class AssertGettext(AssertSoftwareMixin): ...@@ -1785,38 +1140,26 @@ class AssertGettext(AssertSoftwareMixin):
'libncurses', 'libncurses',
'libxml2', 'libxml2',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'gettext', 'gettext',
'libxml2', 'libxml2',
'ncurses', 'ncurses',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libgettextpo(self): def test_ld_libgettextpo(self):
elf_dict = readElfAsDict('parts/gettext/lib/libgettextpo.so') self.assertLibraryList('parts/gettext/lib/libgettextpo.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libintl', 'libintl',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'gettext', 'gettext',
'libxml2', 'libxml2',
'ncurses', 'ncurses',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_libgettextsrc(self): def test_ld_libgettextsrc(self):
elf_dict = readElfAsDict('parts/gettext/lib/libgettextsrc.so') self.assertLibraryList('parts/gettext/lib/libgettextsrc.so', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libgettextlib-0.18.1', 'libgettextlib-0.18.1',
...@@ -1825,22 +1168,16 @@ class AssertGettext(AssertSoftwareMixin): ...@@ -1825,22 +1168,16 @@ class AssertGettext(AssertSoftwareMixin):
'libncurses', 'libncurses',
'libxml2', 'libxml2',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'gettext', 'gettext',
'libxml2', 'libxml2',
'ncurses', 'ncurses',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertLibxslt(AssertSoftwareMixin): class AssertLibxslt(AssertSoftwareMixin):
def test_ld_xsltproc(self): def test_ld_xsltproc(self):
elf_dict = readElfAsDict('parts/libxslt/bin/xsltproc') self.assertLibraryList('parts/libxslt/bin/xsltproc', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libexslt', 'libexslt',
...@@ -1848,21 +1185,15 @@ class AssertLibxslt(AssertSoftwareMixin): ...@@ -1848,21 +1185,15 @@ class AssertLibxslt(AssertSoftwareMixin):
'libxml2', 'libxml2',
'libxslt', 'libxslt',
'libz', 'libz',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'libxml2', 'libxml2',
'libxslt', 'libxslt',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertW3m(AssertSoftwareMixin): class AssertW3m(AssertSoftwareMixin):
def test_ld_w3m(self): def test_ld_w3m(self):
elf_dict = readElfAsDict('parts/w3m/bin/w3m') self.assertLibraryList('parts/w3m/bin/w3m', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libcrypto', 'libcrypto',
...@@ -1872,22 +1203,16 @@ class AssertW3m(AssertSoftwareMixin): ...@@ -1872,22 +1203,16 @@ class AssertW3m(AssertSoftwareMixin):
'libnsl', 'libnsl',
'libpthread', 'libpthread',
'libssl', 'libssl',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'garbage-collector', 'garbage-collector',
'ncurses', 'ncurses',
'openssl', 'openssl',
'zlib', 'zlib',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertVarnish(AssertSoftwareMixin): class AssertVarnish(AssertSoftwareMixin):
def test_ld_varnishd(self): def test_ld_varnishd(self):
elf_dict = readElfAsDict('parts/varnish-2.1/sbin/varnishd') self.assertLibraryList('parts/varnish-2.1/sbin/varnishd', [
self.assertEqual(sorted([
'libc', 'libc',
'libdl', 'libdl',
'libm', 'libm',
...@@ -1896,34 +1221,23 @@ class AssertVarnish(AssertSoftwareMixin): ...@@ -1896,34 +1221,23 @@ class AssertVarnish(AssertSoftwareMixin):
'libvarnish', 'libvarnish',
'libvarnishcompat', 'libvarnishcompat',
'libvcl', 'libvcl',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'varnish-2.1', 'varnish-2.1',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
def test_ld_varnishtop(self): def test_ld_varnishtop(self):
elf_dict = readElfAsDict('parts/varnish-2.1/bin/varnishtop') self.assertLibraryList('parts/varnish-2.1/bin/varnishtop', [
self.assertEqual(sorted([
'libc', 'libc',
'libncurses', 'libncurses',
'libpthread', 'libpthread',
'libvarnish', 'libvarnish',
'libvarnishapi', 'libvarnishapi',
'libvarnishcompat', 'libvarnishcompat',
]), ], [
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in [
'ncurses', 'ncurses',
'varnish-2.1', 'varnish-2.1',
]] ])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
class AssertElfLinkedInternally(AssertSoftwareMixin): class AssertElfLinkedInternally(AssertSoftwareMixin):
def test(self): def test(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment