about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch b/nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch
new file mode 100644
index 000000000000..16b6ba08cbb2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/irods/irods_root_path.patch
@@ -0,0 +1,71 @@
+diff -r -u irods-4.2.0.orig/lib/core/src/irods_default_paths.cpp irods-4.2.0/lib/core/src/irods_default_paths.cpp
+--- irods-4.2.0.orig/lib/core/src/irods_default_paths.cpp	2016-11-15 06:23:55.000000000 +0000
++++ irods-4.2.0/lib/core/src/irods_default_paths.cpp	2016-12-20 18:03:17.156883399 +0000
+@@ -18,7 +18,7 @@
+         try {
+             boost::filesystem::path path{dl_info.dli_fname};
+             path = boost::filesystem::canonical(path);
+-            path.remove_filename().remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install
++            path.remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install
+             return path;
+         } catch(const boost::filesystem::filesystem_error& e) {
+             THROW(-1, e.what());
+@@ -27,8 +27,7 @@
+ 
+     boost::filesystem::path
+     get_irods_config_directory() {
+-        boost::filesystem::path path{get_irods_root_directory()};
+-        path.append("etc").append("irods");
++        boost::filesystem::path path("/etc/irods");
+         return path;
+     }
+ 
+diff -r -u irods-4.2.0.orig/scripts/irods/paths.py irods-4.2.0/scripts/irods/paths.py
+--- irods-4.2.0.orig/scripts/irods/paths.py	2016-11-15 06:23:55.000000000 +0000
++++ irods-4.2.0/scripts/irods/paths.py	2016-12-21 15:17:07.437864606 +0000
+@@ -10,7 +10,7 @@
+     return os.path.join(root_directory(), 'var', 'lib', 'irods')
+ 
+ def config_directory():
+-    return os.path.join(root_directory(), 'etc', 'irods')
++    return os.path.join(os.path.abspath('/'), 'etc', 'irods')
+ 
+ def plugins_directory():
+     return os.path.join(root_directory(), 'usr', 'lib', 'irods', 'plugins')
+@@ -37,7 +37,7 @@
+ 
+ def version_path():
+     return os.path.join(
+-        irods_directory(),
++        home_directory(),
+         'VERSION.json')
+ 
+ def hosts_config_path():
+@@ -64,7 +64,7 @@
+ 
+ def log_directory():
+     return os.path.join(
+-        irods_directory(),
++        home_directory(),
+         'log')
+ 
+ def control_log_path():
+@@ -110,8 +110,7 @@
+ def server_bin_directory():
+     return os.path.join(
+         root_directory(),
+-        'usr',
+-        'sbin')
++        'bin')
+ 
+ def server_executable():
+     return os.path.join(
+@@ -132,7 +131,7 @@
+     return os.path.join(config_directory(), 'service_account.config')
+ 
+ def genosauth_path():
+-    return os.path.join(irods_directory(), 'clients', 'bin', 'genOSAuth')
++    return os.path.join(home_directory(), 'clients', 'bin', 'genOSAuth')
+ 
+ def irods_user_and_group_entries():
+     try: