Commit Graph

1619 Commits

Author SHA1 Message Date
Andrey Smirnov 6994e35119 ChecksumCollection implementation 2017-04-26 23:17:04 +03:00
Andrey Smirnov 4eedb62418 Fix misspelling 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 c40025a335 Add progress bar on package saving progress 2017-04-26 23:17:03 +03:00
Andrey Smirnov 4171a73995 Fix up system test 2017-04-26 23:17:03 +03:00
Andrey Smirnov 29e5f4ca10 Vendor import github.com/pkg/errors 2017-04-26 23:17:03 +03:00
Andrey Smirnov 05f6c75743 Add PR #506 original author [ci skip] 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 bc7903f86e Rework mirror update (download packages) implementation
`PackageDownloadTask` is just a reference to file now. Whole process
was rewritten to follow pattern: download to temp location inside the pool,
verify/update checksums, import into pool as final step.

This removes a lot of edge cases when aptly internal state might be broken
if updating from rogue mirror.

Also this changes whole memory model: package list/files are kept in memory
now during the duration of `mirror update` command and saved to disk
only in the end.
2017-04-26 23:17:03 +03:00
Andrey Smirnov 72d233b587 Final round of updates, everything except mirror download should be ready 2017-04-26 23:17:03 +03:00
Andrey Smirnov 2535367c3c Update Swift published storage to work with new package pool 2017-04-26 23:17:03 +03:00
Andrey Smirnov f4ff8d957f Fix S3 published storage to use new PackagePool interface
Change PackagePool to return Seeker interface from Open call.
2017-04-26 23:17:03 +03:00
Andrey Smirnov 7bad358408 Local package pool and local publishing rewritten with new constraints
Local package pool now implements more generic package pool API.
The base idea is to never expose full paths to files, so that other
kinds of package pools (e.g. package pool in S3) could be used to implement
the same interface.

Files get into the pool only using `Import` method. `Import` method is
now more smart, it supports moving files into the pool, it can detect if
files reside on the same filesystem and use hardlinking instead of copying.
This will make direct mirror downloads still as fast as they were with previous
version which was performing download directly to package pool.

New package pool doesn't have two things implemented yet:

1. New file placement according to SHA256 or other configured hash

2. Calculate at least SHA256/MD5 for each imported files.
MD5 would be required for S3/Swift publishing
2017-04-26 23:17:03 +03:00
Andrey Smirnov 94b49818a1 Refactor HTTP downloader package
* Drop multi-threaded downloader. It doesn't really belong here -
some places require it, some do not, but it's definitely not the
right place to handle it, as it's being used only when updating
mirrors
* Pass expectedChecksums as pointer, so it's easy to drive `nil` value,
and also downloader can fill back checksums (not implemented right now).
* Break down downloader and tests into more files
* Use pkg/errors instead of fmt
2017-04-26 23:17:03 +03:00
Andrey Smirnov a245b722a8 Merge pull request #555 from smira/288-empty-repo-snapshot
Allow snapshot to be created from empty local repo
2017-04-26 01:11:40 +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 d66185ca03 Merge pull request #554 from smira/flat-system-test
Fix system tests for flat repos
2017-04-24 23:45:58 +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
Andrey Smirnov 4697d8eaf8 Merge pull request #550 from smira/549-fix-deps
Rewrite `dep` files into new format
2017-04-14 22:48:53 +03:00
Andrey Smirnov 8bf71a5561 Rewrite dep files into new format
Conversion to TOML plus some manual fixups.
2017-04-14 17:24:49 +03:00
Andrey Smirnov 898cbd2c83 Merge pull request #548 from smira/546-fix-depends
Update `Depends:` for homegrown packages
2017-04-14 16:22:03 +03:00
Andrey Smirnov 62762f1616 Merge branch 'master' into 546-fix-depends 2017-04-14 00:57:36 +03:00
Andrey Smirnov 4d38e0bc87 Merge pull request #521 from seeraven/feature_localfiles_publishstorage
Implemented local filesystem endpoint with support for hardlinks, symlinks and copy
2017-04-14 00:52:49 +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 096b30b5e8 Update Depends: for homegrown packages
This should match upstream Debian package, at the same time
`goxc` seems to be broken and it ignores `Suggests`.
2017-04-13 01:33:30 +03:00
Andrey Smirnov ac475c0a10 Merge pull request #544 from smira/543-tmp-dirs-leftover
Fix temporary contents DB being left behind after publishing
2017-04-11 00:28:13 +03:00
Andrey Smirnov 60800b5f25 Fix temporary contents DB being left behind after publishing
NB: Go `defer` order execution is reverse to the order `defer` statements
are executed.

So before the change, `Drop()` was called before `Close()`, which was no-op.

Change that to explicit order in single func, print errors if they happen.
2017-04-10 23:43:33 +03:00
Andrey Smirnov 36a4d78162 Merge pull request #535 from smira/public-pool-checksums
Refactoring: use checksums instead of MD5 for pool/published
2017-04-03 17:31:04 +03:00
Andrey Smirnov 50cf2b49bd Refactoring: use checksums instead of MD5 for pool/published
This is related to #506

As a first step, don't pass MD5 explicitly, pass checksum info object,
so that as a next step we can choose which hash to use.

There should be no functional changes so far.

Next step: stop returning explicit paths from public package pool.
2017-04-01 00:12:31 +03:00
Andrey Smirnov 675d35c7a1 Merge pull request #508 from smira/dep-verbose-resolve
Add new option for detailed logging on dependency resolving
2017-03-31 19:58:23 +03:00
Andrey Smirnov bc469eecfb Merge branch 'master' into dep-verbose-resolve 2017-03-31 19:17:57 +03:00
Andrey Smirnov bc01d9ed5b Merge pull request #534 from smira/533-ignore-contents-failures
When contents generation fails, don't bail out
2017-03-31 16:38:25 +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 eb48460b7b Update bash completion 2017-03-28 22:58:53 +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 e6bad637fd Merge pull request #532 from smira/530-bash-completion
Move bash completion to main aptly repo
2017-03-28 22:22:10 +03:00
Andrey Smirnov 47b5cc27c8 Move bash completion to main aptly repo
Fixes #530

Original repository: https://github.com/aptly-dev/aptly-bash-completion
2017-03-28 21:41:57 +03:00
Andrey Smirnov ca16841223 Merge pull request #520 from seeraven/feature_skip_existing_packages_latest
Add option -skip-existing-packages to mirror update to speed up download queue setup
2017-03-28 21:39:36 +03:00
Andrey Smirnov 800c5c1e06 Merge branch 'master' into feature_skip_existing_packages_latest 2017-03-28 21:26:28 +03:00
Andrey Smirnov 7fd8bd0171 Merge pull request #531 from smira/release-1.0.0-preparation
Prepare for new release, update build instructions [ci skip]
v1.0.0
2017-03-28 00:17:08 +03:00
Andrey Smirnov 4707efe4d6 Prepare for new release, update build instructions [ci skip] 2017-03-28 00:15:41 +03:00
Andrey Smirnov 8ae61f9448 Merge pull request #523 from smira/versioning
Automatic versioning for aptly
2017-03-27 16:02:25 +03:00
Andrey Smirnov a138d0111d Update README to use go install which will build with version 2017-03-26 19:24:32 +03:00
Andrey Smirnov af1adb44ce Remove -x flag for go install 2017-03-26 19:23:53 +03:00
Clemens Rabe 4ddf85bbc1 Rebuilt man page with patched ronn. 2017-03-25 08:52:08 +01:00
Clemens Rabe 9978595c59 Merge branch 'master' into feature_skip_existing_packages_latest 2017-03-25 08:50:24 +01: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
Andrey Smirnov 91219e3a0a Merge pull request #522 from smira/man-gen-rework
Rework man generator with new `go install` format
2017-03-24 21:50:28 +03:00
Andrey Smirnov 7f8db9087a Rework man generator with new go install format
With previous version, `go install` automatically picks up
package `man` and installs `gen.go` as `main` to the $GOPATH/bin which
is not what is expected. Move man page generator to separate
private folder.
2017-03-24 21:07:38 +03:00
Clemens Rabe aa16899c60 Adaption of tests. 2017-03-24 06:25:46 +01:00