Commit Graph

326 Commits (ced1fa83d6361ebfdc40920d98eb292ca4661b4e)

Author SHA1 Message Date
Timo Teras ced1fa83d6 state: indent package lists 2009-08-06 15:34:33 +03:00
Timo Teras 974a00bc5f state, update: fixes 2009-08-06 14:50:51 +03:00
Timo Teras ecdacd1503 all: implement database open options
so user can override trusted keys directory and repositories file.
2009-08-06 14:25:03 +03:00
Timo Teras fac43e2d60 db: make missing index non-fatal
it's a warning not an error to have non-existant repository.
bad signature means tampering; but we might want to just ignore
those. this is especially important if we have http repositories
and we are bootstrapping (without network).
2009-08-06 13:12:26 +03:00
Timo Teras 20b3c7c8b3 audit: do not load repositories
they are not needed, and cause errors if signing keys are not
present.
2009-08-06 13:09:38 +03:00
Timo Teras 0b2052ed06 state: ignore missing world dependencies with --force and --quiet 2009-08-06 11:47:44 +03:00
Timo Teras 6f1de8cd53 db: command line repositories take preference
over the ones in config file. also remove the apk_root == NULL
check as this cannot happen anymore. a valid root is always
required.
2009-08-06 10:17:28 +03:00
Timo Teras 7419771b02 audit: fix --backup 2009-08-06 08:57:50 +03:00
Timo Teras 2cfca5b6ed info: fix a --exists to work if the name is non-existant 2009-08-05 19:11:32 +03:00
Timo Teras 8c81102268 apk-tools-2.0_rc1 2009-08-05 16:59:48 +03:00
Timo Teras 4bedcb02ec build: update make rules 2009-08-05 16:58:12 +03:00
Timo Teras f14cbbf4e5 info: support dependency style tests in package existance checking 2009-08-05 15:36:46 +03:00
Timo Teras 46e9329568 io: flag for following symlinks on fstat
usually we are interested on the actual file's length. but
audit is interested about the link. so add a flag for this and
use it in audit.
2009-08-05 13:13:52 +03:00
Timo Teras 856181a032 fetch: --link is -L for short, not -l 2009-08-05 12:45:02 +03:00
Timo Teras 1a67a8e2b6 state: world might be empty
so do not choke on it.
2009-08-05 12:28:00 +03:00
Timo Teras bb77b01244 index: root is needed for signing keys
so initialize db with a root, but avoid loading state or
repositories.
2009-08-05 09:28:25 +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 1fea5639b4 fix: new applet to reinstall and fix package
also makes it possibly to upgrade package without adding it to
top-level deps. fixes #69.
2009-08-04 15:19:29 +03:00
Timo Teras ec2ade1542 state: fix world dependencies to be honored always
previously they might have been skipped on certain situations.
this also fixes some other reverse dependency enforcements and
implements new "pending" state for locked name.
2009-08-04 13:57:54 +03:00
Timo Teras 8c19869c29 db: return hard error if repository opening fails
otherwise we can accept unsigned repositories, and install bad
packages.
2009-08-04 11:08:19 +03:00
Timo Teras 6f8526da3e del: add '-r' to remove top-level dependencies recursively
and by default just update the world, and dump a lost of packages
that are not removed. fixes #47.
2009-08-04 10:57:33 +03:00
Natanael Copa 59dcbfefee archive: compile fix
We need the define for uint16
2009-08-03 11:42:26 +02:00
Timo Teras 1029d15ecd db: jump through hoops to get checksums for hardlinks
should really fix abuild-tar.
2009-07-31 20:05:04 +03:00
Timo Teras 4a5147ff42 audit: sanitize --system
make the system audit compare only installed files, instead of
scanning the whole file system. also make it print only package
names with -q, so reinstalling modified packages becomes easy.
2009-07-31 19:35:45 +03:00
Timo Teras 123226bad2 db: load cache's installed index only if cache is active
other wise cache_fd points to var/lib/apk and contains the real
installed db causing it to be loaded twice.
2009-07-31 19:35:08 +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 67108bf07a io: fix corruption of big files on mmap write
remember to increment destination pointer; and munmap the proper
base address.
2009-07-31 10:50:55 +03:00
Natanael Copa fe43d8ab1d db: allow update of untrusted index 2009-07-30 19:16:37 +00:00
Natanael Copa b3596ff247 verify: report missing files rather than segfault 2009-07-30 14:29:20 +00:00
Timo Teras c1fe6d08f3 db: fix checksum storing to db
also take precautions in audit code if the db is missing the
checksum.
2009-07-30 11:55:59 +03:00
Timo Teras 02cb0d2f8f apk-tools-2.0_pre17 2009-07-30 11:03:03 +03:00
Timo Teras 5b48b85560 audit: protection mask for "symlinks only"
and use it for /etc/init.d by default. fixes #99.
2009-07-30 10:42:20 +03:00
Timo Teras 60c668f1dc io: keep static pointer to copying buffer
so we avoid some malloc/free calls.
2009-07-30 09:11:14 +03:00
Timo Teras 8e4075e6b1 io: fix mmap writing to actually work
apparently it needs to have both PROT_READ and PROT_WRITE. and
it needs to be MAP_SHARED for the writing to be effective. oh,
and the data needs to be preallocated with ftruncate; otherwise,
one gets SIGBUS.
2009-07-30 09:07:35 +03:00
Timo Teras 49420239c2 apk-tools-2.0_pre16 2009-07-29 20:32:08 +03:00
Timo Teras f482701eee db: fix protected directory handling (fixes #89)
we don't want to do checksumming of existing files unless it's
in a protected directory. also, we keep the original file if it's
*modified*.
2009-07-29 19:39:59 +03:00
Timo Teras 2ff4059b9a io: use mmap to write archive entries to disk
avoids some copying and system calls.
2009-07-29 19:33:52 +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 2887e04cd7 build: make install depend on main targets
apparently the double colon rule dependencies affect only the
specific rule-set.
2009-07-29 19:07:14 +03:00
Timo Teras 8cacc96bf0 tar: don't call digest finalization twice
otherwise bad things happens. avoid this be checking end of
stream at the beginning of read.
2009-07-29 19:06:10 +03:00
Timo Teras 0d9810ea6a apk-tools-2.0_pre15 2009-07-24 16:54:03 +03:00
Timo Teras 6092865d85 add, fetch: make handling of special options more logical 2009-07-24 14:23:33 +03:00
Timo Teras 1c92602172 apk: add -i/--interactive option (fixes #60)
and use that to figure if questions are allowed or not instead
of the verbosity level.
2009-07-24 14:18:45 +03:00
Timo Teras 195859b3fd db: fix repository write locking 2009-07-24 14:12:59 +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 e1b489c8b5 db: increase required verbosity for filename prints 2009-07-24 14:04:57 +03:00
Timo Teras c8c52e1dc6 db: remove APK_NAME_VIRTUAL flag
use the package 'installed_size' == 0 as a test instead for
dependency only packages.
2009-07-24 14:02:56 +03:00
Timo Teras e5be34335c db: create cache index with non-repository packages
this enables virtual packages and files specified from command
line to work on non-harddisk installs.
2009-07-24 14:00:57 +03:00
Natanael Copa 8806ce875e archive: append .apk-new to hard link targets
Otherwise will link(2) fail since it does not exist.
2009-07-23 13:19:48 +00:00
Timo Teras 042879f417 index: fully process archive when reading index for signature check
can't cancel an index reading or we lose signature checking.
2009-07-23 11:41:10 +03:00