Skip to content

Install macsmc battery systemd units with mode 0644 instead of 0755 #73

Description

@SurreptitiousFabric

The current install-macsmc-battery Makefile target installs these systemd units with mode 0755:

  • macsmc-battery-charge-control-end-threshold.path
  • macsmc-battery-charge-control-end-threshold.service
install -m0755 -t $(DESTDIR)$(SYSTEMD_UNIT_DIR) macsmc-battery/systemd/macsmc-battery-charge-control-end-threshold.path
install -m0755 -t $(DESTDIR)$(SYSTEMD_UNIT_DIR) macsmc-battery/systemd/macsmc-battery-charge-control-end-threshold.service

As a result, systemd emits the following warnings at every boot:

Configuration file /usr/lib/systemd/system/macsmc-battery-charge-control-end-threshold.path is marked executable. Please remove executable permission bits. Proceeding anyway.
Configuration file /usr/lib/systemd/system/macsmc-battery-charge-control-end-threshold.service is marked executable. Please remove executable permission bits. Proceeding anyway.

Confirmed with asahi-scripts 20260127.1-1 on Arch Linux ARM / Asahi Linux. The path unit is active and charge-threshold persistence functions normally, so this is a packaging-permission issue rather than a functional battery-control failure.

The source-tree entries themselves use mode 100644; only the Makefile installation mode introduces the executable bits.

Suggested fix:

-install -m0755 ... macsmc-battery-charge-control-end-threshold.path
-install -m0755 ... macsmc-battery-charge-control-end-threshold.service
+install -m0644 ... macsmc-battery-charge-control-end-threshold.path
+install -m0644 ... macsmc-battery-charge-control-end-threshold.service

A small installation test asserting 0644 for systemd unit files would prevent recurrence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions