Merge pull request #75 from ghostbsd/be-upgrade-fixes
Fix boot environment upgrades and drop the lock file
Reinstall everything in the software step and check devfs unmount
Naming the software packages to skip the base ones meant asking pkg for
packages that might not exist in any repository, and an empty or failed
query fell back to a bare upgrade anyway. The software step goes back
to a plain pkg upgrade, with -f for major and minor upgrades.
A failed devfs unmount after pkg triggers now fails the step instead of
going unnoticed, since the BE could not be unmounted cleanly after it.
Fix boot environment upgrades and drop the lock file
ports, GhostBSD-src and GhostBSD-src-sys install into /usr/ports and
/usr/src, which are separate datasets and empty in a mounted BE.
Upgrading them there flooded stderr with "missing file" lines until the
pipe filled and pkg hung, and the new files ended up hidden under the
dataset after reboot. A BE upgrade now warns with OK/Cancel and removes
them from the running system before the BE is created.
pkg -r never runs triggers, it defers them to the root's
/var/db/pkg/triggers, so caches such as gschemas.compiled stayed stale
and lightdm could start to a blank screen. pkg triggers now runs in the
BE through chroot before it is activated.
The base step used pkg upgrade, which skips listed base packages that
are not installed, so packages added or split in a new release were
never installed. It now uses pkg install. The forced software step
names its packages so the base packages are not reinstalled twice.
[3 lines not shown]Bump version to 6.6 in setup.py
Merge pull request #74 from ghostbsd/minor-upgrade
Add minor and release upgrades installed in a boot environment
Build and release the tray icon instead of toggling its visibility
Hiding a Gtk.StatusIcon and showing it again re-embeds it in the panel.
That leaves the notification area with a stale embedded window and makes
GTK thaw a GdkWindow it never froze, which prints:
Gdk-CRITICAL: gdk_window_thaw_toplevel_updates: assertion
'window->update_and_descendants_freeze_count > 0' failed
TrayIcon now builds the status icon when it is shown and releases it when
it is hidden, through its own set_visible(). Releasing the icon is what
removes it from the panel, since Gtk.StatusIcon has no destroy() and
run_dispose() leaves the embedded window in place.
tray_icon() is gone and the call sites go through Data.system_tray
directly. left_click() is no longer a classmethod because it has to hide
the icon through the new path rather than through the status icon the
signal hands it. The empty menu built in the constructor is removed,
nm_menu() replaces it on every right click.
Bump version to 6.5 in setup.py
Do not trust the upgrade type when the repository cannot be read
Review of #74 found three places where the check acted on an answer it
had no reason to trust.
pkg update -f failing went unnoticed, and the package list was then read
from a stale catalogue. update_repository() reports it now,
check_for_update() and find_updates() answer None for "unknown", and
SomethingIsWrong, the dialog already written for that case and until now
unreachable, is shown instead of a package list. The tray stays hidden.
A major upgrade whose repository version cannot be read is refused,
because the boot environment is named after that version and cannot be
created without one. An empty version stays acceptable everywhere else.
pkg rquery exits non-zero both when it fails and when the repository has
no such package, so refusing it outright would leave a system whose
repository serves no GhostBSD-runtime unable to install any package
update.
[4 lines not shown]Add minor and release upgrades installed in a boot environment
Upgrades served by the current ABI repository are now classified from
the GhostBSD version string and handled according to what changed.
A FreeBSD minor change is a "minor" upgrade and a GhostBSD release
change is a "release" upgrade. Both install into a new boot environment
and reboot into it, like a major upgrade already did. Minor reinstalls
every package, release does not. Anything else stays on the in-place
flow.
Version handling:
- parse_version() and classify_upgrade() compare the installed version
from ghostbsd-version against the repository version from pkg rquery
- find_updates() is the single entry point for "is there anything to
install". It owns Data.upgrade_type and checks the running system
first, because its package updates have to be installed before a
major upgrade. A pending major upgrade is put aside while looking and
[46 lines not shown]Merge pull request #73 from ghostbsd/ghostbsd/issues#218
Clarify major upgrade dialog wording when declining
Clarify major upgrade dialog wording when declining
The dialog said the upgrade "will be skipped until the next boot",
which read as if declining scheduled the upgrade for the next boot.
Declining only suppresses the prompt, so say that instead.
Resolves ghostbsd/issues#360
Merge pull request #72 from ghostbsd/ericbsd-patch-1
Downgrade version from 6.8 to 6.4
Downgrade version from 6.8 to 6.4
Merge pull request #71 from ghostbsd/major-upgrade
Add boot environment based major version upgrade support
Update button label from 'Install update' to 'Install Now' in frontend
Replace string splitting with regex for URL extraction in repo-related functions
Update backup checkbox sensitivity and title text for major upgrades
Set `IGNORE_OSVERSION=yes` for pkg to bypass OS version checks
Add `current_version` and `new_version` to support version-based major upgrades
Fixing the notification Start Upgrade button
Add boot environment based major version upgrade support
Implement full BE-based upgrade flow for major versionupgrades (ABI changes). The new BE is created, mounted, bootstrapped with pkg, then base and software packages are fetched and installed inside it before activating for next boot. Failed upgrades destroy the BE and leave the running system intact.
- Add backend functions: create_be, mount_be, bootstrap_pkg_in_be, fetch/upgrade_base/software_packages_in_be, umount/activate/ cleanup_failed_upgrade_be, get_current_version, get_version, fetch_base_packagelist, get_default_base_repo_url, cleanup_old_backups
- Add be_name and be_mount_path to Data for shared upgrade state
- Refactor InstallUpdate: split process_output into process_popen + process_output, rename read_output to process_upgrade, add major upgrade step methods
- Remove distro dependency, add explicit gi.require_version() calls
- Add .pylintrc configuration
Merge pull request #70 from ghostbsd/add-noduplication
Prevent duplicate instances and add IPC for check-now command
Add error handling for server requests and improve UI localization
- Backend: Add try-except handling with timeouts for server request failures (`requests.get`), preventing UI blocking during unreachable servers.
- Frontend: Localize UI strings with `_()` for better internationalization support.
- UI: Refactor dialog buttons to invoke corresponding "Yes" and "No" click handlers, improving code clarity and maintainability.
Prevent duplicate instances and add IPC for check-now command
- Use setproctitle and psutil to detect existing update-station processes
- Send SIGUSR1 to running instance when 'check-now' is invoked, triggering update check in existing GTK loop
- Consolidate notification.py into frontend.py to reduce module count
- Simplify boolean returns in backend.py
- Exit with error if tray mode started while instance is already running
This prevents multiple update-station processes from running simultaneously
and allows the check-now command to communicate with the existing tray
instance instead of spawning a separate GUI process.
Merge pull request #69 from ghostbsd/refactor-frontend-dialog
Refactor InstallUpdate.read_output() and consolidate dialog windows
Refactor InstallUpdate.read_output() and consolidate dialog windows
This commit simplifies the package update installation process and standardizes window close behavior across the application.
Frontend refactoring (frontend.py):
- Moved subprocess creation from frontend to backend via command_output()
- Extracted read_output() into focused helper methods:
* process_output() - runs commands and reads stdout line-by-line
* log_failure() - writes error details to update.failed file
* needs_reboot() - checks if installed packages require reboot
* is_pkg_only_update() - detects pkg-only updates
* install_packages() - handles install with retry logic for temp file failures
* fetch_packages() - downloads package updates
* bootstrap_major_upgrade() - bootstraps pkg for major version upgrades
* prepare_backup() - creates ZFS boot environment backups
- Improved returncode==3 retry logic: delete failed packages, collect for
reinstall after upgrade completes (max 5 retries)
- Fixed race condition: replaced `if proc.poll() is not None` with
`if not line: break` for EOF detection, then proc.wait()
[25 lines not shown]Merge pull request #68 from ghostbsd/fix-window-memory-leak
Replaced `hide()` with `destroy()`
Replaced `hide()` with `destroy()`
Updated conditionals for readability and bumped a version to 6.8 in setup.py.
Merge pull request #67 from tmtfx/master
Add Friulian translation
Add Friulian translation