Skip to content

Commit f2f35b3

Browse files
author
Brian K. White
committed
More branding and building un-hardcoding. Remove all GRUB features. Move user cfg files to an ukuu dir.
1 parent 466dd2e commit f2f35b3

29 files changed

+1481
-1855
lines changed

BRANDING.mak

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is in Makefile format
2+
3+
# The goal is to define these values in a single place,
4+
# and have as many other places as possible all refer to this.
5+
6+
# Use Makefile syntax, as this is actually included by other makefiles,
7+
# but keep it simple enough that it can also be parsed easily by anything else.
8+
9+
BRANDING_SHORTNAME = ukuu
10+
BRANDING_LONGNAME = Ubuntu Kernel Update Utility
11+
BRANDING_VERSION = 18.9
12+
BRANDING_AUTHORNAME = Brian K. White
13+
BRANDING_AUTHOREMAIL = [email protected]
14+
BRANDING_WEBSITE = https://github.com/aljex/ukuu

BUILD_CONFIG

Lines changed: 0 additions & 6 deletions
This file was deleted.

MKDEB_TARGETS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is sourced by build-deb.sh , use bash syntax.
2+
3+
# DEBS[]
4+
# Optional: Specify the distributions & architectures to generate *.deb
5+
# files for. Defaut = single target same as host, IE: MKDEBS[disco]=amd64
6+
# Format is a bash associative array with [dist]=arch,arch,arch,...
7+
8+
# Don't try to build for xenial:
9+
# Gtk/TerminalWindow.vala:242.19-242.29: error: Argument 1: Cannot convert from `char[]' to `string'
10+
# term.feed_child(c.to_utf8());
11+
# ^^^^^^^^^^^
12+
13+
# just let it do the default
14+
#declare -A DEBS=(
15+
# [xenial]=i386,amd64
16+
# [cosmic]=i386,amd64
17+
# [disco]=i386,amd64
18+
#)

README.md

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,47 @@
22

33
This is a tool for installing the latest mainline Linux kernel on Ubuntu-based distributions.
44

5-
![](https://2.bp.blogspot.com/-76C_l3BcJyg/WNdzTpSoiKI/AAAAAAAAGKs/xOvB-LCH2cYiDpdbqWkeOLhY9I7TVACJwCLcB/s1600/ukuu_main_window.png)
6-
7-
### About This Fork
8-
9-
Since the original author stopped maintaining the free version of Ukuu and turned to a [paid version](https://teejeetech.in/tag/ukuu/), Several people have forked this project, and this is but one more. This fork started with https://github.com/stevenpwered/ukuu, and merged in https://github.com/cloyce/ukuu, and then I intend to add my own tweaks:
10-
11-
* First TODO Item (not done yet): STOP SAVING 6 GIGS OF KERNEL PACKAGES IN ~/.cache/ukuu HOLY GOBSMACK WTF ?????
12-
<pre>
13-
bkw@negre:~$ du -sh .cache/ukuu
14-
5.5G .cache/ukuu
15-
</pre>
16-
Until then: As a work-around, you can create a wrapper shell script or menu entry to always run "ukuu --clean-cache" after "ukuu-gtk"
17-
18-
* Remove all grub options. A kernel package installer has no business messing with grub. dpkg already does the necessary part, which is just adding/removing entries without making any other changes.
19-
20-
### Enhancements
21-
22-
* Option in settings to skip internet connection check
23-
24-
Please feel free to submit a feature request in the Issues section.
5+
![Main window screenshot](main_window.png)
256

267
### Features
278

28-
* Fetches list of kernels from [kernel.ubuntu.com](http://kernel.ubuntu.com/~kernel-ppa/mainline/)
29-
* Displays notifications when a new kernel update is available.
30-
* Downloads and installs packages automatically
31-
32-
### Screenshots
33-
34-
![](https://2.bp.blogspot.com/-76C_l3BcJyg/WNdzTpSoiKI/AAAAAAAAGKs/xOvB-LCH2cYiDpdbqWkeOLhY9I7TVACJwCLcB/s1600/ukuu_main_window.png)
35-
_Main Window_
36-
37-
![](https://2.bp.blogspot.com/-ATv4vsOVOnc/WNdztEZHJNI/AAAAAAAAGKw/1pOIuyu8ITo4z8mnMK6MfCZ3T_Nd4gQNQCLcB/s1600/ukuu_settings.png)
38-
_Settings Window_
39-
40-
![](https://4.bp.blogspot.com/-Y-1zhHcpk1M/WNd42_ybTyI/AAAAAAAAGLE/gLaBdWpoh54OGrvF81Ka1bCVJjZ0WqKrQCLcB/s1600/ukuu_console_options.png)
41-
_Console Options_
9+
* Fetches list of available kernels from [Ubuntu Mainline PPA](http://kernel.ubuntu.com/~kernel-ppa/mainline/)
10+
* Optionally watches and displays notifications when a new kernel update is available
11+
* Downloads and installs packages automatically
12+
* Display available and installed kernels conveniently
13+
* Install/remove kernels from gui
14+
* For each kernel, the related packages (headers & modules) are installed or removed at the same time
4215

4316
### Downloads & Source Code
4417
Ukuu is written using Vala and GTK3 toolkit. Source code and binaries are available from the [GitHub project page](https://github.com/aljex/ukuu).
4518

46-
### Build instruction
19+
### Build
20+
sudo apt install libgee-0.8-dev libjson-glib-dev libvte-2.91-dev valac
21+
git clone https://github.com/aljex/ukuu.git
22+
cd ukuu
23+
make
24+
sudo make install
4725

48-
#### Ubuntu-based Distributions (Ubuntu, Linux Mint, Elementary, etc)
49-
50-
in a terminal window:
51-
52-
sudo apt install libgee-0.8-dev libjson-glib-dev libvte-2.91-dev valac
53-
git clone https://github.com/aljex/ukuu.git
54-
cd ukuu
55-
make all
56-
sudo make install
26+
### About This Fork
27+
The original author stopped maintaining the original GPL version of ukuu and switched to a [paid license](https://teejeetech.in/tag/ukuu/) for future versions. So, several people have forked that project, and this is one.
28+
29+
### Enhancements / Deviations from the original author's final GPL version
30+
31+
* (from [stevenpowerd](https://github.com/stevenpowered/ukuu)) Option to skip internet connection check
32+
* (from [cloyce](https://github.com/cloyce/ukuu)) Option to include or hide pre-release kernels
33+
* Removed all GRUB options
34+
* Removed all donate buttons, links, dialogs
35+
36+
### Development Plans / TODO
37+
* Stop consuming over 5GB in ```~/.cache/ukuu``` with kernel package files
38+
:Until then: As a work-around, "ukuu --clean-cache" deletes the cache
39+
* Better (more automatic) initial sizes for the window and the columns in the kernel list display so you don't have to manually expand them
40+
* More efficient download & caching of info about available kernels, without the kernel packages
41+
* Clean up build warnings
42+
* Clean up run-time GTK warnings
43+
* Make http client configurable (curl/wget/other)
44+
* Reduce dependencies, stop using aptitude just to query installed packages when you can get the info from apt or even dpkg, use the same download client for everything instead of using both curl and aria
45+
* Customizable appearance
46+
* Option to specify kernel variant (generic, lowlatency, snapdragon, etc...)
47+
* Configurable version threshhold instead of arbitrary hard-coded "hide older than 4.0"
48+
* Improve the annoying pkexec behavior. It would be nicer to run lxqt-sudo or gsudo or pkexec etc one time for the whole session, and only have to enter a password once, instead of once per user action. But currently, if you do that, it creates files in the users home directory that are owned by root, which the user cannot then remove.

build-deb.sh

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,77 @@
11
#!/bin/bash
22
# Generates .deb packages
3-
# Requires (at least):
4-
# apt install ubuntu-dev-tools # install pbuilder-dist
5-
# pbuilder-dist cosmic i386 create # create a build environment
6-
# pbuilder-disp cosmic amd64 create # create a build environment
3+
# 2019 Brian K. White <[email protected]>
4+
# Requires (one time):
5+
# sudo apt install ubuntu-dev-tools # install pbuilder-dist
6+
# pbuilder-dist cosmic i386 create # create a build environment, repeat for all dists & arches
7+
# Requires (periodically):
8+
# pbuilder-disp cosmic amd64 update # update a build environment, repeat for all dists & arches
79

8-
backup=${PWD}
9-
DIR=${0%*/}
10-
cd $DIR
10+
################################################################################
11+
# functions
1112

12-
. ./BUILD_CONFIG
13+
abrt () { echo -e "${SELF}: ${@:-Failed}" >&2 ; exit 1 ; }
1314

14-
sh build-source.sh
15+
_mkdeb () {
16+
echo ""
17+
echo "=========================================================================="
18+
echo " ${SELF}: dist=\"${dist}\" arch=\"${arch}\""
19+
echo "=========================================================================="
20+
echo ""
1521

16-
build_deb_for_dist() {
22+
[[ "${dist}" ]] || abrt "_mkdeb(): Missing \"dist\""
23+
[[ "${arch}" ]] || abrt "_mkdeb(): Missing \"arch\""
1724

18-
dist=$1
19-
arch=$2
25+
# check if base.tgz exists
26+
unset a
27+
[[ "${arch}" == "${host_arch}" ]] || a="-${arch}"
28+
b=~/pbuilder/${dist}${a}-base.tgz
29+
[[ -f ${b} ]] || abrt "Missing ${b}\nRun \"pbuilder-dist ${dist} ${arch} create\""
30+
# TODO - check if base.tgz is old, and automatically run "pbuilder-dist ... update"
2031

21-
echo ""
22-
echo "=========================================================================="
23-
echo " build-deb.sh : $dist-$arch"
24-
echo "=========================================================================="
25-
echo ""
32+
mkdir -pv release/${dist}/${arch}
2633

27-
mkdir -pv release/${arch}
34+
CMD="pbuilder-dist ${dist} ${arch} build release/source/${BRANDING[SHORTNAME]}*.dsc --buildresult release/${dist}/${arch}"
35+
${CMD} || abrt "Failed: \"${CMD}\""
2836

29-
echo "-------------------------------------------------------------------------"
37+
mv release/${dist}/${arch}/${BRANDING[SHORTNAME]}*.deb release/${dist}/${BRANDING[SHORTNAME]}-v${PKG_VERSION}-${arch}.deb || abrt
3038

31-
pbuilder-dist $dist $arch build release/source/${pkg_name}*.dsc --buildresult release/$arch
39+
}
3240

33-
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi
41+
################################################################################
42+
# main
3443

35-
echo "--------------------------------------------------------------------------"
44+
SELF=${0##*/}
45+
cd ${0%/*} || abrt "Failed cd to \"${0%/*}\""
3646

37-
cp -pv --no-preserve=ownership release/${arch}/${pkg_name}*.deb release/${pkg_name}-v${pkg_version}-${arch}.deb
47+
# get pkg name from BRANDING.mak
48+
unset BRANDING ;declare -A BRANDING
49+
[[ -s BRANDING.mak ]] && while read k x v ;do
50+
[[ "${k}" =~ ^BRANDING_ ]] && BRANDING[${k#*_}]="${v}"
51+
done < BRANDING.mak
52+
[[ ${BRANDING[SHORTNAME]} ]] || abrt "Missing BRANDING_SHORTNAME (check BRANDING.mak)"
3853

39-
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi
54+
# get pkg version from debian/changelog (not branding.mak)
55+
PKG_VERSION=`dpkg-parsechangelog --show-field Version`
4056

41-
echo "--------------------------------------------------------------------------"
57+
# get deb build targets
58+
host_dist=`lsb_release -sc`
59+
host_arch=`dpkg --print-architecture`
60+
unset DEBS
61+
[[ -s MKDEB_TARGETS ]] && . ./MKDEB_TARGETS # no err if not present
62+
[[ "${#DEBS[@]}" -lt 1 ]] && declare -A DEBS[${host_dist}]=${host_arch} # default
4263

43-
}
64+
export host_dist host_arch BRANDING PKG_VERSION
65+
66+
# generate the source dsc and tar files
67+
./build-source.sh || abrt "Failed: build-source.sh"
68+
69+
# generate debs
70+
for dist in ${!DEBS[@]} ;do
71+
for arch in ${DEBS[${dist}]//,/ } ;do _mkdeb ;done
72+
done
4473

45-
build_deb_for_dist cosmic i386
46-
build_deb_for_dist cosmic amd64
47-
#build_deb_for_dist stretch armel
48-
#build_deb_for_dist stretch armhf
74+
echo
75+
echo "Generated:"
76+
find release -type f -name '*.deb'
4977

50-
cd "$backup"

build-installers.sh

Lines changed: 0 additions & 55 deletions
This file was deleted.

build-source.sh

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
11
#!/bin/bash
2+
# Generates debian source dsc and tar files
3+
# This is run by build-deb.sh
24

3-
backup=${PWD}
4-
DIR=${0%/*}
5-
cd "$DIR"
5+
################################################################################
6+
#functions
67

7-
. ./BUILD_CONFIG
8+
abrt () { echo "${SELF}: ${@:-Failed}" >&2 ; exit 1 ; }
9+
10+
################################################################################
11+
# main
12+
13+
SELF=${0##*/}
14+
cd ${0%/*} || abrt "Failed to cd \"${0%/*}\""
815

916
echo ""
1017
echo "=========================================================================="
11-
echo " build-source.sh"
18+
echo " ${0}"
1219
echo "=========================================================================="
1320
echo ""
1421

15-
echo "app_name: $app_name"
16-
echo "pkg_name: $pkg_name"
22+
# get pkg name from BRANDING.mak
23+
[[ "${BRANDING[SHORTNAME]}" ]] || {
24+
unset BRANDING ;declare -A BRANDING
25+
[[ -s BRANDING.mak ]] && while read k x v ; do
26+
[[ "${k}" =~ ^BRANDING_ ]] && BRANDING[${k#*_}]="${v}"
27+
done < BRANDING.mak
28+
}
29+
[[ "${BRANDING[SHORTNAME]}" ]] || abrt "Missing BRANDING_SHORTNAME (check BRANDING.mak)"
30+
31+
echo "pkg name: ${BRANDING[SHORTNAME]}"
1732
echo "--------------------------------------------------------------------------"
1833

1934
# clean build dir
20-
2135
rm -rfv /tmp/builds
2236
mkdir -pv /tmp/builds
23-
2437
make clean
25-
2638
mkdir -pv release/source
27-
2839
echo "--------------------------------------------------------------------------"
2940

3041
# build source package
31-
dpkg-source --build ./
32-
33-
mv -vf ../$pkg_name*.dsc release/source/
34-
mv -vf ../$pkg_name*.tar.xz release/source/
35-
36-
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi
42+
dpkg-source --build . || abrt
43+
mv -vf ../${BRANDING[SHORTNAME]}*.dsc release/source/ || abrt
44+
mv -vf ../${BRANDING[SHORTNAME]}*.tar.* release/source/ || abrt
3745

3846
echo "--------------------------------------------------------------------------"
3947

4048
# list files
4149
ls -l release/source
42-
4350
echo "-------------------------------------------------------------------------"
44-
45-
cd "$backup"

0 commit comments

Comments
 (0)