87 : source(source), optional(optional)
90 typedef map<Path, ChrootPath> PathsInChroot;
91 PathsInChroot pathsInChroot;
93 typedef map<std::string, std::string> Environment;
97 typedef std::string SandboxProfile;
98 SandboxProfile additionalSandboxProfile;
105 typedef map<StorePath, StorePath> RedirectedOutputs;
106 RedirectedOutputs redirectedOutputs;
135 const static Path homeDir;
179 friend struct RestrictedStore;
200 const BasicDerivation &
drv,
207 virtual ~LocalDerivationGoal() noexcept(false) override;
217 kj::Promise<Result<WorkResult>>
tryLocalBuild() noexcept override;
254 int getChildStatus() override;
274 kj::Promise<Result<
void>>
checkOutputs(const std::map<std::
string, ValidPathInfo> & outputs, const std::map<std::
string, StorePath> & alreadyRegisteredOutputs);
285 void cleanupPreChildKill() override;
286 void cleanupPostChildKill() override;
287 bool cleanupDecideWhetherDiskFull() override;
288 void cleanupPostOutputsRegisteredModeCheck() override;
289 void cleanupPostOutputsRegisteredModeNonCheck() override;
294 void deleteTmpDir(
bool force,
bool duringDestruction = false);
326 using DerivationGoal::DerivationGoal;
334 throw Error(
"sandboxing builds is not supported on this platform");
353 virtual void execBuilder(std::string builder, Strings args, Strings envStrs);
363 virtual bool respectsTimeouts()
override
Definition file-descriptor.hh:42
Definition local-store.hh:78
Definition processes.hh:24
Definition file-descriptor.hh:61
Definition derivation-goal.hh:73
std::unique_ptr< Derivation > drv
Definition derivation-goal.hh:166
OutputsSpec wantedOutputs
Definition derivation-goal.hh:98
StorePathSet inputPaths
Definition derivation-goal.hh:183
StorePath drvPath
Definition derivation-goal.hh:88
Definition realisation.hh:24
const bool isDependency
Definition goal.hh:61
Worker & worker
Definition goal.hh:54
Definition local-derivation-goal.hh:83
Definition local-derivation-goal.hh:11
kj::Promise< Result< void > > writeStructuredAttrs()
Definition local-derivation-goal.cc:950
void chownToBuilder(const Path &path)
Definition local-derivation-goal.cc:1455
std::set< DrvOutput > addedDrvOutputs
Definition local-derivation-goal.hh:160
std::thread daemonThread
Definition local-derivation-goal.hh:145
bool usingUserNamespace
Definition local-derivation-goal.hh:61
virtual Pid startChild(std::function< void()> openSlave)
Definition local-derivation-goal.cc:835
void closeReadPipes() override
Definition local-derivation-goal.cc:308
std::vector< std::thread > daemonWorkerThreads
Definition local-derivation-goal.hh:150
void signRealisation(Realisation &) override
Definition local-derivation-goal.cc:2548
bool privateNetwork
Definition local-derivation-goal.hh:78
void cleanupHookFinally() override
Definition local-derivation-goal.cc:319
bool useChroot
Definition local-derivation-goal.hh:66
kj::Promise< Result< SingleDrvOutputs > > registerOutputs() override
Definition local-derivation-goal.cc:1977
std::map< Path, ValidPathInfo > prevInfos
Definition local-derivation-goal.hh:130
AutoCloseFD daemonSocket
Definition local-derivation-goal.hh:140
kj::Promise< Result< WorkResult > > tryLocalBuild() noexcept override
Definition local-derivation-goal.cc:158
void initTmpDir()
Definition local-derivation-goal.cc:843
virtual bool needsHashRewrite()
Definition local-derivation-goal.cc:115
std::optional< Path > cgroup
Definition local-derivation-goal.hh:27
std::shared_ptr< AutoDelete > autoDelChroot
Definition local-derivation-goal.hh:73
void deleteTmpDir(bool force, bool duringDestruction=false)
Definition local-derivation-goal.cc:2771
void addDependency(const StorePath &path)
Definition local-derivation-goal.cc:1403
Path tmpDir
Definition local-derivation-goal.hh:32
virtual void execBuilder(std::string builder, Strings args, Strings envStrs)
Definition local-derivation-goal.cc:1971
AutoCloseFD builderOutPTY
Definition local-derivation-goal.hh:43
static std::unique_ptr< LocalDerivationGoal > makeLocalDerivationGoal(const StorePath &drvPath, const OutputsSpec &wantedOutputs, Worker &worker, bool isDependency, BuildMode buildMode)
Definition platform.cc:28
virtual void setupSyscallFilter()
Definition local-derivation-goal.hh:347
AutoCloseFD sandboxMountNamespace
Definition local-derivation-goal.hh:54
OutputPathMap scratchOutputs
Definition local-derivation-goal.hh:122
Pipe userNamespaceSync
Definition local-derivation-goal.hh:48
void killChild() override final
Definition local-derivation-goal.cc:129
void runChild()
Definition local-derivation-goal.cc:1463
kj::Promise< Result< void > > checkOutputs(const std::map< std::string, ValidPathInfo > &outputs, const std::map< std::string, StorePath > &alreadyRegisteredOutputs)
Definition local-derivation-goal.cc:2554
virtual void prepareSandbox()
Definition local-derivation-goal.hh:332
std::unique_ptr< UserLock > buildUser
Definition local-derivation-goal.hh:17
StorePath makeFallbackPath(const StorePath &path)
Definition local-derivation-goal.cc:2797
kj::Promise< Result< void > > startBuilder()
Definition local-derivation-goal.cc:407
virtual bool supportsUidRange()
Definition local-derivation-goal.hh:358
Pid pid
Definition local-derivation-goal.hh:22
void initEnv()
Definition local-derivation-goal.cc:892
bool isAllowed(const StorePath &path)
Definition local-derivation-goal.hh:168
StringMap inputRewrites
Definition local-derivation-goal.hh:104
Path tmpDirInSandbox
Definition local-derivation-goal.hh:37
virtual void killSandbox(bool getStats)
Definition local-derivation-goal.cc:148
StorePathSet addedPaths
Definition local-derivation-goal.hh:155
std::string Path
Definition types.hh:28