aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
Commit message (Collapse)AuthorAgeFilesLines
...
* audit, db: add etc/apk/protected_files.d and new audit featuresTimo Teräs2012-02-231-46/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #607. audit is now mostly rewritten for the new functionality. And has new features like --check-permissions, --recursive and --packages. $ROOT/etc/apk/protected_files.d/*.list can now contain additional protected paths, one path per line: +etc @etc/init.d -tmp + will include the directory as protected configuration directory. @ considers the directory protected, but will backup only symlinks. - removes any protection lbu should be modified to put include and exclude paths in etc/apk/protected_files.d/lbu.list. Additionally, some packages might provide their own listings. E.g. ssh might want to provide ssh.list with something like: +root/.ssh +home/*/.ssh
* db: fix repositories.d to be loaded only without --repositories-fileTimo Teräs2012-02-221-3/+7
|
* db, io: load repositories also from etc/apk/repositories.d/*.listTimo Teräs2012-02-221-12/+31
| | | | | Load additional repositories from $ROOT/etc/apk/repositories.d/*.list unless --repositories-file is given as parameter.
* db: merge identical repositoriesTimo Teräs2012-02-221-5/+17
| | | | Just in case same repository is mentioned with different tags.
* db, solver, io: scan cache items at startupTimo Teräs2012-02-221-25/+80
| | | | | | It is faster to just scan the cache directory for existing packages at startup than trying to faccessat() them on demand. It also makes quite a few parts of the code more readable and simpler.
* apk: fix some unharmful leaks reported by valgrindTimo Teräs2012-02-171-0/+1
|
* solver, db: repository pinning improvementsTimo Teräs2012-02-151-12/+8
| | | | | | | | * solver internally calculates now using tags; not repository masks * installeddb now contains the tag name where the package came from -> we can now handle upgrades properly * the pinning is still a preference, and not strictly enforced; versioned dependencies may overrule preference
* db: record file uid/gid/mode in installed dbTimo Teräs2012-02-141-2/+26
|
* db: allow directory to have sticky bit, and suid/sgid bits setTimo Teräs2012-02-101-1/+1
|
* db, fix: more secure way to choose effective directory permissionsTimo Teräs2012-02-101-10/+12
| | | | | And implement --directory-permissions for fix-applet to reset all directory uid, gid and modes.
* db: fix directory permissions recalculationTimo Teräs2012-02-101-5/+8
|
* db: smarter handling of directory owner, group and modeTimo Teräs2012-02-101-14/+69
|
* blob: optimize spn and cspnTimo Teräs2012-02-081-2/+7
|
* db: increase hash sizesTimo Teräs2012-02-081-4/+4
|
* db: do not abort on bad repositoriesNatanael Copa2012-02-011-5/+0
| | | | | | | Only show a warning if we have a non-existing repository or bad repository signature but don't abort. This is not to break compat with behaviour in previous releases.
* db: fix bug with --repositoryNatanael Copa2012-02-011-9/+9
| | | | | The 'r' variable is overwritten and no longer holds the repository number.
* pkg, db: fix signature checking for files without control partTimo Teräs2012-01-311-20/+23
| | | | Also clean up handling of signature failures for index files.
* solver, upgrade: properly detect missing repository tagsTimo Teräs2012-01-171-15/+24
| | | | | | | * upgrade needs explicit check so we don't try self-upgrade (which would print additional messages on screen) * add can fix problems, so check against the new world * merge the code in few places
* db: print dependencies referring to missing tags instead of tagsTimo Teräs2012-01-171-6/+11
|
* db: fix loading of world after previous commitsTimo Teräs2012-01-161-3/+3
|
* db: support line feed as 'world' dependency separatorTimo Teräs2012-01-121-4/+8
| | | | | * default writing the world with spaces if a space is found (for backwards compatibility) for now
* solver: print repository tag when committing package changesTimo Teräs2012-01-121-0/+11
|
* db, solver: refuse committing changes if there is missing tagsTimo Teräs2012-01-121-1/+9
|
* db: properly detect when pkg install trigger needs executingTimo Teräs2012-01-061-1/+1
| | | | | call apk_pkg_install() and hlist_tail_ptr() only once. the latter is O(n) and can get very slow.
* solver: report number of (mega)bytes usedTimo Teräs2011-12-271-12/+14
|
* solver, db: implement repository pinningTimo Teräs2011-10-291-11/+42
| | | | | | | | | | | | | | | | | | Improves /etc/apk/repositories format so you can say: http://nl.alpinelinux.org/alpine/v2.3/main @edge http://nl.alpinelinux.org/alpine/edge/main @testing http://nl.alpinelinux.org/alpine/edge/testing After which you can pin dependencies to these tags using: apk add stableapp newapp@edge bleedingapp@testing Apk will now by default only use the untagged repositories, but adding a tag to specific dependency: 1. will prefer that tag for the name 2. allowing pulling in dependencies from that tag (though, it prefers untagged packages to satisfy deps if possible) fixes #575
* pkg: convert struct apk_install_package flags to bitfieldTimo Teräs2011-10-191-2/+2
|
* pkg: introduce "replaces_priority"Timo Teräs2011-10-191-10/+30
| | | | | | | | If two packages replace each other, the one with highes priority will keep the file. Additionally, if we have a package overriding another's file it's remembered and handled properly. This is essentially to allow "policy packages" which just overwrite certain (configuration) files from other package(s).
* pkg, info: remember installed packages "replaces"Timo Teräs2011-10-181-19/+24
| | | | | | | | | | | | | "replaces" is now turned to a full dependency type list, so you can make package overwrite files only certain versions of the package (though, we should probably take this into account already at solution calculation phase). Also make 'info --replaces' print the "replaces" of the package. This is in preparation for the policy package support, which still requires "replacement priority" field to decide which packages' files get the preference.
* solver, db: run triggers in dependency orderTimo Teräs2011-09-141-8/+5
| | | | fixes #738
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* applets: start using solver codeTimo Teräs2011-09-091-6/+1
| | | | | | | | | still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
* apk_database: move APK_DEFAULT_ARCH to headers so that we can use it in ↵William Pitcock2011-07-161-8/+0
| | | | version().
* index: handle errors instead of silently failingTimo Teräs2011-06-281-6/+13
| | | | | | Make indexer keep noise about errors that prevent index generation. Detect certain errors in the APKs better. And also have the applet return error in these scenarios.
* db: more fix for read-only cache remountingTimo Teräs2011-05-271-17/+14
| | | | | remount to read-write before trying to create the cache directory subdirs. fix a fd leak that might prevent remounting back to rw.
* db: remount read-only after the file handles have been closedNatanael Copa2011-05-271-6/+6
| | | | | The apk cache might be on the readonly media so we need wait with remounting til after atleast this filehandle is closed.
* db: fix post-install script error message formattingTimo Teräs2011-05-231-2/+2
|
* db: remount ro cache to rw earlier for update to workTimo Teräs2011-04-221-15/+16
|
* db: Allow override arch when using --rootNatanael Copa2011-04-141-2/+5
| | | | | | | This is so we can do x86 --root installs on x86_64 hosts. Using --arch without --root can make great damage so we only enable it if --root is used.
* fetch: fix fetching of packages with archTimo Teräs2011-04-071-16/+20
|
* apk: fix gcc 4.6 warningsTimo Teräs2011-03-271-2/+1
|
* db: relocate from /var/lib/apkTimo Teräs2011-03-161-47/+59
| | | | | | | | move all files therein to other places. this allows /var to be mounted from harddisk, but rest of system be run from ramdisk. this also removes support for historical version of the scripts database which was obsoleted in 2.0_pre16 (in July 2009).
* db: move lock file to /var/lockTimo Teräs2011-03-161-2/+4
| | | | | | in accordance with FSH. this also to clear /var of apk related things as we might want to run /var as harddisk, but rest of system from ramdisk.
* db: fix cache tmpfs detectionTimo Teräs2011-03-161-1/+1
| | | | comment out the code that was out for testing. duh.
* db, cache: automatically remount cache read-write when neededTimo Teräs2011-03-161-13/+100
| | | | | | .. and back to read-only after finishing with modifications. fixes #512
* db: handle arch similarly to stable branchTimo Teräs2011-03-161-14/+23
| | | | | if package arch is not set, do not append anything to repository. if arch is set, it is appended to repository.
* db: detect tmpfs betterTimo Teräs2011-03-161-1/+4
| | | | Use statfs() filesystem type, instead of the device IDs.
* db: fix package cachingTimo Teräs2011-01-211-2/+2
|
* add: use default arch instead of noarch, improve errorsTimo Teräs2011-01-051-3/+3
| | | | | | | Packages without architecture should get the platforms default architecture (so we are backwards compatible). Only the virtual packages should get 'noarch' by default. Also print full path to the index file which failed.
* db: check and initiailize required package fields before addition to dbTimo Teräs2011-01-041-0/+5
| | | | | The atomization change broke virtual packages because they don't have license or arch set.