Bug 225156 - math/py-numpy: distutils bug uses incorrect shell during compilation leading to errors
Summary: math/py-numpy: distutils bug uses incorrect shell during compilation leading ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 13:32 UTC by Diane Bruce
Modified: 2018-01-18 00:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments
Patch to fix exec_command.py (1.55 KB, text/plain)
2018-01-14 13:32 UTC, Diane Bruce
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diane Bruce freebsd_committer 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 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 2018-01-14 18:43:17 UTC
Approved by portmgr (antoine)
Comment 3 commit-hook freebsd_committer 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