GithubHelp home page GithubHelp logo

Comments (18)

brejoc avatar brejoc commented on September 19, 2024

It should be easy to generate a deb file with fpm, which could then be distributed with a reprepro repository.

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

I was just looking though the sources, to see if the paths could easily be changed. If you'd like to generate a deb-package for groundcontrol you can't (or shouldn't) just pack everything in the same folder. Static, shared files (like html, css or image files) shouldn't be in the same folder as the binary e.g.

In main.go line 100 I found this: http.Handle("/", http.FileServer(http.Dir("./web/")))

I'm not very familiar with go, but this looks rather static to me. There are two possibilities for a package maintainer. Either refactor this part and make it more dynamic (e.g. look for web at several locations) or just create a patch with a new static path to the location used with a deb-package-installation.

Oh, and merry christmas btw! :)

from groundcontrol.

jondot avatar jondot commented on September 19, 2024

Hey guys, I've been watching this issue lately, I'll try to take a dive with fpm to generate a package but it may take a bit of time since I'm working on a new open source project (that may relate to the Pi in a way).
Thanks for the pointers - I guess I'll bump into those issues when I try that.
Merry Christmas all :)

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@jondot you can take a look at my fpm makefiles for inspiration. Ping me if you need help!

from groundcontrol.

nedimlisica avatar nedimlisica commented on September 19, 2024

Hello,

I have been trying to make Arch Linux package (PKGBUILD).
For building I'm using go get since it both resolves dependencies and builds binary.
After building there are thre dirs in $GOPATH - bin, src and pkg. This resembles content of /usr/lib/go
which is set as $GOROOT by default on Arch. Running groundcontrol from $GOPATH/bin results in empty web page, so it should look for web folder in $GO{PATH,ROOT}/src/...

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@vulpesvelox could you please post a link to your pkg descr. file, so that I can take a look at it!?

from groundcontrol.

nedimlisica avatar nedimlisica commented on September 19, 2024

Sure, here it is.
http://pastebin.com/u4WGK3vT
And this is built package.
https://www.dropbox.com/sh/50itu75syigt05n/XppPuzVygh/groundcontrol-git-0.0.3-1-any.pkg.tar

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@vulpesvelox I'm not really familiar with Arch packaging (or go :), but to me it looks like you are not actually building groundcontrol (go build *.go) - although the groundcontrol binary appears to be in your package.

The source files from $GOPATH won't have to be in your package. These sources are only needed to build groundcontrol. You only need the groundcontrol binary, the web-folder, a groundcontrol.json in etc and the init-script. Since the path to web is hard coded to ./web/, you might want to put the groundcontrol binary and web into /opt/groundcontrol/ or something like that.

I hope that helps a bit!

from groundcontrol.

nedimlisica avatar nedimlisica commented on September 19, 2024

I took your advice and installed everything in /opt, but the problem is page works only if I run binary from dir where it's installed.
For example, "/opt/groundcontrol-git/groundcontrol" gives me 404, but
"cd /opt/groundcontrol-git ; groundcontrol" works.

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@vulpesvelox yeah, I guess you'll either have to deal with it in the init script or patch the sources. If I read the sources correctly, ground control assumes that the folder web is found in pwd.

This question from stackoverflow might help you if you decide to patch the sources. You might also open an other issue for this. Perhaps @jondot has better ideas. ;)

from groundcontrol.

nedimlisica avatar nedimlisica commented on September 19, 2024

Thank you. I'll try to come up with something.

from groundcontrol.

Jamesking56 avatar Jamesking56 commented on September 19, 2024

Any updates on this?

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

Take a look at #33. You are now able to generate you own packages with fpm. I can't provide you with a test package, because all of my raspberries are in use. But feel free to give me feedback!

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@Jamesking56 did you test it? Everything okay?

from groundcontrol.

Jamesking56 avatar Jamesking56 commented on September 19, 2024

No haven't had chance to test since my Raspberry Pi is in a different county than I am and it's not switched on lol

On 1 Apr 2015, at 2:33 pm, Jochen Breuer [email protected] wrote:

@Jamesking56 did you test it? Everything okay?


Reply to this email directly or view it on GitHub.

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@Jamesking56 Then I'd suggest to leave it open until everything is working reliably. :)

from groundcontrol.

spuder avatar spuder commented on September 19, 2024

It would be great if these deb files that are generated could be stored in a repository like https://packagecloud.io

from groundcontrol.

brejoc avatar brejoc commented on September 19, 2024

@spuder It is fairly easy to host your own repository with reprepro[1]. You can find some information about a deployment with it on my blog[2] under the headline: "Full Blown Deployment With reprepro".

[1] https://mirrorer.alioth.debian.org/
[2] http://brejoc.com/cup-recipe-for-django-python-deployment-part-3-deployment/

from groundcontrol.

Related Issues (20)

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.