Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pabloyoyoista/apk-tools
  • dosisod/apk-tools
  • alxu/apk-tools
  • adamsmyrakle/apk-tools
  • leso-kn/apk-tools
  • Dfe3.jadd/apk-tools
  • Satoshi821/apk-tools
  • zerica/apk-tools
  • kasperk81/apk-tools
  • mbsmith/apk-tools
  • jonasjelonek1/apk-tools
  • jahway603/apk-tools
  • evertheylen/apk-tools
  • dandev486/apk-tools
  • goshhhy/apk-tools
  • Cogitri/apk-tools
  • aither64/apk-tools
  • adamthiede/apk-tools
  • dangowrt/apk-tools
  • Terre31312/apk-tools
  • Lolxc/apk-tools
  • kdaudt/apk-tools
  • fossdd/apk-tools
  • qaqland/apk-tools
  • minitech/apk-tools
  • TmsSl/apk-tools
  • ynezz/apk-tools
  • WhyNotHugo/apk-tools
  • jirutka/apk-tools
  • Rboccardi661/apk-tools
  • nbuwe/apk-tools
  • albertmccumber/apk-tools
  • nekopsykose/apk-tools
  • Newbyte/apk-tools
  • Dashshaded/apk-tools
  • felixonmars/apk-tools
  • Habbie/apk-tools
  • socksinspace/apk-tools
  • ncopa/apk-tools
  • jaiden/apk-tools
  • hnyman/apk-tools
  • alpine/apk-tools
  • huajingyun01/apk-tools
  • calebccff/apk-tools
  • sertonix/apk-tools
  • jvreeland/apk-tools
  • Ansuel/apk-tools
47 results
Show changes
Commits on Source (565)
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 8
[.gitlab-ci.yml]
indent_style = space
indent_size = 2
build/
src/apk
src/apk-test
src/apk.static
src/help.h
test/*.got
test/repos.out
test/repos.stamp
test/test*.out
test/test*.ok
libfetch/*err.h
*.a
*.o
......
stages:
- test
- build
- upload
- release
- test
- build
- upload
- release
variables:
PACKAGE_ENDPOINT: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/"
ALPINE_DEPS: "make gcc git scdoc musl-dev linux-headers openssl-dev zlib-dev lua5.3-dev lua5.3-lzlib cmocka-dev python3-dev"
ALPINE_STATIC_DEPS: "zlib-static openssl-libs-static"
test-legacy:alpine:
image: alpine
stage: test
script:
- apk update
- apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib
- make -j$(nproc) check
tags:
- docker-alpine
- x86_64
.test:alpine:
stage: test
image:
name: alpine
script:
- apk add -u meson $ALPINE_DEPS $ALPINE_JOB_DEPS $ALPINE_STATIC_DEPS zstd-dev zstd-static
- meson setup --auto-features=enabled build
- ninja -C build
- meson setup build-static -Dc_link_args=-static -Ddefault_library=static -Dprefer_static=true
- ninja -C build-static src/apk
- meson test -C build
artifacts:
reports:
junit: build/**/*.junit.xml
test:alpine:
image: alpine
stage: test
script:
- apk update
- apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib meson zlib-static openssl-libs-static
- meson build
- ninja -C build
tags:
- docker-alpine
- x86_64
test:alpine:x86_64:
extends: .test:alpine
variables:
ALPINE_JOB_DEPS: "shellcheck"
tags:
- docker-alpine
- x86_64
test:alpine:x86:
extends: .test:alpine
image:
entrypoint: ["linux32", "sh", "-c"]
docker:
platform: linux/i386
tags:
- docker-alpine
- x86
test:alpine-alt-config:
image: alpine
stage: test
script:
- apk add -u meson $ALPINE_DEPS
- meson setup build -Durl_backend=wget -Dzstd=false
- ninja -C build
tags:
- docker-alpine
- x86_64
test:alpine-muon:
image: alpine:edge
stage: test
script:
- echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
- apk add -u muon $ALPINE_DEPS $ALPINE_STATIC_DEPS zstd-dev zstd-static
- muon setup build
- ninja -C build
- muon setup -Dc_link_args="-static" -Dprefer_static=true -Ddefault_library=static build-static
- ninja -C build-static src/apk
tags:
- docker-alpine
- x86_64
test:alpine-legacy:
stage: test
image:
name: alpine
script:
- apk add -u $ALPINE_DEPS zstd-dev
- make -j$(nproc) check
tags:
- docker-alpine
- x86_64
test:debian:
image: debian
stage: test
script:
- apt-get update
- apt-get install -y make gcc git libssl-dev zlib1g-dev lua5.3-dev lua5.2 lua-zlib-dev sudo meson
- unlink /bin/sh
- ln -s /bin/bash /bin/sh
- meson build
- ninja -C build
tags:
- docker-alpine
- x86_64
image: debian
stage: test
script:
- apt-get update
- apt-get install -y make gcc git libssl-dev zlib1g-dev libzstd-dev lua5.3-dev lua5.2 lua-zlib-dev sudo meson
- unlink /bin/sh
- ln -s /bin/bash /bin/sh
- meson setup build
- ninja -C build
tags:
- docker-alpine
- x86_64
build-static:
stage: build
image: alpinelinux/build-base:latest-$ARCH
script:
- abuild-apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib zlib-static openssl-libs-static
- make -j$(nproc) static
- install -s -m0755 src/apk.static src/apk.static-$ARCH
parallel:
matrix:
- ARCH:
- x86_64
- x86
- armv7
- armhf
- aarch64
- s390x
- ppc64le
- riscv64
artifacts:
paths:
- src/apk.static-*
tags:
- docker-alpine
- $ARCH
stage: build
image: alpinelinux/build-base:latest-$ARCH
script:
- abuild-apk add -u $ALPINE_DEPS $ALPINE_STATIC_DEPS zstd-dev zstd-static
- make -j$(nproc) static
- install -s -m0755 src/apk.static src/apk.static-$ARCH
parallel:
matrix:
- ARCH:
- x86_64
- x86
- armv7
- armhf
- aarch64
- s390x
- ppc64le
- riscv64
artifacts:
paths:
- src/apk.static-*
tags:
- docker-alpine
- $ARCH
make-release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- |-
apk add curl
for artifact in src/apk.static-*; do
! [ -f "$artifact" ] && { echo "No artifacts found"; exit 1; }
ARCH=${artifact#*-}
echo "Uploading binary for $ARCH"
curl --fail -H "JOB-TOKEN: $CI_JOB_TOKEN" -T "$artifact" -o /dev/null ${PACKAGE_ENDPOINT}/$CI_COMMIT_TAG/$ARCH/apk.static
done
- echo "Making a release"
release:
name: $CI_COMMIT_TAG
description: "Release $CI_COMMIT_TAG"
tag_name: $CI_COMMIT_TAG
ref: $CI_COMMIT_TAG
assets:
links:
- name: apk.static (x86_64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/x86_64/apk.static
- name: apk.static (x86)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/x86/apk.static
- name: apk.static (armv7)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/armv7/apk.static
- name: apk.static (armhf)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/armhf/apk.static
- name: apk.static (aarch64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/aarch64/apk.static
- name: apk.static (s390x)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/s390x/apk.static
- name: apk.static (ppc64le)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/ppc64le/apk.static
- name: apk.static (riscv64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/riscv64/apk.static
rules:
- if: $CI_COMMIT_TAG
tags:
- docker-alpine
- x86_64
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- |-
apk add curl
for artifact in src/apk.static-*; do
! [ -f "$artifact" ] && { echo "No artifacts found"; exit 1; }
ARCH=${artifact#*-}
echo "Uploading binary for $ARCH"
curl --fail -H "JOB-TOKEN: $CI_JOB_TOKEN" -T "$artifact" -o /dev/null ${PACKAGE_ENDPOINT}/$CI_COMMIT_TAG/$ARCH/apk.static
done
- echo "Making a release"
release:
name: $CI_COMMIT_TAG
description: "Release $CI_COMMIT_TAG"
tag_name: $CI_COMMIT_TAG
ref: $CI_COMMIT_TAG
assets:
links:
- name: apk.static (x86_64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/x86_64/apk.static
- name: apk.static (x86)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/x86/apk.static
- name: apk.static (armv7)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/armv7/apk.static
- name: apk.static (armhf)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/armhf/apk.static
- name: apk.static (aarch64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/aarch64/apk.static
- name: apk.static (s390x)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/s390x/apk.static
- name: apk.static (ppc64le)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/ppc64le/apk.static
- name: apk.static (riscv64)
url: $PACKAGE_ENDPOINT/$CI_COMMIT_TAG/riscv64/apk.static
rules:
- if: $CI_COMMIT_TAG
tags:
- docker-alpine
- x86_64
......@@ -5,3 +5,4 @@ Natanael Copa <ncopa@alpinelinux.org> <natanael.copa@gmail.com>
Natanael Copa <ncopa@alpinelinux.org> <ncopa@ncopa-laptop.localdomain>
Natanael Copa <ncopa@alpinelinux.org> <ncopa@alpine-netbook.(none)>
Timo Teräs <timo.teras@iki.fi>
q66 <q66@chimera-linux.org> <daniel@octaforge.org>
......@@ -35,7 +35,7 @@ else
Q = @
endif
ifneq ($(findstring s,$(MAKEFLAGS)),)
ifneq ($(findstring -s,$(MAKEFLAGS)),)
quiet=silent_
endif
......@@ -53,19 +53,6 @@ export srctree objtree
TAGPREFIX ?= v
ifneq ($(CI_COMMIT_TAG),)
FULL_VERSION := $(CI_COMMIT_TAG)
else ifneq ($(CI_COMMIT_REF_NAME),)
# GitLab but no tag info, use the 'git describe' from environment variable
# once https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1633
# gets completed and merged upstream.
FULL_VERSION := $(VERSION)
else ifneq ($(wildcard .git),)
FULL_VERSION := $(patsubst $(TAGPREFIX)%,%,$(shell git describe))
else
FULL_VERSION := $(VERSION)
endif
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
export FULL_VERSION RCS_FIND_IGNORE
......@@ -73,6 +60,7 @@ export FULL_VERSION RCS_FIND_IGNORE
##
# Utilities and default flags for them.
PKG_CONFIG := pkg-config
CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
......@@ -82,15 +70,16 @@ SCDOC := scdoc
SED := sed
INSTALL := install
INSTALLDIR := $(INSTALL) -d
LUA := $(firstword $(wildcard /usr/bin/lua5.3 /usr/bin/lua5.2))
CFLAGS ?= -g -O2
CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC
CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu11 -fPIC
CFLAGS_ALL += $(CFLAGS)
LDFLAGS ?= -g
LDFLAGS_ALL += $(LDFLAGS)
export CC AR LD LN SCDOC SED INSTALL INSTALLDIR CFLAGS_ALL LDFLAGS_ALL
export PKG_CONFIG CC AR LD LN SCDOC SED INSTALL INSTALLDIR LUA CFLAGS_ALL LDFLAGS_ALL
build :=
......
......@@ -4,9 +4,10 @@
-include config.mk
PACKAGE := apk-tools
VERSION := 2.12.0
VERSION := $(shell ./get-version.sh "$(FULL_VERSION)" "$(VERSION)")
SO_VERSION := $(shell cat VERSION | cut -d' ' -f1)
export VERSION
export PACKAGE VERSION SO_VERSION
##
# Default directories
......@@ -25,13 +26,22 @@ export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR INCLUDEDIR PKGCONFIGDIR
##
# Top-level subdirs
subdirs := libfetch/ src/ doc/
subdirs := libfetch/ src/ doc/ lua/
##
# Include all rules and stuff
include Make.rules
##
# Globals
URL_BACKEND ?= libfetch
CRYPTO ?= openssl
export URL_BACKEND CRYPTO
CFLAGS_ALL += -DCRYPTO_USE_$(shell echo $(CRYPTO) | tr '[:lower:]' '[:upper:]')
##
# Top-level targets
......@@ -39,15 +49,18 @@ install:
$(INSTALLDIR) $(DESTDIR)$(DOCDIR)
$(INSTALL) README.md $(DESTDIR)$(DOCDIR)
check test: FORCE src/
$(Q)$(MAKE) TEST=y
check test: FORCE
$(Q)$(MAKE) compile
$(Q)$(MAKE) -C test
static:
$(Q)$(MAKE) STATIC=y
tag: check
git commit . -m "apk-tools-$(VERSION)"
git tag -s v$(VERSION) -m "apk-tools-$(VERSION)"
TAG_VERSION=$$(cat VERSION); \
git commit . -m "apk-tools-$${TAG_VERSION}"; \
git tag -s v$${TAG_VERSION} -m "apk-tools-$${TAG_VERSION}"
src/: libfetch/
lua/: src/
......@@ -8,11 +8,22 @@ but now used by several other distributions as well.
The preferred build system for building apk-tools is Meson:
```
# meson setup build --prefix=/
# meson compile -C build
# meson setup -Dprefix=/ build
# ninja -C build
# meson install -C build
```
For bootstrapping without Python, muon is also compatible. All you have to do is replace `meson` with `muon` in the above example.
To build a static apk, pass the right arguments to the above commands:
```
# meson setup -Dc_link_args="-static" -Dprefer_static=true -Ddefault_library=static build
# ninja -C build src/apk
```
Which will give you a `./build/src/apk` that is statically linked.
While there is a legacy Makefile-based system available, it only works for musl-linux
targets, and will be dropped in the apk-tools 3.0 release.
......
3.0.0_rc4
scdocs-y += \
apk-cache.5 \
apk-keys.5 \
apk-package.5 \
apk-repositories.5 \
apk-v2.5 \
apk-v3.5 \
apk-world.5 \
apk.8 \
apk-adbdump.8 \
apk-adbgen.8 \
apk-adbsign.8 \
apk-add.8 \
apk-audit.8 \
apk-cache.8 \
apk-convndx.8 \
apk-convdb.8 \
apk-del.8 \
apk-dot.8 \
apk-extract.8 \
apk-fetch.8 \
apk-fix.8 \
apk-index.8 \
apk-info.8 \
apk-list.8 \
apk-manifest.8 \
apk-mkndx.8 \
apk-mkpkg.8 \
apk-policy.8 \
apk-protected_paths.5 \
apk-query.8 \
apk-stats.8 \
apk-update.8 \
apk-upgrade.8 \
......
apk-adbdump(8)
# NAME
apk adbdump - dump v3 files in textual representation
# SYNOPSIS
*apk adbdump* [<_options_>...] _files_...
# DESCRIPTION
*apk adbdump* will dump the metadata portion of given _files_ (packages,
indexes, installeddb) to its textual representation.
The output can be:
- yaml with annotations as comment
- json data blob
*apk-adbgen*(8) can convert the YAML textual representation back to
the binary format with certain limitations (nested ADB and DATA blocks
are not supported).
# OPTIONS
*--format* _FORMAT_
Specify the output format (options: *json*, *yaml*)
# SEE ALSO
*apk-adbgen*(8), *apk-package*(5), *apk-v3*(5)
apk-adbgen(8)
# NAME
apk adbgen - generate v3 files from text representation
# SYNOPSIS
*apk adbgen* [<_options_>...]
# DESCRIPTION
*apk adbgen* takes in *apk-adbdump*(8) output and convert it back to the
corresponding binary format.
# SEE ALSO
*apk-adbdump*(8), *apk-package*(5), *apk-v3*(5)
apk-adbsign(8)
# NAME
apk adbsign - sign, resign or recompress apk v3 packages or indexes
# SYNOPSIS
*apk adbsign* [<_options_>...] _files_...
# DESCRIPTION
*apk adbsign* will process specified _files_ and add or replace
the signatures in addition to recompressing it. The original compression
algorithm and level is used unless specified.
# OPTIONS
See also *apk*(8) for additional package generation options.
*--reset-signatures*
Remove all existing signatures.
......@@ -2,20 +2,21 @@ apk-add(8)
# NAME
apk add - add packages to _world_ and commit changes
apk add - add or update constraints to _world_ and commit changes
# SYNOPSIS
*apk add* [<_options_>...] _packages_...
*apk add* [<_options_>...] _constraints_...
# DESCRIPTION
*apk add* adds the requested packages to _world_ and installs (or upgrades)
them if not already present, ensuring all dependencies are met.
*apk add* adds or updates given constraints to _world_ (see *apk-world*(5))
and commit changes to disk. This usually involves installing new packages,
but may also cause other changes to the installed packages.
To upgrade individual packages without modifying _world_ use *apk-fix*(8).
By default *apk* tries to select a set of packages so that all dependencies
By default *apk* tries to select a set of packages so that all constraints
are satisfied. This means that some packages can be held back in an older
version if there is direct or implicit dependencies to the older version.
......@@ -33,12 +34,26 @@ following options:
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*--no-chown*
Deperecated alias for --usermode.
*-u, --upgrade*
Upgrade _packages_ and their dependencies. Normally *apk add* will
avoid changing installed package unless it is required by the newly
added _packages_ or their dependencies. This changes the default
preference to upgrading the package to the latest installable version.
*--usermode*
Create usermode database with --initdb. In usermode, apk will operate
in such a way that root access is not required. Currently this implies:
- checking that we are running as non-root
- not changing file owner or group
- not setting system xattrs
This implies that the installation might not be fully functional.
However, this is useful mode for testing purposes or to create
chroot where some specific applications can run as non-root.
*-t, --virtual* _NAME_
Create virtual package _NAME_ with given dependencies. This new package
will get the _packages_ as dependencies instead of _world_. Finally the
......@@ -49,9 +64,3 @@ following options:
One can use this to ensure that selected set of packages are installed,
and later the temporary modification be undone with *apk-del*(8) _NAME_
without removing packages that were installed earlier.
*--no-chown*
Do not change file owner or group. By default apk will manage the file
ownership when running as root. However, this option is turned on when
running as non-root user, as changing file ownership is not permitted
by the system then.
......@@ -87,3 +87,7 @@ then the affected path or details. The changes detected are:
*-r, --recursive*
Descend into directories and audit them as well.
# SEE ALSO
*apk-protected_paths*(5)
......@@ -6,8 +6,8 @@ apk-cache(5)
# DESCRIPTION
If */etc/apk/cache* is a symlink to a local directory, *apk*(8) will it as a
local cache for downloaded package files and repository indicies. The cache
If */etc/apk/cache* is a symlink to a local directory, *apk*(8) will use it as
a local cache for downloaded package files and repository indicies. The cache
must not reside on a tmpfs.
To enable the apk cache, run the following commands as root:
......
......@@ -54,10 +54,9 @@ disk installations.
dependencies cannot be satisfied.
*-u, --upgrade*
Upgrade _packages_ and it's dependencies. Normally *apk add* will
avoid changing installed package unless it is required by the newly
added _packages_ or their dependencies. This changes the default
preference to upgrading the package to the latest installable version.
When caching packages which are already installed, prefer their upgrades
rather than considering the requirement fulfilled by the current
installation.
*-s, --simulate*
Simulate the requested operation without making any changes.
apk-convdb(8)
# NAME
apk convdb - convert v2 installed database to v3 format
# SYNOPSIS
*apk convdb*
# DESCRIPTION
*apk convdb* converts to current installed database to v3 format and
outputs a corresponding *installed.adb* file.
# OPTIONS
*apk convdb* does not support any specific options. See *apk*(8) for global
options.
apk-convndx(8)
# NAME
apk convndx - convert v2 indexes to v3 format
# SYNOPSIS
*apk convndx* _indexes_...
# DESCRIPTION
*apk convndx* reads the specifed _indexes_ and generates and merges them.
The resulting data is written out to stdout in apkv3 index format.
# OPTIONS
*apk convndx* does not support any specific options. See *apk*(8) for global
options.
......@@ -2,16 +2,17 @@ apk-del(8)
# NAME
apk del - remove packages from _world_ and commit changes
apk del - remove constraints from _world_ and commit changes
# SYNOPSIS
*apk del* [<_options_>...] _packages_...
*apk del* [<_options_>...] _constraints_...
# DESCRIPTION
*apk del* removes packages from _world_ and uninstalls them if no longer
required by any other packages.
*apk del* removes constraints from _world_ (see *apk-world*(5)) and
commits changes to disk. This usually involves removing unneeded packages,
but may also cause other changes to the installed packages.
# OPTIONS
......
apk-extract(8)
# NAME
apk extract - Extract package file contents
# SYNOPSIS
*apk extract* [<_options_>...] _files_...
# DESCRIPTION
*apk extract* will extract package contents of specified package file
to the current or to an explicitly specified directory.
Each package is extracted without checking dependencies or other metadata.
If extract is ran as non-root user the file owners and xattrs are not
preserved.
# OPTIONS
*--destination* _PATH_
Extract files to _PATH_.
*--no-chown*
Do not preserve file owner.