Packaging Java JARs as RPM packages

java packaging rpm

At JUDCon 2012, I had a discussion and argument with Jaikiran Pai and Ravi Maurya on «Packaging Java JARs as RPM packages». Well it is not just RPM, it could be any package management system ( eg. dpkg, protage etc. ), doesn’t matter as long as it serves the purpose of: automatic dependency resolution installation of dependencies rollback an install step install multiple versions of a (JAR) package ensure the packages are authentic ( for security ) How is all this achieved in Java world?

Read more →

Potential bug in Ruby bindings of Apache Qpid

Ruby

I wanted to experiment with Ruby bindings of Apache Qpid. Lets install the the server and client: $ sudo yum install qpid-cpp-server ruby-qpid qpid-tools $ service qpidd start Now check which version of Ruby bindings have we installed here: $ rpm -qi ruby-qpid Name : ruby-qpid Version : 0.8 Release : 2.fc15 Architecture: x86_64 Install Date: Fri 13 Jan 2012 06:21:55 PM IST Group : Development/Ruby Size : 219877 License : ASL 2.0 Signature : RSA/SHA256, Wed 27 Jul 2011 06:41:06 PM IST, Key ID 067f00b6a82ba4b7 Source RPM : ruby-qpid-0.8-2.fc15.src.rpm Build Date : Wed 09 Feb 2011 03:48:16 PM IST Build Host : x86-11.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://qpid.apache.org/ Summary : Ruby language client for AMQP Description : The Apache Qpid project's Ruby language client for AMQP.

Read more →

Symlink loop is still an unsolved problem

Linux UNIX symlink

How do I dereference a symbolic link? $ ls -l /usr/bin/java lrwxrwxrwx. 1 root root 22 Jul 20 2010 /usr/bin/java -> /etc/alternatives/java $ ls -l /etc/alternatives/java lrwxrwxrwx. 1 root root 30 Aug 9 2010 /etc/alternatives/java -> /usr/java/jdk1.6.0_20/bin/java $ ls -l /usr/java/jdk1.6.0_20/bin/java -rwxr-xr-x. 1 root root 50810 Apr 13 2010 /usr/java/jdk1.6.0_20/bin/java Lets create a chain of symbolic links: mkdir /tmp/symlink cd /tmp/symlink echo "this is a test file" > abc.txt ln -s abc.txt link1 ln -s link1 link2 ln -s link2 link3 ln -s link3 link4 Now lets use the last link that we created: cat link4 this is a test file What if we make it a circular link?

Read more →

How to resize a VM and its partitions?

VM Linux

In this post I am going to list the steps to resize a Virtual Machine image created using virt-install There are three steps: Resize the VM image Resize the LVM volume inside the VM ( both physical volume and logical volume ) Resize the filesystem on the LVM volume First locate where the image for your VM is stored. # virsh dumpxml vm2 | xpath /domain/devices/disk/source Found 1 nodes: -- NODE -- <source file="/export/vmimgs/vm2.img" /> Mine is stored at /export/vmimgs/vm2.img It is 5GB VM which I want to resize to 10GB.

Read more →

zif critical errors

zif

Every once in a while I get these errors when installing a package using zif: Downloading [==================================================================] (59%) packages/glusterfs-server-3.2.4-2.fc16.x86_64.rpm [2.9 MB/s] om 64 to 52 on 0x1fb60b0! 5) zif-main.c:2590 (5/6) 4) zif-main.c:2401 (3/5) 3) zif-transaction.c:3989 (1/3) 2) zif-package-array.c:243 (0/1) 1) zif-package-remote.c:416 (2/3) 0) zif-store-remote.c:505 (1/2) (zif:18671): Zif-CRITICAL **: percentage should not go down from 60 to 19 on 0x78e6410! 4) zif-main.c:2590 (5/6) 3) zif-main.c:2401 (3/5) 2) zif-transaction.c:3989 (1/3) 1) zif-package-array.c:243 (0/1) 0) zif-package-remote.c:416 (2/3) (zif:18671): Zif-CRITICAL **: percentage should not go down from 64 to 27 on 0x7f5f4c0!

Read more →

zif - Package management done faster

zif Linux

On Fedora 16, I used zif. zif is an alternative to yum and its fast! How to setup zif? So easy: sudo yum install zif zif-tools All set! Search for packages using zif: sudo zif search mongodb Do a offline serach ( like cached -C in yum ): sudo zif search -o mongodb Install packages using zif: sudo zif install mongodb-server mysql-server Update all packages: sudo zif update And if you feel like canceling the operation using Ctrl+C, it happens almost instantaneously!

Read more →

How to setup multiple monitors on Xfce desktop?

Linux XFCE Desktop

How to setup multiple monitors on Xfce desktop? I just followed the instructionson Xorg RandR 1.2 wiki - http://www.thinkwiki.org/wiki/Xorg_RandR_1.2 Lets find out how many monitors we have connected? $ xrandr -q Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 60.0*+ 50.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected (normal left inverted right x axis y axis) 1680x1050 60.0 + 1280x1024 75.0 60.0 1152x864 75.0 1024x768 75.1 60.0 800x600 75.0 60.3 640x480 75.0 60.0 720x400 70.1 HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) Now ask Xrandr to configure them: $ xrandr --output LVDS1 --auto --output VGA1 --auto --right-of LVDS1 Now thats simply cool!

Read more →

Emacs key binding Ctrl+Space not working on Fedora 16 GNOME or XFCE

emacs

I installed Fedora 16 x86_64 and then installed Emacs. Then I logged in into (XFCE or GNOME) desktop and started Emacs. For text selection in Emacs I use Ctrl+Space ( which is the default in Emacs ), and is no longer working. So I cannot select text using Ctr+Space. However, if I login into virtual terminal (Ctrl+Alt+F3), then login and start Emacs, the key-binding (Ctrl+Space) for text selection works fine. Therefore there is no problem in Emacs itself.

Read more →

Autocomplete and colorize your Ruby shell ( irb ) with wirble

Lets first install wirble sudo gem install wirble Add following lines to ~/.irbrc #!/usr/bin/ruby require 'irb/completion' require 'rubygems' require 'wirble' Wirble.init Wirble.colorize Now invoke irb. $ irb >> 1.m # press TAB here to auto complete 1.method 1.methods 1.modulo >> 1.methods # press ENTER and the output will be colorized :) => ["%", "odd?", "inspect", "prec_i", "<<", "tap", "div", "&amp;", "pretty_print", "po", "clone", ">>", "public_methods", "__send__", "object_id", "instance_var iable_defined?", "equal?",

Read more →

Fast alternative to yum whatprovides

yum rpm

If yum whatprovides /path/to/file is slow for you, try a faster alternative: rpm -q --whatprovides /path/to/file For example: $ rpm -q --whatprovides /usr/bin/clibrary speech-dispatcher-0.7.1-5.fc15.x86_64 rpm is quite fast and yum is too slow. Get back to basics!

Read more →