Siddesh BG's Build Release Config mgmt Blog

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

Monday, 30 January 2012

A build engineer's use-case of java decompiler

Posted on 21:58 by Unknown
This is one scenario, which demonstrate the usage of java decompiler to a build engineer.

One morning, a developer walked to my cube and complained
    Developer: My changes are not picked in latest build
As a build engineer, it's a familiar complaint which I usually receive.
    Me: Cool !! provide me your change location in Perforce SCM tool and some time to debug.
That's the end of my short conversation. Now I started a massive search operation to find out, why the pretty girls changes are not picked :)

It's a Java based build system using Maven 2 and Jenkins.

Step 1: I made sure the code changes are picked up in last build by verifying the Change-list number available in perforce and the one Jenkins has picked during the build. Even I verified in the build machine, by checking the files it has synced. Everything is perfect, then I started wondering what's going wrong.

Step 2:  Since it is a maven build, I thought to check the content of jar package, our build has uploaded to nexus repository. I downloaded and extracted it and the got the mystery .class file. Now how can I prove that her changes are picked by the build using this .class file?

Step 3: I felt the need of a java decompiler. I downloaded "cavaj" java decompiler (it's free) and installed it. Opened the mystery .class file with java decompiler and I'm glad to find her changes.

Java decompiler is used to convert Java class files into Java source code. In fact, there is an arms race brewing between decompilers and so-called obfuscators, which profess to provide Java code some measure of protection from decompilers. In essence, obfuscators remove all non-essential symbolic information from your class files and, optionally, replace it with fake symbolic information designed to confuse the decompiler


Step 4: Now for curiosity I extended further to find out why the developer complaining it is not picked. The root cause of the issue is that,  developer was validating a jar file, which consumes her changes from another jar file. It's a maven dependency issue. Some how, the final jar file was not picking the right version of the dependent jar file, which is fixed later.
Read More
Posted in | No comments

Wednesday, 25 January 2012

Jira Administration quick reference

Posted on 00:15 by Unknown
1) Configuring the Layout and Design
Customising the Look and Feel
    Administration -> Global Settings -> Look and Feel -> To edit the logo, colours or time format, click the 'Edit Configuration' link at the bottom of the page
Changing the default language
  Administration -> General Configuration -> Edit Configuration > select the appropriate language in the drop-down box next to 'Default language'.
Configuring default issue navigator
  The Issue Navigator is used within JIRA to find and filter issues, and to display the search results in various formats ('views'). It is possible to
select which issue fields will be displayed as columns in the Issue Navigator.
   Administration -> Issue Fields -> Navigator Columns -> Add new column
Configuring the Default Dashboard
  Administration -> Global Settings -> System Dashboard -> Add Gadget
Configuring an Announcement Banner
  Administration -> Options & Settings -> Announcement Banner
Enabling Logout Confirmation
  Global Settings -> General Configuration -> Edit Configuration -> Logout confirmation



2) User and Group Management
Enabling Public Signup and CAPTCHA
  Administration -> Global settings -> General Configuration -> Edit Configuration -> In the 'Mode' drop-down, select 'Public'.
  To enable captcha Administration -> Global Settings -> General Configuration -> Edit Configuration -> Locate 'CAPTCHA on signup' and select 'On'.
Adding a User
  Administration -> User Browser -> Enter the Username (note that a user's Username cannot be changed once the user is created), Password, Full Name and Email Address.Optionally, tick the Send Password Email box to send the user an email containing a link via which to set their password
Assigning a User to a Group
 Administration -> User Browser -> Filter the user -> click the Groups link in the Operations column
Project role: I'm user 'xxx' and make me admin for project 'ppp'
   Administration -> User Browser -> Filter the user-ID and click on it -> Project Roles ( under Operations) -> Edit -> Tick the project
Changing a User's Name or Email Address
  Administration -> User Browser -> Filter the user-ID -> click their Edit link in the Operations column
Changing a User's Password
  Administration -> User Browser -> Filter the user-ID -> click their Username -> Click the Set Password link -> Enter and confirm the new password
Adding a Property to a User
  A 'Property' is an extra piece of information that you can store regarding a user. A Property consists of a Key of your choice (eg. 'Phonenumber', 'Location') plus a corresponding Value (eg. '987 654 3210', 'Level Three').
  Administration -> User Browser -> Filter the user-ID -> click their Username -> Edit Properties -> Enter the new Key and its Value, then click the Add button
Deactivating a User
  Before you deactivate a user, you should
     Reassign any open issues assigned to that user.(Open the issue -> Assign)
     Make sure the user is not the 'Default Assignee' for any project (Administration -> Projects -> Select project -> Edit project
  To deactivate a user account:
     Remove the user from all groups (User Browser -> Filter the user -> click the Groups link in the Operations column)
     Remove the user from all project roles (User Browser -> Filter the user-ID and click on it -> Project Roles)
  Deactivating the user account will result in the following
    the user will not count towards your license limit.
    work log entries associated with the user will remain
    filter subscriptions will continue to be sent to the user
Deleting a User
   Before you delete a user, you should bulk-edit the issues involved and change the reporter to someone else.
   Administration -> User Browser -> Filter the user-ID -> Delete -> The confirmation screen that follows will summarize any involvement of that user in the system by showing current issues assigned to and reported by that user, etc. These connections between the user and other parts of the system may prevent the deletion of that user.-> If there are no issues assigned to, or reported by the user, the confirmation screen will display a Delete button

JIRA's default groups
  jira-administrators:
  jira-developers: has the 'Browse Users', 'Create Shared Filter' and 'Manage Group Filter Subscriptions' global permissions.
  jira-users: typically contains every JIRA user in your system. It has the 'JIRA Users' and 'Bulk Change' global permissions.
Viewing/adding/deleting/editing groups
  Viewing: Administration -> Users, Groups & Roles -> Group Browser
   Adding: To create a group, enter the new group 'Name' in the 'Add Group' form
   Deleting: click the 'Delete' link for that group in the 'Group Browser'
   Editing: click the 'Edit Members' link in the row for that group in the 'Group Browser'
Automatic group membership
   To automatically add newly-created users to a particular group, grant the group the 'JIRA Users' global permission
   Administration -> Global Settings -> Global Permissions -> Add the 'JIRA Users' permission to the relevant group
Managing Project Roles
  Project roles are a flexible way to associate users and/or groups with particular projects. Project roles also allow for delegated administration
     - Global administrators define JIRA's project roles
     - Project administrators assign members to project roles specifically for their project(s).
  Project roles are somewhat similar to groups, the main difference being that group membership is global whereas project role membership is project-specific. Additionally, group membership can only be altered by JIRA administrators, whereas project role membership can be altered by project administrators.
JIRA's default project roles
 1) Administrators — typically contains people who administer a given project.
 2) Developers — typically contains people who work on issues in a given project.
 3) Users — typically contains people who log issues in a given project.
Viewing project roles
  Administration -> Users Groups & Roles -> Project Role Browser
  To see where a project role is used, click the 'View Usage' link: This will display a list of the project role's associated permission schemes, email notification schemes, issue security levels and workflow conditions.
  To see which users/groups are associated with a project role for a particular project, click the 'View' link.
Adding a project role
  Administration -> Users Groups & Roles -> Project Role Browser -> enter its Name and a Description in the 'Add Project Role' form -> click the 'Add Project Role' button
  Once a new project role is created, it is available to all projects. Project administrators can then assign members to the project role for their project
Deleting a project role
  Administration -> Users Groups & Roles -> Project Role Browser -> Delete
Editing a project role
  Administration -> Users Groups & Roles -> Project Role Browser -> Edit -> To edit the Name and Description of a project role
Specifying 'default members' for a project role
  Administration -> Users Groups & Roles -> Project Role Browser -> Manage Default Members

Viewing User Sessions
JIRA provides a list of users who are currently accessing JIRA. This is useful if you need to know who to contact before planned downtime.
Viewing Current User Sessions
  Administration -> System -> User Sessions
     It is possible to have "sessions" for computers that are not logged in. For example, when someone accesses JIRA without logging in, a unique session is created without a username.

Integrating JIRA with LDAP
  The main point to realise is that user profiles are still managed in JIRA. Only the password lookup is done against LDAP, and only if the JIRA username coincides with a LDAP username. If the username is not found in LDAP, then the local JIRA credentials will be used.
  LDAP users do not automatically have access to JIRA. A JIRA account must be created for each user wishing to use JIRA. You can bulk-create users from LDAP with this LDAP user importer.
 This is because each JIRA user has a set of groups (for example, 'jira-users') stored in their profile. Without an associated group, that user can do nothing; not even browse JIRA. Thus, for an LDAP user to be able to use JIRA, a JIRA administrator must create an account for them, and assign them to a group (typically
'jira-user'). The password in this JIRA account will be ignored, as the LDAP password will override it.
 Refer Admin guide for details.

Clearing 'Remember my login' Tokens
  When a user logs in to a JIRA site, they have the option of making JIRA remember their login on a specific computer and browser, by selecting the 'Remember my login...' check box before they click the 'Log In' button. Upon doing so, a 'Remember my login' token is stored by the JIRA server and a cookie containing this token is set in the user's browser.
  A user who revisits a JIRA site from the same computer and browser, will automatically be logged in if JIRA detects that one of the user's 'Remember my login' tokens has a matching token contained in one of that browser's cookies. If the user logs out of JIRA, the 'Remember my login' token is cleared from the JIRA server.
Clearing 'Remember my login' Tokens from a User Profile
  A JIRA user can clear all of their own 'Remember my login' tokens from JIRA through their user profile.
  Visit your User Profile -> Details -> 'Clear All Tokens'
Clearing a User's 'Remember my login' Tokens from the Administration Console
  Administration -> Users, Groups & Roles -> User Browser -> Click the Username -> Remember My Login -> Clear All
Clearing all 'Remember my login' Tokens from the JIRA site
  Administration -> System -> Remember My Login -> Clear All
Disabling Remember My Login on the login page
  The checkbox can be disabled by setting the 'jira.option.allowcookies' property to 'false' in WEB-INF/classes/jira-application.properties file. After that, a restart of JIRA is required 


Project Management
 Defining a Project
  Administration -> Add Project
  A project's configuration settings are as follows:
    Key: a 'key' unique to this project (eg. 'WEB'), which specifies the first few letters of this project's issue keys (e.g. 'WEB-100')
    Project Lead: Used as the 'Default Assignee'
    Default Assignee: the user to whom issues in this project are initially assigned when created. Can be either the 'Project Lead', or, 'Unassigned' (if Allow unassigned issues is set to 'On' in JIRA's general configuration)
    Project Roles: members are users/groups who fulfill particular functions for this project. Project roles are used in permission schemes, notification schemes, issue security schemes and workflows.
    Issue Type Scheme: the project's issue type scheme determines which issue types apply to this project.
    Notification Scheme: the project's notification scheme determines who receives email notifications of changes to issues in this project.
    Permission Scheme: the project's permission scheme determines who has permission to view or change issues in this project.
    Issue Security Scheme: the project's issue security scheme determines what visibility levels issues in this project can have.
    Field Configuration Scheme: the project's field configuration scheme determines which field configuration applies to issue types in this project.
    Issue Type Screen Scheme: the project's issue type screen scheme determines which screens are displayed for different issue operations (view, edit, create), for different issue types.
    Workflow Scheme: the project's workflow scheme determines which workflows (issue state transitions) apply to issue types in this project.
   Project Category: a logical category to group this project into. Useful for managing multiple related projects. New categories can be created via the 'Project Categories' link in the 'Administration' menu.
   Components: logical groups that this project's issues can belong to.
   Versions: versions defined in the project.

 A project administrator can:
    Edit the project name ('Test Project' in the screenshot above)
    Edit the project description ('A project for demonstration purposes' in the screenshot above)
    Edit the project avatar image
    Edit the URL
    Edit the Project Lead
    Edit project role membership *
    Define project components
    Define project versions
Managing Project Role Membership
 Viewing project role members
    To see which users and groups belong to each project role for a particular project
     Administration -> Click the project of interest.-> This will display the Project Administration page -> Click the 'View members' link
  Assigning/removing a user to a project role
     Administration -> Click the project of interest -> Click the 'View members' link -> Click the 'Edit' link in the 'Users' column for the project role you wish to edit -> This will display the 'Assign Users to Project Role' page
     To remove: Tick the user(s) you wish to remove from the project role, then click the 'Remove' button.
  Assigning/removing a group to a project role
     Administration -> Click the project of interest.-> This will display the Project Administration page -> Click the 'View members' link -> Click the 'Edit' link in the 'Groups' column for the project role you wish to edit -> Type the group name(s) in the 'Add Group' box on the right-hand side of the page, then click the 'Add' button
     To remove: Tick the group(s) you wish to remove from the project role, then click the 'Remove' button
Defining a Component
   Components are sub-sections of a project. They are used to group issues within a project into smaller parts.
  Adding a new component
    Administration -> Click the project of interest -> In the 'Components' section, click the 'Add' link.-> Type the name, description of your new component and assign a user to be the component lead -> Click the "Add" button.
  Selecting a Default Assignee
    Administration -> Click the project of interest -> In the 'Components' section, click the 'Select' link. -> For each component, select the assignee to whom you want to have new issues in the component assigned by default -> Click on the 'Update' button
  Editing a component
    Administration -> Click the project of interest -> In the 'Components' section -> click the 'Edit' link -> you can edit the name, description and lead
  Deleting a component
    Administration -> Click the project of interest -> In the 'Components' section -> click the 'Delete' link -> You can specify the action to be taken regarding the issues in this component. You can either associate these issues with another active component, or have the references removed. -> Press the 'Delete' button.
Managing Versions
  Versions are points-in-time for a project. They help you schedule and organize your releases.

    


  
Read More
Posted in Jira | No comments

Tuesday, 24 January 2012

Productivity tools linkage

Posted on 22:52 by Unknown
Reference: From slide prepared by Carl Sjoquist. 
I liked this image which depicts how various productivity tools in an organization collaborate. 

Read More
Posted in | No comments

Monday, 23 January 2012

Generating ccs (Conary Change Set) file using rmake build Job-ID

Posted on 00:43 by Unknown
To generate CCS (Conary Change Set) files, for the corresponding packages available on rBuilder server, follow these steps
  • rmake build <package name>.recipe

             This command will build the specified recipe file
             Ex: rmake build tomcat.recipe
          Note down the job number 
  • rmake changeset <jobid>  <package name>.ccs
          This command creates a changeset for the given <jobId>. The created changeset contains all the binaries built for this job.
          Ex: rmake changeset 573 tomcat.ccs 
  • conary showcs --lsl <package name>.ccs
           Use conary showcs to examine changeset file contents 
            Ex: conary showcs --lsl tomcat.ccs 
Read More
Posted in rbuilder, rpath | No comments

Sunday, 15 January 2012

Cygwin error: Couldn't create pipe tracker for pid

Posted on 23:08 by Unknown
Our builds started failing to connect to a Windows machine using sshd provided by cygwin.
Then when I tried to open cygwin shell, it started throwing the error


pinfo::wait: Couldn't create pipe tracker for pid 3534
Win32 error 231
bash: fork: Resource temporarily unavailable

After googling, the reason for this error, which I came to know is
  1. It's a limitation in the number of running processes under Windows. When cygwin cannot create a new process during a fork(), you will get this behavior.
    Some people have reported success turning off (or swapping) antivirus programs, or other tricks to reduce the number of running processes on their system.
  2. Well, what that message means is that for some reason, the child process
    failed to notify the parent of its existence within a reasonable amount of
    time after it was spawned. That could mean that it died for some reason, or
    it could mean that it was alive, but failed to notify the parent process.


    Then I felt, it's good to reboot my Windows machine once and it has solved this problem for the time being. I will keep updated if it pop up again.

    Our cygwin version is
    $ cygcheck -V
    cygcheck version 1.90.4.1
    System Checker for Cygwin
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
    Compiled on Jun 12 2008


    and Windows version is "Windows XP professional 2002 SP2"
    I guess this issue doesn't occur with latest cygwin/Windows versions.
Read More
Posted in | No comments

Wednesday, 11 January 2012

nexus "Item not found on path" error

Posted on 02:52 by Unknown
We are using nexus 1.5.0 repository to host maven packages in our organization.
Recently I started encountering the error like
   Item not found on path "/com/rsa/appliance/appliance-distribution/3.1.3-SNAPSHOT/"!
when I click to download this package from nexus GUI, even though a maven build has successfully uploaded this package to the server, which I verified by logging into the machine which is hosting nexus (a RHEL m/c)

Issue:

The Not Found Cache is getting populated with these artifacts. Need to clear the cache for the repo and try the request again. 


Solution:
 Login to Nexus as Admin and browse -> Repositories -> Right click on repository which is giving the issue (in our case it's snapshots) -> Expire Cache

This has solved our issue.

Read More
Posted in | No comments

Tuesday, 3 January 2012

Encrypting using GPG - an example

Posted on 03:52 by Unknown
GPG stands for Gnu Privacy Guard, is a tool used to sign and encrypt data. Here I'm giving a simple usage of this tool.
Usecase: We have a file on linux server, which needs to be encrypted and delivered to another machine.

Solution:
  • By default every linux server comes with "gpg" tool. You can verify by running the command "which gpg"
  • Use gpg command to encrypt your file
           cd TO_YOUR_FILE_LOCATION   (I need to encrypt a file named CONARY)
           
           gpg -c CONARY           (It will ask for the passphrase/password, give a strong one and remember it)
           It creates a file named CONARY.gpg, which is encrypted. You can take a look at the content of this file
  • Using gpg command for decryption
          Now I have transferred this encrypted file (CONARY.gpg) to another server where gpg utility is available and run below command to decrypt it
         gpg -o CONARY -d CONARY.gpg
      
          Where -o option tells to create a file CONARY, instead of printing output on console


Strengthening encryption using AES256 cipher algo


Command to Encrypt
gpg --symmetric --cipher-algo aes256 -o dpm-3.2-src.tar.gz.gpg dpm-3.2-src.tar.gz
Enter passphrase: *******
Repeat passphrase: *******

Command to decrypt
gpg -d -o dpm-3.2-src.tar.gz  dpm-3.2-src.tar.gz.gpg


gpg: AES256 encrypted data
Enter passphrase: *******







         
                 


         
           

Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 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...
  • Fortify scan automation steps for analyzing c/c++ code (Makefiles)
    I wrote in my previous blog about installing and configuring Fortify client. This blog presents standard steps to automate fortify scan for ...
  • 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...
  • jenkins error: java.io.IOException: Authentication method password not supported by the server at this stage
    When I tried to add a node to jenkins/hudson using ssh as launch method, the authentication keeps on failing with the below error. [12/15/11...
  • Unable to resolve target system name - a DNS problem
    I was not able to ping to any machines from my Windows 2003 server. I did following steps to debug & resolve the issue, which was relate...
  • 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...
  • 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 ...
  • Perforce and cygwin
    Are you a command-line freak ? Do you want your automated shell scripts to run on Windows ? Do you wish to work with Perforce commands on Cy...
  • Using BUILD_LOG_REGEX in jenkins email notification
    Jenkins provide 'Email-ext' plugin, which  allows to configure every aspect of email notifications. One of my requirement is to send...
  • 0509-036 Cannot load program p4 because of the following errors
    Here is the full description of error ............ bash-3.00# p4 info exec(): 0509-036 Cannot load program p4 because of the following error...

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)
    • ►  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)
      • A build engineer's use-case of java decompiler
      • Jira Administration quick reference
      • Productivity tools linkage
      • Generating ccs (Conary Change Set) file using rmak...
      • Cygwin error: Couldn't create pipe tracker for pid
      • nexus "Item not found on path" error
      • Encrypting using GPG - an example
  • ►  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