summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* url: use always busybox wgetTimo Teräs2011-01-011-1/+1
| | | | | | | I think there used to be problems with using http_proxy on bb wget, but those have been fixed for quite some time. This fixes #347. We should probably use libcurl or similar library eventually, but I'm not entirely sure if/when we want that.
* gunzip: fix ordering of boundary callbacksTimo Teräs2010-12-171-8/+24
| | | | | | | | | | The boundary callback should not happen until all the uncompressed data has been consumed. This previously seems to have worked because normally gzip library returns "no error" instead of the "stream end" if we extract exactly the amount of bytes remaining in the archive. (Perhaps this was changed in new zlib.) In any case, verification was broken with some apks due to this callback ordering issue.
* info: return error if owning package was not foundNatanael Copa2010-12-151-3/+6
|
* various: use 'atoms' for certain package field and misc fixesTimo Teräs2010-12-1415-109/+184
| | | | | | | - 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
* pkg, db: add preliminary support for arch fieldTimo Teräs2010-12-145-8/+33
| | | | | | | Architecture is now: - parsed from .PKGINFO - written to index and installed db - appended to repository URL when fetching files
* db: remove support for unsigned repository indexTimo Teräs2010-12-103-40/+11
| | | | Unsigned indexes should not be needed anymore anyway.
* pkg: remove support for obsolete APKv1 (alpine-1.8 and earlier)Timo Teräs2010-12-101-63/+0
| | | | should not be needed anymore.
* db: print full url/filename of the failing packageTimo Teräs2010-12-091-24/+27
| | | | .. instead of the pkgname-pkgver string.
* io: enhance istream/bstreams with pipe to forked childTimo Teräs2010-12-097-22/+84
| | | | | * prunes the child pid to avoid zombies * handles the errors so e.g. file-not-found is reported properly
* blob: fix segfault on x86_64 with --virtualNatanael Copa2010-11-231-1/+1
| | | | | | | blob.ptr might be non-null on empty field in /var/lib/apk/installed so we compare with blob length. This fixes a segfault on x86_64.
* db: fix hash lookups on 64-bit machinesTimo Teräs2010-11-231-1/+1
| | | | | | The hash is 'unsigned long' everywhere which is 64-bits (on 64-bit boxes). Fix the one instance of it being 'unsigned int' since that would be 32-bit and cause lookup failures on 64-bit boxes.
* db: fix the previous commitTimo Teräs2010-10-082-3/+3
| | | | | id cache needs to be initialized early. and group database filename is surprisingly 'group'.
* io, db: id cache should be specific to database root, not system rootTimo Teräs2010-10-0810-63/+93
| | | | | Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
* archive: resolve uid, gid for file informationTimo Teräs2010-09-231-6/+3
| | | | | the uid and gid are used in other places than just changing file ownership on extraction.
* db: optionally remove dirs when unrefNatanael Copa2010-09-221-13/+15
| | | | | | | | | | We want remove dirs when they are unreferenced so we remove all dirs on apk del, but we don't want remove dirs when closing database. So we make removing dir optional when unreferencing it. This partially reverts commit c7ffc96a16c6963fe0a07be7ee75e8f1f7426882. fixes #406
* Fix building on eglibcNatanael Copa2010-08-304-0/+4
| | | | Seems like recent eglibc requires that you include sys/stat.h
* static build: do not use openssl enginesTimo Teräs2010-06-303-1/+7
| | | | | We want minimal static build. And this now also breaks with our openssl since it tries to automatically dlopen some of the engine modules.
* Makefile: do not require lua pkgconfig unless you intend build lua moduleNatanael Copa2010-06-161-5/+6
|
* upgrade: warn (do not fail) on missing top-level package namesTimo Teräs2010-06-151-3/+23
| | | | We we can upgrade rest of system just fine then.
* state: handle properly packages which are installedTimo Teräs2010-06-151-0/+3
| | | | | | Installed package does not need to be checked for availability. Account for packages missing if they get pruned out due to installability check.
* db: reinitialize trigger_pkg_list node after deletionTimo Teräs2010-06-151-0/+1
| | | | | The trigger list can be reused after it's cleared, make sure the list node is initialized all the time.
* Makefile: Don't build or install the libapk and lua module by defaultNatanael Copa2010-06-141-10/+29
| | | | | | | | | | | | | | | | | | | | Make the libapk and lua module optional at buildtime and off by default. This is because enabling libapk requires that mkinitfs also copies the libapk.so or the initramfs will not work. To build libapk: make LIBAPK=yes To build lua module (will enable LIBAPK=yes): make LUAAPK To link apk to libapk (will enable LIBAPK=yes): make SHARED_LIBAPK=yes All the above applies to make install target as well.
* db: --simulate never needs write access to dbTimo Teräs2010-06-121-0/+4
| | | | | So open the db in read-only mode instead. This allows --simulate to be run as non-root user.
* archive: honor username/groupname instead of uid/gidTimo Teräs2010-06-125-1/+140
| | | | Take the uid/gid from passwd and group.
* various: use O_CLOEXEC and add some error checkingTimo Teräs2010-06-116-31/+30
|
* build: fix CFLAGS, and use pkg-config for luaTimo Teräs2010-06-111-5/+4
|
* print: clean up after copy-pasteNatanael Copa2010-06-113-5/+2
|
* db: make apk_wait a part of dboptsNatanael Copa2010-06-113-8/+8
|
* lua: initial lua moduleNatanael Copa2010-06-112-2/+74
|
* First steps for libapkNatanael Copa2010-06-1122-74/+142
|
* db: do not free trigger list after package is unpackedNatanael Copa2010-06-101-6/+6
| | | | | | | | The triggers are read during apk_db_unpack_pkg(). If we delete the triggers list after then unpack we delete the triggers which is not what we want. This fixes bug introduced in ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f
* info: fix usage of arraysTimo Teräs2010-06-081-4/+4
|
* state: fix error printingTimo Teräs2010-06-082-2/+6
|
* db: fix usage of apk_name_array in install_ctxTimo Teräs2010-06-071-4/+4
| | | | | got broken to the previous array cleanup and grepping struct definition only from headers.
* all: rework how arrays workTimo Teräs2010-06-0514-121/+137
| | | | | | | | | | 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.
* state: fix a crash in error printingTimo Teräs2010-06-031-1/+1
|
* db, pkg: fix triggers related crashTimo Teräs2010-06-012-8/+11
| | | | clean up the triggers properly, in proper order.
* state: print missing package names on errorTimo Teräs2010-06-012-8/+23
| | | | | especially important if the package requested from command line does not exist. otherwise we would not print an error at all.
* state: improve error messages from dependency failuresTimo Teräs2010-06-0110-88/+197
| | | | | Print more information why installation changeset calculation failed. Fixes #187.
* state: modify reinstallation printsTimo Teräs2010-05-271-8/+11
| | | | | To print upgrading if package is actually being changed instead of pure reinstall.
* state: show changed packages as upgradesTimo Teräs2010-05-271-2/+10
| | | | | If version is equal, but package contents are different we should show the package being upgraded.
* state: fix deletion of obsoleted dependenciesTimo Teräs2010-05-271-1/+2
| | | | | | | In addition to autocleaning dependencies on deletion, we need to autoclean the old package on upgrade too. This is to make sure that obsoleted dependencies (existed previously, but not in new package) are removed where appropriate.
* package: don't leak signing key file fdTimo Teräs2010-05-261-1/+1
| | | | | openssl BIO does not close the fd unless we explicitly tell it to do so.
* search: add search for reverse dependencies in indexTimo Teräs2010-05-191-57/+91
| | | | So it'll be easier to rebuild affected packages. Fixes #349.
* upgrade: reset versioned deps in world when doing upgrade -aNatanael Copa2010-05-121-2/+7
| | | | | | | | | | | Doing "apk add file.apk" adds a versioned dependency to allow downgrading, and sticky version. Most often this is to install single packages from newer repository. So it would make sense to reset them to non-versioned if doing: apk upgrade -a fixes #346
* info: fix querying of removed, but referenced packagesTimo Teras2010-05-051-1/+1
| | | | | Check that package name has packages associated with it before dereferencing the pointer. Fixes #345.
* state: virtual packages are always installableTimo Teras2010-03-151-0/+2
| | | | | they do not have any package associated. this is indicated by package with zero installed_size.
* state: check package availability alwaysTimo Teras2010-03-101-7/+16
| | | | | | even if we have only one package as candidate, we need to check it's availability. otherwise we can endup with bad changeset referring to unavailable package.
* fetch: do not include installed non-repository files in searchTimo Teras2010-03-043-13/+19
| | | | | we do not create mirror repositories from other valid repositories, not from what was installed locally.
* cache: do not download files existing in local repositoryTimo Teras2010-03-011-1/+1
| | | | wget:ing local files results in error and is useless.