-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for detecting a distro from a rootfs even on another OS #161
Comments
So essentially I would modify distro to accept an optional path to the root of a distro FS defaulting to |
... and make a few paths relative to that provide root path rather than absolute. |
Well, you're the first one asking for such behavior, so I can't say that I've had any appetite for it just yet. It went through my mind that it would be nice to support remote distro identification in the sense that you could just provide a machine to identify a distribution on. It would be better if you could provide the exact API you'd expect from a feature like that, and, of course, a PR if you're interested. |
perfect. I will consider a PR . |
|
@hartwork What is This is a spec AFAIK. Tool-wise we have many implementations. At https://sourceforge.net/projects/lsb and now at http://bzr.linuxfoundation.org/loggerhead/lsb/3.1/si/annotate/head:/lsb_release/src/lsb_release this is a shell script. In Debian and Ubuntu this is a Python script: In Fedora and Red Hat, the lsb shell script is used as a base: AFAIK, other distros each use their own minor variations or do not have it at all. So the strategy could be:
|
Assuming that we (we being the world) want to standardize retrieving the linux distrubtion information, I guess that not using |
This introduce a new optional root_dir argument to contruct a LinuxDistribution object. When provided, this is used as if it were the root of the filesystem when looking up for files. Signed-off-by: Philippe Ombredanne <[email protected]>
I pushed a PR with a fix for this #247 |
Also fix the root_dir arg of LinuxDistribution() to be an absolute path to the root of a filesystem and not a path to /etc Signed-off-by: Philippe Ombredanne <[email protected]>
Also fix the root_dir arg of LinuxDistribution() to be an absolute path to the root of a filesystem and not a path to /etc Reported-by: Sebastian Pipping <[email protected]> @hartwork Signed-off-by: Philippe Ombredanne <[email protected]>
Detect distro from arbitrary rootfs root_dir #161
Is this ready to be closed as fixed by #247? |
Indeed, closing here then 👍 |
I would be interested to run a distro detection based on some rootfs-like archive for aLinux distro and that on any OS. It could be a a plain pre-imaged rootfs, a container image, a VM image or similar and I would like to detect what it is regardless of which OS
distro
runs on.The text was updated successfully, but these errors were encountered: