New Formula: mailman #15230

Closed
wants to merge 4 commits into
from

Projects

None yet

5 participants

Contributor

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

Contributor
adamv commented Oct 2, 2012

Please squash to a single commit for review.

Don't need to leave in commented-out code

Contributor

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

Contributor

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"
jacknagel
jacknagel Oct 2, 2012 Contributor

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.

zenspider
zenspider Oct 2, 2012 Contributor

share/mailman is cool. Fixed. thanks.

zenspider
zenspider Oct 2, 2012 Contributor

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?

@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 Oct 2, 2012 Contributor

Don't align on the quote.

zenspider
zenspider Oct 2, 2012 Contributor

Get a real editor. :P

@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 Oct 2, 2012 Contributor

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

Contributor

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.

Contributor

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.

Contributor
adamv commented Oct 4, 2012

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

Contributor

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.

Contributor

ping

Should this be moved to one of the specialized repos?

Contributor
adamv commented Jan 16, 2013

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.

Contributor

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.

Owner

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.