[owncloud] Initial import

brummbq brummbq at fedoraproject.org
Sun Mar 3 20:26:56 UTC 2013


commit 9ee05fbe8604bcba580b82acc6704d3c281fd8fe
Author: Gregor Tätzner <gregor at freenet.de>
Date:   Sun Mar 3 21:26:16 2013 +0100

    Initial import

 .gitignore                                         |    1 +
 owncloud-4.5.7-config.patch                        |   44 +++
 ...oud-4.5.7-disable-config-dir-access-check.patch |   14 +
 owncloud-4.5.7-remove-jslint.patch                 |   43 +++
 owncloud-4.5.7-unbundle-blowfish.patch             |   11 +
 owncloud-4.5.7-unbundle-phpmailer.patch            |   11 +
 owncloud-4.5.7-unbundle-phptar.patch               |   11 +
 owncloud-README.fedora                             |   55 +++
 owncloud-delete-jslint.sh                          |   15 +
 owncloud-httpd-2.2.conf                            |   15 +
 owncloud-httpd-2.4.conf                            |   17 +
 owncloud-logrotate.conf                            |    5 +
 owncloud-mysql.txt                                 |   14 +
 owncloud-postgresql.txt                            |   15 +
 owncloud-setup.patch                               |   22 ++
 owncloud.spec                                      |  347 ++++++++++++++++++++
 sources                                            |    1 +
 17 files changed, 641 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8502679 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/owncloud-4.5.7-repack.tar.bz2
diff --git a/owncloud-4.5.7-config.patch b/owncloud-4.5.7-config.patch
new file mode 100644
index 0000000..afd9fbd
--- /dev/null
+++ b/owncloud-4.5.7-config.patch
@@ -0,0 +1,44 @@
+--- config/config.sample.php.orig	2013-02-19 21:09:08.000000000 +0100
++++ config/config.sample.php	2013-02-24 17:40:06.120241595 +0100
+@@ -90,7 +90,7 @@
+ "log_type" => "owncloud",
+ 
+ /* File for the owncloud logger to log to, (default is ownloud.log in the data dir */
+-"logfile" => "",
++"logfile" => "/var/log/owncloud.log",
+ 
+ /* Loglevel to start logging at. 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default is WARN) */
+ "loglevel" => "",
+@@ -98,7 +98,7 @@
+ /* The directory where the user data is stored, default to data in the owncloud
+  * directory. The sqlite database is also stored here, when sqlite is used.
+  */
+-// "datadirectory" => "",
++"datadirectory" => "/var/lib/owncloud/data",
+ 
+ "apps_paths" => array(
+ 
+@@ -107,10 +107,17 @@
+  applications paths. 'writable' indicate if the user can install apps in this folder.
+  You must have at least 1 app folder writable or you must set the parameter : appstoreenabled to false
+ */
+-	array(
+-		'path'=> '/var/www/owncloud/apps',
+-		'url' => '/apps',
+-		'writable' => true,
+-  ),
+- ),
++	0 =>
++		array(
++			'path'=> '/usr/share/owncloud/apps',
++			'url' => '/apps',
++			'writable' => false,
++		),
++	1 =>
++		array (
++			'path' => '/var/lib/owncloud/apps',
++			'url' => '/apps-appstore',
++			'writable' => true,
++		),
++	),
+ );
diff --git a/owncloud-4.5.7-disable-config-dir-access-check.patch b/owncloud-4.5.7-disable-config-dir-access-check.patch
new file mode 100644
index 0000000..1d052d7
--- /dev/null
+++ b/owncloud-4.5.7-disable-config-dir-access-check.patch
@@ -0,0 +1,14 @@
+--- lib/util.php.orig	2013-02-19 21:09:08.000000000 +0100
++++ lib/util.php	2013-02-24 17:49:55.804667151 +0100
+@@ -224,11 +224,6 @@
+ 		//common hint for all file permissons error messages
+ 		$permissionsHint="Permissions can usually be fixed by giving the webserver write access to the ownCloud directory";
+ 
+-		// Check if config folder is writable.
+-		if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
+-			$errors[]=array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud");
+-		}
+-
+ 		// Check if there is a writable install folder.
+ 		if(OC_Config::getValue('appstoreenabled', true)) {
+ 			if( OC_App::getInstallPath() === null  || !is_writable(OC_App::getInstallPath()) || !is_readable(OC_App::getInstallPath()) ) {
diff --git a/owncloud-4.5.7-remove-jslint.patch b/owncloud-4.5.7-remove-jslint.patch
new file mode 100644
index 0000000..99fd20b
--- /dev/null
+++ b/owncloud-4.5.7-remove-jslint.patch
@@ -0,0 +1,43 @@
+--- apps/files_texteditor/js/editor.js.orig	2013-02-19 21:09:09.000000000 +0100
++++ apps/files_texteditor/js/editor.js	2013-02-24 17:55:37.431660430 +0100
+@@ -16,28 +16,16 @@
+ 	filetype["c"] = "c_cpp";
+ 	filetype["clj"] = "clojure";
+ 	filetype["coffee"] = "coffee"; // coffescript can be compiled to javascript
+-	filetype["coldfusion"] = "cfc";
+ 	filetype["cpp"] = "c_cpp";
+ 	filetype["cs"] = "csharp";
+ 	filetype["css"] = "css";
+-	filetype["groovy"] = "groovy";
+ 	filetype["haxe"] = "hx";
+-	filetype["htm"] = "html";
+-	filetype["html"] = "html";
+-	filetype["java"] = "java";
+-	filetype["js"] = "javascript";
+-	filetype["jsm"] = "javascript";
+ 	filetype["json"] = "json";
+ 	filetype["latex"] = "latex";
+ 	filetype["less"] = "less";
+ 	filetype["ly"] = "latex";
+ 	filetype["ily"] = "latex";
+ 	filetype["lua"] = "lua";
+-	filetype["markdown"] = "markdown";
+-	filetype["md"] = "markdown";
+-	filetype["mdown"] = "markdown";
+-	filetype["mdwn"] = "markdown";
+-	filetype["mkd"] = "markdown";
+ 	filetype["ml"] = "ocaml";
+ 	filetype["mli"] = "ocaml";
+ 	filetype["pl"] = "perl";
+@@ -46,11 +34,9 @@
+ 	filetype["py"] = "python";
+ 	filetype["rb"] = "ruby";
+ 	filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap
+-	filetype["scala"] = "scala";
+ 	filetype["scss"] = "scss"; // "sassy css"
+ 	filetype["sh"] = "sh";
+ 	filetype["sql"] = "sql";
+-	filetype["svg"] = "svg";
+ 	filetype["textile"] = "textile"; // related to markdown
+ 	filetype["xml"] = "xml";
+ 
diff --git a/owncloud-4.5.7-unbundle-blowfish.patch b/owncloud-4.5.7-unbundle-blowfish.patch
new file mode 100644
index 0000000..dad5b22
--- /dev/null
+++ b/owncloud-4.5.7-unbundle-blowfish.patch
@@ -0,0 +1,11 @@
+--- apps/files_encryption/lib/crypt.php.orig	2013-02-19 21:09:08.000000000 +0100
++++ apps/files_encryption/lib/crypt.php	2013-02-24 17:59:06.880651439 +0100
+@@ -31,7 +31,7 @@
+ //  - IMPORTANT! Check if the block lenght of the encrypted data stays the same
+ 
+ 
+-require_once 'Crypt_Blowfish/Blowfish.php';
++require_once 'Crypt/Blowfish.php';
+ 
+ /**
+  * This class is for crypting and decrypting
diff --git a/owncloud-4.5.7-unbundle-phpmailer.patch b/owncloud-4.5.7-unbundle-phpmailer.patch
new file mode 100644
index 0000000..da4a1f3
--- /dev/null
+++ b/owncloud-4.5.7-unbundle-phpmailer.patch
@@ -0,0 +1,11 @@
+--- lib/mail.php.orig	2012-09-23 21:19:09.618404018 +0200
++++ lib/mail.php	2012-09-23 21:17:53.497280058 +0200
+@@ -12,7 +12,7 @@
+  * A class to handle mail sending.
+  */
+
+-require_once 'class.phpmailer.php';
++require_once 'PHPMailer/class.phpmailer.php';
+
+ class OC_Mail {
+
diff --git a/owncloud-4.5.7-unbundle-phptar.patch b/owncloud-4.5.7-unbundle-phptar.patch
new file mode 100644
index 0000000..dd57281
--- /dev/null
+++ b/owncloud-4.5.7-unbundle-phptar.patch
@@ -0,0 +1,11 @@
+--- lib/archive/tar.php.orig	2012-09-23 21:27:10.383267289 +0200
++++ lib/archive/tar.php	2012-09-23 21:28:56.650262606 +0200
+@@ -6,7 +6,7 @@
+  * See the COPYING-README file.
+  */
+ 
+-require_once '3rdparty/Archive/Tar.php';
++require_once 'Archive/Tar.php';
+ 
+ class OC_Archive_TAR extends OC_Archive{
+ 	const PLAIN=0;
diff --git a/owncloud-README.fedora b/owncloud-README.fedora
new file mode 100644
index 0000000..165f44f
--- /dev/null
+++ b/owncloud-README.fedora
@@ -0,0 +1,55 @@
+ownCloud packaging notes
+========================
+
+Start
+------
+After installation you should be able to access the login/configuration page
+on following url:
+
+http://localhost/owncloud/
+
+If not, make sure your webserver is running properly.
+
+Webserver
+---------
+Currently ownCloud in Fedora supports only one webserver: httpd (apache).
+You must install at least on webserver subpackage (owncloud-<webserver>). These
+packages include additional configuration files for the webservers, if necessary.
+
+Database
+--------
+You can choose between 3 databases: MySQL, Postgresql and SQLite.
+For each of them exists a corresponding owncloud subpackage (owncloud-<database>).
+You are required to install at least one of them.
+
+For larger installs you should use MySQL or PostgreSQL.
+
+If you choose MySQL or PostgreSQL, keep in mind that you must create a database and user
+for owncloud manually, before you can finish the setup process.
+
+For specific instructions, please refer to the documentation in the database subpackages.
+
+Configuration
+-------------
+You can find the main configuration file at '/etc/owncloud/config.php'
+A default configuration file with a lot of comments is included in the documentation.
+
+User Data
+---------
+The default data directory is '/var/lib/owncloud/data'. Every file that is uploaded
+by your users to ownCloud gets saved into this folder. Consider doing a backup of this
+directory, together with the database and the main configuration.
+
+Logging
+-------
+The log output of ownCloud is written to '/var/log/owncloud.log'.
+You can set the loglevel in the main config file. By default the built-in log
+mechanism of ownCloud is used.
+
+App Store
+---------
+If you install additional third party apps with the built-in app store, you can find them
+in the directory '/var/lib/owncloud/apps'. This functionality is enabled by default.
+
+
+For further informations see also: http://owncloud.org/
diff --git a/owncloud-delete-jslint.sh b/owncloud-delete-jslint.sh
new file mode 100755
index 0000000..813f1f1
--- /dev/null
+++ b/owncloud-delete-jslint.sh
@@ -0,0 +1,15 @@
+#!/bin/bash -e
+
+SUFFIX=".tar.bz2"
+ORIG_SOURCE=$1
+REPACK_SOURCE="$(basename $ORIG_SOURCE $SUFFIX)-repack${SUFFIX}"
+
+tar -xf $1
+
+# delete jslint
+pushd owncloud/apps/files_texteditor/js/aceeditor/
+sed -ie "/define('ace\/worker\/jshint'/,/});\/\* -\*- Mode:/d" worker-javascript.js
+popd
+
+tar -cjf $REPACK_SOURCE owncloud
+rm -rf owncloud
diff --git a/owncloud-httpd-2.2.conf b/owncloud-httpd-2.2.conf
new file mode 100644
index 0000000..bf40d78
--- /dev/null
+++ b/owncloud-httpd-2.2.conf
@@ -0,0 +1,15 @@
+Alias /owncloud /usr/share/owncloud
+
+<Directory /usr/share/owncloud/>
+    Options -Indexes
+
+    ErrorDocument 404 /core/templates/404.php
+
+    php_value upload_max_filesize 512M
+    php_value post_max_size 512M
+    php_value memory_limit 512M
+    SetEnv htaccessWorking true
+
+    RewriteEngine on
+    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
+</Directory>
diff --git a/owncloud-httpd-2.4.conf b/owncloud-httpd-2.4.conf
new file mode 100644
index 0000000..9aa9e97
--- /dev/null
+++ b/owncloud-httpd-2.4.conf
@@ -0,0 +1,17 @@
+Alias /owncloud /usr/share/owncloud
+
+<Directory /usr/share/owncloud/>
+    Options -Indexes
+
+    Require all granted
+
+    ErrorDocument 404 /core/templates/404.php
+
+    php_value upload_max_filesize 512M
+    php_value post_max_size 512M
+    php_value memory_limit 512M
+    SetEnv htaccessWorking true
+
+    RewriteEngine on
+    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
+</Directory>
diff --git a/owncloud-logrotate.conf b/owncloud-logrotate.conf
new file mode 100644
index 0000000..7d79299
--- /dev/null
+++ b/owncloud-logrotate.conf
@@ -0,0 +1,5 @@
+/var/log/owncloud.log {
+    missingok
+    notifempty
+    delaycompress
+}
diff --git a/owncloud-mysql.txt b/owncloud-mysql.txt
new file mode 100644
index 0000000..0490bd7
--- /dev/null
+++ b/owncloud-mysql.txt
@@ -0,0 +1,14 @@
+Configure MySQL for ownCloud
+============================
+Before you can use MySQL as database backend, you need to follow a couple of steps:
+
+1. make sure that your mysql service is configured and running properly
+2. log in to mysql as privileged user to create the database and a dedicated user account for ownCloud:
+mysql -u root -p
+ CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
+ CREATE DATABASE IF NOT EXISTS owncloud;
+ GRANT ALL PRIVILEGES ON owncloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
+
+Choose identifier and password accordingly.
+
+Now you can launch the ownCloud setup screen, select MySQL in the advanced settings and fill in your credentials.
diff --git a/owncloud-postgresql.txt b/owncloud-postgresql.txt
new file mode 100644
index 0000000..b4afe02
--- /dev/null
+++ b/owncloud-postgresql.txt
@@ -0,0 +1,15 @@
+Configure PostgreSQL for ownCloud
+=================================
+Before you can use PostgreSQL as database backend, you need to follow a couple of steps:
+
+1. make sure that your PostgreSQL service is configured and running properly
+2. log in to PostgreSQL as system user to create the database and a dedicated user account for ownCloud:
+su - -c "psql" postgres
+ CREATE USER username WITH PASSWORD 'password';
+ CREATE DATABASE owncloud TEMPLATE template0 ENCODING 'UNICODE';
+ ALTER DATABASE owncloud OWNER TO username;
+ GRANT ALL PRIVILEGES ON DATABASE owncloud TO username;
+
+Choose identifier and password accordingly.
+
+Now you can launch the ownCloud setup screen, select PostgreSQL in the advanced settings and fill in your credentials.
diff --git a/owncloud-setup.patch b/owncloud-setup.patch
new file mode 100644
index 0000000..daee920
--- /dev/null
+++ b/owncloud-setup.patch
@@ -0,0 +1,22 @@
+--- lib/setup.php.orig	2013-02-24 19:12:07.525300933 +0100
++++ lib/setup.php	2013-02-24 19:16:18.829898946 +0100
+@@ -8,7 +8,7 @@
+ 
+ // Test if  .htaccess is working
+ $content = "deny from all";
+-file_put_contents(OC::$SERVERROOT.'/data/.htaccess', $content);
++file_put_contents($datadir.'/.htaccess', $content);
+ 
+ $opts = array(
+ 	'hasSQLite' => $hasSQLite,
+@@ -368,8 +368,8 @@
+ 			}
+ 			else {
+ 				//delete the old sqlite database first, might cause infinte loops otherwise
+-				if(file_exists("$datadir/owncloud.db")) {
+-					unlink("$datadir/owncloud.db");
++				if(file_exists($datadir . '/owncloud.db')) {
++					unlink($datadir . '/owncloud.db');
+ 				}
+ 				//in case of sqlite, we can always fill the database
+ 				OC_DB::createDbFromStructure('db_structure.xml');
diff --git a/owncloud.spec b/owncloud.spec
new file mode 100644
index 0000000..24c3f45
--- /dev/null
+++ b/owncloud.spec
@@ -0,0 +1,347 @@
+
+Name:           owncloud
+Version:        4.5.7
+Release:        2%{?dist}
+Summary:        Private file sync and share server
+
+License:        AGPLv3+ and MIT and BSD and CC-BY and CC-BY-SA and GPLv3 and Public Domain and (MPLv1.1 or GPLv2+ or LGPLv2+) and (MIT or GPL+) and (MIT or GPLv2) and ASL 2.0 and LGPLv3
+URL:            http://owncloud.org
+# removed any occurences of jslint, see script delete-jslint
+Source0:        %{name}-%{version}-repack.tar.bz2
+# orig source:  http://owncloud.org/releases/%{name}-%{version}.tar.bz2
+Source1:        %{name}-httpd-2.2.conf
+Source6:        %{name}-httpd-2.4.conf
+# very basic
+Source2:        %{name}-logrotate.conf
+# packaging notes and doc
+Source3:        %{name}-README.fedora
+Source4:        %{name}-mysql.txt
+Source5:        %{name}-postgresql.txt
+
+# used to repack the source tarball
+Source42:		%{name}-delete-jslint.sh
+
+Patch0:         %{name}-4.5.7-config.patch
+# triggers selinux avc, write access on config/config.php is sufficient
+Patch1:         %{name}-4.5.7-disable-config-dir-access-check.patch
+# remove calls to jslint
+Patch2:         %{name}-4.5.7-remove-jslint.patch
+# fix includes
+Patch10:        %{name}-4.5.7-unbundle-blowfish.patch
+Patch11:        %{name}-4.5.7-unbundle-phpmailer.patch
+Patch12:        %{name}-4.5.7-unbundle-phptar.patch
+
+Patch13:        %{name}-setup.patch
+
+BuildArch:      noarch
+
+Requires:       %{name}-webserver = %{version}-%{release}
+Requires:       %{name}-database = %{version}-%{release}
+
+# core PHP libs
+Requires:       php-gd php-curl php-dom php-exif php-fileinfo php-gmp php-iconv
+Requires:       php-json php-ldap php-mbstring php-openssl php-pcre php-pdo
+Requires:       php-session php-simplexml php-spl php-zip
+%if 0%{?fedora} || 0%{?rhel} > 6
+Requires:       php-filter
+%endif
+# other PHP libs
+Requires:       php-getid3 php-PHPMailer php-cloudfiles php-phpass
+# PHP PEAR dependencies
+Requires:       php-pear(Crypt_Blowfish)
+Requires:       php-pear(Net_Curl) php-pear(XML_Parser)
+# SabreDAV
+Requires:       php-pear(Sabre_CalDAV) php-pear(Sabre_CardDAV)
+# for logrotate
+Requires:       rsyslog
+
+%if 0%{?rhel}
+Requires(post): policycoreutils-python
+Requires(postun): policycoreutils-python
+%endif
+
+# Bundled 3rdparty libs missing in Fedora
+## JS (mainly jQuery plugins)
+# https://github.com/harvesthq/chosen/
+# http://fgelinas.com/code/timepicker
+# http://arshaw.com/fullcalendar/
+
+
+%description
+ownCloud gives you universal access to your files through a web interface or
+WebDAV. It also provides a platform to easily view & sync your contacts,
+calendars and bookmarks across all your devices and enables basic editing right
+on the web. ownCloud is extendable via a simple but powerful API for
+applications and plugins.
+
+
+%package httpd
+Summary:        Httpd integration for ownCloud
+
+Provides:       %{name}-webserver = %{version}-%{release}
+Requires:       %{name} = %{version}-%{release}
+
+# PHP dependencies
+Requires:       php
+
+%description httpd
+%{summary}
+
+
+# imagine something like %%package nginx or lighttpd here
+
+
+%package mysql
+Summary:        Virtual package providing MySQL dependencies for %{name}
+
+Provides:       %{name}-database = %{version}-%{release}
+Requires:       %{name} = %{version}-%{release}
+
+Requires:       php-mysql
+Requires:       php-pear(MDB2_Driver_mysqli)
+Requires:       mysql-server
+
+%description mysql
+%{summary}
+
+
+%package postgresql
+Summary:        Virtual package providing PostgreSQL dependencies for %{name}
+
+Provides:	%{name}-database = %{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
+
+Requires:	php-pgsql
+Requires:	php-pear(MDB2_Driver_pgsql)
+Requires:	postgresql-server
+
+%description postgresql
+%{summary}
+
+
+%package sqlite
+Summary:        Virtual package providing Sqlite3 dependencies for %{name}
+
+Provides:	%{name}-database = %{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
+# just need mdb2, the sqlite3 driver is already included
+Requires:	php-sqlite3 php-pcre
+Requires:	php-pear(MDB2)
+
+%description sqlite
+%{summary}
+
+
+%prep
+%setup -q -n %{name}
+%patch0
+%patch1
+%patch2
+%patch10
+%patch11
+%patch12
+
+%patch13
+
+# Strip bundled libraries
+rm -rf 3rdparty/{Archive,Console,Crypt_Blowfish,OS,Sabre,simpletest,getid3,php-cloudfiles,phpass,PEAR}
+rm -f 3rdparty/{Sabre.includes,System,class.phpmailer,class.smtp,MDB2,PEAR5}.php
+
+# keep  MDB2-Schema - consider upgrading system MDB2-Schema to latest git snapshot
+find 3rdparty/MDB2 -mindepth 1 -maxdepth 1 ! -name "Schema*" -exec rm -rf {} \;
+
+# keep Parser.php - incompatible function signature
+rm -rf 3rdparty/XML/Parser
+
+# bundling notes:
+## smb4php - forked php class from http://www.phpclasses.org/package/4129-PHP-Stream-wrapper-to-access-Windows-shared-files.html
+## openid/phpMyID - forked from http://siege.org/projects/phpMyID and adjusted to oC needs
+## openid/SimpleOpenID - adjusted class from http://roosenmaallen.com/2008/03/20/simpleopenid-for-php/
+## Google - copy of a google playground project https://code.google.com/p/gdata-samples/source/browse/trunk/oauth_playground/
+# containing random OAuth.php lib from http://oauth.googlecode.com/svn/code/php/ - I don't know what to say
+## mediawiki contains two files picked from the mediawiki distribution
+# Fedora packages mediawiki but not in a way that it's files would be reusable
+# (i.e. the package doesn't contain the files itself but the tarball + deployment
+# script)
+
+
+# clean up content
+rm -rf apps/files_odfviewer/src
+rm -rf apps/files_videoviewer/mediaelement/src
+rm -f 3rdparty/PEAR-LICENSE
+rm -f apps/files_texteditor/js/aceeditor/mode-text.js
+rm -f apps/files_texteditor/js/aceeditor/mode-text-uncompressed.js
+rm -f l10n/{l10n.pl,init.sh}
+
+# prepare package doc
+cp %{SOURCE3} README.fedora
+cp %{SOURCE4} README.mysql
+cp %{SOURCE5} README.postgresql
+
+
+%build
+# Nothing to build
+
+
+%install
+install -dm 755 %{buildroot}%{_datadir}/%{name}
+
+# create owncloud datadir
+mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/data
+# create writable app dir for appstore
+mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/apps
+# create owncloud sysconfdir
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}
+
+# install content
+cp -a apps	%{buildroot}%{_datadir}/%{name}
+cp -a core	%{buildroot}%{_datadir}/%{name}
+cp -a files	%{buildroot}%{_datadir}/%{name}
+cp -a l10n	%{buildroot}%{_datadir}/%{name}
+cp -a lib	%{buildroot}%{_datadir}/%{name}
+cp -a ocs	%{buildroot}%{_datadir}/%{name}
+cp -a search	%{buildroot}%{_datadir}/%{name}
+cp -a settings	%{buildroot}%{_datadir}/%{name}
+cp -a themes	%{buildroot}%{_datadir}/%{name}
+cp -a 3rdparty	%{buildroot}%{_datadir}/%{name}
+install -pm 644 {index,public,remote,status,cron}.php	%{buildroot}%{_datadir}/%{name}
+install -pm 644 db_structure.xml	%{buildroot}%{_datadir}/%{name}
+install -pm 644 config/config.sample.php %{buildroot}%{_sysconfdir}/%{name}/config.php
+
+# symlink config dir
+ln -sf %{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config
+
+# httpd config
+%if 0%{?fedora}  >= 18
+install -Dpm 644 %{SOURCE6} \
+    %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
+%else
+install -Dpm 644 %{SOURCE1} \
+    %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
+%endif
+
+# logging
+mkdir -p %{buildroot}%{_localstatedir}/log
+touch %{buildroot}%{_localstatedir}/log/owncloud.log
+
+install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+
+
+%if 0%{?rhel}
+%post
+semanage fcontext -a -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}/config.php' 2>/dev/null || :
+restorecon %{_sysconfdir}/%{name}/config.php || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+semanage fcontext -d -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}/config.php' 2>/dev/null || :
+fi
+%endif
+
+
+%post httpd
+%if 0%{?fedora} || 0%{?rhel} > 6
+/usr/bin/systemctl reload httpd.service > /dev/null 2>&1 || :
+%else
+/sbin/service httpd reload > /dev/null 2>&1 || :
+%endif
+
+%postun httpd
+if [ $1 -eq 0 ]; then
+%if 0%{?fedora} || 0%{?rhel} > 6
+  /usr/bin/systemctl reload httpd.service > /dev/null 2>&1 || :
+%else
+  /sbin/service httpd reload > /dev/null 2>&1 || :
+%endif
+fi
+
+%files
+%doc AUTHORS COPYING-AGPL COPYING-README README README.fedora config/config.sample.php
+
+%dir %attr(-,apache,apache) %{_sysconfdir}/%{name}
+# contains sensitive data (dbpassword, passwordsalt)
+%config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name}/config.php
+
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+
+%{_datadir}/%{name}
+%exclude %{_datadir}/%{name}/lib/MDB2
+%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}
+# user data must not be world readable
+%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/data
+
+%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/apps
+
+%ghost %{_localstatedir}/log/owncloud.log
+
+
+%files httpd
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
+
+
+%files mysql
+%doc README.mysql
+%files postgresql
+%doc README.postgresql
+%files sqlite
+%{_datadir}/%{name}/lib/MDB2
+
+
+%changelog
+* Mon Feb 25 2013 Gregor Tätzner <brummbq at fedoraproject.org> - 4.5.7-2
+- added script for re-creating stripped tarball
+- new httpd.conf for httpd 2.4
+
+* Sun Feb 24 2013 Gregor Tätzner <brummbq at fedoraproject.org> - 4.5.7-1
+- 4.5.7
+
+* Sun Jan 13 2013 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-7
+- fixed selinux file context on rhel
+
+* Sat Dec 08 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-6
+- unbundled phpass and php-when
+- added database setup instructions
+
+* Thu Nov 08 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-5
+- moved included sqlite3 driver to owncloud-sqlite
+- unbundled php-cloudfiles
+- reworked runtime requirements
+
+* Sun Nov 04 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-4
+- repacked source tarball (deleted jslint code)
+
+* Sat Nov 03 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-3
+- added missing licenses
+- obliterated jslint code from aceeditor
+
+* Fri Nov 02 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-2
+- updated license field
+- added README.fedora
+
+* Thu Oct 18 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.8-1
+- owncloud-4.0.8
+
+* Fri Oct 12 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.7-5
+- unbundle php-getid3
+- remove conf dir access check
+
+* Tue Oct 02 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.7-4
+- require rsyslog
+- switched log type back to 'owncloud'
+
+* Sun Sep 23 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.7-3
+- unbundled Archive/Tar.php, Guess.php, phpmailer
+- created virtual packages for supported databases
+- added logrotate script
+
+* Thu Sep 20 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.7-2
+- moved httpd files and sciptlets into own subpackage
+- redirected log output to /var/log/owncloud.log
+- deleted unecessary files
+
+* Wed Sep 19 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 4.0.7-1
+- updated to version 4.0.7
+
+* Fri Apr 06 2012 Felix Kaechele <heffer at fedoraproject.org> - 3.0.1-1
+- initial package
+
diff --git a/sources b/sources
index e69de29..6eab5ce 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+260dc71c39984703dea7060d8f4a876c  owncloud-4.5.7-repack.tar.bz2


More information about the scm-commits mailing list