add keyfork
This commit is contained in:
parent
4c5ea2b66b
commit
bb0bf05a85
|
@ -1 +1 @@
|
|||
output
|
||||
out
|
||||
|
|
13
Dockerfile
13
Dockerfile
|
@ -1,7 +1,20 @@
|
|||
FROM archlinux:base-devel AS keyfork-build
|
||||
|
||||
RUN pacman -Syu --noconfirm
|
||||
RUN useradd -m build && echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/build
|
||||
|
||||
USER build
|
||||
WORKDIR /home/build
|
||||
ADD PKGBUILD.keyfork /home/build/PKGBUILD
|
||||
|
||||
RUN makepkg -s --noconfirm --skipinteg
|
||||
RUN mkdir /home/build/repo && cp keyfork-0.0.0-1-x86_64.pkg.tar.zst repo && repo-add /home/build/repo/keyfork.db.tar.gz keyfork-0.0.0-1-x86_64.pkg.tar.zst
|
||||
|
||||
FROM archlinux
|
||||
|
||||
RUN pacman -Syu --noconfirm archiso
|
||||
ADD configs /configs
|
||||
COPY --from=keyfork-build /home/build/repo /usr/share/keyfork
|
||||
WORKDIR /
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bash", "-x", "/usr/bin/mkarchiso", "-v", "-w", "/work", "-o", "/out"]
|
||||
|
|
3
Makefile
3
Makefile
|
@ -14,7 +14,8 @@ vars:
|
|||
clean:
|
||||
rm -rf out work || true
|
||||
|
||||
out/archlinux-baseline-arch-%-x86_64.iso: configs/%/
|
||||
# NOTE: Relies on files in configs/% but make doesn't have recursive checks
|
||||
out/archlinux-baseline-arch-%-x86_64.iso: configs/% Dockerfile PKGBUILD.keyfork
|
||||
$(MAKE) docker-airgap-builder
|
||||
mkdir -p out
|
||||
docker run --rm --privileged --volume "$(PWD)/out:/out" airgap-builder $<
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
pkgname='keyfork'
|
||||
pkgver='0.0.0'
|
||||
pkgrel=1
|
||||
pkgdesc='The Kitchen Sink of Entropy'
|
||||
arch=('x86_64')
|
||||
url='https://git.distrust.co/public/keyfork'
|
||||
license=('GPL-2.0')
|
||||
makedepends=('cargo' 'clang' 'git' 'llvm' 'pkgconf') # + nettle + pcsclite
|
||||
depends=('nettle' 'pcsclite')
|
||||
source=('git+https://git.distrust.co/public/keyfork.git')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||||
cd -
|
||||
}
|
||||
|
||||
build() {
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
export RUSTFLAGS="-C codegen-units=1"
|
||||
cd "$srcdir/$pkgname"
|
||||
# NOTE: Do not use `--all-features` as features may be incomopatible with
|
||||
# each other.
|
||||
cargo build --frozen --release -p keyfork
|
||||
}
|
||||
|
||||
package() {
|
||||
build="$srcdir/$pkgname/target/release"
|
||||
target="$pkgdir/usr/bin"
|
||||
install -Dm755 "$build/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||
}
|
|
@ -3,6 +3,13 @@
|
|||
A slim version of Arch Linux intended to run on airgapped (always-offline)
|
||||
systems. The builder runs in Docker using privileged mode.
|
||||
|
||||
## Target Packages
|
||||
|
||||
Airgap NG is built for the purpose of providing an airgapped image of Keyfork.
|
||||
As such, it builds an Arch package for Keyfork and a local Arch package
|
||||
repository from which to install Keyfork. The base installation image will also
|
||||
include Nettle, PCSC Lite
|
||||
|
||||
## Building
|
||||
|
||||
Requirements:
|
||||
|
|
|
@ -3,3 +3,4 @@ linux
|
|||
mkinitcpio
|
||||
mkinitcpio-archiso
|
||||
syslinux
|
||||
keyfork
|
||||
|
|
|
@ -96,3 +96,7 @@ Include = /etc/pacman.d/mirrorlist
|
|||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
|
||||
[keyfork]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = file:///usr/share/keyfork
|
||||
|
|
Loading…
Reference in New Issue