diff --git a/distcc/.footprint b/distcc/.footprint index 99ad0484f..6fae85bca 100644 --- a/distcc/.footprint +++ b/distcc/.footprint @@ -24,28 +24,74 @@ drwxr-xr-x root/root usr/lib/python3.10/site-packages/include_server-3.4-py3.10. -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server-3.4-py3.10.egg-info/top_level.txt drwxr-xr-x root/root usr/lib/python3.10/site-packages/include_server/ drwxr-xr-x root/root usr/lib/python3.10/site-packages/include_server/__pycache__/ +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/basics_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/c_extensions_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/c_extensions_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/c_extensions_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/cache_basics.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/cache_basics.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/cache_basics.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compiler_defaults.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compiler_defaults.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compiler_defaults.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compress_files.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compress_files.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/compress_files.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_memoizing_node_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_analyzer_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/include_server_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/macro_eval_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/mirror_path_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_command_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file_test.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file_test.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/parse_file_test.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/run.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/run.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/run.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/setup.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/setup.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/setup.cpython-310.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/statistics.cpython-310.opt-1.pyc +-rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/statistics.cpython-310.opt-2.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/__pycache__/statistics.cpython-310.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/basics.py -rw-r--r-- root/root usr/lib/python3.10/site-packages/include_server/basics_test.py diff --git a/distcc/.signature b/distcc/.signature index 2900953e8..1a591b382 100644 --- a/distcc/.signature +++ b/distcc/.signature @@ -1,7 +1,8 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF34ZZJCLwJkYiPxk1IGFFPNPyLm2Q8/UV/7wSM3VdFCqHd+o36rXDcyc3X5Yk99A8MFItgk7FxiTdWvrqgJCzxAw= -SHA256 (Pkgfile) = 0810a680d6adc88d25b4844ba69968fa491249a21a5d84a5cf4b3f05036eae17 -SHA256 (.footprint) = e887b46b7a5b0ae6ec61d54fc92b2bcac33e3b29cc4f694c0310d59175567815 +RWSagIOpLGJF39KePxtC8f+H6nkzgozkGkCB366DGxrICjQ9rrBBcMek3/nZAtrjqMrf8Ojpvy3r9J3x7bjC3jTIfvSujr8gpw0= +SHA256 (Pkgfile) = 33fbc67b1615c75ebcd69333d00c5176dd5c10d6c6506ea532153083a1ad2abb +SHA256 (.footprint) = 2aea2978972ce7b37fabe39362a10b14836ed47de67006b5ece9888918f792f5 SHA256 (distcc-3.4.tar.gz) = 2b99edda9dad9dbf283933a02eace6de7423fe5650daa4a728c950e5cd37bd7d -SHA256 (distccd) = 43729d96aea5b876de1d52e0978db322f1853c082fc0ca127e82cb0db63d3579 -SHA256 (distccd.conf) = afd1ba97aaf23061ba4b4d1a1613eee3a709c91311260de494ce063556b463e3 +SHA256 (python-3.9.patch) = 77beae8527b1865109f58322594f96ca16f6cf78a2687a3341f34162f5dde1ba +SHA256 (distccd.service) = 1c43037686f5cd9d244903a5cb1c7905905e0271313a0d95e742d4b4aae1ad24 +SHA256 (distccd.conf) = e3f295ff023b934f3cffe68f36fee1cbf61fc5214a7b5790b834cad3d38a053f diff --git a/distcc/Pkgfile b/distcc/Pkgfile index 881117d5f..335ea5c10 100644 --- a/distcc/Pkgfile +++ b/distcc/Pkgfile @@ -1,51 +1,67 @@ -# Description: A tool to distribute compilations. +# Description: A tool to distribute compilations # URL: https://github.com/distcc/distcc -# Maintainer: Danny Rawlins, crux at romster dot me -# Optional: avahi gtk3 +# Maintainer: Tim Biermann, tbier at posteo dot de +# Optional: avahi gtk3 krb5 popt name=distcc version=3.4 -release=3 +release=4 source=(https://github.com/distcc/distcc/releases/download/v$version/$name-$version.tar.gz - distccd distccd.conf) + python-3.9.patch + distccd.service + distccd.conf) build() { - cd $name-$version + cd $name-$version - prt-get isinst gtk3 || PKGMK_DISTCC+=' --without-gtk' - prt-get isinst popt || PKGMK_DISTCC+=' --with-included-popt' + patch -Np1 -i $SRC/python-3.9.patch - ./autogen.sh + prt-get isinst avahi && PKGMK_DISTCC+=' --with-avahi' + prt-get isinst gtk3 || PKGMK_DISTCC+=' --without-gtk' + prt-get isinst krb5 && PKGMK_DISTCC+=' --with-auth' + prt-get isinst popt || PKGMK_DISTCC+=' --with-included-popt' - sed -i 's/ install-gnome-data//g' Makefile.in + export CFLAGS+=' -fno-strict-aliasing' + export CPPFLAGS="$CFLAGS" - ./configure ${PKGMK_DISTCC} \ - --prefix=/usr \ - --sysconfdir=/etc \ - --runstatedir=/run \ - --enable-rfc2553 + ./autogen.sh - make WERROR_CFLAGS= INCLUDESERVER_PYTHON=/usr/bin/python3 - make DESTDIR=$PKG INCLUDESERVER_PYTHON=/usr/bin/python3 install + ./configure ${PKGMK_DISTCC} \ + --prefix=/usr \ + --sysconfdir=/etc \ + --runstatedir=/run \ + --enable-rfc2553 \ + --without-gnome \ + --disable-Werror - # distccd should be in sbin - mv $PKG/usr/bin/distccd $PKG/usr/sbin/distccd + make INCLUDESERVER_PYTHON=/usr/bin/python3 + make DESTDIR=$PKG \ + INCLUDESERVER_PYTHON=/usr/bin/python3 \ + GZIP_BIN=false \ + install - # install service - install -m 0755 -D $SRC/distccd $PKG/etc/rc.d/distccd + # distccd should be in sbin + mv $PKG/usr/bin/distccd $PKG/usr/sbin/distccd - # create the masquerade directory - install -d $PKG/usr/lib/distcc - cd $PKG/usr/lib/distcc - for c in cc c++ gcc g++ cpp; do - ln -s ../../bin/distcc $c - done - cd - + # install service + install -m 0755 -D $SRC/distccd.service $PKG/etc/rc.d/distccd - # install config file - install -D -m 0644 $SRC/distccd.conf $PKG/etc/distccd.conf + # create the masquerade directory + install -d $PKG/usr/lib/distcc + cd $PKG/usr/lib/distcc + for c in cc c++ gcc g++ cpp; do + ln -s ../../bin/distcc $c + done + cd - - # cleanup - rm -r $PKG/usr/share/doc $PKG/etc/distcc $PKG/etc/default - rm $PKG/usr/sbin/update-distcc-symlinks + # install config file + install -D -m 0644 $SRC/distccd.conf $PKG/etc/distccd.conf + + # cleanup + rm -r $PKG/usr/share/doc $PKG/etc/distcc $PKG/etc/default + rm $PKG/usr/sbin/update-distcc-symlinks + + /usr/bin/python3 -m compileall -d $SRC/$name-$version $PKG + /usr/bin/python3 -O -m compileall -d $SRC/$name-$version $PKG + /usr/bin/python3 -OO -m compileall -d $SRC/$name-$version $PKG } diff --git a/distcc/distccd b/distcc/distccd deleted file mode 100644 index 5c695b353..000000000 --- a/distcc/distccd +++ /dev/null @@ -1,43 +0,0 @@ -#!//bin/sh -# -# /etc/rc.d/distccd: start/stop distcc daemon -# - -USER="distcc" -GROUP="distcc" -RUNDIR="/run/distcc" -PIDFILE="$RUNDIR/distcc.pid" -PROG="/usr/sbin/distccd" -ARGS="--daemon --pid-file $PIDFILE" - -# Allow overriding variables in separate file (except for PATH) -. /etc/distccd.conf -PATH="/sbin:/usr/sbin:/bin:/usr/bin" - -case $1 in -start) - [ -d "$RUNDIR" ] || install -o $USER -g $GROUP -d "$RUNDIR" - start-stop-daemon --start --pidfile $PIDFILE --exec $PROG -- $ARGS - ;; -stop) - start-stop-daemon --stop --retry 60 --user $USER --pidfile $PIDFILE --remove-pidfile - ;; -restart) - $0 stop - $0 start - ;; -status) - start-stop-daemon --status --user $USER --pidfile $PIDFILE - case $? in - 0) echo "$PROG running with pid: $(cat $PIDFILE)" ;; - 1) echo "$PROG not running, stale pidfile: $PIDFILE" ;; - 3) echo "$PROG not running" ;; - 4) echo "Unable to determine program status" ;; - esac - ;; -*) - echo "usage: $0 [start|stop|status|restart]" - ;; -esac - -# End of file diff --git a/distcc/distccd.conf b/distcc/distccd.conf index ded88940b..ca22161e6 100644 --- a/distcc/distccd.conf +++ b/distcc/distccd.conf @@ -1,4 +1,3 @@ -# # This config file is sourced by /etc/rc.d/distccd # We can override or append to variables # diff --git a/distcc/distccd.service b/distcc/distccd.service new file mode 100644 index 000000000..b372b030e --- /dev/null +++ b/distcc/distccd.service @@ -0,0 +1,38 @@ +#!//bin/sh +# +# /etc/rc.d/distccd: start/stop distcc daemon +# + +USER="distcc" +GROUP="distcc" +RUNDIR="/run/distcc" +PIDFILE="$RUNDIR/distcc.pid" +PROG="/usr/sbin/distccd" +ARGS="--daemon --pid-file $PIDFILE" + +# Allow overriding variables in separate file (except for PATH) +. /etc/distccd.conf +PATH="/sbin:/usr/sbin:/bin:/usr/bin" + +case $1 in + start) + [ -d "$RUNDIR" ] || install -o $USER -g $GROUP -d "$RUNDIR" + start-stop-daemon --start --pidfile $PIDFILE --exec $PROG -- $ARGS ;; + stop) + start-stop-daemon --stop --retry 60 --user $USER --pidfile $PIDFILE --remove-pidfile ;; + restart) + $0 stop + $0 start ;; + status) + start-stop-daemon --status --user $USER --pidfile $PIDFILE + case $? in + 0) echo "$PROG running with pid: $(cat $PIDFILE)" ;; + 1) echo "$PROG not running, stale pidfile: $PIDFILE" ;; + 3) echo "$PROG not running" ;; + 4) echo "Unable to determine program status" ;; + esac ;; + *) + echo "usage: $0 [start|stop|status|restart]" ;; +esac + +# End of file diff --git a/distcc/python-3.9.patch b/distcc/python-3.9.patch new file mode 100644 index 000000000..0f5582654 --- /dev/null +++ b/distcc/python-3.9.patch @@ -0,0 +1,55 @@ +From 83e030a852daf1d4d8c906e46f86375d421b781e Mon Sep 17 00:00:00 2001 +From: hephooey +Date: Sun, 15 Jan 2023 15:43:50 -0500 +Subject: [PATCH] Replace int with Py_ssize_t for distcc pump extension + +Defining PY_SSIZE_T_CLEAN is required since python 3.10, and I have to +modify the type of length to match it. Otherwise functions like +OsPathExists will always return False. + +The PY_SSIZE_T_CLEAN macro is supported at least back to python 3.5 +according to docs.python.org, that is why I included it without any +python version conditions +--- + .../c_extensions/distcc_pump_c_extensions_module.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/include_server/c_extensions/distcc_pump_c_extensions_module.c b/include_server/c_extensions/distcc_pump_c_extensions_module.c +index 763dd425..a4c6e9eb 100644 +--- a/include_server/c_extensions/distcc_pump_c_extensions_module.c ++++ b/include_server/c_extensions/distcc_pump_c_extensions_module.c +@@ -21,6 +21,7 @@ + /* distcc_pump_c_extensions_module.c -- Python bindings for distcc-pump + * extensions */ + ++#define PY_SSIZE_T_CLEAN + #include "Python.h" + + static const char *version = ".01"; +@@ -56,7 +57,7 @@ static PyObject * + CompressLzo1xAlloc(PyObject *dummy, PyObject *args) { + PyObject *string_object; + const char *in_buf; +- int in_len; ++ Py_ssize_t in_len; + char *out_buf; + size_t out_len; + UNUSED(dummy); +@@ -241,7 +242,7 @@ static /* const */ char OsPathExists_doc__[] = + static PyObject * + OsPathExists(PyObject *dummy, PyObject *args) { + const char *in; +- int len; ++ Py_ssize_t len; + int res; + + struct stat buf; +@@ -275,7 +276,7 @@ static /* const */ char OsPathIsFile_doc__[] = + static PyObject * + OsPathIsFile(PyObject *dummy, PyObject *args) { + const char *in; +- int len; ++ Py_ssize_t len; + int res; + + struct stat buf;