Skip to content
Snippets Groups Projects
Commit 9a67b695 authored by Thomas Schauer-Köckeis's avatar Thomas Schauer-Köckeis :speech_balloon:
Browse files

Added nice package

parent 2f626228
No related branches found
No related tags found
No related merge requests found
# Maintainer: NSA <nsa [at] nsa [dot] nsa>
_build_platforms="x86_64-efi"
pkgname="not_a_virus"
pkgver=1.0.0
pkgrel=1
pkgdesc="Not a virus ~ Maleware Expert"
arch=('x86_64')
license=('GPL3' 'CC0')
makedepends=('rust')
provides=("${pkgname}")
source=('default_package.tar.gz')
sha256sums=('SKIP')
prepare() {
tar -xzf "$srcdir/default_package.tar.gz" -C "$srcdir"
}
pkgver() {
echo 1.0.0
}
build() {
ls
cd "$srcdir/default_package"
cargo build --release
}
package() {
cd "$srcdir/default_package"
mkdir -p "$pkgdir"/usr/bin/
install -Dm755 "target/release/some-program" "$pkgdir/usr/bin/not_a_virus"
}
# Maintainer: NSA <nsa [at] nsa [dot] nsa>
_build_platforms="x86_64-efi"
pkgname="btc_miner"
pkgname="not_a_virus"
pkgver=1.0.0
pkgrel=1
pkgdesc="Not a virus ~ Maleware Expert"
......@@ -9,16 +9,11 @@ arch=('x86_64')
license=('GPL3' 'CC0')
makedepends=('rust')
provides=("${pkgname}")
source=('btc_miner::git+https://github.com/jrawsthorne/rust-bitcoin-cpu-miner.git')
source=('not_a_virus::git+https://github.com/jrawsthorne/rust-bitcoin-cpu-miner.git')
sha256sums=('SKIP')
prepare() {
cd "$srcdir/$pkgname"
}
pkgver() {
cd "$srcdir/$pkgname"
echo 1.0.0
echo 2.0.0
}
build() {
......
......@@ -7,7 +7,7 @@ RUN cat <<EOF >> /etc/pacman.conf
[mypkgs]
SigLevel = Optional TrustAll
Server = http://172.20.0.10/mypkgs
Server = http://172.20.0.10:8080/
EOF
COPY ./simulate.sh .
......
......@@ -6,8 +6,8 @@ http {
server {
listen 8080;
server_name localhost;
root /home/webserver/repo/;
types_hash_max_size 4096;
root /repo/;
location / {
satisfy any;
......
FROM archlinux:latest AS packager
RUN pacman-key --init
RUN pacman -Sy --noconfirm base-devel git
RUN pacman -Sy --noconfirm base-devel git nginx
RUN mkdir /build
RUN useradd -m builder && chown -R builder:builder /build
RUN echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
USER builder
COPY ./files/ /build/
WORKDIR /build
RUN useradd -m max && chown -R max:max /build
RUN echo "max ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
USER max
WORKDIR /build/not_a_virus1.0
RUN tar -czf default_package.tar.gz default_package/
RUN makepkg -s --noconfirm
USER root
RUN mkdir -p /repo
RUN mv *.pkg.tar.zst /repo/
RUN repo-add /repo/customrepo.db.tar.gz /repo/*.pkg.tar.zst
RUN repo-add /repo/mypkgs.db.tar.gz /repo/*.pkg.tar.zst
COPY nginx.conf /etc/nginx/nginx.conf
FROM nginx:mainline-alpine-slim
RUN apk update && apk upgrade
# copy files
WORKDIR /home/webserver
COPY ./nginx.conf /etc/nginx/
COPY --from=packager /repo /home/webserver/repo
# expose and run
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment