Monday, November 24, 2014

ruby-build Offline

ruby-build downloads package files via HTTP in many cases, not HTTPs. The integrity of package files is assured by including the sha256 checksums in the ruby-build git repository which is cloned via HTTPs and comparing them with the checksums of the downloaded files. This is problematic when something like Blue Coat gets in the way, requiring authentication for HTTP (but not necessarily for HTTPs). It occurred to me download the package files manually, using a web browser, and provide them to ruby-build. (I suppose it would be possible to get cURL and wget to authenticate by providing the right environment variables or configuration file elements, too.)
ruby-build supports this with the RUBY_BUILD_CACHE_PATH environment variable which may be set to the path of a directory containing package files. The ruby-build builtin definitions are composed of calls to functions in ruby-build, for instance install_package, a package name, a URI for the package, and other parameters for the call. Use the URIs to download the packages with a web browser, place them in a directory, and execute something like
sudo RUBY_BUILD_CACHE_PATH=/home/john/Downloads/ ruby-build 2.1.5 /usr/local/lib/ruby/2.1.5
Of course, skip the sudo if you’re building in home.
If a package checksum doesn't match, it seems that ruby-build continues without warning, attempting to download the package.
I would be surprised if this approach didn't work for ruby-build as a rbenv plugin, also.

Thursday, August 21, 2014

Debian 7 LXDE PCManFM Doesn't Remember Sort

I built a new Debian 7 "Wheezy" LXDE VM this month and noticed that PCManFM seemed to display files and folders in random (natural?) order though at View>Sort Files Ascending and By Name were indicated. Clicking the name header in detailed list view would order things as expected, but the change was not persisted between sessions. I tried changing ui>sort_by in ~/.config/pcmanfm/LXDE/pcmanfm.conf from 0 to 2, but this seemed to have no effect. I found that if you change View>Sort Files Ascending and By Name to something else, say Ascending and By Modification Time, and then return it to Ascending and By Name the change persists and, in fact, you find that ui>sort_by in pcmanfm.conf is now 2.

Monday, April 14, 2014

Using a Nook HD with Debian Wheezy

About a year ago my wife decided to buy a Barnes & Noble Nook HD when they were very much on sale. She used it as a standalone device for some time, but eventually wanted to move some of her music to it. By then, her notebook was running Debian 7. She found that her Nook was mounted read-only.

I found Philip Langdale's gvfs-mtp PPA which as I understand it updates gvfs-backends to include support for MTP. I added the PPA keys:
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
Updated:
sudo apt-get update
And saw that the PPA was not found. I noticed that the output indicated wheezy main. Knowing this wasn't right, I opened /etc/apt/sources.list but did not see the PPA. Then, I opened synaptic, did see the PPA, and modified the two sources to point at precise instead of wheezy. (Looked into this a little. Apparently, apt-get-repository writes to files in /etc/apt/sources.list.d when a PPA is involved, not to /etc/apt/sources.list.) A subsequent update succeeded. I followed this with:
sudo apt-get upgrade
And found that the Nook would mount writable. In nautilus it's now possible for my wife to drag music from her computer to her Nook.