Commit Graph

883 Commits (c6d273fc34605ed5655a36fda2e35d0a2d85969b)

Author SHA1 Message Date
Timo Teräs c6d273fc34 apk-tools-2.6.0_rc4 2015-04-24 10:12:03 +03:00
Timo Teräs 997aa99e3d do not extract files with malicious name
the security implications are not as high as compared to regular
tar/unzip archiver. this is because you are anyway trusting
the package to install files anywhere in the filesystem.

this serves rather as a sanity to check against errors in created
package.
2015-04-24 09:54:54 +03:00
Timo Teräs c4960a1a7d allow virtual packages beginning with dot by default on tmpfs installs
the allows update-kernel script to work on tmpfs install before
cache is configured.
2015-04-24 09:33:09 +03:00
Timo Teräs fd98e9c718 modifications for the previous commit in error message handling
forgot to --amend my changes
2015-04-24 09:32:22 +03:00
Alex Dowad 74dc8e232f print.c: provide more detailed error messages if retrieving a package fails
fetch_maperror() translates error codes returned by libfetch to our error
codes. Handle those in apk_error_str(), returning error messages which
advise the user of the most likely fix.

A custom error code, EAPKSTALEINDEX, has been added for cases where
retrieving a package fails due to a HTTP error 404 or similar.

[TimoT: add also EAPKBADURL, as well as organize a bit better where the
EAPKSTALEINDEX is generated]
2015-04-22 20:08:16 +03:00
Alex Dowad be31eb24d8 io: fix compiler error by including stdint.h
According to the C standards, uint32_t is defined in stdint.h.
Presumably apk is usually built against C libraries where
stdint.h is indirectly included through another header file,
but this isn't the case with the version of glibc which I am using.
2015-04-22 10:50:31 +03:00
Timo Teräs 0ed9a55b7d apk-tools-2.6.0_rc3 2015-04-17 11:21:06 +03:00
Timo Teräs 1a5d6d06d6 fix issue introduced in previous xattr error handling changes 2015-04-17 10:34:49 +03:00
Timo Teräs 820098d6ad disable xattrs on symlinks for now
there's no nice syscall to manipulate xattrs with atfd and
or open the symlink without dereferencing it (and having fd
that we can do xattrs with)
2015-04-17 10:07:49 +03:00
Timo Teräs 90e760339e make file install errors non-fatal, and xattr errors hidden
user xattrs on tmpfs are not supported no non-grsec kernels,
and many times root fs is mounted without user_xattr. Thus
to allow things to go smoothly on non-grsec kernels xattr
unsupported errors are now hidden.

xattrs can be fixed still now with "apk fix --xattrs"
2015-04-17 10:05:10 +03:00
Timo Teräs 60867c47c5 apk-tools-2.6.0_rc2 2015-04-13 10:43:55 +03:00
Timo Teräs 3490ff789a fix tee io error handling
use ERR_PTR mechanism, and handle it at all places.
2015-04-13 09:42:27 +03:00
Timo Teräs 4395532932 fix error mapping types
on arm char is by default unsigned, so this caused crashes
as the ERR_PTR mechanism did not work as expected with unsigned
types. extend the array type to be signed short explicitly.
2015-04-13 09:42:27 +03:00
Natanael Copa 2322ba0ad9 update: return errors also with --quiet
fixes #4040
2015-04-10 17:33:21 +00:00
Timo Teräs 60dd5798c9 use memmove for copying buffer leftovers, as the ranges may overlap
issue cought by fortify
2015-04-08 16:58:20 +03:00
Timo Teräs 29bb67e01e apk-tools-2.6.0_rc1 2015-04-08 11:25:53 +03:00
Timo Teräs 9ed5a60dec unbreak audit after xattr support 2015-04-08 11:16:46 +03:00
Timo Teräs 23d0a2244a ignore .apk-new files for overlays 2015-04-08 11:08:16 +03:00
Timo Teräs 941fc1b10c make default dir/file acl implicit
apk in alpine 3.1 already supports this optimization, but kept
the database format. now is time to start using this feature.
2015-04-08 10:58:00 +03:00
Timo Teräs 83ab022301 audit xattrs
ref #3027
2015-04-08 10:27:49 +03:00
Natanael Copa 944eae4b27 update: return failure if any mirror update failed
fixes #4040
2015-04-07 10:49:51 +02:00
Natanael Copa 7e3f4c3d79 commit: return failure if there are any errors
fixes #4019
2015-04-07 10:49:51 +02:00
Timo Teräs 8d1ec4c5bc calculate and store checksum of xattrs
ref #3027
2015-03-11 16:10:33 +02:00
Timo Teräs da6e455f70 rename file info related functions for consistency 2015-03-10 15:47:13 +02:00
Timo Teräs be8e133c0b extract xattrs from packages
ref #3027
2015-03-10 14:38:06 +02:00
Timo Teräs 255fd81d79 rework error handling for write streams 2015-03-10 13:15:58 +02:00
Timo Teräs 2a6896b2b4 rework error handling for read streams 2015-03-10 13:15:31 +02:00
Timo Teräs 417755cb2e apk-tools-2.5.0 2015-02-04 13:17:12 +02:00
Timo Teräs 4c1cdf5b9c remove old compat. field entry from installed db handling
Package pinning was first implemented with 'p' tag. However, it
was before any release renamed to 's', and 'p' was reserved for
package provides support for which is used now.
2015-02-04 11:54:08 +02:00
Timo Teräs 43182c02f4 remove spurious audit message from missing files with --system
fixes #3840
2015-01-30 16:12:45 +02:00
Timo Teräs cab03b6912 sort world dependencies alphabetically
this makes 'lbu diff' and aaudit diffs nice when a world
dependency is added or removed. sorting also makes the ordering
more deterministic as the world targets constraints are always
applied in the same order. test suite updated accordingly.
2015-01-30 15:53:11 +02:00
Timo Teräs cd6786bc30 always save 'world' with line feeds
using space was for backwards compatibility with apk-tools 2.2.2
and earlier (from January 2012)
2015-01-30 14:40:00 +02:00
Timo Teräs c553970061 remove support for old database location in /var
the location changed in apk-tools 2.1.0 (March 2011) which was
used in Alpine Linux 2.2.
2015-01-30 14:35:02 +02:00
Timo Teräs 0276e22731 remove reverse dependencies first
when removing large sets of packets, the ordering of removal
was not quaranteed to honor dependencies. this fixes the removal
order to be in reverse dependency order as far as possible.
2015-01-30 14:30:15 +02:00
Timo Teräs 02cd5a9c76 make del, fetch, fix and info return errors
In case all applet arguments are packages names (that is are not
including wildcards), return error if they do not match to some
package.
2014-12-08 08:31:41 +02:00
Timo Teräs 6697ed5e86 fix test mode 2014-12-08 08:30:35 +02:00
Timo Teräs cbfd1ec1ab apk-tools-2.5.0_rc1 2014-11-03 16:05:15 +02:00
Kaarle Ritvanen f726e672c0 db: assign write permission to lock file
Allows running apk as an unprivileged user, e.g. with fakeroot.
Opening the lock file fails without the write permission.
2014-11-03 14:56:07 +02:00
Timo Teräs b80aba0b5a move --simulate to commit options group and alias -s for it 2014-11-01 20:29:38 +02:00
Timo Teräs 4f823f2a50 make 'mode, uid, gid' triplet separate atomized struct
there are only few combinations for that triplet, and they
occur multiple times reducing the struct sizes a bit. make
sane defaults and prepare to not write defaults to disk
to reduce on-disk installed db size.
2014-11-01 20:18:57 +02:00
Timo Teräs 36d5b91495 support extended pax header in tar extractor 2014-11-01 19:17:06 +02:00
Timo Teräs bb1ac2557d db: improve and unify fdb error messages 2014-10-13 13:33:19 +03:00
Timo Teräs 82713dc389 db: unconditionally refresh index with --force 2014-10-09 19:32:48 +03:00
Timo Teräs 38e3f54638 rework option parsing to have a group structure
Add also a new 'commit' group that is the common options
for all applets that can commit package changes.
2014-10-08 15:29:27 +03:00
Timo Teräs 275dd16c42 url: fix double free from late libfetch changes 2014-10-08 15:29:04 +03:00
Timo Teräs 32627939f5 io,url,db: support for if-modified-since 2014-10-08 11:13:21 +03:00
Timo Teräs 555363f056 url: use libfetch to retrieve http/https/ftp files 2014-10-08 10:10:45 +03:00
Timo Teräs aab5f46959 apk-tools-2.4.5 2014-10-08 08:12:41 +03:00
Timo Teräs 5496560a4f db: fix crash if unable to download cache item
fixes #3371
2014-10-07 17:05:06 +03:00
Timo Teräs 1bbca16333 io: fix few error path leaks 2014-10-07 17:04:38 +03:00