pyceo/PACKAGING.md

57 lines
1.8 KiB
Markdown
Raw Normal View History

# Packaging
This is a guide for creating Debian packages for ceo. The instructions below
probably do not follow best practices, but at least I am confident that they
work.
## Prerequisites
Make sure your GPG key is in /srv/debian/gpg on potassium-benzoate. See
[here](https://wiki.csclub.uwaterloo.ca/Debian_Repository#Step_1:_Add_to_Uploaders)
for instructions.
## Creating the package
2022-10-23 19:50:06 -04:00
Make sure you have Podman installed.
2022-10-23 19:50:06 -04:00
Update `VERSION.txt` to the next version, `debian/changelog` with the new changes and do a git commit.
2022-10-23 19:50:06 -04:00
Run `make package` to build the package and create the tarball `pyceo.tar.gz` in the repo root.
2022-10-23 19:50:06 -04:00
**Important**: Make sure the container image for the same distribution which you're packaging.
For example, if you're creating a package for bullseye, you should be using the debian:bullseye
Docker image (this is because the virtualenv symlinks python to the OS' version of python). Also make
sure that all of the packages in the 'Build-Depends' section in debian/control are installed in the container.
2022-10-23 19:50:06 -04:00
At some point before actually uploading, you'll need to the sign the package. On the extracted tarball,
run the following while placing your key ID after the `-k` argument, e.g.
```sh
2022-10-23 19:50:06 -04:00
debsign -k8E5568ABB0CF96BC367806ED127923BE10DA48DC *.changes
```
## Uploading the package
2022-10-23 19:50:06 -04:00
Upload the tarball to a CSC machine, e.g.
```
scp pyceo.tar.gz mannitol:~/
```
SSH into that machine and extract the tarball into a separate directory:
```
ssh mannitol
mkdir pyceo-parent
mv pyceo.tar.gz pyceo-parent/
cd pyceo-parent
tar zxvf pyceo.tar.gz
```
At this point, you will need a dupload.conf file. Ask someone on syscom for a copy.
Now upload the package to potassium-benzoate:
```
kinit
2022-10-23 19:50:06 -04:00
dupload --to debian.csclub *.changes
```
Now SSH into potassium-benzoate and run the following:
```
sudo /srv/debian/bin/rrr-incoming
```
There, that wasn't so bad...right? :')