New Formula: mailman #15230

Closed
wants to merge 4 commits into from

4 participants

@zenspider

Stupid OSX Server removed mailman. I'm making this in a rush to get it up and running on my server.

@adamv

Please squash to a single commit for review.

@adamv

Don't need to leave in commented-out code

@zenspider

"Files Changed" shows the diffs squashed. I'm not a git wiz...

@zenspider

cleaned up commented out code. sorry.

@jacknagel jacknagel and 1 other commented on an outdated diff Oct 2, 2012
Library/Formula/mailman.rb
@@ -0,0 +1,115 @@
+require 'formula'
+
+class Mailman < Formula
+ homepage 'http://www.gnu.org/software/mailman'
+ url 'http://ftpmirror.gnu.org/mailman/mailman-2.1.15.tgz'
+ sha1 '462ac96331491c76aca0128d8f9ced18c50a75d7'
+
+ ##
+ # varprefix is where we're going to put all the mailman data. It
+ # won't be removed between uninstalls to make upgrades easier.
+
+ def varprefix
+ HOMEBREW_REPOSITORY+"mailman"

HOMEBREW_PREFIX is what you're looking for, but what you really want is something like HOMEBREW_PREFIX/'share/mailman', we don't want an e.g. /usr/local/mailman directory.

share/mailman is cool. Fixed. thanks.

hrm... what about var/mailman? I don't have anything else that has created one... but it has a helper method and share doesn't...

alternatively, want me to add a share helper method to formula.rb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv adamv commented on the diff Oct 2, 2012
Library/Formula/mailman.rb
@@ -0,0 +1,115 @@
+require 'formula'
+
+class Mailman < Formula
+ homepage 'http://www.gnu.org/software/mailman'
@adamv
adamv added a note Oct 2, 2012

Don't align on the quote.

Get a real editor. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv adamv commented on the diff Oct 2, 2012
Library/Formula/mailman.rb
+ sha1 '462ac96331491c76aca0128d8f9ced18c50a75d7'
+
+ ##
+ # varprefix is where we're going to put all the mailman data. It
+ # won't be removed between uninstalls to make upgrades easier.
+
+ def varprefix
+ HOMEBREW_REPOSITORY+"mailman"
+ end
+
+ def install
+ ENV.j1 # parallel builds break
+
+ [prefix, varprefix].each do |path|
+ mkdir_p path
+ chown "_mailman", "_mailman", path
@adamv
adamv added a note Oct 2, 2012

Yikes, I don't think we want to chown the prefix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@zenspider

Yes, you do want to chown the prefix. mailman security depends on suid. It must be owned by _mailman or it won't even get past the configure step.

@zenspider

I should add... the chown bit will probably disqualify mailman from the main repo because it won't work with the no-sudo dogma of homebrew. It really does need to be sudo and it really does need to chown and set sticky-bit on the directory. Think of it as a design decision or simply a limitation... but that's how the software works. I'm happy to have this go in one of the sideline repos, but don't know which one it should go in.

@adamv

@jacknagel @mxcl @mikemcquaid is chowing the prefix going to mess with Hombrew operation here?

@mistydemeo

Can this be installed non-root?

brew install https://raw.github.com/zenspider/homebrew/f41e1c86577bb83bd16819991479a4551f8824bd/Library/Formula/mailman.rb
######################################################################## 100.0%
==> Downloading http://ftpmirror.gnu.org/mailman/mailman-2.1.15.tgz
######################################################################## 100.0%
Error: Operation not permitted - /usr/local/Cellar/mailman/2.1.15

The chown is failing.

@zenspider

ping

Should this be moved to one of the specialized repos?

@adamv

I suppose move it; (A) it was never squashed to a single commit for review (B) never got an answer if the chown was required.

@zenspider

I was very clear that the chown is required. Answered that one twice, in fact.

As far as the squash... As I said, I'm no wiz at git, but github provides a squashed view. Tell me what to type and ill type it.

@MikeMcQuaid
Homebrew member

Yeh, we can't include this if it requires chowning the prefix, sorry.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.