Giter Site home page Giter Site logo

sugar-build's Introduction

About

Sugar is made of several modules and sometimes depends on libraries which have not yet been packaged in Linux distributions. To make it easier for developers to build from sources, we developed sugar-build, a set of scripts that automates builds and other common development tasks.

Warning: sugar-build depends on Fedora 23, which is no longer supported by Fedora, having begun End of Life late in 2016. Developers are needed to change distro in build/root.json and verify and test all new dependencies.

Note: the development environment requires Linux. If you are running Windows or OS X, you must install a Linux virtual machine before continuing. Not covered here.

Installing

First of all clone the sugar-build git repository

git clone git://github.com/sugarlabs/sugar-build.git

Change to the directory and pull the remaining source code.


cd sugar-build
./osbuild pull

Build the source.


./osbuild shell
build

Run Sugar.


run

If anything goes wrong, read the common issues section or subscribe to the sugar-devel mailing list, and send an email. We will usually reply within 48 hours.

Common Issues

sugar-build frequently stops working when upstream dependencies have changed, requiring changes to sugar-build, Sugar, toolkit, or activities. If you are not able to resolve these issues, then sugar-build may not be a suitable tool for you. Choose other development tools for developing with Sugar.

sugar-build may fail for people behind web proxies. Usually this is shown as a proxy error in the pip command or an issue with the volo command.

pip may fail while installing Python packages:

MissingSchema: Proxy URLs must have explicit schemes.

This happens if you have no schema for your http_proxy environment variable. To fix, add the URL schema by prefixing http, for example http_proxy=localhost:3128 would be changed to http_proxy=http://localhost:3128.

If this does not work, you can also try the method mentioned below:

volo may fail, for example:

* Building sugar-web

Command failed: volo -nostamp -f add

Error: connect ECONNREFUSED

If this happens, you have 2 options. Best is to run your first build in an environment without a proxy. Otherwise, remove the sugar-web module. You will not be able to develop Sugar web activities. To remove the sugar-web module, open build/modules.json file and delete the following lines:

    {
        "has_docs": true,
        "has_checks": true,
        "name": "sugar-web",
        "repo": "https://github.com/sugarlabs/sugar-web.git",
        "clean_stamp": 1
    },

Developing

All the sources are inside the sugar-build directory. You can make changes using any text editor. If Sugar is already running stop it, then restart it with


./osbuild run

Once in a while update to the latest sources


./osbuild pull

Commands reference

You can run the commands as osbuild arguments


./osbuild build
./osbuild run

Or inside a shell


./osbuild

[sugar-build $] build
[sugar-build $] run

The following commands are available

pull

Pull the latest source code. All modules are pulled unless one is specified.

build

Build the source code. All the modules are built unless one is specified.

run

Run sugar.

check

Run tests for sugar-build and all the modules that provides them. It should usually be run before submitting patches or pushing changes.

clean

Delete the build artifacts. If a module is specified only the source directory of that module is cleaned.

shell

Open a shell inside the build environment.

Preferences reference

You can set a few options by creating a sugar-build/prefs.json file. For example


{
    "output": "HDMI1",
    "resolution": "1024x768"
}

The following preferences are available

github

You can specify a list of forks and repositories for which you have ssh access, so that remotes will be setup automatically for those. For example


{
    "github": {
        "forks": [
            "myname/sugar.git",
            "myname/sugar-docs.git"
        ],
        "ssh": [
            "sugarlabs/sugar.git",
            "sugarlabs/sugar-docs.git"
        ]
    }
}

When adding a new module to the lists, you need to delete its directory for the remotes to be switched over.

resolution

This option is only valid when running from X Window. It specifies the resolution of the window containing the sugar desktop in the form [width]x[height]. Otherwise the whole screen is used.

output

This option is only valid when running from a text console. Sugar does not work properly on multiple video outputs, so we need to select one and turn off the others. By default we select the first output listed by RandR. You can set this variable to override that with any other of the connected outputs reported by the xrandr command, for example VGA1 if you have an external monitor.

use_broot

Set the option to false if you don't want to build and run in a chroot. If you don't know what that means you'd better not use the option. This is currently supported only on Fedora 19, on other distributions it's likely to fail unless you manually install the required dependencies.

More configuration options

activities

When you first build the development environment, you will notice that there are only a few activities installed by default. In Sugar, additional activities are usually stored in

~/Activities
However in the development environment, they are stored in
sugar-build/activities
Please note that the sugar-build/activities often won't get created until the user installs or creates an Activity in the sugar-build. For Installation of an activity please refer to this Manual and for the creation of your own Activity, you can see the Activity Creation page.

Tip for testing and debugging purposes: In order to run multiple versions of the same activity, they need to have different bundle ids, so you have to change the bundle_id in activity.info file in one of them. For example, I have version 39 of Calculate Activity installed and I want to install the version 41 without removing the installed one. In order to do so, just go to the directory of the v41 and go to Calculate.Activity/activity and then open the activity.info file and change the bundle_id of it. After doing that, you will be able to install v41 without removing the previously installed version.

dotsugar

By default, Sugar stores configuration files, logs, and the datastore in

~/.sugar
In the dev-enviroment, these files are stored in
sugar-build/home/dotsugar

change debugging level

You can enable debugging in Sugar modifying the file

sugar-build/home/default/debug
and uncommenting the line:

#export SUGAR_LOGGER_LEVEL=debug

This file is located in

~/.sugar/default/debug

when is not run in sugar-build. The file also allows enable debugging for specific parts of the stack, like collaboration.

For debugging Salut or Gabble use:

FOO_PERSIST=1 FOO_DEBUG=all WOCKY_DEBUG=all G_MESSAGES_DEBUG=all FOO_LOGFILE=/tmp/foo.log *command*

Note: Replace FOO with SALUT or GABBLE. When debugging Gabble, it's usually a good idea to set WOCKY_DEBUG=xmpp (Gabble 0.9) or LM_DEBUG=net (Gabble 0.8) so that the XML stanzas are also captured in the logfile.

For more refer 1 2

gsettings

Sugar uses gsettings for a number of different settings. In the development environment, these settings are found in

sugar-build/home/default/config/dconf

osbuild check uses its own gsetting. These can be found in

sugar-build/home/check/config/dconf

Multiple instances

To run multiple instances of sugar-build, enter the shell and


SUGAR_PROFILE=test1 run &
SUGAR_PROFILE=test2 run &

Log files

Log files for osbuild are found

build/logs

Log files for Sugar and Sugar activities are found in

home/dotsugar/default/logs

Hacking

Before submitting changes to the config please run json-format on the json files you modified. The script is available in the shell.

sugar-build's People

Contributors

alanjas avatar callkalpa avatar code-sur avatar davelab6 avatar dnarvaez avatar gauravp94 avatar godiard avatar i5o avatar iamutkarshtiwari avatar lionaneesh avatar manuq avatar migonzalvar avatar nemesiscodex avatar quozl avatar samdroid-apps avatar scanterog avatar tchx84 avatar tradzik avatar worr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sugar-build's Issues

Fedora 20 is unsupported and insecure

sugar-build depends on a broot of Fedora 20, which is no longer supported and contains known security vulnerabilities that will not be fixed.

Once installed and run, the resulting system becomes insecure.

  • turn a buildbot back on and build on latest Fedora,
  • on each release of Fedora update the build configuration.

sugar-build build not working.

When I run build, I get an error when building "browse". I'm using debian 8.

ignacio@debian:~/Escritorio/sugar-build$ ./osbuild build

$ sudo broot run osbuild build

= Building =

* Building browse

Command failed: python2.7 /home/broot/sugar-build/browse/setup.py install --prefix /home/broot/sugar-build/build/out/install

Install /home/broot/sugar-build/browse/locale/bi/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/bi/activity.linfo.
Install /home/broot/sugar-build/browse/activity/activity.info to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/activity/activity.info.
Install /home/broot/sugar-build/browse/locale/na/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/na/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/mn/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/mn/activity.linfo.
Install /home/broot/sugar-build/browse/po/wa.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/wa.po.
Install /home/broot/sugar-build/browse/po/zh_HK.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/zh_HK.po.
Install /home/broot/sugar-build/browse/locale/sm/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/sm/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/ml/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/ml/activity.linfo.
Install /home/broot/sugar-build/browse/locale/bi/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/bi/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/km/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/km/activity.linfo.
Install /home/broot/sugar-build/browse/locale/en_GB/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/en_GB/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/po/am.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/am.po.
Install /home/broot/sugar-build/browse/locale/da/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/da/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/fil/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/fil/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/am/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/am/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/bg/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/bg/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/km/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/km/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/hus/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/hus/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/cs/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/cs/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/son/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/son/activity.linfo.
Install /home/broot/sugar-build/browse/downloadmanager.py to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/downloadmanager.py.
Install /home/broot/sugar-build/browse/locale/ta/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/ta/activity.linfo.
Install /home/broot/sugar-build/browse/locale/mk/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/mk/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/data/error_page.tmpl to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/data/error_page.tmpl.
Install /home/broot/sugar-build/browse/locale/ha/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/ha/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/cs/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/cs/activity.linfo.
Install /home/broot/sugar-build/browse/po/gu.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/gu.po.
Install /home/broot/sugar-build/browse/po/hu.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/hu.po.
Install /home/broot/sugar-build/browse/locale/it/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/it/activity.linfo.
Install /home/broot/sugar-build/browse/locale/pap/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/pap/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/gl/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/gl/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/pl/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/pl/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/bn/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/bn/activity.linfo.
Install /home/broot/sugar-build/browse/locale/hy/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/hy/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/ne/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/ne/activity.linfo.
Install /home/broot/sugar-build/browse/locale/kos/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/kos/activity.linfo.
Install /home/broot/sugar-build/browse/po/bs.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/bs.po.
Install /home/broot/sugar-build/browse/locale/gl/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/gl/activity.linfo.
Install /home/broot/sugar-build/browse/locale/gom/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/gom/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/po/gn.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/gn.po.
Install /home/broot/sugar-build/browse/locale/ca/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/ca/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/wo/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/wo/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/lt/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/lt/activity.linfo.
Install /home/broot/sugar-build/browse/locale/en/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/en/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/activity/activity-web.svg to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/activity/activity-web.svg.
Install /home/broot/sugar-build/browse/locale/bn/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/bn/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/gn/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/gn/activity.linfo.
Install /home/broot/sugar-build/browse/po/ku.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/ku.po.
Install /home/broot/sugar-build/browse/AUTHORS to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/AUTHORS.
Install /home/broot/sugar-build/browse/locale/hr/activity.linfo to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/locale/hr/activity.linfo.
Install /home/broot/sugar-build/browse/po/or.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/or.po.
Install /home/broot/sugar-build/browse/locale/son/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/son/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/locale/or/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/or/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/icons/save-as-pdf.svg to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/icons/save-as-pdf.svg.
Install /home/broot/sugar-build/browse/locale/it/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/it/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/data/index.html to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/data/index.html.
Install /home/broot/sugar-build/browse/po/da.po to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/po/da.po.
Install /home/broot/sugar-build/browse/locale/rw/LC_MESSAGES/org.laptop.WebActivity.mo to /home/broot/sugar-build/build/out/install/share/locale/rw/LC_MESSAGES/org.laptop.WebActivity.mo.
Install /home/broot/sugar-build/browse/collabwrapper to /home/broot/sugar-build/build/out/install/share/sugar/activities/Browse.activity/collabwrapper.
Traceback (most recent call last):
  File "/home/broot/sugar-build/browse/setup.py", line 21, in <module>
    bundlebuilder.start()
  File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 678, in start
    globals()['cmd_' + options.command](config, options)
  File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 563, in cmd_install
    installer.install(options.prefix, options.install_mime)
  File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 368, in install
    shutil.copy(source, dest)
  File "/usr/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 21] Is a directory: '/home/broot/sugar-build/browse/collabwrapper'

! Failed to run command build

! Failed to run command build
ignacio@debian:~/Escritorio/sugar-build$ 

Port to WebKit2 API 4.0

Sugar moved away from WebKit2 API 3.0 because so has Fedora and Ubuntu; 3.0 is deprecated and insecure. webkitgtk3 has been removed from Fedora but remains in build/root.json.

sugar-build has to follow this change and use WebKit2 API 4.0

help running sugar-build with docker and docker-compose

Hi guys, I'm trying to setup and run sugar-build in a docker container with no luck so far. I just wanted to standardize and package all sugar dependencies and be able to develop in any unix platform without having to use fedora.

The idea is to run sugar-build like this:

$ docker-compose up -d #builds and runs the docker image in background
$ docker-compose exec sugarbuild ./osbuild pull # ./osbuild pull
$ docker-compose exec sugarbuild ./osbuild run # ./osbuild run

I know docker containers can use the host X server if the container have enough permissions (e.g. running xhost +), but this is the error I'm getting:

Type Shift-Alt-Q inside sugar to close.

Command failed: sugar-runner

/code/build/out/install/bin/sugar-runner:28: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner
/code/build/out/install/libexec/sugar-runner/xephyr-window:21: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner
/code/build/out/install/bin/sugar-runner:46: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk

xinit: XFree86_VT property unexpectedly has 0 items instead of 1
/code/build/out/install/libexec/sugar-runner/xinitrc:25: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner
Warning:          Key <OUTP> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KITG> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KIDN> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KIUP> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <RO> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I192> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I193> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I194> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I195> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I196> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I255> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          No symbols defined for <AB11> (keycode 97)
Warning:          No symbols defined for <JPCM> (keycode 103)
Warning:          No symbols defined for <I120> (keycode 120)
Warning:          No symbols defined for <AE13> (keycode 132)
Warning:          No symbols defined for <I149> (keycode 149)
Warning:          No symbols defined for <I154> (keycode 154)
Warning:          No symbols defined for <I168> (keycode 168)
Warning:          No symbols defined for <I178> (keycode 178)
Warning:          No symbols defined for <I183> (keycode 183)
Warning:          No symbols defined for <I184> (keycode 184)
Warning:          No symbols defined for <FK19> (keycode 197)
Warning:          No symbols defined for <FK24> (keycode 202)
Warning:          No symbols defined for <I217> (keycode 217)
Warning:          No symbols defined for <I219> (keycode 219)
Warning:          No symbols defined for <I221> (keycode 221)
Warning:          No symbols defined for <I222> (keycode 222)
Warning:          No symbols defined for <I230> (keycode 230)
Warning:          No symbols defined for <I247> (keycode 247)
Warning:          No symbols defined for <I248> (keycode 248)
Warning:          No symbols defined for <I249> (keycode 249)
Warning:          No symbols defined for <I250> (keycode 250)
Warning:          No symbols defined for <I251> (keycode 251)
Warning:          No symbols defined for <I252> (keycode 252)
Warning:          No symbols defined for <I253> (keycode 253)
xinit: connection to X server lost


! Failed to run command run

I'm currently using OpenSuse Leap 42.1, uname -a:

Linux linux-e4p7.suse 4.1.34-33-default #1 SMP PREEMPT Thu Oct 20 08:03:29 UTC 2016 (fe18aba) x86_64 x86_64 x86_64 GNU/Linux

Dockerfile:

FROM fedora:23
RUN mkdir /code/
# Install sugar-build dependencies
RUN dnf install -y \
    python \
    python-devel \
    python-virtualenv \
    python-gobject \
    libXrandr \
    tar \
    xz \
    npm \
    sudo && \
    dnf clean all --enablerepo=\*
WORKDIR /code/

# Add sugar as user and sudoer
RUN useradd -ms /bin/bash sugar && echo ' sugar ALL=(ALL)   NOPASSWD:ALL' >> /etc/sudoers
USER sugar
VOLUME ["/code/"]
ENTRYPOINT ["tail -f /dev/null"]

docker-compose.yml:

#  
#  USAGE:
#  - Build and run the container:
#       docker-compose up -d
#  _ Execute commands:
#       docker-compose exec sugarbuild <command>
#       e.g:
#           docker-compose exec sugarbuild ./osbuild pull
#           docker-compose exec sugarbuild ./osbuild run
#

sugarbuild:
    build: .
    volumes:
        - ./:/code/
        - /tmp/:/tmp/ # Required to run GUI
        - /dev/snd:/dev/snd # Required to run GUI
    privileged: true
    entrypoint: # no-op to keep container up
        - tail
        - -f
        - /dev/null
    # Allow tty and stdin input
    stdin_open: true
    tty: true
    # Use current display
    environment:
        - DISPLAY=$DISPLAY
    net: "host"
    pid: "host"
    ipc: "host"

All my files are available here

f25 is not able to build sugar-build

May not be just f25 related but volo related.
When trying to build sugar-build I get

INFO:root:Running command volo -nostamp -f add
INFO:root:Running: volo -nostamp -f add
INFO:root:Downloading: https://codeload.github.com/sugarlabs/webL10n/legacy.zip/master
INFO:root:TypeError: bytes.get is not a function

xorg-x11-drv-vmmouse has been retired from f25

In sugar-build/build/root.json the package xorg-x11-drv-vmmouse is present, making the installation in fedora25 not possible.

Removing it from root.json fixes the problem.

The point is, is that package really important, or we can just remove it?

Can't pull in fedora 25.

after cloning sugar-build.git, if you will try "./osbuild pull" you will probably receive in error. I think this might happen because of incompatibility issues with f25.

not building in ubuntu

reported by Himanshu40 in irc (gci student), and others (that I don't know their names, sorry ๐Ÿ˜ž)

himanshu@asus-xseries:~/sugar-build$ ./osbuild pull

= Setup the host build system =

* Create the python virtualenv
New python executable in /home/himanshu/sugar-build/build/out/sandbox-host/install/bin/python2.7
Also creating executable in /home/himanshu/sugar-build/build/out/sandbox-host/install/bin/python
Installing setuptools, pip...
  Complete output from command /home/himanshu/sugar...nstall/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/__init__.py", line 11, in <module>
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 9, in <module>
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/download.py", line 22, in <module>
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/_vendor/requests/__init__.py", line 53, in <module>
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 62, in <module>
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py", line 2338, in <module>
    main()
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py", line 824, in main
    symlink=options.symlink)
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py", line 992, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py", line 960, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py", line 902, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/himanshu/sugar...nstall/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
Traceback (most recent call last):
  File "./osbuild", line 503, in <module>
    if not main():
  File "./osbuild", line 482, in main
    if not setup(options.command):
  File "./osbuild", line 322, in setup
    raise e
subprocess.CalledProcessError: Command '['python2.7', '/home/himanshu/sugar-build/build/out/sandbox-host/cache/virtualenv-1.11.4/virtualenv.py', '--system-site-packages', '/home/himanshu/sugar-build/build/out/sandbox-host/install']' returned non-zero exit status 1

build issues

why am I having this problem in Ubuntu 17.04.Please help @iamutkarshtiwari. I have followed this https://developer.sugarlabs.org/dev-environment.md.html

Command failed: python2.7 /home/broot/sugar-build/browse/setup.py install --prefix /home/broot/sugar-build/build/out/install

Traceback (most recent call last):
File "/home/broot/sugar-build/browse/setup.py", line 21, in
bundlebuilder.start()
File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 629, in start
globals()['cmd_' + options.command](config, options)
File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 509, in cmd_install
installer.install(options.prefix, options.install_mime, options.install_desktop_file)
File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 282, in install
self.builder.build()
File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 125, in build
self.build_locale()
File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py", line 157, in build_locale
cat = gettext.GNUTranslations(open(mo_file, 'r'))
File "/usr/lib64/python2.7/gettext.py", line 180, in init
self._parse(fp)
File "/usr/lib64/python2.7/gettext.py", line 317, in _parse
self.plural = c2py(plural)
File "/usr/lib64/python2.7/gettext.py", line 93, in c2py
raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous

activity repos

We should go through the various activities in the modules.json file and update them to use the versions in the sugarlabs repo. (In the process, we can update the name of the turtleart repo since the gtk2 repo is actually gtk3.)

repeated use of sugar-build rapidly consumes disk space

sugar-build downloads files into /var/lib/broot

A common pattern for someone learning how to work with build environments is simply to start over, sometimes renaming or otherwise setting aside previous work and downloading or unpacking a "clean" version, as one learns which messages are important to pay attention to and documents them in service to resolving dependency errors or writing bug reports.

Starting over with sugar-build however by deleting everything found in a cloned sugar-build directory leaves behind files secreted away in /var/lib/broot. Each time this is done it consumes 1.8GB of disk space. Not only is this is inefficient with time, with network bandwidth, and with disk space (usually one understands that starting over is inefficient) but it violates expectations one reasonably has about starting over by deleting what one thinks of as "everything".

$ sudo du -sh /var/lib/broot/*
1.8G    /var/lib/broot/sugar-build-5G17P
4.0K    /var/lib/broot/sugar-build-5G17P.stamp
1.8G    /var/lib/broot/sugar-build-lPFqp
4.0K    /var/lib/broot/sugar-build-lPFqp.stamp
1.8G    /var/lib/broot/sugar-build-lrG3L
4.0K    /var/lib/broot/sugar-build-lrG3L.stamp
1.8G    /var/lib/broot/sugar-build-WG1kq
4.0K    /var/lib/broot/sugar-build-WG1kq.stamp

At the very least this can be resolved by documenting the behavior. Even better would be to expose some way of configuring where these files get put, setting the default to be a subdirectory of sugar-build itself.

run command showing too many errors and warnings in Ubuntu 16.04 LTS

himanshu@Asus-X556UF:~/sugar-build$ ./osbuild shell

$ sudo broot run osbuild shell

= Available commands =

karma
build
docs
run
check
dist
clean
pull

See also http://developer.sugarlabs.org/dev-environment.md.html
[osbuild sugar-build]$ build
[osbuild sugar-build]$ run
Type Shift-Alt-Q inside sugar to close.

Command failed: sugar-runner


Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension SELinux
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
Warning:          Key <OUTP> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KITG> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KIDN> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <KIUP> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <RO> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I192> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I193> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I194> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I195> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I196> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          Key <I255> not found in evdev+aliases(qwerty) keycodes
                  Symbols ignored
Warning:          No symbols defined for <AB11> (keycode 97)
Warning:          No symbols defined for <JPCM> (keycode 103)
Warning:          No symbols defined for <I120> (keycode 120)
Warning:          No symbols defined for <AE13> (keycode 132)
Warning:          No symbols defined for <I149> (keycode 149)
Warning:          No symbols defined for <I154> (keycode 154)
Warning:          No symbols defined for <I161> (keycode 161)
Warning:          No symbols defined for <I168> (keycode 168)
Warning:          No symbols defined for <I178> (keycode 178)
Warning:          No symbols defined for <I183> (keycode 183)
Warning:          No symbols defined for <I184> (keycode 184)
Warning:          No symbols defined for <FK19> (keycode 197)
Warning:          No symbols defined for <FK24> (keycode 202)
Warning:          No symbols defined for <I217> (keycode 217)
Warning:          No symbols defined for <I219> (keycode 219)
Warning:          No symbols defined for <I221> (keycode 221)
Warning:          No symbols defined for <I222> (keycode 222)
Warning:          No symbols defined for <I230> (keycode 230)
Warning:          No symbols defined for <I247> (keycode 247)
Warning:          No symbols defined for <I248> (keycode 248)
Warning:          No symbols defined for <I249> (keycode 249)
Warning:          No symbols defined for <I250> (keycode 250)
Warning:          No symbols defined for <I251> (keycode 251)
Warning:          No symbols defined for <I252> (keycode 252)
Warning:          No symbols defined for <I253> (keycode 253)
gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used
xinit: connection to X server lost

[osbuild sugar-build]$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.