diff --git a/recipes-extra/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch b/recipes-extra/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file mode 100644 index 0000000..cfa8a73 --- /dev/null +++ b/recipes-extra/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch @@ -0,0 +1,45 @@ +From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 16 Apr 2015 22:41:57 +0200 +Subject: [PATCH] argz.h: fix musl compile (add missing defines) + +Upstream-Status: Pending + +Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. + +Signed-off-by: Peter Seiderer +Signed-off-by: Ming Liu +--- + argz.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/argz.h b/argz.h +index 582be55..bdf9f62 100644 +--- a/argz.h ++++ b/argz.h +@@ -48,6 +48,22 @@ + # define __const const + #endif + ++#ifndef __THROW ++# define __THROW ++#endif ++ ++#ifndef __BEGIN_DECLS ++# define __BEGIN_DECLS ++#endif ++ ++#ifndef __END_DECLS ++# define __END_DECLS ++#endif ++ ++#ifndef __attribute_pure__ ++# define __attribute_pure__ ++#endif ++ + #ifndef __error_t_defined + typedef int error_t; + #endif +-- +2.1.4 + diff --git a/recipes-extra/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch b/recipes-extra/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch new file mode 100644 index 0000000..093054c --- /dev/null +++ b/recipes-extra/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch @@ -0,0 +1,43 @@ +From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 16 Apr 2015 22:43:49 +0200 +Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include) + +Upstream-Status: Pending + +Add sys/types.h include for u_char typedef. + +Signed-off-by: Peter Seiderer +Signed-off-by: Ming Liu +--- + tftp.h | 1 + + tftpd.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tftp.h b/tftp.h +index 12bd6aa..32a3f63 100644 +--- a/tftp.h ++++ b/tftp.h +@@ -19,6 +19,7 @@ + + #include + #include ++#include + #include "tftp_def.h" + #include "config.h" + +diff --git a/tftpd.h b/tftpd.h +index 945065e..60d3a49 100644 +--- a/tftpd.h ++++ b/tftpd.h +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "tftp_io.h" + + /* +-- +2.1.4 + diff --git a/recipes-extra/atftp/files/atftpd.service b/recipes-extra/atftp/atftp/atftpd.service similarity index 100% rename from recipes-extra/atftp/files/atftpd.service rename to recipes-extra/atftp/atftp/atftpd.service diff --git a/recipes-extra/atftp/atftp_git.bb b/recipes-extra/atftp/atftp_git.bb index ec68504..a9949d5 100644 --- a/recipes-extra/atftp/atftp_git.bb +++ b/recipes-extra/atftp/atftp_git.bb @@ -1,5 +1,5 @@ SUMMARY = "Advanced TFTP server and client" -SECTION = "network" +SECTION = "net" HOMEPAGE = "http://packages.debian.org/atftp" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" @@ -12,12 +12,16 @@ SRC_URI = "git://git.code.sf.net/p/atftp/code \ file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \ file://atftpd-0.7_unprotected_assignments_crash.patch \ file://atftpd.init \ - file://atftpd.service \ + file://atftpd.service \ file://atftp-0.7-sorcerers_apprentice.patch \ " +SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ + file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ + " + S = "${WORKDIR}/git" -inherit autotools update-rc.d useradd systemd +inherit autotools update-rc.d systemd PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" @@ -28,9 +32,8 @@ INITSCRIPT_PACKAGES = "${PN}d" INITSCRIPT_NAME_${PN}d = "atftpd" INITSCRIPT_PARAMS_${PN}d = "defaults 80" -USERADD_PACKAGES = "${PN}d" -USERADD_PARAM_${PN}d = "--system --no-create-home --shell /bin/false \ - --user-group nobody" + +EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" do_install_append() { install -d ${D}${sysconfdir}/init.d @@ -39,9 +42,9 @@ do_install_append() { install -d ${D}/srv/tftp rm ${D}${sbindir}/in.tftpd - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_system_unitdir} + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system } PACKAGES =+ "${PN}d" @@ -51,7 +54,7 @@ FILES_${PN} = "${bindir}/*" FILES_${PN}d = "${sbindir}/* \ ${sysconfdir} \ /srv/tftp \ - ${systemd_system_unitdir}/atftpd.service \ + ${systemd_unitdir}/system/atftpd.service \ " SYSTEMD_PACKAGES = "${PN}d"