Skip to content

Commit d1c4453

Browse files
committed
Version bump to 1.0.28 (apply fixups on aarch64)
1 parent 0c8f29e commit d1c4453

3 files changed

Lines changed: 40 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Tool to update the **Portage**(5) tree, all installed packages, and kernel, unde
77
(using `emaint sync` / `eix-sync`)
88
* removes any prior **emerge**(1) resume history
99
(using `emaint --fix cleanresume`)
10+
* on `aarch64`, attempts to apply any pending fixups
11+
(if desired, by running `/etc/cron.weekly/fixup`; errors non-fatal)
1012
* ensures **Portage**(5) itself is up-to-date
1113
(using `emerge --oneshot --update portage`)
1214
* ensures **genup** itself is up-to-date (restarting if not)

genup

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ shopt -s nullglob
2929

3030
# ********************** variables *********************
3131
PROGNAME="$(basename "${0}")"
32-
VERSION="1.0.27"
32+
VERSION="1.0.28"
3333
ETCPROFILE="/etc/profile"
3434
UPDATERSDIR="/etc/${PROGNAME}/updaters.d"
35+
FIXUPSCRIPT="/etc/cron.weekly/fixup"
3536
RED_TEXT="" GREEN_TEXT="" YELLOW_TEXT="" RESET_ATTS="" ALERT_TEXT=""
3637
if [[ -v TERM && -n "${TERM}" && "${TERM}" != "dumb" ]]; then
3738
RED_TEXT="$(tput setaf 1)$(tput bold)"
@@ -77,6 +78,7 @@ declare -i ARG_KEEP_OLD_DISTFILES=0
7778
declare -i ARG_NO_PERL_CLEANER=0
7879
declare -i ARG_NO_EIX_SYNC=0 ARG_ALERT=0
7980
declare -i ARG_IGNORE_REQUIRED_CHANGES=0 ARG_NO_CUSTOM_UPDATERS=0
81+
declare -i ARG_NO_FIXUPS=0
8082
declare -i ARG_NO_EIX_METADATA_UPDATE=0 ARG_NO_NOCACHE=0
8183
declare -i ARG_NO_MODULE_REBUILD=0
8284
declare -i ADJUSTMENT=19
@@ -402,6 +404,24 @@ run_custom_updaters_if_present() {
402404
fi
403405
fi
404406
}
407+
run_fixups_if_present() {
408+
# if not inhibited, and running on aarch64, and the file
409+
# /etc/cron.weekly/fixup is present and executable, run it: this
410+
# will apply any pending hotfixes, which is generally
411+
# good hygiene to do prior to performing an update (this is
412+
# currently only really of application on RPi systems running
413+
# the gentoo-on-rpi-64bit image)
414+
# NB: we do not treat it as a fatal error if some or all of the
415+
# fixup scripts fail to complete successfully
416+
if ((ARG_NO_FIXUPS==0)) && [[ -x "${FIXUPSCRIPT}" && "aarch64" == "$(uname -m)" ]]; then
417+
show "Running fixup scripts via '${FIXUPSCRIPT}'..."
418+
if ! "${FIXUPSCRIPT}"; then
419+
warning "Not all fixups ran successfully!"
420+
warning "Continuing anyway; check the log file"
421+
warning "'/var/log/latest-fixup-run.log' for further details."
422+
fi
423+
fi
424+
}
405425
check_if_dispatch_conf_needs_to_be_run() {
406426
# check if the user has any configuration file changes pending review
407427
# by dispatch-conf, and set the NEEDSDISPATCHCONF variable accordingly
@@ -592,6 +612,10 @@ Options:
592612
automatically make necessary changes to config files
593613
-E, --no-emtee don't attempt to use the emtee tool, even when the
594614
eponymous USE flag has been enabled
615+
-F, --no-fixups
616+
do not attempt to run /etc/cron.weekly/fixup, even
617+
where this file is present and executable (fixups
618+
are only in use on aarch64 systems)
595619
-h, --help show this help message and exit
596620
-i, --ignore-required-changes
597621
don't exit with an error in the event that user-driven
@@ -687,7 +711,7 @@ process_command_line_options() {
687711
declare -i RC
688712
set +e
689713
# error trapping off, as we want to handle errors
690-
TEMP="$(getopt -o aAb:cCde:EhikmMnNpr:SvVx: --long ask,alert,buildkernel-args:,dispatch-conf,no-custom-updaters,deploy-from-staging,emerge-args:,no-emtee,help,ignore-required-changes,keep-old-distfiles,no-eix-metadata-update,no-module-rebuild,no-kernel-upgrade,no-nocache,no-perl-cleaner,adjustment:,no-eix-sync,verbose,version,eix-sync-args: -n "${PROGNAME}" -- "${@}")"
714+
TEMP="$(getopt -o aAb:cCde:EFhikmMnNpr:SvVx: --long ask,alert,buildkernel-args:,dispatch-conf,no-custom-updaters,deploy-from-staging,emerge-args:,no-emtee,no-fixups,help,ignore-required-changes,keep-old-distfiles,no-eix-metadata-update,no-module-rebuild,no-kernel-upgrade,no-nocache,no-perl-cleaner,adjustment:,no-eix-sync,verbose,version,eix-sync-args: -n "${PROGNAME}" -- "${@}")"
691715
RC="${?}"
692716
set -e
693717
if ((RC!=0)); then
@@ -714,6 +738,7 @@ process_command_line_options() {
714738
*) EMERGEARGS="${2}" ; shift 2 ;;
715739
esac ;;
716740
-E|--no-emtee) USE_EMTEE=false ; shift ;;
741+
-F|--no-fixups) ARG_NO_FIXUPS=1 ; shift ;;
717742
-h|--help) ARG_HELP=1 ; shift ;;
718743
-i|--ignore-required-changes) ARG_IGNORE_REQUIRED_CHANGES=1 ; shift ;;
719744
-k|--keep-old-distfiles) ARG_KEEP_OLD_DISTFILES=1 ; shift ;;
@@ -786,6 +811,7 @@ display_greeting
786811
check_gcc_config_and_reset_if_necessary
787812
update_portage_tree_and_sync_eix
788813
remove_any_prior_emerge_resume_history
814+
run_fixups_if_present
789815
ensure_portage_itself_is_up_to_date
790816
ensure_genup_itself_is_up_to_date
791817
try_emtee_update_if_enabled

genup.8

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH GENUP 8 "Version 1.0.27: April 2020"
1+
.TH GENUP 8 "Version 1.0.28: September 2020"
22
.SH NAME
33
genup \- update Portage tree, all installed packages, and kernel
44
.SH SYNOPSIS
@@ -17,10 +17,14 @@ updates Portage tree & overlays; syncs \fBeix\fR(1)
1717
.br
1818
(using (if needed) \fBemaint sync --auto\fR, and \fBeix-sync\fR)
1919
.IP \(bu 2
20-
removes any prior \fBemerge\fR(1) resume history;
20+
removes any prior \fBemerge\fR(1) resume history
2121
.br
2222
(using \fBemaint --fix cleanresume\fR)
2323
.IP \(bu 2
24+
on aarch64, attempts to apply any pending fixups
25+
.br
26+
(if desired, by running \fI/etc/cron.weekly/fixup\fR; errors non-fatal)
27+
.IP \(bu 2
2428
ensures Portage itself is up-to-date
2529
.br
2630
(using \fBemerge --oneshot --update portage\fR)
@@ -183,6 +187,10 @@ the \fB--ignore-required-changes\fR option.
183187
Do not attempt to use the \fBemtee\fR(1) tool, even when the
184188
eponymous USE flag has been enabled.
185189
.TP
190+
.BR \-F ", " \-\-no\-fixups
191+
Do not attempt to run any custom fixups on aarch64, even if the file
192+
\fI/etc/cron.weekly/fixup\fR is present and executable.
193+
.TP
186194
.BR \-h ", " \-\-help
187195
Displays a short help screen, and exits.
188196
.TP

0 commit comments

Comments
 (0)