Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My final goal is a way to register a bunch of local files as a package in the local RPM database. This is what I've done so far:

I build an RPM package from existing files using rpmbuild, then use rpm --justdb -i file.rpm to register the built package in the local RPM database. Files are already on their places in the system, so there is no need to copy them over from the RPM file (so I use --justdb). The rpm -V command yields no errors.

As can be seen, I never use the files which are stored in the RPM file I've built. These files are really, really big (a few Gigabytes). So now I want to save some extra hours which are spent on compressing my huge files into the RPM package.

So I would end up with building an RPM package which has the correct metadata in it (file checksums, etc), but no real files! Can I do that?

Or maybe there is a better way to achieve my initial goal?

share|improve this question
1  
Can you elaborate on what problem you are attempting to solve by registering these large files with the RPM database? –  Andrew B Feb 4 '13 at 7:23
    
@AndrewB, I'm developing a RPM-package-based distribution system for virtual machine templates. When the user packs a new template into a package, the existing old files from which the package was created should be left intact for some time, as there may be virtual machines based on that template. I thought it would be nice to create a stub package out of them and register it locally, so that later this package can be nicely removed via usual rpm -e or yum remove. –  vadipp Feb 4 '13 at 8:43
1  
It sounds like you're trying to use RPM as a configuration management solution, and these are artifacts of trying to use a package manager for something it isn't designed for. While I can understand why you wouldn't want to turn your back on the work you have already invested, you will probably get better results (and more job experience you can put on your resume) by implementing real configuration management. There are several solutions that are designed to work alongside RPM databases. (Spacewalk is one) –  Andrew B Feb 4 '13 at 8:56
    
@AndrewB, thanks for the suggestion. If I happen to have further major problems with RPM, I'll consider investigating config management solutions. For now it's a non-blocker limitation for me... –  vadipp Feb 4 '13 at 9:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.