Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Simple RPM package production     - CentOS 6.5 start ActiveMQ being given to solve (Server)

- Android Qemu GPS module (Programming)

- OpenCV 3.0 + Python 2.7 installation and testing under Ubuntu 14.04 (Linux)

- Ubuntu install OpenMPI (Linux)

- AWK principles and commands and file input (Linux)

- Debian Stable (Jessie 8.1) of normal.mod not found (Linux)

- Shell for loop (Programming)

- Linux terminal interface font color settings (Linux)

- Spark source code compiler package (Linux)

- Linux shell in back quotes (`) Application (Linux)

- C ++ input and output summary _ Input (Programming)

- Oracle archive log deletion (Database)

- Java NIO2: Buffer (Programming)

- shell script: a key to install LAMP, LNMP script (Server)

- MySQL5.6 based GTID master-slave replication (Database)

- Make command Detailed Tutorial (Programming)

- Linux distributed message queue RocketMQ deployment and monitoring - Dual Master (Server)

- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)

- Install MATE desktop environment adjustment tools Mate Tweak 3.3.6 (Linux)

- To install Scribus 1.4.4 under ubuntu (Linux)

 
         
  Simple RPM package production
     
  Add Date : 2017-08-31      
         
         
         
  Today, in order to test and build your own yum repository to install the upgrade package, requiring a rpm package to do the test, so I thought of his own to do a simple rpm, just because a test is to do so there is no need to add the compiled file, only uses a shell file output cute Hello World.

1. first need to download and install the rpm package Maker

$ Sudo yum install -y rpm-build rpmdevtools

2. Run rpmdev-setuptree skeleton directory to generate a rpm package

$ Rpmdev-setuptreer

pmdev-setuptree a further command to create a default RPM build root directory structure under the root directory of the current user's ~ / rpmbuild /


3. Generate the source code package

mkdir -p ~ / rpmbuild / SOURCES / helloworld-1.0.0
touch ~ / rpmbuild / SOURCES / helloworld-1.0.0 / helloworld
chmod 755 ~ / rpmbuild / SOURCES / helloworld-1.0.0 / helloworld
echo "#! / bin / sh" >> ~ / rpmbuild / SOURCES / helloworld-1.0.0 / helloworld
echo "echo Hello World!" >> ~ / rpmbuild / SOURCES / helloworld-1.0.0 / helloworld
cd ~ / rpmbuild / SOURCES; tar zcvf helloworld-1.0.0.tar.gz helloworld-1.0.0


4. Under ~ / rpmbuild / SPECS directory with rpmdev-newspec to generate a skeleton file spec

$ Rpmdev-newspec helloworld.spec

Edit helloworld.spec file, as follows

Name: helloworld
Version: 1.0.0
Release: 1% {dist?}
Summary: helloworld


Group: Development / Tools
License: GPL
#URL:
Source0:% {name} -% {version} .tar.gz


#BuildRequires:
#Requires:

% Description

% Prep
% Setup -q

% Build
mkdir -p $ RPM_BUILD_ROOT / usr / bin
cp $ RPM_BUILD_DIR /% {name} -% {version} / helloworld $ RPM_BUILD_ROOT / usr / bin /

% Install

% Clean
rm -rf $ RPM_BUILD_ROOT

% Files
% Defattr (-, root, root, -)
% Doc
/ Usr / bin / helloworld


% Changelog

5. Packing

rpmbuild -ba SPECS / helloworld.spec

6. Test
6.1 installation and testing

sudo yum install ~ / rpmbuild / RPMS / x86_64 / helloworld-1.0.0-1.el6.x86_64.rpm

6.2 upgrade testing
Modify helloworld.spec file, which will be modified to Release

Release: 2% {dist?}

Then run "rpmbuild -ba SPECS / helloworld.spec" package

Finally, run the following command to upgrade the rpm package

sudo yum update ~ / rpmbuild / RPMS / x86_64 / helloworld-1.0.0-2.el6.x86_64.rpm
     
         
         
         
  More:      
 
- Ubuntu 14.04 users how to install VLC 2.2.0 (Linux)
- Object-C in the preparation of multi-parameter function parameter is omitted (Programming)
- Fedora 20 Installation and Configuration (Linux)
- Linux install deploy Ansible (Linux)
- PHP with FastCGI and mod_php Comments (Server)
- Mhddfs: multiple smaller partitions into one large virtual storage (Linux)
- Linux systems dmesg command processing failures and system information collected seven usage (Linux)
- CentOS use wget (Linux)
- Ubuntu clean up unnecessary disk space usage (Linux)
- Debian (Wheezy) were installed wxPython GUI development (Linux)
- VirtualBox 4.3 Can not open a new task for a virtual computer solution (Linux)
- Ubuntu users to install Gnome-Pie 0.6.5 (Linux)
- I like Linux Security (Linux)
- Linux configuration startup mount: fstab file (Linux)
- Hadoop 2.5 Pseudo distribution installation (Server)
- RAID configuration and management under linux (Server)
- See Linux kernel, CPU, memory, and various versions of the command module and means (Linux)
- Ubuntu 15.04 installation Powercommands 2.0 (Linux)
- Ubuntu update bug fixes Daquan (Linux)
- Oracle 12c of the auto-increment Identity Columns (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.