Compare commits

..

No commits in common. "88cbf7c59fe67a83fda57b38feb68724f6fb0098" and "c8" have entirely different histories.

9 changed files with 21 additions and 316 deletions

30
.gitignore vendored
View File

@ -1,29 +1 @@
/pkgconf-1.1.0.tar.xz SOURCES/pkgconf-1.4.2.tar.xz
/pkgconf-1.1.1.tar.xz
/pkgconf-1.2.0.tar.xz
/pkgconf-1.2.1.tar.xz
/pkgconf-1.2.2.tar.xz
/pkgconf-1.3.0.tar.xz
/pkgconf-1.3.2.tar.xz
/pkgconf-1.3.3.tar.xz
/pkgconf-1.3.4.tar.xz
/pkgconf-1.3.5.tar.xz
/pkgconf-1.3.6.tar.xz
/pkgconf-1.3.7.tar.xz
/pkgconf-1.3.8.tar.xz
/pkgconf-1.3.9.tar.xz
/pkgconf-1.3.10.tar.xz
/pkgconf-1.3.12.tar.xz
/pkgconf-1.3.90.tar.xz
/pkgconf-1.4.0.tar.xz
/pkgconf-1.4.1.tar.xz
/pkgconf-1.4.2.tar.xz
/pkgconf-1.5.1.tar.xz
/pkgconf-1.5.3.tar.xz
/pkgconf-1.5.4.tar.xz
/pkgconf-1.6.0.tar.xz
/pkgconf-1.6.1.tar.xz
/pkgconf-1.6.2.tar.xz
/pkgconf-1.6.3.tar.xz
/pkgconf-1.7.0.tar.xz
/pkgconf-1.7.3.tar.xz

View File

@ -1 +1 @@
e90c3d993b7d2246d3b72ab558591a07c3b22ee2 pkgconf-1.7.3.tar.xz 28caf985acabb06fe48eb89c4b2a8c5342ca4859 SOURCES/pkgconf-1.4.2.tar.xz

View File

@ -1,124 +0,0 @@
From 305b359d7d07840df3e420e6b08f91c01abe6012 Mon Sep 17 00:00:00 2001
From: Sandro Mani <manisandro@gmail.com>
Date: Wed, 23 Jun 2021 14:09:05 +0200
Subject: [PATCH] Don't prepend sysroot_dir if pkg-config file lies outside of
sysroot_dir
(cherry picked from commit ed86f2dda3bc99e34775f0fae54e314718037516)
---
libpkgconf/pkg.c | 10 ++++++++++
tests/regress.sh | 28 ++++++++++++----------------
tests/test_env.sh.in | 2 +-
3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
index 214f544..fff6eda 100644
--- a/libpkgconf/pkg.c
+++ b/libpkgconf/pkg.c
@@ -378,6 +378,16 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *
pkg->pc_filedir = pkg_get_parent_dir(pkg);
pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pkg->pc_filedir, true);
+ /* If pc_filedir is outside of sysroot_dir, clear pc_filedir
+ /* See https://github.com/pkgconf/pkgconf/issues/213
+ */
+ if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)))
+ {
+ free(client->sysroot_dir);
+ client->sysroot_dir = NULL;
+ pkgconf_client_set_sysroot_dir(client, NULL);
+ }
+
/* make module id */
if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)
idptr++;
diff --git a/tests/regress.sh b/tests/regress.sh
index 47877d4..04d4042 100755
--- a/tests/regress.sh
+++ b/tests/regress.sh
@@ -112,7 +112,7 @@ libs_never_mergeback_body()
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-L/test/bar/lib -lfoo1 \n" \
- pkgconf --libs prefix-foo1
+ pkgconf --libs prefix-foo1
atf_check \
-o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \
pkgconf --libs prefix-foo1 prefix-foo2
@@ -160,9 +160,9 @@ isystem_munge_order_body()
isystem_munge_sysroot_body()
{
- export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR='/test'
+ export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}"
atf_check \
- -o match:"-isystem /test/opt/bad/include" \
+ -o match:"-isystem ${selfdir}/opt/bad/include" \
pkgconf --cflags isystem
}
@@ -176,9 +176,9 @@ idirafter_munge_order_body()
idirafter_munge_sysroot_body()
{
- export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR='/test'
+ export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}"
atf_check \
- -o match:"-idirafter /test/opt/bad/include" \
+ -o match:"-idirafter ${selfdir}/opt/bad/include" \
pkgconf --cflags idirafter
}
@@ -195,20 +195,16 @@ pcpath_body()
export PKG_CONFIG_PATH="${selfdir}/lib2"
atf_check \
-o inline:"-fPIC -I/test/include/foo \n" \
- pkgconf --cflags ${selfdir}/lib3/bar.pc
+ pkgconf --cflags ${selfdir}/lib3/bar.pc
}
sysroot_munge_body()
{
- export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="/sysroot"
+ sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > ${selfdir}/lib1/sysroot-dir-selfdir.pc
+ export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}"
atf_check \
- -o inline:"-L/sysroot/lib -lfoo \n" \
- pkgconf --libs sysroot-dir
-
- export PKG_CONFIG_SYSROOT_DIR="/sysroot2"
- atf_check \
- -o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \
- pkgconf --libs sysroot-dir
+ -o inline:"-L${selfdir}/lib -lfoo \n" \
+ pkgconf --libs sysroot-dir-selfdir
}
virtual_variable_body()
@@ -244,8 +240,8 @@ malformed_quoting_body()
explicit_sysroot_body()
{
- export PKG_CONFIG_SYSROOT_DIR=/sysroot
- atf_check -o inline:"/sysroot/usr/share/test\n" \
+ export PKG_CONFIG_SYSROOT_DIR=${selfdir}
+ atf_check -o inline:"${selfdir}/usr/share/test\n" \
pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir explicit-sysroot
}
diff --git a/tests/test_env.sh.in b/tests/test_env.sh.in
index 17ee1f5..2c081f6 100644
--- a/tests/test_env.sh.in
+++ b/tests/test_env.sh.in
@@ -24,7 +24,7 @@ done
selfdir="@abs_top_srcdir@/tests"
LIBRARY_PATH_ENV="LIBRARY_PATH"
PATH_SEP=":"
-SYSROOT_DIR="${selfdir}/test"
+SYSROOT_DIR="${selfdir}"
case "$(uname -s)" in
Msys|CYGWIN*) PATH_SEP=";";;
Haiku) LIBRARY_PATH_ENV="BELIBRARIES";;
--
2.31.1

View File

@ -0,0 +1,12 @@
#!/bin/bash
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
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 $?

View File

@ -12,36 +12,20 @@
%global pkgconfig_evr 1:%{pkgconfig_verrel} %global pkgconfig_evr 1:%{pkgconfig_verrel}
%endif %endif
# Tests are disabled on RHEL 9 because of the extensive dependencies
%if 0%{?rhel} >= 9
%bcond_with tests
%else
%bcond_without tests
%endif
# Search path for pc files for pkgconf # Search path for pc files for pkgconf
%global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig %global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
Name: pkgconf Name: pkgconf
Version: 1.7.3 Version: 1.4.2
Release: 10%{?dist} Release: 1%{?dist}
Summary: Package compiler and linker metadata toolkit Summary: Package compiler and linker metadata toolkit
License: ISC License: ISC
URL: http://pkgconf.org/ URL: http://pkgconf.org/
# Mirror at https://releases.pagure.org/pkgconf/pkgconf/
Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz
# Simple wrapper scripts to offer platform versions of pkgconfig # Simple wrapper script to offer platform versions of pkgconfig
Source1: platform-pkg-config.in Source1: platform-pkg-config.in
Source2: pkg-config.in
# Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
# See https://github.com/pkgconf/pkgconf/issues/213
# See https://bugzilla.redhat.com/show_bug.cgi?id=1974883
# See https://bugzilla.redhat.com/1975416
# Cherry picked from https://github.com/pkgconf/pkgconf/commit/ed86f2dda3bc99e34775f0fae54e314718037516
Patch1: 0001-Don-t-prepend-sysroot_dir-if-pkg-config-file-lies-ou.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make BuildRequires: make
@ -51,11 +35,9 @@ BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libtool BuildRequires: libtool
%if %{with tests}
# For unit tests # For unit tests
BuildRequires: kyua BuildRequires: %{_bindir}/kyua
BuildRequires: atf-tests BuildRequires: atf-tests
%endif
# pkgconf uses libpkgconf internally # pkgconf uses libpkgconf internally
Requires: lib%{name}%{?_isa} = %{version}-%{release} Requires: lib%{name}%{?_isa} = %{version}-%{release}
@ -133,9 +115,7 @@ autoreconf -fiv
%check %check
%if %{with tests}
make check make check
%endif
%install %install
@ -143,35 +123,19 @@ make check
find %{buildroot} -name '*.la' -print -delete 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 <<EOM
%%pkgconfig_personalitydir %{_datadir}/pkgconfig/personality.d
EOM
%if %{with pkgconfig_compat} %if %{with pkgconfig_compat}
install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
sed -e "s|@TARGET_PLATFORM@|%{_target_platform}|" \ sed -e "s|@TARGET_PLATFORM@|%{_target_platform}|" \
-e "s|@PKGCONF_LIBDIRS_LOCAL@|/usr/local/%{_lib}/pkgconfig:/usr/local/share/pkgconfig:%{pkgconf_libdirs}|" \
-e "s|@PKGCONF_SYSLIBDIR_LOCAL@|/usr/local/%{_lib}:%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR_LOCAL@|/usr/local/include:%{_includedir}|" \
-e "s|@PKGCONF_LIBDIRS@|%{pkgconf_libdirs}|" \ -e "s|@PKGCONF_LIBDIRS@|%{pkgconf_libdirs}|" \
-e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \ -e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \ -e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
-i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config -i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
install -pm 0755 %{SOURCE2} %{buildroot}%{_bindir}/pkg-config ln -sf pkgconf %{buildroot}%{_bindir}/pkg-config
sed -e "s|@PKGCONF_BINDIR@|%{_bindir}|" \ # I don't have a better way to deal with this...
-i %{buildroot}%{_bindir}/pkg-config cp -a %{buildroot}%{_mandir}/man1/pkgconf.1 %{buildroot}%{_mandir}/man1/pkg-config.1
# Link pkg-config(1) to pkgconf(1)
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/pkg-config.1
mkdir -p %{buildroot}%{_libdir}/pkgconfig mkdir -p %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_datadir}/pkgconfig mkdir -p %{buildroot}%{_datadir}/pkgconfig
@ -191,11 +155,6 @@ rm -rf %{buildroot}%{_datadir}/aclocal
%{_bindir}/%{name} %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%{_mandir}/man5/pc.5* %{_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 lib%{name} %files -n lib%{name}
%license COPYING %license COPYING
@ -220,89 +179,6 @@ rm -rf %{buildroot}%{_datadir}/aclocal
%endif %endif
%changelog %changelog
* Thu Oct 07 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.3-10
- Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
resolves: rhbz#1975416
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.3-9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.3-8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 22 2021 Tomas Popela <tpopela@redhat.com> - 1.7.3-7
- Conditionalize the unit tests, disable them on RHEL 9
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 19 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-5
- Use internal target platform definition for pkg-config wrapper
* Thu Oct 15 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-4
- Fix pkg-config wrapper for armv7hl
* Thu Oct 15 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-3
- Make /usr/bin/pkg-config multilib safe
* Mon Aug 10 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-2
- Add /usr/local paths to pkg-config(1) search path for non RPM builds
* Mon Aug 03 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-1
- Update to 1.7.3
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 25 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jul 14 13:23:30 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.3-1
- Update to 1.6.3
* Fri Jul 12 09:36:57 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.2-1
- Update to 1.6.2
* Mon Mar 25 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.1-1
- Update to 1.6.1
* Sat Feb 09 2019 Neal Gompa <ngompa13@gmail.com> - 1.6.0-1
- Update to 1.6.0
- Add personality.d directories for cross-targets
- Add pkgconf rpm macros for pkgconf directories
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Nov 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.4-1
- Update to 1.5.4
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.5.3-2
- Rebuild with fixed binutils
* Sun Jul 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.3-1
- Update to 1.5.3
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Jun 29 2018 Neal Gompa <ngompa13@gmail.com> - 1.5.1-2
- Add patch to fix system path override issue
* Wed Jun 27 2018 Neal Gompa <ngompa13@gmail.com> - 1.5.1-1
- Upgrade to 1.5.1
* Sat Mar 31 2018 Neal Gompa <ngompa13@gmail.com> - 1.4.2-1 * Sat Mar 31 2018 Neal Gompa <ngompa13@gmail.com> - 1.4.2-1
- Update to 1.4.2 - Update to 1.4.2
- Drop conditionals for old Fedora releases - Drop conditionals for old Fedora releases

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -1,8 +0,0 @@
#!/bin/sh
# Multilib safe wrapper for pkg-config to call correct platform-specific version of pkg-config
## Vendored definition of %_target_platform from redhat-rpm-config to avoid depending on it
TARGET_PLATFORM=$(rpm --eval '%{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}')
exec "@PKGCONF_BINDIR@/${TARGET_PLATFORM}-pkg-config" "$@"

View File

@ -1,16 +0,0 @@
#!/bin/sh
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@
if [ -z "${RPM_BUILD_ROOT}" ]; then
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS_LOCAL@}"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR_LOCAL@}"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR_LOCAL@}"
else
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
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@}"
fi
exec pkgconf "$@"

View File

@ -1 +0,0 @@
SHA512 (pkgconf-1.7.3.tar.xz) = 37b6c4f9f3b93970e35b6970fde22fbbde65e7fa32a5634b3fdfc25cc1f33843582722ad13d9a8e96fd6768406fcbe86bf5feb76996ddd0bb66d6ff91e65f0b6