From 1b5a6eeefdab5c41e99602f71b5766ae1a2c30d7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:49:13 +0100 Subject: [PATCH] python 2.7 mass rebuild [release 3.1-3mamba;Sun Jun 02 2013] --- README.md | 4 + distcc-3.1-gcc-4.8.patch | 21 +++++ distcc-initscript | 83 ++++++++++++++++++++ distcc-logrotate | 5 ++ distcc-profile | 6 ++ distcc-sysconfig | 11 +++ distcc.spec | 160 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 290 insertions(+) create mode 100644 distcc-3.1-gcc-4.8.patch create mode 100644 distcc-initscript create mode 100644 distcc-logrotate create mode 100644 distcc-profile create mode 100644 distcc-sysconfig create mode 100644 distcc.spec diff --git a/README.md b/README.md index 9c30486..18abd7b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # distcc +distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. +distcc should always generate the same results as a local build, is simple to install and use, and is often two or more times faster than a local compile. +distcc does not require all machines to share a filesystem, have synchronized clocks, or to have the same libraries or header files installed. They can even have different processors or operating systems, if cross-compilers are installed. + diff --git a/distcc-3.1-gcc-4.8.patch b/distcc-3.1-gcc-4.8.patch new file mode 100644 index 0000000..8a1efeb --- /dev/null +++ b/distcc-3.1-gcc-4.8.patch @@ -0,0 +1,21 @@ +Index: src/dotd.c +=================================================================== +--- src/dotd.c (revision 750) ++++ src/dotd.c (working copy) +@@ -172,7 +172,6 @@ + char **new_args; /* will throw this away */ + int has_dash_o = 0; + char *env_var = 0; +- int ret; + int i; + char *a; + +@@ -253,7 +252,7 @@ + + char *extension; + char *tmp_dotd_fname; +- ret = dcc_scan_args(argv, &input_file, &output_file, &new_args); ++ dcc_scan_args(argv, &input_file, &output_file, &new_args); + /* if .o is set, just append .d. + * otherwise, take the basename of the input, and set the suffix to .d */ + if (has_dash_o) \ No newline at end of file diff --git a/distcc-initscript b/distcc-initscript new file mode 100644 index 0000000..cbdda82 --- /dev/null +++ b/distcc-initscript @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Init file for Distccd - A distributed compilation front-end. +# WARNING: Don't enable on untrusted networks +# +# Written by Dag Wieers . +# +# chkconfig: 2345 80 20 +# description: Distccd - distributed compilation front-end (daemon) \ +# WARNING: Don't enable on untrusted networks +# +# processname: distccd +# +# config: /etc/sysconfig/distccd + +source /etc/init.d/functions +source /etc/sysconfig/network + +### Check that networking is up. +[ "${NETWORKING}" == "no" ] && exit 0 + +[ -x "/usr/bin/distccd" ] || exit 1 + +### Default variables +SYSCONFIG="/etc/sysconfig/distccd" +OPTIONS="" +USER="distcc" +DISTCCPATH="$PATH" + +### Read configuration +[ -r "$SYSCONFIG" ] && source "$SYSCONFIG" + +RETVAL=0 +prog="distccd" +desc="Distributed Compiler daemon" + +start() { + echo -n $"Starting $desc ($prog): " + PATH="$DISTCCPATH" daemon --user "$USER" $prog --daemon --log-file="/var/log/distccd/distccd.log" $OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog + return $RETVAL +} + +stop() { + echo -n $"Shutting down $desc ($prog): " + killproc $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog + return $RETVAL +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + condrestart) + [ -e /var/lock/subsys/$prog ] && restart + RETVAL=$? + ;; + status) + status $prog + RETVAL=$? + ;; + *) + echo $"Usage $0 {start|stop|restart|condrestart|status}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/distcc-logrotate b/distcc-logrotate new file mode 100644 index 0000000..66bea75 --- /dev/null +++ b/distcc-logrotate @@ -0,0 +1,5 @@ +/var/log/distccd/distccd.log { + missingok + copytruncate + notifempty +} diff --git a/distcc-profile b/distcc-profile new file mode 100644 index 0000000..a46da2b --- /dev/null +++ b/distcc-profile @@ -0,0 +1,6 @@ +# Set distcc system wide variables +# +# +[ -f /etc/sysconfig/distccd ] && . /etc/sysconfig/distccd + +export DISTCC_HOSTS diff --git a/distcc-sysconfig b/distcc-sysconfig new file mode 100644 index 0000000..4770c92 --- /dev/null +++ b/distcc-sysconfig @@ -0,0 +1,11 @@ +### See distcc(1) manual page for more information on these options. +### + +#OPTIONS="--nice 5 --jobs 5 --allow 10.0.0.0/24 --port 3632" +#USER="distcc" + +### Set this if don't want distccd to use gcc or g++ by accident. +#DISTCCPATH="/usr/lib/distcc/bin" + +# Set distcc enabled host to be used for build +#DISTCC_HOSTS="localhost qibuild1 qibuild2" diff --git a/distcc.spec b/distcc.spec new file mode 100644 index 0000000..ed1257d --- /dev/null +++ b/distcc.spec @@ -0,0 +1,160 @@ +%define distcc_uid 28 +%define distcc_gid 28 +Name: distcc +Version: 3.1 +Release: 3mamba +Summary: A program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://code.google.com/p/distcc +Source: http://distcc.googlecode.com/files/distcc-%{version}.tar.bz2 +Source1: distcc-initscript +Source2: distcc-logrotate +Source3: distcc-sysconfig +Source4: distcc-profile +Patch0: distcc-3.1-gcc-4.8.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: GConf-devel +BuildRequires: glibc-devel +BuildRequires: libart_lgpl-devel +BuildRequires: libatk-devel +BuildRequires: libavahi-devel +BuildRequires: libbonobo-devel +BuildRequires: libbonoboui-devel +BuildRequires: libcairo-devel +BuildRequires: libfontconfig-devel +BuildRequires: libfreetype-devel +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libglib-devel +BuildRequires: libgnomecanvas-devel +BuildRequires: libgnome-devel +BuildRequires: libgnomeui-devel +BuildRequires: libgnome-vfs-devel +BuildRequires: libgtk2-devel +BuildRequires: libICE-devel +BuildRequires: libpango-devel +BuildRequires: libpopt-devel +BuildRequires: libpython27-devel +BuildRequires: libpython-devel +BuildRequires: libSM-devel +BuildRequires: ORBit2-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. +distcc should always generate the same results as a local build, is simple to install and use, and is often two or more times faster than a local compile. +distcc does not require all machines to share a filesystem, have synchronized clocks, or to have the same libraries or header files installed. They can even have different processors or operating systems, if cross-compilers are installed. + +%package monitor +Group: Graphical Desktop/Applications/Development +Summary: Monitoring interface for distcc + +%description monitor +A gnome base monitoring interface for distcc, a program to distribute builds of C, C++, Objective C or Objective. + +%prep +%setup -q +%patch0 -p0 + +%build +%configure \ + --with-gnome \ + --disable-Werror \ + PYTHON=%{__python} + +%make + +%install +%makeinstall + +install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/distccd +install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/distccd +install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/distccd +install -D -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/distcc.sh +install -d %{buildroot}/var/log/distccd + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +if [ $1 -ge 1 ]; then +# new install or update + groupadd distcc -g %{distcc_gid} 2>/dev/null || true + useradd distcc -c "Distcc user" -d /dev/null \ + -s /bin/false -u %{distcc_uid} -g %{distcc_gid} 2>/dev/null || true +fi +exit 0 + +%post +# upgrade +if [ $1 -eq 1 ]; then + service distccd condrestart +fi +exit 0 + +%postun +if [ $1 -eq 0 ]; then +# erase + chkconfig --del distccd + service distccd stop + userdel distcc || true +fi +exit 0 + +%files +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/sysconfig/distccd +%config(noreplace) %{_sysconfdir}/logrotate.d/distccd +%{_sysconfdir}/default/distcc +%{_sysconfdir}/distcc/clients.allow +%{_sysconfdir}/distcc/commands.allow.sh +%{_sysconfdir}/distcc/hosts +%{_sysconfdir}/profile.d/distcc.sh +%{_initrddir}/distccd +%{_bindir}/distcc +%{_bindir}/distccd +%{_bindir}/distccmon-text +%{_bindir}/lsdistcc +%{_bindir}/pump +%{python_sitearch}/include_server/* +%{python_sitearch}/include_server-%{version}-py%{python_version}.egg-info +%dir %{_datadir}/doc/distcc +%{_datadir}/doc/distcc/* +%{_mandir}/man1/* +%attr(0755,distcc,distcc) /var/log/distccd + +%files monitor +%defattr(-,root,root) +%{_bindir}/distccmon-gnome +%{_datadir}/distcc/distccmon-gnome-icon.png +%{_datadir}/distcc/distccmon-gnome.desktop + +%changelog +* Sun Jun 02 2013 Silvan Calarco 3.1-3mamba +- python 2.7 mass rebuild + +* Thu Feb 04 2010 Silvan Calarco 3.1-2mamba +- rebuilt to remove executable requirements + +* Sun Jan 11 2009 Silvan Calarco 3.1-1mamba +- update to 3.1 + +* Tue Dec 20 2005 Silvan Calarco 2.18.3-4qilnx +- added profile script to set DISTCC_HOSTS system wide variable + +* Fri Dec 16 2005 Silvan Calarco 2.18.3-3qilnx +- added logfile dir + +* Thu Dec 15 2005 Silvan Calarco 2.18.3-2qilnx +- added initscript, logrotate and sysconfig support + +* Wed Dec 07 2005 Silvan Calarco 2.18.3-1qilnx +- update to version 2.18.3 by autospec +- added distcc user creation + +* Mon Oct 22 2003 Silvan Calarco 2.11.1-1qilnx +- first build