Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New formula: powerdnsauth #14627

Closed
wants to merge 1 commit into from

7 participants

@justinclift

PowerDNS Authoritative Server 3.1.

@adamv
Owner

Have to think about this one, specifically, how the MySQL or compatible software deps are handled.

@justinclift

No worries. There aren't any formulas making use of the MySQL alternatives, so this seemed like the most practical way.

Happy to rework this formula as needed.

@justinclift

Took a different approach, and went with PostgreSQL instead. ;)

@justinclift

Just squashed this into one commit as well, as that seems to be the preferred way of doing things. :)

@BlakeGardner

I get errors on compile with Mountain Lion. For a log see here: https://gist.github.com/3662592

@justinclift

Ouch, that's not good. I've only tested on Lion (not personally being keen to upgrade). I'll report that bug on the upstream developer mailing list, and see if they can work out a proper fix.

@justinclift

@BlakeGardner If you have a moment, please try this latest commit to see if it works.

Upstream have responded that the failure only happens with clang. So, that's now disabled for this formula.

Would like your confirmation though, just to be sure, before squashing this commit.

@BlakeGardner

@justinclift I've tested the latest commit and the compile failed again. I have updated the gist which should be more verbose: https://gist.github.com/3662592

Also i'm using apple-gcc42 provided by the homebrew/dupes tap if that helps any.

@Habbie

The formatting and formulation of the errors clearly shows that this is clang too. I'm not sure what apple-gcc42 is, but those errors are from clang.

@Habbie

PowerDNS SVN revision 2708 has a fix by @ahupowerdns for this issue.

@justinclift

@BlakeGardner This formula should be good now.

It includes the upstream patch for the clang errors, thanks to @Habbie and Christof Meerwald. :)

@BlakeGardner

@justinclift The formula now compiles and installs on OS X 10.8.1

@justinclift

Thanks @BlakeGardner. :)

@adamv All ok now?

@justinclift

ping ?

@ahupowerdns
@justinclift

Nah, just waiting on one of the Homebrew committers to commit it.

Sometimes things fall through the cracks, so need a little nudging. :)

@justinclift justinclift New formula: powerdnsauth
PowerDNS Authoritative Server 3.1.

* Updated to include origin of the patches, as per
  Adam's direction here:

    http://librelist.com/browser//homebrew/2012/9/27/powerdns-formula/#d03071974547b9a63304d59b74a11c5b

* Updated to use Requirements approach for PostgreSQL,
  as per Adam's direction here:

    http://librelist.com/browser//homebrew/2012/9/27/powerdns-formula/#5c0ba45319934ac813cceaaa45091c83
f941900
@adamv
Owner

Build error on Lion:

/bin/sh ../libtool --tag=CXX   --mode=link c++ -DSYSCONFDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/etc\" -DLIBDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind  -I/usr/local/include -I/usr/local/homebrew/Cellar/sqlite/3.7.14/include   -Iext/polarssl-1.1.2/include -pthread -Wall -O2 -rdynamic  -L/usr/local/lib -R/usr/local/lib -pthread  -o dnsreplay dnsreplay.o misc.o qtype.o logger.o statbag.o dnspcap.o dnsparser.o dnsrecords.o rcpgenerator.o base64.o dnswriter.o dnslabeltext.o unix_utility.o sillyrecords.o nsecrecords.o base32.o -lboost_program_options-mt -lz
libtool: link: c++ -DSYSCONFDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/etc\" -DLIBDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind -I/usr/local/include -I/usr/local/homebrew/Cellar/sqlite/3.7.14/include -Iext/polarssl-1.1.2/include -pthread -Wall -O2 -rdynamic -pthread -o dnsreplay dnsreplay.o misc.o qtype.o logger.o statbag.o dnspcap.o dnsparser.o dnsrecords.o rcpgenerator.o base64.o dnswriter.o dnslabeltext.o unix_utility.o sillyrecords.o nsecrecords.o base32.o -Wl,-bind_at_load  -L/usr/local/lib -lboost_program_options-mt -lz -pthread
brew: superenv removed: -I/usr/local/include -Wall -O2 -L/usr/local/lib
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-rdynamic'
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
libtool: link: c++ -DSYSCONFDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/etc\" -DLIBDIR=\"/usr/local/homebrew/Cellar/powerdnsauth/3.1/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind -I/usr/local/include -I/usr/local/homebrew/Cellar/sqlite/3.7.14/include -Iext/polarssl-1.1.2/include -pthread -Wall -O2 ../modules/gsqlite3backend/gsqlite3backend.o -rdynamic -pthread -o pdnssec pdnssec.o dbdnsseckeeper.o dnsparser.o dnsrecords.o dnswriter.o misc.o rcpgenerator.o base64.o unix_utility.o logger.o statbag.o qtype.o sillyrecords.o nsecrecords.o dnssecinfra.o base32.o ueberbackend.o dnsbackend.o arguments.o packetcache.o dnspacket.o bindbackend2.o binddnssec.o bindparser.o bindlexer.o gsqlbackend.o zoneparser-tng.o dynlistener.o dns.o randombackend.o dnssecsigner.o polarrsakeyinfra.o md5.o signingpipe.o dnslabeltext.o ednssubnet.o dnslabel.o ssqlite3.o -Wl,-bind_at_load  -ldl -L/usr/local/lib ext/polarssl-1.1.2/library/libpolarssl.a -lboost_program_options-mt -lboost_serialization-mt -L/usr/local/homebrew/Cellar/sqlite/3.7.14/lib -lsqlite3 -lz -pthread
brew: superenv removed: -I/usr/local/include -Wall -O2 -L/usr/local/lib
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-rdynamic'
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "unsigned long const& std::max<unsigned long>(unsigned long const&, unsigned long const&)", referenced from:
      RSADNSCryptoKeyEngine::getPublicKeyString() const in polarrsakeyinfra.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [pdnssec] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/serialtweaker.Tpo .deps/serialtweaker.Po
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Failure while executing: make 
@justinclift

Damn.

Which version of Xcode are you running Adam?

@adamv
Owner

4.3.2 I think. I'll try updating to 4.5.1 at some point.

@adamv
Owner

Does this fail or work for anyone else?

@mistydemeo
Owner

This builds for me on Xcode 4.5.1. (Edit: Lion 10.7.2.)

Question about the PostgresInstalled requirement. This looks for pg_config, which does come with Lion. My understanding though is that Lion doesn't include a complete postgres installation. Is the existence of pg_config enough to determine whether a useful postgres is present?

@justinclift

Well, it's a hard call, depending upon the intended use. :)

Having pg_config around indicates at least the PostgreSQL client is present, which can be good enough if there's a PostgreSQL server available somewhere. ie on another host.

It's arguably more likely that a person installing PowerDNS on OSX would want PostgreSQL locally... but it's definitely not the only option. Worst case scenario, people can install a PostgreSQL server locally (via Homebrew, etc) if needed.

@adamv
Owner

So is this a case of needing a newer Xcode and things are OK? Need to merge or reject this.

@justinclift

Well, it's definitely working for me with Xcode 4.5.2, on Lion 10.7.5.

It seems like the only person having trouble with it was yourself using Xcode 4.3.2. Have you updated to newer yet?
If you have, and this formula starts working for you, then I think we have an answer. :)

@adamv
Owner

I've upgraded Xcode, will give it another try.

@adamv
Owner

Question to other maintainers because I forgot: is the use of HOMEBREW_PREFIX here deprecated in favor of deps' opt_prefix?

@mikemcquaid
Owner

Yeh, think so.

@ghost

Is powerdnsauth is really the best name? Typing powerdnsauth in google doesn't give as clear results as pdns.

@adamv
Owner

If there's a name issue, let me know fast.

@adamv
Owner

(We should probably be consistent with Debian.)

@adamv adamv was assigned
@justinclift

We already have a "pdnsd" formula, which I felt might be a bit too close naming wise.

If we're ok with "pdns" though, that's definitely the preferred name here. :) I can update the formula pretty easily.

@adamv adamv closed this pull request from a commit
@justinclift justinclift PowerDNS Authoritative Server 3.1.
Closes #14627.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
d5350f8
@adamv adamv closed this in d5350f8
@ghost

So pdns is not preferred name anymore ?

@adamv
Owner

Oops.

@dholm dholm referenced this pull request from a commit in dholm/homebrew
@justinclift justinclift PowerDNS Authoritative Server 3.1.
Closes #14627.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
3b85736
@guyzmo guyzmo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 7, 2012
  1. @justinclift

    New formula: powerdnsauth

    justinclift authored
    PowerDNS Authoritative Server 3.1.
    
    * Updated to include origin of the patches, as per
      Adam's direction here:
    
        http://librelist.com/browser//homebrew/2012/9/27/powerdns-formula/#d03071974547b9a63304d59b74a11c5b
    
    * Updated to use Requirements approach for PostgreSQL,
      as per Adam's direction here:
    
        http://librelist.com/browser//homebrew/2012/9/27/powerdns-formula/#5c0ba45319934ac813cceaaa45091c83
This page is out of date. Refresh to see the latest.
Showing with 127 additions and 0 deletions.
  1. +127 −0 Library/Formula/powerdnsauth.rb
View
127 Library/Formula/powerdnsauth.rb
@@ -0,0 +1,127 @@
+require 'formula'
+
+class PostgresqlInstalled < Requirement
+ def message; <<-EOS.undent
+ PostgreSQL is required to install.
+
+ You can install this with:
+ brew install postgresql
+
+ Or you can use an official installer from:
+ http://www.postgresql.org/
+ EOS
+ end
+ def satisfied?
+ which 'pg_config'
+ end
+ def fatal?
+ true
+ end
+end
+
+class Powerdnsauth< Formula
+ homepage "http://wiki.powerdns.com"
+ url "http://downloads.powerdns.com/releases/pdns-3.1.tar.gz"
+ sha256 "1400f7bd659207c0b1f4b8296092e559a7b7bf6a2434951970217d9af06922a1"
+
+ depends_on "pkg-config" => :build
+ depends_on "boost"
+ depends_on "lua"
+ depends_on "sqlite"
+ depends_on PostgresqlInstalled.new if build.include? "pgsql"
+
+ option "pgsql", "Enable the PostgreSQL backend"
+
+ def patches
+ # Patches from @justinclift:
+ # 1 x patch to find correct SQLite path
+ # 1 x patch (2 parts) to correct LDFLAGS, so PostgreSQL compiles
+ #
+ # Upstream patches (will be in next PowerDNS release)
+ # 1 x patch to support compiling on OSX 10.8
+ # from http://wiki.powerdns.com/trac/changeset/2708
+ DATA
+ end
+
+ def install
+ args = ["--prefix=#{prefix}",
+ "--with-lua",
+ "--with-sqlite3",
+ "--with-sqlite=#{HOMEBREW_PREFIX}"]
+
+ # Include the PostgreSQL backend if requested
+ if build.include? "pgsql"
+ args << "--with-modules=gsqlite3 gpgsql"
+ else
+ # SQLite3 backend only is the default
+ args << "--with-modules=gsqlite3"
+ end
+
+ # Find Homebrew's Lua
+ ENV.append "LUA_CFLAGS", "-I#{HOMEBREW_PREFIX}/include"
+ ENV.append "LUA_LIBS", "-L#{HOMEBREW_PREFIX}/lib"
+
+ system "./configure", *args
+
+ # Compilation fails at polarssl if we skip straight to make install
+ system "make"
+ system "make install"
+
+ end
+end
+
+__END__
+--- pdns-3.1/configure_orig 2012-09-02 06:16:02.000000000 +1000
++++ pdns-3.1/configure 2012-09-02 06:18:16.000000000 +1000
+@@ -18398,7 +18398,7 @@
+ # Check whether --with-sqlite was given.
+ if test "${with_sqlite+set}" = set; then :
+ withval=$with_sqlite; SQLITE_lib_check="$withval/lib/sqlite $with_sqlite/lib"
+- SQLITE_inc_check="$withval/include/sqlite"
++ SQLITE_inc_check="$withval/include"
+ else
+ SQLITE_lib_check="/usr/local/sqlite/lib/sqlite /usr/local/lib/sqlite /opt/pgsql/lib/sqlite /usr/lib/sqlite /usr/local/sqlite/lib /usr/local/lib /opt/sqlite/lib /usr/lib /usr/lib64"
+ SQLITE_inc_check="/usr/local/sqlite/include/sqlite /usr/local/include/sqlite/ /usr/local/include /opt/sqlite/include/sqlite /opt/sqlite/include /usr/include/ /usr/include/sqlite"
+@@ -18723,7 +18723,7 @@
+ freebsd*)
+ ;;
+ *)
+- modulelibs="$modulelibs -lresolv -lnsl"
++ modulelibs="$modulelibs -lresolv"
+ ;;
+ esac
+ fi
+--- pdns-3.1/modules/gpgsqlbackend/Makefile.in_orig 2012-09-03 16:17:56.000000000 +1000
++++ pdns-3.1/modules/gpgsqlbackend/Makefile.in 2012-09-03 16:20:32.000000000 +1000
+@@ -262,8 +262,7 @@
+ libgpgsqlbackend_la_SOURCES = gpgsqlbackend.cc gpgsqlbackend.hh \
+ spgsql.hh spgsql.cc
+
+-libgpgsqlbackend_la_LDFLAGS = -module -avoid-version @PGSQL_lib@ -Wl,-Bstatic -lpq \
+- -Wl,-Bdynamic
++libgpgsqlbackend_la_LDFLAGS = -module -avoid-version @PGSQL_lib@ -lpq
+
+ libgpgsqlbackend_la_LIBADD = -lssl @LIBCRYPT@ -lcrypto
+ all: all-am
+--- pdns-3.1/pdns/cachecleaner.hh_orig 2012-09-11 18:01:49.000000000 +1000
++++ pdns-3.1/pdns/cachecleaner.hh 2012-09-11 18:03:17.000000000 +1000
+@@ -18,7 +18,7 @@
+ // cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";
+
+ typedef typename T::template nth_index<1>::type sequence_t;
+- sequence_t& sidx=collection.get<1>();
++ sequence_t& sidx=collection.template get<1>();
+
+ unsigned int tried=0, lookAt, erased=0;
+
+@@ -62,8 +62,8 @@
+ template <typename T> void moveCacheItemToFrontOrBack(T& collection, typename T::iterator& iter, bool front)
+ {
+ typedef typename T::template nth_index<1>::type sequence_t;
+- sequence_t& sidx=collection.get<1>();
+- typename sequence_t::iterator si=collection.project<1>(iter);
++ sequence_t& sidx=collection.template get<1>();
++ typename sequence_t::iterator si=collection.template project<1>(iter);
+ if(front)
+ sidx.relocate(sidx.begin(), si); // at the beginning of the delete queue
+ else
Something went wrong with that request. Please try again.