mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
fix tss compilation with patches
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
4165491275
commit
4e384a86a4
@ -15,6 +15,7 @@ RUN apk add --no-cache --initdb \
|
|||||||
linux-headers \
|
linux-headers \
|
||||||
gcc \
|
gcc \
|
||||||
make \
|
make \
|
||||||
|
patch \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
util-linux \
|
util-linux \
|
||||||
&& true
|
&& true
|
||||||
@ -24,11 +25,14 @@ COPY src/glibc_stubs/ /usr/src/glibc_stubs
|
|||||||
WORKDIR /usr/src/glibc_stubs
|
WORKDIR /usr/src/glibc_stubs
|
||||||
RUN make && make install
|
RUN make && make install
|
||||||
|
|
||||||
|
COPY src/patch/ /usr/src/patch
|
||||||
|
|
||||||
RUN git clone https://git.code.sf.net/p/trousers/trousers /usr/src/trousers-trousers && cd /usr/src/trousers-trousers && git checkout $TROUSERS_COMMIT
|
RUN git clone https://git.code.sf.net/p/trousers/trousers /usr/src/trousers-trousers && cd /usr/src/trousers-trousers && git checkout $TROUSERS_COMMIT
|
||||||
RUN git clone https://git.code.sf.net/p/trousers/tpm-tools /usr/src/trousers-tpm-tools && cd /usr/src/trousers-tpm-tools && git checkout $TPM_TOOLS_COMMIT
|
RUN git clone https://git.code.sf.net/p/trousers/tpm-tools /usr/src/trousers-tpm-tools && cd /usr/src/trousers-tpm-tools && git checkout $TPM_TOOLS_COMMIT
|
||||||
WORKDIR /usr/src/trousers-trousers
|
WORKDIR /usr/src/trousers-trousers
|
||||||
RUN sh bootstrap.sh && \
|
RUN sh bootstrap.sh && \
|
||||||
./configure --prefix=/ --sysconfdir=/etc LDFLAGS="-L/out/lib/ -lgetpwent_r" && \
|
./configure --prefix=/ --sysconfdir=/etc LDFLAGS="-L/out/lib/ -lgetpwent_r" && \
|
||||||
|
for patch in /usr/src/patch/*.patch; do patch -p1 < $patch; done && \
|
||||||
make && \
|
make && \
|
||||||
make install prefix=/out
|
make install prefix=/out
|
||||||
WORKDIR /usr/src/trousers-tpm-tools
|
WORKDIR /usr/src/trousers-tpm-tools
|
||||||
@ -57,7 +61,8 @@ RUN busybox chmod 0644 /etc/passwd /etc/group && \
|
|||||||
busybox chmod 0640 /etc/shadow && \
|
busybox chmod 0640 /etc/shadow && \
|
||||||
busybox touch /etc/tcsd.conf && \
|
busybox touch /etc/tcsd.conf && \
|
||||||
busybox chmod 0600 /etc/tcsd.conf && \
|
busybox chmod 0600 /etc/tcsd.conf && \
|
||||||
busybox chown -R tss.tss /var/lib/tpm/ /etc/tcsd.conf && \
|
busybox chown -R tss /var/lib/tpm/ /etc/tcsd.conf && \
|
||||||
|
busybox chgrp -R tss /var/lib/tpm/ /etc/tcsd.conf && \
|
||||||
busybox rm /bin/busybox /bin/sh
|
busybox rm /bin/busybox /bin/sh
|
||||||
|
|
||||||
CMD ["/sbin/tcsd","-f"]
|
CMD ["/sbin/tcsd","-f"]
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
.PHONY: all clean install
|
.PHONY: all clean install
|
||||||
|
|
||||||
SOLIB = libgetpwent_r.so
|
SOLIB = libgetpwent_r.so
|
||||||
|
HEADER = getpwent_r.h
|
||||||
|
|
||||||
DEPS = getpwent_r.o
|
DEPS = getpwent_r.o
|
||||||
|
|
||||||
@ -16,3 +17,4 @@ $(SOLIB): $(DEPS)
|
|||||||
install:
|
install:
|
||||||
mkdir -p /out/lib
|
mkdir -p /out/lib
|
||||||
cp $(SOLIB) /out/lib
|
cp $(SOLIB) /out/lib
|
||||||
|
cp $(HEADER) /usr/include
|
||||||
|
17
pkg/tss/src/glibc_stubs/getpwent_r.h
Normal file
17
pkg/tss/src/glibc_stubs/getpwent_r.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef GETPWENTR_H
|
||||||
|
#define GETPWENTR_H
|
||||||
|
|
||||||
|
#include <stddef.h> // For size_t
|
||||||
|
#include <pwd.h> // For struct passwd
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int getpwent_r(struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // GETPWENTR_H
|
4
pkg/tss/src/patch/tspps.patch
Normal file
4
pkg/tss/src/patch/tspps.patch
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
--- a/src/tspi/ps/tspps.c 2025-01-06 12:00:00.000000000 +0000
|
||||||
|
+++ b/src/tspi/ps/tspps.c 2025-01-06 12:10:00.000000000 +0000
|
||||||
|
@@ -50,0 +51 @@
|
||||||
|
+#include <getpwent_r.h>
|
Loading…
Reference in New Issue
Block a user