diff options
| -rw-r--r-- | 01_fix_template_location.patch | 12 | ||||
| -rw-r--r-- | 02_fix_class_mapping.patch | 50 | ||||
| -rw-r--r-- | 03_fix_locale_location.patch | 41 | ||||
| -rw-r--r-- | 04_fix_online_help_location.patch | 24 | ||||
| -rw-r--r-- | gosa.spec | 218 | 
5 files changed, 214 insertions, 131 deletions
diff --git a/01_fix_template_location.patch b/01_fix_template_location.patch new file mode 100644 index 0000000..274cf32 --- /dev/null +++ b/01_fix_template_location.patch @@ -0,0 +1,12 @@ +diff -urNad gosa-core~/include/functions.inc gosa-core/include/functions.inc +--- gosa-core~/include/functions.inc    2008-05-30 10:39:33.000000000 +0200 ++++ gosa-core/include/functions.inc     2008-06-03 09:16:19.000000000 +0200 +@@ -40,7 +40,7 @@ + } + + /* Define common locatitions */ +-define ("CONFIG_TEMPLATE_DIR", "../contrib"); ++define ("CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa"); + define ("TEMP_DIR","/var/cache/gosa/tmp"); + + /* Define get_list flags */ diff --git a/02_fix_class_mapping.patch b/02_fix_class_mapping.patch new file mode 100644 index 0000000..95b8ea8 --- /dev/null +++ b/02_fix_class_mapping.patch @@ -0,0 +1,50 @@ +--- gosa-core~/include/functions.inc	2009-02-16 14:19:18.000000000 +0100 ++++ gosa-core/include/functions.inc	2009-02-16 14:18:15.000000000 +0100 +@@ -73,7 +73,7 @@ + $svn_revision = '$Revision: 13395 $'; +  + /* Include required files */ +-require_once("class_location.inc"); ++require_once("/var/cache/gosa/class.cache"); + require_once ("functions_debug.inc"); + require_once ("accept-to-gettext.inc"); +  +--- gosa-core~/update-gosa	2009-02-16 14:19:18.000000000 +0100 ++++ gosa-core/update-gosa	2009-02-16 14:18:15.000000000 +0100 +@@ -21,7 +21,7 @@ +  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +  */ +  +-define ("GOSA_HOME", dirname(__FILE__)); ++define ("GOSA_HOME", "/usr/share/gosa"); + define ("LOCALE_DIR", GOSA_HOME."/locale"); + define ("PLUGSTATE_DIR", GOSA_HOME."/state"); +  +@@ -122,8 +122,8 @@ + function rescan_classes() + { + 	echo "Updating class cache...\n"; +-	$class_mapping= get_classes(); +-	$filename= GOSA_HOME."/include/class_location.inc"; ++	$class_mapping= get_classes("/usr/share/gosa"); ++	$filename= "/var/cache/gosa/class.cache"; +  + 	/* Sanity checks */ + 	if (!file_exists($filename) || is_writable($filename)) { +--- gosa-core~/include/class_config.inc	2009-02-16 14:19:18.000000000 +0100 ++++ gosa-core/include/class_config.inc	2009-02-16 14:18:15.000000000 +0100 +@@ -76,12 +76,12 @@ +         if we have installed or removed plugins.  +      */ +     if(session::global_is_set("class_location.inc:timestamp")){ +-      $tmp = stat("../include/class_location.inc"); ++      $tmp = $tmp = stat("/var/cache/gosa/class.cache"); +       if($tmp['mtime'] != session::global_get("class_location.inc:timestamp")){ +         session::global_un_set("plist"); +       } +     } +-    $tmp = stat("../include/class_location.inc"); ++    $tmp = stat("/var/cache/gosa/class.cache"); +     session::global_set("class_location.inc:timestamp",$tmp['mtime']); +  +     if($this->filename != "" && filemtime($this->filename) != $this->last_modified){ diff --git a/03_fix_locale_location.patch b/03_fix_locale_location.patch new file mode 100644 index 0000000..148a9d0 --- /dev/null +++ b/03_fix_locale_location.patch @@ -0,0 +1,41 @@ +diff -urNad gosa-2.6.0+svn11288~/include/php_setup.inc gosa-2.6.0+svn11288/include/php_setup.inc +--- gosa-2.6.0+svn11288~/include/php_setup.inc	2008-06-11 15:55:59.000000000 +0200 ++++ gosa-2.6.0+svn11288/include/php_setup.inc	2008-06-11 15:56:00.000000000 +0200 +@@ -20,7 +20,7 @@ +  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +  */ +  +-define ("LOCALE_DIR", dirname(dirname(__FILE__))."/locale/compiled"); ++define ("LOCALE_DIR", "/var/cache/gosa/locale"); +  + function gosaRaiseError($errno, $errstr, $errfile, $errline) + { +diff -urNad gosa-2.6.0+svn11288~/update-gosa gosa-2.6.0+svn11288/update-gosa +--- gosa-2.6.0+svn11288~/update-gosa	2008-06-11 15:55:59.000000000 +0200 ++++ gosa-2.6.0+svn11288/update-gosa	2008-06-11 16:02:30.000000000 +0200 +@@ -169,20 +169,20 @@ +  + 	/* For each language, merge the target .mo to the compiled directory. */ + 	foreach ($languages as $language => $po_files){ +-		if (!is_dir(LOCALE_DIR."/compiled/${language}/LC_MESSAGES")){ +-			if (!mkdir (LOCALE_DIR."/compiled/${language}/LC_MESSAGES", 0755, TRUE)){ +-				echo "Failed to create '".LOCALE_DIR."/compiled/${language}/LC_MESSAGES'- aborted"; ++		if (!is_dir("/var/cache/gosa/locale/${language}/LC_MESSAGES")){ ++			if (!mkdir ("/var/cache/gosa/locale/${language}/LC_MESSAGES", 0755, TRUE)){ ++				echo "Failed to create '/var/cache/gosa/locale/${language}/LC_MESSAGES'- aborted"; + 				exit (3); + 			} + 		} +  + 		/* Cat all these po files into one single file */ +-		system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > compiled/${language}/LC_MESSAGES/messages.po)", $val); ++		system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > /var/cache/gosa/locale/${language}/LC_MESSAGES/messages.po)", $val); + 		if ($val != 0){ + 			echo "Merging of message files failed - aborted"; + 			exit (4); + 		} +-		system ("(cd ".LOCALE_DIR."/compiled/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val); ++		system ("(cd /var/cache/gosa/locale/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val); + 		if ($val != 0){ + 			echo "Compiling of message files failed - aborted"; + 			exit (5); diff --git a/04_fix_online_help_location.patch b/04_fix_online_help_location.patch new file mode 100644 index 0000000..85f8ff6 --- /dev/null +++ b/04_fix_online_help_location.patch @@ -0,0 +1,24 @@ +diff -urNad gosa-core~/html/helpviewer.php gosa-core/html/helpviewer.php +--- gosa-core~/html/helpviewer.php	2008-04-12 19:58:14.000000000 +0200 ++++ gosa-core/html/helpviewer.php	2008-04-14 17:25:10.000000000 +0200 +@@ -110,7 +110,7 @@ + if(session::is_set('current_class_for_help')){ +  +   /* Create new XML parser with the path to the Xml file */ +-  $xml = new parseXml("../doc/guide.xml"); ++  $xml = new parseXml("/etc/gosa/guide.xml"); +    +   /* Generate help array */ +   $str = $xml->parse(); +diff -urNad gosa-core~/update-gosa gosa-core/update-gosa +--- gosa-core~/update-gosa	2008-04-14 14:59:22.000000000 +0200 ++++ gosa-core/update-gosa	2008-04-14 17:24:53.000000000 +0200 +@@ -193,7 +193,7 @@ +  + function rescan_guide() + { +-	$master_guide= "doc/guide.xml"; ++	$master_guide= "/etc/gosa/guide.xml"; + 	echo "Updating Online Help Index...\n"; + 	$master_guide_content="<?xml version=\"1.0\"?>\n". + 		"<!--\n". @@ -1,54 +1,29 @@ -# Some sort of "detection" of suse -%{?suse_version:%define suse 1} -%{!?suse_version:%define suse 0} - -# Define Packagename, e.g.: -# rpmbuild --rebuild --define 'sourcename gosa' gosa.srpm -%{!?sourcename:%define sourcename %{name}-%{version}} - -# -# Distribution -# -Summary: 		Web Based LDAP Administration Program  -Name:			gosa -Version: 		2.6.10 -Release:		1 -License: 		GPL -Source: 		ftp://oss.GONICUS.de/pub/gosa/%{sourcename}.tar.bz2 -URL: 			https://oss.GONICUS.de/labs/gosa/ -Group: 			System/Administration -Vendor:			GONICUS GmbH -Packager:		Stefan Japes <japes@GONICUS.de> -Buildarch: 		noarch -Patch:			01_fix_template_location.patch -Patch1:			02_fix_class_mapping.patch -Patch2:			03_fix_locale_location.patch -Patch3:			04_fix_online_help_location.patch -%if %{suse} -Requires:		apache2,apache2-mod_php5,php5,php5-gd,php5-ldap,php5-mcrypt,php5-mysql,php5-imap,php5-iconv,php5-hash,php5-posix,php5-mbstring,php5-gettext,ImageMagick,gettext-tools -%else -Requires: 		httpd,php,php-ldap,php-imap,php-snmp,php-mysql,php-mbstring,ImageMagick,perl-Crypt-SmbHash -%endif -BuildRoot: 		%{_tmppath}/%{name}-%{version}-root -BuildArch:		noarch +%global confdir  /etc/%{name} +%global apacheuser apache  +%global apachegroup apache  +%global webconf /etc/httpd/conf.d/  +%global docdir /usr/share/doc/gosa-%{version} -######################## +Summary:   Web Based LDAP Administration Program  +Name:      gosa +Version:   2.6.10 +Release:   1 +License:   GPL + +URL:       https://oss.GONICUS.de/labs/gosa/ +Source0:   http://oss.gonicus.de/pub/gosa/%{name}-combined-%{version}.tar.bz2 +Group:     System/Administration + +Patch0:    01_fix_template_location.patch +Patch1:    02_fix_class_mapping.patch +Patch2:    03_fix_locale_location.patch +Patch3:    04_fix_online_help_location.patch -%define confdir 	/etc/%{name} - -%if %{suse} -	%{echo:Building SuSE rpm} -	%define apacheuser wwwrun -	%define apachegroup root -	%define webconf	/etc/apache2/conf.d/ -	%define docdir /usr/share/doc/packages/gosa -%else -	%{echo:Building other rpm} -	%define apacheuser apache  -	%define apachegroup apache  -	%define webconf	/etc/httpd/conf.d/	 -	%define docdir /usr/share/doc/gosa-%{version} -%endif +Buildarch: noarch +Requires:  httpd,php,php-ldap,php-imap,php-snmp,php-mysql,php-mbstring,ImageMagick,perl-Crypt-SmbHash +Obsoletes: gosa-ldap + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)  %description  GOsa is a combination of system-administrator and end-user web @@ -57,113 +32,88 @@ Provided is access to posix, shadow, samba, proxy, fax, and kerberos  accounts. It is able to manage the postfix/cyrus server combination  and can write user adapted sieve scripts. -########################  %package dev -Group:                  System/Administration -Summary:                GOsa development utiles -%if %{suse} -Requires:               lyx -%else -Requires:               php-cli,latex2html,lyx -%endif -Obsoletes:              gosa-ldap +Summary:   GOsa development utiles +Group:     System/Administration +Requires:  php-cli,latex2html,lyx  %description dev  This package contains a couple of tools to generate  online help, extract localisations and aid developing. -########################  %package desktop -Group:                  System/Administration -Summary:                Desktop integration for GOsa -%if %{suse} -Requires:               firefox -%else -Requires:               firefox -%endif -Obsoletes:              gosa-ldap +Summary:   Desktop integration for GOsa +Group:     System/Administration +Requires:  firefox  %description desktop  This package includes a menu definition for your  desktop environment. -########################  %package schema -Group: 			System/Administration -Summary: 		Schema Definitions for the GOSA package -%if %{suse} -Requires:		gosa >= %{version} -%else -Requires:		gosa >= %{version} -%endif -Obsoletes:		gosa-ldap +Summary:   Schema Definitions for the GOSA package +Group:     System/Administration +Requires:  gosa = %{version}-%{release}  %description schema  Contains the Schema definition files for the GOSA admin package. -########################  %package help-en -Group: 			System/Administration -Summary: 		English online manual for GOSA package -Requires:		gosa >= %{version} +Summary:   English online manual for GOSA package +Group:     System/Administration +Requires:  gosa = %{version}-%{release}  %description help-en  English online manual page for GOSA package -########################  %package help-de -Group: 			System/Administration -Summary: 		German localized online manual for GOSA package -Requires:		gosa >= %{version} +Summary:   German localized online manual for GOSA package +Group:     System/Administration +Requires:  gosa = %{version}-%{release}  %description help-de  German localized online manual page for GOSA package -########################  %package help-fr -Group: 			System/Administration -Summary: 		French localized online manual for GOSA package -Requires:		gosa >= %{version} +Summary:   French localized online manual for GOSA package +Group:     System/Administration +Requires:  gosa = %{version}-%{release}  %description help-fr  French localized online manual page for GOSA package -########################  %package help-nl -Group: 			System/Administration -Summary: 		Dutch localized online manual for GOSA package -Requires:		gosa >= %{version} +Summary:   Dutch localized online manual for GOSA package +Group:    System/Administration +Requires:  gosa = %{version}-%{release}  %description help-nl  Dutch localized online manual page for GOSA package -########################  %package help-es -Group: 			System/Administration -Summary: 		Spain localized online manual for GOSA package -Requires:		gosa >= %{version} +Summary:   Spain localized online manual for GOSA package +Group:    System/Administration +Requires:  gosa = %{version}-%{release}  %description help-es  Spain localized online manual page for GOSA package -########################  %prep -%setup -q -n %{sourcename} -%patch -p1 +%setup -q -n %{name}-combined-%{version} +%patch0 -p1  %patch1 -p1  %patch2 -p1  %patch3 -p1 -find . -depth -name CVS -type d | xargs rm -rf  ######################## @@ -195,13 +145,13 @@ mkdir -p %{buildroot}/usr/share/doc/gosa  mkdir -p %{buildroot}%{webconf}  touch %{buildroot}/etc/gosa/gosa.secrets -mv contrib/gosa.conf		%{buildroot}/usr/share/doc/gosa -mv update-gosa 			%{buildroot}/usr/sbin -mv bin/gosa-encrypt-passwords 	%{buildroot}/usr/sbin -mv debian/gosa-apache.conf 	%{buildroot}%{webconf} -mv contrib/shells 		%{buildroot}/etc/gosa -mv contrib/encodings 		%{buildroot}/etc/gosa -mv contrib/openldap/slapd.conf 	%{buildroot}/usr/share/doc/gosa/slapd.conf-example +mv contrib/gosa.conf  %{buildroot}/usr/share/doc/gosa +mv update-gosa    %{buildroot}/usr/sbin +mv bin/gosa-encrypt-passwords  %{buildroot}/usr/sbin +mv debian/gosa-apache.conf  %{buildroot}%{webconf} +mv contrib/shells   %{buildroot}/etc/gosa +mv contrib/encodings   %{buildroot}/etc/gosa +mv contrib/openldap/slapd.conf  %{buildroot}/usr/share/doc/gosa/slapd.conf-example  mv -f doc manual  # Cleanup manual dirs @@ -245,38 +195,38 @@ mkdir -p %{buildroot}/usr/share/applications  mkdir -p %{buildroot}/usr/share/man/man1/  mkdir -p %{buildroot}/usr/share/man/man5/ -mv contrib/desktoprc 		%{buildroot}/etc/gosa -mv contrib/gosa 		%{buildroot}/usr/bin -mv debian/gosa.xpm 		%{buildroot}/usr/share/pixmaps -mv debian/gosa-16.xpm 		%{buildroot}/usr/share/pixmaps -mv debian/gosa-desktop.desktop 	%{buildroot}/usr/share/applications +mv contrib/desktoprc   %{buildroot}/etc/gosa +mv contrib/gosa   %{buildroot}/usr/bin +mv debian/gosa.xpm   %{buildroot}/usr/share/pixmaps +mv debian/gosa-16.xpm   %{buildroot}/usr/share/pixmaps +mv debian/gosa-desktop.desktop  %{buildroot}/usr/share/applications  # Gzip manpages from source  for x in update-gosa.1 dh-make-gosa.1 update-locale.1 update-online-help.1 update-pdf-help.1 gosa-encrypt-passwords.1  do -	gzip $x + gzip $x  done -%if %{suse} -	sed -i 's#/usr/bin/php#/usr/bin/php5#' %{buildroot}/usr/sbin/update-gosa -	sed -i 's#/usr/bin/php#/usr/bin/php5#' %{buildroot}/usr/sbin/gosa-encrypt-passwords -	cat <<-EOF >> %{buildroot}%{webconf}/gosa-apache.conf -	 -	<Directory /usr/share/gosa/html> -	    Options None -	    AllowOverride None -	    Order deny,allow -	    Allow from all -	</Directory> -	EOF -%endif +#if %{suse} + sed -i 's#/usr/bin/php#/usr/bin/php5#' %{buildroot}/usr/sbin/update-gosa + sed -i 's#/usr/bin/php#/usr/bin/php5#' %{buildroot}/usr/sbin/gosa-encrypt-passwords + cat <<-EOF >> %{buildroot}%{webconf}/gosa-apache.conf +  + <Directory /usr/share/gosa/html> +     Options None +     AllowOverride None +     Order deny,allow +     Allow from all + </Directory> + EOF +#endif  # Copy manpages -mv ./*.1.gz 			%{buildroot}/usr/share/man/man1/ +mv ./*.1.gz    %{buildroot}/usr/share/man/man1/  gzip -c contrib/gosa.1 > contrib/gosa.1.gz -mv contrib/gosa.1.gz 		%{buildroot}/usr/share/man/man1/ +mv contrib/gosa.1.gz   %{buildroot}/usr/share/man/man1/  gzip -c contrib/gosa.conf.5 > contrib/gosa.conf.5.gz -mv contrib/gosa.conf.5.gz 		%{buildroot}/usr/share/man/man5/ +mv contrib/gosa.conf.5.gz   %{buildroot}/usr/share/man/man5/  mkdir -p %{buildroot}/usr/share/doc/gosa-%{version}  rm -rf %{buildroot}/usr/share/gosa/contrib @@ -392,8 +342,14 @@ rm -rf %{buildroot}  ########################  %changelog -* Fri Nov 17 2008 Stefan Japes <japes@GONICUS.de> -- First build of GOsa 2.6 as an RPM, should work on SuSE and RedHat +* Sat May 23 2010 Remi Collet <Fedora@FamilleCollet.com> - 2.6.10-1 +- work on fedora spec +  * Thu May 14 2010 Olivier BONHOMME <obonhomme@nerim.net>  - Corrected errors when building RPM and plugins where not on right    place Closes #957 and #970 + +* Fri Nov 17 2008 Stefan Japes <japes@GONICUS.de> +- First build of GOsa 2.6 as an RPM, should work on SuSE and RedHat + +  | 
