Hi all,
I am new to CL and wanted to share my experience of installing Parsec using their provided .deb package.
We will utilize FPM(Effing Package Management) to repackage the deb to rpm.
Here’s what we will be doing:
Create our own docker image for FPM.
Use that docker image to repackage the Parsec deb to rpm
Install Parsec
This guide will utilize the following bundles:
- package-utils
- containers-basic
- alsa-utils
So let’s go ahead and install those:
sudo swupd bundle-add package-utils containers-basic alsa-utils
And enable and start docker
(if you don’t want docker running all the time skip the first command
you will just need to start it each time you want to update parsec)
sudo systemctl enable docker
sudo systemctl start docker
Let’s create some folders in our home directory to stay organized
mkdir ~/builds
mkdir ~/builds/fpmdocker
mkdir ~/builds/parsec
Now lets create the docker file for our image:
The reason we create our own instead of using the dockerfile provided by FPM is that it utilizes experimental docker features(squashfs) that we don’t need for repackaging.
Create a dockerfile
nano ~/builds/fpmdocker/dockerfile
With this content
FROM alpine:latest
RUN set -x \
&& apk update && apk add \
ruby \
ruby-dev \
rpm-dev \
gcc \
make \
ca-certificates \
libffi-dev \
ruby-ffi \
&& gem install fpm \
&& mkdir /src/
WORKDIR /src/
Build our docker image and name it fpm
cd ~/builds/fpmdocker
sudo docker build -t fpm .
Create a shell script to download, repackage parsec, and cleanup after itself:
nano ~/builds/parsec/parsec.sh
with the follwing content
#Remove previous parsec RPM file
rm -f parsec.rpm
#Download the current deb
curl https://builds.parsecgaming.com/package/parsec-linux.deb --output parsec.deb
#Create a temporary docker container and repackage
sudo docker run --rm -v "$(pwd):/src/" fpm fpm -s deb -t rpm -p /src/parsec.rpm /src/parsec.deb
Run the script to create an RPM
cd ~/builds/parsec
. ./parsec.sh
Install the resulting Parsec RPM
sudo rpm -U --nodeps ~/builds/parsec/parsec.rpm
To update:
cd ~/builds/parsec
. ./parsec.sh
sudo rpm -U --nodeps ~/builds/parsec.rpm
To Uninstall:
sudo rpm -e parsec