Creating a custom yum package
Hi,
I know unix but mainly HPUX so I'm not up to speed with redhat sys admin. I'm working with redhat 5.5 and 5.6 for a customer. Based on some security constraints I want to be able to create an automated install package for some backup agent patches. I have a satellite server with yum setup. I want to package up a tar file with a few functions to spray an update to many redhat hosts. We have a lack of redhat resources here so Im trying to do it myself. Can someone help? thanks Mike |
Sure ... do you want assistance to learn or just someone to get the job done?
|
Hi, thanks for the reply and sorry for the delay. Just returned from vacation.
Anyway, yes help would be good as I do want to learn. thanks, Mike |
Ok ... the first hurdle is this:
Quote:
example spec file part: Code:
Source0: %{name}-%{version}.tar.gz Code:
yum update myapp - choose a host to build packages on - configure it for building rpm's - grab the application source rpm and install it - edit the spec file to utilise the patch, and increment the release number - copy the patch to SOURCES - rebuild the rpm And a quick guide to setting up an rpm build environment: - 'yum -y install rpm-build rpmdevtools rpmlint' - 'rpmdev-setuptree' - 'cd ~/rpmbuild' cheers |
Hi,
thanks for the information. I have a rpm build environment already so I just want to add to it. Its a simple shell script really. As the build env is in place is there a simple process to add a rpm package in? Also is it possible to spray this script from the rpm build server to all redhat hosts?? thanks |
Quote:
If setup correctly (and many aren't) then the correct procedure is to take your newly updated rpm and push it to the correct custom software channel (the one that all your RHEL hosts are subscribed to). Ideally you should even create an errata for it. However, maybe you are also using cloned channels in a DTAP type setup. In which case you will need to test the new rpm on your dev boxes before promoting the rpm through to the production channel. In which case you will need to clone the erratas as well. Bottom line is - if you are using satellite, the right procedure is "it depends on your sat setup". Mike. |
Are you wanting to add the script to all the hosts or just execute it on them? ... if the former, it may be easier to use a config channel in Satellite rather than packaging it.
|
thanks for the inputs.
At the moment I just want to find the best way to push and execute a script to all redhat hosts. Whats the best way? |
Via Satellite: a config channel for pushing it out then schedule the execution (sorry, don't have a Satellite handy atm so I can't give you the step-by-step)
|
I believe you have to pay RH for Satellite; if you want the free version, its called Spacewalk http://spacewalk.redhat.com/ http://wiki.centos.org/HowTos/Packag...ment/Spacewalk
|
Func is a great product, bit like driving a dune buggy with a Ferrari engine - looks ugly but tons of power :)
|
thanks guys for the responses....
I'm actually gonna test qpssh and it seems to work... example: # qpssh -v -h /tmp/hostlist -X "-qtt" -l user@domain.org -i "sudo -i '.....commands.....'" |
All times are GMT -5. The time now is 03:23 AM. |