Timo Teräs
5a9d8323a0
pkg: add origin, maintainer, build_time and commit id to index
...
Parse these fields from .PKGINFO, and write them to index.
2011-04-04 14:05:52 +03:00
Timo Teräs
28dcd5d3b3
pkg: recognize install_if
...
Parse install_if from package metadata and include it in the
indexes. Also setup the reverse install_if dependencies when
loading a database. ref #443 .
Actual install_if functionality is not yet implemented.
2011-01-04 10:05:20 +02:00
Timo Teräs
d8ba07e484
pkg, db: allow index with unsupported features to be loaded
...
Just disable installation of packages using the new stuff. Also
flag lower case package info fields as non-critical and allow
installation even if that features is not supported.
2011-01-03 21:06:41 +02:00
Timo Teräs
1c7e8d2617
pkg: dependencies to specific package checksum
...
When package is installed from commandline, we should always
install that specific instance of package (never favor repository
version if it has difference identity). Otherwise we might not
always end-up installing the .apk given on command line. The
dependency is now against specific checksum identity (marked
with >< dependency comparison). Fixes #492 .
2011-01-01 16:58:58 +02:00
Timo Teräs
6582676150
various: use APK_DEPMASK_REQUIRE where applicable
...
.. instead of the longer flag combo.
2011-01-01 16:04:42 +02:00
Timo Teräs
0cc41ba4dc
index: remove support of old index format
...
It's no longer needed or used.
2011-01-01 12:17:06 +02:00
Timo Teräs
972bec3210
various: use 'atoms' for certain package field and misc fixes
...
- implement a hash table for commonly shared fields such as
license, version and architecture
- use macroes to print blobs or pkgname-pkgver strings
- fix some old cruft
2010-12-14 19:51:16 +02:00
Timo Teräs
fca1c30b80
pkg, db: add preliminary support for arch field
...
Architecture is now:
- parsed from .PKGINFO
- written to index and installed db
- appended to repository URL when fetching files
2010-12-14 17:06:29 +02:00
Timo Teräs
1f985b9d0f
pkg: remove support for obsolete APKv1 (alpine-1.8 and earlier)
...
should not be needed anymore.
2010-12-10 16:29:40 +02:00
Timo Teräs
19419f1a88
io, db: id cache should be specific to database root, not system root
...
Otherwise we end up using wrong uid/gid mappings when doing install
to alternate system root. Fixes #434 .
2010-10-08 15:36:54 +03:00
Natanael Copa
b4adf7645f
Fix building on eglibc
...
Seems like recent eglibc requires that you include sys/stat.h
2010-08-30 13:04:25 +00:00
Timo Teräs
3062d681f9
archive: honor username/groupname instead of uid/gid
...
Take the uid/gid from passwd and group.
2010-06-12 13:43:29 +03:00
Timo Teräs
43cb554c3f
various: use O_CLOEXEC and add some error checking
2010-06-11 13:42:21 +03:00
Natanael Copa
3ec82a5a42
First steps for libapk
2010-06-11 07:02:18 +00:00
Timo Teräs
7be853e637
all: rework how arrays work
...
Instead of having a null pointer, use a dummy array which just
says the array is empty. This helps in multiple places of the code
which would otherwise need explicitly need to check first if the
array exists. This has been cause of multiple seg.faults in the
past as the array check is easily omitted.
This also removes (or fixes) all existing checks accordingly.
2010-06-05 12:33:54 +03:00
Timo Teräs
ce3cf8bff9
db, pkg: fix triggers related crash
...
clean up the triggers properly, in proper order.
2010-06-01 16:46:53 +03:00
Timo Teräs
038b672061
state: improve error messages from dependency failures
...
Print more information why installation changeset calculation failed.
Fixes #187 .
2010-06-01 11:49:32 +03:00
Timo Teräs
fe55da7074
package: don't leak signing key file fd
...
openssl BIO does not close the fd unless we explicitly tell it to
do so.
2010-05-26 14:30:08 +03:00
Timo Teras
d0909569c6
apk: --overlay-from-stdin
...
get list of overlay files from stdin, so those do not get overwritten.
2009-12-21 14:14:02 +02:00
Timo Teras
aebe73549f
pkg: fix parsing of empty dependencies
...
if the dependencies are empty with only trailing new line, the
parsing was incorrect. fix the new line check.
2009-09-16 20:23:34 +03:00
Timo Teras
6b94ed8a7a
fix: parse pkgfile properly ( fixes #132 )
...
accept also pkgfile in addition to pkgname. make also the signature
verification stuff work properly again with non-repository files.
2009-08-13 14:33:43 +03:00
Timo Teras
279513bfbe
db: implement triggers ( fixes #45 )
2009-08-13 14:10:30 +03:00
Timo Teras
36b5cee98b
db, pkg: separate structure for fields of installed packages
...
this makes the database package entry smaller, and we propbably
get more fields to installed_package later too. this cleans up
the way scripts are stored and is a preparation for supporting
triggers. some parsing for trigger meta-data. ref #45 .
2009-08-12 19:17:46 +03:00
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