Commit Graph

1719 Commits

Author SHA1 Message Date
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
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
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
Harald Sitter
f43801cb96 whitelist falke E722 in system/lib.py
'E722 do not use bare except' wants us not to use except without type
restriction as it catches everything and the kitchen sink. Since we use
them to catch exceptions in test cases this is intentional as we implement
general purpose error handling on test failure there.
2017-10-31 12:42:11 +01:00
Harald Sitter
46c2182ade fix linting by using new maligned linter instead of aligncheck
upstream switched the alignment check backend and in doing so fails to run
if the old backend is defined in the config.

also skip alignment linting on a struct we use for byte decoding as we have
no choice in its member order.
2017-10-31 12:24:31 +01:00
Andrey Smirnov
5ef45bddda Merge pull request #650 from smira/278-import-files-from-pool
Allow using files from the pool while importing source packages
2017-09-29 23:46:06 +03:00
Andrey Smirnov
0d94f29c27 Allow using files from the pool while importing source packages
Sometimes source packages reference files already present in the pool.

Allow for those file to be omitted when importing packages either via
`repo add` or `repo include`. If file is missing, aptly would make
an attempt to look up file in the package pool (by checksum) and
use it.

Fixes: #278
2017-09-29 22:39:51 +03:00
Andrey Smirnov
04b7543dea Merge pull request #649 from smira/647-sse-put-copy
Enforce SSE/StorageClass in PUT Object Copy
2017-09-28 21:07:30 +03:00
Andrey Smirnov
9051f13ce6 Merge branch 'master' into 647-sse-put-copy 2017-09-28 19:30:48 +03:00
Andrey Smirnov
1b704db5c0 Merge pull request #648 from smira/upgrade-aws-sdk
Upgrade AWS SDK to the latest version
2017-09-28 19:30:30 +03:00
Andrey Smirnov
2d66a4ca0a Enforce SSE/StorageClass in PUT Object Copy
"RenameFile" is implemented in S3 using `PUT Object Copy`, which
should enforce SSE/StorageClass same way as regular `PUT Object`.

Fixes: #647
2017-09-28 18:30:50 +03:00
Andrey Smirnov
182c21e38c Upgrade AWS SDK to the latest version 2017-09-28 17:57:05 +03:00
Andrey Smirnov
9a767b7631 Merge pull request #646 from smira/update-gin
Upgrade gin-gonic to latest master, fix compatibility issues
2017-09-28 01:42:42 +03:00
Andrey Smirnov
3756db2491 Upgrade gin-gonic to latest master, fix compatibility issues 2017-09-28 00:33:59 +03:00
Andrey Smirnov
ff8e4a8659 Merge pull request #645 from smira/man-no-false
Remove `=false` in usage and man page
2017-09-27 16:35:05 +03:00
Andrey Smirnov
aec6c2f2e2 Remove =false in usage and man page 2017-09-27 01:01:01 +03:00
Andrey Smirnov
d611d0d829 Merge pull request #620 from cavedon/skipCleanup
Add -skip-cleanup option for publish commands.
2017-09-27 00:35:47 +03:00
Andrey Smirnov
b4deedda01 Merge branch 'master' into skipCleanup 2017-09-27 00:14:24 +03:00
Andrey Smirnov
0f14143141 Merge pull request #644 from smira/615-all-variants
Fix incomplete dependencies with follow-all-variants
2017-09-26 15:45:26 +03:00
Andrey Smirnov
e5198178a5 Fix incomplete dependencies with follow-all-variants
When `-dep-follow-all-variants` option is enabled, dependency resolving
process shouldn't stop even if dependency is already satisfied - there
mgiht be other ways to satisfy dependency.

Also fix issue with parsing multiarch specs like
`python:any`.
2017-09-26 00:09:15 +03:00
Andrey Smirnov
1c44b4f787 Merge pull request #643 from smira/618-prefer-exact-match
Prefer exact match on package name over provides match
2017-09-25 20:42:43 +03:00
Andrey Smirnov
6d2f265980 Prefer exact match on package name over provides match
When searching for packages which might satisfy given dependency,
aptly was first returning packages which `Provides` mentioned
name. By default aptly is picking up only first match (unless
follow all variants options is enabled), so `Provides:` takes
precedence over exact package name match.

Invert this logic by searching first for package name match.
2017-09-25 18:24:45 +03:00
Andrey Smirnov
325d391007 Merge pull request #630 from skyscrapers/expose-context
Expose the context outside of the cmd package.
2017-09-22 19:20:01 +03:00
Ringo De Smet
91a3dc9e94 Expose the context outside of the cmd package. 2017-09-22 16:45:10 +02:00
Andrey Smirnov
31f4af5722 Merge branch 'master' into skipCleanup 2017-09-20 17:53:24 +03:00
Andrey Smirnov
e0aaa8bb80 Merge pull request #640 from smira/636-upcase-package-name
Allow uppercase package name in package query expressions
2017-09-18 22:34:32 +03:00
Andrey Smirnov
50035d5bc4 Allow uppercase package name in package query expressions
Fixes: #636

Before this fix, aptly was always treating strings starting with
uppercase letter as field name, which was breaking package queries
like `VMware-Horizon-Client_4.5.0_all`.

Now aptly accepts only fields which don't contain underscore, and
everything else would be parsed as package reference.
2017-09-18 21:36:06 +03:00
Andrey Smirnov
985f1a17b5 Merge pull request #638 from smira/fix-sys-tests
Update PD GPG key id to fix the tests
2017-09-18 19:14:45 +03:00
Andrey Smirnov
72ac1bc33c Update PD GPG key id to fix the tests 2017-09-18 18:09:36 +03:00
Andrey Smirnov
f0d6b1c29f Merge pull request #637 from smira/fix-linter-go-1.9
Fix lint warning & add Go 1.9 to the mix
2017-09-16 21:36:51 +03:00
Andrey Smirnov
bd5fc8ae62 Varnish repos got moved 2017-09-15 23:43:51 +03:00
Andrey Smirnov
9ca81ff3bc Fix lint warning & add Go 1.9 to the mix 2017-09-15 22:54:39 +03:00
Andrey Smirnov
d9607cf88c Merge pull request #624 from smira/no-go-16
Drop support for Go 1.6, only Go 1.7+ is supported
2017-08-17 22:02:30 +03:00
Andrey Smirnov
4f56f34d82 Merge pull request #623 from smira/446-package-query-duplicates
Allow package queries to return duplicate entries on `PackageCollection`
2017-08-17 17:37:57 +03:00
Ludovico Cavedon
e2956a84ce Merge branch 'master' into skipCleanup 2017-08-16 14:44:33 -07:00