From ee1da87403dab48ca264a8a4ddc9897add1a0fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Thu, 10 Feb 2022 11:20:13 +0100 Subject: [PATCH] Fix compilation for all cases --- .gitignore | 2 +- Dockerfile | 1 + Makefile | 2 +- .../server/proxmox-mini-journalreader.patch | 40 ++++++------------- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 1f05f9a..0d689a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ docker-compose.override.yml tmp/ proxmox-backup-client*.tgz -deb/ /.env.mk +/release/ diff --git a/Dockerfile b/Dockerfile index a820307..a1bdeea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,7 @@ RUN apt-get -y build-dep $PWD/proxmox-acme RUN . /root/.cargo/env && cd proxmox-backup/ && dpkg-buildpackage -us -uc -b RUN cd extjs/ && make deb && mv *.deb ../ RUN cd proxmox-i18n/ && make deb && mv *.deb ../ +RUN ln -sf /bin/true /usr/share/cargo/bin/dh-cargo-built-using # license is fine (but due to how we compile it, help dpkg for xtermjs) RUN cd pve-xtermjs/ && dpkg-buildpackage -us -uc -b RUN cd proxmox-mini-journalreader/ && make deb && mv *.deb ../ RUN cd libjs-qrcodejs/ && make deb && mv *.deb ../ diff --git a/Makefile b/Makefile index cbc9edc..cbe2c7d 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ dev-shell: dev-build mkdir -p release/$(TAG) -docker rm -f proxmox-backup-$(TAG)-$* docker create --name=proxmox-backup-$(TAG)-$* $(REGISTRY):$(TAG)-$* - docker cp proxmox-backup-$(TAG)-$*:/src/ release/$(TAG) + docker cp proxmox-backup-$(TAG)-$*:/src/. release/$(TAG)/$* -docker rm -f proxmox-backup-$(TAG)-$* all-deb: $(addsuffix -deb, $(BUILD_ARCHS)) diff --git a/versions/v2.1.5/server/proxmox-mini-journalreader.patch b/versions/v2.1.5/server/proxmox-mini-journalreader.patch index 31b46ea..118f67d 100644 --- a/versions/v2.1.5/server/proxmox-mini-journalreader.patch +++ b/versions/v2.1.5/server/proxmox-mini-journalreader.patch @@ -1,29 +1,13 @@ -From ec5a9825066665ae18d939ad906013f2502f463c Mon Sep 17 00:00:00 2001 -From: Kamil Trzcinski -Date: Mon, 7 Dec 2020 16:54:10 +0000 -Subject: [PATCH] Fix getopt usage - ---- - src/mini-journalreader.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/mini-journalreader.c b/src/mini-journalreader.c -index 92176ac..f92d30c 100644 ---- a/src/mini-journalreader.c -+++ b/src/mini-journalreader.c -@@ -213,11 +213,11 @@ int main(int argc, char *argv[]) { - const char *endcursor = NULL; - uint64_t begin = 0; - uint64_t end = 0; -- char c; -+ int c; +diff --git a/src/Makefile b/src/Makefile +index ea8af24..d7f1351 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -2,7 +2,7 @@ PROGRAM=mini-journalreader + SOURCES=mini-journalreader.c - progname = argv[0]; - -- while ((c = (char)getopt (argc, argv, "b:e:d:n:f:t:jh")) != -1) { -+ while ((c = getopt (argc, argv, "b:e:d:n:f:t:jh")) != -1) { - switch (c) { - case 'b': - begin = arg_to_uint64(optarg); --- -2.20.1 + LIBS := libsystemd +-CFLAGS += -Werror -Wall -Wextra -Wl,-z,relro -g -O2 ++CFLAGS += -Wall -Wextra -Wl,-z,relro -g -O2 + CFLAGS += -fstack-protector-strong -D_FORTIFY_SOURCE=2 + CFLAGS += $(shell pkg-config --cflags ${LIBS}) + LFLAGS += $(shell pkg-config --libs ${LIBS})