diff options
-rw-r--r-- | _drafts/my-preferred-tools.md | 4 | ||||
-rw-r--r-- | posts/autoinstall-openbsd-on-qemu.md | 6 | ||||
-rw-r--r-- | posts/install-rust-analyzer-on-openbsd-current.md | 9 | ||||
-rw-r--r-- | posts/unix-domain-socket-forwarding-with-openssh.md | 6 |
4 files changed, 14 insertions, 11 deletions
diff --git a/_drafts/my-preferred-tools.md b/_drafts/my-preferred-tools.md index b0a1d65..bef561d 100644 --- a/_drafts/my-preferred-tools.md +++ b/_drafts/my-preferred-tools.md @@ -13,8 +13,8 @@ Follow the hyperlinks at your own risk. You might end up in a rabbit hole. I prefer to use and _compose_ small, sharp tools as coined by Eric Steve Raymond in his book [The Art of Unix Programming](http://www.catb.org/esr/writings/taoup/). -Think [sed](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html), [rsync](https://rsync.samba.org/), [cURL](https://curl.haxx.se/), and [friends](https://en.wikipedia.org/w/index.php?title=List_of_Unix_commands&oldid=892119460). -As such, I feel most comfortable on the command-line of Unix-like, do-it-yourself operating systems like [Arch Linux](https://www.archlinux.org/), [FreeBSD](https://www.freebsd.org/), and [OpenBSD](https://www.openbsd.org/). +Think [sed](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html), [rsync](https://rsync.samba.org/), [cURL](https://curl.se/), and [friends](https://en.wikipedia.org/w/index.php?title=List_of_Unix_commands&oldid=892119460). +As such, I feel most comfortable on the command-line of Unix-like, do-it-yourself operating systems like [Arch Linux](https://archlinux.org/), [FreeBSD](https://www.freebsd.org/), and [OpenBSD](https://www.openbsd.org/). Most of the time, you'll see my terminal [Solarized](https://ethanschoonover.com/solarized/) and tiled by [tmux](https://github.com/tmux/tmux). When it comes to editing source code and markup, I rely on _the ubiquitous text editor_ [Vim](https://www.vim.org/) with a few, handpicked plug-ins like [Fugitive](https://github.com/tpope/vim-fugitive). diff --git a/posts/autoinstall-openbsd-on-qemu.md b/posts/autoinstall-openbsd-on-qemu.md index ac1e985..748bc26 100644 --- a/posts/autoinstall-openbsd-on-qemu.md +++ b/posts/autoinstall-openbsd-on-qemu.md @@ -38,7 +38,7 @@ We will perform the following steps: We will use the following tools: -* [curl](https://curl.haxx.se/), a data transfer tool (and library) +* [curl](https://curl.se/), a data transfer tool (and library) * [OpenSSH](https://www.openssh.com/), a remote login tool * [QEMU](https://www.qemu.org/), a virtual machine monitor (or hypervisor) * [rsync](https://rsync.samba.org/), an incremental file transfer tool @@ -58,7 +58,7 @@ First, we create the relevant part of the [directory layout](https://www.openbsd $ mkdir -p mirror/pub/OpenBSD/6.7/amd64 -Second, we fetch the base public key from the official HTTPS mirror using [curl(1)](https://curl.haxx.se/docs/manpage.html): +Second, we fetch the base public key from the official HTTPS mirror using [curl(1)](https://curl.se/docs/manpage.html): $ curl \ --output mirror/pub/OpenBSD/6.7/openbsd-67-base.pub \ @@ -251,7 +251,7 @@ I think it should be possible to avoid that using a corresponding guest forwardi You can also verify the [SHA256 checksums](https://ftp.openbsd.org/pub/OpenBSD/6.7/amd64/SHA256) of the fetched files if you cannot use [signify(1)](https://man.openbsd.org/OpenBSD-6.7/signify). [^response-file]: - You can serve per-host response files for [autoinstall(8)](https://www.tumfatig.net/20190426/openbsd-automatic-upgrade/) by prefixing the MAC address or the hostname. + You can serve per-host response files for [autoinstall(8)](https://www.tumfatig.net/2019/openbsd-automatic-upgrade/) by prefixing the MAC address or the hostname. Besides, you can add the response file to the RAM disk kernel `bsd.rd` using [rdsetroot(8)](https://man.openbsd.org/OpenBSD-6.7/rdsetroot). [^restrict-network]: diff --git a/posts/install-rust-analyzer-on-openbsd-current.md b/posts/install-rust-analyzer-on-openbsd-current.md index 06efa2c..0d59c2c 100644 --- a/posts/install-rust-analyzer-on-openbsd-current.md +++ b/posts/install-rust-analyzer-on-openbsd-current.md @@ -2,7 +2,7 @@ title: "Install rust-analyzer on OpenBSD -current" description: "How to install the language server for Rust from source without rustup." published: 2022-01-04 -updated: 2022-04-08 +updated: 2022-04-28 --- The Rust Programming Language is anything but small. @@ -10,7 +10,7 @@ One thing that helped me find my way through the language and its libraries is t The [manual](https://rust-analyzer.github.io/manual.html) lists numerous compatible editor integrations. For example, I'm happy with using Vim with [vim-lsp](https://github.com/prabirshrestha/vim-lsp) and [asyncomplete.vim](https://github.com/prabirshrestha/asyncomplete.vim). -The project provides [pre-compiled binaries](https://github.com/rust-analyzer/rust-analyzer/releases) for Linux, macOS, and Windows. +The project provides [pre-compiled binaries](https://github.com/rust-lang/rust-analyzer/releases) for Linux, macOS, and Windows. However, installation from source was slightly trickier than expected. So here's how I installed rust-analyzer from source on OpenBSD -current. The process should work on other platforms alike, especially without `rustup`. @@ -24,7 +24,7 @@ Second, compile and install the rust-analyzer binary from source. See errata below if the the command fails. $ cargo install \ - --git https://github.com/rust-analyzer/rust-analyzer.git \ + --git https://github.com/rust-lang/rust-analyzer.git \ --branch release \ --force \ --bin rust-analyzer \ @@ -56,6 +56,7 @@ I've also added the above commands to my local update script to keep rustc, rust ## Errata +8 April 2022: Sometimes Cargo fails to install crates from Git repositories due to an incompatible version of libgit2. If so, you can install the latest weekly release of rust-analyzer from [crates.io](https://crates.io/crates/ra_ap_rust-analyzer) as follows: @@ -66,3 +67,5 @@ If so, you can install the latest weekly release of rust-analyzer from [crates.i --locked \ ra_ap_rust-analyzer +28 April 2022: +The Git repository has moved to <https://github.com/rust-lang/rust-analyzer>. diff --git a/posts/unix-domain-socket-forwarding-with-openssh.md b/posts/unix-domain-socket-forwarding-with-openssh.md index 295b0c2..f06846b 100644 --- a/posts/unix-domain-socket-forwarding-with-openssh.md +++ b/posts/unix-domain-socket-forwarding-with-openssh.md @@ -56,7 +56,7 @@ For example, the following command uses the infamous [netcat](https://nc110.sour As far as I know, you have two practical options to control access to forwardings: 1. Add user-specific rules to your firewall of choice, if supported. -For example, the [owner module](http://ipset.netfilter.org/iptables-extensions.man.html#lbBP) of [`iptables(8)`](http://ipset.netfilter.org/iptables.man.html) enables you to match the user ID and the group ID of a local packet creator. +For example, the [owner module](https://ipset.netfilter.org/iptables-extensions.man.html#lbBP) of [`iptables(8)`](https://ipset.netfilter.org/iptables.man.html) enables you to match the user ID and the group ID of a local packet creator. 1. Use [Unix domain sockets](https://en.wikipedia.org/w/index.php?title=Unix_domain_socket&oldid=949050080) instead of TCP ports, and protect the special socket files just like regular files --- i.e., set the file owner, group, and mode using [`chown(8)`](https://man.openbsd.org/OpenBSD-6.6/chown) and [`chmod(1)`](https://man.openbsd.org/OpenBSD-6.6/chmod). @@ -130,7 +130,7 @@ Finally, a client may connect to this socket as follows --- regardless of how we $ curl http://localhost:3000/ Unfortunately, [`ssh(1)`](https://man.openbsd.org/OpenBSD-6.6/ssh)'s `ExitOnForwardFailure` option does not catch missing permissions to access the socket file. -Thus, if the final [`curl(1)`](https://curl.haxx.se/docs/manpage.html) command fails and you cannot actually use the forwarding, please check the group and the mode of the socket file created by [`socat(1)`](http://www.dest-unreach.org/socat/doc/socat.html) on the remote host. +Thus, if the final [`curl(1)`](https://curl.se/docs/manpage.html) command fails and you cannot actually use the forwarding, please check the group and the mode of the socket file created by [`socat(1)`](http://www.dest-unreach.org/socat/doc/socat.html) on the remote host. You can set the group and mode using the corresponding `UNIX-LISTEN` options. ## Conclusion @@ -168,6 +168,6 @@ You can restrict the socket's file name by forcing a special command instead of $ nc -lkU foo.sock 0<backpipe \ | nc 127.0.0.1 8080 1>backpipe - However, in practice, the second command did not work reliably on [OpenBSD 6.6](https://www.openbsd.org/66.html) and [Arch Linux](https://www.archlinux.org/) in June 2020. + However, in practice, the second command did not work reliably on [OpenBSD 6.6](https://www.openbsd.org/66.html) and [Arch Linux](https://archlinux.org/) in June 2020. I suspect, it's got something to do with an early EOF or standard output buffering. Please drop me a mail if you can help me out. |