tutor:Utilites
Contents |
Wget
To grab everything in subdirectory use:
wget -r -l0 --no-parent http://site.com/whatever/
Yum
create repo
yum -y install createrepo gcc createrepo /var/dgiref/release/2009.2/i386/
Use it
cat /etc/yum.repos.d/dgiref.repo [base] name=DGIREF-$releasever - Base baseurl=http://mirror.scc.kit.edu/downloads/releases/2009.2/$basearch/SL4/ gpgcheck=0
yum will not install source rpms. You can download the
src rpm: x.src.rpm then run: rpm -i x.src.rpm which will put a file : x.spec in /usr/src/redhat/SPECS Then run: rpmbuild -bb x.spec which will put a rpm: x.rpm in /usr/src/redhat/RPMS That rpm can be installed as usual: rpm -i x.rpm
Rpm
At the center of the action is RPM. It performs a number of steps during the build process:
- Executes the commands and macros in the prep section of the spec file.
- Checks the contents of the file list.
- Executes the commands and macros in the build section of the spec file.
- Executes the commands and macros in the install section of the spec file. Any macros in the file list are executed at this time, too.
- Creates the binary package file.
- Creates the source package file.
By using different options on the RPM command line, the build process can be stopped at any of the steps above. This makes the initial building of a package that much easier, as it is then possible to see whether each step completed successfully before continuing on to the next step.
Options
rpm -qip mtools-3.9.8-2.i386.rpm print package summary rpm -i mtools-3.9.8-2.i386.rpm install package rpm -ivh mtools-3.9.8-2.i386.rpm install, monitor and verify pack rpm -q mtools verify if pack installed rpm -qa list all installed packs rpm -ql mtools list all files installed for pack rpm -qd mtools list pack doc files only rpm -e mtools erase package rpm -Uvh * upgrade all packs in distribution rpm -qf `which mtv` search pack mtv
Binary RPM
From Dgiref Jump to: navigation, search
The binary package file is the one part of the entire RPM building process that is most visible to the user. It contains the files that comprise the application, along with any additional information needed to install and erase it. The binary package file is where the "rubber hits the road."
Build rpm
install rpm-build in SL
yum -y install rpm-build gcc
build rpm from tar.gz
rpmbuild -ta package-XXX.tar.gz ls /usr/src/redhat/RPMS/[arch]/ > package-XXX.[arch].rpm