Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I find that this would be very useful in certain situations in which I want to install software in a different way, or change flags, or not let the software manager know the program has been installed (so it wouldn't look for updates). I know packages can be built from source codes, and this is relatively common, but I don't know about the other way around. It would also be useful for converting one type of package into another when Alien doesn't work or doesn't provide good results. I've been searching on-line but there seems to be no or few records of source code extraction from pre-built packages...

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Debian and RPM packages don't contain source code, only the compiled result. However, you can fetch the source packages - SRPMS, or the Debian description, patch, and original tarball.

Those can be recompiled with whatever local modifications you want, and will more or less do what you want - though remember to adjust the version number to make it clear that your version is "later" than the distribution version.

share|improve this answer
    
So, there is no way to convert a package I already have into source code? –  the.midget Feb 12 '12 at 5:29
    
Not directly; both apt and yum offer tools to download the source package by name, but you can't extract what isn't present from the binary files. –  Daniel Pittman Feb 12 '12 at 5:32
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.