Commit Graph

70 Commits (dee6ffa492c2efee982dcd0b4724213317eceb37)

Author SHA1 Message Date
Timo Teras 5d19789a3b pkg, db: execute scripts from /var/cache/misc (fixes #129) 2009-08-11 17:56:24 +03:00
Timo Teras bc93eaffb0 db, pkg: fix package verification during installation
some hooks to package verification code were missing causing the
verification to not be done (causing pre-script to be not run).
fixes #124, #126.
2009-08-10 08:47:05 +03:00
Timo Teras a602c49b31 db: support "replaces" directive (fixes #113)
it will allow to overwrite files owned by some other packages
to get upgrades right (e.g. when splitting or renaming packages)
2009-08-04 16:54:15 +03:00
Timo Teras ea90152664 apk: use *at instead of chdir+normal file syscall
this way we never change cwd, and relative filenames are always
parsed consistently. this also helps filename construction in many
places. this patch also changes '--root' to override location of
all configuration to be in the new root. previously it depended
on the file which one was used.
2009-07-31 16:08:09 +03:00
Timo Teras 7b05eef61f tar: make checksumming of inner files conditional
and force checksumming only when unpacking archive. otherwise
it's extra computation for nothing.
2009-07-29 19:16:04 +03:00
Timo Teras 8e66768cd2 pkg: remove implicit bb dependency when install script is present
this dependency is now inserted automatically by abuild.
2009-07-24 14:06:03 +03:00
Timo Teras a388f4bfa6 index: more informative error message
when failed to load an existing index.
2009-07-23 11:35:40 +03:00
Timo Teras 79f43861e6 signing: verify and generate identity
fixes verification of non-repository packages while installing
them. this is final thing needed for full signing support
(fixes #46).
2009-07-22 21:04:54 +03:00
Timo Teras 718ef3079e add: fixes to installing non-repository package
make sure cache is enabled on non-permanent rootfs setups.
some optimizations and fixes too.
2009-07-22 20:47:21 +03:00
Timo Teras 9b77c053e8 pkg: cleanup the signing code
smaller callback and less cases to check. also reintroduce the
oneshot digest flag, hopefully correct this time.
2009-07-22 19:56:13 +03:00
Timo Teras 5375efac1a apk: allow-untrusted option
to not make hard error of untrusted or missing signatures
2009-07-22 16:06:34 +03:00
Timo Teras 93f0b3524c various: more informative error messages 2009-07-22 14:56:27 +03:00
Timo Teras 0a7991f70d various: misc fixes
- error codes for verification failure types
- fix some fdb corruption on file migration
- combine some dependency parsing code
- fix versioned dependencies
2009-07-22 14:24:19 +03:00
Timo Teras 680a301511 various: installation fixes
- extract everything as .apk-new and overwrite only after data
  has been checksummed
- url construction fixes (to work with simple http servers)
- end of gunzip stream fixed
- remove oneshot digesting flag for now as it's usage was broken
2009-07-22 11:36:55 +03:00
Timo Teras 772e4aa26a various: fix installation of new style apks 2009-07-21 18:25:22 +03:00
Timo Teras 812483515a pkg: fix indexing of multi-part apks 2009-07-21 17:37:44 +03:00
Timo Teras 84e3786e05 db: fixes to package checksumming while installing it 2009-07-21 13:49:35 +03:00
Timo Teras eca9c22205 db: signed index loading (ref #46)
prefer index in the new format as signed .tar.gz.
2009-07-20 11:13:03 +03:00
Timo Teras 99be653f14 pkg: filenames with '/' cannot be control data 2009-07-20 08:56:53 +03:00
Timo Teras e30834fdcb digest: use oneshot context flag where approriate
speeds up digest calculation on some cases.
2009-07-17 15:56:09 +03:00
Timo Teras 0942832325 index: fix output file permissions, verify signed index (ref #46) 2009-07-17 14:29:02 +03:00
Timo Teras 65be7ade1d pkg: remove debug prints 2009-07-17 14:09:52 +03:00
Timo Teras d694025b91 pkg: fix index generation
that got broke during verify implementation.
2009-07-17 14:06:43 +03:00
Timo Teras 3f4f9e9957 verify: new applet (ref #46)
an utility to check package signature and integrity.
2009-07-17 13:07:52 +03:00
Timo Teras 50fed1063e pkg: .PKGINFO field for data checksum is 'datahash'
in future we might add datahashalg to specify the algorithm used.
2009-07-16 15:32:21 +03:00
Timo Teras 6b471bb614 various: new style index generation
change the index generation to do old index, or the new style index
where package identity is sha1 of control block and it's contained
within an .tar.gz to allow signing in future.
2009-07-16 15:16:05 +03:00
Timo Teras 0f6d96a4f5 gzip: always autoclose the inner stream 2009-07-16 13:47:26 +03:00
Timo Teras 6715a0ba12 pkg: remove support for the deprecated .INSTALL script 2009-07-16 08:52:22 +03:00
Timo Teras ba76c5f48a cache: make cache cleaning work again properly 2009-07-15 15:59:06 +03:00
Timo Teras bfabf8f8d9 pkg: fix package scanner to read whole archive
otherwise we don't get chechksum anymore after the changes to
support partial gzip checksumming.
2009-07-15 08:38:30 +03:00
Timo Teras 981bc118f8 db: live with sha1 and md5
this also convers scripts file to a tar archive.
2009-07-14 19:14:05 +03:00
Timo Teras 8d1eeb58e4 blob: some helpers to replace snprintf
snprintf is dog slow. make the blob stuff have some helper functions
so we can use them in code paths that are executed often.
2009-07-14 13:27:21 +03:00
Timo Teras 4562f44f9b bstream: make tokenizable and load index using bstream
some fixes on index reading code too.
2009-07-14 09:33:47 +03:00
Timo Teras e69b81f525 io: move csumming away from bstream to gunzip
in future we want to checksum on gzip boundary basis, not the
full file.
2009-07-13 20:37:03 +03:00
Natanael Copa 5eab547de6 package: removed debug code 2009-06-22 09:41:49 +00:00
Natanael Copa 4bbed2d648 ver: only compare the given packages, show version
make apk_version_compare() take strings rather than blobs
add apk_pkgversion_compare(), a wrapper that takes packages
2009-06-20 12:38:07 +02:00
Natanael Copa 20a1217e86 add: support for forced versions
Support version numbers specified with packages. For example:

 apk add 'busybox<1.14'
 apk add 'squid=>3.0'
2009-06-16 09:59:21 +00:00
Timo Teras ec5b63c5e4 pkg: clean up writing of dependencies 2009-04-16 17:05:27 +03:00
Timo Teras 968dfbb8b3 pkg: apk_deps_del helper introduced 2009-04-16 16:32:04 +03:00
Timo Teras d6f4fcacd1 pkg: fix apk v1.0 URL field import 2009-04-16 14:03:59 +03:00
Timo Teras a23f6f4afb state: rework changeset calculation algorithm
Calculate changesets directly by stabilizating the package graph instead of
recalculating the whole graph and then diffing (similar approach as seen
in 'smart' package manager). The algorithm is not complete: defferred
search space forking is missing. So you don't always get a solution on
complex graphs.

Benefits:
- usually the search state tree is smaller (less memory used)
- speed relational to changeset size, not database size (usually faster)
- touch only packages related to users request (can work on partitially
  broken state; upgrades only necessary packages, fixes #7)

Also implemented:
- command prompt to confirm operation if packages are deleted or downgraded
- requesting deletion of package suggests removal of all packages depending
  on the package being removed (you'll get list of packages that also get
  removed if you want package X removed)
- option --simulate to see what would have been done (mainly for testing)
- an untested implementation of versioned dependencies and conflicts

A lot has changed, so expect new bugs too.
2009-04-14 18:48:02 +03:00
Timo Teras 7735cc644d pkg: write dependencies directly file instead of buffer
So we don't get artificial limits on the amount of dependencies
(fixes #8).
2009-03-17 13:19:06 +02:00
Timo Teras b75ae58b78 pkg: show warning if deprecated .INSTALL is present in package 2009-02-27 11:32:37 +02:00
Natanael Copa dfc8d4ce4c Revert "Revert "pkg: use absolute filenames for packages""
This reverts commit 600f9e7e03.

My bad. This was correct.
2009-01-21 09:59:12 +00:00
Natanael Copa 600f9e7e03 Revert "pkg: use absolute filenames for packages"
This reverts commit 46430ceb56.
The problem this was suppoed to fix was fixed by letting apk_db_open()
return with same working dir.
2009-01-21 09:04:31 +00:00
Timo Teras 46430ceb56 pkg: use absolute filenames for packages 2009-01-20 14:30:07 +02:00
Timo Teras 3e6fc1389f add: --upgrade|-u to control if upgrading is preferred or not 2009-01-16 13:59:36 +02:00
Timo Teras b7f9f9bdb2 info: implement who owns packages query (apk_info -W)
In quiet mode e.g. "apk info -q -W <file list>" a list of dependencies
suitable for .PKGINFO is output in one line.
2009-01-13 15:22:14 +02:00
Timo Teras ca364e34e2 pkg: use generic blob functions to parse dependencies 2009-01-13 09:32:04 +02:00
Natanael Copa 09385545d9 db, package: new dependency format, second try
dependencies are separated with single space rather than ', '.
makes db file slightly easier to parse from a shell script which
might be handy.
2009-01-11 14:03:55 +00:00