logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 8f040a0f002da3c0efd753c40012c30da8555df3
parent 3d514acfe7cf80ea5dfc189055bb2e7fdf6a2d43
Author: Michael Forney <mforney@mforney.org>
Date:   Sun, 16 Aug 2020 17:44:20 -0700

Add acpid2 2.0.32

Diffstat:

M.gitmodules4++++
Apkg/acpid2/config.h78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/acpid2/gen.lua27+++++++++++++++++++++++++++
Apkg/acpid2/patch/0001-Avoid-void-pointer-arithmetic.patch54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/acpid2/patch/0002-Use-run-for-the-socket-and-pid-file.patch29+++++++++++++++++++++++++++++
Apkg/acpid2/src1+
Apkg/acpid2/ver1+
Mpkg/gen.lua1+
8 files changed, 195 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -1,3 +1,7 @@ +[submodule "pkg/acpid2/src"] + path = pkg/acpid2/src + url = https://git.code.sf.net/p/acpid2/code + ignore = all [submodule "pkg/alsa-lib/src"] path = pkg/alsa-lib/src url = https://github.com/alsa-project/alsa-lib.git diff --git a/pkg/acpid2/config.h b/pkg/acpid2/config.h @@ -0,0 +1,78 @@ +#define HAVE_ALARM 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_ASPRINTF 1 +#define HAVE_CHMOD 1 +#define HAVE_DUP2 1 +#define HAVE_FCHOWN 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FORK 1 +#define HAVE_FSTAT 1 +#define HAVE_FSTATAT 1 +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_ISFDTYPE */ +#define HAVE_MALLOC 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MEMSET 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_OPENAT 1 +#define HAVE_REALLOC 1 +#define HAVE_REGCOMP 1 +#define HAVE_SELECT 1 +#define HAVE_SOCKET 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRDUP 1 +#define HAVE_STRERROR 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRTOL 1 +#define HAVE_SYSLOG_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VFORK 1 +/* #undef HAVE_VFORK_H */ +#define HAVE_WORKING_FORK 1 +#define HAVE_WORKING_VFORK 1 +#define PACKAGE "acpid" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_NAME "acpid" +#define PACKAGE_STRING "acpid 2.0.32" +#define PACKAGE_TARNAME "acpid" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "2.0.32" +#define STDC_HEADERS 1 +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +#define VERSION "2.0.32" +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGE_FILES */ +/* #undef _MINIX */ +/* #undef _POSIX_1_SOURCE */ +/* #undef _POSIX_SOURCE */ +/* #undef mode_t */ +/* #undef pid_t */ +/* #undef size_t */ +/* #undef ssize_t */ +/* #undef vfork */ diff --git a/pkg/acpid2/gen.lua b/pkg/acpid2/gen.lua @@ -0,0 +1,27 @@ +cflags{ + '-Wall', '-Wpedantic', + '-D _GNU_SOURCE', + '-include $dir/config.h', +} + +lib('libcommon.a', {'log.c', 'ud_socket.c'}) + +exe('acpid', { + 'acpid.c', + 'acpi_ids.c', + 'connection_list.c', + 'event.c', + 'input_layer.c', + 'inotify_handler.c', + 'libnetlink.c', + 'netlink.c', + 'proc.c', + 'sock.c', + 'libcommon.a', +}) +file('bin/acpid', '755', '$outdir/acpid') +man{'acpid.8'} + +exe('acpi_listen', {'acpi_listen.c', 'libcommon.a'}) +file('bin/acpi_listen', '755', '$outdir/acpi_listen') +man{'acpi_listen.8'} diff --git a/pkg/acpid2/patch/0001-Avoid-void-pointer-arithmetic.patch b/pkg/acpid2/patch/0001-Avoid-void-pointer-arithmetic.patch @@ -0,0 +1,54 @@ +From a6a138ee8c131b4ce056a5db516496c91610cf2f Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 16 Aug 2020 18:00:54 -0700 +Subject: [PATCH] Avoid void pointer arithmetic + +ISO C requires the pointer to be to a complete object type. +--- + acpi_ids.c | 2 +- + libnetlink.c | 2 +- + libnetlink.h | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/acpi_ids.c b/acpi_ids.c +index ba218d7..08271cb 100644 +--- a/acpi_ids.c ++++ b/acpi_ids.c +@@ -126,7 +126,7 @@ genl_get_mcast_group_id(struct nlmsghdr *n) + } + + /* set attrs to point to the attribute */ +- attrs = (struct rtattr *)(NLMSG_DATA(n) + GENL_HDRLEN); ++ attrs = (struct rtattr *)((char *)NLMSG_DATA(n) + GENL_HDRLEN); + /* Read the table from the message into "tb". This actually just */ + /* places pointers into the message into tb[]. */ + parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len); +diff --git a/libnetlink.c b/libnetlink.c +index 346162a..b1760ba 100644 +--- a/libnetlink.c ++++ b/libnetlink.c +@@ -516,7 +516,7 @@ int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) + } + + memcpy(NLMSG_TAIL(n), data, len); +- memset((void *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len); ++ memset((char *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len); + n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len); + return 0; + } +diff --git a/libnetlink.h b/libnetlink.h +index 8f9cb5e..7b2f8bc 100644 +--- a/libnetlink.h ++++ b/libnetlink.h +@@ -53,7 +53,7 @@ extern int rtnl_from_file(FILE *, rtnl_filter_t handler, + void *jarg); + + #define NLMSG_TAIL(nmsg) \ +- ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) ++ ((struct rtattr *) (((char *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) + + #ifndef IFA_RTA + #define IFA_RTA(r) \ +-- +2.28.0 + diff --git a/pkg/acpid2/patch/0002-Use-run-for-the-socket-and-pid-file.patch b/pkg/acpid2/patch/0002-Use-run-for-the-socket-and-pid-file.patch @@ -0,0 +1,29 @@ +From f1cb8f96e446ba38d425fc130fda7a041394636e Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 16 Aug 2020 18:06:18 -0700 +Subject: [PATCH] Use /run for the socket and pid file + +--- + acpid.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/acpid.h b/acpid.h +index 916da5f..d11253b 100644 +--- a/acpid.h ++++ b/acpid.h +@@ -26,10 +26,10 @@ + #define ACPI_PROCDIR "/proc/acpi" + #define ACPID_EVENTFILE ACPI_PROCDIR "/event" + #define ACPID_CONFDIR "/etc/acpi/events" +-#define ACPID_SOCKETFILE "/var/run/acpid.socket" ++#define ACPID_SOCKETFILE "/run/acpid.socket" + #define ACPID_SOCKETMODE 0666 + #define ACPID_CLIENTMAX 256 +-#define ACPID_PIDFILE "/var/run/acpid.pid" ++#define ACPID_PIDFILE "/run/acpid.pid" + #define ACPID_LOCKFILE "/var/lock/acpid" + #define ACPID_MAX_ERRS 5 + +-- +2.28.0 + diff --git a/pkg/acpid2/src b/pkg/acpid2/src @@ -0,0 +1 @@ +Subproject commit 36c92da71ea407a87f1d0321f7d7cc49421bfb75 diff --git a/pkg/acpid2/ver b/pkg/acpid2/ver @@ -0,0 +1 @@ +2.0.32 r0 diff --git a/pkg/gen.lua b/pkg/gen.lua @@ -1,4 +1,5 @@ subgen 'acme-client' +subgen 'acpid2' subgen 'adobe-source-fonts' subgen 'alsa-lib' subgen 'alsa-utils'