LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2011, 05:27 AM   #1
maverick964_uk
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Rep: Reputation: Disabled
Smile 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
 
Old 08-05-2011, 09:30 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Sure ... do you want assistance to learn or just someone to get the job done?
 
Old 08-17-2011, 06:26 AM   #3
maverick964_uk
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

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
 
Old 08-17-2011, 05:53 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Ok ... the first hurdle is this:
Quote:
..create an automated install package for some backup agent patches.
One of the ideas behind RPM is that you don't patch on top, you update the package with the patch and increment the release number. When you need to update a package, you may just be adding a patch - but from the install side it always looks like an update of the application.

example spec file part:
Code:
Source0:    %{name}-%{version}.tar.gz
Patch0:     myapp_fix_1.patch
Example install:
Code:
yum update myapp
So in your case the process might look like:-
- 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
 
Old 08-26-2011, 05:53 AM   #5
maverick964_uk
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-26-2011, 12:28 PM   #6
mikey99
Member
 
Registered: Nov 2008
Location: UK
Distribution: RHEL, Fedora
Posts: 68

Rep: Reputation: 12
Quote:
Originally Posted by maverick964_uk View Post
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.
If you are trying to do this from within Satellite, then you really need to look at the documentation for Satellite and fully understand the process.

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.
 
Old 08-26-2011, 11:59 PM   #7
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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.
 
Old 08-30-2011, 03:08 AM   #8
maverick964_uk
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
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?
 
Old 08-30-2011, 06:20 PM   #9
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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)
 
Old 08-30-2011, 06:29 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
Old 08-30-2011, 07:32 PM   #11
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Func is a great product, bit like driving a dune buggy with a Ferrari engine - looks ugly but tons of power
 
Old 09-05-2011, 05:22 AM   #12
maverick964_uk
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.....'"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum the stubborn yum; not allowing to update any package lazer00 Linux - Software 1 03-24-2011 07:41 PM
LXer: Pretending a Package is Installed by Creating an Empty Package with Checkinstal LXer Syndicated Linux News 0 05-03-2009 03:10 PM
Creating custom headers to match a custom kernel utanja Debian 2 06-08-2007 03:15 PM
Creating a custom process id cbutcher Linux - General 2 04-29-2005 06:59 AM
Creating custom install CD's hw-tph Debian 2 10-23-2003 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration