什么是src.rpm

Reference

redhat.com

access.redhat.com documentation

access.redhat.com case

rpm

.src.rpm

Accord to the the “Production Support Scope of Coverage” and “Developer Support Scope of Coverage”, Red Hat doesn’t support any rpm packages which have been modified, even if the rpm package was compiled from the source code as shipped by Red Hat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# to check a validation of a rpm package from redhat or not
$ rpm -qi firefox
Name : firefox Relocations: (not relocatable)
Version : 3.0.18 Vendor: Red Hat, Inc.
Release : 1.el5_4 Build Date: Thu 04 Feb 2010 08:58:36 PM CST
Install Date: Sat 20 Feb 2010 10:07:06 AM CST Build Host: ls20-bc2-14.build.redhat.com
Group : Applications/Internet Source RPM: firefox-3.0.18-1.el5_4.src.rpm
Size : 15222260 License: MPLv1.1 or GPLv2+ or LGPLv2+
Signature : DSA/SHA1, Tue 09 Feb 2010 04:48:54 PM CST, Key ID 5326810137017186
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.mozilla.org/projects/firefox/
Summary : Mozilla Firefox Web browser.
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.
1
yum install rpm-build rpmdevtools

get .src.rpm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# [How to create repository of source packages ?](https://access.redhat.com/solutions/2026833)
# cat /etc/yum.repos.d/srpms.repo
[rhel-src]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=http://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# rm -rf /var/cache/yum/*
# yum clean all
# reposync --repoid=rhel-src --source
The Result of the command should be as below,
# reposync --repoid=rhel-src --source
[rhel-src: 1 of 6404 ] Downloading 389-ds-base-1.2.10.2-15.el6.src.rpm
389-ds-base-1.2.10.2-15.el6.src.rpm
[rhel-src: 2 of 6404 ] Downloading 389-ds-base-1.2.10.2-18.el6_3.src.rpm