diff --git a/.gitignore b/.gitignore index 8c1ad3b..e206406 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ lcdproc-0.5.3.tar.gz /lcdproc-0.5.6.tar.gz /lcdproc-0.5.7.tar.gz /lcdproc-781b311.tar.gz +/lcdproc-5c21e8c.tar.gz diff --git a/0001-clients-lcdproc-MemTop-be-smarter-about-how-much-pro.patch b/0001-clients-lcdproc-MemTop-be-smarter-about-how-much-pro.patch deleted file mode 100644 index d157509..0000000 --- a/0001-clients-lcdproc-MemTop-be-smarter-about-how-much-pro.patch +++ /dev/null @@ -1,96 +0,0 @@ -From f10ab9b513241a08af69f50f985b972715e27f07 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Thu, 4 Jul 2019 11:45:09 +0200 -Subject: [PATCH] clients/lcdproc: MemTop: be smarter about how much processes - to show - -Instead of hardcoding the number of processes to 5, which only works -well for LCDs with 4 lines or less, do the following: - -On LCDs with 4 lines or less show 5 processes (no change) - -On LCDs with 5 lines we have 4 free lines, showing 5 processes with -scrolling here makes things look like we scroll 1 line down and then 1 -line back up again, which looks wrong (*). So show 4 processes here. - -On LCDs with 6 lines or more, show as many processes as will fit so that -we use the entire screen. - -Note that the last 2 cases both come down to showing as many lines as -will fit. - -*) This happens e.g. on the LCD panel in various Logitech keyboards, which -fits 5 lines. - -Signed-off-by: Hans de Goede ---- - clients/lcdproc/mem.c | 27 ++++++++++++++++++++++----- - 1 file changed, 22 insertions(+), 5 deletions(-) - -diff --git a/clients/lcdproc/mem.c b/clients/lcdproc/mem.c -index 187d421..ddec98c 100644 ---- a/clients/lcdproc/mem.c -+++ b/clients/lcdproc/mem.c -@@ -224,7 +224,7 @@ sort_procs(void *a, void *b) - - - /** -- * Mem Top Screen displays info about top 5 memory hogs... -+ * Mem Top Screen displays info about top memory hogs... - * - *\verbatim - * -@@ -246,8 +246,25 @@ int - mem_top_screen(int rep, int display, int *flags_ptr) - { - LinkedList *procs; -+ int lines; - int i; - -+ /* On screen <= 4 lines show info for 5 processes and use scrolling */ -+ if (lcd_hgt <= 4) -+ lines = 5; -+ /* -+ * On 5 lines displays we have 4 free lines, using 5 lines with -+ * scrolling here makes things look like we scroll 1 line down and -+ * then 1 line back up again, which looks wrong. So we use as many -+ * lines as fit (4) instead of 5 on a 5 lines display, so that we do -+ * not get the weird scrolling. -+ * -+ * Likewise for > 5 lines we also want to show as many lines as fit -+ * so that we use the entire screen. -+ */ -+ else -+ lines = lcd_hgt - 1; -+ - if ((*flags_ptr & INITIALIZED) == 0) { - *flags_ptr |= INITIALIZED; - -@@ -260,12 +277,12 @@ mem_top_screen(int rep, int display, int *flags_ptr) - sock_send_string(sock, "widget_add S f frame\n"); - - /* scroll rate: 1 line every X ticks (= 1/8 sec) */ -- sock_printf(sock, "widget_set S f 1 2 %i %i %i 5 v %i\n", -- lcd_wid, lcd_hgt, lcd_wid, -+ sock_printf(sock, "widget_set S f 1 2 %i %i %i %i v %i\n", -+ lcd_wid, lcd_hgt, lcd_wid, lines, - ((lcd_hgt >= 4) ? 8 : 12)); - - /* frame contents */ -- for (i = 1; i <= 5; i++) { -+ for (i = 1; i <= lines; i++) { - sock_printf(sock, "widget_add S %i string -in f\n", i); - } - sock_send_string(sock, "widget_set S 1 1 1 Checking...\n"); -@@ -291,7 +308,7 @@ mem_top_screen(int rep, int display, int *flags_ptr) - LL_Rewind(procs); - LL_Sort(procs, sort_procs); - LL_Rewind(procs); -- for (i = 1; i <= 5; i++) { -+ for (i = 1; i <= lines; i++) { - procinfo_type *p = LL_Get(procs); - - if (p != NULL) { --- -2.21.0 - diff --git a/0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch b/0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch new file mode 100644 index 0000000..870fc04 --- /dev/null +++ b/0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch @@ -0,0 +1,33 @@ +From 1c6be22c5eeea9a7f83192153b282b6002b89923 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 12 Apr 2021 22:44:06 +0200 +Subject: [PATCH] server/drivers/g15: Add support for the LCD on Logitech Z-10 + speakers + +The LCD on Logitech Z-10 speakers uses the exact same protocol as on +the g15 keyboards, add the USB-id + HID-descriptor header of the +USB-intf. for the LCD. + +Signed-off-by: Hans de Goede +--- + server/drivers/g15.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/server/drivers/g15.c b/server/drivers/g15.c +index 154e253..48f5fe5 100644 +--- a/server/drivers/g15.c ++++ b/server/drivers/g15.c +@@ -90,6 +90,10 @@ static const struct lib_hidraw_id hidraw_ids[] = { + { { BUS_USB, 0x046d, 0xc22e }, + { 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x02, + 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x07 } }, ++ /* Z-10 */ ++ { { BUS_USB, 0x046d, 0x0a07 }, ++ { 0x06, 0x00, 0xff, 0x09, 0x00, 0xa1, 0x01, 0x15, ++ 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x08 } }, + /* Terminator */ + {} + }; +-- +2.31.1 + diff --git a/90-lcdproc.rules b/90-lcdproc.rules index e6be0c4..e69e4a8 100644 --- a/90-lcdproc.rules +++ b/90-lcdproc.rules @@ -27,6 +27,9 @@ DEVPATH=="*/0003:046D:C227.*/hidraw/hidraw*", GOTO="lcdproc_lcd_found" DEVPATH=="*/0003:046D:C22D.*/hidraw/hidraw*", ATTRS{bInterfaceNumber}=="01", GOTO="lcdproc_lcd_found" DEVPATH=="*/0003:046D:C22E.*/hidraw/hidraw*", ATTRS{bInterfaceNumber}=="01", GOTO="lcdproc_lcd_found" +# Logitech Z-10 speakers with G15 style LCD screen, note we only want interface 2 +DEVPATH=="*/0003:046D:0A07.*/hidraw/hidraw*", ATTRS{bInterfaceNumber}=="02", GOTO="lcdproc_lcd_found" + ### 3. Check for input devices for LCD menu buttons ### # Logitech G15, G15 v2 and G510 Gaming and LCD menu keys @@ -35,6 +38,8 @@ SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Logitech Gaming Keyboard Gam SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Logitech MX5000 Keyboard", GOTO="lcdproc_input_found" # Logitech MX5000 keyboard connected through its receiver in USB HID proxy mode SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Logitech Wireless Keyboard PID:b305", GOTO="lcdproc_input_found" +# Logitech Z-10 speakers LCD menu keys +SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Logitech Z-10 LCD Menu Keys", GOTO="lcdproc_input_found" ### Nothing found, leave ### diff --git a/LCDd-hwdetect.sh b/LCDd-hwdetect.sh index 87ad3bc..7869a9f 100644 --- a/LCDd-hwdetect.sh +++ b/LCDd-hwdetect.sh @@ -70,6 +70,10 @@ if [ -d /sys/bus/hid/devices ]; then 0003:046D:C22E.*) add_device "g510" "g15" "Logitech Gaming Keyboard Gaming Keys" ;; + # Logitech Z10 speakers + 0003:046D:0A07.*) + add_device "z-10" "g15" "Logitech Z-10 LCD Menu Keys" + ;; esac done popd > /dev/null @@ -89,20 +93,27 @@ fi # Write LCDd.conf for the found device, also: # Disable the server screen in the rotation of screens # Disable the annoying blinking heartbeat by default +# Disable title scrolling (set the speed to 0) most keyboard LCDs have +# a low refresh rate making the scrolling look terrible cat /etc/lcdproc/LCDd.conf.example | \ sed -e "s/^Driver=curses/Driver=$lcd_driver/" \ -e "s/#ServerScreen=no/ServerScreen=no/" \ - -e "s/#Heartbeat=open/Heartbeat=off/" > \ + -e "s/#Heartbeat=open/Heartbeat=off/" \ + -e "s/#TitleSpeed=10/TitleSpeed=0/" > \ /etc/lcdproc/LCDd.conf # Add input-device config if specified # Also set prev / next screen to up/down since non of the supported devices # has enough buttons to create mappings for both left and right +# And uncomment the LeftKey and RightKey assignments so that they work +# when they are available if [ "$input_name" ]; then sed -i -e "s|Driver=$lcd_driver|Driver=$lcd_driver\nDriver=linux_input|" \ -e "s|PrevScreenKey=Left|PrevScreenKey=Up|" \ -e "s|NextScreenKey=Right|NextScreenKey=Down|" \ -e "s|# Device=/dev/input/event0|Device=\"$input_name\"|" \ + -e "s|#LeftKey=Left|LeftKey=Left|" \ + -e "s|#RightKey=Right|RightKey=Right|" \ /etc/lcdproc/LCDd.conf fi @@ -123,7 +134,7 @@ case "$lcd_device" in -e 's/KeyMatrix_4_4=Escape/KeyDirect_2=Right/' \ /etc/lcdproc/LCDd.conf ;; - "g15"|"g15-2"|"g510") + "g15"|"g15-2"|"g510"|"z-10") sed -i -e "s/# specify a non-default key map/# Keymap for the G15's 5 LCD-menu buttons/" \ -e 's/#key=1,Escape/key=0x2b8,Escape/' \ -e 's/#key=28,Enter/key=0x2b9,Left/' \ diff --git a/LCDd.service b/LCDd.service index e96d736..b77d2e2 100644 --- a/LCDd.service +++ b/LCDd.service @@ -6,7 +6,7 @@ After=syslog.target Type=forking ExecStart=/usr/sbin/LCDd -c /etc/lcdproc/LCDd.conf User=root -Group=nobody +Group=lcdd [Install] WantedBy=multi-user.target diff --git a/lcdproc-gcc10.patch b/lcdproc-gcc10.patch deleted file mode 100644 index 0c41b05..0000000 --- a/lcdproc-gcc10.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.c.me lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.c ---- lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.c.me 2020-02-24 13:48:32.277935940 +0100 -+++ lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.c 2020-02-24 13:49:12.083293814 +0100 -@@ -32,6 +32,7 @@ - #define UNSET_INT -1 - #define UNSET_STR "\01" - -+IfaceInfo iface[MAX_INTERFACES]; - - static int iface_count = 0; /* number of interfaces */ - static char unit_label[10] = "B"; /* default unit label is Bytes */ -diff -up lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.h.me lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.h ---- lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.h.me 2020-02-24 13:47:42.332486918 +0100 -+++ lcdproc-781b3113a592d75a29aa5024a94c2fd6b4592f87/clients/lcdproc/iface.h 2020-02-24 13:48:09.954735252 +0100 -@@ -18,7 +18,7 @@ - /** max number of interfaces in multi-interface mode */ - #define MAX_INTERFACES 3 - --IfaceInfo iface[MAX_INTERFACES]; /* interface info */ -+extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */ - - /** Update screen content */ - int iface_screen(int rep, int display, int *flags_ptr); diff --git a/lcdproc.spec b/lcdproc.spec index ff52745..9318cb5 100644 --- a/lcdproc.spec +++ b/lcdproc.spec @@ -1,12 +1,13 @@ -%global commit 781b3113a592d75a29aa5024a94c2fd6b4592f87 -%global commitdate 20190625 +%global commit 5c21e8c75fbab53574275c8007f5af746e333144 +%global commitdate 20210209 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Summary: Display real-time system information on a 20x4 back-lit LCD Name: lcdproc Version: 0.5.9 -Release: 6.%{commitdate}git%{shortcommit}%{?dist} -License: GPLv2 +Release: 26.%{commitdate}git%{shortcommit}%{?dist} +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only URL: http://lcdproc.org Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: lcdproc.service @@ -15,8 +16,8 @@ Source3: LCDd.service Source4: LCDd-hwdetect.service Source5: LCDd-hwdetect.sh Source6: 90-lcdproc.rules -Patch1: 0001-clients-lcdproc-MemTop-be-smarter-about-how-much-pro.patch -Patch2: lcdproc-gcc10.patch +Source7: lcdproc.sysusers +Patch1: 0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch # lcdconf.conf tweaks: # 1. Enable ProcSize, this is quite useful to have # 2. Disable TimeDate, its info is duplicate with the MiniClock and it is ugly @@ -26,7 +27,7 @@ Patch2: lcdproc-gcc10.patch Patch99: lcdproc-conf.patch BuildRequires: perl-generators -BuildRequires: systemd +BuildRequires: systemd-rpm-macros BuildRequires: doxygen BuildRequires: graphviz @@ -34,7 +35,7 @@ BuildRequires: freetype-devel %ifnarch s390 s390x BuildRequires: libhid-devel %endif -BuildRequires: libusb-devel +BuildRequires: libusb1-devel BuildRequires: lirc-devel BuildRequires: ncurses-devel BuildRequires: openldap-devel @@ -45,11 +46,8 @@ BuildRequires: libXext-devel BuildRequires: libftdi-devel BuildRequires: libg15render-devel BuildRequires: mx5000tools-devel -%ifarch %{ix86} x86_64 -BuildRequires: svgalib-devel -%endif -# For libftdi1 -BuildRequires: libtool autoconf automake +BuildRequires: libtool autoconf automake +BuildRequires: gcc make %{?systemd_requires} @@ -74,6 +72,15 @@ touch -r TODO LCDd.conf %build +# This package has a configure test which uses ASMs, but does not link the +# resultant .o files. As such the ASM test is always successful in a LTO +# build. We can force code generation with the -ffat-lto-objects to make +# the test work as expected. +# +# -ffat-lto-objects is the default for F33, but will not be for F34, so we +# make it explicit here. +%define _lto_cflags -flto=auto -ffat-lto-objects + autoreconf -vif %configure \ --sysconfdir=%{_sysconfdir}/%{name} \ @@ -105,12 +112,14 @@ install -pm 0644 CREDITS.md ChangeLog.md README.md \ install -d $RPM_BUILD_ROOT%{_unitdir} install -d $RPM_BUILD_ROOT%{_unitdir}/lcdproc.target.wants install -d $RPM_BUILD_ROOT%{_udevrulesdir} +install -d $RPM_BUILD_ROOT%{_sysusersdir} install -pm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir} install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir} install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir} install -pm 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir} install -pm 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/LCDd-hwdetect install -pm 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_udevrulesdir} +install -pm 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysusersdir}/lcdproc.conf for i in lcdproc.service LCDd.service LCDd-hwdetect.service; do ln -s ../$i $RPM_BUILD_ROOT%{_unitdir}/lcdproc.target.wants done @@ -118,12 +127,13 @@ done #Disable default configuration #Thoses are only provided as an example since ncurses isn't a suitable default configuration. for f in LCDd.conf lcdproc.conf ; do -mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f} \ - $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f}.example -touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f} + mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f} \ + $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f}.example done + + %post %systemd_post LCDd.service lcdproc.service @@ -144,13 +154,82 @@ done %{_libdir}/lcdproc/ %{_mandir}/man?/* %dir %{_sysconfdir}/%{name} -%ghost %{_sysconfdir}/%{name}/*.conf +%config %{_sysconfdir}/%{name}/*.conf %config %{_sysconfdir}/%{name}/*.conf.example %{_unitdir}/* %{_udevrulesdir}/90-%{name}.rules +%{_sysusersdir}/lcdproc.conf %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.5.9-26.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 0.5.9-25.20210209git5c21e8c +- Drop call to %sysusers_create_compat + +* Fri Jan 17 2025 Fedora Release Engineering - 0.5.9-24.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Jul 29 2024 Miroslav Suchý - 0.5.9-23.20210209git5c21e8c +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 0.5.9-22.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 0.5.9-21.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 0.5.9-20.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 0.5.9-19.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 0.5.9-18.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 0.5.9-17.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.5.9-16.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.5.9-15.20210209git5c21e8c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Apr 15 2021 Hans de Goede - 0.5.9-14.20210209git5c21e8c +- Sync with latest upstream git +- Add support for LCD found on Logitech Z-10 speakers, + inc. autodetect by udev + automatic LCDd.conf generation by LCDd-hwdetect +- Fix Logitech G15 family devices requiring a manual restart of LCDd + after a unplug + replug +- Drop ghosting of /etc/lcdproc/*.conf files, these may contain user + modifications, so they should not be removed on package removal +- This also fixes lcdexec.conf and lcdvc.conf not being packaged + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.5.9-13.20190625git781b311 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 0.5.9-12.20190625git781b311 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Nov 24 21:06:08 GMT 2020 Peter Robinson - 0.5.9-11.20190625git781b311 +- Build with libusb1 + +* Thu Aug 20 2020 Jeff Law - 0.5.9-10.20190625git781b311 +- Re-enable LTO + +* Tue Jul 28 2020 Fedora Release Engineering - 0.5.9-9.20190625git781b311 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 14 2020 Jeff Law - 0.5.9-8.20190625git781b311 +- Disable LTO + +* Fri Mar 20 2020 Hans de Goede - 0.5.9-7.20190625git781b311 +- Drop svgalib support, svgalib is being dropped from the distro (rhbz#1814816) + * Mon Feb 24 2020 Than Ngo - 0.5.9-6.git - Fixed FTBFS against gcc10 diff --git a/lcdproc.sysusers b/lcdproc.sysusers new file mode 100644 index 0000000..7213bda --- /dev/null +++ b/lcdproc.sysusers @@ -0,0 +1 @@ +g lcdd - diff --git a/sources b/sources index d1867ac..7d495a3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lcdproc-781b311.tar.gz) = d70754ba136b6d020ad1e0b2a5953087a22278b806bd7163580e255d0db3c9af8eaad3347ca4d0fbf1f72ae076dfb0c212d6e0d6e665b8aa12a33aea840fb766 +SHA512 (lcdproc-5c21e8c.tar.gz) = cc0f6622bfc76382306d1419b76e9d9d16740722bc29568559f4b022e0747a2edb3fece8d3f3d5871972b778290bc6178bd2de3919b6eae019505551e91f93cb