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
  • Conan_Kudo/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
  • jvreeland/apk-tools
  • Ansuel/apk-tools
  • sertonix/apk-tools
48 results
Show changes
Commits on Source (911)
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
src/apk
src/apk-test
src/apk.static
test/*.got
test/repos.out
test/repos.stamp
test/test*.out
test/test*.ok
src/help.h
libfetch/*err.h
*.a
*.o
......
stages:
- test
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
- make -j$(nproc) check
tags:
- docker-alpine
- 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: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: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 sudo
- unlink /bin/sh
- ln -s /bin/bash /bin/sh
- make -j$(nproc) check
tags:
- docker-alpine
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 -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
A. Wilcox <AWilcox@Wilcox-Tech.com>
Ariadne Conill <ariadne@dereferenced.org> <nenolod@dereferenced.org>
Ariadne Conill <ariadne@dereferenced.org> <kaniini@dereferenced.org>
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>
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software
is covered by the GNU Lesser General Public License instead.) You can apply
it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish), that you receive source code or can get it if you want it, that you
can change the software or use pieces of it in new free programs; and that
you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of
the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You
must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If
the software is modified by someone else and passed on, we want its recipients
to know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will individually
obtain patent licenses, in effect making the program proprietary. To prevent
this, we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms
of this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or translated
into another language. (Hereinafter, translation is included without limitation
in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program
is not restricted, and the output from the Program is covered only if its
contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the Program
does.
1. You may copy and distribute verbatim copies of the Program's source code
as you receive it, in any medium, provided that you conspicuously and appropriately
publish on each copy an appropriate copyright notice and disclaimer of warranty;
keep intact all the notices that refer to this License and to the absence
of any warranty; and give any other recipients of the Program a copy of this
License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it,
thus forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all
of these conditions:
a) You must cause the modified files to carry prominent notices stating that
you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of this
License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the most
ordinary way, to print or display an announcement including an appropriate
copyright notice and a notice that there is no warranty (or else, saying that
you provide a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this License.
(Exception: if the Program itself is interactive but does not normally print
such an announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Program, the distribution of the whole must be
on the terms of this License, whose permissions for other licensees extend
to the entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise
the right to control the distribution of derivative or collective works based
on the Program.
In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage
or distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under Section
2) in object code or executable form under the terms of Sections 1 and 2 above
provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code,
which must be distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give
any third party, for a charge no more than your cost of physically performing
source distribution, a complete machine-readable copy of the corresponding
source code, to be distributed under the terms of Sections 1 and 2 above on
a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute
corresponding source code. (This alternative is allowed only for noncommercial
distribution and only if you received the program in object code or executable
form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation
of the executable. However, as a special exception, the source code distributed
need not include anything that is normally distributed (in either source or
binary form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component itself
accompanies the executable.
If distribution of executable or object code is made by offering access to
copy from a designated place, then offering equivalent access to copy the
source code from the same place counts as distribution of the source code,
even though third parties are not compelled to copy the source along with
the object code.
4. You may not copy, modify, sublicense, or distribute the Program except
as expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses terminated
so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the Program
(or any work based on the Program), you indicate your acceptance of this License
to do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor
to copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of
the rights granted herein. You are not responsible for enforcing compliance
by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement
or for any other reason (not limited to patent issues), conditions are imposed
on you (whether by court order, agreement or otherwise) that contradict the
conditions of this License, they do not excuse you from the conditions of
this License. If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations, then as
a consequence you may not distribute the Program at all. For example, if a
patent license would not permit royalty-free redistribution of the Program
by all those who receive copies directly or indirectly through you, then the
only way you could satisfy both it and this License would be to refrain entirely
from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system, which is implemented by public license practices.
Many people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose
that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original copyright
holder who places the Program under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this
License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program specifies
a version number of this License which applies to it and "any later version",
you have the option of following the terms and conditions either of that version
or of any later version published by the Free Software Foundation. If the
Program does not specify a version number of this License, you may choose
any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this.
Our decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing and reuse
of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively convey the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
<one line to give the program's name and an idea of what it does.>
Copyright (C)< yyyy> <name of author>
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when
it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,
and you are welcome to redistribute it under certain conditions; type `show
c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may be
called something other than `show w' and `show c'; they could even be mouse-clicks
or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
(which makes passes at compilers) written by James Hacker.
<signature of Ty Coon >, 1 April 1989 Ty Coon, President of Vice This General
Public License does not permit incorporating your program into proprietary
programs. If your program is a subroutine library, you may consider it more
useful to permit linking proprietary applications with the library. If this
is what you want to do, use the GNU Lesser General Public License instead
of this License.
......@@ -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 := -Werror -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 :=
......@@ -127,7 +116,7 @@ endif
PHONY += all compile install clean docs FORCE
# Convinient variables
# Convenient variables
comma := ,
squote := '
empty :=
......@@ -344,6 +333,8 @@ docs: $(docs) $(subdirs)
install: compile docs $(subdirs) FORCE
tag:
generate:
clean: $(subdirs)
......
......@@ -4,9 +4,10 @@
-include config.mk
PACKAGE := apk-tools
VERSION := 2.10.4
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
......@@ -17,7 +18,7 @@ LIBDIR := /lib
CONFDIR := /etc/apk
MANDIR := /usr/share/man
DOCDIR := /usr/share/doc/apk
INCLUDEDIR := /usr/include/apk
INCLUDEDIR := /usr/include
PKGCONFIGDIR := /usr/lib/pkgconfig
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR INCLUDEDIR PKGCONFIGDIR
......@@ -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/
# Alpine Package Keeper
# apk-tools
Alpine Package Keeper (apk) is a package manager developed for Alpine Linux.
Alpine Package Keeper (apk) is a package manager originally built for Alpine Linux,
but now used by several other distributions as well.
## Building
The preferred build system for building apk-tools is Meson:
```
# 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.
## Documentation
Online documentation is available in the [doc/](doc/) directory in the form of man pages.
The [apk(8)](doc/apk.8.scd) man page provides a basic overview of the package management
system.
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,16 +2,23 @@ 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 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.
# OPTIONS
......@@ -22,24 +29,38 @@ following options:
Initialize a new package database.
*-l, --latest*
Disables normal heuristics for choosing which repository to install a
package from, preferring only repositories from which the latest
version is available. This has no effect on pinned packages.
Always choose the latest package by version. However, the versions
considered are based on the package pinning. Primarily this overrides
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*--no-chown*
Deperecated alias for --usermode.
*-u, --upgrade*
When adding packages which are already installed, upgrade them rather
than considering the requirement fulfilled by the current installation.
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.
*-t, --virtual* _NAME_
Instead of adding the specified packages to _world_, create a new
virtual package with the listed packages as its dependencies, then add
that package to _world_.
*--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
The packages requested are added as transitive dependencies of the
virtual package, and by deleting that package the *apk add* operation
may be easily reverted later.
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.
# AUTHORS
*-t, --virtual* _NAME_
Create virtual package _NAME_ with given dependencies. This new package
will get the _packages_ as dependencies instead of _world_. Finally the
_NAME_ is added to _world_. An optional version specifier for the virtual
package can be given via syntax _NAME_=_VERSION_. The version defaults
to synthesized version based on time.
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>
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.
......@@ -10,17 +10,30 @@ apk audit - audit directories for changes
# DESCRIPTION
*apk audit* audits the specified directories for changes from the package
database. By default, the output format is one file per line, for each affected
file. A character is printed indicating the change detected, followed by a
space, then the affected path. The changes detected are:
*apk audit* audits the system or specified directories for changes compared to
the package database.
|[ A
:< File added
The audit can be done against configuration files only (*--backup*) to generate
list of files needed to be stored in the overlay in run-from-tmps configuration.
Alternatively, it can audit all installed files (*--system* or *--full*) to
e.g. detect unauthorized modifications of system files.
By default, the output format is one file per line, for each modified file.
A character is printed indicating the line type, followed by a space,
then the affected path or details. The changes detected are:
|[ -
:< Database detail record
| \+
: On-disk detail record
| A
: File added
| d
: Directory added
| D
: Directory added (with non-listed files/subdirs)
| e
: error occured during audit (e.g. no permissions to read file)
| M
: File metadata changed (uid, gid, or mode)
| m
......@@ -34,22 +47,47 @@ space, then the affected path. The changes detected are:
# OPTIONS
*--backup*
Audit configuration files only (default). The list of files to be
audited is generated from the masks in protected_paths.d.
*--check-permissions*
In addition to checking file contents, check the uid, gid, and file
mode as well.
Check file permissions too. Namely, the uid, gid and file mode will
be checked in addition to the file content.
*--details*
Enable reporting of detail records.
*--full*
Audit all system files. Same as *--system*, but in addition reports
all added directories and files. A built-in default override for
protected paths is used, unless a *--protected-paths* is explicitly
specified.
*--ignore-busybox-symlinks*
Ignore symlinks whose target is the busybox binary.
*--packages*
Instead of printing each modified file, print the names and versions of
the packages which own the affected files.
Print only the packages with changed files. Instead of the full output
each modification, the set of packages with at least one modified file
is printed.
To repair all packages with modified files, one could use:
apk audit --packages -q | xargs apk fix
*--protected-paths* _FILE_
Use given FILE for protected paths listings. This also makes apk ignore
the regular protected_paths.d directories.
*--system*
List all modified configuration files (in protected_paths.d) that need
to be backed up.
Audit all system files. All files provided by packages are verified
for integrity with the exception of configuration files (listed in
protected_paths.d). This is useful detecting unauthorized file changes.
New files or directories are not reported.
*-r, --recursive*
Descend into directories and audit them as well.
# AUTHORS
# SEE ALSO
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>
*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:
......@@ -16,8 +16,3 @@ mkdir -p /var/cache/apk++
ln -s /var/cache/apk /etc/apk/cache
For information on cache maintenance, see *apk-cache*(8).
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>
......@@ -8,34 +8,55 @@ apk cache - manage a local cache of package files
*apk cache* [<_options_>...] clean
*apk cache* [<_options_>...] download
*apk cache* [<_options_>...] download [_dependency_...]
*apk cache* [<_options_>...] sync
*apk cache* [<_options_>...] purge
*apk cache* [<_options_>...] sync [_dependency_...]
# DESCRIPTION
Manage local package cache by removing obsolete packages, or downloading
missing or newer packages from the repositories.
*apk cache download* will fetch package files from the repositories and store
them in the cache, which must be enabled upfront (see *apk-cache*(5)).
them in the cache, which must be enabled upfront (see *apk-cache*(5)). By
default _world_ dependencies are used to determine what to download. If
_dependency_ arguments are given, they will by default replace the _world_.
*apk cache clean* will remove package files which are no longer necessary,
having been made obsolete by new versions or no longer being transitively
depended on by packages in _world_.
*apk cache clean* will remove package files which no longer exist in any
repository index. Specifying the global option *--purge* will additionally
remove all uninstalled package on tmpfs installations, and all packages on
disk installations.
*apk cache purge* is a synonym for *clean --purge*.
*apk cache sync* performs both operations.
# OPTIONS
*--add-dependencies*
Add the argument dependencies to _world_ dependencies when determining
which packages to download.
*-a, --available*
Selected packages to be downloaded from active repositories even if
it means replacing or downgrading the installed package.
*--ignore-conflict*
Ignore conflicts when resolving dependencies. This can be useful when
pre-populating cache for creation of multiple images in one go.
*-l, --latest*
Disables normal heuristics for choosing which repository to install a
package from, preferring only repositories from which the latest
version is available. This has no effect on pinned packages.
Always choose the latest package by version. However, the versions
considered are based on the package pinning. Primarily this overrides
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*-u, --upgrade*
When caching packages which are already installed, prefer their upgrades
rather than considering the requirement fulfilled by the current
installation.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>
*-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
......@@ -20,8 +21,3 @@ following options:
*-r, --rdepends*
Recursively delete all top-level reverse dependencies, too.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>