Skip to content

Commit

Permalink
fix the root-in-rpm problem
Browse files Browse the repository at this point in the history
  • Loading branch information
msciabarra committed Oct 15, 2023
1 parent 254aaf5 commit 3cdd93f
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/linux/nuvfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tasks:
esac
cd $NUV_ROOT/linux
sudo alien --to-rpm "nuv_${VERSION}_${ARCH}.deb" --scripts --generate
sudo mv nuv-${VER}/nuv-${VER}-*.spec nuv.spec
cat nuv-${VER}/nuv-${VER}-*.spec | grep -v '%dir "/"' >nuv.spec
cat rpmbuild.sh | docker run -i -v $PWD:/mnt "$IMG" env VER=$VER TGT=$TGT bash -
sudo mv nuv-${VER}-*.$TGT.rpm nuv_${VERSION}_${ARCH}.rpm
Expand Down
44 changes: 44 additions & 0 deletions validate/Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '3'

vars:
VER:
sh: git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD

tasks:

pre:
- docker login

validate:
silent: false
cmds:
- echo === "{{.IMG}}"
- >
cat validate.sh
| docker run -i "{{.IMG}}"
env VER="{{.VER}}" EXT="{{.EXT}}" ARCH={{ARCH}} bash -
| grep "$VER"
rh9:
- task: validate
vars:
EXT: ".rpm"
IMG: "rockylinux:9"

ub22:
- task: validate
vars:
EXT: ".deb"
IMG: "ubuntu:22.04"

rh8:
- task: validate
vars:
EXT: "_redhat8.rpm"
IMG: "rockylinux:8"

ub20:
- task: validate
vars:
EXT: "_ubuntu20.deb"
IMG: "ubuntu:20.04"
20 changes: 20 additions & 0 deletions validate/validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#VER=3.0.1-beta.2310151130
#EXT=.rpm

URL=https://github.com/nuvolaris/nuv/releases/download/$VER/nuv_${VER}_${ARCH}${EXT} >nuv${EXT}
echo $URL
case "$EXT" in
*.deb)
apt-get update && apt-get install -y curl
export INST="dpkg -i"
;;
*.rpm)
export INST="rpm -i"
;;
esac

curl -sL "$URL" >nuv${EXT}
$INST "nuv${EXT}"

nuv -v

0 comments on commit 3cdd93f

Please sign in to comment.