<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Emma's Blog - packaging</title><link>https://emmatyping.dev/</link><description/><atom:link href="https://emmatyping.dev/feeds/packaging/rss.xml" rel="self"/><lastBuildDate>Sat, 26 Nov 2022 00:00:00 -0800</lastBuildDate><item><title>Rust CLI tools apt repo</title><link>https://emmatyping.dev/rust-cli-tools-apt-repo.html</link><description>&lt;blockquote&gt;
&lt;p&gt;tl;dr
Go to &lt;a href="http://apt.cli.rs"&gt;http://apt.cli.rs&lt;/a&gt; and follow the instructions to add the apt repo&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I guess its only fair to start my new blogging kick by catching up on a project I'd worked on several months ago which is pretty much "done." I really like several Rust tools, such as &lt;a href="https://github.com/BurntSushi/ripgrep"&gt;&lt;code&gt;ripgrep&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/sharkdp/hyperfine"&gt;&lt;code&gt;hyperfine&lt;/code&gt;&lt;/a&gt;, and &lt;a href="https://github.com/sharkdp/fd"&gt;&lt;code&gt;fd&lt;/code&gt;&lt;/a&gt;. I wanted an easy way to install them on Debian-based systems that may not have them in the official repos, so I needed to create my own apt repo. I was originally considering making a ppa, or private package archive, since I mainly use Ubuntu, but I decided I wanted these tools available on Debian as well, so my only option was an apt repo.&lt;/p&gt;
&lt;p&gt;It turns out that apt repos are really simple, you just need to serve a directory with e.g. nginx. It took me a while to find a tool I liked using for making the apt repo, however. I started with trying &lt;code&gt;reprepro&lt;/code&gt;, but I found it was more annoying to use than I wanted, so I ended up using &lt;a href="https://www.aptly.info/"&gt;&lt;code&gt;aptly&lt;/code&gt;&lt;/a&gt;, a newer apt repo management tool.&lt;/p&gt;
&lt;p&gt;When setting up the repo, my criteria for inclusion were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the tool must be able to build &lt;code&gt;*.deb&lt;/code&gt; packages. This is the package format for Debian/Ubuntu so definitely required&lt;/li&gt;
&lt;li&gt;the tool must build those packages. I wanted to use the official/same binaries as those in the Github release&lt;/li&gt;
&lt;li&gt;the binary packages must be statically musl-linked. Since various versions of Debian/Ubuntu use different versions of glibc, you can get version compatibility errors if you don't statically link. Statically linking to musl is &lt;em&gt;much&lt;/em&gt; easier than glibc, so this seemed to be the best route to avoid compatibility errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these criteria in hand, I then set up the apt repo with the CLI tools that fit and wrote a script to try updating all of the packages, pulling from the official Github releases. I have subscribed to releases on Github from all the repos that are currently included in the apt repo so all I have to do is run the script when a new release comes out from one of the repos. I may end up setting up a cronjob that runs this update script, but I'm weighing whether it is worth any potential risks...&lt;/p&gt;
&lt;p&gt;Anyway, if you are interested in using this apt repo, head on over to &lt;a href="http://apt.cli.rs"&gt;https://apt.cli.rs&lt;/a&gt;, I've written up the commands you need to get started using the apt repo.&lt;/p&gt;
&lt;p&gt;If you have suggestions for Rust CLI tools that should be included, please &lt;a href="https://github.com/emmatyping/apt.cli.rs/issues/new"&gt;open an issue on the github&lt;/a&gt;! If a package doesn't build musl-linked Debian packages, consider opening an issue on that project to add it. However, please &lt;em&gt;do not&lt;/em&gt; spam maintainers asking for these packages to be built. I unfortunately do not have time to contribute to the packaging of every great Rust CLI tool, but I can add them to the apt repo if they are packaged already!&lt;/p&gt;
&lt;p&gt;Anyway, hopefully someone else finds it useful!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Emma Smith</dc:creator><pubDate>Sat, 26 Nov 2022 00:00:00 -0800</pubDate><guid>tag:emmatyping.dev,2022-11-26:/rust-cli-tools-apt-repo.html</guid><category>misc</category><category>rust</category><category>packaging</category></item></channel></rss>