Bug 202732 - sysutils/rundeck install-do directories create permission denied error out of the bo
Summary: sysutils/rundeck install-do directories create permission denied error out of...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-08-28 22:22 UTC by Mark C Ballew
Modified: 2017-01-17 01:36 UTC (History)
4 users (show)

See Also:
ler: maintainer-feedback+
ler: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark C Ballew 2015-08-28 22:22:58 UTC
${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${RUNDECK_HOME}/server/lib
        ${TOUCH} ${STAGEDIR}${RUNDECK_HOME}/server/lib/.keep

These two sections in the install-do will prevent the server from starting after initial package install. After removing these directories, service rundeck start runs successfully.

To recreate, from a clean system:
pkg install rundeck
Add to fstab:
fdesc   /dev/fd         fdescfs         rw      0       0
proc    /proc           procfs          rw      0       0
sysrc rundeck_enable="YES"
service rundeck start
# tail /var/log/rundeck.log
Exception in thread "main" java.io.IOException: Permission denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1006)
	at com.dtolabs.rundeck.ZipUtil.extractZip(ZipUtil.java:153)
	at com.dtolabs.rundeck.ZipUtil.extractZip(ZipUtil.java:113)
	at com.dtolabs.rundeck.ZipUtil.extractZip(ZipUtil.java:89)
	at com.dtolabs.rundeck.ZipUtil.extractZip(ZipUtil.java:74)
	at com.dtolabs.rundeck.ExpandRunServer.extractLibs(ExpandRunServer.java:575)
	at com.dtolabs.rundeck.ExpandRunServer.run(ExpandRunServer.java:275)
	at com.dtolabs.rundeck.ExpandRunServer.main(ExpandRunServer.java:113)
Comment 1 c.kworr 2015-09-10 13:03:04 UTC
Hi. I'm not using rundeck anymore so I may require some assistance in fixing this.

When I first created this port rundeck refused to start if this directory was absent (thus I made sure it was created). Is this directory required for rundeck to function right now? If yes, maybe I should change this directory owner upon creating it?
Comment 2 James Edwards 2015-11-12 23:24:41 UTC
I was able to work around this by changing ownership of /usr/local/rundeck/server and /usr/local/rundeck/server/lib from root to rundeck.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-13 01:28:20 UTC
Any future patch probably needs merging (MFH) to quarterly branch.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-17 01:22:27 UTC
A commit references this bug:

Author: ler
Date: Tue Jan 17 01:22:14 UTC 2017
New revision: 431715
URL: https://svnweb.freebsd.org/changeset/ports/431715

Log:
  Change ownership of rundeck/server/lib et al.
  Address poudriere issues
  bump PORTREVISION

  PR:		202732
  Submitted by:	Mark C Ballew (ballew sublinear net)
  Approved by:	adamw (mentor)
  MFH:		2017Q1 (blanket)
  Differential Revision:	https://reviews.freebsd.org/D9205

Changes:
  head/sysutils/rundeck/Makefile
  head/sysutils/rundeck/pkg-plist
Comment 5 Larry Rosenman freebsd_committer freebsd_triage 2017-01-17 01:23:53 UTC
Committed, Thanks.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-01-17 01:33:38 UTC
A commit references this bug:

Author: ler
Date: Tue Jan 17 01:32:53 UTC 2017
New revision: 431716
URL: https://svnweb.freebsd.org/changeset/ports/431716

Log:
  MFH: r431715

  Change ownership of rundeck/server/lib et al.
  Address poudriere issues
  bump PORTREVISION
  MFH because to allow running out of the box, as it fails with the
  	directories root-owned

  PR:		202732
  Submitted by:	Mark C Ballew (ballew sublinear net)
  Differential Revision:	https://reviews.freebsd.org/D9205

  Approved by:	ports-secteam (blanket), adamw (mentor)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/sysutils/rundeck/Makefile
  branches/2017Q1/sysutils/rundeck/pkg-plist
Comment 7 Larry Rosenman freebsd_committer freebsd_triage 2017-01-17 01:36:32 UTC
maintainer approval taken from comment 1.