Tag Archives: zfs

Valuable News – 2019/02/15

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

How to Secure FreeBSD (server minimal edition).
https://www.adminbyaccident.com/freebsd/how-to-secure-freebsd/

GCC 8/9 vs. LLVM 7/8 Compiler Performance on POWER9 Raptor Talos II.
https://www.phoronix.com/scan.php?page=article&item=power9-gcc-clang&num=5

FreeBSD Foundation – Love what FreeBSD has done for your organization?
Send your testimonial to FreeBSD Foundation!
https://www.freebsdfoundation.org/about/testimonials/

SPARC and TOD Modules on Illumos.
https://ptribble.blogspot.com/2019/02/sparc-and-tod-modules-on-illumos.html

Customizing OpenBSD xenodm.
https://www.tumfatig.net/20190208/customizing-openbsd-xenodm/

Modern Data Lake with Minio.
https://drive.google.com/file/d/1MhWE2C59L7A5Oyv6x_PL1JGltykWjS6s/view

Nord – arctic north-bluish color palette.
https://arcticicestudio.github.io/nord
https://github.com/arcticicestudio/nord

NetBSD Desktop Part 6 – vi Editor – tmux – Unicode ${TERM}.
https://www.unitedbsd.com/d/12-netbsd-desktop-pt-6-vi1-editor-tmux-and-unicode-term

Customized Resolution for OpenBSD in VirtualBox.
https://www.tumfatig.net/20190131/customized-resolution-for-openbsd-in-virtualbox/

The mblaze is Maildir focused command line mail client.
https://github.com/chneukirchen/mblaze

Sony Pictures releases OpenColorIO under BSD license.
http://opencolorio.org/

Tricks QNX Uses to Outperform Other Microkernels.
https://news.ycombinator.com/item?id=9872640

LinuxQuestions.org 2018 Members Choice Awards – Winners from 2018 Year.
https://www.linuxquestions.org/questions/2018-linuxquestions-org-members-choice-awards-128/?daysprune=-1

LinuxQuestions.org 2017 Members Choice Awards – Winners from 2017 Year.
https://www.linuxquestions.org/questions/2017-linuxquestions-org-members-choice-awards-126/?daysprune=-1

FreeBSD Implements ASLR (Address Space Layout Randomization).
https://svnweb.freebsd.org/base?view=revision&revision=343964

HardenedBSD has ASLR while FreeBSD just got (only) ASR.
https://twitter.com/lattera/status/1094717146402377728

Handy AT&T UNIX Quick Guide from 1982.
https://twitter.com/mattblaze/status/1092222055754489856

Setup QEMU with HAX Acceleration on NetBSD.
http://polprog.net/blog/netbsd-hax/

OpenBSD imported OpenRsync (with pledge/unveil support) into its base system.
https://twitter.com/openbsd/status/1094750961107697664
https://undeadly.org/cgi?action=article;sid=20190211081518
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/rsync/
https://github.com/kristapsdz/openrsync/blob/master/README.md

FreeBSD on ARM64 on Scalable Cloud Platform.
https://community.scaleway.com/t/freebsd-on-arm64/6678

The gotop activity monitor inspired by gtop and vtop written in Go.
https://github.com/cjbassi/gotop

Thoughts on SPARC Support in Illumos.
https://ptribble.blogspot.com/2019/02/thoughts-on-sparc-support-in-illumos.html

OpenNebula 5.7.80 Beta Contextualization Packages for FreeBSD Guest.
“With this beta version, we are excited to announce initial support for the FreeBSD guests!”
https://opennebula.org/beta-contextualization-packages/

OmniOS Community Edition r151028o/r151026ao/r151022cm Available.
https://omniosce.org/article/028o-026a0-022cm

First Impressions of Project Trident 18.12 from DistroWatch.
https://distrowatch.com/weekly.php?issue=20190211#trident

First Draft of FreeBSD Mastery: Jails by Michael W. Lucas is complete.
https://mwl.io/archives/4048

IBM Looks at Adding Support for LLVM/Clang to AIX.
https://www.phoronix.com/scan.php?page=news_item&px=IBM-Looking-At-AIX-LLVM-Clang
https://lists.llvm.org/pipermail/llvm-dev/2019-February/130175.html

Minio – Minimalist Object Storage Technology.
http://storagegaga.com/minio-the-minimalist-object-storage-technology/

Deploying Kubernetes on SmartOS.
https://youtu.be/rA0pcmqpRx4

The sysctlview GTK tool to explore FreeBSD sysctl-mib-tree is now committed to FreeBSD Ports.
https://freshports.org/deskutils/sysctlview/

KDE Plasma in FreeBSD Ports is updated to 5.15.
https://svnweb.freebsd.org/ports?view=revision&revision=492811
https://www.kde.org/announcements/plasma-5.15.0.php

Arch Linux Easy ZFS (ALEZ) Installer – ZFS Boot Environments on Linux.
https://github.com/danboid/ALEZ

Middleton BIOS for ThinkPad X61/T61/R61/X300.
https://www.thinkwiki.org/wiki/Middleton%27s_BIOS

Long Slow Death of Commercial Unix.
“Apple MacOS and iOS are both derived from FreeBSD – and that installed base isn’t going anywhere.”
https://www.networkworld.com/article/3339381/data-center/the-long-slow-death-of-unix.html

Proposal for new RPKI validator – OpenBSD rpki-client(1).
https://medium.com/@jobsnijders/a-proposal-for-a-new-rpki-validator-openbsd-rpki-client-1-15b74e7a3f65

The dm-pkg is simple script to use dmenu on FreeBSD to install package.
https://github.com/nicholasbernstein/dm-pkg/blob/master/dm-pkg
https://youtu.be/NBhFNLyu3TU

Red Hat Satellite chooses PostgreSQL instead MongoDB.
https://www.redhat.com/en/blog/red-hat-satellite-standardize-postgresql-backend

PostgreSQL 11.2/10.7/9.6.12/9.5.16/9.4.21 Released.
https://www.postgresql.org/about/news/1920/

FreeBSD User Tries Out NetBSD 8.0.
https://youtu.be/OxB70pg5Tsg

BSD Now 285 – BSD Strategy.
https://www.bsdnow.tv/285

USE Method – FreeBSD Performance Checklist.
http://www.brendangregg.com/USEmethod/use-freebsd.html

In Other BSDs for 2019/02/09
https://www.dragonflydigest.com/2019/02/09/22487.html

Lazy Reading for 2019/02/10.
https://www.dragonflydigest.com/2019/02/10/22508.html

Hardware

Work on ARM – Issue 81.
https://www.worksonarm.com/blog/woa-issue-81/

Blackbird POWER9 Micro ATX Motherboard from Raptor.
https://www.raptorcs.com/content/BK1B01/intro.html

AMD Ryzen 5 2500X and Ryzen 3 2300X Review.
https://www.anandtech.com/show/13945/the-amd-ryzen-5-2500x-and-ryzen-3-2300x-cpu-review/

FOSDEM 2019 – Pinebook Pro – PinePhone Dev Kits.
https://forum.pine64.org/showthread.php?tid=7093&pid=44316#pid44316

PINE64 Community.
https://twitter.com/thepine64/status/1021864868893405185
https://forum.pine64.org/showthread.php?tid=7158

Why More Organizations Will Move Toward Offline Tape Based Storage Strategy in 2019.
https://www.comparethecloud.net/articles/why-more-organisations-will-move-toward-an-offline-tape-based-storage-strategy-in-2019/

New Hardware from PINE64.
https://blog.hackster.io/new-hardware-from-pine64-a7c95e26684d

Life

Salary Negotiation – Make More Money – Be More Valued.
https://www.kalzumeus.com/2012/01/23/salary-negotiation/

People Who Struggle to Get Out of Bed Are More Intelligent.
People who went to bed after 11 P.M. and got up after 8 A.M. earned more money and enjoyed a happier lifestyle.
https://www.housebeautiful.com/lifestyle/news/a7911/people-struggle-to-get-out-of-bed-smarter/

Why Childhood Indoctrination Messes Up Kids.
https://youtu.be/WHunC3Z-ccE

I Cut the ‘Big Five’ Tech Giants From My Life. It Was Hell.
https://gizmodo.com/i-cut-the-big-five-tech-giants-from-my-life-it-was-hel-1831304194

Other

PKI for Busy People.
https://rehn.me/posts/pki-for-busy-people.html

EOF
Advertisements

Valuable News – 2019/02/08

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Hack DigitalOcean to Run OpenBSD with Native IPv6.
https://mitchriedstra.com/2018/11/openbsd-and-ipv6-on-digital-ocean.html

Haiku OS Ports More Networking Drivers From FreeBSD.
https://www.phoronix.com/scan.php?page=news_item&px=Haiku-More-FreeBSD-Network

Integration of LLVM Sanitizers with NetBSD Base System.
https://blog.netbsd.org/tnf/entry/integration_of_the_llvm_sanitziers

Final Report on Clang/LLD State on NetBSD.
https://blog.netbsd.org/tnf/entry/final_report_on_clang_lld

Dotfile Madness.
https://0x46.net/thoughts/2019/02/01/dotfile-madness/

Netflix Continues Experiencing Great Performance in Using FreeBSD for CDN.
https://www.phoronix.com/scan.php?page=news_item&px=Netflix-FreeBSD-2019

Netflix and FreeBSD – Using Open Source to Deliver Streaming Video – FOSDEM 2019.
https://fosdem.org/2019/schedule/event/netflix_freebsd/attachments/slides/3103/export/events/attachments/netflix_freebsd/slides/3103/FOSDEM_2019_Netflix_and_FreeBSD.pdf

FreeNAS 11.2 Reviewed in DistroWatch Feature Story.
https://distrowatch.com/weekly.php?issue=20190204#freenas

FreeBSD in Audio Studio.
https://fosdem.org/2019/schedule/event/freebsd_in_audio_studio/

Work from HardenedBSD has made it back into FreeBSD.
https://twitter.com/ed_maste/status/1092604515075932166
https://reviews.freebsd.org/D18319

NomadBSD 1.2 Mini Review.
https://geekhack.org/index.php?topic=99246.0

OPNsense 19.1.1 Released.
https://opnsense.org/opnsense-19-1-1-released/

How to Install GNOME on FreeBSD.
https://www.techrepublic.com/article/how-to-install-gnome-on-freebsd/

HardenedBSD 1100056.13 Available.
https://hardenedbsd.org/article/op/2019-02-06/stable-release-hardenedbsd-stable-11-stable-v110005613

HardenedBSD 1200058.3 Available.
https://hardenedbsd.org/article/op/2019-02-06/stable-release-hardenedbsd-stable-12-stable-v12000583

The tailflix is replacement for tail -F that asks you if you are still watching.
https://github.com/walaura/tailflix

BSD Now 284 – FOSDEM 2019.
https://fireside.fm/s/FYhhasNR+YZcPrD44

How BSD/FreeBSD different from Linux?
https://www.geekboots.com/story/how-bsdfreebsd-different-from-linux

Restore FreeBSD from ZFS Snapshot.
https://hashbang0.com/2019/02/07/restore-freebsd-from-a-zfs-snapshot/

Setup mfsBSD for receiving ZFS snapshots on systems with low memory.
https://hashbang0.com/2019/02/07/setting-up-mfsbsd-for-receiving-zfs-snapshots-on-systems-with-low-memory/

LibreOffice 6.2 Released.
https://wiki.documentfoundation.org/ReleaseNotes/6.2
New Tabbed UI and Groupedbar Compact UI Available.

Preliminary Support for cloud-init is now available in vm-bhyve.
https://twitter.com/serveraptor/status/1093813549347102720
https://github.com/churchers/vm-bhyve/pull/291

In Other BSDs for 2019/02/02.
https://www.dragonflydigest.com/2019/02/02/22464.html

Hardware

What is Wrong with Raspberry Pi.
https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/

So Long, Itanium.
https://www.talospace.com/2019/02/so-long-itanium.html

PA-RISC was possible AmigaOS target.
http://www.amigareport.com/ar303/feature3.html

Seagate HAMR Hard Drives and 24 TB HDDs on Track in 2020.
https://www.anandtech.com/show/13935/seagate-hdd-plans-2019

AMD Radeon VII Review – Unexpected Shot at the High End.
https://www.anandtech.com/show/13923/the-amd-radeon-vii-review/

Life

Holocaust Paradox: Long Lives for Those Who Survived.
https://www.bloomberg.com/opinion/articles/2019-01-28/holocaust-health-paradox-survivors-lived-longer

Let Children Get Bored Again.
https://www.nytimes.com/2019/02/02/opinion/sunday/children-bored.html

Other

Finding Lena the Patron Saint of JPEGs.
https://www.wired.com/story/finding-lena-the-patron-saint-of-jpegs/

Firefox 66 to block automatically playing audible video and audio.
https://hacks.mozilla.org/2019/02/firefox-66-to-block-automatically-playing-audible-video-and-audio/

EOF

Valuable News – 2019/02/01

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

FreeBSD powerdxx 0.4.0 Released.
https://github.com/lonkamikaze/powerdxx/releases/tag/0.4.0

FreeBSD ZFS vs. TrueOS ZoF vs. DragonFly BSD HAMMER2 vs. ZFS on Linux Benchmarks.
https://www.phoronix.com/scan.php?page=article&item=bsd-initial-zof

Install FreeBSD 12.0 plus KDE Plasma and Basic Applications.
https://www.youtube.com/watch?v=0qq3H8pflU0

The sysctlview is GTK tool to explore FreeBSD sysctl-mib-tree.
https://gitlab.com/alfix/sysctlview

The Laarc.io is new Lobste.rs and Hacker News companion.
… and it runs FreeBSD too.
https://laarc.io/

Thunderbolt 3 on AMD motherboard using FreeBSD Bhyve PCIe passthru on Linux guest.
https://twitter.com/michael_yuji/status/1089769779961851904

Strategic thinking, or what I think what we need to do to keep FreeBSD relevant.
http://www.leidinger.net/blog/2019/01/27/strategic-thinking-or-what-i-think-what-we-need-to-do-to-keep-freebsd-relevant/

Installing FreeBSD with Dual-Boot on ThinkPad X1 Carbon 6th Generation.
https://market-ticker.org/post=234936

HardenedBSD 2018Q4 Quarterly Update.
https://github.com/HardenedBSD/freebsd-quarterly/blob/hardenedbsd/2018q4/2018q4/hardenedbsd.md

ClonOS to be Rolled Out.
ClonOS is web UI for controlling/deploying/managing FreeBSD Jails containers and Bhyve/Xen VMs.
https://hype.codes/clonos-be-rolled-out

Making OpenBSD Boot Logo with Spleen.
http://akpoff.com/archive/2019/making_an_openbsd_boot_logo_with_spleen.html

Setting the Boot Logo on ThinkPad.
http://akpoff.com/archive/2019/setting_the_boot_logo_on_a_thinkpad.html

FreeBSD Foundation Update – 2019/01.
https://www.freebsdfoundation.org/news-and-events/newsletter/freebsd-foundation-update-january-2019/

New ASLR code in review on FreeBSD.
https://reviews.freebsd.org/D5603

Credativ Group massively expands U.S. footprint with OmniTI acquisition.
https://omniti.com/remembers/2019/credativ-massively-expands-us-footprint.html

Alpine Linux moved back from LibreSSL to OpenSSL.
https://lists.alpinelinux.org/alpine-devel/6308.html

Avoiding Duplicate cron Jobs.
https://dan.langille.org/2019/01/13/avoiding-duplicate-cronjobs/

Upgrade Process Using GPT.
https://oshogbo.vexillium.org/blog/62/

BSD Now – Episode 283.
https://bsdnow.fireside.fm/283

Iocage 1.1 Release.
https://github.com/iocage/iocage/releases/tag/1.1

Bareos 18.2.5 Released.
https://www.bareos.com/files/press/english/bareos_18.2_final_en.pdf

OPNsense 19.1 Released.
https://forum.opnsense.org/index.php?topic=11398.0

FreeBSD CI Weekly Report 2019-01-27.
https://lists.freebsd.org/pipermail/freebsd-testing/2019-January/001777.html

OpenIndiana Monitoring with Icinga.
https://community.icinga.com/t/openindiana-monitoring/248

Reimplement BIO_ORDERED handling in nvd(4) on FreeBSD.
Sync write latency from ~2.0 ms to ~1.1 ms by not sleeping without reason till next HZ tick.
ZFS pool with 8 ZVOLs writing 4KB blocks shows ~950 IOPS instead of ~750 IOPS before.
https://svnweb.freebsd.org/base?view=revision&revision=343562

ZFS Feature Matrix.
https://zgrep.org/zfs.html

Setting Up Quick Minimal Jail on FreeBSD (ZFS).
https://markdownshare.com/view/981a46a3-8fba-4793-9b8f-b576760312bc

In Other BSDs for 2019/01/26.
https://www.dragonflydigest.com/2019/01/26/22439.html

Hardware

You can now get FreeBSD daemon on the WASD keyboards.
http://www.wasdkeyboards.com/index.php/products/keycap-mod-packs/os-cherry-mx-keycaps-set-of-2.html

OpenBSD Escape Key with Puffy for Cherry MX Keyboard.
https://www.etsy.com/listing/190868529/custom-esc-keycap-for-cherry-mx-swtich

New Pinebook Pro from PINE64.
More powerful but keyboard layout still sicks.
https://forum.pine64.org/showthread.php?tid=7093&pid=43850#pid43850
https://liliputing.com/2019/01/pinebook-pro-linux-laptop-coming-this-year-for-199-and-up.html
https://baldnerd.com/pine64-pinebook-pro-rk3399-laptop/

Intel to Discontinue Itanium 9700 ‘Kittson’ Processor – Last of the Itaniums.
https://www.anandtech.com/show/13924/intel-to-discontinue-itanium-9700-kittson-processor-the-last-itaniums

Life

Do they have work/life balance? Investigating potential employers with GitHub.
https://codewithoutrules.com/2019/01/31/does-company-have-worklife-balance/

EOF

Valuable News – 2019/01/25

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

FreeBSD fixed pfsync change that break CARP.
https://svnweb.freebsd.org/base?view=revision&revision=343130

Restoration of Early UNIX Artifacts.
https://www.usenix.org/legacy/events/usenix09/tech/full_papers/toomey/toomey.pdf

Amiga 500 Papercraft Pattern.
http://rockybergen.com/whatsnew/2019/1/15/amiga-500-papercraft-design
https://www.docdroid.net/file/download/PE7D4vg/amiga-500-ver1.pdf

Ansible BSD Working Group.
https://github.com/ansible/community/wiki/BSD

Ansible Solaris Working Group.
https://github.com/ansible/community/wiki/Solaris

In Other BSDs for 2019/01/19.
https://www.dragonflydigest.com/2019/01/19/22394.html

Debian systemd maintainer will not maintain systemd anymore.
“What’s going on is just too stupid/crazy.”
https://lists.freedesktop.org/archives/systemd-devel/2019-January/041971.html
https://www.reddit.com/r/linux/comments/agna5n/debian_systemd_maintainer_steps_down_over/

AMIGA gets LZ4 for 68k CPUs.
https://github.com/arnaud-carre/lz4-68k

[POLISH] ZFS – Rewolucja w Systemach Plikow (Mariusz Zaborski).
https://oshogbo.vexillium.org/pdf/programista_zfs_2015.pdf

LiteCLI is user friendly command line client for SQLite database.
https://www.pgcli.com/launching-litecli.html

OpenBSD can now join any open WiFi network.
https://undeadly.org/cgi?action=article;sid=20190120142708

OpenBSD deletes vmm(4) on i386.
https://undeadly.org/cgi?action=article;sid=20190120142529

NomadBSD 1.2-RC1 Released.
nomadbsd.org/index.html#rel1.2-rc1

Open source Spotify UNIX client available on FreeBSD as audio/spotifyd port.
https://svnweb.freebsd.org/ports?view=revision&revision=490765

OpenBSD added support for 2TB of memory on amd64.
https://undeadly.org/cgi?action=article;sid=20190121081245

HardenedBSD 1200058.2 Available.
https://hardenedbsd.org/article/op/2019-01-20/stable-release-hardenedbsd-stable-12-stable-v12000582

SoloBSD 19.01-STABLE based on HardenedBSD 1200058.2 Available.
https://www.solobsd.org/index.php/2019/01/23/solobsd-19-01-stable/

OmniOS Community Edition r151028l/r151026al/r151022cj Available.
https://omniosce.org/article/028l-026al-022cj

Wayland Support on BSDs Continuing to Improve.
https://www.phoronix.com/scan.php?page=news_item&px=Wayland-BSD-Improving-2019

Lumina from Project Trident will replace Fluxbox with their own WM after its finished.
https://twitter.com/q5sys/status/1087422097499062274

For the Love of Pipes.
https://blog.jessfraz.com/post/for-the-love-of-pipes/

FreeBSD adds trim(8) command for devices with wear leveling algorithms.
https://svnweb.freebsd.org/base?view=revision&revision=343118

ClarityOS is Safe/Secure/Modern/Reliable HardenedBSD fork.
Goal is to make BSD as open and customizable as possible, while keeping it easy, simple and accessible to as many people as possible!
https://clarityos.net/

MidnightBSD Developer Journal.
https://www.justjournal.com/users/mbsd/entry/33772

Out-of-the-Box 10GE Network Benchmarks on Linux Distributions and FreeBSD 12.
https://www.phoronix.com/scan.php?page=article&item=10gbe-linux-freebsd12&num=3

FreeBSD in top(1) will not now show swap line if there are no swap devices.
https://reviews.freebsd.org/D18928

Wine 4.0 Released.
https://www.winehq.org/news/2019012201

AMD Open Source Driver for Vulkan.
https://github.com/GPUOpen-Drivers/AMDVLK

Kerberized NFS4 in Mixed Environment.
FreeBSD 12.0-RELEASE as KDC/Kerberos/NFS4 Server with Windows/Ubuntu as Clients.
https://amoradi.org/public/kerberized_nfsv4.txt

XigmaNAS 11.2.0.4.6400 Released.
https://sourceforge.net/projects/xigmanas/files/XigmaNAS-11.2.0.4/11.2.0.4.6400/

FreeBSD utility nsysctl to show MIB tree in XML.
https://twitter.com/alfsiciliano/status/1087561685693427712

HOWTO – VNET Jails on FreeBSD 12 with ZFS.
https://www.reddit.com/r/freebsd/comments/ahdbbq/howto_jails_freebsd_12_vnet_zfs/

Building FreeBSD based home router.
https://kamila.is/learning/building-my-home-router/

Project Trident 18.12 Overview.
https://www.youtube.com/watch?v=4YizY1YblzU

What’s Wrong with tar?
https://www.cyphar.com/blog/post/20190121-ociv2-images-i-tar

BSD Now 282 – Open the Rsync.
https://bsdnow.fireside.fm/282

ClonOS 19.01-RELEASE Available – First Public Release.
https://clonos.tekroutine.com/download.html

Hardware

Rock Pi 4 Review – Is this Raspberry Pi challenger you’ve been looking for?
https://www.techrepublic.com/article/rock-pi-4-review-is-this-the-raspberry-pi-challenger-youve-been-looking-for/

Freedom and Privacy in the Datacenter.
https://media.ccc.de/v/froscon2018-2170-freedom_and_privacy_in_the_datacenter

Introducing Ultra EPYC AMD Powered Sun Ultra 24 Workstation.
https://www.servethehome.com/introducing-the-ultra-epyc-amd-powered-sun-ultra-24-workstation/

Thin-ITX AMD AM4 Motherboard.
https://www.anandtech.com/show/13885/the-true-shortest-am4-motherboard-thinitx-comes-to-amd

Backblaze Hard Drive Stats for 2018.
https://www.backblaze.com/blog/hard-drive-stats-for-2018/

Double Height DDR4 – 32GB Modules Reviewed.
https://www.anandtech.com/show/13694/double-height-ddr4-gskill-zadak-2x32gb-ddr4-3200

Life

Men’s and Women’s Brains.
https://www.youtube.com/watch?v=AQ9L9YBJkk8

Philip Zimbardo’s Response to Recent Criticisms of the Stanford Prison Experiment.
https://www.prisonexp.org/response/

50 Years Ago Sugar Industry Quietly Paid Scientists to Point Blame at Fat.
https://www.npr.org/sections/thetwo-way/2016/09/13/493739074/50-years-ago-sugar-industry-quietly-paid-scientists-to-point-blame-at-fat

Students Learn From People They Love.
https://www.nytimes.com/2019/01/17/opinion/learning-emotion-education.html

The Process of Mastering a Skill.
https://azeria-labs.com/the-process-of-mastering-a-skill/

Real Hardware for the FreeBSD BeaST Storage System.
https://mezzantrop.wordpress.com/2019/01/18/the-real-hardware-for-the-beast-storage-system/

Remote Code Execution in Linux apt/apt-get Commands.
https://justi.cz/security/2019/01/22/apt-rce.html

The Alarming Decline of Quality Youth Playtime.
https://houseoflawandorder.com/the-alarming-decline-of-quality-youth-playtime/

Other

Quake 1.5 Refreshed FPS Classic with New Maps/Monsters/Mayhem.
https://www.rockpapershotgun.com/2019/01/18/quake-1-5-is-a-massive-mod-overhaul-for-the-fps-classic/amp/

EOF

Valuable News – 2019/01/18

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Installing and Updating FreeBSD 11.0 on Raspberry Pi.
https://solence.de/2017/03/15/installing-and-updating-freebsd-11-0-release-on-a-raspberry-pi/

ZFS on Linux Runs into Snag with Linux 5.0.
https://www.phoronix.com/scan.php?page=news_item&px=ZFS-On-Linux-5.0-Problem

Create your own video streaming server with Linux or FreeBSD.
https://opensource.com/article/19/1/basic-live-video-streaming-server

hexyl – command-line hex viewer for terminal.
Colors different categories of bytes (NULL/printable ASCII/ASCII whitespace/other ASCII/non-ASCII).
https://github.com/sharkdp/hexyl

How Vim Shaped My Writing.
https://gilesbowkett.blogspot.com/2016/10/how-vim-shaped-my-writing.html

Debugging Rust with VSCode on FreeBSD.
https://venshare.com/debugging-rust-with-vscode-on-freebsd/

In Other BSDs for 2019/01/12.
https://www.dragonflydigest.com/2019/01/12/22379.html

How OpenBSD is secure compared to other operating systems?
https://www.reddit.com/r/openbsd/comments/af1s00/how_openbsd_is_secure_compared_to_other_operating/

FreeBSD adds bluetooth-config script to simplify setting up Bluetooth connections.
https://svnweb.freebsd.org/changeset/base/342945

The good and the bad of Linux’s NetworkManager.
https://utcc.utoronto.ca/~cks/space/blog/linux/NetworkManagerGoodBad

Linux network-scripts being deprecated.
https://utcc.utoronto.ca/~cks/space/blog/linux/NetworkScriptsAndPPPoE

The CADT Model – mostly used in Linux environments.
https://www.jwz.org/doc/cadt.html

We are now closer to the Y2038 bug than the Y2K bug.
https://www.jwz.org/blog/2019/01/we-are-now-closer-to-the-y2038-bug-than-the-y2k-bug/

FreeBSD adds support for Clang Coverage Sanitizer in kernel (KCOV).
https://svnweb.freebsd.org/base?view=revision&revision=342962

Powersaving with DragonFly BSD Laptop.
https://www.dragonflybsd.org/docs/user/Powersave/?updated

Difference Between ZFS Scrub and Resilver.
https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSResilversVsScrubs

Risk that comes from ZFS on Linux not being GPL Compatible.
Actually its GPL that is not compatible with CDDL (ZFS license). Not the other way around.
https://utcc.utoronto.ca/~cks/space/blog/linux/ZFSNonGPLRisk

FreeBSD takes vmm(4) towards multicore Bhyve AMD support.
https://svnweb.freebsd.org/base?view=revision&revision=343075

Ansible plugin for remotely provisioning FreeBSD Jails separately from their Jail host.
https://github.com/austinhyde/ansible-sshjail

Update Intel Microcode on FreeBSD.
https://www.thomas-krenn.com/en/wiki/Update_Intel_Microcode_on_FreeBSD

Building spotifyd on NetBSD.
https://atomicules.co.uk/2019/01/17/Building-Spotifyd-on-NetBSD.html

Building my FreeBSD-based home router.
https://kamila.is/learning/building-my-home-router/

HardenedBSD 1100056.12 Available.
https://hardenedbsd.org/article/op/2019-01-18/stable-release-hardenedbsd-stable-11-stable-v110005612

BSD Now 281 – EPYC Server Battle.
https://www.jupiterbroadcasting.com/128846/epyc-server-battle-bsd-now-281/

OpenRSYNC – clean-room implementation of rsync with a BSD (ISC) license.
https://github.com/kristapsdz/openrsync

FreeBSD and UEFI Boot.
https://blog.tyk.nu/blog/freebsd-and-uefi-boot/

Synaptics Touchpad on FreeBSD.
https://wiki.freebsd.org/SynapticsTouchpad

OpenBSD Content Filtering Proxy HOWTO in One Tweet πŸ™‚
https://twitter.com/ogmaconnect1/status/983813448504094721

Aphelia – minimalist window manager.
https://github.com/vardy/aphelia

The tinywm.c is a window manager in 50 lines of C code.
https://github.com/mackstann/tinywm/blob/master/tinywm.c

OpenDoas: Portable Version of OpenBSD doas Command.
https://git.duncano.de/opendoas/about/

OpenBSD Packages Statistics.
https://pkgstat-openbsd.perso.pw/

The Art of Unix Programming by Eric Steven Raymond reformatted by Martin Tournoij.
https://arp242.net/the-art-of-unix-programming/

Reproducible NetBSD!
https://tests.reproducible-builds.org/netbsd/netbsd.html

FreeBSD PR (Problem Reports) Stats.
https://people.freebsd.org/~miwi/gnats/

Using cloud-init with SmartOS.
https://shaner.life/using-cloud-init-with-smartos/

Shawn Webb (co-creator of HardenedBSD) started new project to rewrite FreeBSD bhyve in Rust.
https://twitter.com/lattera/status/1085711849469952000

Hardware

Flashing my Lenovo x230 with Coreboot.
https://www.chucknemeth.com/flash-lenovo-x230-coreboot/

POWER9 Scales Up To 1.2 TB/s of I/O.
https://fuse.wikichip.org/news/1653/power9-scales-up-to-1-2-tb-s-of-i-o-targets-nvlink-3-opencapi-memory-for-2019/

V-Raptor is 24-Core ARM Server Based on SocioNext SC2A11 SoC.
https://www.cnx-software.com/2019/01/08/v-raptor-24-core-arm-server-socionext-sc2a11/

AMD Opteron X3421 Benchmarks and Review Low Cost Atom Competitor.
https://www.servethehome.com/amd-opteron-x3421-benchmarks-and-review-a-low-cost-atom-competitor/

Computer for CyberSecurity BSD-OS (SecBSD).
https://www.gofundme.com/computer-for-cybersecurity-bsdos

Life

Australia Becomes First Western Nation to Ban Secure Encryption.
https://www.extremetech.com/internet/281991-australia-becomes-first-western-nation-to-ban-secure-encryption

Facebook’s 10 Year Challenge is Just a Harmless Meme Right?
https://www.wired.com/story/facebook-10-year-meme-challenge/

Other

ŁódΕΊ Revitalised – Poland’s Third Largest City is Under Transformation.
https://uml.lodz.pl/files/public/dla_biznesu/investlodz/fdi-lodz-revitalised.pdf

Why Microsoft Word must Die.
http://www.antipope.org/charlie/blog-static/2013/10/why-microsoft-word-must-die.html

EOF

 

Less Known pkg(8) Features

I was asked many times to write an article about pkg(8) – the current FreeBSD modern package manager sometimes also called PKGng.

In this entry I will try to describe less known pkg(8) features.

About 8 years ago – when pkg(8) did not even existed – I wrote HOWTO: keeping FreeBSD’s base system and packages up-to-date post. It was even later published in the BSD Magazine 2012/01 episode (Issue 30).

Back in 2011 keeping packages up to date was little more tricky then it is now. You was forced to use the FreeBSD’s STABLE branch for them as packages in RELEASE were never updated – like currently it is in the OpenBSD world. The packages in FreeBSD’s STABLE branch were built every 2 weeks which was enough at that time.

You could of course compile everything from FreeBSD Ports using portmaster but you will waste lots of time for compiling your life. When pkg_add/pkg_delete/pkg_info were THE package tools on FreeBSD the pkg_upgrade script from the bsdadminscripts package was quite helpful with the upgrade process. It would fetch latest available packages from the STABLE branch FTP server and update installed packages. To check for the security issues in packages another external tools called portaudit was needed.

Today we have pkg(8) with all its features along with pkg upgrade to update the installed packages. Thanks to pkg audit the third party tool portaudit is not longer needed. We even have pkg autoremove to automatically remove unneeded dependencies.

I will try not to copy information available on the already great FreeBSD Handbook described in the 4.4. Using pkg for Binary Package Management chapter.

Older FreeBSD Versions

Before FreeBSD 10.x to use new pkg(8) tools instead of the old pkg_* ones there was need to have WITH_PKGNG=yes in the /etc/make.conf file.

Currently only the only supported releases of FreeBSD are recently released 12.0 and still more stable and polished 11.2 so there is no need to put anything in the /etc/make.conf file anymore to use pkg(8) framework.

Database

The pkg(8) database (SQLite database actually) is kept in the /var/db/pkg directory.

These are the contents of the /var/db/pkg dir just after pkg(8) bootstrap process.

# find /var/db/pkg
/var/db/pkg
/var/db/pkg/FreeBSD.meta
/var/db/pkg/vuln.xml
/var/db/pkg/local.sqlite
/var/db/pkg/repo-FreeBSD.sqlite

The most important file is the /var/db/pkg/local.sqlite file as this is the database of installed packages and its files. By typing pkg shell you can actually connect to this SQLite database with SQLite interpreter.

# pkg shell
-- Loading resources from /home/vermaden/.sqliterc
SQLite version 3.15.2 2016-11-28 19:13:37
Enter ".help" for usage hints.
> .q
#

If for some reason you will find that pkg(8) tools does not work or are broken you may connect to it with sqlite3 command from the sqlite3 package. Do not use the sqlite package as it holds the 2.x version of SQLite which is not forward compatible with the 3.x version used by pkg(8)

# file /var/db/pkg/*
/var/db/pkg/FreeBSD.meta:        ASCII text
/var/db/pkg/local.sqlite:        SQLite 3.x database, user version 34, last written using SQLite version 3015002
/var/db/pkg/repo-FreeBSD.sqlite: SQLite 3.x database, user version 2014, last written using SQLite version 3015002
/var/db/pkg/vuln.xml:            XML 1.0 document, UTF-8 Unicode text, with very long lines

# sqlite3 /var/db/pkg/local.sqlite
-- Loading resources from /home/vermaden/.sqliterc
SQLite version 3.26.0 2018-12-01 12:34:55
Enter ".help" for usage hints.
> .q
#

Lock/Unlock

With pkg(8) specified packages can now be locked with pkg lock command. This means that the pkg upgrade or even pkg delete operations (or pkg autoremove) would not touch them. You can list locked packages with -l options as shown below.

# pkg lock -l
Currently locked packages:
conky-1.9.0_6
exfat-utils-1.2.8
ffmpeg-4.1_1,1
fusefs-exfat-1.2.8
lame-3.100_2

# pkg delete exfat-utils
Checking integrity... done (0 conflicting)
The following package(s) are locked and may not be removed:

        exfat-utils

1 packages requested for removal: 1 locked, 0 missing
# 

As you can see its not possible to pkg delete the locked exfat-utils package. You will first have to unlock it with pkg unlock command. You can do that interactively or not with -y option as shown below.

# pkg unlock exfat-utils
exfat-utils-1.2.8: unlock this package? [y/N]: y
Unlocking exfat-utils-1.2.8

# pkg lock -y exfat-utils
Locking exfat-utils-1.2.8

Now, why would you lock any packages?

Based on my experience these are potential reasons to lock certain packages:

  • You combine packages with ports.
  • Package for the port does not exist.
  • Official package has different default options then yours.
  • You really want to use older version of package.

Actually I use lock/unlock mechanism because all of the above are true for me.

I combine ports and packages (practice often discouraged in the FreeBSD world) because some software I use is not available as packages – because of licensing issues. These are anything related to Microsoft exFAT filesystem (exfat-utils/fusefs-exfat) and MP3 (lame). What is more astonishing for me is that OpenBSD provides lame package since YEARS yet FreeBSD team is still scared of the patents. I also need to build custom version of ffmpeg package – just to include lame support but still custom. The last thing I keep locked is Conky. It was and still is working great in 1.9 version but its developers broke it badly in the 1.10 version (now even 1.11 is available). It was just not possible to right click with mouse on the desktop and have Openbox menu – or to name the issue – Conky did not pass mouse events to the Window Manager that ruled the desktop. So I used one of the other Ports tools, the portdowngrade to fetch last 1.9 files into my Ports tree, then compile the 1.9 conky package and lock it for good.

You probably already know that I prefer to run dzen2 for screen information but I use conky rarely for my ‘FreeBSD Dashboard’ with all needed information that I enable only when I need it – with [Scroll Lock] key.

For the record – here is how it looks.

vermaden_2019-01-16_21-42-52.png

Provides

If you also happen to be RHEL/Fedora (or just yum/rpm) user you probably missed the ‘provides’ feature on FreeBSD pkg(8) package manager. Why it is so useful? Because with ‘provides’ database you can install packages by specifying the exact binary or file name of the package. For example You can type yum install /sbin/ifconfig to install net-tools package because ‘provides’ database will have that needed information.

What if I tell you that You can achieve similar functionality with pkg(8) tool?

The pkg-provides plugin allows you to query which package provides a particular file directly with pkg(8) tool.

It is even available as pkg-provides package. Below I will show you how to install and configure it. First install the pkg-provides package.

# pkg search provides
pkg-provides-0.5.0             Pkg plugin for querying which package provides a particular file

# pkg install pkg-provides
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        pkg-provides: 0.5.0 [FreeBSD]

Number of packages to be installed: 1

10 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching pkg-provides-0.5.0.txz: 100%   10 KiB   9.8kB/s    00:01    
Checking integrity... done (0 conflicting)
[1/1] Installing pkg-provides-0.5.0...
[1/1] Extracting pkg-provides-0.5.0: 100%
Message from pkg-provides-0.5.0:

======================= pkg plugin activation ========================
  In order to use the pkg-provides plugin you need to enable plugins in pkg.
  To do this, uncomment the following lines in /usr/local/etc/pkg.conf file
  and add pkg-provides to the supported plugin list

  PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
  PKG_ENABLE_PLUGINS = true;
  PLUGINS [ provides ];

  After that run `pkg plugins' to see the plugins handled by pkg`.

  To update the provides database run `pkg provides -u`

  ====================================================================

Then configure the /usr/local/etc/pkg.conf file.

# cat  /usr/local/etc/pkg.conf
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [ provides ];
EOF
Now you have new command called pkg provides as shown below.
# pkg provides
usage: pkg provides [-uf] pattern

A plugin for querying which package provides a particular file

# pkg provides bin/pldd
Provides database not found, please update first.

You can update the ‘provides’ database with -u option.

# pkg provides -u
Fetching provides database: 100%   29 MiB 700.9kB/s    00:43    
Extracting database....success

Example usage of pkg provides plugin.

# pkg provides bin/pldd
Name    : ptools2-0.5
Desc    : Toolset based on Solaris ptools functionality
Repo    : FreeBSD
Filename: /usr/local/bin/pldd

Name    : linux_base-c7-7.4.1708_6
Desc    : Base set of packages needed in Linux mode (Linux CentOS 7.4.1708)
Repo    : FreeBSD
Filename: /compat/linux/usr/bin/pldd

# pkg install /compat/linux/usr/bin/pldd
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching '/compat/linux/usr/bin/pldd' have been found in the repositories

Althou its not possible to for example install linux_base-c7 package by typing pkg install /compat/linux/usr/bin/pldd command its possible to check which package contains that file.

Next time you will type the pkg upgrade command you would also see provides database updating

# pkg upgrade
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 376.5kB/s    00:18    
Processing entries: 100%
Fetching provides database: 100%   29 MiB 386.3kB/s    01:18    
Extracting database....success
FreeBSD repository update completed. 32542 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
(...)

The pkg provides database takes some notable space in the /var/db/pkg directory.

# file /var/db/pkg/* /var/db/pkg/*/* | sort -n
/var/db/pkg/FreeBSD.meta: ASCII text
/var/db/pkg/local.sqlite: SQLite 3.x database, user version 34, last written using SQLite version 3015002
/var/db/pkg/provides: directory
/var/db/pkg/provides/provides.db: ASCII text
/var/db/pkg/repo-FreeBSD.sqlite: SQLite 3.x database, user version 2014, last written using SQLite version 3015002
/var/db/pkg/vuln.xml: XML 1.0 document, UTF-8 Unicode text, with very long lines

If you use ZFS compression like LZ4 then it will not take much as shown below.

# du -csm /var/db/pkg/*
1       /var/db/pkg/FreeBSD.meta
32      /var/db/pkg/local.sqlite
72      /var/db/pkg/provides
33      /var/db/pkg/repo-FreeBSD.sqlite
2       /var/db/pkg/vuln.xml
138     total

… but if You use UFS then that almost 600 MB database may scare you a little πŸ™‚

# du -csmA /var/db/pkg/*
1       /var/db/pkg/FreeBSD.meta
68      /var/db/pkg/local.sqlite
571     /var/db/pkg/provides
52      /var/db/pkg/repo-FreeBSD.sqlite
6       /var/db/pkg/vuln.xml
694     total

Which

While the pkg provides needed information for the files of packages that are not yet installed the pkg which command is the pkg(8) equivalent of the classic UNIX which command. It shows to which package a file belongs to (or not at all).

# pkg which /boot/modules/drm.ko
/boot/modules/drm.ko was installed by package drm-fbsd11.2-kmod-4.11g20181210

# pkg which /boot/kernel/drm.ko
/boot/kernel/drm.ko was not found in the database

Double Your Gun Double Your Fun

Sometimes its faster to use both ‘whiches’ at the same time to get the needed answer.

# which firefox
/usr/local/bin/firefox

# pkg which `which firefox`
/usr/local/bin/firefox was installed by package firefox-64.0.2,1

Periodic

It may happen that you will see something like that one below.

# pkg install parallel
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: Cannot get an advisory lock on a database, it is locked by another process

… but You did not launched any other pkg(8) instances, what is going on here? Lets check the ps(1) output.

# ps ax | grep pkg
 8540  -  S        0:00.00 /bin/sh - /usr/local/etc/periodic/daily/411.pkg-backup
 8551  -  S        0:00.00 /usr/local/sbin/pkg shell .dump
 8555  -  D        0:01.08 /usr/local/sbin/pkg shell .dump

The FreeBSD’s periodic scripts are doing their job.

To check which are they look here.

# find /etc/periodic /usr/local/etc/periodic -name \*pkg\*
/usr/local/etc/periodic/daily/490.status-pkg-changes
/usr/local/etc/periodic/daily/411.pkg-backup
/usr/local/etc/periodic/security/460.pkg-checksum
/usr/local/etc/periodic/security/410.pkg-audit
/usr/local/etc/periodic/weekly/400.status-pkg

If You think that any of those activities are not needed then you may disable them with these values in the /etc/periodic.conf file.

# find /etc/periodic /usr/local/etc/periodic -name \*pkg\* | xargs grep -m 1 -E -o "[a-z_]+_enable" 
/usr/local/etc/periodic/daily/490.status-pkg-changes:daily_status_pkgng_changes_enable
/usr/local/etc/periodic/daily/411.pkg-backup:daily_backup_pkgng_enable
/usr/local/etc/periodic/security/460.pkg-checksum:security_status_pkgchecksum_enable
/usr/local/etc/periodic/security/410.pkg-audit:security_status_pkgaudit_enable
/usr/local/etc/periodic/weekly/400.status-pkg:weekly_status_pkgng_enable

For example if you would like to disable the /usr/local/etc/periodic/daily/490.status-pkg-changes execution you will need to add daily_status_pkgng_changes_enable=yes into the /etc/periodic.conf file.

Lefs chack again for the ps(1) output then.

# ps ax | grep pkg
 8574  0  S+       0:00.00 grep --color pkg

The periodic job has already finished. You may now install your package as usual.

# pkg install parallel
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        parallel: 20171222

Number of packages to be installed: 1

The process will require 3 MiB more space.
1 MiB to be downloaded.

Proceed with this action? [y/N]: n
# 

Stats

While the pkg stats command provides some stats on the installed packages its not that useful to find which packages take most space.

# pkg stats
Local package database:
        Installed packages: 1081
        Disk space occupied: 9 GiB

Remote package database(s):
        Number of repositories: 1
        Packages available: 32518
        Unique packages: 32518
        Total size of packages: 78 GiB

There is also pkg size command that will only display space used by packages but without package name … not very useful.

# pkg size | head
10.5MiB
2.06MiB
27.4MiB
2.59MiB
5.17MiB
515KiB
23.2MiB
609KiB
587KiB
127KiB

Also the man page for pkg size does not exist.

# man pkg-size
No manual entry for pkg-size

You can use pkg info -as command but it will not only not sort its output in any way – it will also display the space usage in various units like KiB/MiB/GiB which does not help … fortunatelly -h option of sort comes with help.

Using following alias you can sort packages by its space usage. I limited the output to 20 largest packages but feel free to change it to your needs.

# alias pkg-size='pkg info -as | sort -k 2 -h | tail -20 | column -t'
# which pkg-size
pkg-size: aliased to pkg info -as | sort -k 2 -h | tail -20 | column -t
# pkg-size
python27-2.7.15          68.2MiB
gtk3-3.22.30_4           68.8MiB
opencollada-1.6.68_1     75.8MiB
py27-ansible-2.7.5       88.6MiB
argyllcms-1.9.2_4        92.4MiB
webkit2-gtk3-2.22.5      92.9MiB
gimp-app-2.10.8_1,1      95.4MiB
python36-3.6.8           104MiB
samba47-4.7.12           145MiB
openjdk8-8.192.26_3      162MiB
boost-libs-1.69.0        163MiB
thunderbird-60.4.0_1     167MiB
firefox-64.0.2,1         174MiB
binutils-2.30_7,1        195MiB
linux_base-c6-6.10       197MiB
gcc6-6.5.0_3             241MiB
chromium-71.0.3578.98_2  251MiB
libreoffice-6.0.7_4      353MiB
virtualbox-ose-5.2.22_2  375MiB
llvm60-6.0.1_5           818MiB

Short Names

The pkg(8) tools also support short names for the arguments. For example you do not have to type pkg autoremove. Only the pkg autor part is needed for the command to work.

Example short names blow.

# pkg autor
# pkg upg
# pkg inf

Metadata

vermaden_2019-01-16_21-32-07.png

Many problems with pkg(8) are triggered by old metadata database. In case you face any pkg(8) issue first update (forcefully) its database as shown below.

# pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 352.9kB/s    00:19    
Processing entries: 100%
Fetching provides database: 100%   28 MiB 658.3kB/s    00:44    
Extracting database....success
FreeBSD repository update completed. 31778 packages processed.
All repositories are up to date.

For the record – the ‘provides’ database is also updated in such process.

Fixing Broken Dependency

There was time when one missing dependency about vulnerable www/libxul19 package started to torture me for some time.

I was even despered to compile everything with portmaster already.

I started with portmaster --check-depends command, but said no ‘n‘ when asked for fix as it will downgrade a lot of packages needlessly.

# portmaster --check-depends
(...)
Checking dependencies: evince
graphics/evince has a missing dependency: www/libxul19
(...)

>>> Missing package dependencies were detected.
>>> Found 1 issue(s) in total with your package database.

The following packages will be installed:

        Downgrading perl: 5.14.2_3 -> 5.14.2_2
        Downgrading glib: 2.34.3 -> 2.28.8_5
        Downgrading gio-fam-backend: 2.34.3 -> 2.28.8_1
        Downgrading libffi: 3.0.12 -> 3.0.11
        Downgrading gobject-introspection: 1.34.2 -> 0.10.8_3
        Downgrading atk: 2.6.0 -> 2.0.1
        Downgrading gdk-pixbuf2: 2.26.5 -> 2.23.5_3
        Downgrading pango: 1.30.1 -> 1.28.4_1
        Downgrading gtk-update-icon-cache: 2.24.17 -> 2.24.6_1
        Downgrading dbus: 1.6.8 -> 1.4.14_4
        Downgrading gtk: 2.24.17 -> 2.24.6_2
        Downgrading dbus-glib: 0.100.1 -> 0.94
        Installing libxul: 1.9.2.28_1

The installation will require 66 MB more space

38 MB to be downloaded

>>> Try to fix the missing dependencies [y/N]: n
>>> Summary of actions performed:

www/libxul19 dependency failed to be fixed

>>> There are still missing dependencies.
>>> You are advised to try fixing them manually.

>>> Also make sure to check 'pkg updating' for known issues.

Lets see what pkg(8) shows we have installed.

# pkg info | grep libxul
libxul-10.0.12                 Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps

# pkg info -qoa | grep libxul
www/libxul

So the problem is that we have installed www/libxul instead of www/libxul19 and that is why portmaster (and not only) complains about it.

Before pkg(8) was introduced it was easy just to grep -r the entire /var/db/pkg directory with its ‘file database’ but now its quite more complicated as the package database is kept in SQLite database. Using pkg shell command You can connect to that database. Lets check what we can find there.

# pkg shell
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name             file
---  ---------------  ----------------------------------------------------------
0    main             /var/db/pkg/local.sqlite
sqlite> .tables
categories       licenses         pkg_directories  scripts
deps             mtree            pkg_groups       shlibs
directories      options          pkg_licenses     users
files            packages         pkg_shlibs
groups           pkg_categories   pkg_users
sqlite> .header on
sqlite> .mode column
sqlite> pragma table_info(deps);
cid         name        type        notnull     dflt_value  pk
----------  ----------  ----------  ----------  ----------  ----------
0           origin      TEXT        1                       1
1           name        TEXT        1                       0
2           version     TEXT        1                       0
3           package_id  INTEGER     0                       1
sqlite> .quit

So now we know that ‘deps‘ table is probably what we are looking for ;).

As pkg shell is quite limited for SQLite ‘browsing’ I will use the sqlite3 command itself. By limited I mean that You can not type pkg shell "select * from deps;" query, You first need to start pkg shell and then You can type your query.

# sqlite3 -column /var/db/pkg/local.sqlite "select * from deps;" | grep libxul
www/libxul19   libxul      1.9.2.28_1  104

The second column is name so lets try to use it.

sqlite3 -header -column /var/db/pkg/local.sqlite "select * from deps where name='libxul';"
origin        name        version     package_id
------------  ----------  ----------  ----------
www/libxul19  libxul      1.9.2.28_1  104

So now we have the ‘problematic’ dependency entry nailed, lets modify it a little to the real installed packages state.

# sqlite3 /var/db/pkg/local.sqlite "update deps set origin='www/libxul' where name='libxul';"
# sqlite3 /var/db/pkg/local.sqlite "update deps set version='10.0.12' where name='libxul';"

You can of course use the ‘official’ way by using the pkg shell command.

# pkg shell
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> update deps set origin='www/libxul' where name='libxul';
sqlite> update deps set version='10.0.12' where name='libxul';
sqlite> .header on
sqlite> .mode column
sqlite> select * from deps where name='libxul';
origin      name        version     package_id
----------  ----------  ----------  ----------
www/libxul  libxul      10.0.12     104
sqlite> .quit

Now portmaster is happy and does not complain about any missing dependencies.

# portmaster --check-depends
(...)
Checking dependencies: zenity
Checking dependencies: zip
Checking dependencies: zsh
# 

Viola! Problem solved πŸ˜‰

… but pkg(8) has a tool for that already πŸ™‚

Its called pkg set and two most useful options from man pkg-set are.

  -n oldname:newname, --change-name oldname:newname
       Change the package name of a given dependency from oldname to newname.

(...)

  -o oldorigin:neworigin, --change-origin oldorigin:neworigin
       Change the port origin of a given dependency from oldorigin to neworigin.
       This corresponds to the port directory that the package originated from.
       Typically, this is only needed for upgrading a library or package that
       has MOVED or when the default version of a major port dependency changes.
       (DEPRECATED) Usually this will be explained in /usr/ports/UPDATING.
       Also see pkg-updating(8) and EXAMPLES.

In our case we would use pkg set -o www/libxul19:www/libxul command.

Not sure if it will solve that problem in the same way as I also updated the version in the database.

UPDATING

If you get into any trouble with the pkg upgrade command then you should also check latest version of the /usr/ports/UPDATING file – available after updating the Ports tree with portsnap fetch update command for example.

It describes what important has changed in Ports (and packages as packages are built from Ports).

# less /usr/ports/UPDATING

(...)
20180518:
  AFFECTS: users of sysutils/ansible*
  AUTHOR: lifanov@FreeBSD.org

  Ansible ports are now flavored. Package names for Ansible changed
  to include python version. Poudriere and package users don't need
  to do anything.

  To rename an installed package to match the new naming scheme,
  for example, for ansible24, run:

   # pkg set -n ansible24:py27-ansible24

(...)

20180214:
  AFFECTS: users of lang/ruby23
  AUTHOR: swills@FreeBSD.org

  The default ruby version has been updated from 2.3 to 2.4.

  If you compile your own ports you may keep 2.3 as the default version by
  adding the following lines to your /etc/make.conf file:

  #
  # Keep ruby 2.3 as default version
  #
  DEFAULT_VERSIONS+=ruby=2.3

  If you wish to update to the new default version, you need to first stop any
  software that uses ruby. Then, you will need to follow these steps, depending
  upon how you manage your system.

  If you use pkgng, simply upgrade:
  # pkg upgrade

  If you use portmaster, install new ruby, then rebuild all ports that depend
  on ruby:
  # portmaster -o lang/ruby24 lang/ruby23
  # portmaster -R -r ruby-2.4

  If you use portupgrade, install new ruby, then rebuild all ports that depend
  on ruby:

  # pkg delete -f ruby portupgrade
  # make -C /usr/ports/ports-mgmt/portupgrade install clean
  # pkg set -o lang/ruby23:lang/ruby24
  # portupgrade -x ruby-2.4.\* -fr lang/ruby24

(...)

The pkg(8) framework also has a tool for that with pkg updating command. Check man pkg-updating page for details. The most common use case would be using the -d argument with date as shown below.

# pkg updating -d 20190101
20190103:
  AFFECTS: users of multimedia/vlc*
  AUTHOR: riggs@FreeBSD.org

  The multimedia/vlc port has been upgraded to 3.0.5, the latest upstream
  release. Subsequently, multimedia/vlc-qt4 and multimedia/vlc3 have been
  retired and removed from the ports tree. Users who previously used
  multimedia/vlc3 might want to switch to multimedia/vlc with the following
  commands:

  # pkg install multimedia/vlc
    or
  # portmaster -o multimedia/vlc multimedia/vlc3
    or
  # portupgrade -o multimedia/vlc multimedia/vlc3

You may as well check the UPDATING file online at the https://www.freshports.org/UPDATING address.

Bulletproof Upgrades with ZFS Boot Environments

To be absolutely sure that you will have a working system no matter what will went wrong with the pkg upgrade command just use the ZFS Boot Environments. I have made talks in Poland at PBUG and in Netherlands at NLUUG about its features not so long ago. The latest PDF presentation is still available at the https://is.gd/BECTL link.

The procedure with beadm command looks like that.

# beadm create safepoint
Created successfully

# beadm list
BE           Active Mountpoint  Space Created
11.2-RELEASE NR     /            5.7G 2018-12-01 13:09
safepoint    -      -          316.0K 2019-01-16 23:03

# pkg upgrade

Now if anything wrong will not happen You still have fully working system under the safepoint boot environment name.

Just reboot into it (select it in the FreeBSD loader) and you are back with working system, like you would be back in time with time machine.

Query

You can also use pkg query command to seek for intormation you need.

For example to ’emulate’ the pkg info -r pkg-name argument which displays the list of packages which require pkg-name you can use pkg query command as shown below.

# pkg info -r sqlite3
sqlite3-3.26.0:
        colord-gtk-0.1.26
        py27-sqlite3-2.7.15_7
        freeciv-2.5.10
        colord-1.3.5
        libsoup-2.62.3
        libsoup-gnome-2.62.3
        subversion-1.11.0_1
        nss-3.41_1
        webkit-gtk2-2.4.11_19
        filezilla-3.36.0_1
        epiphany-3.28.5_1
        darktable-2.4.4_3
        aria2-1.34.0_1
        webkit2-gtk3-2.22.5
        qt5-webkit-5.212.0.a2_17
        qt5-sqldrivers-sqlite3-5.12.0
        hugin-2018.0.0_6
        pidgin-2.13.0
        thunderbird-60.4.0_1
        midori-0.7.0
        firefox-64.0.2,1

# pkg query -e '%n = sqlite3' %ro
graphics/colord-gtk
databases/py-sqlite3
games/freeciv
graphics/colord
devel/libsoup
devel/libsoup-gnome
devel/subversion
security/nss
www/webkit-gtk2
ftp/filezilla
www/epiphany
graphics/darktable
www/aria2
www/webkit2-gtk3
www/qt5-webkit
databases/qt5-sqldrivers-sqlite3
graphics/hugin
net-im/pidgin
mail/thunderbird
www/midori
www/firefox

If you would like to know when each package was installed for the first time then use this spell below.

# pkg query "%t %n-%v" \
    | sort -n \
    | while read timestamp pkgname
      do
        echo "$(date -r $timestamp) $pkgname"
      done | ( head; echo; tail )
Fri Jul  7 14:17:29 CEST 2017 libpciaccess-0.13.5
Fri Jul  7 14:17:35 CEST 2017 libedit-3.1.20170329_2,1
Fri Jul  7 14:18:09 CEST 2017 font-util-1.3.1
Fri Jul  7 14:18:10 CEST 2017 xcb-util-0.4.0_2,1
Fri Jul  7 15:26:56 CEST 2017 xcb-util-renderutil-0.3.9_1
Fri Jul  7 15:26:57 CEST 2017 dejavu-2.37
Fri Jul  7 15:27:00 CEST 2017 font-misc-meltho-1.0.3_3
Fri Jul  7 15:27:02 CEST 2017 font-misc-ethiopic-1.0.3_3
Fri Jul  7 15:27:06 CEST 2017 font-bh-ttf-1.0.3_3
Fri Jul  7 15:27:08 CEST 2017 tpm-emulator-0.7.4_2

Sun Jan 13 20:48:01 CET 2019 firefox-64.0.2,1
Sun Jan 13 20:48:01 CET 2019 htop-2.2.0_1
Wed Jan 16 23:08:21 CET 2019 vlc-3.0.6,4
Wed Jan 16 23:08:21 CET 2019 xdg-utils-1.1.3
Wed Jan 16 23:08:25 CET 2019 phonon-qt4-4.10.2
Wed Jan 16 23:08:25 CET 2019 physfs-3.0.1
Wed Jan 16 23:08:25 CET 2019 py27-pyasn1-0.4.5
Wed Jan 16 23:08:26 CET 2019 chromium-71.0.3578.98_2
Wed Jan 16 23:08:26 CET 2019 moreutils-0.63
Wed Jan 16 23:08:26 CET 2019 p5-URI-1.76

You can also display packages that will not be removed by pkg autoremove command because You installed them directly.

# pkg query -e "%a != 1" "%n" | tail
xmp
xorg
xprintidle
xterm
xxkb
youtube_dl
zenity
zfs-stats
zip
zsh

Rosetta Stone

The FreeBSD Wiki page also provides some table but the information is incomplete.

Thus I copied the table and filled the missing data.

Below you will find the updated Rosetta Stone between old pkg_* tools compared to current pkg(8) framework.

Function Old pkg_* Tools New pkg(8) Tools
List of installed packages. pkg_info pkg info
Basic info about package. pkg_info pkgname-pkgversion pkg info pkgname
pkg info category/name
pkg info pkgname-pkgversion
Detailed info about package. N/A pkg info -f pkgname
pkg info -f category/name
pkg info -f pkgname-pkgversion
List all files in installed package. pkg_info -L pkgname-pkgversion pkg info -l pkgname
pkg info -l category/name
pkg info -l pkgname-pkgversion
Find which package provides file. pkg_info -W /path/to/my/file pkg which /path/to/my/file
Install local package. pkg_add ./localpkg.tbz pkg add ./localpkg.txz
Install remote package. pkg_add -r mypackage pkg install mypackage
pkg install category/name
pkg install pkgname-pkgversion
Search for remote package. ls /usr/ports/* | grep mypackage pkg search mypackage
pkg search category/name
pkg search pkgname-pkgversion
Search for detailed info about remote package. make search name=mypackage
make search key=mypackage
pkg search -f mypackage
pkg search -f category/name
pkg search -f pkgname-pkgversion
Reverse deps of installed package. pkg_info -R pkgname-pkgversion pkg info -r mypackage
pkg info -r category/name
pkg info -r pkgname-pkgversion
Deps of installed package. pkg_info -r pkgname-pkgversion pkg info -d mypackage
pkg info -d category/name
pkg info -d pkgname-pkgversion
Remove unused packages install as dep. N/A pkg autoremove
Binary upgrade installed packages. pkg_upgrade (FreeBSD Ports) pkg upgrade
Create remote repository. N/A pkg repo /directory/with/packages
Manipulate packages in jail. N/A pkg -j
Manipulate packages in chroot. pkg_add -C pkg -c
Info about installed packages using RE. pkg_info -x pkg info -x
Info about installed packages using extended RE. pkg_info -X pkg info -X
Info about installed packages using globbing. pkg_info pkg info -g
Check for known vulnerabilities. portaudit (FreeBSD Ports) pkg audit
Out of date packages. pkg_version -l < pkg version -l <
Out of date packages. pkg_version -Il < pkg version -Il <
Out of date packages compared to remote repo. N/A pkg upgrade -n
Statistic about installed packages. N/A pkg stat
Checking for missing dependency (with fix). N/A pkg check -d
Port origin. pkg_info -o pkg info -o

If you know any other useful pkg(8) spells then let me know πŸ™‚

EOF

Valuable News – 2019/01/11

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here so someone else can

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

In Other BSDs for 2019/01/05.
https://www.dragonflydigest.com/2019/01/05/22307.html

Devin Teske made sysconf(8) to safely edit system config files on FreeBSD.
Another great tool after sysrc(8) that allows safe edit of system rc files.
https://github.com/freebsdfrau/FrauBSD/tree/master/sysconf

New PEFS 2018.12.29 Release.
http://pefs.io/blog/2018/12/release-20181229/?fbclid=IwAR2fPxLnl18rfAVcQ6OmMR7FhsRGuorHq84xYhQ-cnO2m7_7Z2aSFB65PLI

Revive Cisco IDS Into Capable OpenBSD Computer.
https://komlositech.wordpress.com/2018/12/30/revive-a-cisco-ids-into-a-capable-openbsd-firewall/

How I did start using FreeBSD.
https://www.banym.de/how-i-did-start-using-freebsd.html

MacBook Pro 9.2 Gets FreeBSD Support.
https://twitter.com/FreeBSDHelp/status/1081395210259595265

New HardenedBSD 13.0 Image for RPI3.
https://hardenedbsd.org/~shawn/rpi3/2019-01-05/HardenedBSD-aarch64-13.0-HARDENEDBSD-fa32a12f857-RaspberryPi3.img.xz
https://twitter.com/lattera/status/1081919725611950082

FreeBSD gives sh(1) proper default prompt instead of just “$“.
https://svnweb.freebsd.org/base?view=revision&revision=342812

More FreeBSD RFC Sendmail Deprecation Discussion.
https://lists.freebsd.org/pipermail/freebsd-arch/2017-December/018712.html

DistroWatch – Feature Story – FreeBSD 12.0-RELEASE Review.
“(…) this release feels like a polished and improved incremental step forward.”
https://distrowatch.com/weekly.php?issue=20190107#freebsd

DistroWatch – Musings on Distros After Prolonged Use (2019).
“FreeBSD is probably my favourite server-oriented operating system, mostly because it never surprises me.
FreeBSD tends to do what you tell it to do, and just do what you tell it to do.”

https://distrowatch.com/weekly.php?issue=20190107#lookback

New ZFS on FreeBSD Implementation Can Now Be Tested with TrueOS.
https://www.phoronix.com/scan.php?page=news_item&px=ZFS-On-Linux-Test-TrueOS-Spin
https://pkg.trueos.org/iso/snapshot-zol/

OmniOS Community Edition r151028j/r151026aj/r151022ch.
https://omniosce.org/article/release-028j-026aj-022ch

FreeBSD Foundation – December 2018 – Development Projects Update.
https://www.freebsdfoundation.org/blog/december-2018-development-projects-update/

Zackup – Backup to ZFS – Inspired by BackupPC.
https://github.com/digineo/zackup

POSIX Shell and Utilities.
https://shellhaters.org/

OPNsense 18.7.10 Released.
https://forum.opnsense.org/index.php?topic=10903.0

A wc clone written in Rust.
https://crates.io/crates/cw

FreeBSD as my Network Storage Server (Part 1).
https://www.jasonvanpatten.com/2015/11/26/freebsd-as-my-network-storage-server/

FreeBSD as my Network Storage Server (Part 2).
https://www.jasonvanpatten.com/2015/11/26/freebsd-as-my-network-storage-server-part-2/

Knightmare: DevOps Cautionary Tale.
Knightmare: A DevOps Cautionary Tale

IOCCC: Best of Show.
https://www.ioccc.org/2018/mills/hint.html

Quick Naive Benchmarks on AMD A8-5550M APU on FreeBSD (with and without AESNI).
https://lists.freebsd.org/pipermail/freebsd-current/2018-December/072466.html

Goal of GameBSD is to provide a place for students to learn about programming and technology.
https://gamebsd.com/index.html

AIX 7.2 running on AARCH64 (ARM) Pinebook with QEMU.
https://twitter.com/astr0baby/status/1082811124897251328

OpenBSD Router.
http://www.homeandofficeit.com/Main/OpenBSDRouter

New console font Spleen made default on OpenBSD.
https://undeadly.org/cgi?action=article;sid=20190110064857

Interactive VIM Tutorial.
https://openvim.com/

ZFS on Linux does not work on Linux 5.0 kernels.
https://marc.info/?l=linux-kernel&m=154714516832389

Hardware

AMD Ryzen Mobile 3000-Series Launched – 2nd Gen Mobile at 15W-35Wand Chromebooks.
https://www.anandtech.com/show/13771/amd-ces-2019-ryzen-mobile-3000-series-launched

AMD launches two new A-series 6W chips for Chromebooks.
https://liliputing.com/2019/01/amd-launches-two-new-a-series-chips-for-chromebooks.html

AMD Powered Acer Chromebook 315 Announced.
https://www.anandtech.com/show/13783/acer-at-ces-amd-powered-acer-chromebook-315-announced

Huawei claims its Kunpeng 920 ARM based processor is the industry’s fastest.
64 cores clocked at 2.6GHz with 8-channel DDR4 memory.
Also two 100G RoCE ports and support for PCIe Gen4 and CCIX.
https://venturebeat.com/2019/01/06/huawei-claims-its-kunpeng-920-arm-based-risc-processor-is-the-industrys-fastest/

Huawei Unveils Industry’s Highest-Performance ARM-based CPU.
https://www.huawei.com/en/press-events/news/2019/1/huawei-unveils-highest-performance-arm-based-cpu

Samsung Plans 3nm Gate-All-Around FETs in 2021.
https://www.eetimes.com/document.asp?doc_id=1333318

Lenovo ThinkPad X1 Carbon 7th Gen Gets Thinner.
https://www.anandtech.com/show/13833/lenovo-at-ces-2019-7th-gen-thinkpad-x1-carbon-gets-thinner

Life

Amazon sent 1700 audio recordings of Alexa user to a stranger.
https://www.hackread.com/amazon-sent-audio-recordings-of-alexa-user-to-stranger/?fbclid=IwAR0B9CiTTpOxDClsNmfrlmRxyzP1nHzMYbCk2e8aAI8EgNkgKvyImJXGd-A

Before you can be with others, first learn to be alone.
https://aeon.co/ideas/before-you-can-be-with-others-first-learn-to-be-alone

10 Harmful Effects of Religion.
http://sarahrocksdale.wixsite.com/blog/single-post/2019/01/08/10-Harmful-Effects-of-Religion

System Down: systemd-journald Exploit.
https://www.qualys.com/2019/01/09/system-down/system-down.txt

Other

The State Of Software Security In 2019.
https://noncombatant.org/2019/01/06/state-of-security-2019/

The Developer Experience Bait-and-Switch.
https://infrequently.org/2018/09/the-developer-experience-bait-and-switch/

LinkedIn violates privacy and detects usage of browser extensions.
https://github.com/dandrews/nefarious-linkedin

Classic Doom gets 3D/HD remaster – courtesy of the fans.
https://www.pcgamesn.com/doom/doom-remaster

RPG Codex Review: ATOM RPG (Remix of Fallout Story).
https://rpgcodex.net/content.php?id=11080

Facebook is the new crapware.
https://techcrunch.com/2019/01/09/facebook-is-the-new-crapware/

EOF