commit 1c3e67e11a9df620e56770ab5b1574d7be7e281289b2dea37fe851a849e3afa7 Author: Adrian Schröter Date: Thu Apr 24 00:07:58 2025 +0200 Sync from SUSE:SLFO:Main erlang-rebar revision 3ee906afd763975e16f27f18cee3cae3 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-Fix-rebar-xref-for-recent-Erlang.patch b/0001-Fix-rebar-xref-for-recent-Erlang.patch new file mode 100644 index 0000000..35f318e --- /dev/null +++ b/0001-Fix-rebar-xref-for-recent-Erlang.patch @@ -0,0 +1,26 @@ +From 1b80dcbeee8fd9ac7117b02b7893249ad2b242d1 Mon Sep 17 00:00:00 2001 +From: "Matwey V. Kornilov" +Date: Wed, 12 Oct 2022 19:40:26 +0300 +Subject: [PATCH] Fix rebar xref for recent Erlang + +(cherry picked from commit 21c06fdf9b67b7bed0e5dd9c86905407abced6aa) +--- + src/rebar_xref.erl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rebar_xref.erl b/src/rebar_xref.erl +index ddfb029..ed905b6 100644 +--- a/src/rebar_xref.erl ++++ b/src/rebar_xref.erl +@@ -288,7 +288,7 @@ find_function_source(M, F, A, Bin) -> + AbstractCode = beam_lib:chunks(Bin, [abstract_code]), + {ok, {M, [{abstract_code, {raw_abstract_v1, Code}}]}} = AbstractCode, + %% Extract the original source filename from the abstract code +- [{attribute, 1, file, {Source, _}} | _] = Code, ++ [{attribute, _, file, {Source, _}} | _] = [Attr || Attr = {attribute, _, file, _} <- Code], + %% Extract the line number for a given function def + Fn = [E || E <- Code, + safe_element(1, E) == function, +-- +2.37.3 + diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..0b87fc3 --- /dev/null +++ b/_constraints @@ -0,0 +1,13 @@ + + + + + 1 + + + 1 + + + kvm + SLOW_CPU + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..f4f56fe --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + erlang-rebar-testsuite + + diff --git a/_service b/_service new file mode 100644 index 0000000..2861324 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + git://github.com/rebar/rebar.git + git + @PARENT_TAG@+git%cd.%h + enable + + + rebar-*.tar + bz2 + + + rebar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..5f507a9 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + git://github.com/rebar/rebar.git + 8a2aca081780338330cd2145ab6cb86acde7c783 \ No newline at end of file diff --git a/erlang-rebar-testsuite.changes b/erlang-rebar-testsuite.changes new file mode 100644 index 0000000..b8993fc --- /dev/null +++ b/erlang-rebar-testsuite.changes @@ -0,0 +1,291 @@ +------------------------------------------------------------------- +Wed May 22 12:27:48 UTC 2024 - Simon Lees + +- We use a linked copy of this package in some SUSE products and + to do so correctly, we need to ensure a minimum of erlang 26 + Leap will soon get a versioned copy of erlang26 as well + +------------------------------------------------------------------- +Thu Feb 22 08:41:04 UTC 2024 - Michael Vetter + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN. + +------------------------------------------------------------------- +Thu Jan 4 14:46:57 UTC 2024 - Dominique Leuenberger + +- HACK: do not build the -testsuite flavor in distro projects (i.e + in repositories called 'standard'). Allows to get fixes included + in the distro while the test suite actually still fails + (boo#1205140). + +------------------------------------------------------------------- +Thu Aug 10 09:45:23 UTC 2023 - Dominique Leuenberger + +- Add _multibuild: declare additional spec files as further flavors + to build. Allows OBS to build those spec files without the need + for linked packages. + +------------------------------------------------------------------- +Wed Oct 12 17:49:50 UTC 2022 - Matwey Kornilov + +- Add 0001-Fix-rebar-xref-for-recent-Erlang.patch: + fix testsuite + +------------------------------------------------------------------- +Wed Jun 30 12:41:37 UTC 2021 - Dominique Leuenberger + +- Move rpm macros from /etc/rpm to %{_rpmmacrodir} (boo#1185668). + +------------------------------------------------------------------- +Sat Jan 16 09:08:03 UTC 2021 - Matwey Kornilov + +- Add rebar-0014-erl_interface-was-removed-in-Erlang-23.patch: + erl_interface is missed since Erlang 23 + +------------------------------------------------------------------- +Thu Aug 16 15:18:50 UTC 2018 - opensuse-packaging@opensuse.org + +- Update to version 2.6.4+git20180201.b6d3094: + * travis-ci: allow Dialyzer job to fail + * travis-ci: update otp versions + * travis-ci: enable 20.1 + * rebar_xref: ignore opaque type match Dialyzer warning + * rebar_cover: ignore opaque type match Dialyzer warning + * rebar_utils: fix Dialyzer warning + * Run Dialyzer on Travis-CI + * Log out success message with newlines + * travis-ci: otp 20.0.2 -> 20.0.4 + * Revert "Drop crypto app reliance" + * Remove profiler note + * inttest/*: do not export_all + * Fix ctsuite template + * Improve pseudo-unique ct_run node name + * Drop crypto app reliance + * rebar.config: access retest repo via https + * Fix Erlang 20 export_all warnings + * Fix #634 + * travis-ci: test with Erlang 20.0.2 + * Properly skip apps with a .app.src.script file + * Fix typo in eunit help. + +------------------------------------------------------------------- +Thu Mar 29 13:09:49 UTC 2018 - guillaume.gardet@opensuse.org + +- Add _constraints file to avoid slow CPU to pass testsuite + +------------------------------------------------------------------- +Wed Jul 12 14:48:15 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to use a constant build time in .beam files +- Normalize zip file timestamps in /usr/bin/rebar (boo#1047218) + +------------------------------------------------------------------- +Fri Sep 30 12:59:14 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.4+git20160922.576e121: + * Revert 'Treat port env vars as expandable only if they self reference' + * Add necessary missing OSX flags for port driver linking + * Prepare release 2.6.2 + * qc: lift experimental notice + * port_compiler: consistently format default_env/0 + * Introduce and use compat random number module + * Add an additional check for the existence of a 'rebar.beam' file during bootstrap run. Bootstrap fails on first run without any .beam files in the ebin folder. + * port_compiler: generate clang compilation db + * port_compiler: clean up compile_each() + * port_compiler: auto-select C++ specific link template + * Prepare release 2.6.3 + * Fix cdb processing when a file is skipped + * rebar_utils: restore blank line + * port_compiler: fix handling of multiple specs + * Prepare release 2.6.4 + * Remove superfluous space in unabbrev error msg + * Continuous integration on OTP 19.1 + +------------------------------------------------------------------- +Mon May 09 20:45:59 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160413.9281b84: + + Support rebar3-style deps + + Add raw to VsnRegex-Free dep + + add deprecated message + +------------------------------------------------------------------- +Mon May 9 16:13:21 UTC 2016 - matwey.kornilov@gmail.com + +- BuildRoot should be common for both packages + +------------------------------------------------------------------- +Sat Mar 19 16:48:58 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160318.ef73556: + + Optionally look for ct .spec files in the ct_dir that was specified + + Introduce REBAR_VSN_CACHE_FILE env variable to load/save vsn cache + +------------------------------------------------------------------- +Fri Mar 18 08:24:17 UTC 2016 - matwey.kornilov@gmail.com + +- Remove 0001-Find-all-deps-locally-first.patch: + + use upstreamed alternative +- Remove 0002-Read-vsn-from-file.patch: + + use upstreamed alternative +- Remove no-rebar-deps.patch: not needed anymore + +------------------------------------------------------------------- +Fri Mar 18 08:23:57 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160317.384af7e: + + Add support for Windows integration testing + + Update retest dependency url + + Add neotoma regression test + + Automatically clean neotoma-generated erl files Add myself to THANKS + + Ensure ebin created for dia compiler + + Add tests for dia compiler + + Update regexp to account for newer OTP versions + + Treat port env vars as expandable only if they self reference + + Additional Common Test regression tests + + Fix eunit_surefire crash with rebar eunit tests=... + + Provide additional test coverage for surefire enabled eunit testing + + Fix bug when running gcc in cross_sizeof + + Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour + +------------------------------------------------------------------- +Sun Jan 17 17:25:39 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160115.c534f8a: + + fprof: document Cachegrind support + + fprof: further document Cachegrind support + + Add qualified name tests docs (see pr #119) + + Fix windows eunit tests + + Lock retest dependency + + Allow windows release to use etc conf dir + + xref: fix dialyzer warning introduced in 69802f63120 + + Provide additional debug logging on relup generation + + Add the latest OTP 18 version to the Travis build + +------------------------------------------------------------------- +Fri Oct 16 09:00:00 UTC 2015 - matwey.kornilov@gmail.com + +- erlang-rebar-src and erlang-rebar-obs-src should also be + in conflict explicitly + +------------------------------------------------------------------- +Thu Oct 15 08:29:58 UTC 2015 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20151013.5d73a8d: + + Add Windows continuous integration through AppVeyor + +------------------------------------------------------------------- +Wed Oct 07 16:55:13 UTC 2015 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20150928.365ac64: + + Fix #544 + + Fix #544 even more. + + Fix #544 + + Add erl_first_files to other first_files + + Add test for eunit_first_files + + Add report and verbose options for LFE compile + + bump to 2.6.1 + +------------------------------------------------------------------- +Wed Sep 30 11:36:06 UTC 2015 - dmueller@suse.com + +- use m4 for substitution of the base package name, + works around some defects in the source validator checks + +------------------------------------------------------------------- +Fri Jul 24 18:21:51 UTC 2015 - seife+obs@b1-systems.com + +- fix "bad %if condition" for non-SUSE distro builds + +------------------------------------------------------------------- +Thu Jun 12 07:37:29 UTC 2014 - matwey.kornilov@gmail.com + +- Version 2.3.1 + - fix build for 17 + +------------------------------------------------------------------- +Wed Apr 16 16:42:28 UTC 2014 - matwey.kornilov@gmail.com + +- Add erlang-rebar-obs package to use it in OBS only. + It does not require Internet. +- prjconf should be something like that: + Substitute: erlang-rebar erlang-rebar-obs + +------------------------------------------------------------------- +Wed Apr 16 12:56:47 UTC 2014 - matwey.kornilov@gmail.com + +- Version 2.2.0 + +------------------------------------------------------------------- +Sat Mar 1 08:11:54 UTC 2014 - nkrinner@suse.com + +- Added rpmlintc file to allow build to succeed with a file with + source code + +------------------------------------------------------------------- +Sun Feb 2 17:33:07 UTC 2014 - matwey.kornilov@gmail.com + +- updated to latest master (2.1.0 release) + +------------------------------------------------------------------- +Mon Sep 30 12:15:47 UTC 2013 - matwey.kornilov@gmail.com + +- updated to latest master. some minor bugfixes + +------------------------------------------------------------------- +Wed Jun 26 11:50:03 UTC 2013 - matwey.kornilov@gmail.com + +- add bash autocompletion, rename -devel to -src + +------------------------------------------------------------------- +Wed Jun 26 09:52:45 UTC 2013 - kruber@zib.de + +- remove cyclic dependency to erlang-retest + (a pre-build version is already bundled with rebar in ./inttest) +- fix SLE build (hg version is incompatible thus some tests fail) + +------------------------------------------------------------------- +Wed Jun 26 09:29:26 UTC 2013 - kruber@zib.de + +- fix package build (require erlang-retest package for %check) + This dependency is cyclic, as erlang-retest needs rebar to build + normally, here rebar is built and then retest (from git) which + is only needed for the tests we don't have access to git from + OBS though, try this way (or disable %check). + +------------------------------------------------------------------- +Mon Jun 17 13:08:21 UTC 2013 - speilicke@suse.com + +- Add %changelog section + +------------------------------------------------------------------- +Fri Apr 5 12:08:29 UTC 2013 - speilicke@suse.com + +- Fix %rebar and %rebar_compile macros to take further parameters + +------------------------------------------------------------------- +Thu Apr 4 08:30:03 UTC 2013 - speilicke@suse.com + +- Move rebar-specific macros from erlang package to erlang-rebar + +------------------------------------------------------------------- +Thu Apr 4 07:16:04 UTC 2013 - speilicke@suse.com + +- Added macros.erlang-rebar, which includes the following RPM macros: + + %erlang_rebar +- Install ebam and priv files +- Added devel package + +------------------------------------------------------------------- +Wed Apr 3 13:50:36 UTC 2013 - speilicke@suse.com + +- Rename to erlang-rebar +- Use mode="disabled" source service and properly create a tarball +- General cleanup for Factory + +------------------------------------------------------------------- +Sat Oct 06 06:36:08 UTC 2012 - matwey.kornilov@gmail.com + +- Cleaned up initial version + diff --git a/erlang-rebar-testsuite.rpmlintrc b/erlang-rebar-testsuite.rpmlintrc new file mode 100644 index 0000000..da60660 --- /dev/null +++ b/erlang-rebar-testsuite.rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package *") diff --git a/erlang-rebar-testsuite.spec b/erlang-rebar-testsuite.spec new file mode 100644 index 0000000..b3ad6d5 --- /dev/null +++ b/erlang-rebar-testsuite.spec @@ -0,0 +1,154 @@ +# +# spec file for package erlang-rebar-testsuite +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: erlang-rebar-testsuite +%define normal_build ("%{name}" == "erlang-rebar") +%define testsuite_build ("%{name}" == "erlang-rebar-testsuite") +Version: 2.6.4+git20180201.b6d3094 +Release: 0 +%define mod_ver %(echo "%{version}" | cut -d "+" -f1) +Summary: A sophisticated build-tool for Erlang projects that follows OTP principles +License: Apache-2.0 +Group: Development/Tools/Building +URL: https://github.com/rebar/rebar +Source: rebar-%{version}.tar.bz2 +Source1: macros.erlang-rebar +Source98: %{name}.rpmlintrc +Patch2: tdeps_update-retest.patch +Patch5: erlc_dep_graph-timeout.patch +# PATCH-FIX-OPENSUSE -- bmwiedemann +Patch6: reproducible.patch +Patch7: rebar-0014-erl_interface-was-removed-in-Erlang-23.patch +Patch8: 0001-Fix-rebar-xref-for-recent-Erlang.patch +BuildRequires: erlang >= 26 +%if 0%{?suse_version} > 1320 +BuildRequires: strip-nondeterminism +%endif +Requires: erlang >= 26 +Provides: rebar = %{version} +Obsoletes: rebar < %{version} +%if %{testsuite_build} +# for 'make test' +BuildRequires: erlang-rebar = %{version} +BuildRequires: erlang-reltool +BuildRequires: erlang-retest >= 1.1.0 +BuildRequires: git +BuildRequires: mercurial +%if "%{_repository}" == "standard" +ExclusiveArch: do-not-build +%endif +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%if 0%{?suse_version} +%if 1%{?erlang_libdir:0} +%define erlang_libdir %{_libdir}/erlang/lib +%endif +%endif + +%description +rebar is an Erlang build tool that makes it easy to compile and +test Erlang applications, port drivers and releases. + +rebar is a self-contained Erlang script, so it's easy to distribute or even +embed directly in a project. Where possible, rebar uses standard Erlang/OTP +conventions for project structures, thus minimizing the amount of build +configuration work. rebar also provides dependency management, enabling +application writers to easily re-use common libraries from a variety of +locations (git, hg, etc). + +%package src +Summary: A sophisticated build-tool for Erlang projects that follows OTP principles +Group: Development/Libraries/Other +Requires: %{name} = %{version} +Provides: %{name}-devel = %{version} +Obsoletes: %{name}-devel < %{version} + +%description src +rebar is an Erlang build tool that makes it easy to compile and +test Erlang applications, port drivers and releases. + +%prep +%autosetup -p1 -n rebar-%{version} + +%build +export REBAR_DEPS_PREFER_LIBS=1 +make +if [ -e /usr/bin/strip-nondeterminism ] ; then + # normalize timestamps in the zip file + # that starts after 3 lines at offset 51 with "PK" + zipoffs=$(perl -ne 'if(/\APK/){print $offs;exit 0} $offs+=length($_)' rebar) + dd if=rebar of=rebar.zip bs=$zipoffs skip=1 + strip-nondeterminism rebar.zip + dd if=rebar.zip of=rebar bs=$zipoffs seek=1 conv=notrunc + rm rebar.zip +fi + +%install +%if %{normal_build} +install -Dm755 rebar %{buildroot}%{_bindir}/rebar +# Install RPM macros: +install -Dm644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.erlang-rebar +for dir in include ebin priv src ; do + install -d %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir} + cp -r ${dir}/* %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir}/ +done +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +ln -s %{erlang_libdir}/rebar-%{mod_ver}/priv/shell-completion/bash/rebar %{buildroot}%{_sysconfdir}/bash_completion.d/rebar.sh +%endif + +%check +%if %{testsuite_build} +# test is broken inside OBS environment due to lack of FQDN +rm -rf inttest/ct3 +rm -rf inttest/ct_cover +# test is broken due to library path resolution problem +rm -rf inttest/proto_gpb +rm -rf inttest/neotoma1 +# rebar is not compatible with hg 1.0.2 delivered by SLE <= 11 +# these checks will thus fail -> delete them +%if 0%{?sles_version} > 0 && 0%{?sles_version} <= 11 +rm -rf inttest/tdeps1 +rm -rf inttest/tdeps2 +%endif +# our erlang doesn't have diameter (see bnc#728667) +rm test/rebar_dia_tests.erl +%{_bindir}/rebar eunit +%{_bindir}/retest -l debug inttest +%{_bindir}/rebar xref +%endif + +%if %{normal_build} +%files +%defattr(-,root,root) +%doc README.md THANKS rebar.config.sample +%license LICENSE +%{_bindir}/rebar +%{_rpmmacrodir}/macros.erlang-rebar +%dir %{erlang_libdir}/rebar-%{mod_ver} +%{erlang_libdir}/rebar-%{mod_ver}/ebin +%{erlang_libdir}/rebar-%{mod_ver}/include +%{erlang_libdir}/rebar-%{mod_ver}/priv +%{_sysconfdir}/bash_completion.d/rebar.sh + +%files src +%defattr(-,root,root) +%{erlang_libdir}/rebar-%{mod_ver}/src +%endif + +%changelog diff --git a/erlang-rebar.changes b/erlang-rebar.changes new file mode 100644 index 0000000..b8993fc --- /dev/null +++ b/erlang-rebar.changes @@ -0,0 +1,291 @@ +------------------------------------------------------------------- +Wed May 22 12:27:48 UTC 2024 - Simon Lees + +- We use a linked copy of this package in some SUSE products and + to do so correctly, we need to ensure a minimum of erlang 26 + Leap will soon get a versioned copy of erlang26 as well + +------------------------------------------------------------------- +Thu Feb 22 08:41:04 UTC 2024 - Michael Vetter + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN. + +------------------------------------------------------------------- +Thu Jan 4 14:46:57 UTC 2024 - Dominique Leuenberger + +- HACK: do not build the -testsuite flavor in distro projects (i.e + in repositories called 'standard'). Allows to get fixes included + in the distro while the test suite actually still fails + (boo#1205140). + +------------------------------------------------------------------- +Thu Aug 10 09:45:23 UTC 2023 - Dominique Leuenberger + +- Add _multibuild: declare additional spec files as further flavors + to build. Allows OBS to build those spec files without the need + for linked packages. + +------------------------------------------------------------------- +Wed Oct 12 17:49:50 UTC 2022 - Matwey Kornilov + +- Add 0001-Fix-rebar-xref-for-recent-Erlang.patch: + fix testsuite + +------------------------------------------------------------------- +Wed Jun 30 12:41:37 UTC 2021 - Dominique Leuenberger + +- Move rpm macros from /etc/rpm to %{_rpmmacrodir} (boo#1185668). + +------------------------------------------------------------------- +Sat Jan 16 09:08:03 UTC 2021 - Matwey Kornilov + +- Add rebar-0014-erl_interface-was-removed-in-Erlang-23.patch: + erl_interface is missed since Erlang 23 + +------------------------------------------------------------------- +Thu Aug 16 15:18:50 UTC 2018 - opensuse-packaging@opensuse.org + +- Update to version 2.6.4+git20180201.b6d3094: + * travis-ci: allow Dialyzer job to fail + * travis-ci: update otp versions + * travis-ci: enable 20.1 + * rebar_xref: ignore opaque type match Dialyzer warning + * rebar_cover: ignore opaque type match Dialyzer warning + * rebar_utils: fix Dialyzer warning + * Run Dialyzer on Travis-CI + * Log out success message with newlines + * travis-ci: otp 20.0.2 -> 20.0.4 + * Revert "Drop crypto app reliance" + * Remove profiler note + * inttest/*: do not export_all + * Fix ctsuite template + * Improve pseudo-unique ct_run node name + * Drop crypto app reliance + * rebar.config: access retest repo via https + * Fix Erlang 20 export_all warnings + * Fix #634 + * travis-ci: test with Erlang 20.0.2 + * Properly skip apps with a .app.src.script file + * Fix typo in eunit help. + +------------------------------------------------------------------- +Thu Mar 29 13:09:49 UTC 2018 - guillaume.gardet@opensuse.org + +- Add _constraints file to avoid slow CPU to pass testsuite + +------------------------------------------------------------------- +Wed Jul 12 14:48:15 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to use a constant build time in .beam files +- Normalize zip file timestamps in /usr/bin/rebar (boo#1047218) + +------------------------------------------------------------------- +Fri Sep 30 12:59:14 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.4+git20160922.576e121: + * Revert 'Treat port env vars as expandable only if they self reference' + * Add necessary missing OSX flags for port driver linking + * Prepare release 2.6.2 + * qc: lift experimental notice + * port_compiler: consistently format default_env/0 + * Introduce and use compat random number module + * Add an additional check for the existence of a 'rebar.beam' file during bootstrap run. Bootstrap fails on first run without any .beam files in the ebin folder. + * port_compiler: generate clang compilation db + * port_compiler: clean up compile_each() + * port_compiler: auto-select C++ specific link template + * Prepare release 2.6.3 + * Fix cdb processing when a file is skipped + * rebar_utils: restore blank line + * port_compiler: fix handling of multiple specs + * Prepare release 2.6.4 + * Remove superfluous space in unabbrev error msg + * Continuous integration on OTP 19.1 + +------------------------------------------------------------------- +Mon May 09 20:45:59 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160413.9281b84: + + Support rebar3-style deps + + Add raw to VsnRegex-Free dep + + add deprecated message + +------------------------------------------------------------------- +Mon May 9 16:13:21 UTC 2016 - matwey.kornilov@gmail.com + +- BuildRoot should be common for both packages + +------------------------------------------------------------------- +Sat Mar 19 16:48:58 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160318.ef73556: + + Optionally look for ct .spec files in the ct_dir that was specified + + Introduce REBAR_VSN_CACHE_FILE env variable to load/save vsn cache + +------------------------------------------------------------------- +Fri Mar 18 08:24:17 UTC 2016 - matwey.kornilov@gmail.com + +- Remove 0001-Find-all-deps-locally-first.patch: + + use upstreamed alternative +- Remove 0002-Read-vsn-from-file.patch: + + use upstreamed alternative +- Remove no-rebar-deps.patch: not needed anymore + +------------------------------------------------------------------- +Fri Mar 18 08:23:57 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160317.384af7e: + + Add support for Windows integration testing + + Update retest dependency url + + Add neotoma regression test + + Automatically clean neotoma-generated erl files Add myself to THANKS + + Ensure ebin created for dia compiler + + Add tests for dia compiler + + Update regexp to account for newer OTP versions + + Treat port env vars as expandable only if they self reference + + Additional Common Test regression tests + + Fix eunit_surefire crash with rebar eunit tests=... + + Provide additional test coverage for surefire enabled eunit testing + + Fix bug when running gcc in cross_sizeof + + Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour + +------------------------------------------------------------------- +Sun Jan 17 17:25:39 UTC 2016 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20160115.c534f8a: + + fprof: document Cachegrind support + + fprof: further document Cachegrind support + + Add qualified name tests docs (see pr #119) + + Fix windows eunit tests + + Lock retest dependency + + Allow windows release to use etc conf dir + + xref: fix dialyzer warning introduced in 69802f63120 + + Provide additional debug logging on relup generation + + Add the latest OTP 18 version to the Travis build + +------------------------------------------------------------------- +Fri Oct 16 09:00:00 UTC 2015 - matwey.kornilov@gmail.com + +- erlang-rebar-src and erlang-rebar-obs-src should also be + in conflict explicitly + +------------------------------------------------------------------- +Thu Oct 15 08:29:58 UTC 2015 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20151013.5d73a8d: + + Add Windows continuous integration through AppVeyor + +------------------------------------------------------------------- +Wed Oct 07 16:55:13 UTC 2015 - matwey.kornilov@gmail.com + +- Update to version 2.6.1+git20150928.365ac64: + + Fix #544 + + Fix #544 even more. + + Fix #544 + + Add erl_first_files to other first_files + + Add test for eunit_first_files + + Add report and verbose options for LFE compile + + bump to 2.6.1 + +------------------------------------------------------------------- +Wed Sep 30 11:36:06 UTC 2015 - dmueller@suse.com + +- use m4 for substitution of the base package name, + works around some defects in the source validator checks + +------------------------------------------------------------------- +Fri Jul 24 18:21:51 UTC 2015 - seife+obs@b1-systems.com + +- fix "bad %if condition" for non-SUSE distro builds + +------------------------------------------------------------------- +Thu Jun 12 07:37:29 UTC 2014 - matwey.kornilov@gmail.com + +- Version 2.3.1 + - fix build for 17 + +------------------------------------------------------------------- +Wed Apr 16 16:42:28 UTC 2014 - matwey.kornilov@gmail.com + +- Add erlang-rebar-obs package to use it in OBS only. + It does not require Internet. +- prjconf should be something like that: + Substitute: erlang-rebar erlang-rebar-obs + +------------------------------------------------------------------- +Wed Apr 16 12:56:47 UTC 2014 - matwey.kornilov@gmail.com + +- Version 2.2.0 + +------------------------------------------------------------------- +Sat Mar 1 08:11:54 UTC 2014 - nkrinner@suse.com + +- Added rpmlintc file to allow build to succeed with a file with + source code + +------------------------------------------------------------------- +Sun Feb 2 17:33:07 UTC 2014 - matwey.kornilov@gmail.com + +- updated to latest master (2.1.0 release) + +------------------------------------------------------------------- +Mon Sep 30 12:15:47 UTC 2013 - matwey.kornilov@gmail.com + +- updated to latest master. some minor bugfixes + +------------------------------------------------------------------- +Wed Jun 26 11:50:03 UTC 2013 - matwey.kornilov@gmail.com + +- add bash autocompletion, rename -devel to -src + +------------------------------------------------------------------- +Wed Jun 26 09:52:45 UTC 2013 - kruber@zib.de + +- remove cyclic dependency to erlang-retest + (a pre-build version is already bundled with rebar in ./inttest) +- fix SLE build (hg version is incompatible thus some tests fail) + +------------------------------------------------------------------- +Wed Jun 26 09:29:26 UTC 2013 - kruber@zib.de + +- fix package build (require erlang-retest package for %check) + This dependency is cyclic, as erlang-retest needs rebar to build + normally, here rebar is built and then retest (from git) which + is only needed for the tests we don't have access to git from + OBS though, try this way (or disable %check). + +------------------------------------------------------------------- +Mon Jun 17 13:08:21 UTC 2013 - speilicke@suse.com + +- Add %changelog section + +------------------------------------------------------------------- +Fri Apr 5 12:08:29 UTC 2013 - speilicke@suse.com + +- Fix %rebar and %rebar_compile macros to take further parameters + +------------------------------------------------------------------- +Thu Apr 4 08:30:03 UTC 2013 - speilicke@suse.com + +- Move rebar-specific macros from erlang package to erlang-rebar + +------------------------------------------------------------------- +Thu Apr 4 07:16:04 UTC 2013 - speilicke@suse.com + +- Added macros.erlang-rebar, which includes the following RPM macros: + + %erlang_rebar +- Install ebam and priv files +- Added devel package + +------------------------------------------------------------------- +Wed Apr 3 13:50:36 UTC 2013 - speilicke@suse.com + +- Rename to erlang-rebar +- Use mode="disabled" source service and properly create a tarball +- General cleanup for Factory + +------------------------------------------------------------------- +Sat Oct 06 06:36:08 UTC 2012 - matwey.kornilov@gmail.com + +- Cleaned up initial version + diff --git a/erlang-rebar.rpmlintrc b/erlang-rebar.rpmlintrc new file mode 100644 index 0000000..da60660 --- /dev/null +++ b/erlang-rebar.rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package *") diff --git a/erlang-rebar.spec b/erlang-rebar.spec new file mode 100644 index 0000000..6a824e7 --- /dev/null +++ b/erlang-rebar.spec @@ -0,0 +1,154 @@ +# +# spec file for package erlang-rebar +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: erlang-rebar +%define normal_build ("%{name}" == "erlang-rebar") +%define testsuite_build ("%{name}" == "erlang-rebar-testsuite") +Version: 2.6.4+git20180201.b6d3094 +Release: 0 +%define mod_ver %(echo "%{version}" | cut -d "+" -f1) +Summary: A sophisticated build-tool for Erlang projects that follows OTP principles +License: Apache-2.0 +Group: Development/Tools/Building +URL: https://github.com/rebar/rebar +Source: rebar-%{version}.tar.bz2 +Source1: macros.erlang-rebar +Source98: %{name}.rpmlintrc +Patch2: tdeps_update-retest.patch +Patch5: erlc_dep_graph-timeout.patch +# PATCH-FIX-OPENSUSE -- bmwiedemann +Patch6: reproducible.patch +Patch7: rebar-0014-erl_interface-was-removed-in-Erlang-23.patch +Patch8: 0001-Fix-rebar-xref-for-recent-Erlang.patch +BuildRequires: erlang >= 26 +%if 0%{?suse_version} > 1320 +BuildRequires: strip-nondeterminism +%endif +Requires: erlang >= 26 +Provides: rebar = %{version} +Obsoletes: rebar < %{version} +%if %{testsuite_build} +# for 'make test' +BuildRequires: erlang-rebar = %{version} +BuildRequires: erlang-reltool +BuildRequires: erlang-retest >= 1.1.0 +BuildRequires: git +BuildRequires: mercurial +%if "%{_repository}" == "standard" +ExclusiveArch: do-not-build +%endif +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%if 0%{?suse_version} +%if 1%{?erlang_libdir:0} +%define erlang_libdir %{_libdir}/erlang/lib +%endif +%endif + +%description +rebar is an Erlang build tool that makes it easy to compile and +test Erlang applications, port drivers and releases. + +rebar is a self-contained Erlang script, so it's easy to distribute or even +embed directly in a project. Where possible, rebar uses standard Erlang/OTP +conventions for project structures, thus minimizing the amount of build +configuration work. rebar also provides dependency management, enabling +application writers to easily re-use common libraries from a variety of +locations (git, hg, etc). + +%package src +Summary: A sophisticated build-tool for Erlang projects that follows OTP principles +Group: Development/Libraries/Other +Requires: %{name} = %{version} +Provides: %{name}-devel = %{version} +Obsoletes: %{name}-devel < %{version} + +%description src +rebar is an Erlang build tool that makes it easy to compile and +test Erlang applications, port drivers and releases. + +%prep +%autosetup -p1 -n rebar-%{version} + +%build +export REBAR_DEPS_PREFER_LIBS=1 +make +if [ -e /usr/bin/strip-nondeterminism ] ; then + # normalize timestamps in the zip file + # that starts after 3 lines at offset 51 with "PK" + zipoffs=$(perl -ne 'if(/\APK/){print $offs;exit 0} $offs+=length($_)' rebar) + dd if=rebar of=rebar.zip bs=$zipoffs skip=1 + strip-nondeterminism rebar.zip + dd if=rebar.zip of=rebar bs=$zipoffs seek=1 conv=notrunc + rm rebar.zip +fi + +%install +%if %{normal_build} +install -Dm755 rebar %{buildroot}%{_bindir}/rebar +# Install RPM macros: +install -Dm644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.erlang-rebar +for dir in include ebin priv src ; do + install -d %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir} + cp -r ${dir}/* %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir}/ +done +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +ln -s %{erlang_libdir}/rebar-%{mod_ver}/priv/shell-completion/bash/rebar %{buildroot}%{_sysconfdir}/bash_completion.d/rebar.sh +%endif + +%check +%if %{testsuite_build} +# test is broken inside OBS environment due to lack of FQDN +rm -rf inttest/ct3 +rm -rf inttest/ct_cover +# test is broken due to library path resolution problem +rm -rf inttest/proto_gpb +rm -rf inttest/neotoma1 +# rebar is not compatible with hg 1.0.2 delivered by SLE <= 11 +# these checks will thus fail -> delete them +%if 0%{?sles_version} > 0 && 0%{?sles_version} <= 11 +rm -rf inttest/tdeps1 +rm -rf inttest/tdeps2 +%endif +# our erlang doesn't have diameter (see bnc#728667) +rm test/rebar_dia_tests.erl +%{_bindir}/rebar eunit +%{_bindir}/retest -l debug inttest +%{_bindir}/rebar xref +%endif + +%if %{normal_build} +%files +%defattr(-,root,root) +%doc README.md THANKS rebar.config.sample +%license LICENSE +%{_bindir}/rebar +%{_rpmmacrodir}/macros.erlang-rebar +%dir %{erlang_libdir}/rebar-%{mod_ver} +%{erlang_libdir}/rebar-%{mod_ver}/ebin +%{erlang_libdir}/rebar-%{mod_ver}/include +%{erlang_libdir}/rebar-%{mod_ver}/priv +%{_sysconfdir}/bash_completion.d/rebar.sh + +%files src +%defattr(-,root,root) +%{erlang_libdir}/rebar-%{mod_ver}/src +%endif + +%changelog diff --git a/erlc_dep_graph-timeout.patch b/erlc_dep_graph-timeout.patch new file mode 100644 index 0000000..edb3902 --- /dev/null +++ b/erlc_dep_graph-timeout.patch @@ -0,0 +1,6 @@ +Index: rebar-2.6.1+git20151013.5d73a8d/inttest/erlc_dep_graph/retest.config +=================================================================== +--- /dev/null ++++ rebar-2.6.1+git20151013.5d73a8d/inttest/erlc_dep_graph/retest.config +@@ -0,0 +1 @@ ++{timeout, 120000}. diff --git a/macros.erlang-rebar b/macros.erlang-rebar new file mode 100644 index 0000000..0b883ef --- /dev/null +++ b/macros.erlang-rebar @@ -0,0 +1,30 @@ +# Macros for erlang-rebar module building. +# +# Copyright: (c) 2013 Sascha Peilicke +# + +# SUSE-style macros: + +%__rebar_vsn_cache_file %{_builddir}/vsn_cache_file +%__rebar /usr/bin/rebar + +%rebar_set_vsn_cache(v:p:) \ +REBAR_VSN_CACHE_FILE="%{__rebar_vsn_cache_file}" ; export REBAR_VSN_CACHE_FILE ; \ +echo "{{%{-v:%{-n*}}%{!-n:git}, \\"%{-p:%{-p*}}%{!-p:$PWD}\\"}, \\"%1\\"}." >> $REBAR_VSN_CACHE_FILE \ +%{nil} + +%rebar() \ +CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ +CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ +FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ +REBAR_DEPS_PREFER_LIBS=1 ; export REBAR_DEPS_PREFER_LIBS ; \ +%{__rebar} %* \ +%{nil} + +%rebar_compile() \ +%{rebar} compile -v %* \ +%{nil} + +# Fedora compat: + +%__rebar_compile %{rebar_compile} diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..3acde13 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +sed -e 's/^Name:.*erlang-rebar/&-testsuite/' erlang-rebar.spec > erlang-rebar-testsuite.spec +cp erlang-rebar.changes erlang-rebar-testsuite.changes +cp erlang-rebar.rpmlintrc erlang-rebar-testsuite.rpmlintrc +osc service localrun format_spec_file diff --git a/rebar-0014-erl_interface-was-removed-in-Erlang-23.patch b/rebar-0014-erl_interface-was-removed-in-Erlang-23.patch new file mode 100644 index 0000000..c9ae20b --- /dev/null +++ b/rebar-0014-erl_interface-was-removed-in-Erlang-23.patch @@ -0,0 +1,37 @@ +From: Peter Lemenkov +Date: Tue, 10 Nov 2020 16:20:46 +0100 +Subject: [PATCH] erl_interface was removed in Erlang 23 + +Signed-off-by: Peter Lemenkov + +diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl +index 0ba9e84..46ad1c2 100644 +--- a/src/rebar_port_compiler.erl ++++ b/src/rebar_port_compiler.erl +@@ -137,7 +137,7 @@ info_help(Description) -> + " CXXFLAGS - C++ compiler~n" + " LDFLAGS - Link flags~n" + " ERL_CFLAGS - default -I paths for erts and ei~n" +- " ERL_LDFLAGS - default -L and -lerl_interface -lei~n" ++ " ERL_LDFLAGS - default -L and -lei~n" + " DRV_CFLAGS - flags that will be used for compiling~n" + " DRV_LDFLAGS - flags that will be used for linking~n" + " EXE_CFLAGS - flags that will be used for compiling~n" +@@ -679,7 +679,7 @@ default_env() -> + "\" " + ])}, + {"ERL_EI_LIBDIR", lists:concat(["\"", erl_interface_dir(lib), "\""])}, +- {"ERL_LDFLAGS" , " -L$ERL_EI_LIBDIR -lerl_interface -lei"}, ++ {"ERL_LDFLAGS" , " -L$ERL_EI_LIBDIR -lei"}, + {"ERLANG_ARCH" , rebar_utils:wordsize()}, + {"ERLANG_TARGET", rebar_utils:get_arch()}, + +@@ -727,7 +727,7 @@ default_env() -> + "$LINKER $PORT_IN_FILES $LDFLAGS $EXE_LDFLAGS /OUT:$PORT_OUT_FILE"}, + %% ERL_CFLAGS are ok as -I even though strictly it should be /I + {"win32", "ERL_LDFLAGS", +- " /LIBPATH:$ERL_EI_LIBDIR erl_interface.lib ei.lib"}, ++ " /LIBPATH:$ERL_EI_LIBDIR ei.lib"}, + {"win32", "DRV_CFLAGS", "/Zi /Wall $ERL_CFLAGS"}, + {"win32", "DRV_LDFLAGS", "/DLL $ERL_LDFLAGS"} + ]. diff --git a/rebar-2.6.4+git20180201.b6d3094.tar.bz2 b/rebar-2.6.4+git20180201.b6d3094.tar.bz2 new file mode 100644 index 0000000..dd97644 --- /dev/null +++ b/rebar-2.6.4+git20180201.b6d3094.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ef8e189125f736ac4c541c73378690aff55e4ad040147b5c10acac797a85d1c +size 165230 diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..bec254b --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,16 @@ +From: Bernhard M. Wiedemann +Set BUILD_TIME to a constant value +so that TIME values in .beam files do not differ across builds + +Index: rebar-2.6.4+git20160922.576e121/bootstrap +=================================================================== +--- rebar-2.6.4+git20160922.576e121.orig/bootstrap ++++ rebar-2.6.4+git20160922.576e121/bootstrap +@@ -56,7 +56,6 @@ main(Args) -> + [{outdir, "ebin"}, {i, "include"}, + DebugFlag, + NamespacedTypes, +- {d, 'BUILD_TIME', Built}, + {d, 'VCS_INFO', VcsInfo}, + {d, 'OTP_INFO', OtpInfo}]) of + up_to_date -> diff --git a/tdeps_update-retest.patch b/tdeps_update-retest.patch new file mode 100644 index 0000000..777550a --- /dev/null +++ b/tdeps_update-retest.patch @@ -0,0 +1,18 @@ +Index: rebar-2.6.1+git20150928.365ac64/inttest/tdeps_update/retest.config +=================================================================== +--- /dev/null ++++ rebar-2.6.1+git20150928.365ac64/inttest/tdeps_update/retest.config +@@ -0,0 +1 @@ ++{timeout, 120000}. +Index: rebar-2.6.1+git20150928.365ac64/inttest/code_path_no_recurse/retest.config +=================================================================== +--- /dev/null ++++ rebar-2.6.1+git20150928.365ac64/inttest/code_path_no_recurse/retest.config +@@ -0,0 +1 @@ ++{timeout, 120000}. +Index: rebar-2.6.1+git20150928.365ac64/inttest/erlc/retest.config +=================================================================== +--- /dev/null ++++ rebar-2.6.1+git20150928.365ac64/inttest/erlc/retest.config +@@ -0,0 +1 @@ ++{timeout, 120000}.