[idea] send message if user use EOL kernel

With compare-branch we can view if kernel is not in unstable branch
if not: it’s EOL

json branch-compare is too big to download so create with same (or other) cron a small eol.json (or txt)
After, A pacman hook or pamac / msm(or mntray) can use this file for alert user ?

  • you use EOL kernel warning …
  • or? EOL installed (but not used) …

Doesn’t Manjaro Setttings Managers notifier give a notification if a user uses a non-supported kernel?

I believe it used to at least.

1 Like

is not hard coded ? and not always updated …
Not found in code how to detect eol but Recommended is 54 ?

idea is precisely to be able to automatically centralize this information so that the manjaro tools can use it if they need or want

I thought it would check the kernel list and if the one you have installed is not in the repo, it would display that notification.

The recommended kernel is hardcoded I think, but linu54 is still the latest LTS and therefore the recommended kernel.

yes, it’s not a EOL kernel but old kernel. isn’t it too late? to get the info we must already have done this update (-Sy) : before update, kernel exists in local database
me is for send warning before

I tried setting up something like this in pamac gnome integration some years ago, but repo compare would improve it. Also, I’m not sure if it actually ever worked…

python script test “proof of concept” x86 with branch-compare data (file too big to download in prod)
linux57 is in unstable : add linux58 for test output

#!/usr/bin/python
import subprocess
import urllib.request, json

# curl -s "https://manjaro.org/branch-compare/datas.x86_64.txt" | python3 -m json.tool | less 
url = "https://manjaro.org/branch-compare/packages.x86_64.json"

response = urllib.request.urlopen(url)
data = json.loads(response.read())['data']
# pkg only in stable/testing and in "core" repo
data = [p for p in data if (p[1]['testing'] == "n/a" or p[1]['unstable'] == "n/a") and p[1]['repository'] == "core" ]
eofs = set([p[0].split('#')[0] for p in data]) # want only names

#######      eofs.add('linux58') # for test

outk = subprocess.run('mhwd-kernel -li | grep -o "linux.*"',
                         stdout=subprocess.PIPE, 
                         shell=True,
                         text=True).stdout.replace(')','')
kernels_user = set(outk.splitlines())
currentk = subprocess.run('mhwd-kernel -li | grep -o "(linux.*)"',
                         stdout=subprocess.PIPE, 
                         shell=True,
                         text=True).stdout
currentk = currentk[1:-2]

print("EOF:", eofs, end="\n\n")
print("User kernels:", kernels_user)
print("current kernel:", currentk, end="\n\n")

diff = eofs.intersection(kernels_user)
if diff:
    print("common packages:", diff, " Warning kernel installed and EOL")
if any([ currentk in i for i in eofs]):
    print(f"ALERT, you use a EOL kernel {currentk}")

linux57 is in unstable : add linux58 for test output

EOF: {'linux58'}

User kernels: {'linux58', 'linux57', 'linux419'}
current kernel: linux58

common packages: {'linux58'}  Warning kernel installed and EOL
ALERT, you use EOL kernel linux58
2 Likes

Would this help or could be made as mentioned here?
https://forum.manjaro.org/t/msn-and-mhwd-simplification-rework-graphical-concept/23730
Looking forward to know what your thoughts are, as coder and designer, about it :slight_smile: