public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - file classification tweaks for text files (#494817)
Date: Mon, 23 Nov 2026 09:25:52 GMT [thread overview]
Message-ID: <179542595289.1.15834622355676260788.rpms-rpm-c14960808c24@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : c14960808c243645ce9f0c81fabbf5eed3cdf3f6
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2009-04-17T10:55:19+00:00
Stats : +41/-13 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/c14960808c243645ce9f0c81fabbf5eed3cdf3f6?branch=pmatilai-v6
Log:
- file classification tweaks for text files (#494817)
- disable libmagic text token checks, it's way too error-prone
- consistently classify all text as such and include description
---
diff --git a/rpm-4.7.0-extra-provides.patch b/rpm-4.7.0-extra-provides.patch
index 3fd9a12..b20a2a3 100644
--- a/rpm-4.7.0-extra-provides.patch
+++ b/rpm-4.7.0-extra-provides.patch
@@ -1,7 +1,8 @@
-diff -up rpm-4.7.0-beta1/build/rpmfc.c.extra-prov rpm-4.7.0-beta1/build/rpmfc.c
---- rpm-4.7.0-beta1/build/rpmfc.c.extra-prov 2009-02-26 17:31:12.000000000 +0200
-+++ rpm-4.7.0-beta1/build/rpmfc.c 2009-02-26 17:31:55.000000000 +0200
-@@ -485,6 +485,7 @@ static const struct rpmfcTokens_s const
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index 1bb1c3b..4e57869 100644
+--- a/build/rpmfc.c
++++ b/build/rpmfc.c
+@@ -484,6 +484,7 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
@@ -9,7 +10,28 @@ diff -up rpm-4.7.0-beta1/build/rpmfc.c.extra-prov rpm-4.7.0-beta1/build/rpmfc.c
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
-@@ -1189,6 +1190,31 @@ exit:
+@@ -496,19 +497,14 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
+ { "SGML", RPMFC_WHITE|RPMFC_INCLUDE },
+ { "XML", RPMFC_WHITE|RPMFC_INCLUDE },
+
+- { " program text", RPMFC_WHITE|RPMFC_INCLUDE },
+ { " source", RPMFC_WHITE|RPMFC_INCLUDE },
+ { "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
+ { " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
+
+- { "ASCII English text", RPMFC_WHITE|RPMFC_INCLUDE },
+- { "ASCII text", RPMFC_WHITE|RPMFC_INCLUDE },
+- { "ISO-8859 text", RPMFC_WHITE|RPMFC_INCLUDE },
+-
+ { "symbolic link to", RPMFC_SYMLINK|RPMFC_INCLUDE },
+ { "socket", RPMFC_DEVICE },
+ { "special", RPMFC_DEVICE },
+- { " text", RPMFC_TEXT },
++ { " text", RPMFC_TEXT|RPMFC_INCLUDE },
+
+ { "ASCII", RPMFC_WHITE },
+ { "ISO-8859", RPMFC_WHITE },
+@@ -1184,6 +1180,31 @@ exit:
#endif
}
@@ -41,7 +63,7 @@ diff -up rpm-4.7.0-beta1/build/rpmfc.c.extra-prov rpm-4.7.0-beta1/build/rpmfc.c
typedef const struct rpmfcApplyTbl_s {
int (*func) (rpmfc fc);
int colormask;
-@@ -1201,6 +1227,7 @@ static const struct rpmfcApplyTbl_s cons
+@@ -1196,6 +1217,7 @@ static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
@@ -49,19 +71,20 @@ diff -up rpm-4.7.0-beta1/build/rpmfc.c.extra-prov rpm-4.7.0-beta1/build/rpmfc.c
{ rpmfcSYMLINK, RPMFC_SYMLINK },
{ NULL, 0 }
};
-@@ -1320,7 +1347,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg
+@@ -1315,7 +1337,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
size_t slen;
int fcolor;
int xx;
- int msflags = MAGIC_CHECK; /* XXX MAGIC_COMPRESS flag? */
-+ int msflags = MAGIC_CHECK | MAGIC_COMPRESS;
++ int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
magic_t ms = NULL;
if (fc == NULL || argv == NULL)
-diff -up rpm-4.7.0-beta1/macros.in.extra-prov rpm-4.7.0-beta1/macros.in
---- rpm-4.7.0-beta1/macros.in.extra-prov 2009-02-26 17:31:12.000000000 +0200
-+++ rpm-4.7.0-beta1/macros.in 2009-02-26 17:32:38.000000000 +0200
-@@ -494,6 +494,9 @@ print (t)\
+diff --git a/macros.in b/macros.in
+index c187f62..945e89b 100644
+--- a/macros.in
++++ b/macros.in
+@@ -489,6 +489,9 @@ print (t)\
%__pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides
%__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
diff --git a/rpm.spec b/rpm.spec
index 19cc45a..86d4d6b 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -393,6 +393,11 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Fri Apr 17 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-2
+- file classification tweaks for text files (#494817)
+ - disable libmagic text token checks, it's way too error-prone
+ - consistently classify all text as such and include description
+
* Thu Apr 16 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-1
- update to 4.7.0 final (http://rpm.org/wiki/Releases/4.7.0)
- fixes #494049, #495429
reply other threads:[~2026-11-23 9:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542595289.1.15834622355676260788.rpms-rpm-c14960808c24@fedoraproject.org \
--to=pmatilai@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox