From 8e528f9e3bc6348e7dd06bcd8cc60aaa20b457ec Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Thu, 17 Mar 2022 00:36:42 +0200 Subject: [PATCH 1/3] chroot-distcc: update to 3.4. --- srcpkgs/chroot-distcc/template | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/srcpkgs/chroot-distcc/template b/srcpkgs/chroot-distcc/template index bb4e61983990..a84b3cba88a3 100644 --- a/srcpkgs/chroot-distcc/template +++ b/srcpkgs/chroot-distcc/template @@ -1,6 +1,6 @@ # Template file for 'chroot-distcc' pkgname=chroot-distcc -version=3.3.3 +version=3.4 revision=1 wrksrc="distcc-${version}" bootstrap=yes @@ -13,9 +13,12 @@ maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://distcc.github.io" distfiles="https://github.com/distcc/distcc/releases/download/v${version}/distcc-${version}.tar.gz" -checksum=bead25471d5a53ecfdf8f065a6fe48901c14d5008956c318c700e56bc87bf0bc - +checksum=2b99edda9dad9dbf283933a02eace6de7423fe5650daa4a728c950e5cd37bd7d conflicts="distcc>=0" + +# Checking depends on a python binary existing +make_check=no + CFLAGS="-fcommon" if [ "$CHROOT_READY" ]; then From 4be7c33cd12847f32fe6dbb92b510c90089ae6b7 Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Thu, 17 Mar 2022 00:37:28 +0200 Subject: [PATCH 2/3] distcc: update to 3.4. --- .../distcc/patches/disable-failing-tests.diff | 118 ++++++++++++++++++ srcpkgs/distcc/template | 14 ++- 2 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/distcc/patches/disable-failing-tests.diff diff --git a/srcpkgs/distcc/patches/disable-failing-tests.diff b/srcpkgs/distcc/patches/disable-failing-tests.diff new file mode 100644 index 000000000000..9e151184677a --- /dev/null +++ b/srcpkgs/distcc/patches/disable-failing-tests.diff @@ -0,0 +1,118 @@ +Disables the following failing tests: + + Running: PYTHONPATH=/builddir/distcc-3.4/./_include_server/lib.linux-x86_64-3.10/include_server: /usr/bin/python include_server_test.py + FAIL + /builddir/distcc-3.4/include_server/include_server_test.py:158: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 mode='w+' encoding='UTF-8'> + self.assertTrue(got_here) + ResourceWarning: Enable tracemalloc to get the object allocation traceback + F/usr/lib/python3.10/unittest/case.py:613: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 mode='w+' encoding='UTF-8'> + outcome.errors.clear() + ResourceWarning: Enable tracemalloc to get the object allocation traceback + + ====================================================================== + FAIL: test_IncludeHandler_handle (__main__.IncludeServerTest) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/builddir/distcc-3.4/include_server/include_server.py", line 384, in handle + DoCompilationCommand(cmd, currdir, + File "/builddir/distcc-3.4/include_server/include_analyzer.py", line 261, in DoCompilationCommand + self.ProcessCompilationCommand(currdir, parsed_command)) + File "/builddir/distcc-3.4/include_server/include_analyzer.py", line 189, in ProcessCompilationCommand + total_closure.update(self._ProcessFileFromCommandLine(translation_unit, + File "/builddir/distcc-3.4/include_server/include_analyzer.py", line 135, in _ProcessFileFromCommandLine + raise NotCoveredError("Could not find %s '%s'." % (kind, fpath), + basics.NotCoveredError: Could not find translation unit 'test_data/contains_abs_include.c'. + + During handling of the above exception, another exception occurred: + + Traceback (most recent call last): + File "/builddir/distcc-3.4/include_server/include_server_test.py", line 177, in test_IncludeHandler_handle + include_handler.handle() + File "/builddir/distcc-3.4/include_server/include_server.py", line 401, in handle + include_analyzer.email_sender.MaybeSendEmail(fd, + File "/builddir/distcc-3.4/include_server/include_server_test.py", line 96, in MaybeSendEmail + self.expect(text, force, never) + File "/builddir/distcc-3.4/include_server/include_server_test.py", line 169, in Expect3 + self_test.assertTrue( + AssertionError: False is not true : Preprocessing locally. Include server not covering: Could not find translation unit 'test_data/contains_abs_include.c'. for translation unit 'test_data/contains_abs_include.c' + + ---------------------------------------------------------------------- + Ran 1 test in 0.022s + + FAILED (failures=1) + make[1]: *** [Makefile:740: include-server-maintainer-check] Error 1 + make[1]: Leaving directory '/builddir/distcc-3.4' + make: *** [Makefile:779: check] Error 2 + + + + Running: PYTHONPATH=/builddir/distcc-3.4/./_include_server/lib.linux-x86_64-3.10/include_server: /usr/bin/python macro_eval_test.py + FAIL + ...E.... + ====================================================================== + ERROR: test_ResolveExpr (__main__.MacroEvalTest) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/builddir/distcc-3.4/include_server/macro_eval_test.py", line 219, in test_ResolveExpr + [((d, ip), rp)], symbols = macro_eval.ResolveExpr( + TypeError: cannot unpack non-iterable NoneType object + + ---------------------------------------------------------------------- + Ran 8 tests in 0.005s + + FAILED (errors=1) + make[1]: *** [Makefile:739: include-server-maintainer-check] Error 1 + make[1]: Leaving directory '/builddir/distcc-3.4' + make: *** [Makefile:778: check] Error 2 + + + + Running: PYTHONPATH=/builddir/distcc-3.4/./_include_server/lib.linux-x86_64-3.10/include_server: /usr/bin/python include_analyzer_test.py + FAIL + EEEEEmake[1]: *** [Makefile:738: include-server-maintainer-check] Error 1 + make[1]: Leaving directory '/builddir/distcc-3.4' + make: *** [Makefile:777: check] Error 2 + + + + Running: PYTHONPATH=/builddir/distcc-3.4/./_include_server/lib.linux-x86_64-3.10/include_server: /usr/bin/python include_analyzer_memoizing_node_test.py + FAIL + .E + ====================================================================== + ERROR: test__CalculateIncludeClosureExceptSystem_on_distcc (__main__.IncludeAnalyzerMemoizingNodeUnitTest) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/builddir/distcc-3.4/include_server/include_analyzer_memoizing_node_test.py", line 213, in test__CalculateIncludeClosureExceptSystem_on_distcc + include_analyzer.ProcessCompilationCommand(current_dir, + File "/builddir/distcc-3.4/include_server/include_analyzer.py", line 184, in ProcessCompilationCommand + self._ProcessFileFromCommandLine( + File "/builddir/distcc-3.4/include_server/include_analyzer.py", line 135, in _ProcessFileFromCommandLine + raise NotCoveredError("Could not find %s '%s'." % (kind, fpath), + basics.NotCoveredError: Could not find include file 'include_me.h'. + + ---------------------------------------------------------------------- + Ran 2 tests in 0.022s + + FAILED (errors=1) + make[1]: *** [Makefile:737: include-server-maintainer-check] Error 1 + make[1]: Leaving directory '/builddir/distcc-3.4' + make: *** [Makefile:776: check] Error 2 +--- +diff --git a/Makefile.in b/Makefile.in +index f240ca6..ad9dd83 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -440,13 +440,9 @@ check_PROGRAMS = \ + + check_include_server_PY = \ + include_server/c_extensions_test.py \ +- include_server/include_server_test.py \ +- include_server/macro_eval_test.py \ + include_server/mirror_path_test.py \ + include_server/parse_command_test.py \ + include_server/parse_file_test.py \ +- include_server/include_analyzer_test.py \ +- include_server/include_analyzer_memoizing_node_test.py \ + include_server/basics_test.py + + diff --git a/srcpkgs/distcc/template b/srcpkgs/distcc/template index 7a6c2483b575..193087685dfe 100644 --- a/srcpkgs/distcc/template +++ b/srcpkgs/distcc/template @@ -1,25 +1,27 @@ # Template file for 'distcc' pkgname=distcc -version=3.3.3 -revision=6 +version=3.4 +revision=1 build_style=gnu-configure configure_args="--disable-Werror --with-gtk" conf_files=" /etc/distcc/hosts /etc/distcc/clients.allow" hostmakedepends="automake libtool pkg-config which" -makedepends="binutils-devel popt-devel avahi-libs-devel gtk+-devel" +makedepends="binutils-devel popt-devel avahi-libs-devel gtk+3-devel" +checkdepends="gcc-objc gcc-objc++ gdb procps-ng" short_desc="Distributed compilation for faster C/C++ builds" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://distcc.github.io" -distfiles="https://github.com/distcc/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz" -checksum=bead25471d5a53ecfdf8f065a6fe48901c14d5008956c318c700e56bc87bf0bc +distfiles="https://github.com/distcc/distcc/releases/download/v${version}/distcc-${version}.tar.gz" +checksum=2b99edda9dad9dbf283933a02eace6de7423fe5650daa4a728c950e5cd37bd7d conflicts="chroot-distcc>=0" subpackages="distcc-gtk" -CFLAGS="-fcommon" +# -DPY_SSIZE_T_CLEAN needed due to Python 3.10 issues: https://github.com/distcc/distcc/issues/454 +CFLAGS="-fcommon -DPY_SSIZE_T_CLEAN" if [ "$CROSS_BUILD" ]; then configure_args+=" --disable-pump-mode" From 6a471de2602e53b0ebf5d499927d5fd62015bc6e Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Thu, 17 Mar 2022 00:37:36 +0200 Subject: [PATCH 3/3] distcc: modernize distccd runit service The arguments to distccd can now be customized via a conf file as one would expect. The default loglevel of notice dumps all compile cmdlines into syslog which I think is too verbose -> decrease it to warnings by default. --- srcpkgs/distcc/files/distccd/run | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/srcpkgs/distcc/files/distccd/run b/srcpkgs/distcc/files/distccd/run index 58c2676387ac..9b3386392348 100755 --- a/srcpkgs/distcc/files/distccd/run +++ b/srcpkgs/distcc/files/distccd/run @@ -1,16 +1,14 @@ #!/bin/sh -PROG="distccd" -USER="nobody" -OPTIONS="--no-detach" -OPTIONS="$OPTIONS --daemon" -OPTIONS="$OPTIONS --user $USER" +[ -r conf ] && . ./conf +: ${OPTS:=--log-level=warning} +: ${USER:=nobody} ALLOW_FILE=/etc/distcc/clients.allow if [ -f "$ALLOW_FILE" ]; then - ALLOW_OPTIONS=$(sed -e 's/#.*$//' -e '/^\s*$/d' -e 's/^/--allow /' < $ALLOW_FILE) + ALLOW_OPTS=$(sed -e 's/#.*$//' -e '/^\s*$/d' -e 's/^/--allow /' < $ALLOW_FILE) fi -if [ -z "$ALLOW_OPTIONS" ]; then +if [ -z "$ALLOW_OPTS" ]; then # Default to allow localhost - ALLOW_OPTIONS="--allow 127.0.0.1" + ALLOW_OPTS="--allow 127.0.0.1" fi -OPTIONS="$OPTIONS $ALLOW_OPTIONS" -exec $PROG $OPTIONS +OPTS="$OPTS $ALLOW_OPTS" +exec distccd --daemon --no-detach --user $USER $OPTS