Commit Graph

278 Commits

Author SHA1 Message Date
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
Julien Bisconti acd5a5dab3 test: replace usage of GoPackagePath with PkSourceRoot 2024-01-14 09:45:59 -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 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 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
Oleksandr Redko 001c417e73
all: replace deprecated io/ioutil with io and os (#1647) 2023-01-23 10:25:14 -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
luz paz d605f86c82 Fix various typos
Found via `codespell -q 3 -S ./clients/web/embed,./clients/chrome -L ba,everytime,impres,keypair,msdos,pres,ro,te,ue`
2022-05-02 14:31:09 -07:00
aviau 8113d2b55e go/Dockerfile: update shasum 2021-07-29 17:37:07 -04:00
aviau 8204dc0dd3 misc: go 1.15 -> 1.16 (closes #1398) 2021-07-29 17:33:10 -04:00
mpl cb96bb8bd3
all: update to Go 1.15 2020-11-02 14:44:01 +01:00
mpl 53b60fb65a
misc: update release tools
Various fixes to bring them up to date, and to make them work on MacOS.
2020-09-16 14:54:40 +02:00
mpl 67333e3a9c
make.go: add -offline flag (#1290)
Also update to Go1.13.5

Fixes #1286
2019-12-20 11:47:20 +01:00
mpl d342b0e266
make.go: upgrade to go 1.13 (#1278)
Also modify sftp's TempFile file opening flags (in particular drop
O_APPEND) so they're not incompatible with WriteAt.

Fixes #1280
2019-09-26 20:45:43 +02:00
Brad Fitzpatrick 41f5d4a190 Stop using Gerrit (googlesource.com), switch to just GitHub & PRs
Discussed at https://groups.google.com/d/msg/perkeep/terI3u9hfqg/-TWI0dOyCQAJ
2019-06-05 09:50:11 -07:00
mpl 69a68e7e91 misc/docker/go: update to Go 1.11
Change-Id: Ia4c4826a572e3317460d6a71af19e9885fe72926
2018-09-26 02:52:53 +02:00
mpl 4866c7c62e misc/docker/synology: tag images and build stages
Tagging images depending on the selected arch allows us to preserve
docker caching even when switching arches.

Also, since the first build stage was not tagged, it was considered as
dangling, so it was getting removed by 'docker rmi'. So we now tag it as
well to keep it cached.

Change-Id: I0c36c625e7bd459192f97052d26d76084a03bea7
2018-08-06 19:52:33 +02:00
Euan Kemp 90042fe296 pkg/blobserver/s3: use official aws client
vendor: add github.com/aws/aws-sdk-go at rev bc3f534c19ffdf835e524e11f0f825b3eaf541c3

This changes all uses of the s3 client to be the official aws-sdk-go. As
such, it also deletes the previous client maintained in internal.

There are a few notable changes that come with this:

1. An 'aws_region' key is added to the low-level config. The
   'get-bucket-location' call is used to identify the correct region
   rather than using the redirect returned to determine it.
2. Deleting multiple objects at once is much faster (batches of up to
   1000 vs 1 at a time).
3. Retriable errors are retried automatically (see #1184).
4. Newer APIs are used for some operations (v2 / batch apis).

An unfortunate result of 4 is that this is technically a backwards
incompatible change. An IAM policy which used to be sufficient for
perkeep may no longer permit some of the new api calls (even if they're
not doing anything different really).

Fixes #1184, #911

Change-Id: I077fe88def18b7e9a14267820773245e7003634c
2018-07-31 15:51:31 -07:00
mpl 61d5e4e05d misc/docker/synology: package Perkeep for Synology
Fixes #986

Change-Id: I63b506944e3d71a3e864d9f4b37a1e0b1abd8b9c
2018-07-25 20:36:46 +02:00
mpl 18a9f6fc93 misc/release: enable upload of existing archives
Change-Id: Ic1bbb50448734cb68a8eed72ea9a90de4e9fbc76
2018-05-15 01:54:53 +02:00
mpl e27e2302a4 misc/release: update release tools
misc/docker/release moved to misc/release because it did not really have
anything to do with making docker images, it just happens to use them.

misc/monthly.go has been moved to misc/release/make-release.go, and
reworked to be more generic.

misc/docker/dock.go has been trimmed down to only deal with creating
docker images

Fixes #1153

Change-Id: I4cb566551007300aefa6cb23714b90461f0e3e51
2018-05-11 02:51:55 +02:00
mpl 6a04db2f5d misc/docker: make release tools work with latest version mechanism
Change-Id: Id2081c2f0047621fa929baeba684de219eb869ff
2018-05-02 19:04:40 -07:00
mpl c39f4cabd4 misc/docker/go: bump to 1.10.2 for release
Change-Id: I98b2f85533615d3cfdc1f657d9f675f352febbd4
2018-05-01 21:57:37 -07:00
mpl 507684d5ee misc/docker: fix release tools
Change-Id: Ie7e75d88a4fbc7df753aedbfb00d77d1899962e1
2018-05-01 16:03:27 -07:00
mpl 4d16a0e5c3 server/perkeepd: self-fix instance user-data
Since we renamed Camlistore to Perkeep, we also renamed the docker image
deployed by the launcher, as well as the systemd service that this
docker image runs in.
This means existing users on GCE do not get updates when they restart
the service or reset their instance.

This change adds a check and a function that allows perkeepd to fix the
user-data metadata of its own GCE instance, which is where the names
mentioned above are defined.

Therefore, if we deploy a new camlistore docker image containing that
code, the existing users should get a server capable of self-fixing its
own instance into a perkeep one.

Change-Id: I9ff66f684f0ad647d15e5fcdd08d26c524a18329
2018-04-30 15:58:26 -07:00
Brad Fitzpatrick c698ff5add misc/docker/heiftojpeg: switch to ImageMagick
Still slow, but no more ffmpeg child processes, and I'm confident
ImageMagick will improve over time. There are actually ImageMagick
commits in the past few hours that look promising. We have a demo
tomorrow, so we're not going to bump our git rev & Docker image to the
latest ImageMagick master yet.

Updates #969

Change-Id: I7a8545821cae4214ea521d7cb46aa235ae3f0ed3
2018-04-27 16:26:14 -07:00
mpl 4ed26b3d04 misc/docker: fix expected output binaries location
Change-Id: I3f7f30580a513602e0091269163af9618926623a
2018-04-23 13:59:06 -07:00
mpl 3dc471f790 misc/docker: bump go image to 1.10.1
Change-Id: I993ff0606e0cbd6a6e816df35e5ca4eda3896cfc
2018-04-23 13:47:56 -07:00
mpl 7a27eb42eb cmd: rename camget to pk-get, and make it a mode of pk
A couple of related fixes and renames too.

Updates #981
Fixes #1056

Change-Id: Id47a933c77422edfb9db41d34c38ed9d0d7a1846
2018-04-22 20:50:54 -07:00
mpl 2bb666ccf6 all: rename remaining occurrences of camput
Also removed misc/buildbot while at it (which contained camput
references) since we don't use it anymore at all.

TODO: the OSX app seems to be relying on finding a binary in ../bin,
which we do not use anymore. This will probably need fixing.

Updates #981

Change-Id: I14220fbad2e81181330fca4bb2d2e5fe170e1bd6
2018-04-21 16:20:24 -07:00
Brad Fitzpatrick ca76a40bbc Rename camlistored to perkeepd.
Updates #981

Change-Id: I8fe43c240c149074c23128a89ab426af9cbf94b4
2018-04-21 11:06:09 -07:00
mpl ce4658abfc cmd: rename camput to pk-put, and make "pk put" call it
A new "put" mode is added to the pk command, so that the "pk put"
command can be used to create and upload blobs.

What this command does is actually just call the previously named
"camput" executable, which is renamed to "pk-put" in this change.

This involves adding a new way to register a mode in cmdmain, when such
a mode is just meant to call an external binary. To emphasize the
distinction, the existing func (to register a sub-command, or a mode) is
renamed from RegisterCommand to RegisterMode, and RegisterCommand is now
the name of the new func/way.

Updates #981
Updates #1056

Change-Id: Ief954c17aa88a376f551df7de4b4e9fe41ad96d1
2018-04-21 10:26:55 -07:00
Brad Fitzpatrick 6af54cc882 misc/docker/heiftojpeg: rearrange Dockerfile, add README
Change-Id: Ic5bdbeca75ede15cfdbd569c533f66c24810cdae
2018-04-20 14:06:15 -07:00
Brad Fitzpatrick a19c831ed6 misc/docker/heiftojpeg: switch to our fork with rotation support
Fixes #1094
Updates #969

Change-Id: I75f6b7433bbc2dac1ccc800696969e18164a514d
2018-04-20 13:55:34 -07:00
Brad Fitzpatrick dd3516c6ee Remove some ancient Perl scripts.
Change-Id: If98021d39eb8560913bc1ba35f4cb7f29f25974c
2018-04-17 15:11:07 -07:00
mpl d9237d42b5 misc/docker: add heiftojpeg Dockerfile
multi-stage Alpine image.
static building is a pain, so we instead copy all the shared libs from
the builder stage to the final stage.

Udates #969
Fixes #1087

Change-Id: I05377fdafd6db13d04d4970ec2d52b68a53fa22b
2018-04-16 22:42:03 +02:00
mpl 6dcbe2ee9c cmd/camtool: rename from camtool to pk
Updates #981
Updates #1056

Change-Id: Ib78c47a69fa9816d5ac6cc547586a2af321005e3
2018-03-06 16:20:59 +01:00
Paul Lindner 459c75410e all: more renaming of Camlistore to Perkeep
Change-Id: I118e3cbcf20d80afeffc84f001388c4556f21628
2018-01-30 03:02:56 -08:00
Paul Lindner 6d2d9714de all: simpify constructs by running gofmt -s on all code
Change-Id: Idc12ddcfe8f735d77c6baa942f5bb7a2c7d9b40b
2018-01-21 10:27:12 -08:00
Brad Fitzpatrick 617ac40512 all: rename cammount to pk-mount
Updates #981

Change-Id: Ie1d2e3c0fd7e2b7a7801ceac0fd8f93f62d56651
2018-01-08 09:54:41 -08:00
Brad Fitzpatrick 9265c980de all: change github.com/camlistore/camlistore to github.com/perkeep/perkeep
Change-Id: I0d612bf450e9e8d9ce0767c5a0cb0c44c0d8704f
2018-01-05 19:49:59 -08:00
mpl 4ca45d928b misc/docker/dock.go: update to build from perkeep.org
Change-Id: Ie2a995c603a7714979d9967964e6b4c83f4886d4
2018-01-05 20:34:17 +01:00
Brad Fitzpatrick 57648c6b83 all: update copyright holder from Google Inc to The Perkeep Authors
The AUTHORS file is the list of copyright holders.
2018-01-03 16:52:49 -08:00
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Paul Lindner c58e07942e all: lint fixes for "if block ends with a return statement"
Change-Id: I1c244f14995478860c19695695f287d541a7a39c
2017-12-13 11:31:25 -08:00
Paul Lindner ba92702834 all: lint fixes for "should omit 2nd value from range"
Change-Id: I7bb19d376f96a39ecae7dbdb4d6808f704bae5fb
2017-12-13 11:31:25 -08:00
Paul Lindner 15feaeb24c all: lint fixes for 'error strings should not be capitalized or end with punctuation or a newline'
Change-Id: I9c3766a51ac8be694ae76befff4b6fa9a85e34eb
2017-12-11 06:13:25 -08:00
Paul Lindner b09cd377d7 Switch to stdlib context from golang.org/x/net/context
This switches most usages of the pre-1.7 context library to use the
standard library.  Remaining usages are in:

  app/publisher/main.go
  pkg/fs/...

Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
2017-11-26 01:12:26 -08:00
mpl 00bc12d403 misc/docker/go: update to go1.9
Change-Id: I3c0adb33918df1553ec8e935bca4d50f01816c06
2017-10-04 01:35:55 +02:00