2011-09-02 06:05:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2013-06-15 18:37:51 +00:00
|
|
|
# https version doesn't download with system curl on Snow Leopard
|
|
|
|
# https://github.com/mxcl/homebrew/issues/20339
|
2011-09-02 06:05:41 +00:00
|
|
|
class Cfengine < Formula
|
|
|
|
homepage 'http://cfengine.com/'
|
2013-09-17 17:14:22 +00:00
|
|
|
url 'http://cfengine.com/source-code/download?file=cfengine-3.5.2.tar.gz'
|
|
|
|
sha1 '57ffeee2a2a6acb1764a8a0d7979538d683ccf5a'
|
2011-09-02 06:05:41 +00:00
|
|
|
|
2012-05-10 18:56:19 +00:00
|
|
|
depends_on 'pcre'
|
2013-06-08 00:18:50 +00:00
|
|
|
depends_on 'tokyo-cabinet'
|
2013-09-17 17:14:22 +00:00
|
|
|
depends_on 'libxml2' if MacOS.version < :mountain_lion
|
|
|
|
|
|
|
|
def patches
|
|
|
|
# Fix compilation errors. Both changes are merged upstream already
|
|
|
|
# https://github.com/cfengine/core/pull/947
|
|
|
|
# https://github.com/cfengine/core/commit/d03fcc2d38a4db0c79386aaef30597102bf45853
|
|
|
|
DATA
|
|
|
|
end
|
2011-09-02 06:05:41 +00:00
|
|
|
|
|
|
|
def install
|
2012-05-10 18:56:19 +00:00
|
|
|
# Find our libpcre
|
2013-06-08 00:18:50 +00:00
|
|
|
ENV.append 'LDFLAGS', "-L#{Formula.factory('pcre').opt_prefix}/lib"
|
2012-05-10 18:56:19 +00:00
|
|
|
|
2012-04-13 15:43:36 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-workdir=#{var}/cfengine",
|
|
|
|
"--with-tokyocabinet"
|
2012-04-18 04:51:58 +00:00
|
|
|
system "make install"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/cf-agent", "-V"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
end
|
2013-09-17 17:14:22 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/cf-agent/verify_environments.c b/cf-agent/verify_environments.c
|
|
|
|
index afb84ad..c59b599 100644
|
|
|
|
--- a/cf-agent/verify_environments.c
|
|
|
|
+++ b/cf-agent/verify_environments.c
|
|
|
|
@@ -282,13 +282,13 @@ static void VerifyEnvironments(EvalContext *ctx, Attributes a, Promise *pp)
|
|
|
|
{
|
|
|
|
case cfv_virt_vbox:
|
|
|
|
case cfv_virt_test:
|
|
|
|
- VerifyVirtDomain(hyper_uri, envtype, a, pp);
|
|
|
|
+ VerifyVirtDomain(ctx, hyper_uri, envtype, a, pp);
|
|
|
|
break;
|
|
|
|
case cfv_virt_xen_net:
|
|
|
|
case cfv_virt_kvm_net:
|
|
|
|
case cfv_virt_esx_net:
|
|
|
|
case cfv_virt_test_net:
|
|
|
|
- VerifyVirtNetwork(hyper_uri, envtype, a, pp);
|
|
|
|
+ VerifyVirtNetwork(ctx, hyper_uri, envtype, a, pp);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
diff --git a/cf-agent/verify_files_utils.c b/cf-agent/verify_files_utils.c
|
|
|
|
index 21f195c..ec4ba0d 100644
|
|
|
|
--- a/cf-agent/verify_files_utils.c
|
|
|
|
+++ b/cf-agent/verify_files_utils.c
|
|
|
|
@@ -2271,7 +2271,6 @@ static void VerifyCopiedFileAttributes(EvalContext *ctx, const char *src, const
|
|
|
|
if (!CopyFileExtendedAttributesDisk(src, dest))
|
|
|
|
{
|
|
|
|
cfPS(ctx, LOG_LEVEL_INFO, PROMISE_RESULT_FAIL, pp, attr, "Could not preserve extended attributes (ACLs and security contexts) on file '%s'", dest);
|
|
|
|
- return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|