Merge remote-tracking branch 'origin/lance/pcsc-drivers' into staging

This commit is contained in:
ryan 2024-06-24 23:05:06 -04:00
commit fba96244ed
No known key found for this signature in database
GPG key ID: 8E401478A3FBEF72
6 changed files with 249 additions and 4 deletions

View file

@ -0,0 +1,41 @@
FROM scratch as base
ENV VERSION=1.5.5
ENV SRC_HASH=194708f75fe369d45dd7c15e8b3e8a7db8b49cfc5557574ca2a2e76ef12ca0ca
ENV SRC_FILE=ccid-${VERSION}.tar.bz2
ENV SRC_SITE=https://ccid.apdu.fr/files/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/pcsc-lite . /
COPY --from=stagex/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/libusb . /
COPY --from=stagex/zlib . /
RUN tar -xvf $SRC_FILE
WORKDIR ccid-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-twinserial
make -j "$(nproc)"
EOF
FROM build as install
RUN --network=none make DESTDIR=/rootfs install
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,32 @@
FROM scratch as base
ENV VERSION=1.0.27
ENV SRC_FILE=libusb-${VERSION}.tar.bz2
ENV SRC_SITE=https://github.com/libusb/libusb/releases/download/v${VERSION}/${SRC_FILE}
ENV SRC_HASH=ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR libusb-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--disable-udev \
--enable-static
make -j1
EOF
FROM build as install
RUN make DESTDIR=/rootfs install
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,60 @@
FROM scratch as base
ENV VERSION=0.25.1
ENV SRC_HASH=989e6305900d4f2f56ef84aa0da07c044459b4f8a508957a4cdefce6a1367c7b
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/opensc/opensc/archive/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/perl . /
COPY --from=stagex/openssl . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/readline . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/gettext . /
COPY --from=stagex/pcsc-lite . /
COPY --from=stagex/automake . /
COPY --from=stagex/libtool . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/m4 . /
COPY --from=stagex/zlib . /
RUN tar -xf ${SRC_FILE}
WORKDIR OpenSC-${VERSION}
ENV CFLAGS="-U_FORTIFY_SOURCE -Wno-error"
RUN --network=none <<-EOF
set -eux
./bootstrap
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-zlib \
--enable-readline \
--enable-openssl \
--enable-pcsc \
--enable-sm \
--enable-piv-sm
make -j "$(nproc)"
make -C src/tools
EOF
FROM build as install
RUN --network=none <<-EOF
set -eux
make DESTDIR=/rootfs install
install -D -m644 etc/opensc.conf /rootfs/etc/opensc.conf
EOF
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /

View file

@ -12,12 +12,12 @@ COPY --from=stagex/busybox . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/libusb . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/eudev . /
RUN tar -xvf $SRC_FILE
WORKDIR pcsc-lite-${VERSION}
RUN --network=none <<-EOF
@ -28,8 +28,8 @@ RUN --network=none <<-EOF
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-libusb \
--enable-libudev \
--enable-libusb \
--disable-libudev \
--disable-maintainer-mode \
--disable-silent-rules \
--without-systemdsystemunitdir \

View file

@ -0,0 +1,37 @@
FROM scratch as base
ENV VERSION=1.7.1
ENV SRC_HASH=0d024b589e15d79eac8506cd67df7b53cf91e9e6a493c8319f33cd29b5f36426
ENV SRC_FILE=pcsc-tools-${VERSION}.tar.bz2
ENV SRC_SITE=https://pcsc-tools.apdu.fr/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/pcsc-lite . /
RUN tar -xvjf $SRC_FILE
WORKDIR pcsc-tools-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make -j "$(nproc)"
EOF
FROM build as install
RUN --network=none make DESTDIR=/rootfs install
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /

View file

@ -211,6 +211,25 @@ out/ca-certificates/index.json: \
out/perl/index.json
$(call build,ca-certificates)
.PHONY: ccid
ccid: out/ccid/index.json
out/ccid/index.json: \
packages/ccid/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/libusb/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/pcsc-lite/index.json \
out/perl/index.json \
out/pkgconf/index.json \
out/zlib/index.json
$(call build,ccid)
.PHONY: clang
clang: out/clang/index.json
out/clang/index.json: \
@ -932,6 +951,19 @@ out/libunwind/index.json: \
out/musl/index.json
$(call build,libunwind)
.PHONY: libusb
libusb: out/libusb/index.json
out/libusb/index.json: \
packages/libusb/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/linux-headers/index.json \
out/make/index.json \
out/musl/index.json
$(call build,libusb)
.PHONY: libxml2
libxml2: out/libxml2/index.json
out/libxml2/index.json: \
@ -1354,6 +1386,32 @@ out/openpgp-card-tools/index.json: \
out/zlib/index.json
$(call build,openpgp-card-tools)
.PHONY: opensc
opensc: out/opensc/index.json
out/opensc/index.json: \
packages/opensc/Containerfile \
out/autoconf/index.json \
out/automake/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/gettext/index.json \
out/libtool/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/ncurses/index.json \
out/openssl/index.json \
out/pcsc-lite/index.json \
out/perl/index.json \
out/pkgconf/index.json \
out/readline/index.json \
out/util-linux/index.json \
out/zlib/index.json
$(call build,opensc)
.PHONY: openssl
openssl: out/openssl/index.json
out/openssl/index.json: \
@ -1374,10 +1432,10 @@ out/pcsc-lite/index.json: \
packages/pcsc-lite/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/eudev/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/libusb/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
@ -1385,6 +1443,23 @@ out/pcsc-lite/index.json: \
out/pkgconf/index.json
$(call build,pcsc-lite)
.PHONY: pcsc-tools
pcsc-tools: out/pcsc-tools/index.json
out/pcsc-tools/index.json: \
packages/pcsc-tools/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/pcsc-lite/index.json \
out/perl/index.json \
out/pkgconf/index.json
$(call build,pcsc-tools)
.PHONY: perl
perl: out/perl/index.json
out/perl/index.json: \