Attempt to update deb packaging

This commit is contained in:
Luke D Jones
2020-08-04 21:06:32 +12:00
parent 3615cff09d
commit 5b27456b6d
6 changed files with 19 additions and 299 deletions

View File

@@ -1,9 +1,9 @@
# DBUS Guide
```rust
pub static DBUS_NAME: &str = "org.rogcore.Daemon";
pub static DBUS_PATH: &str = "/org/rogcore/Daemon";
pub static DBUS_IFACE: &str = "org.rogcore.Daemon";
pub static DBUS_NAME: &str = "org.asuslinux.Daemon";
pub static DBUS_PATH: &str = "/org/asuslinux/Daemon";
pub static DBUS_IFACE: &str = "org.asuslinux.Daemon";
```
## Methods
@@ -31,7 +31,7 @@ This method expects a string of JSON as input. The JSON is of format such:
```
{
"Stable": {
"Static": {
"colour": [ 255, 0, 0]
}
}
@@ -46,7 +46,7 @@ The possible contents of a mode are:
Modes may or may not be available for a specific laptop (TODO: dbus getter for
supported modes). Modes are:
- `"Stable": { "colour": <colour> },`
- `"Static": { "colour": <colour> },`
- `"Pulse": { "colour": <colour> },`
- `"Comet": { "colour": <colour> },`
- `"Flash": { "colour": <colour> },`
@@ -111,7 +111,7 @@ When emitted, it will emit the JSON data of the mode changed to, e.g:
```
{
"Stable": {
"Static": {
"colour": [ 255, 0, 0]
}
}
@@ -128,31 +128,31 @@ When emitted, it will include the integer the charging limit was changed to.
## dbus-send examples
```
dbus-send --system --type=method_call --dest=org.rogcore.Daemon /org/rogcore/Daemon org.rogcore.Daemon.SetKeyBacklight string:'{"Stable": {"colour": [ 80, 0, 40]}}'
dbus-send --system --type=method_call --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.asuslinux.Daemon.SetKeyBacklight string:'{"Static": {"colour": [ 80, 0, 40]}}'
```
```
dbus-send --system --type=method_call --dest=org.rogcore.Daemon /org/rogcore/Daemon org.rogcore.Daemon.SetKeyBacklight string:'{"Star":{"colour":[0,255,255],"colour2":[0,0,0],"speed":"Med"}}'
dbus-send --system --type=method_call --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.asuslinux.Daemon.SetKeyBacklight string:'{"Star":{"colour":[0,255,255],"colour2":[0,0,0],"speed":"Med"}}'
```
**Note:** setting colour2 to `[0,0,255]` activates random star colour. Colour2 has no effect on the
mode otherwise.
```
dbus-send --system --type=method_call --dest=org.rogcore.Daemon /org/rogcore/Daemon org.rogcore.Daemon.SetKeyBacklight string:'{"Star":{"colour":[0,255,255],"colour2":[0,0,255],"speed":"Med"}}'
dbus-send --system --type=method_call --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.asuslinux.Daemon.SetKeyBacklight string:'{"Star":{"colour":[0,255,255],"colour2":[0,0,255],"speed":"Med"}}'
```
```
dbus-send --system --type=method_call --dest=org.rogcore.Daemon /org/rogcore/Daemon org.rogcore.Daemon.SetKeyBacklight string:'{"LedBrightness":3}'
dbus-send --system --type=method_call --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.asuslinux.Daemon.SetKeyBacklight string:'{"LedBrightness":3}'
```
```
dbus-send --system --type=method_call --dest=org.rogcore.Daemon /org/rogcore/Daemon org.rogcore.Daemon.SetFanMode byte:'2'
dbus-send --system --type=method_call --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.asuslinux.Daemon.SetFanMode byte:'2'
```
Monitoring dbus while sending commands via `rog-core` will give you the json structure if you are otherwise unsure, e.g: `dbus-monitor --system |grep -A2 rogcore`.
Monitoring dbus while sending commands via `rog-core` will give you the json structure if you are otherwise unsure, e.g: `dbus-monitor --system |grep -A2 asuslinux`.
## Getting an introspection .xml
```
dbus-send --system --print-reply --dest=org.rogcore.Daemon /org/rogcore/Daemon org.freedesktop.DBus.Introspectable.Introspect > xml/dbus-0.14.4.xml
dbus-send --system --print-reply --dest=org.asuslinux.Daemon /org/asuslinux/Daemon org.freedesktop.DBus.Introspectable.Introspect > xml/dbus-0.14.4.xml
```

View File

@@ -1,5 +1,5 @@
pub static DBUS_NAME: &str = "org.asuslinux.Daemon";
pub static DBUS_PATH: &str = "/org/asus/linux/Daemon";
pub static DBUS_PATH: &str = "/org/asuslinux/Daemon";
pub static DBUS_IFACE: &str = "org.asuslinux.Daemon";
pub const LED_MSG_LEN: usize = 17;

241
debian/changelog vendored
View File

@@ -1,241 +0,0 @@
rog-core (0.15.4) focal; urgency=medium
- Minor corrections to two laptops
-- Luke Jones <luke@ljones.dev> Wed, 22 Jul 2020 10:35:05 +1200
rog-core (0.15.3) focal; urgency=medium
- Put G532 in right section for support
-- Luke Jones <luke@ljones.dev> Tue, 21 Jul 2020 22:07:53 +1200
rog-core (0.15.2) focal; urgency=medium
- Add G532 support
- Change GX531 to support all LED modes
-- Luke Jones <luke@ljones.dev> Tue, 21 Jul 2020 21:13:57 +1200
rog-core (0.15.1) focal; urgency=medium
- Use correct keycode for calc
-- Luke Jones <luke@ljones.dev> Thu, 09 Jul 2020 20:31:04 +1200
rog-core (0.15.0) focal; urgency=medium
- Support "Calc" fn key on G712
- ROG key has limited customization, see README.md for details.
+ Power
+ Sleep
+ MediaRecord
+ MediaFastFwd
+ MediaRewind
+ MediaNext
+ MediaPrev
+ MediaStop
+ MediaPlayPause
+ MediaVolMute
+ MediaVolUp
+ MediaVolDown
+ BacklightInc
+ BacklightDec
+ ControlConfig
+ LaunchTextEditor
+ LaunchEmailApp
+ LaunchNewsReader
+ LaunchCalendar
+ LaunchCalculator
+ LaunchWebBrowser
+ FileBrowser
-- Luke Jones <luke@ljones.dev> Thu, 09 Jul 2020 11:14:16 +1200
rog-core (0.14.5) focal; urgency=medium
- Use udev rules to init the service
-- Luke Jones <luke@ljones.dev> Wed, 08 Jul 2020 21:53:04 +1200
rog-core (0.14.4) focal; urgency=medium
- Improve how service is initialised on boot
-- Luke Jones <luke@ljones.dev> Tue, 07 Jul 2020 16:14:48 +1200
rog-core (0.14.3) focal; urgency=medium
- Proper fix of laptop mode conversion bug
-- Luke Jones <luke@ljones.dev> Sun, 05 Jul 2020 21:22:05 +1200
rog-core (0.14.2) focal; urgency=medium
- Try to correct how laptop modes are handled
-- Luke Jones <luke@ljones.dev> Sun, 05 Jul 2020 00:22:00 +1200
rog-core (0.14.1) focal; urgency=medium
- Support for G512 series
- Support for GU502 (variant of GA15)
-- Luke Jones <luke@ljones.dev> Sat, 04 Jul 2020 10:18:08 +1200
rog-core (0.14.0) focal; urgency=medium
- Further refine the way setting LED modes works so it is more universal, this
also allows for setting the brightness through `SetKeyBacklight`
- `README_DBUS.md` to document DBUS interface
- Dbus method `GetKeyBacklight`
- Dbus method `GetKeyBacklightModes`
-- Luke Jones <luke@ljones.dev> Wed, 01 Jul 2020 11:04:34 +1200
rog-core (0.13.1) focal; urgency=medium
* Properly initialise the device
* Better log formatting
-- Luke Jones <luke@ljones.dev> Tue, 30 Jun 2020 09:56:52 +1200
rog-core (0.13.0) focal; urgency=medium
- Dbus command `LedWriteBytes` renamed to `SetKeyBacklight`
- Dbus command `SetKeyBacklight` will now take a JSON string instead of an array of bytes
+ Example:
```
{
"Breathe": {
"help": false,
"colour": [
254,
5,
171
],
"colour2": [
0,
156,
156
],
"speed": "High"
}
}
```
note that `help` is unused but required as a side-effect of using `gumdrop`
for CLI.
- Dbus signal `LedCancelEffect` renamed to `KeyBacklightChanged`
- Config file is now in JSON format, and will store only the LED modes that a laptop
supports rather than the whole set
-- Luke Jones <luke@ljones.dev> Mon, 29 Jun 2020 21:45:51 +1200
rog-core (0.12.2) focal; urgency=medium
* Changed "FanMode", "ChargeLimit" to "SetFanMode", "SetChargeLimit"
* Added dbus signals "FanModeChanged", "ChargeLimitChanged"
* Added dbus methods "GetFanMode", "GetChargeLimit"
* Added support for ROG Strix G712
-- Luke Jones <luke@ljones.dev> Mon, 29 Jun 2020 09:54:25 +1200
rog-core (0.12.0) focal; urgency=medium
* Add modes for FX531 LEDs
* Change where USB reset is called
* Add support for G531GT
* Remove duplicated code: it looks like there is at least *some* consistency
in Consumer-Device keycodes that ASUS uses
* `bat_charge_limit = 100` must be appended to the top of `/etc/rogcore.conf`
-- Luke Jones <luke@ljones.dev> Fri, 26 Jun 2020 16:47:03 +1200
rog-core (0.11.1) focal; urgency=medium
* Use DBUS_NAME instead of DBUS_IFACE when requesting the name
* Give different names for the bytearray arguments so that pydbus is not confused
* Add org.freedesktop.DBus.Method.NoReply annotations
* Remove dbus reply for multizone writes
* Move led_writer to a main loop due to strange mpsc behaviour, this combined with
mpsc channels offers a more reactive app
* Small fix for unreported mode indexing issue
-- Luke Jones <luke@ljones.dev> Thu, 11 Jun 2020 20:57:56 +1200
rog-core (0.11.0) focal; urgency=medium
* BREAKING CHANGE:
Many of the RGB built-in modes have been renamed to match Armory-Crate names,
this means that the `/etc/rogcore.conf` needs to be removed so it can be
regenerated using the updated names.
* Add better examples for AniMe display, and fix many small issues
* Don't halt app iff AniMe display not found when running on GA14/GA15 laptops
* Rename client crate to better suit
* Added a device reset for both keyboard and AniMe devices before configuring them
-- Luke Jones <luke@ljones.dev> Tue, 09 Jun 2020 20:46:45 +1200
rog-core (0.10.0) focal; urgency=medium
* Correctly set AMD boost
* Add animatrix support for G14 laptops
-- Luke Jones <luke@ljones.dev> Tue, 02 Jun 2020 20:11:53 +1200
rog-core (0.9.9) focal; urgency=medium
* Correctly set AMD boost
-- Luke Jones <luke@ljones.dev> Sat, 23 May 2020 19:24:36 +1200
rog-core (0.9.8) focal; urgency=medium
* Fix fan-mode cli help
-- Luke Jones <luke@ljones.dev> Sat, 23 May 2020 18:08:18 +1200
rog-core (0.9.7) focal; urgency=medium
* Start differentiating between models using the 0x1866 USB device
* Refactor how to send multizone over dbus, and how to write it (write 4 packets before writing SET/APPLY)
* Begin implementing profiles per board_name
* Boost toggle for AMD (not freq adjustment yet)
-- Luke Jones <luke@ljones.dev> Sat, 23 May 2020 14:38:57 +1200
rog-core (0.9.6) focal; urgency=medium
* Fix needing to double-tap fan-mode to change mode
-- Luke Jones <luke@ljones.dev> Fri, 22 May 2020 15:39:08 +1200
rog-core (0.9.5) focal; urgency=medium
* Internal fixes to many small issues
-- Luke Jones <luke@ljones.dev> Fri, 22 May 2020 15:10:24 +1200
rog-core (0.9.4) focal; urgency=medium
* Fix reloading last keyboard brightness on boot
-- Luke Jones <luke@ljones.dev> Tue, 05 May 2020 14:24:46 +1200
rog-core (0.9.3) focal; urgency=medium
* Fixes to rog-core client functionality
-- Luke Jones <luke@ljones.dev> Mon, 04 May 2020 15:35:15 +1200
rog-core (0.9.2) focal; urgency=medium
* Internal fixes to prevent deadlocks on mutexes
-- Luke Jones <luke@ljones.dev> Mon, 04 May 2020 13:24:40 +1200
rog-core (0.9.1) focal; urgency=medium
* Initial packaging
-- Luke Jones <luke@ljones.dev> Sat, 02 May 2020 20:17:12 +1200

8
debian/control vendored
View File

@@ -1,4 +1,4 @@
Source: rog-core
Source: asus-nb-ctrl
Section: admin
Priority: optional
Maintainer: Luke Jones <luke@ljones.dev>
@@ -9,16 +9,18 @@ Build-Depends:
libclang-dev,
libusb-1.0-0-dev,
libdbus-1-dev,
libudev-1-dev
pkg-config
Standards-Version: 4.1.1
Homepage: https://github.com/flukejones/rog-core
Homepage: https://gitlab.com/asus-linux/asus-nb-ctrl
Package: rog-core
Package: asus-nb-ctrl
Architecture: amd64
Depends:
dbus,
systemd,
libusb-1.0-0,
libudev,
${misc:Depends},
${shlibs:Depends}
Description:ASUS ROG Laptop Management

View File

@@ -1,22 +0,0 @@
#!/bin/sh
set -e
case "$1" in
configure)
CONF='/etc/rogcore.conf'
if [ -f $CONF ]; then
mv $CONF $CONF.save
fi
systemctl unmask rog-core.service
#ROG=$(lsusb |grep 0b05 |cut -d ' ' -f 6 |cut -d ':' -f 2)
#sed -i -e "s|==/"1866/"|==/"${ROG}/"|g" /etc/udev/rules.d/99-rog-core.rules
;;
*)
;;
esac
#DEBHELPER#
exit 0

View File

@@ -1,19 +0,0 @@
#!/bin/sh
set -e
case "$1" in
remove)
CONF='/etc/rogcore.conf'
if [ -f $CONF ]; then
rm -rf $CONF
fi
;;
*)
;;
esac
#DEBHELPER#
exit 0