Commit Graph

1751 Commits

Author SHA1 Message Date
Maximilian Stein
2fa9d7402f Add zsh completion function
* imported from https://github.com/steinymity/aptly-zsh
2018-02-17 17:29:32 +01:00
Andrey Smirnov
3c04c56639 Merge pull request #697 from pjediny/issues-692
Issues 692
2018-02-09 23:26:09 +03:00
Andrey Smirnov
7cd4b7a908 Merge pull request #696 from apachelogger/AcquireByHash
properly expose AcquireByHash through the api
2018-01-27 22:55:51 +03:00
Andrey Smirnov
9242ea4d72 Merge branch 'master' into issues-692 2018-01-27 17:18:55 +03:00
Andrey Smirnov
58790dadc6 Merge branch 'master' into AcquireByHash 2018-01-27 17:16:24 +03:00
Andrey Smirnov
182fbdef50 Merge pull request #698 from apachelogger/fix-filter
update nvidia mirror output ref
2018-01-27 00:19:16 +03:00
Harald Sitter
4fb57f65fb update nvidia mirror output ref
this repo now contains 12 packages not 8
2018-01-19 13:09:29 +01:00
Petr Jediný
12e2982362 S3 SymLink fix
The copy source should be the name of the source bucket and key name
of the source object, separated by a slash (/).
2018-01-17 14:25:45 +01:00
Petr Jediný
60fb415150 S3 FileExists fix
According to https://tools.ietf.org/html/rfc7231#section-4.3.2 HEAD
must not have response body so the AWS error code NoSuchKey
cannot be received from S3 and we need to fallback to HTTP NotFound
error code.
2018-01-17 11:27:35 +01:00
Harald Sitter
75c4d6da3b properly expose AcquireByHash through the api
- new publish calls can now enable AcquireByHash by right away (previously
  one would have had to create a new publishing endpoint and then
  explicitly switch it to AcquireByHash)
- all json marshals of PublishedRepo now contain AcquireByHash (allows
  inspecting if a given endpoint has AcquireByHash enabled already; also
  enables verification that a switch/update actually applied a
  potential AcquireByHash change
- update all tests to reflect that default state of AcquireByHash
- update creation and switch testing to explicitly toggle AcquireByHash to
  make sure state mutation works as expected
2018-01-15 17:04:05 +01:00
Andrey Smirnov
1aa88701fb Merge pull request #688 from smira/686-race-fix
Fix race in API related to `LoadComplete()`
2017-12-13 15:49:37 +03:00
Andrey Smirnov
43ddcd27cb Fix race in API related to LoadComplete()
LoadComplete() modifies object, so it would cause issues if it runs
concurrently with other methods. Uprage mutex locks to write
locks when LoadComplete() is being used.
2017-12-13 12:40:06 +03:00
Andrey Smirnov
9cb2a302f8 Merge pull request #683 from smira/545-download-contxt
Use Go context to abort gracefully mirror updates
v1.2.0
2017-12-01 00:27:26 +03:00
Andrey Smirnov
d836334767 Merge pull request #682 from tirolerstefan/remove-buildinfo
#679: added *.buildinfo file to processedFile list (will be removed)
2017-12-01 00:23:49 +03:00
Andrey Smirnov
565fcf4390 Merge pull request #664 from sliverc/acquire-by-hash
Support Acquire-By-Hash for index files
2017-12-01 00:19:07 +03:00
Andrey Smirnov
b7490fe909 Refactor to embed gocontext.Context into aptly context 2017-11-30 23:44:04 +03:00
Oliver Sauder
b2bf4f7884 Adjust FileExists to differentiate between error and actual file existence 2017-11-30 09:46:02 +01:00
Oliver Sauder
e504fdcd54 Build src path on basis of storage prefix when symlinking 2017-11-30 09:46:02 +01:00
Oliver Sauder
3efa1052fa Implement FileExists in files storage as simple stat to improve performance 2017-11-30 09:46:02 +01:00
Oliver Sauder
2e488608ca Simplify packaging indexing by hash and stop when there is an error 2017-11-30 09:46:02 +01:00
Oliver Sauder
674a0e84be Order publish parameters in bash completion
This makes it easier maintainable.
2017-11-30 09:46:02 +01:00
Oliver Sauder
f5e1e194b3 Update man page and bash completion 2017-11-30 09:46:02 +01:00
Oliver Sauder
b4f3573d11 Add acquire by hash when updating publish 2017-11-30 09:46:02 +01:00
Oliver Sauder
4718625388 Avoid exception when failing tests doesn't have a doc string 2017-11-30 09:46:02 +01:00
Oliver Sauder
d6b4b795a5 Fix linting errors 2017-11-30 09:46:02 +01:00
Oliver Sauder
2bd0b786ea Extend publish snapshot test with acquire by hash 2017-11-30 09:46:02 +01:00
Oliver Sauder
092a7ed8f3 Rename AccessByHash to AcquireByHash for consistency with other flags 2017-11-30 09:46:02 +01:00
Oliver Sauder
438e206b3d Extend swift storage with link and file exists methods 2017-11-30 09:46:02 +01:00
Oliver Sauder
7498fd8fc8 Extend s3 storage with link and file exists methods 2017-11-30 09:46:02 +01:00
André Roth
e07912770e Extend PublishedStorage interface for Acquire-By-Hash
Signed-off-by: André Roth <neolynx@gmail.com>
2017-11-30 09:46:02 +01:00
André Roth
bb2db7e500 Support Acquire-By-Hash for index files
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
 /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"

This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.

Note: this only works with aptly.FileSystemPublishedStorage

Closes: #536

Signed-off-by: André Roth <neolynx@gmail.com>
2017-11-30 09:46:02 +01:00
Stefan
c94e048198 Merge branch 'master' into remove-buildinfo 2017-11-30 06:34:50 +01:00
Stefan Felkel
3b4c06d28d gofmt 2017-11-30 06:31:50 +01:00
Andrey Smirnov
15618c8ea8 Use Go context to abort gracefully mirror updates
There are two fixes here:

1. Abort package download immediately as ^C is pressed.
2. Import all the already downloaded files into package pool,
so that next time mirror is updated, aptly won't download them
once again.
2017-11-30 00:49:37 +03:00
Andrey Smirnov
a037615962 Merge pull request #677 from sliverc/edit_mirror_archive_url
Allow editing of mirror archive url
2017-11-29 23:23:08 +03:00
Oliver Sauder
5d301fb1b7 Prepare archive root when editing it 2017-11-27 11:08:31 +01:00
Stefan Felkel
8a4d866810 #679: added *.buildinfo file to processedFile list (will be removed, afterwards) 2017-11-24 14:23:26 +01:00
Oliver Sauder
b98abcc049 Allow editing of mirror archive url
This is needed in case a mirror has moved or is down and need to move
to new mirror.
2017-11-21 16:31:49 +01:00
Andrey Smirnov
10e0966edc Merge pull request #674 from smira/fix-formatting
Fix formatting
2017-11-19 21:53:09 +03:00
Andrey Smirnov
340d1fdd7c Fix formatting 2017-11-19 19:53:24 +03:00
Andrey Smirnov
14d4a2706c Merge pull request #673 from AgNO3/s3-removal
S3 backend: include path prefix in removal requests.
2017-11-19 19:24:04 +03:00
Moritz Bechler
308ea83cc0 S3 backend: include path prefix in removal requests.
DELETE requests, both for temporary files and no longer referenced
packages, lacked the configured path prefix and therefor were not
removed if a prefix is configured.
2017-11-13 14:48:25 +01:00
Andrey Smirnov
9c018ce636 Merge pull request #668 from smira/flx42-sha512-release-file
Handle SHA512 in Release files
2017-11-08 22:25:23 +03:00
Andrey Smirnov
359cda9d99 Add system test for repo with SHA512-only checksums 2017-11-08 19:45:22 +03:00
Felix Abecassis
e682639b20 Handle SHA512 in Release files
Fix: #656
2017-11-08 11:54:19 +03:00
Andrey Smirnov
afd2c5fcea Merge pull request #665 from smira/upd-goleveldb
Update goleveldb vendored dependency (see #662)
2017-11-08 11:49:54 +03:00
Andrey Smirnov
5a1d006850 Update goleveldb vendored dependency (see #662) 2017-11-08 00:49:56 +03:00
Andrey Smirnov
67c26368ee Merge pull request #658 from apachelogger/control-tar-xz-support
make deb reader handle new control.tar options introduced in dpkg 1.17.6
2017-11-02 00:43:54 +03:00
Harald Sitter
1885cbd6a2 make deb reader handle new control.tar options introduced in dpkg 1.17.6
newly supported is uncompressed control.tar and xz compressed
control.tar.xz. latter is used by ubuntu for dbgsym ddebs.

Fixes #655
2017-10-31 14:43:00 +01:00
Andrey Smirnov
79d68ec3a7 Merge pull request #659 from apachelogger/fix-align-lint
fix linting by using new maligned linter instead of aligncheck
2017-10-31 16:38:32 +03:00