pacman: build cleanup

Remove unused patches
Remove autotools related patches
Remove commented out code
Some minor cleanup
This commit is contained in:
Christoph Reiter
2020-12-19 12:18:23 +01:00
parent 893b480c32
commit 3fad577cd5
7 changed files with 339 additions and 1102 deletions

View File

@@ -1,29 +1,3 @@
diff -Naur pacman-5.1.0-orig/configure.ac pacman-5.1.0/configure.ac
--- pacman-5.1.0-orig/configure.ac 2018-05-28 02:30:55.000000000 +0300
+++ pacman-5.1.0/configure.ac 2018-06-21 12:55:30.712184800 +0300
@@ -114,12 +114,6 @@
[set the full path to the shell used to run install scriptlets]),
[SCRIPTLET_SHELL=$withval], [SCRIPTLET_SHELL=/bin/sh])
-# Help line for ldconfig path
-AC_ARG_WITH(ldconfig,
- AS_HELP_STRING([--with-ldconfig=path],
- [set the full path to ldconfig]),
- [LDCONFIG=$withval], [LDCONFIG=/sbin/ldconfig])
-
# Help line for determining whether file is seccomp-enabled
AC_ARG_WITH(file-seccomp,
AS_HELP_STRING([--with-file-seccomp={yes|no|auto}],
@@ -520,9 +514,6 @@
# Set shell used by install scriptlets
AC_SUBST(SCRIPTLET_SHELL)
AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the shell used to run install scriptlets])
-# Set ldconfig path
-AC_SUBST(LDCONFIG)
-AC_DEFINE_UNQUOTED([LDCONFIG], "$LDCONFIG", [The full path to ldconfig])
# Configuration files
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
@@ -238,17 +212,6 @@ diff -Naur pacman-5.1.0-orig/lib/libalpm/version.c pacman-5.1.0/lib/libalpm/vers
* 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/Makefile.am pacman-5.1.0/Makefile.am
--- pacman-5.1.0-orig/Makefile.am 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/Makefile.am 2018-06-21 12:53:58.862056200 +0300
@@ -47,7 +47,6 @@
PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py
AM_PY_LOG_FLAGS = \
--scriptlet-shell $(SCRIPTLET_SHELL) \
- --ldconfig $(LDCONFIG) \
--bindir $(top_builddir)/src/pacman \
--bindir $(top_builddir)/scripts
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
@@ -539,39 +502,6 @@ diff -Naur pacman-5.1.0-orig/scripts/libmakepkg/utils_fixed_path.sh.in pacman-5.
+ }'
+ done
+fi
diff -Naur pacman-5.1.0-orig/scripts/Makefile.am pacman-5.1.0/scripts/Makefile.am
--- pacman-5.1.0-orig/scripts/Makefile.am 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/scripts/Makefile.am 2018-06-21 13:03:17.873838900 +0300
@@ -56,12 +56,10 @@
libmakepkg/executable/ccache.sh \
libmakepkg/executable/checksum.sh \
libmakepkg/executable/distcc.sh \
- libmakepkg/executable/fakeroot.sh \
libmakepkg/executable/gpg.sh \
libmakepkg/executable/gzip.sh \
libmakepkg/executable/pacman.sh \
libmakepkg/executable/strip.sh \
- libmakepkg/executable/sudo.sh \
libmakepkg/executable/vcs.sh \
libmakepkg/buildenv.sh \
libmakepkg/buildenv/buildflags.sh \
@@ -124,6 +124,7 @@
libmakepkg/tidy/staticlibs.sh \
libmakepkg/tidy/strip.sh \
libmakepkg/tidy/zipman.sh \
+ libmakepkg/utils_fixed_path.sh \
libmakepkg/util.sh \
libmakepkg/util/compress.sh \
libmakepkg/util/config.sh \
@@ -246,7 +246,7 @@
$(MKDIR_P) $(DESTDIR)$(bashcompdir)
$(INSTALL_DATA) completion/bash_completion $(DESTDIR)/$(bashcompdir)/pacman
for completion in makepkg pacman-key; do \
- $(LN_S) pacman $(DESTDIR)/$(bashcompdir)/$$completion; \
+ $(LN_S) $(DESTDIR)/$(bashcompdir)/pacman $(DESTDIR)/$(bashcompdir)/$$completion; \
done
$(MKDIR_P) $(DESTDIR)$(datarootdir)/zsh/site-functions/
$(INSTALL_DATA) completion/zsh_completion $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
diff -Naur pacman-5.1.0-orig/scripts/makepkg.sh.in pacman-5.1.0/scripts/makepkg.sh.in
--- pacman-5.1.0-orig/scripts/makepkg.sh.in 2018-05-23 08:27:19.000000000 +0300
+++ pacman-5.1.0/scripts/makepkg.sh.in 2018-06-21 13:21:37.158378000 +0300
@@ -1346,15 +1276,6 @@ diff -Naur pacman-5.1.0-orig/test/pacman/ldconfig.stub pacman-5.1.0/test/pacman/
-# 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/Makefile.am pacman-5.1.0/test/pacman/Makefile.am
--- pacman-5.1.0-orig/test/pacman/Makefile.am 2018-05-14 03:02:18.000000000 +0300
+++ pacman-5.1.0/test/pacman/Makefile.am 2018-06-21 12:53:58.932056300 +0300
@@ -17,5 +17,4 @@
README \
TODO \
ChangeLog \
- ldconfig.stub \
$(check_SCRIPTS)
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

View File

@@ -1,609 +0,0 @@
From 843c05e513e05e528d220ef307be4c7c8bd70506 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sun, 15 Jun 2014 16:11:54 +0100
Subject: [PATCH 2/4] Add util-msys2.{c,h} and rebase-db-msys2.{c,}
.. From Cygwin's rebase program. Will be used for rebasing
when installing in chroots when making new installer releases.
---
lib/libalpm/Makefile.am | 2 +
lib/libalpm/rebase-db-msys2.c | 137 ++++++++++++++++++++++++++
lib/libalpm/rebase-db-msys2.h | 85 ++++++++++++++++
lib/libalpm/util-msys2.c | 218 ++++++++++++++++++++++++++++++++++++++++++
lib/libalpm/util-msys2.h | 20 ++++
lib/libalpm/util.c | 2 +-
src/pacman/conf.h | 2 +
src/pacman/pacman.c | 3 +
src/pacman/sync.c | 21 ++++
9 files changed, 489 insertions(+), 1 deletion(-)
create mode 100644 lib/libalpm/rebase-db-msys2.c
create mode 100644 lib/libalpm/rebase-db-msys2.h
create mode 100644 lib/libalpm/util-msys2.c
create mode 100644 lib/libalpm/util-msys2.h
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index f66daed..1649814 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -53,6 +53,8 @@ libalpm_la_SOURCES = \
trans.h trans.c \
util.h util.c \
util-common.h util-common.c \
+ util-msys2.h util-msys2.c \
+ rebase-db-msys2.h rebase-db-msys2.c \
version.c
if !HAVE_LIBSSL
diff --git a/lib/libalpm/rebase-db-msys2.c b/lib/libalpm/rebase-db-msys2.c
new file mode 100644
index 0000000..d6a6cb7
--- /dev/null
+++ b/lib/libalpm/rebase-db-msys2.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2011 Corinna Vinschen
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See the COPYING file for full license information.
+ */
+#include "rebase-db-msys2.h"
+
+#include <inttypes.h>
+
+const char IMG_INFO_MAGIC[4] = "rBiI";
+const ULONG IMG_INFO_VERSION = 1;
+
+size_t
+get_rebasedb_filename(char *result, size_t maxlen)
+{
+ size_t requiredlen = strlen ("/etc/rebase.db.x86_64") + 1;
+ if (result == NULL) {
+ return requiredlen;
+ }
+ strncpy(result, "/etc/rebase.db.x86_64", maxlen-1);
+ result[maxlen-1] = '\0';
+ return requiredlen;
+}
+
+int
+img_info_cmp (const void *a, const void *b)
+{
+ ULONG64 abase = ((img_info_t *) a)->base;
+ ULONG64 bbase = ((img_info_t *) b)->base;
+
+ if (abase < bbase)
+ return -1;
+ if (abase > bbase)
+ return 1;
+ return strcmp (((img_info_t *) a)->name, ((img_info_t *) b)->name);
+}
+
+int
+img_info_name_cmp (const void *a, const void *b)
+{
+ return strcmp (((img_info_t *) a)->name, ((img_info_t *) b)->name);
+}
+
+void
+dump_rebasedb_header (FILE *f, img_info_hdr_t const *h)
+{
+ if (h == NULL)
+ {
+ fprintf (f, "Rebase DB Header is null\n");
+ return;
+ }
+
+ fprintf (f,
+ "Header\n"
+ " magic : %c%c%c%c\n"
+ " machine: %s\n"
+ " version: %d\n"
+ " base : 0x%0*" PRIx64 "\n"
+ " offset : 0x%08x\n"
+ " downflg: %s\n"
+ " count : %d\n",
+ h->magic[0], h->magic[1], h->magic[2], h->magic[3],
+ (h->machine == IMAGE_FILE_MACHINE_I386
+ ? "i386"
+ : (h->machine == IMAGE_FILE_MACHINE_AMD64
+ ? "x86_64"
+ : "unknown")),
+ h->version,
+ (h->machine == IMAGE_FILE_MACHINE_I386 ? 8 : 12),
+ (uint64_t) h->base,
+ (uint32_t) h->offset,
+ (h->down_flag ? "true" : "false"),
+ (uint32_t) h->count);
+}
+
+void
+dump_rebasedb_entry (FILE *f,
+ img_info_hdr_t const *h,
+ img_info_t const *entry)
+{
+ if (h == NULL)
+ {
+ fprintf (f, "Rebase DB Header is null\n");
+ return;
+ }
+ if (entry == NULL)
+ {
+ fprintf (f, "Rebase DB Entry is null\n");
+ return;
+ }
+ fprintf (f,
+ "%-*s base 0x%0*" PRIx64 " size 0x%08x slot 0x%08x %c\n",
+ h->machine == IMAGE_FILE_MACHINE_I386 ? 45 : 41,
+ entry->name,
+ h->machine == IMAGE_FILE_MACHINE_I386 ? 8 : 12,
+ (uint64_t) entry->base,
+ (uint32_t) entry->size,
+ (uint32_t) entry->slot_size,
+ entry->flag.needs_rebasing ? '*' : ' ');
+}
+
+void
+dump_rebasedb (FILE *f, img_info_hdr_t const *h,
+ img_info_t const *list, unsigned int sz)
+{
+ unsigned int i;
+ if (h == NULL)
+ {
+ fprintf (f, "Rebase DB Header is null\n");
+ return;
+ }
+ if (list == NULL)
+ {
+ fprintf (f, "Rebase DB List is null\n");
+ return;
+ }
+
+ dump_rebasedb_header (stdout, h);
+ for (i = 0; i < sz ; ++i)
+ {
+ dump_rebasedb_entry (stdout, h, &(list[i]));
+ }
+}
+
diff --git a/lib/libalpm/rebase-db-msys2.h b/lib/libalpm/rebase-db-msys2.h
new file mode 100644
index 0000000..c4a9f05
--- /dev/null
+++ b/lib/libalpm/rebase-db-msys2.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2011 Corinna Vinschen
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See the COPYING file for full license information.
+ */
+#ifndef REBASE_DB_H
+#define REBASE_DB_H
+
+#include <windows.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+#define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y))
+#define roundup2(x,y) (((x) + (y) - 1) & ~((y) - 1))
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const char IMG_INFO_MAGIC[4];
+extern const ULONG IMG_INFO_VERSION;
+
+#pragma pack (push, 4)
+
+typedef struct _img_info_hdr
+{
+ CHAR magic[4]; /* Always IMG_INFO_MAGIC. */
+ WORD machine; /* IMAGE_FILE_MACHINE_I386/IMAGE_FILE_MACHINE_AMD64 */
+ WORD version; /* Database version, always set to IMG_INFO_VERSION. */
+ ULONG64 base; /* Base address (-b) used to generate database. */
+ ULONG offset; /* Offset (-o) used to generate database. */
+ BOOL down_flag; /* Always TRUE right now. */
+ ULONG count; /* Number of img_info_t entries following header. */
+} img_info_hdr_t;
+
+typedef struct _img_info
+{
+/* union { */
+ PCHAR name; /* Absolute path to DLL. The strings are stored */
+ ULONG64 _filler; /* right after the img_info_t table, in the same */
+/* }; */ /* order as the img_info_t entries. */
+ ULONG name_size; /* Length of name string including trailing NUL. */
+ ULONG64 base; /* Base address the DLL has been rebased to. */
+ ULONG size; /* Size of the DLL at rebased time. */
+ ULONG slot_size; /* Size of the DLL rounded to allocation granularity.*/
+ struct { /* Flags */
+ ULONG needs_rebasing : 1; /* Set to 0 in the database. Used only */
+ /* while rebasing. */
+ ULONG cannot_rebase : 2; /* Set to 0 in the database. Used only */
+ /* while rebasing. */
+ } flag;
+} img_info_t;
+
+#pragma pack (pop)
+
+/* Pass NULL as result to get the length needed. */
+size_t get_rebasedb_filename(char *result, size_t maxlen);
+
+int img_info_cmp (const void *a, const void *b);
+int img_info_name_cmp (const void *a, const void *b);
+
+void dump_rebasedb_header (FILE *f, img_info_hdr_t const *h);
+void dump_rebasedb_entry (FILE *f, img_info_hdr_t const *h,
+ img_info_t const *entry);
+void dump_rebasedb (FILE *f, img_info_hdr_t const *h,
+ img_info_t const *list, unsigned int sz);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/libalpm/util-msys2.c b/lib/libalpm/util-msys2.c
new file mode 100644
index 0000000..116e4d3
--- /dev/null
+++ b/lib/libalpm/util-msys2.c
@@ -0,0 +1,218 @@
+/*
+ * util-msys.c
+ *
+ * Copyright (c) 2014 Ray Donnelly <mingw.android@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <time.h>
+#include <syslog.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/wait.h>
+#include <fnmatch.h>
+#include <sys/fcntl.h>
+
+#include "rebase-db-msys2.h"
+
+#ifdef __x86_64__
+WORD machine = IMAGE_FILE_MACHINE_AMD64;
+#else
+WORD machine = IMAGE_FILE_MACHINE_I386;
+#endif
+ULONG64 image_base = 0;
+BOOL down_flag = FALSE;
+BOOL force_rebase_flag = FALSE;
+BOOL image_oblivious_flag = FALSE;
+/* Added to support MSYS2. If you do not use database mode (-s)
+then the files are not sorted by name. Also, duplicates are
+not removed from the list as a pre-process. Instead, a linear
+search is performed over the already-processed files and if
+the file in question was already done then it is skipped. */
+BOOL obey_order_flag = FALSE;
+ULONG offset = 0;
+
+const char *progname = "pacman";
+
+img_info_t *img_info_list = NULL;
+unsigned int img_info_size = 0;
+unsigned int img_info_rebase_start = 0;
+unsigned int img_info_max_size = 0;
+
+char *db_file = NULL;
+
+/** Loads a database in. */
+int _alpm_load_msys_db(const char *db_name)
+{
+ int fd;
+ ssize_t read_ret;
+ int ret = 0;
+ int i;
+ img_info_hdr_t hdr;
+
+ fd = open (db_file, O_RDONLY | O_BINARY);
+ if (fd < 0)
+ {
+ /* It's no error if the file doesn't exist. However, in this case
+ the -b option is mandatory. */
+ if (errno == ENOENT && image_base)
+ return 0;
+ fprintf (stderr, "%s: failed to open rebase database \"%s\":\n%s\n",
+ progname, db_file, strerror (errno));
+ return -1;
+ }
+ /* First read the header. */
+ if ((read_ret = read (fd, &hdr, sizeof hdr)) != sizeof hdr)
+ {
+ if (read_ret < 0)
+ fprintf (stderr, "%s: failed to read rebase database \"%s\":\n%s\n",
+ progname, db_file, strerror (errno));
+ else
+ fprintf (stderr, "%s: premature end of rebase database \"%s\".\n",
+ progname, db_file);
+ close (fd);
+ return -1;
+ }
+ /* Check the header. */
+ if (memcmp (hdr.magic, IMG_INFO_MAGIC, 4) != 0)
+ {
+ fprintf (stderr, "%s: \"%s\" is not a valid rebase database.\n",
+ progname, db_file);
+ close (fd);
+ return -1;
+ }
+ if (hdr.machine != machine)
+ {
+ if (hdr.machine == IMAGE_FILE_MACHINE_I386)
+ fprintf (stderr,
+ "%s: \"%s\" is a database file for 32 bit DLLs but\n"
+ "I'm started to handle 64 bit DLLs. If you want to handle 32 bit DLLs,\n"
+ "use the -4 option.\n", progname, db_file);
+ else if (hdr.machine == IMAGE_FILE_MACHINE_AMD64)
+ fprintf (stderr,
+ "%s: \"%s\" is a database file for 64 bit DLLs but\n"
+ "I'm started to handle 32 bit DLLs. If you want to handle 64 bit DLLs,\n"
+ "use the -8 option.\n", progname, db_file);
+ else
+ fprintf (stderr, "%s: \"%s\" is a database file for a machine type\n"
+ "I don't know about.", progname, db_file);
+ close (fd);
+ return -1;
+ }
+ if (hdr.version != IMG_INFO_VERSION)
+ {
+ fprintf (stderr, "%s: \"%s\" is a version %u rebase database.\n"
+ "I can only handle versions up to %u.\n",
+ progname, db_file, hdr.version, (uint32_t) IMG_INFO_VERSION);
+ close (fd);
+ return -1;
+ }
+ /* If no new image base has been specified, use the one from the header. */
+ if (image_base == 0)
+ {
+ image_base = hdr.base;
+ down_flag = hdr.down_flag;
+ }
+ if (offset == 0)
+ offset = hdr.offset;
+ /* Don't enforce rebasing if address and offset are unchanged or taken from
+ the file anyway. */
+ if (image_base == hdr.base && offset == hdr.offset)
+ force_rebase_flag = FALSE;
+ img_info_size = hdr.count;
+ /* Allocate memory for the image list. */
+ if (ret == 0)
+ {
+ img_info_max_size = roundup (img_info_size, 100);
+ img_info_list = (img_info_t *) calloc (img_info_max_size,
+ sizeof (img_info_t));
+ if (!img_info_list)
+ {
+ fprintf (stderr, "%s: Out of memory.\n", progname);
+ ret = -1;
+ }
+ }
+ /* Now read the list. */
+ if (ret == 0
+ && (read_ret = read (fd, img_info_list,
+ img_info_size * sizeof (img_info_t)))
+ != img_info_size * sizeof (img_info_t))
+ {
+ if (read_ret < 0)
+ fprintf (stderr, "%s: failed to read rebase database \"%s\":\n%s\n",
+ progname, db_file, strerror (errno));
+ else
+ fprintf (stderr, "%s: premature end of rebase database \"%s\".\n",
+ progname, db_file);
+ ret = -1;
+ }
+ /* Make sure all pointers are NULL. */
+ if (ret == 0)
+ for (i = 0; i < img_info_size; ++i)
+ {
+ img_info_list[i].name = NULL;
+ /* Ensure that existing database entries are not touched when
+ * --oblivious is active, even if they are out-of sync with
+ * reality. */
+ if (image_oblivious_flag)
+ img_info_list[i].flag.cannot_rebase = 2;
+ }
+ /* Eventually read the strings. */
+ if (ret == 0)
+ {
+ for (i = 0; i < img_info_size; ++i)
+ {
+ img_info_list[i].name = (char *)
+ malloc (img_info_list[i].name_size);
+ if (!img_info_list[i].name)
+ {
+ fprintf (stderr, "%s: Out of memory.\n", progname);
+ ret = -1;
+ break;
+ }
+ if ((read_ret = read (fd, img_info_list[i].name,
+ img_info_list[i].name_size))
+ != img_info_list[i].name_size)
+ {
+ if (read_ret < 0)
+ fprintf (stderr, "%s: failed to read rebase database \"%s\": "
+ "%s\n", progname, db_file, strerror (errno));
+ else
+ fprintf (stderr,
+ "%s: premature end of rebase database \"%s\".\n",
+ progname, db_file);
+ ret = -1;
+ break;
+ }
+ }
+ }
+ close (fd);
+ /* On failure, free all allocated memory and set list pointer to NULL. */
+ if (ret < 0)
+ {
+ for (i = 0; i < img_info_size && img_info_list[i].name; ++i)
+ free (img_info_list[i].name);
+ free (img_info_list);
+ img_info_list = NULL;
+ img_info_size = 0;
+ img_info_max_size = 0;
+ }
+ return ret;
+}
+
diff --git a/lib/libalpm/util-msys2.h b/lib/libalpm/util-msys2.h
new file mode 100644
index 0000000..77c97ec
--- /dev/null
+++ b/lib/libalpm/util-msys2.h
@@ -0,0 +1,20 @@
+/*
+ * util-msys.c
+ *
+ * Copyright (c) 2014 Ray Donnelly <mingw.android@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+int _alpm_load_msys_db(const char *db_name);
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index d565fdb..05d24c9 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -307,7 +307,7 @@ char *get_command_line(const char* cmd, char *const argv[])
while (argv[nargs] != NULL) {
len += strlen(argv[nargs++]) + 1;
}
- char *result = malloc(len) + 1;
+ char *result = malloc(len + 1);
strcpy(result, cmd);
strcat(result, " ");
for (size_t arg = 0; arg < nargs; ++arg) {
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index e8cac50..9455f47 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -40,6 +40,7 @@ typedef struct __config_t {
unsigned short verbose;
unsigned short version;
unsigned short help;
+ unsigned short rebase;
unsigned short noconfirm;
unsigned short noprogressbar;
unsigned short logmask;
@@ -167,6 +168,7 @@ enum {
OP_FILE,
OP_PRINT,
OP_QUIET,
+ OP_ROOTREBASE,
OP_ROOT,
OP_RECURSIVE,
OP_SEARCH,
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index b733933..df1ea83 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -461,6 +461,8 @@ static int parsearg_global(int opt)
free(config->dbpath);
config->dbpath = strdup(optarg);
break;
+ case OP_ROOTREBASE:
+ config->rebase = 1;
case OP_ROOT:
case 'r':
free(config->rootdir);
@@ -930,6 +930,7 @@ static int parseargs(int argc, char *argv[])
{"print", no_argument, 0, OP_PRINT},
{"quiet", no_argument, 0, OP_QUIET},
{"root", required_argument, 0, OP_ROOT},
+ {"rootrebase", required_argument, 0, OP_ROOTREBASE},
{"sysroot", required_argument, 0, OP_SYSROOT},
{"recursive", no_argument, 0, OP_RECURSIVE},
{"search", no_argument, 0, OP_SEARCH},
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 4609186..2280938 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -906,6 +906,27 @@ int pacman_sync(alpm_list_t *targets)
return ret;
}
+#if defined(__MSYS__)
+ if (config->rebase) {
+ /* copy the /etc/rebase.db.x86_64 - this shouldn't be here since
+ _alpm_copyfile is private to libalpm; fix this once it is all
+ working correctly. */
+ int _alpm_copyfile(const char *src, const char *dest);
+ size_t get_rebasedb_filename(char *result, size_t maxlen);
+
+ char db_filename_src[260];
+ size_t len = get_rebasedb_filename(&db_filename_src[0], sizeof(db_filename_src));
+ size_t len_root = strlen(config->rootdir);
+ char *db_filename_dst = (char*)alloca(len + len_root + 2);
+ strcpy(db_filename_dst, config->rootdir);
+ if (db_filename_dst[strlen(db_filename_dst)-1] != '/') {
+ strcat(db_filename_dst, "/");
+ }
+ strcat(db_filename_dst, db_filename_src);
+ _alpm_copyfile(db_filename_src, db_filename_dst);
+ }
+#endif
+
if(check_syncdbs(1, 0)) {
return 1;
}
--
2.1.2

View File

@@ -1,38 +0,0 @@
From 6c9e0a1a0ac344103dad19436fd60468a26ac45b Mon Sep 17 00:00:00 2001
From: martell <martellmalone@gmail.com>
Date: Sun, 19 Oct 2014 16:45:35 +0100
Subject: [PATCH 3/4] use busybox for msys2 post installs
---
src/pacman/pacman.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index df1ea83..a15b194 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1024,6 +1024,21 @@ static void cl_to_log(int argc, char *argv[])
*/
int main(int argc, char *argv[])
{
+
+#ifdef __MSYS__
+ char *path = NULL;
+ char *oldpath = getenv("PATH");
+ char *newpath = "/usr/busybox:";
+ int pathsize = 0;
+ if (oldpath)
+ pathsize = strlen(newpath) + strlen(oldpath);
+ if (pathsize)
+ path = alloca(pathsize);
+ if (path)
+ if(snprintf(path, pathsize, "%s%s", newpath, oldpath))
+ setenv("PATH", path, 1);
+#endif
+
int ret = 0;
size_t i;
struct sigaction new_action, old_action;
--
2.1.2

View File

@@ -1,47 +0,0 @@
diff -Naur pacman-5.0.1-orig/lib/libalpm/Makefile.am pacman-5.0.1/lib/libalpm/Makefile.am
--- pacman-5.0.1-orig/lib/libalpm/Makefile.am 2015-10-18 08:38:28.000000000 +0300
+++ pacman-5.0.1/lib/libalpm/Makefile.am 2016-07-15 09:42:23.014037400 +0300
@@ -64,7 +64,7 @@
sha2.h sha2.c
endif
-libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO)
+libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO) -Wc,--static -Wc,-static-libgcc
libalpm_la_CFLAGS = \
$(AM_CFLAGS) \
@@ -69,9 +69,9 @@
$(NETTLE_CFLAGS)
libalpm_la_LIBADD = \
- $(LTLIBINTL) \
$(GPGME_LIBS) \
$(LIBARCHIVE_LIBS) \
$(LIBCURL_LIBS) \
$(LIBSSL_LIBS) \
- $(NETTLE_LIBS)
+ $(NETTLE_LIBS) \
+ $(LTLIBINTL)
diff -Naur pacman-5.0.1-orig/src/pacman/Makefile.am pacman-5.0.1/src/pacman/Makefile.am
--- pacman-5.0.1-orig/src/pacman/Makefile.am 2015-12-05 15:40:17.000000000 +0300
+++ pacman-5.0.1/src/pacman/Makefile.am 2016-07-15 09:42:23.016037400 +0300
@@ -24,6 +24,8 @@
AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS) \
$(LIBARCHIVE_CFLAGS)
+AM_LDFLAGS = -Wc,--static -Wc,-static-libgcc
+
if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
AM_CPPFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
diff -Naur pacman-5.0.1-orig/src/util/Makefile.am pacman-5.0.1/src/util/Makefile.am
--- pacman-5.0.1-orig/src/util/Makefile.am 2015-05-12 07:00:54.000000000 +0300
+++ pacman-5.0.1/src/util/Makefile.am 2016-07-15 09:42:23.019037400 +0300
@@ -17,6 +17,7 @@
AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS) \
$(LIBARCHIVE_CFLAGS)
+AM_LDFLAGS = -Wc,--static -Wc,-static-libgcc
cleanupdelta_SOURCES = cleanupdelta.c
cleanupdelta_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la

View File

@@ -0,0 +1,329 @@
From dab45f0808951afc2e3146211a1c6d7ebb8bd06d Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 21 Oct 2018 22:58:23 -0400
Subject: Dynamically generate Doxyfile from input
This isn't super interesting for the autotools side, but it's necessary
in order to make things sane for other build systems which we might
introduce in the future.
---
doc/Doxyfile.in | 305 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 305 insertions(+)
create mode 100644 doc/Doxyfile.in
(limited to 'doc/Doxyfile.in')
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
new file mode 100644
index 00000000..78481dd5
--- /dev/null
+++ b/doc/Doxyfile.in
@@ -0,0 +1,305 @@
+# Doxyfile 1.8.2
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = libalpm
+PROJECT_NUMBER =
+PROJECT_BRIEF = "Arch Linux Package Manager Library"
+PROJECT_LOGO =
+OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = YES
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 4
+ALIASES =
+TCL_SUBST =
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+EXTENSION_MAPPING =
+MARKDOWN_SUPPORT = YES
+AUTOLINK_SUPPORT = YES
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+INLINE_GROUPED_CLASSES = NO
+INLINE_SIMPLE_STRUCTS = NO
+TYPEDEF_HIDES_STRUCT = NO
+SYMBOL_CACHE_SIZE = 0
+LOOKUP_CACHE_SIZE = 0
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_PACKAGE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = YES
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+FORCE_LOCAL_INCLUDES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+STRICT_PROTO_MATCHING = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+LAYOUT_FILE =
+CITE_BIB_FILES =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = ../lib/libalpm/
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS =
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+FILTER_SOURCE_PATTERNS =
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = NO
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = NO
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_FILES =
+HTML_COLORSTYLE_HUE = 220
+HTML_COLORSTYLE_SAT = 100
+HTML_COLORSTYLE_GAMMA = 80
+HTML_TIMESTAMP = YES
+HTML_DYNAMIC_SECTIONS = NO
+HTML_INDEX_NUM_ENTRIES = 100
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+GENERATE_QHP = NO
+QCH_FILE =
+QHP_NAMESPACE = org.doxygen.Project
+QHP_VIRTUAL_FOLDER = doc
+QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
+QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
+DISABLE_INDEX = NO
+GENERATE_TREEVIEW = NO
+ENUM_VALUES_PER_LINE = 4
+TREEVIEW_WIDTH = 250
+EXT_LINKS_IN_WINDOW = NO
+FORMULA_FONTSIZE = 10
+FORMULA_TRANSPARENT = YES
+USE_MATHJAX = NO
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+MATHJAX_EXTENSIONS =
+SEARCHENGINE = NO
+SERVER_BASED_SEARCH = NO
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = letter
+EXTRA_PACKAGES =
+LATEX_HEADER =
+LATEX_FOOTER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+LATEX_SOURCE_CODE = NO
+LATEX_BIB_STYLE = plain
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = YES
+MAN_OUTPUT = .
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH = ../..
+INCLUDE_FILE_PATTERNS = *.h
+PREDEFINED = HAVE_CONFIG_H= \
+ SYMHIDDEN= \
+ SYMEXPORT= \
+ HAVE_LIBARCHIVE \
+ HAVE_LIBCURL \
+ HAVE_LIBGPGME
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = NO
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = YES
+DOT_NUM_THREADS = 0
+DOT_FONTNAME = Helvetica
+DOT_FONTSIZE = 10
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+UML_LIMIT_NUM_FIELDS = 10
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+INTERACTIVE_SVG = NO
+DOT_PATH =
+DOTFILE_DIRS =
+MSCFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 3
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
--
cgit v1.2.3-1-gf6bb5

View File

@@ -1,305 +0,0 @@
# Doxyfile 1.8.2
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = libalpm
PROJECT_NUMBER =
PROJECT_BRIEF = "Arch Linux Package Manager Library"
PROJECT_LOGO =
OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = YES
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../lib/libalpm/
INPUT_ENCODING = UTF-8
FILE_PATTERNS =
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = NO
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
MATHJAX_EXTENSIONS =
SEARCHENGINE = NO
SERVER_BASED_SEARCH = NO
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = .
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../..
INCLUDE_FILE_PATTERNS = *.h
PREDEFINED = HAVE_CONFIG_H= \
SYMHIDDEN= \
SYMEXPORT= \
HAVE_LIBARCHIVE \
HAVE_LIBCURL \
HAVE_LIBGPGME
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 3
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES

View File

@@ -4,20 +4,16 @@
pkgname=pacman
pkgver=5.2.2
pkgrel=5
pkgrel=6
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
arch=('i686' 'x86_64')
url="https://www.archlinux.org/pacman/"
license=('GPL')
groups=('base-devel')
depends=('bash>=4.2.045'
#'dash'
#'busybox'
'gettext'
'gnupg'
#'libarchive'
'curl'
#'libgpgme'
'pacman-mirrors'
'msys2-keyring'
'which'
@@ -29,6 +25,7 @@ makedepends=('asciidoc'
'doxygen'
'git'
'meson'
'ninja'
'gettext-devel'
'heimdal-devel'
'libarchive-devel'
@@ -36,7 +33,6 @@ makedepends=('asciidoc'
'libgpgme-devel'
'libsqlite-devel'
'libunistring-devel')
# options=('!strip' 'debug')
backup=("etc/pacman.conf"
"etc/makepkg.conf"
"etc/makepkg_mingw32.conf"
@@ -52,9 +48,6 @@ source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,
"makepkg-mingw"
"0000-pacman-msysize.patch"
"0001-more-debugging-info.patch"
"0002-Add-util-msys2.-c-h-and-rebase-db-msys2.-c.patch"
"0003-use-busybox-for-msys2-post-installs.patch"
"0004-Link-pacman-with-static-libraries.patch"
"0006-makepkg-avoid-creating-.tar-files-with-extended-attr.patch"
"0007-exe-interp-ignore-file-conflict.patch"
"0008-answer-yes-by-default.patch"
@@ -68,7 +61,7 @@ source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,
"0016-excise-fakeroot.patch"
"0017-excise-sudo.patch"
"0018-use-msys-tools.patch"
Doxyfile.in)
"0019-doxyfile-in-missing.patch")
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
sha256sums=('bb201a9f2fb53c28d011f661d50028efce6eef2c1d2a36728bdd0130189349a0'
@@ -81,11 +74,8 @@ sha256sums=('bb201a9f2fb53c28d011f661d50028efce6eef2c1d2a36728bdd0130189349a0'
'c26dba8f9ac285efa33708e58ca29b4ad0fd9a1d6f4e82cbe433782b180799ee'
'b50166ba89277459dcf4c18603e57b387b931e5252068fefcb3d2579ebe2dfa4'
'501c38b95fcb6938c79a4cff11913fa257d1751d1f6ea6c482ce95999c3fd3b3'
'cf6d18d4ba5cfa78837dae2a949c794c78d67a7bd321f49b02d32b6ef9d955cf'
'01679ad6c6c5d302d8f239a454cd4eb540bc75192bdf74367778223a23c04924'
'24ea2c8dca37847e04894ebfd05d1cf5df49dc0c8089f5581c99caa19b77a7ef'
'870b197b7d6379a9c1ebb5c449c902b21d75ec21e966a2e54af82501465180f7'
'23132552a388b238acf8bf650b5c2aa08cf3de63c647e84ad551807c4edfeb1e'
'65906109a7b71a9b836566ea888532b41f4ba6ea5996f1f3303c5789e03960cb'
'e2731c4007a7c78848679e2203c35d1e56d3ef15a7586aeac9cc9e6e97824cfb'
'52343bbf99da6408950e34dd84319e34724040f866c497c25e36b4ee54030e82'
'e4f6e17af19e17e745a9f1c6b8402f5896229062c82167cb61f8e7d29eda716c'
@@ -99,15 +89,12 @@ sha256sums=('bb201a9f2fb53c28d011f661d50028efce6eef2c1d2a36728bdd0130189349a0'
'd6b6accddc890aff38b5ded3300e9dde35e1d7ed3f767e1655772e2cc7871739'
'8346a5799be41bd3524fa6fdc57b6175d9d6a00b366f99bd5cd7fa3d43d0ae98'
'7f60108a372718cfec5d883167a33983be7c5df33fc48bfc21f664449ac7a0a4'
'8cc0a7b1a3390a8990cef242ac4a84d4eb03f367bc2a01c883908ff7c8d59427')
'43eb9548ddff92fb08c0c7636c4978541ff225e220bf4ba6512118cf75e76b07')
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-Add-util-msys2.-c-h-and-rebase-db-msys2.-c.patch
# patch -p1 -i "${srcdir}"/0003-use-busybox-for-msys2-post-installs.patch
patch -p1 -i ${srcdir}/0004-Link-pacman-with-static-libraries.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
@@ -121,15 +108,13 @@ prepare() {
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
cp ${srcdir}/Doxyfile.in doc/
patch -p1 -i ${srcdir}/0019-doxyfile-in-missing.patch
}
build() {
cd ${srcdir}/${pkgname}-${pkgver}
LDFLAGS+=" -static-libgcc" \
PKG_CONFIG="/usr/bin/pkg-config --static" \
meson build-${CARCH} \
--buildtype=plain \
--prefix=/usr \
@@ -144,17 +129,18 @@ build() {
-Duse-git-version=false \
-Dpkg-ext=.pkg.tar.xz \
-Dscriptlet-shell=/usr/bin/bash
ninja -v -C build-${CARCH}
meson compile -C build-${CARCH}
}
check() {
cd ${srcdir}/${pkgname}-${pkgver}
ninja -C build-${CARCH} test
meson test -C build-${CARCH}
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
DESTDIR=${pkgdir} ninja -C build-${CARCH} install
DESTDIR=${pkgdir} meson install -C build-${CARCH}
# install Arch specific stuff
install -dm755 ${pkgdir}/etc