diff --git a/gnomeos/yocto/15_ostree b/gnomeos/15_ostree similarity index 100% rename from gnomeos/yocto/15_ostree rename to gnomeos/15_ostree diff --git a/gnomeos/debian/0001-Support-OSTree.patch b/gnomeos/debian/0001-Support-OSTree.patch deleted file mode 100644 index 81fa4d4a..00000000 --- a/gnomeos/debian/0001-Support-OSTree.patch +++ /dev/null @@ -1,149 +0,0 @@ -From e9cb0f0c6ef13773c823610f27a562bd54b2acd3 Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Mon, 24 Oct 2011 22:01:17 -0400 -Subject: [PATCH] Support OSTree - -See http://git.gnome.org/browse/ostree ---- - modules.d/95rootfs-block/mount-root.sh | 12 ++++++------ - modules.d/99base/init | 32 ++++++++++++++++++++++---------- - 2 files changed, 28 insertions(+), 16 deletions(-) - -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 2c89431..4f411da 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -34,8 +34,8 @@ mount_root() { - - READONLY= - fsckoptions= -- if [ -f "$NEWROOT"/etc/sysconfig/readonly-root ]; then -- . "$NEWROOT"/etc/sysconfig/readonly-root -+ if [ -f "$NEWROOT_PREFIX"/etc/sysconfig/readonly-root ]; then -+ . "$NEWROOT_PREFIX"/etc/sysconfig/readonly-root - fi - - if getargbool 0 "readonlyroot=" -y readonlyroot; then -@@ -57,7 +57,7 @@ mount_root() { - if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then - fsckoptions="-f $fsckoptions" - elif [ -f "$NEWROOT"/.autofsck ]; then -- [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && . "$NEWROOT"/etc/sysconfig/autofsck -+ [ -f "$NEWROOT_PREFIX"/etc/sysconfig/autofsck ] && . "$NEWROOT_PREFIX"/etc/sysconfig/autofsck - if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then - AUTOFSCK_OPT="$AUTOFSCK_OPT -f" - fi -@@ -73,8 +73,8 @@ mount_root() { - rootopts= - if getargbool 1 rd.fstab -n rd_NO_FSTAB \ - && ! getarg rootflags \ -- && [ -f "$NEWROOT/etc/fstab" ] \ -- && ! [ -L "$NEWROOT/etc/fstab" ]; then -+ && [ -f "$NEWROOT_PREFIX/etc/fstab" ] \ -+ && ! [ -L "$NEWROOT_PREFIX/etc/fstab" ]; then - # if $NEWROOT/etc/fstab contains special mount options for - # the root filesystem, - # remount it with the proper options -@@ -89,7 +89,7 @@ mount_root() { - rootopts=$opts - break - fi -- done < "$NEWROOT/etc/fstab" -+ done < "$NEWROOT_PREFIX/etc/fstab" - - rootopts=$(filter_rootopts $rootopts) - fi -diff --git a/modules.d/99base/init b/modules.d/99base/init -index 36b2152..9636990 100755 ---- a/modules.d/99base/init -+++ b/modules.d/99base/init -@@ -275,6 +275,13 @@ unset queuetriggered - unset main_loop - unset RDRETRY - -+ostree=$(getarg ostree=) -+if test -n $ostree; then -+ NEWROOT_PREFIX=${NEWROOT}/ostree/$ostree -+else -+ NEWROOT_PREFIX=$NEWROOT -+fi -+ - # pre-mount happens before we try to mount the root filesystem, - # and happens once. - getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" -@@ -287,14 +294,15 @@ getarg 'rd.break=mount' 'rdbreak=mount' && emergency_shell -n mount "Break mount - i=0 - while :; do - if ismounted "$NEWROOT"; then -- usable_root "$NEWROOT" && break; -+ echo "Checking usable $NEWROOT_PREFIX" -+ usable_root "$NEWROOT_PREFIX" && break; - umount "$NEWROOT" - fi - for f in $hookdir/mount/*.sh; do - [ -f "$f" ] && . "$f" - if ismounted "$NEWROOT"; then -- usable_root "$NEWROOT" && break; -- warn "$NEWROOT has no proper rootfs layout, ignoring and removing offending mount hook" -+ usable_root "$NEWROOT_PREFIX" && break; -+ warn "$NEWROOT_PREFIX has no proper rootfs layout, ignoring and removing offending mount hook" - umount "$NEWROOT" - rm -f "$f" - fi -@@ -320,11 +328,11 @@ unset __usr_found - for i in "$(getarg real_init=)" "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do - [ -n "$i" ] || continue - -- __p=$(readlink -m "$NEWROOT$i") -+ __p=$(readlink -m "$NEWROOT_PREFIX$i") - if [ -n "$__p" ] \ - && [ "x$__usr_found" = "x" ] \ - && [ ! -x "$__p" ] \ -- && strstr "$__p" "$NEWROOT/usr" \ -+ && strstr "$__p" "$NEWROOT_PREFIX/usr" \ - ; then - # we have to mount /usr - while read dev mp fs opts rest; do -@@ -333,14 +341,14 @@ for i in "$(getarg real_init=)" "$(getarg init=)" /sbin/init /etc/init /init /bi - __usr_found="1" - break - fi -- done < "$NEWROOT/etc/fstab" >> /etc/fstab -+ done < "$NEWROOT_PREFIX/etc/fstab" >> /etc/fstab - if [ "x$__usr_found" != "x" ]; then - info "Mounting /usr" -- mount "$NEWROOT/usr" 2>&1 | vinfo -+ mount "$NEWROOT_PREFIX/usr" 2>&1 | vinfo - fi - fi - -- __p=$(readlink -f "$NEWROOT$i") -+ __p=$(readlink -f "$NEWROOT_PREFIX$i") - if [ -x "$__p" ]; then - INIT="$i" - break -@@ -445,7 +453,11 @@ info "Switching root" - unset PS4 - - CAPSH=$(command -v capsh) --SWITCH_ROOT=$(command -v switch_root) -+if test -n "${ostree}"; then -+ SWITCH_ROOT=$(command -v ostree_switch_root) -+else -+ SWITCH_ROOT=$(command -v switch_root) -+fi - PATH=$OLDPATH - export PATH - -@@ -463,7 +475,7 @@ if [ -f /etc/capsdrop ]; then - } - else - unset RD_DEBUG -- exec $SWITCH_ROOT "$NEWROOT" "$INIT" $initargs || { -+ exec $SWITCH_ROOT "$NEWROOT" $ostree "$INIT" $initargs || { - warn "Something went very badly wrong in the initramfs. Please " - warn "file a bug against dracut." - emergency_shell --- -1.7.6.4 - diff --git a/gnomeos/debian/debian-setup.sh b/gnomeos/debian/debian-setup.sh deleted file mode 100755 index 732a3837..00000000 --- a/gnomeos/debian/debian-setup.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# This script sets up things we want to ship with the OS tree. It should -# NOT set up caches. For example, do NOT run ldconfig in here. - -set -e -set -x - -echo gnomeos >./etc/hostname - -cat >./etc/default/locale <./etc/pam.d/common-account <./etc/pam.d/common-auth <./etc/pam.d/common-password <./etc/pam.d/common-session < -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -set -e -set -x - -SRCDIR=`dirname $0` -WORKDIR=`pwd` - -OBJ=gnomeos-initrd.img -if ! test -f ${OBJ}; then - echo "Error: couldn't find '$OBJ'. Run gnomeos-make-image.sh" - exit 1 -fi - -if test -d /ostree; then - echo "/ostree already exists" - exit 1 -fi - -cp -a gnomeos-fs/ostree / -initrd=`readlink gnomeos-initrd.img` -cp ${initrd} /boot -grubby --title "GNOME OS" --add-kernel=$kernel --copy-default --initrd=/boot/${initrd} diff --git a/gnomeos/debian/gnomeos-make-base.sh b/gnomeos/debian/gnomeos-make-base.sh deleted file mode 100755 index 50e29d5e..00000000 --- a/gnomeos/debian/gnomeos-make-base.sh +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/sh -# -*- indent-tabs-mode: nil; -*- -# Generate a root filesystem image -# -# Copyright (C) 2011 Colin Walters -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -set -e -set -x - -SRCDIR=`dirname $0` -WORKDIR=`pwd` - -DEPENDS="debootstrap" - -for x in $DEPENDS; do - if ! command -v $x; then - cat < -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -set -e -set -x - -SRCDIR=`dirname $0` -WORKDIR=`pwd` - -if ! test -d gnomeos-fs; then - echo "Error: couldn't find gnomeos-fs. Run gnomeos-make-image.sh" - exit 1 -fi - -OBJ=gnomeos-fs.img -if (! test -f ${OBJ}) || test gnomeos-fs -nt ${OBJ}; then - rm -f ${OBJ}.tmp - qemu-img create ${OBJ}.tmp 2G - mkfs.ext4 -q -F ${OBJ}.tmp - mkdir -p fs - umount fs || true - mount -o loop ${OBJ}.tmp fs - cp -a gnomeos-fs/* fs - umount fs - mv ${OBJ}.tmp ${OBJ} -fi - -kv=`uname -r` -kernel=/boot/vmlinuz-${kv} - -exec qemu-kvm -kernel ${kernel} -initrd gnomeos-initrd.img -hda gnomeos-fs.img -append "root=/dev/sda ostree=current $1" diff --git a/gnomeos/yocto/gnomeos-clone-qemu.sh b/gnomeos/gnomeos-clone-qemu.sh similarity index 100% rename from gnomeos/yocto/gnomeos-clone-qemu.sh rename to gnomeos/gnomeos-clone-qemu.sh diff --git a/gnomeos/yocto/gnomeos-install.sh b/gnomeos/gnomeos-install.sh similarity index 100% rename from gnomeos/yocto/gnomeos-install.sh rename to gnomeos/gnomeos-install.sh diff --git a/gnomeos/yocto/gnomeos-setup.sh b/gnomeos/gnomeos-setup.sh similarity index 100% rename from gnomeos/yocto/gnomeos-setup.sh rename to gnomeos/gnomeos-setup.sh diff --git a/gnomeos/yocto/gnomeos-update-branches.sh b/gnomeos/gnomeos-update-branches.sh similarity index 100% rename from gnomeos/yocto/gnomeos-update-branches.sh rename to gnomeos/gnomeos-update-branches.sh diff --git a/gnomeos/ostree-init/.gitignore b/gnomeos/ostree-init/.gitignore deleted file mode 100644 index 2b0f05d1..00000000 --- a/gnomeos/ostree-init/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ostree-init diff --git a/gnomeos/ostree_switch_root.c b/gnomeos/ostree_switch_root.c deleted file mode 100644 index d3e82b14..00000000 --- a/gnomeos/ostree_switch_root.c +++ /dev/null @@ -1,309 +0,0 @@ -/* -*- c-file-style: "linux" -*- - * ostree_switch_root.c - switch to new root directory and start init. - * Copyright 2011 Colin Walters - * - * Based of switch_root.c from util-linux. - * Copyright 2002-2009 Red Hat, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Authors: - * Peter Jones - * Jeremy Katz - * Colin Walters - */ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int -perrorv (const char *format, ...) __attribute__ ((format (printf, 1, 2))); - -static int -perrorv (const char *format, ...) -{ - va_list args; - char buf[PATH_MAX]; - char *p; - - p = strerror_r (errno, buf, sizeof (buf)); - - va_start (args, format); - - vfprintf (stderr, format, args); - fprintf (stderr, ": %s\n", p); - fflush (stderr); - - va_end (args); - - sleep (3); - - return 0; -} - -/* remove all files/directories below dirName -- don't cross mountpoints */ -static int recursiveRemove(int fd) -{ - struct stat rb; - DIR *dir; - int rc = -1; - int dfd; - - if (!(dir = fdopendir(fd))) { - perrorv("failed to open directory"); - goto done; - } - - /* fdopendir() precludes us from continuing to use the input fd */ - dfd = dirfd(dir); - - if (fstat(dfd, &rb)) { - perrorv("failed to stat directory"); - goto done; - } - - while(1) { - struct dirent *d; - - errno = 0; - if (!(d = readdir(dir))) { - if (errno) { - perrorv("failed to read directory"); - goto done; - } - break; /* end of directory */ - } - - if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) - continue; - - if (d->d_type == DT_DIR) { - struct stat sb; - - if (fstatat(dfd, d->d_name, &sb, AT_SYMLINK_NOFOLLOW)) { - perrorv("failed to stat %s", d->d_name); - continue; - } - - /* remove subdirectories if device is same as dir */ - if (sb.st_dev == rb.st_dev) { - int cfd; - - cfd = openat(dfd, d->d_name, O_RDONLY); - if (cfd >= 0) { - recursiveRemove(cfd); - close(cfd); - } - } else - continue; - } - - if (unlinkat(dfd, d->d_name, - d->d_type == DT_DIR ? AT_REMOVEDIR : 0)) - perrorv("failed to unlink %s", d->d_name); - } - - rc = 0; /* success */ - -done: - if (dir) - closedir(dir); - return rc; -} - -static int make_readonly(const char *tree) -{ - struct stat stbuf; - /* Ignore nonexistent directories for now; - * some installs won't have e.g. lib64 - */ - if (stat (tree, &stbuf) < 0) - return 0; - if (mount(tree, tree, NULL, MS_BIND, NULL) < 0) { - perrorv("Failed to do initial RO bind mount %s", tree); - return -1; - } - if (mount(tree, tree, NULL, MS_BIND | MS_REMOUNT | MS_RDONLY, NULL) < 0) { - perrorv("Failed to remount RO bind mount %s", tree); - return -1; - } - return 0; -} - - -static int switchroot(const char *newroot, const char *subroot) -{ - const char *initrd_move_mounts[] = { "/dev", "/proc", "/sys", NULL }; - const char *toproot_bind_mounts[] = { "/boot", "/home", "/root", "/tmp", NULL }; - const char *ostree_bind_mounts[] = { "/var", NULL }; - const char *readonly_bind_mounts[] = { "/bin", "/etc", "/lib", - "/lib32", "/lib64", "/sbin", - "/usr", - NULL }; - int i; - int orig_cfd; - int new_cfd; - int subroot_cfd; - pid_t pid; - char subroot_path[PATH_MAX]; - char srcpath[PATH_MAX]; - char destpath[PATH_MAX]; - - fprintf (stderr, "switching to root %s subroot: %s\n", newroot, subroot); - - orig_cfd = open("/", O_RDONLY); - new_cfd = open(newroot, O_RDONLY); - - /* For now just remount the rootfs r/w. Should definitely - * handle this better later... (famous last words) - */ - if (mount(newroot, newroot, NULL, MS_REMOUNT, NULL) < 0) { - perrorv("failed to remount %s read/write", newroot); - return -1; - } - - snprintf(subroot_path, sizeof(subroot_path), "%s/ostree/%s", newroot, subroot); - subroot_cfd = open(subroot_path, O_RDONLY); - if (subroot_cfd < 0) { - perrorv("failed to open subroot %s", subroot_path); - return -1; - } - - for (i = 0; initrd_move_mounts[i] != NULL; i++) { - snprintf(destpath, sizeof(destpath), "%s%s", subroot_path, initrd_move_mounts[i]); - - if (mount(initrd_move_mounts[i], destpath, NULL, MS_MOVE, NULL) < 0) { - perrorv("failed to move initramfs mount %s to %s", - initrd_move_mounts[i], destpath); - umount2(initrd_move_mounts[i], MNT_FORCE); - } - } - - for (i = 0; toproot_bind_mounts[i] != NULL; i++) { - snprintf(srcpath, sizeof(srcpath), "%s%s", newroot, toproot_bind_mounts[i]); - snprintf(destpath, sizeof(destpath), "%s/%s", subroot_path, toproot_bind_mounts[i]); - if (mount(srcpath, destpath, NULL, MS_BIND & ~MS_RDONLY, NULL) < 0) { - perrorv("failed to bind mount (class:toproot) %s to %s", srcpath, destpath); - return -1; - } - } - - for (i = 0; ostree_bind_mounts[i] != NULL; i++) { - snprintf(srcpath, sizeof(srcpath), "%s/ostree%s", newroot, ostree_bind_mounts[i]); - snprintf(destpath, sizeof(destpath), "%s%s", subroot_path, ostree_bind_mounts[i]); - if (mount(srcpath, destpath, NULL, MS_BIND & ~MS_RDONLY, NULL) < 0) { - perrorv("failed to bind mount (class:bind) %s to %s", srcpath, destpath); - return -1; - } - } - - snprintf(destpath, sizeof(destpath), "%s/sysroot", subroot_path); - if (mount(newroot, destpath, NULL, MS_BIND, NULL) < 0) { - perrorv("Failed bind mount sysroot"); - return -1; - } - - if (chdir(newroot)) { - perrorv("failed to change directory to %s", newroot); - return -1; - } - - if (mount(newroot, "/", NULL, MS_MOVE, NULL) < 0) { - perrorv("failed to mount moving %s to /", newroot); - return -1; - } - - if (fchdir (new_cfd) < 0) { - perrorv("failed to fchdir back to root"); - return -1; - } - - snprintf(destpath, sizeof(destpath), "ostree/%s", subroot); - if (chroot(destpath) < 0) { - perrorv("failed to change root to %s", destpath); - return -1; - } - - if (chdir ("/") < 0) { - perrorv("failed to chdir to subroot"); - return -1; - } - - for (i = 0; readonly_bind_mounts[i] != NULL; i++) { - if (make_readonly(readonly_bind_mounts[i]) < 0) { - return -1; - } - } - - if (orig_cfd >= 0) { - pid = fork(); - if (pid <= 0) { - recursiveRemove(orig_cfd); - if (pid == 0) - exit(EXIT_SUCCESS); - } - close(orig_cfd); - } - close(new_cfd); - return 0; -} - -static void usage(FILE *output) -{ - fprintf(output, "usage: %s \n", - program_invocation_short_name); - exit(output == stderr ? EXIT_FAILURE : EXIT_SUCCESS); -} - -int main(int argc, char *argv[]) -{ - char *newroot, *subroot, *init, **initargs; - - fflush (stderr); - if (argc < 4) - usage(stderr); - - if ((!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h"))) - usage(stdout); - - newroot = argv[1]; - subroot = argv[2]; - init = argv[3]; - initargs = &argv[3]; - - if (!*newroot || !*subroot || !*init) - usage(stderr); - - if (switchroot(newroot, subroot)) - exit(1); - - if (access(init, X_OK)) - perrorv("cannot access %s", init); - - execv(init, initargs); - perrorv("Failed to exec init '%s'", init); - exit(1); -} - diff --git a/gnomeos/yocto/TODO b/gnomeos/yocto/TODO deleted file mode 100644 index 2f2a16c0..00000000 --- a/gnomeos/yocto/TODO +++ /dev/null @@ -1,3 +0,0 @@ -* Add ostree-init binary for the non-initramfs case - - Just need to do the chroot before running real init -* Modify init scripts to do read only bind mounts etc. diff --git a/gnomeos/yocto/classes/gnomeos-contents.bbclass b/gnomeos/yocto/classes/gnomeos-contents.bbclass deleted file mode 100644 index 96026106..00000000 --- a/gnomeos/yocto/classes/gnomeos-contents.bbclass +++ /dev/null @@ -1,212 +0,0 @@ -# -# Copyright (C) 2011 Colin Walters -# -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -inherit rootfs_${IMAGE_PKGTYPE} - -IMAGE_INSTALL = "libuuid1 \ - libblkid1 \ - e2fsprogs-blkid \ - e2fsprogs-fsck \ - e2fsprogs-e2fsck \ - e2fsprogs-mke2fs \ - e2fsprogs-tune2fs \ - libtiff3 \ - libjpeg8 \ - libltdl7 \ - libstdc++6 \ - libgnutls26 \ - libogg0 \ - eglibc-gconvs \ - eglibc-binaries \ - pam-plugin-cracklib \ - pam-plugin-env \ - pam-plugin-keyinit \ - pam-plugin-limits \ - pam-plugin-localuser \ - pam-plugin-loginuid \ - pam-plugin-unix \ - pam-plugin-rootok \ - pam-plugin-succeed-if \ - pam-plugin-permit \ - pam-plugin-nologin \ - ncurses-terminfo-base \ - module-init-tools \ - cpio \ - util-linux-mount \ - " - -RDEPENDS += "ostree-native \ - eglibc-locale \ - tiff \ - libogg \ - libvorbis \ - speex \ - cpio \ - libatomics-ops \ - " - -RECIPE_PACKAGES = "task-core-boot \ - coreutils \ - ostree \ - strace \ - bash \ - tar \ - grep \ - gawk \ - gzip \ - less \ - curl \ - tzdata \ - libsndfile1 \ - icu \ - procps \ - libpam \ - ncurses \ - libvorbis \ - speex \ - python-modules \ - python-misc \ - openssh \ - " - -PACKAGE_INSTALL = "${RECIPE_PACKAGES} ${IMAGE_INSTALL}" - -RDEPENDS += "${RECIPE_PACKAGES}" -DEPENDS += "makedevs-native virtual/fakeroot-native" - -EXCLUDE_FROM_WORLD = "1" - -do_rootfs[nostamp] = "1" -do_rootfs[dirs] = "${TOPDIR}" -do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" -do_build[nostamp] = "1" -do_rootfs[umask] = 022 - -def gnomeos_get_devtable_list(d): - return bb.which(d.getVar('BBPATH', 1), 'files/device_table-minimal.txt') - -# Must call real_do_rootfs() from inside here, rather than as a separate -# task, so that we have a single fakeroot context for the whole process. -fakeroot do_rootfs () { - set -x - rm -rf ${IMAGE_ROOTFS} - rm -rf ${MULTILIB_TEMP_ROOTFS} - mkdir -p ${IMAGE_ROOTFS} - mkdir -p ${DEPLOY_DIR_IMAGE} - - rootfs_${IMAGE_PKGTYPE}_do_rootfs - - # Delete all of the init scripts; we have our own - rm -f ${IMAGE_ROOTFS}/etc/init.d/* - rm -f ${IMAGE_ROOTFS}/etc/rc*.d/* - - # Clear out the default fstab; everything we need right now is mounted - # in the initramfs. - cat < /dev/null > ${IMAGE_ROOTFS}/etc/fstab - - # Kill the Debian netbase stuff - we use NetworkManager - rm -rf ${IMAGE_ROOTFS}/etc/network - - # We deploy kernels via an external mechanism; the modules - # directory is just a bind mount to /sysroot. - rm -rf ${IMAGE_ROOTFS}/lib/modules - mkdir -p ${IMAGE_ROOTFS}/lib/modules - - # Blow away udev from poky in favor of our own - rm ${IMAGE_ROOTFS}/sbin/udevd - ln -s /usr/libexec/udevd ${IMAGE_ROOTFS}/sbin/udevd - rm ${IMAGE_ROOTFS}/sbin/udevadm - ln -s /usr/sbin/udevadm ${IMAGE_ROOTFS}/sbin/udevadm - - # Random configuration changes here - sed -i -e 's,^DESTINATION=.*,DESTINATION=\"file\",' ${IMAGE_ROOTFS}/etc/syslog.conf - - # Adjustments for /etc -> {/var,/run} here - ln -sf /run/resolv.conf ${IMAGE_ROOTFS}/etc/resolv.conf - rm -f ${IMAGE_ROOTFS}/etc/passwd - ln -s /var/passwd ${IMAGE_ROOTFS}/etc/passwd - rm -f ${IMAGE_ROOTFS}/etc/shadow ${IMAGE_ROOTFS}/etc/shadow- - ln -s /var/shadow ${IMAGE_ROOTFS}/etc/shadow - rm -f ${IMAGE_ROOTFS}/etc/group - ln -s /var/group ${IMAGE_ROOTFS}/etc/group - - TOPROOT_BIND_MOUNTS="home root tmp" - OSTREE_BIND_MOUNTS="var" - OSDIRS="dev proc mnt media run sys sysroot" - READONLY_BIND_MOUNTS="bin etc lib sbin usr" - - rm -rf ${WORKDIR}/gnomeos-contents - mkdir ${WORKDIR}/gnomeos-contents - cd ${WORKDIR}/gnomeos-contents - for d in $TOPROOT_BIND_MOUNTS $OSTREE_BIND_MOUNTS $OSDIRS; do - mkdir $d - done - chmod a=rwxt tmp - - for d in $READONLY_BIND_MOUNTS; do - mv ${IMAGE_ROOTFS}/$d . - done - rm -rf ${IMAGE_ROOTFS} - mv ${WORKDIR}/gnomeos-contents ${IMAGE_ROOTFS} - - DEST=${IMAGE_NAME}.rootfs.tar.gz - (cd ${IMAGE_ROOTFS} && tar -zcv -f ${WORKDIR}/$DEST .) - echo "Created $DEST" - mv ${WORKDIR}/$DEST ${DEPLOY_DIR_IMAGE}/ - cd ${DEPLOY_DIR_IMAGE}/ - rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.tar.gz - ln -s ${IMAGE_NAME}.rootfs.tar.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.tar.gz - echo "Created ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.tar.gz" - - set -x - - if echo ${IMAGE_LINK_NAME} | grep -q -e -runtime; then - ostree_target=runtime - else - ostree_target=devel - fi - if test x${MACHINE_ARCH} = xqemux86; then - ostree_machine=i686 - else - if test x${MACHINE_ARCH} = xqemux86_64; then - ostree_machine=x86_64 - else - echo "error: unknown machine from ${MACHINE_ARCH}"; exit 1 - fi - fi - buildroot=gnomeos-3.4-${ostree_machine}-${ostree_target} - base=bases/yocto/${buildroot} - repo=${DEPLOY_DIR_IMAGE}/repo - if ! test -d ${repo}; then - mkdir ${repo} - ostree --repo=${repo} init --archive - fi - ostree --repo=${repo} commit -s "${IMAGE_LINK_NAME}" --skip-if-unchanged "Build" -b ${base} --tree=tar=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.tar.gz - ostree --repo=${repo} diff "${base}" || true - # Create the initial root if it doesn't exist - if ! ostree --repo=${repo} rev-parse "${buildroot}" 2>/dev/null; then - ostree --repo=${repo} compose -s "Initial compose" -b ${buildroot} ${base}:/ - fi -} - -log_check() { - true -} - -do_fetch[noexec] = "1" -do_unpack[noexec] = "1" -do_patch[noexec] = "1" -do_configure[noexec] = "1" -do_compile[noexec] = "1" -do_install[noexec] = "1" -do_populate_sysroot[noexec] = "1" -do_package[noexec] = "1" -do_package_write_ipk[noexec] = "1" -do_package_write_deb[noexec] = "1" -do_package_write_rpm[noexec] = "1" - -addtask rootfs before do_build diff --git a/gnomeos/yocto/commit-yocto-build.sh b/gnomeos/yocto/commit-yocto-build.sh deleted file mode 100755 index 45c57c63..00000000 --- a/gnomeos/yocto/commit-yocto-build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Colin Walters -# - -set -e -set -x - -WORKDIR=`pwd` -cd `dirname $0` -SCRIPT_SRCDIR=`pwd` -cd - - -if test $(id -u) = 0; then - cat < -Date: Mon, 28 Mar 2011 17:17:35 -0400 -Subject: [PATCH] configure: Allow specifying --with-distro=generic - -This option is useful if we simply don't need any legacy integration. ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 98e2b04..b940d50 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -128,7 +128,7 @@ if test "z$with_distro" = "z"; then - exit 1 - else - case $with_distro in -- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;; -+ generic|redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;; - *) - echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" - exit 1 --- -1.7.4 - diff --git a/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.9.2.0.bb b/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.9.2.0.bb deleted file mode 100644 index bc4825dc..00000000 --- a/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.9.2.0.bb +++ /dev/null @@ -1,3 +0,0 @@ -require NetworkManager.inc - -SRC_URI[sha256sum] = "a178ed2f0b5a1045ec47b217ea531d0feba9208f6bcfe64b701174a5c1479816" diff --git a/gnomeos/yocto/recipies-core/gtk-doc/gtk-doc.bb b/gnomeos/yocto/recipies-core/gtk-doc/gtk-doc.bb deleted file mode 100644 index c0180ce3..00000000 --- a/gnomeos/yocto/recipies-core/gtk-doc/gtk-doc.bb +++ /dev/null @@ -1,11 +0,0 @@ -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING-DOCS;md5=18ba770020b624031bc7c8a7b055d776" - -DEPENDS = "perl-native" - -SRC_URI = "git://git.gnome.org/gtk-doc;tag=GTK_DOC_1_18" -S = "${WORKDIR}/git" - -inherit autotools gettext - -BBCLASSEXTEND = "native" diff --git a/gnomeos/yocto/recipies-core/images/gnomeos-contents-devel.bb b/gnomeos/yocto/recipies-core/images/gnomeos-contents-devel.bb deleted file mode 100644 index 571eb81a..00000000 --- a/gnomeos/yocto/recipies-core/images/gnomeos-contents-devel.bb +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2011 Colin Walters -# -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -inherit gnomeos-contents - -RECIPE_PACKAGES += "task-core-sdk \ - python-dev \ - bison flex \ - git \ - gdb \ - zip \ - libxml-parser-perl \ - gettext-dev \ - " - -DEPENDS += "db" - -IMAGE_INSTALL += "libc6-dev \ - libgcc-s-dev \ - linux-libc-headers-dev \ - libz-dev \ - libtool-dev \ - libuuid-dev \ - libblkid-dev \ - libpam-dev \ - libtiff-dev \ - libjpeg-dev \ - libltdl-dev \ - libsndfile-dev \ - libatomics-ops-dev \ - libogg-dev \ - speex-dev \ - libvorbis-dev \ - libstdc++-dev \ - libcap-dev \ - libcap-bin \ - libgpg-error-dev \ - libtasn1-dev \ - libtasn1-bin \ - libgcrypt-dev \ - libgnutls-dev \ - icu-dev \ - curl-dev \ - libcurl-dev \ - ncurses-dev \ - db-dev \ - " diff --git a/gnomeos/yocto/recipies-core/images/gnomeos-contents-runtime.bb b/gnomeos/yocto/recipies-core/images/gnomeos-contents-runtime.bb deleted file mode 100644 index d70a704f..00000000 --- a/gnomeos/yocto/recipies-core/images/gnomeos-contents-runtime.bb +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (C) 2011 Colin Walters -# -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -inherit gnomeos-contents diff --git a/gnomeos/yocto/recipies-core/ostree/ostree.bb b/gnomeos/yocto/recipies-core/ostree/ostree.bb deleted file mode 100644 index 28d2b8eb..00000000 --- a/gnomeos/yocto/recipies-core/ostree/ostree.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "GNOME OS management tool" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=97285cb818cf231e6a36f72c82592235" - -SRC_URI = "git://git.gnome.org/ostree;tag=00ad0a2ea7965de5852e35395fcfd9c9df4ebc2a" -S = "${WORKDIR}/git" - -DEPENDS += "libarchive glib-2.0" - -inherit autotools - -EXTRA_OECONF = "--without-soup-gnome --with-libarchive" - -FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" - -BBCLASSEXTEND = "native" -