You are not logged in.

#1 2020-09-24 02:07:16

adam_q
Member
Registered: 2014-09-24
Posts: 17

How to pretend to be another distro?

Hi,

This is in fact to workaround some damn check from a damn vendor (whose name starts with "NV").

Their SDK manager checks the host distro, and requires Ubuntu to continue downloading needed tools.

I'm wondering if there is any elegant way to do such disguising?

(Now I guess I'd better buy a RK3399 or S922X board other than the damn board)

Offline

#2 2020-09-24 02:15:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: How to pretend to be another distro?

You'll have to share more information about the "damn vendor" and the actual SDK you are referring to.  They may check /etc/release, etc/os-release, or uname output among potential other mechanisms.  The first two are trivial the change, the third a bit trickier.  Then of course, if this is a just a check of the browser for a download from a website, it'd be in the User Agent string which is also simple to change.

EDIT: and is this really any different from your previous post from 5 minutes before this one?  Why are you cross posting this?

Last edited by Trilby (2020-09-24 02:17:08)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-09-24 02:27:03

adam_q
Member
Registered: 2014-09-24
Posts: 17

Re: How to pretend to be another distro?

The lsb-release way is enough to trick the basic version check and continue testing.

For more info, the infamous vendor is Nvidia, the tool is their SDK manager, which is just an electron based app to download needed (well, sometimes unneeded) tools.
For more info about the SDK manager: https://developer.nvidia.com/embedded/jetpack

But manually modifying the lsb-release file still doesn't look elegant enough.
Is there anything like environment variable to specify where to lookup the lsb-release file so we can expose the lsb-release on a per-app basis.

This post is only to address the distro version check, thus I believe it's not related to the PKGBUILD subforum.

Last edited by adam_q (2020-09-24 02:29:25)

Offline

#4 2020-09-24 02:37:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: How to pretend to be another distro?

Assuming it really does rely just on lsb-release, then just create a script named lsb-release that produces the desired output, and prepend it's location to PATH in the environment in which the SDK manager will run.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2020-09-24 03:14:27

adam_q
Member
Registered: 2014-09-24
Posts: 17

Re: How to pretend to be another distro?

Thanks for the idea.

And indeed, a quick grep into the javascript shows they are just calling "lsb_release -r" to do the release version checking, so that's definitely feasible.

Offline

#6 2020-09-24 03:41:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: How to pretend to be another distro?

If it's just javascript, you don't even need to do all that.  Just replace (e.g., with patch or sed) that line to specify whatever is required (and/or remove the conditional check).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2020-09-24 07:41:58

adam_q
Member
Registered: 2014-09-24
Posts: 17

Re: How to pretend to be another distro?

That's even better.

But I guess no need to bother anymore.

It looks like the needed tool, Linux for Tegra, can be downloaded using the URL directly.
The SDK manager is just really a wrapper for end users.

Offline

Board footer

Powered by FluxBB