Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v6.1.0 #45

Merged
merged 27 commits into from
May 5, 2024
Merged

Update to v6.1.0 #45

merged 27 commits into from
May 5, 2024

Conversation

lazka
Copy link
Member

@lazka lazka commented May 5, 2024

Rebase diary:

Minimal rebase with things squashed. Cleanups and backports can come later.

  • makepkg.sh.in has a new usage of INFAKEROOT which was removed
  • stripping now uses debugedit, remove it and the executable check
  • strip is supposed to be the same as before, except strip_file() was split like
    in upstream to reduce the diff
  • Various fixups/reverts squashed
  • Disable autodep scripts, they are new and Linux only. Previously similar
    functionality lived in makepkg.sh.in and there was some basic patching to make
    it work for mingw packages, but we never used it so remove for now.

range diff:

  1:  bf8bd982 =  1:  263408fe makepkg: clean up more things
 2:  1fbb46db <  -:  -------- makepkg: bash v4 compat
 3:  261911e6 <  -:  -------- makepkg: find_libdepends: port to Windows
 4:  c8025392 !  2:  93009536 makepkg: build env export
    @@ Commit message
         this should be moved to the other exports really..
     
      ## scripts/makepkg.sh.in ##
    -@@ scripts/makepkg.sh.in: mkdir -p "$srcdir"
    +@@ scripts/makepkg.sh.in: fi
    + mkdir -p "$srcdir"
      chmod a-s "$srcdir"
    - cd_safe "$srcdir"
      
     +export MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX
     +export DXSDK_DIR ACLOCAL_PATH PKG_CONFIG_PATH
 5:  e17f3254 <  -:  -------- makepkg: find_libprovides: port to Windows
 6:  6a848dc2 <  -:  -------- fill_progress
 -:  -------- >  3:  7429136e fill_progress
 7:  4c61f908 =  4:  369fbad8 test fixes
 8:  5bff0d92 !  5:  a7bc88cd Remove everything related to sudo/fakeroot/file permissions
    @@ scripts/libmakepkg/executable/meson.build: sources = [
        'checksum.sh.in',
        'distcc.sh.in',
     -  'fakeroot.sh.in',
    +   'debugedit.sh.in',
        'gpg.sh.in',
        'gzip.sh.in',
        'pacman.sh.in',
    @@ scripts/makepkg.sh.in: run_pacman() {
      		local lockfile="$(pacman-conf DBPath)/db.lck"
      		while [[ -f $lockfile ]]; do
     @@ scripts/makepkg.sh.in: write_pkginfo() {
    - 	merge_arch_attrs
    + 	generate_autodeps
      
      	printf "# Generated by makepkg %s\n" "$makepkg_version"
     -	printf "# using %s\n" "$(fakeroot -v)"
    @@ scripts/makepkg.sh.in: if ! type -p gettext >/dev/null; then
      ARGLIST=("$@")
      
      # Parse Command Line Options.
    --OPT_SHORT="AcCdefFghiLmop:rRsSV"
    -+OPT_SHORT="AcCdefghiLmop:rRsSV"
    - OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg'
    +-OPT_SHORT="AcCdD:efFghiLmop:rRsSV"
    ++OPT_SHORT="AcCdD:efghiLmop:rRsSV"
    + OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'dir:' 'force' 'geninteg'
                'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild'
                'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist'
     @@ scripts/makepkg.sh.in: while true; do
    - 		-d|--nodeps)      NODEPS=1 ;;
    + 		-D|--dir)         shift; CHDIR=$1 ;;
      		-e|--noextract)   NOEXTRACT=1 ;;
      		-f|--force)       FORCE=1 ;;
     -		-F)               INFAKEROOT=1 ;;
      		# generating integrity checks does not depend on architecture
      		-g|--geninteg)    BUILDPKG=0 GENINTEG=1 IGNOREARCH=1;;
      		--holdver)        HOLDVER=1 ;;
    +@@ scripts/makepkg.sh.in: while [[ $1 ]]; do
    + 	shift
    + done
    + 
    +-if (( ! INFAKEROOT )) &&  [[ -n $CHDIR ]]; then
    ++if [[ -n $CHDIR ]]; then
    + 	cd_safe "$CHDIR"
    + fi
    + 
     @@ scripts/makepkg.sh.in: if (( LOGGING )) && ! ensure_writable_dir "LOGDEST" "$LOGDEST"; then
      	exit $E_FS_PERMISSIONS
      fi
    @@ scripts/makepkg.sh.in: if (( LOGGING )) && ! ensure_writable_dir "LOGDEST" "$LOG
     -
      unset pkgname "${pkgbuild_schema_strings[@]}" "${pkgbuild_schema_arrays[@]}"
      unset "${known_hash_algos[@]/%/sums}"
    - unset -f pkgver prepare build check package "${!package_@}"
    + unset -f pkgver verify prepare build check package "${!package_@}"
     @@ scripts/makepkg.sh.in: if (( ! PKGVERFUNC )); then
      	check_build_status
      fi
    @@ scripts/makepkg.sh.in: if (( ! PKGVERFUNC )); then
     -	exit $E_OK
     -fi
     -
    - msg "$(gettext "Making package: %s")" "$pkgbase $basever ($(date +%c))"
    + # check we have the software required to process the PKGBUILD
    + check_software || exit $E_MISSING_MAKEPKG_DEPS
      
    - # if we are creating a source-only package, go no further
     @@ scripts/makepkg.sh.in: if (( SOURCEONLY )); then
      	check_source_integrity all
      	cd_safe "$startdir"
    @@ test/pacman/pmtest.py: def run(self, pacman):
      
              cmd = []
     -        if os.geteuid() != 0:
    --            fakeroot = util.which("fakeroot")
    --            if not fakeroot:
    --                tap.diag("WARNING: fakeroot not found!")
    --            else:
    --                cmd.append("fakeroot")
    --
    +-            # fakechroot must be called before fakeroot due to potential
    +-            # potential interactions when wrapping the same C functions
     -            fakechroot = util.which("fakechroot")
     -            if not fakechroot:
     -                tap.diag("WARNING: fakechroot not found!")
     -            else:
     -                cmd.append("fakechroot")
    +-
    +-            fakeroot = util.which("fakeroot")
    +-            if not fakeroot:
    +-                tap.diag("WARNING: fakeroot not found!")
    +-            else:
    +-                cmd.append("fakeroot")
     -
              if pacman["gdb"]:
                  cmd.extend(["libtool", "execute", "gdb", "--args"])
 9:  6b51761d !  6:  c25dbd11 change shebang
    @@ scripts/pacman-db-upgrade.sh.in
      #
      #   pacman-db-upgrade - upgrade the local pacman db to a newer format
      #
    +@@
    + #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    + #
    + 
    ++set -e
    ++
    + # Avoid creating world-unreadable files
    + umask 022
    + 
     
      ## scripts/pacman-key.sh.in ##
     @@
10:  43fb1e08 !  7:  47fb6fb8 Set fixed paths for various tools
    @@ scripts/pacman-db-upgrade.sh.in: lockfile="${dbroot}/db.lck"
      touch "$lockfile"
     
      ## scripts/pacman-key.sh.in ##
    -@@ scripts/pacman-key.sh.in: LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
    +@@ scripts/pacman-key.sh.in: MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
      # Import libmakepkg
    - source "$LIBRARY"/util/message.sh
    - source "$LIBRARY"/util/parseopts.sh
    -+source "$LIBRARY"/utils_fixed_path.sh
    + source "$MAKEPKG_LIBRARY"/util/message.sh
    + source "$MAKEPKG_LIBRARY"/util/parseopts.sh
    ++source "$MAKEPKG_LIBRARY"/utils_fixed_path.sh
      
      # Options
      ADD=0
    @@ scripts/pacman-key.sh.in: import_trustdb() {
      	for importdir in "$@"; do
      		if [[ -f "${importdir}/trustdb.gpg" ]]; then
     -			gpg --homedir "${importdir}" --export-ownertrust | \
    -+			/bin/gpg --homedir "${importdir}" --export-ownertrust | \
    ++			/usr/bin/gpg --homedir "${importdir}" --export-ownertrust | \
      				"${GPG_PACMAN[@]}" --import-ownertrust -
      			if (( PIPESTATUS )); then
      				error "$(gettext "%s could not be imported.")" "${importdir}/trustdb.gpg"
    @@ scripts/pacman-key.sh.in: updatedb() {
      
     
      ## scripts/repo-add.sh.in ##
    -@@ scripts/repo-add.sh.in: PREVENT_DOWNGRADE=0
    - # Import libmakepkg
    - source "$LIBRARY"/util/compress.sh
    - source "$LIBRARY"/util/message.sh
    -+source "$LIBRARY"/utils_fixed_path.sh
    +@@ scripts/repo-add.sh.in: DB_MODIFIED=0
    + source "$MAKEPKG_LIBRARY"/util/compress.sh
    + source "$MAKEPKG_LIBRARY"/util/message.sh
    + source "$MAKEPKG_LIBRARY"/util/parseopts.sh
    ++source "$MAKEPKG_LIBRARY"/utils_fixed_path.sh
      
      # ensure we have a sane umask set
      umask 0022
11:  438e2383 =  8:  b5f583d6 makepkg: port staticlibs to Windows
12:  3077636f !  9:  48411ee3 makepkg: port strip/debug to Windows
    @@ Metadata
      ## Commit message ##
         makepkg: port strip/debug to Windows
     
    + ## scripts/libmakepkg/executable/meson.build ##
    +@@ scripts/libmakepkg/executable/meson.build: sources = [
    +   'ccache.sh.in',
    +   'checksum.sh.in',
    +   'distcc.sh.in',
    +-  'debugedit.sh.in',
    +   'gpg.sh.in',
    +   'gzip.sh.in',
    +   'pacman.sh.in',
    +
      ## scripts/libmakepkg/tidy/strip.sh.in ##
     @@ scripts/libmakepkg/tidy/strip.sh.in: packaging_options+=('strip' 'debug')
      tidy_modify+=('tidy_strip')
    @@ scripts/libmakepkg/tidy/strip.sh.in: packaging_options+=('strip' 'debug')
     -
     -	LANG=C debugedit --no-recompute-build-id \
     -		--base-dir "${srcdir}" \
    --		--dest-dir "${dbgsrcdir}/${pkgbase}" \
    +-		--dest-dir "${dbgsrcdir}" \
     -		--list-file /dev/stdout "$1" \
     -		| sort -zu | tr '\0' '\n'
     -}
     -
    - strip_file() {
    +-package_source_files() {
    +-	local binary=$1
    +-
    +-	local file dest t
    +-	while IFS= read -r t; do
    +-		file="${srcdir}/${t}"
    +-		dest="${dbgsrc}/${t}"
    +-		mkdir -p "${dest%/*}"
    +-		if [[ -f "$file" ]]; then
    +-			cp -- "$file" "$dest"
    +-		fi
    +-	done < <(source_files "$binary")
    +-}
    +-
    + collect_debug_symbols() {
      	local binary=$1; shift
      
     -	if check_option "debug" "y"; then
    @@ scripts/libmakepkg/tidy/strip.sh.in: packaging_options+=('strip' 'debug')
     -		fi
     -
     -		# copy source files to debug directory
    --		local file dest t
    --		while IFS= read -r t; do
    --			file="${srcdir}/${t}"
    --			dest="${dbgsrc}/${t}"
    --			if [[ -f "$file" ]] && ! [[ -f $dest ]]; then
    --				mkdir -p "${dest%/*}"
    --				cp -- "$file" "$dest"
    --			fi
    --		done < <(source_files "$binary")
    --
    +-		package_source_files "$binary"
    + 
     -		# copy debug symbols to debug directory
     -		mkdir -p "$dbgdir/${binary%/*}"
    --
    --		# abandon processing files that are not a recognised format
    --		if ! objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" 2>/dev/null; then
    --			return
    --		fi
    --
    --		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}"
     +			# copy debug symbols to debug directory
     +			mkdir -p "$dbgdir/${binary%/*}"
     +			msg2 "Separating debug info from $binary into $dbgdir/$binary.debug"
    @@ scripts/libmakepkg/tidy/strip.sh.in: packaging_options+=('strip' 'debug')
     +				fi
     +			done < <(find . -type f -perm -u+w -print0 2>/dev/null)
      
    +-		# abandon processing files that are not a recognised format
    +-		if ! objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" 2>/dev/null; then
    +-			return
    + 		fi
    +-
    +-		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\/}"
    @@ scripts/libmakepkg/tidy/strip.sh.in: packaging_options+=('strip' 'debug')
     -
     -			target="../../${binary#./}.debug"
     -			ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug"
    - 		fi
    +-		fi
     -	fi
     +		;;
     +	esac
    + }
      
    - 	local tempfile=$(mktemp "$binary.XXXXXX")
    - 	if strip "$@" "$binary" -o "$tempfile"; then
    + strip_file(){
     @@ scripts/libmakepkg/tidy/strip.sh.in: tidy_strip() {
    + 		[[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
      
      		if check_option "debug" "y"; then
    - 
     -			dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug"
     +			dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
    - 			dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}"
    + 			dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
      			dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@$dbgsrcdir"
      			mkdir -p "$dbgdir" "$dbgsrc"
      		fi
      
      		local binary strip_flags
    --		find . -type f -perm -u+w -print0 2>/dev/null | while IFS= read -rd '' binary ; do
    +-		find . -type f -perm -u+w -print0 2>/dev/null | LC_ALL=C sort -z | while IFS= read -rd '' binary ; do
    +-			# skip filepaths that cause stripping issues - ideally these should be temporary
    +-			# guile-2.2
    +-			[[ "$binary" =~ .*/guile/.*\.go$ ]] && continue
    +-
    +-			local STATICLIB=0
    +-			case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in
    +-				*Type:*'DYN (Shared object file)'*) # Libraries (.so) or Relocatable binaries
     +		# *.so: Apache2 modules, OCaml stublibs, Ruby modules
     +		# *.oct: Octave modules
     +		# *.cmxs: OCaml natdynlink modules: http://gallium.inria.fr/~frisch/ndl.txt
    @@ scripts/libmakepkg/tidy/strip.sh.in: tidy_strip() {
     +			-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
    ++			local STRIPLTO=0
     +			# Skip thin archives from stripping
     +			case "${binary##*/}" in
     +				*.a)
13:  29014bdc = 10:  04fe09fb makepkg: lint_package: Warn on package files referencing absolute Windows paths
14:  235ea43e <  -:  -------- More debugging info
15:  3efdc22f ! 11:  d27305d9 Core update
    @@ lib/libalpm/alpm.h: int alpm_trans_release(alpm_handle_t *handle);
       * If the package was loaded by alpm_pkg_load(), it will be freed upon
     
      ## lib/libalpm/package.c ##
    -@@ lib/libalpm/package.c: int SYMEXPORT alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg)
    +@@ lib/libalpm/package.c: int _alpm_pkg_check_meta(alpm_pkg_t *pkg)
      
    - 	return 0;
    + 	return error_found;
      }
     +
     +#ifdef __MSYS__
    @@ lib/libalpm/package.c: int SYMEXPORT alpm_pkg_should_ignore(alpm_handle_t *handl
     +		strcmp(pkg->name, "mintty")              == 0 ||
     +		strcmp(pkg->name, "msys2-runtime")       == 0 ||
     +		strcmp(pkg->name, "msys2-runtime-devel") == 0 ||
    ++		strncmp(pkg->name, "msys2-runtime-",
    ++				strlen("msys2-runtime-"))        == 0 ||
     +		strcmp(pkg->name, "pacman")              == 0 ||
     +		strcmp(pkg->name, "pacman-mirrors")      == 0;
     +}
16:  0855e7f7 ! 12:  ff554d9b Remove ldconfig
    @@ test/pacman/meson.build: pacman_tests = [
     @@ test/pacman/meson.build: foreach input : pacman_tests
          join_paths(meson.current_source_dir(), 'pactest.py'),
          '--scriptlet-shell', get_option('scriptlet-shell'),
    -     '--bindir', meson.build_root(),
    +     '--bindir', meson.project_build_root(),
     -    '--ldconfig', LDCONFIG,
          '--verbose',
          join_paths(meson.current_source_dir(), input)
17:  fd1fffaf = 13:  9bbf5bd1 Change the epoch separator
18:  0839de12 = 14:  40a0e295 makepkg: avoid creating .tar files with extended attributes
19:  d694a347 = 15:  3f56dd2a pacman/libalpm: ignore file conflicts for foo.exe -> foo renames
20:  864894b8 ! 16:  73ca7afc Change default answer of all queries to yes
    @@ Commit message
      ## src/pacman/callback.c ##
     @@ src/pacman/callback.c: 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) {
    --					q->remove = noyes(_("%s and %s are in conflict. Remove %s?"),
    -+					q->remove = yesno(_("%s and %s are in conflict. Remove %s?"),
    - 							q->conflict->package1,
    - 							q->conflict->package2,
    - 							q->conflict->package2);
    + 				if(strcmp(alpm_pkg_get_name(q->conflict->package1), q->conflict->reason->name) == 0
    + 						|| strcmp(alpm_pkg_get_name(q->conflict->package2), q->conflict->reason->name) == 0) {
    +-					q->remove = noyes(_("%s-%s%s%s and %s-%s%s%s are in conflict. Remove %s?"),
    ++					q->remove = yesno(_("%s-%s%s%s and %s-%s%s%s are in conflict. Remove %s?"),
    + 							alpm_pkg_get_name(q->conflict->package1),
    + 							colstr->faint,
    + 							alpm_pkg_get_version(q->conflict->package1),
    +@@ src/pacman/callback.c: void cb_question(void *ctx, alpm_question_t *question)
    + 							colstr->nocolor,
    + 							alpm_pkg_get_name(q->conflict->package2));
      				} else {
    --					q->remove = noyes(_("%s and %s are in conflict (%s). Remove %s?"),
    -+					q->remove = yesno(_("%s and %s are in conflict (%s). Remove %s?"),
    - 							q->conflict->package1,
    - 							q->conflict->package2,
    - 							q->conflict->reason->name,
    +-					q->remove = noyes(_("%s-%s%s%s and %s-%s%s%s are in conflict (%s). Remove %s?"),
    ++					q->remove = yesno(_("%s-%s%s%s and %s-%s%s%s are in conflict (%s). Remove %s?"),
    + 							alpm_pkg_get_name(q->conflict->package1),
    + 							colstr->faint,
    + 							alpm_pkg_get_version(q->conflict->package1),
     @@ src/pacman/callback.c: void cb_question(void *ctx, alpm_question_t *question)
      							count));
      				list_display("     ", namelist, getcols());
21:  f973a61a ! 17:  4dfb0ee4 Use pipe instead of socket
    @@ lib/libalpm/util.c
     +#ifndef __MSYS__
      #include <sys/socket.h>
     +#endif
    + #include <fcntl.h>
      #include <fnmatch.h>
      #include <poll.h>
    - #include <signal.h>
     @@ lib/libalpm/util.c: static int _alpm_chroot_write_to_child(alpm_handle_t *handle, int fd,
      		_alpm_cb_io out_cb, void *cb_ctx)
      {
22:  ae18ca4f ! 18:  3c173477 pacman: make file list comparisons between packages case insensitive
    @@ lib/libalpm/filelist.c: static int _alpm_files_cmp(const void *f1, const void *f
     +	return _cmppath(file1->name, file2->name);
      }
      
    - alpm_file_t SYMEXPORT *alpm_filelist_contains(alpm_filelist_t *filelist,
    + alpm_file_t SYMEXPORT *alpm_filelist_contains(const alpm_filelist_t *filelist,
     @@ lib/libalpm/filelist.c: void _alpm_filelist_sort(alpm_filelist_t *filelist)
      {
      	size_t i;
23:  6866c7d8 <  -:  -------- Translate MSYS2 specific messages into Japanese
24:  1237e5c3 = 19:  36980afa Workaround compressing packages with bsdtar under Active Directory account
25:  d3e36393 = 20:  5b73927a Fix asciidoc argparse
26:  10cd1c5d <  -:  -------- Export CC and CXX variables explicitly
 -:  -------- > 21:  c19fd98c Export CC and CXX variables explicitly
27:  4fecac86 = 22:  ee219d0a pacman.c: handle cr on stdin as well
28:  63de6f62 = 23:  21c03c01 Add a CI job
29:  322b34be <  -:  -------- Fix building staticlibs with LTO
 -:  -------- > 24:  64311bb8 Fix building staticlibs with LTO
30:  ab633a20 = 25:  65f028bd Make lint_pkgbuild opt-in via MAKEPKG_LINT_PKGBUILD=1
31:  4cfaf539 <  -:  -------- libmakepkg: fix compatibility with bash-5.2 patsub_replacement
32:  49033430 = 26:  036f1763 pacman-key: pass --allow-weak-key-signatures during import
33:  fb822167 <  -:  -------- fixup! change shebang
34:  47d0b2bf <  -:  -------- Revert "makepkg: bash v4 compat"
35:  1f023f9f <  -:  -------- fixup! Set fixed paths for various tools
36:  bfe70fa6 <  -:  -------- fixup! Core update
37:  2ab815f2 <  -:  -------- Revert "More debugging info"
 -:  -------- > 27:  9a49cdf4 Disable autodep scripts

lazka added 8 commits May 5, 2024 14:10
this should be moved to the other exports really..
We don't have sudo or fakeroot in MSYS2 and file permissions
don't work the same.
(looks like this dropped a "set -e" which should be fixed)
So that we call the right tools even if mingw variants are in PATH
lazka and others added 18 commits May 5, 2024 17:14
Extended attributes are not necessary for pacman to work. Extended
attributes may not even be supported by the file system to which we
extract the files.

And worst of all: pacman cannot handle extended attributes, but simply
stops extracting files when it encounters an extended attribute.

This is particularly nasty when creating packages on a system configured
to cache, say, file integrity information about .exe files in extended
attributes, as the created packages will fail to install any .exe files.

The fix is very easy: simply pass the -no-xattrs option to bsdtar.

Signed-off-by: Johannes Schindelin <[email protected]>
In case a file "foo.exe" gets renamed to "foo" the msys2 .exe
interpolation makes pacman think an untracker file is replaced.
In case foo and foo.exe are the same file and foo.exe existed
in the old package version we can be sure it's handled by the
old package and ignore the conflict.
This allows to use pacman completely unattended using the
--noconfirm switch which automatically accepts the default answer.

See msys2/MSYS2-packages#1141
In case a package gets upgrade and a filename has changed case this allows
the upgrade to go through without any conflicts.

Similarly in case two different packages contain the same file with
a different case this makes it correctly detect a conflict.

This only handles ASCII parts of paths, so Unicode filenames still can
lead to invalid conflict detection.
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
sign.

https://bugs.python.org/issue9334
Improves compatibility with Windows targets, specifically when using
powershell for string transforming package names and piping into
pacman as it's virtually impossible to send newline only terminated
strings through pipes

Allows for stuff such as

```powershell
$a="vim nano"
$b="cmake ninja"
$a.Split(' '), $b.Split(' ').ForEach({Write-Output mingw-w64-ucrt-x86_64-$_}) |
  pacman -S --needed -
```

Signed-off-by: Christopher Degawa <[email protected]>
Unless `-ffat-lto-objects` get passed to the compiler, It will only generate LTO bytecode.

see:
https://wiki.ubuntu.com/ToolChain/LTO : Implementation
https://fedoraproject.org/wiki/Changes/LTOBuildImprovements
Cygwin bash is struggling with the thousands of commands that get invoked
when lint_pkgbuild is run. This especially is annoying for split packages
because the calls get multiplied by the package count.

For example when running --printsrcinfo:

msys/brotli (4 packages)
* 39.8 seconds with linting
* 7 seconds without

msys/tar (1 package)
* 10.2 seconds with linting
* 2 seconds without

This changes the default to not lint the PKGBUILD and adds a
MAKEPKG_LINT_PKGBUILD env var that can be used to enable linting.
We can for example enable this in CI.
Our keyring contains SHA1 signatures, which gnupg 2.4 no longer imports
by default. We can't easily get rid of them now, so allow them for now.

See msys2/MSYS2-keyring#45
@lazka lazka marked this pull request as ready for review May 5, 2024 15:34
They are Linux only, so don't include them.
The autodeps machinery itself can stay.
@lazka lazka merged commit 3c14b2a into msys2:msys2-v6.1.0 May 5, 2024
1 check passed
@lazka
Copy link
Member Author

lazka commented May 5, 2024

Next some backports

lazka added a commit to lazka/MSYS2-packages that referenced this pull request May 5, 2024
lazka added a commit to lazka/MSYS2-packages that referenced this pull request May 5, 2024
lazka added a commit to lazka/MSYS2-packages that referenced this pull request May 6, 2024
See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
lazka added a commit to lazka/MSYS2-packages that referenced this pull request May 6, 2024
See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
lazka added a commit to lazka/MSYS2-packages that referenced this pull request May 9, 2024
Same as msys2#4584 but with an additional backport:
msys2/msys2-pacman#49

Old message:

See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
stahta01 pushed a commit to stahta01/MSYS2-32bit-packages that referenced this pull request May 9, 2024
See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
stahta01 pushed a commit to stahta01/MSYS2-32bit-packages that referenced this pull request May 9, 2024
Same as #4584 but with an additional backport:
msys2/msys2-pacman#49

Old message:

See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants