Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.

9 changed files with 116 additions and 157 deletions

1
.gitignore vendored
View file

@ -4,4 +4,3 @@ 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

View file

@ -0,0 +1,96 @@
From f10ab9b513241a08af69f50f985b972715e27f07 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
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 <hdegoede@redhat.com>
---
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

View file

@ -1,33 +0,0 @@
From 1c6be22c5eeea9a7f83192153b282b6002b89923 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
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 <hdegoede@redhat.com>
---
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

View file

@ -27,9 +27,6 @@ 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
@ -38,8 +35,6 @@ 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 ###

View file

@ -70,10 +70,6 @@ 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
@ -93,27 +89,20 @@ 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/#TitleSpeed=10/TitleSpeed=0/" > \
-e "s/#Heartbeat=open/Heartbeat=off/" > \
/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
@ -134,7 +123,7 @@ case "$lcd_device" in
-e 's/KeyMatrix_4_4=Escape/KeyDirect_2=Right/' \
/etc/lcdproc/LCDd.conf
;;
"g15"|"g15-2"|"g510"|"z-10")
"g15"|"g15-2"|"g510")
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/' \

View file

@ -6,7 +6,7 @@ After=syslog.target
Type=forking
ExecStart=/usr/sbin/LCDd -c /etc/lcdproc/LCDd.conf
User=root
Group=lcdd
Group=nobody
[Install]
WantedBy=multi-user.target

View file

@ -1,13 +1,12 @@
%global commit 5c21e8c75fbab53574275c8007f5af746e333144
%global commitdate 20210209
%global commit 781b3113a592d75a29aa5024a94c2fd6b4592f87
%global commitdate 20190625
%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: 26.%{commitdate}git%{shortcommit}%{?dist}
# Automatically converted from old format: GPLv2 - review is highly recommended.
License: GPL-2.0-only
Release: 4.%{commitdate}git%{shortcommit}%{?dist}
License: GPLv2
URL: http://lcdproc.org
Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Source1: lcdproc.service
@ -16,8 +15,7 @@ Source3: LCDd.service
Source4: LCDd-hwdetect.service
Source5: LCDd-hwdetect.sh
Source6: 90-lcdproc.rules
Source7: lcdproc.sysusers
Patch1: 0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch
Patch1: 0001-clients-lcdproc-MemTop-be-smarter-about-how-much-pro.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
@ -27,7 +25,7 @@ Patch1: 0001-server-drivers-g15-Add-support-for-the-LCD-on-Logite.patch
Patch99: lcdproc-conf.patch
BuildRequires: perl-generators
BuildRequires: systemd-rpm-macros
BuildRequires: systemd
BuildRequires: doxygen
BuildRequires: graphviz
@ -35,7 +33,7 @@ BuildRequires: freetype-devel
%ifnarch s390 s390x
BuildRequires: libhid-devel
%endif
BuildRequires: libusb1-devel
BuildRequires: libusb-devel
BuildRequires: lirc-devel
BuildRequires: ncurses-devel
BuildRequires: openldap-devel
@ -46,8 +44,11 @@ BuildRequires: libXext-devel
BuildRequires: libftdi-devel
BuildRequires: libg15render-devel
BuildRequires: mx5000tools-devel
BuildRequires: libtool autoconf automake
BuildRequires: gcc make
%ifarch %{ix86} x86_64
BuildRequires: svgalib-devel
%endif
# For libftdi1
BuildRequires: libtool autoconf automake
%{?systemd_requires}
@ -72,15 +73,6 @@ 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} \
@ -112,14 +104,12 @@ 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
@ -127,13 +117,12 @@ 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
mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f} \
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f}.example
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f}
done
%post
%systemd_post LCDd.service lcdproc.service
@ -154,88 +143,13 @@ done
%{_libdir}/lcdproc/
%{_mandir}/man?/*
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/*.conf
%ghost %{_sysconfdir}/%{name}/*.conf
%config %{_sysconfdir}/%{name}/*.conf.example
%{_unitdir}/*
%{_udevrulesdir}/90-%{name}.rules
%{_sysusersdir}/lcdproc.conf
%changelog
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-26.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.9-25.20210209git5c21e8c
- Drop call to %sysusers_create_compat
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-24.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Jul 29 2024 Miroslav Suchý <msuchy@redhat.com> - 0.5.9-23.20210209git5c21e8c
- convert license to SPDX
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-22.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-21.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-20.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-19.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-18.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-17.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-16.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-15.20210209git5c21e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Apr 15 2021 Hans de Goede <hdegoede@redhat.com> - 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 <zbyszek@in.waw.pl> - 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 <releng@fedoraproject.org> - 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 <pbrobinson@fedoraproject.org> - 0.5.9-11.20190625git781b311
- Build with libusb1
* Thu Aug 20 2020 Jeff Law <law@redhat.com> - 0.5.9-10.20190625git781b311
- Re-enable LTO
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-9.20190625git781b311
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Jeff Law <law@redhat.com> - 0.5.9-8.20190625git781b311
- Disable LTO
* Fri Mar 20 2020 Hans de Goede <hdegoede@redhat.com> - 0.5.9-7.20190625git781b311
- Drop svgalib support, svgalib is being dropped from the distro (rhbz#1814816)
* Mon Feb 24 2020 Than Ngo <than@redhat.com> - 0.5.9-6.git
- Fixed FTBFS against gcc10
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9-5.20190625git781b311
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Oct 4 2019 Hans de Goede <hdegoede@redhat.com> - 0.5.9-4.20190625git781b311
- Replace Group=lcdd statement in LCDd.service with Group=nobody, LCDd does not
need a special group and it breaks starting LCDd (rhbz#1742994)

View file

@ -1 +0,0 @@
g lcdd -

View file

@ -1 +1 @@
SHA512 (lcdproc-5c21e8c.tar.gz) = cc0f6622bfc76382306d1419b76e9d9d16740722bc29568559f4b022e0747a2edb3fece8d3f3d5871972b778290bc6178bd2de3919b6eae019505551e91f93cb
SHA512 (lcdproc-781b311.tar.gz) = d70754ba136b6d020ad1e0b2a5953087a22278b806bd7163580e255d0db3c9af8eaad3347ca4d0fbf1f72ae076dfb0c212d6e0d6e665b8aa12a33aea840fb766