packages: crowd/crowd-init.properties (NEW), crowd/crowd.spec (NEW), crowd/...

pawelz pawelz at pld-linux.org
Sat May 29 14:47:20 CEST 2010


Author: pawelz                       Date: Sat May 29 12:47:20 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial PLD release

---- Files affected:
packages/crowd:
   crowd-init.properties (NONE -> 1.1)  (NEW), crowd.spec (NONE -> 1.1)  (NEW), tomcat-context.xml (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/crowd/crowd-init.properties
diff -u /dev/null packages/crowd/crowd-init.properties:1.1
--- /dev/null	Sat May 29 14:47:20 2010
+++ packages/crowd/crowd-init.properties	Sat May 29 14:47:14 2010
@@ -0,0 +1 @@
+crowd.home=/var/lib/crowd

================================================================
Index: packages/crowd/crowd.spec
diff -u /dev/null packages/crowd/crowd.spec:1.1
--- /dev/null	Sat May 29 14:47:20 2010
+++ packages/crowd/crowd.spec	Sat May 29 14:47:14 2010
@@ -0,0 +1,99 @@
+# $Revision$, $Date$
+# NOTE:
+# Do not remove NoSource tags. Make sure DistFiles won't fetch Crowd sources.
+#
+# Todd Revolt from Atlassian told that:
+#   * We are free to integrate Atlassian products into PLD. So we can write
+#     installer scripts, create nosrc packages etc.
+#   * We are not permitted to redistribute their products. That mean during
+#     installation each user has to download Crowd from atlassian web page.
+#
+# See Atlassian_EULA_3.0.pdf for more details.
+
+%if 0
+# Download sources manually:
+wget -c http://downloads.atlassian.com/software/crowd/downloads/atlassian-crowd-2.0.4-war.zip
+wget -c http://www.atlassian.com/about/licensing/Atlassian_EULA_3.0.pdf
+%endif
+
+%include	/usr/lib/rpm/macros.java
+
+Summary:	SSO server
+Name:		crowd
+Version:	2.0.4
+Release:	0.1
+License:	Proprietary, not distributable
+Group:		Networking/Daemons/Java/Servlets
+Source0:	atlassian-%{name}-%{version}-war.zip
+# NoSource0-md5:	be0c6d073297fb040c5c29550463252b
+NoSource:	0
+Source1:	Atlassian_EULA_3.0.pdf
+# NoSource1-md5:	9e87088024e3c5ee2e63a72a3e99a6cb
+NoSource:	1
+Source2:	tomcat-context.xml
+Source3:	%{name}-init.properties
+URL:		http://www.atlassian.com/software/crowd/default.jsp
+BuildRequires:	jpackage-utils
+BuildRequires:	rpm-javaprov
+BuildRequires:	rpmbuild(macros) >= 1.300
+BuildRequires:	unzip
+# According to crowd documentation, jre is not enough.
+Requires:	jdk
+Requires:	jpackage-utils
+Requires:	tomcat >= 0:6.0.20-4
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Crowd is a single sign-on (SSO) application for as many users, web
+applications and directory servers you need — all through a single web
+interface.
+
+%prep
+%setup -q -c
+
+cp %{SOURCE1} .
+
+# TODO set paths for logs
+# sed -i 's,^\(log4j\.appender\.[a-z]*\.File\)=\(.*\)$,\1=/var/log/crowd/\2,' webapp/WEB-INF/classes/log4j.properties
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a console index.jsp META-INF template WEB-INF $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+# configuration
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_sharedstatedir}/tomcat/conf/Catalina/localhost}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/crowd-init.properties
+ln -s %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml
+mv $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/crowd/log4j.properties
+ln -sf %{_sysconfdir}/crowd/log4j.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties
+ln -sf %{_sysconfdir}/crowd/crowd-init.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/crowd-initlog4j.properties
+
+install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name},/var/log/%{name}}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc licenses Atlassian_EULA_3.0.pdf
+%{_datadir}/%{name}
+%dir %attr(750,root,tomcat) %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,tomcat) %{_sysconfdir}/%{name}/*
+%{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml
+%attr(2775,root,servlet) %dir %{_sharedstatedir}/%{name}
+%attr(2775,root,servlet) %dir /var/log/%{name}
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/05/29 12:47:14  pawelz
+- initial PLD release
+

================================================================
Index: packages/crowd/tomcat-context.xml
diff -u /dev/null packages/crowd/tomcat-context.xml:1.1
--- /dev/null	Sat May 29 14:47:20 2010
+++ packages/crowd/tomcat-context.xml	Sat May 29 14:47:14 2010
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
+<Context path="/crowd" docBase="/usr/share/crowd"
+        privileged="false" allowLinking="true">
+
+  <!-- WARNING: It is highly remomended to use real database instead of
+       internal hsqldb. See example config for mysql below -->
+
+  <Resource name="jdbc/CrowdDS" auth="Container" type="javax.sql.DataSource"
+    username="sa"
+    password=""
+    driverClassName="org.hsqldb.jdbcDriver"
+    url="jdbc:hsqldb:/var/lib/crowd/crowdb/"
+    minEvictableIdleTimeMillis="4000"
+    timeBetweenEvictionRunsMillis="5000"/>
+  
+  <!-- If you want to use mysql database, comment out previous jdbc resource,
+       and uncomment this one. You will also have to customize your
+       entityengine.xml.
+
+       Make sure that mysql listens on TCP socket, because java do not know
+       how to use UNIX sockets. If you are not sure if mysql is configured
+       correctly, try to connect to it with the following command:
+       $ mysq -h127.0.0.1 -ucrowd -pcrowd crowd
+       Note 127.0.0.1, not localhost, which is resolved to UNIX socke path by
+       mysql client.
+    -->
+
+  <!--
+
+  <Resource name="jdbc/CrowdDS" auth="Container" type="javax.sql.DataSource"
+    username="crowd"
+    password="crowd"
+    driverClassName="com.mysql.jdbc.Driver"
+    url="jdbc:mysql://localhost/crowd?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF8"
+    maxActive="20"
+    validationQuery="select 1" />
+
+    -->
+
+</Context>
================================================================


More information about the pld-cvs-commit mailing list