Skip to content

Commit

Permalink
Fix compilation for all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Feb 10, 2022
1 parent 18464ec commit ee1da87
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker-compose.override.yml
tmp/
proxmox-backup-client*.tgz
deb/
/.env.mk
/release/
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
40 changes: 12 additions & 28 deletions versions/v2.1.5/server/proxmox-mini-journalreader.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
From ec5a9825066665ae18d939ad906013f2502f463c Mon Sep 17 00:00:00 2001
From: Kamil Trzcinski <[email protected]>
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})

0 comments on commit ee1da87

Please sign in to comment.