From 0ca76f370eeabe4f633c58a4d190d5ffe0d64369 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Jul 30 2018 13:37:26 +0000 Subject: Fix FTBFS in Rawhide Signed-off-by: Peter Lemenkov --- diff --git a/erlang-rpm-macros-0001-Don-t-use-byte-strings.patch b/erlang-rpm-macros-0001-Don-t-use-byte-strings.patch new file mode 100644 index 0000000..1418995 --- /dev/null +++ b/erlang-rpm-macros-0001-Don-t-use-byte-strings.patch @@ -0,0 +1,49 @@ +From: Peter Lemenkov +Date: Mon, 30 Jul 2018 15:46:19 +0300 +Subject: [PATCH] Don't use byte strings + +Signed-off-by: Peter Lemenkov + +diff --git a/erlang-find-requires.py b/erlang-find-requires.py +index 1aa3d98..ca32d1f 100755 +--- a/erlang-find-requires.py ++++ b/erlang-find-requires.py +@@ -190,7 +190,7 @@ def check_for_mfa(Path, Dict, MFA): + def inspect_so_library(library, export_name, dependency_name): + with open(library, 'rb') as f: + elffile = ELFFile(f) +- dynsym = elffile.get_section_by_name(b'.dynsym') ++ dynsym = elffile.get_section_by_name('.dynsym') + for sym in dynsym.iter_symbols(): + if sym.name == export_name: + ts = rpm.TransactionSet() +@@ -288,8 +288,8 @@ if __name__ == "__main__": + Ret = inspect_beam_file(ISA, filename) + + elif filename.endswith(".so"): +- Ret += [inspect_so_library(filename, b'nif_init', 'erlang(erl_nif_version)')] +- Ret += [inspect_so_library(filename, b'driver_init', 'erlang(erl_drv_version)')] ++ Ret += [inspect_so_library(filename, 'nif_init', 'erlang(erl_nif_version)')] ++ Ret += [inspect_so_library(filename, 'driver_init', 'erlang(erl_drv_version)')] + + elif filename.endswith(".app"): + # TODO we don't know what to do with *.app files yet +diff --git a/testing.py b/testing.py +index 2fe2f22..4a5c263 100644 +--- a/testing.py ++++ b/testing.py +@@ -19,12 +19,12 @@ class TestAllMethods(unittest.TestCase): + def test_inspect_so_library_nif(self): + # This test requires erlang-crypto RPM package installed + filepath = glob.glob("/usr/lib*/erlang/lib/crypto-*/priv/lib/crypto.so")[0] +- self.assertEqual(M.inspect_so_library(filepath, b'nif_init', 'erlang(erl_nif_version)'), ErlNifDep) ++ self.assertEqual(M.inspect_so_library(filepath, 'nif_init', 'erlang(erl_nif_version)'), ErlNifDep) + + def test_inspect_so_library_drv(self): + # This test requires erlang-erlsyslog RPM package installed + filepath = glob.glob("/usr/lib*/erlang/lib/erlsyslog-*/priv/erlsyslog_drv.so")[0] +- self.assertEqual(M.inspect_so_library(filepath, b'driver_init', 'erlang(erl_drv_version)'), ErlDrvDep) ++ self.assertEqual(M.inspect_so_library(filepath, 'driver_init', 'erlang(erl_drv_version)'), ErlDrvDep) + + def test_inspect_beam_file_arch(self): + Deps = ['erlang-erts(x86-64)', 'erlang-kernel(x86-64)', 'erlang-stdlib(x86-64)'] diff --git a/erlang-rpm-macros.spec b/erlang-rpm-macros.spec index a277e15..aeb0d4a 100644 --- a/erlang-rpm-macros.spec +++ b/erlang-rpm-macros.spec @@ -1,12 +1,13 @@ Name: erlang-rpm-macros Version: 0.2.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Macros for simplifying building of Erlang packages Group: Development/Libraries License: MIT URL: https://github.com/fedora-erlang/erlang-rpm-macros VCS: scm:git:https://github.com/fedora-erlang/erlang-rpm-macros.git Source0: https://github.com/fedora-erlang/erlang-rpm-macros/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: erlang-rpm-macros-0001-Don-t-use-byte-strings.patch BuildArch: noarch # These BRs needed only for testing BuildRequires: erlang-crypto @@ -28,7 +29,7 @@ Macros for simplifying building of Erlang packages. %prep -%setup -q +%autosetup -p1 %build @@ -58,6 +59,9 @@ make check %changelog +* Mon Jul 30 2018 Peter Lemenkov - 0.2.9-3 +- Fix FTBFS in Rawhide + * Fri Jul 13 2018 Fedora Release Engineering - 0.2.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild