Giter Site home page Giter Site logo

bkw777 / mainline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shg8/ukuu

1.0K 24.0 72.0 7.42 MB

Install mainline kernel packages from kernel.ubuntu.com

License: GNU General Public License v3.0

Shell 4.04% Makefile 6.20% Vala 89.75%
ubuntu-kernel mainline-kernel kernel linux mainline mainline-ppa ukuu vala

mainline's Introduction

Mainline Kernels

A tool for installing Ubuntu Mainline Kernel Builds onto debian-based distributions.

Main window screenshot

Main window screenshot

Sort by the Lock column to collect all the locked kernels together sort by locked

Sort by the Status column to collect all the installed kernels together sort by status

Sort by the Notes column to see all kernels with any remarks sort_by_notes

About

mainline is a fork of ukuu

Changes

  • Changed name from "ukuu" to "mainline"
  • Removed all GRUB / bootloader options
  • Removed all donate buttons, links, dialogs
  • Removed all unused & unrelated code
  • Removed all TeeJee lib code
  • Better cache management
  • Rewrote all exec() commands not to use temp files, temp bash scripts, and temp directories
  • Rewrote the desktop notification scripts to be more reliable
  • Reduced dependencies
  • Per-kernel user notes
  • Pinning/locking kernels
  • Verify .deb file downloads with the sha256 hashes in the CHECKSUMS files
  • Customizable external commands for the terminal window and for root access
  • Support the alternative flavors besides "generic", ex: lowlatency, generic-64k, server, virtual, etc

Features

  • Download the list of available kernels from the Ubuntu Mainline PPA
  • Display, install, and uninstall mainline-ppa kernels conveniently, gui and cli
  • For each kernel the associated headers & modules packages are downloaded, installed, or uninstalled together
  • .deb file downloads are verified with the sha256 hashes from the CHECKSUMS files
  • Optionally monitor and send desktop notifications when new kernels become available

Not Features

  • Care if the kernels run or boot or work well or are compatible with your system. The kernel deb packages are produced by someone else, and with no warranty. When they work, great, when they don't, don't use them. This app intentionally does not even touch a single grub or bootloader file itself. All it does is download .deb packages that the ubuntu kernel team produces, and runs dpkg to install them the same way you would manually.

See the comment by "setuid":

Note that these kernel packages are missing quite a bit that would be needed on most systems, and many dkms modules and other tools won’t work with them (NVIDIA drivers, VMware modules, etc.).

These packages also will not install nor boot on ARM64 (RPi4 for example), despite being spun for those architectures because they lack DTBs and correctly aligned headers.

On AMD64, you’ll find that the cloud tools and tools packages are missing, and installing them would try to bring in libssl3 and an incompatible libc6 from a newer release of Ubuntu, which will most-certainly break userland.

You have been warned.

This is all true.

Additionally the kernels are unsigned, and so they won't boot on a system with secure boot enabled.

The libssl & libc issue they mention were transient issues that naturally passed as time went on and most users systems caught up, but new examples of the same kind of issue are bound to appear again from time to time as the kernel.ubuntu.com team updates their build environment ahead of most users.

That said, I have been running these daily for several years. I just don't need any nvidia or vmware kernel modules nor do I use secure boot.

Install

The PPA is kindly maintained by cappelikan

sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

There are also .deb packages in releases, generated by make release_deb

Build

sudo apt install libgee-0.8-dev libjson-glib-dev libvte-2.91-dev valac aria2 lsb-release make gettext dpkg-dev
git clone https://github.com/bkw777/mainline.git
cd mainline
make
sudo make install

Usage

Look for System -> Mainline Kernels in your desktop's Applications/Start menu.

Otherwise:
CLI

$ mainline --help
$ mainline

GUI

$ mainline-gtk

Note that neither of those commands invoked sudo or pkexec or other su-alike.
The app runs as the user and uses pkexec internally just for the dpkg command.

Buttons

[ Install ] - downloads and installs the selected kernel

[ Uninstall ] - uninstalls the selected kernel(1)

[ PPA ] - launches your default https:// handler to the web page for the selected kernel
If no kernels are selected (when first launching the app before clicking on any) launches the main page listing all the kernels.
Use this to see the build summary and CHANGES files.

[ Uninstall Old ] - uninstalls all installed kernels below the latest installed version(1)

[ Reload ] - deletes, re-downloads, and re-reads the local cached copies of all the index.html's from the mainline-ppa web site, and regenerates the displayed list.

[ Settings ] - access the settings dialog to configure various options

[ About ] - basic info and credits

[ Exit ] - order pizza

(1) The currently running kernel and any locked kernels are protected and ignored.

Pinning / Locking

The Lock checkboxes serve as both whitelist and blacklist.

A locked kernel will be frozen in whatever state it was in when you locked it.
If it was installed, it will now stay installed.
If it was not installed, it will now stay uninstalled.

All forms of install/uninstall commands & methods are affected.
The gui "Install" and "Uninstall" buttons are inactive on that kernel.
The cli "--install" and "--uninstall" commands ignore that kernel.
The gui "Uninstall Old" button and the cli "--uninstall-old" command ignore that kernel.
The cli "--install-latest" and "--notify" for the background notification ignore that kernel.
The kernel is still visible, you can still write notes and pull up the PPA info page and toggle the lock to unlock it.

This can be handy to keep a stock distribution kernel from being uninstalled by "Uninstall Old", or prevent a known buggy kernel from being installed by "--install-latest" and prevent "--notify" from generating a notification to install it.

Notes

Clicking on the Notes field allows to attach arbitrary note text to a kernel.

Display Sorting

All column headers are clickable to re-sort the list.
The "Kernel" coulumn sorts by the special kernel version number sort where "1.2.3-rc3" is higher than "1.2.3-rc2", yet "1.2.3" is higher than "1.2.3-rc3".
Sorting on the "Lock" column is a way to see all locked kernels together.
Sorting on the "Status" column is a way to see all installed kernels together.
Sorting on the "Notes" column is a way to see all kernels that have any notes together.

Help / FAQ

General debugging

The -v or -v # option, or the environment variable VERBOSE=#, enables increasing levels of verbosity.
Example: $ mainline-gtk -v 3 or $ VERBOSE=3 mainline-gtk
The -v option may also be used alone or repeated. The default with no -v is the same as -v 1.
Each additional -v is like adding 1. ie: -v -v -v is like -v 4 or VERBOSE=4
0 = silence all output
1 = normal output (default)
2 = same as --debug
3 = more verbose
4 = even more
5+ mostly just for uncommenting things in the code and recompiling, not really useful in the release builds

A few lines of output are printed before the commandline has been parsed, so -v 0 doesn't silence them.
The environment variable is read earlier in the process and can silence all output.
VERBOSE=0 mainline install-latest --yes

The exit value is also meaningful.
VERBOSE=0 ;mainline install-latest --yes && mainline uninstall-old --yes

If Uninstall Old doesn't remove some distribution kernel packages

Use your normal package manager like apt or synaptic to remove the parent meta-package:
$ sudo apt remove linux-image-generic
Then Uninstall Old should successfully remove everything.

Secure Boot

Possibly useful, I have not tried:
https://github.com/M-P-P-C/Signing-a-Linux-Kernel-for-Secure-Boot

Kernels with broken dependencies

The build environment that builds the kernels is newer than most installed systems, and so the built kernels occasionally but regularly break compatibility with all current release and older systems.

The only convenient, practical, clean, safe resolution is "Update your system to the level that includes those dependencies naturally.".
And don't install any newer kernels until that is possible. And if that means the next version of Ubuntu isn't even due to be released for another 6 months, so be it.

Otherwise, here are some hack options you may amuse yourself with (substitute "libssl3" for whatever is actually broken for you today): Install libssl3
TLDR: monkey with apt configs to add beta repos and use priority settings and pinning to try to only let certain packages auto update from them, or manually download specific .deb files from the beta repos and install them with dpkg.

See Not Features

Missing kernels

Only viable installable kernels are shown by default. Failed or incomplete builds for your platform/arch are not shown unless the "Hide Invalid" setting is un-selected.
If you think the list is missing a kernel, press the "PPA" button to jump to the mainline-ppa web site where the .deb packages come from, and look at the build results for the missing kernel, and you will usually find that it is a failed or incomplete build for your arch (ex: amd64), and can not be installed.

TODO & WIP

  • Replace Process.spawn_async_with_pipes("aria2c ...",...) with libcurl
  • Make the background process for notifications detect when the user logs out of the desktop session and exit itself
  • Move the notification/dbus code from the current shell script into the app and make an "applet" mode
  • Combine the gtk and cli apps into one, or, make the gtk app into a pure front-end for the cli app, either way
  • Replace the commandline parser
  • Toggles to show/hide the rc or invalid kernels in the main ui instead of going to settings
  • Right-click menu for more functions for a given kernel, such as reloading the cache just for a single kernel to check for new build status etc, without adding 18 buttons all over the ui.
  • Properly handle when a kernel has multiple builds like 5.16

hints

  • cron job to always have the latest kernel installed.
    If you install this, you should disable the notifications in settings.
$ sudo -i
# cat >/etc/cron.d/mainline <<-%EOF
	# Check for new kernels on kernel.ubuntu.com every 4 hours, randomize over ~2.8 hours
	1 */4 * * * root sleep ${RANDOM:0:4} ;VERBOSE=0 ;mainline --install-latest --yes && { mainline --uninstall-old --yes ;for a in /home/*/.Xauthority ;do echo [[ -s $a ]] && DISPLAY=:0.0 XAUTHORITY=$a notify-send -t 0 -a mainline -i mainline "Mainline Kernels" "New kernel installed" ;done ; }
%EOF
  • external terminal app

sudo apt install cool-retro-term

settings

cool-retro-term

mainline's People

Contributors

albanobattistella avatar amv007 avatar antonincms avatar bkw777 avatar cappelikan avatar chaeya avatar char8t avatar cntrump avatar dandv avatar danik2343 avatar eson57 avatar huluti avatar kelebek333 avatar leowinterde avatar lucaschollet avatar matthaiks avatar muzena avatar noah1510 avatar sanderjo avatar simonis avatar sylt avatar teejee2008 avatar tobyw121 avatar totalcaesar659 avatar tovam avatar valdi74 avatar vasiliskos avatar venerdi2 avatar viksok avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mainline's Issues

Filtered default view?

I'd love to have a way to filter the list so it will only show me, for example:

  • The latest available mainline kernel
  • All currently installed kernels
  • The latest available mainline kernel for each major.minor kernel version installed.

Essentially I'd love to see like a tree view that has those things visible by default, and other versions show up with a filter. Something like the below, visible all at once in the main pane:

5.9 (latest, not installed)

  • 5.9.12 (mainline, latest)

5.8

  • 5.8.18 (mainline, latest)
  • 5.8.0-31.33 (official, running)

5.4

  • 5.4.81 (mainline, latest)
  • 5.4.72 (mainline)
  • 5.4.0-56.62 (official)
  • 5.4.0-56.60 (official)

I never care about versions I haven't installed that aren't latest in their Major.minor, really.

get_username() reads file /etc/passwd to get user name.

its actually get_user_id_from_username() doing it

This is not working on system using NIS or LDAP or any other system that has the user information not in the /etc/passwd file. The user do not exist and the string in empty then mainline is trying to open/use the cache in / instead of in ~/ the home directory of the user.

you have to use the glibc function getpwuid() getpwnam() for this to work correctly on all linux systems.

Zfs don t load kernel RC

Hi, Hello. I installed Ubuntu 20.10 Groovy, daily build but I think it doesn't work with Ubuntu Focal either. I installed kernel 5.9 with mainline. With ext4 works, with zfs don’t work. Kernel 5.8 works because it is not in development. Solution?

1A623FFE-9981-4014-A7E8-CE586779128E

[Feature/Idea] Update software name for recognition

It'd be a good idea to give Mainline a more unique name. This will allow users to better reference it outside of the project (such as the well known "UKUU" it's forked from).

A more unique name will bring more users, and hopefully more contributors.

5 second ideas:
-KernelPop? (like popcorn)
-UMKU: Ubuntu Mainline Kernel Updater
-FUKUU: Forked Ubuntu Kernel Update Utility

[Feature] Add "Clear cache" button

That would be useful to add a clear cache button for when "cache poisoning" happens, like with #43
Maybe not top priority as the tool targets power users but still quite practical I think

Edit: I just realized there is a "--clean-cache" command but I still think it would be nice to have a button

Applet mode?

Possible enhancement.
Re-impliment notify-loop.sh, notify-send.sh, and notify-action.sh all in vala in the app itself and get rid of the shell scripts.

This is just an idea. I have no idea if I can figure out how to actually do it, or if it's even a good idea. I just want to write it down somewhere for consideration and/or to serve as a back burner TODO/Wishlist item for reference.

The scripts are now working MUCH better than originally, but notify-loop.sh still has a problem that I just don't know if there is any proper fix for. The problem is it keeps running after the user logs out of their desktop session. I have it now killing it's predecessor each time a new instance starts up, so there is generally only one un-wanted instance running all the time, but it's still basically wrong for it to keep running after the session logs out.

Apparently reason it keeps running is that it's not actually started by the desktop environment. It's started by systemd-logind.

You CAN tell systemd to kill all the processes it started up by putting KillUserProcesses=true in /etc/systemd/logind.conf

That would kill it at log-out, but there are several problems with that:

  • It's wong for any app to require the user to make that kind of system level config in order for the app to work. If your distribution doesn't already have that option set by default, or if you have intentionally set that option the way you want it, it's not some dinky little apps place to expect you to change that for it's convenience.

  • That setting affects ALL forms of user login session, including ssh logins, and kills "screen" sessions or any other intentionally forked background task that you might have intentionally started. Systemd provides a special command that you can use to prevent it from killing a particular process, but I find that annoying and unreasonable. I already did all I should have to do to make a process live after ending it's parent process, just by using "screen" or tmux or nohup or setsid etc in the first place. Now I have to also do some arcane systemctl command that I will have to google up to remember what it is every damned time...
    So, I don't consider that an acceptable official answer for how to use mainline, and none of the other desktop session components need any such crap to close at the end of the session.

But the other desktop components that ARE started by the desktop environment itself, and so, killed by the desktop environment rather than by systemd, there seems to be no good standard for how those are defined or managed.

~/.conf/autostart/*.desktop works for any desktop, but if I wanted the LXQT equivalent of that, then it's an LXQT-specific config file that means nothing to any other desktop environment. Gnome has something else, KDE has something else... I don't really want to try to support a handfull of different desktops with their own custom methods, especially when I don't run them and am not testing them, and then also necessarily simply failing to support all other desktops.

So I'm thinking a possible answer is to keep using systemd to launch the process, but instead of the simple notify-loop.sh, have it start an executable that connects to dbus and/or an X display, and then that app could reliably close itself based on dbus messages and/or loss of X connection. That would be mainline or mainline-gtk itself with some kind of new applet mode, probably invoked by a "--applet" flag.

linux-tools?

Is it possible to get linux-tools installed for the mainline kernels?

5.8 or 5.8.1 not listed

I'm using elementaryOS 5.1.6 (bionic based) and I am unable to see 5.8.x in the list. 5.8.1 was there momentarily at first startup but since then I can only see 5.7.1 on the top. I checked other issues and, tried cleaning cache and creating 5.8.1 dir but nothing seems to be working.
Screenshot from 2020-08-16 12-10-09

Fix temp dir / temp file handling

  • root process should not write files in a users home dir
  • downloading the index to a local temp file is too simple to be failing this often when there is internet access
  • if the root and user processes need access to the same info, then store it somewhere central, either world-writable, or only writable by root and only root ever updates the index or cache.
  • but, probably there is a way to re-arrange things so that the root and user processes do not both need access to the same files.
Cache: /home/bkw/.cache/mainline
Temp: /root/.temp/mainline/AGn2mhQf
...
E: Error moving file /root/.temp/mainline/AGn2mhQf/54hX7Qtl/index.html: No such file or directory
E: Failed to move file: '/root/.temp/mainline/AGn2mhQf/54hX7Qtl/index.html' → '/home/bkw/.cache/mainline/index.html'

Not updating beyond 5.9.8

Heya.

Thanks for the great work!

Starting with version 5.9.8, it's no longer updating on my machine (HP ProBook 445 G7, Ubuntu 20.04).
I can see the entries (all the way to 5.9.11), I don't get any error, it's downloading and everything, but the new kernel is not available to boot from or present in /boot.

Here's what Mainline tells me:
image

Enough free space on all partitions, including /boot...
Any ideas? Where can I find some logs?

Bootentry not updated ZFS on root

Using Ubuntu 20.04.1 LTS installed with zfs on root.
Tried to install the latest kernel (5.8.1) but it did not create a boot entry nor did it update an existing one.

weird behavior install kernel

Screenshot from 2020-07-15 15-59-47

as you can see, the current kernel is 5.7.8-050708 but it is not listed in the kernel list.
When I try to install the Kernel im already running I get this error.

Need to load Kernel first

Hey everyone,
Although my issue is probably not directly related to the Mainline Kernel Installer, i am hoping to find some help over here.

Main issue:
I am running Ubuntu 20.04LTS in Dual Boot with Windows and trying to install the Kernel 5.7.0. Installation works fine and i can select the new Kernel in the advanced option Menu when rebooting but then i always get the error:

Loading Linux 5.7.0-050700-generic …
error: /boot/vmlinuz-5.7.0-050700-generic has invalid signature.
Loading initial ramdisk …
error: you need to load the kernel first.

Press any key to continue…_

I already tried out different Kernels but always getting the same message. Maybe someone more experienced can help me out?
Would really appreciate it!

A few build from source and install from deb issues

Operating System: KDE Neon LTS (Ubuntu 20.04 Focal)

  1. When installing the deb release, it gives an error saying dependencies not met for libjson-glib 1.5.2 , focal 20.04 which is the LTS ubuntu release has only up to libjson-glib 1.4.4

https://packages.ubuntu.com/search?keywords=libjson-glib&searchon=names

  1. When trying to compile from source, it also gave me an error of xgettext not installed. Installing "gettext" fixed the issue but might want to add that to the install dependency for building.

Incomplete installs of several latest mainline kernels

Several of the latest mainline kernels don't have all files getting listed and as a result, I'm unable to install them.
e.g.:
5.9.13
5.9.11
5.9.9
5.9.5

I can for example install 5.9.12 but can't install 5.9.11 nor 5.9.13.

error compile on ubuntu 20.04 focal

src/Gtk/TerminalWindow.vala:212.19-212.29: error: Argument 1: Cannot convert from char[]' to unowned uint8[]?'
term.feed_child(c.to_utf8());
^^^^^^^^^^^

background notification process doesn't end when user logs out

If you log out of your desktop without rebooting, and log in again, the new desktop session starts up a new instance of the background process that generates the desktop notifications, but the old process is still there too. If you log out and in again, they just keep on accumulating.

try
"ps -ef |grep mainline"

log out (not reboot or shutdown, just log out)
look at the ps command again.

Compilation error on Ubuntu 16.04 Xenial

The following error appears when try to compile mainline with "make" in ubuntu 16.04 xenial.

src/Utility/TeeJee.ProcessHelper.vala:149.28-149.39: error: The name Signal' does not exist in the context of Posix'
Posix.kill (process_pid, Posix.Signal.TERM);
^^^^^^^^^^^^
src/Utility/TeeJee.ProcessHelper.vala:155.27-155.38: error: The name Signal' does not exist in the context of Posix'
Posix.kill (childPid, Posix.Signal.TERM);
^^^^^^^^^^^^
Compilation failed: 2 error(s), 3 warning(s)

I tried a fix by changing:

Posix.kill (process_pid, Posix.Signal.TERM);

to Posix.SIGTERM

Error trying to install v5.7

Hi

I can't install the latest kernel version 5.7, I tried downloading it manually from the website using the browser and it works.

Debug Log
$ mainline --install-latest --debug --yes > error_mainline_5.7.log
error_mainline_5.7.log
(just changed my home dir with $HOME)

If you need more info just ask

Bye

[Feature Request] Option to select default kernel to boot with

Would be really helpful to have an option for selecting the kernel you want to boot with. I fairly often need to jump between kernel versions for software compatibility, but there's no way I know of to select one persistently. Not sure how difficult this would be to implement.

Right now, when I'm booting Pop!_OS it's either boot normally and run the most up-to-date kernel currently installed, or run "old kernel" which the behaviour is inconsistent and requires selecting this at every boot.

I also often have to purge all old kernels to be able to get the one I want to boot (i.e. if running 5.7 but want to boot 5.6.12, I first purge everything, then only reinstall 5.6.12, then reboot and try to select old kernel. Not a clean process)

support debhelper 10

debian wants to depreciate debian/compat level 9, but compat level 10 fails when trying to build the deb package.
"make" and "make install" work fine, only "make deb" or "make release_deb" fails.

with debian/compat = 9:
builds fine.

with debian/compat = 10:
two vala files are ignored, for no reason I can fathom

cc1: fatal error: /build/mainline-1.0.14/src/Utility/TeeJee.ProcessHelper.vala.c: No such file or directory
compilation terminated.
cc1: fatal error: /build/mainline-1.0.14/src/Utility/TeeJee.System.vala.c: No such file or directory
compilation terminated.

These two files are listed as sources in Makefile the same way as the other files which are built normally.
Relevant excerpts from Makefile:

common_vala_files := src/Common/*.vala src/Utility/*.vala
...
valac ... $(common_vala_files) $(gui_vala_files) -o $(@)
...
valac ... $(common_vala_files) $(tui_vala_files) -o $(@)

The .vala files that generate the missing .vala.c files are included in the globbing pattern in common_vala_files, and are included on the valac command line for both the commandline and -gtk targets.

The full build log does not show any earlier error where the .vala files were found and tried but failed to generate their .vala.c file. The two .vala.c files are missing because the two .vala files were simply ignored for some reason.

And of course, the app has already been building just fine for years, so that would seem to prove that the Makefile is correct.

Only when setting debian/compat to 10, it fails like this.

--clean-cache doesn't work

bkw@negre:~/src/mainline$ mainline --clean-cache
mainline v1.0.6
E: Error creating directory /tmp/mainline/CnLmbwrH: Permission denied
E: Failed to create dir: /tmp/mainline/CnLmbwrH
Distribution: Ubuntu 19.10
Architecture: amd64
Running kernel: 5.6.7-050607-generic
Kernel version: 5.6.7-050607-generic
Cache: /home/bkw/.cache/mainline
Temp: /home/bkw/.temp/mainline/BK5nHwIi
bkw@negre:~/src/mainline$ du -sh ~/.cache/
2.8G    /home/bkw/.cache/
bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/
700M    /home/bkw/.cache/mainline/
bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/*
70M     /home/bkw/.cache/mainline/v5.5.13
70M     /home/bkw/.cache/mainline/v5.5.4
70M     /home/bkw/.cache/mainline/v5.5.6
70M     /home/bkw/.cache/mainline/v5.5.7
70M     /home/bkw/.cache/mainline/v5.5.8
71M     /home/bkw/.cache/mainline/v5.6.1
71M     /home/bkw/.cache/mainline/v5.6.2
71M     /home/bkw/.cache/mainline/v5.6.4
71M     /home/bkw/.cache/mainline/v5.6.5
71M     /home/bkw/.cache/mainline/v5.6.7
bkw@negre:~/src/mainline$

unrecognized proxy format

all_proxy=socks5h://127.0.0.1:1080 mainline --check

mainline 1.0.12
Distribution: Ubuntu 20.04.1 LTS
Architecture: amd64
Running kernel: 5.9.0-050900-generic
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
  -> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format


E: Internet connection is not active
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
  -> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format


E: Internet connection is not active
Fetching index from kernel.ubuntu.com...
OK

not going to debuild from source

Now running lintian mainline_1.0.1ubuntu1_source.changes ...
E: mainline source: build-depends-on-essential-package-without-using-version build-depends: bash
W: mainline source: missing-license-paragraph-in-dep5-copyright gpl-3 (paragraph at line 5)
Finished running lintian.

Tries to cd to location before download?

Mainline Kernel Installer 1.0.12

When trying to install kernel 5.7.8 the program tries to cd to the directory where the kernel would be found, but hasn't been downloaded yet.

Screenshot from 2020-07-09 07-21-27

Ability to add custom sources?

For example, the Xanmod or Liqourice kernels. Or even the Zen kernels. The realtime kernels would be good too. I don't see a place to add any of these or a way to do it. I think it would be a good feature.

[Feature request] Sign kernel for EFI

Thanks for the continuation of the project.

Would you be able to add an option to automatically sign the installed kernel for UEFI? Currently all the kernels I install are generating the below error. This error would be fine but the issue is it comes up every time I interact with apt. Additionally, it requires Secure Boot to be disabled, which I don't really like.

image

Downloading error

Downloading: 'linux-image-unsigned-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR

Downloading: 'linux-modules-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR

Downloading: 'linux-headers-5.3.7-050307_5.3.7-050307.201910171955_all.deb'...
ERROR

Downloading: 'linux-headers-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR

Disambiguate the Purge button.

purge not remove selected kernel but all (without running and latest)...

if i select example "5.7.6" and click to "Purge" button, then is not purge only "5.7.6",
but ask for remove all kernel without one running and latest (if is newer that running)...

if i use Remove button then work fine, remove selected kernel, but of course keep is listed as "^rc" in "dpkg -l"

output from Purge:

mainline 1.0.12
Distribution: Ubuntu 18.04.4 LTS
Architecture: amd64
Running kernel: 5.7.8-050708-generic
----------------------------------------------------------------------
Found installed: 5.3.0.62.115
Found installed: 5.3.18-050318.201912181133
Found installed: 5.7.8-050708.202007090835
Found installed: 5.7.9-050709.202007160732
Found installed: 5.7.6-050706.202006241631
Found installed: 5.3.0-62.56~18.04.1
Found installed: 5.7.7-050707.202007010943
----------------------------------------------------------------------
----------------------------------------------------------------------

The following kernels will be removed::
 ▰ 5.7.7
 ▰ 5.7.6
 ▰ 5.3.18
 ▰ 5.3.0.62.56
 ▰ 5.3.0.62

Continue ? (y/n): 

What is Purge?

I just installed the app, I see that the Purge button is clickable already, yet Remove is not.

Donate

Really appreciate the continuation of this project as a GPL licensed software.

Add a donate button please, I'll send you 20$.

how to set proxy?

I met the error with running mainline:
E: Internet connection is not active
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
-> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format

where could I configure the proxy? Thank you very much.

Regex exprerssions not correctly formed!!!

Given

rex_header_all = new Regex("(?:" + NATIVE_ARCH + """/|>)?linux-headers-[a-zA-Z0-9.\-_]*_all.deb""");
Where NATIVE_ARCH = 'arm64' and the expression equals:

(?:arm64/|>)?linux-headers-[a-zA-Z0-9.\-_]*_all.deb
Should not match the following :

&nbsp;&nbsp;<a href="amd64/linux-headers-5.8.12-050812_5.8.12-050812.202009261732_all.deb">amd64/linux-headers-5.8.12-050812_5.8.12-050812.202009261732_all.deb</a><br>

However it does!

Because arm64 does not equal amd64. Otherwise why bother explicitly providing NATIVE_ARCH?

notification action button doesn't work

Background:
The latest version uses notify-send.sh instead of notify-send to generate the desktop notifications.
https://github.com/vlevit/notify-send.sh

This allows a few things:

The notification looks better, it says "mainline" instead of "notify-send".

The notification can now have one or more action buttons right in the notification itself. This is neater than the old way with both a desktop notification AND a redundant popup window just to supply an "Install" button (which didn't even work at least for me).

So initially, notifications now include a "Show" button, which just launches mainline-gtk.

It allows multiple buttons, so we can add more buttons for "Install" or "Cancel" or maybe even "Blacklist" later. There is also an option for a default action from clicking anywhere on the notification instead of having a button.

The problem is:

This button DOES work, but only if you press it fairly soon after the notification was generated. Once the notification is some number of seconds old, the button no longer has any effect.

I have partially debugged it, just enough to show that it's something in notify-send.sh or notify-action.sh that stops working. I can say that the action command is not attempted, meaning, it's NOT that the action command is attempted but it crashes or exist for some environmental reason. It's never attepted at all.

I'm not 100% clear on how the interaction between notify-send.sh and notify-action.sh is supposed to work yet, but it seems like notify-send.sh runs notify-action.sh as a kind of background co-process to sit and wait and listen for a dbus event from the notification button, and the monitor process is either exiting or it's failing to receive the dbus event. For whatever reason not known yet, it never tries to run the specified action command. It never tries, not that it tries and the command fails.

So this is probably a bug in notify-send.sh and I probably need to submit an issue there. Looking at their repo, the action feature seems fairly new, so maybe it just needs a little more work.

Seg fault on fresh 18.04.5 install

Thanks for taking on the project!

I'm getting a seg fault when running --check or --install

Here's the gdb output with strace:

write(1, "Running kernel: 4.15.0-117-gener"..., 35Running kernel: 4.15.0-117-generic
) = 35
futex(0x7ffff72f4f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
pipe2([3, 4], 0)                        = 0
pipe2([5, 6], 0)                        = 0
pipe2([7, 8], O_CLOEXEC)                = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ffff7fe5750) = 214546
close(4)                                = 0
close(6)                                = 0
close(8)                                = 0
read(3, "", 8)                          = 0
close(3)                                = 0
select(8, [5 7], NULL, NULL, NULL)      = 2 (in [5 7])
read(5, "", 4096)                       = 0
close(5)                                = 0
read(7, "", 4096)                       = 0
close(7)                                = 0
wait4(214546, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 214546
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=214546, si_uid=0, si_status=0, si_utime=2, si_stime=0} ---
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ffff3b7f000
mprotect(0x7ffff3b80000, 8388608, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7ffff437ee70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ffff437f9d0, tls=0x7ffff437f700, child_tidptr=0x7ffff437f9d0) = 214547
futex(0x7ffff72f4f18, FUTEX_WAKE_PRIVATE, 1D: query_thread() App.show_prev_majors: 0
D: query_thread() App.hide_unstable: true
) = 1
nanosleep({tv_sec=0, tv_nsec=500000000}, D: highest_maj = 5
D: check_installed()
----------------------------------------------------------------------
D: query_installed_packages()
D: dir_create(/tmp/.mainline_6lZDkZDJ)
D: Created directory: /tmp/.mainline_6lZDkZDJ
0x7fffffffe450) = 0
nanosleep({tv_sec=0, tv_nsec=500000000}, 0x7fffffffe450) = 0
nanosleep({tv_sec=0, tv_nsec=500000000}, D: file_write(/tmp/.mainline_6lZDkZDJ/15997310454283254965)
D: file_parent(/tmp/.mainline_6lZDkZDJ/15997310454283254965)
D: dir_create(/tmp/.mainline_6lZDkZDJ)
D: File saved:/tmp/.mainline_6lZDkZDJ/15997310454283254965
D: File deleted: /tmp/.mainline_6lZDkZDJ/15997310454283254965
D: dir_delete():Deleted: /tmp/.mainline_6lZDkZDJ
Found installed: 4.15.0.117.104
D: Package: linux-headers-generic
D: Package: linux-image-generic
D: Package: linux-generic
Found installed: 4.15.0-117.118
D: Package: linux-modules-extra-4.15.0-117-generic
D: Package: linux-image-4.15.0-117-generic
D: Package: linux-libc-dev
D: Package: linux-headers-4.15.0-117
D: Package: linux-modules-4.15.0-117-generic
D: Package: linux-headers-4.15.0-117-generic
----------------------------------------------------------------------
----------------------------------------------------------------------
D: check_updates()
 <unfinished ...>) = ?
+++ killed by SIGSEGV +++

Thread 2 "mainline" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff437f700 (LWP 222817)]
0x0000555555562d25 in linux_kernel_check_updates ()

Here's the stack:

#0  0x0000555555562d25 in linux_kernel_check_updates ()
#1  0x0000555555560465 in linux_kernel_query_thread ()
#2  0x000055555555eb17 in _linux_kernel_query_thread_gthread_func ()
#3  0x00007ffff7053175 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff6a296db in start_thread (arg=0x7ffff437f700) at pthread_create.c:463
#5  0x00007ffff6752a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.