forked from mirrors/pacman
Compare commits
153 Commits
allan/alte
...
morganamil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47ee7e9442 | ||
|
|
18e49f2c97 | ||
|
|
0108e2c64e | ||
|
|
94d9c2affe | ||
|
|
6e9ab43451 | ||
|
|
9af4033cad | ||
|
|
31ffbc94ca | ||
|
|
e9b385a636 | ||
|
|
917b67f5d1 | ||
|
|
331b277eea | ||
|
|
30f9a2e263 | ||
|
|
aff12189d8 | ||
|
|
332d2a1922 | ||
|
|
f91fa546f6 | ||
|
|
b4f11d5496 | ||
|
|
015cdb21bd | ||
|
|
05f283b5ad | ||
|
|
34611a6643 | ||
|
|
76b140c72a | ||
|
|
5f43ac85f6 | ||
|
|
0dfe5c96ae | ||
|
|
36d70a93e2 | ||
|
|
717e5e9157 | ||
|
|
e7d7433b4b | ||
|
|
e210634982 | ||
|
|
6968f77026 | ||
|
|
06db927a1a | ||
|
|
909f2e86c3 | ||
|
|
5bd0b98b42 | ||
|
|
c1d4a6198c | ||
|
|
f5af66f130 | ||
|
|
5473c9fd3f | ||
|
|
e58d799c47 | ||
|
|
366b527757 | ||
|
|
e83e53f3f9 | ||
|
|
2348dcab22 | ||
|
|
f9d8beef45 | ||
|
|
85ab0307d7 | ||
|
|
ffde12cebd | ||
|
|
37dae721d3 | ||
|
|
aa3a1bc3b5 | ||
|
|
298755c905 | ||
|
|
ee933acf84 | ||
|
|
ca3c873d48 | ||
|
|
2fc2ab6cf0 | ||
|
|
843bf21e79 | ||
|
|
2c45e854ab | ||
|
|
a81ec016d7 | ||
|
|
55da1a01b6 | ||
|
|
5e94752434 | ||
|
|
262aa6c24e | ||
|
|
3323662ee0 | ||
|
|
6c913af95d | ||
|
|
71764b6d4c | ||
|
|
e0bbfb5682 | ||
|
|
09e82f01ea | ||
|
|
d35728f924 | ||
|
|
3f8029af92 | ||
|
|
6344aab3bd | ||
|
|
52eb094aa2 | ||
|
|
a194197369 | ||
|
|
f4f66fcca7 | ||
|
|
bb035eba4c | ||
|
|
fcb1d4f87e | ||
|
|
471a030466 | ||
|
|
775d511f42 | ||
|
|
19a8587459 | ||
|
|
ea83fd3927 | ||
|
|
0fe764a253 | ||
|
|
3436bc6c3e | ||
|
|
0e938f1886 | ||
|
|
1327ce7bd8 | ||
|
|
310bf878fc | ||
|
|
4f43ce3e4a | ||
|
|
e7806a43e0 | ||
|
|
23aa82812e | ||
|
|
05e52ef796 | ||
|
|
83e5326ac9 | ||
|
|
b2c9543ea9 | ||
|
|
3ed08f97ec | ||
|
|
da68447ec6 | ||
|
|
86981383a2 | ||
|
|
de11824527 | ||
|
|
478af273df | ||
|
|
efd0c24c07 | ||
|
|
a6b06a5b17 | ||
|
|
546433b4fd | ||
|
|
e10751a1e0 | ||
|
|
673ce1ab10 | ||
|
|
53dd3e844a | ||
|
|
656abdb256 | ||
|
|
064e556c4e | ||
|
|
184f593168 | ||
|
|
e017a5975c | ||
|
|
79bd512181 | ||
|
|
51b2e1c973 | ||
|
|
5abe1455f2 | ||
|
|
daa2db6a23 | ||
|
|
ff7c6c8e57 | ||
|
|
015eb31c3a | ||
|
|
cb9776a07b | ||
|
|
00bc386d5a | ||
|
|
7bcc2d9b23 | ||
|
|
819a0c2986 | ||
|
|
6dcd4b5383 | ||
|
|
fe028c7f6a | ||
|
|
3405709b46 | ||
|
|
2bf67416c1 | ||
|
|
6daeb37fe8 | ||
|
|
776b7c1e75 | ||
|
|
0031cd1e46 | ||
|
|
d1e95c4e54 | ||
|
|
84dc662d65 | ||
|
|
fdf04cdac5 | ||
|
|
18152a211a | ||
|
|
f5f9e0f4ea | ||
|
|
bddfcc3f40 | ||
|
|
221905b5ae | ||
|
|
293762ea8b | ||
|
|
40583ebe89 | ||
|
|
632eb9739d | ||
|
|
6b37d99431 | ||
|
|
e1246baddd | ||
|
|
7340fb9b2e | ||
|
|
7ba2c276db | ||
|
|
c89f42f17b | ||
|
|
3a39eff15e | ||
|
|
6cdb2030c6 | ||
|
|
ad918bcb75 | ||
|
|
569bcd9d26 | ||
|
|
5bbda937f1 | ||
|
|
0a792843f9 | ||
|
|
e1ce2351f5 | ||
|
|
49b08fa9d1 | ||
|
|
241c29f0cc | ||
|
|
ae2f506ddf | ||
|
|
42fe4864a0 | ||
|
|
a8d9fb8d9c | ||
|
|
446972b404 | ||
|
|
e654aa8ac6 | ||
|
|
2fe1ba5d81 | ||
|
|
0be1d4e5d0 | ||
|
|
e37f7d8b6b | ||
|
|
90df85e9cf | ||
|
|
9f23654722 | ||
|
|
58c81fa213 | ||
|
|
3a112668b5 | ||
|
|
9b766badd2 | ||
|
|
b234280083 | ||
|
|
060ab4a289 | ||
|
|
354a300cd2 | ||
|
|
26ee6ff6ad | ||
|
|
3710960090 |
@@ -16,18 +16,22 @@ default:
|
|||||||
python
|
python
|
||||||
fakeroot fakechroot
|
fakeroot fakechroot
|
||||||
meson
|
meson
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- build/meson-logs/meson-log.txt
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson build
|
- meson setup build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
arch-debug:
|
arch-debug:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson --buildtype=debug --werror build
|
- meson setup --buildtype=debug --werror build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
@@ -35,50 +39,51 @@ arch-docs:
|
|||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- pacman -Syu --needed --noconfirm asciidoc
|
- pacman -Syu --needed --noconfirm asciidoc
|
||||||
- meson -Ddoc=enabled build
|
- meson setup -Ddoc=enabled build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
|
|
||||||
arch-clang:
|
arch-clang:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- pacman -Syu --needed --noconfirm clang
|
- pacman -Syu --needed --noconfirm clang
|
||||||
- CC=clang meson build
|
- CC=clang meson setup build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
arch-valgrind:
|
#arch-valgrind:
|
||||||
extends: .arch-test
|
# extends: .arch-test
|
||||||
script:
|
# script:
|
||||||
- pacman -Syu --needed --noconfirm valgrind
|
# - pacman -Syu --needed --noconfirm valgrind
|
||||||
- meson build
|
# - pacman -U --noconfirm https://geo.mirror.pkgbuild.com/core-debug/os/x86_64/glibc-debug-$(pacman -S --print-format %v glibc)-x86_64.pkg.tar.zst
|
||||||
- ninja -C build
|
# - meson setup build
|
||||||
- PACTEST_VALGRIND=1 fakechroot meson test -C build
|
# - ninja -C build
|
||||||
|
# - PACTEST_VALGRIND=1 fakechroot meson test -C build
|
||||||
|
|
||||||
arch-nettle:
|
arch-nettle:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson -Dcrypto=nettle --buildtype=debug build
|
- meson setup -Dcrypto=nettle --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
arch-no-gpg:
|
arch-no-gpg:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson -Dgpgme=disabled --buildtype=debug build
|
- meson setup -Dgpgme=disabled --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
arch-no-curl:
|
arch-no-curl:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson -Dcurl=disabled --buildtype=debug build
|
- meson setup -Dcurl=disabled --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
arch-no-nls:
|
arch-no-nls:
|
||||||
extends: .arch-test
|
extends: .arch-test
|
||||||
script:
|
script:
|
||||||
- meson -Di18n=false --buildtype=debug build
|
- meson setup -Di18n=false --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
@@ -93,7 +98,7 @@ debian:
|
|||||||
gettext python3 python3-setuptools dash gawk ca-certificates
|
gettext python3 python3-setuptools dash gawk ca-certificates
|
||||||
fakeroot fakechroot
|
fakeroot fakechroot
|
||||||
script:
|
script:
|
||||||
- meson --buildtype=debug build
|
- meson setup --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|
||||||
@@ -109,6 +114,6 @@ fedora:
|
|||||||
fakeroot fakechroot
|
fakeroot fakechroot
|
||||||
perl-Module-Load-Conditional
|
perl-Module-Load-Conditional
|
||||||
script:
|
script:
|
||||||
- meson --buildtype=debug build
|
- meson setup --buildtype=debug build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- fakechroot meson test -C build
|
- fakechroot meson test -C build
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|
||||||
[archlinux-pacman.libalpm-pot]
|
[o:toofishes:p:archlinux-pacman:r:libalpm-pot]
|
||||||
file_filter = lib/libalpm/po/<lang>.po
|
file_filter = lib/libalpm/po/<lang>.po
|
||||||
source_file = lib/libalpm/po/libalpm.pot
|
source_file = lib/libalpm/po/libalpm.pot
|
||||||
source_lang = en
|
source_lang = en
|
||||||
|
|
||||||
[archlinux-pacman.pacman-pot]
|
[o:toofishes:p:archlinux-pacman:r:pacman-pot]
|
||||||
file_filter = src/pacman/po/<lang>.po
|
file_filter = src/pacman/po/<lang>.po
|
||||||
source_file = src/pacman/po/pacman.pot
|
source_file = src/pacman/po/pacman.pot
|
||||||
source_lang = en
|
source_lang = en
|
||||||
|
|
||||||
[archlinux-pacman.pacman-scripts-pot]
|
[o:toofishes:p:archlinux-pacman:r:pacman-scripts-pot]
|
||||||
file_filter = scripts/po/<lang>.po
|
file_filter = scripts/po/<lang>.po
|
||||||
source_file = scripts/po/pacman-scripts.pot
|
source_file = scripts/po/pacman-scripts.pot
|
||||||
source_lang = en
|
source_lang = en
|
||||||
|
|||||||
2
RELEASE
2
RELEASE
@@ -14,7 +14,7 @@ The following checklist should be used for making a pacman release.
|
|||||||
- Update pacman website
|
- Update pacman website
|
||||||
|
|
||||||
Transifex updates are handled using the transifex client. The basic process is:
|
Transifex updates are handled using the transifex client. The basic process is:
|
||||||
- Pull updates from transifex ("tx pull -a -f --minimum-perc 75")
|
- Pull updates from transifex ("tx pull -f --minimum-perc 75")
|
||||||
- Update po files ("./build-aux/update-po")
|
- Update po files ("./build-aux/update-po")
|
||||||
- Fix all translation errors found
|
- Fix all translation errors found
|
||||||
- Add any new locales to the relevant LINGUAS file
|
- Add any new locales to the relevant LINGUAS file
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ sed \
|
|||||||
-e "s|@localstatedir[@]|@localstatedir@|g" \
|
-e "s|@localstatedir[@]|@localstatedir@|g" \
|
||||||
-e "s|@libmakepkgdir[@]|@LIBMAKEPKGDIR@|g" \
|
-e "s|@libmakepkgdir[@]|@LIBMAKEPKGDIR@|g" \
|
||||||
-e "s|@pkgdatadir[@]|@PKGDATADIR@|g" \
|
-e "s|@pkgdatadir[@]|@PKGDATADIR@|g" \
|
||||||
|
-e "s|@keyringdir[@]|@KEYRINGDIR@|g" \
|
||||||
-e "s|@prefix[@]|@PREFIX@|g" \
|
-e "s|@prefix[@]|@PREFIX@|g" \
|
||||||
-e "1s|#!/bin/bash|#!@BASH@|g" \
|
-e "1s|#!/bin/bash|#!@BASH@|g" \
|
||||||
-e "s|@PACKAGE_VERSION[@]|@PACKAGE_VERSION@|g" \
|
-e "s|@PACKAGE_VERSION[@]|@PACKAGE_VERSION@|g" \
|
||||||
@@ -20,6 +21,7 @@ sed \
|
|||||||
-e "s|@DEBUGSUFFIX[@]|@DEBUGSUFFIX@|g" \
|
-e "s|@DEBUGSUFFIX[@]|@DEBUGSUFFIX@|g" \
|
||||||
-e "s|@INODECMD[@]|@INODECMD@|g" \
|
-e "s|@INODECMD[@]|@INODECMD@|g" \
|
||||||
-e "s|@FILECMD[@]|@FILECMD@|g" \
|
-e "s|@FILECMD[@]|@FILECMD@|g" \
|
||||||
|
-e "s|@BSDTAR_NO_READ_SPARSE[@]|@BSDTAR_NO_READ_SPARSE@|g" \
|
||||||
"$input" >"$output"
|
"$input" >"$output"
|
||||||
|
|
||||||
if [[ $mode ]]; then
|
if [[ $mode ]]; then
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
# This script serves as a trampoline for running scripts which depend on
|
# This script serves as a trampoline for running scripts which depend on
|
||||||
# libmakepkg with the libmakepkg within the build tree.
|
# libmakepkg with the libmakepkg within the build tree.
|
||||||
|
|
||||||
LIBRARY=@BUILDDIR@/libmakepkg exec @BASH@ -$- @REAL_PROGPATH@ "$@"
|
MAKEPKG_LIBRARY=@BUILDDIR@/libmakepkg exec @BASH@ -$- @REAL_PROGPATH@ "$@"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ value.
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
This is a description of the contents of version '1' of the
|
This is a description of the contents of version '2' of the
|
||||||
BUILDINFO file format.
|
BUILDINFO file format.
|
||||||
|
|
||||||
*format*::
|
*format*::
|
||||||
@@ -53,6 +53,15 @@ BUILDINFO file format.
|
|||||||
*startdir*::
|
*startdir*::
|
||||||
The directory from which makepkg was executed.
|
The directory from which makepkg was executed.
|
||||||
|
|
||||||
|
*buildtool*::
|
||||||
|
The name of the tool ecosystem used to set up the build environment. Used
|
||||||
|
for defining a spec for reproducible builds, e.g. the source of the
|
||||||
|
linkman:makepkg.conf[5] used.
|
||||||
|
|
||||||
|
*buildtoolver*::
|
||||||
|
The full version of the 'buildtool', for example:
|
||||||
|
"$pkgver-$pkgrel-$pkgarch".
|
||||||
|
|
||||||
*buildenv (array)*::
|
*buildenv (array)*::
|
||||||
The build environment specified in makepkg.conf.
|
The build environment specified in makepkg.conf.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Doxyfile 1.8.20
|
# Doxyfile 1.9.3
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Project related configuration options
|
# Project related configuration options
|
||||||
@@ -12,7 +12,6 @@ OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@
|
|||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = NO
|
||||||
ALLOW_UNICODE_NAMES = NO
|
ALLOW_UNICODE_NAMES = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
OUTPUT_TEXT_DIRECTION = None
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = YES
|
REPEAT_BRIEF = YES
|
||||||
ABBREVIATE_BRIEF = "The $name class" \
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
@@ -73,6 +72,7 @@ EXTRACT_STATIC = NO
|
|||||||
EXTRACT_LOCAL_CLASSES = YES
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
EXTRACT_ANON_NSPACES = NO
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
RESOLVE_UNNAMED_PARAMS = YES
|
||||||
HIDE_UNDOC_MEMBERS = NO
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
HIDE_UNDOC_CLASSES = NO
|
HIDE_UNDOC_CLASSES = NO
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
@@ -81,6 +81,7 @@ INTERNAL_DOCS = NO
|
|||||||
CASE_SENSE_NAMES = YES
|
CASE_SENSE_NAMES = YES
|
||||||
HIDE_SCOPE_NAMES = NO
|
HIDE_SCOPE_NAMES = NO
|
||||||
HIDE_COMPOUND_REFERENCE= NO
|
HIDE_COMPOUND_REFERENCE= NO
|
||||||
|
SHOW_HEADERFILE = YES
|
||||||
SHOW_INCLUDE_FILES = YES
|
SHOW_INCLUDE_FILES = YES
|
||||||
SHOW_GROUPED_MEMB_INC = NO
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
FORCE_LOCAL_INCLUDES = NO
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
@@ -110,6 +111,7 @@ QUIET = NO
|
|||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_IF_INCOMPLETE_DOC = YES
|
||||||
WARN_NO_PARAMDOC = NO
|
WARN_NO_PARAMDOC = NO
|
||||||
WARN_AS_ERROR = NO
|
WARN_AS_ERROR = NO
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
@@ -152,7 +154,6 @@ VERBATIM_HEADERS = YES
|
|||||||
# Configuration options related to the alphabetical class index
|
# Configuration options related to the alphabetical class index
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ALPHABETICAL_INDEX = NO
|
ALPHABETICAL_INDEX = NO
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
IGNORE_PREFIX =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the HTML output
|
# Configuration options related to the HTML output
|
||||||
@@ -174,6 +175,7 @@ HTML_DYNAMIC_SECTIONS = NO
|
|||||||
HTML_INDEX_NUM_ENTRIES = 100
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
GENERATE_DOCSET = NO
|
GENERATE_DOCSET = NO
|
||||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_FEEDURL =
|
||||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
DOCSET_PUBLISHER_NAME = Publisher
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
@@ -196,14 +198,16 @@ GENERATE_ECLIPSEHELP = NO
|
|||||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
DISABLE_INDEX = NO
|
DISABLE_INDEX = NO
|
||||||
GENERATE_TREEVIEW = NO
|
GENERATE_TREEVIEW = NO
|
||||||
|
FULL_SIDEBAR = NO
|
||||||
ENUM_VALUES_PER_LINE = 4
|
ENUM_VALUES_PER_LINE = 4
|
||||||
TREEVIEW_WIDTH = 250
|
TREEVIEW_WIDTH = 250
|
||||||
EXT_LINKS_IN_WINDOW = NO
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
OBFUSCATE_EMAILS = YES
|
||||||
HTML_FORMULA_FORMAT = png
|
HTML_FORMULA_FORMAT = png
|
||||||
FORMULA_FONTSIZE = 10
|
FORMULA_FONTSIZE = 10
|
||||||
FORMULA_TRANSPARENT = YES
|
|
||||||
FORMULA_MACROFILE =
|
FORMULA_MACROFILE =
|
||||||
USE_MATHJAX = NO
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_VERSION = MathJax_2
|
||||||
MATHJAX_FORMAT = HTML-CSS
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
|
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
|
||||||
MATHJAX_EXTENSIONS =
|
MATHJAX_EXTENSIONS =
|
||||||
@@ -234,7 +238,6 @@ PDF_HYPERLINKS = NO
|
|||||||
USE_PDFLATEX = NO
|
USE_PDFLATEX = NO
|
||||||
LATEX_BATCHMODE = NO
|
LATEX_BATCHMODE = NO
|
||||||
LATEX_HIDE_INDICES = NO
|
LATEX_HIDE_INDICES = NO
|
||||||
LATEX_SOURCE_CODE = NO
|
|
||||||
LATEX_BIB_STYLE = plain
|
LATEX_BIB_STYLE = plain
|
||||||
LATEX_TIMESTAMP = NO
|
LATEX_TIMESTAMP = NO
|
||||||
LATEX_EMOJI_DIRECTORY =
|
LATEX_EMOJI_DIRECTORY =
|
||||||
@@ -247,7 +250,6 @@ COMPACT_RTF = NO
|
|||||||
RTF_HYPERLINKS = NO
|
RTF_HYPERLINKS = NO
|
||||||
RTF_STYLESHEET_FILE =
|
RTF_STYLESHEET_FILE =
|
||||||
RTF_EXTENSIONS_FILE =
|
RTF_EXTENSIONS_FILE =
|
||||||
RTF_SOURCE_CODE = NO
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the man page output
|
# Configuration options related to the man page output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -268,7 +270,9 @@ XML_NS_MEMB_FILE_SCOPE = NO
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_DOCBOOK = NO
|
GENERATE_DOCBOOK = NO
|
||||||
DOCBOOK_OUTPUT = docbook
|
DOCBOOK_OUTPUT = docbook
|
||||||
DOCBOOK_PROGRAMLISTING = NO
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the Perl module output
|
# Configuration options related to the Perl module output
|
||||||
@@ -304,19 +308,18 @@ EXTERNAL_PAGES = YES
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the dot tool
|
# Configuration options related to the dot tool
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
CLASS_DIAGRAMS = NO
|
|
||||||
DIA_PATH =
|
DIA_PATH =
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = YES
|
||||||
DOT_NUM_THREADS = 0
|
DOT_NUM_THREADS = 0
|
||||||
DOT_FONTNAME = Helvetica
|
|
||||||
DOT_FONTSIZE = 10
|
|
||||||
DOT_FONTPATH =
|
DOT_FONTPATH =
|
||||||
CLASS_GRAPH = YES
|
CLASS_GRAPH = YES
|
||||||
COLLABORATION_GRAPH = YES
|
COLLABORATION_GRAPH = YES
|
||||||
GROUP_GRAPHS = YES
|
GROUP_GRAPHS = YES
|
||||||
UML_LOOK = NO
|
UML_LOOK = NO
|
||||||
UML_LIMIT_NUM_FIELDS = 10
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
DOT_UML_DETAILS = NO
|
||||||
|
DOT_WRAP_THRESHOLD = 17
|
||||||
TEMPLATE_RELATIONS = NO
|
TEMPLATE_RELATIONS = NO
|
||||||
INCLUDE_GRAPH = YES
|
INCLUDE_GRAPH = YES
|
||||||
INCLUDED_BY_GRAPH = YES
|
INCLUDED_BY_GRAPH = YES
|
||||||
@@ -324,6 +327,7 @@ CALL_GRAPH = NO
|
|||||||
CALLER_GRAPH = NO
|
CALLER_GRAPH = NO
|
||||||
GRAPHICAL_HIERARCHY = YES
|
GRAPHICAL_HIERARCHY = YES
|
||||||
DIRECTORY_GRAPH = YES
|
DIRECTORY_GRAPH = YES
|
||||||
|
DIR_GRAPH_MAX_DEPTH = 1
|
||||||
DOT_IMAGE_FORMAT = png
|
DOT_IMAGE_FORMAT = png
|
||||||
INTERACTIVE_SVG = NO
|
INTERACTIVE_SVG = NO
|
||||||
DOT_PATH =
|
DOT_PATH =
|
||||||
@@ -335,7 +339,6 @@ PLANTUML_CFG_FILE =
|
|||||||
PLANTUML_INCLUDE_PATH =
|
PLANTUML_INCLUDE_PATH =
|
||||||
DOT_GRAPH_MAX_NODES = 50
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
MAX_DOT_GRAPH_DEPTH = 3
|
MAX_DOT_GRAPH_DEPTH = 3
|
||||||
DOT_TRANSPARENT = NO
|
|
||||||
DOT_MULTI_TARGETS = NO
|
DOT_MULTI_TARGETS = NO
|
||||||
GENERATE_LEGEND = YES
|
GENERATE_LEGEND = YES
|
||||||
DOT_CLEANUP = YES
|
DOT_CLEANUP = YES
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ depends=('glibc')
|
|||||||
makedepends=('ed')
|
makedepends=('ed')
|
||||||
optdepends=('ed: for "patch -e" functionality')
|
optdepends=('ed: for "patch -e" functionality')
|
||||||
source=("ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
|
source=("ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
|
||||||
md5sums=('e9ae5393426d3ad783a300a338c09b72'
|
sha256sums=('9124ba46db0abd873d0995c2ca880e81252676bb6c03e0a37dfc5f608a9b0ceb'
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ PKGBUILD(5)
|
|||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
PKGBUILD - Arch Linux package build description file
|
PKGBUILD - Package build description file
|
||||||
|
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
@@ -84,14 +84,7 @@ systems (see below).
|
|||||||
|
|
||||||
*license (array)*::
|
*license (array)*::
|
||||||
This field specifies the license(s) that apply to the package.
|
This field specifies the license(s) that apply to the package.
|
||||||
Commonly used licenses can be found in '/usr/share/licenses/common'. If you
|
If multiple licenses are applicable, list all of them:
|
||||||
see the package's license there, simply reference it in the license
|
|
||||||
field (e.g., `license=('GPL')`). If the package provides a license not
|
|
||||||
available in '/usr/share/licenses/common', then you should include it
|
|
||||||
in the package itself and set `license=('custom')` or
|
|
||||||
`license=('custom:LicenseName')`. The license should be placed in
|
|
||||||
'$pkgdir/usr/share/licenses/$pkgname/' when building the package. If
|
|
||||||
multiple licenses are applicable, list all of them:
|
|
||||||
`license=('GPL' 'FDL')`.
|
`license=('GPL' 'FDL')`.
|
||||||
|
|
||||||
*install*::
|
*install*::
|
||||||
@@ -187,11 +180,6 @@ contain whitespace characters.
|
|||||||
than or equal to), `<=` (less than or equal to), `=` (equal to), `>`
|
than or equal to), `<=` (less than or equal to), `=` (equal to), `>`
|
||||||
(greater than), or `<` (less than).
|
(greater than), or `<` (less than).
|
||||||
+
|
+
|
||||||
If the dependency name appears to be a library (ends with .so), makepkg will
|
|
||||||
try to find a binary that depends on the library in the built package and
|
|
||||||
append the version needed by the binary. Appending the version yourself
|
|
||||||
disables automatic detection.
|
|
||||||
+
|
|
||||||
Additional architecture-specific depends can be added by appending an
|
Additional architecture-specific depends can be added by appending an
|
||||||
underscore and the architecture name e.g., 'depends_x86_64=()'.
|
underscore and the architecture name e.g., 'depends_x86_64=()'.
|
||||||
|
|
||||||
@@ -245,10 +233,6 @@ example, dcron can provide 'cron=2.0' to satisfy the 'cron>=2.0' dependency of
|
|||||||
other packages. Provisions involving the `>` and `<` operators are invalid as
|
other packages. Provisions involving the `>` and `<` operators are invalid as
|
||||||
only specific versions of a package may be provided.
|
only specific versions of a package may be provided.
|
||||||
+
|
+
|
||||||
If the provision name appears to be a library (ends with .so), makepkg will
|
|
||||||
try to find the library in the built package and append the correct
|
|
||||||
version. Appending the version yourself disables automatic detection.
|
|
||||||
+
|
|
||||||
Additional architecture-specific provides can be added by appending an
|
Additional architecture-specific provides can be added by appending an
|
||||||
underscore and the architecture name e.g., 'provides_x86_64=()'.
|
underscore and the architecture name e.g., 'provides_x86_64=()'.
|
||||||
|
|
||||||
@@ -352,6 +336,13 @@ function.
|
|||||||
the optional functions listed below. The packaging stage is run using
|
the optional functions listed below. The packaging stage is run using
|
||||||
fakeroot to ensure correct file permissions in the resulting package.
|
fakeroot to ensure correct file permissions in the resulting package.
|
||||||
All other functions will be run as the user calling makepkg.
|
All other functions will be run as the user calling makepkg.
|
||||||
|
This function is run inside `$srcdir`.
|
||||||
|
|
||||||
|
*verify() Function*::
|
||||||
|
An optional `verify()` function can be specified to implement arbitrary
|
||||||
|
source authentication. The function should return a non-zero exit code when
|
||||||
|
verification fails. This function is run before sources are extracted.
|
||||||
|
This function is run inside `$startdir`.
|
||||||
|
|
||||||
*prepare() Function*::
|
*prepare() Function*::
|
||||||
An optional `prepare()` function can be specified in which operations to
|
An optional `prepare()` function can be specified in which operations to
|
||||||
@@ -359,16 +350,19 @@ function.
|
|||||||
function is run after the source extraction and before the `build()`
|
function is run after the source extraction and before the `build()`
|
||||||
function. The `prepare()` function is skipped when source extraction
|
function. The `prepare()` function is skipped when source extraction
|
||||||
is skipped.
|
is skipped.
|
||||||
|
This function is run inside `$srcdir`.
|
||||||
|
|
||||||
*build() Function*::
|
*build() Function*::
|
||||||
The optional `build()` function is used to compile and/or adjust the source
|
The optional `build()` function is used to compile and/or adjust the source
|
||||||
files in preparation to be installed by the `package()` function.
|
files in preparation to be installed by the `package()` function.
|
||||||
|
This function is run inside `$srcdir`.
|
||||||
|
|
||||||
*check() Function*::
|
*check() Function*::
|
||||||
An optional `check()` function can be specified in which a package's
|
An optional `check()` function can be specified in which a package's
|
||||||
test-suite may be run. This function is run between the `build()` and
|
test-suite may be run. This function is run between the `build()` and
|
||||||
`package()` functions. Be sure any exotic commands used are covered by the
|
`package()` functions. Be sure any exotic commands used are covered by the
|
||||||
`checkdepends` array.
|
`checkdepends` array.
|
||||||
|
This function is run inside `$srcdir`.
|
||||||
|
|
||||||
All of the above variables such as `$pkgname` and `$pkgver` are available for
|
All of the above variables such as `$pkgname` and `$pkgver` are available for
|
||||||
use in the packaging functions. In addition, makepkg defines the following
|
use in the packaging functions. In addition, makepkg defines the following
|
||||||
@@ -378,7 +372,6 @@ variables:
|
|||||||
This contains the directory where makepkg extracts, or copies, all source
|
This contains the directory where makepkg extracts, or copies, all source
|
||||||
files.
|
files.
|
||||||
+
|
+
|
||||||
All of the packaging functions defined above are run starting inside `$srcdir`
|
|
||||||
|
|
||||||
*pkgdir*::
|
*pkgdir*::
|
||||||
This contains the directory where makepkg bundles the installed package.
|
This contains the directory where makepkg bundles the installed package.
|
||||||
@@ -480,6 +473,9 @@ Currently makepkg supports the Bazaar, Git, Subversion, Fossil and Mercurial
|
|||||||
version control systems. For other version control systems, manual cloning of
|
version control systems. For other version control systems, manual cloning of
|
||||||
upstream repositories must be done in the `prepare()` function.
|
upstream repositories must be done in the `prepare()` function.
|
||||||
|
|
||||||
|
Some <<VCS,VCS Sources>> like Git support pinning the checkout by a checksum of
|
||||||
|
its content using deterministic export functionality like ``git archive''.
|
||||||
|
|
||||||
The source URL is divided into four components:
|
The source URL is divided into four components:
|
||||||
|
|
||||||
*directory*::
|
*directory*::
|
||||||
@@ -524,8 +520,7 @@ The source URL is divided into four components:
|
|||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
The following is an example PKGBUILD for the 'patch' package. For more
|
The following is an example PKGBUILD for the 'patch' package. For more
|
||||||
examples, look through the build files of your distribution's packages. For
|
examples, look through the build files of your distribution's packages.
|
||||||
those using Arch Linux, consult the Arch Build System (ABS) tree.
|
|
||||||
|
|
||||||
[source,sh]
|
[source,sh]
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ bugs under the Pacman project.
|
|||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
---------
|
---------
|
||||||
pacman is Copyright (C) 2006-2021 Pacman Development Team
|
pacman is Copyright (C) 2006-2022 Pacman Development Team
|
||||||
<pacman-dev@lists.archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
<pacman-dev@lists.archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
||||||
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
||||||
version 2 or later.
|
version 2 or later.
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ Example PKGBUILD
|
|||||||
license=('PerlArtistic' 'GPL')
|
license=('PerlArtistic' 'GPL')
|
||||||
depends=('perl')
|
depends=('perl')
|
||||||
source=("http://search.cpan.org/CPAN/authors/id/S/SH/SHERZODR/Config-Simple-${pkgver}.tar.gz")
|
source=("http://search.cpan.org/CPAN/authors/id/S/SH/SHERZODR/Config-Simple-${pkgver}.tar.gz")
|
||||||
md5sums=('f014aec54f0a1e2e880d317180fce502')
|
sha256sums=('dd9995706f0f9384a15ccffe116c3b6e22f42ba2e58d8f24ed03c4a0e386edb4')
|
||||||
_distname="Config-Simple"
|
_distname="Config-Simple"
|
||||||
|
|
||||||
# template start; name=perl-module; version=1.0;
|
# template start; name=perl-module; version=1.0;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Options
|
|||||||
For each source file in the source array of PKGBUILD, download the file
|
For each source file in the source array of PKGBUILD, download the file
|
||||||
if required and generate integrity checks. The integrity checks generated
|
if required and generate integrity checks. The integrity checks generated
|
||||||
are determined by the checks present in the PKGBUILD, falling back to the
|
are determined by the checks present in the PKGBUILD, falling back to the
|
||||||
value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent
|
value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent.
|
||||||
This output can be redirected into your PKGBUILD for source validation
|
This output can be redirected into your PKGBUILD for source validation
|
||||||
using "`makepkg -g >> PKGBUILD`".
|
using "`makepkg -g >> PKGBUILD`".
|
||||||
|
|
||||||
@@ -146,6 +146,9 @@ Options
|
|||||||
*-C, \--cleanbuild*::
|
*-C, \--cleanbuild*::
|
||||||
Remove the $srcdir before building the package.
|
Remove the $srcdir before building the package.
|
||||||
|
|
||||||
|
*-D* <dir>, *\--dir* <dir> ::
|
||||||
|
Change to directory <dir> before reading the PKGBUILD or doing anything else.
|
||||||
|
|
||||||
*\--allsource*::
|
*\--allsource*::
|
||||||
Do not actually build the package, but build a source-only tarball that
|
Do not actually build the package, but build a source-only tarball that
|
||||||
includes all sources, including those that are normally downloaded via
|
includes all sources, including those that are normally downloaded via
|
||||||
@@ -168,6 +171,9 @@ Options
|
|||||||
*\--noprepare*::
|
*\--noprepare*::
|
||||||
Do not run the prepare() function in the PKGBUILD.
|
Do not run the prepare() function in the PKGBUILD.
|
||||||
|
|
||||||
|
*\--noverify*::
|
||||||
|
Do not run the verify() function in the PKGBUILD.
|
||||||
|
|
||||||
*\--sign*::
|
*\--sign*::
|
||||||
Sign the resulting package with gpg, overriding the setting in
|
Sign the resulting package with gpg, overriding the setting in
|
||||||
linkman:makepkg.conf[5].
|
linkman:makepkg.conf[5].
|
||||||
@@ -227,6 +233,9 @@ before building.
|
|||||||
|
|
||||||
Environment Variables
|
Environment Variables
|
||||||
---------------------
|
---------------------
|
||||||
|
**MAKEPKG_LIBRARY**="/path/to/directory"::
|
||||||
|
Use an alternative libmakepkg path instead of the {libmakepkgdir} default.
|
||||||
|
|
||||||
**PACMAN**::
|
**PACMAN**::
|
||||||
The command that will be used to check for missing dependencies and to
|
The command that will be used to check for missing dependencies and to
|
||||||
install and remove packages. Pacman's '-Qq', '-Rns', '-S', '-T', and '-U'
|
install and remove packages. Pacman's '-Qq', '-Rns', '-S', '-T', and '-U'
|
||||||
@@ -287,6 +296,10 @@ Environment Variables
|
|||||||
**BUILDTOOLVER=**"<version>"::
|
**BUILDTOOLVER=**"<version>"::
|
||||||
The version of the '$BUILDTOOL' used.
|
The version of the '$BUILDTOOL' used.
|
||||||
|
|
||||||
|
**GITFLAGS**::
|
||||||
|
The options to pass when checking out git sources, replacing the default
|
||||||
|
"--mirror".
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
|
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ Options
|
|||||||
usage resembling ``-Wl,--hash-style=gnu''. Read ld(1) for more details on
|
usage resembling ``-Wl,--hash-style=gnu''. Read ld(1) for more details on
|
||||||
available linker flags.
|
available linker flags.
|
||||||
|
|
||||||
|
**LTOFLAGS=**"ltoflags"::
|
||||||
|
Additional compiler and linker flags appended to `CFLAGS`, `CXXFLAGS`
|
||||||
|
and `LDFLAGS` when building with link time optimization. If empty,
|
||||||
|
``-flto'' is used.
|
||||||
|
|
||||||
**MAKEFLAGS=**"makeflags"::
|
**MAKEFLAGS=**"makeflags"::
|
||||||
This is often used to set the number of jobs used; for example, `-j2`.
|
This is often used to set the number of jobs used; for example, `-j2`.
|
||||||
Other flags that make accepts can also be passed.
|
Other flags that make accepts can also be passed.
|
||||||
@@ -190,8 +195,14 @@ Options
|
|||||||
package containing the debug symbols when used with `strip'.
|
package containing the debug symbols when used with `strip'.
|
||||||
|
|
||||||
*lto*;;
|
*lto*;;
|
||||||
Enable building packages using link time optimization. Adds '-flto'
|
Enable building packages using link time optimization. Adds the
|
||||||
to both CFLAGS and CXXFLAGS.
|
flags specified in LTOFLAGS to CFLAGS, CXXFLAGS and LDFLAGS (or
|
||||||
|
``-flto'' if LTOFLAGS is empty).
|
||||||
|
|
||||||
|
*autodeps*;;
|
||||||
|
Enable the automatic addition of libraries to the depends and
|
||||||
|
provides arrays. Search library directories are controlled by
|
||||||
|
the LIB_DIRS variable defined below.
|
||||||
|
|
||||||
**INTEGRITY_CHECK=(**check1 ...**)**::
|
**INTEGRITY_CHECK=(**check1 ...**)**::
|
||||||
File integrity checks to use. Multiple checks may be specified; this
|
File integrity checks to use. Multiple checks may be specified; this
|
||||||
@@ -223,6 +234,12 @@ Options
|
|||||||
that are located in opt/, you may need to add the directory to this
|
that are located in opt/, you may need to add the directory to this
|
||||||
array. *NOTE:* Do not add the leading slash to the directory name.
|
array. *NOTE:* Do not add the leading slash to the directory name.
|
||||||
|
|
||||||
|
**LIB_DIRS=(**lib:usr/lib ...**)**::
|
||||||
|
If `autodeps` is specified in the `OPTIONS` array, this variable will
|
||||||
|
instruct makepkg where to look to find libraries to add to the `provides`
|
||||||
|
array. The format is "prefix:path", where provides will be added for
|
||||||
|
libraries found in "path" with the specified prefix added.
|
||||||
|
|
||||||
**PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
|
**PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
|
||||||
If `purge` is specified in the `OPTIONS` array, this variable will
|
If `purge` is specified in the `OPTIONS` array, this variable will
|
||||||
instruct makepkg which files to remove from the package. This is
|
instruct makepkg which files to remove from the package. This is
|
||||||
@@ -274,9 +291,10 @@ Options
|
|||||||
|
|
||||||
**PKGEXT=**"{pkgext}", **SRCEXT=**"{srcext}"::
|
**PKGEXT=**"{pkgext}", **SRCEXT=**"{srcext}"::
|
||||||
Sets the compression used when making compiled or source packages.
|
Sets the compression used when making compiled or source packages.
|
||||||
Valid suffixes are `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.zst`,
|
Valid suffixes are `.pkg` or `.src` (for PKGEXT and SRCEXT resepectively)
|
||||||
`.tar.lzo`, `.tar.lrz`, `.tar.lz4`, `.tar.lz` and `.tar.Z`, or
|
followed by one of `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.zst`, `.tar.lzo`,
|
||||||
simply `.tar` to disable compression entirely.
|
`.tar.lrz`, `.tar.lz4`, `.tar.lz` and `.tar.Z`, or simply `.tar` to
|
||||||
|
disable compression entirely.
|
||||||
|
|
||||||
**PACMAN_AUTH=()**::
|
**PACMAN_AUTH=()**::
|
||||||
Specify a command prefix for running pacman as root. If unset, makepkg will
|
Specify a command prefix for running pacman as root. If unset, makepkg will
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ manpages = [
|
|||||||
{ 'name': 'makepkg-template.1' },
|
{ 'name': 'makepkg-template.1' },
|
||||||
{ 'name': 'repo-add.8' },
|
{ 'name': 'repo-add.8' },
|
||||||
{ 'name': 'vercmp.8' },
|
{ 'name': 'vercmp.8' },
|
||||||
|
{ 'name': 'testpkg.8' },
|
||||||
{ 'name': 'pacman-key.8' },
|
{ 'name': 'pacman-key.8' },
|
||||||
|
{ 'name': 'pacman-db-upgrade.8' },
|
||||||
{ 'name': 'PKGBUILD.5', 'extra_depends' : [ 'PKGBUILD-example.txt' ] },
|
{ 'name': 'PKGBUILD.5', 'extra_depends' : [ 'PKGBUILD-example.txt' ] },
|
||||||
{ 'name': 'makepkg.conf.5' },
|
{ 'name': 'makepkg.conf.5' },
|
||||||
{ 'name': 'pacman.conf.5' },
|
{ 'name': 'pacman.conf.5' },
|
||||||
@@ -28,10 +30,12 @@ asciidoc_opts = [
|
|||||||
'-a', 'srcext=@0@'.format(get_option('src-ext')),
|
'-a', 'srcext=@0@'.format(get_option('src-ext')),
|
||||||
'-a', 'pkgext=@0@'.format(get_option('pkg-ext')),
|
'-a', 'pkgext=@0@'.format(get_option('pkg-ext')),
|
||||||
'-a', 'pkgdatadir=@0@'.format(PKGDATADIR),
|
'-a', 'pkgdatadir=@0@'.format(PKGDATADIR),
|
||||||
|
'-a', 'keyringdir=@0@'.format(KEYRINGDIR),
|
||||||
'-a', 'localstatedir=@0@'.format(LOCALSTATEDIR),
|
'-a', 'localstatedir=@0@'.format(LOCALSTATEDIR),
|
||||||
'-a', 'sysconfdir=@0@'.format(SYSCONFDIR),
|
'-a', 'sysconfdir=@0@'.format(SYSCONFDIR),
|
||||||
'-a', 'datarootdir=@0@'.format(DATAROOTDIR),
|
'-a', 'datarootdir=@0@'.format(DATAROOTDIR),
|
||||||
'-a', 'rootdir=@0@'.format(ROOTDIR),
|
'-a', 'rootdir=@0@'.format(ROOTDIR),
|
||||||
|
'-a', 'libmakepkgdir=@0@'.format(LIBMAKEPKGDIR),
|
||||||
]
|
]
|
||||||
|
|
||||||
html_targets = []
|
html_targets = []
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Options
|
|||||||
*-R, \--rootdir* <path>::
|
*-R, \--rootdir* <path>::
|
||||||
Specify an alternate installation root (default is `/`).
|
Specify an alternate installation root (default is `/`).
|
||||||
|
|
||||||
*-r, \--repo* <remote>::
|
*-r, \--repo* <repository>::
|
||||||
Query options for a specific repository.
|
Query options for a specific repository.
|
||||||
|
|
||||||
*-v, \--verbose*::
|
*-v, \--verbose*::
|
||||||
|
|||||||
36
doc/pacman-db-upgrade.8.asciidoc
Normal file
36
doc/pacman-db-upgrade.8.asciidoc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
pacman-db-upgrade(8)
|
||||||
|
====================
|
||||||
|
|
||||||
|
Name
|
||||||
|
----
|
||||||
|
pacman-db-upgrade - upgrade the local pacman database to a newer format
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
'pacman-db-upgrade' [options]
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
'pacman-db-upgrade' is a script that upgrades the local database used
|
||||||
|
by linkman:pacman[8] to a newer format.
|
||||||
|
|
||||||
|
Options
|
||||||
|
--------------
|
||||||
|
*-h, \--help*::
|
||||||
|
Show the built-in help message and exit.
|
||||||
|
*-V, \--version*::
|
||||||
|
Show version information and exit.
|
||||||
|
*-d, \--dbpath* <path>::
|
||||||
|
Set an alternate database location.
|
||||||
|
*-r, \--root* <path>::
|
||||||
|
Set an alternate installation root.
|
||||||
|
*\--config* <path>::
|
||||||
|
Set an alternate configuration file.
|
||||||
|
*\--nocolor*::
|
||||||
|
Remove color from output.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
--------
|
||||||
|
linkman:pacman[8]
|
||||||
|
|
||||||
|
include::footer.asciidoc[]
|
||||||
@@ -86,7 +86,7 @@ Operations
|
|||||||
|
|
||||||
*\--populate*::
|
*\--populate*::
|
||||||
Reload the default keys from the (optionally provided) keyrings in
|
Reload the default keys from the (optionally provided) keyrings in
|
||||||
+{pkgdatadir}/keyrings+. For more information, see
|
+{keyringdir}+. For more information, see
|
||||||
<<PK,Providing a Keyring for Import>> below.
|
<<PK,Providing a Keyring for Import>> below.
|
||||||
|
|
||||||
*-u, \--updatedb*::
|
*-u, \--updatedb*::
|
||||||
@@ -129,7 +129,7 @@ A distribution or other repository provided may want to provide a set of
|
|||||||
PGP keys used in the signing of its packages and repository databases that can
|
PGP keys used in the signing of its packages and repository databases that can
|
||||||
be readily imported into the pacman keyring. This is achieved by providing a
|
be readily imported into the pacman keyring. This is achieved by providing a
|
||||||
PGP keyring file `foo.gpg` that contains the keys for the foo keyring in the
|
PGP keyring file `foo.gpg` that contains the keys for the foo keyring in the
|
||||||
directory +{pkgdatadir}/keyrings+.
|
directory +{keyringdir}+.
|
||||||
|
|
||||||
Optionally, the file `foo-trusted` can be provided containing a list of trusted
|
Optionally, the file `foo-trusted` can be provided containing a list of trusted
|
||||||
key IDs for that keyring. This is a file in a format compatible with 'gpg
|
key IDs for that keyring. This is a file in a format compatible with 'gpg
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ Transaction Options (apply to '-S', '-R' and '-U')
|
|||||||
|
|
||||||
*\--assume-installed* <package=version>::
|
*\--assume-installed* <package=version>::
|
||||||
Add a virtual package "package" with version "version" to the transaction
|
Add a virtual package "package" with version "version" to the transaction
|
||||||
to satisfy dependencies. This allows to disable specific dependency checks
|
to satisfy dependencies. This allows disabling the specific dependency checks
|
||||||
without affecting all dependency checks. To disable all dependency
|
without affecting all dependency checks. To disable all dependency
|
||||||
checking, see the '\--nodeps' option.
|
checking, see the '\--nodeps' option.
|
||||||
|
|
||||||
@@ -235,8 +235,15 @@ Transaction Options (apply to '-S', '-R' and '-U')
|
|||||||
|
|
||||||
*\--print-format* <format>::
|
*\--print-format* <format>::
|
||||||
Specify a printf-like format to control the output of the '\--print'
|
Specify a printf-like format to control the output of the '\--print'
|
||||||
operation. The possible attributes are: "%n" for pkgname, "%v" for pkgver,
|
operation. The possible attributes are: "%a" for arch, "%b" for
|
||||||
"%l" for location, "%r" for repository, and "%s" for size. Implies '\--print'.
|
builddate, "%d" for description, "%e" for pkgbase, "%f" for filename,
|
||||||
|
"%g" for base64 encoded PGP signature, "%h" for sha256sum, "%m" for
|
||||||
|
md5sum, "%n" for pkgname, "%p" for packager, "%v" for pkgver, "%l" for
|
||||||
|
location, "%r" for repository, "%s" for size, "%C" for checkdepends,
|
||||||
|
"%D" for depends, "%G" for groups, "%H" for conflicts, "%L" for
|
||||||
|
licenses, "%M" for makedepends, "%O" for optional depends, "%P" for
|
||||||
|
provides and "%R" for replaces.
|
||||||
|
Implies '\--print'.
|
||||||
|
|
||||||
|
|
||||||
Upgrade Options (apply to '-S' and '-U')[[UO]]
|
Upgrade Options (apply to '-S' and '-U')[[UO]]
|
||||||
@@ -449,11 +456,11 @@ Additional targets can also be specified manually, so that '-Su foo' will do a
|
|||||||
system upgrade and install/upgrade the "foo" package in the same operation.
|
system upgrade and install/upgrade the "foo" package in the same operation.
|
||||||
|
|
||||||
*-y, \--refresh*::
|
*-y, \--refresh*::
|
||||||
Download a fresh copy of the master package database from the server(s)
|
Download a fresh copy of the master package databases '(repo.db)' from the
|
||||||
defined in linkman:pacman.conf[5]. This should typically be used each time
|
server(s) defined in linkman:pacman.conf[5]. This should typically be used
|
||||||
you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
|
each time you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y'
|
||||||
will force a refresh of all package databases, even if they appear to be
|
flags will force a refresh of all package databases, even if they appear to
|
||||||
up-to-date.
|
be up-to-date.
|
||||||
|
|
||||||
|
|
||||||
Database Options (apply to '-D')[[QO]]
|
Database Options (apply to '-D')[[QO]]
|
||||||
@@ -482,8 +489,8 @@ Database Options (apply to '-D')[[QO]]
|
|||||||
File Options (apply to '-F')[[FO]]
|
File Options (apply to '-F')[[FO]]
|
||||||
----------------------------------
|
----------------------------------
|
||||||
*-y, --refresh*::
|
*-y, --refresh*::
|
||||||
Download fresh package databases from the server. Use twice to force a
|
Download fresh package file databases '(repo.files)' from the server.
|
||||||
refresh even if databases are up to date.
|
Use twice to force a refresh even if databases are up to date.
|
||||||
|
|
||||||
*-l, \--list*::
|
*-l, \--list*::
|
||||||
List the files owned by the queried package.
|
List the files owned by the queried package.
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ Options
|
|||||||
architecture 'any' can always be installed, as they are meant to be
|
architecture 'any' can always be installed, as they are meant to be
|
||||||
architecture independent.
|
architecture independent.
|
||||||
|
|
||||||
*XferCommand =* /path/to/command %u::
|
*XferCommand =* /path/to/command %u [%o]::
|
||||||
If set, an external program will be used to download all remote files.
|
If set, an external program will be used to download all remote files.
|
||||||
All instances of `%u` will be replaced with the download URL. If present,
|
All instances of `%u` will be replaced with the download URL. If present,
|
||||||
instances of `%o` will be replaced with the local filename, plus a
|
instances of `%o` will be replaced with the local filename, plus a
|
||||||
|
|||||||
20
doc/testpkg.8.asciidoc
Normal file
20
doc/testpkg.8.asciidoc
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
testpkg(8)
|
||||||
|
==========
|
||||||
|
|
||||||
|
Name
|
||||||
|
----
|
||||||
|
testpkg - test a pacman package for validity
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
'testpkg' <package file>
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
'testpkg' is a script used to make sure that a pacman package is valid.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
--------
|
||||||
|
linkman:pacman[8]
|
||||||
|
|
||||||
|
include::footer.asciidoc[]
|
||||||
11
etc/makepkg.conf.d/rust.conf.in
Normal file
11
etc/makepkg.conf.d/rust.conf.in
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/hint/bash
|
||||||
|
#
|
||||||
|
# @sysconfdir@/makepkg.conf.d/rust.conf
|
||||||
|
#
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# RUST LANGUAGE SUPPORT
|
||||||
|
#########################################################################
|
||||||
|
#
|
||||||
|
#RUSTFLAGS="-C opt-level=2"
|
||||||
|
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||||
@@ -23,7 +23,7 @@ DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
|
|||||||
|
|
||||||
#-- The package required by makepkg to download VCS sources
|
#-- The package required by makepkg to download VCS sources
|
||||||
# Format: 'protocol::package'
|
# Format: 'protocol::package'
|
||||||
VCSCLIENTS=('bzr::bzr'
|
VCSCLIENTS=('bzr::breezy'
|
||||||
'fossil::fossil'
|
'fossil::fossil'
|
||||||
'git::git'
|
'git::git'
|
||||||
'hg::mercurial'
|
'hg::mercurial'
|
||||||
@@ -41,13 +41,12 @@ CHOST="@CHOST@"
|
|||||||
#CFLAGS="-O2 -pipe"
|
#CFLAGS="-O2 -pipe"
|
||||||
#CXXFLAGS="-O2 -pipe"
|
#CXXFLAGS="-O2 -pipe"
|
||||||
#LDFLAGS=""
|
#LDFLAGS=""
|
||||||
#RUSTFLAGS="-C opt-level=2"
|
#LTOFLAGS="-flto"
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
#-- Debugging flags
|
#-- Debugging flags
|
||||||
#DEBUG_CFLAGS="-g"
|
#DEBUG_CFLAGS="-g"
|
||||||
#DEBUG_CXXFLAGS="-g"
|
#DEBUG_CXXFLAGS="-g"
|
||||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
@@ -76,7 +75,8 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
# These are default values for the options=() settings
|
# These are default values for the options=() settings
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
|
# Makepkg defaults:
|
||||||
|
# OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
|
||||||
# A negated option will do the opposite of the comments below.
|
# A negated option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- strip: Strip symbols from binaries/libraries
|
#-- strip: Strip symbols from binaries/libraries
|
||||||
@@ -88,8 +88,9 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- purge: Remove files specified by PURGE_TARGETS
|
#-- purge: Remove files specified by PURGE_TARGETS
|
||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#-- lto: Add compile flags for building with link time optimization
|
#-- lto: Add compile flags for building with link time optimization
|
||||||
|
#-- autodeps: Automatically add depends/provides
|
||||||
#
|
#
|
||||||
OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !debug !lto)
|
OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !debug !lto !autodeps)
|
||||||
|
|
||||||
#-- File integrity checks to use. Valid: ck, md5, sha1, sha224, sha256, sha384, sha512, b2
|
#-- File integrity checks to use. Valid: ck, md5, sha1, sha224, sha256, sha384, sha512, b2
|
||||||
INTEGRITY_CHECK=(ck)
|
INTEGRITY_CHECK=(ck)
|
||||||
@@ -107,6 +108,8 @@ DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
|||||||
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||||
#-- Directory to store source code in for debug packages
|
#-- Directory to store source code in for debug packages
|
||||||
DBGSRCDIR="/usr/src/debug"
|
DBGSRCDIR="/usr/src/debug"
|
||||||
|
#-- Prefix and directories for library autodeps
|
||||||
|
LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# PACKAGE OUTPUT
|
# PACKAGE OUTPUT
|
||||||
|
|||||||
@@ -74,4 +74,4 @@ ParallelDownloads = 5
|
|||||||
# tips on creating your own repositories.
|
# tips on creating your own repositories.
|
||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/packages
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.c
|
* add.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -415,7 +415,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
|
|||||||
static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
||||||
size_t pkg_current, size_t pkg_count)
|
size_t pkg_current, size_t pkg_count)
|
||||||
{
|
{
|
||||||
int i, ret = 0, errors = 0;
|
int ret = 0, errors = 0;
|
||||||
int is_upgrade = 0;
|
int is_upgrade = 0;
|
||||||
alpm_pkg_t *oldpkg = NULL;
|
alpm_pkg_t *oldpkg = NULL;
|
||||||
alpm_db_t *db = handle->db_local;
|
alpm_db_t *db = handle->db_local;
|
||||||
@@ -469,7 +469,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
!(trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
!(trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
||||||
const char *scriptlet_name = is_upgrade ? "pre_upgrade" : "pre_install";
|
const char *scriptlet_name = is_upgrade ? "pre_upgrade" : "pre_install";
|
||||||
|
|
||||||
_alpm_runscriptlet(handle, pkgfile, scriptlet_name,
|
_alpm_runscriptlet(handle, newpkg->name, pkgfile, scriptlet_name,
|
||||||
newpkg->version, oldpkg ? oldpkg->version : NULL, 1);
|
newpkg->version, oldpkg ? oldpkg->version : NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
||||||
PROGRESS(handle, progress, newpkg->name, 0, pkg_count, pkg_current);
|
PROGRESS(handle, progress, newpkg->name, 0, pkg_count, pkg_current);
|
||||||
|
|
||||||
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
|
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
||||||
int percent;
|
int percent;
|
||||||
|
|
||||||
if(newpkg->size != 0) {
|
if(newpkg->size != 0) {
|
||||||
@@ -641,7 +641,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
char *scriptlet = _alpm_local_db_pkgpath(db, newpkg, "install");
|
char *scriptlet = _alpm_local_db_pkgpath(db, newpkg, "install");
|
||||||
const char *scriptlet_name = is_upgrade ? "post_upgrade" : "post_install";
|
const char *scriptlet_name = is_upgrade ? "post_upgrade" : "post_install";
|
||||||
|
|
||||||
_alpm_runscriptlet(handle, scriptlet, scriptlet_name,
|
_alpm_runscriptlet(handle, newpkg->name, scriptlet, scriptlet_name,
|
||||||
newpkg->version, oldpkg ? oldpkg->version : NULL, 0);
|
newpkg->version, oldpkg ? oldpkg->version : NULL, 0);
|
||||||
free(scriptlet);
|
free(scriptlet);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.h
|
* add.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.c
|
* alpm.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.h
|
* alpm.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -107,12 +107,20 @@ typedef struct _alpm_db_t alpm_db_t;
|
|||||||
* Packages from databases are automatically freed when the database is unregistered. Packages loaded
|
* Packages from databases are automatically freed when the database is unregistered. Packages loaded
|
||||||
* from a file must be freed manually.
|
* from a file must be freed manually.
|
||||||
*
|
*
|
||||||
* Packages can then be queried for metadata or added to a \link alpm_trans_t transaction \endlink
|
* Packages can then be queried for metadata or added to a transaction
|
||||||
* to be added or removed from the system.
|
* to be added or removed from the system.
|
||||||
* @ingroup libalpm_packages
|
* @ingroup libalpm_packages
|
||||||
*/
|
*/
|
||||||
typedef struct _alpm_pkg_t alpm_pkg_t;
|
typedef struct _alpm_pkg_t alpm_pkg_t;
|
||||||
|
|
||||||
|
/** The extended data type used to store non-standard package data fields
|
||||||
|
* @ingroup libalpm_packages
|
||||||
|
*/
|
||||||
|
typedef struct _alpm_pkg_xdata_t {
|
||||||
|
char *name;
|
||||||
|
char *value;
|
||||||
|
} alpm_pkg_xdata_t;
|
||||||
|
|
||||||
/** The time type used by libalpm. Represents a unix time stamp
|
/** The time type used by libalpm. Represents a unix time stamp
|
||||||
* @ingroup libalpm_misc */
|
* @ingroup libalpm_misc */
|
||||||
typedef int64_t alpm_time_t;
|
typedef int64_t alpm_time_t;
|
||||||
@@ -156,7 +164,7 @@ typedef struct _alpm_backup_t {
|
|||||||
* @param path the path to search for in the package
|
* @param path the path to search for in the package
|
||||||
* @return a pointer to the matching file or NULL if not found
|
* @return a pointer to the matching file or NULL if not found
|
||||||
*/
|
*/
|
||||||
alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path);
|
alpm_file_t *alpm_filelist_contains(const alpm_filelist_t *filelist, const char *path);
|
||||||
|
|
||||||
/* End of libalpm_files */
|
/* End of libalpm_files */
|
||||||
/** @} */
|
/** @} */
|
||||||
@@ -592,16 +600,10 @@ typedef struct _alpm_depmissing_t {
|
|||||||
|
|
||||||
/** A conflict that has occurred between two packages. */
|
/** A conflict that has occurred between two packages. */
|
||||||
typedef struct _alpm_conflict_t {
|
typedef struct _alpm_conflict_t {
|
||||||
/** Hash of the first package name
|
/** The first package */
|
||||||
* (used internally to speed up conflict checks) */
|
alpm_pkg_t *package1;
|
||||||
unsigned long package1_hash;
|
/** The second package */
|
||||||
/** Hash of the second package name
|
alpm_pkg_t *package2;
|
||||||
* (used internally to speed up conflict checks) */
|
|
||||||
unsigned long package2_hash;
|
|
||||||
/** Name of the first package */
|
|
||||||
char *package1;
|
|
||||||
/** Name of the second package */
|
|
||||||
char *package2;
|
|
||||||
/** The conflict */
|
/** The conflict */
|
||||||
alpm_depend_t *reason;
|
alpm_depend_t *reason;
|
||||||
} alpm_conflict_t;
|
} alpm_conflict_t;
|
||||||
@@ -748,6 +750,10 @@ typedef enum _alpm_event_type_t {
|
|||||||
ALPM_EVENT_LOAD_START,
|
ALPM_EVENT_LOAD_START,
|
||||||
/** Target package is finished loading. */
|
/** Target package is finished loading. */
|
||||||
ALPM_EVENT_LOAD_DONE,
|
ALPM_EVENT_LOAD_DONE,
|
||||||
|
/** An install file is about to be ran */
|
||||||
|
ALPM_EVENT_INSTALL_RUN_START,
|
||||||
|
/** An install file has finished running */
|
||||||
|
ALPM_EVENT_INSTALL_RUN_DONE,
|
||||||
/** Scriptlet has printed information; See alpm_event_scriptlet_info_t for
|
/** Scriptlet has printed information; See alpm_event_scriptlet_info_t for
|
||||||
* arguments. */
|
* arguments. */
|
||||||
ALPM_EVENT_SCRIPTLET_INFO,
|
ALPM_EVENT_SCRIPTLET_INFO,
|
||||||
@@ -838,10 +844,32 @@ typedef struct _alpm_event_optdep_removal_t {
|
|||||||
alpm_depend_t *optdep;
|
alpm_depend_t *optdep;
|
||||||
} alpm_event_optdep_removal_t;
|
} alpm_event_optdep_removal_t;
|
||||||
|
|
||||||
|
/** Enum of the kinds of scriptlets */
|
||||||
|
typedef enum _alpm_scriptlet_kind_t {
|
||||||
|
/** We are running an install file */
|
||||||
|
ALPM_SCRIPTLET_KIND_INSTALL_FILE,
|
||||||
|
/** We are running a hook */
|
||||||
|
ALPM_SCRIPTLET_KIND_HOOK,
|
||||||
|
/** We are running a command */
|
||||||
|
ALPM_SCRIPTLET_KIND_COMMAND,
|
||||||
|
} alpm_scriptlet_kind_t;
|
||||||
|
|
||||||
|
/** We are running an install file. */
|
||||||
|
typedef struct _alpm_event_install_run_t {
|
||||||
|
/** Type of event */
|
||||||
|
alpm_event_type_t type;
|
||||||
|
/** The name of the package */
|
||||||
|
const char *pkgname;
|
||||||
|
} alpm_event_install_run_t;
|
||||||
|
|
||||||
/** A scriptlet was ran. */
|
/** A scriptlet was ran. */
|
||||||
typedef struct _alpm_event_scriptlet_info_t {
|
typedef struct _alpm_event_scriptlet_info_t {
|
||||||
/** Type of event */
|
/** Type of event */
|
||||||
alpm_event_type_t type;
|
alpm_event_type_t type;
|
||||||
|
/** The kind of scriptlet being ran */
|
||||||
|
alpm_scriptlet_kind_t kind;
|
||||||
|
/** The name of the scriptlet **/
|
||||||
|
const char *name;
|
||||||
/** Line of scriptlet output */
|
/** Line of scriptlet output */
|
||||||
const char *line;
|
const char *line;
|
||||||
} alpm_event_scriptlet_info_t;
|
} alpm_event_scriptlet_info_t;
|
||||||
@@ -944,6 +972,8 @@ typedef union _alpm_event_t {
|
|||||||
alpm_event_package_operation_t package_operation;
|
alpm_event_package_operation_t package_operation;
|
||||||
/** An optdept was remove */
|
/** An optdept was remove */
|
||||||
alpm_event_optdep_removal_t optdep_removal;
|
alpm_event_optdep_removal_t optdep_removal;
|
||||||
|
/** An install file is about to be run */
|
||||||
|
alpm_event_install_run_t install_run;
|
||||||
/** A scriptlet was ran */
|
/** A scriptlet was ran */
|
||||||
alpm_event_scriptlet_info_t scriptlet_info;
|
alpm_event_scriptlet_info_t scriptlet_info;
|
||||||
/** A database is missing */
|
/** A database is missing */
|
||||||
@@ -967,7 +997,7 @@ typedef union _alpm_event_t {
|
|||||||
* Called when an event occurs
|
* Called when an event occurs
|
||||||
* @param ctx user-provided context
|
* @param ctx user-provided context
|
||||||
* @param event the event that occurred */
|
* @param event the event that occurred */
|
||||||
typedef void (*alpm_cb_event)(void *ctx, alpm_event_t *);
|
typedef void (*alpm_cb_event)(void *ctx, alpm_event_t *event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of question.
|
* Type of question.
|
||||||
@@ -1114,7 +1144,7 @@ typedef union _alpm_question_t {
|
|||||||
* @param ctx user-provided context
|
* @param ctx user-provided context
|
||||||
* @param question the question being asked.
|
* @param question the question being asked.
|
||||||
*/
|
*/
|
||||||
typedef void (*alpm_cb_question)(void *ctx, alpm_question_t *);
|
typedef void (*alpm_cb_question)(void *ctx, alpm_question_t *question);
|
||||||
|
|
||||||
/** An enum over different kinds of progress alerts. */
|
/** An enum over different kinds of progress alerts. */
|
||||||
typedef enum _alpm_progress_t {
|
typedef enum _alpm_progress_t {
|
||||||
@@ -1281,6 +1311,12 @@ int alpm_unregister_all_syncdbs(alpm_handle_t *handle);
|
|||||||
*/
|
*/
|
||||||
int alpm_db_unregister(alpm_db_t *db);
|
int alpm_db_unregister(alpm_db_t *db);
|
||||||
|
|
||||||
|
/** Get the handle of a package database.
|
||||||
|
* @param db pointer to the package database
|
||||||
|
* @return the alpm handle that the package database belongs to
|
||||||
|
*/
|
||||||
|
alpm_handle_t *alpm_db_get_handle(alpm_db_t *db);
|
||||||
|
|
||||||
/** Get the name of a package database.
|
/** Get the name of a package database.
|
||||||
* @param db pointer to the package database
|
* @param db pointer to the package database
|
||||||
* @return the name of the package database, NULL on error
|
* @return the name of the package database, NULL on error
|
||||||
@@ -1830,7 +1866,7 @@ const char *alpm_option_get_gpgdir(alpm_handle_t *handle);
|
|||||||
* @param gpgdir the gpgdir to set
|
* @param gpgdir the gpgdir to set
|
||||||
*/
|
*/
|
||||||
int alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir);
|
int alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir);
|
||||||
/* End of gpdir accessors */
|
/* End of gpgdir accessors */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
@@ -2386,6 +2422,12 @@ int alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg);
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Gets the handle of a package
|
||||||
|
* @param pkg a pointer to package
|
||||||
|
* @return the alpm handle that the package belongs to
|
||||||
|
*/
|
||||||
|
alpm_handle_t *alpm_pkg_get_handle(alpm_pkg_t *pkg);
|
||||||
|
|
||||||
/** Gets the name of the file from which the package was loaded.
|
/** Gets the name of the file from which the package was loaded.
|
||||||
* @param pkg a pointer to package
|
* @param pkg a pointer to package
|
||||||
* @return a reference to an internal string
|
* @return a reference to an internal string
|
||||||
@@ -2586,6 +2628,12 @@ int alpm_pkg_get_sig(alpm_pkg_t *pkg, unsigned char **sig, size_t *sig_len);
|
|||||||
*/
|
*/
|
||||||
int alpm_pkg_get_validation(alpm_pkg_t *pkg);
|
int alpm_pkg_get_validation(alpm_pkg_t *pkg);
|
||||||
|
|
||||||
|
/** Gets the extended data field of a package.
|
||||||
|
* @param pkg a pointer to package
|
||||||
|
* @return a reference to a list of alpm_pkg_xdata_t objects
|
||||||
|
*/
|
||||||
|
alpm_list_t *alpm_pkg_get_xdata(alpm_pkg_t *pkg);
|
||||||
|
|
||||||
/** Returns whether the package has an install scriptlet.
|
/** Returns whether the package has an install scriptlet.
|
||||||
* @return 0 if FALSE, TRUE otherwise
|
* @return 0 if FALSE, TRUE otherwise
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.c
|
* alpm_list.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.h
|
* alpm_list.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.c
|
* backup.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.h
|
* backup.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_local.c : backend for the local database
|
* be_local.c : backend for the local database
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -195,6 +195,12 @@ static alpm_list_t *_cache_get_backup(alpm_pkg_t *pkg)
|
|||||||
return pkg->backup;
|
return pkg->backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static alpm_list_t *_cache_get_xdata(alpm_pkg_t *pkg)
|
||||||
|
{
|
||||||
|
LAZY_LOAD(INFRQ_DESC);
|
||||||
|
return pkg->xdata;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a package changelog for reading. Similar to fopen in functionality,
|
* Open a package changelog for reading. Similar to fopen in functionality,
|
||||||
* except that the returned 'file stream' is from the database.
|
* except that the returned 'file stream' is from the database.
|
||||||
@@ -349,6 +355,7 @@ static const struct pkg_operations local_pkg_ops = {
|
|||||||
.get_replaces = _cache_get_replaces,
|
.get_replaces = _cache_get_replaces,
|
||||||
.get_files = _cache_get_files,
|
.get_files = _cache_get_files,
|
||||||
.get_backup = _cache_get_backup,
|
.get_backup = _cache_get_backup,
|
||||||
|
.get_xdata = _cache_get_xdata,
|
||||||
|
|
||||||
.changelog_open = _cache_changelog_open,
|
.changelog_open = _cache_changelog_open,
|
||||||
.changelog_read = _cache_changelog_read,
|
.changelog_read = _cache_changelog_read,
|
||||||
@@ -804,6 +811,18 @@ static int local_db_read(alpm_pkg_t *info, int inforeq)
|
|||||||
READ_AND_SPLITDEP(info->conflicts);
|
READ_AND_SPLITDEP(info->conflicts);
|
||||||
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
||||||
READ_AND_SPLITDEP(info->provides);
|
READ_AND_SPLITDEP(info->provides);
|
||||||
|
} else if(strcmp(line, "%XDATA%") == 0) {
|
||||||
|
alpm_list_t *i, *lines = NULL;
|
||||||
|
READ_AND_STORE_ALL(lines);
|
||||||
|
for(i = lines; i; i = i->next) {
|
||||||
|
alpm_pkg_xdata_t *pd = _alpm_pkg_parse_xdata(i->data);
|
||||||
|
if(pd == NULL || !alpm_list_append(&info->xdata, pd)) {
|
||||||
|
_alpm_pkg_xdata_free(pd);
|
||||||
|
FREELIST(lines);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FREELIST(lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@@ -1040,6 +1059,15 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, int inforeq)
|
|||||||
write_deps(fp, "%CONFLICTS%", info->conflicts);
|
write_deps(fp, "%CONFLICTS%", info->conflicts);
|
||||||
write_deps(fp, "%PROVIDES%", info->provides);
|
write_deps(fp, "%PROVIDES%", info->provides);
|
||||||
|
|
||||||
|
if(info->xdata) {
|
||||||
|
fputs("%XDATA%\n", fp);
|
||||||
|
for(lp = info->xdata; lp; lp = lp->next) {
|
||||||
|
alpm_pkg_xdata_t *pd = lp->data;
|
||||||
|
fprintf(fp, "%s=%s\n", pd->name, pd->value);
|
||||||
|
}
|
||||||
|
fputc('\n', fp);
|
||||||
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_package.c : backend for packages
|
* be_package.c : backend for packages
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -244,10 +244,12 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
|
|||||||
CALLOC(backup, 1, sizeof(alpm_backup_t), return -1);
|
CALLOC(backup, 1, sizeof(alpm_backup_t), return -1);
|
||||||
STRDUP(backup->name, ptr, FREE(backup); return -1);
|
STRDUP(backup->name, ptr, FREE(backup); return -1);
|
||||||
newpkg->backup = alpm_list_add(newpkg->backup, backup);
|
newpkg->backup = alpm_list_add(newpkg->backup, backup);
|
||||||
} else if(strcmp(key, "force") == 0) {
|
} else if(strcmp(key, "xdata") == 0) {
|
||||||
/* deprecated, skip it */
|
alpm_pkg_xdata_t *pd = _alpm_pkg_parse_xdata(ptr);
|
||||||
} else if(strcmp(key, "makepkgopt") == 0) {
|
if(pd == NULL || !alpm_list_append(&newpkg->xdata, pd)) {
|
||||||
/* not used atm */
|
_alpm_pkg_xdata_free(pd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "%s: unknown key '%s' in description file line %d\n",
|
_alpm_log(handle, ALPM_LOG_DEBUG, "%s: unknown key '%s' in description file line %d\n",
|
||||||
newpkg->name ? newpkg->name : "error", key, linenum);
|
newpkg->name ? newpkg->name : "error", key, linenum);
|
||||||
@@ -651,7 +653,6 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
_alpm_archive_read_free(archive);
|
_alpm_archive_read_free(archive);
|
||||||
close(fd);
|
|
||||||
|
|
||||||
/* internal fields for package struct */
|
/* internal fields for package struct */
|
||||||
newpkg->origin = ALPM_PKG_FROM_FILE;
|
newpkg->origin = ALPM_PKG_FROM_FILE;
|
||||||
@@ -674,6 +675,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
|
|||||||
newpkg->infolevel |= INFRQ_FILES;
|
newpkg->infolevel |= INFRQ_FILES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
return newpkg;
|
return newpkg;
|
||||||
|
|
||||||
pkg_invalid:
|
pkg_invalid:
|
||||||
@@ -723,7 +725,6 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
|
|||||||
int validation = 0;
|
int validation = 0;
|
||||||
char *sigpath;
|
char *sigpath;
|
||||||
alpm_pkg_t *pkg_temp;
|
alpm_pkg_t *pkg_temp;
|
||||||
char *packager;
|
|
||||||
|
|
||||||
CHECK_HANDLE(handle, return -1);
|
CHECK_HANDLE(handle, return -1);
|
||||||
ASSERT(pkg != NULL, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
|
ASSERT(pkg != NULL, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
|
||||||
@@ -749,13 +750,7 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
|
|||||||
char *key = k->data;
|
char *key = k->data;
|
||||||
if(_alpm_key_in_keychain(handle, key) == 0) {
|
if(_alpm_key_in_keychain(handle, key) == 0) {
|
||||||
pkg_temp = _alpm_pkg_load_internal(handle, filename, full);
|
pkg_temp = _alpm_pkg_load_internal(handle, filename, full);
|
||||||
if(pkg_temp) {
|
if(_alpm_key_import(handle, NULL, key) == -1) {
|
||||||
packager = pkg_temp->packager;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
packager = NULL;
|
|
||||||
}
|
|
||||||
if(_alpm_key_import(handle, packager, key) == -1) {
|
|
||||||
fail = 1;
|
fail = 1;
|
||||||
}
|
}
|
||||||
_alpm_pkg_free(pkg_temp);
|
_alpm_pkg_free(pkg_temp);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_sync.c : backend for sync databases
|
* be_sync.c : backend for sync databases
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -666,6 +666,18 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
|||||||
pkg->files.count = files_count;
|
pkg->files.count = files_count;
|
||||||
pkg->files.files = files;
|
pkg->files.files = files;
|
||||||
_alpm_filelist_sort(&pkg->files);
|
_alpm_filelist_sort(&pkg->files);
|
||||||
|
} else if(strcmp(line, "%DATA%") == 0) {
|
||||||
|
alpm_list_t *i, *lines = NULL;
|
||||||
|
READ_AND_STORE_ALL(lines);
|
||||||
|
for(i = lines; i; i = i->next) {
|
||||||
|
alpm_pkg_xdata_t *pd = _alpm_pkg_parse_xdata(i->data);
|
||||||
|
if(pd == NULL || !alpm_list_append(&pkg->xdata, pd)) {
|
||||||
|
_alpm_pkg_xdata_free(pd);
|
||||||
|
FREELIST(lines);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FREELIST(lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ret != ARCHIVE_EOF) {
|
if(ret != ARCHIVE_EOF) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.c
|
* conflict.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||||
@@ -50,10 +50,8 @@ static alpm_conflict_t *conflict_new(alpm_pkg_t *pkg1, alpm_pkg_t *pkg2,
|
|||||||
|
|
||||||
CALLOC(conflict, 1, sizeof(alpm_conflict_t), return NULL);
|
CALLOC(conflict, 1, sizeof(alpm_conflict_t), return NULL);
|
||||||
|
|
||||||
conflict->package1_hash = pkg1->name_hash;
|
ASSERT(_alpm_pkg_dup(pkg1, &conflict->package1) == 0, goto error);
|
||||||
conflict->package2_hash = pkg2->name_hash;
|
ASSERT(_alpm_pkg_dup(pkg2, &conflict->package2) == 0, goto error);
|
||||||
STRDUP(conflict->package1, pkg1->name, goto error);
|
|
||||||
STRDUP(conflict->package2, pkg2->name, goto error);
|
|
||||||
conflict->reason = reason;
|
conflict->reason = reason;
|
||||||
|
|
||||||
return conflict;
|
return conflict;
|
||||||
@@ -66,8 +64,9 @@ error:
|
|||||||
void SYMEXPORT alpm_conflict_free(alpm_conflict_t *conflict)
|
void SYMEXPORT alpm_conflict_free(alpm_conflict_t *conflict)
|
||||||
{
|
{
|
||||||
ASSERT(conflict != NULL, return);
|
ASSERT(conflict != NULL, return);
|
||||||
FREE(conflict->package2);
|
_alpm_pkg_free(conflict->package1);
|
||||||
FREE(conflict->package1);
|
_alpm_pkg_free(conflict->package2);
|
||||||
|
|
||||||
FREE(conflict);
|
FREE(conflict);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,10 +78,8 @@ alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict)
|
|||||||
alpm_conflict_t *newconflict;
|
alpm_conflict_t *newconflict;
|
||||||
CALLOC(newconflict, 1, sizeof(alpm_conflict_t), return NULL);
|
CALLOC(newconflict, 1, sizeof(alpm_conflict_t), return NULL);
|
||||||
|
|
||||||
newconflict->package1_hash = conflict->package1_hash;
|
ASSERT(_alpm_pkg_dup(conflict->package1, &newconflict->package1) == 0, goto error);
|
||||||
newconflict->package2_hash = conflict->package2_hash;
|
ASSERT(_alpm_pkg_dup(conflict->package2, &newconflict->package2) == 0, goto error);
|
||||||
STRDUP(newconflict->package1, conflict->package1, goto error);
|
|
||||||
STRDUP(newconflict->package2, conflict->package2, goto error);
|
|
||||||
newconflict->reason = conflict->reason;
|
newconflict->reason = conflict->reason;
|
||||||
|
|
||||||
return newconflict;
|
return newconflict;
|
||||||
@@ -105,10 +102,10 @@ static int conflict_isin(alpm_conflict_t *needle, alpm_list_t *haystack)
|
|||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
for(i = haystack; i; i = i->next) {
|
for(i = haystack; i; i = i->next) {
|
||||||
alpm_conflict_t *conflict = i->data;
|
alpm_conflict_t *conflict = i->data;
|
||||||
if(needle->package1_hash == conflict->package1_hash
|
if(needle->package1->name_hash == conflict->package1->name_hash
|
||||||
&& needle->package2_hash == conflict->package2_hash
|
&& needle->package2->name_hash == conflict->package2->name_hash
|
||||||
&& strcmp(needle->package1, conflict->package1) == 0
|
&& strcmp(needle->package1->name, conflict->package1->name) == 0
|
||||||
&& strcmp(needle->package2, conflict->package2) == 0) {
|
&& strcmp(needle->package2->name, conflict->package2->name) == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.h
|
* conflict.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.c
|
* db.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -212,6 +212,12 @@ int SYMEXPORT alpm_db_remove_server(alpm_db_t *db, const char *url)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_handle_t SYMEXPORT *alpm_db_get_handle(alpm_db_t *db)
|
||||||
|
{
|
||||||
|
ASSERT(db != NULL, return NULL);
|
||||||
|
return db->handle;
|
||||||
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db)
|
const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db)
|
||||||
{
|
{
|
||||||
ASSERT(db != NULL, return NULL);
|
ASSERT(db != NULL, return NULL);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.h
|
* db.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.c
|
* deps.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.h
|
* deps.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* diskspace.c
|
* diskspace.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2010-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* diskspace.h
|
* diskspace.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2010-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dload.c
|
* dload.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -153,8 +153,7 @@ static char *get_fullpath(const char *path, const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ABORT_SIGINT = 1,
|
ABORT_OVER_MAXFILESIZE = 1,
|
||||||
ABORT_OVER_MAXFILESIZE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int dload_interrupted;
|
static int dload_interrupted;
|
||||||
@@ -295,8 +294,11 @@ static size_t dload_parseheader_cb(void *ptr, size_t size, size_t nmemb, void *u
|
|||||||
endptr--;
|
endptr--;
|
||||||
}
|
}
|
||||||
|
|
||||||
STRNDUP(payload->content_disp_name, fptr, endptr - fptr + 1,
|
/* avoid information leakage with badly formed headers */
|
||||||
RET_ERR(payload->handle, ALPM_ERR_MEMORY, realsize));
|
if(endptr > fptr) {
|
||||||
|
STRNDUP(payload->content_disp_name, fptr, endptr - fptr + 1,
|
||||||
|
RET_ERR(payload->handle, ALPM_ERR_MEMORY, realsize));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,10 +473,9 @@ static int curl_retry_next_server(CURLM *curlm, CURL *curl, struct dload_payload
|
|||||||
* Returns -1 if an error happened for a required file
|
* Returns -1 if an error happened for a required file
|
||||||
* Returns -2 if an error happened for an optional file
|
* Returns -2 if an error happened for an optional file
|
||||||
*/
|
*/
|
||||||
static int curl_check_finished_download(CURLM *curlm, CURLMsg *msg,
|
static int curl_check_finished_download(alpm_handle_t *handle, CURLM *curlm, CURLMsg *msg,
|
||||||
const char *localpath, int *active_downloads_num)
|
const char *localpath, int *active_downloads_num)
|
||||||
{
|
{
|
||||||
alpm_handle_t *handle = NULL;
|
|
||||||
struct dload_payload *payload = NULL;
|
struct dload_payload *payload = NULL;
|
||||||
CURL *curl = msg->easy_handle;
|
CURL *curl = msg->easy_handle;
|
||||||
CURLcode curlerr;
|
CURLcode curlerr;
|
||||||
@@ -489,7 +490,6 @@ static int curl_check_finished_download(CURLM *curlm, CURLMsg *msg,
|
|||||||
|
|
||||||
curlerr = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &payload);
|
curlerr = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &payload);
|
||||||
ASSERT(curlerr == CURLE_OK, RET_ERR(handle, ALPM_ERR_LIBCURL, -1));
|
ASSERT(curlerr == CURLE_OK, RET_ERR(handle, ALPM_ERR_LIBCURL, -1));
|
||||||
handle = payload->handle;
|
|
||||||
|
|
||||||
curl_gethost(payload->fileurl, hostname, sizeof(hostname));
|
curl_gethost(payload->fileurl, hostname, sizeof(hostname));
|
||||||
curlerr = msg->data.result;
|
curlerr = msg->data.result;
|
||||||
@@ -917,7 +917,7 @@ static int curl_download_internal(alpm_handle_t *handle,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(msg->msg == CURLMSG_DONE) {
|
if(msg->msg == CURLMSG_DONE) {
|
||||||
int ret = curl_check_finished_download(curlm, msg,
|
int ret = curl_check_finished_download(handle, curlm, msg,
|
||||||
localpath, &active_downloads_num);
|
localpath, &active_downloads_num);
|
||||||
if(ret == -1) {
|
if(ret == -1) {
|
||||||
/* if current payload failed to download then stop adding new payloads but wait for the
|
/* if current payload failed to download then stop adding new payloads but wait for the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dload.h
|
* dload.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* error.c
|
* error.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* filelist.c
|
* filelist.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2012-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -118,7 +118,7 @@ static int _alpm_files_cmp(const void *f1, const void *f2)
|
|||||||
return strcmp(file1->name, file2->name);
|
return strcmp(file1->name, file2->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_file_t SYMEXPORT *alpm_filelist_contains(alpm_filelist_t *filelist,
|
alpm_file_t SYMEXPORT *alpm_filelist_contains(const alpm_filelist_t *filelist,
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
alpm_file_t key;
|
alpm_file_t key;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* filelist.h
|
* filelist.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2012-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* graph.c - helpful graph structure and setup/teardown methods
|
* graph.c - helpful graph structure and setup/teardown methods
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2007-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* graph.h - helpful graph structure and setup/teardown methods
|
* graph.h - helpful graph structure and setup/teardown methods
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2007-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.c
|
* group.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.h
|
* group.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.c
|
* handle.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.h
|
* handle.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* hook.c
|
* hook.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2015-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -522,10 +522,10 @@ static int _alpm_hook_run_hook(alpm_handle_t *handle, struct _alpm_hook_t *hook)
|
|||||||
alpm_list_count(hook->matches), (alpm_list_fn_cmp)strcmp);
|
alpm_list_count(hook->matches), (alpm_list_fn_cmp)strcmp);
|
||||||
/* hooks with multiple triggers could have duplicate matches */
|
/* hooks with multiple triggers could have duplicate matches */
|
||||||
ctx = hook->matches = _alpm_strlist_dedup(hook->matches);
|
ctx = hook->matches = _alpm_strlist_dedup(hook->matches);
|
||||||
return _alpm_run_chroot(handle, hook->cmd[0], hook->cmd,
|
return _alpm_run_chroot(handle, hook->name, ALPM_SCRIPTLET_KIND_HOOK, hook->cmd[0], hook->cmd,
|
||||||
(_alpm_cb_io) _alpm_hook_feed_targets, &ctx);
|
(_alpm_cb_io) _alpm_hook_feed_targets, &ctx);
|
||||||
} else {
|
} else {
|
||||||
return _alpm_run_chroot(handle, hook->cmd[0], hook->cmd, NULL, NULL);
|
return _alpm_run_chroot(handle, hook->name, ALPM_SCRIPTLET_KIND_HOOK, hook->cmd[0], hook->cmd, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* hook.h
|
* hook.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2015-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
/*
|
/*
|
||||||
* libarchive-compat.h
|
* libarchive-compat.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2013-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.c
|
* log.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.h
|
* log.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.c
|
* package.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -98,6 +98,7 @@ static alpm_list_t *_pkg_get_provides(alpm_pkg_t *pkg) { return pkg->provides;
|
|||||||
static alpm_list_t *_pkg_get_replaces(alpm_pkg_t *pkg) { return pkg->replaces; }
|
static alpm_list_t *_pkg_get_replaces(alpm_pkg_t *pkg) { return pkg->replaces; }
|
||||||
static alpm_filelist_t *_pkg_get_files(alpm_pkg_t *pkg) { return &(pkg->files); }
|
static alpm_filelist_t *_pkg_get_files(alpm_pkg_t *pkg) { return &(pkg->files); }
|
||||||
static alpm_list_t *_pkg_get_backup(alpm_pkg_t *pkg) { return pkg->backup; }
|
static alpm_list_t *_pkg_get_backup(alpm_pkg_t *pkg) { return pkg->backup; }
|
||||||
|
static alpm_list_t *_pkg_get_xdata(alpm_pkg_t *pkg) { return pkg->xdata; }
|
||||||
|
|
||||||
static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
|
static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
|
||||||
{
|
{
|
||||||
@@ -162,6 +163,7 @@ const struct pkg_operations default_pkg_ops = {
|
|||||||
.get_replaces = _pkg_get_replaces,
|
.get_replaces = _pkg_get_replaces,
|
||||||
.get_files = _pkg_get_files,
|
.get_files = _pkg_get_files,
|
||||||
.get_backup = _pkg_get_backup,
|
.get_backup = _pkg_get_backup,
|
||||||
|
.get_xdata = _pkg_get_xdata,
|
||||||
|
|
||||||
.changelog_open = _pkg_changelog_open,
|
.changelog_open = _pkg_changelog_open,
|
||||||
.changelog_read = _pkg_changelog_read,
|
.changelog_read = _pkg_changelog_read,
|
||||||
@@ -191,6 +193,12 @@ const char SYMEXPORT *alpm_pkg_get_base(alpm_pkg_t *pkg)
|
|||||||
return pkg->ops->get_base(pkg);
|
return pkg->ops->get_base(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_handle_t SYMEXPORT *alpm_pkg_get_handle(alpm_pkg_t *pkg)
|
||||||
|
{
|
||||||
|
ASSERT(pkg != NULL, return NULL);
|
||||||
|
return pkg->handle;
|
||||||
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_name(alpm_pkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_name(alpm_pkg_t *pkg)
|
||||||
{
|
{
|
||||||
ASSERT(pkg != NULL, return NULL);
|
ASSERT(pkg != NULL, return NULL);
|
||||||
@@ -479,6 +487,13 @@ int SYMEXPORT alpm_pkg_has_scriptlet(alpm_pkg_t *pkg)
|
|||||||
return pkg->ops->has_scriptlet(pkg);
|
return pkg->ops->has_scriptlet(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_list_t SYMEXPORT *alpm_pkg_get_xdata(alpm_pkg_t *pkg)
|
||||||
|
{
|
||||||
|
ASSERT(pkg != NULL, return NULL);
|
||||||
|
pkg->handle->pm_errno = ALPM_ERR_OK;
|
||||||
|
return pkg->ops->get_xdata(pkg);
|
||||||
|
}
|
||||||
|
|
||||||
static void find_requiredby(alpm_pkg_t *pkg, alpm_db_t *db, alpm_list_t **reqs,
|
static void find_requiredby(alpm_pkg_t *pkg, alpm_db_t *db, alpm_list_t **reqs,
|
||||||
int optional)
|
int optional)
|
||||||
{
|
{
|
||||||
@@ -671,6 +686,30 @@ static void free_deplist(alpm_list_t *deps)
|
|||||||
alpm_list_free(deps);
|
alpm_list_free(deps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_pkg_xdata_t *_alpm_pkg_parse_xdata(const char *string)
|
||||||
|
{
|
||||||
|
alpm_pkg_xdata_t *pd;
|
||||||
|
const char *sep;
|
||||||
|
if(string == NULL || (sep = strchr(string, '=')) == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CALLOC(pd, 1, sizeof(alpm_pkg_xdata_t), return NULL);
|
||||||
|
STRNDUP(pd->name, string, sep - string, FREE(pd); return NULL);
|
||||||
|
STRDUP(pd->value, sep + 1, FREE(pd->name); FREE(pd); return NULL);
|
||||||
|
|
||||||
|
return pd;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _alpm_pkg_xdata_free(alpm_pkg_xdata_t *pd)
|
||||||
|
{
|
||||||
|
if(pd) {
|
||||||
|
free(pd->name);
|
||||||
|
free(pd->value);
|
||||||
|
free(pd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _alpm_pkg_free(alpm_pkg_t *pkg)
|
void _alpm_pkg_free(alpm_pkg_t *pkg)
|
||||||
{
|
{
|
||||||
if(pkg == NULL) {
|
if(pkg == NULL) {
|
||||||
@@ -701,6 +740,8 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
|
|||||||
}
|
}
|
||||||
alpm_list_free_inner(pkg->backup, (alpm_list_fn_free)_alpm_backup_free);
|
alpm_list_free_inner(pkg->backup, (alpm_list_fn_free)_alpm_backup_free);
|
||||||
alpm_list_free(pkg->backup);
|
alpm_list_free(pkg->backup);
|
||||||
|
alpm_list_free_inner(pkg->xdata, (alpm_list_fn_free)_alpm_pkg_xdata_free);
|
||||||
|
alpm_list_free(pkg->xdata);
|
||||||
free_deplist(pkg->depends);
|
free_deplist(pkg->depends);
|
||||||
free_deplist(pkg->optdepends);
|
free_deplist(pkg->optdepends);
|
||||||
free_deplist(pkg->checkdepends);
|
free_deplist(pkg->checkdepends);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.h
|
* package.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||||
@@ -67,6 +67,8 @@ struct pkg_operations {
|
|||||||
alpm_filelist_t *(*get_files) (alpm_pkg_t *);
|
alpm_filelist_t *(*get_files) (alpm_pkg_t *);
|
||||||
alpm_list_t *(*get_backup) (alpm_pkg_t *);
|
alpm_list_t *(*get_backup) (alpm_pkg_t *);
|
||||||
|
|
||||||
|
alpm_list_t *(*get_xdata) (alpm_pkg_t *);
|
||||||
|
|
||||||
void *(*changelog_open) (alpm_pkg_t *);
|
void *(*changelog_open) (alpm_pkg_t *);
|
||||||
size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, void *);
|
size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, void *);
|
||||||
int (*changelog_close) (const alpm_pkg_t *, void *);
|
int (*changelog_close) (const alpm_pkg_t *, void *);
|
||||||
@@ -136,6 +138,8 @@ struct _alpm_pkg_t {
|
|||||||
alpm_pkgreason_t reason;
|
alpm_pkgreason_t reason;
|
||||||
int scriptlet;
|
int scriptlet;
|
||||||
|
|
||||||
|
alpm_list_t *xdata;
|
||||||
|
|
||||||
/* Bitfield from alpm_dbinfrq_t */
|
/* Bitfield from alpm_dbinfrq_t */
|
||||||
int infolevel;
|
int infolevel;
|
||||||
/* Bitfield from alpm_pkgvalidation_t */
|
/* Bitfield from alpm_pkgvalidation_t */
|
||||||
@@ -158,4 +162,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
|
|||||||
int _alpm_pkg_cmp(const void *p1, const void *p2);
|
int _alpm_pkg_cmp(const void *p1, const void *p2);
|
||||||
int _alpm_pkg_compare_versions(alpm_pkg_t *local_pkg, alpm_pkg_t *pkg);
|
int _alpm_pkg_compare_versions(alpm_pkg_t *local_pkg, alpm_pkg_t *pkg);
|
||||||
|
|
||||||
|
alpm_pkg_xdata_t *_alpm_pkg_parse_xdata(const char *string);
|
||||||
|
void _alpm_pkg_xdata_free(alpm_pkg_xdata_t *pd);
|
||||||
|
|
||||||
#endif /* ALPM_PACKAGE_H */
|
#endif /* ALPM_PACKAGE_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* pkghash.c
|
* pkghash.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* pkghash.h
|
* pkghash.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ XGETTEXT_OPTIONS = \
|
|||||||
# This is the copyright holder that gets inserted into the header of the
|
# This is the copyright holder that gets inserted into the header of the
|
||||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||||
# package.
|
# package.
|
||||||
COPYRIGHT_HOLDER = Pacman Development Team <pacman-dev@archlinux.org>
|
COPYRIGHT_HOLDER = Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
|
||||||
# This is the email address or URL to which the translators shall report
|
# This is the email address or URL to which the translators shall report
|
||||||
# bugs in the untranslated strings.
|
# bugs in the untranslated strings.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* remove.c
|
* remove.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -692,7 +692,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
|
|||||||
!(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
!(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
||||||
char *scriptlet = _alpm_local_db_pkgpath(handle->db_local,
|
char *scriptlet = _alpm_local_db_pkgpath(handle->db_local,
|
||||||
oldpkg, "install");
|
oldpkg, "install");
|
||||||
_alpm_runscriptlet(handle, scriptlet, "pre_remove", pkgver, NULL, 0);
|
_alpm_runscriptlet(handle, oldpkg->name, scriptlet, "pre_remove", pkgver, NULL, 0);
|
||||||
free(scriptlet);
|
free(scriptlet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -712,7 +712,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
|
|||||||
!(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
!(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
|
||||||
char *scriptlet = _alpm_local_db_pkgpath(handle->db_local,
|
char *scriptlet = _alpm_local_db_pkgpath(handle->db_local,
|
||||||
oldpkg, "install");
|
oldpkg, "install");
|
||||||
_alpm_runscriptlet(handle, scriptlet, "post_remove", pkgver, NULL, 0);
|
_alpm_runscriptlet(handle, oldpkg->name, scriptlet, "post_remove", pkgver, NULL, 0);
|
||||||
free(scriptlet);
|
free(scriptlet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* remove.h
|
* remove.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* signing.c
|
* signing.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2008-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -253,9 +253,10 @@ error:
|
|||||||
* This requires GPGME to call the gpg binary.
|
* This requires GPGME to call the gpg binary.
|
||||||
* @param handle the context handle
|
* @param handle the context handle
|
||||||
* @param email the email address of the key to import
|
* @param email the email address of the key to import
|
||||||
|
* @param fpr the fingerprint key ID to look up (or NULL)
|
||||||
* @return 0 on success, -1 on error
|
* @return 0 on success, -1 on error
|
||||||
*/
|
*/
|
||||||
static int key_import_wkd(alpm_handle_t *handle, const char *email)
|
static int key_import_wkd(alpm_handle_t *handle, const char *email, const char *fpr)
|
||||||
{
|
{
|
||||||
gpgme_error_t gpg_err;
|
gpgme_error_t gpg_err;
|
||||||
gpgme_ctx_t ctx = {0};
|
gpgme_ctx_t ctx = {0};
|
||||||
@@ -274,7 +275,12 @@ static int key_import_wkd(alpm_handle_t *handle, const char *email)
|
|||||||
_alpm_log(handle, ALPM_LOG_DEBUG, _("looking up key %s using WKD\n"), email);
|
_alpm_log(handle, ALPM_LOG_DEBUG, _("looking up key %s using WKD\n"), email);
|
||||||
gpg_err = gpgme_get_key(ctx, email, &key, 0);
|
gpg_err = gpgme_get_key(ctx, email, &key, 0);
|
||||||
if(gpg_err_code(gpg_err) == GPG_ERR_NO_ERROR) {
|
if(gpg_err_code(gpg_err) == GPG_ERR_NO_ERROR) {
|
||||||
ret = 0;
|
/* check if correct key was imported via WKD */
|
||||||
|
if(fpr && _alpm_key_in_keychain(handle, fpr)) {
|
||||||
|
ret = 0;
|
||||||
|
} else {
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup failed: WKD imported wrong fingerprint\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gpgme_key_unref(key);
|
gpgme_key_unref(key);
|
||||||
|
|
||||||
@@ -353,14 +359,18 @@ static int key_search_keyserver(alpm_handle_t *handle, const char *fpr,
|
|||||||
} else {
|
} else {
|
||||||
pgpkey->fingerprint = key->subkeys->keyid;
|
pgpkey->fingerprint = key->subkeys->keyid;
|
||||||
}
|
}
|
||||||
pgpkey->uid = key->uids->uid;
|
|
||||||
pgpkey->name = key->uids->name;
|
/* we are probably going to fail importing, but continue anyway... */
|
||||||
pgpkey->email = key->uids->email;
|
if(key->uids != NULL) {
|
||||||
|
pgpkey->uid = key->uids->uid;
|
||||||
|
pgpkey->name = key->uids->name;
|
||||||
|
pgpkey->email = key->uids->email;
|
||||||
|
}
|
||||||
|
|
||||||
pgpkey->created = key->subkeys->timestamp;
|
pgpkey->created = key->subkeys->timestamp;
|
||||||
pgpkey->expires = key->subkeys->expires;
|
pgpkey->expires = key->subkeys->expires;
|
||||||
pgpkey->length = key->subkeys->length;
|
pgpkey->length = key->subkeys->length;
|
||||||
pgpkey->revoked = key->subkeys->revoked;
|
pgpkey->revoked = key->subkeys->revoked;
|
||||||
|
|
||||||
/* Initialize with '?', this is overwritten unless public key
|
/* Initialize with '?', this is overwritten unless public key
|
||||||
* algorithm is unknown. */
|
* algorithm is unknown. */
|
||||||
pgpkey->pubkey_algo = '?';
|
pgpkey->pubkey_algo = '?';
|
||||||
@@ -516,7 +526,7 @@ int _alpm_key_import(alpm_handle_t *handle, const char *uid, const char *fpr)
|
|||||||
if(question.import) {
|
if(question.import) {
|
||||||
/* Try to import the key from a WKD first */
|
/* Try to import the key from a WKD first */
|
||||||
if(email_from_uid(uid, &email) == 0) {
|
if(email_from_uid(uid, &email) == 0) {
|
||||||
ret = key_import_wkd(handle, email);
|
ret = key_import_wkd(handle, email, fpr);
|
||||||
free(email);
|
free(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,7 +539,7 @@ int _alpm_key_import(alpm_handle_t *handle, const char *uid, const char *fpr)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
_("key \"%s\" could not be imported\n"), fetch_key.uid);
|
_("key \"%s\" could not be imported\n"), fpr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* signing.h
|
* signing.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2008-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* sync.c
|
* sync.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -470,7 +470,6 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
for(j = i->next; j; j = j->next) {
|
for(j = i->next; j; j = j->next) {
|
||||||
alpm_pkg_t *pkg2 = j->data;
|
alpm_pkg_t *pkg2 = j->data;
|
||||||
if(strcmp(pkg1->filename, pkg2->filename) == 0) {
|
if(strcmp(pkg1->filename, pkg2->filename) == 0) {
|
||||||
alpm_list_free(resolved);
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
handle->pm_errno = ALPM_ERR_TRANS_DUP_FILENAME;
|
handle->pm_errno = ALPM_ERR_TRANS_DUP_FILENAME;
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("packages %s and %s have the same filename: %s\n"),
|
_alpm_log(handle, ALPM_LOG_ERROR, _("packages %s and %s have the same filename: %s\n"),
|
||||||
@@ -480,6 +479,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ret != 0) {
|
if(ret != 0) {
|
||||||
|
alpm_list_free(resolved);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,21 +517,23 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
|
|
||||||
for(i = deps; i; i = i->next) {
|
for(i = deps; i; i = i->next) {
|
||||||
alpm_conflict_t *conflict = i->data;
|
alpm_conflict_t *conflict = i->data;
|
||||||
|
const char *name1 = conflict->package1->name;
|
||||||
|
const char *name2 = conflict->package2->name;
|
||||||
alpm_pkg_t *rsync, *sync, *sync1, *sync2;
|
alpm_pkg_t *rsync, *sync, *sync1, *sync2;
|
||||||
|
|
||||||
/* have we already removed one of the conflicting targets? */
|
/* have we already removed one of the conflicting targets? */
|
||||||
sync1 = alpm_pkg_find(trans->add, conflict->package1);
|
sync1 = alpm_pkg_find(trans->add, name1);
|
||||||
sync2 = alpm_pkg_find(trans->add, conflict->package2);
|
sync2 = alpm_pkg_find(trans->add, name2);
|
||||||
if(!sync1 || !sync2) {
|
if(!sync1 || !sync2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "conflicting packages in the sync list: '%s' <-> '%s'\n",
|
_alpm_log(handle, ALPM_LOG_DEBUG, "conflicting packages in the sync list: '%s' <-> '%s'\n",
|
||||||
conflict->package1, conflict->package2);
|
name1, name2);
|
||||||
|
|
||||||
/* if sync1 provides sync2, we remove sync2 from the targets, and vice versa */
|
/* if sync1 provides sync2, we remove sync2 from the targets, and vice versa */
|
||||||
alpm_depend_t *dep1 = alpm_dep_from_string(conflict->package1);
|
alpm_depend_t *dep1 = alpm_dep_from_string(name1);
|
||||||
alpm_depend_t *dep2 = alpm_dep_from_string(conflict->package2);
|
alpm_depend_t *dep2 = alpm_dep_from_string(name2);
|
||||||
if(_alpm_depcmp(sync1, dep2)) {
|
if(_alpm_depcmp(sync1, dep2)) {
|
||||||
rsync = sync2;
|
rsync = sync2;
|
||||||
sync = sync1;
|
sync = sync1;
|
||||||
@@ -559,8 +561,8 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
|
|
||||||
/* Prints warning */
|
/* Prints warning */
|
||||||
_alpm_log(handle, ALPM_LOG_WARNING,
|
_alpm_log(handle, ALPM_LOG_WARNING,
|
||||||
_("removing '%s' from target list because it conflicts with '%s'\n"),
|
_("removing '%s-%s' from target list because it conflicts with '%s-%s'\n"),
|
||||||
rsync->name, sync->name);
|
rsync->name, rsync->version, sync->name, sync->version);
|
||||||
trans->add = alpm_list_remove(trans->add, rsync, _alpm_pkg_cmp, NULL);
|
trans->add = alpm_list_remove(trans->add, rsync, _alpm_pkg_cmp, NULL);
|
||||||
/* rsync is not a transaction target anymore */
|
/* rsync is not a transaction target anymore */
|
||||||
trans->unresolvable = alpm_list_add(trans->unresolvable, rsync);
|
trans->unresolvable = alpm_list_add(trans->unresolvable, rsync);
|
||||||
@@ -581,16 +583,18 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
.conflict = i->data
|
.conflict = i->data
|
||||||
};
|
};
|
||||||
alpm_conflict_t *conflict = i->data;
|
alpm_conflict_t *conflict = i->data;
|
||||||
|
const char *name1 = conflict->package1->name;
|
||||||
|
const char *name2 = conflict->package2->name;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
/* if conflict->package2 (the local package) is not elected for removal,
|
/* if name2 (the local package) is not elected for removal,
|
||||||
we ask the user */
|
we ask the user */
|
||||||
if(alpm_pkg_find(trans->remove, conflict->package2)) {
|
if(alpm_pkg_find(trans->remove, name2)) {
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
for(j = trans->add; j && !found; j = j->next) {
|
for(j = trans->add; j && !found; j = j->next) {
|
||||||
alpm_pkg_t *spkg = j->data;
|
alpm_pkg_t *spkg = j->data;
|
||||||
if(alpm_pkg_find(spkg->removes, conflict->package2)) {
|
if(alpm_pkg_find(spkg->removes, name2)) {
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -598,15 +602,15 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "package '%s' conflicts with '%s'\n",
|
_alpm_log(handle, ALPM_LOG_DEBUG, "package '%s-%s' conflicts with '%s-%s'\n",
|
||||||
conflict->package1, conflict->package2);
|
name1, conflict->package1->version, name2,conflict->package2->version);
|
||||||
|
|
||||||
QUESTION(handle, &question);
|
QUESTION(handle, &question);
|
||||||
if(question.remove) {
|
if(question.remove) {
|
||||||
/* append to the removes list */
|
/* append to the removes list */
|
||||||
alpm_pkg_t *sync = alpm_pkg_find(trans->add, conflict->package1);
|
alpm_pkg_t *sync = alpm_pkg_find(trans->add, name1);
|
||||||
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
|
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, name2);
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "electing '%s' for removal\n", conflict->package2);
|
_alpm_log(handle, ALPM_LOG_DEBUG, "electing '%s' for removal\n", name2);
|
||||||
sync->removes = alpm_list_add(sync->removes, local);
|
sync->removes = alpm_list_add(sync->removes, local);
|
||||||
} else { /* abort */
|
} else { /* abort */
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("unresolvable package conflicts detected\n"));
|
_alpm_log(handle, ALPM_LOG_ERROR, _("unresolvable package conflicts detected\n"));
|
||||||
@@ -732,7 +736,7 @@ static int find_dl_candidates(alpm_handle_t *handle, alpm_list_t **files)
|
|||||||
handle->pm_errno = ALPM_ERR_SERVER_NONE;
|
handle->pm_errno = ALPM_ERR_SERVER_NONE;
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n",
|
_alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n",
|
||||||
alpm_strerror(handle->pm_errno), repo->treename);
|
alpm_strerror(handle->pm_errno), repo->treename);
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
||||||
@@ -991,6 +995,13 @@ static int check_validity(alpm_handle_t *handle,
|
|||||||
|
|
||||||
current_bytes += v.pkg->size;
|
current_bytes += v.pkg->size;
|
||||||
v.path = _alpm_filecache_find(handle, v.pkg->filename);
|
v.path = _alpm_filecache_find(handle, v.pkg->filename);
|
||||||
|
|
||||||
|
if(!v.path) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
_("%s: could not find package in cache\n"), v.pkg->name);
|
||||||
|
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
|
||||||
|
}
|
||||||
|
|
||||||
v.siglevel = alpm_db_get_siglevel(alpm_pkg_get_db(v.pkg));
|
v.siglevel = alpm_db_get_siglevel(alpm_pkg_get_db(v.pkg));
|
||||||
|
|
||||||
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
|
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
|
||||||
@@ -1082,6 +1093,12 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
|
|||||||
current_bytes += spkg->size;
|
current_bytes += spkg->size;
|
||||||
filepath = _alpm_filecache_find(handle, spkg->filename);
|
filepath = _alpm_filecache_find(handle, spkg->filename);
|
||||||
|
|
||||||
|
if(!filepath) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
_("%s: could not find package in cache\n"), spkg->name);
|
||||||
|
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
|
||||||
|
}
|
||||||
|
|
||||||
/* load the package file and replace pkgcache entry with it in the target list */
|
/* load the package file and replace pkgcache entry with it in the target list */
|
||||||
/* TODO: alpm_pkg_get_db() will not work on this target anymore */
|
/* TODO: alpm_pkg_get_db() will not work on this target anymore */
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG,
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
@@ -1109,6 +1126,7 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
|
|||||||
errors++;
|
errors++;
|
||||||
*data = alpm_list_add(*data, strdup(spkg->filename));
|
*data = alpm_list_add(*data, strdup(spkg->filename));
|
||||||
free(filepath);
|
free(filepath);
|
||||||
|
_alpm_pkg_free(pkgfile);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
free(filepath);
|
free(filepath);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* sync.h
|
* sync.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* trans.c
|
* trans.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -334,7 +334,7 @@ static int grep(const char *fn, const char *needle)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
|
int _alpm_runscriptlet(alpm_handle_t *handle, const char *pkgname, const char *filepath,
|
||||||
const char *script, const char *ver, const char *oldver, int is_archive)
|
const char *script, const char *ver, const char *oldver, int is_archive)
|
||||||
{
|
{
|
||||||
char arg0[64], arg1[3], cmdline[PATH_MAX];
|
char arg0[64], arg1[3], cmdline[PATH_MAX];
|
||||||
@@ -407,7 +407,16 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
|
|||||||
|
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "executing \"%s\"\n", cmdline);
|
_alpm_log(handle, ALPM_LOG_DEBUG, "executing \"%s\"\n", cmdline);
|
||||||
|
|
||||||
retval = _alpm_run_chroot(handle, SCRIPTLET_SHELL, argv, NULL, NULL);
|
alpm_event_install_run_t event = {
|
||||||
|
.type = ALPM_EVENT_INSTALL_RUN_START,
|
||||||
|
.pkgname = pkgname,
|
||||||
|
};
|
||||||
|
EVENT(handle, &event);
|
||||||
|
|
||||||
|
retval = _alpm_run_chroot(handle, pkgname, ALPM_SCRIPTLET_KIND_INSTALL_FILE, SCRIPTLET_SHELL, argv, NULL, NULL);
|
||||||
|
|
||||||
|
event.type = ALPM_EVENT_INSTALL_RUN_DONE;
|
||||||
|
EVENT(handle, &event);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if(scriptfn && unlink(scriptfn)) {
|
if(scriptfn && unlink(scriptfn)) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* trans.h
|
* trans.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -49,7 +49,7 @@ typedef struct _alpm_trans_t {
|
|||||||
void _alpm_trans_free(alpm_trans_t *trans);
|
void _alpm_trans_free(alpm_trans_t *trans);
|
||||||
/* flags is a bitfield of alpm_transflag_t flags */
|
/* flags is a bitfield of alpm_transflag_t flags */
|
||||||
int _alpm_trans_init(alpm_trans_t *trans, int flags);
|
int _alpm_trans_init(alpm_trans_t *trans, int flags);
|
||||||
int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
|
int _alpm_runscriptlet(alpm_handle_t *handle, const char *name, const char *filepath,
|
||||||
const char *script, const char *ver, const char *oldver, int is_archive);
|
const char *script, const char *ver, const char *oldver, int is_archive);
|
||||||
|
|
||||||
#endif /* ALPM_TRANS_H */
|
#endif /* ALPM_TRANS_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* util.c
|
* util.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -40,8 +41,7 @@
|
|||||||
#include <archive_entry.h>
|
#include <archive_entry.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
#include <openssl/md5.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/sha.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBNETTLE
|
#ifdef HAVE_LIBNETTLE
|
||||||
@@ -349,6 +349,11 @@ int _alpm_unpack(alpm_handle_t *handle, const char *path, const char *prefix,
|
|||||||
|
|
||||||
entryname = archive_entry_pathname(entry);
|
entryname = archive_entry_pathname(entry);
|
||||||
|
|
||||||
|
if(entryname == NULL) {
|
||||||
|
ret = 1;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* If specific files were requested, skip entries that don't match. */
|
/* If specific files were requested, skip entries that don't match. */
|
||||||
if(list) {
|
if(list) {
|
||||||
char *entry_prefix = NULL;
|
char *entry_prefix = NULL;
|
||||||
@@ -492,18 +497,21 @@ static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _alpm_chroot_process_output(alpm_handle_t *handle, const char *line)
|
static void _alpm_chroot_process_output(alpm_handle_t *handle, const char *name,
|
||||||
|
alpm_scriptlet_kind_t kind, const char *line)
|
||||||
{
|
{
|
||||||
alpm_event_scriptlet_info_t event = {
|
alpm_event_scriptlet_info_t event = {
|
||||||
.type = ALPM_EVENT_SCRIPTLET_INFO,
|
.type = ALPM_EVENT_SCRIPTLET_INFO,
|
||||||
|
.kind = kind,
|
||||||
|
.name = name,
|
||||||
.line = line
|
.line = line
|
||||||
};
|
};
|
||||||
alpm_logaction(handle, "ALPM-SCRIPTLET", "%s", line);
|
alpm_logaction(handle, "ALPM-SCRIPTLET", "%s", line);
|
||||||
EVENT(handle, &event);
|
EVENT(handle, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _alpm_chroot_read_from_child(alpm_handle_t *handle, int fd,
|
static int _alpm_chroot_read_from_child(alpm_handle_t *handle, int fd, const char *name,
|
||||||
char *buf, ssize_t *buf_size, ssize_t buf_limit)
|
alpm_scriptlet_kind_t kind, char *buf, ssize_t *buf_size, ssize_t buf_limit)
|
||||||
{
|
{
|
||||||
ssize_t space = buf_limit - *buf_size - 2; /* reserve 2 for "\n\0" */
|
ssize_t space = buf_limit - *buf_size - 2; /* reserve 2 for "\n\0" */
|
||||||
ssize_t nread = read(fd, buf + *buf_size, space);
|
ssize_t nread = read(fd, buf + *buf_size, space);
|
||||||
@@ -515,7 +523,7 @@ static int _alpm_chroot_read_from_child(alpm_handle_t *handle, int fd,
|
|||||||
size_t linelen = newline - buf + 1;
|
size_t linelen = newline - buf + 1;
|
||||||
char old = buf[linelen];
|
char old = buf[linelen];
|
||||||
buf[linelen] = '\0';
|
buf[linelen] = '\0';
|
||||||
_alpm_chroot_process_output(handle, buf);
|
_alpm_chroot_process_output(handle, name, kind, buf);
|
||||||
buf[linelen] = old;
|
buf[linelen] = old;
|
||||||
|
|
||||||
*buf_size -= linelen;
|
*buf_size -= linelen;
|
||||||
@@ -525,14 +533,14 @@ static int _alpm_chroot_read_from_child(alpm_handle_t *handle, int fd,
|
|||||||
} else if(nread == space) {
|
} else if(nread == space) {
|
||||||
/* we didn't read a full line, but we're out of space */
|
/* we didn't read a full line, but we're out of space */
|
||||||
strcpy(buf + *buf_size, "\n");
|
strcpy(buf + *buf_size, "\n");
|
||||||
_alpm_chroot_process_output(handle, buf);
|
_alpm_chroot_process_output(handle, name, kind, buf);
|
||||||
*buf_size = 0;
|
*buf_size = 0;
|
||||||
}
|
}
|
||||||
} else if(nread == 0) {
|
} else if(nread == 0) {
|
||||||
/* end-of-file */
|
/* end-of-file */
|
||||||
if(*buf_size) {
|
if(*buf_size) {
|
||||||
strcpy(buf + *buf_size, "\n");
|
strcpy(buf + *buf_size, "\n");
|
||||||
_alpm_chroot_process_output(handle, buf);
|
_alpm_chroot_process_output(handle, name, kind, buf);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
} else if(should_retry(errno)) {
|
} else if(should_retry(errno)) {
|
||||||
@@ -541,7 +549,7 @@ static int _alpm_chroot_read_from_child(alpm_handle_t *handle, int fd,
|
|||||||
/* read error */
|
/* read error */
|
||||||
if(*buf_size) {
|
if(*buf_size) {
|
||||||
strcpy(buf + *buf_size, "\n");
|
strcpy(buf + *buf_size, "\n");
|
||||||
_alpm_chroot_process_output(handle, buf);
|
_alpm_chroot_process_output(handle, name, kind, buf);
|
||||||
}
|
}
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
_("unable to read from pipe (%s)\n"), strerror(errno));
|
_("unable to read from pipe (%s)\n"), strerror(errno));
|
||||||
@@ -577,14 +585,16 @@ static void _alpm_reset_signals(void)
|
|||||||
|
|
||||||
/** Execute a command with arguments in a chroot.
|
/** Execute a command with arguments in a chroot.
|
||||||
* @param handle the context handle
|
* @param handle the context handle
|
||||||
|
* @param name a human readable name to describe the command
|
||||||
|
* @param kind what kind of scriptlet is running
|
||||||
* @param cmd command to execute
|
* @param cmd command to execute
|
||||||
* @param argv arguments to pass to cmd
|
* @param argv arguments to pass to cmd
|
||||||
* @param stdin_cb callback to provide input to the chroot on stdin
|
* @param stdin_cb callback to provide input to the chroot on stdin
|
||||||
* @param stdin_ctx context to be passed to @a stdin_cb
|
* @param stdin_ctx context to be passed to @a stdin_cb
|
||||||
* @return 0 on success, 1 on error
|
* @return 0 on success, 1 on error
|
||||||
*/
|
*/
|
||||||
int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
int _alpm_run_chroot(alpm_handle_t *handle, const char *name, alpm_scriptlet_kind_t kind,
|
||||||
_alpm_cb_io stdin_cb, void *stdin_ctx)
|
const char *cmd, char *const argv[], _alpm_cb_io stdin_cb, void *stdin_ctx)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int child2parent_pipefd[2], parent2child_pipefd[2];
|
int child2parent_pipefd[2], parent2child_pipefd[2];
|
||||||
@@ -645,12 +655,15 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
close(parent2child_pipefd[HEAD]);
|
close(parent2child_pipefd[HEAD]);
|
||||||
close(child2parent_pipefd[TAIL]);
|
close(child2parent_pipefd[TAIL]);
|
||||||
close(child2parent_pipefd[HEAD]);
|
close(child2parent_pipefd[HEAD]);
|
||||||
|
|
||||||
if(cwdfd >= 0) {
|
if(cwdfd >= 0) {
|
||||||
close(cwdfd);
|
close(cwdfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use fprintf instead of _alpm_log to send output through the parent */
|
/* use fprintf instead of _alpm_log to send output through the parent */
|
||||||
if(chroot(handle->root) != 0) {
|
/* don't chroot() to "/": this allows running with less caps when the
|
||||||
|
* caller puts us in the right root */
|
||||||
|
if(strcmp(handle->root, "/") != 0 && chroot(handle->root) != 0) {
|
||||||
fprintf(stderr, _("could not change the root directory (%s)\n"), strerror(errno));
|
fprintf(stderr, _("could not change the root directory (%s)\n"), strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -659,28 +672,49 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
"/", strerror(errno));
|
"/", strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
/* bash assumes it's being run under rsh/ssh if stdin is a socket and
|
||||||
|
* sources ~/.bashrc if it thinks it's the top-level shell.
|
||||||
|
* set SHLVL before running to indicate that it's a child shell and
|
||||||
|
* disable this behavior */
|
||||||
|
setenv("SHLVL", "1", 0);
|
||||||
|
/* bash sources $BASH_ENV when run non-interactively */
|
||||||
|
unsetenv("BASH_ENV");
|
||||||
umask(0022);
|
umask(0022);
|
||||||
_alpm_reset_signals();
|
_alpm_reset_signals();
|
||||||
execv(cmd, argv);
|
execv(cmd, argv);
|
||||||
/* execv only returns if there was an error */
|
/* execv only returns if there was an error */
|
||||||
fprintf(stderr, _("call to execv failed (%s)\n"), strerror(errno));
|
fprintf(stderr, _("%s: failed to execv '%s' (%s)\n"), name, cmd, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
/* this code runs for the parent only (wait on the child) */
|
/* this code runs for the parent only (wait on the child) */
|
||||||
int status;
|
int status;
|
||||||
char obuf[PIPE_BUF]; /* writes <= PIPE_BUF are guaranteed atomic */
|
char obuf[PIPE_BUF]; /* writes <= PIPE_BUF are guaranteed atomic */
|
||||||
char ibuf[LINE_MAX];
|
char ibuf[LINE_MAX];
|
||||||
|
char sciptlet_name[32];
|
||||||
ssize_t olen = 0, ilen = 0;
|
ssize_t olen = 0, ilen = 0;
|
||||||
nfds_t nfds = 2;
|
nfds_t nfds = 2;
|
||||||
struct pollfd fds[2], *child2parent = &(fds[0]), *parent2child = &(fds[1]);
|
struct pollfd fds[2], *child2parent = &(fds[0]), *parent2child = &(fds[1]);
|
||||||
int poll_ret;
|
int poll_ret;
|
||||||
|
|
||||||
|
switch(kind) {
|
||||||
|
case ALPM_SCRIPTLET_KIND_HOOK:
|
||||||
|
snprintf(sciptlet_name, 32, "hook '%s'", name);
|
||||||
|
break;
|
||||||
|
case ALPM_SCRIPTLET_KIND_INSTALL_FILE:
|
||||||
|
snprintf(sciptlet_name, 32, "'%s.install'", name);
|
||||||
|
break;
|
||||||
|
case ALPM_SCRIPTLET_KIND_COMMAND:
|
||||||
|
strncpy(sciptlet_name, "ldconfig", 32);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
child2parent->fd = child2parent_pipefd[TAIL];
|
child2parent->fd = child2parent_pipefd[TAIL];
|
||||||
child2parent->events = POLLIN;
|
child2parent->events = POLLIN;
|
||||||
fcntl(child2parent->fd, F_SETFL, O_NONBLOCK);
|
fcntl(child2parent->fd, F_SETFL, O_NONBLOCK);
|
||||||
close(child2parent_pipefd[HEAD]);
|
close(child2parent_pipefd[HEAD]);
|
||||||
close(parent2child_pipefd[TAIL]);
|
close(parent2child_pipefd[TAIL]);
|
||||||
|
|
||||||
|
|
||||||
if(stdin_cb) {
|
if(stdin_cb) {
|
||||||
parent2child->fd = parent2child_pipefd[HEAD];
|
parent2child->fd = parent2child_pipefd[HEAD];
|
||||||
parent2child->events = POLLOUT;
|
parent2child->events = POLLOUT;
|
||||||
@@ -703,7 +737,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(child2parent->revents & POLLIN) {
|
if(child2parent->revents & POLLIN) {
|
||||||
if(_alpm_chroot_read_from_child(handle, child2parent->fd,
|
if(_alpm_chroot_read_from_child(handle, child2parent->fd, name, kind,
|
||||||
ibuf, &ilen, sizeof(ibuf)) != 0) {
|
ibuf, &ilen, sizeof(ibuf)) != 0) {
|
||||||
/* we encountered end-of-file or an error */
|
/* we encountered end-of-file or an error */
|
||||||
STOP_POLLING(child2parent);
|
STOP_POLLING(child2parent);
|
||||||
@@ -726,7 +760,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
if(ilen) {
|
if(ilen) {
|
||||||
/* buffer would have already been flushed if it had a newline */
|
/* buffer would have already been flushed if it had a newline */
|
||||||
strcpy(ibuf + ilen, "\n");
|
strcpy(ibuf + ilen, "\n");
|
||||||
_alpm_chroot_process_output(handle, ibuf);
|
_alpm_chroot_process_output(handle, name, kind, ibuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef STOP_POLLING
|
#undef STOP_POLLING
|
||||||
@@ -742,7 +776,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
|
|
||||||
while(waitpid(pid, &status, 0) == -1) {
|
while(waitpid(pid, &status, 0) == -1) {
|
||||||
if(errno != EINTR) {
|
if(errno != EINTR) {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("call to waitpid failed (%s)\n"), strerror(errno));
|
_alpm_log(handle, ALPM_LOG_ERROR, _("failed to run %s: call to waitpid failed (%s)\n"), sciptlet_name, strerror(errno));
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -752,7 +786,8 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
if(WIFEXITED(status)) {
|
if(WIFEXITED(status)) {
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "call to waitpid succeeded\n");
|
_alpm_log(handle, ALPM_LOG_DEBUG, "call to waitpid succeeded\n");
|
||||||
if(WEXITSTATUS(status) != 0) {
|
if(WEXITSTATUS(status) != 0) {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("command failed to execute correctly\n"));
|
_alpm_log(handle, ALPM_LOG_ERROR, _("%s did not complete sucessfully (%s exited %d)\n"),
|
||||||
|
sciptlet_name, cmd, WEXITSTATUS(status));
|
||||||
retval = 1;
|
retval = 1;
|
||||||
}
|
}
|
||||||
} else if(WIFSIGNALED(status) != 0) {
|
} else if(WIFSIGNALED(status) != 0) {
|
||||||
@@ -761,8 +796,8 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
if(signal_description == NULL) {
|
if(signal_description == NULL) {
|
||||||
signal_description = _("Unknown signal");
|
signal_description = _("Unknown signal");
|
||||||
}
|
}
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("command terminated by signal %d: %s\n"),
|
_alpm_log(handle, ALPM_LOG_ERROR, _("%s terminated by signal %d: %s\n"),
|
||||||
WTERMSIG(status), signal_description);
|
sciptlet_name, WTERMSIG(status), signal_description);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -793,10 +828,9 @@ int _alpm_ldconfig(alpm_handle_t *handle)
|
|||||||
if(access(line, F_OK) == 0) {
|
if(access(line, F_OK) == 0) {
|
||||||
snprintf(line, PATH_MAX, "%s%s", handle->root, LDCONFIG);
|
snprintf(line, PATH_MAX, "%s%s", handle->root, LDCONFIG);
|
||||||
if(access(line, X_OK) == 0) {
|
if(access(line, X_OK) == 0) {
|
||||||
char arg0[32];
|
char *arg0 = strdup(LDCONFIG);
|
||||||
char *argv[] = { arg0, NULL };
|
char *argv[] = { arg0, NULL };
|
||||||
strcpy(arg0, "ldconfig");
|
return _alpm_run_chroot(handle, "ldconfig", ALPM_SCRIPTLET_KIND_COMMAND, LDCONFIG, argv, NULL, NULL);
|
||||||
return _alpm_run_chroot(handle, LDCONFIG, argv, NULL, NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -831,10 +865,17 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
|
|||||||
for(i = handle->cachedirs; i; i = i->next) {
|
for(i = handle->cachedirs; i; i = i->next) {
|
||||||
snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
|
snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
|
||||||
filename);
|
filename);
|
||||||
if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) {
|
if(stat(path, &buf) == 0) {
|
||||||
retpath = strdup(path);
|
if(S_ISREG(buf.st_mode)) {
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "found cached pkg: %s\n", retpath);
|
retpath = strdup(path);
|
||||||
return retpath;
|
_alpm_log(handle, ALPM_LOG_DEBUG, "found cached pkg: %s\n", retpath);
|
||||||
|
return retpath;
|
||||||
|
} else {
|
||||||
|
_alpm_log(handle, ALPM_LOG_WARNING,
|
||||||
|
"cached pkg '%s' is not a regular file: mode=%i\n", path, buf.st_mode);
|
||||||
|
}
|
||||||
|
} else if(errno != ENOENT) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_WARNING, "could not open '%s'\n: %s", path, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* package wasn't found in any cachedir */
|
/* package wasn't found in any cachedir */
|
||||||
@@ -916,7 +957,8 @@ const char *_alpm_filecache_setup(alpm_handle_t *handle)
|
|||||||
static int md5_file(const char *path, unsigned char output[16])
|
static int md5_file(const char *path, unsigned char output[16])
|
||||||
{
|
{
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
MD5_CTX ctx;
|
EVP_MD_CTX *ctx;
|
||||||
|
const EVP_MD *md = EVP_get_digestbyname("MD5");
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
struct md5_ctx ctx;
|
struct md5_ctx ctx;
|
||||||
#endif
|
#endif
|
||||||
@@ -933,7 +975,8 @@ static int md5_file(const char *path, unsigned char output[16])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
MD5_Init(&ctx);
|
ctx = EVP_MD_CTX_create();
|
||||||
|
EVP_DigestInit_ex(ctx, md, NULL);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
md5_init(&ctx);
|
md5_init(&ctx);
|
||||||
#endif
|
#endif
|
||||||
@@ -943,7 +986,7 @@ static int md5_file(const char *path, unsigned char output[16])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
MD5_Update(&ctx, buf, n);
|
EVP_DigestUpdate(ctx, buf, n);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
md5_update(&ctx, n, buf);
|
md5_update(&ctx, n, buf);
|
||||||
#endif
|
#endif
|
||||||
@@ -957,7 +1000,8 @@ static int md5_file(const char *path, unsigned char output[16])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
MD5_Final(output, &ctx);
|
EVP_DigestFinal_ex(ctx, output, NULL);
|
||||||
|
EVP_MD_CTX_destroy(ctx);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
md5_digest(&ctx, MD5_DIGEST_SIZE, output);
|
md5_digest(&ctx, MD5_DIGEST_SIZE, output);
|
||||||
#endif
|
#endif
|
||||||
@@ -972,7 +1016,8 @@ static int md5_file(const char *path, unsigned char output[16])
|
|||||||
static int sha256_file(const char *path, unsigned char output[32])
|
static int sha256_file(const char *path, unsigned char output[32])
|
||||||
{
|
{
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
SHA256_CTX ctx;
|
EVP_MD_CTX *ctx;
|
||||||
|
const EVP_MD *md = EVP_get_digestbyname("SHA256");
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
struct sha256_ctx ctx;
|
struct sha256_ctx ctx;
|
||||||
#endif
|
#endif
|
||||||
@@ -989,7 +1034,8 @@ static int sha256_file(const char *path, unsigned char output[32])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
SHA256_Init(&ctx);
|
ctx = EVP_MD_CTX_create();
|
||||||
|
EVP_DigestInit_ex(ctx, md, NULL);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
sha256_init(&ctx);
|
sha256_init(&ctx);
|
||||||
#endif
|
#endif
|
||||||
@@ -999,7 +1045,7 @@ static int sha256_file(const char *path, unsigned char output[32])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
SHA256_Update(&ctx, buf, n);
|
EVP_DigestUpdate(ctx, buf, n);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
sha256_update(&ctx, n, buf);
|
sha256_update(&ctx, n, buf);
|
||||||
#endif
|
#endif
|
||||||
@@ -1013,7 +1059,8 @@ static int sha256_file(const char *path, unsigned char output[32])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LIBSSL
|
#if HAVE_LIBSSL
|
||||||
SHA256_Final(output, &ctx);
|
EVP_DigestFinal_ex(ctx, output, NULL);
|
||||||
|
EVP_MD_CTX_destroy(ctx);
|
||||||
#else /* HAVE_LIBNETTLE */
|
#else /* HAVE_LIBNETTLE */
|
||||||
sha256_digest(&ctx, SHA256_DIGEST_SIZE, output);
|
sha256_digest(&ctx, SHA256_DIGEST_SIZE, output);
|
||||||
#endif
|
#endif
|
||||||
@@ -1335,6 +1382,11 @@ int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int a
|
|||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
int flag = 0;
|
||||||
|
#ifdef AT_SYMLINK_NOFOLLOW
|
||||||
|
flag |= AT_SYMLINK_NOFOLLOW;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(dir) {
|
if(dir) {
|
||||||
char *check_path;
|
char *check_path;
|
||||||
|
|
||||||
@@ -1342,11 +1394,11 @@ int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int a
|
|||||||
CALLOC(check_path, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
CALLOC(check_path, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
||||||
snprintf(check_path, len, "%s%s", dir, file);
|
snprintf(check_path, len, "%s%s", dir, file);
|
||||||
|
|
||||||
ret = access(check_path, amode);
|
ret = faccessat(AT_FDCWD, check_path, amode, flag);
|
||||||
free(check_path);
|
free(check_path);
|
||||||
} else {
|
} else {
|
||||||
dir = "";
|
dir = "";
|
||||||
ret = access(file, amode);
|
ret = faccessat(AT_FDCWD, file, amode, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret != 0) {
|
if(ret != 0) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* util.h
|
* util.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -129,8 +129,8 @@ ssize_t _alpm_files_in_directory(alpm_handle_t *handle, const char *path, int fu
|
|||||||
|
|
||||||
typedef ssize_t (*_alpm_cb_io)(void *buf, ssize_t len, void *ctx);
|
typedef ssize_t (*_alpm_cb_io)(void *buf, ssize_t len, void *ctx);
|
||||||
|
|
||||||
int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
int _alpm_run_chroot(alpm_handle_t *handle, const char *name, alpm_scriptlet_kind_t kind,
|
||||||
_alpm_cb_io in_cb, void *in_ctx);
|
const char *cmd, char *const argv[], _alpm_cb_io in_cb, void *in_ctx);
|
||||||
int _alpm_ldconfig(alpm_handle_t *handle);
|
int _alpm_ldconfig(alpm_handle_t *handle);
|
||||||
int _alpm_str_cmp(const void *s1, const void *s2);
|
int _alpm_str_cmp(const void *s1, const void *s2);
|
||||||
char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
|
char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
* Copyright (c) 2006-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
66
meson.build
66
meson.build
@@ -8,7 +8,7 @@ project('pacman',
|
|||||||
'sysconfdir=/etc',
|
'sysconfdir=/etc',
|
||||||
'localstatedir=/var',
|
'localstatedir=/var',
|
||||||
],
|
],
|
||||||
meson_version : '>= 0.51')
|
meson_version : '>= 0.56')
|
||||||
|
|
||||||
libalpm_version = '13.0.1'
|
libalpm_version = '13.0.1'
|
||||||
|
|
||||||
@@ -26,14 +26,15 @@ MANDIR = join_paths(PREFIX, get_option('mandir'))
|
|||||||
BUILDSCRIPT = get_option('buildscript')
|
BUILDSCRIPT = get_option('buildscript')
|
||||||
LIBMAKEPKGDIR = join_paths(PREFIX, DATAROOTDIR, 'makepkg')
|
LIBMAKEPKGDIR = join_paths(PREFIX, DATAROOTDIR, 'makepkg')
|
||||||
PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name())
|
PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name())
|
||||||
|
KEYRINGDIR = join_paths(PREFIX, DATAROOTDIR, get_option('keyringdir'))
|
||||||
|
|
||||||
PYTHON = import('python').find_installation('python3')
|
PYTHON = import('python').find_installation('python3')
|
||||||
LDCONFIG = get_option('ldconfig')
|
LDCONFIG = get_option('ldconfig')
|
||||||
MESON_MAKE_SYMLINK = join_paths(meson.source_root(), 'build-aux/meson-make-symlink.sh')
|
MESON_MAKE_SYMLINK = join_paths(meson.project_source_root(), 'build-aux/meson-make-symlink.sh')
|
||||||
|
|
||||||
BASH = find_program('bash4', 'bash')
|
BASH = find_program('bash4', 'bash')
|
||||||
if BASH.found()
|
if BASH.found()
|
||||||
bash_version = run_command(BASH, '-c', 'IFS=.; echo "${BASH_VERSINFO[*]:0:3}"').stdout()
|
bash_version = run_command(BASH, '-c', 'IFS=.; echo "${BASH_VERSINFO[*]:0:3}"', check: true).stdout()
|
||||||
|
|
||||||
have_bash = bash_version.version_compare('>= 4.4.0')
|
have_bash = bash_version.version_compare('>= 4.4.0')
|
||||||
endif
|
endif
|
||||||
@@ -43,7 +44,7 @@ endif
|
|||||||
|
|
||||||
bashcompletion = dependency('bash-completion', required : false)
|
bashcompletion = dependency('bash-completion', required : false)
|
||||||
if bashcompletion.found()
|
if bashcompletion.found()
|
||||||
BASHCOMPDIR = bashcompletion.get_pkgconfig_variable('completionsdir')
|
BASHCOMPDIR = bashcompletion.get_variable(pkgconfig: 'completionsdir')
|
||||||
else
|
else
|
||||||
BASHCOMPDIR = join_paths(DATAROOTDIR, 'bash-completion/completions')
|
BASHCOMPDIR = join_paths(DATAROOTDIR, 'bash-completion/completions')
|
||||||
endif
|
endif
|
||||||
@@ -53,7 +54,8 @@ if get_option('use-git-version')
|
|||||||
find_program('git'),
|
find_program('git'),
|
||||||
'describe',
|
'describe',
|
||||||
'--abbrev=4',
|
'--abbrev=4',
|
||||||
'--dirty').stdout().strip().strip('v')
|
'--dirty',
|
||||||
|
check: true).stdout().strip().strip('v')
|
||||||
else
|
else
|
||||||
PACKAGE_VERSION = meson.project_version()
|
PACKAGE_VERSION = meson.project_version()
|
||||||
endif
|
endif
|
||||||
@@ -90,6 +92,11 @@ endif
|
|||||||
libarchive = dependency('libarchive',
|
libarchive = dependency('libarchive',
|
||||||
version : '>=3.0.0',
|
version : '>=3.0.0',
|
||||||
static : get_option('buildstatic'))
|
static : get_option('buildstatic'))
|
||||||
|
if libarchive.version().version_compare('>=3.6.0')
|
||||||
|
bsdtar_no_read_sparse = '--no-read-sparse'
|
||||||
|
else
|
||||||
|
bsdtar_no_read_sparse = ''
|
||||||
|
endif
|
||||||
|
|
||||||
libcurl = dependency('libcurl',
|
libcurl = dependency('libcurl',
|
||||||
version : '>=7.55.0',
|
version : '>=7.55.0',
|
||||||
@@ -97,7 +104,7 @@ libcurl = dependency('libcurl',
|
|||||||
static : get_option('buildstatic'))
|
static : get_option('buildstatic'))
|
||||||
conf.set('HAVE_LIBCURL', libcurl.found())
|
conf.set('HAVE_LIBCURL', libcurl.found())
|
||||||
|
|
||||||
needed_gpgme_version = '>=1.3.0'
|
needed_gpgme_version = '>=1.12.0'
|
||||||
gpgme = dependency('gpgme',
|
gpgme = dependency('gpgme',
|
||||||
version : needed_gpgme_version,
|
version : needed_gpgme_version,
|
||||||
required : get_option('gpgme'),
|
required : get_option('gpgme'),
|
||||||
@@ -175,7 +182,22 @@ foreach type : [
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if conf.has('HAVE_STRUCT_STATVFS_F_FLAG')
|
|
||||||
|
if conf.has('HAVE_GETMNTINFO')
|
||||||
|
if cc.compiles('''
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
|
void func() {
|
||||||
|
struct statvfs *buf;
|
||||||
|
getmntinfo(&buf, 0);
|
||||||
|
}
|
||||||
|
''')
|
||||||
|
conf.set('FSSTATSTYPE', 'struct statvfs')
|
||||||
|
else
|
||||||
|
conf.set('FSSTATSTYPE', 'struct statfs')
|
||||||
|
endif
|
||||||
|
elif conf.has('HAVE_STRUCT_STATVFS_F_FLAG')
|
||||||
conf.set('FSSTATSTYPE', 'struct statvfs')
|
conf.set('FSSTATSTYPE', 'struct statvfs')
|
||||||
elif conf.has('HAVE_STRUCT_STATFS_F_FLAGS')
|
elif conf.has('HAVE_STRUCT_STATFS_F_FLAGS')
|
||||||
conf.set('FSSTATSTYPE', 'struct statfs')
|
conf.set('FSSTATSTYPE', 'struct statfs')
|
||||||
@@ -183,6 +205,7 @@ endif
|
|||||||
|
|
||||||
if get_option('debug')
|
if get_option('debug')
|
||||||
extra_cflags = [
|
extra_cflags = [
|
||||||
|
'-pedantic',
|
||||||
'-Wcast-align',
|
'-Wcast-align',
|
||||||
'-Wclobbered',
|
'-Wclobbered',
|
||||||
'-Wempty-body',
|
'-Wempty-body',
|
||||||
@@ -230,7 +253,7 @@ strip_static = '--strip-debug'
|
|||||||
|
|
||||||
file_seccomp = get_option('file-seccomp')
|
file_seccomp = get_option('file-seccomp')
|
||||||
# meson-git has find_program('file', required: false, version: '>=5.38')
|
# meson-git has find_program('file', required: false, version: '>=5.38')
|
||||||
filever = run_command('sh', '-c', 'file --version | sed -n "s/^file-\(.*\)/\\1/p"').stdout()
|
filever = run_command('sh', '-c', 'file --version | sed -n "s/^file-\(.*\)/\\1/p"', check: true).stdout()
|
||||||
if file_seccomp.enabled() or ( file_seccomp.auto() and filever.version_compare('>= 5.38') )
|
if file_seccomp.enabled() or ( file_seccomp.auto() and filever.version_compare('>= 5.38') )
|
||||||
filecmd = 'file -S'
|
filecmd = 'file -S'
|
||||||
endif
|
endif
|
||||||
@@ -245,7 +268,7 @@ elif os.contains('bsd') or os == 'dragonfly'
|
|||||||
inodecmd = 'stat -f \'%i %N\''
|
inodecmd = 'stat -f \'%i %N\''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
chost = run_command(cc, '-dumpmachine').stdout().strip()
|
chost = run_command(cc, '-dumpmachine', check: true).stdout().strip()
|
||||||
carch = chost.split('-')[0]
|
carch = chost.split('-')[0]
|
||||||
|
|
||||||
# annoyingly, we have to maintain two sets of configuration_data which is
|
# annoyingly, we have to maintain two sets of configuration_data which is
|
||||||
@@ -260,8 +283,9 @@ substs.set('LOCALEDIR', LOCALEDIR)
|
|||||||
substs.set('sysconfdir', SYSCONFDIR)
|
substs.set('sysconfdir', SYSCONFDIR)
|
||||||
substs.set('localstatedir', LOCALSTATEDIR)
|
substs.set('localstatedir', LOCALSTATEDIR)
|
||||||
substs.set('PKGDATADIR', PKGDATADIR)
|
substs.set('PKGDATADIR', PKGDATADIR)
|
||||||
|
substs.set('KEYRINGDIR', KEYRINGDIR)
|
||||||
substs.set('PREFIX', PREFIX)
|
substs.set('PREFIX', PREFIX)
|
||||||
substs.set('BASH', BASH.path())
|
substs.set('BASH', BASH.full_path())
|
||||||
substs.set('PACKAGE_VERSION', PACKAGE_VERSION)
|
substs.set('PACKAGE_VERSION', PACKAGE_VERSION)
|
||||||
substs.set('PACKAGE_NAME', meson.project_name())
|
substs.set('PACKAGE_NAME', meson.project_name())
|
||||||
substs.set('BUILDSCRIPT', BUILDSCRIPT)
|
substs.set('BUILDSCRIPT', BUILDSCRIPT)
|
||||||
@@ -273,6 +297,7 @@ substs.set('LIBMAKEPKGDIR', LIBMAKEPKGDIR)
|
|||||||
substs.set('STRIP_BINARIES', strip_binaries)
|
substs.set('STRIP_BINARIES', strip_binaries)
|
||||||
substs.set('STRIP_SHARED', strip_shared)
|
substs.set('STRIP_SHARED', strip_shared)
|
||||||
substs.set('STRIP_STATIC', strip_static)
|
substs.set('STRIP_STATIC', strip_static)
|
||||||
|
substs.set('BSDTAR_NO_READ_SPARSE', bsdtar_no_read_sparse)
|
||||||
|
|
||||||
subdir('lib/libalpm')
|
subdir('lib/libalpm')
|
||||||
subdir('src/common')
|
subdir('src/common')
|
||||||
@@ -311,7 +336,7 @@ libalpm_a = static_library(
|
|||||||
'alpm_objlib',
|
'alpm_objlib',
|
||||||
libalpm_sources,
|
libalpm_sources,
|
||||||
# https://github.com/mesonbuild/meson/issues/3937
|
# https://github.com/mesonbuild/meson/issues/3937
|
||||||
objects : libcommon.extract_all_objects(),
|
objects : libcommon.extract_all_objects(recursive: true),
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
dependencies : alpm_deps)
|
dependencies : alpm_deps)
|
||||||
@@ -373,7 +398,7 @@ executable(
|
|||||||
|
|
||||||
foreach wrapper : script_wrappers
|
foreach wrapper : script_wrappers
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
cdata.set_quoted('BASH', BASH.path())
|
cdata.set_quoted('BASH', BASH.full_path())
|
||||||
cdata.set_quoted('BUILDDIR', wrapper[2])
|
cdata.set_quoted('BUILDDIR', wrapper[2])
|
||||||
cdata.set_quoted('REAL_PROGPATH', wrapper[1].full_path())
|
cdata.set_quoted('REAL_PROGPATH', wrapper[1].full_path())
|
||||||
|
|
||||||
@@ -381,7 +406,7 @@ foreach wrapper : script_wrappers
|
|||||||
# directory. Use configure_file instead of a custom_target to ensure that
|
# directory. Use configure_file instead of a custom_target to ensure that
|
||||||
# permissions on the input script wrapper are preserved.
|
# permissions on the input script wrapper are preserved.
|
||||||
configure_file(
|
configure_file(
|
||||||
input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'),
|
input : join_paths(meson.project_source_root(), 'build-aux', 'script-wrapper.sh.in'),
|
||||||
output : wrapper[0],
|
output : wrapper[0],
|
||||||
configuration : cdata)
|
configuration : cdata)
|
||||||
endforeach
|
endforeach
|
||||||
@@ -392,6 +417,12 @@ configure_file(
|
|||||||
configuration : substs,
|
configuration : substs,
|
||||||
install_dir : SYSCONFDIR)
|
install_dir : SYSCONFDIR)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input : 'etc/makepkg.conf.d/rust.conf.in',
|
||||||
|
output : 'rust.conf',
|
||||||
|
configuration : substs,
|
||||||
|
install_dir : join_paths(SYSCONFDIR, 'makepkg.conf.d/'))
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'etc/pacman.conf.in',
|
input : 'etc/pacman.conf.in',
|
||||||
output : 'pacman.conf',
|
output : 'pacman.conf',
|
||||||
@@ -415,10 +446,10 @@ foreach path : [
|
|||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
TEST_ENV = environment()
|
TEST_ENV = environment()
|
||||||
TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.source_root(), 'scripts/library/'))
|
TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.project_source_root(), 'scripts/library/'))
|
||||||
TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.build_root(), 'scripts/libmakepkg/'))
|
TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.project_build_root(), 'scripts/libmakepkg/'))
|
||||||
TEST_ENV.set('PMTEST_UTIL_DIR', meson.build_root() + '/')
|
TEST_ENV.set('PMTEST_UTIL_DIR', meson.project_build_root() + '/')
|
||||||
TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.build_root(), 'scripts/'))
|
TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.project_build_root(), 'scripts/'))
|
||||||
|
|
||||||
subdir('test/pacman')
|
subdir('test/pacman')
|
||||||
subdir('test/scripts')
|
subdir('test/scripts')
|
||||||
@@ -433,6 +464,7 @@ message('\n '.join([
|
|||||||
' localstatedir : @0@'.format(LOCALSTATEDIR),
|
' localstatedir : @0@'.format(LOCALSTATEDIR),
|
||||||
' database dir : @0@'.format(join_paths(LOCALSTATEDIR, 'lib/pacman/')),
|
' database dir : @0@'.format(join_paths(LOCALSTATEDIR, 'lib/pacman/')),
|
||||||
' cache dir : @0@'.format(join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/')),
|
' cache dir : @0@'.format(join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/')),
|
||||||
|
' keyringdir : @0@'.format(KEYRINGDIR),
|
||||||
' compiler : @0@ @1@'.format(cc.get_id(), cc.version()),
|
' compiler : @0@ @1@'.format(cc.get_id(), cc.version()),
|
||||||
'',
|
'',
|
||||||
' Architecture : @0@'.format(carch),
|
' Architecture : @0@'.format(carch),
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ option('buildscript', type : 'string', value : 'PKGBUILD',
|
|||||||
option('datarootdir', type : 'string', value : 'share',
|
option('datarootdir', type : 'string', value : 'share',
|
||||||
description : 'FIXME')
|
description : 'FIXME')
|
||||||
|
|
||||||
|
option('keyringdir', type : 'string', value: 'pacman/keyrings',
|
||||||
|
description : 'Where to look for keyring files under datarootdir')
|
||||||
|
|
||||||
option('makepkg-template-dir', type : 'string', value : '/usr/share/makepkg-template',
|
option('makepkg-template-dir', type : 'string', value : '/usr/share/makepkg-template',
|
||||||
description : 'template dir used by makepkg-template')
|
description : 'template dir used by makepkg-template')
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ changelog=
|
|||||||
source=("$pkgbase-$pkgver.tar.gz"
|
source=("$pkgbase-$pkgver.tar.gz"
|
||||||
"$pkgname-$pkgver.patch")
|
"$pkgname-$pkgver.patch")
|
||||||
noextract=()
|
noextract=()
|
||||||
md5sums=()
|
sha256sums=()
|
||||||
validpgpkeys=()
|
validpgpkeys=()
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ options=()
|
|||||||
install=
|
install=
|
||||||
source=('FOLDER::VCS+URL#FRAGMENT')
|
source=('FOLDER::VCS+URL#FRAGMENT')
|
||||||
noextract=()
|
noextract=()
|
||||||
md5sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
|
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
|
||||||
# a description of each element in the source array.
|
# a description of each element in the source array.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ changelog=
|
|||||||
source=("$pkgname-$pkgver.tar.gz"
|
source=("$pkgname-$pkgver.tar.gz"
|
||||||
"$pkgname-$pkgver.patch")
|
"$pkgname-$pkgver.patch")
|
||||||
noextract=()
|
noextract=()
|
||||||
md5sums=()
|
sha256sums=()
|
||||||
validpgpkeys=()
|
validpgpkeys=()
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ _pacman_conf_directive() {
|
|||||||
|
|
||||||
_pacman_conf_commands=(
|
_pacman_conf_commands=(
|
||||||
{-l,--repo-list}'[List configured repositories]:*: :->repo_list'
|
{-l,--repo-list}'[List configured repositories]:*: :->repo_list'
|
||||||
{-h,--help}'[Output systax and command line options]:*: :->complete'
|
{-h,--help}'[Output syntax and command line options]:*: :->complete'
|
||||||
{-V,--version}'[Display version and exit]:*: :->complete'
|
{-V,--version}'[Display version and exit]:*: :->complete'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -564,7 +564,7 @@ _pacman_conf_options=(
|
|||||||
|
|
||||||
_pacman_conf_options_common=(
|
_pacman_conf_options_common=(
|
||||||
'*'{-c,--config=}'[Specify an alternate configuration file]: :_files'
|
'*'{-c,--config=}'[Specify an alternate configuration file]: :_files'
|
||||||
'*'{-R,--rootdir=}'[Specify an alternate insallation root]: :_files'
|
'*'{-R,--rootdir=}'[Specify an alternate installation root]: :_files'
|
||||||
)
|
)
|
||||||
|
|
||||||
_pacman_conf() {
|
_pacman_conf() {
|
||||||
@@ -586,38 +586,38 @@ _pacman_conf() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_key_shortopts=(
|
_pacman_key_shortopts=(
|
||||||
'-h[show help]'
|
'-h[show help]'
|
||||||
'-a[Add the specified keys (empty for stdin)]: :_files'
|
'-a[Add the specified keys (empty for stdin)]: :_files'
|
||||||
'-d[Remove the Specified keyids]:*: :_keys'
|
'-d[Remove the Specified keyids]:*: :_pacman_key_list'
|
||||||
'-e[Export the specified or all keyids]:*: :_keys'
|
'-e[Export the specified or all keyids]:*: :_pacman_key_list'
|
||||||
'-f[List fingerprint for specified or all keyids]:*: :_keys'
|
'-f[List fingerprint for specified or all keyids]:*: :_pacman_key_list'
|
||||||
'-l[List the specified or all keys]:*: :_keys'
|
'-l[List the specified or all keys]:*: :_pacman_key_list'
|
||||||
'-r[Fetch the specified keyids]:*: :_keys'
|
'-r[Fetch the specified keyids]:*: :_pacman_key_list'
|
||||||
'-u[Update the trustdb of pacman]'
|
'-u[Update the trustdb of pacman]'
|
||||||
'-v[Verify the file specified by the signature]: :_files -g "*.sig"'
|
'-v[Verify the file specified by the signature]: :_files -g "*.sig"'
|
||||||
'-V[Show program version]'
|
'-V[Show program version]'
|
||||||
)
|
)
|
||||||
|
|
||||||
_key_longopts=(
|
_pacman_key_longopts=(
|
||||||
'--help[show help]'
|
'--help[show help]'
|
||||||
'--add[Add the specified keys (empty for stdin)]: :_files'
|
'--add[Add the specified keys (empty for stdin)]: :_files'
|
||||||
'--delete[Remove the Specified keyids]:*: :_keys'
|
'--delete[Remove the Specified keyids]:*: :_pacman_key_list'
|
||||||
'--export[Export the specified or all keyids]:*: :_keys'
|
'--export[Export the specified or all keyids]:*: :_pacman_key_list'
|
||||||
'--finger[List fingerprint for specified or all keyids]:*: :_keys'
|
'--finger[List fingerprint for specified or all keyids]:*: :_pacman_key_list'
|
||||||
'--list-keys[List the specified or all keys]:*: :_keys'
|
'--list-keys[List the specified or all keys]:*: :_pacman_key_list'
|
||||||
'--recv-keys[Fetch the specified keyids]:*: :_keys'
|
'--recv-keys[Fetch the specified keyids]:*: :_pacman_key_list'
|
||||||
'--updatedb[Update the trustdb of pacman]'
|
'--updatedb[Update the trustdb of pacman]'
|
||||||
'--verify[Verify the file specified by the signature]: :_files -g "*.sig"'
|
'--verify[Verify the file specified by the signature]: :_files -g "*.sig"'
|
||||||
'--version[Show program version]'
|
'--version[Show program version]'
|
||||||
'--edit-key[Present a menu for key management task on keyids]:*: :_keys'
|
'--edit-key[Present a menu for key management task on keyids]:*: :_pacman_key_list'
|
||||||
'--import[Imports pubring.gpg from dir(s)]: :_files -g "*.gpg"'
|
'--import[Imports pubring.gpg from dir(s)]: :_files -g "*.gpg"'
|
||||||
'--import-tb[Imports ownertrust values from trustdb.gpg in dir(s)]: :_files -g "*.gpg"'
|
'--import-tb[Imports ownertrust values from trustdb.gpg in dir(s)]: :_files -g "*.gpg"'
|
||||||
'--init[Ensure the keyring is properly initialized]'
|
'--init[Ensure the keyring is properly initialized]'
|
||||||
'--list-sigs[List keys and their signatures]:*: :_keys'
|
'--list-sigs[List keys and their signatures]:*: :_pacman_key_list'
|
||||||
'--lsign-key[Locally sign the specified keyid]:*: :_keys'
|
'--lsign-key[Locally sign the specified keyid]:*: :_pacman_key_list'
|
||||||
'--populate[Reload the default keys from the (given) keyrings in '/usr/share/pacman/keyrings']: :_path_files -W /usr/share/pacman/keyrings'
|
'--populate[Reload the default keys from the (given) keyrings in '@keyringdir@']: :_path_files -W @keyringdir@'
|
||||||
'--refresh-keys[Update specified or all keys from a keyserver]:*: :_keys'
|
'--refresh-keys[Update specified or all keys from a keyserver]:*: :_pacman_key_list'
|
||||||
)
|
)
|
||||||
|
|
||||||
_pacman_key_options=(
|
_pacman_key_options=(
|
||||||
@@ -631,13 +631,13 @@ _pacman_key() {
|
|||||||
--*)
|
--*)
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
"$_pacman_key_options[@]" \
|
"$_pacman_key_options[@]" \
|
||||||
"$_key_longopts[@]"
|
"$_pacman_key_longopts[@]"
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
"$_pacman_key_options[@]" \
|
"$_pacman_key_options[@]" \
|
||||||
"$_key_shortopts[@]" \
|
"$_pacman_key_shortopts[@]" \
|
||||||
"$_key_longopts[@]"
|
"$_pacman_key_longopts[@]"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
i=$#
|
i=$#
|
||||||
@@ -648,13 +648,13 @@ _pacman_key() {
|
|||||||
--*)
|
--*)
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
"$_pacman_key_options[@]" \
|
"$_pacman_key_options[@]" \
|
||||||
"$_key_longopts[@]"
|
"$_pacman_key_longopts[@]"
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
"$_pacman_key_options[@]" \
|
"$_pacman_key_options[@]" \
|
||||||
"$_key_shortopts[@]" \
|
"$_pacman_key_shortopts[@]" \
|
||||||
"$_key_longopts[@]"
|
"$_pacman_key_longopts[@]"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
return 1
|
return 1
|
||||||
@@ -664,7 +664,7 @@ _pacman_key() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_keys() {
|
_pacman_key_list() {
|
||||||
local keylist keys
|
local keylist keys
|
||||||
keylist=$(pacman-key --list-keys 2>/dev/null | awk '
|
keylist=$(pacman-key --list-keys 2>/dev/null | awk '
|
||||||
$1 == "pub" {
|
$1 == "pub" {
|
||||||
@@ -733,7 +733,7 @@ _makepkg_longopts=(
|
|||||||
'--check[Run check() function in the PKGBUILD]'
|
'--check[Run check() function in the PKGBUILD]'
|
||||||
'--config[Use an alternate config file instead of '@sysconfdir@/makepkg.conf']: :_files'
|
'--config[Use an alternate config file instead of '@sysconfdir@/makepkg.conf']: :_files'
|
||||||
'--holdver[Do not update VCS sources]'
|
'--holdver[Do not update VCS sources]'
|
||||||
'--key[Specify key to use for gpg signing instead of the default]: :_keys'
|
'--key[Specify key to use for gpg signing instead of the default]: :_pacman_key_list'
|
||||||
'--noarchive[Do not create package archive]'
|
'--noarchive[Do not create package archive]'
|
||||||
'--nocheck[Do not run the check() function in the PKGBUILD]'
|
'--nocheck[Do not run the check() function in the PKGBUILD]'
|
||||||
'--noprepare[Do not run the prepare() function in the PKGBUILD]'
|
'--noprepare[Do not run the prepare() function in the PKGBUILD]'
|
||||||
|
|||||||
38
scripts/libmakepkg/autodep.sh.in
Normal file
38
scripts/libmakepkg/autodep.sh.in
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# autodep.sh - functions for automatically adding depends/provides
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -n "$LIBMAKEPKG_AUTODEP_SH" ]] && return
|
||||||
|
LIBMAKEPKG_AUTODEP_SH=1
|
||||||
|
|
||||||
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
declare -a autodep_functions
|
||||||
|
|
||||||
|
for lib in "$MAKEPKG_LIBRARY/autodep/"*.sh; do
|
||||||
|
source "$lib"
|
||||||
|
done
|
||||||
|
|
||||||
|
readonly -a autodep_functions
|
||||||
|
|
||||||
|
generate_autodeps() {
|
||||||
|
for func in ${autodep_functions[@]}; do
|
||||||
|
$func
|
||||||
|
done
|
||||||
|
}
|
||||||
75
scripts/libmakepkg/autodep/library_depends.sh.in
Normal file
75
scripts/libmakepkg/autodep/library_depends.sh.in
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# library_depends.sh - Automatically add library requirements to depends
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -n "$LIBMAKEPKG_AUTODEP_LIBRARY_DEPENDS_SH" ]] && return
|
||||||
|
LIBMAKEPKG_AUTODEP_LIBRARY_DEPENDS_SH=1
|
||||||
|
|
||||||
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
autodep_functions+=('library_depends')
|
||||||
|
|
||||||
|
library_depends() {
|
||||||
|
if check_option "autodeps" "y"; then
|
||||||
|
local dep filename libdeps libdir libpath prefix sofile
|
||||||
|
declare -a libdeps
|
||||||
|
|
||||||
|
while IFS= read -rd '' filename; do
|
||||||
|
for sofile in $(LC_ALL=C readelf -d $filename 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p'); do
|
||||||
|
# get the full path of the library
|
||||||
|
libpath=$(ldd $filename | sed -nr "s/.$sofile => (.*) \(.*\)/\1/p")
|
||||||
|
|
||||||
|
# if ldd can not find the library, it is likely part of the package and not in filesystem
|
||||||
|
if [[ -z $libpath ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# skip if the library is part of the package
|
||||||
|
if [[ -e "$pkgdir/$libpath" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# find the prefix for the dependency
|
||||||
|
libpath=${libpath#/}
|
||||||
|
libpath=${libpath%/*}
|
||||||
|
|
||||||
|
unset prefix
|
||||||
|
for libdir in ${LIB_DIRS[@]}; do
|
||||||
|
if [[ ${libdir/*:} == ${libpath} ]]; then
|
||||||
|
prefix=${libdir/:*}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z ${prefix} ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# only add library dependency if it exists - this helps bootstraping dependencies
|
||||||
|
if [[ $(run_pacman -T "$prefix:$sofile") ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
libdeps+=("$prefix:$sofile")
|
||||||
|
done
|
||||||
|
|
||||||
|
done < <(find "$pkgdir" -type f -perm -u+x -print0)
|
||||||
|
|
||||||
|
depends+=($(printf '%s\n' "${libdeps[@]}" | LC_ALL=C sort -u))
|
||||||
|
fi
|
||||||
|
}
|
||||||
56
scripts/libmakepkg/autodep/library_provides.sh.in
Normal file
56
scripts/libmakepkg/autodep/library_provides.sh.in
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# library_provides.sh - Automatically add a packages libraries to provides
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -n "$LIBMAKEPKG_AUTODEP_LIBRARY_PROVIDES_SH" ]] && return
|
||||||
|
LIBMAKEPKG_AUTODEP_LIBRARY_PROVIDES_SH=1
|
||||||
|
|
||||||
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
autodep_functions+=('library_provides')
|
||||||
|
|
||||||
|
library_provides() {
|
||||||
|
if check_option "autodeps" "y"; then
|
||||||
|
for lib in ${LIB_DIRS[@]}; do
|
||||||
|
dir=${lib/*:}
|
||||||
|
prefix=${lib/:*}
|
||||||
|
|
||||||
|
if [[ ! -d "$pkgdir/$dir" ]]; then
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
mapfile -t filenames < <(find "$pkgdir/$dir" -maxdepth 1 -type f | LC_ALL=C sort)
|
||||||
|
|
||||||
|
for fn in "${filenames[@]}"; do
|
||||||
|
# check we have a shared library
|
||||||
|
if LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then
|
||||||
|
# extract library soname
|
||||||
|
local sofile=$(LC_ALL=C readelf -d "$fn" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p')
|
||||||
|
|
||||||
|
if [[ -z "$sofile" ]]; then
|
||||||
|
# the library has no soname
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
provides+=("$prefix:$sofile")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
18
scripts/libmakepkg/autodep/meson.build
Normal file
18
scripts/libmakepkg/autodep/meson.build
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
libmakepkg_module = 'autodep'
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
'library_depends.sh.in',
|
||||||
|
'library_provides.sh.in',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach src : sources
|
||||||
|
output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
libmakepkg_module + '_' + src.underscorify(),
|
||||||
|
command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
|
||||||
|
input : src,
|
||||||
|
output : '@BASENAME@',
|
||||||
|
install : true,
|
||||||
|
install_dir : output_dir)
|
||||||
|
endforeach
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# buildenv.sh - functions for altering the build environment before
|
# buildenv.sh - functions for altering the build environment before
|
||||||
# compilation
|
# compilation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2015-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,21 +22,25 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_SH=1
|
LIBMAKEPKG_BUILDENV_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
declare -a buildenv_functions build_options
|
declare -a buildenv_functions build_options
|
||||||
|
buildenv_vars=('CPPFLAGS' 'CFLAGS' 'CXXFLAGS' 'LDFLAGS' 'MAKEFLAGS' 'CHOST')
|
||||||
|
|
||||||
for lib in "$LIBRARY/buildenv/"*.sh; do
|
for lib in "$MAKEPKG_LIBRARY/buildenv/"*.sh; do
|
||||||
source "$lib"
|
source "$lib"
|
||||||
done
|
done
|
||||||
|
|
||||||
readonly -a buildenv_functions build_options
|
readonly -a buildenv_functions buildenv_vars build_options
|
||||||
|
|
||||||
prepare_buildenv() {
|
prepare_buildenv() {
|
||||||
|
# ensure this function runs first
|
||||||
|
buildenv_buildflags
|
||||||
|
|
||||||
for func in ${buildenv_functions[@]}; do
|
for func in ${buildenv_functions[@]}; do
|
||||||
$func
|
$func
|
||||||
done
|
done
|
||||||
|
|
||||||
# ensure all necessary build variables are exported
|
# ensure all necessary build variables are exported
|
||||||
export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS RUSTFLAGS MAKEFLAGS CHOST
|
export ${buildenv_vars[@]}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# buildflags.sh - Clear user-specified buildflags if requested
|
# buildflags.sh - Clear user-specified buildflags if requested
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,15 +21,14 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_BUILDFLAGS_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_BUILDFLAGS_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_BUILDFLAGS_SH=1
|
LIBMAKEPKG_BUILDENV_BUILDFLAGS_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
build_options+=('buildflags')
|
build_options+=('buildflags')
|
||||||
buildenv_functions+=('buildenv_buildflags')
|
|
||||||
|
|
||||||
buildenv_buildflags() {
|
buildenv_buildflags() {
|
||||||
if check_option "buildflags" "n"; then
|
if check_option "buildflags" "n"; then
|
||||||
unset CPPFLAGS CFLAGS DEBUG_CFLAGS CXXFLAGS DEBUG_CXXFLAGS LDFLAGS RUSTFLAGS DEBUG_RUSTFLAGS
|
unset ${buildenv_vars[@]}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# ccache - Cache compilations and reuse them to save time on repetitions
|
# ccache - Cache compilations and reuse them to save time on repetitions
|
||||||
# distcc - Distribute compilation of C and C++ across machines
|
# distcc - Distribute compilation of C and C++ across machines
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2007-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_COMPILER_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_COMPILER_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_COMPILER_SH=1
|
LIBMAKEPKG_BUILDENV_COMPILER_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
build_options+=('ccache' 'distcc')
|
build_options+=('ccache' 'distcc')
|
||||||
buildenv_functions+=('buildenv_ccache' 'buildenv_distcc')
|
buildenv_functions+=('buildenv_ccache' 'buildenv_distcc')
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# debugflags.sh - Specify flags for building a package with debugging
|
# debugflags.sh - Specify flags for building a package with debugging
|
||||||
# symbols
|
# symbols
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2012-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,19 +22,18 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_DEBUGFLAGS_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_DEBUGFLAGS_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_DEBUGFLAGS_SH=1
|
LIBMAKEPKG_BUILDENV_DEBUGFLAGS_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
source "$MAKEPKG_LIBRARY/util/util.sh"
|
||||||
|
|
||||||
buildenv_functions+=('buildenv_debugflags')
|
buildenv_functions+=('buildenv_debugflags')
|
||||||
|
|
||||||
buildenv_debugflags() {
|
buildenv_debugflags() {
|
||||||
if check_option "debug" "y"; then
|
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
|
||||||
DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
append_once DEBUG_CFLAGS "-ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
|
||||||
DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
append_once DEBUG_CXXFLAGS "-ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
|
||||||
DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
append_once CFLAGS "$DEBUG_CFLAGS"
|
||||||
CFLAGS+=" $DEBUG_CFLAGS"
|
append_once CXXFLAGS "$DEBUG_CXXFLAGS"
|
||||||
CXXFLAGS+=" $DEBUG_CXXFLAGS"
|
|
||||||
RUSTFLAGS+=" $DEBUG_RUSTFLAGS"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# lto.sh - Specify flags for building a package with link-time
|
# lto.sh - Specify flags for building a package with link-time
|
||||||
# optimisation
|
# optimisation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2021-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,16 +22,18 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_LTO_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_LTO_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_LTO_SH=1
|
LIBMAKEPKG_BUILDENV_LTO_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
source "$MAKEPKG_LIBRARY/util/util.sh"
|
||||||
|
|
||||||
build_options+=('lto')
|
build_options+=('lto')
|
||||||
buildenv_functions+=('buildenv_lto')
|
buildenv_functions+=('buildenv_lto')
|
||||||
|
|
||||||
buildenv_lto() {
|
buildenv_lto() {
|
||||||
if check_option "lto" "y"; then
|
if check_option "lto" "y" && ! check_option "buildflags" "n"; then
|
||||||
CFLAGS+=" -flto"
|
append_once CFLAGS "${LTOFLAGS:--flto}"
|
||||||
CXXFLAGS+=" -flto"
|
append_once CXXFLAGS "${LTOFLAGS:--flto}"
|
||||||
|
append_once LDFLAGS "${LTOFLAGS:--flto}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# makeflags.sh - Clear user-specified makeflags if requested
|
# makeflags.sh - Clear user-specified makeflags if requested
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2007-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
[[ -n "$LIBMAKEPKG_BUILDENV_MAKEFLAGS_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_MAKEFLAGS_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_MAKEFLAGS_SH=1
|
LIBMAKEPKG_BUILDENV_MAKEFLAGS_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
build_options+=('makeflags')
|
build_options+=('makeflags')
|
||||||
buildenv_functions+=('buildenv_makeflags')
|
buildenv_functions+=('buildenv_makeflags')
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ sources = [
|
|||||||
'debugflags.sh.in',
|
'debugflags.sh.in',
|
||||||
'lto.sh.in',
|
'lto.sh.in',
|
||||||
'makeflags.sh.in',
|
'makeflags.sh.in',
|
||||||
|
'rust.sh.in',
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach src : sources
|
foreach src : sources
|
||||||
|
|||||||
37
scripts/libmakepkg/buildenv/rust.sh.in
Normal file
37
scripts/libmakepkg/buildenv/rust.sh.in
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
#
|
||||||
|
# rust.sh - Specify flags for building a package with rust
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -n "$LIBMAKEPKG_BUILDENV_RUST_SH" ]] && return
|
||||||
|
LIBMAKEPKG_BUILDENV_RUST_SH=1
|
||||||
|
|
||||||
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
source "$MAKEPKG_LIBRARY/util/util.sh"
|
||||||
|
|
||||||
|
buildenv_var+=('RUSTFLAGS' 'DEBUG_RUSTFLAGS')
|
||||||
|
buildenv_functions+=('buildenv_rust')
|
||||||
|
|
||||||
|
buildenv_rust() {
|
||||||
|
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
|
||||||
|
append_once DEBUG_RUSTFLAGS "--remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
|
||||||
|
append_once RUSTFLAGS "$DEBUG_RUSTFLAGS"
|
||||||
|
fi
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# executable.sh - confirm presence of dependent executables
|
# executable.sh - confirm presence of dependent executables
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2018-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_SH=1
|
LIBMAKEPKG_EXECUTABLE_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
declare -a executable_functions
|
declare -a executable_functions
|
||||||
|
|
||||||
for lib in "$LIBRARY/executable/"*.sh; do
|
for lib in "$MAKEPKG_LIBRARY/executable/"*.sh; do
|
||||||
source "$lib"
|
source "$lib"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# ccache.sh - Confirm presence of ccache binary
|
# ccache.sh - Confirm presence of ccache binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_CCACHE_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_CCACHE_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_CCACHE_SH=1
|
LIBMAKEPKG_EXECUTABLE_CCACHE_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_ccache')
|
executable_functions+=('executable_ccache')
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# checksum.sh - Confirm presence of binaries for checksum operations
|
# checksum.sh - Confirm presence of binaries for checksum operations
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2016-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_CHECKSUM_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_CHECKSUM_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_CHECKSUM_SH=1
|
LIBMAKEPKG_EXECUTABLE_CHECKSUM_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_checksum')
|
executable_functions+=('executable_checksum')
|
||||||
|
|
||||||
|
|||||||
38
scripts/libmakepkg/executable/debugedit.sh.in
Normal file
38
scripts/libmakepkg/executable/debugedit.sh.in
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
#
|
||||||
|
# debugedit.sh - Confirm presence of debugedit binary
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_DEBUGEDIT_SH" ]] && return
|
||||||
|
LIBMAKEPKG_EXECUTABLE_DEBUGEDIT_SH=1
|
||||||
|
|
||||||
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
|
executable_functions+=('executable_debugedit')
|
||||||
|
|
||||||
|
executable_debugedit() {
|
||||||
|
if check_option "debug" "y"; then
|
||||||
|
if ! type -p debugedit >/dev/null; then
|
||||||
|
error "$(gettext "Cannot find the %s binary required for including source files in debug packages.")" "debugedit"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# distcc.sh - Confirm presence of distcc binary
|
# distcc.sh - Confirm presence of distcc binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_DISTCC_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_DISTCC_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_DISTCC_SH=1
|
LIBMAKEPKG_EXECUTABLE_DISTCC_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_distcc')
|
executable_functions+=('executable_distcc')
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# fakeroot.sh - Confirm presence of fakeroot binary
|
# fakeroot.sh - Confirm presence of fakeroot binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_FAKEROOT_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_FAKEROOT_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_FAKEROOT_SH=1
|
LIBMAKEPKG_EXECUTABLE_FAKEROOT_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_fakeroot')
|
executable_functions+=('executable_fakeroot')
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# gpg.sh - Confirm presence of gpg binary
|
# gpg.sh - Confirm presence of gpg binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_GPG_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_GPG_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_GPG_SH=1
|
LIBMAKEPKG_EXECUTABLE_GPG_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_gpg')
|
executable_functions+=('executable_gpg')
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# gzip.sh - Confirm presence of gzip binary
|
# gzip.sh - Confirm presence of gzip binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_GZIP_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_GZIP_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_GZIP_SH=1
|
LIBMAKEPKG_EXECUTABLE_GZIP_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
source "$MAKEPKG_LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_gzip')
|
executable_functions+=('executable_gzip')
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user