Repository: elastic/go-sysinfo (go)

Issue:
Add linuxmint to debian family
This relates to https://github.com/elastic/beats/issues/12177#issuecomment-491898188.

We can add “linuxmint” to the OS family table in the Linux provider.

Pull request description:
Add linuxmint to the debian OS family
Add test data from Linux Mint 20 and categorize the OS as part of the debian family.
Linux Mint derives from Ubuntu which derives from Debian.

Fixes #52

```
root@97006b6dfe10:/etc# ls -la *release
-rw-r--r-- 1 root root 107 Apr  9  2020 lsb-release
lrwxrwxrwx 1 root root  21 Sep 28  2020 os-release -> ../usr/lib/os-release
```

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 902c4ef..e7c7bb1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,9 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Added
 
+- Added the Oracle Linux ("ol") platform to the "redhat" OS family. [#54](https://github.com/elastic/go-sysinfo/issues/54) [#115](https://github.com/elastic/go-sysinfo/pull/115)
+- Added the Linux Mint ("linuxmint") platform to the "debian" OS family. [#52](https://github.com/elastic/go-sysinfo/issues/52)
+
 ### Changed
 
-- Added the Oracle Linux ("ol") platform to "redhat" OS family. [#54](https://github.com/elastic/go-sysinfo/issues/54) [#115](https://github.com/elastic/go-sysinfo/pull/115)
 - Updated module to require Go 1.17. [#111](https://github.com/elastic/go-sysinfo/pull/111)
 - The boot time value for Windows is now rounded to the nearest second to provide a more stable value. [#53](https://github.com/elastic/go-sysinfo/issues/53) [#114](https://github.com/elastic/go-sysinfo/pull/114)
 
diff --git a/providers/linux/os.go b/providers/linux/os.go
index 19ff00c..b040200 100644
--- a/providers/linux/os.go
+++ b/providers/linux/os.go
@@ -51,7 +51,7 @@ var (
 // familyMap contains a mapping of family -> []platforms.
 var familyMap = map[string][]string{
 	"redhat": {"redhat", "fedora", "centos", "scientific", "oraclelinux", "ol", "amzn", "rhel"},
-	"debian": {"debian", "ubuntu", "raspbian"},
+	"debian": {"debian", "ubuntu", "raspbian", "linuxmint"},
 	"suse":   {"suse", "sles", "opensuse"},
 }
 


Test patch:
diff --git a/providers/linux/os_test.go b/providers/linux/os_test.go
index 422ab02..9d7a342 100644
--- a/providers/linux/os_test.go
+++ b/providers/linux/os_test.go
@@ -131,6 +131,22 @@ func TestOperatingSystem(t *testing.T) {
 		}, *os)
 		t.Logf("%#v", os)
 	})
+	t.Run("linuxmint20", func(t *testing.T) {
+		os, err := getOSInfo("testdata/linuxmint20")
+		if err != nil {
+			t.Fatal(err)
+		}
+		assert.Equal(t, types.OSInfo{
+			Type:     "linux",
+			Family:   "debian",
+			Platform: "linuxmint",
+			Name:     "Linux Mint",
+			Version:  "20 (Ulyana)",
+			Major:    20,
+			Codename: "ulyana",
+		}, *os)
+		t.Logf("%#v", os)
+	})
 	t.Run("redhat7", func(t *testing.T) {
 		os, err := getOSInfo("testdata/redhat7")
 		if err != nil {
diff --git a/providers/linux/testdata/linuxmint20/etc/lsb-release b/providers/linux/testdata/linuxmint20/etc/lsb-release
new file mode 100644
index 0000000..c27d35f
--- /dev/null
+++ b/providers/linux/testdata/linuxmint20/etc/lsb-release
@@ -0,0 +1,4 @@
+DISTRIB_ID=LinuxMint
+DISTRIB_RELEASE=20
+DISTRIB_CODENAME=ulyana
+DISTRIB_DESCRIPTION="Linux Mint 20 Ulyana"
diff --git a/providers/linux/testdata/linuxmint20/etc/os-release b/providers/linux/testdata/linuxmint20/etc/os-release
new file mode 120000
index 0000000..c4c75b4
--- /dev/null
+++ b/providers/linux/testdata/linuxmint20/etc/os-release
@@ -0,0 +1,1 @@
+../usr/lib/os-release
\ No newline at end of file
diff --git a/providers/linux/testdata/linuxmint20/usr/lib/os-release b/providers/linux/testdata/linuxmint20/usr/lib/os-release
new file mode 100644
index 0000000..825d928
--- /dev/null
+++ b/providers/linux/testdata/linuxmint20/usr/lib/os-release
@@ -0,0 +1,12 @@
+NAME="Linux Mint"
+VERSION="20 (Ulyana)"
+ID=linuxmint
+ID_LIKE=ubuntu
+PRETTY_NAME="Linux Mint 20"
+VERSION_ID="20"
+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=ulyana
+UBUNTU_CODENAME=focal