Siddesh BG's Build Release Config mgmt Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 4 November 2009

AIX: make: 1254-055 Dependency line needs colon or double

Posted on 02:04 by Unknown
We get this compilation issue "make: 1254-055 Dependency line needs colon or double" while compiling C/C++ code in AIX machines.

It occurs if Makefile written in gmake format and then using native AIX make to compile it.

It can be resolved by installing gmake on AIX machine and then using it to compile.

We can verify whether the installed make is gmake or not by running 'make -v' to find out. If it's GNU, you'll know based on the output. If it gives you an error, then it's not GNU make.

-bash-3.00$ /usr/local/bin/make -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This is GNU Make



-bash-3.00$ make -v
make: Not a recognized flag: v
usage: make [-eiknqrst] [-k|-S] [-d[A|adg[1|2]msv]] [-D variable] [-f makefile ] [-j [jobs]] [variable=value ...] [target ...]

This is not GNU make.
Read More
Posted in AIX | No comments

Monday, 2 November 2009

Posting a JIRA bug using Perl Mechanize

Posted on 23:42 by Unknown
Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are important ones. Mechanize is latest module with more features compared to LWP.
Recently I wrote a perl script to integrate a perl tool with JIRA bug tracking tool using mechanize, I just want to document here about mechanize usage with JIRA.
Basically this perl script post a bug in Jira after authentication

#!/usr/bin/perl -w
use WWW::Mechanize;
use HTTP::Cookies;
$mech = WWW::Mechanize->new();

# Authenticate to Jira and get a cookie back for the subsequent post.
$root_uri = "http://your-jira-site.com";

$mech->cookie_jar(HTTP::Cookies->new()); # Don't write cookies to file!
$mech->get($root_uri);
#login to Jira
$mech->form_name('loginform');
$mech->field(os_username => $jira_id);
$mech->field(os_password => $jira_pass);
$mech->click();
my $response = $mech->content();
if ($response !~ m/Dashboard for (\w+) (\w+)/) {
print_error("Failed to add new bug: authentication failed. Below you might find a clue as to what happened.");
print_error("
");
print_error($response);
return;
} else {
$username="$1 $2";
}



print "

creating new Jira bug ...

\n";
my $show_uri = "$root_uri/browse";
# Go to Product page in Jira
$mech->follow_link(text => "$product", n => 1);
#Browse to create new issue form
$mech->follow_link(text => "Create a new issue in project $product", n => 1);
$mech->form_name('jiraform');
$mech->click();

#Create a new bug
$mech->form_name('jiraform');
$mech->field(summary => "$formdata{hotfix}: $formdata{bugtitle}");
$mech->field(components => "$components_map{\"$formdata{component}\"}");
$mech->field(customfield_10044 => "$formdata{platform}"); #OS/Platform
$mech->field(customfield_10054 => "moderate"); #Bug severity
$mech->field(assignee => "$jira_id");
$mech->field(description => "$comment");
$mech->field(customfield_10067 => "$_[0]"); #Found in Version
$mech->field(customfield_10007 => "All"); #Appserver
$mech->field(customfield_10060 => "Support request (CE_Assistance)"); #Type of defect
$mech->field(customfield_10020 => "CS - other"); #Discovered by function
$mech->field(customfield_10019 => "Use in production "); #Discovered by activity
$mech->click();
print "

  posting bug ...\n";
$response = $mech->content();
my $bz_msg;
my $bug_number;
if ($response =~ m/Key:.*?browse\/(\w+)-(\w+)/s) {
$bug_number = "$1-$2";
print "done

\n";
$bz_msg = "

Bug #$bug_number for version $_[0] has been posted to " . "Jira.

\n";
print "$bz_msg";
$bz_donemsg .= $bz_msg;
} else {
$bz_donemsg .= "

No Jira bug was filed for version $_[0]. This will need to be done manually.

\n";
print_error("Failed to add new bug (Jira output follows):\n$response");
}



Reference: http://www.ibm.com/developerworks/linux/library/wa-perlsecure.html
Read More
Posted in Jira, Perl | No comments

Friday, 30 October 2009

AIX install/unintall software - ssh

Posted on 01:17 by Unknown
In AIX, we can use smitty to install software.
To uninstall, we can use "smit remove"

I wanted to install ssh on a AIX machine. But some how smit failed, so I tried compiling openssh from source.
We can download the openssh source code and compile it on our AIX box. Openssh needs zlib and openssl needs to be installed prior to it (I compiled both of these).
It looks for zlib.h zconf.h file /usr/inlcude directory and zlib.a file in /usr/lib directory.

After that we need to add new service on the system. Refer http://blog.thilelli.net/post/2005/06/14/How-to-Add-a-New-sshd_adm-Service-on-AIX-5X for this.

How to start sshd?
"startsrc -s sshd" will start the daemon.
Use "lssrc -s sshd" to see if it's already running.

Another way to start is "/usr/sbin/sshd -de"

lslpp --> The lslpp command displays information about installed filesets or fileset updates.
Example
[root@re-aix02:/usr/local/etc] lslpp -l bos.rte.libc openssh.base.server
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.libc 5.1.0.69 COMMITTED libc Library
openssh.base.server 4.1.0.1 COMMITTED Open Secure Shell Server


oslevel -> Reports the latest installed maintenance level of the system


Here is some more info about installing ssh using smit

Installing openSSH on 5.1, 5.2, and 5.3
At 5.1, 5.2, and 5.3, the installation of openssh itself is in installp format, but all the prerequisites (including openssl) can be installed using the same rpm -i commands (using the same 4.3.3. rpm packages). The installp format package can be downloaded from the following site:http://sourceforge.net/projects/openssh-aix After installing the prerequisites using the following commands,
1. rpm -i zlib-1.1.4-3.aix4.3.ppc.rpm
2. rpm -i prngd-0.9.23-3.aix4.3.ppc.rpm AIX 5.2 uses /dev/urandom
3. rpm -i openssl-0.9.7d-1.aix5.1.ppc.rpm
4. rpm -i openssl-devel-0.9.7d-1.aix5.1.ppc.rpm

use smitty installp to install the openssh filesets extracted from the tar file openssh-3.8.1p1_51.tar (for 5.1), openssh-3.8.1p1_52.tar (for 5.2), and openssh-3.8.1p1_53.tar (for 5.3). The following steps need to be followed to install openssh.


1. In the directory where the images are, run the command inutoc.
2. Run smitty install.
3. Select "Install and Update Software".
4. While in smitty do the following:
4.1 Select "Install Software".
4.2 Enter a dot (".") in the field for "INPUT device / directory for software" and press ENTER.
4.3 Enter openssh in the "SOFTWARE to install" field.
4.4 Scroll down to "Preview new LICENSE agreements?" and press tab key to change the field to yes. Read the license agreement.
4.5 Scroll down to "ACCEPT new license agreements?" and press tab to change the field to yes. Press ENTER to begin the software installation.

Where to get openssl?
The OpenSSH software is shipped on the AIX 5.3 Expansion Pack. This version of OpenSSH is compiled and packaged as installp packages using the openssh-3.8.p1 level of source code. The installp packages include the man pages and the translated message filesets. The OpenSSH program contained in the Expansion Pack CD-ROM media is licensed under the terms and conditions of the IBM® International Program License Agreement (IPLA) for Non-Warranted Programs.

Before installing the OpenSSH installp format packages, you must install the Open Secure Sockets Layer (OpenSSL) software that contains the encrypted library. OpenSSL is available in RPM packages on the AIX Toolbox for Linux® Applications CD, or you can also download the packages from the following AIX Toolbox for Linux Applications Web site:

http://www-1.ibm.com/servers/aix/products/aixos/linux/download.html

Because the OpenSSL package contains cryptographic content, you must register on the Web site to download the packages. You can download the packages by completing the following steps:

1. Click the AIX Toolbox Cryptographic Content link on the right side of the AIX Toolbox for Linux Applications Web site.
2. Click I have not registered before.
3. Fill in the required fields in the form.
4. Read the license and then click Accept License. The browser automatically redirects to the download page.
5. Scroll down the list of cryptographic content packages until you see openssl-0.9.6m-1.aix4.3.ppc.rpm under OpenSSL — SSL Cryptographic Libraries.
6. Click the Download Now! button for the openssl-0.9.6m-1.aix4.3.ppc.rpm.

After you download the OpenSSL package, you can install OpenSSL and OpenSSH.
Read More
Posted in AIX | No comments

Thursday, 15 October 2009

mount: server:path failed, reason given by server: Permission denied

Posted on 22:46 by Unknown
We get this peculiar NFS moount problem for quite a few reasons. But recently we encountered this problem and scratched our head debugging it. We tried restarting nfs server (service nfs restart), exportfs, validating /etc/export of server. Nothing solved the issue

engweb:/mnt/kits# mount -a
mount: library-hq:/export/kits/ failed, reason given by server: Permission denied
mount: library-hq:/export2/kits/ failed, reason given by server: Permission denied


But the actual issue is root partition (/) was full in the machine which hosted nfs server. After clearing the disk space everything got resolved.
Read More
Posted in NFS | No comments

Wednesday, 14 October 2009

How to access CD from LINUX installed in VMWare Virtual machine?

Posted on 07:26 by Unknown
In VMware workstation click on VM -> Settings -> CD-ROM.
Make sure check boxes "Connected" and "Connect at power on" are ticked.
Then restart the Linux machine availble in VM.

After this you need to mount CDROM to one of your local location.
Find out in your machine where CDROM device is available.
>>> dmesg|grep -i cdrom
hdc: Vmware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM drive

From above output, in my machine it is available in /dev/hdc.

Now mount it to a local location "/mnt/cdrom". Make sure this directory is already created.

>>> mount /dev/hdc /mnt/cdrom
mount: block device /dev/hdc is write-protected, mounting read-only

Thats it. Now you can access the CD contents from /mnt/cdrom.
Read More
Posted in linux | No comments

Saturday, 26 September 2009

List of useful mysql commands

Posted on 05:19 by Unknown
Lets start with mysql database administration commands.
1) /bin/mysql -h hostname -u root -p #To login
2) SHOW DATABASES; # List all databases
3) DROP TABLE [table name]; #To delete a table
4) To create a new user - Login as root, switch to mysql db, make the user, update privileges
mysql) USE mysql;
mysql) INSERT INTO USER (Host, User, Password) VALUES ('%', 'username', PASSWORD('Password'));
mysql) flush privileges;
5)To change a password
/bin/mysqladmin -u username -h hostname -p password 'new-password'
or
mysql> SET PASSWORD FOR 'User'@'hostname'=PASSWORD('Passwd');
mysql> flush privileges;
6) To list available users - Login as root;
Use mysql;
SELECT USER FROM user;
SELECT USER,PASSWORD FROM user; #To know whether password is set fot users

Here are some more use full commands

1) CREATE DATABASE 134a;
2) DROP DATABASE 134a;
3) USE 134a;
4) CREATE TABLE president (
last_name VARCHAR(15) NOT NULL,
first_name VARCHAR(15) NOT NULL,
state VARCHAR(2) NOT NULL,
city VARCHAR(20) NOT NULL,
birth DATE NOT NULL DEFAULT '0000-00-00',
death DATE NULL
);
5) SHOW TABLES; #list tables
6) DESCRIBE president; #to view structure of table
7) INSERT INTO president VALUES ('Washington','Bush','George', 'VA', 'New York', '19320212', '19991214');
8) SELECT * FROM president;
9) SELECT * FROM president WHERE state="VA"; #selecting rows by using WHERE clause
10) SELECT state,first_name,last_name FROM president; #selecting specific columns
11) DELETE FROM president WHERE first_name="George"; # Deleting selected row
12) UPDATE president SET state="CA" WHERE first_name="George"; #Modify entries
13) LOAD DATA LOCAL INFILE 'president_db' INTO TABLE president; #Loading your data from a file into a table. Also try "mysql -u USERNAME -p < my_mysql_file
14) SELECT * FROM president WHERE death=NULL; # or WHERE death IS NULL #list president who are alive
15) SELECT last_name, birth FROM president WHERE birth < '1800-09-01';
16) SELECT last_name, birth FROM president ORDER BY birth ASC LIMIT 1; #select president who was born first
17) SELECT state, count(*) AS times FROM president GROUP BY state ORDER BY times DESC LIMIT 5; # Names of first 5 states in which the greatest number of presidents have been born
18) SELECT * FROM president WHERE (YEAR (now())-YEAR(birth)) < 60; #President who have been born in last 60 years
19) SELECT last_name, birth, death, FLOOR ((TO_DAYS(death)-TO_DAYS(birth))/365) AS age FROM president WHERE death IS NOT NULL ORDER BY age DESC LIMIT 10; #President who have died by their age in descending order
20) SELECT last_name, address, test_date, score FROM test, student WHERE test.ssn = student.ssn;

You can refer mysql.com/documentation/index.html and
mysql.com/documentation/bychapter/manual_Introduction.html for more details
Read More
Posted in mysql | No comments

Wednesday, 16 September 2009

How to redirect stdout & stderr to a file using tee?

Posted on 03:44 by Unknown
ant -f build-release.xml dist 2>&1 |tee /tmp/tt
Read More
Posted in commands | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Installing and configuring Fortify on Linux and Windows machines
    Installing Fortify on Linux (RHEL 5 32 bit) Download Fortify archive Fortify-360-2.6.5-Analyzers_and_Apps-Linux-x86.tar.gz and extract it to...
  • AIX: make: 1254-055 Dependency line needs colon or double
    We get this compilation issue "make: 1254-055 Dependency line needs colon or double" while compiling C/C++ code in AIX machines. I...
  • fortifyclient uploadFPR An internal error has occurred
    When you try to upload a .fpr file to Fortify 360 server and you get the below mentioned error. Then, this blog provides one of the route ca...
  • Posting a JIRA bug using Perl Mechanize
    Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are i...
  • Solution to Project Euler Problem 10 - Find the sum of all the primes below two million
    http://projecteuler.net/problem=10 Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two mi...
  • Perforce - can't edit exclusive file already opened
    In perforce, whenever a binary file like doc, xls or ppt files are checked out, it is opened in exclusive lock mode. So no other person can ...
  • What is Apache Hadoop?
    Newbies can get a clean and simple introduction to Hadoop from the following Pivotal blog posts 1)  Demystifying Apache Hadoop in 5 Pictures...
  • Tweak single instance of tinderbox to work on two different perforce servers
    Tinderbox is a tool developed by Mozilla, which collects build logs and presents the logs and the result it in a nice, clear and concise way...
  • How to know architecture of a AIX machine?
    We can easily know the architecture type in Linux or Solaris systems with the help of "uname" command. But uname command in AIX do...
  • Few words about windows service
    What is windows service? it's a program that runs invisibly in the background. But can't the same thing be said for a number of prog...

Categories

  • AIX
  • AIX ssh
  • ANT
  • apache
  • appliance
  • awk
  • branching
  • build-failures
  • cgi-perl
  • code-signing
  • commands
  • continuous Integration
  • cvs
  • cygwin
  • DNS
  • Drupal
  • EPM
  • euler
  • Fortify
  • hadoop
  • hpux
  • html
  • InstallShield
  • iptables
  • iso
  • jenkins-hudson
  • Jira
  • kiwi
  • linux
  • Makefile
  • maven
  • Miscellaneous
  • mysql
  • nexus
  • NFS
  • package
  • Perforce
  • Perl
  • php
  • rbuilder
  • rpath
  • rpm
  • rsync
  • Solaris
  • ssh
  • SuseStudio
  • tinderbox
  • unix
  • Visual studio 2008
  • vmware
  • war
  • webserver
  • wget
  • windows
  • xterm

Blog Archive

  • ▼  2013 (12)
    • ▼  December (1)
      • How to restart windows from command line ?
    • ►  July (2)
    • ►  April (2)
    • ►  March (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (1)
    • ►  October (4)
    • ►  September (7)
    • ►  August (5)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (3)
    • ►  February (1)
    • ►  January (7)
  • ►  2011 (23)
    • ►  December (4)
    • ►  November (9)
    • ►  October (4)
    • ►  September (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2010 (15)
    • ►  December (2)
    • ►  November (1)
    • ►  September (3)
    • ►  April (1)
    • ►  February (6)
    • ►  January (2)
  • ►  2009 (28)
    • ►  November (5)
    • ►  October (3)
    • ►  September (2)
    • ►  August (1)
    • ►  July (1)
    • ►  June (5)
    • ►  May (3)
    • ►  April (1)
    • ►  February (2)
    • ►  January (5)
  • ►  2008 (20)
    • ►  December (6)
    • ►  November (3)
    • ►  October (1)
    • ►  September (1)
    • ►  July (8)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile