pacman 7.0.0.r3.g7736133-1
This commit is contained in:
parent
e437906c28
commit
d38b80cdab
50
PKGBUILD
50
PKGBUILD
@ -5,29 +5,42 @@
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=pacman
|
||||
pkgver=7.0.0
|
||||
pkgrel=2
|
||||
pkgver=7.0.0.r3.g7736133
|
||||
_git_tag=7.0.0
|
||||
_git_patch_level_commit=77361331ae3864c6ea880e715c5864d59336f275
|
||||
pkgrel=1
|
||||
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' 'doxygen')
|
||||
depends=(
|
||||
'bash'
|
||||
'coreutils'
|
||||
'curl'
|
||||
'gawk'
|
||||
'gettext'
|
||||
'glibc'
|
||||
'gnupg'
|
||||
'gpgme'
|
||||
'grep'
|
||||
'libarchive'
|
||||
'systemd'
|
||||
'zstd')
|
||||
makedepends=('doxygen' 'git' 'meson' 'python-asciidoc')
|
||||
backup=(etc/pacman.conf
|
||||
etc/makepkg.conf
|
||||
etc/makepkg.conf.d/future-build.conf
|
||||
etc/makepkg.conf.d/rust.conf
|
||||
etc/pacman.d/mirrorlist)
|
||||
source=(https://gitlab.archlinux.org/pacman/pacman/-/releases/v${pkgver}/downloads/${pkgname}-${pkgver}.tar.xz
|
||||
revertme-makepkg-remove-libdepends-and-libprovides.patch
|
||||
source=(git+https://gitlab.archlinux.org/pacman/pacman.git#tag=v${_git_tag}
|
||||
revertme-makepkg-remove-libdepends-and-libprovides.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/354a300cd26bb1c7e6551473596be5ecced921de.patch
|
||||
future-build.conf
|
||||
makepkg.conf
|
||||
pacman.conf
|
||||
rust.conf
|
||||
mirrorlist)
|
||||
sha256sums=(61cbd445d1381b4b184bc7c4e2791f07a79f0f2807b7c600399d0d08e8cd28cf
|
||||
sha256sums=(SKIP
|
||||
b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2
|
||||
58ad3c7e09e86a6f493a00235a34d09adc9bdedcab2f4731463074ed7bbe992b
|
||||
128c4737dedd58e0b0ffec306feaf1752260591b1222bdcb32c22bcaf8a8a44a
|
||||
@ -35,15 +48,30 @@ sha256sums=(61cbd445d1381b4b184bc7c4e2791f07a79f0f2807b7c600399d0d08e8cd28cf
|
||||
851385788fcef9eba37c7b9403d0010ccc94800b3279bc60ab5fcabc6ee8d321
|
||||
6c5163c174d451fb42f86670f99343782d736db1c3304f4e043452dc0eec3125)
|
||||
|
||||
pkgver() {
|
||||
cd ${pkgname}
|
||||
|
||||
git describe --abbrev=7 --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
cd ${pkgname}
|
||||
|
||||
# apply patch level commits on top of annotated tag
|
||||
if [[ -n ${_git_patch_level_commit} ]]; then
|
||||
if [[ v${_git_tag} != $(git describe --tags --abbrev=0 "${_git_patch_level_commit}") ]] then
|
||||
error "patch level commit ${_git_patch_level_commit} is not a descendant of v${_git_tag}"
|
||||
exit 1
|
||||
fi
|
||||
git rebase "${_git_patch_level_commit}"
|
||||
fi
|
||||
|
||||
patch -RNp1 < ${srcdir}/revertme-makepkg-remove-libdepends-and-libprovides.patch
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
cd ${pkgname}
|
||||
|
||||
${FUTURE_MESON} \
|
||||
-Dpkg-ext=".pkg.tar.zst" \
|
||||
@ -57,7 +85,7 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
cd ${pkgname}
|
||||
|
||||
meson install -C build --destdir ${pkgdir}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
u alpm - "Arch Linux Package Management" -
|
@ -1,179 +0,0 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user