Excellent RPM - production articles (below)

xiaoxiao2021-03-06  53

Production articles (below)

To make a software package in the RPM format, you need to use the following command format:

RPM-BX [Production Option 1 Production Option 2 ...] Description file 1 Description file 2 ... Note: -bx can be replaced with -tx, the effect is different: When using -b, you need to specify a package on the command line. Description File; When using -t, you need to specify the package description file on the command line, but a parcel file containing the TAR format of this description file (must be compressed with GZIP), RPM is ready to make a package, The description file is automatically extracted from this package file, and the software package in the RPM format is generated according to the package instructions. Note: This description must have a .spec as a suffix, where there must be a source domain, and this domain defined source sequence package must be stored in the current directory, otherwise, RPM will report an error to exit. Note that when -bx is X, take different values, RPM will perform different operations: (The following examples operate on LZE's description file LZE-6.0-2.SPEC, and some passed pipe technology Use the NL command to add a line number to the output to explain) 1) X = P, indicating the Script program of the pre-processing segment (% preip) in the description file in the description file. This scripker is typically used to decompress the source package, and patch the source program and upgrade the source program.

# rpm-bplze-6.0-2.spec2> & 1 | NL1EXECUTING:% Prep2 UMASK0223 CD / USR / SRC / DIST / BUILD4 Echo 'Pre-Processing Script Program (PREP) Start Perform' 5 Preprocessing Scripts (PREP) Start 6 CD / USR / SRC / DIST / Build7 RM-RFLZE-6.08 / bin / Gzip-DC / USR / SRC / DIST / SOURCES / LZE-6.0-2.SRC.TGZ9 TAR-XVVF-10DRWXR -XR-XROOT / ROOT02001-11-0216: 02Lze-6.0 / 11-rw ------- root / root2462262001-11-0216: 00Lze-6.0 / lze.c12-rw ------ ROOT /Root982492001-11-0216:00Lze-6.0/lzeime.wb.c13-rw -------Root/root3399022001-11-0216:00Lze-6.0/lzeime.py.c14-rw-r--r-R- -root / root12832001-11-0216: 00Lze-6.0 / funkey.def15-rwxr - r - root / root2502001-11-0216: 00Lze-6.0 / inputme.def16-rw-r - r - root / root8132742001 -11-0216: 00Lze-6.0 / wbzc.dat17-rw ------- root / root4742001-11-0216: 02lze-6.0 / makefile18 status = 019 "['0-ne0'] '20 CDLZE-6.021 / usr / bin / ID-U22 '[0 = 0'] '23 / bin / chown-rhfroot.24 / usr / bin / id-u25 ' ['0 = 0'] '26 / bin / chgrp-rhfroot.27 / bin / chmod-RFA RX, GW, OW.28 EXIT0 # Note: "Executing:% Prep" displayed in this example "Executing:% preted" indicates that the RPM starts execution The script program for processing segments. In the case of the line number, the lines starting with the plug-in ( ) are instructions for the preparation segment script, and the other content executes the result of the output. From the instructions executed by the preprocessing segment script, we can see what rPM is doing: Line 2: Settings file creation mask; line 3: Go to RPM default compilation directory; line 4: Back Character Strings, this is the beginning of the preparational segment script written by the user, and the second, third lines are the increased instructions of RPM; line 6-27: The command expanded to% Setup and its execution results, which can See the RPM with the gzip command to extract the Lze source sequence (8th line), and use the tar command to expand the source package (line 9). Row 28: Normal exiting, return value is 0.2) X = L, indicating whether the RPM check file segment (% files) is to see if the files are present. If there is no existence, the RPM will report an error exit.

# RPM-BL-VVLZE-6.0-2.SPEC | NL1PROCESSINGFILES: LZE2D: FILE0: 0100644Root.Root / etc / funkey.def3d: file1: 0100644Root.root / etc / infutme.def4d: file2: 0100644Root.root / usr / doc /LZE-6.0-2/Readme5filenotfound:/USR/doc/lze-6.0-2/license6d:file3:01005555555555555555555555555555555555551ROOT.ROT /USR/BIN/LZEIME.PY8D: FILE5: 0100511Root.Root / USR / BIN / LZEIME.WB9D: FILE6: 01006444Root.Root / etc / wbzc.dat10Proot / etc / wbzc.dat10proot / etc / wbzc.dat10prero: / bin / sh12requires: / bin / sh # Note: General Options in this command -vv To output the debug information (line numbers and d: starting lines) with the output RPM check. As seen from the above, RPM checks one by one by all files in the file segment, and the file is found, the owner and the associate information, and the result is found that /usr/doc/lze-6.0-2.license file does not exist, so File Not Found (see Chapter 5). RPM also shows the function (provvice) that describes the functionality provided by the description file request Lze after checking the file. 3) When X = C, the RPM indicates that the pre-processing segment (% preip), the compiler (% build) script is executed. The script program of the compilation section is used to compile the source program of the connection software, generate an executable, usually a MAKE command is sufficient. Because a programmer with good habits will write makefile (program maintenance files) so that other programmers compile this software. If a software does not maintain a file, the user either writes Makefile, or write the software compiles and connects to the connection in the compile section. 4) When x = i, the RPM indicates that the pre-processing segment (% preip), the compilation section (% build), and the installation segment (% install) script. The task of the installation segment script is to copy the execution program that is compiled into the appropriate directory (such as / bin, / usr / bin) to package or execute. The instructions it usually execute are make install. 5) When x = b, indicating that the RPM sequentially performs the preprocessing segment (% preip), the script, the installation section (% install) script, and then according to the file segment (% FILES) list, File packaging, generate RPM execution package, and finally perform the cleaning segment (% Clean).

# rpm-bblze-6.0-2.spec2> & 1 | NL1EXECUTING:% Prep2 UMASK0223 CD / USR / SRC / DIST / BUILD4 ECHO 'Prerequisite Script Program (PREP) Start Perform' 5 Preprocessing Scripts (PREP) Start executing 6 CD / USR / SRC / DIST / BUILD7 RM-RFLZE-6.08 TAR-XVVF-9 / BIN / GZIP-DC / USR / SRC / DIST / SOURCES / LZE-6.0-2.SRC.TGZ10DRWXR -XR-XROOT / ROOT02001-11-0217: 04Lze-6.0 / 11-rw ------ Root / root2462262001-11-0216: 00Lze-6.0 / Lze.c12-rw ------ ROOT /Root982492001-11-0216:00Lze-6.0/lzeime.wb.c13-rw -------Root/root3399022001-11-0216:00Lze-6.0/lzeime.py.c14-rw-r--r-R- -root / root12832001-11-0216: 00Lze-6.0 / funkey.def15-rwxr - r - root / root2502001-11-0216: 00Lze-6.0 / inputme.def16-rw-r - r - root / root8132742001 -11-0216: 00Lze-6.0 / wbzc.dat17-rw ------- root / root4742001-11-0216: 02lze-6.0 / makefile18-RW-R - r - root / root12552001-11-0217 : 04LZE-6.0 / GetInputme.c19 status = 020 '[' 0-NE0 ']' 21 CDLZE-6.022 / usr / bin / id-u23 '[' 0 = 0 ']' 24 / bin / Chinese-rhfroot.25 /usr/bin/id-u26 ['0=0']'27 /bin/chgrp-rhfroot.28 /bin/chmod-rfa RX, GW ,ow.29 EXIT030EXECUTING:% Build31 Umask02232 CD / USR / SRC / DIST / Build33 CDLZE-6.034 Echo 'Compile Connection Script Program (Build) Started 35 Compilation Connection Script Program (Build) Start Perform 36 Make37cc-Fwritable-Strings-Duse_AS_LZE-DFOR_LINUX-SI / USR / ZZZ / SRC / ILZE_LZE_INPUTME-OLZE / USR / ZZZ / SRC / Li-38BSRC / MyCurses.clze. CGetinputme.c / usr / zzz / src / my.a39cc-dfor_linux-si / usr / zzz / src / include-ilzeime.wbGetinputme.clzeime.wb.c / usr / zzz / src / my.a40lzeime.wb.c: Infunction`do_service ': 41lzeime.wb.c: 1409: warning: passingarg5of`bsearch'fromincompatiblepointertype42cc-DFOR_LINUX-sI / usr / zzz / src / include-olzeime.pygetinputme.clzeime.py.c / usr / zzz / src / my .a43 exit044EXECUTING:% INSTALL45 UMASK02246

cd / usr / src / dist / BUILD47 cdlze-6.048 echo 'installation script (the install) '49 begin the installation script (the install) started 50 makeinstall51installing ... 52done53 exit054Processingfiles: lze55FindingProvides: (using / usr /LIB/rpm/find-provides: (using/usr/lib/rpm/find-requires): Luze-edit58prereq:/bin/sh59requires :/bin/shld-linux.so. 2Libc.SO.6LIBC.SO.6 (Glibc_2.0) Libc.SO.6 (Glibc_2.1) 60wrote: /usr/src/dist/rpms/i386/lze-6.0-2.i386.rpm61executing:% Clean62 UMASK02263 CD / USR / SRC / DIST / BUILD64 CDLZE-6.065 ECHO 'After the completion of the package, the Clean Script is started to perform the '66 built package After the cleaning script (Clean) starts to perform 67 exit0 # Note: In this example, each line is explained as follows: Chapter 1: Display RPM Start Performing Pre-Processing Section (% PREP); line 2-29: For the command and results executed by the pretreatment segment (% preip) script, there is an addition No. ( ), the result is not. Pre-processing completed the decompression (Gzip-DC) of the LZE source package (TAR-XVF), thus laying the foundation for the compilation of the source program; 20 lines: rpm indicates that the compilation segment is started (% build) ;. 31-43: Commands and results executed for the compilation section (% build) script program. The Make maintenance command executed by the script, which executes the CC compiler to compile and connect to the LZE software; 44th line: RPM indicates that the installation segment (% install); 45-53 line: is the installation section (% install ) The commands and results executed by the scripter. This program executes the MakeInstall command, copy files such as Lze to the system directory; section 54: RPM display: Start processing LZE file (content for% Files file); 155-59 line: rpm Use the / usr / lib / rpm / find-provides to find the functions provided by Lze, and use / usr / lib / rpm / find-request to find the functions dependent on Lze to set the dependencies of LZE; 20th line: production Complete the LZE execution package, the file name is LZE-6.0-2.i386.rpm, under / usr / src / DIST / RPMS / I386 directory; 61 line: RPM display: Start execution of the cleaning segment (% Clean) script This section is used to clean up temporary files; lines 62-67: commands and results executed for the cleaning segment (% clean) script program. From the top floor, we can clearly see the workflow of the RPM production package: preprocessing sections, compilation segments, installation sections, software package production, and cleaning segments. 6) When x = s, the RPM is indicated to establish a source package. The contents of the RPM source package include a few items such as package description file (SPEC), software source, software patches, icon files. Creating a source package does not require each function segment in a package description file, just in the package you need to include it in the package.

# rpm-bslze-6.0-2.specwrote: /usr/src/dist/srpms/lze-6.0-2.src.rpm#rpm-qplv/usr/src/dist/srpms/lze-6.0-2.src. RPM-RW ------- Rootroot2067111, 2015: 44Lze-6.0-2.SPEC-RW-R - R - Rootroot538706111, 2007: 05lze-6.0-2.src.tgz # Note: In this example, Use the RPM-BS command to generate a LZE source package LZE-6.0-2.Src.rpm (under the RPM Standard Source Catalog / USR / SRC / DIST / SRPMS), then use the rpm -qplv command to query the file contained in the source package Information, you can see two files in the LZE source package: one is the package description file Lze-6.0-2.spec, one is the LZE source package LZE-6.0-2.SRC.TGZ (TAR packaging and use GZIP Compressed), this file is determined by the Source domain in the description file. 7) When X = A, the indication RPM sequentially executes the pre-processing segment (% preip), the compilation segment (% build), the installation section (% INSTALL) script, after which is a RPM source package, and then according to the file segment (% Files) ) File list, package the file, generate the RPM execution package, and finally perform the cleaning segment (% Clean) script, clear the intermediate file. The results executed by this command are equivalent to executing the RPM-BS command generation source package, and then execute the RPM-BB command to generate the execution package. Option List Option Description Universal Options Explanation See << Excellent RPM 2 - Installation Articles >> This article is not described later. 1 .-- short-circuit: The purpose of single-step execution this option is to single-step execution function, only the user is RPM-BC (or -TC) and -bi (or -ti). When using the RPM-BC-Short-Circuit command, RPM will no longer perform the script program of the pre-processing segment (% preP), directly execute the script program of the Compile Segment (% Build). When using the RPM-BI-Short-Circuit command, RPM will no longer perform the script program of the Pre-Processing Segment (% PreP) and Compile Section (% Build), and only the installation segment (% install) script. Why use this option? It may be a problem with the file in the source package, resulting in such an error in the compilation or installation process, if it is unable to execute, these errors cannot be excluded. After single-step execution, the user can enter the directory where the source program is located, see the source program, modify the error, and then use the tar command to generate a correct source program package, override the original package. In this way, there will be no problem when RPM is again. 2 .-- TimeCheck: Setting the time check value This option is: - TimeCheck

Note:

For the time period of the inspection, the unit is second, such as the time segment of TimeCheck600 settings for 600 seconds, 10 minutes.

Setting the time check value for verifying whether the package file is a new file generated within the specified time period. The error is caused. This error may be due to the makefile or the installation segment script in the description file is not written incorrectly, so that a program cannot be properly installed to the specified directory, so the RPM is always quoted when the old program file is always referenced. Such as follows:

# Rpm-bl - timecheck600lze-6.0-2.specProcessingfiles: lzewarning: TIMECHECKfailure: / usr / bin / lzeFindingProvides: (using / usr / lib / rpm / find-provides) ... FindingRequires: (using / usr / lib / RPM / Find-Requires ... provides: Lze-editprequ: / bin / shrequires: /bin/shld-linux.so.2libc.so.6libc.so.s 6 (glibc_2.0) libc.so.6 (Glibc_2 .1)#

Note: This example uses the RPM check file list, see which file is the old file generated before 10 minutes, and the result rpm issues a warning message: "Warning: timecheckfailure: / usr / bin / lze", this shows file / usr / bin / LZE Time Check an error, this is an old file. After investigation, it is Makefile problem, there is a "CPLZE / USR / BIN". After the correction, the connection program is compiled again, and there is no such problem for time check. 3 .-- Buildroot: Setting up the root directory

The usage of this option is:

--buildroot

Note:

The root directory used for the user specified by the user.

This option is equivalent to the file header of the package description file:

BuildRoot:

Just set to set more freely in the command line.

By setting the root directory for the construction package, the general user can also establish the RPM package that only the superuser (root) can be established. The LZE package is established by the normal user ZZZ as an example, indicating the establishment of this form of package.

1) Establish the directory used by the RPM buck under User ZZZ's Home Catalog (/ USR / ZZZ):

$ CD / USR / ZZZ $ MKDIR-PRPM / {Build, RPMS / I386, Sources, Specs, Srpms} $

2) Copy Description File LZE-6.0-2.SPEC to the RPM / SPECS directory, copy source package Lze-6.0-2.src.tgz to the RPM / Sources directory.

$ CD / USR / ZZZ $ CP / ROOT / LZE-6.0-2.SPECRPM / SPECS $ CP / ROOT / LZE-6.0-2.SRC.TGZRPM / SOURCES $

3) Establish a .rpmmacros file, edit it:

$ CD / USR / ZZZ $ VI.RPMMCROS Add a line in this file:

% _TOPDIR / USR / ZZZ / RPM

The top-level directory for determining the RPM buck is / USR / ZZZ / RPM.

4) Go to the description file directory, edit the script that modifies the LZE-6.0-2.SPEC installation segment:

$ CD / USR / ZZZ / RPM / SPECS $ VILZE-6.0-2.SPEC $

The top-level directory for determining the RPM buck is / USR / ZZZ / RPM.

The installation segment script is modified to: (the original make command is commented)

% Installecho "installation script (install) started" # makeinstallmkdir-p $ RPM_BUILD_ROOT / usr / binmkdir-p $ RPM_BUILD_ROOT / etcmkdir-p $ RPM_BUILD_ROOT / usr / doc / lze-6.0cplzelzeime.wblzeime.py $ RPM_BUILD_ROOT / usr / Bincpinputme.deffunkey.defwbzc.dat $ rpm_build_root / etccp / usr / doc / lze-6.0 / * $ rpm_build_root / usr / doc / lze-6.0

Note: In the script, use the buffet of the root of the root directory RPM_BUILD_ROOT, and then create several subdirectory (USR / BIN, ETC, USR / DOC / LZE-6.0) in the buck, and then copy programs or files. To the corresponding subdirectory, it is completed. 5) Select the --buildroot option, execute the RPM buck command:

$ CD / USR / ZZZ / RPM / SPECS $ RPM-BB - Buildroot / USR / ZZZ / TMPLZE-6.0-2.SpecexecUsing:% Prep Umask022 CD / USR / ZZZ / RPM / Build Echo 'pre-processing script Program (PREP) start executing the 'Pre-pre-processing Script Program (PREP) to start execution CD / USR / ZZZ / RPM / Build RM-RFLZE-6.0 / bin / gzip-DC / USR / ZZZ / RPM / SOURCES / LZE- 6.0-2.src.tgz TAR-XVVF-DRWXR-XR-XROOT / ROOT02001-11-0217: 04LZE-6.0 / -RW ------ Root / Root2462262001-11-0216: 00Lze-6.0 / Lze .c-rw ------- root / root982492001-11-0216: 00Lze-6.0 / lzeime.wb.c-rw ------ Root / root3399022001-11-0216: 00Lze-6.0 / lzeime .py.c-rw-r - r - root / root12832001-11-0216: 00Lze-6.0 / funkey.def-rwxr - r - root / root2502001-11-0216: 00Lze-6.0 / inputme.def -rw-r - r - root / root8132742001-11-0216: 00Lze-6.0 / wbzc.dat-rw ------ Root / root4742001-11-0216: 02lze-6.0 / makefile-rw-r --R - root / root12552001-11-0217: 04Lze-6.0 / getinputme.c status = 0 '[' 0-ne0 ']' cdlze-6.0 / usr / bin / ID-u '[ '500 = 0'] ' / usr / bin / id-u ' ['500 = 0'] ' / bin / chmod-RFA RX, GW, OW. EXIT0EXECUTING:% Build Umask022 CD / USR / ZZZ / RPM / BUILD CDLZE-6.0 Echo 'Compile Connection Script Program (Build) Start Perform' Compile Connection Script Program (Build) Start Perform Makecc-Fwritable-Strings-Duse_AS_Lze-DFOR_ Linux-Si / USR / ZZZ / SRC / INCLUDE-DFOR_LZE_INPUTME-OLZE / USR / ZZ / SRC / LIBSRC / MyCURS.Clze.cgetinputme.c / usr / zzz / src / my.acc-dfor_linux-Si / USR / ZZZ / src / include-olzeime.wbgetinputme.clzeime.wb.c / usr / zzz / src / my.alzeime.wb.c: Infunction`do_service ': lzeime.wb.c: 1409: warning: passingarg5of`bsearch'fromincompatiblepointertypecc-DFOR_LINUX -si / usr / zzz / src / include-ipeime.pygetinputme.clzeime.py.c / usr / zzz / src / my.a exit0executing:% Install UMASK022 CD / USR / ZZ / RPM / Build CDLZE- 6.0 Echo 'Installation Script Program (INSTALL) Start executing the' Installer (INSTALL) to start execution

MKDIR-P / USR / ZZZ / TMP / USR / BIN MKDIR-P / USR / ZZZ / TMP / ETC MKDIR-P / USR / ZZ / TMP / USR / DOC / LZE-6.0 CPLZELZEIME.WBLZEIME.PY / USR / ZZZ / TMP / USR / BIN CPINPUTME.DEFFUNKEY.DEFWBZC.DAT / USR / ZZZ / TMP / ETC CP / USR / DOC / LZE-6.0 / License / USR / DOC / LZE-6.0 / ReadMe / USR / ZZZ / TMP / USR / DOC / LZE-6.0 EXIT0PROCESSINGFILES: LZEFINDPROVIDES: (using / usr / lib / rpm / find-provides) ... FindingRequires: (using / usr / lib / rpm / find-required) ... Provides: lze-editprereq: / bin / shrequires: /bin/shld-linux.so.2libc.so.6libc.SO.6 (Glibc_2.0) Libc.SO.6 (Glibc_2.1) Wrote: / usr / zzz /rpm/rpms/i386/lze-6.0-2.i386.rpmexecuting:%% lean umsk0222222222222222222222222222222222222222222222222222222222222222222222222222222222 cdlzezz/rpm/Build CDLZE-6.0 Echo 'The cleaning script (Clean) start execution 'After the package, the Clean Script is started to execute exit0 $ Note: After the RPM buck is successful, it generates /usr/zzz/rpm/rpms/i386/lze-6.0-2.i386.rpm package file, pass RM's query command, we can know that the package is unless the package built by superuser:

$ rpm-qPLV / USR / ZZZ / RPM / RPMS / I386 / LZE-6.0-2.i386.rpm-rw-r - r - rootroot128311909: 24 / etc / funkey.def-rwxr-xr-xrootrootRoot25011 Month 609: 24 / ETC / Inputme.def-RW-R - R - Rootroot81327411909: 24 / ETC / WBZC.DAT-RWXR-XR-XRootroot40863217 月 609: 24 / USR / BIN / LZE-RWXR-XR -XROOTROOT829201909: 24 / usr / bin / lzeime.py-rwxr-xr-xrootroot385681199169: 24 / usr / bin / lzeime.wb-rw-r - r - rootroot121511, 2009: 24 / usr / doc /LZE-6.0/LICENSE-RW-R--R - ROOTROOT369017 月 609: 24 / USR / DOC / LZE-6.0 / ReadME $

Now we can say that ordinary users can also freely build various forms of RPM packages!

4. - Target: Set the target platform

This option is: - Target System - Platform - Operating System

Note: The default system produced by RPM is i386, the platform is PC, the operating system is Linux. If the user wants to change, you need to use this option to confirm, as in the following example:

# rpm-bb - Targeti686-PC-Solaris - Quietlze-6.0-2.spec Create a target platform: i686-PC-Solaris is creating a goal: i686-pc-solaris #

This example sets the target platform for the generated RPM package to: i686-PC-Solaris (ie, the system is I686, the platform is PC, the operating system is Solaris). Note: You must create a subdirectory of one I686 in the / usr / src / dist / rpms directory, no subdirectory of the system, RPM will not generate a package. We can query the generated package to see what the system and operating system is:

# rpm-qp - qf "Archis% {Arch} nosis% {OS} n" /usr/src/dist/rpms/i686/lze-6.0-2.i686.rpmarchisi686osissolaris# can be seen from the output, its system And the operating system is exactly what we set.

5 .-- quiet: minimize information output

The purpose of this option is to let RPM reduce the output of information. After using this option, if there is no error, RPM does not output excess information, and the RPM is also comparable to "Quiet).

$ rpm-bl - quietlze-6.0-2.spec $

6 .-- Clean: Executive Document Cleaning

If the cleaning segment of the package description file (% clean) does not delete the command of the temporary file, then the temporary files still exist after the RPM build package, accounting for a certain space. If you want RPM to automatically delete those temporary files, you can use the --clean option when built. This option executes a command, namely:

RM-RF software name - version number

Use it to delete the Software Name - Version Number directory and all files in this directory. This "Software Name" directory, that is, the directory of the RPM default storage and decompression source program.

# rpm-bl - Cleanlze-6.0-2.specprocessingfiles: LzefindingProvides: (useing / usr / lib / rpm / find-provides) ... FindingRequires: (useing / usr / lib / rpm / find-required) ... Provides: lze-editprereq: / bin / shrequires: /bin/shld-linux.so.2libc.so.6libc.SO.6 (Glibc_2.0) libc.so.6 (glibc_2.1) Executing: - Clean Umask022 CD / USR / SRC / DIST / BUILD RM-RFLZE-6.0 EXIT0

Note: "Executing: - Clean" in Example Indicates that RPM starts to perform its own file cleaning operation.

7 .-- RMSource: Delete the source program and description file

This option is used to indicate that the RPM deletes a software source program and a package description file after the package, and the software source program is defined by the Source Domain in the Pack Description File. This option can also be used separately, such as:

# rpm - rmsourcecelze-6.0-2.spec # lslze-6.0-2.spec ../ Sourcees / Lze-6.0-2.src.tgzls: LZE-6.0-2.SPEC: File or directory does not exist ls :. ./Sources/lze-6.0-2.src.tgz: file or directory does not exist #

8. - Sign: Package built-in digital signature

This option is used to add a PGP digital signature in the package, via a digital signature, the user can check if the package is original, whether it is modified. To use a PGP digital signature, you must install the PGP application and generate your own key pair. (For the content of digital signatures, see << Excellent RPM Eight - Signature Articles >>

When using this option to build a package, RPM will require a password to verify the correct series of operations that start the package, which generates a digital signature before the package is built. Please see the case: (omit a lot of output, ...)

# rpm-bb - Signlze-6.0-2.specenterpassphrase: mypassphraseisgood.executing:% preip ... Executing:% Build ... Executing:% install ... processingFiles: Lze. ..... Requires: /bin/shld-linux.so.2libc.so.6Generatingsignature: 1002GeneratingsignatureusingPGP.PrettyGoodPrivacy (tm) Version6.5.8 (c) 1999NetworkAssociatesInc.UsestheRSAREF (tm) Toolkit, whichiscopyrightRSADataSecurity, Inc.ExportofthissoftwaremayberestrictedbytheU.S. Government: Wrote: /root/test/rpms/i386/lze-6.0-2.i386.rpmexecuting:% clean ... # Note: Enter a password in the example, enter myPass after the verification, then RPM start Build a package operation. (In fact, myPass does not show it on the screen) The few lines under the GeneratingSignature in the case are what outputs when digital signatures.

Other package related orders

There are two commands related to other built packages, they are all operating for the source package for the RPM format, and then install the source package first, and then perform the next step according to the package description file. 1. Re-compiling commands:

Usage: rpm - RecompilerPM source package 1RPM source package 2 ...

Such as:

RPM - Recompilelze-6.0-2.src.rpm

When this command is executed, the source package is first installed, and then perform the pre-processing segment (% preip), the Compile Segment (% Build), the installation section (% install) of the software package description file. This command is equivalent to the following two commands:

1) RPM-ILZE-6.0-2.SRC.RPM2) RPM-BILZE-6.0-2.SPEC

2. Reconstructing the command:

Usage: rpm - RebuildRPM source package 1RPM source package 2 ...

Such as:

RPM - Rebuildlze-6.0-2.src.rpm

After the recoilation command is executed, the new RPM package is not established, and this reconstructed command will make a new RPM package. When the reconstruction command is executed, first install the RPM source package, then execute the pre-processing segment (% preip), the compile segment (% build), the installation section (% install), the installation segment (% clean) The script program generates a new RPM execution package, finally delete the source package, description file, and other temporary files. This command is equivalent to the following two commands:

1) RPM-ILZE-6.0-2.SRC.RPM2) RPM-BB - Clean - ResourceElze-6.0-2.SPEC

转载请注明原文地址:https://www.9cbs.com/read-116840.html

New Post(0)