Bug 456205 - Add build / initial-setup support for Linux Mint: "kdesrc-build does not know your distribution (linuxmint)"
Summary: Add build / initial-setup support for Linux Mint: "kdesrc-build does not know...
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: setup wizard (show other bugs)
Version: Git
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 10:46 UTC by Peta
Modified: 2024-03-03 16:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peta 2022-07-01 10:46:04 UTC
I tried to start KDE development and followed the instructions at https://community.kde.org/Get_Involved/development
but `kdesrc-build` complains that it does not know linuxmint as distribution.

```zsh
❯ ./kdesrc-build --initial-setup
 - Installing system packages for linuxmint...
    Installing packages for linux/20.3
 * Packages could not be installed, because kdesrc-build does not know your distribution (linuxmint)
```

I did not look at the source yet, but I expect that Mint is kind of similar to ubuntu, so the ubuntu way should quite likely work.

```zsh
❯ cat /etc/os-release
NAME="Linux Mint"
VERSION="20.3 (Una)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20.3"
VERSION_ID="20.3"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=una
UBUNTU_CODENAME=focal
```
SOFTWARE/OS VERSIONS

kdesrc-build: commit 5311b64bdaf70fe16d506a8ba9999a16ad527b9a (HEAD -> master, origin/master, origin/HEAD)
Date:   Mon Jun 27 00:46:45 2022 +0000

Operating System: Linux Mint 20.3
KDE Plasma Version: 5.18.8
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.13.0-51-generic
OS Type: 64-bit
Comment 1 Peta 2022-07-01 11:13:09 UTC
Hm, found that in https://invent.kde.org/sdk/kdesrc-build/-/blob/master/modules/ksb/FirstRun.pm#L388 the distros are listed
Without having verified, I would expect that ubuntu has ID_LIKE=debian

Now, Linux Mint points the ID_LIKE to ubuntu, but not to debian. I guess that's why it fails. There is no double redirect supported by `/etc/os-release`, so a manual work-around is required.

Is  debian supported? #L389 "# This is woefully incomplete and not very useful."

Seems to be related to https://invent.kde.org/sdk/kdesrc-build/-/issues/89
Comment 2 Harald Sitter 2022-07-01 12:53:36 UTC
(In reply to Peta from comment #1)
> There is no double redirect supported by
> `/etc/os-release`, so a manual work-around is required.

ID_LIKE=

    __A space-separated list of operating system identifiers__ in the same syntax as the ID= setting. It should list identifiers of operating systems that are closely related to the local operating system in regards to packaging and programming interfaces, for example listing one or more OS identifiers the local OS is a derivative from. An OS should generally only list other OS identifiers it itself is a derivative of, and not any OSes that are derived from it, though symmetric relationships are possible. Build scripts and similar should check this variable if they need to identify the local operating system and the value of ID= is not recognized. Operating systems should be listed in order of how closely the local operating system relates to the listed ones, starting with the closest. This field is optional.
Comment 3 Peta 2022-07-02 14:40:21 UTC
Oh, I wasn't aware of this.

If I change the ID_LIKE in my os-release to `ID_LIKE=ubuntu debian` then `./kdesrc-build --initial-setup` installs some stuff. (Did not check yet if I get a working setup).

I posted the suggestion to add debian in ID_LIKE for Linux Mint: https://forums.linuxmint.com/viewtopic.php?f=47&t=376664
Comment 4 Andrew Shark 2024-03-03 16:47:51 UTC
I have checked now with linuxmintd/mint21.3-amd64 docker image, the /etc/os-release contains the debian:
ID_LIKE="ubuntu debian"

So initial setup works.