Monday, April 16, 2007

opensuse suse 10 OSS phantom OR ghost 169.254.0.0 network

Opensuse 10 / 10.1 / 10.2 phantom 169.254.0.0 network in route list (route -n).

Post I found related to the problem:

http://lists.opensuse.org/opensuse-autoinstall/2005-01/msg00116.html

Explanation linked to from other post:

http://en.wikipedia.org/wiki/Zeroconf

I didn't bother reading all of it, but it did clear up the fact that it seems to be part of the system and nothing to worry about. I couldn't find it in yast's network config tool anywhere.. so was wondering why it was there.

opensuse suse 10 OSS ntop 3.2 recompile from source

After trying to download the ntop 3.2 source package from opensuse 10.2 (this server is opensuse 10.0), building it, and upgrading/installing it (rpm -Uvh ntop-3.2.xxx) over the current ntop 3.1.50 that was installed, I kept getting an error complaining about libmyrrd-3.2.so, like the following, the rest of ntop would work, just no RRD graphs, etc:

Mon Apr 16 03:38:21 2007 **WARNING** Unable to load plugin '/usr/lib/ntop/plugins/rrdPlugin.so'
Mon Apr 16 03:38:21 2007 **WARNING** Message is 'libmyrrd-3.1.50.so: cannot open shared object file: No such file or directory'

After 10 or 20 minutes of futzing around, trying to recompile ntop 3.2 a few times, I decided to try removing ntop entirely from the system, *THEN* compiling the fresh copy. After compilation, I installed the ntop 3.2 from the newly created binary rpm in /usr/src/packages/RPMS/i586/ntop-3.2.xxxx.rpm, tried running it again, and it didn't complain and RRD worked this time.

SecureCRT CTRL-S silent input output CTRL-Q to restore

Sometimes while using SecureCRT, I notice that I accidentally hit CTRL-S ... this *seems* to make it so securecrt does not accept any more input, and you don't see any more output for the connection. CTRL-S actually happens to be SILENCE (or similar) mode, and makes it so you don't see what you type, or the output from those commands. I googled for the problem, and found this link:

http://www.derkeiler.com/Mailing-Lists/securityfocus/security-basics/2001-12/0345.html

Basically it explains that if you press CTRL-Q, you will see your commands, and their output again. Problem solved. This one had bugged me a few times over the years, and I had just disconnected from the server, and reconnected moments later to fix the problem.

Sunday, April 1, 2007

what sent me on my search of rpmbuild in the first place

I found myself trying to use cfdisk on the fedora core 5 (fc5) system, only to find that it didn't exist and there were no precompiled packages for it that I could see. I did some searching, finding out that cfdisk comes with the util-linux package (on a NORMAL system ;p) ... however, it was nowhere to be found in the fc5 util-linux package. I searched google for some answers and found that the redhat team had removed cfdisk from the build of util-linux because it 'sucked' back in 2001. I personally find cfdisk handy for both editing and viewing partitions. I continued on to get the util-linux source package and then tried to rebuild it, finding the system was missing rpmbuild by default (probably because I didn't install the development options during the installation).

I after the whole problem of finding rpmbuild missing and not in the package I expected, I got that sorted out, and continued on to try and rebuild util-linux with cfdisk included.

// note: first here's a few other steps I took before getting to the rebuild part

// to get the yumdownloader program
yum install yum-utils

// to get the util-linux source package from the repositories
yumdownloader --source util-linux --enablerepo core-source --enablerepo extras-source --enablerepo updates-source

// and finally, editing the spec file and trying to build the source package

cd /usr/src/redhat/SPECS

nano -wb util-linux.spec

// find any spots that remove cfdisk functionality (hint: CTRL-W for search in nano, and put in cfdisk and then remove those references to cfdisk, README.cfdisk and one other one I don't recall what)

// I then proceeded with my first attempt to rebuild the package (while in the SPECS dir still):

// -bb just builds the binary pacakge, as we don't really need a modified version of the source package

rpmbuild -bb util-linux.spec
error: Failed build dependencies: pam-devel is needed by util-linux-2.13-0.20.4.i386 ncurses-devel is needed by util-linux-2.13-0.20.4.i386 libtermcap-devel is needed by util-linux-2.13-0.20.4.i386 zlib-devel is needed by util-linux-2.13-0.20.4.i386 slang-devel is needed by util-linux-2.13-0.20.4.i386 texinfo is needed by util-linux-2.13-0.20.4.i386 gettext-devel is needed by util-linux-2.13-0.20.4.i386 libselinux-devel is needed by util-linux-2.13-0.20.4.i386 e2fsprogs-devel >= 1.36 is needed by util-linux-2.13-0.20.4.i386 audit-libs-devel >= 1.0.6 is needed by util-linux-2.13-0.20.4.i386

// followed by: (to fix the problems, which also installed other dependencies)

yum install pam-devel ncurses-devel libtermcap-devel zlib-devel slang-devel texinfo gettext-devel libselinux-devel e2fsprogs-devel audit-libs-devel

// and yet again, followed by (because of a build error saying it couldn't find aclocal, which also installed m4 as a dependency):

yum install automake autoconf

// I then re-ran rpmbuild -bb --target=i586 util-linux.spec
// with the following results:

Obsoletes: fdisk tunelp mount losetup schedutils
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/util-linux-root
error: Installed (but unpackaged) file(s) found:
/sbin/cfdisk
/usr/share/man/man8/cfdisk.8.gz


RPM build errors:
Installed (but unpackaged) file(s) found:
/sbin/cfdisk
/usr/share/man/man8/cfdisk.8.gz

// This means that the cfdisk file was built, but isn't listed as an included file in the rpm package (per the spec file) ... so I need to edit the util-linux.spec file to be like the following:

// old:
/sbin/fdisk
%{_mandir}/man8/fdisk.8*

// new:
/sbin/fdisk
%{_mandir}/man8/fdisk.8*
/sbin/cfdisk
%{_mandir}/man8/cfdisk.8*

// Finally... a successful build of util-linux with cfdisk being included in the package instead of behing removed.

// and finally, the commands to install this util-linux over top your old util linux:

rpm -Uvh --force /usr/src/redhat/RPMS/i586/util-linux-2.13-0.20.4.i586.rpm

// --force was required since the package was already listed as being installed (and technically it was the same version)

// one thing to note is that if redhat ever updates the util-linux package, it may over-write your util-linux package during the update... I'm not sure if it will remove the cfdisk binary or not (it probably will), so you may want to add util-linux to a list of packages that are not to be updated automatically... or, if you're energetic, you could create a small patch between the original spec file and the modified one and keep it around for when you want to rebuild util-linux with newer source packages. The second idea may be better in the long run, as there may be security updates that should be installed for this package at some point.. so of course to err on the side of safety, you should allow redhat to replace the util-linux package with the default ones (if there are updates) and if you ever notice cfdisk is not available on the box, it means you need to go download the latest source package for util-linux from the repositories, edit the specfile, and build away, and finally re-install the updated package.

linux fedora fc5 missing rpmbuild OR can't find rpmbuild OR no rpmbuild

I was using a fedora core 5 (fc5) box today and ran into a problem with not being able to build any packages from source. I found that rpmbuild was not installed, and a cursory search showed that rpmbuild comes with the rpm package (as expected) ; however, while rpm was installed on this system (by default of course), there was no rpmbuild executable (or symlink) to be found.

Rpmbuild is usually found as /usr/bin/rpmbuild and on one box I checked, was a symlink to /usr/lib/rpm/rpmb. On the other (SuSE 10.1) box that had rpmbuild, I checked which package owned this file/symlink with the following result:

susemachine:~ # rpm -q --whatprovides /usr/bin/rpmbuild
rpm-4.4.2-43.4

After a couple minutes of googling and not finding much, I finally stumbled across a post that had the word rpm-build in it... this sent me on some cursory searches with the new keyword. I eventually found enough information showing that fedora provided rpmbuild in the rpm-build package instead of the rpm package.

To finally fix the problem, I installed the rpm-build package using the following command (note: 'yum update rpm-build' failed to do anything, since rpm-build wasn't already installed):

yum install rpm-build

This fixed the missing rpmbuild problem and shows the following:

[root@localhost ~]# rpm -q --whatprovides /usr/bin/rpmbuild
rpm-build-4.4.2-15.2

So there's another quirk between redhat fedora (I believe older redhat 8/9 releases provided rpmbuild in the rpm package.. but I did not verify this) and SuSE.

While trying to come up with a reason as to why they split it out from the rpm package, I could only come up with the fact that not all machines need package rebuild capabilities and in turn, they save a few bytes of space by not installing these pieces of the rpm system.