Commit Graph

315 Commits

Author SHA1 Message Date
3f44b74446 feat(update-kernel): added console output
Added console output asking to reboot the system after installing the update and changed the code section to if-then-else
2024-11-08 13:17:08 +03:00
65152aab97 1.19-alt1
- update-kernel: Improve messaging about flavour upgrades.
2024-10-28 06:15:15 +03:00
91e7abd67a update-kernel: Improve upgrade messaging regarding use of -t/-r
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-28 05:35:16 +03:00
a7220ac394 update-kernel: Slightly improve messaging about new flavours
UI/UX.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-28 05:35:16 +03:00
ffb9bd149e update-kernel: Make UPDATE_KERNEL_SYS_FLAVOUR try to fake 'uname -r'
This is for debugging purposes to test upgrade from 'std-def'

Since I use the archive for testing on a host with a much newer kernel, it
cannot find a flavor to upgrade from 6.11 if the archive only has 6.10.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-28 05:35:16 +03:00
825dfc1f68 update-kernel: Add debugging filtering
Via `UPDATE_KERNEL_FILTER` sed(1) script. To test removal of `std-def` flavour.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-28 05:35:16 +03:00
31d0e19617 Makefile: Change CI targets
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-28 02:56:09 +03:00
8d76fa7aeb update-kernel: Add --fw / --firmware option
Intention is: user will be able to update all kernel related things with a single
command. Such as

  update-kernel -u --fw

Possible failure if fw package is deleted from the repo.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-10-24 03:39:12 +03:00
d76eb87e1e 1.18-alt1
- update-kernel: Emit error on unrecognized argument(s).
- update-kernel: Show usage on invalid option instead of full help.
2024-08-06 19:48:05 +03:00
3ba604f5d9 update-kernel: Show usage on invalid option instead of full help
The change caused shellcheck warning:

  In update-kernel line 51:
  show_help()
  ^-- SC2120 (warning): show_help references arguments, but none are ever passed.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-08-06 19:47:59 +03:00
d6b17669bf update-kernel: Minor grammar corrections
The note is added for future correctors so they don't try to change 'flavour' to
'flavor.'

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-08-03 14:36:58 +03:00
37e2298dc6 update-kernel: Emit error on unrecognized argument(s)
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-08-03 14:36:43 +03:00
7ee443f8ab 1.17-alt1
- Speed up 'update-kernel --list' run under user.
- Support 'latest' virtual flavour to install highest available version of
  standard kernels.
- Upgrade to a new flavor if the current one is no longer available in the
  repository.
2024-07-25 10:24:38 +03:00
7ce3ca2f6f update-kernel: Allow to migrate from qualified to quantified flavour
From std-def to 6.1, in cases where such a condition exists, the .99999 suffix
kludge was used before we implemented filter_pkglist filtering. This was
necessary to ensure the version number was higher than any locally installed
kernels. Now, this workaround is no longer needed, allowing for a seamless
upgrade from a symbolic flavor to a numerical one.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-25 10:24:38 +03:00
22e554aefb update-kernel.8: Various spelling corrections
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-25 10:24:38 +03:00
929e251dd4 Document '-t latest'
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-25 10:24:38 +03:00
a190172990 Dockerfile: Update archive URL
The registry turned out to be not very reliable storage.

Thanks-to: Mikhail Gordeev <obirvalger@altlinux.org>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-25 04:07:14 +03:00
a441b3cca1 update-kernel: Automatically select new flavour if current is EOL
Select next available version based on sorting order of visible kernels.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-24 08:40:50 +03:00
487e4b9741 update-kernel: Remove trailing space character
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-24 08:34:06 +03:00
0fbfeaf4d1 Update copyright years to 2024
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-24 08:31:09 +03:00
a209e33861 Add 'latest' to the list of flavours
Currently, 'latest' will select flavour with the highest kernel version,
excluding release candidate kernels.

Q: Aren't there is ambiguity? Is 6.10.0 a stable kernel or a mainline kernel?
A: Yes. 'After each mainline kernel is released, it is considered "stable."'[1]
   6.10 is marked 'mainline' or kernel.org page, and there is never 6.10.0
   release in any (stable or mainline) tree.

Link: https://kernel.org/category/releases.html
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-22 04:14:04 +03:00
9fc968a3e6 bash_completion: Exclude checkinstall component from flavours
Safety net.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-22 02:55:24 +03:00
befeae8df0 update-kernel: Speed up consecutive apt-cache runs under user
When cache is not writable it's regenerated each time apt-cache runs, which can
slow down some apt-cache heavy operations, such as `--list`.

If `Dir::Cache` is not writable, such as under user, use tmpdir for it.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-07-21 21:24:01 +03:00
22813da0c1 update-kernel: Clarify help about flavour used for '-r'
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-03-02 01:56:27 +03:00
f943dfe9e6 1.16-alt1
- Apply --dry-run/--download-only logic to debuginfo-kernel-install.
2024-02-13 08:28:43 +03:00
3565829685 debuginfo-kernel-install: Speak in plural about packages
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-13 08:28:43 +03:00
c0ae4410b2 debuginfo-kernel-install: Apply the same -d/-n logic as in update-kernel
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-13 08:20:27 +03:00
a571a17fbc debuginfo-kernel-install: Fix formatting of verbose log message
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-13 08:20:27 +03:00
ee8c39df68 1.15-alt1
- Make --dry-run and --download-only non-exclusive (ALT#49340).
- Improve informativeness of confirmation dialog.
2024-02-12 08:20:25 +03:00
82d9344a7a update-kernel: Fix codespell reported typo
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-12 08:19:52 +03:00
4abe66e3c5 update-kernel: Improve informativeness of confirmation dialog
Confirmation is skipped on --dry-run this is like apt-get behaves.

Link: https://bugzilla.altlinux.org/show_bug.cgi?id=49340#c2
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-12 07:53:35 +03:00
54a7f23677 update-kernel: Make --dry-run and --download-only non-exclusive
Link: https://bugzilla.altlinux.org/show_bug.cgi?id=49340#c2
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-12 06:34:48 +03:00
ed4fa345b5 1.14-alt1
- Distinguish --dry-run and --download-only options (ALT#49340).
2024-02-10 05:16:05 +03:00
86a563a6a9 update-kernel: Add verbose note where to find downloaded-only packages
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-10 05:16:05 +03:00
1e5cfc393e update-kernel: Distinguish --dry-run and --download-only options
Reformat help output for a new longer options.

Link: https://bugzilla.altlinux.org/49340
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2024-02-10 05:03:20 +03:00
b574739cc4 1.13-alt1
- Add debuginfo-kernel-install tool (experimental tool for developers).
2023-12-12 04:44:23 +03:00
60059d1b48 debuginfo-kernel-install: Change argument handling
-F|-r are flags now and their value (kernel reference) is an argument.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-12-12 04:44:23 +03:00
27c38739fa debuginfo-kernel-install: Add --reinstall option
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-12-12 04:44:23 +03:00
06a9e5243e spec,bash_completion: Add completions for debuginfo-kernel-install 2023-12-12 04:44:23 +03:00
d84d50039e Dockerfile: Add a test for debuginfo-kernel-install 2023-12-12 04:44:23 +03:00
a97f6b670f spec,Makefile: Install debuginfo-kernel-install tool
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-12-12 04:44:23 +03:00
f4d140a6ae debuginfo-kernel-install: New debuginfo installer tool
Find kernel -debuginfo (and/or headers) in package archive, for the old kernel
(that are no longer in repo).
2023-12-12 04:44:23 +03:00
ca1398d058 1.12-alt1
- Add --debuginfo option.
2023-11-17 01:54:28 +03:00
39e81f4be6 update-kernel: Add --debuginfo option
You still need debuginfo component.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-11-17 01:53:52 +03:00
85db017bc7 1.11-alt1
- Fix incorrect apt database oldness message when apt-conf-tmp-cache is used
  (ALT#46987).
2023-07-24 19:53:27 +03:00
4d4ce74bcc update-kernel: Use Dir::State::lists for apt update freshness check
`apt-conf-tmp-cache` changes `Dir::State::lists` location to
"/tmp/.apt-cache/lists/" making APT Database freshness check outputting
incorrect dates.

Link: https://bugzilla.altlinux.org/46987
Fixes: 5fc8e0c ("update-kernel: Check staleness of APT database")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-07-24 19:50:30 +03:00
baaff25792 update-kernel: Disable POSIX mode globally
Some people run `sh -x update-krenel` to trace it. When 'sh' is actually 'bash'
('sh4') `+o posix` will upgrade its behavior to 'bash' one. Otherwise 'process
substitution' breaks with:

  update-kernel: command substitution: line 457: syntax error near unexpected token `('
  update-kernel: command substitution: line 457: `set +o posix; echo "$MODINSTALLED" | join -v1 - <(echo "$ALLNAMES") | sed 's/kernel-modules-//')'

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-07-20 22:55:10 +03:00
126525540a 1.10-alt1
- Add '-u' to run 'apt-get update' automatically.
2023-06-19 04:19:14 +03:00
f853ec02e2 update-kernel: Add '-u' option to automatically run 'apt-get update'
APT database age check is skipped in that case.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-06-19 04:18:02 +03:00
cb6e0649d0 update-kernel: Correct exit code on invalid option error
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2023-06-19 04:02:27 +03:00