0% found this document useful (0 votes)
91 views1 page

Manual. Place Source Bundles and Spec File Manually.: Unpacking. Automatic Unarchiving Into BUILD Directory

This document contains RPM spec file contents for packaging the Red Hat Enterprise Linux 6 release files. It includes sections for preparing, compiling, installing, cleaning, and packaging the files. The files are installed into the separate $RPM_BUILD_ROOT staging directory and include release notes, YUM repository configurations, and files identifying the release in various system locations.

Uploaded by

Aung Aung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views1 page

Manual. Place Source Bundles and Spec File Manually.: Unpacking. Automatic Unarchiving Into BUILD Directory

This document contains RPM spec file contents for packaging the Red Hat Enterprise Linux 6 release files. It includes sections for preparing, compiling, installing, cleaning, and packaging the files. The files are installed into the separate $RPM_BUILD_ROOT staging directory and include release notes, YUM repository configurations, and files identifying the release in various system locations.

Uploaded by

Aung Aung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

%define debug_package %{nil}

%defineproduct_family
%define debug_package Red %{nil}
Hat Enterprise Linux
%definerelease_name
%define product_family Red Hat Enterprise Linux
Santiago
%definebase_release_version
%define release_name Santiago 6
%definefull_release_version
%define base_release_version6.0 6
%define full_release_version
%define beta Beta 6.0
%define beta Beta
Name: redhat-release
Name: redhat-release
Version: %{base_release_version}
Version:6.0.0.24%{?dist}
Release: %{base_release_version}
Release: 6.0.0.24%{?dist} release file
 Summary: %{product_family}
Summary: %{product_family} release file

Group: System Environment/Base
Manual. Group: System
License: GPLv2 Environment/Base
License: GPLv2
Obsoletes: rawhide-release redhat-release-as redhat-release-es redhat-release-ws
Place source bundles and Obsoletes: rawhide-release redhat-release-as redhat-release-es redhat-release-ws
spec file manually. Source0: redhat-release-6-4.tar.gz
Source0: redhat-release-6-4.tar.gz
%description
 Unpacking.
%description
%{product_family} release files
%{product_family} release files
Automatic unarchiving %prep
into BUILD directory. %prep -q
%setup
%setup -q

 Compiling. %build
%build
echo OK
Use makefile if possible. echo OK
Sample has no compile code, %install
so echo OK as placeholder. rm%install
-rf $RPM_BUILD_ROOT
# rm -rf $RPM_BUILD_ROOT
create /etc
#
mkdircreate /etc
-p $RPM_BUILD_ROOT/etc
Ž Staging.
mkdir
# create
echo
-p $RPM_BUILD_ROOT/etcand /etc/redhat/release
# create /etc/system-release
/etc/system-release
"%{product_family} releaseand /etc/redhat/release
%{full_release_version}%{?beta: %{beta}}
Move compiled files and echo "%{product_family}
(%{release_name})" release %{full_release_version}%{?beta: %{beta}}
> $RPM_BUILD_ROOT/etc/redhat-release
create/configure/install (%{release_name})" > $RPM_BUILD_ROOT/etc/redhat-release
ln -s redhat-release $RPM_BUILD_ROOT/etc/system-release
new files into the empty, # ln -s redhat-release
write $RPM_BUILD_ROOT/etc/system-release
cpe to /etc/system/release-cpe
separate $RPM_BUILD_ROOT # write
echo cpe to /etc/system/release-cpe
"cpe:/o:redhat:enterprise_linux:%{version}:%{?beta:%{beta}}%{!?beta:GA}" >
echo "cpe:/o:redhat:enterprise_linux:%{version}:%{?beta:%{beta}}%{!?beta:GA}" >
$RPM_BUILD_ROOT/etc/system-release-cpe
staging area. $RPM_BUILD_ROOT/etc/system-release-cpe
# create /etc/issue and /etc/issue.net
cp# $RPM_BUILD_ROOT/etc/redhat-release
create /etc/issue and /etc/issue.net $RPM_BUILD_ROOT/etc/issue
cp $RPM_BUILD_ROOT/etc/redhat-release
echo $RPM_BUILD_ROOT/etc/issue
"Kernel \r on an \m" >> $RPM_BUILD_ROOT/etc/issue
echo "Kernel \r on an \m" >> $RPM_BUILD_ROOT/etc/issue
cp $RPM_BUILD_ROOT/etc/issue $RPM_BUILD_ROOT/etc/issue.net
cp $RPM_BUILD_ROOT/etc/issue
echo >> $RPM_BUILD_ROOT/etc/issue $RPM_BUILD_ROOT/etc/issue.net
# echo
copy >>yum$RPM_BUILD_ROOT/etc/issue
repos to /etc/yum.repos.d
# copy
mkdir -p yum repos to /etc/yum.repos.d
$RPM_BUILD_ROOT/etc/yum.repos.d
mkdir
for file-pin$RPM_BUILD_ROOT/etc/yum.repos.d
*.repo; do
for file
install -m in
644*.repo; do
$file $RPM_BUILD_ROOT/etc/yum.repos.d
install -m 644 $file $RPM_BUILD_ROOT/etc/yum.repos.d
done
# done
copy GPG keys
# copy
mkdir -p GPG keys$RPM_BUILD_ROOT/etc/pki/rpm-gpg
-m 755
for file-pin-mRPM-GPG-KEY*
mkdir 755 $RPM_BUILD_ROOT/etc/pki/rpm-gpg
; do
for file
install -m in
644RPM-GPG-KEY* ; do
$file $RPM_BUILD_ROOT/etc/pki/rpm-gpg
install -m 644 $file $RPM_BUILD_ROOT/etc/pki/rpm-gpg
done
# done
set up the dist tag macros
# set up
install -d the dist$RPM_BUILD_ROOT/etc/rpm
-m 755 tag macros
install
cat -d -m 755 $RPM_BUILD_ROOT/etc/rpm << EOF
>> $RPM_BUILD_ROOT/etc/rpm/macros.dist
# cat
dist>>macros.
$RPM_BUILD_ROOT/etc/rpm/macros.dist << EOF

‘ Cleanup.
# dist%{base_release_version}
%%rhel macros.
%%rhel.el%{base_release_version}
%%dist %{base_release_version}
Recursively remove %%dist .el%{base_release_version}
%%el%{base_release_version} 1
$RPM_BUILD_ROOT and BUILD %%el%{base_release_version} 1
EOF
work area content to EOF
prepare for next rpmbuild. %clean
rm%clean
-rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT
 Packing manifest. %files
%files
%defattr(-,root,root)
Specify significant file %defattr(-,root,root)
%doc EULA GPL autorun-template
types, permissions and %doc EULA GPL autorun-template
%attr(0644,root,root) /etc/redhat-release
attributes. Every file to %attr(0644,root,root) /etc/redhat-release
/etc/system-release
pack must be in the staging /etc/system-release
%config %attr(0644,root,root) /etc/system-release-cpe
area and must be depicted %config %attr(0644,root,root)
%config(noreplace) /etc/system-release-cpe
%attr(0644,root,root) /etc/issue
in this packing manifest to %config(noreplace)%attr(0644,root,root)
%config(noreplace) %attr(0644,root,root)/etc/issue.net
/etc/issue
%config(noreplace)
%config %attr(0644,root,root)
%attr(0644,root,root) /etc/issue.net
/etc/yum.repos.d/*
be included in the RPM. %config %attr(0644,root,root) /etc/yum.repos.d/*
%dir /etc/pki/rpm-gpg
%dir /etc/pki/rpm-gpg
/etc/pki/rpm-gpg/*
 Source code. /etc/pki/rpm-gpg/*
/etc/rpm/macros.dist
/etc/rpm/macros.dist
Repack the original source
%changelog
files only into a source RPM. * %changelog
Mon Mar 29 2010 Dennis Gregorovic <[email protected]> - 6-6.0.0.24
- *Add
Monbeta
Mar debuginfo
29 2010 Dennis
repos Gregorovic <[email protected]> - 6-6.0.0.24
- -Resolves:
Add beta rhbz#572308
debuginfo repos
- Resolves: rhbz#572308

You might also like