Commit Graph

1793 Commits

Author SHA1 Message Date
Strajan Sebastian Ioan
d31144b9ae Buffer increase (#738)
Increase Scanner buffer size for Stanza reader
v1.3.0
2018-05-14 17:41:33 +03:00
Harald Sitter
c7a3a10846 Merge pull request #735 from aptly-dev/nvidia-repo-update
update nvidia reference again
2018-05-03 11:59:57 +02:00
Harald Sitter
2be0b7859d update nvidia reference again
package count chainged again -.-

I am working on a fixture set for repositories so we can stop talking to
live repositories. that's quite the undertaking though, so let's fix the
output reference to unbreak the test in the meantime
2018-05-03 10:45:01 +02:00
Oliver Sauder
65528fc357 Merge pull request #734 from aptly-dev/gpg1
introduce a gpg and gpgv version compatibility check and fall back to v1
2018-04-26 10:34:03 +02:00
Harald Sitter
5a713534c6 fix gpg setting
Init is actually never called and I have no clue why it is there if it is
not called.
Take this opportunity to introduce a New function which only does the
helper lookup and panics iff that fails. Panic may be a bit too aggressive,
but seems the most certain way to get out of not finding a suitable gpg1
binary.
2018-04-26 09:18:06 +02:00
Harald Sitter
f89e322ece move away from assert package
we don't actually use it anywhere else
2018-04-25 15:35:01 +02:00
Harald Sitter
cd6075ba94 introduce a gpg and gpgv version compatibility check and fall back to v1
Newer versions of debian and ubuntu come with gpg pointing to gpg2.
We can currently only handle gpg1 CLIs though. Luckily the old gpg is still
available in the package gnupg1 (providing bin/gpg1).

As a bit of a stop-gap, until #657 can be resolved properly, we'll detect
the version of bin/gpg. If it is unsuitable we'll fall back and try
bin/gpg1. If neither is found to be suitable the signer/verifier will
not work.

Same applies to gpgv/gpgv1.
2018-04-25 15:05:53 +02:00
Andrey Smirnov
77033df27b Merge pull request #732 from aptly-dev/move-to-aptly-dev
Fix paths after repository transfer to aptly-dev
2018-04-18 22:43:53 +03:00
Andrey Smirnov
b8c5303fdb Fix paths after repository transfer to aptly-dev 2018-04-18 21:19:43 +03:00
Andrey Smirnov
eaab66da58 Merge pull request #731 from smira/build-improvements
Change build settings to speed up builds
2018-04-18 12:11:01 +03:00
Andrey Smirnov
2a8aff9746 Change build settings to speed up builds
1. Don't run long steps for Go versions other than 1.9 & 1.10
according to Golang Release Policy (two latest versions).

2. Switch to codecov.io, collect coverage only on Go 1.10 which
has fixes for multi-module coverage & ./... ignoring vendor.

3. Simplify Makefile.
2018-04-18 01:19:26 +03:00
Andrey Smirnov
797b2dd996 Merge pull request #730 from smira/s3-creds
Replace S3 creds
2018-04-16 11:37:46 +03:00
Andrey Smirnov
e65fff058c Fix build on Travis 2018-04-13 23:55:49 +03:00
Andrey Smirnov
548dcdb242 Add google_compute_engine boto dependency (why???) 2018-04-13 23:53:01 +03:00
Andrey Smirnov
9a65bbe12c Add debug output on tests being skipped 2018-04-13 23:42:07 +03:00
Andrey Smirnov
72d741a9b7 Replace S3 creds 2018-04-13 23:18:53 +03:00
Andrey Smirnov
2f5bf96fc9 Merge pull request #461 from jacksgt/service-file
Add systemd service for aptly http server
2018-04-11 16:32:41 +03:00
Andrey Smirnov
4d3b42eb11 Merge pull request #729 from smira/667-legacy-content-indexes
Implement 'legacy' Contents indexes to match Ubuntu <=16.04
2018-04-11 10:50:38 +03:00
Andrey Smirnov
5b85522400 Implement 'legacy' Contents indexes to match Ubuntu <=16.04
Another index is created which unifies data for all the components.

This certainly requires more resources as we have to build yet another
index.
2018-04-11 00:57:15 +03:00
Andrey Smirnov
5f96abc271 Merge pull request #728 from smira/openpgp-leveldb-update
Update vendored deps, including AWS SDK, openpgp, ftp, ...
2018-04-11 00:28:34 +03:00
Andrey Smirnov
0e6ee35942 Update vendored deps, including AWS SDK, openpgp, ftp, ... 2018-04-10 23:49:16 +03:00
Jack Henschel
14798b2063 Add systemd service for aptly http server and aptly api
The systemd service files can be placed under `/etc/systemd/system/`
(for users/administrators) or `/lib/systemd/system/` (for distributions)
2018-04-05 17:13:26 +02:00
Andrey Smirnov
cef4fefc40 Merge pull request #726 from smira/dep-update
Update to recent version of `dep`, fix lock files
2018-04-05 17:27:03 +03:00
Andrey Smirnov
181806a9a2 Update to recent version of dep, fix lock files 2018-04-05 16:25:39 +03:00
Andrey Smirnov
99a205c716 Merge pull request #713 from apachelogger/fix-711
fix prefix length in error message
2018-04-04 23:17:11 +03:00
Andrey Smirnov
dd78c026c1 Merge branch 'master' into fix-711 2018-04-04 01:37:27 +03:00
Andrey Smirnov
20516dbbc2 Merge pull request #724 from smira/gui-link
Add link to aptly GUI
2018-04-02 12:06:10 -04:00
Andrey Smirnov
ba80f377a9 Add link to aptly GUI
See also #341
2018-03-31 17:07:07 -04:00
Andrey Smirnov
dc7bbf35eb Merge pull request #719 from smira/new-key
New signing key for aptly repo, and small fixes
2018-03-16 16:07:50 +03:00
Andrey Smirnov
b3b0dbb217 Go 1.10 fix 2018-03-16 13:02:38 +03:00
Andrey Smirnov
d76259496d Disable FTP tests in Travis 2018-03-16 11:32:22 +03:00
Andrey Smirnov
aa3a2ab595 New signing key for aptly repo, and small fixes
Build on Go 1.10, drop Go 1.7

Remove references to now defunct pgp.mit.edu, fix system test
2018-03-16 01:27:57 +03:00
Harald Sitter
0f1fd1bca6 fix prefix length in error message
Fixes #711
2018-03-07 12:44:01 +01:00
Andrey Smirnov
581876df9a Merge pull request #707 from apachelogger/batch-contents
batch updates to the temporary db when publishing
2018-02-28 00:04:07 +03:00
Andrey Smirnov
d0101be955 Merge pull request #703 from steinymity/master
Add zsh completion function
2018-02-28 00:01:34 +03:00
Andrey Smirnov
caa5433787 Merge pull request #705 from apachelogger/prevent-root-remove
prevent removal of a PublishedStorage's root dir
2018-02-27 23:59:41 +03:00
Harald Sitter
9125745416 batch updates to the temporary db when publishing
updates with contents generation were super syscall-heavy. for each path
in a package (so at least 2-4, but ordinarily >4) we'd do a db.Put in
ContentsIndex which results in one syscall.Write. so, for every package in
a published repo we'd have to do *at least* 2 but ordinarily >4 syscalls.
this gets abysmally slow very quickly depending on the available system
specs.

instead, start a batch inside each package and finish it when we are done
with the package. this should keep the memory footprint negligible, but
reduce the write() calls from N to 1.

on one of KDE's servers I have seen update publishing of 7600 packages go
from ~28s to ~9s when using batch putting on an HDD.
on my local system the same set of packages go from ~14s to ~6s on an SSD.
(all inodes in cache in both cases)
2018-02-26 16:19:15 +01:00
Harald Sitter
b893c0a7ca prevent removal of a PublishedStorage's root dir
presently there is no use case where we need this. on the other hand,
passing empty paths into any of the remove methods is indicative of a bug.
this is particularly dangerous as this can temporarily smash the publish
root but later restore it again when actually publishing. this makes
for super nasty and hard to track down problems.

to guard against this simply disallow root dir removal using empty
strings. should we find a use case for this in the future we can always
revisit this (FTR: I think very explicitly API should be used so everyone
knows what is going on and you can't accidentally run it)
2018-02-26 11:09:03 +01:00
Andrey Smirnov
02ac416561 Merge pull request #706 from apachelogger/fix-by-index-cleanup
Fix by by-hash index cleanup + root dir data "loss"
2018-02-23 02:34:24 +03:00
Harald Sitter
00bb0ca8f3 fix a serious file leak in the by-index publishing
the logic here was wrong.
if we managed to find the link target (the physical index file) pointed to
by our old symlink we want to remove it (this is basically "cleaning up old
index" logic).
previously we'd try to only delete it when the ReadLink came back with
error. which had two serious issues with it:

a) linkTarget was empty, so we basically called Remove("") which would
   delete the storage -> root <- directory if the root is a symlink!
b) we'd leak old indexes as the cleanup logic only ran if there was en
   error which would ordinarily never be

new code correctly cleans up unless there was an error.

this relates to a previous bugfix of readLink which incorrectly returned
absolute paths ultimately rendering the Remove call also broken.
2018-02-19 17:32:06 +01:00
Harald Sitter
2d0baef3b1 make code less repetitive and more readable
by using the power of variables!
2018-02-19 17:22:36 +01:00
Harald Sitter
3ea803e3bb fix PublishedStorage's ReadLink to return a relative path
previously it'd return an absolute path which makes the path absolutely
useless as all other functions of PublishedStorage need relative input
and will prepend them with the rootPath, so getting an absolute ReadLink
and then trying to remove that'd would ultimately try to remove the
absolute path `$root/AbsoluteRoot/LinkTarget` instead of `$root/LinkTarget`

add a unit test to actually verify readlink
2018-02-19 17:13:41 +01:00
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