Introduction
Introduction Statistics Contact Development Disclaimer Help
Adding new phlog and minor updates. - gopherhole - My website source code.
Log
Files
Refs
---
commit 2eba228d941a46b38989fab96a5b2ea6a88c65c6
parent 69749558318b3f12e6188c2386266529bac171cb
Author: Jay Scott <[email protected]>
Date: Sat, 11 Feb 2023 14:49:32 +0000
Adding new phlog and minor updates.
Diffstat:
M bin/sync.sh | 9 ++++++++-
M index.gph | 5 +++--
M meta/email.txt | 18 +++++++++++-------
M phlog/014.txt | 2 +-
A phlog/015.txt | 120 +++++++++++++++++++++++++++++…
5 files changed, 143 insertions(+), 11 deletions(-)
---
diff --git a/bin/sync.sh b/bin/sync.sh
@@ -1 +1,8 @@
-rsync -vz --delete --exclude=files/*.tar.gz --exclude=git* --exclude=.git* --e…
+openrsync -v \
+ --delete \
+ --exclude=files/*.tar.gz \
+ --exclude=git* \
+ --exclude=drafts* \
+ --exclude=.git* \
+ --exclude=bin* \
+ -a . jay.scot:/srv/gopher
diff --git a/index.gph b/index.gph
@@ -10,7 +10,8 @@
PHLOG
-[0|2023-02-05 ... Re-Evaluating my local mail setup with OpenSMTPD|phlog/014.t…
+[0|2023-02-11 ... An OpenBSD manpage led me down a rabbit hole|phlog/015.txt|s…
+[0|2023-02-05 ... Re-evaluating my local mail setup with OpenSMTPD|phlog/014.t…
[0|2023-02-03 ... Finally, I switched over to OpenBSD|phlog/013.txt|server|por…
[0|2023-01-29 ... Automating my infra deployment and configuration|phlog/012.t…
[0|2023-01-14 ... Reducing my footprint, using a mini-pc|phlog/011.txt|server|…
@@ -35,6 +36,6 @@ OTHER
CONTACT
[0|email|meta/email.txt|server|port]
-[0|gpg (0726AF07C73389E1E4475B7EC88BBC696A39CCB0)|meta/jay.scot.asc|server|por…
+[0|gpg (0726 AF07 C733 89E1 E447 5B7E C88B BC69 6A39 CCB0)|meta/jay.scot.asc|s…
finger me ... echo | nc jay.scot 79
diff --git a/meta/email.txt b/meta/email.txt
@@ -1,12 +1,16 @@
--[ Email
-I am really not sure if email address harvesting is still around gopher
-these days, maybe they harvest via the http -> gopher proxy's. Either
-way with the below command run on a shell will reveal my email address.
+ | . |/ PGP,
+ \.-._ \ _.=^-.__, .-''"\ Please
+ // _\ | ' < [@ ) / '< [@ |
+ \\ '(_\) .' ' `-- \
+ `.,_.'. .'(_ )`. |
+ `-._.\ -' ,,;,,, ' |
+ | \ |"""''''''""| .'
+ | [_ ===== / /
+ \ | `----./ |
+ `. `,,, ,, ,;
- echo "[email protected]" | tr '[a-z]' '[n-za-m]'
-
-
-If you are contacting me then please use PGP, if possible.
+ echo "[email protected]" | tr '[a-z]' '[n-za-m]'
diff --git a/phlog/014.txt b/phlog/014.txt
@@ -2,7 +2,7 @@
[014]
---[ Re-Evaluating my local mail setup with OpenSMTPD
+--[ Re-evaluating my local mail setup with OpenSMTPD
This one is not limited to OpenBSD, but something I came across and
diff --git a/phlog/015.txt b/phlog/015.txt
@@ -0,0 +1,120 @@
+[jay.scot]
+[015]
+
+
+--[ An OpenBSD manpage led me down a rabbit hole
+
+
+I learned about OpenRsync [0] this week while I continue to dive into
+OpenBSD. I use rsync quite often, for backing up my ~/ to an external
+disk, which I hadn't quite got around to doing yet since the switch. It
+wasn't until late this week that I read a random article that mentioned
+OpenRsync, which was a drop-in replacement for rsync. Fantastic, I can
+use this instead of rsync.
+
+
+So off I go and try running the opensync command which, as expected, was
+installed and working. Next, I reviewed the man page to see if there
+were any new features or slight differences, but this led me to some
+confusion. You see, the examples in the man pages give the command to
+run as rsync instead of opensync. Here is a section of the man page
+
+
+ EXAMPLE:
+ % rsync -t ../src/bar ../src/baz host:dest
+
+
+So I ran the rsync command, and it also worked. I thought maybe they
+have a symlink from rsync to openrsync or something. I didn't really
+think much about it and continued testing my backup script, hoping
+I didn't have to change anything with it. Time to test it, it worked
+perfectly fine, great! For clarity's sake, I changed the script to use
+the openrsync command instead of rsync and then this error happened.
+
+
+ $ openrsync: -z not supported yet
+
+
+Wait what? I was super confused for a moment are they different
+programs? Time to run a few commands to figure out whats going on:
+
+
+ $ which rsync
+ /usr/local/bin/rsync
+
+ $ which openrsync
+ /usr/bin/openrsync
+
+ $ rsync --version
+ rsync version 3.2.5 protocol version 31
+
+ $ openrsync --version
+ openrsync: protocol version 27
+
+ $ pkg_info -m | grep rsync
+ rsync-3.2.5pl0 mirroring/synchronization over low bandwidth links
+
+
+Aha! So at some point I must have manually installed GNU rsync via
+pkg_add. I removed the rsync package and tried to figure out how the
+rsync command the manpage gave was supposed to work. Did I break
+something when installing the GNU rsync version? The next step was
+downloading the OpenBSD source and looking at the Makefile for opensync.
+
+
+ $ git clone https://github.com/openbsd/src.git openbsd-src
+ $ cd openbsd-src/usr.bin/opensync
+ $ /bin/ksh: cd: /home/jay/src/openbsd-src/usr.bin/opensync -
+ No such file or directory
+
+
+Okay, what is going on? I dig around a bit more and find usr.bin/rsync
+and take a look at the Makefile, which makes things clearer. OpenRsync
+is built under usr.bin/rsync, but compiled as openrsync. I also noticed
+that the manpage is called rsync.1 but then symlinked to openrsync.1,
+seems odd.
+
+
+So the end result is the manpage example is wrong and combined with me
+having already installed GNU rsync at somepoint added to the confusion!
+I wasn't expecting that, time to figure out how to submit a patch so
+that anyone as daft as me doesn't run into the same rabbit hole. I edit
+the man page and change the rsync examples to openrsync, confirming it
+still builds etc. Then read over the great guide on submitting the patch
+[1].
+
+
+I am surprised that this has not been spotted before, so before I submit
+the patch, I search the tech mailing list. Sure enough, there was a diff
+posted about a year ago [2] with the updated commands. The reply to the
+patch was the following:
+
+
+ > sorry, i think this one got overlooked! you can check in the
+ > archives, but i think the consensus was that when it's ready
+ > openrsync will be renamed but, for now, the examples should
+ > stay, even if out of kilter.
+
+ > i'm sure another dev can pick this up if i'm way off the mark.
+
+ > jmc
+
+
+There it is, openrsync will be renamed to rsync at some point which also
+explains why the manpage is called rsync and symlinked to openrsync in
+the source directory. No need to submit the patch after all.
+
+
+I had fun with this, I learned about the patch process for OpenBSD, had
+a brief look into the OpenBSD source code, and learned about a new tool.
+Though my TODO list has a few extra items, I really should look into
+AnonCVS and maybe upgrade my system to -current if I intend on
+submitting patches.
+
+
+0. https://man.openbsd.org/openrsync
+1. https://www.openbsd.org/faq/faq5.html#Diff
+2. gopher://jay.scot/0/files/misc/openrsync-patch.txt
+
+
+.EOF
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.