Compare commits

...

No commits in common. 'c9' and 'cs10' have entirely different histories.
c9 ... cs10

2
.gitignore vendored

@ -1 +1 @@
SOURCES/pkgconf-1.7.3.tar.xz
SOURCES/pkgconf-2.1.0.tar.xz

@ -1 +1 @@
e90c3d993b7d2246d3b72ab558591a07c3b22ee2 SOURCES/pkgconf-1.7.3.tar.xz
ec10c4205d122f9ceb781afdeca46de5386a223f SOURCES/pkgconf-2.1.0.tar.xz

@ -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

@ -5,12 +5,10 @@
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
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@}"
exec pkgconf "$@"

@ -22,27 +22,22 @@
# Search path for pc files for pkgconf
%global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
# libpkgconf soversion major version
%global libsomajor 4
Name: pkgconf
Version: 1.7.3
Release: 10%{?dist}
Version: 2.1.0
Release: 3%{?dist}
Summary: Package compiler and linker metadata toolkit
License: ISC
URL: http://pkgconf.org/
# Mirror at https://releases.pagure.org/pkgconf/pkgconf/
Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz
# Simple wrapper scripts to offer platform versions of pkgconfig
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: make
@ -118,6 +113,14 @@ the system provider of pkg-config.
%endif
%package -n bomtool
Summary: Simple SBOM generator using pc(5) files
Requires: lib%{name}%{?_isa} = %{version}-%{release}
%description -n bomtool
bomtool is a program which helps generate a Software Bill of Materials
manifest using data from installed .pc files.
%prep
%autosetup -p1
@ -134,7 +137,7 @@ autoreconf -fiv
%check
%if %{with tests}
make check
make check || :
%endif
@ -158,8 +161,6 @@ install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-confi
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_SYSLIBDIR@|%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
@ -199,7 +200,7 @@ rm -rf %{buildroot}%{_datadir}/aclocal
%files -n lib%{name}
%license COPYING
%{_libdir}/lib%{name}*.so.*
%{_libdir}/lib%{name}*.so.%{libsomajor}{,.*}
%files -n lib%{name}-devel
%{_libdir}/lib%{name}*.so
@ -219,17 +220,67 @@ rm -rf %{buildroot}%{_datadir}/aclocal
%dir %{_datadir}/pkgconfig
%endif
%files -n bomtool
%{_bindir}/bomtool
%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
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.1.0-3
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.1.0-2
- Bump release for June 2024 mass rebuild
* Mon Feb 12 2024 Jens Petersen <petersen@redhat.com> - 2.1.0-1
- update to 2.1.0
- https://github.com/pkgconf/pkgconf/blob/pkgconf-2.1.0/NEWS
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue May 16 2023 Sérgio Basto <sergio@serjux.com> - 1.9.5-1
- Update pkgconf to 1.9.5 (#2192963)
* Mon May 15 2023 Sérgio Basto <sergio@serjux.com> - 1.9.4-2
- Rebuild for ATF soname bump
* Wed Feb 22 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.9.4-1
- Rebase to 1.9.4
* Wed Feb 22 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.8.0-6
- Drop dependency on system-rpm-config (#2172406)
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 01 2022 Amit Shah <amitshah@fedoraproject.org> - 1.8.0-4
- Depend on system-rpm-config
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Jul 25 2021 Neal Gompa <ngompa@fedoraproject.org> - 1.8.0-1
- Update to 1.8.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* 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
* Wed Jun 23 2021 Sandro Mani <manisandro@gmail.com> - 1.7.4-2
- Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir (#1974883)
* 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
* Wed Apr 28 2021 Neal Gompa <ngompa13@gmail.com> - 1.7.4-1
- Update to 1.7.4
- Don't add /usr/local to syspaths (#1953348)
* Mon Feb 22 2021 Tomas Popela <tpopela@redhat.com> - 1.7.3-7
- Conditionalize the unit tests, disable them on RHEL 9

Loading…
Cancel
Save