nix: Bring NIX_REMOTE tcp patch up-to-date

This commit is contained in:
Tyson Whitehead
2021-01-20 19:20:23 -05:00
parent c6c75bb897
commit a2ed61d47b

View File

@@ -1,8 +1,8 @@
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 8f0b6555..b874e760 100644
index f34369d8f..a14191339 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -15,6 +15,7 @@
@@ -16,6 +16,7 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
@@ -10,7 +10,7 @@ index 8f0b6555..b874e760 100644
#include <cstring>
@@ -133,6 +134,76 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection()
@@ -134,6 +135,76 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection()
}
@@ -87,8 +87,8 @@ index 8f0b6555..b874e760 100644
void RemoteStore::initConnection(Connection & conn)
{
/* Send the magic greeting, check for the reply. */
@@ -734,14 +805,18 @@ void RemoteStore::Connection::processStderr(Sink * sink, Source * source)
}
@@ -804,14 +875,18 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source *
return nullptr;
}
-static std::string uriScheme = "unix://";
@@ -110,11 +110,11 @@ index 8f0b6555..b874e760 100644
}
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh
index 7f36e206..544b76eb 100644
index 1f375dd71..cfd0a7629 100644
--- a/src/libstore/remote-store.hh
+++ b/src/libstore/remote-store.hh
@@ -149,5 +149,23 @@ private:
std::experimental::optional<std::string> path;
@@ -157,5 +157,26 @@ private:
std::optional<std::string> path;
};
+class TCPRemoteStore : public LocalFSStore, public RemoteStore
@@ -125,6 +125,9 @@ index 7f36e206..544b76eb 100644
+
+ std::string getUri() override;
+
+ bool sameMachine()
+ { return false; }
+
+private:
+
+ struct Connection : RemoteStore::Connection