openhab / openhab-distro

The binary distribution of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.3k stars 391 forks source link

Move debian package building to a separate repo #298

Closed kaikreuzer closed 7 years ago

kaikreuzer commented 8 years ago

The issues on this repo are a wild mix of problems of the distro itself and the debian packaging. We have separate repos for Docker, Synology and possibly soon Snappy, so I would claim that it makes sense to move the debian package build as well to a separate repository.

As a side effect, this would also heavily decrease the size of our build jobs as discussed with @theoweiss a while ago.

@theoweiss Would you be ok with this and take the lead on it?

theoweiss commented 7 years ago

It shouldn't be to hard to get this change into the deb packaging. The way to go is like @BClark09 just described. Furthermore we should add openhab2-o* as conflicting packages of the new openhab2 package and openhab2 as required package of the new "addons" package.

Now we'll have to wait for the new packages being available. I think at this time the cloudbees snapshots won't be available any longer because it makes no sense to adapt the deb package build of the openhab-distro project.

Maybe @ThomDietrich could nevertheless announce the new unstable repo to the community, to get some testers of the new packages and repo.

kaikreuzer commented 7 years ago

it makes no sense to adapt the deb package build of the openhab-distro project.

Right, I will actually remove the debian parts in my PR already.

Maybe @ThomDietrich could nevertheless announce the new unstable repo to the community, to get some testers of the new packages and repo.

Why don't you do it yourself here? https://community.openhab.org/c/openhab-2/news-important-changes

ThomDietrich commented 7 years ago

Hey guys, I've been traveling for the last couple of days and am getting back to speed right now. I very much like what I read here! ;) Nice to see that you are making progress and that you thought about https://github.com/openhab/openhab-linuxpkg/issues/2#issuecomment-267841567 👍 @theoweiss thanks for mentioning me. In general I would be happy to help but regarding this topic I feel that you or @BClark09 have all the needed info and hence should post this announcement ;)

BClark09 commented 7 years ago

Alas, the board is locked for administrator/moderator use only I believe.

ThomDietrich commented 7 years ago

@kaikreuzer: Nominating @BClark09 as moderator

shoeper commented 7 years ago

I've just tried the new repository and am also using a local apt mirror which is run using apt-mirror.

apt-mirror has a problem with MD5Sum in the Release file. Could you change it to MD5sum?

see also https://projects.puppetlabs.com/issues/12677

BClark09 commented 7 years ago

Thanks @ThomDietrich, funnily enough it's the day of my forum anniversary! :laughing: However, I think I do not suite that role just yet, @theoweiss has more of the technical know-how and the administrative ability.

Hi @shoeper, we can start taking issues on at openhab-linuxpkg/issues for debian package related issues. Would you be able to create one there? The Debian RepositoryFormat dictates that the release file contains the uppercase 'S'. But on reading the related issue you linked, this is more likely to do with MD5sum not being present in the packages file.

shoeper commented 7 years ago

But on reading the related issue you linked, this is more likely to do with MD5sum not being present in the packages file.

Ok, this is even more likely, because I get the "error" multiple times (think it was 4).

theoweiss commented 7 years ago

I'll prepare the announcement.

kaikreuzer commented 7 years ago

the board is locked for administrator/moderator use only I believe.

Everyone from the "maintainers" group in Discourse can post news there. You weren't yet in this group.

I think I do not suite that role just yet

Well, you are already listed as a maintainer on https://github.com/orgs/openhab/teams/linuxpkg-maintainers, so I added you in the Discourse group now as well. No way to escape it ;-)

theoweiss commented 7 years ago

The announcement is online! https://community.openhab.org/t/replacement-of-the-apt-snapshot-repository/ Tomorrow I'm away for skiing with the kids ;-)

BClark09 commented 7 years ago

No way to escape it ;-)

Haha, thanks Kai!

Enjoy your well earned skiing @theoweiss! :)

Shall we set this issue to close automatically when #369 is merged?

kaikreuzer commented 7 years ago

We can also close it manually then :-)

BClark09 commented 7 years ago

Hi @kaikreuzer, I noticed this distro build is getting stuck on the bintray upload, which prevents the deb packaging from running. When triggered manually, the deb build's own upload works without a problem, could this be due to the difference in syntax?:

response=$(curl -s -X PUT --data-binary @$PACKAGE_ARCHIVE -u ${BINTRAY_USER}:${BINTRAY_API_KEY} "$BINTRAY_URL/content/$BINTRAY_SUBJECT/$BINTRAY_REPO/$PACKAGE_PATH/addons.zip;bt_package=$BINTRAY_PACKAGE;bt_version=$PACKAGE_VERSION;publish=1;explode=1;override=1" -H "Content-Type: application/zip")

Is used now, rather than:

response=$(curl -s -X PUT -H "Content-Type: application/zip" -T $PACKAGE_ARCHIVE -u${BINTRAY_USER}:${BINTRAY_API_KEY} "$BINTRAY_URL/content/$BINTRAY_SUBJECT/$BINTRAY_REPO/$PACKAGE_PATH/addons.zip;bt_package=$BINTRAY_PACKAGE;bt_version=$PACKAGE_VERSION;publish=1;explode=1;override=1")

I also didn't understand the "addons.zip" part of the path to bintray, is it worth trying without that or using the $PACKAGE_ARCHIVE name?

kaikreuzer commented 7 years ago

Yes, I noticed it hanging as well and couldn't yet find a reason for it (especially as it worked before).

I do not really see the syntax change in your example... Feel free to create a PR and we will have a try if it makes a difference!

BClark09 commented 7 years ago
curl -s -X PUT --data-binary addons.zip -u ${BINTRAY_USER}:${BINTRAY_API_KEY} "https://api.bintray.com/content/$BINTRAY_SUBJECT/$BINTRAY_REPO/$PACKAGE_PATH/addons.zip;bt_package=$BINTRAY_PACKAGE;bt_version=$PACKAGE_VERSION;publish=1;explode=1;override=1" -H "Content-Type: application/zip"
{"message":"success"}

curl -s -X PUT -T addons.zip -u${BINTRAY_USER}:${BINTRAY_API_KEY} "https://api.bintray.com/content/$BINTRAY_SUBJECT/$BINTRAY_REPO/$PACKAGE_PATH/addons.zip;bt_package=$BINTRAY_PACKAGE;bt_version=$PACKAGE_VERSION;publish=1;explode=1;override=1"
{"message":"success"}

:(

BClark09 commented 7 years ago

Hi @kaikreuzer, all seems well and stable for the time being. Shall we close this issue?

kaikreuzer commented 7 years ago

Certainly - thanks!