-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] New packages: proton-bridge-1.2.7 and dependency #22559
Conversation
I corrected myself later, it seems like qtdeploy is indeed necessary for it, which is a damn shame. The Makefile calls it directly.
|
That leaves things in a bit of a bind. I've opened an issue in that repository to request a release, but I have no idea if it will be answered. |
I think the main reason there's no release of qtdeploy is because it's meant to be used for building go applications as a library/module thingy. Then you upload your super cool static binary somewhere for people to download. But seeing as how the Go QT bindings have been around for quite awhile and don't seem to show any signs of making a proper release as such, wouldn't this be one of the good reasons to package qtdeploy despite it not having a proper version as such? To be honest I find it weird that they don't at least tag stuff in that repository. Edit: there are distinct "releases" of the Docker images, although I'm guessing they're just tied to commits. |
@ProjectMoon To clarify, are you saying that this could be a situation where it would be appropriate to package the bindings or just qtdeploy in spite of the "must be tied to a release" rule? |
Yes. Or use qtdeploy locked to a specific tag in the build for this package. |
If we could use the same commit as the ones tagged in the docker images, that would be great. Then document this in the template. Or we can go wild and just use the version that it downloads, which I dislike. |
@ericonr I'll get to work packaging those go bindings, then. I'm not familiar with standard procedure in cases like this: Should I close this PR, open a new one for the bindings once I have it finished, and then open a PR for proton-bridge once the bindings have been accepted, or should I add the template for the bindings to this pull request? |
@cinerea0 since it's a tool to use in this build, I'd put it in this same PR. |
Just wanted to give an update, this is currently blocking on ProtonMail/proton-bridge#52 because proton-bridge fails to build either manually or with xbps-src. I have managed to package qt5-go successfully, though. |
I was able to build the bridge some time ago. But I had the go qt bindings installed via Go. |
Looks like missing pkg-config. |
I added pkg-config in "hostmakedepends", and I also added "libsecret" because that error came up afterwards. However, that resulted in the following error:
Does this mean I have to do some patching to rename "libsecret" to "libsecret-1"? Also, I've added the most recent version of the templates for review. |
libsecret-1.pc is part of libsecret-devel. pkg-config, git and other packages installed for executables should go into hostmakedepends. gcc, make are always available during build as part of base-chroot. Compiler output are warnings, not error. |
Thank you for the tip about libsecret-devel! That got rid of that error and all the compiler warnings, but I'm now encountering this new one: |
|
Upon updating the templates, I'm getting two new errors: |
Each template should have its own commit, but both should be in this PR |
I've gotten it to this point
Which means it's not respecting the flags in the environment. I tried to build it using the go build_helper but that seems to have its own issues |
@ericonr I think that would mainly affect qt5-go, but I'm willing to give it a shot. Two problems:
|
@cinerea0 I think that should fix qt5-go enough that it will work properly when building proton-bridge. Regarding those files, check the Running a binary inside xbps-src should be possible, just tends to make stuff nocross. There's a chance the qtsetup step is for building proton-bridge instead, but I'm not entirely sure. |
I've attempted to translate the qt5-go installation instructions into an xbps template as best I can, but there's a couple hangups. Focusing on this part of the template: post_install() {
$(go env GOPATH)/bin/qtsetup
} There are two possible errors depending on if that block exists or not. With it, the error looks like this: |
Alright, I think I've improved the qt5-go template as much as I can. It turns out invoking |
Yes, that is precisely the best option here, to patch the build scripts :) edit, gosh, this project is ugly, happy to help if you need some |
Looking through the Makefile, there's a couple things I need to get straight before attempting to patch. For one, I have no idea what these lines are doing: .PHONY: prepare-vendor update-vendor
THERECIPE_QTVER:=$(shell grep "github.com/therecipe/qt " go.mod | sed -r 's;.* v[0-9\.]+-[0-9]+-([a-f0-9]*).*;\1;') Next, is it possible for me to prevent this block from being executed simply by removing all references to it: prepare-vendor:
go install -v -tags=no_env github.com/therecipe/qt/cmd/...
go mod vendor Finally, these sections are the ones that deal with pulling in the environment libraries: # vendor folder will be deleted by gomod hence we cache the big repo
# therecipe/env in order to download it only once
vendor-cache/${THERECIPE_ENV}:
git clone https://${THERECIPE_ENV}.git vendor-cache/${THERECIPE_ENV}
LINKCMD:=ln -sf ${CURDIR}/vendor-cache/${THERECIPE_ENV} vendor/${THERECIPE_ENV}
# update-vendor is PHONY because we need to make sure that we always have updated vendor
update-vendor: vendor-cache/${THERECIPE_ENV} prepare-vendor
${LINKCMD} My plan is to allow these blocks to execute, but afterwards to replace the contents of the environment directory with libraries copied from wherever xbps-src puts them during the build process. Does that make sense? |
I've made my first attempt at creating the patch files. During the patching process, I'm encountering the following error:
I think I've constructed my patch file for init.sh improperly, but I'm not quite sure how. |
Updated the patch files with suggestions, now I'm getting a new error:
This looks like maybe the path is wrong? To explain what I did, I put the modified init.sh file in the wrksrc level directory, then executed |
Okay, I finally realized what was going on. It turns out I'm trying to patch a file that doesn't exist until after the build process starts. Is there any way to force a patch during the middle of the build process? |
Can you manually drive the build process to stop in the middle of that step? Otherwise you'll have to do something like patch the makefile to run your command the moment it needs to be run. |
Generally, the best idea would be to find out where the file is coming from in the build process, and patch the input. For example, you would patch |
Oooh, I see, it's from a pulled remote. I really hate this, Rust and Go both do it and it makes a pain. Here's how to approach this:
Then go will use your patch. |
There still seems to be problems with xbps-src finding the EDIT: Hold on, I think I haven't been using create_wrksrc properly. |
Good news: I figured out the patching. Turns out I just needed to make more judicious use of the wrksrc variable and how it changes. |
I'm deciding to close this (for now) for three reasons:
I'll still be keeping tabs on new releases, and if the build process improves I'll make another attempt at packaging. |
It should be noted that hydroxide isn't a 100% solution. It can be a bit flaky and doesn't support attachments (at time of writing). |
I'm trying to package proton-bridge, but I'm running into some issues with the build process. Here's the relevant output from xbps-src:
I know that xlint throws up errors on this template as well, I thought I should fix those after solving the build errors. Any other suggestions for improvement are welcome as well!
As for
qtdeploy
, the best I can figure is that it's a tool provided by this repository. Unfortunately, the repo has no releases, so the bindings and tools it provides can't be packaged. ericonr on IRC said that it might be possible to build withoutqtdeploy
, but I haven't understood the Makefile well enough yet to figure out how to do that.