pacman: split some changes into separate patches

This commit is contained in:
Christoph Reiter
2020-12-19 15:48:12 +01:00
parent 82fbe46fb6
commit d4331d0aa9
6 changed files with 559 additions and 552 deletions

View File

@@ -17,201 +17,6 @@ diff -Naur pacman-5.1.0-orig/lib/libalpm/add.c pacman-5.1.0/lib/libalpm/add.c
_alpm_log(handle, ALPM_LOG_DEBUG, "extract: skipping dir extraction of %s\n",
filename);
archive_read_data_skip(archive);
@@ -656,7 +658,10 @@
int _alpm_upgrade_packages(alpm_handle_t *handle)
{
size_t pkg_count, pkg_current;
- int skip_ldconfig = 0, ret = 0;
+#ifndef __MSYS__
+ int skip_ldconfig = 0;
+#endif
+ int ret = 0;
alpm_list_t *targ;
alpm_trans_t *trans = handle->trans;
@@ -679,18 +684,22 @@
/* something screwed up on the commit, abort the trans */
trans->state = STATE_INTERRUPTED;
handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+#ifndef __MSYS__
/* running ldconfig at this point could possibly screw system */
skip_ldconfig = 1;
+#endif
ret = -1;
}
pkg_current++;
}
+#ifndef __MSYS__
if(!skip_ldconfig) {
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
}
+#endif
return ret;
}
diff -Naur pacman-5.1.0-orig/lib/libalpm/alpm.h pacman-5.1.0/lib/libalpm/alpm.h
--- pacman-5.1.0-orig/lib/libalpm/alpm.h 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/alpm.h 2018-06-21 12:53:58.842056200 +0300
@@ -1558,6 +1558,15 @@
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade);
+#ifdef __MSYS__
+int alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade);
+
+/** Informs whether a package is a core package.
+ * @param pkg the package to check
+ * @return non-zero if this is a core package, zero otherwise
+ */
+int alpm_pkg_is_core_package(const alpm_pkg_t *pkg);
+#endif
/** Add a package to the transaction.
* If the package was loaded by alpm_pkg_load(), it will be freed upon
diff -Naur pacman-5.1.0-orig/lib/libalpm/package.c pacman-5.1.0/lib/libalpm/package.c
--- pacman-5.1.0-orig/lib/libalpm/package.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/package.c 2018-06-21 12:59:13.842497200 +0300
@@ -805,3 +805,19 @@
return 0;
}
+
+#ifdef __MSYS__
+int SYMEXPORT alpm_pkg_is_core_package(const alpm_pkg_t *pkg)
+{
+ if (pkg == NULL)
+ return 0;
+ return
+ strcmp(pkg->name, "bash") == 0 ||
+ strcmp(pkg->name, "filesystem") == 0 ||
+ strcmp(pkg->name, "mintty") == 0 ||
+ strcmp(pkg->name, "msys2-runtime") == 0 ||
+ strcmp(pkg->name, "msys2-runtime-devel") == 0 ||
+ strcmp(pkg->name, "pacman") == 0 ||
+ strcmp(pkg->name, "pacman-mirrors") == 0;
+}
+#endif
diff -Naur pacman-5.1.0-orig/lib/libalpm/remove.c pacman-5.1.0/lib/libalpm/remove.c
--- pacman-5.1.0-orig/lib/libalpm/remove.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/remove.c 2018-06-21 12:53:58.852056200 +0300
@@ -772,18 +772,22 @@
if(_alpm_remove_single_package(handle, pkg, NULL,
targ_count, pkg_count) == -1) {
handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+#ifndef __MSYS__
/* running ldconfig at this point could possibly screw system */
run_ldconfig = 0;
+#endif
ret = -1;
}
targ_count++;
}
+#ifndef __MSYS__
if(run_ldconfig) {
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
}
+#endif
return ret;
}
diff -Naur pacman-5.1.0-orig/lib/libalpm/sync.c pacman-5.1.0/lib/libalpm/sync.c
--- pacman-5.1.0-orig/lib/libalpm/sync.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/sync.c 2018-06-21 12:53:58.852056200 +0300
@@ -200,7 +200,12 @@
}
/** 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)
+#else
int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
+#endif
{
alpm_list_t *i, *j;
alpm_trans_t *trans;
@@ -214,6 +219,13 @@
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) {
alpm_pkg_t *lpkg = i->data;
+#ifdef __MSYS__
+ /* Skip regular packages in core update, and core packages in regular update */
+ if(core_update != alpm_pkg_is_core_package(lpkg)) {
+ continue;
+ }
+#endif
+
if(alpm_pkg_find(trans->remove, lpkg->name)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "%s is marked for removal -- skipping\n", lpkg->name);
continue;
@@ -255,6 +267,18 @@
return 0;
}
+#ifdef __MSYS__
+int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
+{
+ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 0);
+}
+
+int SYMEXPORT alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade)
+{
+ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 1);
+}
+#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.
diff -Naur pacman-5.1.0-orig/lib/libalpm/util.c pacman-5.1.0/lib/libalpm/util.c
--- pacman-5.1.0-orig/lib/libalpm/util.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/util.c 2018-06-21 12:53:58.852056200 +0300
@@ -743,6 +743,7 @@
return retval;
}
+#ifndef __MSYS__
/** Run ldconfig in a chroot.
* @param handle the context handle
* @return 0 on success, 1 on error
@@ -766,6 +767,7 @@
return 0;
}
+#endif
/** Helper function for comparing strings using the alpm "compare func"
* signature.
diff -Naur pacman-5.1.0-orig/lib/libalpm/version.c pacman-5.1.0/lib/libalpm/version.c
--- pacman-5.1.0-orig/lib/libalpm/version.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/version.c 2018-06-21 12:53:58.862056200 +0300
@@ -50,7 +50,11 @@
/* se points to version terminator */
se = strrchr(s, '-');
+#ifdef __MSYS__
+ if(*s == '~') {
+#else
if(*s == ':') {
+#endif
epoch = evr;
*s++ = '\0';
version = s;
@@ -250,7 +254,7 @@
return 0;
}
- /* Parse both versions into [epoch:]version[-release] triplets. We probably
+ /* Parse both versions into [epoch:|~]version[-release] triplets. We probably
* don't need epoch and release to support all the same magic, but it is
* easier to just run it all through the same code. */
full1 = strdup(a);
diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/lint_package/build_references.sh.in pacman-5.1.0/scripts/libmakepkg/lint_package/build_references.sh.in
--- pacman-5.1.0-orig/scripts/libmakepkg/lint_package/build_references.sh.in 2018-03-18 05:51:17.000000000 +0300
+++ pacman-5.1.0/scripts/libmakepkg/lint_package/build_references.sh.in 2018-06-21 13:23:05.248501400 +0300
@@ -448,22 +253,6 @@ diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/tidy/strip.sh.in pacman-5.1.0/sc
*application/x-sharedlib*) # Libraries (.so)
strip_flags="$STRIP_SHARED";;
*application/x-archive*) # Libraries (.a)
diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/util/pkgbuild.sh.in pacman-5.1.0/scripts/libmakepkg/util/pkgbuild.sh.in
--- pacman-5.1.0-orig/scripts/libmakepkg/util/pkgbuild.sh.in 2018-05-12 16:15:04.000000000 +0300
+++ pacman-5.1.0/scripts/libmakepkg/util/pkgbuild.sh.in 2018-06-21 12:53:58.872056200 +0300
@@ -149,7 +149,11 @@
##
get_full_version() {
if (( epoch > 0 )); then
- printf "%s\n" "$epoch:$pkgver-$pkgrel"
+ if [[ -n $MSYSTEM ]]; then
+ printf "%s\n" "${epoch}~${pkgver}-${pkgrel}"
+ else
+ printf "%s\n" "$epoch:$pkgver-$pkgrel"
+ fi
else
printf "%s\n" "$pkgver-$pkgrel"
fi
diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/utils_fixed_path.sh.in pacman-5.1.0/scripts/libmakepkg/utils_fixed_path.sh.in
--- pacman-5.1.0-orig/scripts/libmakepkg/utils_fixed_path.sh.in 1970-01-01 03:00:00.000000000 +0300
+++ pacman-5.1.0/scripts/libmakepkg/utils_fixed_path.sh.in 2018-06-21 12:53:58.872056200 +0300
@@ -1067,264 +856,9 @@ diff -Naur pacman-5.1.0-orig/src/pacman/pacman.c pacman-5.1.0/src/pacman/pacman.
if(config->sysroot && (chroot(config->sysroot) != 0 || chdir("/") != 0)) {
pm_printf(ALPM_LOG_ERROR,
diff -Naur pacman-5.1.0-orig/src/pacman/sighandler.c pacman-5.1.0/src/pacman/sighandler.c
--- pacman-5.1.0-orig/src/pacman/sighandler.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/src/pacman/sighandler.c 2018-06-21 12:53:58.922056300 +0300
@@ -21,6 +21,10 @@
#include <signal.h>
#include <unistd.h>
+#ifdef __MSYS__
+#include <termios.h>
+#endif
+
#include <alpm.h>
#include "conf.h"
@@ -44,6 +48,9 @@
*/
static void soft_interrupt_handler(int signum)
{
+#ifdef __MSYS__
+ struct termios term;
+#endif
if(signum == SIGINT) {
const char msg[] = "\nInterrupt signal received\n";
xwrite(STDERR_FILENO, msg, ARRAYSIZE(msg) - 1);
@@ -56,6 +63,13 @@
return;
}
alpm_unlock(config->handle);
+#ifdef __MSYS__
+ /* restore input printing possibly disabled by core update */
+ if(tcgetattr(STDIN_FILENO, &term) == 0) {
+ term.c_lflag |= ECHO;
+ tcsetattr(STDIN_FILENO, TCSAFLUSH, &term);
+ }
+#endif
/* output a newline to be sure we clear any line we may be on */
xwrite(STDOUT_FILENO, "\n", 1);
_Exit(128 + signum);
diff -Naur pacman-5.1.0-orig/src/pacman/sync.c pacman-5.1.0/src/pacman/sync.c
--- pacman-5.1.0-orig/src/pacman/sync.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/src/pacman/sync.c 2018-06-21 13:35:38.316684900 +0300
@@ -28,6 +28,12 @@
#include <sys/stat.h>
#include <fnmatch.h>
+#ifdef __MSYS__
+#include <termios.h>
+#include <handle.h>
+#include <trans.h>
+#endif
+
#include <alpm.h>
#include <alpm_list.h>
@@ -680,8 +686,131 @@
return ret;
}
+#ifdef __MSYS__
+
+/* Tries to kill all cygwin processes except this one */
+static int kill_all_other_msys_processes() {
+ DIR *dir;
+ struct dirent *ent;
+ char self_winpid[50];
+ int found_one = 0;
+ FILE *self = NULL;
+ size_t proc_entries = 0;
+ char **args = NULL;
+ size_t pos = 0;
+
+ self = fopen("/proc/self/winpid", "r");
+ if (self == NULL)
+ return -1;
+ fscanf(self, "%s", self_winpid);
+ fclose(self);
+
+ dir = opendir("/proc");
+ if (dir == NULL)
+ return -1;
+
+ while (ent = readdir(dir))
+ proc_entries++;
+ seekdir(dir, 0);
+
+ args = alloca(sizeof(char *) * (2 + (proc_entries * 2) + 1));
+ args[pos++] = "taskkill";
+ args[pos++] = "/F";
+
+ while (ent = readdir (dir)) {
+ FILE *fp = NULL;
+ char winpid_path[PATH_MAX];
+
+ strcpy(winpid_path, "/proc/");
+ strcat(winpid_path, ent->d_name);
+ strcat(winpid_path, "/winpid");
+
+ fp = fopen(winpid_path, "r");
+ if (fp != NULL) {
+ char winpid[50];
+ fscanf(fp, "%s", winpid);
+
+ if (strcmp(winpid, self_winpid) != 0) {
+ args[pos++] = "/pid";
+ char *pidarg = alloca(strlen(winpid) + 1);
+ strcpy(pidarg, winpid);
+ args[pos++] = pidarg;
+ found_one = 1;
+ }
+
+ fclose(fp);
+ }
+ }
+ args[pos] = NULL;
+ closedir(dir);
+
+ if (!found_one)
+ return 0;
+
+ setenv("MSYS2_ARG_CONV_EXCL", "*", 1);
+ if (execvp(args[0], args) == -1) {
+ return -1;
+ }
+
+ return 0;
+}
+
+static int core_update(int *needed)
+{
+ int retval;
+ alpm_list_t *i;
+ alpm_list_t *core = NULL;
+
+ colon_printf(_("Starting core system upgrade...\n"));
+ alpm_logaction(config->handle, PACMAN_CALLER_PREFIX,
+ "starting core system upgrade\n");
+
+ if(alpm_sync_sysupgrade_core(config->handle, config->op_s_upgrade >= 2) == -1) {
+ pm_printf(ALPM_LOG_ERROR, "%s\n", alpm_strerror(alpm_errno(config->handle)));
+ trans_release();
+ return 1;
+ }
+
+ *needed = 0;
+ for(i = alpm_trans_get_add(config->handle); i; i = i->next) {
+ alpm_pkg_t *pkg = i->data;
+ if (alpm_pkg_is_core_package(pkg)) {
+ core = alpm_list_add(core, pkg);
+ *needed = 1;
+ }
+ }
+
+ if(!(*needed)) {
+ if (!config->print) {
+ printf(_(" there is nothing to do\n"));
+ }
+ return 0;
+ }
+
+ config->handle->trans->add = core;
+ pm_printf(ALPM_LOG_WARNING, _("terminate other MSYS2 programs before proceeding\n"));
+ retval = sync_prepare_execute();
+ if(retval == 0) {
+ int response = 0;
+ do {
+ response = yesno(_("To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed"));
+ } while(!response);
+
+ if (kill_all_other_msys_processes() != 0) {
+ pm_printf(ALPM_LOG_WARNING, _("terminating MSYS2 processes failed\n"));
+ exit(1);
+ }
+ exit(0);
+ }
+ return retval;
+}
+#endif
+
static int sync_trans(alpm_list_t *targets)
{
+#ifdef __MSYS__
+ int found_core_updates = 0;
+#endif
int retval = 0;
alpm_list_t *i;
@@ -695,6 +767,14 @@
}
if(config->op_s_upgrade) {
+#ifdef __MSYS__
+ if(retval = core_update(&found_core_updates)) {
+ return retval;
+ }
+ if(found_core_updates) {
+ return retval;
+ }
+#endif
if(!config->print) {
colon_printf(_("Starting full system upgrade...\n"));
alpm_logaction(config->handle, PACMAN_CALLER_PREFIX,
diff -Naur pacman-5.1.0-orig/test/pacman/ldconfig.stub pacman-5.1.0/test/pacman/ldconfig.stub
--- pacman-5.1.0-orig/test/pacman/ldconfig.stub 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/ldconfig.stub 1970-01-01 03:00:00.000000000 +0300
@@ -1,4 +0,0 @@
-#!/bin/sh
-# A simple stub to copy into the chroot to fake ldconfig.
-# Simply appends a line to /etc/ld.so.cache if called.
-echo "ldconfig called" >> /etc/ld.so.cache
diff -Naur pacman-5.1.0-orig/test/pacman/pactest.py pacman-5.1.0/test/pacman/pactest.py
--- pacman-5.1.0-orig/test/pacman/pactest.py 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/test/pacman/pactest.py 2018-06-21 13:36:21.136744900 +0300
@@ -94,9 +94,6 @@
parser.add_option("--scriptlet-shell", type = "string",
dest = "scriptletshell", default = "/bin/sh",
help = "specify path to shell used for install scriptlets")
- parser.add_option("--ldconfig", type = "string",
- dest = "ldconfig", default = "/sbin/ldconfig",
- help = "specify path to ldconfig")
parser.add_option("--review", action = "store_true",
dest = "review", default = False,
help = "review test files, test output, and saved logs")
@@ -135,7 +132,6 @@
env.pacman["valgrind"] = opts.valgrind
env.pacman["manual-confirm"] = opts.manualconfirm
env.pacman["scriptlet-shell"] = opts.scriptletshell
- env.pacman["ldconfig"] = opts.ldconfig
env.config["gpg"] = not opts.missing_gpg
env.config["nls"] = not opts.missing_nls
env.config["curl"] = not opts.missing_curl
diff -Naur pacman-5.1.0-orig/test/pacman/pmtest.py pacman-5.1.0/test/pacman/pmtest.py
--- pacman-5.1.0-orig/test/pacman/pmtest.py 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/test/pacman/pmtest.py 2018-06-21 12:53:58.942056300 +0300
@@ -127,12 +127,10 @@
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")
- ldconfig = os.path.basename(pacman["ldconfig"])
- ldconfigdir = os.path.join(self.root, os.path.dirname(pacman["ldconfig"][1:]))
shell = pacman["scriptlet-shell"][1:]
shelldir = os.path.join(self.root, os.path.dirname(shell))
sys_dirs = [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir, bindir,
- ldconfigdir, shelldir]
+ shelldir]
for sys_dir in sys_dirs:
if not os.path.isdir(sys_dir):
vprint("\t%s" % sys_dir[len(self.root)+1:])
@@ -141,10 +139,6 @@
shutil.copy("/bin/sh", bindir)
if shell != "bin/sh":
shutil.copy("/bin/sh", os.path.join(self.root, shell))
- shutil.copy(os.path.join(util.SELFPATH, "ldconfig.stub"),
- os.path.join(ldconfigdir, ldconfig))
- ld_so_conf = open(os.path.join(etcdir, "ld.so.conf"), "w")
- ld_so_conf.close()
# Configuration file
vprint(" Creating configuration file")
@@ -228,19 +222,6 @@
vprint("\tpacman %s" % self.args)
@@ -1357,60 +891,3 @@ diff -Naur pacman-5.1.0-orig/test/pacman/pmtest.py pacman-5.1.0/test/pacman/pmte
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
time_end = time.time()
vprint("\ttime elapsed: %.2fs" % (time_end - time_start))
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig001.py pacman-5.1.0/test/pacman/tests/ldconfig001.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig001.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig001.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
-self.description = "Make sure ldconfig runs on an upgrade operation"
-
-p = pmpkg("dummy")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig002.py pacman-5.1.0/test/pacman/tests/ldconfig002.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig002.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig002.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,13 +0,0 @@
-self.description = "Make sure ldconfig runs on an upgrade operation"
-
-lp = pmpkg("dummy")
-self.addpkg2db("local", lp)
-
-p = pmpkg("dummy", "1.0-2")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=dummy|1.0-2")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig003.py pacman-5.1.0/test/pacman/tests/ldconfig003.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig003.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig003.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
-self.description = "Make sure ldconfig runs on a sync operation"
-
-sp = pmpkg("dummy")
-self.addpkg2db("sync", sp)
-
-self.args = "-S %s" % sp.name
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/TESTS pacman-5.1.0/test/pacman/tests/TESTS
--- pacman-5.1.0-orig/test/pacman/tests/TESTS 2018-03-18 05:51:17.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/TESTS 2018-06-21 12:53:58.942056300 +0300
@@ -78,9 +78,6 @@
TESTS += test/pacman/tests/ignore006.py
TESTS += test/pacman/tests/ignore007.py
TESTS += test/pacman/tests/ignore008.py
-TESTS += test/pacman/tests/ldconfig001.py
-TESTS += test/pacman/tests/ldconfig002.py
-TESTS += test/pacman/tests/ldconfig003.py
TESTS += test/pacman/tests/mode001.py
TESTS += test/pacman/tests/mode002.py
TESTS += test/pacman/tests/mode003.py

View File

@@ -0,0 +1,292 @@
diff -Naur pacman-5.1.0-orig/src/pacman/sighandler.c pacman-5.1.0/src/pacman/sighandler.c
--- pacman-5.1.0-orig/src/pacman/sighandler.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/src/pacman/sighandler.c 2018-06-21 12:53:58.922056300 +0300
@@ -21,6 +21,10 @@
#include <signal.h>
#include <unistd.h>
+#ifdef __MSYS__
+#include <termios.h>
+#endif
+
#include <alpm.h>
#include "conf.h"
@@ -44,6 +48,9 @@
*/
static void soft_interrupt_handler(int signum)
{
+#ifdef __MSYS__
+ struct termios term;
+#endif
if(signum == SIGINT) {
const char msg[] = "\nInterrupt signal received\n";
xwrite(STDERR_FILENO, msg, ARRAYSIZE(msg) - 1);
@@ -56,6 +63,13 @@
return;
}
alpm_unlock(config->handle);
+#ifdef __MSYS__
+ /* restore input printing possibly disabled by core update */
+ if(tcgetattr(STDIN_FILENO, &term) == 0) {
+ term.c_lflag |= ECHO;
+ tcsetattr(STDIN_FILENO, TCSAFLUSH, &term);
+ }
+#endif
/* output a newline to be sure we clear any line we may be on */
xwrite(STDOUT_FILENO, "\n", 1);
_Exit(128 + signum);
diff -Naur pacman-5.1.0-orig/src/pacman/sync.c pacman-5.1.0/src/pacman/sync.c
--- pacman-5.1.0-orig/src/pacman/sync.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/src/pacman/sync.c 2018-06-21 13:35:38.316684900 +0300
@@ -28,6 +28,12 @@
#include <sys/stat.h>
#include <fnmatch.h>
+#ifdef __MSYS__
+#include <termios.h>
+#include <handle.h>
+#include <trans.h>
+#endif
+
#include <alpm.h>
#include <alpm_list.h>
@@ -680,8 +686,131 @@
return ret;
}
+#ifdef __MSYS__
+
+/* Tries to kill all cygwin processes except this one */
+static int kill_all_other_msys_processes() {
+ DIR *dir;
+ struct dirent *ent;
+ char self_winpid[50];
+ int found_one = 0;
+ FILE *self = NULL;
+ size_t proc_entries = 0;
+ char **args = NULL;
+ size_t pos = 0;
+
+ self = fopen("/proc/self/winpid", "r");
+ if (self == NULL)
+ return -1;
+ fscanf(self, "%s", self_winpid);
+ fclose(self);
+
+ dir = opendir("/proc");
+ if (dir == NULL)
+ return -1;
+
+ while (ent = readdir(dir))
+ proc_entries++;
+ seekdir(dir, 0);
+
+ args = alloca(sizeof(char *) * (2 + (proc_entries * 2) + 1));
+ args[pos++] = "taskkill";
+ args[pos++] = "/F";
+
+ while (ent = readdir (dir)) {
+ FILE *fp = NULL;
+ char winpid_path[PATH_MAX];
+
+ strcpy(winpid_path, "/proc/");
+ strcat(winpid_path, ent->d_name);
+ strcat(winpid_path, "/winpid");
+
+ fp = fopen(winpid_path, "r");
+ if (fp != NULL) {
+ char winpid[50];
+ fscanf(fp, "%s", winpid);
+
+ if (strcmp(winpid, self_winpid) != 0) {
+ args[pos++] = "/pid";
+ char *pidarg = alloca(strlen(winpid) + 1);
+ strcpy(pidarg, winpid);
+ args[pos++] = pidarg;
+ found_one = 1;
+ }
+
+ fclose(fp);
+ }
+ }
+ args[pos] = NULL;
+ closedir(dir);
+
+ if (!found_one)
+ return 0;
+
+ setenv("MSYS2_ARG_CONV_EXCL", "*", 1);
+ if (execvp(args[0], args) == -1) {
+ return -1;
+ }
+
+ return 0;
+}
+
+static int core_update(int *needed)
+{
+ int retval;
+ alpm_list_t *i;
+ alpm_list_t *core = NULL;
+
+ colon_printf(_("Starting core system upgrade...\n"));
+ alpm_logaction(config->handle, PACMAN_CALLER_PREFIX,
+ "starting core system upgrade\n");
+
+ if(alpm_sync_sysupgrade_core(config->handle, config->op_s_upgrade >= 2) == -1) {
+ pm_printf(ALPM_LOG_ERROR, "%s\n", alpm_strerror(alpm_errno(config->handle)));
+ trans_release();
+ return 1;
+ }
+
+ *needed = 0;
+ for(i = alpm_trans_get_add(config->handle); i; i = i->next) {
+ alpm_pkg_t *pkg = i->data;
+ if (alpm_pkg_is_core_package(pkg)) {
+ core = alpm_list_add(core, pkg);
+ *needed = 1;
+ }
+ }
+
+ if(!(*needed)) {
+ if (!config->print) {
+ printf(_(" there is nothing to do\n"));
+ }
+ return 0;
+ }
+
+ config->handle->trans->add = core;
+ pm_printf(ALPM_LOG_WARNING, _("terminate other MSYS2 programs before proceeding\n"));
+ retval = sync_prepare_execute();
+ if(retval == 0) {
+ int response = 0;
+ do {
+ response = yesno(_("To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed"));
+ } while(!response);
+
+ if (kill_all_other_msys_processes() != 0) {
+ pm_printf(ALPM_LOG_WARNING, _("terminating MSYS2 processes failed\n"));
+ exit(1);
+ }
+ exit(0);
+ }
+ return retval;
+}
+#endif
+
static int sync_trans(alpm_list_t *targets)
{
+#ifdef __MSYS__
+ int found_core_updates = 0;
+#endif
int retval = 0;
alpm_list_t *i;
@@ -695,6 +767,14 @@
}
if(config->op_s_upgrade) {
+#ifdef __MSYS__
+ if(retval = core_update(&found_core_updates)) {
+ return retval;
+ }
+ if(found_core_updates) {
+ return retval;
+ }
+#endif
if(!config->print) {
colon_printf(_("Starting full system upgrade...\n"));
alpm_logaction(config->handle, PACMAN_CALLER_PREFIX,
diff -Naur pacman-5.1.0-orig/lib/libalpm/alpm.h pacman-5.1.0/lib/libalpm/alpm.h
--- pacman-5.1.0-orig/lib/libalpm/alpm.h 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/alpm.h 2018-06-21 12:53:58.842056200 +0300
@@ -1558,6 +1558,15 @@
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade);
+#ifdef __MSYS__
+int alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade);
+
+/** Informs whether a package is a core package.
+ * @param pkg the package to check
+ * @return non-zero if this is a core package, zero otherwise
+ */
+int alpm_pkg_is_core_package(const alpm_pkg_t *pkg);
+#endif
/** Add a package to the transaction.
* If the package was loaded by alpm_pkg_load(), it will be freed upon
diff -Naur pacman-5.1.0-orig/lib/libalpm/package.c pacman-5.1.0/lib/libalpm/package.c
--- pacman-5.1.0-orig/lib/libalpm/package.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/package.c 2018-06-21 12:59:13.842497200 +0300
@@ -805,3 +805,19 @@
return 0;
}
+
+#ifdef __MSYS__
+int SYMEXPORT alpm_pkg_is_core_package(const alpm_pkg_t *pkg)
+{
+ if (pkg == NULL)
+ return 0;
+ return
+ strcmp(pkg->name, "bash") == 0 ||
+ strcmp(pkg->name, "filesystem") == 0 ||
+ strcmp(pkg->name, "mintty") == 0 ||
+ strcmp(pkg->name, "msys2-runtime") == 0 ||
+ strcmp(pkg->name, "msys2-runtime-devel") == 0 ||
+ strcmp(pkg->name, "pacman") == 0 ||
+ strcmp(pkg->name, "pacman-mirrors") == 0;
+}
+#endif
diff -Naur pacman-5.1.0-orig/lib/libalpm/sync.c pacman-5.1.0/lib/libalpm/sync.c
--- pacman-5.1.0-orig/lib/libalpm/sync.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/sync.c 2018-06-21 12:53:58.852056200 +0300
@@ -200,7 +200,12 @@
}
/** 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)
+#else
int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
+#endif
{
alpm_list_t *i, *j;
alpm_trans_t *trans;
@@ -214,6 +219,13 @@
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) {
alpm_pkg_t *lpkg = i->data;
+#ifdef __MSYS__
+ /* Skip regular packages in core update, and core packages in regular update */
+ if(core_update != alpm_pkg_is_core_package(lpkg)) {
+ continue;
+ }
+#endif
+
if(alpm_pkg_find(trans->remove, lpkg->name)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "%s is marked for removal -- skipping\n", lpkg->name);
continue;
@@ -255,6 +267,18 @@
return 0;
}
+#ifdef __MSYS__
+int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
+{
+ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 0);
+}
+
+int SYMEXPORT alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade)
+{
+ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 1);
+}
+#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.

View File

@@ -0,0 +1,216 @@
diff -Naur pacman-5.1.0-orig/lib/libalpm/add.c pacman-5.1.0/lib/libalpm/add.c
--- pacman-5.1.0-orig/lib/libalpm/add.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/add.c 2018-06-21 12:53:58.832056200 +0300
@@ -656,7 +658,10 @@
int _alpm_upgrade_packages(alpm_handle_t *handle)
{
size_t pkg_count, pkg_current;
- int skip_ldconfig = 0, ret = 0;
+#ifndef __MSYS__
+ int skip_ldconfig = 0;
+#endif
+ int ret = 0;
alpm_list_t *targ;
alpm_trans_t *trans = handle->trans;
@@ -679,18 +684,22 @@
/* something screwed up on the commit, abort the trans */
trans->state = STATE_INTERRUPTED;
handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+#ifndef __MSYS__
/* running ldconfig at this point could possibly screw system */
skip_ldconfig = 1;
+#endif
ret = -1;
}
pkg_current++;
}
+#ifndef __MSYS__
if(!skip_ldconfig) {
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
}
+#endif
return ret;
}
diff -Naur pacman-5.1.0-orig/lib/libalpm/remove.c pacman-5.1.0/lib/libalpm/remove.c
--- pacman-5.1.0-orig/lib/libalpm/remove.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/remove.c 2018-06-21 12:53:58.852056200 +0300
@@ -772,18 +772,22 @@
if(_alpm_remove_single_package(handle, pkg, NULL,
targ_count, pkg_count) == -1) {
handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+#ifndef __MSYS__
/* running ldconfig at this point could possibly screw system */
run_ldconfig = 0;
+#endif
ret = -1;
}
targ_count++;
}
+#ifndef __MSYS__
if(run_ldconfig) {
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
}
+#endif
return ret;
}
diff -Naur pacman-5.1.0-orig/lib/libalpm/util.c pacman-5.1.0/lib/libalpm/util.c
--- pacman-5.1.0-orig/lib/libalpm/util.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/util.c 2018-06-21 12:53:58.852056200 +0300
@@ -743,6 +743,7 @@
return retval;
}
+#ifndef __MSYS__
/** Run ldconfig in a chroot.
* @param handle the context handle
* @return 0 on success, 1 on error
@@ -766,6 +767,7 @@
return 0;
}
+#endif
/** Helper function for comparing strings using the alpm "compare func"
* signature.
diff -Naur pacman-5.1.0-orig/test/pacman/ldconfig.stub pacman-5.1.0/test/pacman/ldconfig.stub
--- pacman-5.1.0-orig/test/pacman/ldconfig.stub 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/ldconfig.stub 1970-01-01 03:00:00.000000000 +0300
@@ -1,4 +0,0 @@
-#!/bin/sh
-# A simple stub to copy into the chroot to fake ldconfig.
-# Simply appends a line to /etc/ld.so.cache if called.
-echo "ldconfig called" >> /etc/ld.so.cache
diff -Naur pacman-5.1.0-orig/test/pacman/pactest.py pacman-5.1.0/test/pacman/pactest.py
--- pacman-5.1.0-orig/test/pacman/pactest.py 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/test/pacman/pactest.py 2018-06-21 13:36:21.136744900 +0300
@@ -94,9 +94,6 @@
parser.add_option("--scriptlet-shell", type = "string",
dest = "scriptletshell", default = "/bin/sh",
help = "specify path to shell used for install scriptlets")
- parser.add_option("--ldconfig", type = "string",
- dest = "ldconfig", default = "/sbin/ldconfig",
- help = "specify path to ldconfig")
parser.add_option("--review", action = "store_true",
dest = "review", default = False,
help = "review test files, test output, and saved logs")
@@ -135,7 +132,6 @@
env.pacman["valgrind"] = opts.valgrind
env.pacman["manual-confirm"] = opts.manualconfirm
env.pacman["scriptlet-shell"] = opts.scriptletshell
- env.pacman["ldconfig"] = opts.ldconfig
env.config["gpg"] = not opts.missing_gpg
env.config["nls"] = not opts.missing_nls
env.config["curl"] = not opts.missing_curl
diff -Naur pacman-5.1.0-orig/test/pacman/pmtest.py pacman-5.1.0/test/pacman/pmtest.py
--- pacman-5.1.0-orig/test/pacman/pmtest.py 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/test/pacman/pmtest.py 2018-06-21 12:53:58.942056300 +0300
@@ -127,12 +127,10 @@
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")
- ldconfig = os.path.basename(pacman["ldconfig"])
- ldconfigdir = os.path.join(self.root, os.path.dirname(pacman["ldconfig"][1:]))
shell = pacman["scriptlet-shell"][1:]
shelldir = os.path.join(self.root, os.path.dirname(shell))
sys_dirs = [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir, bindir,
- ldconfigdir, shelldir]
+ shelldir]
for sys_dir in sys_dirs:
if not os.path.isdir(sys_dir):
vprint("\t%s" % sys_dir[len(self.root)+1:])
@@ -141,10 +139,6 @@
shutil.copy("/bin/sh", bindir)
if shell != "bin/sh":
shutil.copy("/bin/sh", os.path.join(self.root, shell))
- shutil.copy(os.path.join(util.SELFPATH, "ldconfig.stub"),
- os.path.join(ldconfigdir, ldconfig))
- ld_so_conf = open(os.path.join(etcdir, "ld.so.conf"), "w")
- ld_so_conf.close()
# Configuration file
vprint(" Creating configuration file")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig001.py pacman-5.1.0/test/pacman/tests/ldconfig001.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig001.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig001.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
-self.description = "Make sure ldconfig runs on an upgrade operation"
-
-p = pmpkg("dummy")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig002.py pacman-5.1.0/test/pacman/tests/ldconfig002.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig002.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig002.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,13 +0,0 @@
-self.description = "Make sure ldconfig runs on an upgrade operation"
-
-lp = pmpkg("dummy")
-self.addpkg2db("local", lp)
-
-p = pmpkg("dummy", "1.0-2")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=dummy|1.0-2")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/ldconfig003.py pacman-5.1.0/test/pacman/tests/ldconfig003.py
--- pacman-5.1.0-orig/test/pacman/tests/ldconfig003.py 2017-12-13 13:47:39.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/ldconfig003.py 1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
-self.description = "Make sure ldconfig runs on a sync operation"
-
-sp = pmpkg("dummy")
-self.addpkg2db("sync", sp)
-
-self.args = "-S %s" % sp.name
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("FILE_EXIST=etc/ld.so.cache")
diff -Naur pacman-5.1.0-orig/test/pacman/tests/TESTS pacman-5.1.0/test/pacman/tests/TESTS
--- pacman-5.1.0-orig/test/pacman/tests/TESTS 2018-03-18 05:51:17.000000000 +0300
+++ pacman-5.1.0/test/pacman/tests/TESTS 2018-06-21 12:53:58.942056300 +0300
@@ -78,9 +78,6 @@
TESTS += test/pacman/tests/ignore006.py
TESTS += test/pacman/tests/ignore007.py
TESTS += test/pacman/tests/ignore008.py
-TESTS += test/pacman/tests/ldconfig001.py
-TESTS += test/pacman/tests/ldconfig002.py
-TESTS += test/pacman/tests/ldconfig003.py
TESTS += test/pacman/tests/mode001.py
TESTS += test/pacman/tests/mode002.py
TESTS += test/pacman/tests/mode003.py
--- pacman-5.2.1/test/pacman/meson.build.orig 2019-08-12 03:26:54.000000000 +0200
+++ pacman-5.2.1/test/pacman/meson.build 2020-05-16 17:14:19.986575000 +0200
@@ -79,9 +79,6 @@
'tests/ignore006.py',
'tests/ignore007.py',
'tests/ignore008.py',
- 'tests/ldconfig001.py',
- 'tests/ldconfig002.py',
- 'tests/ldconfig003.py',
'tests/mode001.py',
'tests/mode002.py',
'tests/mode003.py',
@@ -336,7 +333,6 @@
join_paths(meson.current_source_dir(), 'pactest.py'),
'--scriptlet-shell', get_option('scriptlet-shell'),
'--bindir', meson.build_root(),
- '--ldconfig', LDCONFIG,
'--verbose',
join_paths(meson.current_source_dir(), input)
]

View File

@@ -0,0 +1,40 @@
diff -Naur pacman-5.1.0-orig/lib/libalpm/version.c pacman-5.1.0/lib/libalpm/version.c
--- pacman-5.1.0-orig/lib/libalpm/version.c 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/lib/libalpm/version.c 2018-06-21 12:53:58.862056200 +0300
@@ -50,7 +50,11 @@
/* se points to version terminator */
se = strrchr(s, '-');
+#ifdef __MSYS__
+ if(*s == '~') {
+#else
if(*s == ':') {
+#endif
epoch = evr;
*s++ = '\0';
version = s;
@@ -250,7 +254,7 @@
return 0;
}
- /* Parse both versions into [epoch:]version[-release] triplets. We probably
+ /* Parse both versions into [epoch:|~]version[-release] triplets. We probably
* don't need epoch and release to support all the same magic, but it is
* easier to just run it all through the same code. */
full1 = strdup(a);
diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/util/pkgbuild.sh.in pacman-5.1.0/scripts/libmakepkg/util/pkgbuild.sh.in
--- pacman-5.1.0-orig/scripts/libmakepkg/util/pkgbuild.sh.in 2018-05-12 16:15:04.000000000 +0300
+++ pacman-5.1.0/scripts/libmakepkg/util/pkgbuild.sh.in 2018-06-21 12:53:58.872056200 +0300
@@ -149,7 +149,11 @@
##
get_full_version() {
if (( epoch > 0 )); then
- printf "%s\n" "$epoch:$pkgver-$pkgrel"
+ if [[ -n $MSYSTEM ]]; then
+ printf "%s\n" "${epoch}~${pkgver}-${pkgrel}"
+ else
+ printf "%s\n" "$epoch:$pkgver-$pkgrel"
+ fi
else
printf "%s\n" "$pkgver-$pkgrel"
fi

View File

@@ -1,24 +0,0 @@
MSYS2 doesn't use ldconfig. Most of the patching is currently done in
0000-pacman-msysize.patch, these are just some new occurrences. Ideally this
removal of ldconfig will be a completely separate patch in the future.
--- pacman-5.2.1/test/pacman/meson.build.orig 2019-08-12 03:26:54.000000000 +0200
+++ pacman-5.2.1/test/pacman/meson.build 2020-05-16 17:14:19.986575000 +0200
@@ -79,9 +79,6 @@
'tests/ignore006.py',
'tests/ignore007.py',
'tests/ignore008.py',
- 'tests/ldconfig001.py',
- 'tests/ldconfig002.py',
- 'tests/ldconfig003.py',
'tests/mode001.py',
'tests/mode002.py',
'tests/mode003.py',
@@ -336,7 +333,6 @@
join_paths(meson.current_source_dir(), 'pactest.py'),
'--scriptlet-shell', get_option('scriptlet-shell'),
'--bindir', meson.build_root(),
- '--ldconfig', LDCONFIG,
'--verbose',
join_paths(meson.current_source_dir(), input)
]

View File

@@ -4,7 +4,7 @@
pkgname=pacman
pkgver=5.2.2
pkgrel=6
pkgrel=7
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
arch=('i686' 'x86_64')
url="https://www.archlinux.org/pacman/"
@@ -48,6 +48,9 @@ source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,
"makepkg-mingw"
"0000-pacman-msysize.patch"
"0001-more-debugging-info.patch"
"0002-pacman-core-update.patch"
"0003-remove-ldconfig.patch"
"0004-change-epoch-sep.patch"
"0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch"
"0007-exe-interp-ignore-file-conflict.patch"
"0008-answer-yes-by-default.patch"
@@ -57,7 +60,6 @@ source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,
"0012-workaround-bsdtar-AD-account.patch"
"0013-use-libintl.patch"
"0014-fix-asciidoc-argparse.patch"
"0015-excise-ldconfig.patch"
"0016-excise-fakeroot.patch"
"0017-excise-sudo.patch"
"0018-use-msys-tools.patch"
@@ -74,8 +76,11 @@ sha256sums=('bb201a9f2fb53c28d011f661d50028efce6eef2c1d2a36728bdd0130189349a0'
'c26dba8f9ac285efa33708e58ca29b4ad0fd9a1d6f4e82cbe433782b180799ee'
'b50166ba89277459dcf4c18603e57b387b931e5252068fefcb3d2579ebe2dfa4'
'501c38b95fcb6938c79a4cff11913fa257d1751d1f6ea6c482ce95999c3fd3b3'
'01679ad6c6c5d302d8f239a454cd4eb540bc75192bdf74367778223a23c04924'
'2e2dde573b971011abad5340cb2cd5a4b9a0e8470a2ed94d7a969525e0bed0c1'
'24ea2c8dca37847e04894ebfd05d1cf5df49dc0c8089f5581c99caa19b77a7ef'
'ee65a0087af1cb7778836855f8b417b4bf2cf9a2141589ca0adff1e57b53af61'
'fa6056f2d998578f8e11a97adf4d8a7bb4bba6f75b65aa498c82198ed9da9841'
'27722ec2eca505a5dea5567de887a2efeec6c2409b2da911649a6908ba21e60e'
'e2731c4007a7c78848679e2203c35d1e56d3ef15a7586aeac9cc9e6e97824cfb'
'52343bbf99da6408950e34dd84319e34724040f866c497c25e36b4ee54030e82'
'e4f6e17af19e17e745a9f1c6b8402f5896229062c82167cb61f8e7d29eda716c'
@@ -85,7 +90,6 @@ sha256sums=('bb201a9f2fb53c28d011f661d50028efce6eef2c1d2a36728bdd0130189349a0'
'c242202f3526d5eaa21d321a1d0fa472697c50e8288175ebe93212356c78d1f1'
'7cec4688b83df9f8ab56f5ab5e162383fe8928ff88b76d753a2cea935f30ec93'
'b84310fd8fb9a98258c55ed9628226b14f55d6e42304df4d2a5bd8d8445c03b3'
'72195958662ebe3da2c4df5293caa130c19caad8042b6169d8aa3080287cfe42'
'd6b6accddc890aff38b5ded3300e9dde35e1d7ed3f767e1655772e2cc7871739'
'8346a5799be41bd3524fa6fdc57b6175d9d6a00b366f99bd5cd7fa3d43d0ae98'
'7f60108a372718cfec5d883167a33983be7c5df33fc48bfc21f664449ac7a0a4'
@@ -95,6 +99,9 @@ prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 -i ${srcdir}/0000-pacman-msysize.patch
patch -p1 -i ${srcdir}/0001-more-debugging-info.patch
patch -p1 -i ${srcdir}/0002-pacman-core-update.patch
patch -p1 -i ${srcdir}/0003-remove-ldconfig.patch
patch -p1 -i ${srcdir}/0004-change-epoch-sep.patch
patch -p1 -i ${srcdir}/0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch
patch -p1 -i ${srcdir}/0007-exe-interp-ignore-file-conflict.patch
patch -p1 -i ${srcdir}/0008-answer-yes-by-default.patch
@@ -104,7 +111,6 @@ prepare() {
patch -p1 -i ${srcdir}/0012-workaround-bsdtar-AD-account.patch
patch -p1 -i ${srcdir}/0013-use-libintl.patch
patch -p1 -i ${srcdir}/0014-fix-asciidoc-argparse.patch
patch -p1 -i ${srcdir}/0015-excise-ldconfig.patch
patch -p1 -i ${srcdir}/0016-excise-fakeroot.patch
patch -p1 -i ${srcdir}/0017-excise-sudo.patch
patch -p1 -i ${srcdir}/0018-use-msys-tools.patch