Hi,

I'd like to make some changes to tools/dev/unix-build/Makefile.svn but I'd
like to run then by the community before committing.

Makefile.svn is currently hard coding a dependency version by setting (for
example)
RUBY_VER       = 2.7.4
and
SHA256_${RUBY_DIST} =
3043099089608859fc8cce7f9fdccaa1f53a462457e3838ec3b25a7d609fbc5b
(where RUBY_DIST is derived from RUBY_VER)

I'd like to add several different SHA256_-sums, for "known" dependency
versions:
SHA256_ruby-2.7.4.tar.gz =
3043099089608859fc8cce7f9fdccaa1f53a462457e3838ec3b25a7d609fbc5b
SHA256_ruby-2.7.7.tar.gz =
e10127db691d7ff36402cfe88f418c8d025a3f1eea92044b162dd72f0b8c7b90
SHA256_ruby-2.7.8.tar.gz =
c2dab63cbc8f2a05526108ad419efa63a67ed4074dbbcf9fc2b1ca664cb45ba0
SHA256_ruby-3.0.7.tar.gz =
2a3411977f2850431136b0fab8ad53af09fb74df2ee2f4fb7f11b378fe034388

This way it is relatively easy to change a version by changing RUBY_VER to
one of the supported versions. To support newer versions one would of
course have to add additional SHA256-sums, but it shouldn't be worse than
the current situation.

I'd love to factor out the _VER variables to a separate file that is not
committed to SVN, best way I could figure out is to let the user create
Makefile from a new Makefile.tmpl (instead of symlinking to Makefile.svn)
and including unix-build/Makefile.svn from Makefile(.tmpl). This will be a
breaking change for thise (few?) using Makefile.svn.

For Ruby there is an additional complexity that the major/minor version 2.7
is hardcoded as part of the URL, so I'm planning to split RUBY_VER to two
separate variables, as is already done for BDB.

Additional Ruby 3 seems to contain the fixes in the separate patch files,
so I'm planning to make patching optional by:
[[[
@@ -1227,8 +1240,10 @@
        tar -C $(SRCDIR) -zxf $(DISTDIR)/$(RUBY_DIST)
        -which ghead && sed -i -e "s/head -c/ghead -c/"
$(RUBY_SRCDIR)/configure
        $(RUBY_SSL_EX_NEW_DATA_PATCH) $(RUBY_SRCDIR)/ext/openssl/extconf.rb
+ifeq ($(shell test $(RUBY_MAJOR_VER) \< 3.0; echo 1), 1)
        cd $(RUBY_SRCDIR) && patch -p0 <
$(RUBY_OBJDIR)/openssl_missing.patch
        cd $(RUBY_SRCDIR) && patch -p0 <
$(RUBY_OBJDIR)/sparc64_buserror.patch
+endif
        sed -i 's/X509_num(bs->certs)/X509_num(OCSP_resp_get0_certs(bs))/' \
                $(RUBY_SRCDIR)/ext/openssl/ossl_ocsp.c
        touch $@
]]]

Serf currently builds without merging the serf/branches/1.3.x-sslbuild
branch (actually, build fails IF merging). I have a feeling this might be
needed if using LibreSSL, but I don't have an environment to test it.

Thoughts and comments?

Cheers,
Daniel

Reply via email to