Bug 225156

Summary: math/py-numpy: distutils bug uses incorrect shell during compilation leading to errors
Product: Ports & Packages Reporter: Diane Bruce <db>
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: Closed FIXED    
Severity: Affects Some People CC: db
Priority: --- Flags: bugzilla: maintainer-feedback? (python)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to fix exec_command.py none

Description Diane Bruce freebsd_committer freebsd_triage 2018-01-14 13:32:46 UTC
Created attachment 189705 [details]
Patch to fix exec_command.py

exec_command.py states in comments it uses /bin/sh on POSIX for subprocess but incorrectly uses shell from environment. This makes compiles fail when compilation is done using the account 'nobody' which is default on pkg-fallout runs.

e.g.
Subject: [exp - 103i386-default-build-as-user][comms/wsjt] Failed for           
        wsjt-10.r5745_6 in build    
http://package19.nyi.freebsd.org/data/103i386-default-build-as-user/458497/logs/wsjt-10.r5745_6.log                                                           
Build URL:                                                                      
http://package19.nyi.freebsd.org/build.html?mastername=103i386-default-build-as-user&build=458497  

Subject: [exp - 103i386-default-build-as-user][comms/wspr] Failed for           
        wspr-4.00.r4198_9 in build 
http://package19.nyi.freebsd.org/data/103i386-default-build-as-user/45849/logs/wspr-4.00.r4198_9.log                                                         
Build URL:                                                                      
http://package19.nyi.freebsd.org/build.html?mastername=103i386-default-build-as-user&build=458497
Comment 1 Diane Bruce freebsd_committer freebsd_triage 2018-01-14 13:39:51 UTC
N.B.

From 
Log URL:                                                                        
http://package19.nyi.freebsd.org/data/103i386-default-build-as-user/458882/logs/wsjt-10.r5745_6.log      

...
creating /tmp/tmp2ijw0_y2/tmp                                                   
creating /tmp/tmp2ijw0_y2/tmp/tmp2ijw0_y2                                       
compile options: '-MMD -MF /tmp/tmp2ijw0_y2/file.c.d -c'                        
cc: /tmp/tmp2ijw0_y2/file.c                                                     
This account is currently not available.                                        
This account is currently not available.      
...


nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
/usr/sbin/nologin
This account is currently not available.

exec_command.py uses nobody shell which fails, when it should be always using
 /bin/sh
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2018-01-14 18:43:17 UTC
Approved by portmgr (antoine)
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-01-14 20:34:08 UTC
A commit references this bug:

Author: db
Date: Sun Jan 14 20:33:38 UTC 2018
New revision: 458999
URL: https://svnweb.freebsd.org/changeset/ports/458999

Log:
  exec_command.py states in comments it uses /bin/sh on POSIX for subprocess but incorrectly uses shell from environment. This makes compiles fail when compilation is done using the account 'nobody' which is default on pkg-fallout runs.

  PR:		ports/225156
  Submitted by:	self
  Reported by:	self
  Reviewed by:	antoine
  Approved by: 	antoine

Changes:
  head/math/py-numpy/Makefile
  head/math/py-numpy/files/patch-numpy-distutils-exec_command.py