Hello community,
here is the log from the commit of package pkgconf for openSUSE:Factory checked in at 2019-05-02 19:19:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pkgconf (Old)
and /work/SRC/openSUSE:Factory/.pkgconf.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pkgconf"
Thu May 2 19:19:48 2019 rev:4 rq:699874 version:1.6.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/pkgconf/pkgconf.changes 2018-08-22 14:21:00.322444377 +0200
+++ /work/SRC/openSUSE:Factory/.pkgconf.new.5148/pkgconf.changes 2019-05-02 19:19:50.861690520 +0200
@@ -1,0 +2,26 @@
+Wed May 1 12:32:54 UTC 2019 - Neal Gompa
+
+- Update to 1.6.1
+ + Fixed an issue where a personality may not be properly selected
+ due to argv[0] containing a full path.
+ + Fixed a regression where having an empty PKG_CONFIG_LIBDIR
+ environment variable would not eliminate the default search
+ paths.
+ + Use POSIX realpath(3) instead of readlink() for deduplicating the
+ search path. Use _fullpath() on Windows for the same purpose.
+ + The dequoting logic for tuples has been improved to ensure that
+ quotes *inside* a value remain quoted when necessary.
+ + Fixed issue where packages which referenced missing packages in
+ Requires.private may have crashed due to memory corruption issues
+ in some circumstances.
+ + Fixed warnings reported by GCC 8 diagnostics.
+ + Add LIBPKGCONF_VERSION and LIBPKGCONF_VERSION_STR macros for
+ determining libpkgconf version.
+ + Add pkgconf_fragment_copy_list() to copy a fragment list to
+ another fragment list.
+ + Fix edge cases for path canonicalization (especially on Windows)
+- Add personality.d directories for cross-targets
+- Add pkgconf rpm macros for pkgconf directories
+- Simplify platform-pkg-config wrapper to work with POSIX sh
+
+-------------------------------------------------------------------
Old:
----
pkgconf-1.5.3.tar.xz
New:
----
pkgconf-1.6.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pkgconf.spec ++++++
--- /var/tmp/diff_new_pack.5gjWaq/_old 2019-05-02 19:19:51.385691479 +0200
+++ /var/tmp/diff_new_pack.5gjWaq/_new 2019-05-02 19:19:51.389691486 +0200
@@ -2,7 +2,7 @@
# spec file for package pkgconf
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
-# Copyright (c) 2018 Neal Gompa .
+# Copyright (c) 2019 Neal Gompa .
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -13,12 +13,13 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Compatibility macros
%{!?make_build: %global make_build %{__make} %{?_smp_mflags}}
+%{!?_rpmmacrodir: %global _rpmmacrodir %{_rpmconfigdir}/macros.d}
# pkgconf does not act as pkgconfig by default
%bcond_with pkgconfig_compat
@@ -37,7 +38,7 @@
%global devname lib%{name}-devel
Name: pkgconf
-Version: 1.5.3
+Version: 1.6.1
Release: 0
Summary: Package compiler and linker metadata toolkit
License: ISC
@@ -143,6 +144,16 @@
find %{buildroot} -name '*.la' -print -delete
+mkdir -p %{buildroot}%{_sysconfdir}/pkgconfig/personality.d
+mkdir -p %{buildroot}%{_datadir}/pkgconfig/personality.d
+
+# pkgconf rpm macros
+mkdir -p %{buildroot}%{_rpmmacrodir}/
+
+cat > %{buildroot}%{_rpmmacrodir}/macros.pkgconf < %{buildroot}%{_mandir}/man1/pkg-config.1
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_datadir}/pkgconfig
@@ -181,6 +192,10 @@
%{_mandir}/man1/%{name}.1*
%{_mandir}/man5/pc.5*
%{_mandir}/man5/%{name}-personality.5*
+%{_rpmmacrodir}/macros.pkgconf
+%dir %{_sysconfdir}/pkgconfig
+%dir %{_sysconfdir}/pkgconfig/personality.d
+%dir %{_datadir}/pkgconfig/personality.d
%files -n %{libname}
%license COPYING
++++++ pkgconf-1.5.3.tar.xz -> pkgconf-1.6.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/CMakeLists.txt new/pkgconf-1.6.1/CMakeLists.txt
--- old/pkgconf-1.5.3/CMakeLists.txt 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/CMakeLists.txt 2019-03-24 03:50:13.000000000 +0100
@@ -12,7 +12,7 @@
SET(PACKAGE_BUGREPORT http://github.com/pkgconf/pkgconf/issues)
SET(PACKAGE_NAME pkgconf)
-SET(PACKAGE_VERSION 1.3.7)
+SET(PACKAGE_VERSION 1.6.0)
SET(LIBPKGCONF_VERSION "3.0.0")
SET(LIBPKGCONF_SOVERSION 3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/Makefile.am new/pkgconf-1.6.1/Makefile.am
--- old/pkgconf-1.5.3/Makefile.am 2018-07-29 02:45:43.000000000 +0200
+++ new/pkgconf-1.6.1/Makefile.am 2019-03-24 03:50:13.000000000 +0100
@@ -93,6 +93,7 @@
tests/lib1/requires-internal-collision.pc \
tests/lib1/tuple-quoting.pc \
tests/lib1/empty-tuple.pc \
+ tests/lib1/orphaned-requires-private.pc \
tests/test_env.sh \
$(test_scripts) \
doc/conf.py \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/Makefile.in new/pkgconf-1.6.1/Makefile.in
--- old/pkgconf-1.5.3/Makefile.in 2018-07-29 02:49:23.000000000 +0200
+++ new/pkgconf-1.6.1/Makefile.in 2019-03-24 04:39:12.000000000 +0100
@@ -481,6 +481,7 @@
tests/lib1/requires-internal-collision.pc \
tests/lib1/tuple-quoting.pc \
tests/lib1/empty-tuple.pc \
+ tests/lib1/orphaned-requires-private.pc \
tests/test_env.sh \
$(test_scripts) \
doc/conf.py \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/NEWS new/pkgconf-1.6.1/NEWS
--- old/pkgconf-1.5.3/NEWS 2018-07-29 02:38:15.000000000 +0200
+++ new/pkgconf-1.6.1/NEWS 2019-03-24 04:33:52.000000000 +0100
@@ -1,6 +1,42 @@
Changes from previous version of pkgconf
========================================
+Changes from 1.6.0 to 1.6.1:
+----------------------------
+
+* Bug fixes:
+ - Fixed an issue where a personality may not be properly selected
+ due to argv[0] containing a full path.
+ - Fixed a regression where having an empty PKG_CONFIG_LIBDIR
+ environment variable would not eliminate the default search
+ paths.
+ - Use POSIX realpath(3) instead of readlink() for deduplicating the
+ search path. Use _fullpath() on Windows for the same purpose.
+ - The dequoting logic for tuples has been improved to ensure that
+ quotes *inside* a value remain quoted when necessary.
+
+Changes from 1.5.4 to 1.6.0:
+----------------------------
+
+* Bug fixes:
+ - Fixed issue where packages which referenced missing packages in
+ Requires.private may have crashed due to memory corruption issues
+ in some circumstances.
+ - Fixed warnings reported by GCC 8 diagnostics.
+
+* Enhancements:
+ - Add LIBPKGCONF_VERSION and LIBPKGCONF_VERSION_STR macros for
+ determining libpkgconf version.
+ - Add pkgconf_fragment_copy_list() to copy a fragment list to
+ another fragment list.
+
+Changes from 1.5.3 to 1.5.4:
+----------------------------
+
+* Bug fixes:
+ - fix build on Windows with Meson
+ - fix edge cases for path canonicalization (especially on Windows)
+
Changes from 1.5.2 to 1.5.3:
----------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/cli/main.c new/pkgconf-1.6.1/cli/main.c
--- old/pkgconf-1.5.3/cli/main.c 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/cli/main.c 2019-03-24 03:50:13.000000000 +0100
@@ -740,21 +740,30 @@
static pkgconf_cross_personality_t *
deduce_personality(char *argv[])
{
- char *workbuf = strdup(argv[0]), *i;
- pkgconf_cross_personality_t *out = pkgconf_cross_personality_default(), *deduced;
+ const char *argv0 = argv[0];
+ char *i, *prefix;
+ pkgconf_cross_personality_t *out;
- i = strstr(workbuf, "-pkg");
- if (i == NULL)
- goto finish;
+ i = strrchr(argv0, '/');
+ if (i != NULL)
+ argv0 = i + 1;
+
+#if defined(_WIN32) || defined(_WIN64)
+ i = strrchr(argv0, '\\');
+ if (i != NULL)
+ argv0 = i + 1;
+#endif
- *i = 0;
+ i = strstr(argv0, "-pkg");
+ if (i == NULL)
+ return pkgconf_cross_personality_default();
- deduced = pkgconf_cross_personality_find(workbuf);
- if (deduced != NULL)
- out = deduced;
+ prefix = strndup(argv0, i - argv0);
+ out = pkgconf_cross_personality_find(prefix);
+ free(prefix);
+ if (out == NULL)
+ return pkgconf_cross_personality_default();
-finish:
- free(workbuf);
return out;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/configure new/pkgconf-1.6.1/configure
--- old/pkgconf-1.5.3/configure 2018-07-29 02:49:24.000000000 +0200
+++ new/pkgconf-1.6.1/configure 2019-03-24 04:39:12.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pkgconf 1.5.3.
+# Generated by GNU Autoconf 2.69 for pkgconf 1.6.1.
#
# Report bugs to http://github.com/pkgconf/pkgconf/issues.
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='pkgconf'
PACKAGE_TARNAME='pkgconf'
-PACKAGE_VERSION='1.5.3'
-PACKAGE_STRING='pkgconf 1.5.3'
+PACKAGE_VERSION='1.6.1'
+PACKAGE_STRING='pkgconf 1.6.1'
PACKAGE_BUGREPORT='http://github.com/pkgconf/pkgconf/issues'
PACKAGE_URL=''
@@ -1333,7 +1333,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pkgconf 1.5.3 to adapt to many kinds of systems.
+\`configure' configures pkgconf 1.6.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1404,7 +1404,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pkgconf 1.5.3:";;
+ short | recursive ) echo "Configuration of pkgconf 1.6.1:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pkgconf configure 1.5.3
+pkgconf configure 1.6.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1892,7 +1892,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pkgconf $as_me 1.5.3, which was
+It was created by pkgconf $as_me 1.6.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4268,7 +4268,7 @@
# Define the identity of the package.
PACKAGE='pkgconf'
- VERSION='1.5.3'
+ VERSION='1.6.1'
cat >>confdefs.h <<_ACEOF
@@ -13725,7 +13725,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pkgconf $as_me 1.5.3, which was
+This file was extended by pkgconf $as_me 1.6.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13791,7 +13791,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-pkgconf config.status 1.5.3
+pkgconf config.status 1.6.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/configure.ac new/pkgconf-1.6.1/configure.ac
--- old/pkgconf-1.5.3/configure.ac 2018-07-29 02:47:49.000000000 +0200
+++ new/pkgconf-1.6.1/configure.ac 2019-03-24 04:38:47.000000000 +0100
@@ -12,7 +12,7 @@
dnl from the use of this software.
AC_PREREQ([2.68])
-AC_INIT([pkgconf], [1.5.3], [http://github.com/pkgconf/pkgconf/issues])
+AC_INIT([pkgconf], [1.6.1], [http://github.com/pkgconf/pkgconf/issues])
AC_CONFIG_SRCDIR([cli/main.c])
AC_CONFIG_MACRO_DIRS([m4])
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/doc/libpkgconf-fragment.rst new/pkgconf-1.6.1/doc/libpkgconf-fragment.rst
--- old/pkgconf-1.5.3/doc/libpkgconf-fragment.rst 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/doc/libpkgconf-fragment.rst 2019-03-24 03:50:13.000000000 +0100
@@ -36,6 +36,16 @@
:param bool is_private: Whether the fragment list is a `private` fragment list (static linking).
:return: nothing
+.. c:function:: void pkgconf_fragment_copy_list(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_list_t *base)
+
+ Copies a `fragment list` to another `fragment list`, possibly removing a previous copy of the fragments
+ in a process known as `mergeback`.
+
+ :param pkgconf_client_t* client: The pkgconf client being accessed.
+ :param pkgconf_list_t* list: The list the fragments are being added to.
+ :param pkgconf_list_t* base: The list the fragments are being copied from.
+ :return: nothing
+
.. c:function:: void pkgconf_fragment_filter(const pkgconf_client_t *client, pkgconf_list_t *dest, pkgconf_list_t *src, pkgconf_fragment_filter_func_t filter_func)
Copies a `fragment list` to another `fragment list` which match a user-specified filtering function.
@@ -47,23 +57,25 @@
:param void* data: Optional data to pass to the filter function.
:return: nothing
-.. c:function:: size_t pkgconf_fragment_render_len(const pkgconf_list_t *list)
+.. c:function:: size_t pkgconf_fragment_render_len(const pkgconf_list_t *list, bool escape, const pkgconf_fragment_render_ops_t *ops)
Calculates the required memory to store a `fragment list` when rendered as a string.
:param pkgconf_list_t* list: The `fragment list` being rendered.
- :param bool escape: Whether or not to escape special shell characters.
+ :param bool escape: Whether or not to escape special shell characters (deprecated).
+ :param pkgconf_fragment_render_ops_t* ops: An optional ops structure to use for custom renderers, else ``NULL``.
:return: the amount of bytes required to represent the `fragment list` when rendered
:rtype: size_t
-.. c:function:: void pkgconf_fragment_render_buf(const pkgconf_list_t *list, char *buf, size_t buflen)
+.. c:function:: void pkgconf_fragment_render_buf(const pkgconf_list_t *list, char *buf, size_t buflen, bool escape, const pkgconf_fragment_render_ops_t *ops)
Renders a `fragment list` into a buffer.
:param pkgconf_list_t* list: The `fragment list` being rendered.
:param char* buf: The buffer to render the fragment list into.
:param size_t buflen: The length of the buffer.
- :param bool escape: Whether or not to escape special shell characters.
+ :param bool escape: Whether or not to escape special shell characters (deprecated).
+ :param pkgconf_fragment_render_ops_t* ops: An optional ops structure to use for custom renderers, else ``NULL``.
:return: nothing
.. c:function:: char *pkgconf_fragment_render(const pkgconf_list_t *list)
@@ -71,7 +83,8 @@
Allocate memory and render a `fragment list` into it.
:param pkgconf_list_t* list: The `fragment list` being rendered.
- :param bool escape: Whether or not to escape special shell characters.
+ :param bool escape: Whether or not to escape special shell characters (deprecated).
+ :param pkgconf_fragment_render_ops_t* ops: An optional ops structure to use for custom renderers, else ``NULL``.
:return: An allocated string containing the rendered `fragment list`.
:rtype: char *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/client.c new/pkgconf-1.6.1/libpkgconf/client.c
--- old/pkgconf-1.5.3/libpkgconf/client.c 2018-07-20 00:03:42.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/client.c 2019-03-24 04:16:17.000000000 +0100
@@ -62,8 +62,21 @@
{
pkgconf_path_build_from_environ("PKG_CONFIG_PATH", NULL, &client->dir_list, true);
- if (!(client->flags & PKGCONF_PKG_PKGF_ENV_ONLY) && (pkgconf_path_build_from_environ("PKG_CONFIG_LIBDIR", NULL, &client->dir_list, true)) < 1)
- pkgconf_path_copy_list(&client->dir_list, &personality->dir_list);
+ if (!(client->flags & PKGCONF_PKG_PKGF_ENV_ONLY))
+ {
+ pkgconf_list_t dir_list = PKGCONF_LIST_INITIALIZER;
+ const pkgconf_list_t *prepend_list = &personality->dir_list;
+
+ if (getenv("PKG_CONFIG_LIBDIR") != NULL)
+ {
+ /* PKG_CONFIG_LIBDIR= should empty the search path entirely. */
+ (void) pkgconf_path_build_from_environ("PKG_CONFIG_LIBDIR", NULL, &dir_list, true);
+ prepend_list = &dir_list;
+ }
+
+ pkgconf_path_copy_list(&client->dir_list, prepend_list);
+ pkgconf_path_free(&dir_list);
+ }
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/fragment.c new/pkgconf-1.6.1/libpkgconf/fragment.c
--- old/pkgconf-1.5.3/libpkgconf/fragment.c 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/fragment.c 2019-03-24 03:50:13.000000000 +0100
@@ -361,6 +361,32 @@
/*
* !doc
*
+ * .. c:function:: void pkgconf_fragment_copy_list(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_list_t *base)
+ *
+ * Copies a `fragment list` to another `fragment list`, possibly removing a previous copy of the fragments
+ * in a process known as `mergeback`.
+ *
+ * :param pkgconf_client_t* client: The pkgconf client being accessed.
+ * :param pkgconf_list_t* list: The list the fragments are being added to.
+ * :param pkgconf_list_t* base: The list the fragments are being copied from.
+ * :return: nothing
+ */
+void
+pkgconf_fragment_copy_list(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_list_t *base)
+{
+ pkgconf_node_t *node;
+
+ PKGCONF_FOREACH_LIST_ENTRY(base->head, node)
+ {
+ pkgconf_fragment_t *frag = node->data;
+
+ pkgconf_fragment_copy(client, list, frag, true);
+ }
+}
+
+/*
+ * !doc
+ *
* .. c:function:: void pkgconf_fragment_filter(const pkgconf_client_t *client, pkgconf_list_t *dest, pkgconf_list_t *src, pkgconf_fragment_filter_func_t filter_func)
*
* Copies a `fragment list` to another `fragment list` which match a user-specified filtering function.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/libpkgconf.h new/pkgconf-1.6.1/libpkgconf/libpkgconf.h
--- old/pkgconf-1.5.3/libpkgconf/libpkgconf.h 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/libpkgconf.h 2019-03-24 04:22:42.000000000 +0100
@@ -41,6 +41,10 @@
#define PKG_DIR_SEP_S '/'
#endif
+#ifdef _WIN32
+#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
+#endif
+
#define PKGCONF_BUFSIZE (65535)
typedef enum {
@@ -74,6 +78,9 @@
#define PKGCONF_FOREACH_LIST_ENTRY_REVERSE(tail, value) \
for ((value) = (tail); (value) != NULL; (value) = (value)->prev)
+#define LIBPKGCONF_VERSION 10600
+#define LIBPKGCONF_VERSION_STR "1.6.0"
+
struct pkgconf_fragment_ {
pkgconf_node_t iter;
@@ -319,6 +326,7 @@
PKGCONF_API bool pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value);
PKGCONF_API void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string);
PKGCONF_API void pkgconf_fragment_copy(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_fragment_t *base, bool is_private);
+PKGCONF_API void pkgconf_fragment_copy_list(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_list_t *base);
PKGCONF_API void pkgconf_fragment_delete(pkgconf_list_t *list, pkgconf_fragment_t *node);
PKGCONF_API void pkgconf_fragment_free(pkgconf_list_t *list);
PKGCONF_API void pkgconf_fragment_filter(const pkgconf_client_t *client, pkgconf_list_t *dest, pkgconf_list_t *src, pkgconf_fragment_filter_func_t filter_func, void *data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/path.c new/pkgconf-1.6.1/libpkgconf/path.c
--- old/pkgconf-1.5.3/libpkgconf/path.c 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/path.c 2019-03-24 04:25:53.000000000 +0100
@@ -92,14 +92,9 @@
return;
if (S_ISLNK(st.st_mode))
{
- char linkdest[PKGCONF_ITEM_SIZE];
- ssize_t len;
+ char *linkdest = realpath(path, NULL);
- memset(linkdest, '\0', sizeof linkdest);
- len = readlink(path, linkdest, sizeof linkdest);
-
- if (len != -1 && (size_t)len < sizeof(linkdest) &&
- stat(linkdest, &st) == -1)
+ if (linkdest != NULL && stat(linkdest, &st) == -1)
return;
}
if (path_list_contains_entry(path, dirlist, &st))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/personality.c new/pkgconf-1.6.1/libpkgconf/personality.c
--- old/pkgconf-1.5.3/libpkgconf/personality.c 2018-07-20 00:14:49.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/personality.c 2019-03-24 03:50:13.000000000 +0100
@@ -17,6 +17,10 @@
#include
#include
+#ifdef _WIN32
+# define strcasecmp _stricmp
+#endif
+
static bool default_personality_init = false;
static pkgconf_cross_personality_t default_personality = {
.name = "default",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/pkg.c new/pkgconf-1.6.1/libpkgconf/pkg.c
--- old/pkgconf-1.5.3/libpkgconf/pkg.c 2018-06-16 23:30:09.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/pkg.c 2019-03-24 03:50:13.000000000 +0100
@@ -64,7 +64,7 @@
return strdup(buf);
}
-typedef void (*pkgconf_pkg_parser_keyword_func_t)(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value);
+typedef void (*pkgconf_pkg_parser_keyword_func_t)(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value);
typedef struct {
const char *keyword;
const pkgconf_pkg_parser_keyword_func_t func;
@@ -78,7 +78,7 @@
}
static void
-pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value)
+pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value)
{
(void) keyword;
(void) lineno;
@@ -88,7 +88,7 @@
}
static void
-pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value)
+pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value)
{
pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
bool ret = pkgconf_fragment_parse(client, dest, &pkg->vars, value);
@@ -101,7 +101,7 @@
}
static void
-pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value)
+pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value)
{
(void) keyword;
(void) lineno;
@@ -112,7 +112,7 @@
/* a variant of pkgconf_pkg_parser_dependency_func which colors the dependency node as an "internal" dependency. */
static void
-pkgconf_pkg_parser_internal_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value)
+pkgconf_pkg_parser_internal_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value)
{
(void) keyword;
(void) lineno;
@@ -137,18 +137,19 @@
{"Version", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, version)},
};
-static bool
-pkgconf_pkg_parser_keyword_set(pkgconf_pkg_t *pkg, const size_t lineno, const char *keyword, char *value)
+static void
+pkgconf_pkg_parser_keyword_set(void *opaque, const size_t lineno, const char *keyword, const char *value)
{
+ pkgconf_pkg_t *pkg = opaque;
+
const pkgconf_pkg_parser_keyword_pair_t *pair = bsearch(keyword,
pkgconf_pkg_parser_keyword_funcs, PKGCONF_ARRAY_SIZE(pkgconf_pkg_parser_keyword_funcs),
sizeof(pkgconf_pkg_parser_keyword_pair_t), pkgconf_pkg_parser_keyword_pair_cmp);
if (pair == NULL || pair->func == NULL)
- return false;
+ return;
pair->func(pkg->owner, pkg, keyword, lineno, pair->offset, value);
- return true;
}
static const char *
@@ -188,22 +189,75 @@
return buf;
}
+static void
+remove_additional_separators(char *buf)
+{
+ char *p = buf;
+
+ while (*p) {
+ if (*p == '/') {
+ char *q;
+
+ q = ++p;
+ while (*q && *q == '/')
+ q++;
+
+ if (p != q)
+ memmove (p, q, strlen (q) + 1);
+ } else {
+ p++;
+ }
+ }
+}
+
+static void
+canonicalize_path(char *buf)
+{
+#ifdef _WIN32
+ char *p = buf;
+
+ while (*p) {
+ if (*p == '\\')
+ *p = '/';
+ p++;
+ }
+#endif
+
+ remove_additional_separators(buf);
+}
+
static bool
-pkgconf_pkg_parser_value_set(pkgconf_pkg_t *pkg, const size_t lineno, const char *keyword, char *value)
+is_path_prefix_equal(const char *path1, const char *path2, size_t path2_len)
+{
+#ifdef _WIN32
+ return !_strnicmp(path1, path2, path2_len);
+#else
+ return !strncmp(path1, path2, path2_len);
+#endif
+}
+
+static void
+pkgconf_pkg_parser_value_set(void *opaque, const size_t lineno, const char *keyword, const char *value)
{
+ char canonicalized_value[PKGCONF_ITEM_SIZE];
+ pkgconf_pkg_t *pkg = opaque;
+
(void) lineno;
+ pkgconf_strlcpy(canonicalized_value, value, sizeof canonicalized_value);
+ canonicalize_path(canonicalized_value);
+
/* Some pc files will use absolute paths for all of their directories
* which is broken when redefining the prefix. We try to outsmart the
* file and rewrite any directory that starts with the same prefix.
*/
if (pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX && pkg->orig_prefix
- && !strncmp(value, pkg->orig_prefix->value, strlen(pkg->orig_prefix->value)))
+ && is_path_prefix_equal(canonicalized_value, pkg->orig_prefix->value, strlen(pkg->orig_prefix->value)))
{
char newvalue[PKGCONF_ITEM_SIZE];
pkgconf_strlcpy(newvalue, pkg->prefix->value, sizeof newvalue);
- pkgconf_strlcat(newvalue, value + strlen(pkg->orig_prefix->value), sizeof newvalue);
+ pkgconf_strlcat(newvalue, canonicalized_value + strlen(pkg->orig_prefix->value), sizeof newvalue);
pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, newvalue, false);
}
else if (strcmp(keyword, pkg->owner->prefix_varname) || !(pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX))
@@ -215,14 +269,12 @@
if (relvalue != NULL)
{
- pkg->orig_prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, "orig_prefix", value, true);
+ pkg->orig_prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, "orig_prefix", canonicalized_value, true);
pkg->prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, relvalue, false);
}
else
pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true);
}
-
- return true;
}
typedef struct {
@@ -237,8 +289,8 @@
};
static const pkgconf_parser_operand_func_t pkg_parser_funcs[256] = {
- [':'] = (pkgconf_parser_operand_func_t) pkgconf_pkg_parser_keyword_set,
- ['='] = (pkgconf_parser_operand_func_t) pkgconf_pkg_parser_value_set
+ [':'] = pkgconf_pkg_parser_keyword_set,
+ ['='] = pkgconf_pkg_parser_value_set
};
static void pkg_warn_func(pkgconf_pkg_t *pkg, const char *fmt, ...) PRINTFLIKE(2, 3);
@@ -1521,18 +1573,22 @@
{
unsigned int eflag;
unsigned int skip_flags = (client->flags & PKGCONF_PKG_PKGF_DONT_FILTER_INTERNAL_CFLAGS) == 0 ? PKGCONF_PKG_DEPF_INTERNAL : 0;
+ pkgconf_list_t frags = PKGCONF_LIST_INITIALIZER;
- eflag = pkgconf_pkg_traverse(client, root, pkgconf_pkg_cflags_collect, list, maxdepth, skip_flags);
- if (eflag != PKGCONF_PKG_ERRF_OK)
- pkgconf_fragment_free(list);
+ eflag = pkgconf_pkg_traverse(client, root, pkgconf_pkg_cflags_collect, &frags, maxdepth, skip_flags);
+
+ if (eflag == PKGCONF_PKG_ERRF_OK && client->flags & PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS)
+ eflag = pkgconf_pkg_traverse(client, root, pkgconf_pkg_cflags_private_collect, &frags, maxdepth, skip_flags);
- if (client->flags & PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS)
+ if (eflag != PKGCONF_PKG_ERRF_OK)
{
- eflag = pkgconf_pkg_traverse(client, root, pkgconf_pkg_cflags_private_collect, list, maxdepth, skip_flags);
- if (eflag != PKGCONF_PKG_ERRF_OK)
- pkgconf_fragment_free(list);
+ pkgconf_fragment_free(&frags);
+ return eflag;
}
+ pkgconf_fragment_copy_list(client, list, &frags);
+ pkgconf_fragment_free(&frags);
+
return eflag;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/libpkgconf/tuple.c new/pkgconf-1.6.1/libpkgconf/tuple.c
--- old/pkgconf-1.5.3/libpkgconf/tuple.c 2018-07-29 02:34:56.000000000 +0200
+++ new/pkgconf-1.6.1/libpkgconf/tuple.c 2019-03-24 04:31:41.000000000 +0100
@@ -144,17 +144,18 @@
const char *i;
char quote = 0;
+ if (*value == '\'' || *value == '"')
+ quote = *value;
+
for (i = value; *i != '\0'; i++)
{
- if (!quote && (*i == '\'' || *i == '"'))
- quote = *i;
- else if (*i != quote)
- *bptr++ = *i;
- else if (*i == '\\' && *(i + 1) == quote)
+ if (*i == '\\' && quote && *(i + 1) == quote)
{
i++;
*bptr++ = *i;
}
+ else if (*i != quote)
+ *bptr++ = *i;
}
return buf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/tests/lib1/orphaned-requires-private.pc new/pkgconf-1.6.1/tests/lib1/orphaned-requires-private.pc
--- old/pkgconf-1.5.3/tests/lib1/orphaned-requires-private.pc 1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconf-1.6.1/tests/lib1/orphaned-requires-private.pc 2019-03-24 03:50:13.000000000 +0100
@@ -0,0 +1,8 @@
+Name: orphaned-requires-private
+Version: 1
+Description: A testing module for pkgconf
+URL: http://www.pkgconf.org/
+Requires: foo
+Requires.private: orphaned-foo
+Cflags: -DUNREACHABLE
+Libs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconf-1.5.3/tests/requires.sh new/pkgconf-1.6.1/tests/requires.sh
--- old/pkgconf-1.5.3/tests/requires.sh 2018-06-16 08:43:55.000000000 +0200
+++ new/pkgconf-1.6.1/tests/requires.sh 2019-03-24 03:50:13.000000000 +0100
@@ -14,7 +14,8 @@
missing \
requires_internal \
requires_internal_missing \
- requires_internal_collision
+ requires_internal_collision \
+ orphaned_requires_private
libs_body()
{
@@ -112,3 +113,12 @@
-o inline:"-I/test/local/include/foo \n" \
pkgconf --with-path="${selfdir}/lib1" --cflags requires-internal-collision
}
+
+orphaned_requires_private_body()
+{
+ atf_check \
+ -s exit:1 \
+ -e ignore \
+ -o ignore \
+ pkgconf --with-path="${selfdir}/lib1" --cflags --libs orphaned-requires-private
+}
++++++ platform-pkg-config.in ++++++
--- /var/tmp/diff_new_pack.5gjWaq/_old 2019-05-02 19:19:51.537691757 +0200
+++ /var/tmp/diff_new_pack.5gjWaq/_new 2019-05-02 19:19:51.537691757 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@
@@ -7,6 +7,4 @@
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}"
-pkgconf $@
-
-exit $?
+exec pkgconf "$@"