odeke-em / drive

Google Drive client for the commandline
Apache License 2.0
6.68k stars 426 forks source link

Ubuntu snap created for drive #880

Open Dedsec1 opened 7 years ago

Dedsec1 commented 7 years ago

Hi odeke-em

i wanted to make it easier for people to install drive on different types of Linux distros, so i went ahead an setup an Ubuntu snap for drive, you can install drive by doing the following command. luckily snaps can be deployed on other distros as well such as Redhat, CentOS, Debian etc. currently i have my launchpad account pulling from my fork automatically using git and building an new snap each time i change something. so once you add my snapcraft.yaml file to the main repo for drive, i can change my launchpad settings to grab any changes automatically and push an new snap.

https://github.com/Dedsec1/drive/

https://github.com/Dedsec1/drive/blob/master/snapcraft.yaml

sudo snap install drive --classic

Regards

Dedsec1

odeke-em commented 7 years ago

Hello there @Dedsec1, thank you for the work and welcome to drive!

Great stuff! Am very happy to see folks make drive installable everywhere. We have a couple of folks who've also made packages in the platform_packages file https://github.com/odeke-em/drive#platform-packages

However including the file directly in this repo will add a maintenance cost for me, but I can put a reference to it in the platform_packages.md file as well as perhaps the README as I did with @jean-christophe-manciot work in https://github.com/odeke-em/drive/pull/872, and for other packages.

Thank you very much!

Dedsec1 commented 7 years ago

no problem, if you would like, you can add me as an collaborator on github so i can edit the file if needed when you push out an new version. then Ubuntus servers will handle the backend stuff on pulling and building each time. that way it would save you time going in and changing the version number each time.

odeke-em commented 7 years ago

@Dedsec1 I think that would be a bit unfair to the longer contributors whose projects live out of drive and whom I haven't given access despite years of work :) However, as I mentioned, I can include a link to it in the platform_packages.md file. Also I'd like not to include platform specific packages for tangential repos, in here as I explained in https://github.com/odeke-em/drive/pull/873#issuecomment-278146159.

I think a link to your project will be sufficient.

Dedsec1 commented 7 years ago

thats fine, i mean snaps are cross platform so it just isnt limted to Ubuntu distros, all i would need to do on my repo is just change the version on the .yaml file and launchpad does the rest :). anyways i do see where your coming from when it comes to maintaining an project.

idvoretskyi commented 7 years ago

@Dedsec1 I have zero experience with snap, but is there any ability to tag the "latest" version of the app to the YAML file (in version field)?

Like with the Dockerfile - if you define image:latest pulling the docker image, you will receive the freshest one.

Dedsec1 commented 7 years ago

chill the fuck out, if you dont like the work i put into then you can do it yourself how about that? so you can go fuck off for all i care since i dont give an flying shit what you say.

odeke-em commented 7 years ago

@idvoretskyi unfortunately the usage of "has zero" comes off as you putting @Dedsec1 down condescendingly. I hope you meant to say "I have zero" perhaps meaning yourself. @Dedsec1 sorry for that, I don't think he meant it in a bad way since he hadn't seen PR https://github.com/odeke-em/drive/pull/881. We do appreciate your contribution and it is going to increase the proliferation of drive across more platforms!

I think the question @idvoretskyi meant to ask was whether the yaml files are like Dockerfiles where you tag the latest version. @idvoretskyi I think so, if you look at the .yaml file in PR https://github.com/odeke-em/drive/pull/881, you'll notice that the version is 0.3.9.

@Dedsec1 my apologies for the late reply: the other package maintainers also update their drive versions on every release instead of their apps living in drive for example https://github.com/shaggytwodope/drivedebpackage by our local Linux sherman @shaggytwodope. In the future perhaps it would be nice to setup a version publishing service that can hit a webhook on every new version.

Dedsec1 commented 7 years ago

well their is an free deb packing service for open source projects, https://packager.io/ , all you would need to do is create an account and just add an new app from the website. of course you will need some config files which are quite easy to setup. if you would like i can merge what i have for config files so it saves you time setting it up. well in the end its just an free automated ppa service.

odeke-em commented 7 years ago

Awesome @Dedsec1, thanks for the suggestion. I'll take a look at it over the weekend, school is giving us a week long break so I'll take a look at a few options, but if you can create a standalone application that'll just need some callback or a single update that doesn't require having to register drive itself, that'd be ideal.

Dedsec1 commented 7 years ago

well i can test without the version tag and see if launchpad will still auto build the snap each time an github commit is pushed from your repo, it should hopefully, i will test tomorrow and let you know

*Update launchpad did not like that one bit and requires the version tag be their, for now i can just put it as current / up to date so launchpad will still look at the repo each hour or so.

Dedsec1 commented 7 years ago

ok so, i just edited the snapcraft.yaml version line to say version: current and it worked, so now the only thing you have to add do is add my snapcraft.yaml file to the root of the repo and were good, once that is done i will point Launchpad to grab the latest code from your repo automatically and it will auto build and push out an new snap once an change is made. going to make an PR right now

canpolat commented 7 years ago

Hi guys,

I'm late to the party. If I understand correctly, there is a problem with this setup. It looks like it will fetch the latest from the master and release it every time there is a new commit. I think this may cause instabilities for those using the "snap"s as opposed to those using versioned releases. So I suggest a setup @odeke-em has control over the releases and versioning.

idvoretskyi commented 7 years ago

@Dedsec1 my apologies, @odeke-em was right - I meant my experience with snap (it was late night when I've asked the question).

idvoretskyi commented 7 years ago

@Dedsec1 also I've noticed that you have added the current version to the snap yaml file - that was exactly what I've asked.

Dedsec1 commented 7 years ago

gotcha, i have been using Linux for more then an few years now so i know what iam doing :)

idvoretskyi commented 7 years ago

@Dedsec1 you did a great job, sorry again for the confusion ;)

SmartLayer commented 4 years ago

I frown upon seeing a commandline utility in snap everytime. They have very strong restrictions that doesn't allow writing on USB devices, which is the primary reason I use drive (to sync up with files on USB drives).

Also given this is already done shouldn't we close this issue?