8000 bootstrap-arch: package the 4 DKMS modules via makepkg, not make install by pirsqr-rnd · Pull Request #26 · fstanis/chuwi-minibook · GitHub
[go: up one dir, main page]

Skip to content

bootstrap-arch: package the 4 DKMS modules via makepkg, not make install - #26

Open
pirsqr-rnd wants to merge 1 commit into
fstanis:mainfrom
pirsqr-rnd:pr/bootstrap-arch-package-modules
Open

pirsqr-rnd wants to merge 1 commit into
fstanis:mainfrom
pirsqr-rnd:pr/bootstrap-arch-package-modules

Conversation

@pirsqr-rnd
Copy link
Copy Markdown
Contributor

install_modules() calls make -C modules/$m install directly for the four DKMS modules, bypassing the Arch PKGBUILDs already present under modules/*/packaging/arch/ — unlike install_sensor_proxy(), which builds and installs iio-sensor-proxy through makepkg + pacman -U.

Consequence: re-running this script — which the guide documents as safe to do at any time, e.g. after a kernel upgrade leaves the running kernel no longer installed — silently overwrites any pacman-managed module install with unpackaged files under /usr/src, desyncing the pacman database.

This rewrites install_modules() to mirror install_sensor_proxy()'s makepkg + pacman -U pattern for all four modules, and adds two small helpers:

  • clean_unpackaged_dkms_source() — if a module was previously installed the old way (raw make install, not a package), removes the stale DKMS registration and /usr/src/<name>-<version> directory before packaging, so pacman -U doesn't hit "file exists". No-op once a module is already pacman-owned.
  • clean_unpackaged_file() — same idea for the one standalone file outside /usr/src (goodix_9110_cfg.bin), which hit exactly this conflict in testing (see below).

Testing: ran the equivalent commands by hand on a CachyOS machine with all four modules previously installed via the old raw make install path (two kernels: 6.18.52 LTS + 7.2.7 current) — dkms remove + rm -rf /usr/src/... + makepkg -si for each module. All four migrated cleanly to pacman-tracked *-dkms packages, built and loaded correctly on both kernels, module functionality (touchpad, keyboard backlight, EC, touchscreen) verified working afterward. The goodix_9110_cfg.bin conflict this PR's clean_unpackaged_file() handles is exactly the one hit manually before adding that helper.

Not run end-to-end as root via the script itself, since the manual walkthrough already exercised the equivalent commands on the same module set.

install_modules() called 'make -C modules/$m install' directly,
bypassing the Arch PKGBUILDs added in modules/*/packaging/arch/ -
unlike install_sensor_proxy(), which already builds and installs
iio-sensor-proxy through makepkg + pacman -U.

Consequence: re-running this script (which GUIDE.md documents as
safe to do any time, e.g. after a kernel upgrade) would silently
overwrite pacman-managed module installs with unpackaged files
under /usr/src, desyncing the pacman database.

Rewrote install_modules() to mirror install_sensor_proxy()'s
makepkg + pacman -U pattern for all four modules. Added
clean_unpackaged_dkms_source()/clean_unpackaged_file() so a prior
'make install' (raw DKMS, not a package) is migrated in place on
first run instead of conflicting with pacman -U - verified this is
a no-op once a module is already pacman-owned, and that the actual
migration path works end-to-end (manually walked all four modules
through dkms remove + rm -rf /usr/src/... + makepkg -si on this
machine, including the goodix_9110_cfg.bin firmware file conflict
this same helper now handles automatically).

Syntax-checked with bash -n; not run end-to-end as root since the
manual walkthrough already exercised the equivalent commands.
@pirsqr-rnd
Copy link
Copy Markdown
Contributor Author

FYI: closed #19 — it was on the same branch (my fork's main), which has since diverged with unrelated merge/doc work and made that diff messy. The three original fixes there (goodix_ts DKMS_VERSION hyphen bug, thermald PATH lookup in check-status.sh, i2c-dev/acpi_call docs) are still in history on my fork and I'll re-open them as their own focused PRs against current main, same shape as this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0