18 Aug

Workaround for ‘/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character’

There’s a bug in rpm package: https://bugzilla.redhat.com/show_bug.cgi?id=304121

It causes the following error while building rpm packages:

/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one

As a workaround you can use this command:

rpmbuild -bb rpmbuild/SPECS/package.spec -D 'debug_package %{nil}'

It will disable building of debug package and that’s it.

07 Mar

How to install Node.js rpm package on Centos 6

The repository with spec file as well as the installation description can be found at Github.

yum install gcc-c++ openssl-devel
wget -P ~/rpmbuild/SOURCES http://nodejs.org/dist/v0.8.21/node-v0.8.21.tar.gz
wget -P ~/rpmbuild/SPECS https://raw.github.com/vibol/node-rpm-spec/master/nodejs.spec

Modify spec file to match current version.

rpmbuild -ba ~/rpmbuild/SPECS/nodejs.spec
rpm -ivh rpmbuild/RPMS/x86_64/nodejs-0.8.21-1.x86_64.rpm

init.d script can be found here. You would also need to modify it for your application.