Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Amanda backup client #11529

Closed
wants to merge 2 commits into from

4 participants

@nmadura

New formula for the Amanda cummunity edition client,
Amanda describes themselves as "the most popular open
source backup and recovery software in the world."
Amanda makes publicly available pre-built binary clients
for Linux, Solaris, and Windows, but not OS X.

@nmadura nmadura new formula for Amanda community edition client
New formula for the Amanda cummunity edition client,
Amanda describes themselves as "the most popular open
source backup and recovery software in the world."
Amanda makes publicly available pre-built binary clients
for Linux, Solaris, and Windows, but not OS X.
c2d8d7c
@adamv

check the indentation here; we use 2 space indents

@adamv

We typically don't carry block comments on formulae

@adamv

Please remove this commented-out code.

@adamv

We can't run sudo or other command that requires user input from inside a formula

@jacknagel

Caveats should return a string, not puts directly.

@jacknagel

We don't support PPC anymore, so not an issue

@nmadura nmadura Updated Amanda Formula per requests by homebrew
update the amanda formula per requests made by the homebrew
team. Also realized I put in the wrong dependency for amplot.
amplot depends on gnuplot directly not cairo.
e398adb
@nmadura

I addressed all the comments and have updated the Formula

@adamv
Owner

I'm looking to merge this (finally, sorry for the delay) but am uncomfortable with the large amount of sudo in the caveats.

@adamv adamv was assigned
@adamv
Owner

Perhaps we should install a post-install script that has all those commands non-sudo, then suggest the user run sudo /path/to/script.

@mikemcquaid
Owner

@nmadura Any chance of doing that script @adamv mentioned?

@adamv adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 9, 2012
  1. @nmadura

    new formula for Amanda community edition client

    nmadura authored
    New formula for the Amanda cummunity edition client,
    Amanda describes themselves as "the most popular open
    source backup and recovery software in the world."
    Amanda makes publicly available pre-built binary clients
    for Linux, Solaris, and Windows, but not OS X.
  2. @nmadura

    Updated Amanda Formula per requests by homebrew

    nmadura authored
    update the amanda formula per requests made by the homebrew
    team. Also realized I put in the wrong dependency for amplot.
    amplot depends on gnuplot directly not cairo.
This page is out of date. Refresh to see the latest.
Showing with 69 additions and 0 deletions.
  1. +69 −0 Library/Formula/amanda.rb
View
69 Library/Formula/amanda.rb
@@ -0,0 +1,69 @@
+require 'formula'
+
+class Amanda < Formula
+ homepage 'http://amanda.org/'
+ url 'http://downloads.sourceforge.net/project/amanda/amanda%20-%20stable/3.3.1/amanda-3.3.1.tar.gz'
+ md5 'dae7631b4abcf7eac874df6e3740e75b'
+
+ depends_on 'glib'
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'gnuplot' if ARGV.include? '--with-amplot'
+
+ def options
+ [
+ ['--with-amplot', "Enable amanda plotting module."],
+ ]
+ end
+
+ def install
+ args = ["--prefix=#{prefix}",
+ "--sysconfdir=#{etc}",
+ "--localstatedir=#{var}",
+ "--disable-dependency-tracking",
+ "--disable-installperms",
+ # specify user and group to run amanda as, see caveats below
+ "--with-user=amandabackup",
+ "--with-group=admin",
+ "--with-ssh-security",
+ # this is the client package, unknow if OS X can be installed with a server package
+ "--without-server",
+ # amanda typically installs perl scripts, for the time being I am hiding these in the
+ # cellar.
+ "--without-amperldir"]
+
+ # gnuplot pulls in libgd and a bunch of other dependencies, and plotting by the client isn't necessary
+ if ARGV.include? '--with-amplot'
+ args << "--with-gnuplot=#{Formula.factory('gnuplot').bin}"
+ end
+
+ system "./configure", *args
+ system "make"
+ system "make install"
+ end
+
+ def caveats
+ <<BEGIN
+1.
+amservice typically installs with setuid root, this has been disabled to comply with homebrew
+
+2.
+The username/group that amanda runs as is compiled into the package, they are amandabackup/admin
+Issue the following to create the correct user account:
+
+sudo dscl localhost -create /Local/Default/Users/amandabackup
+sudo dscl localhost -create /Local/Default/Users/amandabackup RecordName amandabackup
+sudo dscl localhost -create /Local/Default/Users/amandabackup UserShell /bin/bash
+sudo dscl localhost -create /Local/Default/Users/amandabackup RealName "Backup User"
+sudo dscl localhost -create /Local/Default/Users/amandabackup UniqueID 5000
+sudo dscl localhost -create /Local/Default/Users/amandabackup PrimaryGroupID 0
+sudo dscl localhost -append /Local/Default/Groups/admin GroupMembership amandabackup
+sudo dscl localhost -create /Local/Default/Users/amandabackup NFSHomeDirectory /Users/amandabackup
+sudo ditto -rsrcFork '/System/Library/User Template/English.lproj/' /Users/amandabackup
+sudo sh -c "echo 'amandabackup_server.example.com amandabackup' > /Users/amandabackup/.amandahosts"
+sudo chmod 600 /Users/amandabackup/.amandahosts
+sudo chown -R amandabackup:wheel /Users/amandabackup
+sudo passwd amandabackup
+BEGIN
+ end
+end
Something went wrong with that request. Please try again.