jaseg/lolcat

snap package for lolcat

simos opened this issue · 6 comments

simos commented

I wrote a tutorial on creating snap installation packages
and I included this version of lolcat,
https://blog.simos.info/how-to-make-a-snap-package-for-lolcat-with-snapcraft-on-ubuntu/

I also uploaded a package, named "lolcat-c", on the Ubuntu Store,
which can be installed in Linux distributions that have snap package support, by running

snap install lolcat-c

jaseg commented

Awesome, thank you! Your post was an interesting read.

I saw that you had some problems with musl there. I use musl here since I use fmemopen to display the help text, and glibc has had a bug since forever that is just not getting fixed that causes the program to segfault on a perfectly correct fgetwc on a fmemopen'ed fd.

Using make lolcat instead of make lolcat-static or make [all] builds against glibc instead of musl, and this may on some distributions result in a segfault on lolcat --help. Have you tried running that? If it crashes, the only workaround I know of right now (apart from several really dirty hacks) is to just use musl instead. Unfortunately, this might increase the size of the resulting binary by as much as 20kB.

jaseg commented

Hmm, just to update this. I have added a workaround to remove any dependency on a working fmemopen and thus also removed the musl hack.

simos commented

Thanks for the update.

There is no snap package with the name lolcat yet.
Since you are the maintainer of a lolcat, you can register the name lolcat and publish an official package.

You can either perform this task manually following my blog post, or you can use the build service for snaps at https://build.snapcraft.io/ (they auto-generate snap packages for you, for six architectures).

jaseg commented

I don't want to get into packaging software. If you want to publish this, feel free to do so but I don't want that responsibility for this little side-project ;)

simos commented

I would like to take the opportunity to write a new tutorial on snap packages, on how to setup this automated packaging with build.snapcraft.io and creation of new releases. Could I please use your lolcat for the tutorial? ;)

To be able to link build.snapcraft.io to this repository, I would need to be a collaborator to this repository. In that way, I would be able to configure build.snapcraft.io to watch the repository (API access) for new commits and autobuild testing packages.

jaseg commented

You can of course use lolcat for your tutorial as it's published under WTFPL. I won't add you as a collaborator though. Please just fork the repository for your tutorial. This repository shouldn't see too many commits anyway.