Commit Graph

752 Commits

Author SHA1 Message Date
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 31f4af5722 Merge branch 'master' into skipCleanup 2017-09-20 17:53:24 +03:00
Andrey Smirnov 72ac1bc33c Update PD GPG key id to fix the tests 2017-09-18 18:09:36 +03:00
Andrey Smirnov bd5fc8ae62 Varnish repos got moved 2017-09-15 23:43:51 +03:00
Andrey Smirnov a27b489ba2 Allow package queries to return duplicate entries on PackageCollection
Fixes #446
2017-08-17 00:40:34 +03:00
Ludovico Cavedon d6a3917141 Add -skip-cleanup option for publish commands.
Allow skipping unreferenced files cleanup on publish switch/update/drop
via the -skip-cleanup command line option.
Also support API SkipCleanup parameter.

Fixes #570.
2017-08-15 19:08:17 -07:00
Andrey Smirnov a584b2e058 Fix bug with PoolPath field being overwritten on mirror update
While updating mirror, if package file is already in pool path,
field `PoolPath` was left as empty which results in package file
being unavailable later on while publishing.
2017-08-11 20:05:55 +03:00
Andrey Smirnov 84ef963d7d Trim slashes while parsing publish prefix
Fixes: #607
2017-08-09 01:26:47 +03:00
Andrey Smirnov cbb576cbcc Fix up system tests 2017-07-28 22:37:20 +03:00
Andrey Smirnov 68da8a674a Improve internal PGP provider
1. Print additional details about keys being used for signing
2. Skip expired keys
3. Add `\n` to logged messages
2017-07-28 00:53:50 +03:00
Andrey Smirnov ab20c2d329 Add publishing & repo include tests 2017-07-26 00:31:27 +03:00
Andrey Smirnov d137bcf8d4 Fix up/add mirror update tests 2017-07-26 00:00:06 +03:00
Andrey Smirnov 3674e1adee System tests for mirror create/update with internal PGP implementation 2017-07-21 01:09:20 +03:00
Andrey Smirnov 499ab35012 Implement flag/config falue for GPG provider 2017-07-21 01:01:58 +03:00
Andrey Smirnov 7d179dd405 Small fixups for upcoming 1.1.0 release
Fix system tests, add -db-open-attempts to bash completion, small nits
for man page.
2017-07-07 00:14:03 +03:00
Oliver Sauder e3f1880ad4 Added support for NotAutomatic, ButAutomaticUpgrades and Origin fields 2017-07-05 15:08:02 +02:00
Andrey Smirnov 211ac0501f Rework the way database is open/re-open in aptly
Allow database to be initialized without opening, unify all the
open paths to retry on failure.

In API router make sure open requests are matched with acks in explicit
way.

This also enables re-open attempts in all the aptly commands, so it
should make running aptly CLI much easier now hopefully.

Fix up system tests for oldoldstable ;)
2017-07-05 00:17:48 +03:00
Andrey Smirnov 12a6b0ceb8 Merge pull request #575 from smira/pgp-refactoring
Refactor GPG signer/verifier
2017-05-24 19:24:38 +03:00
Andrey Smirnov 982c093fbf Fix system tests 2017-05-23 16:24:49 +03:00
Andrey Smirnov f54e798eac Add system test for fixed checksum matching 2017-05-23 03:00:16 +03:00
Andrey Smirnov 829ea2e65c Fix tests for flat repos 2017-05-17 00:09:18 +03:00
Andrey Smirnov 589dc93380 Sort package lists when searching or showing objects
Fixes #135
Fixes #214
2017-05-05 18:42:46 +03:00
Andrey Smirnov c798db8056 Add system's requirements.txt, enforce flake8 linter
Fix style issues in functional tests.
2017-04-28 00:05:11 +03:00
Andrey Smirnov 1941418c10 Add system test for disabled legacy pool path support 2017-04-27 00:51:46 +03:00
Andrey Smirnov 186bb2dff0 Add flag to disable/enable support for legacy pool paths
Legacy pool paths are enabled by default, but for new aptly installations
(when aptly config is first generated), it would be disabled explicitly.
2017-04-26 23:37:31 +03:00
Andrey Smirnov 2308632683 Add system tests for legacy pool files 2017-04-26 23:17:04 +03:00
Andrey Smirnov ee21b69402 Add test for mirror without MD5 checksums 2017-04-26 23:17:04 +03:00
Andrey Smirnov 7dcc0d597d Fix S3/Swift tests 2017-04-26 23:17:04 +03:00
Andrey Smirnov 154ef7fe65 Fix system tests for aptly repo include 2017-04-26 23:17:04 +03:00
Andrey Smirnov 4601f07349 Fix system tests for aptly repo add 2017-04-26 23:17:04 +03:00
Andrey Smirnov b7b9f12c88 Update system tests for SHA512 checksums being generated 2017-04-26 23:17:04 +03:00
Andrey Smirnov 1f3cb2db5d When downloading/importing packages, enforce all checksums 2017-04-26 23:17:04 +03:00
Andrey Smirnov 4171a73995 Fix up system test 2017-04-26 23:17:03 +03:00
Andrey Smirnov 45d187bc14 Fix up system test 2017-04-26 23:17:03 +03:00
Andrey Smirnov 8dc6a14766 Allow snapshot to be created from empty local repo
Fixes #288
2017-04-26 00:33:09 +03:00
Andrey Smirnov c3acabe303 Fix system tests for flat repos
Old mirror used for testing is gone, switch to CRAN.
2017-04-24 23:04:48 +03:00
Clemens Rabe 25f9c29f00 Implemented filesystem endpoint with support for hardlinks, symlinks and copy. 2017-04-13 20:25:40 +02:00
Andrey Smirnov bc469eecfb Merge branch 'master' into dep-verbose-resolve 2017-03-31 19:17:57 +03:00
Andrey Smirnov 7a5be6736d When contents generation fails, don't bail out
This replaces `panic` which aborts aptly execution with warning
message on console. So aptly continues publishing actions, but
`Contents` indexes might be incomplete.

Error will be printed every time contents generation is triggered.
2017-03-31 00:57:18 +03:00
Andrey Smirnov 85b4a8b1ae Add new option for detailed logging on dependency resolving
This adds command-line arg and config option, with option enabled
aptly is more verbose on internal depeendency resolving cycles:

```
Missing dependencies: file-rc (>= 0.8.16) [amd64], python:any (>= 2.7.1-0ubuntu2) [amd64], python3:any (>= 3.3.2-2~) [amd64], file-rc [amd64], perl (<< 5.17) [amd64], iptables-router (>= 1.2.3) [amd64], systemd [amd64], sgml-base (>= 1.26+nmu2) [amd64], sed (>= 4.1.2-8) [amd64]
Unsatisfied dependency: file-rc (>= 0.8.16) [amd64]
Unsatisfied dependency: python:any (>= 2.7.1-0ubuntu2) [amd64]
Unsatisfied dependency: python3:any (>= 3.3.2-2~) [amd64]
Unsatisfied dependency: file-rc [amd64]
Unsatisfied dependency: perl (<< 5.17) [amd64]
Unsatisfied dependency: iptables-router (>= 1.2.3) [amd64]
Unsatisfied dependency: systemd [amd64]
Injecting package: sgml-base_1.26+nmu4ubuntu1_all
Injecting package: sed_4.2.2-4ubuntu1_amd64
```
2017-03-28 22:58:07 +03:00
Andrey Smirnov 800c5c1e06 Merge branch 'master' into feature_skip_existing_packages_latest 2017-03-28 21:26:28 +03:00
Andrey Smirnov 2943422d5d Automatic versioning for aptly
New version format:

* for releases, `x.y.z` (follows tag without leading `v`)
* for nightly builds, `x.y.z+N+hash` (previous version, not the upcoming one)

This means that each nightly build `aptly` would report
correct version now.

Version is now complied into the aptly binary, system tests
automatically check for current version, no need to update them
anymore.
2017-03-25 00:18:45 +03:00
Clemens Rabe 16a0d0d428 Added option --skip-existing-packages to speed up mirror update. 2017-03-23 22:01:11 +01:00
Clemens Rabe 66f51d2b17 Added option --skip-existing-packages to speed up mirror update. 2017-03-23 21:55:22 +01:00
Andrey Smirnov 11d828b3b1 Add govet/golint into Travis CI build
Fix current issues
2017-03-22 21:49:16 +03:00
Andrey Smirnov f737787c01 Fix up system tests 2017-03-22 19:56:23 +03:00
Andrey Smirnov c9768416ed Fix up tests 2017-03-16 23:06:41 +03:00
Andrey Smirnov b102562478 Fix up system test for Go 1.8 2017-03-16 20:58:21 +03:00
Andrey Smirnov f17d398e8f Implement new command aptly repo create ... from snapshot ... 2017-03-04 00:12:18 +03:00
Harald Sitter 07cf8925f9 support systemd activation for api serve
systemd has a feature called socket activation where initially systemd
manages and listens on ports/uds and only invokes a service when traffic
appears. to then hand over the involved sockets, systemd will pass the
relevant FDs into the invoked process and defines them in the environment.

use coreos/go-systemd to grab the active listeners passed by systemd and
use them to serve the api routes. only one listener may be specified right
now as we also only support one -listen argument for the binary.

this allows admins to craft a systemd socket and service file for aptly
where systemd manages the socket, its permission and its live time, and
lazy start aptly when needed.
2017-03-01 11:12:10 +01:00