Thursday, July 19, 2012

How to take backup and setup the CVS on Linux Machine

For Backup two ways:

1) Make a tar file and
2) use the rsysnc command
   rsync -rv user01@server01.comentum.com:Source path/ /Destination path/


 For Set up the CVS server :




 1) Install the CVS Server ( apt-get install cvs)
 2) Install the xinetd  (apt-get install xinetd)

 To set up xinetd create a file called "cvs" in "/etc/xinetd.d/" with the following content.

 service cvspserver
{
     port = 2401
     socket_type = stream
     protocol = tcp
     user = root
     wait = no
     type = UNLISTED
     server = /usr/bin/cvs
     server_args = -f --allow-root /usr/local/cvsroot pserver   //(If u want to change the path then replace /usr/locatl/cvsroot)
     disable = no
}

3)  Start the CVS server:

sudo /etc/init.d/cvsd start

 4) check weather the CVS server is running or not. (ps -def | grep cvsd)

 ** past the file if you took backup and update the path
 other wise you have to create a project directory and past it there.

 5) Now you have to add the users and group to the directory:

 From System->Administration->Users and Groups. Click Unlock button and enter the password, then click Manage Groups button. Highlight cvsd then click Properties and select the username from the Group Members list.
Create the user password for CVS login as shown below:
cvsd-passwd /var/lib/cvsd/myrepos username

6)  The syntax to login to the local CVS server is shown below:
cvs -d :pserver:username@localhost:/myrepos login
However, if the $CVSROOT is defined just simply enter "cvs login" instead. Add following line in ~/.bashrc is the easiest way to add it to the environment.

export CVSROOT=:pserver:username@localhost:/myrepos

7) cvs login
8) Enter the password



Now you have to check in and check out

9) For Check out the command is (cvs co Directory Name)
10) For Check In the command is (cvs ci -m "new version" filename)
cvs commit
11) For Adding the Directory in CVS (cvs  -R add "Test file" *)





At last if you are facing some problem then give the cvs directory permission
chmod 775 -R cvs
chgroup src cvs
chmod g+s cvs


-------------------------------------------------------------------

Add the repository to the cvs with sub folder

cvs import releases Sirius releases 

releases --- main folder name
Sirius  ---- name any




refer : https://help.ubuntu.com/10.04/serverguide/cvs-server.html

Wednesday, July 11, 2012

Keyword imp on UNIX(alarm,strtol)

The alarm API function can be very useful to time out other functions. The alarm function works by raising a SIGALARM signal once the number of seconds passed to alarm has expired. The function prototype for the alarm is :

**unsigned int alarm ( unsigned int secs);

------------------------------------------------------------------------------------------------------------------------------------
convert string to long integer .

This function first discards as many whitespace characters as neccessary until the first non -whitespace character is found.
Finally a pointer to the first character following the interger representation in *str is stored in the object pointed by **endptr.

*** long int strtol ( const char * str, char ** endptr, int base );

parameters are:

str--- string that contain value like(hexadecimal, ocatadecimal, binary etc..)

endptr-- Reference to an object of type char*, whose value is set by the function to the next character in str after the numerical value.
This parameter can also be a null pointer, in which case it is not used.

base-- it is either 10,2,8 etc..

Monday, July 2, 2012

Making the SPEC file in the linux

# This is a spec file for starlight audio module

%define name      rpmdemo
%define buildroot %{_topdir}/%{name}-0.1
%define buildarch noarch
%define prefix    /opt/starlight
%define _binaries_in_noarch_packages_terminate_build 0
%define _source_filedigest_algorithm 8
%define _binary_filedigest_algorithm 8

BuildRoot:      %{buildroot}
Summary:        Starlight audio module
License:        GPL
Name:           %{name}
Version:        0.1
Release: 0.1
Source:         %{name}-0.1.tar.gz
Prefix:         %{prefix}
Group:          Development/Tools
BuildArch:  %{buildarch}

%description
Starlight audio module

%prep
%setup -q

%install
mkdir -p %{buildroot}%{prefix}/bin/
cp -r %{_topdir}/BUILD/%{name}-0.1/bin/hello %{buildroot}%{prefix}/bin/

%files
%defattr(-,root,root)
%{prefix}/bin/hello

~                                                                                                                                                                      
"rpmdemo.spec" 35L, 751C                                                                                                                              1,1           All


 *****************************************************************
2nd SPEC file for .zip contenet


# This is a spec file for starlight audio module

%define name     lcd
%define buildroot %{_topdir}/%{name}-0.1
%define buildarch noarch
%define prefix    /opt/starlight
%define _binaries_in_noarch_packages_terminate_build 0
%define _source_filedigest_algorithm 8
%define _binary_filedigest_algorithm 8

BuildRoot:      %{buildroot}
Summary:        Starlight audio module
License:        GPL
Name:           %{name}
Version:        0.1
Release: 0.1
Source:         %{name}-0.1.tar.gz
Prefix:         %{prefix}
Group:          Development/Tools
BuildArch:  %{buildarch}

%description
Starlight audio module

%prep
%setup -q

%install
mkdir -p %{buildroot}%{prefix}/
cp -r %{_topdir}/BUILD/%{name}-0.1.tar.gz   %{buildroot}%{prefix}/

%files
%defattr(-,root,root)
%{prefix}/lcd-0.1.tar.gz

**********************************************************************

rpm file is used for the installing the package in the ubuntu O.S

http://rpm5.org/docs/rpm-guide.html#ch-creating-rpms
http://www.rpm.org/max-rpm/ch-rpm-basics.html

HOW TO MAKE THE WLAN(WIRELESS LAN UP IF IT IS NOT UP IN LINUX)

check the cmd :: ifconfig -a
a) if the wlan is showing then ok other wise you have to follow the following steps :

i) cmd :: depmod
ii) cmd :: modprobe wl12zz_sdio
iii) cmd ::modprobe  wl12xx
now again check the ifconfig -a if wlan0 is showing then ok other wise go to the next step:
GO to cd/lib/modules/3.03.3/Kernel/drivers/net/wore;ess/wl12xx
after that we have to go the a(i) and a(ii) again

If they assign the ip address all these things then ok otherwise we have to assign it manually, for that you have to follwo these steps:

I) ifconfig wlan0 19.68.5.0 netmask 255.255.255.0
II) also we have to give the essid first by following that command

ifconfig wlan0 essid "st"


If wifi is up then u can scan by using the following command:

cmd :: iwlist wlan0 scan

cmd :: iwconfig

**** copy the wli2 thing to Rootfs if it is not present .
copy form 3.03.3 lib module to ---> Rootfs

Qualcomm Short Term

  113 is the SL. 1st Target by mid July.

Total Pageviews