diff options
| author | Koen Kooi <koen@openembedded.org> | 2007-01-02 19:31:02 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2007-01-02 19:31:02 +0000 |
| commit | 4cfc3d5ccd4cd3dc572958bdad127856be41cb2c (patch) | |
| tree | ec1017dd159196314b0c49e2e4586a5eb4b148f9 | |
| parent | 9f9094de71fc15decea442de3aebfdfec3b600ad (diff) | |
| parent | 68efee7f26b15d2c3bab3fb7f807c5853ca6da77 (diff) | |
merge of '1944e442d97092991784475bf4b8980e60c5c3fc'
and 'c6043a6be9941ce6182b30748b51b8f191e04bc8'
35 files changed, 626 insertions, 365 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass new file mode 100644 index 0000000000..9697426d5d --- /dev/null +++ b/classes/package_deb.bbclass @@ -0,0 +1,238 @@ +inherit package +DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" +BOOTSTRAP_EXTRA_RDEPENDS += "dpkg" +DISTRO_EXTRA_RDEPENDS += "dpkg" +PACKAGE_WRITE_FUNCS += "do_package_deb" +IMAGE_PKGTYPE ?= "deb" + +python package_deb_fn () { + from bb import data + bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) +} + +addtask package_deb_install +python do_package_deb_install () { + import os, sys + pkg = bb.data.getVar('PKG', d, 1) + pkgfn = bb.data.getVar('PKGFN', d, 1) + rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) + debdir = bb.data.getVar('DEPLOY_DIR_DEB', d, 1) + stagingdir = bb.data.getVar('STAGING_DIR', d, 1) + stagingbindir = bb.data.getVar('STAGING_BINDIR_NATIVE', d, 1) + tmpdir = bb.data.getVar('TMPDIR', d, 1) + + if None in (pkg,pkgfn,rootfs): + raise bb.build.FuncFailed("missing variables (one or more of PKG, PKGFN, IMAGE_ROOTFS)") + try: + if not os.exists(rootfs): + os.makedirs(rootfs) + os.chdir(rootfs) + except OSError: + raise bb.build.FuncFailed(str(sys.exc_value)) + + # update packages file + (exitstatus, output) = commands.getstatusoutput('dpkg-scanpackages %s > %s/Packages' % (debdir, debdir)) + if (exitstatus != 0 ): + raise bb.build.FuncFailed(output) + + f = open(os.path.join(tmpdir, "stamps", "do_packages"), "w") + f.close() + + # NOTE: this env stuff is racy at best, we need something more capable + # than 'commands' for command execution, which includes manipulating the + # env of the fork+execve'd processs + + # Set up environment + apt_config = os.getenv('APT_CONFIG') + os.putenv('APT_CONFIG', os.path.join(stagingdir, 'etc', 'apt', 'apt.conf')) + path = os.getenv('PATH') + os.putenv('PATH', '%s:%s' % (stagingbindir, os.getenv('PATH'))) + + # install package + commands.getstatusoutput('apt-get update') + commands.getstatusoutput('apt-get install -y %s' % pkgfn) + + # revert environment + os.putenv('APT_CONFIG', apt_config) + os.putenv('PATH', path) +} + +python do_package_deb () { + import copy # to back up env data + import sys + import re + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined, unable to package") + return + + import os # path manipulations + outdir = bb.data.getVar('DEPLOY_DIR_DEB', d, 1) + if not outdir: + bb.error("DEPLOY_DIR_DEB not defined, unable to package") + return + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined, unable to package") + return + bb.mkdirhier(dvar) + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "PACKAGES not defined, nothing to package") + return + + tmpdir = bb.data.getVar('TMPDIR', d, 1) + # Invalidate the packages file + if os.access(os.path.join(tmpdir, "stamps", "do_packages"),os.R_OK): + os.unlink(os.path.join(tmpdir, "stamps", "do_packages")) + + if packages == []: + bb.debug(1, "No packages; nothing to do") + return + + for pkg in packages.split(): + localdata = bb.data.createCopy(d) + root = "%s/install/%s" % (workdir, pkg) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) + if not pkgname: + pkgname = pkg + bb.data.setVar('PKG', pkgname, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + overrides = bb.data.expand(overrides, localdata) + bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) + + bb.data.update_data(localdata) + basedir = os.path.join(os.path.dirname(root)) + + pkgoutdir = os.path.join(outdir, bb.data.getVar('PACKAGE_ARCH', localdata, 1)) + bb.mkdirhier(pkgoutdir) + + os.chdir(root) + from glob import glob + g = glob('*') + try: + del g[g.index('DEBIAN')] + del g[g.index('./DEBIAN')] + except ValueError: + pass + if not g and not bb.data.getVar('ALLOW_EMPTY', localdata): + from bb import note + note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1))) + continue + controldir = os.path.join(root, 'DEBIAN') + bb.mkdirhier(controldir) + try: + ctrlfile = file(os.path.join(controldir, 'control'), 'wb') + # import codecs + # ctrlfile = codecs.open("someFile", "w", "utf-8") + except OSError: + raise bb.build.FuncFailed("unable to open control file for writing.") + + fields = [] + fields.append(["Version: %s-%s\n", ['PV', 'PR']]) + fields.append(["Description: %s\n", ['DESCRIPTION']]) + fields.append(["Section: %s\n", ['SECTION']]) + fields.append(["Priority: %s\n", ['PRIORITY']]) + fields.append(["Maintainer: %s\n", ['MAINTAINER']]) + fields.append(["Architecture: %s\n", ['TARGET_ARCH']]) + fields.append(["OE: %s\n", ['P']]) + fields.append(["Homepage: %s\n", ['HOMEPAGE']]) + +# Package, Version, Maintainer, Description - mandatory +# Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional + + + def pullData(l, d): + l2 = [] + for i in l: + data = bb.data.getVar(i, d, 1) + if data is None: + raise KeyError(f) + if i == 'TARGET_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, 1) == 'all': + data = 'all' + l2.append(data) + return l2 + + ctrlfile.write("Package: %s\n" % pkgname) + # check for required fields + try: + for (c, fs) in fields: + ctrlfile.write(unicode(c % tuple(pullData(fs, localdata)))) + except KeyError: + (type, value, traceback) = sys.exc_info() + ctrlfile.close() + raise bb.build.FuncFailed("Missing field for deb generation: %s" % value) + # more fields + + bb.build.exec_func("mapping_rename_hook", localdata) + + rdepends = explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or "")) + rdepends = [dep for dep in rdepends if not '*' in dep] + rrecommends = explode_deps(unicode(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")) + rrecommends = [rec for rec in rrecommends if not '*' in rec] + rsuggests = (unicode(bb.data.getVar("RSUGGESTS", localdata, 1) or "")).split() + rprovides = (unicode(bb.data.getVar("RPROVIDES", localdata, 1) or "")).split() + rreplaces = (unicode(bb.data.getVar("RREPLACES", localdata, 1) or "")).split() + rconflicts = (unicode(bb.data.getVar("RCONFLICTS", localdata, 1) or "")).split() + if rdepends: + ctrlfile.write(u"Depends: %s\n" % ", ".join(rdepends)) + if rsuggests: + ctrlfile.write(u"Suggests: %s\n" % ", ".join(rsuggests)) + if rrecommends: + ctrlfile.write(u"Recommends: %s\n" % ", ".join(rrecommends)) + if rprovides: + ctrlfile.write(u"Provides: %s\n" % ", ".join(rprovides)) + if rreplaces: + ctrlfile.write(u"Replaces: %s\n" % ", ".join(rreplaces)) + if rconflicts: + ctrlfile.write(u"Conflicts: %s\n" % ", ".join(rconflicts)) + ctrlfile.close() + + for script in ["preinst", "postinst", "prerm", "postrm"]: + scriptvar = bb.data.getVar('pkg_%s' % script, localdata, 1) + if not scriptvar: + continue + try: + scriptfile = file(os.path.join(controldir, script), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open %s script file for writing." % script) + scriptfile.write(scriptvar) + scriptfile.close() + os.chmod(os.path.join(controldir, script), 0755) + + conffiles_str = bb.data.getVar("CONFFILES", localdata, 1) + if conffiles_str: + try: + conffiles = file(os.path.join(controldir, 'conffiles'), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open conffiles for writing.") + for f in conffiles_str.split(): + conffiles.write('%s\n' % f) + conffiles.close() + + os.chdir(basedir) + ret = os.system("PATH=\"%s\" fakeroot dpkg-deb -b %s %s" % (bb.data.getVar("PATH", localdata, 1), root, pkgoutdir)) + if ret != 0: + raise bb.build.FuncFailed("dpkg-deb execution failed") + + for script in ["preinst", "postinst", "prerm", "postrm", "control" ]: + scriptfile = os.path.join(controldir, script) + try: + os.remove(scriptfile) + except OSError: + pass + try: + os.rmdir(controldir) + except OSError: + pass + del localdata +} diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass new file mode 100644 index 0000000000..59909d6852 --- /dev/null +++ b/classes/rootfs_deb.bbclass @@ -0,0 +1,136 @@ +DEPENDS_prepend = "dpkg-native apt-native fakeroot-native " +DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}" + +fakeroot rootfs_deb_do_rootfs () { + set +e + mkdir -p ${IMAGE_ROOTFS}/var/dpkg/{info,updates} + + rm -f ${STAGING_DIR}/etc/apt/sources.list.rev + rm -f ${STAGING_DIR}/etc/apt/preferences + > ${IMAGE_ROOTFS}/var/dpkg/status + > ${IMAGE_ROOTFS}/var/dpkg/available + # > ${STAGING_DIR}/var/dpkg/status + + priority=1 + for arch in ${PACKAGE_ARCHS}; do + if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then + continue; + fi + cd ${DEPLOY_DIR_DEB}/$arch + # if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then + rm -f Packages.gz Packages Packages.bz2 + # fi + apt-ftparchive packages . | bzip2 > Packages.bz2 + echo "Label: $arch" > Release + + echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}/etc/apt/sources.list.rev + (echo "Package: *" + echo "Pin: release l=$arch" + echo "Pin-Priority: $((800 + $priority))" + echo) >> ${STAGING_DIR}/etc/apt/preferences + priority=$(expr $priority + 5) + done + + tac ${STAGING_DIR}/etc/apt/sources.list.rev > ${STAGING_DIR}/etc/apt/sources.list + + cat "${STAGING_DIR}/etc/apt/apt.conf.sample" \ + | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \ + > "${STAGING_DIR}/etc/apt/apt-rootfs.conf" + + export APT_CONFIG="${STAGING_DIR}/etc/apt/apt-rootfs.conf" + export D=${IMAGE_ROOTFS} + export OFFLINE_ROOT=${IMAGE_ROOTFS} + export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} + + apt-get update + + _flag () { + sed -i -e "/^Package: $2\$/{n; s/Status: install ok .*/Status: install ok $1/;}" ${IMAGE_ROOTFS}/var/dpkg/status + } + _getflag () { + cat ${IMAGE_ROOTFS}/var/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}" + } + + if [ ! -z "${LINGUAS_INSTALL}" ]; then + apt-get install glibc-localedata-i18n + if [ $? -eq 1 ]; then + exit 1 + fi + for i in ${LINGUAS_INSTALL}; do + apt-get install $i + if [ $? -eq 1 ]; then + exit 1 + fi + done + fi + + if [ ! -z "${PACKAGE_INSTALL}" ]; then + for i in ${PACKAGE_INSTALL}; do + apt-get install $i + if [ $? -eq 1 ]; then + exit 1 + fi + find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do + mv $i `echo $i | sed -e's,\.dpkg-new$,,'` + done + done + fi + + install -d ${IMAGE_ROOTFS}/${sysconfdir} + echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version + + # Mark all packages installed + sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${IMAGE_ROOTFS}/var/dpkg/status + + # Attempt to run preinsts + # Mark packages with preinst failures as unpacked + for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.preinst; do + if [ -f $i ] && ! sh $i; then + _flag unpacked `basename $i .preinst` + fi + done + + # Attempt to run postinsts + # Mark packages with postinst failures as unpacked + for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.postinst; do + if [ -f $i ] && ! sh $i configure; then + _flag unpacked `basename $i .postinst` + fi + done + + set -e + + # Hacks to make dpkg/ipkg coexist for now + mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/ + if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then + rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives + fi + ln -s /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives + ln -s /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info + ln -s /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status + + ${ROOTFS_POSTPROCESS_COMMAND} + + log_check rootfs +} + +rootfs_deb_log_check() { + target="$1" + lf_path="$2" + + lf_txt="`cat $lf_path`" + for keyword_die in "E:" + do + if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 + then + echo "log_check: There were error messages in the logfile" + echo -e "log_check: Matched keyword: [$keyword_die]\n" + echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" + echo "" + do_exit=1 + fi + done + test "$do_exit" = 1 && exit 1 + true +} + diff --git a/conf/distro/angstrom-2007.1-oabi.conf b/conf/distro/angstrom-2007.1-oabi.conf index e63dc61a48..d1541509c5 100644 --- a/conf/distro/angstrom-2007.1-oabi.conf +++ b/conf/distro/angstrom-2007.1-oabi.conf @@ -3,9 +3,6 @@ require conf/distro/angstrom-2007.1.conf #this is a special version of angstrom for armv4 based machines that can't do EABI #see http://wiki.debian.org/ArmEabiPort for details on that -#set compatible machine so people don't 'accidentally' use this -COMPATIBLE_MACHINE = "(collie|h3600|h3800|simpad)" - #only glibc based builds are supported ATM TARGET_OS = "linux" diff --git a/conf/distro/debianslug.conf b/conf/distro/debianslug.conf index 2904db1108..d33ae96c68 100644 --- a/conf/distro/debianslug.conf +++ b/conf/distro/debianslug.conf @@ -103,6 +103,11 @@ kernel-module-libata \ kernel-module-pata-artop \ " +# Add modules required for Network support +OPENSLUG_STANDARD_RDEPENDS += "\ +kernel-module-via-velocity \ +" + # This documents other file systems which are built but not installed # by default in the flash image. # diff --git a/conf/distro/openslug.conf b/conf/distro/openslug.conf index 8634d091f0..1091aa2e98 100644 --- a/conf/distro/openslug.conf +++ b/conf/distro/openslug.conf @@ -103,6 +103,11 @@ kernel-module-libata \ kernel-module-pata-artop \ " +# Add modules required for Network support +OPENSLUG_STANDARD_RDEPENDS += "\ +kernel-module-via-velocity \ +" + # This documents other file systems which are built but not installed # by default in the flash image. # diff --git a/conf/machine/a780.conf b/conf/machine/a780.conf index fe3cdbc481..1c3ae63025 100644 --- a/conf/machine/a780.conf +++ b/conf/machine/a780.conf @@ -20,6 +20,9 @@ EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n" MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth usbgadget usbhost keyboard screen" +#the a780 needs a userspace daemon to stop the BP from shutting down the phone +MACHINE_EXTRA_RDEPENDS += "opentapi" + ROOT_FLASH_SIZE = "24" EXTRA_IMAGEDEPENDS += "ezx-boot-usb-native" diff --git a/conf/machine/include/qemu.conf b/conf/machine/include/qemu.conf index b314fa9bea..26b78a6a9d 100644 --- a/conf/machine/include/qemu.conf +++ b/conf/machine/include/qemu.conf @@ -7,4 +7,5 @@ MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" IMAGE_FSTYPES ?= "tar.bz2 ext2" -ROOT_FLASH_SIZE = "100" +ROOT_FLASH_SIZE = "200" +IMAGE_ROOTFS_SIZE_ext2 = "200000" diff --git a/conf/machine/ixp4xxle.conf b/conf/machine/ixp4xxle.conf index 347c7ba3fb..d3fcd2b017 100644 --- a/conf/machine/ixp4xxle.conf +++ b/conf/machine/ixp4xxle.conf @@ -5,7 +5,9 @@ MACHINE_FEATURES = "kernel26 usbhost ext2" ARCH_BYTE_SEX = "le" -include conf/machine/include/ixp4xx.conf +require conf/machine/include/ixp4xx.conf +require conf/machine/include/tune-xscale.conf + PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5e armv5te ixp4xxle" diff --git a/conf/machine/qemuarm.conf b/conf/machine/qemuarm.conf index 371ba927bb..2de34e42c9 100644 --- a/conf/machine/qemuarm.conf +++ b/conf/machine/qemuarm.conf @@ -12,4 +12,4 @@ SERIAL_CONSOLE = "115200 ttyAMA0" PREFERRED_PROVIDER_virtual/kernel = "linux-rp" -MACHINE_TASK_PROVIDER = "task-base"
\ No newline at end of file +MACHINE_TASK_PROVIDER = "task-base" diff --git a/conf/machine/qemux86.conf b/conf/machine/qemux86.conf new file mode 100644 index 0000000000..dfbd345ae8 --- /dev/null +++ b/conf/machine/qemux86.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@NAME: qemu x86 Emulator setup +#@DESCRIPTION: Machine configuration for running an x86 system under qemu emulation + +TARGET_ARCH = "i586" +PACKAGE_EXTRA_ARCHS = "x86" + +require conf/machine/include/qemu.conf + +SERIAL_CONSOLE = "115200 ttyS0" + +PREFERRED_PROVIDER_virtual/kernel = "linux-rp" + +GLIBC_ADDONS = "nptl" +GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_TASK_PROVIDER = "task-base" diff --git a/packages/aspell/aspell_0.50.5.bb b/packages/aspell/aspell_0.50.5.bb index 8b8c5e779b..f685133121 100644 --- a/packages/aspell/aspell_0.50.5.bb +++ b/packages/aspell/aspell_0.50.5.bb @@ -15,6 +15,8 @@ FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir inherit autotools +export CXXFLAGS += "-lstdc++" + do_compile_prepend() { install ${WORKDIR}/mk-dirs_h.py ${S}/common/mk-dirs_h } diff --git a/packages/ezx/ezx-boot-usb-native_0.1.0.bb b/packages/ezx/ezx-boot-usb-native_0.1.0.bb new file mode 100644 index 0000000000..5919f28a11 --- /dev/null +++ b/packages/ezx/ezx-boot-usb-native_0.1.0.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Boots an EZX device with a user supplied kernel zImage" +DEPENDS = "libusb-native" +SECTION = "devel" +AUTHOR = "Harald Welte" +LICENSE = "GPL" +PR = "r0" + +SRC_URI = "http://www.openezx.org/download/boot_usb-${PV}.tar.bz2" +S = "${WORKDIR}/boot_usb-${PV}" + +inherit native + +do_compile() { + ${CC} ${CFLAGS} ${LDFLAGS} -lusb -o ezx-boot-usb boot_usb.c +} + +do_deploy() { + install -d ${DEPLOY_DIR_IMAGE} + install -m 0755 ezx-boot-usb ${DEPLOY_DIR_IMAGE}/ezx-boot-usb +} + +do_stage() { + : +} + +do_install() { + : +} + +addtask deploy before do_build after do_compile diff --git a/packages/ezx/ezx-boot-usb-native_1877.bb b/packages/ezx/ezx-boot-usb-native_svn.bb index 5fe3294fee..64e8a486e0 100644 --- a/packages/ezx/ezx-boot-usb-native_1877.bb +++ b/packages/ezx/ezx-boot-usb-native_svn.bb @@ -5,7 +5,12 @@ AUTHOR = "Harald Welte" LICENSE = "GPL" PR = "r1" -SRC_URI = "svn://svn.openezx.org/trunk/src/host;module=boot_usb;proto=http;rev=${PV}" +DEFAULT_PREFERENCE = "-1" + +REV = "1922" +PV = "0.1.0+r${REV}" + +SRC_URI = "svn://svn.openezx.org/trunk/src/host;module=boot_usb;proto=http;rev=${REV}" S = "${WORKDIR}/boot_usb" inherit native diff --git a/packages/gnome/gnome-vfs-dbus/.mtn2git_empty b/packages/ezx/opentapi/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/gnome/gnome-vfs-dbus/.mtn2git_empty +++ b/packages/ezx/opentapi/.mtn2git_empty diff --git a/packages/ezx/opentapi/opentapi.init b/packages/ezx/opentapi/opentapi.init new file mode 100644 index 0000000000..6b78c1574c --- /dev/null +++ b/packages/ezx/opentapi/opentapi.init @@ -0,0 +1,82 @@ +#! /bin/sh +# -*- coding: utf-8 -*- +# init.d script for opentapi + +set -e + +DAEMON=/usr/bin/opentapi +NAME=opentapi +PIDDIR=/var/run/opentapi +PIDFILE=$PIDDIR/pid +DESC="OpenTAPI server" + +test -x $DAEMON || exit 0 + +# Source defaults file; edit that file to configure this script. +ENABLED=1 +PARAMS="" +if [ -e /etc/default/opentapi ]; then + . /etc/default/opentapis +fi + +test "$ENABLED" != "0" || exit 0 + +start_it_up() +{ + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + fi + if [ -e $PIDFILE ]; then + PIDDIR=/proc/$(cat $PIDFILE) + if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then + echo "$DESC already started; not starting." + else + echo "Removing stale PID file $PIDFILE." + rm -f $PIDFILE + fi + fi + + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + -exec $DAEMON -- --system $PARAMS + echo "$NAME." + if [ -d $EVENTDIR ]; then + run-parts --arg=start $EVENTDIR + fi +} + +shut_it_down() +{ + if [ -d $EVENTDIR ]; then + run-parts --reverse --arg=stop $EVENTDIR + fi + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE + + # We no longer include these arguments so that start-stop-daemon + # can do its job even given that we may have been upgraded. + # We rely on the pidfile being sanely managed + # --exec $DAEMON -- --system $PARAMS + echo "$NAME." + rm -f $PIDFILE +} + +case "$1" in + start) + start_it_up + ;; + stop) + shut_it_down + ;; + restart|force-reload) + shut_it_down + sleep 1 + start_it_up + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/packages/ezx/opentapi_svn.bb b/packages/ezx/opentapi_svn.bb index e27aa68b97..a617f5b45b 100644 --- a/packages/ezx/opentapi_svn.bb +++ b/packages/ezx/opentapi_svn.bb @@ -3,12 +3,23 @@ LICENSE = "GPLv2" PV = "0.0+svn${SRCDATE}" -SRC_URI = "svn://svn.openezx.org/trunk/src/userspace/;module=opentapi;proto=http" +SRC_URI = "svn://svn.openezx.org/trunk/src/userspace/;module=opentapi;proto=http \ + file://opentapi.init \ + " + +inherit update-rc.d + +INITSCRIPT_NAME = "opentapi" +INITSCRIPT_PARAMS = "defaults" + S = "${WORKDIR}/${PN}" do_install() { install -d ${D}${bindir} install -m 755 opentapi ${D}${bindir} + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/opentapi.init ${D}${sysconfdir}/init.d/opentapi } diff --git a/packages/gnome/gnome-vfs-dbus/dbus-api-change.patch b/packages/gnome/gnome-vfs-dbus/dbus-api-change.patch deleted file mode 100644 index 38480c21e1..0000000000 --- a/packages/gnome/gnome-vfs-dbus/dbus-api-change.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- trunk/dbus-daemon/vfs-daemon.c.orig 2006-08-09 10:43:26.000000000 +0100 -+++ trunk/dbus-daemon/vfs-daemon.c 2006-08-09 10:45:59.000000000 +0100 -@@ -91,7 +91,7 @@ - g_warning ("Failed to acquire vfs-daemon service: %s", error.message); - dbus_error_free (&error); - -- dbus_connection_disconnect (conn); -+ dbus_connection_close (conn); - dbus_connection_unref (conn); - conn = NULL; - -@@ -101,7 +101,7 @@ - if (ret == DBUS_REQUEST_NAME_REPLY_EXISTS) { - g_printerr ("VFS daemon already running, exiting.\n"); - -- dbus_connection_disconnect (conn); -+ dbus_connection_close (conn); - dbus_connection_unref (conn); - conn = NULL; - -@@ -111,7 +111,7 @@ - if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_printerr ("Not primary owner of the service, exiting.\n"); - -- dbus_connection_disconnect (conn); -+ dbus_connection_close (conn); - dbus_connection_unref (conn); - conn = NULL; - -@@ -124,7 +124,7 @@ - NULL)) { - g_printerr ("Failed to register object with D-BUS.\n"); - -- dbus_connection_disconnect (conn); -+ dbus_connection_close (conn); - dbus_connection_unref (conn); - conn = NULL; - -@@ -152,7 +152,7 @@ - return; - } - -- dbus_connection_disconnect (conn); -+ dbus_connection_close (conn); - dbus_connection_unref |
