msrb pushed to groovy-sandbox (f22). "Initial packaging"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Mar 31 11:54:03 UTC 2015


>From dc5bed8e92553b15c8583c1afa8d3e0fca155eb6 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Tue, 31 Mar 2015 06:39:37 +0200
Subject: Initial packaging


diff --git a/.gitignore b/.gitignore
index e69de29..c927fd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/groovy-sandbox-1.8.tar.gz
diff --git a/groovy-sandbox.spec b/groovy-sandbox.spec
new file mode 100644
index 0000000..0f95ebf
--- /dev/null
+++ b/groovy-sandbox.spec
@@ -0,0 +1,64 @@
+Name:           groovy-sandbox
+Version:        1.8
+Release:        1%{?dist}
+Summary:        Groovy sandbox for executing untrusted Groovy scripts safely
+
+License:        MIT
+URL:            http://groovy-sandbox.kohsuke.org
+Source0:        https://github.com/kohsuke/%{name}/archive/%{name}-%{version}.tar.gz
+
+BuildRequires:  maven-local
+BuildRequires:  mvn(junit:junit)
+BuildRequires:  mvn(org.codehaus.groovy:groovy)
+BuildRequires:  mvn(org.kohsuke:pom:pom:)
+BuildRequires:  groovy18 >= 1.8.9-20
+
+BuildArch:      noarch
+
+%description
+This project defines a Groovy CompilationCustomizer, which allows a
+program to execute Groovy script in a restricted sandbox environment. It
+is useful for applications that want to provide some degree of
+scriptability to users, without allowing them to execute System.exit(0)
+or any other undesirable operations.
+
+This compile-time transformation modifies untrusted Groovy script in
+such a way that every operation that can cause interactions with the
+external world gets intercepted. This allows your code to examine and
+deny executions. This includes every method call, object allocations,
+property/attribute access, array access, and so on.
+
+%package        javadoc
+Summary:        Javadoc for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+
+%prep
+%setup -q -n %{name}-%{name}-%{version}
+
+%pom_xpath_remove 'pom:build/pom:extensions/pom:extension[pom:artifactId[text()="wagon-gitsite"]]'
+%pom_remove_plugin :gmaven-plugin
+
+%build
+%mvn_build
+
+# we don't have gmaven, compile groovy classes manually
+pushd src/main/groovy/org/kohsuke/groovy/sandbox/
+  groovy18c -cp ../../../../../../../target/classes *
+  find org/ -type f -exec jar uf ../../../../../../../target/%{name}-%{version}.jar {} +
+popd
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%license LICENSE.md
+%files javadoc -f .mfiles-javadoc
+%license LICENSE.md
+
+%changelog
+* Mon Mar 30 2015 Michal Srb <msrb at redhat.com> - 1.8-1
+- Initial packaging
+
diff --git a/sources b/sources
index e69de29..2a89ce2 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4249bef3f65dddb80a95a9d01e1b1c06  groovy-sandbox-1.8.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/groovy-sandbox.git/commit/?h=f22&id=dc5bed8e92553b15c8583c1afa8d3e0fca155eb6


More information about the scm-commits mailing list