[owasp-java-html-sanitizer/f19] Initial import
Michal Srb
msrb at fedoraproject.org
Thu May 2 12:35:49 UTC 2013
commit e439c3370d4c246d2a4630583bce4b6d78f90485
Author: Michal Srb <msrb at redhat.com>
Date: Thu May 2 14:34:38 2013 +0200
Initial import
.gitignore | 2 +
create-tarball | 33 ++++++++++++++++++
owasp-java-html-sanitizer.spec | 71 ++++++++++++++++++++++++++++++++++++++++
sources | 2 +
4 files changed, 108 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6768014 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/owasp-java-html-sanitizer-r163.tar.gz
+/owasp-java-html-sanitizer-r163.pom
diff --git a/create-tarball b/create-tarball
new file mode 100755
index 0000000..73bc661
--- /dev/null
+++ b/create-tarball
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+ echo "Usage: ./create-tarball version"
+ exit 1
+fi
+
+VERSION=${1#r}
+
+wget http://owasp-java-html-sanitizer.googlecode.com/files/owasp-java-html-sanitizer-r${VERSION}.zip
+if [ $? -ne 0 ]; then
+ echo "Unable to download archive"
+ exit 1
+fi
+rm -Rf tar czvf owasp-java-html-sanitizer-r${VERSION}.tar.gz
+unzip owasp-java-html-sanitizer-r${VERSION}.zip
+rm owasp-java-html-sanitizer-r${VERSION}.zip
+cd owasp-java-html-sanitizer/
+rm -Rf javadoc/
+cd lib/
+rm guava-COPYING jsr305-COPYING
+mkdir -p src/main/java/
+unzip owasp-java-html-sanitizer-sources.jar -d src/main/java/
+find . -name "*.jar" -delete
+find . -name "*.sh" -delete
+rm -Rf src/main/java/META-INF
+cd ../
+mv lib/ owasp-java-html-sanitizer-r${VERSION}
+tar czvf owasp-java-html-sanitizer-r${VERSION}.tar.gz owasp-java-html-sanitizer-r${VERSION}/
+mv owasp-java-html-sanitizer-r${VERSION}.tar.gz ../
+cd ../
+rm -Rf owasp-java-html-sanitizer/
+
diff --git a/owasp-java-html-sanitizer.spec b/owasp-java-html-sanitizer.spec
new file mode 100644
index 0000000..d3192d9
--- /dev/null
+++ b/owasp-java-html-sanitizer.spec
@@ -0,0 +1,71 @@
+Name: owasp-java-html-sanitizer
+Version: 163
+Release: 1%{?dist}
+Summary: A fast HTML Sanitizer written in Java
+
+# New BSD License
+License: BSD
+URL: http://code.google.com/p/owasp-java-html-sanitizer/
+# Upstream uses Makefile, doesn't provide any sane source tarball,
+# there are no tags in svn repository
+# wget http://%{name}.googlecode.com/files/%{name}-r%{version}.zip
+# unzip %{name}-r%{version}.zip
+# cd %{name}/
+# rm -Rf javadoc/ lib/guava-COPYING lib/jsr305-COPYING
+# mv lib/ %{name}-r%{version}
+# cd %{name}-r${version}
+# mkdir -p src/main/java/
+# unzip %{name}-sources.jar -d src/main/java/
+# find . -name "*.jar" -delete
+# find . -name "*.sh" -delete
+# rm -Rf src/main/java/META-INF
+# cd ../
+# tar czvf %{name}-r%{version}.tar.gz %{name}-r%{version}/
+Source0: %{name}-r%{version}.tar.gz
+Source1: http://repo1.maven.org/maven2/com/googlecode/%{name}/%{name}/r%{version}/%{name}-r%{version}.pom
+
+BuildRequires: maven-local
+BuildRequires: mvn(com.google.code.findbugs:jsr305)
+BuildRequires: mvn(com.google.guava:guava)
+
+BuildArch: noarch
+
+%description
+A fast and easy to configure HTML Sanitizer written in Java which lets you
+include HTML authored by third-parties in your web application
+while protecting against XSS.
+The code was written with security best practices in mind, has an extensive
+test suite, and has undergone adversarial security review.
+
+%package javadoc
+Summary: Javadoc for %{name}
+
+%description javadoc
+This package contains API javadoc documentation for %{name}
+
+
+%prep
+%setup -q -n %{name}-r%{version}
+
+cp %{SOURCE1} pom.xml
+
+# temporary workaround. XMvn <= 0.4.2 doesn't support version ranges
+%pom_xpath_remove "pom:dependency[pom:artifactId[text()='guava']]/pom:version"
+%pom_xpath_remove "pom:dependency[pom:artifactId[text()='jsr305']]/pom:version"
+
+%build
+%mvn_build
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%doc owasp-java-html-sanitizer-COPYING
+%files javadoc -f .mfiles-javadoc
+%doc owasp-java-html-sanitizer-COPYING
+
+
+%changelog
+* Fri Apr 26 2013 Michal Srb <msrb at redhat.com> - 163-1
+- Initial package
+
diff --git a/sources b/sources
index e69de29..9c2c05b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+3481b3a3a795461b43432542beed7dd2 owasp-java-html-sanitizer-r163.tar.gz
+46cb68545e9704bb46e1933c2a5eaef2 owasp-java-html-sanitizer-r163.pom
More information about the scm-commits
mailing list