Compare commits
7 Commits
1dfa53c0af
...
c0eb787ac9
Author | SHA1 | Date |
---|---|---|
Nikita Tokarchuk | c0eb787ac9 | 7 months ago |
Nikita Tokarchuk | ed7adc4fd1 | 7 months ago |
Nikita Tokarchuk | 6497f3c442 | 7 months ago |
Nikita Tokarchuk | 75f4ab1d28 | 7 months ago |
Nikita Tokarchuk | e53eccce0b | 7 months ago |
Nikita Tokarchuk | 76ba300436 | 7 months ago |
Nikita Tokarchuk | 117fcf3dab | 7 months ago |
@ -0,0 +1,44 @@ |
|||||||
|
name: Build RPM |
||||||
|
|
||||||
|
on: |
||||||
|
workflow_dispatch: |
||||||
|
inputs: |
||||||
|
ref: |
||||||
|
description: 'branch or tag ref' |
||||||
|
required: true |
||||||
|
default: 'refs/heads/main' |
||||||
|
push: |
||||||
|
branches: [ main ] |
||||||
|
|
||||||
|
jobs: |
||||||
|
build: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
|
||||||
|
container: |
||||||
|
image: fedora:40 |
||||||
|
options: --privileged |
||||||
|
|
||||||
|
steps: |
||||||
|
- name: Install dependencies |
||||||
|
run: | |
||||||
|
dnf install -y mock rpm-build |
||||||
|
|
||||||
|
- name: Download sources tar.gz archive |
||||||
|
run: | |
||||||
|
curl -LO https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz |
||||||
|
FILENAME=$(ls) |
||||||
|
ARCHIVENAME=$(basename $FILENAME .tar.gz) |
||||||
|
echo "FILENAME=$FILENAME" >> $GITHUB_ENV |
||||||
|
echo "ARCHIVENAME=$ARCHIVENAME" >> $GITHUB_ENV |
||||||
|
|
||||||
|
- name: Build RPM |
||||||
|
run: | |
||||||
|
tar --strip-components=1 -xvf $FILENAME '*/rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec' |
||||||
|
mock --init |
||||||
|
mock --buildsrpm --spec rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec --sources $FILENAME --rpmbuild-opts="-D'__archivename $ARCHIVENAME' -D'__archiveext tar.gz'" --rebuild --isolation=simple |
||||||
|
|
||||||
|
- name: Archive RPMs |
||||||
|
uses: actions/upload-artifact@v4 |
||||||
|
with: |
||||||
|
name: RPMs |
||||||
|
path: /var/lib/mock/*/result/*.rpm |
@ -1 +1,41 @@ |
|||||||
# acpi-wakeup-fixxer |
# acpi-wakeup-fixxer |
||||||
|
|
||||||
|
This repository contains a tool to disable the wakeup ability on your macbook system that runs linux, which can be particularly useful to prevent immediate wakeup from suspend mode. This tool is compatible with various systems, including the MacBook Air 2013/2015. |
||||||
|
|
||||||
|
# features |
||||||
|
|
||||||
|
- disables wakeup by echoing a device name to /proc/acpi/wakeup |
||||||
|
- default list of devices to disable is LID0 XHC1 |
||||||
|
- one can adjust the list by using `-disable` flag |
||||||
|
- systemd unit runs the app on load and resume |
||||||
|
|
||||||
|
# installation |
||||||
|
|
||||||
|
## rhel/fedora systems |
||||||
|
|
||||||
|
- take latest artifacts from https://github.com/mainnika/acpi-wakeup-fixxer/actions/workflows/build-rpm.yaml |
||||||
|
- unzip and install `fedora-40-x86_64/result/golang-code-tokarch-mainnika-acpi-wakeup-fixxer-0-0.1.fc40.x86_64.rpm` |
||||||
|
|
||||||
|
## build from sources |
||||||
|
- `go build -o acpi-wakeup-fixxer ./cmd/acpi-wakeup-fixxer` |
||||||
|
|
||||||
|
# systemd |
||||||
|
|
||||||
|
``` |
||||||
|
[Unit] |
||||||
|
Description=Fix ACPI wakeup issues |
||||||
|
DefaultDependencies=no |
||||||
|
Conflicts=shutdown.target |
||||||
|
Before=sysinit.target shutdown.target |
||||||
|
ConditionPathExists=|/proc/acpi/wakeup |
||||||
|
|
||||||
|
[Service] |
||||||
|
ExecStart=/usr/local/bin/acpi-wakeup-fixxer $ACPI_WAKEUP_FIXXER_ARGS |
||||||
|
Type=oneshot |
||||||
|
TimeoutSec=0 |
||||||
|
RemainAfterExit=yes |
||||||
|
EnvironmentFile=-/etc/default/acpi-wakeup-fixxer |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=sysinit.target |
||||||
|
``` |
@ -0,0 +1 @@ |
|||||||
|
ACPI_WAKEUP_FIXXER_ARGS="" |
Loading…
Reference in new issue