Bug 210473 - [NEW PORT] security/doas: (OpenBSD's) Alternative to sudo
Summary: [NEW PORT] security/doas: (OpenBSD's) Alternative to sudo
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: freebsd-ports-bugs (Nobody)
URL:
Keywords: feature, patch
Depends on:
Blocks:
 
Reported: 2016-06-22 16:41 UTC by Jesse Smith
Modified: 2016-06-24 00:51 UTC (History)
2 users (show)

See Also:


Attachments
shar archive of the doas port (2.28 KB, text/plain)
2016-06-22 16:41 UTC, Jesse Smith
no flags Details
Updated doas port shar (2.28 KB, text/plain)
2016-06-23 13:46 UTC, Jesse Smith
no flags Details
suggested changes to the submitted shar (2.19 KB, patch)
2016-06-23 15:23 UTC, Joseph Mingrone
jrm: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Smith 2016-06-22 16:41:57 UTC
Created attachment 171686 [details]
shar archive of the doas port

The doas program allows users to run commands as another user (usually root). The doas program was written by the OpenBSD team to provide a lightweight, simplified (and more secure) alternative to the sudo command.

Original upstream (OpenBSD) source: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/doas/

FreeBSD version: https://github.com/slicer69/doas

A shell archive of the FreeBSD port is attached.
Comment 1 Jesse Smith 2016-06-23 13:46:47 UTC
Created attachment 171713 [details]
Updated doas port shar

Updated shell archive for the doas port. This update fixes the license and updates the port to use the latest upstream source code.
Comment 2 Joseph Mingrone freebsd_committer freebsd_triage 2016-06-23 15:23:19 UTC
Created attachment 171716 [details]
suggested changes to the submitted shar

Make portlint and poudriere testport happier and make some cosmetic changes.

portlint -AC: complains about the absolute path used in pkg-message, however in the doas source the configuration path is hard coded to /usr/local/etc/doas.conf, so I left that as is instead of creating something like files/pkg-message.in with %%ETCDIR%%.

testport: OK* (poudriere: 9.3-RELEASE-p39, i386)  [1]
testport: OK* (poudriere: 9.3-RELEASE-p39, amd64) [2]
testport: OK* (poudriere: 10.3-RELEASE,    i386)  [3]
testport: OK* (poudriere: 10.3-RELEASE,    amd64) [4]

* Warns about installing the setuid binary, which is necessary.

[1]
http://pkg.awarnach.mathstat.dal.ca/data/9i386-default/2016-06-23_12h11m33s/logs/doas-5.9.log

[2]
http://pkg.awarnach.mathstat.dal.ca/data/9amd64-default/2016-06-23_12h11m56s/logs/doas-5.9.log

[3]
http://pkg.awarnach.mathstat.dal.ca/data/10i386-default/2016-06-23_12h12m10s/logs/doas-5.9.log

[4]
http://pkg.awarnach.mathstat.dal.ca/data/10amd64-default/2016-06-23_12h12m31s/logs/doas-5.9.log
Comment 3 Jesse Smith 2016-06-23 16:01:03 UTC
I tried out Joseph Mingrone's update to the port and it works perfectly for me. Everything looks good here.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-06-24 00:07:48 UTC
A commit references this bug:

Author: roberto
Date: Fri Jun 24 00:07:14 UTC 2016
New revision: 417407
URL: https://svnweb.freebsd.org/changeset/ports/417407

Log:
  New port: security/doas

  The doas program allows users to run commands as another user (usually
  root). The doas program was written by the OpenBSD team to provide a
  lightweight, simplified (and more secure) alternative to the sudo command.

  Original upstream (OpenBSD) source:
  http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/doas/

  FreeBSD version: https://github.com/slicer69/doas

  NOTE: I added the two patch files to workaround issues mentioned in the PR
  about hardcoding of /usr/local.

  PR:		210473
  Submitted by:	jsmith@resonatingmedia.com
  Modified by:	jrm@ftfl.ca (see PR) and me (roberto)

Changes:
  head/security/doas/
  head/security/doas/Makefile
  head/security/doas/distinfo
  head/security/doas/files/
  head/security/doas/files/patch-Makefile
  head/security/doas/files/patch-doas.c
  head/security/doas/files/pkg-message.in
  head/security/doas/pkg-descr
Comment 5 Ollivier Robert freebsd_committer freebsd_triage 2016-06-24 00:10:20 UTC
Hello, I just committed a modified version in r417407.  I have work around the /usr/local hardcoding in both doas.c and Makefile.  I also added a pkg-message.in file.

Thanks for the submission!
Comment 6 Jesse Smith 2016-06-24 00:51:32 UTC
Thank you, kind sir. I appreciate you committing the port and tidying it up.