Author name: Dan Langille

I've been playing with Open Source software, starting with FreeBSD, since New Zealand Post installed DSL on my street in 1998. From there, I started writing at The FreeBSD Diary, moving my work here after I discovered WordPress. Along the way, I started the BSDCan and PGCon conferences. I slowly moved from software development into full time systems administration and now work for very-well known company who has been a big force in the security industry.

Moving from storing the tsvector values to a tsvector index

This post documents how I’m changing the search methods for pkg-message. It uses full-text search, but instead of using a special column, I’m going to use an index. I will elaborate. When searching pkg-message was added to the website, a different approach was taken than in the past. In Converting a column-based expression to a …

Moving from storing the tsvector values to a tsvector index Read More »

When tsvector was working as expected on most hosts, but not one

One of the primary uses for FreshPorts is searching various characteristics of the ports. One highly used search feature is pkg-messages (background at pkg-message). A problem which has been vexing me for about 2 months was the lack of results on prod, but results which worked on dev. The issue was raised on GitHub. Initially, …

When tsvector was working as expected on most hosts, but not one Read More »

note to self: restoring a database

Tonight I was setting up a new FreshPorts node for development. It took me a while to remember the steps. sudo su -l postgres psql template1 < globals.sql createdb -T template0 -E SQL_ASCII freshports.org psql freshports.org create language plperl; exit; time pg_restore -j 32 -d freshports.org ~dan/dump/freshports.org.dump

New links to GitLab and GitHub, in addition to the exist cgit.freebsd.org

Based on the Add links to GitHub and GitLab mirrors for ports and commits request, the website has some new links arriving soon. Link to GitHub from each commit A similar link to GitLab Use the one you like. Each git web interface has it’s own followers. Also, while there, the commit hash at the …

New links to GitLab and GitHub, in addition to the exist cgit.freebsd.org Read More »

Update to Python 3.9 broke commit processing

The July 4th tweet announced “dev, test, and stage .freshports.org are now running Python 3.9”. Three days later, “Is it coincidental that dev, test, and stage are all stuck on commits from July 4?” I took notes as I explored the problem. The first clue was: 2022.07.07 00:12:03 git-delta.sh /usr/local/libexec/freshports/git-to-freshports-xml.py –repo ports –path /var/db/ingress/repos/ports –branch …

Update to Python 3.9 broke commit processing Read More »

Help needed with shell scripting

I need some help with the git processing shell script. Look at line 82 in this script please. See those hardcoded branch names? That’s my problem. Let’s reduce the shell script to a simple proof of concept. % cat ~/tmp/poc.sh #!/bin/sh git for-each-ref –format ‘%(objecttype) %(refname)’ \ | sed -n ‘s/^commit refs\/remotes\///p’ \ | while …

Help needed with shell scripting Read More »

Scroll to Top