Bug 165994 - [patch] fix several usages of ${SRC_BASE} before it is defined
Summary: [patch] fix several usages of ${SRC_BASE} before it is defined
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jason Helfman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 05:20 UTC by 4721@hushmail.com
Modified: 2012-06-19 00:54 UTC (History)
0 users

See Also:


Attachments
file.diff (11.55 KB, patch)
2012-03-13 05:20 UTC, 4721@hushmail.com
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 4721@hushmail.com 2012-03-13 05:20:01 UTC
SRC_BASE is being used before being defined in several ports. it happened to 
work anyways in most cases because the main use of SRC_BASE is for checking if
${SRC_BASE}/sys/ (/usr/src/sys/) exists, and if SRC_BASE is empty, it just
checks for /sys/ which does exist on most systems as a symlink to /usr/src/sys/.

example from sysutils/graid5 (note graid5 has been independently fixed since
this was made):

.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= requires kernel source files
.elif !exists(${SRC_BASE}/sbin/geom/Makefile)
IGNORE= requires sbin source files
.endif

===>  graid5-1.1.20110927.40 requires sbin source files.
*** Error code 1

65254: stat("/sys/Makefile",{ mode=-rw-r--r-- ,inode=781342,size=1677,blksize=4096 }) = 0 (0x0)
65254: stat("/sbin/geom/Makefile",0x7fffffffd5d0) ERR#20 'Not a directory'

the ${SRC_BASE}/sys/Makefile happens to work due to the /sys symlink.
switch to bsd.port.pre/post.mk and files are correctly checked.

73664: stat("/usr/src/sys/Makefile",{ mode=-rw-r--r-- ,inode=781342,size=1677,blksize=4096 }) = 0 (0x0)
73664: stat("/usr/src/sbin/geom/Makefile",{ mode=-rw-r--r-- ,inode=685289,size=525,blksize=4096 }) = 0 (0x0)

attached patch fixes this in several ports in different ways, due to differing
Makefile usages and structures.

Fix: Patch attached with submission follows:
Comment 1 Jason Helfman freebsd_committer freebsd_triage 2012-03-13 06:17:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jgh

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-04-17 17:57:44 UTC
jgh         2012-04-17 16:57:17 UTC

  FreeBSD ports repository

  Modified files:
    graphics/plasma-kmod Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR:     ports/165994
  Submitted by:   4721@hushmail.com
  
  Revision  Changes    Path
  1.17      +9 -9      ports/graphics/plasma-kmod/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-04-17 23:15:14 UTC
jgh         2012-04-17 22:14:55 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/scprotect   Makefile 
  Log:
  - include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR:     ports/165994
  Submitted by:   4721@hushmail.com
  
  Revision  Changes    Path
  1.7       +3 -1      ports/sysutils/scprotect/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-05-22 00:53:36 UTC
jgh         2012-05-21 23:53:22 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/biosfont    Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by:    maintainer, rene
  
  Revision  Changes    Path
  1.11      +2 -2      ports/sysutils/biosfont/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2012-05-22 00:57:39 UTC
jgh         2012-05-21 23:57:29 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/lsof        Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by:    maintainer, ler@lerctr.org
  
  Revision  Changes    Path
  1.194     +2 -2      ports/sysutils/lsof/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-05-22 01:02:28 UTC
jgh         2012-05-22 00:02:09 UTC

  FreeBSD ports repository

  Modified files:
    net/iet              Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by:    maintainer, delphij
  
  Revision  Changes    Path
  1.8       +2 -2      ports/net/iet/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2012-05-22 07:16:03 UTC
jgh         2012-05-22 06:15:49 UTC

  FreeBSD ports repository

  Modified files:
    emulators/rtc        Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by: maintainer, emulation
  
  Revision  Changes    Path
  1.37      +2 -2      ports/emulators/rtc/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2012-05-22 07:27:32 UTC
jgh         2012-05-22 06:27:22 UTC

  FreeBSD ports repository

  Modified files:
    net/ng_mikrotik_eoip Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by: maintainer, gelraen.ua@gmail.com
  
  Revision  Changes    Path
  1.2       +2 -2      ports/net/ng_mikrotik_eoip/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 dfilter service freebsd_committer freebsd_triage 2012-05-22 17:10:44 UTC
jgh         2012-05-22 16:10:34 UTC

  FreeBSD ports repository

  Modified files:
    graphics/kix-kmod    Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR:     ports/165994
  Submitted by: 4721@hushmail.com
  Approved by: maintainer, jon@witchspace.com
  
  Revision  Changes    Path
  1.16      +3 -1      ports/graphics/kix-kmod/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 dfilter service freebsd_committer freebsd_triage 2012-05-23 04:07:47 UTC
jgh         2012-05-23 03:07:34 UTC

  FreeBSD ports repository

  Modified files:
    comms/uarduno        Makefile 
  Log:
  - re-order, include bsd.port.pre.mk so SRC_BASE is defined before referenced
  
  PR: ports/165994
  Submitted by: 4721@hushmail.com
  Approved by: maintainer, bobf@mrp3.com
  
  Revision  Changes    Path
  1.4       +2 -2      ports/comms/uarduno/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 dfilter service freebsd_committer freebsd_triage 2012-05-29 17:24:37 UTC
jgh         2012-05-29 16:23:54 UTC

  FreeBSD ports repository

  Modified files:
    security/quantis-kmod Makefile 
  Log:
  - remove definition of SRC_BASE before it is defined
  
  PR:     ports/165994
  Submitted by:   jgh
  Approved by:    maintainer, ale
  
  Revision  Changes    Path
  1.6       +0 -2      ports/security/quantis-kmod/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 12 Jason Helfman freebsd_committer freebsd_triage 2012-06-19 00:54:37 UTC
State Changed
From-To: open->closed

this has been superseded by 169212-169224