public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - loosen up restrictions on dependency names (#455119)
@ 2026-11-23 9:25 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:25 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 3f11e35589b2b8d21d067b9111f433d0e64ff0cc
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2009-02-21T11:02:55+00:00
Stats : +110/-4 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/3f11e35589b2b8d21d067b9111f433d0e64ff0cc?branch=pmatilai-v6
Log:
- loosen up restrictions on dependency names (#455119)
- handle inter-dependent pkg-config files for requires too (#473814)
- error/warn on elf binaries in noarch package in build
---
diff --git a/rpm-4.6.0-noarch-elf-check.patch b/rpm-4.6.0-noarch-elf-check.patch
new file mode 100644
index 0000000..4c674b4
--- /dev/null
+++ b/rpm-4.6.0-noarch-elf-check.patch
@@ -0,0 +1,47 @@
+diff -up rpm-4.6.0/build/files.c.noarch-elf-check rpm-4.6.0/build/files.c
+--- rpm-4.6.0/build/files.c.noarch-elf-check 2009-02-06 09:18:53.000000000 +0200
++++ rpm-4.6.0/build/files.c 2009-02-21 12:53:21.000000000 +0200
+@@ -2174,17 +2174,27 @@ int processBinaryFiles(rpmSpec spec, int
+ check_fileList = newStringBuf();
+
+ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+- const char *n, *v, *r;
++ const char *n, *v, *r, *a;
+
+ if (pkg->fileList == NULL)
+ continue;
+
+- (void) headerNVR(pkg->header, &n, &v, &r);
+- rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s\n"), n, v, r);
++ (void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a);
++ rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s-%s\n"), n, v, r, a);
+
+ if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK ||
+ (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
+ goto exit;
++
++ if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) {
++ int terminate = rpmExpandNumeric("%{?_binaries_in_noarch_packages_terminate_build}");
++ rpmlog(terminate ? RPMLOG_ERR : RPMLOG_WARNING,
++ _("Arch dependent binaries in noarch package\n"));
++ if (terminate) {
++ rc = RPMRC_FAIL;
++ goto exit;
++ }
++ }
+ }
+
+ /* Now we have in fileList list of files from all packages.
+diff -up rpm-4.6.0/macros.in.noarch-elf-check rpm-4.6.0/macros.in
+--- rpm-4.6.0/macros.in.noarch-elf-check 2009-02-21 12:41:20.000000000 +0200
++++ rpm-4.6.0/macros.in 2009-02-21 12:41:20.000000000 +0200
+@@ -375,6 +375,9 @@ package or when debugging this package.\
+ # Note: The default value should be 0 for legacy compatibility.
+ %_missing_doc_files_terminate_build 1
+
++# Should binaries in noarch packages terminate a build?
++%_binaries_in_noarch_packages_terminate_build 1
++
+ #
+ # Should an ELF file processed by find-debuginfo.sh having no build ID
+ # terminate a build? This is left undefined to disable it and defined to
diff --git a/rpm-4.6.0-pkgconfig-reqs.patch b/rpm-4.6.0-pkgconfig-reqs.patch
new file mode 100644
index 0000000..cadf3bb
--- /dev/null
+++ b/rpm-4.6.0-pkgconfig-reqs.patch
@@ -0,0 +1,20 @@
+commit 6ce7def270994a675836e2b945a7f70eb2b03c2b
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Mon Feb 2 14:17:27 2009 +0200
+
+ Prepend PKG_CONFIG_PATH on pkgconfig requires extraction too (rhbz#473814)
+ - similar to ab02fb183a441b6a30c863aebf49be992cd431fe but for requires
+
+diff --git a/scripts/pkgconfigdeps.sh b/scripts/pkgconfigdeps.sh
+index 6baa0f1..2251abe 100755
+--- a/scripts/pkgconfigdeps.sh
++++ b/scripts/pkgconfigdeps.sh
+@@ -34,6 +34,8 @@ case $1 in
+ *.pc)
+ i="`expr $i + 1`"
+ [ $i -eq 1 ] && echo "$pkgconfig"
++ DIR="`dirname ${filename}`"
++ export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
+ $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
+ echo "pkgconfig($n)" "$r" "$v"
+ done
diff --git a/rpm-4.6.0-utf-dependencies.patch b/rpm-4.6.0-utf-dependencies.patch
new file mode 100644
index 0000000..c6e6e81
--- /dev/null
+++ b/rpm-4.6.0-utf-dependencies.patch
@@ -0,0 +1,29 @@
+commit 58e92b976aebe43ebddbe2d2ec41bff0dd46b6fc
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Sat Feb 21 12:11:54 2009 +0200
+
+ Loosen up restrictions on dependency token names (rhbz#455119)
+ - Package names aren't restricted to ascii, no point restricting
+ dependency names either.
+ - This lets UTF-8 to go through but also all sorts of other junk but
+ as we haven't got a clue about the specs encoding, no can do. So we
+ only check for bad characters from plain ascii.
+
+diff --git a/build/parseReqs.c b/build/parseReqs.c
+index 54230c7..f2130ec 100644
+--- a/build/parseReqs.c
++++ b/build/parseReqs.c
+@@ -100,8 +100,11 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
+
+ Flags = (tagflags & ~RPMSENSE_SENSEMASK);
+
+- /* Tokens must begin with alphanumeric, _, or / */
+- if (!(risalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
++ /*
++ * Tokens must begin with alphanumeric, _, or /, but we don't know
++ * the spec's encoding so we only check what we can: plain ascii.
++ */
++ if (isascii(r[0]) && !(risalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
+ rpmlog(RPMLOG_ERR,
+ _("line %d: Dependency tokens must begin with alpha-numeric, '_' or '/': %s\n"),
+ spec->lineNum, spec->line);
diff --git a/rpm.spec b/rpm.spec
index 0719829..68a3260 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -18,7 +18,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 6%{?dist}
+Release: 7%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -39,10 +39,13 @@ Patch3: rpm-4.6.0-fedora-specspo.patch
Patch200: rpm-4.6.0-rc1-defaultdocdir.patch
Patch201: rpm-4.6.0-inherit-group.patch
Patch202: rpm-4.6.0-anyarch-actions-fix.patch
+Patch203: rpm-4.6.0-utf-dependencies.patch
+Patch204: rpm-4.6.0-noarch-elf-check.patch
+Patch205: rpm-4.6.0-pkgconfig-reqs.patch
+Patch206: rpm-4.6.0-python-validate.patch
# These are not yet upstream
Patch300: rpm-4.6.0-extra-provides.patch
-Patch301: rpm-4.6.0-python-validate.patch
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@@ -173,13 +176,15 @@ that will manipulate RPM packages and databases.
%patch2 -p1 -b .gstreamer-prov
%patch3 -p1 -b .fedora-specspo
-# upstream but not on 4.6.x branch yet, oops
%patch200 -p1 -b .defaultdocdir
%patch201 -p1 -b .inherit-group
%patch202 -p1 -b .anyarch-actions-fix
+%patch203 -p1 -b .utf-dependencies
+%patch204 -p1 -b .noarch-elf-check
+%patch205 -p1 -b .pkgconfig-reqs
+%patch206 -p1 -b .python-bytecompile
%patch300 -p1 -b .extra-prov
-%patch301 -p1 -b .python-bytecompile
%if %{with int_bdb}
ln -s db-%{bdbver} db
@@ -379,6 +384,11 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Sat Feb 21 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-7
+- loosen up restrictions on dependency names (#455119)
+- handle inter-dependent pkg-config files for requires too (#473814)
+- error/warn on elf binaries in noarch package in build
+
* Fri Feb 20 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-6
- error out on uncompilable python code (Tim Waugh)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:25 [rpms/rpm] pmatilai-v6: - loosen up restrictions on dependency names (#455119) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox