Year: 2009

How to create or build RPM Package

How to create or build RPM Package

Introduction –

* “rpmbuild” tool is used to build both…

1) Binary Package ~ used to install the software and supporting scripts. It contains the files that comprise the application, along with any additional information needed to install and erase it.
2) Source Package ~ contains the original compressed tar file of source code, patches and Specification File.

* What is RPM & RPM package Manager?

The RPM Package Manager (RPM) is a powerful command line package management system capable of installing, uninstalling, verifying, querying, and updating software packages.

RPM package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package.

* To build RPM package you need to specify three things ~

1) Source of application – In any case, you should not modify the sources used in the package building process.

2) Patches – RPM gives you the ability to automatically apply patches to them. The patch addresses an issue specific to the target system. This could include changing makefiles to install the application into the appropriate directories, or resolving cross-platform conflicts. Patches create the environment required for proper compilation.

3) Specification File – The specification file is at the heart of RPM package building process. It contains information required by RPM to build the package, as well as instructions telling RPM how to build it. The specification file also dictates exactly what files are a part of the package, and where they should be installed.

** Specification File ~ is divided in to 8 sections as shown below

a) Preamble ~ contains information that will be displayed when users request information about the package. This would include a description of the package’s function, the version number of the software etc.

b) Preparation ~ where the actual work of building a package starts. As the name implies, this section is where the necessary preparations are made prior to the actual building of the software. In general, if anything needs to be done to the sources prior to building the software, it needs to happen in the preparation section. The contents of this section are an ordinary shell script. However, RPM does provide two macros to make life easier. One macro can unpack a compressed tar file and cd into the source directory. The other macro easily applies patches to the unpacked sources.

c) Build ~ This section consists of a shell script. It is used to perform whatever commands are required to actually compile the sources like single make  command, or be more complex if the build process requires it. There are no macros available in this section.

d) Install ~ This section also containing a shell script, the install section is used to perform the commands required to actually install the software.

e) Install and Uninstall Scripts ~ It consists of scripts that will be run, on the user’s system, when the package is actually installed or removed. RPM can execute a script pre/post installation/removal of package.

f) Verify Script ~ script that is executed on the user’s system. It is executed when RPM verifies the package’s proper installation.

g) Clean Section ~ script that can clean things up after the build. This script is rarely used, since RPM normally does a good job of clean-up in most build environments.

h) File List ~ consists of a list of files that will comprise the package. Additionally, a number of macros can be used to control file attributes when installed, as well as to denote which files are documentation, and which contain configuration information. The file list is very important.

*** RPM’s requirement for build environment ~

A] RPM requires a set of directories to perform the build. While the directories’ locations and names can be changed. Default layout is shown below –

root@arunsb:~# ls -l /usr/src/redhat/

drwxr-xr-x 2 root root 4096 Aug 25  2007 SOURCES => Contains the original sources, patches, and icon files
drwxr-xr-x 2 root root 4096 Aug 25  2007 SPECS => Contains the specification files
drwxr-xr-x 2 root root 4096 Aug 25  2007 BUILD => Directory in which the sources are unpacked, & software is built
drwxr-xr-x 8 root root 4096 May 28  2008 RPMS => Contains the binary package files created by the build process
drwxr-xr-x 2 root root 4096 Aug 25  2007 SRPMS => Contains the source package files created by the build process

root@arunsb:~#

B] Need to export few global variables used by RPM –

root@arunsb:~# export  RPM_BUILD_DIR=/usr/src/redhat/BUILD/
root@arunsb:~# export  RPM_SOURCE_DIR=/usr/src/redhat/SOURCES/

Step 1] Create Specification (spec) File ~

root@arunsb:~# head -n 50  /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul

#RPM_BUILD_DIR    /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR    /usr/src/redhat/SOURCES/

%define MY_PREFIX    /usr/local/openlsm/

## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL

%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.

## Preparation Section-
%prep

rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}

## Build Section-
%build

cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make

## Install Section-
%install

cd ./openlsm-0.99-r45/
make install

## Files Section-
%files

/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#

* How do you create the File List?

Creating the file list is manual process. What I did is I took the file list from my manual installed prefix directory with find command as shown below…

root@arunsb:~# find /usr/local/openlsm/ -type f -or  -type d

Step 2] Starting the Build ~

root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l  openlsm.spec
-rw-r–r– 1 root root 12938 Dec  2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#

root@arunsb:/usr/src/redhat/SPECS# rpmbuild   -ba  openlsm.spec

….
…..

Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS# echo $?
0

root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
-rw-r–r– 1 root root 3206 Dec  2 17:50 /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
-rw-r–r– 1 root root 3052868 Dec  2 17:50 /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS#

* Source and Binary package created !!

** Let’s see what happened in “/usr/src/redhat/” directory

root@arunsb:/usr/src/redhat# pwd
/usr/src/redhat
root@arunsb:/usr/src/redhat# ls
BUILD  RPMS  SOURCES  SPECS  SRPMS
root@arunsb:/usr/src/redhat# ls BUILD/
openlsm-0.99-r45                                               <== Source extracted here as part of build instructions from specification file ie “openlsm.spec”
root@arunsb:/usr/src/redhat# ls SOURCES/
openlsm-0.99-r45.tar.gz                                 <== original ‘openlsm-0.99-r45.tar.gz’ source file copied by me
root@arunsb:/usr/src/redhat# ls RPMS/
athlon  i386  i486  i586  i686  noarch
root@arunsb:/usr/src/redhat# ls RPMS/i386/
openlsm-0.99-r45.i386.rpm <== Binary rpm package created!
root@arunsb:/usr/src/redhat# ls SRPMS/
openlsm-0.99-r45.src.rpm <== Source rpm package created!
root@arunsb:/usr/src/redhat#

Step 3] Now install the package and test it ~

root@arunsb:/usr/src/redhat# cp RPMS/i386/openlsm-0.99-r45.i386.rpm  /home/arunsb/

root@arunsb:/usr/src/redhat# cd /home/arunsb/
root@arunsb:~# ls
openlsm-0.99-r45.i386.rpm
root@arunsb:~# rpm -ivh openlsm-0.99-r45.i386.rpm
Preparing…                ########################################### [100%]
1:openlsm                ########################################### [100%]
root@arunsb:~# ls /usr/local/openlsm/
bin  contrib  etc  include  lib  sbin  scripts  share  var
root@arunsb:~#

** Starting the openlsm server ~

root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  start
* Starting openlsm admin server: openlsm
.                                                         [  OK  ]
root@arunsb:~#
root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  status
openlsm (pid 21607) is running…
root@arunsb:~#

root@arunsb:~# rpm -q openlsm-0.99-r45
openlsm-0.99-r45
root@arunsb:~#

root@arunsb:~# rpm -ql  openlsm-0.99-r45
..

root@arunsb:~# rpm  -qiv  openlsm-0.99-r45
Name        : openlsm                      Relocations: (not relocatable)
Version     : 0.99                              Vendor: IndianGNU.org & openlsm
Release     : r45                           Build Date: Wed 02 Dec 2009 05:50:54 PM IST
Install Date: Wed 02 Dec 2009 06:06:23 PM IST      Build Host: alongseveral-dr.eglbp.corp.yahoo.com
Group       : System Environment/Daemons    Source RPM: openlsm-0.99-r45.src.rpm
Size        : 14877918                         License: GPL
Signature   : (none)
Packager    : IndianGNU.org (http://www.indiangnu.org)
URL         : http://openlsm.sourceforge.net/
Summary     : openlsm Admin Server
Description :
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.
root@arunsb:~#

** NOTE ~ This article does not contain information on how to define micros,how to copy docs,man pages to default location, how to set permision and ownership etc. I will cover this topics in next article on RPM.

Regards,
Arun Bagul

***

|| How to create or build RPM Package ||

Introduction –

* “rpmbuild” tool is used to build both…

1) Binary Package ~ used to install the software and supporting scripts. It contains the files that comprise the application, along with any additional information needed to install and erase it.
2) Source Package ~ contains the original compressed tar file of source code, patches and Specification File.

* What is RPM & RPM package Manager?

The RPM Package Manager (RPM) is a powerful command line package management system capable of installing, uninstalling, verifying, querying, and updating software packages.

RPM package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file
attributes, and descriptive information about the package.

* To build RPM package you need to specify three things ~

1) Source of application – In any case, you should not modify the sources used in the package building process.

2) Patches – RPM gives you the ability to automatically apply patches to them. The patch addresses an issue specific to the target system. This could include changing makefiles to install the application into the appropriate directories, or resolving cross-platform conflicts. Patches create the environment required for proper compilation.

3) Specification File – The specification file is at the heart of RPM package building process. It contains information required by RPM to build the package, as well as instructions telling RPM how to build it. The specification file also dictates exactly what files are a part of the package, and where they should be installed.

** Specification File ~ is divided in to 8 sections as shown below

a) Preamble ~ contains information that will be displayed when users request information about the package. This would include a description of the package’s function, the version number of the software etc.

b) Preparation ~ where the actual work of building a package starts. As the name implies, this section is where the necessary preparations are made prior to the actual building of the software. In general, if anything needs to be done to the sources prior to building the software, it needs to happen in the preparation section. The contents of this section are an ordinary shell script. However, RPM does provide two macros to make life easier. One macro can unpack a compressed tar file and cd into the source directory. The other macro easily applies patches to the unpacked sources.

c) Build ~ This section consists of a shell script. It is used to perform whatever commands are required to actually compile the sources like single make  command, or be more complex if the build process requires it. There are no macros available in this section.

d) Install ~ This section also containing a shell script, the install section is used to perform the commands required to actually install the software.

e) Install and Uninstall Scripts ~ It consists of scripts that will be run, on the user’s system, when the package is actually installed or removed. RPM can execute a script pre/post installation/removal of package.

f) Verify Script ~ script that is executed on the user’s system. It is executed when RPM verifies the package’s proper installation.

g) Clean Section ~ script that can clean things up after the build. This script is rarely used, since RPM normally does a good job of clean-up in most build environments.

h) File List ~ consists of a list of files that will comprise the package. Additionally, a number of macros can be used to control file attributes when installed, as well as to denote which files are documentation, and which contain configuration information. The file list is very important.

*** RPM’s requirement for build environment ~

A] RPM requires a set of directories to perform the build. While the directories’ locations and names can be changed. Default layout is shown below –

root@arunsb:~# ls -l /usr/src/redhat/

drwxr-xr-x 2 root root 4096 Aug 25  2007 SOURCES        => Contains the original sources, patches, and icon files
drwxr-xr-x 2 root root 4096 Aug 25  2007 SPECS            => Contains the specification files
drwxr-xr-x 2 root root 4096 Aug 25  2007 BUILD            => Directory in which the sources are unpacked, and the software is built
drwxr-xr-x 8 root root 4096 May 28  2008 RPMS            => Contains the binary package files created by the build process
drwxr-xr-x 2 root root 4096 Aug 25  2007 SRPMS            => Contains the source package files created by the build process

root@arunsb:~#

B] Need to export few global variables used by RPM –

root@arunsb:~# export RPM_BUILD_DIR=/usr/src/redhat/BUILD/
root@arunsb:~# export RPM_SOURCE_DIR=/usr/src/redhat/SOURCES/

Step 1] Create Specification (spec) File ~

root@arunsb:~# head -n 50  /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul

#RPM_BUILD_DIR    /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR    /usr/src/redhat/SOURCES/

%define MY_PREFIX    /usr/local/openlsm/

## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL

%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.

## Preparation Section-
%prep

rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}

## Build Section-
%build

cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make

## Install Section-
%install

cd ./openlsm-0.99-r45/
make install

## Files Section-
%files

/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#

* How do you create the File List?

Creating the file list is manual process. What I did is I took the file list from my manual installed prefix directory with find command as shown below…

root@arunsb:~# find /usr/local/openlsm/ -type f -or  -type d

Step 2] Starting the Build ~

root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l  openlsm.spec
-rw-r–r– 1 root root 12938 Dec  2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#

root@arunsb:/usr/src/redhat/SPECS# rpmbuild -ba openlsm.spec

….
…..

Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS# echo $?
0

root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
-rw-r–r– 1 root root 3206 Dec  2 17:50 /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
-rw-r–r– 1 root root 3052868 Dec  2 17:50 /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS#

* Source and Binary package created !!

** Let’s see what happened in “/usr/src/redhat/” directory

root@arunsb:/usr/src/redhat# pwd
/usr/src/redhat
root@arunsb:/usr/src/redhat# ls
BUILD  RPMS  SOURCES  SPECS  SRPMS
root@arunsb:/usr/src/redhat# ls BUILD/
openlsm-0.99-r45                                <== Source extracted here as part of build instructions from specification file ie “openlsm.spec”
root@arunsb:/usr/src/redhat# ls SOURCES/
openlsm-0.99-r45.tar.gz                         <== original ‘openlsm-0.99-r45.tar.gz’ source file copied by me
root@arunsb:/usr/src/redhat# ls RPMS/
athlon  i386  i486  i586  i686  noarch
root@arunsb:/usr/src/redhat# ls RPMS/i386/
openlsm-0.99-r45.i386.rpm                       <== Binary rpm package created!
root@arunsb:/usr/src/redhat# ls SRPMS/
openlsm-0.99-r45.src.rpm            <== Source rpm package created!
root@arunsb:/usr/src/redhat#

Step 3] Now install the package and test it ~

root@arunsb:/usr/src/redhat# cp RPMS/i386/openlsm-0.99-r45.i386.rpm  /home/arunsb/

root@arunsb:/usr/src/redhat# cd /home/arunsb/
root@arunsb:~# ls
openlsm-0.99-r45  openlsm-0.99-r45.i386.rpm  openlsm-0.99-r45.tar.gz  thttpd-2.25b-3.dag.src.rpm  thttpd-2.25b-dag.spec
root@arunsb:~# rpm -ivh openlsm-0.99-r45.i386.rpm
Preparing…                ########################################### [100%]
1:openlsm                ########################################### [100%]
root@arunsb:~# ls /usr/local/openlsm/
bin  contrib  etc  include  lib  sbin  scripts  share  var
root@arunsb:~#

** Starting the openlsm server ~

root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  start
* Starting openlsm admin server: openlsm
.                                                         [  OK  ]
root@arunsb:~#
root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  status
openlsm (pid 21607) is running…
root@arunsb:~#

root@arunsb:~# rpm -q openlsm-0.99-r45
openlsm-0.99-r45
root@arunsb:~#

root@arunsb:~# rpm -lq openlsm-0.99-r45
..

root@arunsb:~# rpm -qiv openlsm-0.99-r45
Name        : openlsm                      Relocations: (not relocatable)
Version     : 0.99                              Vendor: IndianGNU.org & openlsm
Release     : r45                           Build Date: Wed 02 Dec 2009 05:50:54 PM IST
Install Date: Wed 02 Dec 2009 06:06:23 PM IST      Build Host: alongseveral-dr.eglbp.corp.yahoo.com
Group       : System Environment/Daemons    Source RPM: openlsm-0.99-r45.src.rpm
Size        : 14877918                         License: GPL
Signature   : (none)
Packager    : IndianGNU.org (http://www.indiangnu.org)
URL         : http://openlsm.sourceforge.net/
Summary     : openlsm Admin Server
Description :
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.
root@arunsb:~#

** NOTE ~ This article does not contain information on how to define micros,how to copy docs,man pages to default location, how to set permision and ownership etc. I will cover this topics in next article on RPM.

Regards,
Arun Bagul

방법을 만들거나 RPM 패키지 빌드

방법을 만들거나 RPM 패키지 빌드

회사 소개 –

* “”rpmbuild 도구를 모두 빌드하는 데 사용됩니다 ..

1) 바이너리 패키지 ~ 소프트웨어를 설치하고 사용하는 스크립트를 지원. 그것은 응용 프로그램 구성 파일이 들어있는 모든 자세한 내용은 설치 및 지워 필요와 함께.
2) 소스 패키지 ~ 소스 코드, 패치 및 사양서 파일의 원래는 tar 압축된 파일이 포함되어있습니다.

* 어떤 RPM이 & RPM 패키지 관리자 무엇입니까?

RPM 패키지 관리자 (RPM이) 강력한 명령줄 꾸러미 관리 시스템을 설치할 수있는, 제거, 확인, 질의이며, 소프트웨어 패키지를 업데이 트.

RPM 패키지 파일 및 메타 아카이브의 구성 데이터를 설치 및 아카이브 파일을 지우는 데 사용됩니다. 메타 데이터 헬퍼 스크립트의 파일 특성을, 그리고 패키지에 대한 설명 정보가 포함되어있습니다.

* 당신이 세 가지를 지정해야합니다 RPM 패키지 빌드하려면 ~

응용 프로그램의 1) 출처 – 어떤 경우에, 당신은 소스 패키지 빌드 프로세스에서 사용되는 수정해야합니다.

2) 패치 – RPM을 당신이 그들에게 능력을 자동으로 패치를 적용할 수있습니다. 패치 문제가 대상 시스템에 특정 주소. 이것은 해당 디렉터리, 또는 교차 플랫폼은 갈등 해결에 응용 프로그램을 설치하려면 메이크 파일을 변경 포함될 수있습니다. 패치 환경에 적절한 컴파일에 필요한 만듭니다.

3) 제품 사양 파일 – 명세 파일을 RPM 패키지 구축 과정의 핵심입니다. 그것은 정보를 RPM을하여 지침뿐만 아니라 그것을 빌드하는 방법을 말하고 RPM을 빌드하는 데 필요한 패키지가 포함되어있습니다. 명세 파일에는 정확히 어떤 파일이 패키지의 일부이며, 그들이 어디 지시가 설치되어 있어야합니다.

** 제품 사양 파일 ~ 8 개 섹션으로 아래로 나누어져있습니다

) 서문 ~ 그 때 사용자가 패키지에 대한 정보가 표시됩니다 요청 정보가 포함되어있습니다. 이것은 소프트웨어의 버전 번호 등을 패키지의 기능 설명을 포함

b)는 준비 ~ 어디 패키지 건물의 실제 작업을 시작합니다. 마찬가지로 이름이 있듯이,이 섹션에 필요한 준비를하기 전에 소프트웨어를 실제로 만든 건물입니다. 필요한 경우 일반적으로, 이전 소스 소프트웨어를 구축 할 수 있는데, 그 준비 섹션에서 일어날 필요가있다. 이 섹션의 내용은 일반적인 쉘 스크립트가있습니다. 그러나, RPM을 쉽게 인생을 만들어 두 개의 매크로를 제공합니다. 하나의 매크로는 압축된 tar 파일의 압축을 풀고 수있는 소스가있는 디렉토리로 CD에있습니다. 다른 매크로를 쉽게 풀었 소스에 패치를 적용합니다.

C) 빌드 ~이 섹션에서는 쉘 스크립트로 구성되어있습니다. 그것은 어떤 명령을 수행하는 데 사용되는 사실, 또는 좀 더 복잡한 빌드 프로세스가 명령을 하나의 같은 소스를 컴파일하는 데 필요한이 필요합니다. 아무 매크로는이 섹션에서 사용할 수있습니다.

d)에 설치 ~이 섹션에서는 명령을 실제로 소프트웨어를 설치하는 데 필요한 수행하는 데 사용되는 섹션을 설치하는 쉘 스크립트가 들어있는.

전자) 설치 및 제거 스크립트 ~ 그것은 스크립트의 실행이 될 사용자의 시스템이 때, 실제로 패키지를 설치 또는 제거에 구성되어있습니다. RPM은 / 사후 설치 / 제거 패키지의 스크립트를 사전에 실행할 수있습니다.

f를) 확인 스크립트 ~ 그 사용자의 시스템에서 실행되는 스크립트. 때 RPM은 패키지의 적절한 설치를 확인한다 실행됩니다.

g) 클린 절 ~ 그 빌드 후 물건 스크립트를 정리할 수있습니다. 이후의 RPM이 정상적으로 좋은 일을 않기 때문에이 스크립트는 거의 사용되고 정리 대부분의 환경을 구축했다.

아) 파일 목록 ~ 파일의 패키지를 구성하는 것입니다 목록으로 구성되어있습니다. 또한, 매크로의 숫자는 설치 파일을 제어하는 특성뿐만 아니라, 파일이 문서가있습니다 나타내기 위해, 그리고 구성 정보를 포함하는 데 사용할 수있습니다. 파일 목록은 매우 중요합니다.

빌드 환경 구축을위한 *** RPM을 요구 ~

A] RPM을 빌드를 수행하는 디렉토리의 설정이 필요합니다. 그러나 디렉토리의 위치와 이름을 변경할 수있습니다. 기본 레이아웃은 아래와 같습니다 –

root@arunsb:~# ls -l /usr/src/redhat/

drwxr-xr-x 2 root root 4096 Aug 25  2007 SOURCES    => 그리고 아이콘 파일은 원본 소스 패치를 포함 8월 2일 루트 루트
drwxr-xr-x 2 root root 4096 Aug 25  2007 SPECS         => 일 루트 루트 사양의 파일이 포함되어있습니다
drwxr-xr-x 2 root root 4096 Aug 25  2007 BUILD        => 디렉토리는 소스를 풀었있습니다, & 소프트웨어 8월 2일 루트 루트 구축
drwxr-xr-x 8 root root 4096 May 28  2008 RPMS         => 바이너리 패키지를 포함하는 프로세스를 구축하여 만든 파일을
drwxr-xr-x 2 root root 4096 Aug 25  2007 SRPMS         => 루트 루트 소스 패키지를 포함하는 프로세스를 구축하여 만든 파일을

root@arunsb:~#

B 조] 몇 가지 글로벌 변수를 사용하는 RPM을 내보낼 필요 –

root@arunsb:~# export  RPM_BUILD_DIR=/usr/src/redhat/BUILD/
root@arunsb:~# export  RPM_SOURCE_DIR=/usr/src/redhat/SOURCES/

1 단계] (명세) 파일 사양 만들기 ~

root@arunsb:~# head -n 50  /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul

#RPM_BUILD_DIR    /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR    /usr/src/redhat/SOURCES/

%define MY_PREFIX    /usr/local/openlsm/

## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL

%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.

## Preparation Section-
%prep

rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}

## Build Section-
%build

cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make

## Install Section-
%install

cd ./openlsm-0.99-r45/
make install

## Files Section-
%files

/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#

* 어떻게 파일 목록은 어떻게 만듭니까?

파일 목록 만들기 설명서에 처리합니다. 내가 무슨 짓을 내 수동으로 설치 접두사를 디렉토리에서 파일 목록을 알게했다 아래와 같이 명령을 …

root@arunsb:~# find /usr/local/openlsm/ -type f -or  -type d

2 단계] 빌드 시작 ~

root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l  openlsm.spec
-rw-r–r– 1 root root 12938 Dec  2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#

root@arunsb:/usr/src/redhat/SPECS# rpmbuild   -ba  openlsm.spec

….
… ..

Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS# echo $?
0

root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
-rw-r–r– 1 root root 3206 Dec  2 17:50 /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
-rw-r–r– 1 root root 3052868 Dec  2 17:50 /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS#

* 소스 및 바이너리 패키지를 만든!

무슨에서 “일이 일어 났는지는 / usr / src에 / 레드햇 /”디렉토리에하자 **

root@arunsb:/usr/src/redhat# pwd
/usr/src/redhat
root@arunsb:/usr/src/redhat# ls
BUILD  RPMS  SOURCES  SPECS  SRPMS
root@arunsb:/usr/src/redhat# ls BUILD/
openlsm-0.99-r45                         <= 소스는 여기에”openlsm.spec “규격 즉, 원본 파일의 지침을 빌드 일환으로 추출
root@arunsb:/usr/src/redhat# ls SOURCES/
openlsm – 0.99 – r45.tar.gz          <= ‘원래 openlsm – 0.99 – r45.tar.gz’소스 내로 복사한 파일을
root@arunsb:/usr/src/redhat# ls RPMS/
athlon  i386  i486  i586  i686  noarch
root@arunsb:/usr/src/redhat# ls RPMS/i386/
openlsm-0.99-r45.i386.rpm                <= 바이너리 RPM 패키지 생성!
root@arunsb:/usr/src/redhat# ls SRPMS/
openlsm-0.99-r45.src.rpm                 <= 소스 RPM 패키지를 만들어!
root@arunsb:/usr/src/redhat#

3 단계] 이제 패키지를 설치하고 테스트 ~

root@arunsb:/usr/src/redhat# cp RPMS/i386/openlsm-0.99-r45.i386.rpm  /home/arunsb/

root@arunsb:/usr/src/redhat# cd /home/arunsb/
root@arunsb:~# ls
openlsm-0.99-r45.i386.rpm
root@arunsb:~# rpm -ivh openlsm-0.99-r45.i386.rpm
Preparing…                ########################################### [100%]
1:openlsm                ########################################### [100%]
root@arunsb:~# ls /usr/local/openlsm/
bin  contrib  etc  include  lib  sbin  scripts  share  var
root@arunsb:~#

** openlsm 서버를 시작 ~

root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  start
* Starting openlsm admin server: openlsm
.                                                         [  OK  ]
root@arunsb:~#
root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  status
openlsm (pid 21607) is running…
root@arunsb:~#

root@arunsb:~# rpm -q openlsm-0.99-r45
openlsm-0.99-r45
root@arunsb:~#

root@arunsb:~# rpm -ql  openlsm-0.99-r45
..

root@arunsb:~# rpm  -qiv  openlsm-0.99-r45
Name        : openlsm                      Relocations: (not relocatable)
Version     : 0.99                              Vendor: IndianGNU.org & openlsm
Release     : r45                           Build Date: Wed 02 Dec 2009 05:50:54 PM IST
Install Date: Wed 02 Dec 2009 06:06:23 PM IST      Build Host: alongseveral-dr.eglbp.corp.yahoo.com
Group       : System Environment/Daemons    Source RPM: openlsm-0.99-r45.src.rpm
Size        : 14877918                         License: GPL
Signature   : (none)
Packager    : IndianGNU.org (http://www.indiangnu.org)
URL         : http://openlsm.sourceforge.net/
Summary     : openlsm Admin Server
Description :
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.
root@arunsb:~#

** 참고 ~이 문서에서는 복사하는 방법을 워드 프로세서 마이크로 정의하는 방법에 대한 정보가 포함되어 있지 않습니다, man 페이지, 어떻게 permision 그리고 RPM을 옆에 문서에서이 주제를 다룰 것입니다 소유권 등의 설정 위치를 기본값으로합니다.

** 제발 영어 문서를 참조하십시오 ~ http://www.indiangnu.org/2009/how-to-create-or-build-rpm-package/

안부,
Arun Bagul

RPM को कैसे बनाएँ और निर्माण करे

RPM को कैसे बनाएँ और निर्माण करे

परिचय —

* “” Rpmbuild उपकरण के लिए दोनों का निर्माण किया जाता है …

1) द्विचर पैकेज ~ के लिए सॉफ्टवेयर स्थापित करें और स्क्रिप्ट का समर्थन करते थे. यह फाइल है कि आवेदन पत्र शामिल हैं, के साथ किसी भी अतिरिक्त स्थापित करें और उसे मिटा आवश्यक जानकारी के साथ.
2) स्रोत पैकेज ~ स्रोत कोड, पैच और विशिष्टता फ़ाइल के मूल संकुचित टार फ़ाइल है.

* RPM और RPM संकुल प्रबंधक क्या है?

RPM संकुल प्रबंधक (RPM) एक शक्तिशाली कमांड लाइन पैकेज प्रबंधन प्रणाली स्थापित करने में सक्षम, uninstalling, सत्यापित करने, querying है, और सॉफ्टवेयर संकुल अद्यतन.

RPM संकुल फाइल और मेटा का एक संग्रह शामिल हैं, डेटा को स्थापित करने और संग्रह फ़ाइलें मिटा करते थे. Meta-डेटा सहायक लिपियों, फ़ाइल गुण, और पैकेज के बारे में वर्णनात्मक जानकारी भी शामिल है.

* RPM संकुल आप को तीन बातें निर्दिष्ट करने की आवश्यकता का निर्माण करने के लिए ~

आवेदन पत्र के स्रोत) 1 – किसी भी मामले में, आप संकुल निर्माण की प्रक्रिया में इस्तेमाल स्रोतों को संशोधित नहीं होना चाहिए.

2) पैच – RPM को आप के लिए स्वचालित रूप से उन से पैच लागू करने की क्षमता देता है. पैच एक लक्ष्य प्रणाली को विशेष मुद्दा पते. इस makefiles बदलने के लिए उचित निर्देशिकाओं, या पार से हल करने में आवेदन मंच संघर्ष स्थापित शामिल हो सकते हैं. पैच उचित संकलन के लिए आवश्यक वातावरण पैदा करते हैं.

) 3 विशिष्टता फाइल – विनिर्देशन फ़ाइल RPM संकुल के निर्माण की प्रक्रिया के दिल में है. यह RPM के लिए आवश्यक के लिए पैकेज का निर्माण, साथ ही साथ यह कह RPM को कैसे बनाने के लिए निर्देशों की जानकारी शामिल है. विनिर्देशन फ़ाइल भी तय कर वास्तव में क्या फ़ाइलें पैकेज का हिस्सा हैं, और वे कहाँ स्थापित किया जाना चाहिए.

** विशिष्टता फाइल ~ में 8 के रूप में नीचे दिखाया गया वर्गों को विभाजित है

क) प्रस्तावना ~ जानकारी प्रदर्शित होगा जब उपयोगकर्ता पैकेज के बारे में जानकारी का अनुरोध शामिल हैं. यह है पैकेज समारोह का विवरण शामिल है, सॉफ़्टवेयर के संस्करण की संख्या आदि होगा

ख) ~ तैयारी जहां एक पैकेज के निर्माण की वास्तविक काम शुरू होता है. के रूप में नाम का अर्थ है, इस भाग है, जहां आवश्यक तैयारी सॉफ्टवेयर के वास्तविक निर्माण से पहले किया जाता है. सामान्य में, यदि कुछ भी जरूरत है सूत्रों के कुछ किया जाना सॉफ्टवेयर का निर्माण करने से पहले, यह तैयारी अनुभाग में होने की जरूरत है. इस खंड की सामग्री को एक साधारण खोल स्क्रिप्ट है. हालांकि, RPM को दो मैक्रोज प्रदान करता है जीवन को आसान बना. एक स्थूल एक संकुचित टार फ़ाइल खोलना और स्रोत निर्देशिका में सीडी कर सकते हैं. अन्य स्थूल आसानी से unpacked सूत्रों के पैच लागू होता है.

ग) बनाएँ ~ यह खंड एक खोल स्क्रिप्ट के होते हैं. यह जो भी आज्ञा पालन किया जाता है वास्तव में बनाने के लिए एक तरह के सूत्रों कमान संकलन, या और अगर इस प्रक्रिया को जटिल बनाने की आवश्यकता है यह आवश्यकता है. कोई इस अनुभाग में उपलब्ध मैक्रोज हैं.

घ) स्थापित ~ यह खंड भी एक खोल स्क्रिप्ट, अनुभाग स्थापित करने वाले के लिए वास्तव में सॉफ्टवेयर स्थापित करने की आवश्यकता आज्ञा पालन किया जाता है.

ङ) स्थापित करें और स्थापना रद्द करें लिपियों ~ यह स्क्रिप्ट के होते हैं कि भाग जाएगा, प्रयोक्ता की व्यवस्था है, जब पैकेज वास्तव में स्थापित या हटा दिया जाता है पर. RPM एक स्क्रिप्ट पूर्व निष्पादित / पोस्ट स्थापना / पैकेज के हटाने कर सकते हैं.

च) सत्यापित करें स्क्रिप्ट ~ स्क्रिप्ट है कि उपयोगकर्ता के सिस्टम पर मार डाला है. यह मार डाला है जब RPM है पैकेज उचित स्थापना की पुष्टि.

छ) स्वच्छ धारा ~ स्क्रिप्ट है कि चीजों के निर्माण के बाद साफ कर सकते हैं. यह कहानी शायद ही कभी इस्तेमाल किया है, क्योंकि RPM को आम तौर पर एक अच्छा काम करता है सबसे स्वच्छ वातावरण बनाने में.

ज) फाइल की सूची ~ फ़ाइलों की एक सूची है कि पैकेज शामिल होंगे शामिल है. इसके अतिरिक्त, मैक्रोज के कई गुण जब स्थापित फ़ाइल नियंत्रण किया जा सकता है, के रूप में अच्छी तरह के रूप में निरूपित करने के लिए जो फाइल दस्तावेज हैं, और जो कॉन्फ़िगरेशन जानकारी होती है. फाइल की सूची बहुत महत्वपूर्ण है.

माहौल बनाने के लिए *** है RPM आवश्यकता ~

A] RPM निर्देशिका का एक सेट की आवश्यकता के लिए प्रदर्शन का निर्माण. जबकि ‘निर्देशिका स्थानों और नाम बदला जा सकता है. डिफ़ॉल्ट लेआउट नीचे दिखाया गया है —

root@arunsb:~# ls -l /usr/src/redhat/

drwxr-xr-x 2 root root 4096 Aug 25  2007 SOURCES  => मूल स्रोत, पैच होता है, और आइकन फ़ाइलें अगस्त
drwxr-xr-x 2 root root 4096 Aug 25  2007 SPECS    => अगस्त x विनिर्देशन फ़ाइलें हैं
drwxr-xr-x 2 root root 4096 Aug 25  2007 BUILD    => निर्देशिका में सूत्रों unpacked रहे हैं, और सॉफ्टवेयर अगस्त x बनाया गया है
drwxr-xr-x 8 root root 4096 May 28  2008 RPMS      => द्विपदीय संकुल को समाहित x बनाने की प्रक्रिया के द्वारा बनाई गई फ़ाइलें
drwxr-xr-x 2 root root 4096 Aug 25  2007 SRPMS      => अगस्त x स्रोत पैकेज में शामिल हैं प्रक्रिया के निर्माण के द्वारा बनाई गई फ़ाइलें

root@arunsb:~#

B] कुछ वैश्विक RPM द्वारा इस्तेमाल चर निर्यात करने की आवश्यकता —

root@arunsb:~# export  RPM_BUILD_DIR=/usr/src/redhat/BUILD/
root@arunsb:~# export  RPM_SOURCE_DIR=/usr/src/redhat/SOURCES/

चरण 1] विशिष्टता बनाएँ (कल्पना) फाइल ~

root@arunsb:~# head -n 50  /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul

#RPM_BUILD_DIR    /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR    /usr/src/redhat/SOURCES/

%define MY_PREFIX    /usr/local/openlsm/

## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL

%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.

## Preparation Section-
%prep

rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}

## Build Section-
%build

cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make

## Install Section-
%install

cd ./openlsm-0.99-r45/
make install

## Files Section-
%files

/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#

* आप फाइल की सूची कैसे बनाऊँ?

फ़ाइल सूची बनाने के मैन्युअल प्रक्रिया है. क्या मैंने किया है मैं अपने हाथ से स्थापित उपसर्ग निर्देशिका से फाइल की सूची लिया मिल के रूप में नीचे दिखाया गया कमान …

root@arunsb:~# find /usr/local/openlsm/ -type f -or  -type d

चरण 2] बनाएँ शुरू ~

root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l  openlsm.spec
-rw-r–r– 1 root root 12938 Dec  2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#

root@arunsb:/usr/src/redhat/SPECS# rpmbuild   -ba  openlsm.spec

….
… ..

Unpackaged फ़ाइल (s के लिए जाँच हो रही है): usr / lib / rpm / जांच% फ़ाइलें buildroot ()
ने लिखा: usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm /
ने लिखा: usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm /
arunsb @ जड़: / usr / src redhat / / चश्मा # $ गूंज?
0

Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS# echo $?
0

root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
-rw-r–r– 1 root root 3206 Dec  2 17:50 /usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
root@arunsb:/usr/src/redhat/SPECS# ls -l  /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
-rw-r–r– 1 root root 3052868 Dec  2 17:50 /usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root@arunsb:/usr/src/redhat/SPECS#

* स्रोत और द्विचर पैकेज  बनाया!

** चलो देखते हैं क्या हुआ “/usr/src/redhat/ निर्देशिका”

root@arunsb:/usr/src/redhat# pwd
/usr/src/redhat
root@arunsb:/usr/src/redhat# ls
BUILD  RPMS  SOURCES  SPECS  SRPMS
root@arunsb:/usr/src/redhat# ls BUILD/
openlsm-0.99-r45        <= यहाँ विनिर्देशन फ़ाइल अर्थात् से निर्देश के निर्माण के रूप में हिस्सा निकाला “openlsm.spec”
root@arunsb:/usr/src/redhat# ls SOURCES/
openlsm-0.99-r45.tar.gz     <= ‘openlsm-0.99-r45.tar.gz’ स्रोत मेरे द्वारा नकल फाइल
root@arunsb:/usr/src/redhat# ls RPMS/
athlon  i386  i486  i586  i686  noarch
root@arunsb:/usr/src/redhat# ls RPMS/i386/
openlsm-0.99-r45.i386.rpm     <= द्विचर rpm पैकेज बनाया!
root@arunsb:/usr/src/redhat# ls SRPMS/
openlsm-0.99-r45.src.rpm     <= श्रोत RPM संकुल बनाया!
root@arunsb:/usr/src/redhat#

चरण 3] अब संकुल अधिष्ठापित है और यह परीक्षण ~

root@arunsb:/usr/src/redhat# cp RPMS/i386/openlsm-0.99-r45.i386.rpm  /home/arunsb/

root@arunsb:/usr/src/redhat# cd /home/arunsb/
root@arunsb:~# ls
openlsm-0.99-r45.i386.rpm
root@arunsb:~# rpm -ivh openlsm-0.99-r45.i386.rpm
Preparing…                ########################################### [100%]
1:openlsm                ########################################### [100%]
root@arunsb:~# ls /usr/local/openlsm/
bin  contrib  etc  include  lib  sbin  scripts  share  var
root@arunsb:~#

** Openlsm सर्वर शुरू ~

root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  start
* Starting openlsm admin server: openlsm
.                                                         [  OK  ]
root@arunsb:~#
root@arunsb:~# /usr/local/openlsm/contrib/openlsm-redhat  status
openlsm (pid 21607) is running…
root@arunsb:~#

root@arunsb:~# rpm -q openlsm-0.99-r45
openlsm-0.99-r45
root@arunsb:~#

root@arunsb:~# rpm -ql  openlsm-0.99-r45
..

root@arunsb:~# rpm  -qiv  openlsm-0.99-r45
Name        : openlsm                      Relocations: (not relocatable)
Version     : 0.99                              Vendor: IndianGNU.org & openlsm
Release     : r45                           Build Date: Wed 02 Dec 2009 05:50:54 PM IST
Install Date: Wed 02 Dec 2009 06:06:23 PM IST      Build Host: alongseveral-dr.eglbp.corp.yahoo.com
Group       : System Environment/Daemons    Source RPM: openlsm-0.99-r45.src.rpm
Size        : 14877918                         License: GPL
Signature   : (none)
Packager    : IndianGNU.org (http://www.indiangnu.org)
URL         : http://openlsm.sourceforge.net/
Summary     : openlsm Admin Server
Description :
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.
root@arunsb:~#

** नोट ~ यह लेख जानकारी कैसे माइक्रो परिभाषित करने के लिए, कैसे डॉक्स नकल पर नहीं शामिल करता है, आदमी पृष्ठों डिफ़ॉल्ट स्थान को, कैसे permision और स्वामित्व आदि मैं RPM पर अगले लेख में इस विषय को कवर किया जाएगा सेट के लिए.

** कृपया अंग्रेजी लेख का उल्लेख ~ http://www.indiangnu.org/2009/how-to-create-or-build-rpm-package/

सादर,
Arun Bagul

كيفية إنشاء أو بناء حزم آر بي إم

كيفية إنشاء أو بناء حزم آر بي إم

— مقدمة

* “rpmbuild” هو أداة تستخدم لبناء السواء…

1) حزمة ثنائي ~ المستخدمة لتثبيت البرنامج ودعم البرامج النصية. ويحتوي على الملفات التي تشمل تطبيق ، جنبا إلى جنب مع أية معلومات إضافية ضرورية لتثبيت والغاءه.
2) المصدر ~ حزمة تحتوي على القطران الملف المضغوط الأصلي من شفرة المصدر ، والبقع ومواصفات ملف.

* ما هو ودورة في الدقيقة في الدقيقة حزمة إدارة؟

لفة في الدقيقة إدارة حزمة (الدقيقة) هي قوية سطر الأوامر حزمة إدارة نظام قادر على تثبيت أو إلغاء ، والتحقق ، والاستعلام ، وتحديث حزم البرمجيات.

دورة في الدقيقة وتتألف الحزمة من محفوظات الملفات والبيانات الوصفية المستخدمة لتثبيت ومسح ملفات الأرشيف. البيانات الفوقية يشمل المساعد النصية ، سمات الملف ، ومعلومات وصفية حول الحزمة.

* لبناء مجموعة لفة في الدقيقة تحتاج إلى تحديد ثلاثة أشياء ~

1) مصدر للتطبيق — وعلى أية حال ، يجب أن لا تعدل المصادر المستخدمة في بناء حزمة العملية.

2) الرقع — لفة في الدقيقة تعطيك القدرة على تطبيق تصحيحات تلقائيا لهم. التصحيح يتناول قضية محددة إلى نظام الهدف. هذا ويمكن أن تشمل تغيير makefiles لتثبيت التطبيق إلى الدلائل المناسبة ، أو حل الصراعات عبر منصة. بقع تهيئة البيئة اللازمة لتجميع السليم.

3) مواصفات ملف — ومواصفات الملف هو في صميم عملية حزمة بناء لفة في الدقيقة. أنه يحتوي على المعلومات المطلوبة من قبل لفة في الدقيقة لبناء مجموعة ، وكذلك تعليمات نقول لفة في الدقيقة كيفية بنائها. ملف مواصفات أيضا بالضبط ما يمليه الملفات هي جزء من الصفقة ، وحيث يجب أن يتم تثبيتها.

** مواصفات ملف ~ مقسمة إلى 8 أقسام كما هو مبين أدناه

أ) الديباجة ~ يحتوي على المعلومات التي سيتم عرضها عندما يقوم المستخدمون طلب معلومات حول حزمة. وهذا قد يشمل وصفا لحزمة وظيفة ، وإصدار عدد من البرامج وغيرها

ب) إعداد ~ عندما يكون العمل الفعلي في بناء مجموعة يبدأ. كما يوحي الاسم ، وهذا القسم هو المكان الذي تتم الاستعدادات اللازمة قبل البناء الفعلي للبرنامج. عموما ، إذا كان أي شيء يجب القيام به للمصادر السابقة في بناء البرمجيات ، وأنه يجب أن يحدث في قسم إعداد. محتويات هذا القسم هي عادية قذيفة السيناريو. ومع ذلك ، لا تقدم في الدقيقة اثنين من وحدات الماكرو لجعل الحياة أسهل. ماكرو واحد لا يمكن فك ملف مضغوط القطران ومؤتمر نزع السلاح في الدليل المصدر. الماكرو ينطبق بقع أخرى بسهولة إلى مصادر مفتوح.

ج) بناء ~ يتكون هذا القسم من نصي قذيفة. فهو يستخدم لتنفيذ الأوامر مهما كانت مطلوبة فعلا لتجميع مصادر وحيدة مثل جعل الأمر ، أو أن تكون أكثر تعقيدا إذا كانت عملية بناء يتطلب ذلك. لا توجد وحدات الماكرو المتوفرة في هذا القسم.

د) تثبيت ~ هذا القسم أيضا يحتوي على شيل ، وتثبيت الجزء يستخدم لتنفيذ الأوامر المطلوبة فعلا لتثبيت البرنامج.

ه) وإلغاء تثبيت البرامج النصية ~ وهو يتألف من البرامج النصية التي سيتم تشغيلها على نظام المستخدم ، عندما كان هو في الواقع مجموعة تثبيتها أو إزالتها. دورة في الدقيقة يمكن تنفيذ البرنامج النصي قبل / بعد تثبيت / إزالة الحزمة.

و) تحقق سيناريو ~ السيناريو الذي يتم تنفيذه على نظام المستخدم. فإنه يتم تنفيذه عند لفة في الدقيقة والتحقق من حزمة من التركيب الصحيح.

ز) تنظيف القسم ~ النصي الذي يمكن أن تصل الأمور النظيفة بعد بناء. هذا السيناريو هو نادرا ما تستخدم ، منذ الدقيقة عادة يقوم بعمل جيد لتنظيف بناء في معظم البيئات.

ح) من قائمة ملف ~ يتألف من قائمة الملفات التي ستضم الحزمة. وبالإضافة إلى ذلك ، يمكن استخدام عدد من وحدات الماكرو يكون للسيطرة على سمات الملف عند تركيبها ، وكذلك للدلالة على الملفات التي يتم الوثائق ، والتي تحتوي على معلومات التكوين. قائمة الملف مهم جدا.

*** دورة في الدقيقة لمتطلبات بناء بيئة ~

و] دورة في الدقيقة يتطلب مجموعة من الدلائل لتنفيذ بناء. في حين أن الدلائل ‘المواقع والاسماء يمكن تغييرها. التخطيط الافتراضي هو مبين أدناه —

@ الجذر arunsb : ~ # ليرة سورية ل / البيرة / كبريت / ريدهات /

drwxr – xr – × 2 جذر جذر 4096 25 أغسطس 2007 مصادر => يحتوي على المصادر الأصلية ، والبقع ، وملفات رمز
drwxr – xr – × 2 جذر جذر 4096 25 أغسطس 2007 المواصفات => يحتوي على ملفات مواصفات
drwxr – xr – × 2 جذر جذر 4096 25 أغسطس 2007 إنشاء => الدليل الذي يتم تفكيك المصادر ، وبرامج مبنية
drwxr – xr – × 8 الجذرية الجذرية 4096 28 مايو 2008 الاجتماعات التحضيرية => يحتوي على حزمة الملفات الثنائية التي أوجدتها عملية الإنشاء
drwxr – xr – × 2 جذر جذر 4096 25 أغسطس 2007 SRPMS => يحتوي على حزمة المصدر الملفات التي تم إنشاؤها بواسطة عملية الإنشاء

@ الجذر arunsb : ~ #

باء] تحتاج إلى تصدير بعض المتغيرات العالمية التي تستخدمها لفة في الدقيقة —

@ الجذر arunsb : ~ = # تصدير RPM_BUILD_DIR / البيرة / كبريت / ريدهات / بناء /
@ الجذر arunsb : ~ = # تصدير RPM_SOURCE_DIR / البيرة / كبريت / ريدهات / المصادر /

الخطوة 1] احدث المواصفات (المواصفات) ملف ~

@ الجذر arunsb : ~ # الرأس ن 50 / البيرة / كبريت / ريدهات / المواصفات / openlsm.spec
# السلطة : ارون Bagul

# RPM_BUILD_DIR / البيرة / كبريت / ريدهات / بناء /
# RPM_SOURCE_DIR / البيرة / كبريت / ريدهات / المصادر /

٪ تعريف MY_PREFIX / البيرة / المحلية / openlsm /

# # قسم الديباجة ،
الاسم : openlsm
الإصدار : 0.99
بائع : IndianGNU.org & openlsm
الافراج عن : R45
المجموعة : بيئة النظام / أحرار
رابط : IndianGNU.org (http://www.indiangnu.org)
العنوان : http://openlsm.sourceforge.net/
ملخص : openlsm الادارية خادم
الترخيص : الترخيص

وصف ٪
openlsm الادارية خادم حرة ومفتوحة المصدر على شبكة الإنترنت لوحة التحكم لينكس ، وأنظمة يونيكس.

# # إعداد قسم –
الإعدادية ٪

جمهورية مقدونيا بين الترددات اللاسلكية RPM_BUILD_DIR $ () / openlsm – 0.99 – R45 /
xvfz القطران RPM_SOURCE_DIR $ () / openlsm – 0.99 – r45.tar.gz جيم RPM_BUILD_DIR $ ()

# # إنشاء قسم –
بناء ٪

مؤتمر نزع السلاح./openlsm-0.99-r45 /
/ تكوين بادئة = / البيرة / المحلية / openlsm – مع – ماي = / البيرة / بن / mysql_config تمكين – الداخلي pcre – مع – geoip = / البيرة ، مع – ldap = / البيرة تمكين التتبع
يصنع

# # تثبيت قسم –
تثبيت ٪

مؤتمر نزع السلاح./openlsm-0.99-r45 /
تقديم وتركيب

# # ملفات قسم –
ملفات ٪

/ البيرة / المحلية / openlsm
/ البيرة / المحلية / openlsm / الخ / openlsm / openlsm.conf
/ البيرة / المحلية / openlsm / الخ / openlsm / openlsm.conf.perf_sample
/ البيرة / المحلية / openlsm / الخ / openlsm / خدمة تصميم المواقع /
/ البيرة / المحلية / openlsm / بن / openlsm التهيئة
….
…..
….. قائمة الملفات المثبتة من قبل pkg
@ الجذر arunsb : ~ #

* كيف تقوم بإنشاء ملف قائمة؟

إنشاء قائمة ملف عملية يدوية. ما فعلته هو أنني أخذت قائمة الملف من وجهة نظري الدليل اليدوي تثبيت البادئة مع العثور على الأمر كما هو مبين أدناه…

@ الجذر arunsb : ~ # العثور / البيرة / المحلية / openlsm / من نوع إف أو من نوع د

الخطوة 2] بدء بناء ~

@ الجذر arunsb : ~ # مؤتمر نزع السلاح / البيرة / كبريت / ريدهات / المواصفات
@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات # ليرة سورية ل openlsm.spec
ص ف ، رويترز ، ص ص – 1 – الجذر الجذر 12938 ديسمبر 2 17:21 openlsm.spec
@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات #

@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات # rpmbuild – بكالوريوس openlsm.spec

….
…..

التحقق من وجود ملف غير المعبأة (ق) : / البيرة / ليب / دورة في الدقيقة / فحص ملفات buildroot ٪ ()
كتب : / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
كتب : / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات # $ صدى؟
0

@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات # ليرة سورية ل / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
ص ف ، رويترز ، ص ص – 1 – الجذر الجذر 3206 ديسمبر 2 17:50 / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات # ليرة سورية ل / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
ص ف ، رويترز ، ص ص – 1 – الجذر الجذر 3052868 ديسمبر 2 17:50 / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
@ الجذر arunsb : / البيرة / كبريت / ريدهات / المواصفات #

* المصدر حزمة الثنائي وخلق!

** دعونا نرى ما حدث في “/ البيرة / كبريت / ريدهات /” الدليل

@ الجذر arunsb : / البيرة / كبريت / ريدهات # الأشخاص ذوي الإعاقة
/ البيرة / كبريت / ريدهات
@ الجذر arunsb : / البيرة / كبريت / ريدهات # ليرة سورية
حشود الاجتماعات التحضيرية مصادر المواصفات SRPMS
@ الجذر arunsb : / البيرة / كبريت / ريدهات # ليرة سورية بناء /
openlsm – 0.99 – R45 <== المصدر المستخرجة كجزء من هنا بناء على تعليمات من أي ملف مواصفات “openlsm.spec”
@ الجذر arunsb : / البيرة / كبريت / ريدهات # مصادر ليرة سورية /
نسخ openlsm – 0.99 – r45.tar.gz <== الأصلي ‘openlsm – 0.99 – r45.tar.gz’ الملف المصدر من قبلي
@ الجذر arunsb : / البيرة / كبريت / ريدهات # الاجتماعات التحضيرية ليرة سورية /
اثلون i386 i486 i586 i686 noarch
@ الجذر arunsb : / البيرة / كبريت / ريدهات # RPMS/i386 ليرة سورية /
openlsm – 0.99 – r45.i386.rpm <== الثنائي في الدقيقة حزمة إنشاؤها!
@ الجذر arunsb : / البيرة / كبريت / ريدهات # SRPMS ليرة سورية /
openlsm – 0.99 – r45.src.rpm <== المصدر دورة في الدقيقة حزمة إنشاؤها!
@ الجذر arunsb : / البيرة / كبريت / ريدهات #

الخطوة 3] الآن تثبيت حزمة واختبار عليه ~

@ الجذر arunsb : / البيرة / كبريت / ريدهات # RPMS/i386/openlsm-0.99-r45.i386.rpm ب ق / الوطن / arunsb /

@ الجذر arunsb : / البيرة / كبريت / ريدهات # مؤتمر نزع السلاح / الوطن / arunsb /
@ الجذر arunsb : ~ # ليرة سورية
openlsm – 0.99 – r45.i386.rpm
@ الجذر arunsb : ~ # دورة في الدقيقة openlsm ivh – 0.99 – r45.i386.rpm
تستعد… ########################################### [100 ٪]
1 : openlsm ########################################### [100 ٪]
@ الجذر arunsb : ~ # ليرة سورية / البيرة / المحلية / openlsm /
بن contrib الخ تشمل ليب النصية sbin حصة فار
@ الجذر arunsb : ~ #

** ابتداء من خادم openlsm ~

@ الجذر arunsb : ~ # / البيرة / المحلية / openlsm / contrib / openlsm بدء ريدهات
* ابتداء من openlsm المشرف الخادم : openlsm
. [موافق]
@ الجذر arunsb : ~ #
@ الجذر arunsb : ~ # / البيرة / المحلية / openlsm / contrib / openlsm مركز ريدهات
openlsm (معرف 21607) يشغل…
@ الجذر arunsb : ~ #

@ الجذر arunsb : ~ # دورة في الدقيقة ف openlsm – 0.99 – R45
openlsm – 0.99 – R45
@ الجذر arunsb : ~ #

@ الجذر arunsb : ~ # دورة في الدقيقة openlsm طابعات كيو – 0.99 – R45
..

@ الجذر arunsb : ~ # دورة في الدقيقة openlsm qiv – 0.99 – R45
الاسم : بالترحيل openlsm : (وليس منقولة)
الإصدار : 0.99 البائع : IndianGNU.org & openlsm
الافراج عن : R45 بناء التاريخ : الثلاثاء 02 Dec 2009 05:50:54 المحكمة الخاصة العراقية
تثبيت التاريخ : الثلاثاء 02 Dec 2009 06:06:23 إنشاء المحكمة الخاصة العراقية المضيف : alongseveral – dr.eglbp.corp.yahoo.com
المجموعة : نظام البيئة / دورة في الدقيقة أحرار المصدر : openlsm – 0.99 – r45.src.rpm
الحجم : 14877918 الترخيص : الترخيص
التوقيع : (لا يوجد)
رابط : IndianGNU.org (http://www.indiangnu.org)
العنوان : http://openlsm.sourceforge.net/
ملخص : openlsm الادارية خادم
الوصف :
openlsm الادارية خادم حرة ومفتوحة المصدر على شبكة الإنترنت لوحة التحكم لينكس ، وأنظمة يونيكس.
@ الجذر arunsb : ~ #

** ملاحظة ~ هذه المادة لا تحتوي على معلومات حول كيفية تحديد مايكروين ، كيفية نسخ المستندات ، وصفحات الموقع الافتراضي للرجل ، وكيفية تحديد permision والملكية وما إلى ذلك وسوف تغطي هذه المواضيع في المقال المقبل عن دورة في الدقيقة.

** يرجى الرجوع إلى المادة الانكليزية ~ http://www.indiangnu.org/2009/how-to-create-or-build-rpm-package/

تمنيات ،
Arun  Bagul

Come creare o costruire dei pacchetti RPM

Come creare o costruire dei pacchetti RPM

Introduzione —

* Strumento “rpmbuild” è usato per costruire entrambi …

1) pacchetto binario ~ utilizzata per installare il software e gli script di supporto. Esso contiene i file che compongono l’applicazione, insieme con tutte le informazioni supplementari necessarie per installare e cancellarlo.
Pacchetto sorgente 2) ~ contiene il file originale tar compresso del codice sorgente, patch e specifica di file.

* Che cosa è RPM & Manager pacchetto RPM?

Il RPM Package Manager (RPM) è un potente linea di comando del sistema di gestione dei pacchetti in grado di installare, disinstallare, la verifica, l’esecuzione di query, e l’aggiornamento dei pacchetti software.

Pacchetto RPM consiste in un archivio di file e metadati utilizzati per installare e cancellare i file di archivio. La meta-dati comprende degli script helper, gli attributi di file e informazioni descrittive sul pacchetto.

* Per costruire il pacchetto RPM è necessario specificare tre cose ~

1) Fonte di applicazione – In ogni caso, non si dovrebbe modificare le fonti utilizzate nel processo di costruzione del pacchetto.

2) Patches – RPM ti dà la possibilità di applicare automaticamente le patch per loro. La patch risolve un problema specifico al sistema di destinazione. Ciò potrebbe comprendere cambiando makefile per installare l’applicazione in directory appropriate, o risolvere i conflitti cross-piattaforma. Patches di creare le condizioni necessarie per la corretta raccolta.

3) specifica di file – La specifica del file è al centro del processo di costruzione dei pacchetti RPM. Esso contiene le informazioni richieste dalla RPM per costruire il pacchetto, così come le istruzioni dicendo RPM come costruirlo. Il file di specifica detta anche esattamente ciò che i file sono una parte del pacchetto, e dove dovrebbe essere installato.

** Specifica del file ~ è divisa in 8 sezioni, come illustrato di seguito

a) Preambolo ~ contiene le informazioni che verranno visualizzati quando gli utenti richiedono informazioni sul pacchetto. Ciò include una descrizione della funzione del pacchetto, il numero di versione del software, ecc

b) Preparazione ~ in cui il vero lavoro di costruzione di un pacchetto di inizio. Come suggerisce il nome, questa sezione è dove i preparativi necessari sono effettuate prima della costruzione effettiva del software. In generale, se qualcosa deve essere fatto per le fonti prima di costruire il software, si deve accadere nella sezione di preparazione. I contenuti di questa sezione sono uno script di shell ordinaria. Tuttavia, RPM prevede due macro per rendere la vita più facile. Una macro è possibile scompattare un file compresso tar e CD nella directory di origine. La macro altri si applica facilmente le patch ai sorgenti spacchettato.

c) Build ~ Questa sezione è costituita da uno script di shell. E ‘utilizzato per eseguire qualsiasi comando in realtà sono tenuti a compilare i sorgenti, come unico comando make, o essere più complesso se il processo di costruzione richiede. Non ci sono le macro disponibili in questa sezione.

d) Installare ~ Questa sezione contiene anche uno script di shell, la sezione di installazione viene utilizzato per eseguire i comandi necessari per installare effettivamente il software.

e) Installazione e disinstallazione Script ~ Si tratta di script che verrà eseguito, sul sistema dell’utente, quando il pacchetto è in realtà installati o rimossi. RPM in grado di eseguire uno script di pre / post-installazione / rimozione del pacchetto.

f) Verificare Script ~ script che viene eseguito sul sistema dell’utente. E ‘eseguito quando RPM verifica la corretta installazione del pacchetto.

g) Pulizia Sezione ~ script che può pulire le cose dopo la compilazione. Questo script viene utilizzato raramente, poiché RPM fa normalmente un buon lavoro di risanamento nella maggior parte degli ambienti di build.

h) Elenco dei file ~ è costituito da un elenco di file che costituiscono il pacchetto. Inoltre, una serie di macro possono essere usate per controllare gli attributi di file una volta installato, così come per indicare che i file sono la documentazione, e che contengono informazioni di configurazione. L’elenco dei file è molto importante.

Requisito *** RPM per l’ambiente di generazione ~

A] RPM richiede una serie di directory per eseguire la compilazione. Mentre posizioni le directory ‘e nomi possono essere cambiati. Layout predefinito è mostrato di seguito —

root @ arunsb: ~ # ls-l / usr / src / redhat /

drwxr-xr-x 2 root root 4096 25 agosto 2007 FONTI => contiene i sorgenti originali, patch, e file di icona
drwxr-xr-x 2 root root 4096 25 agosto 2007 SPECS => Contiene i file di specifica
drwxr-xr-x 2 root root 4096 25 agosto 2007 BUILD => Directory in cui le fonti sono imballata, e il software è stato costruito
drwxr-xr-x 8 root root 4096 28 maggio 2008 RPM => contiene il pacchetto binario di file creati dal processo di generazione
drwxr-xr-x 2 root root 4096 25 agosto 2007 SRPMS => Contiene il pacchetto sorgente dei file creati dal processo di generazione

root @ arunsb: ~ #

B] bisogno di esportare alcune variabili globali usate da RPM —

root @ arunsb: ~ # export RPM_BUILD_DIR =/usr/src/redhat/BUILD/
root @ arunsb: ~ # export RPM_SOURCE_DIR =/usr/src/redhat/SOURCES/

Step 1] Crea Specification (spec) File ~

root@arunsb:~# head -n 50  /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul

#RPM_BUILD_DIR    /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR    /usr/src/redhat/SOURCES/

%define MY_PREFIX    /usr/local/openlsm/

## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL

%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.

## Preparation Section-
%prep

rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}

## Build Section-
%build

cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make

## Install Section-
%install

cd ./openlsm-0.99-r45/
make install

## Files Section-
%files

/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#

* Come si crea l’elenco di file?

Creare l’elenco di file è un processo manuale. Quello che ho fatto è ho preso la lista dei file dal mio manuale directory prefix installato con comando find come mostrato di seguito …

root@arunsb:~# find /usr/local/openlsm/ -type f -or  -type d

Fase 2] Avvio Build ~

root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l  openlsm.spec
-rw-r–r– 1 root root 12938 Dec  2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#

root@arunsb:/usr/src/redhat/SPECS# rpmbuild   -ba  openlsm.spec

….
… ..

Controllo per il file non imballati (s): / usr / lib / rpm / check-file% buildroot ()
Ha scritto: / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
Ha scritto: / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root @ arunsb: / usr / src / redhat / SPECS # echo $?
0

root @ arunsb: / usr / src / redhat / SPECS # ls-l / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
-rw-r-r-1 root root 3206 2 dicembre 17:50 / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
root @ arunsb: / usr / src / redhat / SPECS # ls-l / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
-rw-r-r-1 root root 3052868 2 Dicembre 17:50 / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
root @ arunsb: / usr / src / redhat / SPECS #

* Fonte e il pacchetto binario creato!

** Vediamo cosa è successo in “/ usr / src / redhat / directory”

root @ arunsb: / usr / src / redhat # pwd
/ usr / src / redhat
root @ arunsb: / usr / src / redhat # ls
BUILD RPMS SOURCES SPECS SRPMS
root @ arunsb: / usr / src / redhat # ls BUILD /
openlsm-0.99-R45 <== Source estratto qui come parte di istruzioni per la compilazione da cioè la specifica del file “openlsm.spec”
root @ arunsb: / usr / src / redhat # ls FONTI /
openlsm-0.99-r45.tar.gz <openlsm == originale ‘-0.99-r45.tar.gz’ origine del file copiato da me
root @ arunsb: / usr / src / redhat # ls RPMS /
athlon i386 i486 i586 i686 noarch
root @ arunsb: / usr / src / redhat # ls RPMS/i386 /
openlsm-0.99-r45.i386.rpm <== pacchetto rpm binario creato!
root @ arunsb: / usr / src / redhat # ls SRPMS /
openlsm-0.99-r45.src.rpm <== pacchetto rpm Source creato!
root @ arunsb: / usr / src / redhat #

Fase 3] Ora installare il pacchetto e testarlo ~

root @ arunsb: / usr / src / redhat RPMS/i386/openlsm-0.99-r45.i386.rpm # cp / home / arunsb /

root @ arunsb: / usr / src / redhat # cd / arunsb / home /
root @ arunsb: ~ # ls
openlsm-0.99-r45.i386.rpm
root @ arunsb: ~ # rpm-ivh openlsm-0,99-r45.i386.rpm
Preparing … ########################################### [100%]
1: ########################################### openlsm [100%]
root @ arunsb: ~ # ls / usr / local / openlsm /
etc contrib bin includere script lib sbin var parti
root @ arunsb: ~ #

** Avvio del server openlsm ~

root @ arunsb: ~ # / usr / local / openlsm / contrib / openlsm-start redhat
* Server Admin partire openlsm: openlsm
. [OK]
root @ arunsb: ~ #
root @ arunsb: ~ # / usr / local / openlsm / contrib / openlsm status redhat
openlsm (pid 21607) è in esecuzione …
root @ arunsb: ~ #

root @ arunsb: ~ # rpm-q openlsm-0.99-R45
openlsm-0.99-R45
root @ arunsb: ~ #

root @ arunsb: ~ # rpm-openlsm ql-0.99-R45
..

root @ arunsb: ~ # rpm-openlsm QIV-0.99-R45
Nome: Relocations openlsm: (non trasferibile)
Version: 0.99 Vendor: IndianGNU.org & openlsm
Comunicato: R45 Build Date: mer 02 Dec 2009 05:50:54 CEST
Data di installazione: mer 02 Dec 2009 06:06:23 CEST Build Host: alongseveral-dr.eglbp.corp.yahoo.com
Group: System Environment / Daemons Source RPM: openlsm-0.99-r45.src.rpm
Dimensioni: 14877918 Licenza: GPL
Firma: (nessuno)
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Sintesi: openlsm Server Admin
Descrizione:
openlsm Server Admin è libero e open source web pannello di controllo a base di Linux, sistemi Unix.
root @ arunsb: ~ #

** NOTA ~ Questo articolo non contiene le informazioni su come definire le micro, come copiare documenti, pagine man per difetto posizione, come impostare la proprietà ecc permision e mi occuperò di questi temi nel prossimo articolo su RPM.

** Si prega di consultare l’articolo inglese ~ http://www.indiangnu.org/2009/how-to-create-or-build-rpm-package/

Saluti,
Arun Bagul

Encrypt your mails with GPG and Enigmail Thunderbird plugin

Encrypt your mails with GPG and Enigmail Thunderbird plugin

Introduction ~

GNU Privacy Guard (GnuPG or GPG) is open source/free software encryption and signing tool, alternative to the Pretty Good Privacy (PGP) suite of cryptographic software. Enigmail is an extension for Mozilla Thunderbird and other Mozilla applications. It provides public key e-mail encryption. Actual cryptographic functionality is handled by GNU Privacy Guard (GnuPG,GPG).

Step 1] Install Gnupg or GPG –

* Ubuntu/Debian ~

root@arun:~# apt-get  install gnupg  gnupg2

* Redhat/Fedora ~

root@arun:~# yum  install gnupg  gnupg2

Step 2] How to Install Enigmail ?

I assume that Mozilla Thunderbird is already installed on your system. To install  “Enigmail” follow following steps

a) Download “Enigmail” from  url “http://enigmail.mozdev.org/download/

Note ~ select OS and Thunderbird version properly.

b) In menu bar of the main Thunderbird window you will see “Tools”. Select this, and then “Add-ons” option. This will bring up a new window listing all of your Thunderbird plug-ins. In the lower left-hand corner of this new window you’ll see a button marked “Install”. Click this button. Tell  Thunderbird where you saved the Enigmail .XPI file. and just say “Install” that’s it!!

* Once ‘Enigmail’ is installed restart the Thunderbird. Then you will see “OpenPGP” tab in main menu of Thunderbird.

Step 3] Setup private/public key ~

Enigmail uses public key cryptography to ensure privacy between you and your correspondents. To generate the public/private keys, there is two methods either generate them with the help of “gpg” command line tool or use “enigmail”….

* We will generate private/public cryptographic keys with the help of “enigmail” as shown below….

a) Click on “OpenPGP” in the menu bar of the Thunderbird main window. Select “Key Management”.
b) In Enigmail Key Manager ~ click on “Generate” tab in the menu bar and select “New key pair”.
c) At the very top of the window you will see a combo box showing all of your email addresses. GnuPG will associate your new key with an email address.
Enigmail is just asking you which address you want to use for this key. Select whichever account will be receiving encrypted mail.

NOTE ~ We can use same keys for multiple accounts.

d) You can use passphrase or just check “No passphrase” checkbox to generate keys without passphrase.
e) Create  directory to save “Revocation Certificates”…

arunsb@arun:~$ mkdir /home/arunsb/.gpg_key/

f) Click on “Generate key” button to generate keys. done..

To share keys easily you can publish your keys with keyserver.

a) In “Key Management” window select your keys and then  click on ‘Keyserver’ tab in main menu and then click on “Upload Public Keys”
Note ~ make sure to check  “Display All Keys by Default” checkbox (to list all keys)

Step 4] Compose the mail and sign it ~

Compose the mail and tell Enigmail to sign it.  At the top of your Compose window you will see a button reading “OpenPGP”. Click on this. Make sure that the “Sign” option, and only that, is checked. Finally “Send” the mail! (You will be asked for your passphrase. Once you enter it, Enigmail will sign your email and send it if you have generate keys with passphrase else it will not ask)

/pgp_enigmail-compose

Enjoy!!

Regards,
Arun Bagul

GPGとEnigmailはThunderbirdのプラグインを使用して電子メールを暗号化する

GPGとEnigmailはThunderbirdのプラグインを使用して電子メールを暗号化する

はじめに〜

はGNU Privacy Guard(GnuPGのまたはGPG)をオープンソース/フリーソフトウェアの暗号化と署名ツールのPretty Good Privacy(PGP)の別の暗号化ソフトウェアのスイート。 EnigmailはMozilla Thunderbirdや他のMozillaアプリケーションの拡張機能です。これは公開鍵を電子メールの暗号化を提供します。実際の暗号化機能はGNU Privacy Guard(GnuPGは、GPGで)によって処理されます。

ステップ1]インストールのgnupgまたはGPG –

*リンクUbuntu / Debianで〜

ルート@ arunアルン:〜#のapt – gnupg2のgnupgをインストールする

* RedHatの/ Fedora〜

ルート@ arunアルン:〜#yumをgnupg2のgnupgをインストールする

ステップ2]のインストール方法Enigmailはですか?

私は、Mozilla Thunderbirdのシステム上にすでにインストールされているとします。 “Enigmailは”次の手順に従ってインストールするには

)ダウンロード”Enigmailは”URLから”http://enigmail.mozdev.org/download/”

注意してください〜選択OSおよびThunderbirdのバージョンが適切。

b)は、メインのThunderbirdのウィンドウのメニューバーには”を参照するツール”。これを選択し、”アドオン”オプションです。これは、新しいウィンドウがすべてThunderbirdのプラグインの一覧が表示されます。場合は、ボタンが表示されますこの新しいウィンドウの右上隅”マークの左下にインストール”。このボタンをクリック。 Thunderbirdを伝える場所。XPIファイルEnigmailは保存されます。ちょうど、”インストール”それだと言う!

*一度’Enigmailは’は、Thunderbirdを再起動インストールされます。次に、”ThunderbirdのメインメニューのOpenPGPの”タブが表示されます。

ステップ3]セットアップの秘密/公開鍵〜

Enigmailは、あなたとあなたの特派員との間のプライバシーを確保するため、公開鍵暗号を使用します。公共生成するために/秘密鍵は、どちらかのgpg”コマンドラインツール、または使用する”の助けを借りて”enigmailの”彼らを生成する2つの方法は…。

*私たちは、民間が生成されます/”としてのenigmail”の助けを借りて公開鍵暗号キーを以下のように…。

)をクリックしてOpenPGPの”上”は、Thunderbirdのメインウィンドウのメニューバーです。を選択し、”キー管理”。
メニューバーの生成”にEnigmailはキーマネージャでは2)〜”タブをクリックを選択して”新しいキーのペア”。
c)は、非常には、ウィンドウの上部にある場合は、コンボボックスに、すべてのメールアドレスが表示されます。 GnuPGの新しい鍵を電子メールアドレスが関連付けられます。
Enigmailは自分がこの鍵に使用するアドレスを求めています。選択していずれかアカウントを暗号化されたメールを受信されます。

注〜我々は複数のアカウントに対して同じキーを使用することができます。

d)貴殿はパスフレーズなしの鍵を生成したり、パスフレーズだけをチェック”いいえパスフレーズ”のチェックボックスを使用することができます。
メール)”失効証明書を保存する”ディレクトリを作成…

arunsb @ arunアルン:〜$ MkDir関数/ホーム/ arunsb / .gpg_key /

メス)をクリックして生成するキーの”ボタン”上のキーを生成します。 ..実行

簡単に鍵を使用してキーを発行することができますキーを共有してください。

)”で買うの管理”ウィンドウをクリックし、”アップロードする公開鍵”をクリックして、メインメニューの鍵サーバー]タブの[‘をクリックして、鍵を選択
注意してください〜”デフォルト”チェックボックスで表示するすべてのキーを確認してください()すべてのキーをリストにする

ステップ4]のメールを作成し、これに署名〜

メールを作成し、Enigmailはこれに署名するように言う。あなたのメール作成ウィンドウの上部には”ボタンを読み取り表示されます。OpenPGPの”。これをクリックします。ことを確認し、”サイン”オプションのみが、チェックされます。最後に””メールを送る! (ご自分のパスフレーズを要求されます。一度入力すると、Enigmailは電子メールに署名して送信する場合にキーを生成しているそうでなければ要求されません)フレーズ
/ pgp_enigmail -構成

をお楽しみください!

よろしく、
Arun Bagul

Cryptez vos mails avec GPG et Enigmail plugin Thunderbird

Cryptez vos mails avec GPG et Enigmail plugin Thunderbird

Introduction ~

GNU Privacy Guard (GnuPG ou GPG) est open source / logiciel libre de cryptage et un outil de signature, alternative à la Pretty Good Privacy (PGP) La suite de logiciels de cryptographie. Enigmail est une extension pour Mozilla Thunderbird et d’autres applications Mozilla. Elle fournit la clé publique de chiffrement des e-mail. Fonctionnalité cryptographique est gérée par GNU Privacy Guard (GnuPG ou GPG).

Step 1] Installer GnuPG ou GPG —

* Ubuntu / Debian ~

root @ Arun: ~ # apt-get install gnupg gnupg2

* Redhat / Fedora ~

root @ Arun: ~ # yum install gnupg gnupg2

Etape 2] Comment faire pour installer Enigmail?

Je suppose que Mozilla Thunderbird est déjà installé sur votre système. Pour installer “Enigmail” suivre les étapes suivantes

a) Télécharger “Enigmail” de l’URL »http://enigmail.mozdev.org/download/”

Note ~ OS sélectionner et de Thunderbird version correctement.

b) Dans la barre de menu de la fenêtre principale de Thunderbird vous pourrez voir «Outils». Sélectionnez cette option, puis «Add-ons” option. Ceci ouvrira une nouvelle fenêtre répertoriant tous vos plug-ins Thunderbird. Dans le coin inférieur main de cette nouvelle fenêtre vous verrez un bouton “Installer”. Cliquez sur ce bouton. Dites Thunderbird où vous avez enregistré le Enigmail. Fichier XPI. et dire simplement “Installer” that’s it!!

* Once “Enigmail est installé redémarrer le Thunderbird. Ensuite, vous verrez “OpenPGP onglet” dans le menu principal de Thunderbird.

Etape 3] Configuration privée / clé publique ~

Enigmail utilise la cryptographie à clé publique pour assurer l’intimité entre vous et vos correspondants. Pour générer les Clés publiques / privées, il ya deux méthodes, soit les créer avec l’aide de “gpg” outil de ligne de commande ou utilisez “Enigmail” ….

* Nous produirons privé / public des clés cryptographiques, avec l’aide de «Enigmail», comme indiqué ci-dessous ….

a) Cliquez sur “OpenPGP” dans la barre de menus de la fenêtre principale de Thunderbird. Sélectionnez “Key Management”.
b) Dans Enigmail Key Manager ~ cliquez sur “Générer” onglet dans la barre de menu et sélectionnez “Nouveau paire de clés».
c) Tout en haut de la fenêtre vous verrez une zone de liste déroulante affichant toutes vos adresses e-mail. GnuPG sera associer votre nouvelle clé avec une adresse email.
Enigmail vous demande simplement de quelle adresse vous souhaitez utiliser pour cette clé. Choisir celles qui compte sera de recevoir du courrier crypté.

REMARQUE ~ Nous pouvons utiliser les mêmes touches pour plusieurs comptes.

d) Vous pouvez utiliser une phrase secrète ou il suffit de cocher “Pas de mot de passe” dans la case pour générer des clés sans passphrase.
e) Créer le répertoire pour sauver “La révocation des certificats” …

arunsb arun @: ~ $ mkdir / home / arunsb / .gpg_key /

f) Cliquez sur “Générer clé” pour générer des clés. c’est fait ..

Pour partager facilement les touches, vous pouvez publier vos clés avec serveur de clés.

a) Dans “Key Management” fenêtre Sélectionner vos clés, puis cliquez sur l’onglet ‘serveur de clés “dans le menu principal, puis cliquez sur” Upload clés publiques ”
Note ~ veillez à cocher «Afficher toutes les touches par défaut” case à cocher (à la liste de toutes les touches)

Étape 4] Composez le courrier et signer ~

Composez le mail et dites-Enigmail à le signer. En haut de votre fenêtre de composition, vous verrez un bouton de lecture “OpenPGP”. Cliquez sur cette question. Assurez-vous que le “Sign” option, et seulement cela, est cochée. Enfin “Envoyer” le courrier! (Vous serez invité à fournir votre mot de passe. Une fois que vous y entrer, Enigmail signerez votre e-mail et envoyez-le si vous avez générer des clés avec passphrase sinon il ne sera pas demander)
/ pgp_enigmail-composer

Enjoy!

Observe,
Arun Bagul

Шифрование письма с ООБ и Thunderbird Enigmail плагина

Шифрование письма с ООБ и Thunderbird Enigmail плагина

Введение ~

GNU Privacy Guard (GPG или GnuPG) является открытым исходным кодом и свободного программного обеспечения для шифрования и подписания инструментом, альтернативным Pretty Good Privacy (PGP) Люкс криптографического программного обеспечения. Enigmail это расширение для Mozilla Thunderbird и Mozilla другими приложениями. Он предоставляет открытый ключ для шифрования электронной почты. Солнце криптографические функции обрабатывается GNU Privacy Guard (GnuPG, GPG).

Шаг 1] Установка Gnupg или GPG —

* Ubuntu / Debian ~

Root @ Arun: ~ # Apt-Get установке GnuPG gnupg2

* RedHat / Fedora ~

Root @ Arun: ~ # Yum установке GnuPG gnupg2

Шаг 2] Как установить Enigmail?

Я предполагаю, что Mozilla Thunderbird уже установлены на вашей системе. Для установки “Enigmail” следуют следующие шаги

а) Скачать “Enigmail” из URL “http://enigmail.mozdev.org/download/”

Примечание ~ выберите ОС и Thunderbird версии правильно.

б) в строке меню главного окна Thunderbird вы увидите “Сервис”. Выберите нужный, а затем “Дополнения” вариант. После этого появится новое окно со списком всех ваших Thunderbird Plug-INS. В левом нижнем углу этого нового окна вы увидите кнопку “Установить”. Нажмите на эту кнопку. Thunderbird Расскажите, где вы сохранили Enigmail. XPI файла. и просто сказать: “Установить” Вот и все!

* Как только ‘Enigmail’ установлен перезапустите Thunderbird. Тогда вы увидите “OpenPGP вкладку” в главном меню Thunderbird.

Шаг 3] Установка частного / общественного ключевые ~

Enigmail использует открытый ключ шифрования для обеспечения конфиденциальности между вами и вашим корреспондентам. Для формирования государственных / частных ключей, есть два способа, либо создают их с помощью “GPG команда” Инструмент линии или использовать “Enigmail” ….

* Мы можем генерировать частного / общественного криптографических ключей с помощью “Enigmail”, как показано ниже ….

а) Нажмите на “OpenPGP” в строке меню в главном окне Thunderbird. Выберите “Управление ключами”.
б) в Enigmail Key Manager ~ нажмите кнопку “Создать вкладку” в строке меню и выберите пункт “Новая пара ключей”.
с) В самой верхней части окна вы увидите список с указанием всех ваших адресов электронной почты. GnuPG будет ассоциировать ваш новый ключ с адресом электронной почты.
Enigmail просто прошу вас адреса которых вы хотите использовать для этого ключа. Выберите зависимости от того, внимание будет получать зашифрованные почты.

ПРИМЕЧАНИЕ ~ Мы можем использовать те же ключи для нескольких аккаунтов.

д) Вы можете использовать фразу или просто проверить “флажок Нет пароля”, чтобы генерировать ключи без пароля.
е) создать каталог для сохранения “Отзыв сертификатов” …

arunsb @ Арун: ~ $ MKDIR / Home / arunsb / .gpg_key /

е) нажмите на “Генерировать ключ” кнопку, чтобы генерировать ключи. сделали ..

Для совместного ключа легко вы можете публиковать свои ключи с помощью ключей.

а) В “Управление ключами” окне выберите ваши ключи и затем нажмите на вкладку “Keyserver” в главном меню и нажмите кнопку “Загрузить общественной Ключи”
Примечание ~ убедитесь, что флажок “Показать все ключи по умолчанию” флажок (чтобы получить список всех ключей)

Шаг 4] Собрать почте и подписать его ~

Собрать почте и сообщить Enigmail подписать его. В верхней части окна вы увидите кнопку с надписью “OpenPGP”. Щелкните по ней. Убедитесь, что опция “Знамение”, и только что, не проверяется. И наконец “Отправить” сообщение! (Вам необходимо ввести ключевую фразу. После ввода его, Enigmail подпишет ваш адрес электронной почты и отправить его, если у вас есть генерировать ключи с фразу иначе она не будет спрашивать)
/ pgp_enigmail-составить

Наслаждайтесь!

Привет,
Арун Bagul

Criptografar seus e-mails com BPM e plugin Enigmail Thunderbird

Criptografar seus e-mails com BPM e plugin Enigmail Thunderbird

Introdução ~

GNU Privacy Guard (GnuPG ou GPG) é open source / software livre de criptografia e uma ferramenta de assinatura, alternativa para o Pretty Good Privacy (PGP) suite de software criptográfico. Enigmail é uma extensão para o Mozilla Thunderbird e outras aplicações do Mozilla. Ele fornece a chave pública de criptografia de e-mail. Funcionalidade criptográfica real é tratado pelo GNU Privacy Guard (GnuPG, GPG).

Passo 1] Instalar o GnuPG ou GPG —

* Ubuntu / Debian ~

root @ Arun: ~ # apt-get install gnupg gnupg2

* Redhat / Fedora ~

root @ Arun: ~ # yum install gnupg gnupg2

Etapa 2] Como instalar o Enigmail?

Presumo que o Mozilla Thunderbird já está instalado em seu sistema. Para instalar o “Enigmail” siga os seguintes passos

a) Enigmail “Download” de url “http://enigmail.mozdev.org/download/”

Note ~ OS e selecione a versão do Thunderbird corretamente.

b) Na barra de menus da janela principal do Thunderbird você vai ver em “Ferramentas”. Selecione esta, e depois em “Add-ons” opção. Isso fará com que uma nova janela listagem de todos os plug-ins de Thunderbird. Na parte inferior do canto esquerdo da nova janela, você verá um botão “Install”. Clique neste botão. Diga Thunderbird onde você salvou o Enigmail. Arquivo XPI. e apenas dizer “Install” that’s it!

* Assim ‘Enigmail’ está instalado, reinicie o Thunderbird. Então você vai ver “OpenPGP tab” no menu principal do Thunderbird.

Etapa 3] Instalação de chave privada / pública ~

Enigmail usa criptografia de chave pública para garantir a privacidade entre você e seus correspondentes. Para gerar as chaves pública / privada, há dois métodos ou gerá-los com a ajuda de “gpg ferramenta de linha de comando” ou “utilização enigmail” ….

* Vamos gerar público / privado de chaves criptográficas com a ajuda de “enigmail”, conforme mostrado abaixo ….

a) Clique em “OpenPGP” na barra de menus da janela principal do Thunderbird. Selecione “Gerenciamento de Chaves”.
b) No Enigmail ~ Key Manager, clique em “gerar guia” na barra de menu e selecione “Novo par de chaves”.
c) No topo da janela, você verá uma caixa de combinação que mostra todos os seus endereços de e-mail. GnuPG irá associar a sua chave de novo com um endereço de email.
Enigmail é só pedir-lhe qual endereço você deseja usar para essa chave. Escolha o que conta será receber e-mails criptografados.

NOTA ~ Nós podemos usar as mesmas teclas para múltiplas contas.

d) Você pode usar senha ou apenas verificar “No passphrase” checkbox para gerar chaves sem senha.
e) Criar o diretório para salvar “Revogação Certificados” …

arunsb @ arun: ~ $ mkdir / home / arunsb .gpg_key / /

f) Clique no botão “Gerar” para gerar as chaves. feito ..

Para chaves partes facilmente você pode publicar suas chaves com chaves.

a) Em “Gestão da janela”, selecione as chaves e, em seguida, clique na guia “Keyserver ‘no menu principal e clique em” Enviar “Chaves Públicas”
Nota ~ se esqueça de verificar “Mostrar Todas as chaves por padrão caixa de seleção” (para listar todas as chaves)

Etapa 4] Compor o e-mail e assiná-lo ~

Compor o e-mail e diga-Enigmail para assiná-lo. No topo da janela do Compose você vai ver um botão de leitura “OpenPGP”. Clique sobre esta matéria. Certifique-se que o “Sign” opção, e só isso, está marcada. Finalmente “Enviar” e-mail! (Você será solicitado para sua senha. Uma vez que você entrar, Enigmail irá assinar o seu e-mail e enviá-lo se você tiver gerar chaves com senha senão ele não vai perguntar)
/ pgp_enigmail-compose

Aproveite!

Atenciosamente,
Arun Bagul