UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    HowTo: contributing to app development with crossbuilder

    Scheduled Pinned Locked Moved App Development
    51 Posts 8 Posters 13.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • mymikeM Offline
        mymike @matteo
        last edited by

        @matteo no, its the container that doesn't have internet connection.

        As you also said here:

        I got always the same error: "Container is not connected to the Internet."

        containers I think doesn't connects directly to internet using your pc connection but create a bridge (if I understood it correctly), so the container connection pass through the bridge and then to your pc connection. but the bridge seems to be broken

        1 Reply Last reply Reply Quote 1
        • U Offline
          UniSuperBox
          last edited by UniSuperBox

          I think I figured out a solution to the Container is not connected to the Internet error on Ubuntu 16.04.

          It seems that LXD switched to setting up its default bridge lxdbr0 as link-local only (no Internet connection) around the beginning of April 2016: article explaining the change here. From what I can tell, this decision was reversed before the release of 18.04 because the issue does not occur there. I'll see if I can submit a patch to Crossbuilder to fix this.

          Edit: This is no longer needed!

          See this post below. A fix has been merged into Crossbuilder.

          Fix "Container is not connected to the Internet"

          To set up the bridge on your system, run sudo dpkg-reconfigure -p medium lxd. If you like you can carefully answer each question, but mashing enter to get through the setup works too. This will add an IPv4 and IPv6 subnet to your bridge.

          After setting up the bridge, your crossbuilder container still won't be set up correctly. Delete it by running crossbuilder delete.

          Once you complete these steps, you should be able to run crossbuilder successfully.

          1 Reply Last reply Reply Quote 0
          • M Offline
            matteo
            last edited by matteo

            I first would like to thank @mymike for his clever intuition regarding the missing bridge and then @UniSuperBox for the hotfix found: it works (without the need to crossbuilder delete)! I'm able now to download the repositories and the installation goes further and further.....until to throw an ultimate error complaining about broken packages. Here it is the new complete logfile:

            https://paste.ubuntu.com/p/NNGs9ChB63/

            mardyM 1 Reply Last reply Reply Quote 1
            • mardyM Offline
              mardy @matteo
              last edited by

              @matteo said in HowTo: contributing to app development with crossbuilder:

              I'm able now to download the repositories and the installation goes further and further.....until to throw an ultimate error complaining about broken packages. Here it is the new complete logfile:

              https://paste.ubuntu.com/p/NNGs9ChB63/

              You need to edit the debian/control file of the project, and add a <!nocheck> next to xvfb, similarly to how it's done here. That's because this package is only used for running the tests, and tests are not run when using crossbuilder. You can do the same for the python packages.

              After you manage to build the package with crossbuilder, it would be nice if you could create a pull request with your changes, so that the next contributor won't have to go through the same pain. 🙂

              M 1 Reply Last reply Reply Quote 2
              • M Offline
                matteo @mardy
                last edited by

                Thank you for your reply @mardy! I will try to follow your suggestions as soon as I'll have some additional spare time and report here the findings.
                After, consider the PR done, no problem 🙂

                Matteo

                1 Reply Last reply Reply Quote 0
                • P Offline
                  padraic
                  last edited by

                  @mardy I opened an issue for that on the address-book-app but wasn't sure if it should correctly be done in debian/control or debian/control.in

                  Debian/control includes this line:

                  #Modifications should be made to debian/control.in instead.

                  but it looks like that might be an artifact fro Canonical days. Is that the case?

                  1 Reply Last reply Reply Quote 0
                  • U Offline
                    UniSuperBox
                    last edited by

                    A change has been merged to Crossbuilder which fixes the issue with containers connecting to the internet on 16.04. Update your crossbuilder script (with git pull) and run crossbuilder setup-lxd to set up the container bridge.

                    mymikeM 1 Reply Last reply Reply Quote 2
                    • mymikeM Offline
                      mymike @UniSuperBox
                      last edited by

                      @unisuperbox Thank you very much, but following your steps I always get errors with crossbuildr setup-lxd

                      Creating file /home/mike/zfs/lxd.img to contain all of LXD's images and containers.
                      Error: Storage has already been configured
                      

                      I tried with sudo zpool destroy lxd to have a clean zfs setup, ans even with sudo rm ~/zfs/lxd.img but it doesn't work either...

                      I saw there's a crossbuilder new command that creates a new container without complaining of the zfs error. it gives a few other errors but it seems it can create the container succesfully. Anyway, I can't build due to missing deps (I suspect because I cannot setup-lxd, but idk...)

                      1 Reply Last reply Reply Quote 0
                      • joniusJ Offline
                        jonius
                        last edited by jonius

                        @mymike About the dependency problems see https://github.com/ubports/crossbuilder/issues/4. There are some hints that might help you with some of the dependencies and you might ask there for help with solving the rest of them.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          matteo
                          last edited by matteo

                          Small update.
                          After the PRs by @UniSuperBox and @jonius I was finally able to compile the keyboard package onto my phone. In order to accomplish the task I had to slightly modify the command I used before, i.e. crossbuilder with crossbuilder --password=myPro5password because a bunch of commands sent to the phone requires sudo. In this way I was able to get to the end of the crossbuilding process, I believe without errors. At first I changed just a small thing in the code to see the effect on the phone, but then I tried without changing a thing and after a reboot in both cases I got the keyboard not showing up anymore; so I couldn't access the phone because I couldn't insert the unblocking passcode. A fresh UT install did the trick. Any idea why the crossbuilding process seems not working as expected? I don't have the output log this time but, if needed, I can try again to compile and collect a new one.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post