> Hi All, > > May be this is not a valid question to ask after all being done in RPM,but > I am curious to know that is there any way by which we can directly extract > the spec file from binary rpm file . I know this can be achieved once we > install the rpm t.i.e; o get the scripts we can issue rpm -q myfile > --scripts command but wanted to know the first way to get the complete spec > file from RPM. You can't get the spec file from an rpm, you can only aquire the output of that spec file which is the binary rpm(s) consisting of a header, payload and signatures, the header containing among other things the scriptlets. The payload is of course the actual files to be delivered to the system. OTH, one could generate a reasonable spec file from the packages header, but will not be exactly the same in most cases. For instance, specfiles support conditionals such as: %ifarch x86_64 Provides: 64_bit_functionality %endif You could never derive that from the single binary rpm for a particular architecture, and in general any sort of conditional logic will just go away. Another example when someone calls an external program that generates content in the specfile: %{expand: %(groovySpecFileHelper)} No way at all even if you had the complete universe of rpms that this specfile could generate, could you ever figure that out. What you can do is, again, generate a reasonable aproximation that would generate the particular package you have, or you can go get the SRPM and pull the spec file from there. Cheers...james _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list