Skip to content

Commit c2f7f9b

Browse files
committed
fix the build pipeline
1 parent 8ac9f43 commit c2f7f9b

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
FROM debian:buster AS build
22

3-
RUN apt update \
4-
&& apt install -y gcc-7 g++-7 libzmq3-dev cmake build-essential git
3+
RUN apt update && apt install -y libzmq3-dev cmake build-essential git
54

65
RUN mkdir src && mkdir src/build
76
COPY . src/
87
WORKDIR /src/build
9-
RUN cmake -D CMAKE_CXX_COMPILER=/usr/bin/g++-7 -D CMAKE_BUILD_TYPE=Release .. && make -j$(nproc)
8+
RUN cmake -D CMAKE_BUILD_TYPE=Release .. && make -j$(nproc)
109

1110
FROM debian:buster
1211

1312
COPY --from=build /src/build/ursadb /usr/bin/ursadb
1413
COPY --from=build /src/build/ursadb_new /usr/bin/ursadb_new
1514
COPY --from=build /src/build/ursadb_bench /usr/bin/ursadb_bench
1615
COPY --from=build /src/build/ursadb_test /usr/bin/ursadb_test
16+
COPY --from=build /src/build/ursadb_trim /usr/bin/ursadb_trim
1717
COPY --from=build /src/build/ursacli /usr/bin/ursacli
1818

1919
COPY entrypoint.sh /entrypoint.sh

extern/spdlog

Submodule spdlog updated 191 files

libursa/Daemon.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ Response dispatch_command_safe(const std::string &cmd_str, Task *task,
235235
} catch (const std::bad_alloc &e) {
236236
spdlog::error("Task {} failed: out of memory!", task->spec().id());
237237
return Response::error("out of memory");
238+
} catch (...) {
239+
spdlog::error("Task {} failed: unexpected fatal error.",
240+
task->spec().id());
241+
return Response::error("unexpected error");
238242
}
239243
}
240244

libursa/Database.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class Database {
4040

4141
const fs::path &get_name() const { return db_name; };
4242
const fs::path &get_base() const { return db_base; };
43-
const std::unordered_map<uint64_t, std::unique_ptr<TaskSpec>>
44-
&current_tasks() {
43+
const std::unordered_map<uint64_t, std::unique_ptr<TaskSpec>> &
44+
current_tasks() {
4545
return tasks;
4646
}
4747
void commit_task(const TaskSpec &spec,

libursa/QueryOptimizer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ Query simplify_minof(Query &&q, bool *changed) {
112112
return std::move(q);
113113
}
114114

115-
// Propagate 'everything' results through the query. For example,
116-
// if we know that C is everything, we immediately know OR(a, b, C)
117-
// OR(AND(), b, c) --> AND()
118-
// MIN 3 OF (AND(), b, c, d) --> MIN 2 OF (b, c, d)
115+
// Propagate 'everything' results through the query. For example, for every a
116+
// and b:
117+
//
118+
// * OR(a, b, everything) == everything
119+
// * MIN 3 OF (everything, b, c, d) --> MIN 2 OF (b, c, d)
119120
Query propagate_degenerate_queries(Query &&q, bool *changed) {
120121
if (q.get_type() == QueryType::MIN_OF) {
121122
std::vector<Query> newqueries;

0 commit comments

Comments
 (0)