Building an RPM from a Spec File
Tagged with: build, command, fedora, Linux, package, redhat, rpm, rpmbuild
Use this command to build an RPM if you have a Spec File
rpmbuild -ba SPEC_FILE
Use this command to build an RPM if you have a Spec File
rpmbuild -ba SPEC_FILE
Show all deb packages installed on the system
dpkg -l
Update the package list - do this after you change the source in /etc/apt/sources.list .
apt-get update
Use this command to remove a rpm package.
yum remove package_name
Install a rpm package
rpm -ivh package.rpm
Install a package using dpkg in Debian linux
dpkg -i package
Install / upgrade a deb package from cdrom/dvd
apt-cdrom install package_name
Show space used by rpm packages installed sorted by size (fedora, redhat and like)
rpm -q -a --qf "%10{SIZE}\t%{NAME}\n" | sort -k1,1n
This script will package your SVN code to a tar.gz file. Just give the name of the project as the first argument. Like this…
perl packager.pl jus5
#!/usr/bin/perl
#Package a Sourceforge project from its SVN source.
die("Please provide the name of the project as the argument") unless($ARGV[0]);
$project=$ARGV[0];
#$project='jus5';
`svn checkout https://$project.svn.sourceforge.net/svnroot/$project`;
`find $project/ -name .svn -exec rm -rf {} \\;`;
`tar -czf $project.tar.gz $project/`;
`rm -rf $project/`;
[tags]source,sourceforge,project,package,perl,script,svn[/tags]
This is the method that I use to package a SVN Project. For CVS projects, the code is slightly different. Please note that the second line requires bash to work.
This is how I packaged nexty
svn checkout https://nexty.svn.sourceforge.net/svnroot/nexty
find nexty/ -name .svn -exec rm -rf {} \;
tar -czf nexty.tar.gz nexty/
rm -rf nexty/
[tags]svn,package,zip,compress,project,subversion[/tags]