Multi-version Slackware upgrades don't work so well
#21 Henry, Wednesday, 09 December 2009 3:51 PM (Category: Linux)
(Tags: slackware)

I decided to experiment with the new (to me) slackpkg way of keeping Slackware up to date. My home server was Slackware 12.2. I decided to see if slackpkg could get it up to Slackware 13.0. I tried it. It was a dismal failure.

Once I determined that I had rendered the server unusable, I installed Slackware 13.0 on it, configured it and got it all working again, and then used slackpkg to get it up to date. It worked fine.

So I have learnt an important lesson. Don't try and jump versions with slackpkg. I'll opt for the safer upgrade path in future.

No comments
LPs with Audacity
#20 Henry, Wednesday, 09 December 2009 3:47 PM (Category: Linux)
(Tags: music lp audacity)

So now I have Audacity installed on my Linux boxes and I can do my audio editing again. I have nothing against running Audacity on my Macs, but it works better on my Linux boxes.

I had a whole bunch of files to edit. Several weeks ago, I attached my Technics turntable to my old RadioShack mixer, pushed that through a USB device I got from ThinkGeek.com a few years ago that doesn't appear to be on sale any more, and then fed that into my MacBook. I used the Audio Record program included with Roxio Toast, and I played my LPs and singles and created AIFF files.

These are LPs that did not make it to CD, otherwise I would have just bought the CD. Australian music from Ignatius Jones - Like a Ghost single and maxi-single, Pardon Me Boys LP, and Peter Scriven's Original Tintookies Soundtrack from the 1960s. Gaye Bykers On Acid's first LP Drill Your Own Hole. Leather Nun's single Prime Mover, so I get the foul B side F.F.A. The double LP An Evening With Groucho. And Jethro Tull's Living In The Past. This did appear on CD, but the original 2CD set is unavailable except for huge amounts of money on eBay, and all that's left is the single CD version that has some tracks chopped out.

I transferred the AIFF files to my Linux desktop and used Audacity to chop them into tracks and save them as WAV files. Then they were folded into my music collection, stored permanently as flacs, and the mp3 versions loaded onto my devices for playing.

And now I can enjoy the music again.

No comments
Slackware resurrection
#19 Henry, Wednesday, 09 December 2009 2:50 PM (Category: Apple)
(Tags: slackware slackpg)

I got a strong reaction when I said I was prepared to leave Slackware and go to some other Linux distribution. Several people offered good advice, and one person, Matthew, volunteered to come to the next TWUUG meeting and show me how Slackware could meet my needs and solve my problems and ease my frustrations. We both came to the next TWUUG meeting and I learnt a whole new area of Slackware that I did not know about. I've been using Slackware since 1994, and I must have stopped learning at some point because I missed a whole bunch of development and I got left behind.

My frustrations were basically that

Matthew showed me how to get around all these issues.

I already knew how Slackware package management worked. You get a package from some source, and you install it with installpkg, remove it with removepkg, and update it with upgradepkg. I already knew this and had used it often.

slackpkg

But what I did not know about was the level above that, that allows you to keep your whole Slackware installation up to date. This revolves around the use of slackpkg. This is like apt-get on other distributions.

You start by deciding whether you want to keep your Slackware installation current to the release but with security patches added. This is the stable path. So right now, Slackware 13.0 is the release. Or you can keep it up to date to 'current', which includes all updates to all packages. You move away from the stable release, but your software is more cutting edge.

Your first step is to go down to root, then edit the file /etc/slackpkg/mirrors and set your repository. I was advised to use slackware.mirrors.tds.net because of its physical proximity to where I am, so I found the line in the mirrors file that matched that repository and I uncommented it. Other parts of the world or the USA should choose a repository closer to them. Then you choose whether you want to stay in sync with 13.0 or with 'current'. If you choose 13.0, you have no more changes to make with the mirrors file. If you want to stay on the bleeding edge and go with 'current', and I did, you edit that line you just uncommented and you change the 13.0 at the end of the line to be current. Like this:

http://slackware.mirrors.tds.net/pub/slackware/slackware-current/

With that single line changed, you are now ready for the magic and you can keep your system in sync. You now use slackpkg and you call:

slackpkg update

This will look at the Change Log at the repository and determine if there are any changes. It will bring the Change Log down to your box and analyse it and convert it so slackpkg can use it. Then you will want to make any updates necessary, so you call

slackpkg upgrade-all

This will work through the Change Log and determine what packages need changing. It will display them and let you selectively choose to update them or ignore them. When you say Go, it will go ahead and update all the packages you said it should update. If any of these packages have config file changes that might interfere with your existing config files, it will alert you to this and give you options. Do not just let it install the new config files. I did that and swore a lot and had to find my config file backups.

Then when the updates are done, you will want to see if there are new packages to install, so you call

slackpkg install-new

and you get to choose from the list of new packages (if there are any). And finally, you want to see if old stuff needs to be deleted.

slackpkg clean-system

Matthew gave me a script that combines all these steps:

#!/bin/bash
slackpkg update
slackpkg upgrade-all
slackpkg install-new
slackpkg clean-system

At work, I go through a proxy so I needed a modification to this script:

#!/bin/bash

# Set the proxy
export http_proxy="http://proxy.internal:3128/"
export ftp_proxy="http://proxy.internal:3128/"
export HTTP_PROXY="http://proxy.internal:3128/"
export FTP_PROXY="http://proxy.internal:3128/"

# Start the slackpkg ritual
slackpkg update
slackpkg upgrade-all
slackpkg install-new
slackpkg clean-system

So whenever I get word from Slackware about security updates (I am on the Slackware security mailing list), or I hear about updates to packages I use, or I just want to check for updates out of boredom, I drop down to root and run this script. I answer the questions, I watch what gets installed or updated, and my system stays up to date. Occasionally there are kernel changes, and after the updates, I reboot the box. It depends on what comes down. You can't add this to cron because it's an interactive tool.

So this keeps my system up to date. Learning about this solved a big problem for me and made me very happy.

SlackBuilds

Then came the problem of getting other packages. I wanted Audacity and failing to get it was what started me on this whole saga.

Matthew showed me a web site that provides ways of creating other packages - slackbuilds.org. This site provides a way to build packages for Slackware. I looked under the Repository, then under Audio, and there was the build scheme for Audacity.

I read the README file and it showed that I needed two other packages - libsndfile and wxPython. Both of these are available on slackbuilds.org. I went to each of these (libsndfile and wxPython),and downloaded the source code and the SlackBuild script.

As root, I set up an area for the SlackBuilds scripts. I keep a lot of data in a central location called /data, which makes it easy to back stuff up. I created a new directory called /data/slackbuild. I moved in to that directory and untarred the slackbuild file for libsndfile.

cd /data/slackbuild
tar xvzf /home/myuser/downloads/libsndfile.tar.gz

This created a directory called libsndfile with the SlackBuild files in it. I moved into that directory, copied the source code file into it and then ran the SlackBuild script.

cd libsndfile
cp /home/myuser/downloads/libsndfile-1.0.20.tar.gz .
sh libsndfile.SlackBuild

This untarred the source file and then automatically did the configure and make. At the end, it created a Slackware package containing libsndfile built and ready for installation. It was created in /tmp. When it was done it said

Slackware package /tmp/libsndfile-1.0.20-i486-1_SBo.tgz created.

Now I could easily install it with

installpkg /tmp/libsndfile-1.0.20-i486-1_SBo.tgz

Best of all, I can transfer this package to all my other Slackware boxes and install it with installpkg.

I followed the same procedure for wxPython and Audacity, and they each worked the same way and it was painless, and it was easy, and it just worked. I was pretty ecstatic.

There is one more step to make. If you run the script above to update Slackware with slackpkg, the instruction to 'slackpkg clean-system' will want to remove these SlackBuild packages because they are not part of the official Slackware release. You want to change this behaviour by editing the file /etc/slackpkg/blacklist, and adding the base name of the SlackBuild packages to the list of packages to be ignored. So I added these lines to that file:

libsndfile
wxPython
audacity

When I went to do OpenOffice, I ran into one small problem. The defaults for the SlackBuild scripts is to put temporary files and the resulting packages in /tmp. This caused my root partition to run out of space. I had a look in the .SlackBuild scripts and found that you can override these defaults. I decided to keep the temporary files and the packages under the /data/slackbuild structure so I created two new directories - /data/slackbuild/tmp and /data/slackbuild/packages, and I added these lines to my root .bash_profile (yes, I know it's a security breach to have a root .bash_profile):

# Set some SlackBuild environment variables
export TMP=/data/slackbuild/tmp
export OUTPUT=/data/slackbuild/packages

and that solved this problem.

Conclusion

And that solved all my immediate frustrations and allowed me to get going with Audacity again. I learned a bunch of other things too, but I'll describe them later as I get more familiar with them. I learnt about sbopkg which makes the SlackBuild procedure more automated. And I learnt about setting up your own Slackware repository so if you have multiple boxes to keep up to date, you don't have to hit the official repositories all the time, you can keep your own repository in sync (you hit the official repositories once) and then all your boxes hit your private repository. It's being network responsible. I am setting this up now, and I'll describe it when I have succeeded.

No comments
Anne tries the Tom Tom GPS for the first time
#18 Henry, Wednesday, 09 December 2009 1:58 PM (Category: Gadgets)
(Tags: tomtom gps)

I bought Anne a Tom Tom GPS at the recent Black Friday sales. She tried it out today for the first time. Unfortunately, she was going to Newport News, which seems to be a Bermuda Triangle for GPS units.

We added the address this morning, and it took her to the wrong place. It thought that x was y and it took her to y. This isn't a problem specifically with the Tom Tom, because the my Garmin GPS takes us to wrong places in Newport News too. And a few years ago before we had GPS, I used a MapQuest map to go to a concert in Newport News and it wanted to go down a street that had not existed for a year and a half, that had been blocked.

So we know that when we go to Newport News, we must take a map, just in case. And Anne needed her just-in-case map today.

No comments
My network connection has stabilised
#17 Henry, Wednesday, 09 December 2009 1:51 PM (Category: Hardware)
(Tags: network cox)

For the last six months, I have had a horrible intermittent problem with my Cox cable network connection. Every day, between 5 and 30 times, the connection will freeze for about 1 to 2 minutes.

When this happens, I can get to all my boxes in my home network, I can get to the firewall/router, I can get to the cable modem, but I can't get past the cable modem. The internal web server on the cable modem says that the connection is "Not Operational".

I have phoned Cox Business repeatedly about this, and they tweak something, and it seems to go away for a while, or they look for a while and run their tests but can't see anything. I have replaced all my network cables. I have replaced the switches. I have replaced the firewall/router. I have even replaced the cable modem. None of this had any effect.

I set up a ping to my work site, and it would ping once every two minutes and log the result. This allowed me to work out how often it happened, and if there were any patterns. It happened a lot, and there were no patterns.

Last Sunday, it really went bad and we had several hours where the connection was up and down repeatedly. I phoned Cox Business and they decided there was a problem and they organised a tech to come and check it out. I wrote a complete record of the problems, showing what it was and what I had already done to try and eliminate it (replace my whole network effectively), and left it with Anne to give to the tech.

He arrived early Monday, Anne showed him my document and he read it and went out and checked the green box in the backyard, and the connections to the house. They all checked out good. He came inside and helped Anne move furniture until he could see the cable connectors in the wall. He tested them and he had an "Aha" moment. Those connectors were the original ones in the house, and they were at least 20 years old, and they had deteriorated. He said they were the problem and he replaced them all, tested it again and declared success.

I left my ping test up, and now after a week and a half without a single outage, freeze, dropout, or any problem at all, I agree with him and declare success.

My cable freezing days are over, we have a stable network connection again, and the mail and web server are permanently up again. I am happy again.

No comments