diff --git a/pacman-contrib/0001-pactree-fix-compilation-with-pacman-6.patch b/pacman-contrib/0001-pactree-fix-compilation-with-pacman-6.patch new file mode 100644 index 00000000..82bb3114 --- /dev/null +++ b/pacman-contrib/0001-pactree-fix-compilation-with-pacman-6.patch @@ -0,0 +1,44 @@ +From fd21ee241c85856be941e41942d6c179ca713c41 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz via pacman-contrib +Date: Fri, 21 May 2021 00:30:07 -0400 +Subject: [PATCH] pactree: fix compilation with pacman 6 + +In "add front-end provided context to callbacks", libalpm gained a new +argument to callbacks which we don't use and is only needed by some +frontends wishing to do stuff with the callback state. NULL it and move +on with life, just like pacman itself did. + +Signed-off-by: Eli Schwartz +Signed-off-by: Daniel M. Capella +--- + src/pactree.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/pactree.c b/src/pactree.c +index e8f5086..9e6ac1b 100644 +--- a/src/pactree.c ++++ b/src/pactree.c +@@ -135,8 +135,10 @@ static const char *dbpath = DBPATH; + static const char *configfile = CONFFILE; + static const char *gpgdir = GPGDIR; + +-void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) ++void cb_log(void *ctx, alpm_loglevel_t level, const char *fmt, va_list args) + { ++ (void)ctx; ++ + switch(level) { + case ALPM_LOG_ERROR: + fprintf(stderr, "%s%s%s", color->error, "error: ", +@@ -621,7 +623,7 @@ int main(int argc, char *argv[]) + } + + if(debug) { +- alpm_option_set_logcb(handle, cb_log); ++ alpm_option_set_logcb(handle, cb_log, NULL); + } + + /* no need to fail on error here */ +-- +2.31.1 + diff --git a/pacman-contrib/0100-contrib.patch b/pacman-contrib/0100-contrib.patch index 6d4a83d8..ef812d84 100644 --- a/pacman-contrib/0100-contrib.patch +++ b/pacman-contrib/0100-contrib.patch @@ -1,3 +1,14 @@ +--- pacman-contrib-1.4.0/configure.ac.orig 2021-06-06 10:59:55.815788900 +0200 ++++ pacman-contrib-1.4.0/configure.ac 2021-06-06 10:57:04.735607300 +0200 +@@ -62,7 +62,7 @@ + AC_MSG_ERROR([*** libarchive >= 2.8.0 is needed to build pacman-contrib!])) + + # Check for libalpm +-PKG_CHECK_MODULES(LIBALPM, [libalpm], , ++PKG_CHECK_MODULES_STATIC(LIBALPM, [libalpm], , + AC_MSG_ERROR([*** libalpm is needed to build pacman-contrib!])) + + PKG_CHECK_VAR(LIBMAKEPKGDIR, [libmakepkg], [libmakepkgdir], , --- pacman-contrib-1.0.0/src/Makefile.am.orig 2018-07-06 23:06:38.101782600 +0300 +++ pacman-contrib-1.0.0/src/Makefile.am 2018-07-06 23:07:26.634558600 +0300 @@ -86,6 +86,8 @@ diff --git a/pacman-contrib/PKGBUILD b/pacman-contrib/PKGBUILD index 4ba8c974..a4086165 100644 --- a/pacman-contrib/PKGBUILD +++ b/pacman-contrib/PKGBUILD @@ -4,7 +4,7 @@ pkgname=pacman-contrib pkgver=1.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="Contributed scripts and tools for pacman systems (MSYS2 port)" arch=('i686' 'x86_64') url="https://git.archlinux.org/pacman-contrib.git/about/" @@ -22,14 +22,17 @@ makedepends=('asciidoc' 'libgpgme-devel' ) source=(https://git.archlinux.org/pacman-contrib.git/snapshot/${pkgname}-${pkgver}.tar.gz - "0100-contrib.patch") + "0100-contrib.patch" + '0001-pactree-fix-compilation-with-pacman-6.patch') sha256sums=('8746f1352aaad990fe633be34f925d5ab8bd8a19a5f1274e72dbde426deb86bd' - 'd7d0ea4effd6b0698959ee4d01d225cec1fe7671f0b84d83ffc9e5f036adb294') + '4af0cced6f68504075f59a83517c550b97323dbbb72697d8ed3ddc33c2605f4f' + '774d27532a91e2fe490ccc8d21c2d1d4d2a2dbfc8678a8406abb8bb8f9e6626c') prepare() { cd ${srcdir}/${pkgname}-${pkgver} patch -p1 -i ${srcdir}/0100-contrib.patch + patch -p1 -i ${srcdir}/0001-pactree-fix-compilation-with-pacman-6.patch ./autogen.sh } diff --git a/pacman/0001-Msysize.patch b/pacman/0001-Msysize.patch index 50665b38..de343f61 100644 --- a/pacman/0001-Msysize.patch +++ b/pacman/0001-Msysize.patch @@ -1,15 +1,15 @@ -From 91067406c454929239a5eebf043ed2eb0a485762 Mon Sep 17 00:00:00 2001 +From 9e9a116fb7c06190687cc8d5afb2d5d5ac610f3f Mon Sep 17 00:00:00 2001 From: Christoph Reiter -Date: Fri, 21 May 2021 22:47:29 +0200 +Date: Thu, 3 Jun 2021 16:22:43 +0200 Subject: [PATCH 01/N] Msysize --- lib/libalpm/add.c | 2 + .../lint_package/build_references.sh.in | 8 + scripts/libmakepkg/tidy/staticlibs.sh.in | 4 +- - scripts/libmakepkg/tidy/strip.sh.in | 167 ++++++++++++----- + scripts/libmakepkg/tidy/strip.sh.in | 180 ++++++++++++------ scripts/libmakepkg/utils_fixed_path.sh.in | 34 ++++ - scripts/makepkg.sh.in | 177 +++++++----------- + scripts/makepkg.sh.in | 174 +++++++---------- scripts/pacman-db-upgrade.sh.in | 12 +- scripts/pacman-key.sh.in | 22 +-- scripts/repo-add.sh.in | 11 +- @@ -18,11 +18,11 @@ Subject: [PATCH 01/N] Msysize src/pacman/check.c | 2 + src/pacman/pacman.c | 4 + test/pacman/pmtest.py | 19 +- - 14 files changed, 275 insertions(+), 196 deletions(-) + 14 files changed, 283 insertions(+), 198 deletions(-) create mode 100644 scripts/libmakepkg/utils_fixed_path.sh.in diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c -index f84e96a..1e330ca 100644 +index f806e5b..f0af886 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -266,6 +266,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, @@ -42,7 +42,7 @@ index f84e96a..1e330ca 100644 filename); archive_read_data_skip(archive); diff --git a/scripts/libmakepkg/lint_package/build_references.sh.in b/scripts/libmakepkg/lint_package/build_references.sh.in -index bcaf71c..a897adc 100644 +index 9b7ffab..a5fc455 100644 --- a/scripts/libmakepkg/lint_package/build_references.sh.in +++ b/scripts/libmakepkg/lint_package/build_references.sh.in @@ -37,5 +37,13 @@ warn_build_references() { @@ -60,7 +60,7 @@ index bcaf71c..a897adc 100644 return 0 } diff --git a/scripts/libmakepkg/tidy/staticlibs.sh.in b/scripts/libmakepkg/tidy/staticlibs.sh.in -index 7993c09..a685efe 100644 +index 498518c..e9d514a 100644 --- a/scripts/libmakepkg/tidy/staticlibs.sh.in +++ b/scripts/libmakepkg/tidy/staticlibs.sh.in @@ -35,9 +35,9 @@ tidy_staticlibs() { @@ -76,7 +76,7 @@ index 7993c09..a685efe 100644 fi } diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in -index b04426c..4cc9db6 100644 +index 5d03b28..e3d4061 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -31,10 +31,6 @@ packaging_options+=('strip' 'debug') @@ -88,9 +88,9 @@ index b04426c..4cc9db6 100644 -} - source_files() { - LANG=C readelf "$1" --debug-dump | \ - awk '/DW_AT_name +:/{name=$8}/DW_AT_comp_dir +:/{{if (name == "") next}{if (name !~ /^[<\/]/) {printf "%s/", $8}}{print name}}' -@@ -43,55 +39,57 @@ source_files() { + LANG=C readelf "$1" --debug-dump 2>/dev/null | \ + awk '/DW_AT_name +:/{name=$NF}/DW_AT_comp_dir +:/{{if (name == "") next}{if (name !~ /^[<\/]/) {printf "%s/", $NF}}{print name}}' +@@ -43,58 +39,63 @@ source_files() { strip_file() { local binary=$1; shift @@ -120,28 +120,6 @@ index b04426c..4cc9db6 100644 - cp -- "$file" "$dest" - fi - done < <(source_files "$binary") -- -- # copy debug symbols to debug directory -- mkdir -p "$dbgdir/${binary%/*}" -- objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" -- objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" -- -- # create any needed hardlinks -- while IFS= read -rd '' file ; do -- if [[ "${binary}" -ef "${file}" && ! -f "$dbgdir/${file}.debug" ]]; then -- mkdir -p "$dbgdir/${file%/*}" -- ln "$dbgdir/${binary}.debug" "$dbgdir/${file}.debug" -- fi -- done < <(find . -type f -perm -u+w -print0 2>/dev/null) -- -- if [[ -n "$bid" ]]; then -- local target -- mkdir -p "$dbgdir/.build-id/${bid:0:2}" -- -- target="../../../../../${binary#./}" -- target="${target/..\/..\/usr\/lib\/}" -- target="${target/..\/usr\/}" -- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}" + # copy source files to debug directory + local file dest t + while IFS= read -r t; do @@ -160,7 +138,10 @@ index b04426c..4cc9db6 100644 + objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" + + msg2 "Creating a debuginfo link to $dbgdir/$binary.debug in $binary" -+ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" ++ local tempfile=$(mktemp "$binary.XXXXXX") ++ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" "$tempfile" ++ cat "$tempfile" > "$binary" ++ rm "$tempfile" + + msg2 "Separating (again) debug info from $binary into $dbgdir/$binary.debug" + objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" @@ -171,7 +152,10 @@ index b04426c..4cc9db6 100644 + # strip debug-info from the original file + objcopy --strip-debug "$binary" + msg2 "Creating (again) a debuginfo link to $dbgdir/$binary.debug in $binary" -+ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" ++ tempfile=$(mktemp "$binary.XXXXXX") ++ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" "$tempfile" ++ cat "$tempfile" > "$binary" ++ rm "$tempfile" + # This way dbg file gets a .gnu_debuglink section (doesn't matter where + # it's pointing), and its contents pass the CRC32 check + @@ -183,6 +167,31 @@ index b04426c..4cc9db6 100644 + fi + done < <(find . -type f -perm -u+w -print0 2>/dev/null) +- # copy debug symbols to debug directory +- mkdir -p "$dbgdir/${binary%/*}" +- objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" +- local tempfile=$(mktemp "$binary.XXXXXX") +- objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" "$tempfile" +- cat "$tempfile" > "$binary" +- rm "$tempfile" +- +- # create any needed hardlinks +- while IFS= read -rd '' file ; do +- if [[ "${binary}" -ef "${file}" && ! -f "$dbgdir/${file}.debug" ]]; then +- mkdir -p "$dbgdir/${file%/*}" +- ln "$dbgdir/${binary}.debug" "$dbgdir/${file}.debug" +- fi +- done < <(find . -type f -perm -u+w -print0 2>/dev/null) +- +- if [[ -n "$bid" ]]; then +- local target +- mkdir -p "$dbgdir/.build-id/${bid:0:2}" +- +- target="../../../../../${binary#./}" +- target="${target/..\/..\/usr\/lib\/}" +- target="${target/..\/usr\/}" +- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}" +- - target="../../${binary#./}.debug" - ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug" fi @@ -190,9 +199,9 @@ index b04426c..4cc9db6 100644 + ;; + esac - strip $@ "$binary" - } -@@ -106,15 +104,84 @@ tidy_strip() { + local tempfile=$(mktemp "$binary.XXXXXX") + if strip "$@" "$binary" -o "$tempfile"; then +@@ -123,17 +124,86 @@ tidy_strip() { if check_option "debug" "y"; then @@ -213,6 +222,9 @@ index b04426c..4cc9db6 100644 + -o -type f -executable ! -name '*.dll' ! -name '*.exe' ! -name '*.so' ! -name '*.so.[0-9]*' ! -name '*.oct' ! -name '*.cmxs' ! -name '*.a' ! -name '*.la' ! -name '*.lib' ! -name '*.exe.manifest' ! -name '*.exe.config' ! -name '*.dll.config' ! -name '*.mdb' ! -name '*-config' ! -name '*.csh' ! -name '*.sh' ! -name '*.pl' ! -name '*.pm' ! -name '*.py' ! -name '*.rb' ! -name '*.tcl' -print0 | \ + while IFS= read -d $'\0' binary + do + local STRIPLTO=0 +- case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in +- *Type:*'DYN (Shared object file)'*) # Libraries (.so) or Relocatable binaries + # Skip thin archives from stripping + case "${binary##*/}" in + *.a) @@ -273,12 +285,13 @@ index b04426c..4cc9db6 100644 + esac + chmod 0755 "${binary}"; + - case "$(@FILECMD@ -bi "$binary")" in ++ case "$(@FILECMD@ -bi "$binary")" in + *application/x-dosexec*) # Windows executables and dlls + strip_flags="$STRIP_SHARED";; - *application/x-sharedlib*) # Libraries (.so) ++ *application/x-sharedlib*) # Libraries (.so) strip_flags="$STRIP_SHARED";; - *application/x-archive*) # Libraries (.a) + *Type:*'EXEC (Executable file)'*) # Binaries + strip_flags="$STRIP_BINARIES";; diff --git a/scripts/libmakepkg/utils_fixed_path.sh.in b/scripts/libmakepkg/utils_fixed_path.sh.in new file mode 100644 index 0000000..e3a06bc @@ -320,7 +333,7 @@ index 0000000..e3a06bc + done +fi diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in -index c9e381d..86616de 100644 +index e58edfa..6c8446b 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1,4 +1,4 @@ @@ -328,8 +341,8 @@ index c9e381d..86616de 100644 +#!/usr/bin/env bash # # makepkg - make packages compatible for use with pacman - # @configure_input@ -@@ -27,7 +27,7 @@ + # +@@ -26,7 +26,7 @@ # makepkg uses quite a few external programs during its execution. You # need to have at least the following installed for makepkg to function: @@ -338,7 +351,7 @@ index c9e381d..86616de 100644 # gettext, gpg, grep, gzip, sed, tput (ncurses), xz # gettext initialization -@@ -60,7 +60,6 @@ FORCE=0 +@@ -59,7 +59,6 @@ FORCE=0 GENINTEG=0 HOLDVER=0 IGNOREARCH=0 @@ -346,7 +359,7 @@ index c9e381d..86616de 100644 INSTALL=0 LOGGING=0 NEEDED=0 -@@ -106,10 +105,9 @@ done +@@ -105,10 +104,9 @@ done trap_exit() { local signal=$1; shift @@ -360,7 +373,7 @@ index c9e381d..86616de 100644 [[ -n $srclinks ]] && rm -rf "$srclinks" # unset the trap for this signal, and then call the default handler -@@ -124,11 +122,6 @@ trap_exit() { +@@ -123,11 +121,6 @@ trap_exit() { clean_up() { local EXIT_CODE=$? @@ -372,7 +385,7 @@ index c9e381d..86616de 100644 if [[ -p $logpipe ]]; then rm "$logpipe" fi -@@ -138,7 +131,7 @@ clean_up() { +@@ -137,7 +130,7 @@ clean_up() { # If it's a clean exit and -c/--clean has been passed... msg "$(gettext "Cleaning up...")" @@ -381,7 +394,7 @@ index c9e381d..86616de 100644 if [[ -n $pkgbase ]]; then local fullver=$(get_full_version) # Can't do this unless the BUILDSCRIPT has been sourced. -@@ -180,11 +173,6 @@ clean_up() { +@@ -179,11 +172,6 @@ clean_up() { fi } @@ -393,19 +406,18 @@ index c9e381d..86616de 100644 # Automatically update pkgver variable if a pkgver() function is provided # Re-sources the PKGBUILD afterwards to allow for other variables that use $pkgver update_pkgver() { -@@ -229,11 +217,6 @@ run_pacman() { - cmd=("$PACMAN_PATH" "$@") - else - cmd=("$PACMAN_PATH" "${PACMAN_OPTS[@]}" "$@") -- if type -p sudo >/dev/null; then +@@ -237,10 +225,6 @@ run_pacman() { + else + cmd=("${PACMAN_AUTH[@]}" "${cmd[@]}") + fi +- elif type -p sudo >/dev/null; then - cmd=(sudo "${cmd[@]}") - else -- cmd=(su root -c "$(printf '%q ' "${cmd[@]}")") -- fi +- cmd=(su root -c "$cmdescape") + fi local lockfile="$(pacman-conf DBPath)/db.lck" while [[ -f $lockfile ]]; do - local timer=0 -@@ -432,7 +415,7 @@ run_function() { +@@ -440,7 +424,7 @@ run_function() { $pkgfunc &>"$logpipe" @@ -414,7 +426,7 @@ index c9e381d..86616de 100644 rm "$logpipe" else "$pkgfunc" -@@ -460,7 +443,7 @@ find_libdepends() { +@@ -468,7 +452,7 @@ find_libdepends() { sodepends=0 for d in "${depends[@]}"; do @@ -423,7 +435,7 @@ index c9e381d..86616de 100644 sodepends=1 break fi -@@ -471,28 +454,33 @@ find_libdepends() { +@@ -479,28 +463,33 @@ find_libdepends() { return 0 fi @@ -468,7 +480,7 @@ index c9e381d..86616de 100644 fi done done < <(find "$pkgdir" -type f -perm -u+x -print0) -@@ -500,7 +488,7 @@ find_libdepends() { +@@ -508,7 +497,7 @@ find_libdepends() { local libdepends v for d in "${depends[@]}"; do case "$d" in @@ -477,9 +489,9 @@ index c9e381d..86616de 100644 if [[ ${libdeps[$d]} ]]; then for v in ${libdeps[$d]}; do libdepends+=("$d=$v") -@@ -525,32 +513,23 @@ find_libprovides() { - for p in "${provides[@]}"; do +@@ -534,30 +523,23 @@ find_libprovides() { missing=0 + versioned_provides=() case "$p" in - *.so) - mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort) @@ -494,7 +506,6 @@ index c9e381d..86616de 100644 - 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" -- libprovides+=("$p") - continue - fi - @@ -504,10 +515,9 @@ index c9e381d..86616de 100644 - # extract the library major version - local soversion="${sofile##*\.so\.}" - -- libprovides+=("${p}=${soversion}-${soarch}") +- versioned_provides+=("${p}=${soversion}-${soarch}") - else - warning "$(gettext "Library listed in %s is not a shared object: %s")" "'provides'" "$p" -- libprovides+=("$p") - fi + # get the library architecture (32 or 64 bit) + local soarch=$(LC_ALL=C objdump -a "$fn" | sed -n 's/.*file format.*pei-\(i386\|x86-64\)/\1/p') @@ -520,11 +530,11 @@ index c9e381d..86616de 100644 + ;; + esac + -+ libprovides+=("${p}=${soarch}") ++ versioned_provides+=("${p}=${soarch}") done else - libprovides+=("$p") -@@ -589,7 +568,6 @@ write_pkginfo() { + missing=1 +@@ -597,7 +579,6 @@ write_pkginfo() { merge_arch_attrs printf "# Generated by makepkg %s\n" "$makepkg_version" @@ -532,7 +542,7 @@ index c9e381d..86616de 100644 write_kv_pair "pkgname" "$pkgname" write_kv_pair "pkgbase" "$pkgbase" -@@ -739,7 +717,7 @@ create_debug_package() { +@@ -750,7 +731,7 @@ create_debug_package() { local pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@" # check if we have any debug symbols to package @@ -541,7 +551,7 @@ index c9e381d..86616de 100644 return 0 fi -@@ -928,6 +906,11 @@ restore_package_variables() { +@@ -939,6 +920,11 @@ restore_package_variables() { run_single_packaging() { local pkgdir="$pkgdirbase/$pkgname" @@ -553,7 +563,7 @@ index c9e381d..86616de 100644 mkdir "$pkgdir" if [[ -n $1 ]] || (( PKGFUNC )); then run_package $1 -@@ -1021,12 +1004,16 @@ if ! type -p gettext >/dev/null; then +@@ -1032,12 +1018,16 @@ if ! type -p gettext >/dev/null; then gettext() { printf "%s\n" "$@" } @@ -571,7 +581,7 @@ index c9e381d..86616de 100644 OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg' 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist' -@@ -1060,7 +1047,6 @@ while true; do +@@ -1071,7 +1061,6 @@ while true; do -d|--nodeps) NODEPS=1 ;; -e|--noextract) NOEXTRACT=1 ;; -f|--force) FORCE=1 ;; @@ -579,7 +589,7 @@ index c9e381d..86616de 100644 # generating integrity checks does not depend on architecture -g|--geninteg) BUILDPKG=0 GENINTEG=1 IGNOREARCH=1;; --holdver) HOLDVER=1 ;; -@@ -1175,19 +1161,6 @@ if (( LOGGING )) && ! ensure_writable_dir "LOGDEST" "$LOGDEST"; then +@@ -1186,19 +1175,6 @@ if (( LOGGING )) && ! ensure_writable_dir "LOGDEST" "$LOGDEST"; then exit $E_FS_PERMISSIONS fi @@ -599,7 +609,7 @@ index c9e381d..86616de 100644 unset pkgname "${pkgbuild_schema_strings[@]}" "${pkgbuild_schema_arrays[@]}" unset "${known_hash_algos[@]/%/sums}" unset -f pkgver prepare build check package "${!package_@}" -@@ -1308,29 +1281,6 @@ if (( ! PKGVERFUNC )); then +@@ -1319,29 +1295,6 @@ if (( ! PKGVERFUNC )); then check_build_status fi @@ -629,7 +639,7 @@ index c9e381d..86616de 100644 msg "$(gettext "Making package: %s")" "$pkgbase $basever ($(date +%c))" # if we are creating a source-only package, go no further -@@ -1354,7 +1304,7 @@ if (( SOURCEONLY )); then +@@ -1365,7 +1318,7 @@ if (( SOURCEONLY )); then check_source_integrity all cd_safe "$startdir" @@ -638,7 +648,7 @@ index c9e381d..86616de 100644 if [[ $SIGNPKG = 'y' ]]; then msg "$(gettext "Signing package...")" -@@ -1404,6 +1354,9 @@ mkdir -p "$srcdir" +@@ -1415,6 +1368,9 @@ mkdir -p "$srcdir" chmod a-s "$srcdir" cd_safe "$srcdir" @@ -648,7 +658,7 @@ index c9e381d..86616de 100644 if (( !REPKG )); then if (( NOEXTRACT && ! VERIFYSOURCE )); then warning "$(gettext "Using existing %s tree")" "\$srcdir/" -@@ -1456,17 +1409,25 @@ else +@@ -1467,15 +1423,23 @@ else cd_safe "$startdir" fi @@ -666,23 +676,21 @@ index c9e381d..86616de 100644 + else + run_split_packaging + fi -+ -+ create_debug_package - create_package_signatures || exit $E_PRETTY_BAD_PRIVACY - fi +- create_package_signatures || exit $E_PRETTY_BAD_PRIVACY +-fi ++ create_debug_package -# if inhibiting archive creation, go no further -if (( NOARCHIVE )); then - msg "$(gettext "Package directory is ready.")" - exit $E_OK --fi -- - msg "$(gettext "Finished making: %s")" "$pkgbase $basever ($(date +%c))" ++ create_package_signatures || exit $E_PRETTY_BAD_PRIVACY + fi - install_package && exit $E_OK || exit $E_INSTALL_FAILED + msg "$(gettext "Finished making: %s")" "$pkgbase $basever ($(date +%c))" diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in -index af3b17c..d3e2e13 100644 +index 550d9f9..c1cb200 100644 --- a/scripts/pacman-db-upgrade.sh.in +++ b/scripts/pacman-db-upgrade.sh.in @@ -1,4 +1,4 @@ @@ -690,8 +698,8 @@ index af3b17c..d3e2e13 100644 +#!/usr/bin/env bash # # pacman-db-upgrade - upgrade the local pacman db to a newer format - # @configure_input@ -@@ -79,9 +79,13 @@ resolve_dir() { + # +@@ -78,9 +78,13 @@ resolve_dir() { # PROGRAM START # determine whether we have gettext; make it a no-op if we do not @@ -707,7 +715,7 @@ index af3b17c..d3e2e13 100644 } fi -@@ -138,7 +142,7 @@ lockfile="${dbroot}/db.lck" +@@ -137,7 +141,7 @@ lockfile="${dbroot}/db.lck" # make sure pacman isn't running if [[ -f $lockfile ]]; then @@ -717,7 +725,7 @@ index af3b17c..d3e2e13 100644 # do not let pacman run while we do this touch "$lockfile" diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in -index 3962a57..1bdc5d7 100644 +index 5034264..c923244 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -1,4 +1,4 @@ @@ -726,7 +734,7 @@ index 3962a57..1bdc5d7 100644 # # pacman-key - manages pacman's keyring # Based on apt-key, from Debian -@@ -31,6 +31,7 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'} +@@ -30,6 +30,7 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'} # Import libmakepkg source "$LIBRARY"/util/message.sh source "$LIBRARY"/util/parseopts.sh @@ -734,7 +742,7 @@ index 3962a57..1bdc5d7 100644 # Options ADD=0 -@@ -237,7 +238,7 @@ check_keyring() { +@@ -265,7 +266,7 @@ check_keyring() { exit 1 fi @@ -743,7 +751,7 @@ index 3962a57..1bdc5d7 100644 if ! grep -q "^[[:space:]]*lock-never[[:space:]]*$" ${PACMAN_KEYRING_DIR}/gpg.conf &>/dev/null; then error "$(gettext "You do not have sufficient permissions to run this command.")" msg "$(gettext "Use '%s' to correct the keyring permissions.")" "pacman-key --init" -@@ -390,7 +391,7 @@ import_trustdb() { +@@ -428,7 +429,7 @@ import_trustdb() { local ret=0 for importdir in "$@"; do if [[ -f "${importdir}/trustdb.gpg" ]]; then @@ -752,7 +760,7 @@ index 3962a57..1bdc5d7 100644 "${GPG_PACMAN[@]}" --import-ownertrust - if (( PIPESTATUS )); then error "$(gettext "%s could not be imported.")" "${importdir}/trustdb.gpg" -@@ -530,10 +531,14 @@ updatedb() { +@@ -603,10 +604,14 @@ updatedb() { fi } @@ -770,7 +778,7 @@ index 3962a57..1bdc5d7 100644 } fi -@@ -596,11 +601,6 @@ if ! type -p gpg >/dev/null; then +@@ -670,11 +675,6 @@ if ! type -p gpg >/dev/null; then exit 1 fi @@ -783,7 +791,7 @@ index 3962a57..1bdc5d7 100644 if [[ ! -r "${CONFIG}" ]]; then error "$(gettext "%s configuration file '%s' not found.")" "pacman" "$CONFIG" diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in -index b0b3505..d8a539e 100644 +index d393839..a231699 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -1,4 +1,4 @@ @@ -793,14 +801,14 @@ index b0b3505..d8a539e 100644 # repo-add - add a package to a given repo database file # repo-remove - remove a package entry from a given repo database file @@ -46,6 +46,7 @@ PREVENT_DOWNGRADE=0 - # Import libmakepkg + source "$LIBRARY"/util/compress.sh source "$LIBRARY"/util/message.sh +source "$LIBRARY"/utils_fixed_path.sh # ensure we have a sane umask set umask 0022 -@@ -571,9 +572,13 @@ clean_up() { +@@ -562,9 +563,13 @@ clean_up() { # PROGRAM START # determine whether we have gettext; make it a no-op if we do not @@ -817,7 +825,7 @@ index b0b3505..d8a539e 100644 fi diff --git a/scripts/wrapper.sh.in b/scripts/wrapper.sh.in -index 2a041d5..5c9f111 100644 +index 1b28b84..504db36 100644 --- a/scripts/wrapper.sh.in +++ b/scripts/wrapper.sh.in @@ -1,4 +1,4 @@ @@ -827,10 +835,10 @@ index 2a041d5..5c9f111 100644 # @PROGNAME@ - a wrapper for running the real @PROGNAME@ in the source tree # diff --git a/src/pacman/callback.c b/src/pacman/callback.c -index 548e2df..a46f406 100644 +index 75c74f8..2f07512 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c -@@ -98,8 +98,11 @@ static int64_t get_update_timediff(int first_call) +@@ -153,8 +153,11 @@ static int64_t get_update_timediff(int first_call) static void fill_progress(const int bar_percent, const int disp_percent, const int proglen) { @@ -845,7 +853,7 @@ index 548e2df..a46f406 100644 static int lasthash = 0, mouth = 0; int i; diff --git a/src/pacman/check.c b/src/pacman/check.c -index 6b4fdcb..543dd31 100644 +index 091055f..188f515 100644 --- a/src/pacman/check.c +++ b/src/pacman/check.c @@ -75,6 +75,7 @@ static int check_file_permissions(const char *pkgname, const char *filepath, @@ -865,10 +873,10 @@ index 6b4fdcb..543dd31 100644 /* mode */ fsmode = st->st_mode & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO); diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c -index d58c428..c5d629c 100644 +index e398855..36c3b5e 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c -@@ -1082,7 +1082,9 @@ static void cl_to_log(int argc, char *argv[]) +@@ -1086,7 +1086,9 @@ static void cl_to_log(int argc, char *argv[]) int main(int argc, char *argv[]) { int ret = 0; @@ -876,9 +884,9 @@ index d58c428..c5d629c 100644 uid_t myuid = getuid(); +#endif + console_cursor_hide(); install_segv_handler(); - -@@ -1125,11 +1127,13 @@ int main(int argc, char *argv[]) +@@ -1130,11 +1132,13 @@ int main(int argc, char *argv[]) cleanup(ret); } @@ -890,13 +898,13 @@ index d58c428..c5d629c 100644 } +#endif - if(config->sysroot && (chroot(config->sysroot) != 0 || chdir("/") != 0)) { - pm_printf(ALPM_LOG_ERROR, + /* we support reading targets from stdin if a cmdline parameter is '-' */ + if(alpm_list_find_str(pm_targets, "-")) { diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py -index ed6eab6..5ce752e 100644 +index 94b0930..f008f22 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py -@@ -234,19 +234,6 @@ class pmtest(object): +@@ -239,19 +239,6 @@ class pmtest(object): vprint("\tpacman %s" % self.args) cmd = [] @@ -916,7 +924,7 @@ index ed6eab6..5ce752e 100644 if pacman["gdb"]: cmd.extend(["libtool", "execute", "gdb", "--args"]) if pacman["valgrind"]: -@@ -287,8 +274,10 @@ class pmtest(object): +@@ -294,8 +281,10 @@ class pmtest(object): # Change to the tmp dir before running pacman, so that local package # archives are made available more easily. time_start = time.time() diff --git a/pacman/0002-More-debugging-info.patch b/pacman/0002-More-debugging-info.patch index 022ca403..835860e3 100644 --- a/pacman/0002-More-debugging-info.patch +++ b/pacman/0002-More-debugging-info.patch @@ -1,4 +1,4 @@ -From 0ebccf0918aa77de75972754d43e02b717e308cd Mon Sep 17 00:00:00 2001 +From 199cda753aa669f0d3f547a647aa107d2c879a05 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:47:49 +0200 Subject: [PATCH 02/N] More debugging info @@ -8,10 +8,10 @@ Subject: [PATCH 02/N] More debugging info 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c -index 00a6acb..6f6cd2e 100644 +index 299d287..533ed49 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c -@@ -303,6 +303,23 @@ int _alpm_unpack_single(alpm_handle_t *handle, const char *archive, +@@ -304,6 +304,23 @@ int _alpm_unpack_single(alpm_handle_t *handle, const char *archive, return ret; } @@ -35,7 +35,7 @@ index 00a6acb..6f6cd2e 100644 /** Unpack a list of files in an archive. * @param handle the context handle * @param path the archive to unpack -@@ -655,7 +672,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], +@@ -663,7 +680,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], _alpm_reset_signals(); execv(cmd, argv); /* execv only returns if there was an error */ @@ -44,7 +44,7 @@ index 00a6acb..6f6cd2e 100644 exit(1); } else { /* this code runs for the parent only (wait on the child) */ -@@ -744,7 +761,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], +@@ -752,7 +769,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], if(WIFEXITED(status)) { _alpm_log(handle, ALPM_LOG_DEBUG, "call to waitpid succeeded\n"); if(WEXITSTATUS(status) != 0) { diff --git a/pacman/0003-Core-update.patch b/pacman/0003-Core-update.patch index 76474e76..44f6a725 100644 --- a/pacman/0003-Core-update.patch +++ b/pacman/0003-Core-update.patch @@ -1,4 +1,4 @@ -From 16ca714fdcce63c7bc5b51616ccb4a56e19ec537 Mon Sep 17 00:00:00 2001 +From c9f803da1263c918c691c6b330acc747ac2baf95 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:52:38 +0200 Subject: [PATCH 03/N] Core update @@ -6,16 +6,16 @@ Subject: [PATCH 03/N] Core update --- lib/libalpm/alpm.h | 9 +++ lib/libalpm/package.c | 16 +++++ - lib/libalpm/sync.c | 24 +++++++ - src/pacman/sighandler.c | 14 ++++ + lib/libalpm/sync.c | 25 +++++++ + src/pacman/sighandler.c | 16 ++++- src/pacman/sync.c | 140 ++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 203 insertions(+) + 5 files changed, 205 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h -index fd207b5..2219f5e 100644 +index a5f4a6a..c65bc6e 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h -@@ -1506,6 +1506,15 @@ int alpm_trans_release(alpm_handle_t *handle); +@@ -2805,6 +2805,15 @@ int alpm_trans_release(alpm_handle_t *handle); * @return 0 on success, -1 on error (pm_errno is set accordingly) */ int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade); @@ -32,10 +32,10 @@ index fd207b5..2219f5e 100644 /** Add a package to the transaction. * If the package was loaded by alpm_pkg_load(), it will be freed upon diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c -index 510d812..ed46c28 100644 +index f837f84..8f592ad 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c -@@ -793,3 +793,19 @@ int SYMEXPORT alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg) +@@ -803,3 +803,19 @@ int SYMEXPORT alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg) return 0; } @@ -56,13 +56,14 @@ index 510d812..ed46c28 100644 +} +#endif diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c -index a596945..bb95570 100644 +index 36ad624..88f1fc6 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c -@@ -201,7 +201,12 @@ static alpm_list_t *check_replacers(alpm_handle_t *handle, alpm_pkg_t *lpkg, +@@ -197,7 +197,13 @@ static alpm_list_t *check_replacers(alpm_handle_t *handle, alpm_pkg_t *lpkg, + return replacers; } - /** Search for packages to upgrade and add them to the transaction. */ ++/** Search for packages to upgrade and add them to the transaction. */ +#ifdef __MSYS__ +static +int SYMEXPORT do_alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade, int core_update) @@ -72,7 +73,7 @@ index a596945..bb95570 100644 { alpm_list_t *i, *j; alpm_trans_t *trans; -@@ -215,6 +220,13 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) +@@ -211,6 +217,13 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) { alpm_pkg_t *lpkg = i->data; @@ -86,7 +87,7 @@ index a596945..bb95570 100644 if(alpm_pkg_find(trans->remove, lpkg->name)) { _alpm_log(handle, ALPM_LOG_DEBUG, "%s is marked for removal -- skipping\n", lpkg->name); continue; -@@ -256,6 +268,18 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) +@@ -252,6 +265,18 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) return 0; } @@ -102,11 +103,11 @@ index a596945..bb95570 100644 +} +#endif + - /** Find group members across a list of databases. - * If a member exists in several databases, only the first database is used. - * IgnorePkg is also handled. + alpm_list_t SYMEXPORT *alpm_find_group_pkgs(alpm_list_t *dbs, + const char *name) + { diff --git a/src/pacman/sighandler.c b/src/pacman/sighandler.c -index 46e6481..c152eea 100644 +index ff54dce..15f4350 100644 --- a/src/pacman/sighandler.c +++ b/src/pacman/sighandler.c @@ -21,6 +21,10 @@ @@ -120,17 +121,20 @@ index 46e6481..c152eea 100644 #include #include "conf.h" -@@ -53,6 +57,9 @@ static void _reset_handler(int signum) +@@ -53,8 +57,11 @@ static void _reset_handler(int signum) */ static void soft_interrupt_handler(int signum) { +- console_cursor_move_end(); +#ifdef __MSYS__ + struct termios term; +#endif + ++ console_cursor_move_end(); if(signum == SIGINT) { const char msg[] = "\nInterrupt signal received\n"; xwrite(STDERR_FILENO, msg, ARRAYSIZE(msg) - 1); -@@ -65,6 +72,13 @@ static void soft_interrupt_handler(int signum) +@@ -69,6 +76,13 @@ static void soft_interrupt_handler(int signum) return; } alpm_unlock(config->handle); @@ -145,7 +149,7 @@ index 46e6481..c152eea 100644 xwrite(STDOUT_FILENO, "\n", 1); _Exit(128 + signum); diff --git a/src/pacman/sync.c b/src/pacman/sync.c -index 0473f4e..0d39a37 100644 +index b6da1a3..2dd8e18 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -28,6 +28,12 @@ @@ -161,7 +165,7 @@ index 0473f4e..0d39a37 100644 #include #include -@@ -680,8 +686,134 @@ cleanup: +@@ -689,8 +695,134 @@ cleanup: return ret; } @@ -296,7 +300,7 @@ index 0473f4e..0d39a37 100644 int retval = 0; alpm_list_t *i; -@@ -704,6 +836,14 @@ static int sync_trans(alpm_list_t *targets) +@@ -713,6 +845,14 @@ static int sync_trans(alpm_list_t *targets) } if(config->op_s_upgrade) { diff --git a/pacman/0004-Remove-ldconfig.patch b/pacman/0004-Remove-ldconfig.patch index da189248..3e60f0b1 100644 --- a/pacman/0004-Remove-ldconfig.patch +++ b/pacman/0004-Remove-ldconfig.patch @@ -1,4 +1,4 @@ -From 66df8638f4b4b83905b939027de4fdae990c666e Mon Sep 17 00:00:00 2001 +From 4f81dae3a063f8ead1b33fa40c6461dffef9fc3f Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:53:34 +0200 Subject: [PATCH 04/N] Remove ldconfig @@ -22,10 +22,10 @@ Subject: [PATCH 04/N] Remove ldconfig delete mode 100644 test/pacman/tests/ldconfig003.py diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c -index 1e330ca..d30777a 100644 +index f0af886..174e051 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c -@@ -663,7 +663,10 @@ cleanup: +@@ -657,7 +657,10 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, int _alpm_upgrade_packages(alpm_handle_t *handle) { size_t pkg_count, pkg_current; @@ -37,7 +37,7 @@ index 1e330ca..d30777a 100644 alpm_list_t *targ; alpm_trans_t *trans = handle->trans; -@@ -686,18 +689,22 @@ int _alpm_upgrade_packages(alpm_handle_t *handle) +@@ -680,18 +683,22 @@ int _alpm_upgrade_packages(alpm_handle_t *handle) /* something screwed up on the commit, abort the trans */ trans->state = STATE_INTERRUPTED; handle->pm_errno = ALPM_ERR_TRANS_ABORT; @@ -61,10 +61,10 @@ index 1e330ca..d30777a 100644 return ret; } diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c -index e891550..e0617cf 100644 +index de39724..e7d9cc2 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c -@@ -773,18 +773,22 @@ int _alpm_remove_packages(alpm_handle_t *handle, int run_ldconfig) +@@ -765,18 +765,22 @@ int _alpm_remove_packages(alpm_handle_t *handle, int run_ldconfig) if(_alpm_remove_single_package(handle, pkg, NULL, targ_count, pkg_count) == -1) { handle->pm_errno = ALPM_ERR_TRANS_ABORT; @@ -88,10 +88,10 @@ index e891550..e0617cf 100644 return ret; } diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c -index 6f6cd2e..87c3acd 100644 +index 533ed49..fecee3a 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c -@@ -788,6 +788,7 @@ cleanup: +@@ -796,6 +796,7 @@ cleanup: return retval; } @@ -99,7 +99,7 @@ index 6f6cd2e..87c3acd 100644 /** Run ldconfig in a chroot. * @param handle the context handle * @return 0 on success, 1 on error -@@ -811,6 +812,7 @@ int _alpm_ldconfig(alpm_handle_t *handle) +@@ -819,6 +820,7 @@ int _alpm_ldconfig(alpm_handle_t *handle) return 0; } @@ -118,7 +118,7 @@ index d261a04..0000000 -# Simply appends a line to /etc/ld.so.cache if called. -echo "ldconfig called" >> /etc/ld.so.cache diff --git a/test/pacman/meson.build b/test/pacman/meson.build -index 4e87b4f..dcc7800 100644 +index 0e75b3e..6b79400 100644 --- a/test/pacman/meson.build +++ b/test/pacman/meson.build @@ -79,9 +79,6 @@ pacman_tests = [ @@ -131,7 +131,7 @@ index 4e87b4f..dcc7800 100644 'tests/mode001.py', 'tests/mode002.py', 'tests/mode003.py', -@@ -336,7 +333,6 @@ foreach input : pacman_tests +@@ -354,7 +351,6 @@ foreach input : pacman_tests join_paths(meson.current_source_dir(), 'pactest.py'), '--scriptlet-shell', get_option('scriptlet-shell'), '--bindir', meson.build_root(), @@ -140,7 +140,7 @@ index 4e87b4f..dcc7800 100644 join_paths(meson.current_source_dir(), input) ] diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py -index bd53b05..ac21840 100755 +index 184f94d..5e042fd 100755 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -104,9 +104,6 @@ def create_parser(): @@ -153,7 +153,7 @@ index bd53b05..ac21840 100755 parser.add_option("--review", action = "store_true", dest = "review", default = False, help = "review test files, test output, and saved logs") -@@ -145,7 +142,6 @@ if __name__ == "__main__": +@@ -146,7 +143,6 @@ if __name__ == "__main__": env.pacman["valgrind"] = opts.valgrind env.pacman["manual-confirm"] = opts.manualconfirm env.pacman["scriptlet-shell"] = opts.scriptletshell @@ -162,10 +162,10 @@ index bd53b05..ac21840 100755 env.config["nls"] = not opts.missing_nls env.config["curl"] = not opts.missing_curl diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py -index 5ce752e..a0cc61b 100644 +index f008f22..e6a3fbd 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py -@@ -129,12 +129,10 @@ class pmtest(object): +@@ -133,12 +133,10 @@ class pmtest(object): logdir = os.path.join(self.root, os.path.dirname(util.LOGFILE)) etcdir = os.path.join(self.root, os.path.dirname(util.PACCONF)) bindir = os.path.join(self.root, "bin") @@ -179,7 +179,7 @@ index 5ce752e..a0cc61b 100644 for sys_dir in sys_dirs: if not os.path.isdir(sys_dir): vprint("\t%s" % sys_dir[len(self.root)+1:]) -@@ -143,10 +141,6 @@ class pmtest(object): +@@ -147,10 +145,6 @@ class pmtest(object): shutil.copy("/bin/sh", bindir) if shell != "bin/sh": shutil.copy("/bin/sh", os.path.join(self.root, shell)) diff --git a/pacman/0005-Change-the-epoch-separator.patch b/pacman/0005-Change-the-epoch-separator.patch index 5d2a1703..7cea49e3 100644 --- a/pacman/0005-Change-the-epoch-separator.patch +++ b/pacman/0005-Change-the-epoch-separator.patch @@ -1,4 +1,4 @@ -From e4c5d56bfa4ca985b74563e26c00b6fd2c01807a Mon Sep 17 00:00:00 2001 +From 5996ca7d3d9a06e412b8fbbc24a198cc1708c5a9 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:54:23 +0200 Subject: [PATCH 05/N] Change the epoch separator @@ -9,7 +9,7 @@ Subject: [PATCH 05/N] Change the epoch separator 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/version.c b/lib/libalpm/version.c -index a518a69..66b1db1 100644 +index 00cc779..6b9d05d 100644 --- a/lib/libalpm/version.c +++ b/lib/libalpm/version.c @@ -50,7 +50,11 @@ static void parseEVR(char *evr, const char **ep, const char **vp, @@ -24,7 +24,7 @@ index a518a69..66b1db1 100644 epoch = evr; *s++ = '\0'; version = s; -@@ -250,7 +254,7 @@ int SYMEXPORT alpm_pkg_vercmp(const char *a, const char *b) +@@ -236,7 +240,7 @@ int SYMEXPORT alpm_pkg_vercmp(const char *a, const char *b) return 0; } @@ -34,7 +34,7 @@ index a518a69..66b1db1 100644 * easier to just run it all through the same code. */ full1 = strdup(a); diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in -index 93bae4e..17f4f6f 100644 +index c52b3eb..2650407 100644 --- a/scripts/libmakepkg/util/pkgbuild.sh.in +++ b/scripts/libmakepkg/util/pkgbuild.sh.in @@ -164,7 +164,11 @@ get_pkgbuild_all_split_attributes() { diff --git a/pacman/0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch b/pacman/0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch index 9d73b188..815ab2c5 100644 --- a/pacman/0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch +++ b/pacman/0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch @@ -1,4 +1,4 @@ -From e30c5a2fe51c570a93ea691033d4260426fb7733 Mon Sep 17 00:00:00 2001 +From 6dd4d53cb54a8dcd6b849f660fa9ebd2fcc186f0 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 29 Jun 2017 11:54:48 +0200 Subject: [PATCH 06/N] makepkg: avoid creating .tar files with extended @@ -23,10 +23,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in -index 86616de..6baeddf 100644 +index 6c8446b..7ad3a0e 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in -@@ -697,7 +697,7 @@ create_package() { +@@ -711,7 +711,7 @@ create_package() { msg2 "$(gettext "Compressing package...")" # TODO: Maybe this can be set globally for robustness shopt -s -o pipefail diff --git a/pacman/0007-pacman-libalpm-ignore-file-conflicts-for-foo.exe-foo.patch b/pacman/0007-pacman-libalpm-ignore-file-conflicts-for-foo.exe-foo.patch index 6e3e8afa..1df5bf36 100644 --- a/pacman/0007-pacman-libalpm-ignore-file-conflicts-for-foo.exe-foo.patch +++ b/pacman/0007-pacman-libalpm-ignore-file-conflicts-for-foo.exe-foo.patch @@ -1,4 +1,4 @@ -From c82f2a24e92f71badcf0236e5aa7971116493519 Mon Sep 17 00:00:00 2001 +From c333d6a418a36cd9851ea97456d0988f20c4f00b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:55:24 +0200 Subject: [PATCH 07/N] pacman/libalpm: ignore file conflicts for foo.exe -> @@ -14,10 +14,10 @@ old package and ignore the conflict. 1 file changed, 26 insertions(+) diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c -index 7e986f1..c5d006b 100644 +index b471bf2..f7fa9d8 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c -@@ -535,6 +535,32 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, +@@ -521,6 +521,32 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, _alpm_log(handle, ALPM_LOG_DEBUG, "checking possible conflict: %s\n", path); diff --git a/pacman/0008-Change-default-answer-of-all-queries-to-yes.patch b/pacman/0008-Change-default-answer-of-all-queries-to-yes.patch index 5198788b..bfc88711 100644 --- a/pacman/0008-Change-default-answer-of-all-queries-to-yes.patch +++ b/pacman/0008-Change-default-answer-of-all-queries-to-yes.patch @@ -1,4 +1,4 @@ -From 65cf1b7e2d10f35e0d0a00c3939e6ee71e12dba5 Mon Sep 17 00:00:00 2001 +From 53b98e1abfddc6c560252e2cab90bd4076fa0ce7 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 10 Feb 2018 22:39:35 +0100 Subject: [PATCH 08/N] Change default answer of all queries to yes @@ -14,10 +14,10 @@ See https://github.com/Alexpux/MSYS2-packages/issues/1141 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pacman/callback.c b/src/pacman/callback.c -index a46f406..3d2fb44 100644 +index 2f07512..d360ae5 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c -@@ -398,12 +398,12 @@ void cb_question(alpm_question_t *question) +@@ -482,12 +482,12 @@ void cb_question(void *ctx, alpm_question_t *question) /* print conflict only if it contains new information */ if(strcmp(q->conflict->package1, q->conflict->reason->name) == 0 || strcmp(q->conflict->package2, q->conflict->reason->name) == 0) { @@ -32,7 +32,7 @@ index a46f406..3d2fb44 100644 q->conflict->package1, q->conflict->package2, q->conflict->reason->name, -@@ -427,7 +427,7 @@ void cb_question(alpm_question_t *question) +@@ -511,7 +511,7 @@ void cb_question(void *ctx, alpm_question_t *question) count)); list_display(" ", namelist, getcols()); printf("\n"); @@ -42,7 +42,7 @@ index a46f406..3d2fb44 100644 "Do you want to skip the above packages for this upgrade?", count)); diff --git a/src/pacman/remove.c b/src/pacman/remove.c -index 9920f50..4c70d26 100644 +index e8f4e3e..0c6a2e0 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -140,7 +140,7 @@ int pacman_remove(alpm_list_t *targets) @@ -55,10 +55,10 @@ index 9920f50..4c70d26 100644 goto cleanup; } diff --git a/src/pacman/sync.c b/src/pacman/sync.c -index 0d39a37..41ee123 100644 +index 2dd8e18..a5cc23b 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c -@@ -194,7 +194,7 @@ static int sync_cleancache(int level) +@@ -195,7 +195,7 @@ static int sync_cleancache(int level) } printf(_("removing old packages from cache...\n")); } else { diff --git a/pacman/0009-Use-pipe-instead-of-socket.patch b/pacman/0009-Use-pipe-instead-of-socket.patch index f0be6958..0859f10e 100644 --- a/pacman/0009-Use-pipe-instead-of-socket.patch +++ b/pacman/0009-Use-pipe-instead-of-socket.patch @@ -1,4 +1,4 @@ -From 9d1ea56b893e8460587a0d9f613cf447265647fc Mon Sep 17 00:00:00 2001 +From bd7e96c46082b805482909820110c122647d1ec8 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:56:23 +0200 Subject: [PATCH 09/N] Use pipe instead of socket @@ -8,7 +8,7 @@ Subject: [PATCH 09/N] Use pipe instead of socket 1 file changed, 26 insertions(+) diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c -index 87c3acd..6452eca 100644 +index fecee3a..ce28fd8 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -30,7 +30,9 @@ @@ -20,8 +20,8 @@ index 87c3acd..6452eca 100644 +#endif #include #include - -@@ -481,6 +483,9 @@ static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd, + #include +@@ -483,6 +485,9 @@ static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd, _alpm_cb_io out_cb, void *cb_ctx) { ssize_t nwrite; @@ -31,7 +31,7 @@ index 87c3acd..6452eca 100644 if(*buf_size == 0) { /* empty buffer, ask the callback for more */ -@@ -490,7 +495,20 @@ static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd, +@@ -492,7 +497,20 @@ static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd, } } @@ -52,7 +52,7 @@ index 87c3acd..6452eca 100644 if(nwrite != -1) { /* write was successful, remove the written data from the buffer */ -@@ -622,13 +640,21 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], +@@ -630,13 +648,21 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[], /* Flush open fds before fork() to avoid cloning buffers */ fflush(NULL); diff --git a/pacman/0010-pacman-make-file-list-comparisons-between-packages-c.patch b/pacman/0010-pacman-make-file-list-comparisons-between-packages-c.patch index c896078c..90455bba 100644 --- a/pacman/0010-pacman-make-file-list-comparisons-between-packages-c.patch +++ b/pacman/0010-pacman-make-file-list-comparisons-between-packages-c.patch @@ -1,4 +1,4 @@ -From bb14cd639cef1da7e51b9f2a4351725b3618082a Mon Sep 17 00:00:00 2001 +From 117d01c5445ac34b59877f65cd8fe3c7966a2be5 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:57:25 +0200 Subject: [PATCH 10/N] pacman: make file list comparisons between packages @@ -17,7 +17,7 @@ lead to invalid conflict detection. 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/lib/libalpm/filelist.c b/lib/libalpm/filelist.c -index 4a534b0..34a771a 100644 +index 07239c3..9c044b5 100644 --- a/lib/libalpm/filelist.c +++ b/lib/libalpm/filelist.c @@ -25,6 +25,43 @@ diff --git a/pacman/0011-Translate-MSYS2-specific-messages-into-Japanese.patch b/pacman/0011-Translate-MSYS2-specific-messages-into-Japanese.patch index 4272c3c8..4c860854 100644 --- a/pacman/0011-Translate-MSYS2-specific-messages-into-Japanese.patch +++ b/pacman/0011-Translate-MSYS2-specific-messages-into-Japanese.patch @@ -1,4 +1,4 @@ -From b6a59bd96f1cee3cf3796b2046fb1751acd59bde Mon Sep 17 00:00:00 2001 +From 90ed4dadb89df170b486ec36ff8bb33df94c5d77 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:58:41 +0200 Subject: [PATCH 11/N] Translate MSYS2 specific messages into Japanese @@ -8,10 +8,10 @@ Subject: [PATCH 11/N] Translate MSYS2 specific messages into Japanese 1 file changed, 24 insertions(+) diff --git a/src/pacman/po/ja.po b/src/pacman/po/ja.po -index 40ce7f3..477fd6f 100644 +index d1851ea..60fc8fa 100644 --- a/src/pacman/po/ja.po +++ b/src/pacman/po/ja.po -@@ -1439,6 +1439,30 @@ msgid "'%s' is a file, did you mean %s instead of %s?\n" +@@ -1493,6 +1493,30 @@ msgid "'%s' is a file, did you mean %s instead of %s?\n" msgstr "" "'%s' はファイルです、あなたが行いたいのは %s で %s ではありませんか?\n" @@ -39,7 +39,7 @@ index 40ce7f3..477fd6f 100644 +msgid "terminating MSYS2 processes failed\n" +msgstr "MSYS2 プロセスの終了に失敗しました\n" + - #: src/pacman/sync.c:708 + #: src/pacman/sync.c:717 #, c-format msgid "Starting full system upgrade...\n" -- diff --git a/pacman/0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch b/pacman/0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch index f2ab7ea0..1f138950 100644 --- a/pacman/0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch +++ b/pacman/0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch @@ -1,4 +1,4 @@ -From 6734419a33ad66f1fc2f399315af4577ff96af60 Mon Sep 17 00:00:00 2001 +From c696f04399c0b08cf1909a7bef482898c83cc288 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 22:59:28 +0200 Subject: [PATCH 12/N] Workaround compressing packages with bsdtar under @@ -6,14 +6,14 @@ Subject: [PATCH 12/N] Workaround compressing packages with bsdtar under --- scripts/makepkg.sh.in | 4 ++-- - scripts/repo-add.sh.in | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + scripts/repo-add.sh.in | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in -index 6baeddf..5ff6607 100644 +index 7ad3a0e..1a6acc1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in -@@ -697,7 +697,7 @@ create_package() { +@@ -711,7 +711,7 @@ create_package() { msg2 "$(gettext "Compressing package...")" # TODO: Maybe this can be set globally for robustness shopt -s -o pipefail @@ -22,7 +22,7 @@ index 6baeddf..5ff6607 100644 compress_as "$PKGEXT" > "${pkg_file}" || ret=$? shopt -u -o pipefail -@@ -792,7 +792,7 @@ create_srcpackage() { +@@ -806,7 +806,7 @@ create_srcpackage() { # TODO: Maybe this can be set globally for robustness shopt -s -o pipefail @@ -32,23 +32,18 @@ index 6baeddf..5ff6607 100644 shopt -u -o pipefail diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in -index d8a539e..c9d93d4 100644 +index a231699..8d6d32d 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in -@@ -535,11 +535,11 @@ create_db() { - - pushd "$tmpdir/$repo" >/dev/null - if ( shopt -s nullglob; files=(*); (( ${#files[*]} )) ); then -- bsdtar -c ${TAR_OPT} -f "$tempname" * -+ bsdtar --uid 1 --uname root --gid 1 --gname root -c ${TAR_OPT} -f "$tempname" * - else - # we have no packages remaining? zip up some emptyness +@@ -531,7 +531,7 @@ create_db() { warning "$(gettext "No packages remain, creating empty database.")" -- bsdtar -c ${TAR_OPT} -f "$tempname" -T /dev/null -+ bsdtar --uid 1 --uname root --gid 1 --gname root -c ${TAR_OPT} -f "$tempname" -T /dev/null + files=(-T /dev/null) fi +- bsdtar -cf - "${files[@]}" | compress_as "$filename" > "$tempname" ++ bsdtar --uid 1 --uname root --gid 1 --gname root -cf - "${files[@]}" | compress_as "$filename" > "$tempname" popd >/dev/null + create_signature "$tempname" -- 2.31.1 diff --git a/pacman/0014-Fix-asciidoc-argparse.patch b/pacman/0013-Fix-asciidoc-argparse.patch similarity index 81% rename from pacman/0014-Fix-asciidoc-argparse.patch rename to pacman/0013-Fix-asciidoc-argparse.patch index b98eedac..3286c3b9 100644 --- a/pacman/0014-Fix-asciidoc-argparse.patch +++ b/pacman/0013-Fix-asciidoc-argparse.patch @@ -1,7 +1,7 @@ -From 5a6b9dbc388c617b25c03628db46a19867575eda Mon Sep 17 00:00:00 2001 +From 780fe2615c674a6516f2a88cb8d56cdc52f16910 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 23:00:14 +0200 -Subject: [PATCH 14/N] Fix asciidoc argparse +Subject: [PATCH 13/N] Fix asciidoc argparse a2x seems to fail when a value to an argument looks like an argument itself. The best fix seems to be to attach the value to the argument using an equal @@ -13,10 +13,10 @@ https://bugs.python.org/issue9334 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/meson.build b/doc/meson.build -index a5bcd5b..a86f1bf 100644 +index 4aaac55..157ee4d 100644 --- a/doc/meson.build +++ b/doc/meson.build -@@ -57,7 +57,7 @@ foreach page : manpages +@@ -56,7 +56,7 @@ foreach page : manpages '-f', 'manpage', '--xsltproc-opts', '-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0', '-D', '@OUTDIR@', diff --git a/pacman/0013-build-add-libintl-dependency-to-meson-and-the-.pc-fi.patch b/pacman/0013-build-add-libintl-dependency-to-meson-and-the-.pc-fi.patch deleted file mode 100644 index bf5eaeda..00000000 --- a/pacman/0013-build-add-libintl-dependency-to-meson-and-the-.pc-fi.patch +++ /dev/null @@ -1,60 +0,0 @@ -From a844b07570a18bfd40a382ffada9193e2a3df73d Mon Sep 17 00:00:00 2001 -From: Eli Schwartz -Date: Wed, 19 Jun 2019 17:53:57 -0400 -Subject: [PATCH 13/N] build: add libintl dependency to meson and the .pc file - -In order to use gettext on systems where it is not part of libc, the -correct linker flags are needed in libalpm.pc (for static compilation). -This has never been the case. - -The new meson build system currently only checks for ngettext in libc, -but does not fall back to searching for the existence of -lintl; add it -to the libalpm dependencies. - -Signed-off-by: Eli Schwartz ---- - lib/libalpm/libalpm.pc.in | 2 +- - meson.build | 8 ++++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/libalpm/libalpm.pc.in b/lib/libalpm/libalpm.pc.in -index 126a6e6..da7f96a 100644 ---- a/lib/libalpm/libalpm.pc.in -+++ b/lib/libalpm/libalpm.pc.in -@@ -10,4 +10,4 @@ Version: @LIB_VERSION@ - Requires.private: libarchive @pc_crypto@ @pc_libcurl@ @pc_gpgme@ - Cflags: -I${includedir} @LFS_CFLAGS@ - Libs: -L${libdir} -lalpm --Libs.private: @LIBS@ @pc_gpgme_libs@ -+Libs.private: @LIBS@ @pc_gpgme_libs@ @LIBINTL@ -diff --git a/meson.build b/meson.build -index 89362f2..ea6481a 100644 ---- a/meson.build -+++ b/meson.build -@@ -79,9 +79,13 @@ conf.set_quoted('CACHEDIR', join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/')) - conf.set_quoted('HOOKDIR', join_paths(SYSCONFDIR, 'pacman.d/hooks/')) - conf.set_quoted('ROOTDIR', ROOTDIR) - -+libintl = dependency('', required: false) - if get_option('i18n') - if not cc.has_function('ngettext') -- error('ngettext not found but NLS support requested') -+ 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 -@@ -314,7 +318,7 @@ libcommon = static_library( - include_directories : includes, - install : false) - --alpm_deps = [crypto_provider, libarchive, libcurl, gpgme] -+alpm_deps = [crypto_provider, libarchive, libcurl, libintl, gpgme] - - libalpm_a = static_library( - 'alpm_objlib', --- -2.31.1 - diff --git a/pacman/0015-Remove-fakeroot.patch b/pacman/0014-Remove-fakeroot.patch similarity index 89% rename from pacman/0015-Remove-fakeroot.patch rename to pacman/0014-Remove-fakeroot.patch index 39dc89ff..3ede58b6 100644 --- a/pacman/0015-Remove-fakeroot.patch +++ b/pacman/0014-Remove-fakeroot.patch @@ -1,7 +1,7 @@ -From 7e27cd03ab69d20fd078a12f378711b2a26056da Mon Sep 17 00:00:00 2001 +From 3edf5816a31f68df6aafe53f6cd34180ee0f4e3c Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 23:02:23 +0200 -Subject: [PATCH 15/N] Remove fakeroot +Subject: [PATCH 14/N] Remove fakeroot Currently we don't have fakeroot, so let's allow building without it. Most of the patching is currently done in 0000-pacman-msysize.patch, these are just some diff --git a/pacman/0016-Remove-sudo.patch b/pacman/0015-Remove-sudo.patch similarity index 89% rename from pacman/0016-Remove-sudo.patch rename to pacman/0015-Remove-sudo.patch index d791f6ca..ce401af5 100644 --- a/pacman/0016-Remove-sudo.patch +++ b/pacman/0015-Remove-sudo.patch @@ -1,7 +1,7 @@ -From 367915b8c1352e0c380a9a37270a3a0dd27058a3 Mon Sep 17 00:00:00 2001 +From 906c826826308b8cd342e0eee8821cade728cb22 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 23:02:56 +0200 -Subject: [PATCH 16/N] Remove sudo +Subject: [PATCH 15/N] Remove sudo Currently we don't have sudo and most people have their MSYS2 roots user-writable anyway, so let's completely remove the usage of sudo. Most of the diff --git a/pacman/0017-Use-msys-tools.patch b/pacman/0016-Use-msys-tools.patch similarity index 91% rename from pacman/0017-Use-msys-tools.patch rename to pacman/0016-Use-msys-tools.patch index 4d4d8394..3237bd85 100644 --- a/pacman/0017-Use-msys-tools.patch +++ b/pacman/0016-Use-msys-tools.patch @@ -1,7 +1,7 @@ -From 5cdc97ce02770516db75c03a2ba5aac248b1e4b8 Mon Sep 17 00:00:00 2001 +From f9f94e2ac7201bf8b4eabf6b3e826f6c09c0b904 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 21 May 2021 23:03:54 +0200 -Subject: [PATCH 17/N] Use msys tools +Subject: [PATCH 16/N] Use msys tools Some of the external tools pacman uses might unfortunately have incompatible versions in PATH, e.g. when using makepkg-mingw. Let's always invoke them using diff --git a/pacman/0019-Export-CC-and-CXX-variables-explicitly.patch b/pacman/0017-Export-CC-and-CXX-variables-explicitly.patch similarity index 87% rename from pacman/0019-Export-CC-and-CXX-variables-explicitly.patch rename to pacman/0017-Export-CC-and-CXX-variables-explicitly.patch index 5195751f..4f9515e3 100644 --- a/pacman/0019-Export-CC-and-CXX-variables-explicitly.patch +++ b/pacman/0017-Export-CC-and-CXX-variables-explicitly.patch @@ -1,7 +1,7 @@ -From 046e01faeea7e0b1ea563f058aacaec946093f15 Mon Sep 17 00:00:00 2001 +From cf62dcbf66047f134e7365b06644d37405509eea Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 23 May 2021 17:36:14 +0200 -Subject: [PATCH 19/N] Export CC and CXX variables explicitly +Subject: [PATCH 17/N] Export CC and CXX variables explicitly See https://github.com/msys2/MSYS2-packages/pull/2501 --- @@ -10,7 +10,7 @@ See https://github.com/msys2/MSYS2-packages/pull/2501 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/libmakepkg/buildenv.sh.in b/scripts/libmakepkg/buildenv.sh.in -index 965b9c2..5d36b6b 100644 +index b75d792..3b7d537 100644 --- a/scripts/libmakepkg/buildenv.sh.in +++ b/scripts/libmakepkg/buildenv.sh.in @@ -36,5 +36,5 @@ prepare_buildenv() { @@ -21,7 +21,7 @@ index 965b9c2..5d36b6b 100644 + export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS RUSTFLAGS MAKEFLAGS CHOST } diff --git a/scripts/libmakepkg/buildenv/buildflags.sh.in b/scripts/libmakepkg/buildenv/buildflags.sh.in -index 9814a54..e32bf21 100644 +index 873dd82..4ba1dbc 100644 --- a/scripts/libmakepkg/buildenv/buildflags.sh.in +++ b/scripts/libmakepkg/buildenv/buildflags.sh.in @@ -30,6 +30,6 @@ buildenv_functions+=('buildenv_buildflags') diff --git a/pacman/0018-Add-a-CI-job.patch b/pacman/0018-Add-a-CI-job.patch new file mode 100644 index 00000000..df4d675a --- /dev/null +++ b/pacman/0018-Add-a-CI-job.patch @@ -0,0 +1,74 @@ +From 91c0c2351dcfd8291e27db6823e9c93754855103 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter +Date: Thu, 3 Jun 2021 16:49:35 +0200 +Subject: [PATCH 18/N] Add a CI job + +--- + .github/workflows/build.yaml | 55 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) + create mode 100644 .github/workflows/build.yaml + +diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml +new file mode 100644 +index 0000000..5b198ca +--- /dev/null ++++ b/.github/workflows/build.yaml +@@ -0,0 +1,55 @@ ++name: build ++ ++on: [push, pull_request] ++ ++jobs: ++ build: ++ runs-on: windows-latest ++ ++ steps: ++ - name: Checkout code ++ uses: actions/checkout@v2 ++ ++ - name: setup-msys2 ++ uses: msys2/setup-msys2@v2 ++ with: ++ msystem: MSYS ++ update: true ++ install: >- ++ msys2-devel ++ base-devel ++ asciidoc ++ doxygen ++ git ++ meson ++ ninja ++ gettext-devel ++ heimdal-devel ++ libarchive-devel ++ libcurl-devel ++ libgpgme-devel ++ libsqlite-devel ++ libunistring-devel ++ ++ - name: Build ++ shell: msys2 {0} ++ run: | ++ meson _build \ ++ --auto-features=enabled \ ++ --default-library=static \ ++ -Dbuildstatic=true \ ++ -Ddoxygen=enabled \ ++ -Dfile-seccomp=disabled ++ ++ meson compile -C _build ++ ++ - name: Install ++ shell: msys2 {0} ++ run: | ++ DESTDIR="$(pwd)"/_dest meson install -C _build ++ ++ - name: Upload ++ uses: actions/upload-artifact@v2 ++ with: ++ name: install ++ path: _dest/ +-- +2.31.1 + diff --git a/pacman/0018-pacman-correct-length-of-.files.sig-string.patch b/pacman/0018-pacman-correct-length-of-.files.sig-string.patch deleted file mode 100644 index 0d1b3848..00000000 --- a/pacman/0018-pacman-correct-length-of-.files.sig-string.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f6e00ab089f39417c2d96a3b5d8be4dfbb570ae8 Mon Sep 17 00:00:00 2001 -From: Pascal Ernster -Date: Thu, 21 Jan 2021 03:49:58 +0100 -Subject: [PATCH 18/N] pacman: correct length of ".files.sig" string - -Running "pacman -Sc" deletes /var/lib/pacman/sync/*.files.sig due to a -wrong string length being used when checking filename suffixes in that -directory. In turn, these missing signature files cause both the -corresponding "*.files" files and their signatures being forcibly -re-downloaded again when "pacman -Sy" is executed. - -Since official Arch Linux repos don't use signed database files yet, this -only affects people who use custom repos with signed database files, for -which they have set the "SigLevel" directive to "Required" or -"DatabaseRequired" in /etc/pacman.conf. - -Fixes FS#66472 - -Signed-off-by: Pascal Ernster -Signed-off-by: Allan McRae ---- - src/pacman/sync.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pacman/sync.c b/src/pacman/sync.c -index 41ee123..b55e5b3 100644 ---- a/src/pacman/sync.c -+++ b/src/pacman/sync.c -@@ -110,7 +110,7 @@ static int sync_cleandb(const char *dbpath) - dbname = strndup(dname, len - 7); - } else if(len > 6 && strcmp(dname + len - 6, ".files") == 0) { - dbname = strndup(dname, len - 6); -- } else if(len > 6 && strcmp(dname + len - 6, ".files.sig") == 0) { -+ } else if(len > 10 && strcmp(dname + len - 10, ".files.sig") == 0) { - dbname = strndup(dname, len - 10); - } else { - ret += unlink_verbose(path, 0); --- -2.31.1 - diff --git a/pacman/PKGBUILD b/pacman/PKGBUILD index 943ffa6e..cb46b53d 100644 --- a/pacman/PKGBUILD +++ b/pacman/PKGBUILD @@ -3,8 +3,8 @@ # Contributor: Ray Donnelly pkgname=pacman -pkgver=5.2.2 -pkgrel=24 +pkgver=6.0.0 +pkgrel=1 pkgdesc="A library-based package manager with dependency support (MSYS2 port)" arch=('i686' 'x86_64') url="https://www.archlinux.org/pacman/" @@ -53,39 +53,37 @@ source=(pacman-${pkgver}::git+https://git.archlinux.org/pacman.git#tag=v${pkgver 0010-pacman-make-file-list-comparisons-between-packages-c.patch 0011-Translate-MSYS2-specific-messages-into-Japanese.patch 0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch - 0013-build-add-libintl-dependency-to-meson-and-the-.pc-fi.patch - 0014-Fix-asciidoc-argparse.patch - 0015-Remove-fakeroot.patch - 0016-Remove-sudo.patch - 0017-Use-msys-tools.patch - 0018-pacman-correct-length-of-.files.sig-string.patch - 0019-Export-CC-and-CXX-variables-explicitly.patch) + 0013-Fix-asciidoc-argparse.patch + 0014-Remove-fakeroot.patch + 0015-Remove-sudo.patch + 0016-Use-msys-tools.patch + 0017-Export-CC-and-CXX-variables-explicitly.patch + 0018-Add-a-CI-job.patch) validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae 'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) sha256sums=('SKIP' - 'f5a84c5642d57044ddb40387822bfcb01bdbdcd885b46bc93d116aaf0e5741a6' - '178ff34e13f7d558a4410f909667c07faeaf7a83b15b00e7db342c0796675733' - 'b9ad2fb4b0e686b96db0a50d411f4d9344ec8950f50906fb502272037246e4b8' + '2ddaadb69e20699b48a6fa9b77b29117326d08aa4717d510c976664d4f02505b' + 'ee9f8a5ec60a1334725adb102f531f38badfe1bb66bde82c4aeb3131a2becc2f' + '49452621003656e5ad09c5ed38d37f62187ede8b6456a2ba2919846b430dfb74' '2bd27c3fc5443b367e5025c9b9a35670b02202e48e92eead90755fef8d08fa83' - '3b6e0dee7b5f1ff84ffffff1fb5cbc77bc6037212d92bd3fbffc91ff64aa732f' - '084ecde8013312553671ebe53dc8fcd1c1f987bbfaa31898e0f0cd5e637dc89d' - '635988f9138ea50f2eed81d596abc99c47d02f16db3e0c20ea65abf05869327f' - '7a8c08ea12206793b6e40576415d19cd6ffd27f3b6339caffd4074cf9d6794c3' - '37a7b1f97f527a14df3f791431af4777217ed52d34f1b74525f4ad4ce7d88dc2' - '3a91fa92465a771700b69275c2376760b487c057212638e6f79e374ebf15bd78' - 'a00a4820a5a267901ee84165b4d5a4ad09dc540dbec56ddca5e1d60aba513fd4' - '309d602867b671d54752081308a14e7fcf33b7b15c34e4194036ade2fa90f9b4' - '3587f7891920bba891933ea8879d82fae397864f240ae3e029493fd91022d7e7' - 'acc1d0e211c0f1aa5585f6f9250552f533786ee79c8a17d95bfc4998b10677d9' - '5fc5f39bc00ba65275dbdd2209bcb42d1251ec1c1e63f18891c909ac9c635209' - '6585f7db153ddd3b8201ee23af77bf9f716775e7c228ee360be46ea08aa61b5e' - '6506d8a010a65050927dcf4499fba058865ceb22b5c76af58421d4cdec7b4a17' - 'a9797a3d73d18e0188f90fb58878e9ce5bef1661dd953da12a6cfb5a34d2e279' - 'bd3acbae2c2f37d148d28cb424d1ab9491b8be4e0899b6deee4bbe8e11e14801' - 'b3744175bf561ba178608c47a4bc75016ce358197e5cc184bf786cdd209580e6' - '2f22490f9021399c735e6dd83417206a834fb80e0eb586b66779ca53f76095d8' - '2b7dd9f9f4c39e2ee24d54318e1f608569d78c93e856c088592db34d5c3dab5f' - '0737f9cf11af9235c2242d1d9ec9280cf707e50290621ef4625c2512c1dae443') + '6dd930f5da349959deb128b0fa875da11184df90afe250a51862b39beffd1240' + '4986792235e02c62316d974e47059bcf1223c4a2d86efa1eb56d8ef6993988ad' + 'd35854bf5a14984ddb57a36be6f4e9ac62748fa2bf10c8f844a8eb17402e8839' + '2bbeae9c91cd42f92956967b97b777e7f9bd2e2b9c160c767fc604b183571656' + '9cf5b82e00eb6ad3b79d4e7fc7a9cc824e5748bd0fd26a5a06478f2e9ca6f3e8' + 'c5f2430aaff70e9aaf37fe54cbc2a557004f2ef74283adc51c6b99e3c9ec4801' + '49e746cb0ee391be3ef6d60de589f61cf25bcbfa16a49fd113a2445e5c559a9a' + '3ac53499f19e95bdb84ab9dad8a1c551b4bb75f940b8e09ae4cd4bdea2a48999' + '5215e5a10d6e1d7b0850683f3d27114a31143ac3112103a59a1094e5702954ca' + '6f865181a93c499b21e7d31d8a423cecc9b8b6c205dbb8c9bb460ac5a86f7725' + 'b880a0d9e07b4a6198b3a2b318611dd53419978e60bf397ba9910c4358656de7' + 'd81b84c2a4e4a03dca169ec8b05f967bd8f5c3f3b7bc2895c0a9cbd0fa719d4b' + '1de924b4bf41e0603fac3b3a2b83db18211ae9e65e15ac0dbaf5448c587dfb76' + '8d9a5dd13df1f18e94abe8520dfc1f1f80ac45677e93ff64b4c3a8f5adbc9fa1' + 'e3aef7b31ff56d128ac8b213437987c57a1490f52b31185199241da43233547d' + 'bc16b167293aca73eec011d42b6d69a88e7a51be778e56e4d9a0ab1bc421efaa' + '8388d3c5edfe66f5f023fe5df275e7223cc5d92f9163a8a85a99987f538b30f0' + '94f1f32544311713ec4f76a1058625d4215e0a7582ca3f08208841c0bf4ed723') apply_git_am_with_msg() { for _patch in "$@" @@ -114,13 +112,12 @@ prepare() { 0010-pacman-make-file-list-comparisons-between-packages-c.patch \ 0011-Translate-MSYS2-specific-messages-into-Japanese.patch \ 0012-Workaround-compressing-packages-with-bsdtar-under-Ac.patch \ - 0013-build-add-libintl-dependency-to-meson-and-the-.pc-fi.patch \ - 0014-Fix-asciidoc-argparse.patch \ - 0015-Remove-fakeroot.patch \ - 0016-Remove-sudo.patch \ - 0017-Use-msys-tools.patch \ - 0018-pacman-correct-length-of-.files.sig-string.patch \ - 0019-Export-CC-and-CXX-variables-explicitly.patch + 0013-Fix-asciidoc-argparse.patch \ + 0014-Remove-fakeroot.patch \ + 0015-Remove-sudo.patch \ + 0016-Use-msys-tools.patch \ + 0017-Export-CC-and-CXX-variables-explicitly.patch \ + 0018-Add-a-CI-job.patch } build() { diff --git a/pacman/makepkg.conf b/pacman/makepkg.conf index c72dd471..9104b7b6 100644 --- a/pacman/makepkg.conf +++ b/pacman/makepkg.conf @@ -8,9 +8,10 @@ # #-- The download utilities that makepkg should use to acquire sources # Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' +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' 'rsync::/usr/bin/rsync --no-motd -z %u %o' 'scp::/usr/bin/scp -C %u %o') @@ -22,6 +23,7 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o % #-- The package required by makepkg to download VCS sources # Format: 'protocol::package' VCSCLIENTS=('bzr::bzr' + 'fossil::fossil' 'git::git' 'hg::mercurial' 'svn::subversion') @@ -61,7 +63,7 @@ DEBUG_CXXFLAGS="-ggdb -Og" # BUILD ENVIRONMENT ######################################################################### # -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) +# 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 @@ -84,7 +86,7 @@ BUILDENV=(!distcc color !ccache check !sign) # These are default values for the options=() settings ######################################################################### # -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto) # A negated option will do the opposite of the comments below. # #-- strip: Strip symbols from binaries/libraries @@ -95,11 +97,12 @@ BUILDENV=(!distcc color !ccache check !sign) #-- 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 # -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug !lto) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) +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. @@ -150,10 +153,12 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' -# vim: set ft=sh ts=2 sw=2 et: +######################################################################### +# OTHER +######################################################################### +# +#-- Command used to run pacman as root, instead of trying sudo and su +PACMAN_AUTH=() diff --git a/pacman/makepkg_mingw.conf b/pacman/makepkg_mingw.conf index 6873c877..e178c64b 100644 --- a/pacman/makepkg_mingw.conf +++ b/pacman/makepkg_mingw.conf @@ -8,9 +8,10 @@ # #-- The download utilities that makepkg should use to acquire sources # Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' +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' 'rsync::/usr/bin/rsync --no-motd -z %u %o' 'scp::/usr/bin/scp -C %u %o') @@ -22,6 +23,7 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o % #-- The package required by makepkg to download VCS sources # Format: 'protocol::package' VCSCLIENTS=('bzr::bzr' + 'fossil::fossil' 'git::git' 'hg::mercurial' 'svn::subversion') @@ -133,7 +135,7 @@ PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" # BUILD ENVIRONMENT ######################################################################### # -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) +# 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 @@ -156,7 +158,7 @@ BUILDENV=(!distcc color !ccache check !sign) # These are default values for the options=() settings ######################################################################### # -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto) # A negated option will do the opposite of the comments below. # #-- strip: Strip symbols from binaries/libraries @@ -167,11 +169,12 @@ BUILDENV=(!distcc color !ccache check !sign) #-- 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 # -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug !lto) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) +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. @@ -222,10 +225,12 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' -# vim: set ft=sh ts=2 sw=2 et: +######################################################################### +# OTHER +######################################################################### +# +#-- Command used to run pacman as root, instead of trying sudo and su +PACMAN_AUTH=() diff --git a/pacman/pacman.conf b/pacman/pacman.conf index d38e8de6..438f378a 100644 --- a/pacman/pacman.conf +++ b/pacman/pacman.conf @@ -14,7 +14,7 @@ #CacheDir = /var/cache/pacman/pkg/ #LogFile = /var/log/pacman.log #GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman +HoldPkg = pacman #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled @@ -30,9 +30,10 @@ Architecture = auto # Misc options #UseSyslog #Color -#TotalDownload +#NoProgressBar CheckSpace #VerbosePkgLists +ParallelDownloads = 5 # By default, pacman accepts packages signed by keys that its local keyring # trusts (see pacman-key and its man page), as well as unsigned packages. @@ -41,10 +42,6 @@ SigLevel = Required LocalFileSigLevel = Optional #RemoteFileSigLevel = Required -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - # # REPOSITORIES # - can be defined here or included from another file diff --git a/python-pkgconfig/PKGBUILD b/python-pkgconfig/PKGBUILD new file mode 100644 index 00000000..e8f4db88 --- /dev/null +++ b/python-pkgconfig/PKGBUILD @@ -0,0 +1,25 @@ +pkgname=python-pkgconfig +pkgver=1.5.4 +pkgrel=1 +pkgdesc='Python module to interface with the pkg-config command line tool' +arch=(any) +url='https://github.com/matze/pkgconfig' +license=(MIT) +depends=("python") +makedepends=("python-setuptools") +source=(https://pypi.io/packages/source/p/pkgconfig/pkgconfig-$pkgver.tar.gz) +sha256sums=('c34503829fd226822fd93c902b1cf275516908a023a24be0a02ba687f3a00399') + +build() { + cd pkgconfig-$pkgver + + python setup.py build +} + +package() { + cd pkgconfig-$pkgver + + python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} \ No newline at end of file diff --git a/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch b/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch index 792d2b5e..b31d2f27 100644 --- a/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch +++ b/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch @@ -1,50 +1,11 @@ ---- pyalpm/setup.py.orig 2020-02-23 16:10:00.163976600 +0100 -+++ pyalpm/setup.py 2020-02-23 16:12:27.525811500 +0100 -@@ -1,6 +1,7 @@ - # -*- coding: utf-8 -*- - import os +--- pyalpm/setup.py.orig 2021-06-06 11:16:43.786094800 +0200 ++++ pyalpm/setup.py 2021-06-06 11:16:49.931474700 +0200 +@@ -3,7 +3,7 @@ from setuptools import setup, Extension -+import subprocess + import pkgconfig +-libalpm = pkgconfig.parse('libalpm') ++libalpm = pkgconfig.parse('libalpm', static=bool(os.getenv('LIBALPM_STATIC'))) os.putenv('LC_CTYPE', 'en_US.UTF-8') -@@ -9,15 +10,25 @@ - PYCMAN_SCRIPTS = ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version'] - -+# From: http://code.activestate.com/recipes/502261-python-distutils-pkg-config/ -+def pkg_config(*pkg_config_flags, **kw): -+ flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} -+ kw['extra_compile_args'] = cflags -+ for token in subprocess.check_output(("pkg-config --libs --cflags %s" % ' '.join(pkg_config_flags)).split()).decode('ascii').split(): -+ if token[:2] in flag_map: -+ kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) -+ else: -+ kw['extra_compile_args'].append(token) -+ return kw -+ - if __name__ == "__main__": - - cflags = ['-Wall', '-Wextra', '-Werror', - '-Wno-unused-parameter', '-Wno-incompatible-pointer-types', -- '-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64'] -+ '-Wno-cast-function-type', '-Wno-unused-function', '-Wno-strict-aliasing', '-std=c99', '-D_FILE_OFFSET_BITS=64', -+ '-DVERSION="%s"' % pyalpm_version] - - alpm = Extension('pyalpm', -- libraries=['alpm'], -- extra_compile_args=cflags + ['-DVERSION="%s"' % pyalpm_version], - language='C', - sources=['src/pyalpm.c', - 'src/util.c', -@@ -31,7 +42,9 @@ - 'src/options.h', - 'src/package.h', - 'src/pyalpm.h', -- 'src/util.h']) -+ 'src/util.h'], -+ **pkg_config('libalpm', '--static' if os.getenv('LIBALPM_STATIC') else '') -+ ) - - with open("README.md", "r") as fh: - long_description = fh.read() diff --git a/python-pyalpm/PKGBUILD b/python-pyalpm/PKGBUILD index b60fb187..8bf07079 100644 --- a/python-pyalpm/PKGBUILD +++ b/python-pyalpm/PKGBUILD @@ -3,8 +3,8 @@ _realname=pyalpm pkgbase="python-${_realname}" pkgname=("python-${_realname}") -pkgver=0.9.2 -pkgrel=2 +pkgver=0.10.3 +pkgrel=1 pkgdesc="Libalpm bindings for Python" arch=('i686' 'x86_64') license=('GPL') @@ -16,14 +16,15 @@ makedepends=('gettext-devel' 'libcurl-devel' 'libgpgme-devel' 'python-setuptools' - 'pacman') + 'pacman' + 'python-pkgconfig') provides=("python3-${_realname}") conflicts=("python3-${_realname}") replaces=("python3-${_realname}") -source=("git+https://gitlab.archlinux.org/archlinux/pyalpm.git#commit=4428779b28ad7df5efb7a3a3feb22a45e9510bfc" +source=("git+https://gitlab.archlinux.org/archlinux/pyalpm.git#tag=${pkgver}" "0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch") sha256sums=('SKIP' - 'f6954a6532bdc61f8149e5e98b13cadfdfcebff0d6c266408faec41428ab5eb9') + 'e26201c95cf6511cc884a38a8ca17cd61154542c390bcd8f7484bdc8e560cee9') prepare() { cd "${srcdir}/${_realname}"