rpms/akonadi/devel akonadi-1.1.1-startup-2.patch, NONE, 1.1 akonadi.spec, 1.27, 1.28 akonadi-1.1.1-startup-1.patch, 1.1, NONE
Rex Dieter
rdieter at fedoraproject.org
Wed Feb 25 14:03:03 UTC 2009
Author: rdieter
Update of /cvs/pkgs/rpms/akonadi/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9913
Modified Files:
akonadi.spec
Added Files:
akonadi-1.1.1-startup-2.patch
Removed Files:
akonadi-1.1.1-startup-1.patch
Log Message:
* Wed Feb 25 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.1-6
- rev startup patch
- BR: cmake >= 2.6.0
akonadi-1.1.1-startup-2.patch:
--- NEW FILE akonadi-1.1.1-startup-2.patch ---
--- branches/akonadi/1.1/server/src/akonadi.cpp 2009/01/03 16:17:31 905029
+++ branches/akonadi/1.1/server/src/akonadi.cpp 2009/02/25 10:55:29 931467
@@ -225,23 +225,30 @@
const QString actualConfig = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi" ) ) + QLatin1String("/mysql.conf");
if ( globalConfig.isEmpty() )
akFatal() << "Did not find MySQL server default configuration (mysql-global.conf)";
- QFile globalFile( globalConfig );
- QFile actualFile( actualConfig );
- if ( globalFile.open( QFile::ReadOnly ) && actualFile.open( QFile::WriteOnly ) ) {
- actualFile.write( globalFile.readAll() );
- if ( !localConfig.isEmpty() ) {
- QFile localFile( localConfig );
- if ( localFile.open( QFile::ReadOnly ) ) {
- actualFile.write( localFile.readAll() );
- localFile.close();
+ bool confUpdate = false;
+ QFile actualFile ( actualConfig );
+ // update conf only if either global (or local) is newer than actual
+ if ( (QFileInfo( globalConfig ).lastModified() > QFileInfo( actualFile ).lastModified()) ||
+ (QFileInfo( localConfig ).lastModified() > QFileInfo( actualFile ).lastModified()) )
+ {
+ QFile globalFile( globalConfig );
+ QFile localFile ( localConfig );
+ if ( globalFile.open( QFile::ReadOnly ) && actualFile.open( QFile::WriteOnly ) ) {
+ actualFile.write( globalFile.readAll() );
+ if ( !localConfig.isEmpty() ) {
+ if ( localFile.open( QFile::ReadOnly ) ) {
+ actualFile.write( localFile.readAll() );
+ localFile.close();
+ }
}
+ globalFile.close();
+ actualFile.close();
+ confUpdate = true;
+ } else {
+ akError() << "Unable to create MySQL server configuration file.";
+ akError() << "This means that either the default configuration file (mysql-global.conf) was not readable";
+ akFatal() << "or the target file (mysql.conf) could not be written.";
}
- actualFile.close();
- globalFile.close();
- } else {
- akError() << "Unable to create MySQL server configuration file.";
- akError() << "This means that either the default configuration file (mysql-global.conf) was not readable";
- akFatal() << "or the target file (mysql.conf) could not be written.";
}
// MySQL doesn't like world writeable config files (which makes sense), but
@@ -276,6 +283,12 @@
}
}
+ // clear mysql ib_logfile's in case innodb_log_file_size option changed in last confUpdate
+ if ( confUpdate ) {
+ QFile(dataDir + QDir::separator() + QString::fromLatin1( "ib_logfile0" )).remove();
+ QFile(dataDir + QDir::separator() + QString::fromLatin1( "ib_logfile1" )).remove();
+ }
+
// synthesize the mysqld command
QStringList arguments;
arguments << QString::fromLatin1( "--defaults-file=%1/mysql.conf" ).arg( akDir );
Index: akonadi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/akonadi/devel/akonadi.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- akonadi.spec 24 Feb 2009 18:37:08 -0000 1.27
+++ akonadi.spec 25 Feb 2009 14:02:33 -0000 1.28
@@ -1,7 +1,7 @@
Summary: PIM Storage Service
Name: akonadi
Version: 1.1.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: System Environment/Libraries
License: LGPLv2+
@@ -12,10 +12,11 @@
# shrink default initial db size a bit (approx 140mb->28mb)
Patch1: akonadi-1.1.1-mysql_conf.patch
-# upstream
-Patch100: akonadi-1.1.1-startup-1.patch
+## upstream
+# http://websvn.kde.org/branches/akonadi/1.1/server/src/akonadi.cpp?r1=905029&r2=931467&view=patch
+Patch100: akonadi-1.1.1-startup-2.patch
-BuildRequires: cmake
+BuildRequires: cmake >= 2.6.0
BuildRequires: qt4-devel >= 4.4
BuildRequires: automoc4
BuildRequires: mysql-devel
@@ -55,7 +56,7 @@
%setup -q
%patch1 -p1 -b .mysql_conf
-%patch100 -p1 -b .startup-1
+%patch100 -p3 -b .startup-2
%build
@@ -115,6 +116,10 @@
%changelog
+* Wed Feb 25 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.1-6
+- rev startup patch
+- BR: cmake >= 2.6.0
+
* Tue Feb 24 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.1-5
- own %%_sysconfig/akonadi/mysql-local.conf
- startup patch: reset conf only when needed, and clear mysql log file on update
--- akonadi-1.1.1-startup-1.patch DELETED ---
More information about the scm-commits
mailing list