Commit Graph

7457 Commits

Author SHA1 Message Date
guangwu bb15e6eb48 fix: close file 2024-04-22 20:20:45 -07:00
Brad Fitzpatrick 4ba112378f all: address a bunch more staticcheck warnings
And temporarily disable a few classes of errors in staticcheck.conf
for now, to be addressed later together.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-15 14:06:16 -08:00
Brad Fitzpatrick 6472da9a44 pkg/server: fix staticcheck warnings
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-15 14:06:16 -08:00
Brad Fitzpatrick 70f15cb755 pkg/client: fix staticcheck warnings
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-15 14:06:16 -08:00
Brad Fitzpatrick 1e3963e6b8 pkg/blobserver/blobpacked: don't set zip entry DOS modtime on zero time.Time modtime
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-15 12:00:27 -08:00
Brad Fitzpatrick 6a119e44a6 pkg/server{,init}: delete more remnants of long-deleted setup wizard (take 2)
This is a redo of the previously-reverted b663eacb06 but with
tests fixed this time. (I accidentally ran them earlier with
--exec=true from an earlier refactor.)

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 20:04:04 -08:00
Brad Fitzpatrick 6746b8cd2b Revert "pkg/server: delete more remnants of long-deleted setup wizard"
This reverts commit b663eacb06.

Reason: broke tests I didn't notice (facepalm). Will redo this
completely while fixing tests later.
2024-01-14 17:05:59 -08:00
Brad Fitzpatrick 7e486bd9a7 all: address misc staticcheck warnings
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 17:02:10 -08:00
Brad Fitzpatrick 46a308572a pkg/importer/plaid: address staticcheck issue
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 16:55:18 -08:00
Brad Fitzpatrick eba389eade pkg/search: address staticcheck issues
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 16:53:36 -08:00
Brad Fitzpatrick b663eacb06 pkg/server: delete more remnants of long-deleted setup wizard
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 16:40:37 -08:00
Brad Fitzpatrick 2e5266741a pkg/sorted: rename a receiver to appease staticcheck
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 16:38:40 -08:00
Julien Bisconti 9d0c73955a .workflows: update github actions 2024-01-14 16:34:52 -08:00
Brad Fitzpatrick 8bb27e4b34 cmd/...: fix staticcheck warnings
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 13:24:05 -08:00
Brad Fitzpatrick 45f873a1c8 app/...: fix staticcheck warnings
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 12:53:42 -08:00
Brad Fitzpatrick 526640422e all: use (*testing.T).Cleanup, simplify test helper signatures
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-14 11:49:39 -08:00
Julien Bisconti acd5a5dab3 test: replace usage of GoPackagePath with PkSourceRoot 2024-01-14 09:45:59 -08:00
Julien Bisconti b8c2620f1f test: allows to run integration tests while using go modules 2024-01-14 09:45:59 -08:00
Brad Fitzpatrick fc64ec92e5 .github/workflows: run tests on the right branch
I copy/paste-d from another repo earlier and didn't realize
this repo uses 'master' as its main branch.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-13 17:12:42 -08:00
Oleksandr Redko a911bc8060 all: fix or disable staticcheck deprecations
(Originally from https://github.com/perkeep/perkeep/pull/1648)
2024-01-13 16:50:09 -08:00
Brad Fitzpatrick bc9fbcd89e chip away at some staticcheck warnings
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-13 15:57:55 -08:00
Brad Fitzpatrick 39348e64f1 doc: add forgotten Tailscale listen docs from earlier
Updates #1668
2024-01-12 10:48:30 -08:00
Brad Fitzpatrick c2334642fb internal/netutil, pkg/schema: remove nocgo tag; os/user has its own nowadays
The os/user package nowadays says:

    When cgo is available, and the required routines are implemented
    in libc for a particular platform, cgo-based (libc-backed) code
    is used. This can be overridden by using osusergo build tag,
    which enforces the pure Go implementation.

So we don't need to work around it anymore.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-11 19:47:49 -08:00
Brad Fitzpatrick 31f3941a00 README.md: remove a Google link
This hasn't been a Google project for some time now.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-11 13:55:45 -08:00
Brad Fitzpatrick cf744db5bf website: move to Fly
Sadly I did this all once (and more completely) but then lost the
commit. So this is a re-do. The sharing demo stuff isn't yet complete.

Updates #1658 etc
2024-01-03 21:02:01 -08:00
Brad Fitzpatrick e1a04f92ed website/pk-web: remove GCE+mailgun support
I moved the website to run on Fly.io some 6 months ago but lost the
git commit that did so. So now I'm redoing it from memory (sigh).

But we don't need any of this GCE or Mailgun stuff now. People can
subscribe to git commits via other means.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-03 19:35:38 -08:00
Brad Fitzpatrick 0caf36bc9c Remove CamliNetIP, camnetdns, gpgchallenge
These were all part of an earlier effort to let it be easy for people
to easily deploy their own Perkeep servers and get them on the
internet. The idea was that we'd run a small DNS server which would
map from GPG public keys to their rented cloud IPs which users would
prove to us with the gpgchallenge stuff.

The recently added Tailscale support (see 43f34e5cc5, #1668) makes
most of this redundant.

Also I'd stopped running this infrastructure ages ago and removed the
launcher code recently in b5823a65b9 (and disabled it in
c9f78d02ad). So this was all basically dead code.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-02 13:33:57 -08:00
Brad Fitzpatrick 43f34e5cc5 auth, webserver, serverinit: add Tailscale tsnet support
Updates #1668

Co-authored-by: Will Norris <will@willnorris.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-02 12:58:44 -08:00
Brad Fitzpatrick d030e15d5a app/publisher, make.go: remove publisher/GopherJS support
The publisher app required GopherJS which has been behind upstream Go
for many years. This just removes all GopherJS stuff, breaking the publisher
app in the process. We'll have to rewrite it.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 13:17:08 -08:00
Brad Fitzpatrick 2b8414f6ce make.go: remove some unused code, address TODOs, bump required Go
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 12:36:32 -08:00
Brad Fitzpatrick 98dff16008 clients/web/embed/closure: use modern go:embed instead of old bespoke make.go hack
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 12:15:42 -08:00
Brad Fitzpatrick bec657b7e2 Remove legacy +build comments; use go:build only
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 09:18:39 -08:00
Brad Fitzpatrick a549aab217 Remove legacy Google AppEngine alternate implementations
AppEngine lets you do just about anything these days. No need to cater
to the ancient limited version.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 08:50:03 -08:00
Brad Fitzpatrick 20622c8a06 make.go: don't build pk-mount on darwin, set osusergo, use modern comma-separated tags
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 20:01:55 -08:00
Brad Fitzpatrick 09cf7e948b go.mod: remove old replaces, update deps, use Go 1.21
This also makes Windows pass tests again (fixed in Go 1.20:
https://github.com/golang/go/issues/51007)

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 16:06:52 -08:00
Brad Fitzpatrick afb071614f cmd/pk-mount, pkg/fs: drop macOS FUSE support, update bazil.org/fuse
Our bazil.org/fuse FUSE library no longer supports macOS
(https://github.com/bazil/fuse/issues/224) because osxfuse is no
longer open source (https://github.com/osxfuse/osxfuse/issues/590).

Also, Apple is making it harder and harder (eventually impossible?) to
install custom kernel modules:
https://github.com/macfuse/macfuse/wiki/Getting-Started

So just give up on macOS FUSE support for now. We can resurrect it
later via WebDAV and/or NFS server support.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 15:40:51 -08:00
Brad Fitzpatrick b5823a65b9 pkg/deploy/gce: remove GCE deploy support
We used to have a web-based Perkeep launcher at perkeep.org/launch
that created a GCE-based Perkeep instance for users, where they pay
Google for compute time. (One of those "one click deploy" template things)

Unfortunately, Google broke their APIs for doing the third party VM
creations and we disabled it some years ago. But the code remains. And
now, updating it again, we find that they've broken it again:

   Error: pkg/deploy/gce/deploy.go:358:4: servicemanagement.NewServicesService(s).Enable undefined (type *servicemanagement.ServicesService has no field or method Enable)

It's not worth fighting Google's API breakages. Just remove the GCE
launcher support as it's been unused for years.

We can always resurrect this code from git if really needed. But a
Digital Ocean or Fly launcher would probably be much easier.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 12:47:01 -08:00
Grant 199456cf97 Update map.js to use correct tile.osm.org URL
See: https://github.com/openstreetmap/operations/issues/737
2023-09-02 12:14:08 -07:00
Alexandre Viau 498fcaa7c3
Merge pull request #1655 from alexandear/t-setenv
tests: use T.Setenv instead of os.Setenv
2023-02-20 08:16:05 -05:00
Oleksandr Redko 63c68c6c5b tests: use T.Setenv instead of os.Setenv 2023-02-18 12:53:16 +02:00
Oleksandr Redko 44b1dbe0f6 all: refactor to net/http statuses instead of ints 2023-01-24 08:39:29 -08:00
Oleksandr Redko 001c417e73
all: replace deprecated io/ioutil with io and os (#1647) 2023-01-23 10:25:14 -08:00
Michael Hoffmann f06efdb51f misc: remove sha1 from tests, remove testhooks, minor cleanups 2023-01-13 07:58:19 -08:00
Brad Fitzpatrick 6614d23428 schema: simplify parseSuperset
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-01-13 07:48:53 -08:00
Michael Hoffmann ad7454c304 misc: add race flag to devcam and fix fallout 2023-01-13 07:48:33 -08:00
Michael Hoffmann d1e67a4ba3 ui: remove obsolete code 2023-01-13 07:47:09 -08:00
Michael Hoffmann 6ab96b90c6
Merge pull request #1640 from ginabythebay/add_query_example
demonstrate query using curl
2023-01-09 19:14:37 +01:00
Gina White 0c2a1b8c65 introduce SEARCHHOST variable 2023-01-02 15:43:48 -08:00
Brad Fitzpatrick 86b513ccf9 go.mod: bump honnef.co/go/tools/cmd/staticcheck
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2022-12-31 22:45:40 -08:00
Brad Fitzpatrick 921894783b all: gofmt for Go 1.19
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2022-12-31 22:45:40 -08:00