commit
05eadd1419
@ -0,0 +1,18 @@
|
|||||||
|
clog
|
||||||
|
lirc-*.tar.bz2
|
||||||
|
.build-*.log
|
||||||
|
*.rpm
|
||||||
|
lirc-*/
|
||||||
|
lirc-0.8.7pre2.tar.bz2
|
||||||
|
/lirc-0.8.7-pre3.tar.bz2
|
||||||
|
/lirc-0.8.7.tar.bz2
|
||||||
|
/lirc-0.9.0-pre1.tar.bz2
|
||||||
|
/lirc-0.9.2.tar.gz
|
||||||
|
/lirc-0.9.2a.tar.gz
|
||||||
|
/lirc-0.9.3.tar.gz
|
||||||
|
/lirc-0.9.3a.tar.gz
|
||||||
|
/lirc-0.9.4.tar.gz
|
||||||
|
/lirc-0.9.4a.tar.gz
|
||||||
|
/lirc-0.9.4b.tar.gz
|
||||||
|
/lirc-0.9.4c.tar.gz
|
||||||
|
/lirc-0.10.0.tar.gz
|
@ -0,0 +1,60 @@
|
|||||||
|
From 11e1e9ee6b353c6e7c68f92f89c49d52f396cfc7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Mon, 14 Aug 2017 10:31:55 +0200
|
||||||
|
Subject: [PATCH] build: install media/lirc.h (BTS #872074).
|
||||||
|
|
||||||
|
The plugin builds references this file. Basically, this should be
|
||||||
|
resolved by lirc_driver.h, testing if the kernel header is
|
||||||
|
available and using it if so, but without including config.h
|
||||||
|
|
||||||
|
This fix adds an evil symlink to not remove anything. The proper
|
||||||
|
fix includes actually moving the file and also streamlining the
|
||||||
|
HAVE_KERNEL_LIRC_H to the generic HAVE_LINUX_LIRC_H.
|
||||||
|
---
|
||||||
|
Makefile.am | 5 ++++-
|
||||||
|
configure.ac | 3 +++
|
||||||
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index aafb4e8..9f3dd14 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -138,12 +138,15 @@ install-data-hook:
|
||||||
|
$(SED) -i -e '/^plugindir/s|/usr/lib|$(libdir)|' \
|
||||||
|
$(DESTDIR)$(lirc_confdir)/lirc_options.conf
|
||||||
|
cp -pr $(srcdir)/contrib $(DESTDIR)$(pkgdatadir)
|
||||||
|
+ chmod u+w $(DESTDIR)$(includedir)
|
||||||
|
+ cd $(DESTDIR)$(includedir)/lirc; ln -s include/media .
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
-chmod -R u+w $(DESTDIR)/$(pkgdatadir)/contrib
|
||||||
|
-rm -rf $(DESTDIR)/$(pkgdatadir) \
|
||||||
|
$(DESTDIR)/$(pkgpythondir) \
|
||||||
|
- $(DESTDIR)/$(pkgdatadir)/contrib
|
||||||
|
+ $(DESTDIR)/$(pkgdatadir)/contrib \
|
||||||
|
+ $(DESTDIR)$(includedir)/lirc
|
||||||
|
|
||||||
|
dist-hook: ChangeLog fix-version
|
||||||
|
cp -pr $(srcdir)/contrib $(distdir)
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 321a61f..4108688 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -511,11 +511,14 @@ AC_DEFINE(LIRC_OPTIONS_VAR, ["LIRC_OPTIONS_PATH"],[
|
||||||
|
Environment variable overriding options file path])
|
||||||
|
|
||||||
|
AH_TOP([
|
||||||
|
+#ifndef ROOT_CONFIG_H
|
||||||
|
+#define ROOT_CONFIG_H
|
||||||
|
#include "paths.h"
|
||||||
|
])
|
||||||
|
|
||||||
|
AH_BOTTOM([
|
||||||
|
#include "lirc/lirc_config.h"
|
||||||
|
+#endif // ROOT_CONFIG_H
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl write these decisions out to the Makefiles
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
From e2693b9022f390070ef0136020aafc8c1c18769c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Fri, 12 Oct 2018 20:49:58 +0200
|
||||||
|
Subject: [PATCH] lirc-setup: Fix crash on start on missing lirc.config.
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile.am | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index aafb4e8ca..d5dbfb621 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -80,6 +80,7 @@ py_PYTHON = python-pkg/lirc/__init__.py \
|
||||||
|
python-pkg/lirc/database.py \
|
||||||
|
python-pkg/lirc/paths.py
|
||||||
|
|
||||||
|
+nodist_py_PYTHON = python-pkg/lirc/config.py
|
||||||
|
nodist_py_pkg_PYTHON = python-pkg/lirc/config.py
|
||||||
|
|
||||||
|
if HAVE_PYTHON35
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From 14685b280fde85a6e801f7fb7d5e579b2ddb3581 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ayke van Laethem <aykevanlaethem@gmail.com>
|
||||||
|
Date: Fri, 28 Jul 2017 18:07:50 +0200
|
||||||
|
Subject: [PATCH 3/6] plugins: devinput: fix glob "no match" error
|
||||||
|
|
||||||
|
See 63e041cc5 and LIRC issue #285 (Debian: #860551)
|
||||||
|
---
|
||||||
|
plugins/devinput.c | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/devinput.c b/plugins/devinput.c
|
||||||
|
index 846a0b70..d4d733a0 100644
|
||||||
|
--- a/plugins/devinput.c
|
||||||
|
+++ b/plugins/devinput.c
|
||||||
|
@@ -247,15 +247,15 @@ static int locate_default_device(char* errmsg, size_t size)
|
||||||
|
|
||||||
|
r = glob("/sys/class/rc/rc0/input[0-9]*/event[0-9]*",
|
||||||
|
0, NULL, &matches);
|
||||||
|
- if (r != 0) {
|
||||||
|
- log_perror_warn("Cannot run glob %s", DEV_PATTERN);
|
||||||
|
+ if (r == GLOB_NOMATCH) {
|
||||||
|
+ strncpy(errmsg, "No /sys/class/rc/ devices found", size - 1);
|
||||||
|
log_notice("No input device available for devinput driver."
|
||||||
|
" Consider stopping lircd.socket or reconfigure lirc");
|
||||||
|
- snprintf(errmsg, size, "Cannot glob %s", DEV_PATTERN);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- if (matches.gl_pathc == 0) {
|
||||||
|
- strncpy(errmsg, "No /sys/class/rc/ devices found", size - 1);
|
||||||
|
+ if (r != 0) {
|
||||||
|
+ log_perror_warn("Cannot run glob %s", DEV_PATTERN);
|
||||||
|
+ snprintf(errmsg, size, "Cannot glob %s", DEV_PATTERN);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (matches.gl_pathc > 1) {
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From aa2b06cff01b52666e44aae59ee56fc9092cad93 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Sun, 3 Sep 2017 04:21:57 +0200
|
||||||
|
Subject: [PATCH 5/6] mode2: Fix inconsistent loglevel/debug option (#307).
|
||||||
|
|
||||||
|
---
|
||||||
|
tools/mode2.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/mode2.cpp b/tools/mode2.cpp
|
||||||
|
index fe578f89..e962610d 100644
|
||||||
|
--- a/tools/mode2.cpp
|
||||||
|
+++ b/tools/mode2.cpp
|
||||||
|
@@ -74,7 +74,7 @@ static const char* const help =
|
||||||
|
|
||||||
|
static const struct option options[] = {
|
||||||
|
{"help", no_argument, NULL, 'h'},
|
||||||
|
- {"debug", required_argument, NULL, 'D'},
|
||||||
|
+ {"loglevel", required_argument, NULL, 'D'},
|
||||||
|
{"version", no_argument, NULL, 'v'},
|
||||||
|
{"device", required_argument, NULL, 'd'},
|
||||||
|
{"driver", required_argument, NULL, 'H'},
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 9d2e0a40294408764710657e78929c83f2fc0f31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Wed, 21 Aug 2019 21:48:25 +0200
|
||||||
|
Subject: [PATCH 6/6] python-pkg: Don't use deprecated time.clock() (RHBZ
|
||||||
|
#1718285)
|
||||||
|
|
||||||
|
---
|
||||||
|
python-pkg/lirc/client.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python-pkg/lirc/client.py b/python-pkg/lirc/client.py
|
||||||
|
index 7e069a55..482913cf 100644
|
||||||
|
--- a/python-pkg/lirc/client.py
|
||||||
|
+++ b/python-pkg/lirc/client.py
|
||||||
|
@@ -219,10 +219,10 @@ class RawConnection(AbstractConnection):
|
||||||
|
def readline(self, timeout: float = None) -> str:
|
||||||
|
''' Implements AbstractConnection.readline(). '''
|
||||||
|
if timeout:
|
||||||
|
- start = time.clock()
|
||||||
|
+ start = time.perf_counter()
|
||||||
|
while b'\n' not in self._buffer:
|
||||||
|
ready = self._select.select(
|
||||||
|
- start + timeout - time.clock() if timeout else timeout)
|
||||||
|
+ start + timeout - time.perf_counter() if timeout else timeout)
|
||||||
|
if ready == []:
|
||||||
|
if timeout:
|
||||||
|
raise TimeoutException(
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="rc", ATTR{protocols}="lirc"
|
@ -1,21 +0,0 @@
|
|||||||
# Makefile for source rpm: lirc
|
|
||||||
# $Id$
|
|
||||||
NAME := lirc
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attept a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Rootx && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
@ -0,0 +1,146 @@
|
|||||||
|
## Fedora README
|
||||||
|
|
||||||
|
0.9.2
|
||||||
|
|
||||||
|
This a major upstream update. Don't expect things to be the same, read
|
||||||
|
the NEWS file in the documentation (/usr/share/doc/lirc/NEWS).
|
||||||
|
|
||||||
|
Packaging-wise, the package has been split into smaller packages. Installing
|
||||||
|
the 'lirc' package will bring all of them. You might be interested in
|
||||||
|
not installing or removing e. g., unused drivers, the gui and/or the
|
||||||
|
config package.
|
||||||
|
|
||||||
|
The lircd daemon now runs as user lirc. This is using the new
|
||||||
|
--effective-user option, so it's still started as root and runs as root
|
||||||
|
until all devices and files are opened. Should this become a problem, just
|
||||||
|
change the effective-user option in lirc_options.conf.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
0.9.1
|
||||||
|
|
||||||
|
#### Systemd
|
||||||
|
|
||||||
|
The fedora lirc package supports two systemd services lircd.socket
|
||||||
|
and lircmd.service. See below for enabling and starting these
|
||||||
|
services.
|
||||||
|
|
||||||
|
Since systemd quite aggressively runs things in parallel during startup,
|
||||||
|
clients like irexec sometimes runs into troubles because the socket
|
||||||
|
they want to connect to isn't available. This can cause hard to debug
|
||||||
|
problems. From this version, lircd supports a --wait-for-socket option.
|
||||||
|
Using this, the calling party is blocked until the socket is available.
|
||||||
|
|
||||||
|
#### New configuration file(s)
|
||||||
|
|
||||||
|
From this version lirc supports a new configuration file
|
||||||
|
/etc/lirc/lirc_options.conf. This holds default values for all
|
||||||
|
command line options, and does in fact replace those in most
|
||||||
|
installations. When updating, you need to use your old
|
||||||
|
/etc/sysconfig/lirc config file to update lirc_options.conf.
|
||||||
|
|
||||||
|
The old file /etc/sysconfig/lirc is no longer used.
|
||||||
|
|
||||||
|
The need to define a device that should be reserved (the old
|
||||||
|
LIRC_IR_DEVICE option) is no longer needed - lircd is clever enough
|
||||||
|
to do this by itself.
|
||||||
|
|
||||||
|
#### Enable lirc protocol (obsolete)
|
||||||
|
|
||||||
|
In previous version the lirc protocol had to be be enabled
|
||||||
|
for the actual device used. This was done using either by installing the
|
||||||
|
lirc-disable-kernel-rc subpackage or by setting the LIRCD_IR_DEVICE in
|
||||||
|
/etc/sysconfig/lirc. This is no longer needed, lircd does this
|
||||||
|
automatically. The lirc-disable-kernel-rc subpackage is still available
|
||||||
|
"just in case" but should normally not be needed.
|
||||||
|
|
||||||
|
#### Socket activation
|
||||||
|
|
||||||
|
As of 0.9.4-15+, the Fedora lirc package sports systemd socket
|
||||||
|
activation. This should fix the problems at startup when clients can't
|
||||||
|
connect to /var/run/lircd because the lircd service is yet not started.
|
||||||
|
|
||||||
|
To start the lircd service using socket activation:
|
||||||
|
```
|
||||||
|
# systemctl enable lircd.socket
|
||||||
|
# systemctl start lircd.socket
|
||||||
|
```
|
||||||
|
The lircmd is started the usual way:
|
||||||
|
```
|
||||||
|
# systemctl enable lircmd.service
|
||||||
|
# systemctl start lircmd.service
|
||||||
|
```
|
||||||
|
#### Running another instance.
|
||||||
|
|
||||||
|
Sometimes another lircd instance is required to handle some other input
|
||||||
|
device. This could be done by creating a new service definition in
|
||||||
|
/etc/systemd/system.
|
||||||
|
|
||||||
|
In my case I have an extra instance handling ir output to the transciever.
|
||||||
|
This is accomplished with a file /etc/systemd/system/lirc-tx:
|
||||||
|
----------------
|
||||||
|
[Unit]
|
||||||
|
Description=LIRC Infrared Signal Decoder
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/sbin/lircd --driver=iguanaIR \
|
||||||
|
--device=/var/run/iguanaIR/0 \
|
||||||
|
--output=/var/run/lirc/lircd-tx \
|
||||||
|
--pidfile=/run/lirc/dont-use-lircd-tx.pid \
|
||||||
|
--nodaemon \
|
||||||
|
--allow-simulate
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
This defines a new service which can be started using
|
||||||
|
'systemctl start lirc-tx' etc. It's essential that each service has an
|
||||||
|
unique output socket. You should probably also think twice before running
|
||||||
|
two instances with the same input device.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
Getting lircd logs from last boot cycle:
|
||||||
|
```
|
||||||
|
# journalctl -b /usr/sbin/lircd
|
||||||
|
```
|
||||||
|
|
||||||
|
If lircd fails to start or dies after restart, first check logs for errors:
|
||||||
|
```
|
||||||
|
# journalctl -f &
|
||||||
|
# systemctl restart lircd.service
|
||||||
|
```
|
||||||
|
|
||||||
|
You could also run lircd in foreground after stopping service:
|
||||||
|
```
|
||||||
|
# systemctl stop lircd.service
|
||||||
|
# bash
|
||||||
|
# source /etc/systconfig/lirc
|
||||||
|
# /usr/sbin/lircd $LIRCD_OPTIONS --driver $LIRC_DRIVER \
|
||||||
|
> --device $LIRC_DEVICE --nodaemon
|
||||||
|
```
|
||||||
|
|
||||||
|
Sometimes kernel complains about multiple clients trying to access the
|
||||||
|
same device. In this case you need to blacklist some kernel module
|
||||||
|
to make the kernel device available for lircd. One example is my RF
|
||||||
|
remote using the atilibusb driver. This needs to blacklist the built_in
|
||||||
|
ati_remote module. This is is done by creating the file
|
||||||
|
/etc/modprobe.conf.d/blacklist-ati-remote.conf as:
|
||||||
|
```
|
||||||
|
# Block built-in handling of ati-remote (use lircd instead).
|
||||||
|
blacklist ati_remote
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
policy_module(lircd, 2)
|
||||||
|
|
||||||
|
gen_require(`
|
||||||
|
type lircd_t;
|
||||||
|
type passwd_file_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
|
||||||
|
#============= lircd_t ==============
|
||||||
|
allow lircd_t passwd_file_t:file { read getattr open };
|
||||||
|
allow lircd_t self:capability { setuid setgid dac_override };
|
Loading…
Reference in new issue