Bug 194854 - [patch] print/cups-base may fail to build package when PAM enabled.
Summary: [patch] print/cups-base may fail to build package when PAM enabled.
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: John Marino
URL:
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2014-11-06 04:15 UTC by Adrian Waters
Modified: 2014-11-28 11:52 UTC (History)
2 users (show)

See Also:


Attachments
Patch to Makefile to ensure ${LOCALBASE}/etc/pam.d is present. (358 bytes, patch)
2014-11-06 04:15 UTC, Adrian Waters
no flags Details | Diff
cups-base.patch2 (1.07 KB, patch)
2014-11-11 03:48 UTC, takefu
no flags Details | Diff
cups-base.patch3 (7.59 KB, patch)
2014-11-19 05:29 UTC, takefu
no flags Details | Diff
cups-base.patch4 (5.49 KB, patch)
2014-11-21 08:52 UTC, takefu
no flags Details | Diff
cups-base.patch5 (5.94 KB, patch)
2014-11-26 23:44 UTC, takefu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Waters 2014-11-06 04:15:47 UTC
Created attachment 149110 [details]
Patch to Makefile to ensure ${LOCALBASE}/etc/pam.d is present.

During the configure stage of print/cups-base, if PAM is enabled the cups.default PAM config file will be put into /etc/pam.d if the system does not have /usr/local/etc/pam.d present (for example, a poudriere jail.)  This leads to a failure to build the package as pkg-plist references a non-existent /usr/local/etc/pam.d/cups.default file.

This bug was encountered with poudriere 3.0.19 in a 9.3-RELEASE jail on a 9.3-RELEASE system (amd64.)
Comment 1 takefu 2014-11-11 03:48:16 UTC
Created attachment 149276 [details]
cups-base.patch2

@sample rewrite
Comment 2 John Marino freebsd_committer freebsd_triage 2014-11-14 13:03:23 UTC
No maintainer so I will use takefu's version and promote the PR.
Comment 3 Adrian Waters 2014-11-18 05:59:28 UTC
takefu's version of the patch renames cups.default to cups.sample and places it in /etc/pam.d, whereas everything else is installed into /usr/local.

Is it standard to install port configuration files outside /usr/local/etc?
Comment 4 Adrian Waters 2014-11-18 06:16:10 UTC
Apologies, that "is it standard" question of mine doesn't look right now I've re-read it.

What I mean to ask is, given that the port installs all its files into /usr/local, is it considered okay to put that one file outside of /usr/local/ into /etc?
Comment 5 takefu 2014-11-19 05:29:24 UTC
Created attachment 149579 [details]
cups-base.patch3

sample /etc/pam.d this description was a mistake.
pam.d be present in both /etc /usr/local/etc,
ports skeleton should be installed in the /usr/local/etc

Other, the OptionsNG only a little rewriting.
Comment 6 takefu 2014-11-21 08:52:52 UTC
Created attachment 149663 [details]
cups-base.patch4

OptionsNG-enable, because was broken, cancel.

.default -> .sample valid.
Makefile slight change.
Comment 7 takefu 2014-11-26 23:44:03 UTC
Created attachment 149923 [details]
cups-base.patch5

Still, there is reported to be installed in the / etc / pam.d *1

*1 Samuel Chow <cyschow_shaw.ca>
Comment 8 John Marino freebsd_committer freebsd_triage 2014-11-28 11:40:45 UTC
This patch is missing a PORTREVISION bump for cups-base, but I'll bump it myself.
Comment 9 commit-hook freebsd_committer freebsd_triage 2014-11-28 11:51:35 UTC
A commit references this bug:

Author: marino
Date: Fri Nov 28 11:51:31 UTC 2014
New revision: 373559
URL: https://svnweb.freebsd.org/changeset/ports/373559

Log:
  print/cups-base: Fix build when PAM option is enabled

  The @sample keyword fixes the config file based error.  While here,
  clean refactor the port a bit.

  PR:		194854
  Submitted by:	Adrian Waters
  Final fix by:	Takefu (airport.fm)

Changes:
  head/print/cups-base/Makefile
  head/print/cups-base/pkg-plist
Comment 10 John Marino freebsd_committer freebsd_triage 2014-11-28 11:52:19 UTC
it built fine.  Thanks guys!