Addition of the Coyote Linux distro and HAProxy
I have decided to use OE as the base for the next release of a 10 year old distribution named "Coyote Linux". After a couple weeks of tinkering and waiting many, long hours for compiles to either succeed or fail - I have put together my first patch.
The attached patch adds a distribution config for Coyote Linux v4 and adds the HAProxy recipe. This is my first submission to the project so please let me know if there is anything I need to change about the supplied patch or any other process I should be following.
Note - this will not compile until the tinylogin problem is fixed. For local testing, I replaced the login manager selection in the base image class with "busybox" instead of "tinylogin". Tinylogin will work perfectly once the recipe is updated to download and build the source.
As I am working on this project full time at the moment, I will be submitting regular updates to the distribution config and adding new recipes for needed applications.
The file is a standard, unified diff against the vanilla OE tree (pulled just before this email as sent).
Coyote Linux distro information is available on the web site
http://www.coyotelinux.com
--
Joshua Jackson
Vortech Consulting, LLC
Helps if I actually attach a patch file...
--
Joshua Jackson
Vortech Consulting, LLC
conf/checksums.ini +4 -0
@@ -1,3 +1,7 @@ +[http://haproxy.1wt.eu/download/1.3/src/haproxy-1.3.17.tar.gz] +md5=423ad955828a2de1803410a4405696f2 +sha256=347f238250f03b202857ea24a3ebd75465b689d8c45c5347032c501e2e971877 + [http://www.directfb.org/downloads/Extras/++DFB-0.9.25.tar.gz] md5=c6a2705f6210d8ede50a947b375f1c0b sha256=b3dbf01563dd60d63cff543ea8cd0c885381e78ecbbab8ff176e46df3f198a88
conf/distro/coyote.conf +97 -0
97 lines not on this page · raw message
recipes/haproxy/files/haproxy.conf +28 -0
@@ -0,0 +1,28 @@ +global + log 127.0.0.1 local0 + log 127.0.0.1 local1 notice + maxconn 4096 + #chroot /home/haproxy + #uid 508 + #gid 508 + daemon + +defaults + log global + mode http + option httplog + option dontlognull + option forwardfor + retries 3 + option redispatch + maxconn 2000 + contimeout 5000 + clitimeout 50000 + srvtimeout 50000 + stats enable + +listen stats :8888 + mode http + balance source + stats uri / +
recipes/haproxy/files/init +33 -0
@@ -0,0 +1,33 @@ +#!/bin/sh +# +# haproxy init.d script for haproxy +# +# You *must* create or update the /etc/haproxy/haproxy.conf file for +# this to work properly +CONF=/etc/haproxy/haproxy.conf +PIDFILE=/var/run/haproxy.pid + +case "$1" in + start) + echo -n "Starting haproxy: " + start-stop-daemon --start -x /usr/bin/haproxy -- -D -f "${CONF}" -p "${PIDFILE}" "$@" + echo "done" + ;; + stop) + echo -n "Stopping haproxy: " + start-stop-daemon --stop -s 3 -p "${PIDFILE}" + echo "done" + ;; + restart|reload) + echo -n "Restarting haproxy: " + start-stop-daemon --stop -s 3 -p "${PIDFILE}" + start-stop-daemon --start -x /usr/bin/haproxy -- -D -f "${CONF}" -p "${PIDFILE}" "$@" + echo "done" + ;; + *) + echo "haproxy: haproxy { start | stop | restart | reload }" >&2 + exit 1 + ;; +esac + +exit 0
recipes/haproxy/files/Makefile.patch +20 -0
@@ -0,0 +1,20 @@ +--- haproxy/Makefile.orig 2009-03-29 23:55:04.000000000 -0400 ++++ haproxy/Makefile 2009-03-29 23:56:55.000000000 -0400 +@@ -60,7 +60,7 @@ + + #### Installation options. + DESTDIR = +-PREFIX = /usr/local ++PREFIX = /usr + SBINDIR = $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man + DOCDIR = $(PREFIX)/doc/haproxy +@@ -70,7 +70,7 @@ + # following list (use the default "generic" if uncertain) : + # generic, linux22, linux24, linux24e, linux26, solaris, + # freebsd, openbsd, custom +-TARGET = ++TARGET = linux26 + + #### TARGET CPU + # Use CPU=<cpu_name> to optimize for a particular CPU, among the following
recipes/haproxy/haproxy_1.3.17.bb +34 -0
@@ -0,0 +1,34 @@ +# HAProxy from haproxy.1wt.eu +DESCRIPTION = "A TCP/HTTP load balancer" +HOMEPAGE = "http://haproxy.1wt.eu/" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "GPL" +PR = "r1" + +SRC_URI = "http://haproxy.1wt.eu/download/1.3/src/haproxy-1.3.17.tar.gz" +SRC_URI += "file://init" +SRC_URI += "file://haproxy.conf" +SRC_URI += "file://Makefile.patch;patch=1" + +INITSCRIPT_NAME = "haproxy" +# No dependencies, so just go in at the standard level (20) +INITSCRIPT_PARAMS = "defaults" + +# The configuration file must be edited... +CONFFILES_${PN} = "${sysconfdir}/haproxy/haproxy.conf" + +inherit autotools update-rc.d + +PACKAGES += "haproxy" + +do_compile() { + oe_runmake TARGET=linux26 PREFIX=/usr +} + +do_install_append() { + install -d "${D}${sysconfdir}/init.d" + install -c -m 755 ${WORKDIR}/init "${D}${sysconfdir}/init.d/haproxy" + install -d "${D}${sysconfdir}/haproxy" + install -c -m 644 ${WORKDIR}/haproxy.conf "${D}${sysconfdir}/haproxy/haproxy.conf" +}
Quoted 5 lines · On Sunday 29 March 2009 22:11:33 Joshua Jackson wrote:
Helps if I actually attach a patch file...
--
Joshua Jackson
Vortech Consulting, LLC
You do not chose binutils and gcc in conf file. So it will pick whatever bitbake decides. IMO you should use a preferred version
For glibc
+PREFERRED_VERSION_glibc = "2.5" +PREFERRED_VERSION_glibc-cross = "2.5" +PREFERRED_VERSION_glibc-cross-sdk = "2.5" +PREFERRED_VERSION_glibc-cross-initial = "2.5" +PREFERRED_VERSION_glibc-cross-intermediate = "2.5"
I think you only need PREFERRED_VERSION_glibc and PREFERRED_VERSION_glibc-initial
Signature · 1 line
Khem Raj
Quoted 9 lines · Joshua Jackson
I have decided to use OE as the base for the next release of a 10 year old distribution named "Coyote Linux". After a couple weeks of tinkering and waiting many, long hours for compiles to either succeed or fail - I have put together my first patch.
The attached patch adds a distribution config for Coyote Linux v4 and adds the HAProxy recipe. This is my first submission to the project so please let me know if there is anything I need to change about the supplied patch or any other process I should be following.
The first suggestion would be to send the new recipe separate from the distro conf. A very quick skim of the patch and the recipe looked fine, tho.
Signature · 1 line
Tom Rini
Joshua Jackson <[email protected]> writes:
Hello Joshua,
[...]
Quoted 2 lines
The file is a standard, unified diff against the vanilla OE tree (pulled just before this email as sent).
[...]
Please send patches in git format; you can take a look on how to do that at 'git format-patch --help'. This allow us to apply it easily.
Another thing, please split your changes in logical patches.
As you said that your distro is borning, from OE POV, I suggest you to use a branch to work on that and maybe put it somewhere for review and full merge once instead of in progress patches.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Hello Joshua,
Quoted 3 lines · Joshua Jackson
I have decided to use OE as the base for the next release of a 10 year old distribution named "Coyote Linux". After a couple weeks of tinkering and
Haha, roads join again!
In fact I have stolen some patches from Coyote Linux a long time ago, so you are welcome to steal back :-)
Good choice, we are sure that after the learning curve you will have a good ride.
Regards,
Signature · 1 line
Leon