Patchwork [meta-oe,1/1] atftp: add 0.7 version

login
register
mail settings
Submitter Otavio Salvador
Date Nov. 10, 2011, 4:35 p.m.
Message ID <2c620d32a60fd571d00a4b98b572d60f49bf8b0f.1320942838.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/14759/
State Superseded, archived
Headers show

Comments

Otavio Salvador - Nov. 10, 2011, 4:35 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/recipes-extended/atftp/atftp_0.7.bb        |   51 ++++++++++++++++++++
 meta-oe/recipes-extended/atftp/files/atftpd.init   |   37 ++++++++++++++
 .../recipes-extended/atftp/files/atftpd.service    |   11 ++++
 3 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-extended/atftp/atftp_0.7.bb
 create mode 100644 meta-oe/recipes-extended/atftp/files/atftpd.init
 create mode 100644 meta-oe/recipes-extended/atftp/files/atftpd.service
Koen Kooi - Nov. 10, 2011, 4:41 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 10-11-11 17:35, Otavio Salvador schreef:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- 
> meta-oe/recipes-extended/atftp/atftp_0.7.bb        |   51
> ++++++++++++++++++++ meta-oe/recipes-extended/atftp/files/atftpd.init   |
> 37 ++++++++++++++ .../recipes-extended/atftp/files/atftpd.service    |
> 11 ++++ 3 files changed, 99 insertions(+), 0 deletions(-) create mode
> 100644 meta-oe/recipes-extended/atftp/atftp_0.7.bb create mode 100644
> meta-oe/recipes-extended/atftp/files/atftpd.init create mode 100644
> meta-oe/recipes-extended/atftp/files/atftpd.service
> 
> diff --git a/meta-oe/recipes-extended/atftp/atftp_0.7.bb
> b/meta-oe/recipes-extended/atftp/atftp_0.7.bb new file mode 100644 index
> 0000000..b84819a --- /dev/null +++
> b/meta-oe/recipes-extended/atftp/atftp_0.7.bb @@ -0,0 +1,51 @@ 
> +DESCRIPTION = "Advanced TFTP server and client" +SECTION = "network" 
> +PRIORITY = "optional"

PRIORITY doesn't exist anymore in the oe-core world.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOu/7MMkyGM64RGpERApkqAJ9Ly5GZ8stHAgvwe8I7ka2PJMoQqwCgrafp
lbBPdfYt9UD3FmJaaCtFH2s=
=w099
-----END PGP SIGNATURE-----
Otavio Salvador - Nov. 10, 2011, 5:59 p.m.
On Thu, Nov 10, 2011 at 14:41, Koen Kooi <koen@dominion.thruhere.net> wrote:
...
>> +DESCRIPTION = "Advanced TFTP server and client" +SECTION = "network"
>> +PRIORITY = "optional"
>
> PRIORITY doesn't exist anymore in the oe-core world.

I fixed the repo with this change.

Patch

diff --git a/meta-oe/recipes-extended/atftp/atftp_0.7.bb b/meta-oe/recipes-extended/atftp/atftp_0.7.bb
new file mode 100644
index 0000000..b84819a
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/atftp_0.7.bb
@@ -0,0 +1,51 @@ 
+DESCRIPTION = "Advanced TFTP server and client"
+SECTION = "network"
+PRIORITY = "optional"
+HOMEPAGE = "http://packages.debian.org/atftp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg.orig.tar.gz;name=archive \
+           ${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg-11.diff.gz;name=patch \
+           file://atftpd.init \
+           file://atftpd.service"
+
+S = "${WORKDIR}/atftp-${PV}.dfsg"
+
+inherit autotools update-rc.d systemd useradd
+
+SYSTEMD_PACKAGES = "atftpd-systemd"
+SYSTEMD_SERVICE_atftpd-systemd = "atftpd.service"
+
+INITSCRIPT_NAME = "atftpd"
+INITSCRIPT_PARAMS = "defaults 80"
+
+USERADD_PACKAGES = "atftpd"
+USERADD_PARAM_atftpd = "--system --no-create-home --shell /bin/false \
+                        --user-group nobody"
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
+
+    install -d ${D}${base_libdir}/systemd/system
+    install -m 644 ${WORKDIR}/atftpd.service ${D}${base_libdir}/systemd/system
+
+    install -d ${D}/srv/tftp
+
+    rm ${D}${sbindir}/in.tftpd
+}
+
+PACKAGES =+ "atftpd-systemd atftpd"
+
+FILES_${PN} = "${bindir}/*"
+
+FILES_${PN}d = "${sbindir}/* ${sysconfdir}/init.d/* /srv/tftp"
+
+FILES_atftpd-systemd += "${base_libdir}/systemd"
+RDEPENDS_atftpd-systemd += "atftpd"
+
+SRC_URI[archive.md5sum] = "aa269044a6f992eca78fee2f6119643c"
+SRC_URI[archive.sha256sum] = "18815f5b67290fac087c6b9da28dfa5e0feb722096f5c5de52e59b46026da559"
+SRC_URI[patch.md5sum] = "1636f199bf32c754a7bf34a5c647d138"
+SRC_URI[patch.sha256sum] = "0df33f6c09c2b2de58a84d7bb757844fc9538cd4d6c8d9c463da5270ebc2e41d"
diff --git a/meta-oe/recipes-extended/atftp/files/atftpd.init b/meta-oe/recipes-extended/atftp/files/atftpd.init
new file mode 100644
index 0000000..161d97a
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/files/atftpd.init
@@ -0,0 +1,37 @@ 
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/atftpd and type
+# > update-rc.d atftpd defaults 60
+#
+
+
+test -f /usr/sbin/atftpd || exit 0
+
+test -d /srv/tftp || mkdir -p /srv/tftp
+
+case "$1" in
+  start)
+    echo -n "Starting tftp daemon: atftpd"
+    start-stop-daemon --start --quiet --exec /usr/sbin/atftpd -- --daemon --port 69
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping tftp daemon: atftpd"
+    start-stop-daemon --stop --quiet --exec /usr/sbin/atftpd
+    echo "."
+    ;;
+  reload|force-reload)
+    start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/atftpd
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+	$0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/atftpd {start|stop|reload|restart|force-reload}"
+    exit 1
+esac
+
+exit 0
diff --git a/meta-oe/recipes-extended/atftp/files/atftpd.service b/meta-oe/recipes-extended/atftp/files/atftpd.service
new file mode 100644
index 0000000..c7aa29c
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/files/atftpd.service
@@ -0,0 +1,11 @@ 
+[Unit]
+Description=Advanced TFTP Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/atftpd.pid
+ExecStart=/usr/sbin/atftpd --daemon --port 69
+
+[Install]
+WantedBy=multi-user.target