OpenBSD Journal

b2k16 hackathon report: Jeremy Evans on ports cleaning, progress on postgres, nginx, ruby and more

Contributed by pitrh on from the port me up before you go dept.

Your next b2k16 report comes form Jeremy Evans, who writes:

I started off b2k16 by channeling tedu@, and removing a lot of ports, including lang/ruby/2.0, lang/io, convertors/ruby-json, databases/dbic++, databases/ruby-swift, databases/ruby-jdbc-*, x11/ruby-profiligacy, and mail/ruby-mailfactory.
I'm quite sorry to see lang/io go, as it is a cool langugage and I spent a full day debugging and fixing an alignment issue in it at p2k12 that allowed it to get imported. However, the coroutine support has been broken since setjmp cookies were introduced about 6 months ago. Since it is unlikely to be fixed without a rewrite of the coroutine code, it was better to just remove it.

The first major project I worked on at b2k16 was to get pg_upgrade working. pg_upgrade is part of PostgreSQL, but it doesn't work on OpenBSD as it needs access to the binaries for the previous version of PostgreSQL in order to work, and those are removed during the upgrade process. So the solution is to add a package for the previous version of PostgreSQL that installs the binaries into a versioned directory, and add a separate pg_upgrade subpackage to databases/postgresql that depends on that package. That was fairly straight forward, if a little time consuming. After that, I always worked on getting the four ports that would not build with PostgreSQL 9.6 to do so. Two of these (postgresql-plv8 and postgresql-pllua), this was a simple change to the port Makefile, and for the other two, I found a patch in GitHub (skytools), or wrote one myself after looking at changes between PostgreSQL 9.5 and 9.6 (pg_statsinfo). I think the PostgreSQL port should now be ready to upgrade to 9.6.1, though it's ultimately up to the maintainer (pea@) to decide that.

The next major project I worked on was to switch nginx from using flavors to subpackages, using the dynamic module support recently added. For the modules that ship with nginx, this was a fairly simple change, though most of the port Makefile had to be rewritten. Nginx supported 3 flavors that included external modules, one for naxsi (a web application firewall), one for lua (nginx_devel_kit/lua-nginx-module), and one for ruby (passenger), all of which had to be upgraded to handle dynamic module support. naxsi and lua were fairly easy to deal with, but passenger, as usual, is a nightmare. It took almost a full day to get passenger upgraded, as they moved every single file that we patch. I also got fed up with the stupid hiding of build steps behind a progress bar, so I patched out all of the progress bar code used during build. Anyway, with passenger ready, I was able to commit the nginx update during b2k16 with the support of the nginx maintainers and fellow porters.

I committed updates to about half of our ruby ports that used native extensions, including: ruby-amalgalite, ruby-ldap, ruby-mysql2, ruby-sequel, ruby-sqlite3, ruby-tiny_tds, ruby-ffi, ruby-narray, ruby-prof, ruby-rb-gsl, ruby-yajl, ruby-rmagick, ruby-mail, ruby-mime-types, ruby-eventmachine, ruby-msgpack, ruby-bcrypt, ruby-libvirt, ruby-nokogiri, ruby-rdiscount, ruby-redcarpet, ruby-redcloth, ruby-puma, ruby-raindrops, ruby-thin, ruby-unicorn, and ruby-websocket-driver. I also imported sass (a CSS preprocessor written in ruby), as well as ruby-mime-types-data (needed for the ruby-mime-types update).

In terms of ports infrastructure, during b2k16 I was able to commit a patch to plist creation that has been in my tree for almost 4 years, which was created based on discussions with espie@ at p2k12. The patch warns if you attempt to create a plist where the name of the port matches a previous plist, but the pkgpath does not match. That's usually a sign of a bug in the package, so it makes sense to notify the package builder in that case.

I was also able to debug in crash in audio/aqualung that occurred occasionally when loading files. This was due to a bad local patch that was taken from the Aqualung bug tracker, and was a problem on OpenBSD due to different type sizes. I came up with a more involved patch that used OpenBSD APIs to fix the problem, but naddy@ pointed out a much easier fix, which was then committed.

During the hackathon, I took the ruby-tame port I created at c2k15, and updated it from the tame(2) API to the pledge(2) API, and released ruby-pledge, as well as importing a port for it. pirofti@ was testing it and noticed that if you installed it and then uninstalled ruby, it left directories around. I was able to figure out that this was because ruby and all ruby gem ports with native extensions were not including the necessary directories in the packages, so I had to fix this in all ruby 2.x versions, as well as bump all ruby gem ports with native extensions. During this work, I discovered that portbump(1) was not correctly bumping ruby ports. I came up with a fairly bad patch to fix the problem, which was eventually handled in a much better way by zhuk@.

I also worked on ports for a couple languages, mruby (lightweight, embedded ruby) and crystal (compiled, typed language with syntax similar to ruby). I was able to commit mruby shortly after b2k16 ended. I also worked on a ruby-tk port, as ruby 2.4 not longer includes tk.

During most of the hackathon, I was also simultaneously testing a ruby 2.4 port, which appears to have some sporadic bus errors during testing when compiled with -O2 that do not occur when compiled with -O1 (or when adding debugging). I tried many different combinations of -O1 with specific optimizations added at -O2, but unfortunately I was unable to isolate optimizations that could be causing the errors.

I had a great time at b2k16, and would like to thank robert@ for hosting again, as well as the OpenBSD Foundation for sponsoring the hackathon.

Thanks for the report and the hard work, Jeremy!

(Comments are closed)


Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]