Abhishek Gupta

The Sun won’t set at NIT Durgapur !

Posts Tagged ‘source’

JavaOne Coming to the OSUM Community

Posted by abhiitechie on May 18, 2009

As it is very difficult for everyone  to make the trip to San Francisco to attend JavaOne. That’s why special arrangements has been made to bring JavaOne to the Open Source University Meetup (OSUM) Community.  OSUM has scheduled a series of webinars which are previews of hands-on labs that will be conducted at JavaOne.

Check the OSUM events calendar for the complete schedule and RSVP today.

Posted in sun | Tagged: , , , , , , , , | Leave a Comment »

Finally some success porting OpenVPN

Posted by abhiitechie on May 15, 2009

Today has been quite  eventfull and productive for me . I finally found some success with my project . I am trying to port a software called OpenVPN .OpenVPN is a full-featured open source SSL VPN solution that accommodates a wide range of configurations, including remote access, site-to-site VPNs, Wi-Fi security, and enterprise-scale remote access solutions with load balancing, failover, and fine-grained access-control.

When I tried to build it from source I faced some difficulties getting the configure run. After a bit of research I got that working with the –disable lzo option . So this was the first dependency resolved for me . Then on doing make there was error compiling a file called tun.c . Researched again and found that for a 64 bit platform like open solaris I need to have the tun kernel module to compile the file tun.c and that to I had to make some changes inside the Makefile.in of the tun source adding the option -m64 for the 64 bit open solaris

Then I faced the error gcc not found while building the package tun 1.1 . As we kno gcc is not present by default in a Solaris system and is taken care of by Sun Studio compilers but the package in hand was hellbent on a gcc . So what I did is I again edited the file Makefile.in and replaced the CC entry with cc instead of gcc . Then it showed -Wall is an illegal option with cc so without thinking much I just removed it and crossed my fingers while making it and finally the tunnel driver was successfully installed and with the tunnel driver in the environment the dependencies of OpenVPN was also resolved .

Now it was the time for me making the Spec file from scratch for the OpenVPN source package. The preamble section was done easily without much trouble . Then I wrote the %prep section and kept it simple . Then there was the tough task of writing the %build section and I included all the dependency option of configure and with the help of someone in the mailing list I was able to write the %build section

%install was straight forward without any complicacies .

%file was the best . After lots of asking , mailing , head-scratching and research even that was done .

I kept my fingers crossed and executed pkgtool on the spec I wrote and guess what it passed .

Submitted my passed to the Source juicer site for the final test . It is still waiting to get validated may be by tommorow I will be able to see the results .

One important thing to be noted is that before submitting the spec to the juicer the license , vendor and copyright directives must be included as it is checked for also the .copyright file need to be uploaded along with the .spec file to the juicer . So the syntax check was done and it said OK .

Here is the spec I wrote :#OpenVPN (TM) — An Open Source VPN daemon

#Copyright (C) 2002-2008 OpenVPN Technologies, Inc.

%include Solaris.inc

Name:                openvpn
Summary:             OpenVPN is a full-featured open source SSL VPN solution.
Version:             2.0.9
License:             GPL license version 2
Group:               SSL VPN
Vendor:             OpenVPN
URL:                 http://openvpn.net/
Source:              http://openvpn.net/release/openvpn-2.0.9.tar.gz

SUNW_BaseDir:        %{_basedir}
SUNW_Copyright:      %{name}.copyright
BuildRoot:           %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc

%package root
Summary:                 %{summary} – / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: tun

# OpenSolaris IPS Manifest Fields
Meta(info.porter):  Abhishek Gupta < A.Gupta@sun.com >

OpenVPN is a full-featured open source SSL VPN solution that accommodates a wide range of configurations, including remote access, site-to-site VPNs, Wi-Fi security, and enterprise-scale remote access solutions with load balancing, failover, and fine-grained access-controls. Starting with the fundamental premise that complexity is the enemy of security, OpenVPN offers a cost-effective, lightweight alternative to other VPN technologies that is well-targeted for the SME and enterprise markets.

%setup -q -n openvpn-%version


export CFLAGS=”%optflags”
export LDFLAGS=”%{_ldflags}”

./configure –prefix=%{_prefix} \
–disable-lzo  \
–disable-crypto \





%defattr (-, root, root)

* Friday 15 May , 2009 – A.Gupta@sun.com
– initial version

Posted in sun | Tagged: , , , , , , , , , , , , , , , , , | 2 Comments »

4 Days with IPS

Posted by abhiitechie on May 14, 2009

Its been four days for me with IPS and I am proud to say that now I am able to write a post dedicated to the very topic of Image Packaging System and porting packages to OpenSolaris . Engineers from the Solaris team have  been working to create IPS packages for OpenSolaris for most of the existing popular open source softwares which are still not existing as binaries to be directly installed to OpenSolaris and needs to be build from source and along with which lies the tedious task of resolving dependencies which some times becomes almost killing and dis-heartening.

Generating IPS package is similar to RPMs which is popular in GNU/Linux and it also uses a file called a Spec file . So IPS specs are similar to RPM specs with some minor differences.

Need for a Spec file:        

 Typical OSS package builds the code using ./configure ; make ;  make install .  Writing a pkginfo file with package metainfo, like name, version,description etc.  Writing a prototype file with list of files and attributes and not to forget the dependency file. All these requires lots of typing and is error prone to . Because of the tediousness people tend to avoid packaging binary tarballs and even  worse build from source.

So we follow the new approach of buillding and packaging in the same step using Spec files . A typical spec file consists of a simple text metainfo mixed with some perl syntax variables and small shell sripts.Metainfo may consist of name, version, description, etc. of the software .It also applies the code changes called patches to the original source while building. Build instructions are tiny shell scriptlets . Package contents are also specified called globs.

Whats inside a spec file ?

  •  Source code availability (URL)
  •  Local code changes (unified or context diffs)
  •  Build instructions
  •  Lists of files to package up (globs)                
  • Package scripts 
  • Metainfo
  • Build-time and package dependencies
  • Changelog          

What we can do as developers ?


● Write a spec file for your favourite app

● Build existing spec files
● Report bugs
● Update packages to the latest version availableBuild the code any way you want
> typical OSS package: ./configure; make;
make install
• Write a pkginfo file:
> package metainfo, like name, version,
• Write a prototype file:
> list of files and attributes
• Write a dependency file
  •  Write a spec file for our favourite app
  •  Build existing spec files
  •  Report bugs
  •  Update packages to the latest version available


More information in the following URLs


Posted in sun | Tagged: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a Comment »

Open Source car by EDAG

Posted by abhiitechie on April 27, 2009



We’re pretty comfortable with the idea of open source software running on computers and mobile phone — heck, even guitars — but cars?
That one we’re still warming up to, but this concept vehicle from EDAG definitely helps. As its name implies, the Light Car – Open Source lets developers modify and / or improve upon the auto’s technologies — or at least put a SNES emulator on the back. The lithium ion-powered bubble car also sports an OLED-infused exterior for lights and signals that are supposedly useful both to the driver and other nearby motorists, but in actuality we suspect it’d just scare anyone tailing behind. No information on the interior, but we imagine a decked out dashboard and some futuristic chairs. It’s currently being shown off at the Geneva Motor Show.

Posted in Uncategorized | Tagged: , , , , , , , , , , , | 3 Comments »

The Sun won’t set at NIT Durgapur … I promise !

Posted by abhiitechie on April 25, 2009

As we all might have heard, Oracle has entered into an agreement to acquire Sun. While it is natural to have questions following an announcement of this magnitude, its also important to acknowledge that this is an
industry transforming event. The following excerpt from the Oracle Press Release helps to highlight this point.

“This is a fantastic day for Sun’s customers, developers, partners and employees across the globe, joining forces with the global leader in enterprise software to drive innovation and value across every aspect of
the technology marketplace,” said Jonathan Schwartz, Sun’s CEO, “From the Java platform touching nearly every business system on earth, powering billions of consumers on mobile handsets and consumer electronics, to the convergence of storage, networking and computing driven by the Solaris operating system and Sun’s SPARC and x64 systems.”

Coming back to the question of what will be the future of MySQL under Oracle. I think that as long as there is a demand for a product and such a vibrant community of users and developers behind it the product will never die.

Since it is all business as usual, we should not create a huge fuss about Oracle acquiring Sun and the future of Sun Campus Ambassadorship and the Sun Academic Initiative (SAI). I think we all should focus on our respective efforts to evangelize Free Softwares and continue conducting Talks , Workshops and related Technical sessions and continue building the Talk culture in our college which has just started some times back. We should try building the best open source community in NIT Durgapur with our Sun Club and the GNU/Linux Users’ Group.

Posted in Uncategorized | Tagged: , , , , , , , , , , , , , , , , , | 6 Comments »