Bug 178021 - print/latex2slides: [PATCH] tries to create directory at $HOME
Summary: print/latex2slides: [PATCH] tries to create directory at $HOME
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-21 10:00 UTC by John Marino
Modified: 2013-04-28 14:30 UTC (History)
0 users

See Also:


Attachments
file.diff (285 bytes, patch)
2013-04-21 10:00 UTC, John Marino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino 2013-04-21 10:00:00 UTC
print/latex2slides tries to create a directory at $HOME even if it's not asked to install locally (which is a bug in the install script).

here's proof on a system where $HOME is read-only in a jail
================================
Traceback (most recent call last):
  File "./install", line 299, in <module>
    os.mkdir(USER_DIR)      # make sure USER_DIR exists
OSError: [Errno 30] Read-only file system: '/root/.latex2slides/'
*** Error code 1
================================

patch to fix this below.  Ports should not be modifying $HOME directories as part of a package build.
add it to port as "files/patch-install"

Fix: Patch attached with submission follows:
Comment 1 Raphael Kubo da Costa freebsd_committer freebsd_triage 2013-04-28 14:20:19 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-04-28 14:20:24 UTC
Author: rakuco
Date: Sun Apr 28 13:20:06 2013
New Revision: 316716
URL: http://svnweb.freebsd.org/changeset/ports/316716

Log:
  Do not create a directory in $HOME when building.
  
  PR:		ports/178021
  Submitted by:	John Marino <draco@marino.st>

Added:
  head/print/latex2slides/files/
  head/print/latex2slides/files/patch-install   (contents, props changed)

Added: head/print/latex2slides/files/patch-install
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/latex2slides/files/patch-install	Sun Apr 28 13:20:06 2013	(r316716)
@@ -0,0 +1,11 @@
+--- install.orig	2003-10-27 15:40:41.000000000 +0000
++++ install
+@@ -295,8 +295,6 @@ def parse_command_line():
+ 
+ # execution starts here
+ 
+-if not os.access(USER_DIR, os.F_OK):  
+-   os.mkdir(USER_DIR)      # make sure USER_DIR exists
+ p=Parameters() 
+ parse_command_line()
+ install()
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"