Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] acpid: bump to version 2.0.22
@ 2014-04-22 21:25 Gustavo Zacarias
  2014-04-22 21:30 ` Thomas Petazzoni
  2014-04-23 13:41 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2014-04-22 21:25 UTC (permalink / raw)
  To: buildroot

Switch to upstream sourceforge page/download.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/acpid/Config.in                        |  2 ++
 package/acpid/S02acpid                         |  4 ++--
 package/acpid/acpid-01-dont-use-isfdtype.patch | 20 ++++++++++++++++++++
 package/acpid/acpid.mk                         | 25 ++++++++++++-------------
 4 files changed, 36 insertions(+), 15 deletions(-)
 create mode 100644 package/acpid/acpid-01-dont-use-isfdtype.patch

diff --git a/package/acpid/Config.in b/package/acpid/Config.in
index ea9a364..5aec7f1 100644
--- a/package/acpid/Config.in
+++ b/package/acpid/Config.in
@@ -6,3 +6,5 @@ config BR2_PACKAGE_ACPID
 
 	  Acpid is designed to notify user-space programs of ACPI events,
 	  and allows you to configure specific actions for specific events.
+
+	  http://sourceforge.net/projects/acpid2/
diff --git a/package/acpid/S02acpid b/package/acpid/S02acpid
index ec686d8..c2221fc 100755
--- a/package/acpid/S02acpid
+++ b/package/acpid/S02acpid
@@ -4,12 +4,12 @@ case "$1" in
 	start)
 		echo -n "Starting acpid: "
 		start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n
-		echo "done"
+		[ $? == 0 ] && echo "OK" || echo "FAIL"
 		;;
 	stop)
 		echo -n "Stopping acpid: "
 		start-stop-daemon -K -q -p /var/run/acpid.pid
-		echo "done"
+		[ $? == 0 ] && echo "OK" || echo "FAIL"
 		;;
 	restart)
 		"$0" stop
diff --git a/package/acpid/acpid-01-dont-use-isfdtype.patch b/package/acpid/acpid-01-dont-use-isfdtype.patch
new file mode 100644
index 0000000..2fe6c21
--- /dev/null
+++ b/package/acpid/acpid-01-dont-use-isfdtype.patch
@@ -0,0 +1,20 @@
+Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
+since released versions of uClibc don't support isfdtype().
+
+Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
+
+diff -Nura acpid-2.0.22.orig/sock.c acpid-2.0.22/sock.c
+--- acpid-2.0.22.orig/sock.c	2014-04-22 18:04:19.706841764 -0300
++++ acpid-2.0.22/sock.c	2014-04-22 18:05:08.285479625 -0300
+@@ -53,7 +53,10 @@
+ int
+ is_socket(int fd)
+ {
+-    return (isfdtype(fd, S_IFSOCK) == 1);
++	int v;
++	socklen_t l = sizeof(int);
++
++	return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
+ }
+ 
+ /* accept a new client connection */
diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk
index e52fba1..1f4ec31 100644
--- a/package/acpid/acpid.mk
+++ b/package/acpid/acpid.mk
@@ -4,24 +4,23 @@
 #
 ################################################################################
 
-ACPID_VERSION = 2.0.11
-ACPID_SOURCE = acpid_$(ACPID_VERSION).orig.tar.gz
-ACPID_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/acpid
+ACPID_VERSION = 2.0.22
+ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
+ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
 ACPID_LICENSE = GPLv2+
 ACPID_LICENSE_FILES = COPYING
 
-define ACPID_BUILD_CMDS
-	$(MAKE) CC="$(TARGET_CC)" -C $(@D)
+define ACPID_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 package/acpid/S02acpid \
+		$(TARGET_DIR)/etc/init.d/S02acpid
 endef
 
-define ACPID_INSTALL_TARGET_CMDS
-	install -D -m 755 $(@D)/acpid $(TARGET_DIR)/usr/sbin/acpid
-	install -D -m 755 $(@D)/acpi_listen $(TARGET_DIR)/usr/bin/acpi_listen
-	install -D -m 644 $(@D)/acpid.8 $(TARGET_DIR)/usr/share/man/man8/acpid.8
-	install -D -m 644 $(@D)/acpi_listen.8 $(TARGET_DIR)/usr/share/man/man8/acpi_listen.8
+define ACPID_SET_EVENTS
 	mkdir -p $(TARGET_DIR)/etc/acpi/events
-	/bin/echo -e "event=button[ /]power\naction=/sbin/poweroff" > $(TARGET_DIR)/etc/acpi/events/powerbtn
-	$(INSTALL) -D -m 0755 package/acpid/S02acpid $(TARGET_DIR)/etc/init.d/S02acpid
+	/bin/echo -e "event=button[ /]power\naction=/sbin/poweroff" \
+		>$(TARGET_DIR)/etc/acpi/events/powerbtn
 endef
 
-$(eval $(generic-package))
+ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
+
+$(eval $(autotools-package))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] acpid: bump to version 2.0.22
  2014-04-22 21:25 [Buildroot] [PATCH] acpid: bump to version 2.0.22 Gustavo Zacarias
@ 2014-04-22 21:30 ` Thomas Petazzoni
  2014-04-23 13:41 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2014-04-22 21:30 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Tue, 22 Apr 2014 18:25:33 -0300, Gustavo Zacarias wrote:
> Switch to upstream sourceforge page/download.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/acpid/Config.in                        |  2 ++
>  package/acpid/S02acpid                         |  4 ++--
>  package/acpid/acpid-01-dont-use-isfdtype.patch | 20 ++++++++++++++++++++
>  package/acpid/acpid.mk                         | 25 ++++++++++++-------------
>  4 files changed, 36 insertions(+), 15 deletions(-)
>  create mode 100644 package/acpid/acpid-01-dont-use-isfdtype.patch

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] acpid: bump to version 2.0.22
  2014-04-22 21:25 [Buildroot] [PATCH] acpid: bump to version 2.0.22 Gustavo Zacarias
  2014-04-22 21:30 ` Thomas Petazzoni
@ 2014-04-23 13:41 ` Thomas Petazzoni
  2014-04-23 13:49   ` Gustavo Zacarias
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-04-23 13:41 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Tue, 22 Apr 2014 18:25:33 -0300, Gustavo Zacarias wrote:
> Switch to upstream sourceforge page/download.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/acpid/Config.in                        |  2 ++
>  package/acpid/S02acpid                         |  4 ++--
>  package/acpid/acpid-01-dont-use-isfdtype.patch | 20 ++++++++++++++++++++
>  package/acpid/acpid.mk                         | 25 ++++++++++++-------------
>  4 files changed, 36 insertions(+), 15 deletions(-)
>  create mode 100644 package/acpid/acpid-01-dont-use-isfdtype.patch

Looks like some kernel headers issue is affecting the acpid build:
http://autobuild.buildroot.org/results/6d4/6d471942788fa05f324649ab15e6ca382e46df9c/build-end.log.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] acpid: bump to version 2.0.22
  2014-04-23 13:41 ` Thomas Petazzoni
@ 2014-04-23 13:49   ` Gustavo Zacarias
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2014-04-23 13:49 UTC (permalink / raw)
  To: buildroot

On 04/23/2014 10:41 AM, Thomas Petazzoni wrote:

> Looks like some kernel headers issue is affecting the acpid build:
> http://autobuild.buildroot.org/results/6d4/6d471942788fa05f324649ab15e6ca382e46df9c/build-end.log.

The usual problem of external uClibc toolchains (you could call it lack
of uClibc releases as well).
We can exclude the package from being available with external uClibc
toolchains or hack a fix like in
55ad3cfd3f9809f4a1f0210fe7c7110d147c54f6
Personally i'd just exclude, we are talking an x86-only package which
tends to be desktopish.
Regards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-23 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 21:25 [Buildroot] [PATCH] acpid: bump to version 2.0.22 Gustavo Zacarias
2014-04-22 21:30 ` Thomas Petazzoni
2014-04-23 13:41 ` Thomas Petazzoni
2014-04-23 13:49   ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox