You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2024/05/31 05:02:31 UTC

(couchdb) 01/01: Prevent release from generating ez archives

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch fix-releases-no-more-ez-archive
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 43292acf9b72331bc38031ed47968267e261251e
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Fri May 31 00:56:49 2024 -0400

    Prevent release from generating ez archives
    
    Erlang 26 removed the ability to create ez archive files in releases. We had to
    remove the `excl_archive_filters` option from our reltool.config file [1], as
    otherwise we couldn't make releases on 26 (`make release` barfed). However,
    that meant on 24 and 26 our releases would be generated with beam files packed
    in lots of silly .ez archives, which is not great.
    
    Sadly, since 26, refuses to silently ignore `excl_archive_filters` we have to
    use a script file and only apply the config on <26 versions.
    
    [1] https://github.com/apache/couchdb/commit/a4bbb87d11d40dfee9808a7d5025a65845c6a4cd
---
 rel/reltool.config.script | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/rel/reltool.config.script b/rel/reltool.config.script
new file mode 100644
index 000000000..33c90289b
--- /dev/null
+++ b/rel/reltool.config.script
@@ -0,0 +1,24 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+% OTP 26 removed the excl_archive option from reltool.config. However, for <26
+% if we don't specify {excl_archive,..} we end up with small silly *.ez
+% archives instead of ebin directories.
+%
+case erlang:system_info(otp_release) of
+     "26" ->
+        CONFIG;
+    _ ->
+        {sys, SysProps} = lists:keyfind(sys, 1, CONFIG),
+        SysProps1 = SysProps ++ [{excl_archive_filters, [".*"]}],
+        lists:keyreplace(sys, 1, CONFIG, {sys, SysProps1})
+end.