I specifically mean I can create a 64bit rpm package on RHEL 4 and install that same package on any OS that uses rpm and is 64bit. (and meets the dependencies criteria) I want that same functionality in FreeBSD. I want to build a 64bit package on FreeBSD 10 and have it work on FreeBSD11 as well.This is a bit unclear. If you mean binaries that run on 32-bit and 64-bit, you may be mistaken about RPM's abilities. Ditto if you mean running the same binaries written for RHEL 7 to run on RHEL 4. Any binary that does not have hardware or version requirements or ABI differences, created for pkg, will run on any version of FreeBSD but, as I said, your question isn't entirely clear.
Xylene: You would still need try poudriere. It can setup a FreeBSD10 jail on FreeBSD11 host, fetch the ports for the FreeBSD10 and build your choice packages in it. You will then install the compat10x pkg (as advised by SirDice) on the host you want to install the built packages on before you install the built pkgs.For starters, in order to run FreeBSD 10 binaries on a FreeBSD 11 system you would need misc/compat10x and the COMPAT_FREEBSD10 kernel option (GENERIC has this by default).
Are we talking about real binaries? I.e. compiled executables as opposed to scripts? Are these linked to other libraries, most notably libc? Or are they statically linked?
Yes they are real binaries, and yes they are linked to other libraries. The lib dependencies is not an issue, the only problem I have is that when I build a binary package on FreeBSD 10 and attempt to install the same package on FreeBSD 11, pkg fails with:Xylene: You would still need try poudriere. It can setup a FreeBSD10 jail on FreeBSD11 host, fetch the ports for the FreeBSD10 and build your choice packages in it. You will then install the compat10x pkg (as advised by SirDice) on the host you want to install the built packages on before you install the built pkgs.
Hoping that there is no change in its dependencies, you will need rebuild it for the OS version bumping up its DISTVERSION and/or PORTREVISION.Is there a way to create the package so that pkg doesn't complain/fail when I attempt to install it on a newer version of FreeBSD?
Because you're depending on libraries with a certain ABI version. The ABI can be different between two major versions. And while it apparently works for your application there's no guarantee it'll work for every application. And it apparently works for your application on 10.x and 11.x, there's no guarantee it's going to work for 12.x or 13.x.The part I don't understand is why there is a package dependency on the OS version, why is the package dependency not just on the arch?
You're looking at it the wrong way, it's not a bug. It's intentionally done in order to prevent issues with people trying to install old binaries on a later version with an incompatible ABI. And then complaining the package manager is broken because it allowed them to install something that's incompatible.Why does pkg care that the OS is FreeBSD:11:amd64 instead of FreeBSD:10:amd64 if all dependencies are on the box? This seems like a bug in the code to me.
Reaction score: 1,676