blog/public/index.xml
2024-06-29 13:31:50 -04:00

506 lines
33 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Home on Joel Beckmeyer&#39;s Blog</title>
<link>https://beckmeyer.us/</link>
<description>Recent content in Home on Joel Beckmeyer&#39;s Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<managingEditor>joel@beckmeyer.us (Joel Beckmeyer)</managingEditor>
<webMaster>joel@beckmeyer.us (Joel Beckmeyer)</webMaster>
<lastBuildDate>Sun, 04 Apr 2021 00:00:00 -0500</lastBuildDate><atom:link href="https://beckmeyer.us/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Consistency</title>
<link>https://beckmeyer.us/posts/consistency/</link>
<pubDate>Sun, 04 Apr 2021 00:00:00 -0500</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/consistency/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve seen a lot of talk about this stuff:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Check out my FOSS project (hosted on Github)&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Wayland is a great innovation and boon to the community! Also, there are very few tools/alternatives available yet for your favorite X11 tool!&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;We love open source! Also, we develop the most popular proprietary operating system!&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Do as I say, not as I do.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We love to poke fun at and expose this kind of stuff, which is all fine and
dandy. I think it&amp;rsquo;s an interesting (and important) part of our humanity that
this kind of thing bugs us so much. Think about that last point, which at least
in my experience, is something I &lt;em&gt;loved&lt;/em&gt; to fault authorities for.&lt;/p&gt;
&lt;p&gt;Hypocrisy is fun and also infuriating to uncover in others, but how often do
we do a &amp;ldquo;consistency check&amp;rdquo; on ourselves? Is what we are saying evidenced by
the rest of our actions?&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s a hard look sometimes. I know it is for me, since I&amp;rsquo;m &lt;strong&gt;very&lt;/strong&gt; quick
to judge others, but don&amp;rsquo;t often think about how I fail at my own principles.&lt;/p&gt;
&lt;p&gt;Example: As a FOSS advocate, it&amp;rsquo;s nearly natural to assume that everything will
be better and easier with more people using FOSS. When evidence seems to point
to the contrary (e.g. fighting with Matrix/Element to get it working for my
family and friends), I don&amp;rsquo;t own up to the fact that it isn&amp;rsquo;t easier, and that
is an actual problem.&lt;/p&gt;
&lt;p&gt;If we truly want to build a welcoming and wholesome community, let&amp;rsquo;s be careful
to do a consistency check to make sure nothing smells foul.&lt;/p&gt;
</description>
</item>
<item>
<title>Better?</title>
<link>https://beckmeyer.us/posts/better/</link>
<pubDate>Sat, 03 Apr 2021 22:15:44 -0400</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/better/</guid>
<description>&lt;p&gt;There are many that say&lt;br&gt;
(and I tend to agree)&lt;br&gt;
that free software is the best there could be.&lt;/p&gt;
&lt;p&gt;But please don&amp;rsquo;t mistake&lt;br&gt;
using software that&amp;rsquo;s free&lt;br&gt;
as a right to superiority.&lt;/p&gt;
&lt;p&gt;There are many that go&lt;br&gt;
from day to day living&lt;br&gt;
and don&amp;rsquo;t give a thought to what they are using.&lt;/p&gt;
&lt;p&gt;Are they worse for this?&lt;br&gt;
Are you better for caring?&lt;br&gt;
Sometimes the truth can be quite baring.&lt;/p&gt;
&lt;p&gt;That not every human&lt;br&gt;
in present circumstance&lt;br&gt;
is able or willing to take a chance.&lt;/p&gt;
&lt;p&gt;&amp;lsquo;Cause that&amp;rsquo;s what it is,&lt;br&gt;
taking a chance and going&lt;br&gt;
into the unknown with fear, and knowing&lt;/p&gt;
&lt;p&gt;that what you might find,&lt;br&gt;
may not truly be better.&lt;/p&gt;
&lt;p&gt;But instead simply different;&lt;br&gt;
and still made by a stranger.&lt;/p&gt;
</description>
</item>
<item>
<title>Moving Back To OpenSSL</title>
<link>https://beckmeyer.us/posts/moving_back_to_openssl/</link>
<pubDate>Mon, 22 Mar 2021 11:00:00 -0400</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/moving_back_to_openssl/</guid>
<description>&lt;p&gt;Void Linux &lt;a href=&#34;https://voidlinux.org/news/2021/02/OpenSSL.html&#34;&gt;recently announced&lt;/a&gt;
that they were going to move back to OpenSSL after originally &lt;a href=&#34;https://voidlinux.org/news/2014/08/LibreSSL-by-default.html&#34;&gt;switching to
LibreSSL in 2014&lt;/a&gt;.
It seems that there are a lot of things at play here.&lt;/p&gt;
&lt;p&gt;It seems that the main focus of the recent announcement is on the maintainability
and other difficulties of not using the &lt;em&gt;one true SSL/TLS library&lt;/em&gt;. To me,
this pragmatically makes sense. However, every time something like this happens
I get this lingering feeling of worry&amp;hellip;&lt;/p&gt;
&lt;p&gt;Microsoft moving their default browser from their own implementation to
Chromium, and other browsers following suit.&lt;/p&gt;
&lt;p&gt;Linux distributions moving &lt;em&gt;en masse&lt;/em&gt; to &lt;strong&gt;systemd&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Distributed email being slowly crushed and killed by Google with GMail.&lt;/p&gt;
&lt;p&gt;And many other examples that aren&amp;rsquo;t immediately coming to mind.&lt;/p&gt;
&lt;p&gt;I think it&amp;rsquo;s great that OpenSSL as a project has made a comeback from the
Heartbleed fiasco, and that it is apparently more actively developed nowadays,
but the fact that we are even at the point of moving back to OpenSSL due to
difficulties with building software is worrying. To me, it looks like a
symptom of software becoming too entrenched and dependent on a single piece
of software.&lt;/p&gt;
&lt;p&gt;This kind of accusation coming from anyone is going to be hypocritical, since
we all depend on Linux, X11, Wayland, systemd, or some common piece of software
that we take for granted and don&amp;rsquo;t lose sleep over. However, I think what&amp;rsquo;s
categorically different about this one is that an alternative was adopted,
worked on, but eventually &amp;ldquo;failed&amp;rdquo; (at least for Void, but also possibly for
Linux as well).&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know what the fix for this specific issue would be. I&amp;rsquo;m not nearly
familiar enough with SSL/TLS or how you would develop software to be agnostic
of dependencies like this. But I think in order to honor principles like
the Unix philosophy, the KISS principle, and countless others, we need to
figure out a way to be more modular for dependency issues like this.&lt;/p&gt;
</description>
</item>
<item>
<title>The Generation Ship Problem</title>
<link>https://beckmeyer.us/posts/the_generation_ship_problem/</link>
<pubDate>Fri, 19 Mar 2021 15:00:00 -0400</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/the_generation_ship_problem/</guid>
<description>&lt;p&gt;After talking about the hardware and software problems of
digital permanence, I&amp;rsquo;m struck by a classical Sci-Fi
motif with a conundrum: the &lt;strong&gt;Generation Ship&lt;/strong&gt;; a ship
outfitted with all of the technology, infrastructure, and
storage to support lightyear-scale human travel.&lt;/p&gt;
&lt;p&gt;But what about that technology on the ship? If we build
one of these ships, we need to accomplish one of several
things in regards to information storage:&lt;/p&gt;
&lt;h3 id=&#34;1-innovate-to-the-point-where-the-lifetime-of-the-storage-devices-is-able-to-support-lightyear-scale-travel&#34;&gt;1. Innovate to the point where the lifetime of the storage devices is able to support lightyear scale travel.&lt;/h3&gt;
&lt;p&gt;That&amp;rsquo;s a tall order, given where we are right now with
physical storage devices. As I mentioned in one of my
previous posts, the average lifetime of physical storage
devices is less than 100 years, no matter if it is a hard
drive, solid-state drive, etc.&lt;/p&gt;
&lt;h3 id=&#34;2-provide-the-facility-to-create-new-storage-devices-to-replace-the-failing-old-ones&#34;&gt;2. Provide the facility to create new storage devices to replace the failing old ones.&lt;/h3&gt;
&lt;p&gt;Again, in my mind a tall order, since it would require
facilities on the ship to create storage devices. The
problem of having materials is at least solvable by just
sending the ship with all of the materials it needs in
advance.&lt;/p&gt;
&lt;h3 id=&#34;3-provide-the-facility-to-revitalize-storage-devices&#34;&gt;3. Provide the facility to revitalize storage devices.&lt;/h3&gt;
&lt;p&gt;One of the main reasons I&amp;rsquo;m even thinking about this is
because I&amp;rsquo;m an individual with limited resources.
Accordingly, I think about things in terms of
broken/working, on/off, etc. With enough resources, there
is a much larger chance of being able to repair, re-purpose,
and otherwise revitalize storage devices, increasing their
lifetime. E.g., if the only failure in the hard drive is the
control circuit, that is an &amp;ldquo;easy enough&amp;rdquo; repair.&lt;/p&gt;
&lt;p&gt;I like to toy with the idea of a generation ship a lot in
my head, but I think it&amp;rsquo;s really fun to think about the
technical possibilities and needs of a ship like this.&lt;/p&gt;
</description>
</item>
<item>
<title>Volatile Formats</title>
<link>https://beckmeyer.us/posts/volatile_formats/</link>
<pubDate>Thu, 18 Mar 2021 14:24:00 -0400</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/volatile_formats/</guid>
<description>&lt;p&gt;&lt;em&gt;Note: This is a continuation of the thoughts I started
thinking about in my &lt;a href=&#34;https://beckmeyer.us/posts/volatile_mediums/&#34;&gt;Volatile Mediums&lt;/a&gt; blog post.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The next level up from physical mediums for data storage
is the &lt;em&gt;way&lt;/em&gt; that the data is stored. In the digital age,
we have a plethora of formats for storing information.
For me, one of the most interesting areas of information
storage is the analog-digital space.&lt;/p&gt;
&lt;p&gt;The fundamental problem of storing audio, video, and other
replications of the physical world is that there is so much
information that we can collect with sensors
(think microphones, video cameras, etc.). It would be great
if we could go get the best camera and microphone out there,
record whatever people record these days, and have that
exact physical experience &amp;ldquo;played back&amp;rdquo; for us on a screen
and speaker/headphones.&lt;/p&gt;
&lt;p&gt;Unfortunately, there are several problems with this. Among
those is the actual design of the sensor. It takes a lot of
careful thought, engineering, and the like to create a truly
good microphone or camera. And after all of that, this sensor
will cost something. Hopefully, that cost will correspond to
the actual technical ability of that sensor! In any case,
not everyone can have the best camera or microphone due to
any number of constraints, not just those listed above.&lt;/p&gt;
&lt;p&gt;The second problem is the sampling issue. The sensor will
create some sort of output that can then be measured, or
&lt;strong&gt;sampled&lt;/strong&gt;, by an ADC (analog-to-digital converter). The
very word &amp;ldquo;sample&amp;rdquo; belies what this nearly magical box is
doing: it is only looking at certain portions or timestamps
of the analog signal. Granted, the time between samples
can be very small (e.g. 44.1 kHz is a fairly common sample
rate for audio), but there is still some loss of signal.
Once the ADC creates these samples, it converts them into
a digital format (something that can be stored on a
CD, hard drive, thumb drive, etc.).&lt;/p&gt;
&lt;p&gt;The third problem is the encoding issue. The ADC creates all
of these samples, but we need to start thinking about storage
limitations. Storing the raw output of a sensor can take a
lot of space: an average album length (40 minutes) could
easily take 400MB of space! Now, again, the physical storage
space is moving in the upward direction to combat this, but
storing isn&amp;rsquo;t the only problem. One prime issue is internet
bandwidth.&lt;/p&gt;
&lt;p&gt;The solution to this is compression, like a ZIP file. It
makes big files smaller by doing some fancy math tricks
that can be reversed by a computer to reconstruct the
original file. However, for audio/video files, another level
of compression exists which actually gets rid of some of the
information in the original file to save more space. This
is called &amp;ldquo;lossy&amp;rdquo; compression, as opposed to &amp;ldquo;lossless&amp;rdquo;
compression.&lt;/p&gt;
&lt;p&gt;Great! We&amp;rsquo;ve found a way to save more space. The problem
with lossy compression is that we have to decide which
information to throw away. Usually, this is frequencies
that the average human ear/eye can&amp;rsquo;t perceive. But, let&amp;rsquo;s
just say that some compression is a bit too &amp;ldquo;greedy&amp;rdquo; when it
comes to saving space and starts to cut into the band of
frequencies that can be perceived. Also note that
the design of these compression algorithms is an artform
and takes lots of careful consideration.&lt;/p&gt;
&lt;p&gt;The final problem I want to mention is the codec problem.
There are many different codecs available today, and for
each and every one of them to be useful, you need to have a
way to decode each and every one of them. Unfortunately,
this is sometimes very difficult.&lt;/p&gt;
&lt;p&gt;It could be a licensing
issue, where you don&amp;rsquo;t have the correct software installed
or purchased to actually decode that file on your computer.&lt;/p&gt;
&lt;p&gt;Or it could be a physical constraints issue, where your
computer isn&amp;rsquo;t powerful enough to decode the file at a fast
enough rate for you to view it without stuttering,
buffering, etc.&lt;/p&gt;
&lt;p&gt;Third, it could be a personal preference. Some people
have much more sensitive eyes/ears and need to have formats
that are more &lt;strong&gt;transparent&lt;/strong&gt;, meaning that the lossy file
is perceptually identical to the source it was encoded from.&lt;/p&gt;
&lt;p&gt;With all of these issues at play, I think there are several
key points to make:&lt;/p&gt;
&lt;h3 id=&#34;1-codecs-need-to-be-freely-available-for-widespread-use-with-no-strings-attached&#34;&gt;1. Codecs need to be freely available for widespread use with no strings attached.&lt;/h3&gt;
&lt;p&gt;Can&amp;rsquo;t stress this one enough: we need to make sure we are
doing everything possible to not let our information die
when a corporation or individual makes a decision that
impacts the &amp;ldquo;who, what, where, when, and how&amp;rdquo; of their codec
usage.&lt;/p&gt;
&lt;h3 id=&#34;2-lossless-compression-is-good-but-it-is-not-the-only-thing-we-need&#34;&gt;2. Lossless compression is good, but it is not the only thing we need.&lt;/h3&gt;
&lt;p&gt;We need to remember that not everyone has the ability to use
lossless codecs, whether that be because of internet
bandwidth limitations, storage limitation, or the like.
Instead, we need to continue to innovate in the lossy
compression space to narrow the perceptual gap between lossy
and lossless more and more.&lt;/p&gt;
&lt;h3 id=&#34;3-a-codec-should-never-become-obsolete&#34;&gt;3. A codec should never become obsolete.&lt;/h3&gt;
&lt;p&gt;This one may sound weird, but the fact is, if we&amp;rsquo;re talking
about long-term storage of information, we can&amp;rsquo;t let codecs
die, since there may come a day where we need a codec to
decode great-grandpa&amp;rsquo;s album that never made it big.&lt;/p&gt;
</description>
</item>
<item>
<title>OpenWRT &#43; Unbound &#43; adblock</title>
<link>https://beckmeyer.us/posts/openwrt_plus_unbound/</link>
<pubDate>Fri, 05 Feb 2021 19:03:15 -0500</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/openwrt_plus_unbound/</guid>
<description>&lt;p&gt;I decided to do some work on my Linksys WRT32X running OpenWRT to make it a
little more useful.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://nlnetlabs.nl/projects/unbound/about/&#34;&gt;Unbound&lt;/a&gt; is a DNS
resolver which I like because it&amp;rsquo;s recursive, meaning it directly queries the
root servers instead of relying on existing DNS servers run by Google,
Cloudflare, your ISP, or the like. I already have it running on several of my
servers and computers, but I figured it would be great if everything on my
network can use Unbound and be, well, &lt;em&gt;unbound&lt;/em&gt; from all of those intermediary
DNS servers.&lt;/p&gt;
&lt;p&gt;Luckily, OpenWRT already has Unbound packaged, and also has a useful LuCI app
that goes with it (LuCI is the graphical web interface that comes with OpenWRT).
All I had to do was install &lt;code&gt;luci-app-unbound&lt;/code&gt;, which pulls in all of the
necessary dependencies to run unbound.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/luci_software.png&#34; alt=&#34;LuCI: Software&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/luci_install.png&#34; alt=&#34;LuCI: Install&#34;&gt;&lt;/p&gt;
&lt;p&gt;After that finished installing, I
refreshed LuCI/OpenWRT and went to &amp;ldquo;Services&amp;rdquo; on the top, and there it is!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/luci_services.png&#34; alt=&#34;LuCI: Services -&amp;gt; Recursive DNS&#34;&gt;&lt;/p&gt;
&lt;p&gt;At this point, you&amp;rsquo;ll have to get your hands dirty. You can either dig through
some LuCI menus or SSH in and make some edits. For reference, I&amp;rsquo;m using
&lt;a href=&#34;https://github.com/openwrt/packages/blob/openwrt-19.07/net/unbound/files/README.md#parallel-dnsmasq&#34;&gt;&amp;ldquo;Parallel dnsmasq&amp;rdquo;&lt;/a&gt; section from the README for unbound in the OpenWRT packages (which
has a lot of other useful information as well!). Essentially, I made the edits
to &lt;code&gt;/etc/config/unbound&lt;/code&gt; and &lt;code&gt;/etc/config/dhcp&lt;/code&gt; after SSH&amp;rsquo;ing in. However, you
can make the same edits through LuCI.&lt;/p&gt;
&lt;p&gt;For the &lt;code&gt;/etc/config/unbound&lt;/code&gt; edits, you can make the edits to the file in
LuCI directly at &amp;ldquo;Services -&amp;gt; Recursive DNS -&amp;gt; Files -&amp;gt; Edit: UCI&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/unbound_config.png&#34; alt=&#34;LuCI: Edit /etc/config/unbound&#34;&gt;&lt;/p&gt;
&lt;p&gt;For the &lt;code&gt;/etc/config/dhcp&lt;/code&gt; edits, you can make the edits by finding the same
fields under &amp;ldquo;Network -&amp;gt; DHCP and DNS&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/dhcp_config.png&#34; alt=&#34;LuCI: Edit DHCP and DNS Settings&#34;&gt;&lt;/p&gt;
&lt;p&gt;However, the field names are different from the lines in the config, so they
would need to be researched to determine which fields in LuCI map to which
lines in &lt;code&gt;/etc/config/dhcp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;At this point (or maybe after restarting unbound and dnsmasq, which is a lot
easier using SSH and &lt;code&gt;/etc/init.d ... restart&lt;/code&gt; as well), OpenWRT should now
be using unbound for resolving all DNS lookups, while dnsmasq is only used for
DHCP-DNS.&lt;/p&gt;
&lt;p&gt;Bonus: you can also enable a nice status dashboard in LuCI under
&amp;ldquo;Services -&amp;gt; Recursive DNS -&amp;gt; Status&amp;rdquo;, but this requires installing several more
software packages: &lt;code&gt;unbound-control&lt;/code&gt; and &lt;code&gt;unbound-control-setup&lt;/code&gt;. You will also
need to change a line in &lt;code&gt;/etc/config/unbound&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
option unbound_control &amp;#39;0&amp;#39;
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;becomes&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
option unbound_control &amp;#39;1&amp;#39;
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A word of warning: there is another section on &amp;ldquo;Unbound and odhcpd&amp;rdquo; which
tries to cut out dnsmasq completely. However, when I tried to set this up,
I got myself into a lot of trouble (had to reset OpenWRT, re-install any extra
software packages, and restore configuration from backup). It is also possible that if you mess up
the configuration for the &amp;ldquo;Parallel dnsmasq&amp;rdquo; method, you could end up in a
similar error state and have to start over. Please be careful when doing this
and don&amp;rsquo;t change anything you&amp;rsquo;re not supposed to.&lt;/p&gt;
&lt;p&gt;Now, moving on to adblock, which should be &lt;strong&gt;much&lt;/strong&gt; simpler to setup. First,
install &lt;code&gt;luci-app-adblock&lt;/code&gt; and refresh. Navigate to &amp;ldquo;Services -&amp;gt; Adblock&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/adblock.png&#34; alt=&#34;Services -&amp;gt; Adblock&#34;&gt;&lt;/p&gt;
&lt;p&gt;Check the settings at the bottom. The only thing you need to get going is
to go to the &amp;ldquo;Blocklist Sources&amp;rdquo; tab and choose your blocklists.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/adblock_blocklist.png&#34; alt=&#34;Adblock: Blacklist sources&#34;&gt;&lt;/p&gt;
&lt;p&gt;The
&lt;a href=&#34;https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md&#34;&gt;adblock readme&lt;/a&gt;
has some more info on what each list is. After that,
make sure &amp;ldquo;Enabled&amp;rdquo; is checked under the &amp;ldquo;General Settings&amp;rdquo; tab:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/adblock_enable.png&#34; alt=&#34;Adblock: enable&#34;&gt;&lt;/p&gt;
&lt;p&gt;and click the &amp;ldquo;Refresh&amp;rdquo; button above:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://beckmeyer.us/adblock_refresh.png&#34; alt=&#34;Adblock: refresh&#34;&gt;&lt;/p&gt;
&lt;p&gt;Then you&amp;rsquo;re good to go; adblock should work out of the box with unbound; cheers!&lt;/p&gt;
&lt;p&gt;ADDENDUM: Another word of warning: once you&amp;rsquo;ve setup adblock, it will download
the blocklists, merge them into a single file at &lt;code&gt;/var/lib/unbound/adb_list.overall&lt;/code&gt;,
and try to restart unbound. I recommend not trying to view/interact with adblock
or unbound during this restart, which can take anywhere from 30 seconds - 2 minutes.
Just leave them alone in LuCI for a little bit&amp;hellip;&lt;/p&gt;
</description>
</item>
<item>
<title>Hello doas</title>
<link>https://beckmeyer.us/posts/hello_doas/</link>
<pubDate>Sat, 30 Jan 2021 15:15:55 -0500</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/hello_doas/</guid>
<description>&lt;p&gt;Today, I switched my workstation from &lt;code&gt;sudo&lt;/code&gt; to &lt;code&gt;doas&lt;/code&gt;. I&amp;rsquo;m running Void Linux,
and the process was fairly easy.&lt;/p&gt;
&lt;p&gt;First, I needed to figure out how to remove &lt;code&gt;sudo&lt;/code&gt; (yes, I realize I could have
installed &lt;code&gt;doas&lt;/code&gt; first, then removed &lt;code&gt;sudo&lt;/code&gt;, but I decided to do it the hard way.)
As it turns out, the &lt;a href=&#34;https://docs.voidlinux.org/xbps/advanced-usage.html#ignoring-packages&#34;&gt;advanced usage section of the XBPS manual&lt;/a&gt; details how to use the &lt;code&gt;ignorepkg&lt;/code&gt; entry in xbps.d with nothing
other than this exact use case! I created the file &lt;code&gt;/etc/xbps.d/20-ignorepkg-sudo.conf&lt;/code&gt; with contents&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ignorepkg=sudo
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and then ran &lt;code&gt;sudo xbps-remove sudo&lt;/code&gt; (an ironic command).&lt;/p&gt;
&lt;p&gt;After that, because I was stupid and removed &lt;code&gt;sudo&lt;/code&gt; before I had set up &lt;code&gt;doas&lt;/code&gt;,
I had to use plain-old &lt;code&gt;su&lt;/code&gt; to change to the root user and run &lt;code&gt;xi opendoas&lt;/code&gt;. I also
configured &lt;code&gt;doas&lt;/code&gt; in &lt;code&gt;/etc/doas.conf&lt;/code&gt; with the following:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# see doas.conf(5) for configuration details
permit nopass keepenv :admin
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I ran &lt;code&gt;groupadd admin&lt;/code&gt;, &lt;code&gt;usermod -aG admin joel&lt;/code&gt;, and then logged out so that my
user account would see the new group perms.&lt;/p&gt;
&lt;p&gt;And just like that, I can now run &lt;code&gt;doas xbps-install ...&lt;/code&gt; and all of my other commands,
just substituting &lt;code&gt;doas&lt;/code&gt; for &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The one thing I immediately missed was &lt;code&gt;sudoedit&lt;/code&gt;. Before I accidentally tried
to use &lt;code&gt;sudo&lt;/code&gt; for the first time, I had already accidentally tried to run &lt;code&gt;sudoedit&lt;/code&gt;
&lt;em&gt;at least&lt;/em&gt; 5 times. I had to fix this. I saw a discussion on Reddit where &lt;a href=&#34;https://www.reddit.com/r/linux/comments/l6y7nv/is_doas_a_good_alternative_to_sudo/gl4hs42?utm_source=share&amp;amp;utm_medium=web2x&amp;amp;context=3&#34;&gt;one user
suggested&lt;/a&gt; writing a script to replace the &lt;code&gt;sudoedit&lt;/code&gt; functionality.
I quickly starting hacking together something like that. I started with:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
mkdir -p /tmp/doasedit
doas cp $1 /tmp/doasedit/tmp_file
$EDITOR /tmp/doasedit/tmp_file
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And quickly ran into my first road-block. The script is going to have to change
the permissions of that file before the user can edit it. But if the script changes
the permissions, how can I restore it to the original location with the right
permissions? &lt;code&gt;cp /tmp/doasedit/tmp_file $1&lt;/code&gt; won&amp;rsquo;t work. I thought about just using
cat to overwrite the file contents in-place (&lt;code&gt;cat /tmp/doasedit/tmp_file &amp;gt; $1&lt;/code&gt;).
That &lt;em&gt;could&lt;/em&gt; create some issues if a program has the file open. Instead, a better option
is to create two copies of the file&amp;ndash;one for editing, and one for preserving file
attributes:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
mkdir -p /tmp/doasedit
doas cp $1 /tmp/doasedit/edit
doas chown -R $USER:$USER /tmp/doasedit/edit
doas cp $1 /tmp/doasedit/file
$EDITOR /tmp/doasedit/edit
cat /tmp/doasedit/edit | doas tee /tmp/doasedit/file 1&amp;gt;/dev/null
doas mv -f /tmp/doasedit/file $1
rm -rf /tmp/doasedit
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Of course, the issue with this is that it only works with absolute paths.
I want to make it work for relative paths as well. I&amp;rsquo;m going to take advantage
of &lt;code&gt;realpath&lt;/code&gt;, which is part of the &lt;code&gt;coreutils&lt;/code&gt; package from Void. As a bonus, this
will also take care of the edge case where the given file is a symlink (IIRC,
&lt;code&gt;sudoedit&lt;/code&gt; didn&amp;rsquo;t follow symlinks, so I may be diverging here):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
mkdir -p /tmp/doasedit
srcfile=&amp;#34;$(realpath $1)&amp;#34;
doas cp $srcfile /tmp/doasedit/edit
doas chown -R $USER:$USER /tmp/doasedit/edit
doas cp $srcfile /tmp/doasedit/file
$EDITOR /tmp/doasedit/edit
cat /tmp/doasedit/edit | doas tee /tmp/doasedit/file 1&amp;gt;/dev/null
doas mv -f /tmp/doasedit/file $srcfile
rm -rf /tmp/doasedit
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, it works&amp;hellip;okay-ish. It can only be used in one instance currently
since I hard-coded &lt;code&gt;/tmp/doasedit/file&lt;/code&gt; and &lt;code&gt;/tmp/doasedit/edit&lt;/code&gt;, but that&amp;rsquo;s easily fixed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
destfile_pfx=&amp;#34;$(cat /dev/urandom | tr -cd &amp;#39;a-f0-9&amp;#39; | head -c 32)&amp;#34;
while [ -d &amp;#34;/tmp/doasedit/$destfile_pfx&amp;#34; ]; do
destfile_pfx=&amp;#34;$(cat /dev/urandom | tr -cd &amp;#39;a-f0-9&amp;#39; | head -c 32)&amp;#34;
done
mkdir -p /tmp/doasedit/$destfile_pfx
srcfile=&amp;#34;$(realpath $1)&amp;#34;
doas cp $srcfile /tmp/doasedit/$destfile_pfx/edit
doas chown -R $USER:$USER /tmp/doasedit/$destfile_pfx/edit
doas cp $srcfile /tmp/doasedit/$destfile_pfx/file
$EDITOR /tmp/doasedit/$destfile_pfx/edit
cat /tmp/doasedit/$destfile_pfx/edit | doas tee /tmp/doasedit/$destfile_pfx/file 1&amp;gt;/dev/null
doas mv -f /tmp/doasedit/$destfile_pfx/file $srcfile
rm -rf /tmp/doasedit/$destfile_pfx
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, the only thing missing is the check to see if the file was actually
edited:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
cat /tmp/doasedit/$destfile_pfx/edit | doas tee /tmp/doasedit/$destfile_pfx/file 1&amp;gt;/dev/null
if cmp -s &amp;#34;/tmp/doasedit/$destfile_pfx/file&amp;#34; &amp;#34;$srcfile&amp;#34;; then
echo &amp;#34;Skipping write; no changes.&amp;#34;
else
doas mv -f /tmp/doasedit/$destfile_pfx/file $srcfile
fi
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I put this in a &lt;a href=&#34;https://github.com/AluminumTank/doasedit&#34;&gt;repo on GitHub&lt;/a&gt; if
anyone is interested. I know that a major
weakness of this script is the number of times it calls &lt;code&gt;doas&lt;/code&gt;, which could
break flows where password is required every time &lt;code&gt;doas&lt;/code&gt; is run.&lt;/p&gt;
</description>
</item>
<item>
<title>Volatile Mediums</title>
<link>https://beckmeyer.us/posts/volatile_mediums/</link>
<pubDate>Fri, 29 Jan 2021 23:36:00 -0500</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/posts/volatile_mediums/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been thinking a lot about storage mediums [1] &amp;ndash; especially in the long-term.&lt;/p&gt;
&lt;p&gt;Technology has made a lot of progress. Digital storage mediums started out only being
able to store &lt;a href=&#34;https://en.wikipedia.org/wiki/Tape_drive&#34;&gt;224KB on a tape drive&lt;/a&gt;
for an average lifetime of &lt;a href=&#34;https://blog.storagecraft.com/data-storage-lifespan/&#34;&gt;&lt;em&gt;up to&lt;/em&gt; 30 years&lt;/a&gt;.
Now, we can store terrabytes of data on hard drives and solid-state drives. However,
no one ever really answered the question about long-term storage.&lt;/p&gt;
&lt;p&gt;(Note: the following is based off an assumption that the storage medium is only
being used to make backups or archive data. The device itself could be unplugged and stored
when no backup is in progress.)&lt;/p&gt;
&lt;p&gt;Even though &lt;em&gt;theoretically&lt;/em&gt; hard drives could store data for 20+ years, random bit flips, drive
failure, etc. all make hard drives too volatile of an option. As always, of course
redundancy takes away some of these issues.&lt;/p&gt;
&lt;p&gt;SSDs are in an even worse position: they cost significantly more than hard drives
per TB right now, and last I heard, there were still issues with bit fade when
unpowered.&lt;/p&gt;
&lt;p&gt;CD/DVD is sounding a lot better, but there are some serious issues here too.
Variable quality directly impacts the storage lifetime. Physically storing the
discs is a lot more risky since the disc itself doesn&amp;rsquo;t have as much built-in
protection as a hard drive or SSD has. You&amp;rsquo;ll need a much larger quantity to
store the terrabytes of data that you can easily dump on one hard drive. And finally, life
expectancy is still fairly low &amp;ndash; while manufacturers of recordable discs (the &amp;lsquo;R&amp;rsquo; in CD-R, DVD-R, etc.)
claim life expectancies of 100-200 (!) years under optimal conditions, others are &lt;em&gt;slightly&lt;/em&gt; more conservative,
&lt;a href=&#34;https://www.clir.org/pubs/reports/pub121/sec4/&#34;&gt;giving an estimate of 30 years&lt;/a&gt;.
Oh, and remember how I mentioned this is for recordable discs? That means they&amp;rsquo;re single write.
The random access (RW - CD-RW, DVD-RW, etc.) discs have even lower life expectancies.&lt;/p&gt;
&lt;p&gt;All in all, humanity has not gotten very far with the digital storage medium.
All of these life expectancies have an inconsequential variance when we zoom out
to the century view of history.&lt;/p&gt;
&lt;p&gt;[1] And no, I&amp;rsquo;m not talking about the kind you pay to see your dead great-great-aunt to figure out if
you&amp;rsquo;re actually related to George Washington.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This is intended to be the beginning of a learning series/personal study on the issues surrounding
information preservation, digital permanence, and their related issues.&lt;/em&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>Contact</title>
<link>https://beckmeyer.us/contact/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<author>joel@beckmeyer.us (Joel Beckmeyer)</author>
<guid>https://beckmeyer.us/contact/</guid>
<description>&lt;p&gt;Joel Beckmeyer&lt;br&gt;
Matrix: &lt;a href=&#34;https://matrix.to/#/@joel:thebeckmeyers.xyz&#34;&gt;@joel:thebeckmeyers.xyz&lt;/a&gt;&lt;br&gt;
Fediverse: &lt;a href=&#34;https://social.beckmeyer.us/TinfoilSubmarine&#34;&gt;@TinfoilSubmarine@social.beckmeyer.us&lt;/a&gt;&lt;/p&gt;
</description>
</item>
</channel>
</rss>