43 Commits
Author SHA1 Message Date
Coffey Labs 44be73e6eb Merge pull request #2 from Coffey-Labs/github-org-coffey-labs
Point at the Coffey-Labs organisation
2026-08-30 15:27:24 -07:00
jcoffey-dev 6ae73dd48c Point at the Coffey-Labs organisation
The repositories moved off LINUXexpert-org. The old URLs redirect, so
nothing was broken, but a redirect is not a correct address to publish.
2026-08-30 15:22:28 -07:00
LINUXexpert.org 5bc62feb1f Merge pull request #1 from LINUXexpert-org/copyright-coffey-labs
Change the copyright holder to Coffey Labs
2026-08-30 01:27:47 -07:00
jcoffey-dev 4192835d3d Change the copyright holder to Coffey Labs
Two scripts and the README's licence section. LINUXexpert.org is being retired
as a site and is no longer where this work lives.

The clone URL in the README still says github.com/LINUXexpert-org/ubuntu2mint,
because that is the repository's actual path. The GitHub organisation slug and
the copyright holder are different things and only one of them is changing.

LICENSE untouched -- its "<name of author>" lines are GPL boilerplate, and the
FSF's copyright on the licence text is not ours to edit.
2026-08-30 01:27:27 -07:00
jcoffey-dev d179def57c docs: document ubuntu-desktop-prune.sh
A 510-line destructive script shipped in this repository without a single
mention in the README. Nothing said what it was for, that it must run
after the conversion rather than before, or that `prune` refuses to run
without --yes.

Adds a section covering its four commands, its four options, the fixed
list of packages it purges, its safety gates and what its backup and
rollback actually cover -- rollback restores APT and display-manager
configuration but does not reinstall anything, which is worth knowing
before relying on it.

Also adds a short table at the top establishing that this repository is
two scripts run in order: convert adds the Mint stack and removes
nothing, prune removes the Ubuntu desktop afterwards. Running them the
other way round leaves a machine with no working desktop at all, which
was previously not stated anywhere.

Flagged --skip-dm-fix as rarely wanted: the LightDM setup it disables
exists precisely because gdm3 is about to be removed.

Every flag, package name, threshold and path checked against the script.
2026-08-22 22:44:57 -07:00
jcoffey-dev 317fdac938 Make the prune removal threshold actually reachable
The removal-count guard was skipped whenever --yes was set:

    if [[ "${ASSUME_YES}" != "yes" && "${remv_count}" -gt ... ]]

and prune refuses to run *without* --yes. So inside prune -- the only
command that removes anything -- the first condition was always false
and the threshold could never fire. It fired only in plan, which changes
nothing. The guard was live exactly where it did not matter and dead
where it did.

The check is now unconditional, with --max-removals N as the explicit
override, so raising the limit is a separate decision from not wanting
to be prompted. The critical-package check was already unconditional and
is unchanged.

Verified with --yes set and the default limit of 75: an ordinary purge
passes, 90 removals aborts, and a critical package aborts.

Also applies the same startup fix as the converter -- mkdir and the tee
redirection ran at file scope, before argument parsing, so --help and a
mistyped flag failed with a raw mkdir error rather than printing usage.
2026-08-22 22:42:46 -07:00
jcoffey-dev 4ae104c892 Fix two holes in the removal gate, found by reading the prune script
ubuntu-desktop-prune.sh has had this same guardrail all along, and parses
the simulation more carefully than the version I wrote for the converter.
Two differences were real bugs:

apt-get -s emits the architecture qualifier in multiarch situations, so a
critical removal appears as "Remv sudo:amd64". The exact match against
CRITICAL_PACKAGES compared that against "sudo" and did not match -- the
gate would have waved through the single case it exists to stop. The
suffix is now stripped, as the prune script already did.

apt also prints "Purg <pkg>" for purges, not only "Remv". Those were not
matched at all, so a purged package counted toward neither the critical
check nor the removal threshold.

Verified against simulated output: "Remv sudo:amd64" and
"Purg systemd:amd64" now both abort, and a mixed non-critical set still
passes.
2026-08-22 22:40:55 -07:00
jcoffey-dev ece4ac2735 Don't require root to print usage
Both `mkdir -p "$LOG_DIR"` and `exec > >(tee -a "$LOG_FILE")` ran at file
scope, before a single argument was parsed. On any machine where
/var/log is not writable by the caller -- which is every machine, since
this needs sudo -- `--help` and a mistyped flag both failed with a raw
mkdir or tee error rather than printing usage or naming the bad flag.

Both now happen in ensure_log_dir(), called from main() once a real
command has been dispatched, so usage and argument errors work for
anyone while everything from the command onward is still logged. exec
applies to the shell rather than the function, so moving it changes
nothing about what gets captured -- verified by running a command with
the log directory redirected and confirming the output landed in it.

A non-root command now also fails with "Cannot create /var/log/... --
re-run with sudo" instead of leaking mkdir's own message.
2026-08-22 22:39:35 -07:00
jcoffey-dev db71e25612 docs: make the README describe the script that exists
With the simulation gate implemented, the safety model section is now
true, and says where the gate runs (inside convert, immediately before
the install) and what it writes. Plan mode is labelled advisory, because
that is what it is: it logs a simulation for a human to read and decides
nothing.

Removed four options the README documented that were never implemented:
--no-auto-fix, --overwrite-keyring, --recreate-keyring and
--no-purge-flavor. Documented --preserve-snap, which was implemented and
missing. Every flag now matches the parser in both directions.

Two troubleshooting sections described behaviour that does not exist.
Keyring recovery pointed at the two missing keyring flags; the real
mechanism is a check against the expected Mint key ID with --yes to
overwrite, which is worth stating since it is what makes the plain-HTTP
fallback safe. Flavor-package purging was never written, so the login
loop it referred to is now described as something to fix by hand.

Also removes --no-install-recommends from the usage text, which I added
in the previous commit believing it was a script flag. It is an apt
option inside apt_opts_common; the parser rejects it. That is the same
class of error this commit exists to fix, found by checking the flag
lists against the parser in both directions rather than trusting either.
2026-08-22 22:37:14 -07:00
jcoffey-dev b4dc975682 Implement the removal guardrail the README already promised
The README's safety model claimed convert "runs an APT simulation and
aborts if APT wants to remove critical packages" or if "too many
removals are detected (default threshold 40)". Neither existed. There
was no --max-removals flag, no critical-package list, and convert ran
straight from `apt-get update` to `apt-get -y install` with nothing in
between. plan mode does simulate, but it only tees the output to a file
and checks the exit code -- it never reads the removals, and convert
never calls it.

That is the gap that matters here: mixing Mint and Ubuntu repositories
is exactly when APT resolves a conflict by proposing to remove a large
part of the system, and -y means nothing stops it.

simulate_and_gate now runs the same install as a simulation against the
live APT configuration -- sources and pinning are already written by
that point, so it reflects what the real install would do -- and parses
the Remv lines:

  - any package in CRITICAL_PACKAGES aborts unconditionally. There is no
    threshold at which removing sudo, systemd, libc6 or the kernel meta
    package is acceptable.
  - more than --max-removals (default 40) aborts, listing them.
  - anything below that is listed as a warning and allowed.
  - a simulation APT cannot resolve aborts rather than proceeding.

The package list moved into mint_stack_packages(), read by both the gate
and the installer, so the gate cannot end up vouching for a different
set of packages than the one that gets installed.

Also fixes usage(), which told users to run `convert --i-accept-theISK`.
2026-08-22 22:35:15 -07:00
LINUXexpert.org 5f75b305a7 Add ubuntu-desktop-prune.sh script for cleanup 2026-01-26 23:01:05 -07:00
LINUXexpert.org 1dffd2c16d Add disclaimer for Ubuntu to Mint conversion script
Added a disclaimer about the risks of converting Ubuntu to Mint.
2026-01-26 16:41:29 -07:00
LINUXexpert.org e32ce2e1d4 Refactor ubuntu-to-mint conversion script
Updated comments for clarity, removed redundant code, and improved error handling. Adjusted LightDM configuration and ensured proper installation procedures.
2026-01-26 15:59:58 -07:00
LINUXexpert.org 88668e1899 Enhance conversion script with new features and fixes
Added various enhancements including temp-dir cleanup, dependency checks, and improved APT health checks.
2026-01-26 15:21:23 -07:00
LINUXexpert.org 3922b94437 Update script version to 5.1 and improve display-manager handling 2026-01-26 15:00:33 -07:00
LINUXexpert.org bc33b2db77 Update script version to 5.0 and enhance LightDM setup 2026-01-26 13:54:21 -07:00
LINUXexpert.org 6f354a5da7 Update script version to 4.9 and enhance error handling 2026-01-26 12:51:55 -07:00
LINUXexpert.org 53569075a2 Update script version and configure LightDM
Updated script version to 4.8 and added LightDM configuration for boot. Cleaned up help messages and ensured proper handling of display managers.
2026-01-26 12:02:34 -07:00
LINUXexpert.org f6b3a1f33f Update script version and improve argument parsing 2026-01-26 11:20:43 -07:00
LINUXexpert.org 1d43d0ad7d Update ubuntu-to-mint-convert-v3.sh 2026-01-26 11:15:29 -07:00
LINUXexpert.org 9a2f9fa21d Bump script version to 4.6 and update comments 2026-01-26 10:44:35 -07:00
LINUXexpert.org b98a424f08 Update print statement from 'Hello' to 'Goodbye' 2026-01-26 10:30:43 -07:00
LINUXexpert.org 25a401787d Revise README for ubuntu-to-mint conversion script
Updated README to reflect changes in the conversion script, including improved warnings, detailed descriptions of functionality, and modifications to usage instructions.
2026-01-26 10:14:50 -07:00
LINUXexpert.org af1102b5fd Update print statement from 'Hello' to 'Goodbye' 2026-01-26 10:11:10 -07:00
LINUXexpert.org a941948264 Update default Mint mirror URL in README 2026-01-23 13:56:08 -07:00
LINUXexpert.org e6de9c108d Change default Mint mirror URL to HTTP 2026-01-23 13:48:30 -07:00
LINUXexpert.org d1ffa2b104 Update version number in README for script changes 2026-01-23 13:46:28 -07:00
LINUXexpert.org bedec59394 Update script version and enhance key handling
Updated script version to 4.3 and improved key handling logic for better error management and atomic file operations.
2026-01-23 13:46:09 -07:00
LINUXexpert.org 695996203a Enhance README with new features and clarifications
Updated README to include additional details about the conversion script, including new features, requirements, and usage instructions.
2026-01-23 11:26:36 -07:00
LINUXexpert.org abd5d74cb1 Number of enhancements 2026-01-23 11:11:32 -07:00
LINUXexpert.org a093c5a4b4 Refactor key fetching and validation logic 2026-01-22 18:01:07 -07:00
LINUXexpert.org d6550cf325 Improve key fetching and validation in script
Enhance key fetching logic with additional validation checks.
2026-01-22 17:03:58 -07:00
LINUXexpert.org 5d1a7512f2 Enhance keyring handling for Mint repo signing key
Updated keyring handling to include fallback methods for fetching the Linux Mint repo signing key. Added support for both hkps and hkp keyservers, as well as HTTPS fallback.
2026-01-22 16:16:47 -07:00
LINUXexpert.org df890027a2 Fix directory name in README for cloning 2026-01-22 15:55:15 -07:00
LINUXexpert.org 5af853f871 Refactor apt simulation function for clarity
Updated the apt simulation function to clarify that it does not modify system APT sources and to streamline the temporary sources list handling.
2026-01-22 14:16:15 -07:00
LINUXexpert.org 0a678b7f7f Refactor allowed targets to use arrays in script 2026-01-22 13:50:05 -07:00
LINUXexpert.org 1fb0464358 Refactor set_targets_from_ubuntu function 2026-01-22 13:42:32 -07:00
LINUXexpert.org 6ce57485f5 Update repository URL in README for cloning 2026-01-22 11:25:24 -07:00
LINUXexpert.org 5420fe0f78 Refactor ubuntu-to-mint conversion script 2026-01-22 11:22:50 -07:00
LINUXexpert.org 54afd6a5f2 Update README with details on plan mode
Clarify the note about plan mode and its effects on the system.
2026-01-22 11:18:43 -07:00
LINUXexpert.org 7f4e6376f2 Initial commit 2026-01-22 11:13:22 -07:00
LINUXexpert.org d73852e6af Revise README for ubuntu-to-mint-convert-v3
Updated project name and expanded documentation for conversion script.
2026-01-22 11:12:21 -07:00
LINUXexpert.org 53e9633c39 Initial commit 2026-01-22 11:04:50 -07:00