Microsoft released a new font called Cascadia Code. I'd prefer if I could install this with the debian package manager, so I went to figure out how to put that on Ubuntu's PPAs.

# Install dependencies for the ppa creation process
sudo apt install -y dh-make bzr-builddeb

# Tell bzr who I am
bzr whoami "Justin Abrahms <justin@abrah.ms>"

# Download the font
wget https://github.com/microsoft/cascadia-code/releases/download/v1909.16/Cascadia.ttf

# Create a tarball
tar cf cascadia.tar ./Cascadia.ttf

# Try to build the actual package
bzr dh-make ttf-cascadia-code 1909.16 cascadia.tar          

From here, we have a debian/ folder that contains lots of files we need to configure. I deleted the two README files that were generated and filled out the copyright and control files. It's important that the name-email combination you put for yourselve in these matches the name-email combination used in your GPG key.

From there, we need to tell the package how to install itself. I created a file called ttf-cascadia-code.install, which contained the following:

Cascadia.ttf /usr/share/fonts/truetype/cascadia-code/

I got that file information by looking at what ttf-anonymous-pro did.

From there, I needed to sign the ubuntu PPA code of conduct. I did it by clicking the "signed code of conduct? No" section of my launchpad profile. It had me do some GPG stuff, which I'm not going to go into. There seemed to be good amounts of help offered in their guide.

The ubuntu docs say I need to run:

dput ppa:justinabrahms/ttf-cascadia-code ttf-cascadia-code_1909.16-1_amd64.changes

But I got the error gpgme_op_verify: GPGME: No data. This meant that I didn't sign the changes file, which I did by signing it with my key.

debsign -k E0B7AA7C81E5BEC7991EFA4E320E47C9795AD0D6 ttf-cascadia-code_1909.16-1_amd64.changes 

After that, the dput command above worked and it uploaded successfully to Launchpad.

I made a mistake in editing my changelog in that I specified it was for "unstable", which is a debian thing, not an ubuntu thing. I swapped it to "bionic" and ran the commands below to re-upload. In normal iteration, I think I would update the changelog and not use the --force flag below.

cd ttf-cascadia-code
debuild -S  # Note, this also signs it.
cd ../
dput --force ppa:justinabrahms/ttf-cascadia-code ttf-cascadia-code_1909.16-1_source.changes