]> git.pld-linux.org Git - packages/eventum.git/commitdiff
setup attachments to /var/lib/eventum/storage (if enabled)
authorElan Ruusamäe <glen@delfi.ee>
Sun, 8 Oct 2017 12:48:57 +0000 (15:48 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 8 Oct 2017 16:06:22 +0000 (19:06 +0300)
eventum-paths.patch
eventum.spec

index 428ec5636b0e8ed5df4ffe9c3bc79e4f4d5a6240..6baaa0573264fec15e2e6e4b5000baea8aa7c4f2 100644 (file)
  
  if (!defined('SPHINX_LOG_PATH')) {
      define('SPHINX_LOG_PATH', '/var/log/sphinx/');
+--- eventum-3.3.0/src/Attachment/StorageManager.php~   2017-07-19 23:14:28.000000000 +0300
++++ eventum-3.3.0/src/Attachment/StorageManager.php    2017-10-08 15:47:26.170890911 +0300
+@@ -50,7 +50,7 @@
+         $mount_config = [
+             'pdo' => $this->getPdoAdapter(),
+             'legacy' => new Filesystem(new EventumLegacyAdapter()),
+-            'local' => new Filesystem(new Local(APP_PATH . '/var/storage/')),
++            'local' => new Filesystem(new Local('/var/lib/eventum/storage')),
+         ];
+         foreach ($setup['adapters'] as $adapter_name => $adapter_config) {
+--- eventum-3.3.0/contrib/migrate_storage_adapter.php~ 2017-10-05 04:42:47.000000000 +0300
++++ eventum-3.3.0/contrib/migrate_storage_adapter.php  2017-10-08 15:50:45.151352787 +0300
+@@ -124,7 +124,7 @@
+         if ($this->target_adapter === 'local') {
+             // try to set the timestamp on the filesystem to match what is stored in the database
+-            $fs_path = str_replace('local://', APP_PATH . '/var/storage/', $new_path);
++            $fs_path = str_replace('local://', '/var/lib/eventum/storage/', $new_path);
+             $created_date = strtotime($file['iat_created_date']);
+             touch($fs_path, $created_date);
+         }
index 2173174fb6ed75d11cff718ee5564379af940a9e..3321d0706718138467aca3bb48c61517132a7b54 100644 (file)
@@ -431,7 +431,7 @@ install -d \
        $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,logrotate.d,sysconfig} \
        $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
        $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
-       $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
+       $RPM_BUILD_ROOT/var/lib/%{name}/{routed_{emails,drafts,notes},storage} \
        $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 
 %{__make} install-eventum install-cli install-localization \
@@ -646,6 +646,8 @@ done
 %attr(770,root,http) %dir /var/lib/%{name}/routed_emails
 %attr(770,root,http) %dir /var/lib/%{name}/routed_drafts
 %attr(770,root,http) %dir /var/lib/%{name}/routed_notes
+# attachment storage
+%attr(770,root,http) %dir /var/lib/%{name}/storage
 
 %files setup
 %defattr(644,root,root,755)
This page took 0.097253 seconds and 4 git commands to generate.