Thursday, September 03, 2015

gpg keygen in su-ed user session

gpg keygen for the "user" in the su-ed session fails with the following error:

can't connect to `$HOME/.gnupg/S.gpg-agent': No such file or directory
gpg-agent[22760]: command get_passphrase failed: Operation cancelled
gpg: cancelled by user
gpg: Key generation canceled.

gpg keygen is having limitation to be run from the "ssh " session instead of being in su-ed ssh session.

Bugzilla link below defines the issue quite well in detail.
https://bugzilla.redhat.com/show_bug.cgi?id=659512

Solution:
To have a successful generation of the gpg keygen "user" needs to be in immediate ssh session instead of su-ed session.

cheers,
make world open.

Sunday, June 23, 2013



Maven2: Creating run time maven repository for external jar dependencies.

Recently I came across a situation where I had to consume a third party project on the nightly basis. Provisioning and deploying a maven repository management tool for just one of the jar files is not what I felt worth investing time and hardware resources.

Solution:
We asked third party vendor to keep pushing the required jar file to a stage location available to our build system. Added an extra maven module which serves the following purpose:

  • Location named lib which holds the required jar file.
  • Ant build.xml file which does “maven deploy:file” to the same location at the module level.
Module structure
stage
|-- build.xml
|-- pom.xml
 build.xml:
<exec executable="mvn">
  <arg line="-B deploy:deploy-file -Dfile=${basedir}/lib/&lt;required jar file>.jar -DgroupId=com.example.product -DartifactId=jarname  -Dversion=jarversion  -Dpackaging=jar -Durl=file://repo -DcreateChecksum=true"/>
</exec>

pom.xml:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
  <execution>
  <id>lib-repo</id>
  <phase>initialize</phase>
  <goals>
    <goal>run</goal>
  </goals>
    <configuration>
    <target>
     <ant target="default"/>
    </target>
  </configuration>
  </execution>
</executions>

  •  Above 2 steps will create in project maven repository at the module build stage.
To consume the dependencies added to the in module repository we need to modify the parent pom to add the repository at the repositories section as:
<repositories>
        <repository>
            <id>external-lib</id>
            <name>stage repo</name>
            <url>file://stage/repo</url>
        </repository>
</repositories>
and add the stage to the <modules> section in parent pom.

Further we are ready to consume the dependency “com.example.product:jarname” to any maven module after the stage module. 

Footnote: the above magic fails to work in Maven3. I think Maven3 tries to gather and resolve all the project modules dependency at the start of the maven reactor. In the case above repository is created at build time during the call of the stage module.

cheers, make world open.


Wednesday, September 07, 2011

Debian 6 on VMware Workstation.

Debian 6 (squeeze) doesn't seems to work on vmware workstation 5.5.9. Debian6 installation fails to identify the hard disk and fails at disk partitioning with a fallback of drivers options for disk. I have tried some SCSI drivers listed there but still if fails to identify the disk. While creating virtual machine virtual disk type selected was other Linux, Linux with 2.6.x kernel, ubuntu 32 bit. It seems debian 6 might not work with 5.x.x version of vmware workstation. Any pointers if debian6 installation worked for anyone? I am trying with debian-6.0.2.1-i386-netinst.iso.

Upgraded VMware workstation to 7.1.4 and debian6 installation went ahead smoothly on virtual disk type Debian 5. Installation identified all the drivers including sound and usb, it was smooth without any tweaking.

Looking forward for an exciting experience with "squeeze".

cheers, make world open.

Wednesday, July 07, 2010

PyCon India 2010

Indian Python developers community is organizing the PyCon India 2010, a large Python developers meet-up exclusively about Python language by Python developers on Sept 25, Sept 26 (Saturday & Sunday) in Bangalore at MS Ramaiah Institute of Technology, Bangalore. For details visit http://in.pycon.org/2010/. There would be various topics presented to audiences who are from Python beginners to expert developers. The hall would be full of geeks and nerds talking Python. You can get opportunity to meet people with different application domains.

If you have experience in Python and interested in presenting paper, One can submit their proposal here http://in.pycon.org/2010/cfp. Call for proposal is open till July 31. You can find talks here.
http://in.pycon.org/2010/talks.

Python has been used with almost all the operating systems, Java environment, .NET, Embedded and Mobile devices. Whatever technology you are using or mastered, you should know at least one nice scripting language like Python or Ruby to solve your own problems. You can write 10 or 20 lines of code in 5 minutes and it can save you a day or week (that depends on your manual work complexity). Python would be useful for writing small throw away scripts to large enterprise applications.

Copy from BangPypers Mail Archive:
http://mail.python.org/pipermail/bangpypers/2010-July/004702.html

Tuesday, June 01, 2010

rBuilder 4.1.2 on Dell R710- fails to Boot with Kernel Panic

rBuilder 4.1.2 on dell R710 with 24 GB memory fails to boot with kernel Panic after installation.

Error seems to be because of swiotlb initialization failure.

http://lists.xensource.com/archives/html/xen-devel/2007-11/msg00887.html

From above mail archive.
< mail archive >
Have you assigned any physical devices to this domU? If not then it is not allowed to request contiguous multi-page allocations, and this will cause swiotlb initialization to fail (and hence panic the kernel). If you do not assign any physical devices to the domU then there is no point in it having a swiotlb anyway
< mail archive >

Extract from the console log
< error >
.................
......................
...........................
Kernel panic - not syncing: No suitable physical memory available for SWIOTLB buffer!
Use dom0_mem Xen boot parameter to reserve
some DMA memory (e.g., dom0_mem=-128M).
...
.....
< /error >

Solution which worked for me.

Default installation of rbuilder4.1.2 on dell R710 have a kernel parameter "dom0_mem=2048MB" which when changed to dom0_mem=512MB made xen kernel to boot properly.

One needs to enter into edit mode at grub itself otherwise system will keep booting and rebooting in cycles.

After first boot edit /etc/grub.conf file with the kernel parameter as dom0_mem=512MB.

cheers,
make world open.

Monday, February 22, 2010

Scons: TypeError: coercing to Unicode: need string or buffer, NoneType found

Scons on cygwin 1.7.1 when invoked remotely through ssh throws an error as:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Error above is a common python error which occurs when one create a dictionary object(key,value) list with one or more keys with value as "None". We have to ensure that all the keys are having value to fix the above error.

Scons run without any failure when invoked being on cygwin 1.7.1 shell environment but fails with the TypeError as above in our case when invoked remotely through ssh.

Scons TypeError is as a result of USERPROFILE variable not getting set. Once USERPROFILE is set explicitly from .bashrc, scons run successfully.
As evident from the python error USERPROFILE was having value as "None", by setting appropriate value will resolve the issue.

USERPROFILE default value on WINNT is C:\Document And Settings\, it is always better to set value as default in .bashrc with an entry as
export USERPROFILE="C:\Documents and Settings\build"
build is the user logged in in our case.

We had issues with other application run on cygwin bash shell when we had some junk/non-default value set to USERPROFILE. We had issues running BullsEye code coverage tool with non-default value.
BullsEye failed with an error as "Exception: SHGetFolderPath failure". Default USERPROFILE value in .bashrc fixed the BullsEye failure.

cheers,
make world open.

Wednesday, January 20, 2010

fatal error C1902: Program database manager mismatch; please check your installation

fatal error C1902: Program database manager mismatch; please check your installation

Build/Test automation of VC2005 project fails with the above error message in case automation scripts is having logic of *nix-win communication over ssh.

Scenario:
*nix ssh client connects to cygwin ssh server and executes make which uses CL(VC2005 compiler). Run fails with the error message in the subject line.
As evident from the link below.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=123792

Workaround at the link above made our day and solved the issue.
Workaround: Run cygwin ssh server with the same user as that of *nix user through which one is connecting over ssh.

In our case user in question was "build". So we ran cygwin ssh server with "build" user and had *nix user as "build" to connect over ssh for script run.

By default cygwin ssh server run with user as LocalSystem Account. To make it run with "build" user we followed the steps below.

Create a user "build" with Administrative privilege on cygwin box.

Steps to run cygwin ssh server with "build" user.

1. Change the login ID of the Cygwin sshd service.


- From the Windows Start menu, click Settings > Control Panel > Administrative Tools > Services.

- From the Services window, right-click CYGWIN sshd, and select Properties.

- From the Properties window, select the General tab, and click Stop to stop the sshd service.


Next, select the Log on tab, Under the Log on as section or prompt, clear the Local System account radio button, and select This account. Type .\build as the ID and type the password for the account. Click Apply.

2. Grant additional rights to the build account so that "build" user has required privileges in addition to membership to the Administrators group.


- From the Windows Start menu, click Settings > Control Panel > Administrative Tools > Local Security Policy.

- From the Local Security Settings window, expand Local Policies, and select User Rights Assignment.

- From the resulting page that appears on the right, verify that the root account has the following four rights:
* Adjust memory quotas for a process
* Create a token object
* Log on as a service
* Replace a process level token
If not, add "build" as a user with the four rights.

For Win2000, the first item in the list above is displayed as Increase quotas instead of Adjust memory quotas for a process.
* Close Local Security Settings window.


3. From a Cygwin console panel, change ownership of the following directories and files to build:


* $ chown build /var/log/sshd.log
* $ chown -R build /var/empty
* $ chown build /etc/ssh*


4. Restart the Cygwin sshd server.


- From the Properties page of the Cygwin sshd server, select the General tab, and click Start. Verify that Cygwin is now running under the build user account.

- OR From cygwin prompt say $net start sshd.


Thanks to the IBM Knowledge Base for the above solution.

Sunday, November 15, 2009

Maven2: [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

Maven2 warning as above is because of the fact that maven2 plugins uses platform default encoding if no explicit file encoding has been provided in the plugin configuration. The usages of the platform encoding makes the build platform dependent hence the maven2 is bound to raise an alarm as build artifact/resources become irreproducible.

To suppress the Warning in maven2 environment we have to use the properties as below
<project>
...
<properties>
<project.build.sourceEncoding>${default.encoding}</project.build.sourceEncoding>
...
</properties>
...
</project>

cheers,
make world open.

Thursday, July 23, 2009

Removing singleline and multiline comments from XML files.

Thou most of the XML parsers are capable of ignoring XML comments(<!-- -->) but while XML file processing through bash shell scripts makes life tough.

Came across such scenario recently where had to remove all the comments from XML file before processing it through grep, sed, awk and other bash shell utilities.

Sed proved to be a handy tool to remove all the single and multiline comments from the XML files.

Sample XML file. [Assuming filename as sample.xml]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
If the message tag does not contain a definition of a property,
the default value will be used.
-->
<message>
<value>reference</value>
</message>

<!-- some comment --
>
<!-- another comment -->

<!--
This is another multiline comment.
line
-->
Command below would be able to remove all the comments in the sample.xml file

$ cat sample| sed '/<!--.*-->/d'| sed '/<!--/,/-->/d'

Result:
<?xml version="1.0" encoding="ISO-8859-1"?>
<message>
<value>reference</value>
</message>
Cheers,
make world open.

Wednesday, June 24, 2009

sMashup

It's sMashup time at RSA.

Keep busy.

cheers, make world open.

Friday, May 08, 2009

RSA Unconference

At RSA Unconference got to know "OS is dead!!!."

cheers,
make world open.

Saturday, March 07, 2009

Barcamp Bangalore - BCB8 @ Yahoo !!!

Live up the spirit of barcamp 8, get yourself involved.
Sessions are lined up with 5 tracks in place , we had an introduction session just concluded.
As usual one can see lots of people at session put area and we are all set for first session Brand You 2.0 by Altius consulting .

Day1:
Session about Software Testing was electrifying. Thanks to Pradeep Soundararajan


Some of his thoughts.
- Software testing is a mental martial art.
- Difference between Monkey testing(without test case) and Guriella testing (more agressive).
- Motivate people for software testing.
- Fail in java/c++ . You land yourself in software testing as if you have been jailed.
- Most fakers in software testing.
- Learning testing through slides is not possible, one need to practice software testing.
His concern, can one learn driving a car by just mugging up 3000 slides but one can test software by seeing 3000 slides.
- Software testing is about improving quality is a myth. Software testing cannot improve quality. it is just identifying the problem and sometime solution.
- Most part of the software is invisible to software tester.
- Automation is testing one buggy software with another buggy software (Automation Tool)
- Test automation is faster is a myth. It is like comparing machine with a tester.
- Testing is boring..
- Not finding a bug is also a testing and test cases are valid.
- More you are trying to measure, more you are disturbing a system.
- Suggestion for freshers. Don't believe anyone. Always be skeptical, be Sherlock Homes and question every small change/things. Career decision has to be taken by you only not anyone.
Saifi Khan from Twincling advocated the open source development model and came up with numerous examples of open source projects. He talked about why/how projects get forked and ways by which one can save open source projects getting forked.


Cheers,
make world open

Monday, January 19, 2009

Fedora core 10 on VMware ESX server 3.5.0 network interface eth0 issue.

Network interface eth0 was not coming up at boot time irrespective of being configured properly. Chkconfig was also properly configured for network services for run levels 2 3 4 5.

Issue is that... By default i could see ONBOOT flag set to no "ONBOOT=no" in the configuration script /etc/sysconfig/network-scripts/ifcfg-eth0

Modifying it to ONBOOT=yes did the trick.

etho network interface came up properly in next boot cycle.

Cheers...

Tuesday, September 23, 2008

Cifs "mount error 13 = Permission denied"

$mount -t cifs //win-share-hostname/share /mnt/win -o username=user,password=passwd

Command above is used to mount windows network share on linux box but it is throwing an error mentioned below when trying to mount a win xp network share from a fedora core 6 box.
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
The error above is because of a bug in kernel which got in to the kernel version 2.6.18 and above. The same mount command works great for the kernel version 2.6.17 and below.
Bugzilla link to the bug: http://bugzilla.kernel.org/show_bug.cgi?id=7209

To avoid this error even in kernel version 2.6.18 and above. We need to use the network domain name with the mount command.

Working mount command irrespective of the bug is as below.

$
mount -t cifs //win-share-hostname/share /mnt/win -o username=user,password=passwd,domain=xxx

cheers,
make world open.

Wednesday, June 25, 2008

List all the installed perl modules

We often need to know all the perl modules installed on a box. One below is the solution

perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print
canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'

cheers, make world open

Wednesday, February 13, 2008

missed an emotion or two...

It really pumps some extra life when someone from your loved one's cirlce remembers you with delicate emotions. When you go through this emotional burst, all your time which you spent together reels in front of you like a movie. Memory recalls all those moments which is somewhere deep into the hearts.
Thanks a lot to Subhash Chandran for this wonderful words.

Friday, November 02, 2007

Partition already existing single drive in Windows XP

Most of the vendor shipped desktop/Laptops comes with a single partition drive named C, which is a great bottleneck to have dual boot.

Partitioning an existing drive can be possible through different commercially available Partition Magic software but for that one needs to shell out some bucks.

We can achieve this sort of partition using some reliable and easily available open source tools.

Knoppix which is a bootable Linux Live CD which contains most of the GNU/Linux tools can provide a handy approach to achieve the partition.

* Get Knoppix iso and burn it to a CD.

* Boot from Knoppix on the machine which needs partition.

* Run QTParted, that will open a window showing the existing partition.

* Right click on the windows partition, choose RESIZE

* In the text box labeled FREE SIZE AFTER, specify the size of which one want the new partition. This will create free space of specified size.

* Right click on the free space created, click create.

* Select partition type, click OK.

* From file menu, select commit. This will make the partition change persistent.

* Restart the computer.

* Boot into the existing windows.

The above steps will eventually make another partition of specified size.

cheers...
make world open.




Thursday, October 11, 2007

Apache CGI Scripts on windows.

CGI scripts on apache installed on windows didn't work. It is because of the first line of the .cgi files.

Normally first line of .cgi file reads as #!/usr/bin/perl and on windows apache uses this first line to find the appropriate perl exe to run the script. This default behavior can be overridden by using ScriptInterpreterSource directive of apache.
Adding "ScriptInterpreterSource Registry-String" directive to apache httpd.conf file, we are telling apache to ignore the first line #!..... and instead look in to the registry for the perl exe to run the script.

If moving #!/usr/bin/perl to C:\Perl\bin\perl.exe [Correct perl.exe installation path.] works fine which conclude that ScriptInterpreterSource directive is not working properly.

Solution to the failure of apache .cgi scripts on windows is:

Edit httpd.conf file and add the line:
ScriptInterpreterSource Registry-String

Add the following key in the
registry.

\HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command.

Default value should be the location of your Perl executable.
[ex. C:\Perl\bin\perl.exe -T].




cheers, make world open...

Thursday, August 30, 2007

Unhappy lots...

By the law of average and human nature, every organization has at least 10% people who are unhappy.
I believe you don't want to end up being a part of that 10%.

One has to remember one can't have it all at the same time. Decide your priorities and just concentrate on the way you want to shape your career.

Different people have different priorities. For some its rank, for some its recruitment, for some its location and for some its fun. These personal priorities are what make some people leave great organizations, reject Microsoft, or choose rank 15 over 5. You do not have to justify your priorities to anyone, but make sure that YOU are sure. Concentrate a little on what is going to make you truly happy.

Just remember that you can't have it all. Decide your priorities and work on your list of workplaces up to the point where you are not second guessing yourself. If living at some particular place had been a life long dream, go ahead! If Silicon Valley is the thing for you, apply for the same there.

I believe it is really tough to say goodbye to your workplace where you had spent most of your time during the stay there.
With my going away being certain, and last day at work looming in front of me, its become extremely difficult to act like I care and want to perform. I was just going through the motions, but I was not sure how long...

Well that kept me tied to some of the basic and fundamental apprehensions which i was about to leave/carry on my shoulder. There was more lot of the element of confusion rather than sanity of the decision. I was really scared to answer some of the straight forward queries and eventually avoided most of them. Most of my WHY's were un-answered and it is still open...

Courtesy being $udha for inputs..

Google packs StarOffice

Google packs StarOffice to google pack.
Some more info here...

Getting more wide user base for office suite and eventually promoting OpenOffice.org.