-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
allmark: fix build #352579
allmark: fix build #352579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old repo has not been deleted, and the new repo has only one commit and no star. The author of the old repo did not recommend people to switch to the new repo.
If your intention is fixing build, you can port essential fixes here.
@Aleksanaa Done. |
@Aleksanaa Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the actual build errors:
common/config/config.go:22:2: cannot find module providing package github.com/abbot/go-http-auth: import lookup disabled by -mod=vendor
common/config/config.go:23:2: cannot find module providing package github.com/mitchellh/go-homedir: import lookup disabled by -mod=vendor
dataaccess/filesystem/watcher.go:11:2: cannot find module providing package github.com/andreaskoch/go-fswatch: import lookup disabled by -mod=vendor
services/imageconversion/resizer.go:9:2: cannot find module providing package github.com/nfnt/resize: import lookup disabled by -mod=vendor
services/converter/markdowntohtml/postprocessor/emoji.go:8:2: cannot find module providing package github.com/kyokomi/emoji: import lookup disabled by -mod=vendor
services/converter/markdowntohtml/markdowntohtml.go:14:2: cannot find module providing package github.com/russross/blackfriday: import lookup disabled by -mod=vendor
web/orchestrator/search/fulltextindex.go:11:2: cannot find module providing package github.com/andreaskoch/fulltext: import lookup disabled by -mod=vendor
web/orchestrator/search/fulltextindex.go:12:2: cannot find module providing package github.com/spf13/afero: import lookup disabled by -mod=vendor
web/handlers/update/connection.go:10:2: cannot find module providing package golang.org/x/net/websocket: import lookup disabled by -mod=vendor
web/handlers/compression.go:4:2: cannot find module providing package github.com/gorilla/handlers: import lookup disabled by -mod=vendor
web/server/server.go:23:2: cannot find module providing package github.com/gorilla/mux: import lookup disabled by -mod=vendor
web/server/server.go:24:2: cannot find module providing package github.com/skratchdot/open-golang/open: import lookup disabled by -mod=vendor
It would help the review if you provide more than just "fix build" ;)
As suggested in #353186 switching to go 1.22 with buildGo122Module
would be a simpler fix in the short term.
I saw @urandom2 created andreaskoch/allmark#37 and his PR commits could be used instead of postPatch
and your own 0001-Add-go.mod-go.sum-remove-vendor.patch
(how did you create it?).
I tested using the PR 37 commits locally and it works too. Patch:
diff --git a/pkgs/by-name/al/allmark/package.nix b/pkgs/by-name/al/allmark/package.nix
index 1fcdfce5f6bd..72b9a54276df 100644
--- a/pkgs/by-name/al/allmark/package.nix
+++ b/pkgs/by-name/al/allmark/package.nix
@@ -2,6 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
+ fetchpatch,
}:
buildGoModule rec {
@@ -15,11 +16,22 @@ buildGoModule rec {
hash = "sha256-JfNn/e+cSq1pkeXs7A2dMsyhwOnh7x2bwm6dv6NOjLU=";
};
- postPatch = ''
- go mod init github.com/andreaskoch/allmark
- '';
+ patches = [
+ # add go module
+ (fetchpatch {
+ url = "https://github.com/andreaskoch/allmark/pull/37/commits/168fa0a194a9cdc15ba22cae154402bf8939168c.patch";
+ hash = "sha256-PyJgkRFNg91RnLEezmaS9u+4D8AD1g2g3OJs+AhKms0=";
+ })
+ # replace vendor directory with go.mod and go.sum
+ (fetchpatch {
+ url = "https://github.com/andreaskoch/allmark/pull/37/commits/5e26a550abaed18d00b88677d6def15c5d84ce05.patch";
+ includes = [ "go.mod" "go.sum" ];
+ hash = "sha256-E2fTWkJzgDAtlqVJooIkX06lc+pw8GiGmCq+5Vd64UA=";
+ })
+ ];
- vendorHash = null;
+ deleteVendor = true;
+ vendorHash = "sha256-32MDPl+8lfUqyhG0rjZhpGMJzgIvb2E0xOTQ6wDKJto=";
postInstall = ''
mv $out/bin/{cli,allmark}
But not sure what's best 🤷♂️
@zi3m5f Done. I'd love to just keep it like this. We need to replace go-cdb to cdb as well. I create patch by partly backporting from https://github.com/hmmftg/allmark. Anyway, patch from https://github.com/andreaskoch/allmark/pull/37/files should be too big. It remove vendor in this patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, patch from https://github.com/andreaskoch/allmark/pull/37/files should be too big. It remove vendor in this patch.
includes = [ ... ];
results in only part of the patch being put in the nix store.
Generally, I ask myself why would someone use such outdated software, is there no up to date and maintained fork, and what about security/ CVEs?
Regardless, not my decision ;)
@zi3m5f Maybe apply patch from PR is the best solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe apply patch from PR is the best solution.
Ideally @urandom2 would have some insight on this.
Otherwise @luftmensch-luftmensch as maintainer and @Aleksanaa can probably better decide 🤷♂️
nixpkgs-review
result
Generated using nixpkgs-review
.
Command: nixpkgs-review pr 352579
x86_64-linux
✅ 1 package built:
- allmark
Why do you request a review from me again? I already wrote after your last request:
Please stop doing that without at least answering/reacting to my comment, thanks. |
I think the best solution is apply patch from PR and I do it. |
Maybe you should use |
@GaetanLepage Are there any diffrences between them? |
I asked on matrix and apparently, using |
|
@GaetanLepage Oh darwin again. Could you tell me why darwin fails because it succeed in ofborg. |
Network issues apparently:
Consider adding |
@GaetanLepage Could you test again? |
@ofborg build allmark |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks !
3a6c85c
to
6418107
Compare
We'd better keep patch in nixpkgs like what I did before, so now I fallback to the old. |
@ofborg build allmark |
Fix build
We can partly backport it actually.
I wonder what it the best solution.
ZHF: #352882
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.