diff options
Diffstat (limited to 'sys-devel/distcc/files')
-rw-r--r-- | sys-devel/distcc/files/3.0/distcc-config | 122 | ||||
-rw-r--r-- | sys-devel/distcc/files/3.1/conf | 35 | ||||
-rw-r--r-- | sys-devel/distcc/files/3.1/init | 31 | ||||
-rw-r--r-- | sys-devel/distcc/files/3.2/distcc-config | 2 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-3.1-argc-fix.patch | 17 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-3.1-freedesktop.patch | 76 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-3.1-python.patch | 258 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch | 112 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch | 22 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-config | 148 | ||||
-rw-r--r-- | sys-devel/distcc/files/distccd.confd (renamed from sys-devel/distcc/files/3.0/conf) | 7 | ||||
-rw-r--r-- | sys-devel/distcc/files/distccd.initd | 13 |
12 files changed, 232 insertions, 611 deletions
diff --git a/sys-devel/distcc/files/3.0/distcc-config b/sys-devel/distcc/files/3.0/distcc-config deleted file mode 100644 index ed2a2eec435e..000000000000 --- a/sys-devel/distcc/files/3.0/distcc-config +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env python -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -import os, re, signal, sys -from string import rstrip -from subprocess import Popen - -options=[ - '--get-hosts', - '--set-hosts', - '--get-verbose', - '--set-verbose', - '--get-log', - '--set-log', - '--help', - '--get-env', - '--set-env' -] - -tmpcmdline=sys.argv[1:] -cmdline=[] -envfile = '/etc/env.d/02distcc' - -def exithandler(foo,bar): - os.kill(0,signal.SIGKILL) - sys.exit(1) - -signal.signal(signal.SIGINT,exithandler) - -def isroot(ret=0): - if os.getuid() != 0: - if ret == 0: - print '!!!',sys.argv[:1][0],tmpcmdline[0],'must be run as root' - sys.exit(1) - else: - retval = 0 - else: - retval = 1 - return retval - -def writeenv(var,value): - isroot() - distcc_env = [] - distcc_env = open(envfile, 'r').readlines() - distcc_env_new = open(envfile, 'w') - for i in range(len(distcc_env)): - if re.compile(var+'="(.*)"').match(distcc_env[i]): - distcc_env[i] = var+'="'+value+'"\n' - distcc_env_new.write(distcc_env[i]) - #print 'Set',var,'to:',value - Popen('/usr/sbin/env-update', shell=True) - print 'If you want to use these new settings in an existing shell,' - print 'you need to "source /etc/profile" to get the changes.' - -def readenv(var): - distcc_env = open(envfile, 'r').read() - match = re.compile(var+'="(.*)"').search(distcc_env) - if match: - print var+'='+match.group(1) - else: - print var,'not set.' - -def createdistccdir(dir): - if not os.path.exists(dir): - os.mkdir(dir) - os.chmod(dir, 0755) - -for x in tmpcmdline: - if not x: - continue - if x[0:2]=="--": - if not x in options: - print "!!! Error:",x,"is an invalid option." - sys.exit(1) - else: - cmdline = x - -if '--get-hosts' in tmpcmdline: - HOSTS_ENV = os.environ.get('DISTCC_HOSTS') - HOSTS_HOME = os.environ.get('HOME')+'/hosts' - if HOSTS_ENV: - print HOSTS_ENV - elif os.path.isfile(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0: - print rstrip(open(HOSTS_HOME, 'r').read()) - elif os.path.exists('/etc/distcc/hosts'): - print rstrip(open('/etc/distcc/hosts', 'r').read()) - else: - print 'No configuration file found. Setup your hosts with --set-hosts.' -elif '--set-hosts' in tmpcmdline: - if isroot(1): - PATH = '/etc/distcc' - else: - PATH = os.environ.get('HOME') - createdistccdir(PATH) - open(PATH+'/hosts', 'w').write(cmdline + '\n') -elif '--get-verbose' in tmpcmdline: - readenv('DISTCC_VERBOSE') -elif '--set-verbose' in tmpcmdline: - writeenv('DISTCC_VERBOSE',tmpcmdline[1]) -elif '--get-log' in tmpcmdline: - readenv('DISTCC_LOG') -elif '--set-log' in tmpcmdline: - writeenv('DISTCC_LOG',tmpcmdline[1]) -elif '--get-env' in tmpcmdline: - if len(tmpcmdline) == 1: - print rstrip(open(envfile, 'r').read()) - elif len(tmpcmdline) == 2: - readenv(tmpcmdline[1]) - else: - print '!!! Error: Specify only one variable.' -elif '--set-env' in tmpcmdline: - if len(tmpcmdline) > 2 and len(tmpcmdline) <= 3: - isroot() - writeenv(tmpcmdline[1],tmpcmdline[2]) - else: - print '!!! Error: Awaiting two parameters.' -else: - print 'Usage: %s --set-hosts DISTCC_HOSTS | --get-hosts' % sys.argv[0] - print ' %s --set-verbose { 0 | 1 } | --get-verbose' % sys.argv[0] - print ' %s --set-log FILE | --get-log' % sys.argv[0] - print ' %s --set-env VARIABLE VALUE | --get-env [VARIABLE]' % sys.argv[0] diff --git a/sys-devel/distcc/files/3.1/conf b/sys-devel/distcc/files/3.1/conf deleted file mode 100644 index 39f6e3e86f45..000000000000 --- a/sys-devel/distcc/files/3.1/conf +++ /dev/null @@ -1,35 +0,0 @@ -# /etc/conf.d/distccd: config file for /etc/init.d/distccd - -# this is the distccd executable -DISTCCD_EXEC="/usr/bin/distccd" - -# this is where distccd will store its pid file -DISTCCD_PIDFILE="/var/run/distccd/distccd.pid" - -# Ports: -# Default port is 3632. For most people the default is okay. -# -# Logging: -# You can change some logging options here: -# --log-file FILE -# --log-level LEVEL [critical,error,warning, notice, info, debug] -# -# Leaving --log-file blank will log to syslog -# example: --log-file /dev/null --log-level warning -# example: --log-level critical -# -# Nice level: -# The default nice level is 15. You can change it by adding: -N xx -# where xx is the nice level. - -# SECURITY NOTICE: -# It is HIGHLY recommended that you use the --listen option -# for increased security. You can specify an IP to permit connections -# from or a CIDR mask -# --listen accepts only a single IP -# --allow is now mandatory as of distcc-2.18. -# example: --allow 192.168.0.0/24 -# example: --allow 192.168.0.5 --allow 192.168.0.150 -# example: --listen 192.168.0.2 - -DISTCCD_OPTS="--port 3632 --log-level notice --log-file /var/log/distccd.log -N 15" diff --git a/sys-devel/distcc/files/3.1/init b/sys-devel/distcc/files/3.1/init deleted file mode 100644 index e89dcb3702b7..000000000000 --- a/sys-devel/distcc/files/3.1/init +++ /dev/null @@ -1,31 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - need net - use avahi-daemon ypbind -} - -start() { - ebegin "Starting distccd" - - if [ ! -e /var/run/distccd ] ; then - mkdir -p /var/run/distccd - chown distcc:daemon /var/run/distccd - fi - - # Load PATH and GCC_SPECS from gcc-config, bug #262773 - eval "$(gcc-config -E)" - - start-stop-daemon --start --quiet --exec "${DISTCCD_EXEC}" --user distcc -- \ - --daemon --pid-file "${DISTCCD_PIDFILE}" \ - ${DISTCCD_OPTS} - eend $? -} - -stop() { - ebegin "Stopping distccd" - start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}" - eend $? -} diff --git a/sys-devel/distcc/files/3.2/distcc-config b/sys-devel/distcc/files/3.2/distcc-config index cff742c6d22c..4902a9a42c5a 100644 --- a/sys-devel/distcc/files/3.2/distcc-config +++ b/sys-devel/distcc/files/3.2/distcc-config @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 diff --git a/sys-devel/distcc/files/distcc-3.1-argc-fix.patch b/sys-devel/distcc/files/distcc-3.1-argc-fix.patch deleted file mode 100644 index d7f30b5567fa..000000000000 --- a/sys-devel/distcc/files/distcc-3.1-argc-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -this fixes virtualbox not compiling with distcc - -https://bugs.gentoo.org/show_bug.cgi?id=351979 -http://code.google.com/p/distcc/issues/detail?id=83 -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626926 - ---- distcc-3.1.orig/source/src/arg.c -+++ distcc-3.1/source/src/arg.c -@@ -515,6 +515,8 @@ - } - free(argv); - *argv_ptr = argv = new_argv; -+ i += extra_args - 1; -+ argc += extra_args - 1; - } - } - return 0; diff --git a/sys-devel/distcc/files/distcc-3.1-freedesktop.patch b/sys-devel/distcc/files/distcc-3.1-freedesktop.patch deleted file mode 100644 index b23db21a2558..000000000000 --- a/sys-devel/distcc/files/distcc-3.1-freedesktop.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur distcc-3.1.orig/Makefile.in distcc-3.1/Makefile.in ---- distcc-3.1.orig/Makefile.in 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/Makefile.in 2009-02-02 00:40:20.000000000 +0900 -@@ -49,13 +49,14 @@ - includedir = @includedir@ - oldincludedir = /usr/include - docdir = @docdir@ --pkgdatadir = $(datadir)/@PACKAGE_NAME@ -+icondir = $(datadir)/pixmaps -+desktopdir = $(datadir)/applications - - include_server_builddir = $(builddir)/_include_server - - # These must be done from here, not from autoconf, because they can - # contain variable expansions written in Make syntax. Ew. --DIR_DEFS = -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\"" -+DIR_DEFS = -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\"" - - # arguments to pkgconfig - GNOME_PACKAGES = @GNOME_PACKAGES@ -@@ -1003,7 +1004,8 @@ - @echo " documents $(DESTDIR)$(docdir)" - @echo " programs $(DESTDIR)$(bindir)" - @echo " system configuration $(DESTDIR)$(sysconfdir)" -- @echo " shared data files $(DESTDIR)$(pkgdatadir)" -+ @echo " icons $(DESTDIR)$(icondir)" -+ @echo " .desktop file $(DESTDIR)$(desktopdir)" - - - # install-sh can't handle multiple arguments, but we don't need any -@@ -1086,10 +1088,10 @@ - done - - install-gnome-data: $(gnome_data) -- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)" -- for p in $(gnome_data); do \ -- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \ -- done -+ $(mkinstalldirs) $(DESTDIR)$(icondir) -+ $(mkinstalldirs) $(DESTDIR)$(desktopdir) -+ $(INSTALL_DATA) gnome/distccmon-gnome-icon.png $(DESTDIR)$(icondir) -+ $(INSTALL_DATA) gnome/distccmon-gnome.desktop $(DESTDIR)$(desktopdir) - - install-conf: $(conf_files) $(default_files) - $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc" -diff -Naur distcc-3.1.orig/gnome/distccmon-gnome.desktop distcc-3.1/gnome/distccmon-gnome.desktop ---- distcc-3.1.orig/gnome/distccmon-gnome.desktop 2008-12-03 06:50:27.000000000 +0900 -+++ distcc-3.1/gnome/distccmon-gnome.desktop 2009-02-02 00:40:55.000000000 +0900 -@@ -1,13 +1,11 @@ - [Desktop Entry] --Version=0.9.4 --Encoding=UTF-8 - Exec=distccmon-gnome - Name=distcc monitor - GenericName=Distributed Compile Monitor - Comment=Graphical view of distributed compile tasks --Icon=distccmon-gnome-icon.png -+Icon=distccmon-gnome-icon - TryExec=distccmon-gnome - Terminal=false - Type=Application --Categories=GNOME;Application;Development; -+Categories=GNOME;Development; - StartupNotify=true -diff -Naur distcc-3.1.orig/src/mon-gnome.c distcc-3.1/src/mon-gnome.c ---- distcc-3.1.orig/src/mon-gnome.c 2008-12-03 06:50:25.000000000 +0900 -+++ distcc-3.1/src/mon-gnome.c 2009-02-02 00:41:18.000000000 +0900 -@@ -599,7 +599,7 @@ - - #if GTK_CHECK_VERSION(2,2,0) - gtk_window_set_icon_from_file (GTK_WINDOW (mainwin), -- PKGDATADIR "/distccmon-gnome-icon.png", -+ ICONDIR "/distccmon-gnome-icon.png", - NULL); - #endif - diff --git a/sys-devel/distcc/files/distcc-3.1-python.patch b/sys-devel/distcc/files/distcc-3.1-python.patch deleted file mode 100644 index 733357a53932..000000000000 --- a/sys-devel/distcc/files/distcc-3.1-python.patch +++ /dev/null @@ -1,258 +0,0 @@ -diff -Naur distcc-3.1.orig/bench/statistics.py distcc-3.1/bench/statistics.py ---- distcc-3.1.orig/bench/statistics.py 2008-12-03 06:50:21.000000000 +0900 -+++ distcc-3.1/bench/statistics.py 2009-03-17 01:29:26.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python2.2 -+#! /usr/bin/env python - - # benchmark -- automated system for testing distcc correctness - # and performance on various source trees. -diff -Naur distcc-3.1.orig/configure distcc-3.1/configure ---- distcc-3.1.orig/configure 2008-12-03 06:50:34.000000000 +0900 -+++ distcc-3.1/configure 2009-03-17 01:31:09.000000000 +0900 -@@ -3629,7 +3629,7 @@ - # - # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present - # in autoconf 2.53. --for ac_prog in python2.5 python-2.5 python2.4 python-2.4 python -+for ac_prog in python - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 -diff -Naur distcc-3.1.orig/configure.ac distcc-3.1/configure.ac ---- distcc-3.1.orig/configure.ac 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/configure.ac 2009-03-17 01:29:04.000000000 +0900 -@@ -243,7 +243,7 @@ - # - # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present - # in autoconf 2.53. --AC_PATH_PROGS(PYTHON, [python2.5 python-2.5 python2.4 python-2.4 python]) -+AC_PATH_PROGS(PYTHON, [python]) - AC_ARG_VAR(PYTHON, [Python interpreter]) - # Python 1 doesn't even support -V - if ! "$PYTHON" -V 2>&1 | grep "^Python" >/dev/null; then -diff -Naur distcc-3.1.orig/include_server/basics.py distcc-3.1/include_server/basics.py ---- distcc-3.1.orig/include_server/basics.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/basics.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - # - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/basics_test.py distcc-3.1/include_server/basics_test.py ---- distcc-3.1.orig/include_server/basics_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/basics_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/c_extensions_test.py distcc-3.1/include_server/c_extensions_test.py ---- distcc-3.1.orig/include_server/c_extensions_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/c_extensions_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/cache_basics.py distcc-3.1/include_server/cache_basics.py ---- distcc-3.1.orig/include_server/cache_basics.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/cache_basics.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/compiler_defaults.py distcc-3.1/include_server/compiler_defaults.py ---- distcc-3.1.orig/include_server/compiler_defaults.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/compiler_defaults.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/compress_files.py distcc-3.1/include_server/compress_files.py ---- distcc-3.1.orig/include_server/compress_files.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/compress_files.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_analyzer.py distcc-3.1/include_server/include_analyzer.py ---- distcc-3.1.orig/include_server/include_analyzer.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_analyzer.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py distcc-3.1/include_server/include_analyzer_memoizing_node.py ---- distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_analyzer_memoizing_node.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py distcc-3.1/include_server/include_analyzer_memoizing_node_test.py ---- distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_analyzer_memoizing_node_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_analyzer_test.py distcc-3.1/include_server/include_analyzer_test.py ---- distcc-3.1.orig/include_server/include_analyzer_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_analyzer_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_server.py distcc-3.1/include_server/include_server.py ---- distcc-3.1.orig/include_server/include_server.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_server.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/include_server_test.py distcc-3.1/include_server/include_server_test.py ---- distcc-3.1.orig/include_server/include_server_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/include_server_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/macro_eval.py distcc-3.1/include_server/macro_eval.py ---- distcc-3.1.orig/include_server/macro_eval.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/macro_eval.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/macro_eval_test.py distcc-3.1/include_server/macro_eval_test.py ---- distcc-3.1.orig/include_server/macro_eval_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/macro_eval_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/mirror_path.py distcc-3.1/include_server/mirror_path.py ---- distcc-3.1.orig/include_server/mirror_path.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/mirror_path.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/mirror_path_test.py distcc-3.1/include_server/mirror_path_test.py ---- distcc-3.1.orig/include_server/mirror_path_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/mirror_path_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/parse_command.py distcc-3.1/include_server/parse_command.py ---- distcc-3.1.orig/include_server/parse_command.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/parse_command.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/parse_command_test.py distcc-3.1/include_server/parse_command_test.py ---- distcc-3.1.orig/include_server/parse_command_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/parse_command_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/parse_file.py distcc-3.1/include_server/parse_file.py ---- distcc-3.1.orig/include_server/parse_file.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/parse_file.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/parse_file_test.py distcc-3.1/include_server/parse_file_test.py ---- distcc-3.1.orig/include_server/parse_file_test.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/parse_file_test.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/run.py distcc-3.1/include_server/run.py ---- distcc-3.1.orig/include_server/run.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/run.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/setup.py distcc-3.1/include_server/setup.py ---- distcc-3.1.orig/include_server/setup.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/setup.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/include_server/statistics.py distcc-3.1/include_server/statistics.py ---- distcc-3.1.orig/include_server/statistics.py 2008-12-03 06:50:31.000000000 +0900 -+++ distcc-3.1/include_server/statistics.py 2009-03-17 01:30:46.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/python2.4 -+#! /usr/bin/python - # - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/test/onetest.py distcc-3.1/test/onetest.py ---- distcc-3.1.orig/test/onetest.py 2008-12-03 06:50:22.000000000 +0900 -+++ distcc-3.1/test/onetest.py 2009-03-17 01:29:44.000000000 +0900 -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.4 -+#!/usr/bin/python - # - # Copyright 2007 Google Inc. - # -diff -Naur distcc-3.1.orig/test/testdistcc.py distcc-3.1/test/testdistcc.py ---- distcc-3.1.orig/test/testdistcc.py 2008-12-03 06:50:22.000000000 +0900 -+++ distcc-3.1/test/testdistcc.py 2009-03-17 01:29:36.000000000 +0900 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python2.2 -+#! /usr/bin/env python - - # Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org> - # Copyright 2007 Google Inc. diff --git a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch new file mode 100644 index 000000000000..7b735ebec7f9 --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch @@ -0,0 +1,112 @@ +From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 8 Dec 2018 12:50:07 +0100 +Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install + +--- + Makefile.in | 18 ++++++++++-------- + gnome/distccmon-gnome.desktop | 7 +++---- + ...mon-gnome-icon.png => distccmon-gnome.png} | Bin + src/mon-gnome.c | 2 +- + 4 files changed, 14 insertions(+), 13 deletions(-) + rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%) + +diff --git a/Makefile.in b/Makefile.in +index 6e1e467..1106559 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -52,13 +52,14 @@ mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + docdir = @docdir@ +-pkgdatadir = $(datadir)/@PACKAGE_NAME@ ++icondir = $(datarootdir)/pixmaps ++desktopdir = $(datarootdir)/applications + + include_server_builddir = $(builddir)/_include_server + + # These must be done from here, not from autoconf, because they can + # contain variable expansions written in Make syntax. Ew. +-DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\"" ++DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\"" + + # arguments to pkgconfig + GNOME_PACKAGES = @GNOME_PACKAGES@ +@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \ + man/lsdistcc_1.html man/pump_1.html man/include_server_1.html + MEN = $(man1_MEN) + +-gnome_data = gnome/distccmon-gnome-icon.png \ ++gnome_data = gnome/distccmon-gnome.png \ + gnome/distccmon-gnome.desktop + + popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ +@@ -1033,7 +1034,8 @@ showpaths: + @echo " programs $(DESTDIR)$(bindir)" + @echo " sbin programs $(DESTDIR)$(sbindir)" + @echo " system configuration $(DESTDIR)$(sysconfdir)" +- @echo " shared data files $(DESTDIR)$(pkgdatadir)" ++ @echo " icon file $(DESTDIR)$(icondir)" ++ @echo " application file $(DESTDIR)$(desktopdir)" + + + # install-sh can't handle multiple arguments, but we don't need any +@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS) + done + + install-gnome-data: $(gnome_data) +- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)" +- for p in $(gnome_data); do \ +- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \ +- done ++ $(mkinstalldirs) "$(DESTDIR)$(icondir)" ++ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)" ++ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)" ++ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)" + + install-conf: $(conf_files) $(default_files) + $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc" +diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop +index bd1fa26..7205f5e 100644 +--- a/gnome/distccmon-gnome.desktop ++++ b/gnome/distccmon-gnome.desktop +@@ -1,6 +1,5 @@ + [Desktop Entry] +-Version=0.9.4 +-Encoding=UTF-8 ++Version=1.0 + Exec=distccmon-gnome + Name=distcc monitor + Name[sv]=distcc övervakare +@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor + GenericName[sv]=Distribuerad kompilerings-övervakare + Comment=Graphical view of distributed compile tasks + Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter +-Icon=distccmon-gnome-icon.png ++Icon=distccmon-gnome + TryExec=distccmon-gnome + Terminal=false + Type=Application +-Categories=GNOME;Application;Development; ++Categories=GNOME;GTK;Development; + StartupNotify=true +diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png +similarity index 100% +rename from gnome/distccmon-gnome-icon.png +rename to gnome/distccmon-gnome.png +diff --git a/src/mon-gnome.c b/src/mon-gnome.c +index 24681d0..bfc286d 100644 +--- a/src/mon-gnome.c ++++ b/src/mon-gnome.c +@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void) + + #if GTK_CHECK_VERSION(2,2,0) + gtk_window_set_icon_from_file (GTK_WINDOW (mainwin), +- PKGDATADIR "/distccmon-gnome-icon.png", ++ ICONDIR "/distccmon-gnome.png", + NULL); + #endif + +-- +2.20.0.rc2 + diff --git a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch new file mode 100644 index 000000000000..7f378082d99e --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch @@ -0,0 +1,22 @@ +From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001 +From: Shawn Landden <shawn@git.icu> +Date: Wed, 29 Aug 2018 04:52:38 -0700 +Subject: [PATCH] fix #304 + +--- + src/daemon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon.c b/src/daemon.c +index 5765982..c8fee7c 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) { + rs_log_crit(LIBDIR "/distcc not found. %s", warn); + dcc_exit(EXIT_COMPILER_MISSING); + } +- if (!readdir(e) && !readdir(d)) { ++ if ((!e || !readdir(e)) && (!d || !readdir(d))) { + rs_log_crit(LIBDIR "/distcc empty. %s", warn); + dcc_exit(EXIT_COMPILER_MISSING); + } diff --git a/sys-devel/distcc/files/distcc-config b/sys-devel/distcc/files/distcc-config index 094307c10507..974620d107fb 100644 --- a/sys-devel/distcc/files/distcc-config +++ b/sys-devel/distcc/files/distcc-config @@ -1,9 +1,8 @@ #!/usr/bin/env python -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -import os, re, signal, sys, commands, pwd -from string import rstrip +import os, re, signal, subprocess, sys options=[ '--get-hosts', @@ -12,7 +11,8 @@ options=[ '--set-verbose', '--get-log', '--set-log', - '--install', + '--update-masquerade', + '--update-masquerade-with-crossdev', '--help', '--get-env', '--set-env' @@ -20,7 +20,20 @@ options=[ tmpcmdline=sys.argv[1:] cmdline=[] -envfile = '/etc/env.d/02distcc' + +eprefix = '@EPREFIX@' +bindir = os.path.join(eprefix, 'usr', 'bin') +sbindir = os.path.join(eprefix, 'usr', 'sbin') +libdir = os.path.join(eprefix, '@libdir@') +sysconfdir = os.path.join(eprefix, 'etc') + +gcc_config = os.path.join(bindir, 'gcc-config') +env_update = os.path.join(sbindir, 'env-update') +envfile = os.path.join(sysconfdir, 'env.d', '02distcc') +default_distcc_dir = os.path.join(sysconfdir, 'distcc') +hostfile = os.path.join(default_distcc_dir, 'hosts') +distcc_path = os.path.join(bindir, 'distcc') +dccc_dir = os.path.join(libdir, 'distcc', 'bin') def exithandler(foo,bar): os.kill(0,signal.SIGKILL) @@ -31,7 +44,7 @@ signal.signal(signal.SIGINT,exithandler) def isroot(ret=0): if os.getuid() != 0: if ret == 0: - print '!!!',sys.argv[:1][0],tmpcmdline[0],'must be run as root' + print('!!! %s %s must be run as root' % (sys.argv[:1][0],tmpcmdline[0])) sys.exit(1) else: retval = 0 @@ -48,69 +61,83 @@ def writeenv(var,value): if re.compile(var+'="(.*)"').match(distcc_env[i]): distcc_env[i] = var+'="'+value+'"\n' distcc_env_new.write(distcc_env[i]) - #print 'Set',var,'to:',value - os.popen('/usr/sbin/env-update') - print 'If you want to use these new settings in an existing shell,' - print 'you need to "source /etc/profile" to get the changes.' + #print('Set %s to: %s ' % (var,value)) + subprocess.Popen(env_update, shell=True) + print('If you want to use these new settings in an existing shell,') + print('you need to "source /etc/profile" to get the changes.') def readenv(var): distcc_env = open(envfile, 'r').read() match = re.compile(var+'="(.*)"').search(distcc_env) if match: - print var+'='+match.group(1) + print(var+'='+match.group(1)) else: - print var,'not set.' - -def permissions(path,user,group): - for file in os.listdir(path): - #print 'Configuring',path+file+'...' - os.chown(path+file,user,group) + print(var,'not set.') -def installlinks(chost=''): +def installlink(chost='', version=''): for file in ['gcc', 'cc', 'c++', 'g++']: - path = '/usr/lib/distcc/bin/' if not chost == '': - file = chost+'-'+file - if os.path.exists('/usr/bin/'+file): - #print 'Creating',path+file,'symlink...' - if not os.path.exists(path+file): - os.symlink('/usr/bin/distcc',path+file) + file = '%s-%s' % (chost,file) + if not version == '': + file = '%s-%s' % (file,version) + path = os.path.join(dccc_dir,file) + if os.path.exists(os.path.join(bindir,file)): + if not os.path.exists(path): + print('Creating %s symlink...' % (path)) + os.symlink(distcc_path,path) #else: - # print 'Already exists. Skipping...' + # print('Already exists. Skipping...') + +def installlinks(): + p = subprocess.Popen([gcc_config+" -C -l"], shell=True, stdout=subprocess.PIPE) + lines = p.stdout.read().decode().rstrip().split('\n') + for line in lines: + columns = line.split() + if len(columns) >= 2: + matches = re.match("(.*)-(.*)", columns[1]) + chost = matches.group(1) + version = matches.group(2) + installlink(chost) + installlink(chost, version) + +def uninstalllinks(): + for root, dirs, files in os.walk(dccc_dir): + for file in files: + os.remove(os.path.join(root, file)) def createdistccdir(dir): if not os.path.exists(dir): os.mkdir(dir) - os.chmod(dir, 1777) + os.chmod(dir, 0o755) for x in tmpcmdline: if not x: continue if x[0:2]=="--": if not x in options: - print "!!! Error:",x,"is an invalid option." + print("!!! Error: %s is an invalid option." % (x)) sys.exit(1) else: cmdline = x if '--get-hosts' in tmpcmdline: HOSTS_ENV = os.environ.get('DISTCC_HOSTS') - HOSTS_HOME = os.environ.get('HOME')+'/hosts' + HOSTS_HOME = os.path.join(os.environ.get('HOME'), '.distcc', 'hosts') if HOSTS_ENV: - print HOSTS_ENV + print(HOSTS_ENV) elif os.path.isfile(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0: - print HOSTS_HOME - elif os.path.exists('/etc/distcc/hosts'): - print rstrip(open('/etc/distcc/hosts', 'r').read()) + print(HOSTS_HOME) + elif os.path.exists(hostfile): + print(open(hostfile, 'r').read().rstrip()) else: - print 'No configuration file found. Setup your hosts with --set-hosts.' + print('No configuration file found. Setup your hosts with --set-hosts.') elif '--set-hosts' in tmpcmdline: if isroot(1): - PATH = '/etc/distcc' + PATH = default_distcc_dir else: - PATH = os.environ.get('HOME') + PATH = os.path.join(os.environ.get('HOME'), '.distcc') createdistccdir(PATH) - open(PATH+'/hosts', 'w').write(cmdline + '\n') + open(os.path.join(PATH, 'hosts'), 'w').write(cmdline + '\n') elif '--get-verbose' in tmpcmdline: readenv('DISTCC_VERBOSE') elif '--set-verbose' in tmpcmdline: @@ -119,46 +146,35 @@ elif '--get-log' in tmpcmdline: readenv('DISTCC_LOG') elif '--set-log' in tmpcmdline: writeenv('DISTCC_LOG',tmpcmdline[1]) -elif '--install' in tmpcmdline: +elif '--update-masquerade' in tmpcmdline: isroot() - print 'Creating',envfile+'...' - distcc_env = open(envfile, 'w') - distcc_env.write('# This file is managed by distcc-config; use it to change these settings.\n') - distcc_env.write('DISTCC_LOG=""\n') - distcc_env.write('DCCC_PATH="/usr/lib/distcc/bin"\n') - distcc_env.write('DISTCC_VERBOSE="0"\n') - - if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9: - os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) - - foobar = pwd.getpwnam('distcc') - user = foobar[2] - group = foobar[3] - - makeconf = open('/etc/make.conf', 'r').read() - chost = re.compile('CHOST="(.*)"').search(makeconf).group(1) - print 'Creating symlinks...' + uninstalllinks() + print('Creating symlinks...') + installlink() + installlinks() +elif '--update-masquerade-with-crossdev' in tmpcmdline: + isroot() + uninstalllinks() + print('Creating symlinks...') installlinks() - installlinks(chost) - - print 'Checking permissions...' - permissions('/usr/lib/distcc/bin/',user,group) - permissions('/var/run/distccd/',user,group) elif '--get-env' in tmpcmdline: if len(tmpcmdline) == 1: - print rstrip(open(envfile, 'r').read()) + print(open(envfile, 'r').read().rstrip()) elif len(tmpcmdline) == 2: readenv(tmpcmdline[1]) else: - print '!!! Error: Specify only one variable.' + print('!!! Error: Specify only one variable.') elif '--set-env' in tmpcmdline: if len(tmpcmdline) > 2 and len(tmpcmdline) <= 3: isroot() writeenv(tmpcmdline[1],tmpcmdline[2]) else: - print '!!! Error: Awaiting two parameters.' + print('!!! Error: Awaiting two parameters.') else: - print 'Usage: /usr/bin/distcc-config --set-hosts DISTCC_HOSTS | --get-hosts' - print ' /usr/bin/distcc-config --set-verbose { 0 | 1 } | --get-verbose' - print ' /usr/bin/distcc-config --set-log FILE | --get-log' - print ' /usr/bin/distcc-config --set-env VARIABLE VALUE | --get-env [VARIABLE]' + cmd = sys.argv[:1][0] + print('Usage: %s --set-hosts DISTCC_HOSTS | --get-hosts' % (cmd)) + print(' %s --set-verbose { 0 | 1 } | --get-verbose' % (cmd)) + print(' %s --set-log FILE | --get-log' % (cmd)) + print(' %s --set-env VARIABLE VALUE | --get-env [VARIABLE]' % (cmd)) + print(' %s --update-masquerade' % (cmd)) + print(' %s --update-masquerade-with-crossdev' % (cmd)) diff --git a/sys-devel/distcc/files/3.0/conf b/sys-devel/distcc/files/distccd.confd index c499271685e9..bc08d40777d3 100644 --- a/sys-devel/distcc/files/3.0/conf +++ b/sys-devel/distcc/files/distccd.confd @@ -2,12 +2,9 @@ DISTCCD_OPTS="" -# this is the distccd executable +# this is the distccd executable DISTCCD_EXEC="/usr/bin/distccd" -# this is where distccd will store its pid file -DISTCCD_PIDFILE="/var/run/distccd/distccd.pid" - # set this option to run distccd with extra parameters # Default port is 3632. For most people the default is okay. DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632" @@ -25,7 +22,7 @@ DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical" # SECURITY NOTICE: # It is HIGHLY recommended that you use the --listen option -# for increased security. You can specify an IP to permit connections +# for increased security. You can specify an IP to permit connections # from or a CIDR mask # --listen accepts only a single IP # --allow is now mandatory as of distcc-2.18. diff --git a/sys-devel/distcc/files/distccd.initd b/sys-devel/distcc/files/distccd.initd new file mode 100644 index 000000000000..7673ff2cf429 --- /dev/null +++ b/sys-devel/distcc/files/distccd.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use avahi-daemon ypbind +} + +command="${DISTCCD_EXEC:-usr/bin/distccd}" +command_args="--user distcc --daemon --no-detach ${DISTCCD_OPTS}" +command_background="true" +pidfile="/run/${RC_SVCNAME}.pid" |