about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-06 18:10:10 +0200
committerGitHub <noreply@github.com>2023-09-06 18:10:10 +0200
commit4c6e02a6836de29351e21323fda29071a4e35c70 (patch)
treec76f7454b8fd132b35460eff6281afda5a518f8b /pkgs/tools
parent07eab2ec1833721e7d5669c19ebe210aef670327 (diff)
parentce2f56356bbd8e4794c71c883fb5ae676d729586 (diff)
Merge pull request #253632 from bzizou/irods-4.3.0
irods: 4.2.11 -> 4.3.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/filesystems/irods/common.nix16
-rw-r--r--pkgs/tools/filesystems/irods/default.nix38
-rw-r--r--pkgs/tools/filesystems/irods/irods_root_path.patch49
-rw-r--r--pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch21
4 files changed, 19 insertions, 105 deletions
diff --git a/pkgs/tools/filesystems/irods/common.nix b/pkgs/tools/filesystems/irods/common.nix
index 0bc16aa7fc5db..27825fdcbeaca 100644
--- a/pkgs/tools/filesystems/irods/common.nix
+++ b/pkgs/tools/filesystems/irods/common.nix
@@ -1,13 +1,13 @@
 { lib, stdenv, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq, libarchive
-, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
-, nlohmann_json, spdlog }:
+, avro-cpp, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
+, nlohmann_json, spdlog, curl }:
 
 # Common attributes of irods packages
 
 {
   nativeBuildInputs = [ autoconf automake cmake help2man texinfo which gcc ];
-  buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost
-                  libcxx catch2 nanodbc fmt nlohmann_json spdlog ];
+  buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp zeromq openssl pam libiodbc libkrb5 boost
+                  libcxx catch2 nanodbc fmt nlohmann_json spdlog curl ];
 
   cmakeFlags = [
     "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
@@ -15,7 +15,6 @@
     "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}"
     "-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}"
     "-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}"
-    "-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}"
     "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}"
     "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}"
     "-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}"
@@ -31,13 +30,10 @@
 
   postPatch = ''
     patchShebangs ./packaging ./scripts
-    substituteInPlace CMakeLists.txt \
-      --replace "DESTINATION usr/bin" "DESTINATION bin" \
-      --replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" \
-      --replace "DESTINATION usr/lib/" "DESTINATION lib/" \
-      --replace "{IRODS_EXTERNALS_FULLPATH_JSON}/include" "{IRODS_EXTERNALS_FULLPATH_JSON}/include/nlohmann"
     export cmakeFlags="$cmakeFlags
       -DCMAKE_INSTALL_PREFIX=$out
+      -DIRODS_HOME_DIRECTORY=$out
+      -DCMAKE_INSTALL_SBINDIR=$out/sbin
     "
   '';
 
diff --git a/pkgs/tools/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix
index c11e416f71a94..0b25f45c910dc 100644
--- a/pkgs/tools/filesystems/irods/default.nix
+++ b/pkgs/tools/filesystems/irods/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq
-, libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
-, nanodbc_llvm, fmt, nlohmann_json, spdlog }:
+, libarchive, avro-cpp_llvm, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
+, nanodbc_llvm, fmt, nlohmann_json, spdlog, curl }:
 
 let
   avro-cpp = avro-cpp_llvm;
@@ -9,43 +9,33 @@ in
 let
   common = import ./common.nix {
     inherit lib stdenv bzip2 zlib autoconf automake cmake
-      help2man texinfo libtool cppzmq libarchive jansson
+      help2man texinfo libtool cppzmq libarchive
       zeromq openssl pam libiodbc libkrb5 gcc libcxx
       boost avro-cpp which catch2 nanodbc fmt nlohmann_json
-      spdlog;
+      spdlog curl;
   };
 in
 rec {
 
   # irods: libs and server package
-  irods = stdenv.mkDerivation (common // rec {
-    version = "4.2.11";
+  irods = stdenv.mkDerivation (finalAttrs: common // {
+    version = "4.3.0";
     pname = "irods";
 
     src = fetchFromGitHub {
       owner = "irods";
       repo = "irods";
-      rev = version;
-      sha256 = "0prcsiddk8n3h515jjapgfz1d6hjqywhrkcf6giqd7xc7b0slz44";
+      rev = finalAttrs.version;
+      sha256 = "sha256-rceDGFpfoFIByzDOtgNIo9JRoVd0syM21MjEKoZUQaE=";
       fetchSubmodules = true;
     };
 
-    # Patches:
-    # irods_root_path.patch : the root path is obtained by stripping 3 items of the path,
-    #                         but we don't use /usr with nix, so remove only 2 items.
-    patches = [ ./irods_root_path.patch ];
-
     # fix build with recent llvm versions
     env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";
 
     postPatch = common.postPatch + ''
       patchShebangs ./test
       substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
-      substituteInPlace cmake/server.cmake --replace "DESTINATION usr/sbin" "DESTINATION sbin"
-      substituteInPlace cmake/server.cmake --replace "IRODS_DOC_DIR usr/share" "IRODS_DOC_DIR share"
-      substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
-      substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
-      substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include"
       for file in unit_tests/cmake/test_config/*.cmake
       do
         substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2"
@@ -56,7 +46,7 @@ rec {
         -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
         "
 
-      substituteInPlace cmake/server.cmake --replace SETUID ""
+      substituteInPlace server/auth/CMakeLists.txt --replace SETUID ""
     '';
 
     meta = common.meta // {
@@ -66,19 +56,17 @@ rec {
 
 
   # icommands (CLI) package, depends on the irods package
-  irods-icommands = stdenv.mkDerivation (common // rec {
-    version = "4.2.11";
+  irods-icommands = stdenv.mkDerivation (finalAttrs: common // {
+    version = "4.3.0";
     pname = "irods-icommands";
 
     src = fetchFromGitHub {
       owner = "irods";
       repo = "irods_client_icommands";
-      rev = version;
-      sha256 = "0wgs585j2lp820py2pbizsk54xgz5id96fhxwwk9lqhbzxhfjhcg";
+      rev = finalAttrs.version;
+      sha256 = "sha256-90q1GPkoEUoiQXM6cA+DWwth7g8v93V471r9jm+l9aw=";
     };
 
-    patches = [ ./zmqcpp-deprecated-send_recv.patch ];
-
     buildInputs = common.buildInputs ++ [ irods ];
 
     postPatch = common.postPatch + ''
diff --git a/pkgs/tools/filesystems/irods/irods_root_path.patch b/pkgs/tools/filesystems/irods/irods_root_path.patch
deleted file mode 100644
index 58e618c663c0a..0000000000000
--- a/pkgs/tools/filesystems/irods/irods_root_path.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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:
diff --git a/pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch b/pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch
deleted file mode 100644
index 8c249dc4745bb..0000000000000
--- a/pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -r -u source/src/irods-grid.cpp source.new/src/irods-grid.cpp
---- source/src/irods-grid.cpp	1970-01-01 01:00:01.000000000 +0100
-+++ source.new/src/irods-grid.cpp	2020-05-05 16:34:35.566464346 +0200
-@@ -412,7 +412,7 @@
-             data_to_send.data(),
-             data_to_send.size() );
-         try {
--            if (!zmq_skt.send(req)) {
-+            if (!zmq_skt.send( req, zmq::send_flags::dontwait )) {
-                 std::cerr << "ZeroMQ encountered an error sending a message.\n";
-                 return errno;
-             }
-@@ -426,7 +426,7 @@
-         zmq::message_t rep;
-         // wait for the server reponse
-         try {
--            if (!zmq_skt.recv( &rep )) {
-+            if (!zmq_skt.recv( rep, zmq::recv_flags::dontwait )) {
-                 std::cerr << "ZeroMQ encountered an error receiving a message.\n";
-                 return errno;
-             }