Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lirc: fix missing irman driver, include Debian patches #3641

Merged
merged 4 commits into from Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/devel/libirman/package.mk
Expand Up @@ -8,6 +8,7 @@ PKG_LICENSE="GPL"
PKG_SITE="http://sourceforge.net/projects/lirc"
PKG_URL="http://downloads.sourceforge.net/project/libirman/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain systemd lirc"
PKG_NEED_UNPACK="$(get_pkg_directory lirc)"
PKG_LONGDESC="libirman library for lircd"
PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+pic"
Expand Down
1 change: 1 addition & 0 deletions packages/sysutils/lirc/package.mk
Expand Up @@ -17,6 +17,7 @@ PKG_PYTHON_WANTED=Python2
PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_alsa_asoundlib_h=no \
ac_cv_lib_asound_snd_async_del_handler=no \
--enable-devinput \
--enable-uinput \
--with-gnu-ld \
--without-x \
--runstatedir=/run"
Expand Down
@@ -0,0 +1,24 @@
From: Alec Leamas <leamas.alec@gmail.com>
Date: Fri, 23 Nov 2018 23:04:35 -0500
Subject: [PATCH] logging: Don't use broken LOG_CONS syslog flag.

---
lib/lirc_log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/lirc_log.c b/lib/lirc_log.c
index bea357b..900beb3 100644
--- a/lib/lirc_log.c
+++ b/lib/lirc_log.c
@@ -102,9 +102,9 @@ int lirc_log_open(const char* _progname, int _nodaemon, loglevel_t level)

if (use_syslog) {
if (nodaemon)
- openlog(syslogident, LOG_CONS | LOG_PID | LOG_PERROR, LOG_LOCAL0);
+ openlog(syslogident, LOG_PID | LOG_PERROR, LOG_LOCAL0);
else
- openlog(syslogident, LOG_CONS | LOG_PID, LOG_LOCAL0);
+ openlog(syslogident, LOG_PID, LOG_LOCAL0);
} else {
lf = fopen(logfile, "a");
if (lf == NULL) {
@@ -0,0 +1,22 @@
From: Alec Leamas <leamas.alec@gmail.com>
Date: Sun, 30 Dec 2018 21:26:15 +0100
Subject: [PATCH] lircd: Fix --connect option parsing error (#343).

Bug: https://sourceforge.net/p/lirc/tickets/343/
---
daemons/lircd.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index d5be708..ad8dde9 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -790,7 +790,7 @@ int add_peer_connection(const char* server_arg)
struct servent* service;
char server[strlen(server_arg) + 1];

- strncpy(server, server_arg, sizeof(server) - 1);
+ strncpy(server, server_arg, sizeof(server));

if (peern < MAX_PEERS) {
peers[peern] = (struct peer_connection*) malloc(sizeof(
@@ -0,0 +1,43 @@
From: William Manley <will@williammanley.net>
Date: Thu, 9 Aug 2018 18:26:44 +0100
Subject: [PATCH] systemd support: Notify systemd on successful startup

This allows systemd to detect the case where we've failed to startup
due to a failure to parse our config files.

Origin: upstream, https://sourceforge.net/p/lirc/git/ci/b78df9b2950cf4
Applied-Upstream: 0.11.0
---
daemons/lircd.cpp | 5 +++++
systemd/lircd.service | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index ad8dde9..f559b62 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -2469,6 +2469,11 @@ int main(int argc, char** argv)
if (!nodaemon)
daemonize();

+#ifdef HAVE_SYSTEMD
+ /* Tell systemd that we started up correctly */
+ sd_notify(0, "READY=1");
+#endif
+
loop();

/* never reached */
diff --git a/systemd/lircd.service b/systemd/lircd.service
index 7f75805..6af049b 100644
--- a/systemd/lircd.service
+++ b/systemd/lircd.service
@@ -6,7 +6,7 @@ Wants=lircd-setup.service
After=network.target lircd-setup.service

[Service]
-Type=simple
+Type=notify
ExecStart=/usr/sbin/lircd --nodaemon
; User=lirc
; Group=lirc
24 changes: 17 additions & 7 deletions packages/sysutils/lirc/patches/lirc-0100-disable-python.patch
@@ -1,5 +1,5 @@
diff --git a/Makefile.am b/Makefile.am
index aafb4e8c..f33a0c19 100644
index 9f3dd143..9619a6eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,9 @@ ACLOCAL_AMFLAGS = -I m4
Expand Down Expand Up @@ -31,15 +31,25 @@ index aafb4e8c..f33a0c19 100644

if INSTALL_ETC

@@ -61,6 +67,7 @@ endif
@@ -61,7 +67,9 @@ endif

dist_doc_DATA = VERSION

+if HAVE_PYTHON
nodist_pkgdata_DATA = $(PYTHON_TARBALL)
+endif

pkgconfigdir = $(libdir)/pkgconfig
@@ -134,6 +141,8 @@ all-local:
dist_pkgconfig_DATA = lirc.pc lirc-driver.pc
@@ -71,6 +79,7 @@ nobase_header_HEADERS = include/media/lirc.h \
include/linux/input-event-codes.h
header_HEADERS = drivers/irpipe/irpipe.h

+if HAVE_PYTHON
py_pkgdir = $(pkgdatadir)/python-pkg
dist_py_pkg_DATA = python-pkg/setup.py \
python-pkg/README.rst
@@ -134,6 +143,8 @@ all-local:
$(if $(VERBOSE),,-q) build
endif

Expand All @@ -48,15 +58,15 @@ index aafb4e8c..f33a0c19 100644
install-data-hook:
$(SED) -i -e '/^plugindir/s|/usr/lib|$(libdir)|' \
$(DESTDIR)$(lirc_confdir)/lirc_options.conf
@@ -167,6 +176,7 @@ fix-version: .phony
@@ -170,6 +181,7 @@ fix-version: .phony
$(SED) -i '/DATE/s/=.*/="$(GIT_DATE)"/' $(distdir)/VERSION
$(SED) -i '/REFS/s|=.*|="$(GIT_REFS)"|' $(distdir)/VERSION

+if HAVE_PYTHON
$(abs_builddir)/python-pkg/setup.py:
cp -ar $(top_srcdir)/python-pkg $(abs_builddir)
chmod -R u+w python-pkg
@@ -190,6 +200,7 @@ python-pkg/lirc/config.py: Makefile $(abs_builddir)/python-pkg/setup.py
@@ -193,6 +205,7 @@ python-pkg/lirc/config.py: Makefile $(abs_builddir)/python-pkg/setup.py
@echo 'DOCDIR = "$(docdir)"' >>$@
@echo 'MODINFO = "$(MODINFO)"' >>$@
@echo 'VERSION = "$(VERSION)"' >>$@
Expand All @@ -65,7 +75,7 @@ index aafb4e8c..f33a0c19 100644
paths.h: Makefile
@echo "#ifndef PATHS_H" >paths.h
diff --git a/configure.ac b/configure.ac
index 321a61f7..016813c1 100644
index 58347d88..48ce5629 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,8 @@ AC_CHECK_PROG([DOXYGEN],[doxygen],[yes],[no])
Expand All @@ -78,7 +88,7 @@ index 321a61f7..016813c1 100644
PKG_CHECK_MODULES([PYTHON],[python-${PYTHON_VERSION}m],,[true])
test -z "$PYTHON_LIBS" && \
PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],,[true])
@@ -577,6 +578,7 @@ AX_REPORT_CONDITIONAL([DEVEL])
@@ -580,6 +581,7 @@ AX_REPORT_CONDITIONAL([DEVEL])
AX_REPORT_CONDITIONAL([LINUX_KERNEL])
AX_REPORT_CONDITIONAL([HAVE_DEVINPUT])
AX_REPORT_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR])
Expand Down