Lenovo 500S on FreeBSD -CURRENT, hashtree in Go, updating tracker lists using perl

Hashtree in Go

So I’ve been mildly addicted to Go – and I know why. It tricks you into thinking it is a scripting language by having awesome libraries but it is really more like C with some super cool features (that are easy to use).

I wrote my program hashtree in Perl and bootstrapped s3cmd to do the uploading. The program resembled something made with glue and masking tape. But it works, it’s fast, it’s cross platform and I use it every day.

I rewrote it in Go and it has less than 30% of the features – but it can now be compiled into a single binary – this is possible with Perl as well but I couldn’t get any Perl S3 libraries to work.

The reason why it has less features is that some things are painful do to in Go and are very easy and fun to do in Perl. Also I wanted this to be scriptable and work more like a traditional Unix tool – do one thing and do it well.

https://github.com/wilyarti/hashtree is where you can find both versions.

I still need to add file corruption checking and better error reporting in the Go version – but for now it is complete and has the following features:

  • Data deduplication
  • Filesystem snapshots
  • Client side 256bit AES encryption
  • Support for any S3 compatible server
hashtree snapshots and upload files to a S3 server
hashseed deploys a snapshot
hashlist finds all snapshots on server

Screenshot_2018-03-04_06-00-23.png

Perl and tracker lists

I was having problems with transmission contacting UDP trackers so I wrote this perl script to insert trackers:

while () {
    unless ($_ eq "\n") {
        $t = $_;
        for (1 .. 4) {
                `transmission-remote -t $_ -td $t`;
        }
    }
}

Just run the script and point it at a trackers.txt for or pipe a list trackers into it!

Lenovo 500S

So the last bit of news is I did all of this on FreeBSD -CURRENT on a Lenovo 500S.
Thanks to the guys at drm-next, the Linux Intel i915 drivers work a treat. The iwm driver support 5G wireless and everything else just works.

The transmission from Ubuntu/Fedora has been seamless, and I get less screen tearing with the FreeBSD drivers.

I hope to start contributing to FreeBSD as soon as I get some free time. I’ve been flat out so far.

It is good to be finally running FreeBSD on my main machine. I attempted getting it running for over a year and only finally got it working with the latest -CURRENT. I am now tracking CURRENT and upgrading the kernel once a week.

I use beadm to create snapshots of the working system in case the new kernels refuse to work. ZFS is fantastic!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s