Modified: subversion/branches/addremove/tools/dev/contribulyze.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/contribulyze.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/contribulyze.py (original) +++ subversion/branches/addremove/tools/dev/contribulyze.py Sat May 23 14:16:56 2020 @@ -56,6 +56,7 @@ # a lot easier to whip up for straight 'svn log' output. I'd have no # objection to it being rewritten to take XML input. +import functools import os import sys import re @@ -256,6 +257,9 @@ class Contributor(object): else: return 0 - result + def sort_key(self): + return (self.is_full_committer, self.score(), self.big_name()) + @staticmethod def parse(name): """Parse NAME, which can be @@ -398,7 +402,7 @@ class Contributor(object): out.write('</table>\n\n') out.write('</div>\n\n') - sorted_logs = sorted(unique_logs.keys()) + sorted_logs = sorted(unique_logs.keys(), key=LogMessage.sort_key) for log in sorted_logs: out.write('<hr />\n') out.write('<div class="h3" id="%s" title="%s">\n' % (log.revision, @@ -490,6 +494,9 @@ class LogMessage(object): if a < b: return 1 else: return 0 + def sort_key(self): + return int(self.revision[1:]) + def __str__(self): s = '=' * 15 header = ' LOG: %s | %s ' % (self.revision, self.committer) @@ -661,7 +668,8 @@ def drop(revision_url_pattern): # sort by number of contributions, so the most active people appear at # the top -- that way we know whom to look at first for commit access # proposals. - sorted_contributors = sorted(Contributor.all_contributors.values()) + sorted_contributors = sorted(Contributor.all_contributors.values(), + key = Contributor.sort_key) for c in sorted_contributors: if c not in seen_contributors: if c.score() > 0:
Modified: subversion/branches/addremove/tools/dev/find-control-statements.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/find-control-statements.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/find-control-statements.py (original) +++ subversion/branches/addremove/tools/dev/find-control-statements.py Sat May 23 14:16:56 2020 @@ -56,7 +56,7 @@ def print_line(fname, line_num, line): def is_control(line, index, word): """ Return whether LINE[INDEX] is actual the start position of control statement WORD. It must be followed by an opening - parantheses and only whitespace in between WORD and the '('. + parentheses and only whitespace in between WORD and the '('. """ if index > 0: if not (line[index-1] in [' ', '\t', ';']): @@ -117,7 +117,7 @@ def find_control(line): def parantheses_delta(line): """ Return the number of opening minus the number of closing - parantheses in LINE. Don't count those inside strings or chars. + parentheses in LINE. Don't count those inside strings or chars. """ escaped = False in_squote = False Modified: subversion/branches/addremove/tools/dev/mergegraph/mergegraph.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/mergegraph/mergegraph.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/mergegraph/mergegraph.py (original) +++ subversion/branches/addremove/tools/dev/mergegraph/mergegraph.py Sat May 23 14:16:56 2020 @@ -177,7 +177,7 @@ class MergeGraph(pydot.Graph): def get_subgraph(graph, name): """Equivalent to pydot.Graph.get_subgraph() when there is no more than - one subgraph of the given name, but working aroung a bug in + one subgraph of the given name, but working around a bug in pydot.Graph.get_subgraph(). """ for subg in graph.get_subgraph_list(): Modified: subversion/branches/addremove/tools/dev/stress.pl URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/stress.pl?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/stress.pl (original) +++ subversion/branches/addremove/tools/dev/stress.pl Sat May 23 14:16:56 2020 @@ -43,7 +43,7 @@ # 9 # # The script runs with an ID in the range 0-9, and when it modifies a -# file it modifes the line that starts with its ID. Thus scripts with +# file it modifies the line that starts with its ID. Thus scripts with # different IDs will make changes that can be merged automatically. # # The main loop is then: @@ -430,7 +430,7 @@ where # stress testing one could remove this fixed seed and Perl will # automatically use a pseudo-random seed. However it doesn't much # matter, the stress testing really depends on the real-time timing -# differences between mutiple instances of the script, rather than the +# differences between multiple instances of the script, rather than the # randomness of the chosen files. srand 123456789; Propchange: subversion/branches/addremove/tools/dev/svnmover/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Sat May 23 14:16:56 2020 @@ -1 +1,2 @@ svnmover +.libs Modified: subversion/branches/addremove/tools/dev/svnmover/scanlog.c URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/svnmover/scanlog.c?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/svnmover/scanlog.c (original) +++ subversion/branches/addremove/tools/dev/svnmover/scanlog.c Sat May 23 14:16:56 2020 @@ -136,7 +136,7 @@ typedef struct scan_moves_log_receiver_b * rB: mv b->c * rC: mv c->d * we map each revision number to all moves which happened in the - * revision, which looks as follows: + * revision, which looks as follows: * rA : [(rA, x->z), (rA, a->b)] * rB : [(rB, b->c)] * rC : [(rC, c->d)] Modified: subversion/branches/addremove/tools/dev/svnmover/svnmover.c URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/svnmover/svnmover.c?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/svnmover/svnmover.c (original) +++ subversion/branches/addremove/tools/dev/svnmover/svnmover.c Sat May 23 14:16:56 2020 @@ -2436,7 +2436,7 @@ do_put_file(svn_branch__txn_t *txn, else SVN_ERR(svn_stream_for_stdin2(&src, FALSE, scratch_pool)); - svn_stringbuf_from_stream(&text, src, 0, scratch_pool); + SVN_ERR(svn_stringbuf_from_stream(&text, src, 0, scratch_pool)); } payload = svn_element__payload_create_file(props, text, scratch_pool); @@ -4042,7 +4042,7 @@ display_version(apr_getopt_t *os, svn_bo version_footer = svn_stringbuf_create(ra_desc_start, pool); SVN_ERR(svn_ra_print_modules(version_footer, pool)); - SVN_ERR(svn_opt_print_help4(NULL, "svnmover", TRUE, _quiet, FALSE, + SVN_ERR(svn_opt_print_help5(NULL, "svnmover", TRUE, _quiet, FALSE, version_footer->data, NULL, NULL, NULL, NULL, NULL, pool)); @@ -4332,7 +4332,8 @@ sub_main(int *exit_code, int argc, const trust_server_cert_opt, trust_server_cert_failures_opt, ui_opt, - colour_opt + colour_opt, + auth_password_from_stdin_opt }; static const apr_getopt_option_t options[] = { {"verbose", 'v', 0, ""}, @@ -4341,6 +4342,7 @@ sub_main(int *exit_code, int argc, const {"file", 'F', 1, ""}, {"username", 'u', 1, ""}, {"password", 'p', 1, ""}, + {"password-from-stdin", auth_password_from_stdin_opt, 1, ""}, {"root-url", 'U', 1, ""}, {"revision", 'r', 1, ""}, {"branch-id", 'B', 1, ""}, @@ -4387,6 +4389,7 @@ sub_main(int *exit_code, int argc, const const char *log_msg; svn_tristate_t coloured_output = svn_tristate_false; svnmover_wc_t *wc; + svn_boolean_t read_pass_from_stdin = FALSE; /* Check library versions */ SVN_ERR(check_lib_versions()); @@ -4431,6 +4434,9 @@ sub_main(int *exit_code, int argc, const case 'p': password = apr_pstrdup(pool, arg); break; + case auth_password_from_stdin_opt: + read_pass_from_stdin = TRUE; + break; case 'U': SVN_ERR(svn_utf_cstring_to_utf8(&anchor_url, arg, pool)); if (! svn_path_is_url(anchor_url)) @@ -4553,6 +4559,13 @@ sub_main(int *exit_code, int argc, const "--non-interactive")); } + /* --password-from-stdin can only be used with --non-interactive */ + if (read_pass_from_stdin && !non_interactive) + { + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("--password-from-stdin requires " + "--non-interactive")); + } /* Now initialize the client context */ @@ -4580,6 +4593,12 @@ sub_main(int *exit_code, int argc, const "svnmover: ", "--config-option")); } + /* Get password from stdin if necessary */ + if (read_pass_from_stdin) + { + SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool)); + } + SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool)); cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG); Modified: subversion/branches/addremove/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c (original) +++ subversion/branches/addremove/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c Sat May 23 14:16:56 2020 @@ -52,7 +52,7 @@ static svn_error_t * version(apr_pool_t *pool) { - return svn_opt_print_help4(NULL, "svnraisetreeconflict", TRUE, FALSE, FALSE, + return svn_opt_print_help5(NULL, "svnraisetreeconflict", TRUE, FALSE, FALSE, NULL, NULL, NULL, NULL, NULL, NULL, pool); } Modified: subversion/branches/addremove/tools/dev/unix-build/Makefile.svn URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/unix-build/Makefile.svn?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/unix-build/Makefile.svn (original) +++ subversion/branches/addremove/tools/dev/unix-build/Makefile.svn Sat May 23 14:16:56 2020 @@ -45,6 +45,9 @@ EXCLUSIVE_WC_LOCKS ?= 1 USE_HTTPV1 ?= no USE_AUTHZ_SHORT_CIRCUIT ?= no RAMDISK ?= /ramdisk +MAKE_JOBS ?= 4 +# available backends: fsfs fsx bdb +SVN_CHECK_FS_BACKENDS ?= fsfs PWD = $(shell pwd) UNAME = $(shell uname) @@ -71,6 +74,12 @@ endif # 2.2 endif # 2.3 endif # 2.4 +ifeq ($(UNAME),OpenBSD) +# Pick the correct base compiler (ie. clang rather than ancient gcc 4.2.1) +CC = cc +CXX = c++ +endif + TAG ?= none ifeq ($(TAG),none) BRANCH ?= trunk @@ -90,20 +99,22 @@ OBJDIR = $(PWD)/objdir BDB_MAJOR_VER = 4.7 BDB_VER = $(BDB_MAJOR_VER).25 -APR_VER = 1.5.2 +APR_VER = 1.7.0 APR_ICONV_VER = 1.2.1 GNU_ICONV_VER = 1.15 -APR_UTIL_VER = 1.5.4 -HTTPD_VER = 2.2.32 +APR_UTIL_VER = 1.6.1 +PCRE_VER = 8.41 +HTTPD_VER = 2.4.37 NEON_VER = 0.30.2 SERF_VER = 1.3.9 SERF_OLD_VER = 0.3.1 CYRUS_SASL_VER = 2.1.25 SQLITE_VER = 3160200 LIBMAGIC_VER = 5.30 -RUBY_VER = 2.4.2 +RUBY_VER = 2.4.4 BZ2_VER = 1.0.6 -PYTHON_VER = 2.7.13 +PYTHON_VER = 3.7.5 +PY3C_VER = 1.1 JUNIT_VER = 4.10 GETTEXT_VER = 0.19.8.1 LZ4_VER = 1.7.5 @@ -114,11 +125,13 @@ GNU_ICONV_DIST = libiconv-$(GNU_ICONV_VE NEON_DIST = neon-$(NEON_VER).tar.gz SQLITE_DIST = sqlite-autoconf-$(SQLITE_VER).tar.gz CYRUS_SASL_DIST = cyrus-sasl-$(CYRUS_SASL_VER).tar.gz +PCRE_DIST = pcre-$(PCRE_VER).tar.gz HTTPD_DIST = httpd-$(HTTPD_VER).tar.gz LIBMAGIC_DIST = file-$(LIBMAGIC_VER).tar.gz RUBY_DIST = ruby-$(RUBY_VER).tar.gz BZ2_DIST = bzip2-$(BZ2_VER).tar.gz PYTHON_DIST = Python-$(PYTHON_VER).tgz +PY3C_DIST = py3c-$(PY3C_VER).tar.gz JUNIT_DIST = junit-${JUNIT_VER}.jar GETTEXT_DIST = gettext-$(GETTEXT_VER).tar.gz LZ4_DIST = lz4-$(LZ4_VER).tar.gz @@ -126,14 +139,16 @@ LZ4_DIST = lz4-$(LZ4_VER).tar.gz SHA256_${BDB_DIST} = f14fd96dd38915a1d63dcb94a63fbb8092334ceba6b5060760427096f631263e SHA256_${APR_ICONV_DIST} = 19381959d50c4a5f3b9c84d594a5f9ffb3809786919b3058281f4c87e1f4b245 SHA256_${GNU_ICONV_DIST} = ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -SHA256_${HTTPD_DIST} = b6e1528779f99c301d6438d89ae892a311619b43a39f16297f9eabd4a8d16cb8 +SHA256_${PCRE_DIST} = 244838e1f1d14f7e2fa7681b857b3a8566b74215f28133f14a8f5e59241b682c +SHA256_${HTTPD_DIST} = aa97a834a32d51974be8d8a013b561e28d327387cb1da2c3c2762acd0146aabd SHA256_${NEON_DIST} = db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca SHA256_${CYRUS_SASL_DIST} = 418c16e6240a4f9b637cbe3d62937b9675627bad27c622191d47de8686fe24fe SHA256_${SQLITE_DIST} = 65cc0c3e9366f50c0679c5ccd31432cea894bc4a3e8947dabab88c8693263615 SHA256_${LIBMAGIC_DIST} = 694c2432e5240187524c9e7cf1ec6acc77b47a0e19554d34c14773e43dbbf214 -SHA256_${RUBY_DIST} = 93b9e75e00b262bc4def6b26b7ae8717efc252c47154abb7392e54357e6c8c9c +SHA256_${RUBY_DIST} = 254f1c1a79e4cc814d1e7320bc5bdd995dc57e08727d30a767664619a9c8ae5a SHA256_${BZ2_DIST} = a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd -SHA256_${PYTHON_DIST} = a4f05a0720ce0fd92626f0278b6b433eee9a6173ddf2bced7957dfb599a5ece1 +SHA256_${PYTHON_DIST} = 8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da +SHA256_${PY3C_DIST} = c7ffc22bc92dded0ca859db53ef3a0b466f89a9f8aad29359c9fe4ff18ebdd20 SHA256_${JUNIT_DIST} = 36a747ca1e0b86f6ea88055b8723bb87030d627766da6288bf077afdeeb0f75a SHA256_${GETTEXT_DIST} = ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43 SHA256_${LZ4_DIST} = 0190cacd63022ccb86f44fa5041dc6c3804407ad61550ca21c382827319e7e7e @@ -154,6 +169,7 @@ endef DISTFILES = $(DISTDIR)/$(NEON_DIST) \ $(DISTDIR)/$(SERF_DIST) \ $(DISTDIR)/$(SQLITE_DIST) \ + $(DISTDIR)/$(PCRE_DIST) \ $(DISTDIR)/$(HTTPD_DIST) \ $(DISTDIR)/$(APR_ICONV_DIST) \ $(DISTDIR)/$(GNU_ICONV_DIST) \ @@ -162,6 +178,7 @@ DISTFILES = $(DISTDIR)/$(NEON_DIST) \ $(DISTDIR)/$(RUBY_DIST) \ $(DISTDIR)/$(BZ2_DIST) \ $(DISTDIR)/$(PYTHON_DIST) \ + $(DISTDIR)/$(PY3C_DIST) \ $(DISTDIR)/$(JUNIT_DIST) \ $(DISTDIR)/$(GETTEXT_DIST) @@ -170,20 +187,23 @@ FETCH_CMD = wget -c SUBVERSION_REPOS_URL = https://svn.apache.org/repos/asf/subversion BDB_URL = http://download.oracle.com/berkeley-db/$(BDB_DIST) APR_URL = https://svn.apache.org/repos/asf/apr/apr -APR_ICONV_URL = https://www.apache.org/dist/apr/$(APR_ICONV_DIST) +APR_ICONV_URL = https://archive.apache.org/dist/apr/$(APR_ICONV_DIST) GNU_ICONV_URL = https://ftp.gnu.org/pub/gnu/libiconv/$(GNU_ICONV_DIST) APR_UTIL_URL = https://svn.apache.org/repos/asf/apr/apr-util +PCRE_URL = https://ftp.pcre.org/pub/pcre/$(PCRE_DIST) HTTPD_URL = https://archive.apache.org/dist/httpd/$(HTTPD_DIST) -NEON_URL = http://webdav.org/neon/$(NEON_DIST) +#NEON_URL = http://webdav.org/neon/$(NEON_DIST) +NEON_URL = http://ftp.openbsd.org/pub/OpenBSD/distfiles/$(NEON_DIST) SERF_URL = https://svn.apache.org/repos/asf/serf/tags/$(SERF_VER) SERF_OLD_URL = https://svn.apache.org/repos/asf/serf/tags/$(SERF_OLD_VER) SQLITE_URL = https://www.sqlite.org/2017/$(SQLITE_DIST) -CYRUS_SASL_URL = ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST) +CYRUS_SASL_URL = https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-${CYRUS_SASL_VER}/$(CYRUS_SASL_DIST) LIBMAGIC_URL = ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST) RUBY_URL = https://cache.ruby-lang.org/pub/ruby/2.4/$(RUBY_DIST) -BZ2_URL = http://bzip.org/$(BZ2_VER)/$(BZ2_DIST) +BZ2_URL = https://stsp.name/distfiles/$(BZ2_DIST) PYTHON_URL = https://python.org/ftp/python/$(PYTHON_VER)/$(PYTHON_DIST) -JUNIT_URL = https://downloads.sourceforge.net/project/junit/junit/$(JUNIT_VER)/$(JUNIT_DIST) +PY3C_URL = https://stsp.name/distfiles/py3c-${PY3C_VER}.tar.gz +JUNIT_URL = https://stsp.name/distfiles/$(JUNIT_DIST) GETTEXT_URL = https://ftp.gnu.org/pub/gnu/gettext/$(GETTEXT_DIST) LZ4_URL = https://github.com/lz4/lz4/archive/v$(LZ4_VER).tar.gz @@ -193,6 +213,7 @@ APR_SRCDIR = $(SRCDIR)/apr-$(APR_VER) APR_ICONV_SRCDIR = $(SRCDIR)/apr-iconv-$(APR_ICONV_VER) GNU_ICONV_SRCDIR = $(SRCDIR)/libiconv-$(GNU_ICONV_VER) APR_UTIL_SRCDIR = $(SRCDIR)/apr-util-$(APR_UTIL_VER) +PCRE_SRCDIR = $(SRCDIR)/pcre-$(PCRE_VER) HTTPD_SRCDIR = $(SRCDIR)/httpd-$(HTTPD_VER) NEON_SRCDIR = $(SRCDIR)/neon-$(NEON_VER) SERF_SRCDIR = $(SRCDIR)/serf-$(SERF_VER) @@ -203,6 +224,7 @@ LIBMAGIC_SRCDIR = $(SRCDIR)/file-$(LIBMA RUBY_SRCDIR = $(SRCDIR)/ruby-$(RUBY_VER) BZ2_SRCDIR = $(SRCDIR)/bzip2-$(BZ2_VER) PYTHON_SRCDIR = $(SRCDIR)/Python-$(PYTHON_VER) +PY3C_SRCDIR = $(SRCDIR)/py3c-$(PY3C_VER) GETTEXT_SRCDIR = $(SRCDIR)/gettext-$(GETTEXT_VER) LZ4_SRCDIR = ${SRCDIR}/lz4-$(LZ4_VER) SVN_SRCDIR = $(SVN_WC) @@ -212,6 +234,7 @@ APR_OBJDIR = $(OBJDIR)/apr-$(APR_VER) APR_ICONV_OBJDIR = $(OBJDIR)/apr-iconv-$(APR_ICONV_VER) GNU_ICONV_OBJDIR = $(OBJDIR)/libiconv-$(GNU_ICONV_VER) APR_UTIL_OBJDIR = $(OBJDIR)/apr-util-$(APR_UTIL_VER) +PCRE_OBJDIR = $(OBJDIR)/pcre-$(PCRE_VER) HTTPD_OBJDIR = $(OBJDIR)/httpd-$(HTTPD_VER) NEON_OBJDIR = $(OBJDIR)/neon-$(NEON_VER) SERF_OBJDIR = $(OBJDIR)/serf-$(SERF_VER) @@ -222,6 +245,7 @@ LIBMAGIC_OBJDIR = $(OBJDIR)/file-$(LIBMA RUBY_OBJDIR = $(OBJDIR)/ruby-$(RUBY_VER) BZ2_OBJDIR = $(OBJDIR)/bzip2-$(BZ2_VER) PYTHON_OBJDIR = $(OBJDIR)/python-$(PYTHON_VER) +PY3C_OBJDIR = $(OBJDIR)/python-$(PY3C_VER) GETTEXT_OBJDIR = $(OBJDIR)/gettext-$(GETTEXT_VER) LZ4_OBJDIR = ${OBJDIR}/lz4-$(LZ4_VER) SVN_OBJDIR = $(OBJDIR)/$(SVN_REL_WC) @@ -238,6 +262,10 @@ endif # We need this to make sure some targets below pick up the right libraries LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/gettext/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib +# We need this to make sure some targets below pick up the right pkg-config files +PKG_CONFIG_PATH=$(PREFIX)/apr/lib/pkgconfig:$(PREFIX)/neon/lib/pkgconfig:$(PREFIX)/serf/lib/pkgconfig:$(PREFIX)/sqlite/lib/pkgconfig:$(PREFIX)/ruby/lib/pkgconfig:$(PREFIX)/python/lib/pkgconfig:$(PREFIX)/lz4/lib/pkgconfig + + ####################################################################### # Main targets. ####################################################################### @@ -245,19 +273,19 @@ LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREF .PHONY: all reset clean nuke fetch all: dirs-create bdb-install apr-install iconv-install apr-util-install \ - httpd-install neon-install serf-install serf-old-install \ + pcre-install httpd-install neon-install serf-install serf-old-install \ sqlite-install cyrus-sasl-install libmagic-install \ - ruby-install bz2-install python-install gettext-install \ + ruby-install bz2-install python-install py3c-retrieve gettext-install \ lz4-install svn-install svn-bindings-install # Use these to start a build from the beginning. reset: dirs-reset bdb-reset apr-reset iconv-reset apr-util-reset \ - httpd-reset neon-reset serf-reset serf-old-reset sqlite-reset \ - cyrus-sasl-reset libmagic-reset ruby-reset python-reset \ + pcre-reset httpd-reset neon-reset serf-reset serf-old-reset \ + sqlite-reset cyrus-sasl-reset libmagic-reset ruby-reset python-reset \ bz2-reset gettext-reset lz4-reset svn-reset # Use to save disk space. -clean: bdb-clean apr-clean iconv-clean apr-util-clean httpd-clean \ +clean: bdb-clean apr-clean iconv-clean apr-util-clean pcre-clean httpd-clean \ neon-clean serf-clean serf-old-clean sqlite-clean cyrus-sasl-clean \ libmagic-clean ruby-clean bz2-clean python-clean gettext-clean \ lz4-clean svn-clean @@ -331,6 +359,7 @@ $(BDB_OBJDIR)/.retrieved: $(DISTDIR)/$(B $(BDB_OBJDIR)/.configured: $(BDB_OBJDIR)/.retrieved cd $(BDB_SRCDIR)/build_unix \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \ + CC=$(CC) CXX=$(CXX) \ ../dist/configure \ --prefix=$(PREFIX)/bdb \ --enable-debug @@ -338,7 +367,7 @@ $(BDB_OBJDIR)/.configured: $(BDB_OBJDIR) # compile bdb $(BDB_OBJDIR)/.compiled: $(BDB_OBJDIR)/.configured - (cd $(BDB_SRCDIR)/build_unix && env MAKEFLAGS= make) + (cd $(BDB_SRCDIR)/build_unix && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install bdb @@ -388,6 +417,8 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR) cd $(APR_SRCDIR) && ./buildconf cd $(APR_OBJDIR) \ && env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + CC=$(CC) CXX=$(CXX) \ $(APR_SRCDIR)/configure \ --prefix=$(PREFIX)/apr \ --enable-maintainer-mode \ @@ -397,7 +428,7 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR) # compile apr $(APR_OBJDIR)/.compiled: $(APR_OBJDIR)/.configured - (cd $(APR_OBJDIR) && env MAKEFLAGS= make) + (cd $(APR_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install apr @@ -436,7 +467,9 @@ $(APR_ICONV_OBJDIR)/.configured: $(APR_I $(APR_OBJDIR)/.installed cd $(APR_ICONV_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \ + CC=$(CC) CXX=$(CXX) \ GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(APR_ICONV_SRCDIR)/configure \ --prefix=$(PREFIX)/apr \ --with-apr=$(PREFIX)/apr @@ -445,7 +478,7 @@ $(APR_ICONV_OBJDIR)/.configured: $(APR_I # compile apr-iconv $(APR_ICONV_OBJDIR)/.compiled: $(APR_ICONV_OBJDIR)/.configured (cd $(APR_ICONV_OBJDIR) \ - && env MAKEFLAGS= make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0 $(PROFILE_CFLAGS)") + && env MAKEFLAGS= make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0 $(PROFILE_CFLAGS)" -j${MAKE_JOBS}) touch $@ # install apr-iconv @@ -520,6 +553,8 @@ $(GNU_ICONV_OBJDIR)/.configured: $(GNU_I ${MAKE} -f Makefile.devel lib/aliases.h cd $(GNU_ICONV_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\ + CC=$(CC) CXX=$(CXX) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(GNU_ICONV_SRCDIR)/configure \ --prefix=$(PREFIX)/iconv \ --enable-extra-encodings @@ -527,7 +562,7 @@ $(GNU_ICONV_OBJDIR)/.configured: $(GNU_I # compile gnu-iconv $(GNU_ICONV_OBJDIR)/.compiled: $(GNU_ICONV_OBJDIR)/.configured - (cd $(GNU_ICONV_OBJDIR) && env MAKEFLAGS= make) + (cd $(GNU_ICONV_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install gnu-iconv @@ -590,7 +625,9 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT cd $(APR_UTIL_SRCDIR) && ./buildconf --with-apr=$(APR_SRCDIR) cd $(APR_UTIL_OBJDIR) \ && env LD_LIBRARY_PATH=$(PREFIX)/bdb/lib \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \ + CC=$(CC) CXX=$(CXX) \ GREP="`which grep`" \ $(APR_UTIL_SRCDIR)/configure \ --prefix=$(PREFIX)/apr \ @@ -602,7 +639,7 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT # compile apr-util $(APR_UTIL_OBJDIR)/.compiled: $(APR_UTIL_OBJDIR)/.configured - (cd $(APR_UTIL_OBJDIR) && env MAKEFLAGS= make) + (cd $(APR_UTIL_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install apr-util @@ -611,6 +648,53 @@ $(APR_UTIL_OBJDIR)/.installed: $(APR_UTI touch $@ ####################################################################### +# pcre +####################################################################### + +pcre-retrieve: $(PCRE_OBJDIR)/.retrieved +pcre-configure: $(PCRE_OBJDIR)/.configured +pcre-compile: $(PCRE_OBJDIR)/.compiled +pcre-install: $(PCRE_OBJDIR)/.installed +pcre-reset: + $(foreach f, .retrieved .configured .compiled .installed, \ + rm -f $(PCRE_OBJDIR)/$(f);) + +pcre-clean: + -(cd $(PCRE_OBJDIR) && env MAKEFLAGS= make clean) + +# fetch distfile for pcre +$(DISTDIR)/$(PCRE_DIST): + cd $(DISTDIR) && $(FETCH_CMD) $(PCRE_URL) + +# retrieve pcre +$(PCRE_OBJDIR)/.retrieved: $(DISTDIR)/$(PCRE_DIST) + $(call do_check_sha256,$(PCRE_DIST)) + [ -d $(PCRE_OBJDIR) ] || mkdir -p $(PCRE_OBJDIR) + tar -C $(SRCDIR) -zxf $(DISTDIR)/$(PCRE_DIST) + touch $@ + +# configure pcre +$(PCRE_OBJDIR)/.configured: $(PCRE_OBJDIR)/.retrieved + cd $(PCRE_OBJDIR) \ + && env CFLAGS="-g $(PROFILE_CFLAGS)" \ + CC=$(CC) CXX=$(CXX) \ + GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + $(PCRE_SRCDIR)/configure \ + --prefix=$(PREFIX)/pcre + touch $@ + +# compile pcre +$(PCRE_OBJDIR)/.compiled: $(PCRE_OBJDIR)/.configured + (cd $(PCRE_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) + touch $@ + +# install pcre +$(PCRE_OBJDIR)/.installed: $(PCRE_OBJDIR)/.compiled + (cd $(PCRE_OBJDIR) && env MAKEFLAGS= make install) + touch $@ + +####################################################################### # httpd ####################################################################### @@ -625,113 +709,72 @@ httpd-reset: httpd-clean: -(cd $(HTTPD_OBJDIR) && env MAKEFLAGS= make clean) - -rm ${HTTPD_OBJDIR}/chil-engine.diff - -rm ${HTTPD_OBJDIR}/ssl-set-state.diff - -rm ${HTTPD_OBJDIR}/acinclude.diff + rm -f $(HTTPD_OBJDIR)/mod-proxy-no-threads-2.4.diff + rm -f $(HTTPD_OBJDIR)/ssl-init-proxy-certs.diff # fetch distfile for httpd $(DISTDIR)/$(HTTPD_DIST): cd $(DISTDIR) && $(FETCH_CMD) $(HTTPD_URL) -$(HTTPD_OBJDIR)/chil-engine.diff: +$(HTTPD_OBJDIR)/ssl-init-proxy-certs.diff: mkdir -p $(dir $@) - echo > $@.tmp '--- modules/ssl/ssl_engine_init.c.orig Mon Apr 14 13:20:57 2014' - echo >>$@.tmp '+++ modules/ssl/ssl_engine_init.c Mon Apr 14 13:21:22 2014' - echo >>$@.tmp '@@ -406,9 +406,11 @@ void ssl_init_Engine(server_rec *s, apr_pool_t *p)' - echo >>$@.tmp ' ssl_die();' - echo >>$@.tmp ' }' - echo >>$@.tmp ' ' - echo >>$@.tmp '+#ifdef ENGINE_CTRL_CHIL_SET_FORKCHECK' - echo >>$@.tmp ' if (strEQ(mc->szCryptoDevice, "chil")) {' - echo >>$@.tmp ' ENGINE_ctrl(e, ENGINE_CTRL_CHIL_SET_FORKCHECK, 1, 0, 0);' - echo >>$@.tmp ' }' - echo >>$@.tmp '+#endif' - echo >>$@.tmp ' ' - echo >>$@.tmp ' if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {' - echo >>$@.tmp ' ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,' + echo > $@.tmp '--- modules/ssl/ssl_engine_init.c.orig Sun Dec 16 13:34:14 2018' + echo >> $@.tmp '+++ modules/ssl/ssl_engine_init.c Sun Dec 16 13:34:59 2018' + echo >> $@.tmp '@@ -1492,7 +1492,7 @@' + echo >> $@.tmp ' X509_STORE_CTX *sctx;' + echo >> $@.tmp ' X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);' + echo >> $@.tmp ' ' + echo >> $@.tmp '-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL' + echo >> $@.tmp '+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)' + echo >> $@.tmp ' /* For OpenSSL >=1.1.1, turn on client cert support which is' + echo >> $@.tmp ' * otherwise turned off by default (by design).' + echo >> $@.tmp ' * https://github.com/openssl/openssl/issues/6933 */' mv -f $@.tmp $@ -$(HTTPD_OBJDIR)/ssl-set-state.diff: - mkdir -p $(dir $@) - echo > $@.tmp '--- modules/ssl/ssl_toolkit_compat.h.orig Fri Feb 3 10:47:33 2017' - echo >>$@.tmp '+++ modules/ssl/ssl_toolkit_compat.h Fri Feb 3 10:52:17 2017' - echo >>$@.tmp '@@ -84,7 +84,9 @@' - echo >>$@.tmp ' #define SSL_get_state(ssl) SSL_state(ssl)' - echo >>$@.tmp ' #endif' - echo >>$@.tmp ' ' - echo >>$@.tmp '+#ifndef HAVE_SSL_SET_STATE' - echo >>$@.tmp ' #define SSL_set_state(ssl,val) (ssl)->state = val' - echo >>$@.tmp '+#endif' - echo >>$@.tmp ' ' - echo >>$@.tmp ' #define MODSSL_BIO_CB_ARG_TYPE const char' - echo >>$@.tmp ' #define MODSSL_CRYPTO_CB_ARG_TYPE const char' - mv -f $@.tmp $@ - -$(HTTPD_OBJDIR)/acinclude.diff: - mkdir -p $(dir $@) - echo >$@.tmp '--- acinclude.m4.orig Fri Feb 3 11:05:08 2017' - echo >>$@.tmp '+++ acinclude.m4 Fri Feb 3 11:05:15 2017' - echo >>$@.tmp '@@ -455,6 +455,7 @@' - echo >>$@.tmp ' AC_CHECK_HEADERS([openssl/engine.h])' - echo >>$@.tmp ' AC_CHECK_FUNCS([SSLeay_version SSL_CTX_new], [], [liberrors="yes"])' - echo >>$@.tmp ' AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines])' - echo >>$@.tmp '+ AC_CHECK_FUNCS(SSL_set_state)' - echo >>$@.tmp ' else' - echo >>$@.tmp ' AC_CHECK_FUNCS([SSLC_library_version SSL_CTX_new], [], [liberrors="yes"])' - echo >>$@.tmp ' AC_CHECK_FUNCS(SSL_set_state)' - mv -f $@.tmp $@ +$(HTTPD_OBJDIR)/mod-proxy-no-threads-2.4.diff: + cd $(HTTPD_OBJDIR) && $(FETCH_CMD) https://stsp.name/mod-proxy-no-threads-2.4.diff # retrieve httpd $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$(HTTPD_DIST) \ - $(HTTPD_OBJDIR)/chil-engine.diff $(HTTPD_OBJDIR)/ssl-set-state.diff \ - $(HTTPD_OBJDIR)/acinclude.diff + $(HTTPD_OBJDIR)/ssl-init-proxy-certs.diff \ + $(HTTPD_OBJDIR)/mod-proxy-no-threads-2.4.diff $(call do_check_sha256,$(HTTPD_DIST)) [ -d $(HTTPD_OBJDIR) ] || mkdir -p $(HTTPD_OBJDIR) tar -C $(SRCDIR) -zxf $(DISTDIR)/$(HTTPD_DIST) - cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/chil-engine.diff - cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/ssl-set-state.diff - cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/acinclude.diff - cp $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h \ - $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h.orig - sed '/^#define HAVE_SSL_RAND_EGD/d' \ - < $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h.orig \ - > $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h - cp $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c \ - $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c.orig - sed 's/^\(#if (OPENSSL_VERSION_NUMBER >= 0x00908000)\)$$/\1 \&\& !defined(OPENSSL_NO_COMP)/' \ - < $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c.orig \ - > $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c - cp $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_init.c \ - $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_init.c.orig - $(foreach f, ssl_engine_init.c ssl_util_ssl.c ssl_util_ssl.h, \ - cp $(HTTPD_SRCDIR)/modules/ssl/${f} $(HTTPD_SRCDIR)/modules/ssl/${f}.orig; \ - sed 's/SSL_CTX_use_certificate_chain/_SSL_CTX_use_certificate_chain/' \ - < $(HTTPD_SRCDIR)/modules/ssl/${f}.orig \ - > $(HTTPD_SRCDIR)/modules/ssl/${f};\ - ) + (cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/ssl-init-proxy-certs.diff) + (cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/mod-proxy-no-threads-2.4.diff) + (cd $(HTTPD_SRCDIR) && svn diff -cr1849590 https://svn.apache.org/repos/asf/httpd/httpd/trunk | patch -p0) + (cd $(HTTPD_SRCDIR) && svn diff -cr1663375 https://svn.apache.org/repos/asf/httpd/httpd/trunk | patch -p0) touch $@ # configure httpd $(HTTPD_OBJDIR)/.configured: $(HTTPD_OBJDIR)/.retrieved \ - $(APR_UTIL_OBJDIR)/.installed - cd $(HTTPD_SRCDIR) && ./buildconf + $(APR_UTIL_OBJDIR)/.installed $(PCRE_OBJDIR)/.installed + cd $(HTTPD_SRCDIR) && ./buildconf \ + --with-apr="$(PREFIX)/apr/bin/apr-1-config" \ + --with-apr-util="$(PREFIX)/apr/bin/apu-1-config" cd $(HTTPD_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \ + CC=$(CC) CXX=$(CXX) \ GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(HTTPD_SRCDIR)/configure \ --prefix=$(PREFIX)/httpd \ - --enable-maintainer-mode \ + --with-mpm=prefork \ --enable-ssl \ --enable-dav \ --enable-proxy \ - --with-mpm=prefork \ - --with-apr="$(PREFIX)/apr" \ - --with-apr-util="$(PREFIX)/apr" + --disable-md \ + --disable-http2 \ + --disable-brotli \ + --with-apr="$(PREFIX)/apr/bin/apr-1-config" \ + --with-apr-util="$(PREFIX)/apr/bin/apu-1-config" \ + --with-pcre="$(PREFIX)/pcre" touch $@ # compile httpd $(HTTPD_OBJDIR)/.compiled: $(HTTPD_OBJDIR)/.configured - (cd $(HTTPD_OBJDIR) && env MAKEFLAGS= make) + (cd $(HTTPD_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install httpd @@ -745,19 +788,28 @@ $(HTTPD_CONF): echo > $@.tmp '# httpd config for use with mod_dav_svn' echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"' echo >>$@.tmp 'Listen localhost:8080' + echo >>$@.tmp 'LoadModule unixd_module modules/mod_unixd.so' + echo >>$@.tmp 'LoadModule alias_module modules/mod_alias.so' + echo >>$@.tmp 'LoadModule access_compat_module modules/mod_access_compat.so' + echo >>$@.tmp 'LoadModule authn_core_module modules/mod_authn_core.so' + echo >>$@.tmp 'LoadModule authn_file_module modules/mod_authn_file.so' + echo >>$@.tmp 'LoadModule authz_core_module modules/mod_authz_core.so' + echo >>$@.tmp 'LoadModule authz_user_module modules/mod_authz_user.so' + echo >>$@.tmp 'LoadModule authz_groupfile_module modules/mod_authz_groupfile.so' + echo >>$@.tmp 'LoadModule auth_basic_module modules/mod_auth_basic.so' + echo >>$@.tmp 'LoadModule dav_module modules/mod_dav.so' echo >>$@.tmp 'LoadModule dav_svn_module modules/svn-$(WC)/mod_dav_svn.so' echo >>$@.tmp 'LoadModule authz_svn_module modules/svn-$(WC)/mod_authz_svn.so' echo >>$@.tmp 'DocumentRoot "$(PREFIX)/httpd/htdocs"' echo >>$@.tmp '<Directory />' echo >>$@.tmp ' Options FollowSymLinks' echo >>$@.tmp ' AllowOverride None' - echo >>$@.tmp ' Order deny,allow' - echo >>$@.tmp ' Deny from all' + echo >>$@.tmp ' Require all denied' echo >>$@.tmp '</Directory>' echo >>$@.tmp '<Location /repos>' echo >>$@.tmp ' DAV svn' echo >>$@.tmp ' SVNPath /tmp/svn-sandbox/repos' - echo >>$@.tmp ' Allow from localhost' + echo >>$@.tmp ' Require ip localhost' echo >>$@.tmp '</Location>' mv -f $@.tmp $@ @@ -802,6 +854,8 @@ $(NEON_OBJDIR)/.configured: $(NEON_OBJDI fi cd $(NEON_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \ + CC=$(CC) CXX=$(CXX) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(NEON_SRCDIR)/configure \ PATH=$(NEON_OBJDIR):$$PATH \ --prefix=$(PREFIX)/neon \ @@ -812,7 +866,7 @@ $(NEON_OBJDIR)/.configured: $(NEON_OBJDI # compile neon $(NEON_OBJDIR)/.compiled: $(NEON_OBJDIR)/.configured - (cd $(NEON_OBJDIR) && env MAKEFLAGS= make) + (cd $(NEON_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install neon @@ -860,11 +914,13 @@ $(SERF_OBJDIR)/.retrieved: $(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)/.retrieved \ $(APR_UTIL_OBJDIR)/.installed cd $(SERF_SRCDIR) && \ - scons DEBUG=1 \ + scons -j${MAKE_JOBS} DEBUG=1 \ CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \ + CC=$(CC) CXX=$(CXX) \ APR=$(PREFIX)/apr \ APU=$(PREFIX)/apr \ - PREFIX=$(PREFIX)/serf + PREFIX=$(PREFIX)/serf \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) touch $@ # install serf @@ -905,6 +961,7 @@ $(SERF_OLD_OBJDIR)/.compiled: $(SERF_OLD $(APR_UTIL_OBJDIR)/.installed cd $(SERF_OLD_SRCDIR) && \ env CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \ + CC=$(CC) CXX=$(CXX) \ ./serfmake --with-apr=$(PREFIX)/apr \ --prefix=$(PREFIX)/serf-old \ build @@ -956,6 +1013,8 @@ endif $(SQLITE_OBJDIR)/.configured: $(SQLITE_OBJDIR)/.retrieved cd $(SQLITE_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + CC=$(CC) CXX=$(CXX) \ $(SQLITE_SRCDIR)/configure \ --prefix=$(PREFIX)/sqlite \ $(THREADSAFE_FLAG) @@ -963,7 +1022,7 @@ $(SQLITE_OBJDIR)/.configured: $(SQLITE_O # compile sqlite $(SQLITE_OBJDIR)/.compiled: $(SQLITE_OBJDIR)/.configured - (cd $(SQLITE_OBJDIR) && env MAKEFLAGS= make) + (cd $(SQLITE_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install sqlite @@ -1025,7 +1084,9 @@ $(CYRUS_SASL_OBJDIR)/.configured: $(CYRU cd $(CYRUS_SASL_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" \ CPPFLAGS="-I/usr/include/kerberosV" \ + CC=$(CC) CXX=$(CXX) \ GREP="`which grep`" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(CYRUS_SASL_SRCDIR)/configure \ --with-dbpath=$(PREFIX)/cyrus-sasl/etc/sasldb2 \ --with-plugindir=$(PREFIX)/cyrus-sasl/lib/sasl2 \ @@ -1037,7 +1098,7 @@ $(CYRUS_SASL_OBJDIR)/.configured: $(CYRU --prefix=$(PREFIX)/cyrus-sasl touch $@ -# compile cyrus-sasl +# compile cyrus-sasl (ignore MAKE_JOBS; multiple jobs cause random build failures) $(CYRUS_SASL_OBJDIR)/.compiled: $(CYRUS_SASL_OBJDIR)/.configured (cd $(CYRUS_SASL_OBJDIR) && env MAKEFLAGS= make) touch $@ @@ -1077,6 +1138,8 @@ $(LIBMAGIC_OBJDIR)/.retrieved: $(DISTDIR $(LIBMAGIC_OBJDIR)/.configured: $(LIBMAGIC_OBJDIR)/.retrieved cd $(LIBMAGIC_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\ + CC=$(CC) CXX=$(CXX) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(LIBMAGIC_SRCDIR)/configure \ --enable-fsect-man5 \ --prefix=$(PREFIX)/libmagic @@ -1084,7 +1147,7 @@ $(LIBMAGIC_OBJDIR)/.configured: $(LIBMAG # compile libmagic $(LIBMAGIC_OBJDIR)/.compiled: $(LIBMAGIC_OBJDIR)/.configured - (cd $(LIBMAGIC_OBJDIR) && env MAKEFLAGS= make) + (cd $(LIBMAGIC_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install libmagic @@ -1111,13 +1174,105 @@ ruby-clean: $(DISTDIR)/$(RUBY_DIST): cd $(DISTDIR) && $(FETCH_CMD) $(RUBY_URL) +$(RUBY_OBJDIR)/openssl_missing.patch: + mkdir -p $(dir $@) + echo > $@.tmp 'Index: ext/openssl/openssl_missing.h' + echo >> $@.tmp '--- ext/openssl/openssl_missing.h.orig' + echo >> $@.tmp '+++ ext/openssl/openssl_missing.h' + echo >> $@.tmp '@@ -119,6 +119,9 @@ void ossl_HMAC_CTX_free(HMAC_CTX *);' + echo >> $@.tmp ' #if !defined(HAVE_X509_STORE_SET_EX_DATA)' + echo >> $@.tmp ' # define X509_STORE_set_ex_data(x, idx, data) \' + echo >> $@.tmp ' CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))' + echo >> $@.tmp '+#endif' + echo >> $@.tmp '+' + echo >> $@.tmp '+#if !defined(HAVE_X509_STORE_GET_EX_NEW_INDEX)' + echo >> $@.tmp ' # define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \' + echo >> $@.tmp ' CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \' + echo >> $@.tmp ' (newf), (dupf), (freef))' + echo >> $@.tmp '@@ -192,6 +195,7 @@ void ossl_X509_REQ_get0_signature(const X509_REQ *, co' + echo >> $@.tmp ' #endif' + echo >> $@.tmp ' ' + echo >> $@.tmp ' #if !defined(HAVE_OPAQUE_OPENSSL)' + echo >> $@.tmp '+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL' + echo >> $@.tmp ' #define IMPL_PKEY_GETTER(_type, _name) \' + echo >> $@.tmp ' static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \' + echo >> $@.tmp ' return pkey->pkey._name; }' + echo >> $@.tmp '@@ -243,6 +247,7 @@ IMPL_PKEY_GETTER(EC_KEY, ec)' + echo >> $@.tmp ' #undef IMPL_PKEY_GETTER' + echo >> $@.tmp ' #undef IMPL_KEY_ACCESSOR2' + echo >> $@.tmp ' #undef IMPL_KEY_ACCESSOR3' + echo >> $@.tmp '+#endif' + echo >> $@.tmp ' #endif /* HAVE_OPAQUE_OPENSSL */' + echo >> $@.tmp ' ' + echo >> $@.tmp ' #if defined(HAVE_AUTHENTICATED_ENCRYPTION) && !defined(EVP_CTRL_AEAD_GET_TAG)' + mv -f $@.tmp $@ + +$(RUBY_OBJDIR)/sparc64_buserror.patch: + mkdir -p $(dir $@) + echo > $@.tmp '--- compile.c.orig Thu Mar 12 12:58:26 2020' + echo >> $@.tmp '+++ compile.c Thu Mar 12 16:36:55 2020' + echo >> $@.tmp '@@ -751,6 +751,16 @@' + echo >> $@.tmp ' #define STRICT_ALIGNMENT' + echo >> $@.tmp ' #endif' + echo >> $@.tmp ' ' + echo >> $@.tmp '+/*' + echo >> $@.tmp '+ * Some OpenBSD platforms (including sparc64) require strict alignment.' + echo >> $@.tmp '+ */' + echo >> $@.tmp '+#if defined(__OpenBSD__)' + echo >> $@.tmp '+ #include <sys/endian.h>' + echo >> $@.tmp '+ #ifdef __STRICT_ALIGNMENT' + echo >> $@.tmp '+ #define STRICT_ALIGNMENT' + echo >> $@.tmp '+ #endif' + echo >> $@.tmp '+#endif' + echo >> $@.tmp '+' + echo >> $@.tmp ' #ifdef STRICT_ALIGNMENT' + echo >> $@.tmp ' #if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE' + echo >> $@.tmp ' #define ALIGNMENT_SIZE SIZEOF_LONG_LONG' + echo >> $@.tmp '@@ -2094,7 +2104,8 @@' + echo >> $@.tmp ' unref_destination(iobj, 0);' + echo >> $@.tmp ' REMOVE_ELEM(&iobj->link);' + echo >> $@.tmp ' }' + echo >> $@.tmp '- else if (iobj != diobj && IS_INSN_ID(diobj, jump) &&' + echo >> $@.tmp '+ else if (iobj != diobj && IS_INSN(&diobj->link) &&' + echo >> $@.tmp '+ IS_INSN_ID(diobj, jump) &&' + echo >> $@.tmp ' OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) {' + echo >> $@.tmp ' replace_destination(iobj, diobj);' + echo >> $@.tmp ' remove_unreachable_chunk(iseq, iobj->link.next);' + echo >> $@.tmp '@@ -2136,6 +2147,7 @@' + echo >> $@.tmp ' * L2:' + echo >> $@.tmp ' */' + echo >> $@.tmp ' else if ((piobj = (INSN *)get_prev_insn(iobj)) != 0 &&' + echo >> $@.tmp '+ IS_INSN(&piobj->link) &&' + echo >> $@.tmp ' (IS_INSN_ID(piobj, branchif) ||' + echo >> $@.tmp ' IS_INSN_ID(piobj, branchunless))) {' + echo >> $@.tmp ' if (niobj == (INSN *)get_destination_insn(piobj)) {' + echo >> $@.tmp '@@ -2176,7 +2188,7 @@' + echo >> $@.tmp ' }' + echo >> $@.tmp ' ' + echo >> $@.tmp ' for (;;) {' + echo >> $@.tmp '- if (IS_INSN_ID(nobj, jump)) {' + echo >> $@.tmp '+ if (IS_INSN(&nobj->link) && IS_INSN_ID(nobj, jump)) {' + echo >> $@.tmp ' replace_destination(iobj, nobj);' + echo >> $@.tmp ' }' + echo >> $@.tmp ' else if (prev_dup && IS_INSN_ID(nobj, dup) &&' + mv -f $@.tmp $@ + +ifeq ($(UNAME),OpenBSD) +RUBY_SSL_EX_NEW_DATA_PATCH = sed -i -e '/^have_func("X509_STORE_set_ex_data")$$/ { p; s/^.*$$/\have_func("X509_STORE_get_ex_new_index")/; }' +else +RUBY_SSL_EX_NEW_DATA_PATCH = true +endif + # retrieve ruby # -$(RUBY_OBJDIR)/.retrieved: $(DISTDIR)/$(RUBY_DIST) +$(RUBY_OBJDIR)/.retrieved: $(DISTDIR)/$(RUBY_DIST) $(RUBY_OBJDIR)/openssl_missing.patch $(RUBY_OBJDIR)/sparc64_buserror.patch $(call do_check_sha256,$(RUBY_DIST)) [ -d $(RUBY_OBJDIR) ] || mkdir -p $(RUBY_OBJDIR) 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 + cd $(RUBY_SRCDIR) && patch -p0 < $(RUBY_OBJDIR)/openssl_missing.patch + cd $(RUBY_SRCDIR) && patch -p0 < $(RUBY_OBJDIR)/sparc64_buserror.patch touch $@ ifeq ($(THREADING),yes) @@ -1130,6 +1285,8 @@ endif $(RUBY_OBJDIR)/.configured: $(RUBY_OBJDIR)/.retrieved cd $(RUBY_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\ + CC=$(CC) CXX=$(CXX) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(RUBY_SRCDIR)/configure \ --prefix=$(PREFIX)/ruby \ --enable-shared \ @@ -1140,7 +1297,7 @@ $(RUBY_OBJDIR)/.configured: $(RUBY_OBJDI --without-gmp touch $@ -# compile ruby +# compile ruby (ignore MAKE_JOBS; multiple jobs cause random build failures) $(RUBY_OBJDIR)/.compiled: $(RUBY_OBJDIR)/.configured (cd $(RUBY_OBJDIR) && env MAKEFLAGS= make) touch $@ @@ -1177,7 +1334,8 @@ $(BZ2_OBJDIR)/.retrieved: $(DISTDIR)/$(B # compile bz2 $(BZ2_OBJDIR)/.compiled: $(BZ2_OBJDIR)/.retrieved - (cd $(BZ2_SRCDIR) && env MAKEFLAGS= make CFLAGS="-g $(PROFILE_CFLAGS) -fPIC") + (cd $(BZ2_SRCDIR) && env MAKEFLAGS= make CC=$(CC) CXX=$(CXX) \ + CFLAGS="-g $(PROFILE_CFLAGS) -fPIC" -j${MAKE_JOBS}) touch $@ # install bz2 @@ -1205,14 +1363,9 @@ python-clean: $(DISTDIR)/$(PYTHON_DIST): cd $(DISTDIR) && $(FETCH_CMD) $(PYTHON_URL) -# https://bugs.python.org/issue12560 -$(DISTDIR)/python-issue12560.patch: - cd $(DISTDIR) && $(FETCH_CMD) -O "$@" \ - https://hg.python.org/cpython/raw-rev/32cc37a89b58 - # retrieve python # -$(PYTHON_OBJDIR)/.retrieved: $(DISTDIR)/$(PYTHON_DIST) $(DISTDIR)/python-issue12560.patch +$(PYTHON_OBJDIR)/.retrieved: $(DISTDIR)/$(PYTHON_DIST) $(call do_check_sha256,$(PYTHON_DIST)) [ -d $(PYTHON_OBJDIR) ] || mkdir -p $(PYTHON_OBJDIR) tar -C $(SRCDIR) -zxf $(DISTDIR)/$(PYTHON_DIST) @@ -1226,7 +1379,6 @@ $(PYTHON_OBJDIR)/.retrieved: $(DISTDIR)/ > $(PYTHON_SRCDIR)/setup.py.patched mv $(PYTHON_SRCDIR)/setup.py.patched $(PYTHON_SRCDIR)/setup.py chmod +x $(PYTHON_SRCDIR)/setup.py - cd $(PYTHON_SRCDIR) && patch -p1 < $(DISTDIR)/python-issue12560.patch touch $@ # configure python @@ -1237,14 +1389,17 @@ $(PYTHON_OBJDIR)/.configured: $(PYTHON_O $(BZ2_OBJDIR)/.installed cd $(PYTHON_OBJDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \ + CC=$(CC) CXX=$(CXX) \ CPPFLAGS="-I$(PREFIX)/bz2/include" \ LDFLAGS="-Wl,-rpath=$(PREFIX)/python/lib -L$(PREFIX)/bz2/lib" \ LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(PYTHON_SRCDIR)/configure \ --prefix=$(PREFIX)/python \ --enable-shared \ --with-system-expat \ --with-dbmliborder=bdb \ + --without-pymalloc \ $(PYTHON_PROFILING) touch $@ @@ -1253,7 +1408,7 @@ $(PYTHON_OBJDIR)/.compiled: $(PYTHON_OBJ (cd $(PYTHON_OBJDIR) && \ env MAKEFLAGS= \ LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \ - make) + make -j${MAKE_JOBS}) touch $@ # install python @@ -1264,6 +1419,25 @@ $(PYTHON_OBJDIR)/.installed: $(PYTHON_OB make install) touch $@ +####################################################################### +# py3c +####################################################################### + +py3c-retrieve: $(PY3C_OBJDIR)/.retrieved +py3c-reset: + $(foreach f, .retrieved .configured .compiled .installed, \ + rm -f $(PY3C_OBJDIR)/$(f);) + +# fetch distfile for py3c +$(DISTDIR)/$(PY3C_DIST): + cd $(DISTDIR) && $(FETCH_CMD) $(PY3C_URL) + +# retrieve py3c +$(PY3C_OBJDIR)/.retrieved: $(DISTDIR)/$(PY3C_DIST) + $(call do_check_sha256,$(PY3C_DIST)) + [ -d $(PY3C_OBJDIR) ] || mkdir -p $(PY3C_OBJDIR) + tar -C $(SRCDIR) -zxf $(DISTDIR)/$(PY3C_DIST) + touch $@ ####################################################################### # junit @@ -1306,7 +1480,9 @@ $(GETTEXT_OBJDIR)/.retrieved: $(DISTDIR) $(GETTEXT_OBJDIR)/.configured: $(GETTEXT_OBJDIR)/.retrieved cd $(GETTEXT_SRCDIR) \ && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\ + CC=$(CC) CXX=$(CXX) \ LDFLAGS="-L$(PREFIX)/iconv/lib" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(GETTEXT_SRCDIR)/configure \ --prefix=$(PREFIX)/gettext \ --with-libiconv-prefix=$(PREFIX)/iconv \ @@ -1324,7 +1500,7 @@ $(GETTEXT_OBJDIR)/.configured: $(GETTEXT # compile gettext $(GETTEXT_OBJDIR)/.compiled: $(GETTEXT_OBJDIR)/.configured - (cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make) + (cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make -j${MAKE_JOBS}) touch $@ # install gettext @@ -1365,7 +1541,8 @@ $(LZ4_OBJDIR)/.configured: $(LZ4_OBJDIR) # compile lz4 $(LZ4_OBJDIR)/.compiled: $(LZ4_OBJDIR)/.configured (cd $(LZ4_SRCDIR)/lib && \ - env MAKEFLAGS= $(MAKE) PREFIX=$(PREFIX)/lz4) + env MAKEFLAGS= $(MAKE) CC=$(CC) CXX=$(CXX) \ + -j${MAKE_JOBS} PREFIX=$(PREFIX)/lz4) touch $@ # install lz4 @@ -1467,6 +1644,7 @@ SERF_FLAG=--with-serf="$(PREFIX)/serf" # serf >= 1.3.0 is built with scons and no longer sets up rpath linker flags, # so we have to do that ourselves :( SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib -Wl,-rpath,$(PREFIX)/bdb/lib +LZ4_LDFLAG=-Wl,-rpath,$(PREFIX)/lz4/lib MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so MOD_DONTDOTHAT=modules/svn-$(WC)/mod_dontdothat.so @@ -1492,6 +1670,17 @@ SVN_WITH_HTTPD=--with-apxs="$(PREFIX)/ht SVN_WITH_SASL=--with-sasl="$(PREFIX)/cyrus-sasl" endif +# On OpenBSD, MExtUtils -e ldopts outputs -L/usr/local/lib, which can +# cause us to link Perl bindings against the wrong set of SVN libraries. +# As a workaround, we patch the configure script after it has been generated. +ifeq ($(UNAME),OpenBSD) +SWIG_PL_INCLUDES_HACK= sed -i 's^\($$PERL -MExtUtils::Embed -e ccopts\)^\1 | sed -e s@-I/usr/local/include@@^' $(svn_builddir)/configure +SWIG_PL_LINK_HACK= sed -i 's^\($$PERL -MExtUtils::Embed -e ldopts\)^\1 | sed -e s@-L/usr/local/lib@@^' $(svn_builddir)/configure +else +SWIG_PL_INCLUDES_HACK=true +SWIG_PL_LINK_HACK=true +endif + $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)/.retrieved $(DISTDIR)/$(JUNIT_DIST) \ $(APR_OBJDIR)/.installed $(APR_UTIL_OBJDIR)/.installed \ $(BDB_OBJDIR)/.installed $(SQLITE_OBJDIR)/.installed \ @@ -1500,11 +1689,16 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR) $(SERF_OBJDIR)/.installed $(SERF_OLD_OBJDIR)/.installed \ $(RUBY_OBJDIR)/.installed $(PYTHON_OBJDIR)/.installed cd $(SVN_SRCDIR) && ./autogen.sh + $(SWIG_PL_INCLUDES_HACK) + $(SWIG_PL_LINK_HACK) cd $(svn_builddir) && \ - env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG) -L$(PREFIX)/gettext/lib -L$(PREFIX)/iconv/lib" \ + env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG) $(LZ4_LDFLAG) -L$(PREFIX)/gettext/lib -L$(PREFIX)/iconv/lib" \ + CC=$(CC) CXX=$(CXX) \ CFLAGS="-I$(PREFIX)/gettext/include -DAPR_POOL_DEBUG" \ CXXFLAGS="-I$(PREFIX)/gettext/include -DAPR_POOL_DEBUG" \ LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + PYTHON=$(PREFIX)/python/bin/python3 \ GREP="`which grep`" \ PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$(PREFIX)/gettext/bin:$$PATH \ $(SVN_SRCDIR)/configure \ @@ -1521,6 +1715,7 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR) --without-gnome-keyring \ --with-berkeley-db="$(BDB_FLAG)" \ --with-ruby-sitedir="$(SVN_PREFIX)/lib/ruby/site_ruby" \ + --with-py3c="$(SRCDIR)/py3c-${PY3C_VER}" \ --disable-mod-activation \ $(JAVAHL_FLAG) \ $(LIBMAGIC_FLAG) \ @@ -1533,7 +1728,7 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR) # compile svn $(SVN_OBJDIR)/.compiled: $(SVN_OBJDIR)/.configured cd $(svn_builddir) \ - && env MAKEFLAGS= make EXTRA_CFLAGS="$(PROFILE_CFLAGS) $(W_NO_SYSTEM_HEADERS)" + && env MAKEFLAGS= make -j${MAKE_JOBS} EXTRA_CFLAGS="$(PROFILE_CFLAGS) $(W_NO_SYSTEM_HEADERS)" touch $@ # install svn @@ -1552,17 +1747,30 @@ $(SVN_OBJDIR)/.pre-generated-swig-cleane && env MAKEFLAGS= make clean-swig touch $@ + +# On OpenBSD, Perl's LDDLFLAGS include -L/usr/local/lib, which can cause +# us to link Perl bindings against the wrong set of SVN libraries. +# We manually fix up the generated Makefile.PL to work around this issue. +ifeq ($(UNAME),OpenBSD) +MAKEFILE_PL_LDDLFLAGS_HACK= sed -i 's@^WriteMakefile@$$config{LDDLFLAGS} =~ s+-L/usr/local/lib++; WriteMakefile@' \ + $(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL +else +MAKEFILE_PL_LDDLFLAGS_HACK=true +endif + $(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-generated-swig-cleaned cd $(svn_builddir) \ && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ - env MAKEFLAGS= make swig-py + env MAKEFLAGS= make -j${MAKE_JOBS} swig-py cd $(svn_builddir) && \ env PATH=$(PREFIX)/ruby/bin:$$PATH \ - LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make swig-rb + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make -j${MAKE_JOBS} swig-rb if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \ + cd $(svn_builddir) && make $(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL; \ + $(MAKEFILE_PL_LDDLFLAGS_HACK); \ cd $(svn_builddir) \ && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ - env MAKEFLAGS= make swig-pl; \ + env MAKEFLAGS= make -j${MAKE_JOBS} swig-pl; \ fi if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \ cd $(svn_builddir) \ @@ -1576,13 +1784,15 @@ $(SVN_OBJDIR)/.bindings-installed: $(SVN env MAKEFLAGS= make install-swig-py cd $(svn_builddir) && \ env PATH=$(PREFIX)/ruby/bin:$$PATH \ - LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make install-swig-rb + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) MAKEFLAGS= make install-swig-rb if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \ cd $(svn_builddir) \ - && env MAKEFLAGS= make install-swig-pl-lib; \ - cd subversion/bindings/swig/perl/native \ - && perl Makefile.PL PREFIX="$(SVN_PREFIX)" \ - && env MAKEFLAGS= make install; \ + && env MAKEFLAGS= LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ + make install-swig-pl-lib; \ + cd subversion/bindings/swig/perl/native \ + && perl Makefile.PL PREFIX="$(SVN_PREFIX)" \ + && env MAKEFLAGS= LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ + make install; \ fi if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \ cd $(svn_builddir) \ @@ -1611,15 +1821,25 @@ $(HTTPD_CHECK_GROUPS): $(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CONF) $(HTTPD_CHECK_GROUPS) mkdir -p $(dir $@) - $(PREFIX)/httpd/bin/htpasswd -bc $(HTTPD_CHECK_USERS).tmp jrandom rayjandom - $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp jconstant rayjandom - $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp __dumpster__ __loadster__ - $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JRANDOM rayjandom - $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JCONSTANT rayjandom + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PREFIX)/httpd/bin/htpasswd -bc $(HTTPD_CHECK_USERS).tmp jrandom rayjandom + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp jconstant rayjandom + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp __dumpster__ __loadster__ + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JRANDOM rayjandom + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JCONSTANT rayjandom mv -f $(HTTPD_CHECK_USERS).tmp $(HTTPD_CHECK_USERS) echo > $@.tmp '# httpd config for make check' echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"' echo >>$@.tmp 'Listen localhost:$(HTTPD_CHECK_PORT)' + echo >>$@.tmp 'LoadModule unixd_module modules/mod_unixd.so' + echo >>$@.tmp 'LoadModule alias_module modules/mod_alias.so' + echo >>$@.tmp 'LoadModule access_compat_module modules/mod_access_compat.so' + echo >>$@.tmp 'LoadModule authn_core_module modules/mod_authn_core.so' + echo >>$@.tmp 'LoadModule authn_file_module modules/mod_authn_file.so' + echo >>$@.tmp 'LoadModule authz_core_module modules/mod_authz_core.so' + echo >>$@.tmp 'LoadModule authz_user_module modules/mod_authz_user.so' + echo >>$@.tmp 'LoadModule authz_groupfile_module modules/mod_authz_groupfile.so' + echo >>$@.tmp 'LoadModule auth_basic_module modules/mod_auth_basic.so' + echo >>$@.tmp 'LoadModule dav_module modules/mod_dav.so' echo >>$@.tmp 'LoadModule dav_svn_module $(MOD_DAV_SVN)' echo >>$@.tmp 'LoadModule authz_svn_module $(MOD_AUTHZ_SVN)' echo >>$@.tmp 'LoadModule dontdothat_module $(MOD_DONTDOTHAT)' @@ -1628,8 +1848,7 @@ $(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CO echo >>$@.tmp '<Directory />' echo >>$@.tmp ' Options FollowSymLinks' echo >>$@.tmp ' AllowOverride None' - echo >>$@.tmp ' Order deny,allow' - echo >>$@.tmp ' Allow from all' + echo >>$@.tmp ' Require all granted' echo >>$@.tmp '</Directory>' echo >>$@.tmp '<Location /svn-test-work/repositories>' echo >>$@.tmp ' DAV svn' @@ -1661,11 +1880,26 @@ ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes) echo >>$@.tmp ' SVNPathAuthz short_circuit' endif echo >>$@.tmp '</Location>' + echo >>$@.tmp '<Location /svn-test-work/local_tmp/trojan>' + echo >>$@.tmp ' DAV svn' + echo >>$@.tmp ' SVNPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp/trojan' + echo >>$@.tmp ' AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz' + echo >>$@.tmp ' AuthType Basic' + echo >>$@.tmp ' AuthName "Subversion Repository"' + echo >>$@.tmp ' AuthUserFile $(HTTPD_CHECK_USERS)' + echo >>$@.tmp ' Require valid-user' +ifeq ($(USE_HTTPV1),yes) + echo >>$@.tmp ' SVNAdvertiseV2Protocol off' +endif +ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes) + echo >>$@.tmp ' SVNPathAuthz short_circuit' +endif + echo >>$@.tmp '</Location>' echo >>$@.tmp '# This Location lets you access repositories dropped in /tmp/' echo >>$@.tmp '<Location /svn>' echo >>$@.tmp ' DAV svn' echo >>$@.tmp ' SVNParentPath /tmp' - echo >>$@.tmp ' Allow from all' + echo >>$@.tmp ' Require all granted' echo >>$@.tmp ' #AuthType Basic' echo >>$@.tmp ' #AuthName "Subversion Repository"' echo >>$@.tmp ' #AuthUserFile $(HTTPD_CHECK_USERS)' @@ -1706,7 +1940,7 @@ endif echo >>$@.tmp ' Require all granted' echo >>$@.tmp ' </IfModule>' echo >>$@.tmp ' <IfModule !mod_authz_core.c>' - echo >>$@.tmp ' Allow from all' + echo >>$@.tmp ' Requite all granted' echo >>$@.tmp ' </IfModule>' ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes) echo >>$@.tmp ' SVNPathAuthz short_circuit' @@ -1724,7 +1958,7 @@ endif echo >>$@.tmp ' AuthName "Subversion Repository"' echo >>$@.tmp ' AuthUserFile $(HTTPD_CHECK_USERS)' echo >>$@.tmp ' Require valid-user' - echo >>$@.tmp ' Satisfy Any' + echo >>$@.tmp ' Satisfy Any' ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes) echo >>$@.tmp ' SVNPathAuthz short_circuit' endif @@ -1814,7 +2048,7 @@ endif echo >>$@.tmp '<IfModule mod_authz_core.c>' echo >>$@.tmp ' <Location /authz-test-work/sallrany>' echo >>$@.tmp ' DAV svn' - echo >>$@.tmp ' SVNParentPath $($SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp' + echo >>$@.tmp ' SVNParentPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp' echo >>$@.tmp ' AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz' ifeq ($(USE_HTTPV1),yes) echo >>$@.tmp ' SVNAdvertiseV2Protocol off' @@ -1857,7 +2091,7 @@ endif echo >>$@.tmp '</IfModule>' echo >>$@.tmp 'RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ /svn-test-work/repositories/$$1' echo >>$@.tmp 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1' - echo >>$@.tmp 'Include "conf/$(SVN_REL_WC)*-custom.conf"' + echo >>$@.tmp 'IncludeOptional "conf/$(SVN_REL_WC)*-custom.conf"' echo >> $@.tmp '#SVNInMemoryCacheSize 0' echo >> $@.tmp '#SVNCacheTextDeltas Off' echo >> $@.tmp '#SVNCacheRevProps Off' @@ -1868,6 +2102,16 @@ $(HTTPD_PROXY_CONF): $(HTTPD_CHECK_CONF) echo > $@.tmp '# httpd config for a write-through proxy' echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"' echo >>$@.tmp 'Listen localhost:$(HTTPD_PROXY_PORT)' + echo >>$@.tmp 'LoadModule unixd_module modules/mod_unixd.so' + echo >>$@.tmp 'LoadModule alias_module modules/mod_alias.so' + echo >>$@.tmp 'LoadModule access_compat_module modules/mod_access_compat.so' + echo >>$@.tmp 'LoadModule authn_core_module modules/mod_authn_core.so' + echo >>$@.tmp 'LoadModule authn_file_module modules/mod_authn_file.so' + echo >>$@.tmp 'LoadModule authz_core_module modules/mod_authz_core.so' + echo >>$@.tmp 'LoadModule authz_user_module modules/mod_authz_user.so' + echo >>$@.tmp 'LoadModule authz_groupfile_module modules/mod_authz_groupfile.so' + echo >>$@.tmp 'LoadModule auth_basic_module modules/mod_auth_basic.so' + echo >>$@.tmp 'LoadModule dav_module modules/mod_dav.so' echo >>$@.tmp 'LoadModule dav_svn_module $(MOD_DAV_SVN)' echo >>$@.tmp 'LoadModule authz_svn_module $(MOD_AUTHZ_SVN)' echo >>$@.tmp 'LoadModule dontdothat_module $(MOD_DONTDOTHAT)' @@ -1877,7 +2121,7 @@ $(HTTPD_PROXY_CONF): $(HTTPD_CHECK_CONF) echo >>$@.tmp ' DAV svn' echo >>$@.tmp ' SVNParentPath /tmp/svn-$(BRANCH)-proxy' echo >>$@.tmp ' SVNMasterURI http://localhost:$(HTTPD_CHECK_PORT)/svn/' - echo >>$@.tmp ' Allow from all' + echo >>$@.tmp ' Requite all granted' echo >>$@.tmp ' #AuthType Basic' echo >>$@.tmp ' #AuthName "Subversion Repository"' echo >>$@.tmp ' #AuthUserFile $(HTTPD_CHECK_USERS)' @@ -1893,7 +2137,7 @@ endif echo >>$@.tmp '<Location /svn-proxy-sync>' echo >>$@.tmp 'DAV svn' echo >>$@.tmp 'SVNParentPath /tmp/svn-$(BRANCH)-proxy' - echo >>$@.tmp 'Allow from all' + echo >>$@.tmp 'Require all granted' echo >>$@.tmp '</Location>' mv -f $@.tmp $@ @@ -1913,6 +2157,7 @@ endif HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \ $(PREFIX)/httpd/bin/apachectl +HTTPD_LOG_ROTATE = mv $(PREFIX)/httpd/logs/error_log $(PREFIX)/httpd/logs/error_log.old HTTPD_START_CMD = $(HTTPD_CMD) -f $(HTTPD_CHECK_CONF) -k start HTTPD_START_CMD_PROXY = $(HTTPD_CMD) -f $(HTTPD_PROXY_CONF) HTTPD_START_CMD_DEBUG = $(HTTPD_START_CMD) -X @@ -1931,6 +2176,7 @@ SVNSERVE_STOP_CMD = kill `cat $(PWD)/svn rm -f $(PWD)/svnserve-$(WC).pid start-httpd: $(HTTPD_CHECK_CONF) + -$(HTTPD_LOG_ROTATE) $(HTTPD_START_CMD) @echo "To run tests over http, run:" @echo " make check BASE_URL=http://localhost:$(HTTPD_CHECK_PORT)" @@ -1965,12 +2211,14 @@ stop-svnserve: $(SVNSERVE_STOP_CMD) define do_check --cd $(svn_builddir) && for fs in fsfs bdb; do \ +-cd $(svn_builddir) && for fs in $(SVN_CHECK_FS_BACKENDS); do \ echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \ test -d "$(RAMDISK)/tmp" && export TMPDIR="$(RAMDISK)/tmp"; \ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \ env MAKEFLAGS= make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) \ EXCLUSIVE_WC_LOCKS=$(EXCLUSIVE_WC_LOCKS) \ + THREADED=$(THREADED) \ + SVN_BIN_DIR=$(SVN_PREFIX)/bin \ MEMCACHED_SERVER=$(MEMCACHED_SERVER) $1 FS_TYPE=$$fs; \ for log in tests.log fails.log; do \ test -f $$log && mv -f $$log $$log.$@-$$fs; \ @@ -2050,9 +2298,10 @@ svn-check-swig-rb: svn-check-javahl: -if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \ + ln -s libsvnjavahl-1.so.0.0 $(PREFIX)/svn-$(WC)/lib/libsvnjavahl-1.so; \ (cd $(svn_builddir) && \ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ - env MAKEFLAGS= make $(JAVAHL_CHECK_TARGET) 2>&1) | \ + MAKEFLAGS= make $(JAVAHL_CHECK_TARGET) 2>&1) | \ tee $(svn_builddir)/tests.log.bindings.javahl; \ fi Modified: subversion/branches/addremove/tools/dev/unix-build/README URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/unix-build/README?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/unix-build/README (original) +++ subversion/branches/addremove/tools/dev/unix-build/README Sat May 23 14:16:56 2020 @@ -1,7 +1,7 @@ Introduction ============ Makefile.svn aids Subversion developers on unix-like systems set up an -SVN development environment without requiring root priviliges. It does +SVN development environment without requiring root privileges. It does this by fetching Subversion along with many of its dependencies from the internet and building them using sane defaults suitable for development (for example, it invokes --enable-maintainer-mode while @@ -94,3 +94,22 @@ everything is "svn-check". Notes ===== The script currently doesn't build Ctypes Python bindings. + +OpenBSD-specific notes +====================== +On OpenBSD install the following packages to get dependencies and +tools not covered by this Makefile: + +pkg_add autoconf automake bison coreutils gmake gperf groff libtool \ + python ruby scons subversion swig wget + +Some of these packages are available in several versions. Tested at time +of writing were: autoconf-2.68 automake-1.19 python-2.7.14 ruby-2.4.2 + +OpenBSD's autoconf and automake wrappers require desired versions in +environment variables and will raise errors if these aren't set: +export AUTOCONF_VERSION=2.68 +export AUTOMAKE_VERSION=1.19 + +A 'python' symlink is required; follow instructions printed by pkg_add +when the python package is installed. Propchange: subversion/branches/addremove/tools/dev/wc-ng/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Sat May 23 14:16:56 2020 @@ -1 +1,2 @@ svn-wc-db-tester +.libs Modified: subversion/branches/addremove/tools/dev/wc-ng/svn-wc-db-tester.c URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/wc-ng/svn-wc-db-tester.c?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/wc-ng/svn-wc-db-tester.c (original) +++ subversion/branches/addremove/tools/dev/wc-ng/svn-wc-db-tester.c Sat May 23 14:16:56 2020 @@ -44,7 +44,7 @@ static svn_error_t * version(apr_pool_t *pool) { - return svn_opt_print_help4(NULL, "svn-wc-db-tester", TRUE, FALSE, FALSE, + return svn_opt_print_help5(NULL, "svn-wc-db-tester", TRUE, FALSE, FALSE, NULL, NULL, NULL, NULL, NULL, NULL, pool); } Modified: subversion/branches/addremove/tools/dev/x509-parser.c URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dev/x509-parser.c?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dev/x509-parser.c (original) +++ subversion/branches/addremove/tools/dev/x509-parser.c Sat May 23 14:16:56 2020 @@ -118,7 +118,7 @@ get_der_cert_from_stream(const svn_strin return SVN_NO_ERROR; } - /* Try decoding as a PEM with begining and ending headers. */ + /* Try decoding as a PEM with beginning and ending headers. */ start = strstr(raw->data, PEM_BEGIN_CERT); end = strstr(raw->data, PEM_END_CERT); if (start && end && end > start) Modified: subversion/branches/addremove/tools/dist/README.backport URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/README.backport?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/README.backport (original) +++ subversion/branches/addremove/tools/dist/README.backport Sat May 23 14:16:56 2020 @@ -7,20 +7,23 @@ F1. Auto-merge bot; the nightly svn-role F2. Conflicts detector bot; the svn-backport-conflicts-1.9.x buildbot task. -And two interactive functions, described later. +And two interactive functions¹: + +F3. Reviewing STATUS nominations and casting votes. + +F4. Adding new entries to STATUS. The scripts are: backport.pl: - oldest script, implements both [F1] and [F2], plus two interactive - functions¹. As of March 2015, used in production by svn-role and - by svn-backport-conflicts-1.9.x. + oldest script, implements [F1], [F2], and [F3]. As of Feb 2018, used in + production by svn-role (running on svn-qavm3) and by svn-backport-conflicts-1.9.x + (a buildbot job). nominate.pl: - Symlink to backport.pl. Implements one of the two interactive features. - Not used by bots. + Symlink to backport.pl. Implements [F4]. (The script inspects its argv[0].) backport_tests_pl.py: Regression tests for backport.pl. @@ -39,9 +42,11 @@ backport/*.py: detect-conflicting-backports.py: Implementation of [F2] using backport.py. + Not currently used in production. merge-approved-backports.py: Implementation of [F1] using backport.py. + Not currently used in production. backport_tests_py.py: Regression tests for detect-conflicting-backports.py and merge-approved-backports.py @@ -52,13 +57,28 @@ backport_tests.py: svntest framework (../../subversion/tests/cmdline/svntest/), which is written in Python 2. -backport*.dump: + Note that backport_tests.py and backport/*.py are written in different + languages, so they never 'import' each other. backport_tests.py invokes + detect-conflicting-backports.py, merge-approved-backports.py, and + backport.pl in the same manner: through subprocess.check_call(). + +backport_tests_data/backport*.dump: Expected output files for backport_tests.py; see the BackportTest - decorator. + decorator in backport_tests.py. All scripts can be run with '--help' to display their usage messages. +backport.pl is considered deprecated since backport.py is better architected +and is written in a language that many more active developers are comfortable +with. The unattended jobs [F1] and [F2] should be converted to using +backport.py whenever someone gets around to do the legwork. The interactive +versions [F3] and [F4] are still in active use, however, so the physical +backport.pl script should be kept around until Python versions of these are +available. + + +TODO: document that "Notes: ... --accept=foo ..." is parsed, see backport_tests.py #3. ¹ For backport.pl's interactive features, see: Modified: subversion/branches/addremove/tools/dist/backport.pl URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/backport.pl?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/backport.pl (original) +++ subversion/branches/addremove/tools/dist/backport.pl Sat May 23 14:16:56 2020 @@ -9,11 +9,11 @@ use v5.10.0; # needed for $^V # experimental and "subject to change" in v5.18 (see perl5180delta). Every # use of it now triggers a warning. # -# As of Perl v5.24.1, the semantics of given/when provided by Perl are +# As of Perl v5.30.0, the semantics of given/when provided by Perl are # compatible with those expected by the script, so disable the warning for # those Perls. But don't try to disable the the warning category on Perls # that don't know that category, since that breaks compilation. -no if (v5.17.0 le $^V and $^V le v5.24.1), +no if (v5.17.0 le $^V and $^V le v5.30.0), warnings => 'experimental::smartmatch'; # Licensed to the Apache Software Foundation (ASF) under one @@ -157,7 +157,7 @@ N: Move to the next entry. Do not pro revisions added, justification changed) in the repository. (This is a local action that will not affect other people or bots.) : Move to the next entry. Prompt for the current entry again in the next - run of backport.pl. + run of backport.pl. (That's a space character, ASCII 0x20.) ?: Display this list. EOF @@ -231,7 +231,7 @@ Both batch modes also perform a basic sa backport branches (via the "Branch:" header): if a backport branch is used, but at least one of the revisions enumerated in the entry title had neither been merged from $TRUNK to the branch root, nor been committed -directly to the backport branch, the hourly bot will turn red and +directly to the backport branch, the hourly bot will turn red and nightly bot will skip the entry and email its admins. (The nightly bot does not email the list on failure, since it doesn't use buildbot.) @@ -262,6 +262,9 @@ numbers); it will be ignored. For examp $0 "Committed revision 42." "\$Some_justification" will nominate r42. +Revision numbers within the last thousand revisions may be specified using +the last three digits only. + The justification can be an arbitrarily-long string; if it is wider than the available width, this script will wrap it for you (and allow you to review the result before committing). @@ -567,7 +570,7 @@ sub parse_entry { my (@revisions, @logsummary, $branch, @votes); # @lines = @_; - # strip spaces to match up with the indention + # strip spaces to match up with the indentation $_[0] =~ s/^( *)\* //; my $indentation = ' ' x (length($1) + 2); s/^$indentation// for @_; @@ -791,7 +794,7 @@ sub vote { # Add to state votes that aren't '+0' or 'edit' $state->{$_->{digest}}++ for grep - +{ qw/-1 t -0 t +1 t/ }->{$_->{vote}}, + +($_->{approval} or $_->{vote} =~ /^(-1|-0|[+]1)$/), @votesarray; } } @@ -1027,7 +1030,7 @@ sub handle_entry { # the "next PROMPT;" is; there's a "last;" at the end of the loop body. PROMPT: while (1) { say ""; - say "\n>>> $entry{header_start}:"; + say "\n\e\x5b32m>>> $entry{header_start}:\e\x5b0m"; say join ", ", map { "r$_" } @{$entry{revisions}} if @{$entry{revisions}}; say "$BRANCHES/$entry{branch}" if $entry{branch}; say "--accept=$entry{accept}" if $entry{accept}; @@ -1196,7 +1199,7 @@ sub backport_main { given ($lines[0]) { # Section header when (/^[A-Z].*:$/i) { - say "\n\n=== $lines[0]" unless $YES; + say "\n\n\e\x5b33m\e\x5b1m=== $lines[0]\e\x5b0m" unless $YES; $in_approved = $lines[0] =~ /^Approved changes/; } # Comment @@ -1238,6 +1241,20 @@ sub nominate_main { die "Unable to proceed." if warned_cannot_commit "Nominating failed"; + # To save typing, require just the last three digits if they're unambiguous. + my $BASE_revision = `$SVN info --show-item=revision` + 0; + if ($BASE_revision > 1000) { + my $residue = $BASE_revision % 1000; + my $thousands = $BASE_revision - $residue; + @revnums = map { + $_ >= 1000 + ? $_ + : $thousands + $_ - 1000 * ($_ > $residue) + } + @revnums; + } + + # Deduplicate and sort @revnums = sort { $a <=> $b } keys %{{ map { $_ => 1 } @revnums }}; die "No revision numbers specified" unless @revnums; @@ -1279,7 +1296,7 @@ sub nominate_main { # Open the file in line-mode (not paragraph-mode). my @STATUS; tie @STATUS, "Tie::File", $STATUS, recsep => "\n"; - my ($index) = grep { $STATUS[$_] =~ /^Veto/ } (0..$#STATUS); + my ($index) = grep { $STATUS[$_] =~ /^Veto|^Approved/ } (0..$#STATUS); die "Couldn't find where to add an entry" unless $index; # Add an empty line if needed. @@ -1297,7 +1314,8 @@ sub nominate_main { # Done! system "$SVN diff -- $STATUS"; if (prompt "Commit this nomination? ") { - system "$SVN commit -m '* STATUS: Nominate r$revnums[0].' -- $STATUS"; + my $header = join ', ', map "r$_", @revnums; + system "$SVN commit -m '* STATUS: Nominate $header.' -- $STATUS"; exit $?; } elsif (!$had_local_mods or prompt "Revert STATUS (destroying local mods)? ") { Modified: subversion/branches/addremove/tools/dist/backport/merger.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/backport/merger.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/backport/merger.py (original) +++ subversion/branches/addremove/tools/dist/backport/merger.py Sat May 23 14:16:56 2020 @@ -151,13 +151,13 @@ def log_message_file(logmsg): logmsg_file.write(logmsg) logmsg_file.flush() yield logmsg_file.name - + def merge(entry, expected_stderr=None, *, commit=False): """Merges ENTRY into the working copy at cwd. Do not commit the result, unless COMMIT is true. When committing, remove ENTRY from its STATUS file prior to committing. - + EXPECTED_STDERR will be passed to run_svn() for the actual 'merge' command.""" assert isinstance(entry, backport.status.StatusEntry) @@ -225,7 +225,7 @@ def merge(entry, expected_stderr=None, * if entry.branch: revnum = last_changed_revision('./STATUS') - + if commit: # Sleep to avoid out-of-order commit notifications if not os.getenv("SVN_BACKPORT_DONT_SLEEP"): # enabled by the test suite Modified: subversion/branches/addremove/tools/dist/backport/status.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/backport/status.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/backport/status.py (original) +++ subversion/branches/addremove/tools/dist/backport/status.py Sat May 23 14:16:56 2020 @@ -85,7 +85,7 @@ class Paragraph: def __init__(self, kind, text, entry, containing_section): """Constructor. - + KIND is one of the Kind.* enumerators. TEXT is the physical text in the file, used by unparsing. @@ -109,7 +109,7 @@ class Paragraph: @classmethod def is_header(cls, para_text): """PARA_TEXT is a single physical paragraph, as a bare multiline string. - + If PARA_TEXT is a section header, return the header text; else, return False.""" lines = para_text.split('\n', 2) @@ -135,7 +135,7 @@ class Paragraph: def approved(self): "TRUE if this paragraph is in the approved section, false otherwise." - assert self.kind + assert self.kind # ### backport.pl used to check just .startswith() here. return self.section() == "Approved changes" @@ -194,10 +194,10 @@ class StatusFile: try: entry = StatusEntry(para_text, status_file=self) kind = Kind.nomination - except ParseException: + except ParseException as e: kind = Kind.unknown - logger.warning("Failed to parse entry {!r} in {!r}".format( - para_text, status_fp)) + logger.warning("Failed to parse entry {!r} in {!r}: {}".format( + para_text, status_fp, e)) else: kind = Kind.preamble @@ -335,7 +335,7 @@ class StatusEntry: def __init__(self, para_text, status_file=None): """Parse an entry from PARA_TEXT, and add it to SELF. PARA_TEXT must contain exactly one entry, as a single multiline string. - + STATUS_FILE is the StatusFile object containing this entry, if any. """ self.branch = None @@ -379,9 +379,11 @@ class StatusEntry: raise ParseException("Entry found with neither branch nor revisions") # Parse the logsummary. - while lines and not self._is_subheader(lines[0]): + while True: self.logsummary.append(lines[0]) lines = lines[1:] + if (not lines) or self._is_subheader(lines[0]): + break # Parse votes. if "Votes:" in lines: @@ -497,7 +499,7 @@ class StatusEntry: assert self.valid() suffix = "" if len(self.logsummary) == 1 else " [...]" return self.logsummary[0] + suffix - + # Private for is_vetoed() _re_vetoed = re.compile(r'^\s*(-1:|-1\s*[()])', re.MULTILINE) def is_vetoed(self): Modified: subversion/branches/addremove/tools/dist/backport_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/backport_tests.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/backport_tests.py (original) +++ subversion/branches/addremove/tools/dist/backport_tests.py Sat May 23 14:16:56 2020 @@ -53,6 +53,12 @@ import sys @contextlib.contextmanager def chdir(dir): + """This is a context manager that saves the current working directory's + pathname. Upon entry it chdir's to the argument DIR; upon exit it chdir's + back to the saved pathname. + + The current working directory is restored using os.chdir(), not os.fchdir(). + """ try: saved_dir = os.getcwd() os.chdir(dir) @@ -522,7 +528,7 @@ def backport_double_conflict(sbox): # ... # Warning summary # =============== - # + # # r4 (default logsummary): subshell exited with code 256 # And backport.pl would exit with exit code 1. @@ -660,6 +666,21 @@ def backport_unicode_entry(sbox): # Run it. run_backport(sbox) +#---------------------------------------------------------------------- +@BackportTest('76cee987-25c9-4d6c-ad40-000000000013') +def backport_logsummary_colon(sbox): + "a logsummary that looks like a header" + + # r6: nominate r4 + approved_entries = [ + make_entry([4], logsummary="HTTPv2: Add comments."), + ] + sbox.simple_append(STATUS, serialize_STATUS(approved_entries)) + sbox.simple_commit(message='Nominate r4') + + # Run it. + run_backport(sbox) + #---------------------------------------------------------------------- @@ -680,6 +701,7 @@ test_list = [ None, backport_otherproject_change, backport_STATUS_mods, backport_unicode_entry, + backport_logsummary_colon, # When adding a new test, include the test number in the last # 6 bytes of the UUID, in decimal. ] Modified: subversion/branches/addremove/tools/dist/checksums.py URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/checksums.py?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/checksums.py (original) +++ subversion/branches/addremove/tools/dist/checksums.py Sat May 23 14:16:56 2020 @@ -19,7 +19,7 @@ # under the License. # # -# Check MD5 and SHA-1 and SHA-2 signatures of files, using +# Check MD5 and SHA-1 and SHA-2 signatures of files, using # md5sums, sha1sums, and/or sha512sums as manifests # Replaces the 'md5sum', 'sha1sum', and 'sha512sums' commands # on systems that do not have them, such as Mac OS X or Windows. Modified: subversion/branches/addremove/tools/dist/dist.sh URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/dist.sh?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/dist.sh (original) +++ subversion/branches/addremove/tools/dist/dist.sh Sat May 23 14:16:56 2020 @@ -327,7 +327,7 @@ if [ -z "$ZIP" ]; then # Use the gzip -n flag - this prevents it from storing the original name of # the .tar file, and far more importantly, the mtime of the .tar file, in the # produced .tar.gz file. This is important, because it makes the gzip - # encoding reproducable by anyone else who has an similar version of gzip, + # encoding reproducible by anyone else who has an similar version of gzip, # and also uses "gzip -9n". This means that committers who want to GPG-sign # both the .tar.gz and the .tar.bz2 can download the .tar.bz2 (which is # smaller), and locally generate an exact duplicate of the official .tar.gz Modified: subversion/branches/addremove/tools/dist/nightly.sh URL: http://svn.apache.org/viewvc/subversion/branches/addremove/tools/dist/nightly.sh?rev=1878061&r1=1878060&r2=1878061&view=diff ============================================================================== --- subversion/branches/addremove/tools/dist/nightly.sh (original) +++ subversion/branches/addremove/tools/dist/nightly.sh Sat May 23 14:16:56 2020 @@ -21,7 +21,7 @@ # set -e -repo=http://svn.apache.org/repos/asf/subversion +repo=https://svn.apache.org/repos/asf/subversion svn=svn olds=7