LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-02-2007, 08:47 PM   #1
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
How to update a directory of RPMs for a custom ISO?!?!?!


I have created a custom ISO that I am happy with. I'd like to find a way to keep the RPMs on the ISO updated to the newest versions for when I respin the CD. Just trying to keep from having to download all the updates as soon as the ISO is installed.

It's a CentOS4.4 ISO that installs just the packages I want, and runs some %post install stuff. I keep the entire thing in /ISO and my RPMs (base) are in /ISO/CentOS/RPMS/. I have already whipped up a script to regenerate the hdlist when I make changes in there and have been updating the packages by hand up to this point - I find the new package on a Cent mirror in the updates dir, delete the old version out of my dir and download the new version into it. Once I do this for all the packages I regen the hdlist and respin the ISO. I just know there has to be an easier way to accomplish this.
I've seen some webpages on this, but they're all geared towards RH7/8/9 or FC1/2 and seem a little dated.
Can someone point me towards a link or some tips that might help me along?
Thanks in advance.
 
Old 04-05-2007, 08:19 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
I assume "spin" the ISO means burn it to a CD.

I don't do rpm's (deb's instead), but I've done a lot of scripting. Perhaps if you'd put the commands for the key steps in a code block, I could suggest ways to automate them.
  • find the new package on a Cent mirror in the updates dir
  • delete the old version out of my dir
  • download the new version into it
  • regen the hdlist
Sounds to me like you need a list & a loop.

When you do it by hand, how to you know which packages need updating?
 
Old 04-05-2007, 11:08 AM   #3
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by archtoad6
I assume "spin" the ISO means burn it to a CD.

I don't do rpm's (deb's instead), but I've done a lot of scripting. Perhaps if you'd put the commands for the key steps in a code block, I could suggest ways to automate them.
  • find the new package on a Cent mirror in the updates dir
  • delete the old version out of my dir
  • download the new version into it
  • regen the hdlist
Sounds to me like you need a list & a loop.

When you do it by hand, how to you know which packages need updating?
My goal for the weekend is to script this; if you can offer any insight that would be helpful.
When I do it by hand, I look at a Cent mirror's "update" dir, and then check to see if any of the programs in there match what I've included in the ISO. Here's a link to one of the update dirs:
http://isoredirect.centos.org/centos...tes/i386/RPMS/
In my ISO dir, I check to see if the version is the same or if there is a newer version on the Cent mirror. Here's a sample snippet of my dir:

-rw-r--r-- 1 root root 32819 Feb 28 11:29 ypbind-1.17.2-8.i386.rpm
-rw-r--r-- 1 root root 64352 Feb 28 11:29 yp-tools-2.8-7.i386.rpm
-rw-r--r-- 1 root root 393768 Feb 28 11:29 yum-2.4.3-1.c4.noarch.rpm
-rw-r--r-- 1 root root 116262 Feb 28 11:29 zip-2.3-27.i386.rpm
-rw-r--r-- 1 root root 44560 Feb 28 11:29 zlib-1.2.1.2-1.2.i386.rpm
-rw-r--r-- 1 root root 91272 Feb 28 11:29 zlib-devel-1.2.1.2-1.2.i386.rpm

If there's a newer version on the mirror, I delete the old version out of my dir, and then wget the new version into it. I do this for any of the RPMs that have updates. Once that's done I run a little script I threw together that runs the genhdlist commands I need to rebuild the hdlist.
I'm imaging I'll have to get a dir listing from the mirror and break the filenames into parts (probably separated by the hyphens) and put them in an array. That seems the easiest way to compare version numbers to me, but I'm sure there's another way to do it.
Thanks!
 
Old 04-05-2007, 07:02 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
I count 317 files in the update dir @ Centos, how many files in your ISO dir?

I'm thinking that it might be easier to make a list of your packages & check it against the updates, rather than the other way 'round. It might even be efficient to attempt to wget every package in your dir because it takes so little time for wget to say "tilt" if there is nothing there.

Do your know an easy way to "scrape" the listing of the updates dir?

Also, which portion of the file names are constant & which change w/ updates? Maybe a version independent master list of the contents of your ISO would be helpful, then the script can check for updates & that the ver. is later.

Is there ever file of interest whose name does NOT end in ".rpm"?

I agree that parsing will probably be necessary, but I wouldn't worry if arrays are the best way.
 
Old 04-06-2007, 06:42 AM   #5
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
There are 443 files in my RPM dir. I'll use a filename as a constant:
openssh-server-3.9p1-8.RHEL4.17.1.i386.rpm
To the best of my knowledge, openssh-server will be constant, RHEL4 will probably be constant, i386.rpm will also probably stay constant.
And my pickle is also on how to get a useable output from the update dir for this as well.
The older stuff I read wasn't very helpful, but they almost all pointed to the fact that I would probably need to mirror the updates dir on my local machine as well. I believe I can just rsync this, and then maybe just compare individual files using the cmp command? If it shows a difference between the 2 file names (assuming I'm reading them 1 at a time) then delete the original one and copy the one from the updates dir into the original dir?
Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to create custom install CD (updated rpms, kickstart, etc.)? Arodef Linux - Software 6 12-17-2007 02:11 PM
Custom Install ISO pineapples Linux - Distributions 2 09-15-2005 10:15 PM
no distro, custom build need help with rpms sideshowrob Linux - Software 3 06-24-2005 04:31 PM
Custom ISO Jay_highlands Slackware 1 10-18-2003 05:37 PM
custom kernel for ISO CD ??? Bluesuperman Slackware 2 10-17-2003 10:16 PM


All times are GMT -5. The time now is 09:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration