debauchee / barrier

Open-source KVM software
Other
27.32k stars 1.5k forks source link

Debian Package #22

Closed kloetzl closed 5 years ago

kloetzl commented 6 years ago

Hi,

Tru asked me to look into packaging for Debian. I started with that, but here are a few issues that should be resolved beforehand:

I will extend the list as more issues pop up.

Best, Fabian

yupi2 commented 6 years ago

Regarding copyright, that was around they time they were preparing to remove the v1 GUI and use the Synergy2 GUI. https://github.com/symless/synergy-core/commit/513f50a9e0d2b4a3062ddb184b3dd7f2f130967e

walker0643 commented 6 years ago

hi @kloetzl - thanks for helping us out with the debian packaging.

Copyright: no, there are no closed-source components in barrier. that line can be changed at anytime. i haven't had the chance yet to research the language that debian would use in its place. is the correct option to simply remove the disclaimer line and leave the rest as-is?

Tests: we don't have package testing as we're just now getting to our first real packaged release. i'm a big fan of automated testing, though, so if you have any suggestions please share them.

Convenience Libraries: if you're referring to the source trees under the ext folder then please be aware that gmock and gtest are only used for the testing targets and will not contribute to the package contents. openssl, similarly, will not contribute because it is only utilized on windows platforms; all other platforms use the system ssl libraries. a standard build/package on linux/osx/bsd will not pull anything from ext.

Manpages: yes, those need to be updated. for sure :) https://github.com/debauchee/barrier/issues/23 ... eta around thurs-fri this week if no one beats me to it.

kloetzl commented 6 years ago
kloetzl commented 6 years ago
kloetzl commented 6 years ago
yupi2 commented 6 years ago

There's an exception: https://github.com/debauchee/barrier/blob/master/LICENSE#L6

kloetzl commented 6 years ago

Sorry, my bad. :smile_cat:

walker0643 commented 6 years ago

@kloetzl - as far as building from source trees without proper git metadata you may just set BARRIER_REVISION to "00000001" or really any 8-digit hexadecimal value. once we tag v2.0.0 and we're doing the official builds please also set BARRIER_VERSION_STAGE to "RELEASE". these can both be set in the environment with env, inside the build_env.sh include script, or however else you please. for reference my build_env.sh for releases looks something like this:

export MAKEFLAGS=-j10
export B_BUILD_TYPE=RELEASE
export BARRIER_VERSION_STAGE=RELEASE
#export BARRIER_REVISION=00000001  # this is only needed for non-github-tree builds
walker0643 commented 6 years ago

@kloetzl - manpages updated. let me know if you see any problems.

truatpasteurdotfr commented 6 years ago

thx @kloetzl :P

kloetzl commented 6 years ago
revast commented 6 years ago

hello, first of all, thanks for Barrier!

I have made a hand-packaged barrier debian package for ubuntu 16.04. I took synergy 1.8.8 package from getdeb as starting point.

My observations:

kloetzl commented 6 years ago

For future reference, the current status of my packaging attempt is here: https://github.com/kloetzl/barrier-debian

walker0643 commented 6 years ago

@kloetzl very good. thank you for the updates!

@revast barrierd was removed for all platforms except Windows. i think it's about time we did the same for syntool as well (#25). can you confirm that the syntool installed in your /usr/bin is not a synergy remnant? eg. does "/usr/bin/syntool --get-profile-dir" give you "/home/revast/.synergy" or something similar? thanks!

revast commented 6 years ago

Confirmed. It is also present in the build folder.

arooni commented 6 years ago

also would love this as i tried to build on ubuntu 16.04 and failed :(

truatpasteurdotfr commented 6 years ago

@arooni does this Dockerfile works for you? https://github.com/truatpasteurdotfr/barrier/blob/master/docker/ubuntu16.04-release-builder/Dockerfile

arooni commented 6 years ago

probably! but i'm running a little low on disk space

Need to get 128 MB of archives. After this operation, 650 MB of additional disk space will be used.

arooni commented 6 years ago

btw thanks!

walker0643 commented 6 years ago

@kloetzl - can you update us as to where you stand on the deb package? even if it doesn't make it into an official debian repository in the near future i would still like to have PR for the build script and a package for our website. thanks!

kloetzl commented 6 years ago

From a technical perspective the package should be more or less done. It is an attempt to be more compliant to the debian policy. (Note that the package build fails atm because of the missing section in d/control.)

In order to get the package into debian the next step is to file an Intent to Package bug and then find a section and sponsor. At this point I would like to hand back the charge to you. :smiley_cat:

walker0643 commented 6 years ago

Sounds good. Thanks for all your hard work, @kloetzl :)

dayne commented 6 years ago

I am not parsing what the status of this effort is at. Interested in better understanding the direction of packaging and build process for barrier.

Looks like @kloetzl created some additional debian packaging stuff over in: https://github.com/kloetzl/barrier-debian/tree/master/debian that doesn't yet exist in: https://github.com/debauchee/barrier/tree/master/debian

Also of interest to this topic is the docker work done by @truatpasteurdotfr over at: https://github.com/truatpasteurdotfr/barrier/blob/master/docker/ubuntu16.04-release-builder/Dockerfile

In fact it looks like @truatpasteurdotfr did a bunch of docker work that would be handy to bundle up into barrier - especially for package building efforts like for this debian issue.

I feel like the next step here is to ask @kloetzl to rebundle changes made for the debian packaging into a single Pull Request and same thing from @truatpasteurdotfr so they can be brought in and help finish up this thought.

kloetzl commented 6 years ago

I feel like the next step here is to ask @kloetzl to rebundle changes made for the debian packaging into a single Pull Request […].

You could do that, but note that this is by no means required for the packaging process. Also, it is somewhat discouraged to have a debian dir in your upstream source. First thing my package does is exclude the directory from the source. The debian dir is usually only added in the repository on the Debian servers.

I am not parsing what the status of this effort is at.

One might have to adapt my package for the latest releases and then

In order to get the package into debian the next step is to file an Intent to Package bug and then find a section and sponsor.

eadmaster commented 6 years ago

I am interested in this as well. BTW I've found an Ubuntu package here: https://launchpad.net/~unit193/+archive/ubuntu/test/+packages

cblknittights commented 6 years ago

https://launchpad.net/~unit193/+archive/ubuntu/test/+packages

I see this, and I am curious as to what the status is on the pacakge?

Packages for

16.04, 18.04,

14.04 and 12.04 would be a plus if this is possible. I have stuff which can not be changed past these for mission critical applications.... Thats real life....

I also see the words DFSG in the repo above, and to me that means a problem, as normally anything that is DFSG'zd has had features removed due to some policy in the DFSG. Look I get that some want a pure "non tainted environment," sorry I am just not in to that. I've been exclusive linux for 20 years, but I use what ever, I need. I use the OEM drivers from nVidia. I use VMWares free Player, etc.. I use darkice with MP3, and sox with MP3 etc... So is there stuff that is removed to meet the DFSG and that we need to have DFSG Debian packages ,and packages for DEB based like *Bunutus which RESTORE the missing functions? I appreciate the work to package this, and I see and appreciate your views in re DFSG, I ask that you understand that some of use just don't have those issues. So if it means that we need to have a PPA or someplace outside the official repos, fine with me. So long as I can grab a DEB putinto QtDebi etc. to install, were good to go! :)

kloetzl commented 6 years ago

I also see the words DFSG in the repo above, and to me that means a problem, as normally anything that is DFSG'zd has had features removed due to some policy in the DFSG.

That is not the issue here. Instead, barrier comes with some external source dependencies in ext and links to that. However, the DFSG encourage packages to link against the shared libraries against other packages. To follow these guidelines ext is excluded from the "orig tarball" (see debian/copyright). To signal that this tarball now differs from upstream a +dfsg is appended.

arooni commented 6 years ago

so are these packages legit to use for ubuntu 18.04? thx!

duck-rh commented 6 years ago

@arooni this PPA by Unit193 was made for his own usage and is not an official repository; I asked him and he does not plan to do regular maintenance on this PPA

@kloetzl and others, as an official DD, I would recommend asking the current synergy's maintainer if he would be interested in replacing his package by this fork. He seems missing in action but maybe that would arouse some interest or he would be ok to let go of maintainership. Several persons can comaintain together to ease the workload. Maybe Unit193 could be interested to join too. I personally have enough on my plate, but I could help for review and sponsoring.

aveach commented 6 years ago

Any update on getting a .deb up and running? Trying to install on a clean Ubuntu 16.04 installation and I am running into a handful of errors as it stands.

brisssou commented 6 years ago

I just installed barrier from https://launchpad.net/~unit193/+archive/ubuntu/test

running like a charm as I type this.

the-wes commented 6 years ago

@duck-rh I was able to reach the person who submitted Synergy to the Debian repos. That was all he wanted to do, get it in there. He is not interested in working on Synergy or Barrier any further.

@brisssou What OS are you on?

@everyone else the current status is that we need a successfully built package (DEB file). If someone can create one and host it somewhere we can move forward with an ITP request.

AdrianKoshka commented 6 years ago

If anyone wants a quick & dirty way to build the .deb, this should work.

FROM debian:stretch
## 
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install \
build-essential cmake qt5-default \
wget \
libxtst-dev libxinerama-dev libice-dev libxrandr-dev \
libavahi-compat-libdnssd-dev \
libcurl4-openssl-dev \
libssl-dev \
dh-make
#  
CMD wget https://github.com/debauchee/barrier/archive/v2.1.1.tar.gz  && tar xzvf  v2.1.1.tar.gz  && cd barrier-2.1.1 && dpkg-buildpackage -us -uc | tee debian.log 
AdrianKoshka commented 6 years ago

Or not...

tail: cannot open 'debian/changelog' for reading: No such file or directory
dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
brisssou commented 6 years ago

@the-wes The OS is Ubuntu 18.04

TafThorne commented 6 years ago

@AdrianKoshka Too quick and too dirty.

http://tldp.org/HOWTO/Debian-Binary-Package-Building-HOWTO/x169.html There are a few copies of files that need to be placed around in the container for the Debian packaging tool. Time to start the big ticklist:

Generate the following prerequisit files.

The format of the control, copyright and change logs is discussed from http://tldp.org/HOWTO/Debian-Binary-Package-Building-HOWTO/x88.html onwards. Someone should skim read the whole document.

Setup temporary 'debian' directories:

Copy files into temporary 'debian' tree:

And finally Build and check binary Debian package:

Once all that is done, it should be an acceptable Debian package.

If everything can be done in Docker containers, I can try and action most of this at lunch. Even better if I can setup a CI on here to do it for me in a branch.

kloetzl commented 6 years ago

Here is a deb package created in a fresh bionic beaver container (zipped, because github): barrier_2.0.0-RC2-1_amd64.zip. Hope this helps. — Didn't test. :sweat_smile:

Steps to reproduce:

apt install  libssl-dev debhelper cmake qt5-default libxtst-dev libxinerama-dev libice-dev libxrandr-dev libavahi-compat-libdnssd-dev libcurl4-openssl-dev libgtest-dev
gbp clone https://github.com/kloetzl/barrier-debian.git
cd barrier-debian
sed -i 's/libssl1.0-dev/libssl-dev/' debian/control
gbp buildpackage -uc -us --git-ignore-new
duck-rh commented 6 years ago

@TafThorne sorry but we do not make Debian packages this way (except maybe in the very early days of Debian). You have official, if not perfect, documentation. I would suggest you look at https://www.debian.org/doc/manuals/debmake-doc/index.en.html (more technical details in chapter 5).

Using debhelper (and the dh command) it should be pretty easy nowadays (like a 2-lines debian/rules, copyright file, and a few metadata). And debmake or dh-make should help setup some files for you, but that's not compulsory. Then pbuilder or sbuild can help build in a clean environment and check you did not forget any build dependency (but you can build directly to begin with using debuild, a wrapper for dpkg-buildpackage).

Also we use gbp (git-buildpackage) to import sources with metadata in git repositories, so it can be handy to have a look.

Here are the steps, have fun. \_o<

cblknittights commented 6 years ago

sorry but we do not make Debian packages this way

This is where I think you are loosing the BIG PICTURE HERE, and the ultimate goal here.

I appreciate the work that people who can create these packages, I can't. Thats a different discussion.

Let me outline this for you, 98% of the users here really could care less whether it meets this or that license, this or that copyright, or your other long list of rules, do's, don'ts, etc.. All of what your post outlines in "the rules" and "proper" ways to do this might be needed for "official DEBS." Users really don't care if they are "official" or not, they simply want to install the software and move on.

Compiling from the source from a git pull when you have full complete instructions can be done just as easy as apt. When you these don't exist, and/or for some its much easier to get a DEB, mostly via apt, install and done. APT is a beautiful system, it pretty much does the work, fetches what you need, installs it all, done.

We are complicating things beyond need for "official" DEB's. I get why, legal, etc. that Debian/Canoncial (Ubuntu) need/require. That requirement just doesn't exist at this level.

See my earlier post of about DFSG. The tl;dr of that, is USERS do NOT CARE about all this stuff!

What we want is EASE OF INSTALLATION. Period. Full hard stop.

Now, to incorporate this in to the "official" repo(s) of what ever distro be it Debian, or Ubunutu's probably all of that is needed. Thats great, and all that, but your legal mumbo jumbo is holding up ease of use.

Hold it, read this again, USERS DO NOT CARE!

So to that end I WILL PUT SKIN IN THE GAME.

Here is my offer, I WILL HOST a REPO for this for FREE!

All that is needed is:

1) Some one will need to assist on setting up a DEB based repo on my server. I've not done it before, but I am interested in to doing this for something else, so this is as good a time to start than ever.

a) If thats more undertaking that its worth, then I will take DEBS as per below, and offer them up for DL and then users can install via dpkg -i/QtDebi etc..

2) PROVIDE THE DEB's for use:

a) 32bit for use on bunutu's 12.04, 14.04, 16.04, 18.04 for the ESR releases b) 64bit for use on bunutu's 12.04, 14.04, 16.04, 18.04 for the ESR releases

No rules on how they are made, no need to meet DFSG, or any other do/don'ts, just that the DEB packages will install and work. If needed you can create versions needed for other DEB based distro's which might have differing dependencies for some reason.

3) I do NOT NEED any of that legal mumbo jumbo stuff. Just DEBS that will install in the above for users to get working installs of the software, via sudo apt-get install barrrier after adding the repo etc..

So maybe the DEB's crated via what ever method posted may not be usable in the "OFFICIAL" Debian or Ubuntu repos, for what ever reasons. And while I understand your views, position etc. ie: legal, again, users do not care! I don't care whether the DEBS have stuff that doesn't concern the operation or installation. I don't care of they include libs in the DEB that maybe is not the "official" way to provide those.

Again, read this line and take it to hear, users do not care about this minutiae.

I get it that to you and others that may be a big part of things to you and your view of Linux etc.. It is not to me, and again, users don't care! They just want to install stuff move on with life.

So lets step back and work the problem, not the problem work us.

DEBS for ease of installation.

I doubt to many it makes a difference if its sudo apt-get install barrier or sudo dpkg -i barrier1.0amd64.deb

Maybe it is more important to others to get things in the official repos versus private ones, to me no difference, whether it works via apt or I manaully DL a DEB and use dpkg or QtDebi etc..

I simply want a way to install the software that works 100%, upgradable to the new version as needed. Whether thats via apt or manually via dpkg/QtDebi etc. doesn't matter.

So if you want to help me setup a DEB repo, and/or can provide the DEB's I've listed let me know, and we can work to solve this problem, without complicating this with lists of rules, and do, and more dont(s) etc..

Solve the problem , not create more.

duck-rh commented 6 years ago

@cblknittights you do not represent all users, sorry.

Also aside from the (very small) legal part of the document there are information about the tooling. Debhelper has made a lot of progress and ease of packaging, not wasting your time with recreating the wheel and learning internal technical details of how a .deb is created, is probably something people who would work on this software would care about.

I was just trying to help, that was just a suggestion of documentation, you're still free to do whatever the fuck you want, so I do not understand your behavior. I certainly will not work with an unpleasant person such a you, and you're going to drive away people who could have brought help. Good luck then.

cblknittights commented 6 years ago

you do not represent all users, sorry.

I suggest you check. I've been in this for a while, users do not care about all the stuff you post about.

They find software x, and want to download it, install, move on. Maybe you care about this or that license ie: GPL 2 v. 3, etc.. Guess what users are going to install that software if it works and does what they want. License or not. They don't read that, nor care.

They don't care if including lib21414 in the DEB is not the proper way, versus doing something else. They want the software to install and work.

They don't care how the DEB gets built. That they can do some simple steps to add the repo, and apt -get install move on.

You may disagree with the above, but 20+ years of dealing with users, and I can tell you they, and I don't care about that stuff. Too many people with the knowledge on packaging are caught up in making things way more difficult, and hindering Linux adoption and software distribution than it needs to be.

One user posted a way to create a DEB, if that works, great. lets move on to getting DEB's distributed! Oh, it doesn't follow this edict of the DEB Policy Board, users don't care!

Maybe we should go back to software distribution on card stacks. As this just serves to impeded those who know from those who don't know all the packaging ins and outs.

Look at the posts, "here is a way to create a DEB..." There are several, and then there is the usual response "We don't create debs that way!"

Pretty clear, users just wants DEBS to install and get on with it!

My offer stands, I will provide hosting for DEBS via apt or DL for free. Provide the DEBS, skip the drama.

kloetzl commented 6 years ago

Just updated my packaging attempt to version 2.1.1. Here is the resulting package for bionic barrier_2.1.1-1ubuntu1_amd64.zip.

My offer stands, I will provide hosting for DEBS via apt or DL for free. Provide the DEBS, skip the drama.

/drama

AdrianKoshka commented 6 years ago

Thanks @kloetzl. Also, just to remind everyone, the issue was originally opened so that we could hopefully take steps to get barrier into the official Debian repos (and possibly ubuntu's later on).

@cblknittights I'd have to agree with @duck-rh that you simply don't represent users. You're just trying to cram what you want down everybody elses throat. Until you decided to chime in with your two cents, the issue was being handled in a respectful manner. Either treat others with respect, or leave.

duck-rh commented 5 years ago

Btw, this ticket was not updated but it was done in October by Unit193: https://tracker.debian.org/pkg/barrier

AdrianKoshka commented 5 years ago

So it's in the Debian repos?

nodiscc commented 5 years ago

@AdrianKoshka It's available in Debian unstable and testing (codename buster) https://packages.debian.org/unstable/barrier

AdrianKoshka commented 5 years ago

So would it be okay to close this issue, or wait until it's in stable?

p12tic commented 5 years ago

I think we can close it. The package will automatically appear in the next stable version unless something really bad is discovered.

kloetzl commented 5 years ago

Done; thanks everyone.

truatpasteurdotfr commented 5 years ago

congrats :P