Don't clutter /tmp with logs. --- EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp index 56c655dc..2750f5a6 100644 --- a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp +++ b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp @@ -1013,14 +1013,8 @@ void Logger::OpenLogfile(std::string filename) file_.open(filename.c_str()); if (file_.fail()) { - const char* filename_tmp = std::tmpnam(NULL); - printf("Cannot open log file: %s in working directory. Trying system tmp-file: %s\n", - SE_Env::Inst().GetLogFilePath().c_str(), filename_tmp); - file_.open(filename_tmp); - if (file_.fail()) - { - printf("Also failed to open log file: %s. Continue without logfile, still logging to console.\n", filename_tmp); - } + printf("Cannot open log file: %s in working directory. Continuing without logfile, still logging to console.\n", + filename.c_str()); } } #endif -- 2.38.1 11066816107425d1fd6dc7d'>refslogtreecommitdiff
path: root/tests/publish.scm
AgeCommit message (Expand)Author
2022-04-29publish: Send uncached narinfo replies from the main thread....Fixes <https://issues.guix.gnu.org/54723>. Reported by Guillaume Le Vaillant <glv@posteo.net>. Regression introduced in f743f2046be2c5a338ab871ae8666d8f6de7440b. With commit f743f2046be2c5a338ab871ae8666d8f6de7440b, responses to pipelined GETs would end up being written concurrently by many threads. Thus the body of those responses could be interleaved and garbled. * guix/scripts/publish.scm: Revert f743f2046be2c5a338ab871ae8666d8f6de7440b. * tests/publish.scm ("/*.narinfo pipeline"): New test. Ludovic Courtès
2022-02-14publish: Do not sign the URL/Compression/FileSize narinfo fields....This will allow mirror operators to alter these non-normative bits of a narinfo without having to resign narinfos. * guix/scripts/publish.scm (narinfo-string): Remove URL/Compression/FileSize from BASE-INFO. Move them after "Signature". * tests/publish.scm ("/*.narinfo") ("/*.narinfo with properly encoded '+' sign") ("/*.narinfo with lzip + gzip") ("with cache, lzip + gzip"): Adjust accordingly. * tests/substitute.scm ("query narinfo with signature over relevant subset"): New test. Ludovic Courtès
2022-01-19tests: Adjust to gzip as the default log compression....This is a followup to 575e52ac2b090fd194086e9c1c53bbf8055acbc2. * tests/publish.scm ("/log/NAME"): Expect a gzip-encoded log. Ludovic Courtès
2021-05-16publish: Add '--negative-ttl'....* guix/scripts/publish.scm (show-help, %options): Add '--negative-ttl'. (render-narinfo, render-narinfo/cached, make-request-handler): Add #:negative-ttl and honor it. (run-publish-server): Add #:narinfo-negative-ttl and honor it. (guix-publish): Honor '--negative-ttl'. * tests/publish.scm ("negative TTL", "no negative TTL"): New tests. Ludovic Courtès
2021-03-31tests: Make 'publish' test umask-insensitive....Fixes <https://bugs.gnu.org/47239>. Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * tests/publish.scm ("with cache"): Pass the result of 'stat:perms' to 'logand' to be umask-insensitive. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Cees de Groot
2021-01-13publish: Add support for zstd compression....* guix/scripts/publish.scm (compress-nar)[write-compressed-file]: New procedure. Use it for 'gzip' and 'lzip'. Add 'zstd. (nar-response-port, string->compression-type): Add case for 'zstd'. * tests/publish.scm (zstd-supported?): New procedure. ("/nar/zstd/*"): New test. * doc/guix.texi (Invoking guix publish): Document zstd compression. (Base Services): Add cross-reference to the above node. Ludovic Courtès