pacman 6.1.0-2

This commit is contained in:
xhaa123 2024-05-06 20:56:28 +08:00
commit cb59d48f6e
10 changed files with 801 additions and 0 deletions

88
PKGBUILD Normal file
View File

@ -0,0 +1,88 @@
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=pacman
pkgver=6.1.0
pkgrel=2
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
url="https://www.archlinux.org/pacman/"
license=('GPL-2.0-or-later')
groups=('base' 'base-devel')
depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme'
'gettext' 'gawk' 'coreutils' 'gnupg' 'grep' 'zstd')
makedepends=('meson' 'python-asciidoc')
backup=(etc/pacman.conf
etc/makepkg.conf)
options=('strip')
source=(https://gitlab.archlinux.org/pacman/pacman/-/releases/v${pkgver}/downloads/${pkgname}-${pkgver}.tar.xz
revertme-makepkg-remove-libdepends-and-libprovides.patch
${pkgname}-fix-msg-unknown-key.patch
${pkgname}-man-gitlab.patch
${pkgname}-make-aligned-titles.patch
${pkgname}-repo-add-parseopts.patch
${pkgname}-drop-result-warn.patch
${pkgname}-fix-debugedit.patch
makepkg.conf
pacman.conf)
sha256sums=(5a60ac6e6bf995ba6140c7d038c34448df1f3daa4ae7141d2cad88eeb5f1f9d9
b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2
94c987046c2ff232fa0d395cddc11644840d767806711e04ef34f876a9baf217
0774d7035e34661f74b673d4b0a94be877bdc0158a555b873ec6bd4e2c936377
7bb64910265ce2590f593cdfd302076e49f67a68f8cc792a9aaac572d36fc842
2bbfe40539513ff5775aaf900644c8985ef618f5df9af856b9d571e2501365b0
160515b741aadc876a67f213029f5f62a51ff072ea4aaeb687bbe614035bf72f
1f4e4cc54332e60c9da2bdabf9a80dc11db466535f1a0be298cbf654f0723721
d1b0455e9a028c851e81451b48ddeaea4d5778e44eb52f023a70411ff28725c0
8e0d68a8926afd1de30b18ffdf6abcf9138fd1cb60da775a71f81cdb8fdca817)
prepare() {
cd ${pkgname}-${pkgver}
patch -RNp1 < ${srcdir}/revertme-makepkg-remove-libdepends-and-libprovides.patch
patch -Np1 -i ${srcdir}/${pkgname}-fix-msg-unknown-key.patch
patch -Np1 -i ${srcdir}/${pkgname}-man-gitlab.patch
patch -Np1 -i ${srcdir}/${pkgname}-make-aligned-titles.patch
patch -Np1 -i ${srcdir}/${pkgname}-repo-add-parseopts.patch
patch -Np1 -i ${srcdir}/${pkgname}-drop-result-warn.patch
patch -Np1 -i ${srcdir}/${pkgname}-fix-debugedit.patch
}
build() {
cd ${pkgname}-${pkgver}
meson setup build \
--prefix=/usr \
-Dbuildtype=release \
-Dlibdir=/usr/lib64 \
-Dpkg-ext=".pkg.tar.zst" \
-Dsrc-ext=".src.tar.zst" \
-Dcrypto=openssl \
-Ddoc=enabled \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/sbin/ldconfig
meson compile -C build
}
package() {
cd ${pkgname}-${pkgver}
meson install -C build --destdir ${pkgdir}
install -m644 ${srcdir}/makepkg.conf ${pkgdir}/etc
install -m644 ${srcdir}/pacman.conf ${pkgdir}/etc
local wantsdir="${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
install -dm755 ${wantsdir}
local unit
for unit in dirmngr gpg-agent gpg-agent-{browser,extra,ssh} keyboxd; do
ln -s "../${unit}@.socket" ${wantsdir}/${unit}@etc-pacman.d-gnupg.socket
done
}

188
makepkg.conf Normal file
View File

@ -0,0 +1,188 @@
#!/hint/bash
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::breezy'
'fossil::fossil'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-future-linux-gnu"
#-- Compiler and Linker Flags
CFLAGS="-march=haswell -mtune=haswell -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection \
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
-Wl,-z,pack-relative-relocs"
LTOFLAGS="-flto=auto"
RUSTFLAGS="-Cforce-frame-pointers=yes"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
NINJAFLAGS="-j$(nproc)"
#-- Debugging flags
#DEBUG_CFLAGS="-g"
#DEBUG_CXXFLAGS="-g"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults:
# OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- debug: Add debugging flags as specified in DEBUG_* variables
#-- 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 !autodeps)
#-- File integrity checks to use. Valid: ck, md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#-- Prefix and directories for library autodeps
LIB_DIRS=('lib64:usr/lib64' 'lib:usr/lib')
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
PKGDEST=/home/futurebuilder/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
SRCDEST=/home/futurebuilder/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
PACKAGER="Future Linux Team <future_linux@163.com>"
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -z -q -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.zst'
#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
PACMAN_AUTH=()
#########################################################################
# CONFIGURE
#########################################################################
#
CONFIGURE="./configure --prefix=/usr --libdir=/usr/lib64 --build=${CHOST} --host=${CHOST}"
BUILD_CONFIGURE="../configure --prefix=/usr --libdir=/usr/lib64 --build=${CHOST} --host=${CHOST}"
#########################################################################
# PICK
#########################################################################
#
_pick() {
local p=${1} f d; shift
for f; do
d=${srcdir}/${p}/${f#${pkgdir}/}
mkdir -p $(dirname ${d})
mv ${f} ${d}
rmdir -p --ignore-fail-on-non-empty $(dirname ${f})
done
}

View File

@ -0,0 +1,42 @@
From 111eed0251238a9d3f90e76d62f2ac01aeccce48 Mon Sep 17 00:00:00 2001
From: Allan McRae <allan@archlinux.org>
Date: Wed, 13 Mar 2024 11:33:15 +1000
Subject: [PATCH] Fix unused result warnings
Not actually a fix, as the pacman output will still be weird and
we will not gracefully exit, but it does print an error message...
Signed-off-by: Allan McRae <allan@archlinux.org>
---
src/pacman/util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 8a94e8caf..ebc210404 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -428,10 +428,10 @@ static char *concat_list(alpm_list_t *lst, formatfn fn)
}
if(tmp) {
- asprintf(&output, "%s %s", tmp, str);
+ pm_asprintf(&output, "%s %s", tmp, str);
free(tmp);
} else {
- asprintf(&output, "%s", str);
+ pm_asprintf(&output, "%s", str);
}
tmp = output;
@@ -441,7 +441,7 @@ static char *concat_list(alpm_list_t *lst, formatfn fn)
}
if(!output) {
- asprintf(&output, "%s", "");
+ pm_asprintf(&output, "%s", "");
}
return output;
--
GitLab

View File

@ -0,0 +1,41 @@
From bae9594ac1806ce30f2af1de27c49bb101a00d44 Mon Sep 17 00:00:00 2001
From: Morten Linderud <morten@linderud.pw>
Date: Thu, 14 Mar 2024 23:04:59 +0100
Subject: [PATCH] debugedit: only check for debugedit if we build a package
We only really need debugedit while building the package, while this
check would run if you tried something like `makepkg --verifysource`.
Use the same checks as we have for fakeroot to wrap debugedit so we
don't beg for dependencies we don't need.
Fixes: 3ed08f97ecd5941c3f72e3e94f17826dd959f823
Signed-off-by: Morten Linderud <morten@linderud.pw>
---
scripts/libmakepkg/executable/debugedit.sh.in | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/libmakepkg/executable/debugedit.sh.in b/scripts/libmakepkg/executable/debugedit.sh.in
index a28c3d4e2..c62595c46 100644
--- a/scripts/libmakepkg/executable/debugedit.sh.in
+++ b/scripts/libmakepkg/executable/debugedit.sh.in
@@ -29,10 +29,12 @@ 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
+ if (( SOURCEONLY || BUILDPKG )); then
+ 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
fi
}
--
GitLab

View File

@ -0,0 +1,40 @@
From 6bb95c8856437513ee0ab19226bc090d6fd0fb06 Mon Sep 17 00:00:00 2001
From: Allan McRae <allan@archlinux.org>
Date: Tue, 5 Mar 2024 07:25:11 +1000
Subject: [PATCH] Fix error messages for unknown key in databases
Signed-off-by: Allan McRae <allan@archlinux.org>
---
lib/libalpm/be_local.c | 2 +-
lib/libalpm/be_sync.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 80b0e9d12..b4a7c35a1 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -838,7 +838,7 @@ static int local_db_read(alpm_pkg_t *info, int inforeq)
}
FREELIST(lines);
} else {
- _alpm_log(db->handle, ALPM_LOG_WARNING, _("%s: unknown key '%s' in sync database\n"), info->name, line);
+ _alpm_log(db->handle, ALPM_LOG_WARNING, _("%s: unknown key '%s' in local database\n"), info->name, line);
alpm_list_t *lines = NULL;
READ_AND_STORE_ALL(lines);
FREELIST(lines);
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 24693976e..e47cdefe7 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -692,7 +692,7 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
}
FREELIST(lines);
} else {
- _alpm_log(db->handle, ALPM_LOG_WARNING, _("%s: unknown key '%s' in local database\n"), pkg->name, line);
+ _alpm_log(db->handle, ALPM_LOG_WARNING, _("%s: unknown key '%s' in sync database\n"), pkg->name, line);
alpm_list_t *lines = NULL;
READ_AND_STORE_ALL(lines);
FREELIST(lines);
--
GitLab

View File

@ -0,0 +1,35 @@
From 5e0496260b7d3f9c9fcf2b1c4899e4dbcc20ff03 Mon Sep 17 00:00:00 2001
From: Ivan Shapovalov <intelfx@intelfx.name>
Date: Wed, 13 Mar 2024 04:27:31 +0100
Subject: [PATCH] make_aligned_titles: pass the correct buffer length
The third parameter to wcstombs() is the length of the output buffer
(first parameter) in bytes. Take the correct sizeof() here.
This is not a problem in practice, but prevents _FORTIFY_SOURCE=3 from
detecting a possible output buffer overflow (as the source buffer is
bigger than the destination).
Fixes #104.
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
---
src/pacman/package.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pacman/package.c b/src/pacman/package.c
index b832663c0..95d0c4c4c 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -140,7 +140,7 @@ static void make_aligned_titles(void)
size_t padlen = maxcol - wcol[i];
wmemset(wbuf[i] + wlen[i], L' ', padlen);
wmemcpy(wbuf[i] + wlen[i] + padlen, title_suffix, ARRAYSIZE(title_suffix));
- wcstombs(titles[i], wbuf[i], sizeof(wbuf[i]));
+ wcstombs(titles[i], wbuf[i], sizeof(titles[i]));
}
}
--
GitLab

56
pacman-man-gitlab.patch Normal file
View File

@ -0,0 +1,56 @@
From 95f148c2222db608a0d72d5c5577d0c71e7fa199 Mon Sep 17 00:00:00 2001
From: Allan McRae <allan@archlinux.org>
Date: Mon, 4 Mar 2024 13:39:37 +1000
Subject: [PATCH] Update website to reflect gitlab usage
Signed-off-by: Allan McRae <allan@archlinux.org>
---
doc/index.asciidoc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/index.asciidoc b/doc/index.asciidoc
index 10981a7a9..0bc123aff 100644
--- a/doc/index.asciidoc
+++ b/doc/index.asciidoc
@@ -34,6 +34,8 @@ makepkg/repo-add/pacman toolchain via GnuPG and GPGME.
Version 5.0 added support for pre/post-transaction hooks and sync database file
list operations.
+Version 6.0 added support for parallel downloads.
+
Documentation
-------------
@@ -192,7 +194,9 @@ Releases
|======
-Source code for all releases is available at
+Source code for releases since moving to gitlab is available at
+link:https://gitlab.archlinux.org/pacman/pacman/-/releases[].
+Source code for historical releases is available at
link:https://sources.archlinux.org/other/pacman/[]. To install, download the newest
available source tarball, unpack it in a directory, and run the three magic
commands:
@@ -240,14 +244,10 @@ link:translation-help.html[translation-help].
Bugs
----
-If you find bugs (which is quite likely), please email them to the pacman-dev
-mailing last at mailto:pacman-dev@lists.archlinux.org[] with specific information
-such as your command-line, the nature of the bug, and even the package database
-if it helps.
-
-You can also post a bug to the Arch Linux bug tracker
-link:https://bugs.archlinux.org/index.php?project=3[Flyspray]. Be sure to file
-bugs under the Pacman project.
+If you find bugs (which is quite likely), please report them to the issue
+tracker at link:https://gitlab.archlinux.org/pacman/pacman/-/issues[] with
+specific information such as your command-line, the nature of the bug, and even
+the package database if it helps.
Copyright
---------
--
GitLab

View File

@ -0,0 +1,36 @@
From 0571ee82bff0edbd5ffac2228d4e6ac510b9008e Mon Sep 17 00:00:00 2001
From: Christian Heusel <christian@heusel.eu>
Date: Wed, 13 Mar 2024 17:38:56 +0100
Subject: [PATCH] repo-add: fix parseopts missing arg to -k/--key
The current code treats -k/--key as a binary option which later makes it
fail parsing the argument as then the end of arguments '--' is treated
as the GPGKEY. We fix this by adding the appropriate specifier to the
long and shortopt.
Closes https://gitlab.archlinux.org/pacman/pacman/-/issues/105
Fixes: 4f43ce3e ("repo-add: use parseopts from libmakepkg")
Signed-off-by: Christian Heusel <christian@heusel.eu>
---
scripts/repo-add.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index bdd549d20..39137f975 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -605,8 +605,8 @@ trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-OPT_SHORT="knpqRsv"
-OPT_LONG=('include-sigs' 'key' 'new' 'nocolor' 'quiet' 'prevent-downgrade' 'remove'
+OPT_SHORT="k:npqRsv"
+OPT_LONG=('include-sigs' 'key:' 'new' 'nocolor' 'quiet' 'prevent-downgrade' 'remove'
'sign' 'verify')
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
exit 1 # E_INVALID_OPTION
--
GitLab

96
pacman.conf Normal file
View File

@ -0,0 +1,96 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
VerbosePkgLists
ILoveCandy
ParallelDownloads = 5
# PGP signature checking
#SigLevel = Optional
#LocalFileSigLevel = Optional
#RemoteFileSigLevel = Optional
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# An example of a disabled remote package repository with multiple servers
# available. To enable, uncomment the following lines. You can add preferred
# servers immediately after the header and they will be used before the
# default mirrors.
#[core]
#SigLevel = Required
#Server = ftp://ftp.example.com/foobar/$repo/os/$arch/
# The file referenced here should contain a list of 'Server = ' lines.
#Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/packages
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[python]
Include = /etc/pacman.d/mirrorlist
[perl]
Include = /etc/pacman.d/mirrorlist
[xorg]
Include = /etc/pacman.d/mirrorlist
[kde]
Include = /etc/pacman.d/mirrorlist

View File

@ -0,0 +1,179 @@
From 354a300cd26bb1c7e6551473596be5ecced921de Mon Sep 17 00:00:00 2001
From: Allan McRae <allan@archlinux.org>
Date: Sun, 12 Dec 2021 12:24:04 +1000
Subject: [PATCH] makepkg: remove libdepends and libprovides
This will be replaced by a better system
Signed-off-by: Allan McRae <allan@archlinux.org>
---
doc/PKGBUILD.5.asciidoc | 9 ---
scripts/makepkg.sh.in | 118 ----------------------------------------
2 files changed, 127 deletions(-)
diff --git a/doc/PKGBUILD.5.asciidoc b/doc/PKGBUILD.5.asciidoc
index dee15f5e4..4ca8eb3b9 100644
--- a/doc/PKGBUILD.5.asciidoc
+++ b/doc/PKGBUILD.5.asciidoc
@@ -187,11 +187,6 @@ contain whitespace characters.
than or equal to), `<=` (less than or equal to), `=` (equal to), `>`
(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
underscore and the architecture name e.g., 'depends_x86_64=()'.
@@ -245,10 +240,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
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
underscore and the architecture name e.g., 'provides_x86_64=()'.
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 3c7977db2..639ea84ac 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -463,121 +463,6 @@ run_package() {
run_function_safe "package${1:+_$1}"
}
-find_libdepends() {
- local d sodepends
-
- sodepends=0
- for d in "${depends[@]}"; do
- if [[ $d = *.so ]]; then
- sodepends=1
- break
- fi
- done
-
- if (( sodepends == 0 )); then
- (( ${#depends[@]} )) && printf '%s\n' "${depends[@]}"
- return 0
- fi
-
- local libdeps filename soarch sofile soname soversion
- declare -A libdeps
-
- while IFS= read -rd '' filename; do
- # get architecture of the file; if soarch is empty it's not an ELF binary
- soarch=$(LC_ALL=C readelf -h "$filename" 2>/dev/null | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p')
- [[ -n "$soarch" ]] || continue
-
- # process all libraries needed by the binary
- for sofile in $(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p')
- do
- # extract the library name: libfoo.so
- soname="${sofile%.so?(+(.+([0-9])))}".so
- # extract the major version: 1
- soversion="${sofile##*\.so\.}"
-
- if [[ ${libdeps[$soname]} ]]; then
- if [[ ${libdeps[$soname]} != *${soversion}-${soarch}* ]]; then
- libdeps[$soname]+=" ${soversion}-${soarch}"
- fi
- else
- libdeps[$soname]="${soversion}-${soarch}"
- fi
- done
- done < <(find "$pkgdir" -type f -perm -u+x -print0)
-
- local libdepends v
- for d in "${depends[@]}"; do
- case "$d" in
- *.so)
- if [[ ${libdeps[$d]} ]]; then
- for v in ${libdeps[$d]}; do
- libdepends+=("$d=$v")
- done
- else
- warning "$(gettext "Library listed in %s is not required by any files: %s")" "'depends'" "$d"
- libdepends+=("$d")
- fi
- ;;
- *)
- libdepends+=("$d")
- ;;
- esac
- done
-
- (( ${#libdepends[@]} )) && printf '%s\n' "${libdepends[@]}"
-}
-
-
-find_libprovides() {
- local p versioned_provides libprovides missing
- for p in "${provides[@]}"; do
- missing=0
- versioned_provides=()
- case "$p" in
- *.so)
- mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort)
- if [[ $filename ]]; then
- # packages may provide multiple versions of the same library
- for fn in "${filename[@]}"; do
- # check if we really have a shared object
- if LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then
- # get the string binaries link to (e.g. libfoo.so.1.2 -> libfoo.so.1)
- local sofile=$(LC_ALL=C readelf -d "$fn" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p')
- if [[ -z "$sofile" ]]; then
- warning "$(gettext "Library listed in %s is not versioned: %s")" "'provides'" "$p"
- continue
- fi
-
- # get the library architecture (32 or 64 bit)
- local soarch=$(LC_ALL=C readelf -h "$fn" | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p')
-
- # extract the library major version
- local soversion="${sofile##*\.so\.}"
-
- versioned_provides+=("${p}=${soversion}-${soarch}")
- else
- warning "$(gettext "Library listed in %s is not a shared object: %s")" "'provides'" "$p"
- fi
- done
- else
- missing=1
- fi
- ;;
- esac
-
- if (( missing )); then
- warning "$(gettext "Cannot find library listed in %s: %s")" "'provides'" "$p"
- fi
- if (( ${#versioned_provides[@]} > 0 )); then
- libprovides+=("${versioned_provides[@]}")
- else
- libprovides+=("$p")
- fi
- done
-
- (( ${#libprovides[@]} )) && printf '%s\n' "${libprovides[@]}"
-}
-
write_kv_pair() {
local key="$1"
shift
@@ -617,9 +502,6 @@ write_pkginfo() {
write_kv_pair "size" "$size"
write_kv_pair "arch" "$pkgarch"
- mapfile -t provides < <(find_libprovides)
- mapfile -t depends < <(find_libdepends)
-
write_kv_pair "license" "${license[@]}"
write_kv_pair "replaces" "${replaces[@]}"
write_kv_pair "group" "${groups[@]}"
--
GitLab