techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

5.4K
active users

#posix

6 posts5 participants0 posts today

Ah, "Rustcraft," because the world was desperately awaiting a #POSIX #shell rebooted in #Rust. 🙄 Who knew reinventing the shell would be the pinnacle of human achievement? 🚀 Let's all pretend it's revolutionary while we rewrite everything – or maybe just the README. 👏
github.com/rustcoreutils/posix #Rustcraft #programming #innovation #tech #news #HackerNews #ngated

Core POSIX command line utilities in safe Rust. Contribute to rustcoreutils/posixutils-rs development by creating an account on GitHub.
GitHubposixutils-rs/sh at main · rustcoreutils/posixutils-rsCore POSIX command line utilities in safe Rust. Contribute to rustcoreutils/posixutils-rs development by creating an account on GitHub.
Continued thread

This, btw, was yet another reminder of the horrible can of worms #stdio's #buffering is.

I created a little tool running as a child process to do the *actual* #PAM authentication, so it will be possible to have this run as root while the real service drops all privileges. This little tool uses a simple line-based protocol for communication on stdin/stdout. It worked well when testing directly on the terminal.

On the first real test though, my service just went hanging. 🙄 I suspected a deadlock caused by pthread mutexes. Wasted quite some time looking into that. Then I finally realized communication over the pipes was stalled.

Ok, just set buffering mode to "line buffering" after fdopen'ing the #pipe. Turned out that didn't help either. I *assume* that even in the child process, the stdio streams automatically created on the pipes were somehow fully buffered. But at that point, I was really fed up with trial and error and rewrote the whole mess to do I/O using plain #POSIX APIs (read, write), sidestepping any buffering. Worked like a charm. 🙈

Continued thread

It's possible you've not heard of #boxyBSD

I was lucky to get a TIL moment when @stefano boosted it's existence into my feed.

However you should know about it, learn something about the user perspective from proxmox in the process, while working with a boxyBSD VM.

Here are some nice screencaps of the boxyBSD site so you can ask nicely for a VM and learn to play with one of the *BSD flavours from a distance.

I'm sure you can duckduckgo the address of boxyBSD when you analyze the screencaps, right?

🖋️ #bash #proxyLB #freeBSD #boxyBSD #sh #zsh #ksh #csh #netBSD #openBSD #POSIX #proxmox #loadbalancer

Continued thread

It has arrived. proxyLB v1.1.0 the loadbalancer for proxmox clusters. Instead of telling you the features of this major version I invite you to read about it yourself, download proxyLB then play with it.

As with any great Open Source project, this has grown out of a necessity that @gyptazy has for his other amazing project boxyBSD, which just needs a versatile tool like this.

Now go and play.

gyptazy.com/introducing-proxlb

🖋️ #bash #proxyLB #freeBSD #boxyBSD #sh #zsh #ksh #csh  #netBSD #openBSD #POSIX #proxmox #loadbalancer

#LazyWeb: At some point 15-20 years ago, I was reading some Austin’s Group rationale for deprecating ucontext_t and friends, which said it was the only safe way of jumping out of a signal handler but was problematic because people were using it to implement userspace threading and it was not safe to do so because this required synchronising state that was not always visible in userspace. I can no longer find this and it appears not to be in the rationale section for any #POSIX spec I’ve checked. Does anyone have the reference to hand?

Continued thread

I have found an interesting quirk with my freeBSD installation, running on my SATA SSD, which I mount through an USB tray, directly to the USB port on the computer.

As long as i leave the second port of the USB tray open, everything runs fine and smooth. The moment I mount another drive in the second port, freeBSD only does the initial part of the startup sequence and then complains that it cannot go any further.

No further explanation given

Seeking for log files is not an option because the operating system itself doesn't boot.

Where in the documentation should I look for this type of issue?

🖋️ #bash #freeBSD #boxyBSD #sh #zsh #ksh #csh  #netBSD #openBSD #POSIX #AskFediverse

Continued thread

Finally I've captured some sh photographs of the running minimal freeBSD system

No x.org here. Even mc can't run after the pkg install! It needs proc filesystems installed mounted cfg first

I was surprised that I now need to read documents to find out how my second HDMI IPS LED display can be turned on in text mode, something that happens automatically in Linux out of the box 🎁

🖋️ #bash #freeBSD #boxyBSD #sh #zsh #ksh #csh  #netBSD #openBSD #POSIX

Continued thread

As you can see here the first part of my freeBSD installation is going smoothly

My 2.5GBit NIC it's not supported but my Wi-Fi NIC is properly supported so everything is good, so far

I've just installed the free BSD handbook which requires the network so extra proof that my Wi-Fi NIC is working magnificently

What is also evident is that you should not ignore warnings that you're HDD set up will not boot. It turns out that the drive I used, which has an MBR, not GPT, is not usable in the configuration where I made a second partition / and a third partition /home, the installation goes smoothly but of course it doesn't boot and not surprising GRUB Linux, cannot find a way to make it boot.

So now I have to make a much smaller partition on a GPT USB SSD

It's wise to listen to the options of the installer. Using my GPT partitioned SATA SSD, mounted on a USB tray 📥 I was able to install freeBSD base config without a hitch, jumping into full blown tcsh mode

Extra images will follow in a minute

🖋️ #bash #freeBSD #boxyBSD #sh #zsh #ksh #csh  #netBSD #openBSD #POSIX

Due to my brain dead ISP which does not support IPv6 for clients in 2K25(!) I cant access my boxyBSD box.

boxyBSD is thus so far away from me :(

I have a client connection with fixed IPv4 IP somewhere, but it collapses when I use a free available IPv4 to IPv6 tunnel service.

Instead of sitting and twiddling my fingers on my Bass guitar(s) generating random() notes, I decided to get an image of the latest freeBSD and play with it locally, until I can get my ISP to provide all of us with a (set) of free IPv6 addresses because we pay them for a full service here in my country

>> log

$ wget -c download.freebsd.org/releases/
--2025-03-23 13:32:46-- download.freebsd.org/releases/
Resolving download.freebsd.org (download.freebsd.org)... 200.160.6.227, 2001:12ff:0:6224::15:0
Connecting to download.freebsd.org (download.freebsd.org)|200.160.6.227|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 4826406912 (4.5G), 4255655894 (4.0G) remaining [application/octet-stream]
Saving to: ‘FreeBSD-14.2-RELEASE-amd64-dvd1.iso’

-14.2-RELEASE-amd64-dvd1 12%[++++ ] 559.57M 1.01MB/s eta 75m

<< ^Z

Yes they give a puny 1MB speed, you read that correctly

🖋️ #bash #freeBSD #boxyBSD #sh #zsh #ksh #csh #netBSD #openBSD #POSIX

Continued thread

Giving credits to the programmers of
file-roller(1)

I'm really in a user interface mood right now. Only playing with the mouse meanwhile I'm making a backup of the long download of the massive multiplayer online role-playing game SWTOR

I mounted the source partition using thunar(1)
Then I physically mounted the drive in the tray where the destination was going to reside. After invoking file-roller I smoothly dragged the directory of SWTOR and dropped it into the Archiver which gave me the possibilities to make a tgz file of it and a dropdown where I could save tgz archive

Without lifting any more fingers than necessary I prepared the tape archive which would be gz compressed afterwards.

Since we're talking about a massive 56 GB it would take a while. As the progress bar slowly crept forward I did other things on other machines including Androids feeling content at the ease of which user interfaces bring sweet and smooth operations to us when we don't want to use any of our favorite shells

#bash #csh #ksh #sh #SCSI #programming #POSIX
#Archiver #compression #tar #gz #tgz #UI #XFce

#Mmorpg #SWTOR #gaming #Backup

wiki.gnome.org/Apps/FileRoller

gitlab.gnome.org/GNOME/file-ro

docs.xfce.org/xfce/thunar/star

Continued thread

You can download a live image of gparted and work with the latest version with ease. My debian based distro has GParted 1.3.1 which is quite behind v1.7.0-1

Im downloading the latest right now!

log
$ wget -c cfhcable.dl.sourceforge.net/pr
--2025-03-16 11:54:11-- cfhcable.dl.sourceforge.net/pr
Resolving cfhcable.dl.sourceforge.net (cfhcable.dl.sourceforge.net)... 146.71.73.5
Connecting to cfhcable.dl.sourceforge.net (cfhcable.dl.sourceforge.net)|146.71.73.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 589299712 (562M) [application/octet-stream]
Saving to: ‘gparted-live-1.7.0-1-amd64.iso?viasf=1’

gparted-live-1.7.0-1 9%[==> ] 55.49M 286KB/s eta 28m 15s
^Z

gparted.org/livecd.php

Giving credit to the programmers of GPARTED(8)

gparted works its magic, by entering correct parameters to a suite of partition control & editing commands, which are sh envoked, so you can easily manipulate your partitions on all your SSDs HDDs from the comfort of your UI

When you want to batch manipulate partitions, you can study the log output and make sh scripts yourself, controlling partitions anywhere.
You also have the convenience of running gparted from sh so it still works its magic for you, without the UI!

I usually run cfdisk gdisk fdisk when I partition a fresh mechanical or SSD, later on I invoke gparted when I want to resize or move them

it also runs important commands at the end so that the kernel gets to know your new partition layout, which makes rebooting your machine to use them unneeded

I shrunk and resized a partition where I installed a program, which needed 75GB (*1024!) as installation space but only uses 56GB in the end. I left 12GB of breathing room on the partition after the shrink and of course grew the partition before with the same size, minus the alignment snip of 1MB

log:
myserver kernel: JFS: nTxBlock = 8192, nTxLock = 65536
myserver kernel: SGI XFS with ACLs, security attributes, realtime, scrub, repair, quota, debug enabled
myserver kernel: sdb: sdb1 sdb2 sdb3 sdb4
myserver kernel: sdb: sdb1 sdb2 sdb3 sdb4
^Z

@altbot

gparted.org