Bug#965378: distcc-pump fails to start due to incorrect include_server path

2020-08-12 Thread Alex Karle
Hi,

I dug into this some more, and think I have a solution.

The problem stems from the 01_Makefile.am.patch patch in the debian
package, which has the following diff:


@@ -1092,7 +1093,7 @@ install-include-server: include-server p
cp -f "$(include_server_builddir)/install.log" 
"$(PYTHON_INSTALL_RECORD)"; \
  fi; \
  $(mkinstalldirs) "$(DESTDIR)$(bindir)" && \
- INCLUDE_SERVER=`grep '/include_server.py$$' 
"$(include_server_builddir)/install.log"` && \
+ 
INCLUDE_SERVER="/usr/lib/distcc-pump/include_server/include_server.py" && \
  sed "s,^include_server='',include_server='$$INCLUDE_SERVER'," \
pump > "$(include_server_builddir)/pump" && \
  $(INSTALL_SCRIPT) "$(include_server_builddir)/pump" 
"$(DESTDIR)$(bindir)"; \


This is the source of the hard-coded path in the installed distcc-pump
script.

Removing this part of the patch and running a `make install-include-server`
results in the proper path in the script (the grep still works properly).

Hope this helps! 
Alex



Bug#965378: distcc-pump fails to start due to incorrect include_server path

2020-07-20 Thread Alex Karle
Package: distcc-pump
Version: 3.3.2-10
Severity: important

Dear Maintainer,

The distcc-pump script fails to start properly due to not being able to
find the include_server.

More specifically, the hardcoded path to the server in
/usr/bin/distcc-pump is:

include_server='/usr/lib/distcc-pump/include_server/include_server.py'

However, the distcc-pump package installs include_server.py to the
following location:


/usr/lib/distcc-pump/lib/python3.7/site-packages/include_server/include_server.py

The result is the following error when starting distcc-pump:

$ DISTCC_HOSTS="localhost,lzo,cpp" distcc-pump echo foo
__Using distcc-pump from /usr/bin
__Using 1 distcc server in pump mode
/usr/bin/python3: can't open file 
'/usr/lib/distcc-pump/include_server/include_server.py': [Errno 2] No such file 
or directory
__Expected a socket at '/tmp/distcc-pump.n4LiDO/socket'
__Could not start distcc-pump include server

Fixing the path in /usr/lib/distcc-pump resolves the issue:

$ sed 
's#pump/include_server#pump/lib/python3.7/site-packages/include_server#' \
/usr/bin/distcc-pump > /tmp/pump-fixed

$ env DISTCC_LOCATION=/usr/bin DISTCC_HOSTS="localhost,lzo,cpp" \
sh /tmp/pump-fixed echo foo
__Using distcc-pump from /usr/bin
__Using 1 distcc server in pump mode
foo
__Shutting down distcc-pump include server


This has been reported already to Ubuntu here:

https://bugs.launchpad.net/ubuntu/+source/distcc/+bug/1835493

However, I thought it would be good to report here as well.

Thank you for your time and help. If I can provide any other information
that would be of use, please let me know.

Best,
Alex


-- System Information:
Debian Release: 10.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.19.0-9-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages distcc-pump depends on:
ii  distcc   3.3.2-10
ii  libc62.28-10
ii  python3  3.7.3-1

distcc-pump recommends no packages.

distcc-pump suggests no packages.

-- no debconf information