Commit graph

10 commits

Author SHA1 Message Date
Baruch Siach 2b88def5db triggerhappy: add optional dependency on systemd
triggerhappy can use systemd for socket activation.

Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-06-11 22:05:36 +02:00
Baruch Siach b4a7145b0b triggerhappy: use target pkg-config
triggerhappy uses pkg-config to detect the systemd library. Make sure it
uses the target pkg-config, not the host one.

Fixes build failure when the host has systemd pkg-config files:

.../host/bin/arm-linux-gcc -static  th-cmd.o cmdsocket.o  -lsystemd -o th-cmd
.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lsystemd

Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-06-11 21:37:36 +02:00
Carlos Santos 150327e7fc triggerhappy: don't test if the binary exists in the init script
The test doesn't make sense. It just exits without any error if the
binary doesn't exist, which is silly.

Replace the DAEMON variable, which was used only once, by the full path
of the binary file.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-16 07:35:02 +02:00
Michael Heinemann 3e23b1c9bb triggerhappy: bumped to 0.5.0 to fix systemd unit
This bumps the version of triggerhappy to 0.5.0
The systemd unit supplied by buildroot assumed that filename
globbing was supported by thd. But this was just recently
added. So with this version bump usage of "/dev/input/event*"
is now possible. Systemd Unit is adjusted accordingly.

eventtable.h patch was removed as this was patched upstream.

This patch fixes bug #9836.

Signed-off-by: Michael Heinemann <posted@heine.so>
2017-05-07 16:05:27 +02:00
Rahul Bedarkar 337aa51f3f boot, package: use SPDX short identifier for GPLv3/GPLv3+
We want to use SPDX identifier for license string as much as possible.
SPDX short identifier for GPLv3/GPLv3+ is GPL-3.0/GPL-3.0+.

This change is done using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv3\>/GPL-3.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:17:59 +02:00
Peter Korsgaard 0095643143 triggerhappy: unbreak build against 4.7+ kernel headers
Fixes:
http://autobuild.buildroot.org/results/3d0/3d07de291ec64a16d03e10f0cf1faeb19d546412/
http://autobuild.buildroot.org/results/b03/b03500e7d85786c6eee8f0adc38801340129aa14/
http://autobuild.buildroot.org/results/dd0/dd05caf0db318a9287d239cc6fa5470ccdc2ce7c/
http://autobuild.buildroot.org/results/76b/76bb000d041bd0828d15aa04138e222a4773ce94/

Triggerhappy used the wrong constants for array sizes, causing a compilation
error about out of array bounds initializers with the SW_PEN_INSERTED switch
event added in 4.7. Fix it by using the correct constants (<foo>_CNT) instead.

Patch submitted upstream: https://github.com/wertarbyte/triggerhappy/pull/12

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-07-31 20:22:20 +02:00
Jörg Krause cc9304aa72 package/triggerhappy: bump to latest commit to fix runtime issue
Bump to latest commit to fix runtime issue with the Linux Kernel headers 4.4:
  Starting thd: Unable to parse trigger line: [..]

With version 4.4 of the Linux Kernel the input event codes are not defined in
'linux/input.h' anymore, but in a seperate header file
'linux/input-event-codes.h' leaving triggerhappys evtable_*.h header files
empty with no event codes defined.

This issue is fixed upstream by commit 7e5abc69f215678e93a6b999524981c8b40bdcd9
which also makes overwriting of the 'LINUX_INPUT_H' definition obsolet.

Tested with an internal Buildroot toolchain with Linux Kernel headers 4.4 and
an external Linaro ARM 2015.08 toolchain with Linux Kernel headers 4.0.

[Peter: add hash file]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-01-19 22:53:59 +01:00
Maxime Hadjinlian 0f75b2635e package: Replace 'echo -n' by 'printf'
'echo -n' is not a POSIX construct (no flag support), we shoud use
'printf', especially in init script.

This patch was generated by the following command line:
git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/'

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 00:56:41 +02:00
Alex Suykov 7ee5eb933d triggerhappy: systemd support
[Thomas: use a relative symbolic link.]

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 15:51:01 +02:00
Peter Korsgaard 6e2b80968f triggerhappy: new package
[Thomas:
  - add BR2_USE_MMU dependency, since fork() is used
  - rename do_start() and do_stop() to just start() and stop(), as we
    do in most init scripts in Buildroot.]

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-12 00:07:10 +01:00