Show HN: Fast native RPM building from any distro, for any distro, via Docker
github.com
github.com
I'm waiting for the fun to start when they realize that using a different kernel from the one the distro is designed for causes all sorts of crazy-hard-to-find bugs. Been there with mock, several times.
Here was one of my favorites, which took weeks to diagnose: https://lists.nongnu.org/archive/html/qemu-devel/2010-02/msg...
I'll add the note about kernel importance in the docs, though. Thanks!
Building RPMS is typically a platform-specific thing, because most distributions bastardize their systems to be incompatible with others' RPMs. RPMs provided by vendors and 3rd parties typically shove everything into /opt and depend on very little to work around this. If you want your package to be portable you should probably do the same.
Building RPMs is a platform specific thing indeed, and the /opt way is a very common way to go (docker-rpm-builder itself is installed in /opt in my prebuilt packages), but you still want to compile in an enviroment as close as the target to be sure your software works.
I was putting something together like that a while ago for packaging up software for internal use, that we get from outside vendors. I can dig it up and throw it on Github if anyone is interested.
I was thinking about a docker-fpm-builder myself by the way, so maybe we'll meet again :-)
- Make a spec with / (actually the build root) in %files section
- Run the build
- List the resulting package contents (which is whatever was put into the build root)
- Manually remove any common dirs
- Update the %files section and rebuild
But the point is: can you pack every single dependency in your project? Usually you'll need something from the outside distro (libc usually). Then if you're building on a different host than your target, you may experience issues or different runtime behaviour.