bump(main/pacman): 6.1.0 (#19598)

This commit is contained in:
Ivan Max 2024-04-02 21:46:57 +00:00 committed by GitHub
parent fb8ce2e219
commit 90d2010108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 117 additions and 142 deletions

View File

@ -11,15 +11,7 @@ diff -uNr pacman-6.0.0/lib/libalpm/add.c pacman-termux/lib/libalpm/add.c
archive_write_disk_set_options(archive_writer, archive_flags);
ret = archive_read_extract2(archive, entry, archive_writer);
@@ -242,7 +245,6 @@
* 3,4- conflict checks should have caught this. either overwrite
* or backup the file.
* 5- file replacing directory- don't allow it.
- * 6- skip extraction, dir already exists.
*/
isnewfile = llstat(filename, &lsbuf) != 0;
@@ -254,19 +256,6 @@
@@ -257,19 +257,6 @@
gid_t entrygid = archive_entry_gid(entry);
#endif
@ -31,7 +23,7 @@ diff -uNr pacman-6.0.0/lib/libalpm/add.c pacman-termux/lib/libalpm/add.c
- "filesystem: %o package: %o\n"), filename, lsbuf.st_mode & mask,
- entrymode & mask);
- alpm_logaction(handle, ALPM_CALLER_PREFIX,
- "warning: directory permissions differ on %s\n"
- "warning: directory permissions differ on %s, "
- "filesystem: %o package: %o\n", filename, lsbuf.st_mode & mask,
- entrymode & mask);
- }

View File

@ -2,26 +2,32 @@ TERMUX_PKG_HOMEPAGE=https://archlinux.org/pacman/
TERMUX_PKG_DESCRIPTION="A library-based package manager with dependency support"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@Maxython <mixython@gmail.com>"
TERMUX_PKG_VERSION=6.0.2
TERMUX_PKG_REVISION=13
TERMUX_PKG_SRCURL=https://sources.archlinux.org/other/pacman/pacman-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=7d8e3e8c5121aec0965df71f59bedf46052c6cf14f96365c4411ec3de0a4c1a5
TERMUX_PKG_DEPENDS="bash, curl, gpgme, libandroid-glob, libarchive, libcurl, openssl, termux-licenses"
TERMUX_PKG_VERSION=6.1.0
TERMUX_PKG_SRCURL=https://gitlab.archlinux.org/pacman/pacman/-/releases/v${TERMUX_PKG_VERSION}/downloads/pacman-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=5a60ac6e6bf995ba6140c7d038c34448df1f3daa4ae7141d2cad88eeb5f1f9d9
TERMUX_PKG_DEPENDS="bash, curl, gpgme, libandroid-glob, libarchive, libcurl, openssl, termux-licenses, termux-keyring"
TERMUX_PKG_BUILD_DEPENDS="doxygen, asciidoc, nettle"
TERMUX_PKG_RECOMMENDS="termux-keyring"
TERMUX_PKG_GROUPS="base-devel"
#TERMUX_PKG_CONFFILES="etc/pacman.conf, etc/pacman.d/serverlist, etc/makepkg.conf, var/log/pacman.log"
TERMUX_PKG_CONFFILES="etc/pacman.d/serverlist, etc/makepkg.conf, var/log/pacman.log"
TERMUX_PKG_CONFFILES="etc/pacman.conf, etc/pacman.d/serverlist, etc/makepkg.conf, var/log/pacman.log"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--prefix=${TERMUX_PREFIX}
--sysconfdir=${TERMUX_PREFIX}/etc
--localstatedir=${TERMUX_PREFIX}/var
-Dpkg-ext=.pkg.tar.xz
-Dscriptlet-shell=${TERMUX_PREFIX}/bin/bash
-Dmakepkg-template-dir=${TERMUX_PREFIX}/share/makepkg-template
-Di18n=false
"
termux_step_pre_configure() {
rm -f ./scripts/libmakepkg/executable/sudo.sh.in
rm -f ./scripts/libmakepkg/executable/fakeroot.sh.in
sed -i "s/@TERMUX_ARCH@/${TERMUX_ARCH}/" ./etc/*
sed -i "s/@TERMUX_ARCH@/${TERMUX_ARCH}/" ./etc/{pacman,makepkg}.conf.in
}
termux_step_post_configure() {
sed -i 's/$ARGS -o $out $in $LINK_ARGS/$ARGS -o $out $in $LINK_ARGS -landroid-glob/' ${TERMUX_TOPDIR}/pacman/build/build.ninja
sed -i 's/$ARGS -o $out $in $LINK_ARGS/$ARGS -o $out $in $LINK_ARGS -landroid-glob/' ${TERMUX_PKG_BUILDDIR}/build.ninja
}
termux_step_post_make_install() {

View File

@ -1,12 +0,0 @@
diff -uNr pacman-6.0.0/doc/meson.build pacman-termux/doc/meson.build
--- pacman-6.0.0/doc/meson.build 2021-05-20 06:38:45.938120000 +0300
+++ pacman-termux/doc/meson.build 2021-10-04 16:00:39.000000000 +0300
@@ -101,7 +101,7 @@
endforeach
run_target('html',
- command : ['/bin/true'],
+ command : ['@TERMUX_PREFIX@/bin/true'],
depends : html_targets)
custom_target(

View File

@ -1,11 +1,11 @@
diff -uNr pacman-6.0.0/scripts/libmakepkg/executable/meson.build pacman-termux/scripts/libmakepkg/executable/meson.build
--- pacman-6.0.0/scripts/libmakepkg/executable/meson.build 2021-05-20 06:38:45.948119900 +0300
+++ pacman-termux/scripts/libmakepkg/executable/meson.build 2021-10-04 16:00:39.000000000 +0300
@@ -4,12 +4,10 @@
--- src/scripts/libmakepkg/executable/meson.build 2024-03-04 06:07:58.000000000 +0300
+++ src/scripts/libmakepkg/executable/meson.build.patch 2024-03-28 19:37:05.286341465 +0300
@@ -4,13 +4,11 @@
'ccache.sh.in',
'checksum.sh.in',
'distcc.sh.in',
- 'fakeroot.sh.in',
'debugedit.sh.in',
'gpg.sh.in',
'gzip.sh.in',
'pacman.sh.in',

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

@ -1,19 +1,19 @@
--- pacman-6.0.2/etc/makepkg.conf.in 2023-03-10 01:35:19.647470082 +0300
+++ pacman-6.0.2/etc/makepkg.conf.in.patch 2023-03-10 01:37:36.035469985 +0300
--- pacman-6.1.0/etc/makepkg.conf.in 2024-03-04 06:07:58.000000000 +0300
+++ pacman-6.1.0/etc/makepkg.conf.in.patch 2024-03-28 20:09:18.246340728 +0300
@@ -9,17 +9,17 @@
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
-DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
- 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
- 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
- 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
-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')
+DLAGENTS=('file::@TERMUX_PREFIX@/bin/curl -gqC - -o %o %u'
+ 'ftp::@TERMUX_PREFIX@/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
+ 'http::@TERMUX_PREFIX@/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+ 'https::@TERMUX_PREFIX@/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+DLAGENTS=('file::@TERMUX_PREFIX@/bin/curl -qgC - -o %o %u'
+ 'ftp::@TERMUX_PREFIX@/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
+ 'http::@TERMUX_PREFIX@/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+ 'https::@TERMUX_PREFIX@/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+ 'rsync::@TERMUX_PREFIX@/bin/rsync --no-motd -z %u %o'
+ 'scp::@TERMUX_PREFIX@/bin/scp -C %u %o')
@ -22,7 +22,7 @@
-# /usr/bin/lftpget -c
-# /usr/bin/wget
+# @TERMUX_PREFIX@/bin/snarf
+# @TERMUX_PREFIX@/bin/lftpget -c0
+# @TERMUX_PREFIX@/bin/lftpget -c
+# @TERMUX_PREFIX@/bin/wget
#-- The package required by makepkg to download VCS sources
@ -37,7 +37,7 @@
#-- Compiler and Linker Flags
@@ -93,7 +93,7 @@
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
-INTEGRITY_CHECK=(ck)
@ -51,6 +51,6 @@
#-- Directory to store source code in for debug packages
-DBGSRCDIR="/usr/src/debug"
+DBGSRCDIR="@TERMUX_PREFIX@/src/debug"
#-- Prefix and directories for library autodeps
LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
#########################################################################
# PACKAGE OUTPUT

View File

@ -1,32 +0,0 @@
diff -uNr pacman-6.0.0/meson.build pacman-termux/meson.build
--- pacman-6.0.0/meson.build 2021-05-20 06:38:45.948119900 +0300
+++ pacman-termux/meson.build 2021-10-04 16:00:39.000000000 +0300
@@ -4,9 +4,9 @@
license : 'GPLv2+',
default_options : [
'c_std=gnu99',
- 'prefix=/usr',
- 'sysconfdir=/etc',
- 'localstatedir=/var',
+ 'prefix=@TERMUX_PREFIX@',
+ 'sysconfdir=@TERMUX_PREFIX@/etc',
+ 'localstatedir=@TERMUX_PREFIX@/var',
],
meson_version : '>= 0.51')
@@ -76,15 +76,6 @@
conf.set_quoted('ROOTDIR', ROOTDIR)
libintl = dependency('', required: false)
-if get_option('i18n')
- if not cc.has_function('ngettext')
- libintl = cc.find_library('intl', required : false, static: get_option('buildstatic'))
- if not libintl.found()
- error('ngettext not found but NLS support requested')
- endif
- endif
- conf.set('ENABLE_NLS', 1)
-endif
# dependencies
libarchive = dependency('libarchive',

View File

@ -1,32 +0,0 @@
diff -uNr pacman-6.0.0/meson_options.txt pacman-termux/meson_options.txt
--- pacman-6.0.0/meson_options.txt 2021-05-20 06:38:45.948119900 +0300
+++ pacman-termux/meson_options.txt 2021-10-04 16:00:39.000000000 +0300
@@ -8,16 +8,16 @@
option('root-dir', type : 'string', value : '/',
description : 'set the location of the root operating directory')
-option('pkg-ext', type : 'string', value : '.pkg.tar.gz',
+option('pkg-ext', type : 'string', value : '.pkg.tar.xz',
description : 'set the file extension used by packages')
option('src-ext', type : 'string', value : '.src.tar.gz',
description : 'set the file extension used by source packages')
-option('scriptlet-shell', type : 'string', value : '/bin/sh',
+option('scriptlet-shell', type : 'string', value : '@TERMUX_PREFIX@/bin/bash',
description : 'The full path of the shell used to run install scriptlets')
-option('ldconfig', type : 'string', value : '/sbin/ldconfig',
+option('ldconfig', type : 'string', value : '@TERMUX_PREFIX@/bin/ldconfig',
description : 'set the full path to ldconfig')
option('buildscript', type : 'string', value : 'PKGBUILD',
@@ -26,7 +26,7 @@
option('datarootdir', type : 'string', value : 'share',
description : 'FIXME')
-option('makepkg-template-dir', type : 'string', value : '/usr/share/makepkg-template',
+option('makepkg-template-dir', type : 'string', value : '@TERMUX_PREFIX@/share/makepkg-template',
description : 'template dir used by makepkg-template')
option('debug-suffix', type : 'string', value : 'debug',

View File

@ -1,22 +1,15 @@
--- pacman-6.0.2/etc/pacman.conf.in 2023-03-10 01:31:38.207470241 +0300
+++ pacman-6.0.2/etc/pacman.conf.in.patch 2023-03-10 01:33:13.819470172 +0300
@@ -9,17 +9,17 @@
[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 = @ROOTDIR@
+#RootDir = /
#DBPath = @localstatedir@/lib/pacman/
#CacheDir = @localstatedir@/cache/pacman/pkg/
--- pacman-6.1.0/etc/pacman.conf.in 2024-03-04 06:07:58.000000000 +0300
+++ pacman-6.1.0/etc/pacman.conf.in.patch 2024-03-28 20:02:54.786340874 +0300
@@ -15,11 +15,11 @@
#LogFile = @localstatedir@/log/pacman.log
#GPGDir = @sysconfdir@/pacman.d/gnupg/
#HookDir = @sysconfdir@/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
+HoldPkg = pacman
+#XferCommand = @TERMUX_PREFIX@/bin/curl -L -C - -f -o %o %u
+#XferCommand = @TERMUX_PREFIX@/bin/wget --passive-ftp -c -O %o %u
+HoldPkg = pacman
#CleanMethod = KeepInstalled
-Architecture = auto
+Architecture = @TERMUX_ARCH@
@ -64,7 +57,7 @@
-# tips on creating your own repositories.
-#[custom]
-#SigLevel = Optional TrustAll
-#Server = file:///home/custompkgs
-#Server = file:///home/packages
+[main]
+Include = @TERMUX_PREFIX@/etc/pacman.d/serverlist
+

View File

@ -1,12 +1,11 @@
diff -uNr pacman-6.0.0/scripts/repo-add.sh.in pacman-termux/scripts/repo-add.sh.in
--- pacman-6.0.0/scripts/repo-add.sh.in 2021-05-20 06:38:45.961453200 +0300
+++ pacman-termux/scripts/repo-add.sh.in 2021-10-04 16:00:39.000000000 +0300
@@ -585,7 +585,7 @@
--- pacman-6.1.0/scripts/repo-add.sh.in 2024-03-04 06:07:58.000000000 +0300
+++ pacman-6.1.0/scripts/repo-add.sh.in.patch 2024-03-28 19:58:02.836340986 +0300
@@ -589,7 +589,7 @@
exit 1
fi
-tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/repo-tools.XXXXXXXXXX") || (\
+tmpdir=$(mktemp -d "${TMPDIR:-@TERMUX_PREFIX@/tmp}/repo-tools.XXXXXXXXXX") || (\
error "$(gettext "Cannot create temp directory for database building.")"; \
exit 1)
-tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/repo-tools.XXXXXXXXXX") || {
+tmpdir=$(mktemp -d "${TMPDIR:-@TERMUX_PREFIX@/tmp}/repo-tools.XXXXXXXXXX") || {
error "$(gettext "Cannot create temp directory for database building.")";
exit 1; }

View File

@ -1,18 +1,25 @@
diff -uNr pacman-6.0.0/lib/libalpm/util.c pacman-termux/lib/libalpm/util.c
--- pacman-6.0.0/lib/libalpm/util.c 2021-05-20 06:38:45.948119900 +0300
+++ pacman-termux/lib/libalpm/util.c 2021-10-04 16:00:39.000000000 +0300
@@ -650,10 +650,6 @@
}
--- pacman-6.1.0/lib/libalpm/util.c 2024-03-04 06:07:58.000000000 +0300
+++ pacman-6.1.0/lib/libalpm/util.c.patch 2024-03-28 23:01:55.557474407 +0300
@@ -35,6 +35,7 @@
#include <fnmatch.h>
#include <poll.h>
#include <signal.h>
+#include <sys/syscall.h>
/* libarchive */
#include <archive.h>
@@ -657,10 +658,6 @@
/* 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));
- exit(1);
- }
if(chdir("/") != 0) {
fprintf(stderr, _("could not change directory to %s (%s)\n"),
"/", strerror(errno));
@@ -669,7 +665,7 @@
@@ -684,7 +681,7 @@
/* this code runs for the parent only (wait on the child) */
int status;
char obuf[PIPE_BUF]; /* writes <= PIPE_BUF are guaranteed atomic */
@ -21,7 +28,7 @@ diff -uNr pacman-6.0.0/lib/libalpm/util.c pacman-termux/lib/libalpm/util.c
ssize_t olen = 0, ilen = 0;
nfds_t nfds = 2;
struct pollfd fds[2], *child2parent = &(fds[0]), *parent2child = &(fds[1]);
@@ -897,7 +893,7 @@
@@ -919,7 +916,7 @@
if((tmpdir = getenv("TMPDIR")) && stat(tmpdir, &buf) && S_ISDIR(buf.st_mode)) {
/* TMPDIR was good, we can use it */
} else {
@ -30,3 +37,17 @@ diff -uNr pacman-6.0.0/lib/libalpm/util.c pacman-termux/lib/libalpm/util.c
}
alpm_option_add_cachedir(handle, tmpdir);
cachedir = handle->cachedirs->prev->data;
@@ -1375,11 +1372,11 @@
CALLOC(check_path, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
snprintf(check_path, len, "%s%s", dir, file);
- ret = faccessat(AT_FDCWD, check_path, amode, flag);
+ ret = syscall(SYS_faccessat, AT_FDCWD, check_path, amode, flag);
free(check_path);
} else {
dir = "";
- ret = faccessat(AT_FDCWD, file, amode, flag);
+ ret = syscall(SYS_faccessat, AT_FDCWD, file, amode, flag);
}
if(ret != 0) {