Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__/
*.py[cod]
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ all: buildmo

buildmo:
@echo "Building the mo files"
# WARNING: the second sed below will only works correctly with the languages that don't contain "-"
for file in `ls po/*.po`; do \
lang=`echo $$file | sed 's@po/@@' | sed 's/.po//' | sed 's/mintdrivers-//'`; \
for file in po/mainuan-gestao-drivers-*.po; do \
lang=$${file#po/mainuan-gestao-drivers-}; lang=$${lang%.po}; \
install -d usr/share/locale/$$lang/LC_MESSAGES/; \
msgfmt -o usr/share/locale/$$lang/LC_MESSAGES/mintdrivers.mo $$file; \
done \
msgfmt -o usr/share/locale/$$lang/LC_MESSAGES/mainuan-gestao-drivers.mo $$file; \
done

clean:
rm -rf usr/share/locale
92 changes: 89 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
This is essentially the upstream part of Software Properties GTK which handles drivers management, stripped out of the rest of the application and turned into a standalone tool.
# Gestão de Drivers

This addresses the short-term need for a functional driver manager in Mint 15 and allows us to replace software-properties with mintsources.
**Mainuan Gestão de Drivers** é uma ferramenta de hardware do projeto Mainuan,
baseado no Kubuntu 26.04 LTS. A versão **1.0 RC1** é candidata à versão final,
com arquitetura e funcionalidades congeladas para validação; ainda não é 1.0 final.

Long term we'll see where this goes, whether it's worth continuing with it or whether it gets ditched :)
A aplicação é integralmente Qt6 Widgets/PyQt6, sem frontend GTK ou XApp. A detecção usa
`ubuntu-drivers-common` e consultas APT, com backend Python independente da GUI.
O planejamento de alterações usa PackageKit via `PyQt6.QtDBus`.
Nesta versão, alterações válidas podem ser aplicadas após confirmação explícita.
PackageKit e o agente PolicyKit do Plasma cuidam da autorização, sem senha
solicitada pelo aplicativo nem execução direta de APT/dpkg.

```bash
mainuan-gestao-drivers
mainuan-gestao-drivers test
mainuan-gestao-drivers --debug
mainuan-gestao-drivers --version
```

Sem instalar no host, execute `./usr/bin/mainuan-gestao-drivers` no checkout.
O modo `test` usa os dispositivos fictícios do backend e **simula todas as
alterações em memória, sem comunicar transações ao PackageKit**.
O launcher Plasma é `org.mainuan.GestaoDrivers.desktop`.
No modo `test`, o seletor de cenários inclui NVIDIA, Secure Boot, DKMS, MOK,
headers e Broadcom. Esses cenários não consultam nem modificam o estado do host.
Também há cenários de terceiros, Live Session, falha do backend, PackageKit
indisponível e nenhum driver adicional. A origem não substitui a recomendação
UDC nem o candidate/pinning APT. Não há gerenciamento próprio de Mesa ou PPAs.
Na Live Session, detecção e prévia funcionam, mas alterações são bloqueadas;
sessão desconhecida também é conservadoramente bloqueada.
No menu Ajuda, os diagnósticos podem ser copiados explicitamente para a área de
transferência. Não há upload automático, senhas, chaves privadas ou identificação
pessoal nesse relatório. Sobre identifica versão e créditos.

## Desenvolvimento

O código fica em `usr/lib/mainuan/mainuan-gestao-drivers/mainuan_drivers/`.
O frontend GTK, seu helper Broadcom e o sudoers legado foram removidos no beta
0.5. Não há fallback GTK, action PolicyKit própria nem helper privilegiado.
A autorização pertence ao PackageKit e ao agente PolicyKit da sessão.

```bash
python3 -m unittest discover -s tests -v
python3 -m compileall -q usr tests
python3 tests/probe_packagekit_readonly.py
dpkg-buildpackage -us -uc -b
```

Instale o candidato em uma VM para validação:

```bash
sudo apt install './mainuan-gestao-drivers_1.0~rc1_all.deb'
sudo apt remove mainuan-gestao-drivers
```

Não há scripts para remover dependências, alterar repositórios, módulos ou
Secure Boot durante instalação/remoção do aplicativo.
Consulte [a arquitetura de transações](docs/qt-transactions.md) e o
[roteiro de instalação, upgrades 0.4/0.5/0.6 e purge na VM](docs/1.0-rc1-testing.md).
Consulte também a [matriz de testes](docs/rc1-test-matrix.md) e os
[critérios para 1.0 final](docs/1.0-release-criteria.md).
Hardware real adicional ainda possui cobertura limitada; cenários fictícios
não substituem validação com hardware compatível e não devem ser confundidos
com instalações reais. Não force um driver incompatível na VM.
O upgrade retira o conffile sudoers obsoleto pelo mecanismo Debian apropriado;
modificações locais são preservadas como backup inativo até o purge.
Trocas com remoção e instalação não são atômicas; em caso de falha parcial,
o aplicativo detecta novamente o estado real, sem restaurar drivers automaticamente.
Autoremove e remoção indiscriminada de dependências não são permitidos.
O preflight verifica requisitos de módulo, kernel/headers, Secure Boot e MOK
somente para leitura. DKMS com Secure Boot ativo pode prosseguir quando o
certificado realmente usado pelo DKMS é identificado e sua inscrição MOK é
confirmada. Uma MOK diferente não basta. Estado desconhecido ou inscrição
pendente continuam bloqueados; não há geração de chave nem enrollment próprio. Módulos
pré-compilados compatíveis não recebem o bloqueio DKMS. A Qt não descarrega nem
carrega módulos Broadcom: orienta reiniciar. Pacote instalado não significa driver
ativo; o resultado é reavaliado após a transação. Consulte a
[auditoria upstream](docs/upstream-audit-1.0-rc1.md) e a
[política de acompanhamento](docs/upstream-sync-policy.md).

## Origem e Licença

Derivado originalmente de [Linux Mint mintdrivers](https://github.com/linuxmint/mintdrivers),
preservando o código e os créditos upstream, incluindo
**Copyright 2013-2014 Clement Lefebvre** e os demais contribuidores.
Licença: **GPL-2.0-or-later**. As modificações Mainuan usam a mesma licença.
O histórico anterior permanece no Git e em `debian/changelog`.

O contato de empacotamento usado é `Mainuan Packaging <openwebosbr@gmail.com>`,
já registrado no changelog das revisões Mainuan anteriores.
120 changes: 119 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,122 @@
mainuan-gestao-drivers (1.0~rc1) UNRELEASED; urgency=medium

* Freeze the Mainuan/Kubuntu port with pure Qt6, without GTK/XApp.
* Consolidate PackageKit/PolicyKit, UDC NVIDIA and third-party APT support.
* Preserve DKMS/Secure Boot/MOK checks, Broadcom and activation detection.
* Retain Live Session protection, accessibility and conffile migration.
* Harden malformed plan handling and diagnostic metadata privacy.
* Add RC regressions, validation matrix and final release criteria.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 18 Oct 2026 17:17:46 -0300

mainuan-gestao-drivers (0.6) UNRELEASED; urgency=medium

* Preserve distribution/third-party source and APT candidate origin metadata.
* Respect repository pinning without rewriting Ubuntu driver recommendations.
* Refine loading, empty, backend error and PackageKit availability states.
* Block driver mutations in Live or unverified sessions before execution.
* Improve accessibility, keyboard workflows and small-window layouts.
* Add opt-in debug logs, local clipboard diagnostics and version information.
* Retain obsolete conffile migration for direct upgrades from beta 0.4.
* Extend regressions and prepare validation for a future release candidate.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 18 Oct 2026 10:37:51 -0300

mainuan-gestao-drivers (0.5) UNRELEASED; urgency=medium

* Remove the GTK frontend, XApp and PackageKitGlib runtime dependencies.
* Remove the legacy Broadcom module helper and its sudoers configuration.
* Safely retire the obsolete sudoers conffile with dpkg-maintscript-helper.
* Keep the official application entirely Qt, with PackageKit/PolicyKit.
* Declare direct python3-apt usage and modernize to debhelper compat 13.
* Preserve upstream credits and translations; extend packaging regressions.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 18 Oct 2026 09:43:47 -0300

mainuan-gestao-drivers (0.4) resolute; urgency=medium

* Audit upstreams and preserve ubuntu-drivers-common recommendations.
* Identify the actual DKMS signing certificate and verify its specific MOK.
* Allow Secure Boot DKMS only with verified enrolled signing infrastructure.
* Inspect sysfs device binding and refine post-installation activation states.
* Accept validated optional UDC package sets with the existing API fallback.
* Extend read-only signing, activation and simulated workflow coverage.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 18 Oct 2026 16:00:00 -0300

mainuan-gestao-drivers (0.3) resolute; urgency=medium

* Audit Mint and Ubuntu upstreams before porting relevant driver policies.
* Respect ubuntu-drivers-common NVIDIA recommendations and custom variants.
* Add read-only Secure Boot, DKMS, kernel/header and MOK preflight checks.
* Keep Broadcom activation reboot-based, without a Qt privileged helper.
* Distinguish package completion from post-installation driver activation.
* Expand simulated security scenarios and upstream regression coverage.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 18 Oct 2026 12:00:00 -0300

mainuan-gestao-drivers (0.2) resolute; urgency=medium

* Enable the first real driver transactions through QtDBus and PackageKit.
* Require explicit confirmation of a freshly validated package plan.
* Integrate PackageKit authorization with the session PolicyKit agent.
* Automatically redetect driver state after success, failure or cancellation.
* Track completed stages and partial failures without automatic rollback.
* Keep test mode simulated and guard unsupported Secure Boot/MOK workflows.

-- Mainuan Packaging <openwebosbr@gmail.com> Wed, 14 Oct 2026 12:02:00 -0300

mainuan-gestao-drivers (0.1) resolute; urgency=medium

* Establish Mainuan Gestao de Drivers as the first branded beta.
* Make the Qt frontend the official application and Plasma menu launcher.
* Migrate Python modules, resources, gettext and icons to Mainuan paths.
* Preserve the temporary GTK legacy entry point and upstream GPL-2+ credits.
* Keep driver transactions disabled; retain detection, planning and preview.
* Use the Mainuan packaging contact already recorded in this changelog.
* Avoid installed-file collisions with the original mintdrivers package.

-- Mainuan Packaging <openwebosbr@gmail.com> Wed, 14 Oct 2026 12:01:00 -0300

mintdrivers (1.8.8+mainuan4) resolute; urgency=medium

* Add asynchronous QtDBus infrastructure for PackageKit transactions.
* Plan driver changes using the shared backend and preserve NVIDIA removals.
* Model progress, structured errors, cancellation and restart requirements.
* Keep real transactions disabled in the Qt interface; add plan previews.
* Set the Qt application identity before Plasma settings initialization.
* Add a hidden mintdrivers-qt desktop identity for desktop portals.

-- Mainuan Packaging <openwebosbr@gmail.com> Wed, 14 Oct 2026 12:00:00 -0300

mintdrivers (1.8.8+mainuan3) resolute; urgency=medium

* Add the first experimental PyQt6 interface.
* Keep the Qt frontend read-only while the legacy GTK frontend remains
functional.
* Let the GTK and Qt frontends coexist on top of the shared Python backend.
* Add a parallel mintdrivers-qt entry point for visual testing.

-- Mainuan Packaging <openwebosbr@gmail.com> Wed, 14 Oct 2026 00:00:00 -0300

mintdrivers (1.8.8+mainuan2) resolute; urgency=medium

* Separate driver discovery, classification, NVIDIA rules, and APT reads
from GTK.
* Add GUI-independent driver data models and backend unit tests.
* Require Python 3.7 for dataclass-based backend models.
* Preserve GTK behavior while preparing for a future Qt6 frontend.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 11 Oct 2026 08:44:57 -0300

mintdrivers (1.8.8+mainuan1) resolute; urgency=medium

* First Mainuan/Kubuntu 26.04 adaptation.
* Remove Linux Mint live-media integration and privileged cleanup calls.
* Declare gettext for the translation build.

-- Mainuan Packaging <openwebosbr@gmail.com> Sun, 11 Oct 2026 00:35:40 -0300

mintdrivers (1.8.8) zena; urgency=medium

* Connectivity test: Test the repo and port 443
Expand Down Expand Up @@ -686,4 +805,3 @@ mintdrivers (1.0.0) olivia; urgency=low
* Initial release

-- Clement Lefebvre <root@linuxmint.com> Thu, 21 Mar 2013 17:45:00 +0000

1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

28 changes: 17 additions & 11 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
Source: mintdrivers
Source: mainuan-gestao-drivers
Section: admin
Priority: optional
Maintainer: Clement Lefebvre <root@linuxmint.com>
Build-Depends: debhelper (>= 9)
Maintainer: Mainuan Packaging <openwebosbr@gmail.com>
Homepage: https://github.com/mainuan/mainuan-gestao-drivers
Vcs-Git: https://github.com/mainuan/mainuan-gestao-drivers.git
Vcs-Browser: https://github.com/mainuan/mainuan-gestao-drivers
Build-Depends: debhelper-compat (= 13), gettext
Rules-Requires-Root: no
Standards-Version: 3.9.5

Package: mintdrivers
Package: mainuan-gestao-drivers
Architecture: all
Depends: python3 (>= 3.3),
python3-gi,
python3-psutil,
Depends: python3 (>= 3.7),
python3-pyqt6,
python3-apt,
ubuntu-drivers-common,
gir1.2-xapp-1.0,
gir1.2-packagekitglib-1.0,
packagekit,
${misc:Depends},
Description: Driver Manager
Manage the drivers for your devices.
Recommends: mokutil, openssl, kmod
Description: Mainuan hardware driver management
Mainuan Gestao de Drivers provides a Qt6 interface for detecting additional
hardware drivers and confirming package changes through a shared Python
backend. PackageKit and PolicyKit mediate installation and removal.
Test mode simulates changes without modifying the system.
21 changes: 19 additions & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: mintdrivers
Upstream-Contact: Clement Lefebvre <root@linuxmint.com>
Upstream-Name: Mainuan Gestão de Drivers
Upstream-Contact: Mainuan Packaging <openwebosbr@gmail.com>
Source: https://github.com/mainuan/mainuan-gestao-drivers
Comment: Derived from Linux Mint mintdrivers,
https://github.com/linuxmint/mintdrivers.
Original upstream contact: Clement Lefebvre <root@linuxmint.com>.

Files: *
Copyright: 2013-2014 Clement Lefebvre <root@linuxmint.com>
License: GPL-2+
Comment: Original upstream and derived code. Existing credits in individual
source files and translation catalogs are preserved.

Files: usr/lib/mainuan/mainuan-gestao-drivers/mainuan_drivers/__init__.py
usr/lib/mainuan/mainuan-gestao-drivers/mainuan_drivers/qt/*
usr/lib/mainuan/mainuan-gestao-drivers/mainuan_drivers/backend/transactions/*
tests/* docs/*
Copyright: 2026 Mainuan contributors
License: GPL-2+
Comment: Mainuan-created interfaces, transaction infrastructure, tests and
documentation. This does not assign Mainuan ownership of upstream code.

License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
16 changes: 16 additions & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
docs/qt-transactions.md
docs/rebranding-0.1.md
docs/beta-0.2-testing.md
docs/beta-0.3-testing.md
docs/upstream-audit-0.3.md
docs/upstream-sync-policy.md
docs/upstream-audit-0.4.md
docs/beta-0.4-testing.md
docs/upstream-audit-0.5.md
docs/beta-0.5-testing.md
docs/upstream-audit-0.6.md
docs/beta-0.6-testing.md
docs/upstream-audit-1.0-rc1.md
docs/1.0-rc1-testing.md
docs/rc1-test-matrix.md
docs/1.0-release-criteria.md
1 change: 0 additions & 1 deletion debian/install
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
usr
etc
1 change: 1 addition & 0 deletions debian/mainuan-gestao-drivers.maintscript
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm_conffile /etc/sudoers.d/mainuan-gestao-drivers-gtk-legacy 0.5~ mainuan-gestao-drivers
3 changes: 3 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

%:
dh ${@}

override_dh_install:
dh_install -X__pycache__ -X.pyc -X.pyo
Loading