How to update a directory of RPMs for a custom ISO?!?!?!
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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!
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 wgetevery 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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.