[packages/rpm] - drop etc_dir patch, it is non-upgradeable - drop ~/etc/rpmmacros (notice no '.') from extra macro

baggins baggins at pld-linux.org
Thu Sep 13 13:02:13 CEST 2012


commit 044171ea6eb7cfc8515d57102788739a95c5992c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Sep 13 13:00:41 2012 +0200

    - drop etc_dir patch, it is non-upgradeable
    - drop ~/etc/rpmmacros (notice no '.') from extra macro files
      (~/etc/.rpmmacros is still there)

 rpm-etc_dir.patch | 69 -------------------------------------------------------
 rpm.spec          |  7 ++----
 2 files changed, 2 insertions(+), 74 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 03b7940..fa8579e 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -91,8 +91,7 @@ Patch5:		%{name}-perl-req-perlfile.patch
 Patch6:		%{name}-scripts-closefds.patch
 Patch7:		%{name}-php-macros.patch
 Patch8:		%{name}-gettext-in-header.patch
-Patch9:	%{name}-lua.patch
-Patch10:	%{name}-etc_dir.patch
+Patch9:		%{name}-lua.patch
 Patch11:	%{name}-php-deps.patch
 Patch13:	%{name}-notsc.patch
 Patch14:	%{name}-hack-norpmlibdep.patch
@@ -753,8 +752,6 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch7 -p1
 %patch8 -p1
 %{?with_system_lua:%patch9 -p1}
-# CHECK ME - macrofiles: ~/etc could be used
-#%%patch10 -p1
 %patch11 -p1
 %ifnarch i386 i486
 # enable TSC for capable archs
@@ -890,7 +887,7 @@ sed -i \
 	--with-keyutils=none \
 	--with-uuid=%{_libdir}:%{_includedir}/ossp-uuid \
 	--without-path-versioned \
-	--with-extra-path-macros='%{_sysconfdir}/rpm/macros.d/*.macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/macros.build:~/etc/rpmmacros:~/etc/.rpmmacros:~/.rpmmacros' \
+	--with-extra-path-macros='%{_sysconfdir}/rpm/macros.d/*.macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/macros.build:~/etc/.rpmmacros:~/.rpmmacros' \
 	--with-bugreport="http://bugs.pld-linux.org/" \
 	--with-vendor=pld
 
diff --git a/rpm-etc_dir.patch b/rpm-etc_dir.patch
deleted file mode 100644
index d296f22..0000000
--- a/rpm-etc_dir.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -Nru rpm-4.1/lib/rpmrc.c rpm-4.1.new/lib/rpmrc.c
---- rpm-4.1/lib/rpmrc.c	Tue Aug 20 16:53:44 2002
-+++ rpm-4.1.new/lib/rpmrc.c	Tue Mar 11 18:41:48 2003
-@@ -1820,23 +1820,37 @@
- 	/* Expand ~/ to $HOME/ */
- 	fn[0] = '\0';
- 	if (r[0] == '~' && r[1] == '/') {
-+	    const char * etc_dir = getenv("HOME_ETC");
- 	    const char * home = getenv("HOME");
--	    if (home == NULL) {
--	    /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
--		if (rcfiles == rpmRcfiles && myrcfiles != r)
--		    continue;
--		rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
--		rc = 1;
--		break;
--	    }
--	    if (strlen(home) > (sizeof(fn) - strlen(r))) {
--		rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
--				r);
--		rc = 1;
--		break;
-+	    if (etc_dir) {
-+		    if (strlen(etc_dir) > (sizeof(fn) - strlen(r))) {
-+			    rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME_ETC is too large.\n"),r);
-+			    rc = 1;
-+			    break;
-+		    }
-+		    strcpy(fn, etc_dir);
-+		    strncat(fn, "/", sizeof(fn) - strlen(fn));
-+		    r+=2;
-+	    } else {
-+		    if (home == NULL) {
-+			    /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
-+			    if (rcfiles == rpmRcfiles && myrcfiles != r)
-+				    continue;
-+			    rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
-+			    rc = 1;
-+			    break;
-+		    }
-+		    if (strlen(home) > (sizeof(fn) - strlen(r))) {
-+			    rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
-+					    r);
-+			    rc = 1;
-+			    break;
-+		    }
-+		    strcpy(fn, home);
-+		    r++;
- 	    }
--	    strcpy(fn, home);
--	    r++;
-+
-+
- 	}
- 	strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
- 	fn[sizeof(fn)-1] = '\0';
---- rpm-4.4.8/po/pl.po.orig	2007-04-08 16:11:42.125435004 +0200
-+++ rpm-4.4.8/po/pl.po	2007-04-08 16:25:11.343549717 +0200
-@@ -3251,6 +3251,10 @@
- msgid "Cannot expand %s\n"
- msgstr "Nie mo�na rozwin�� %s\n"
- 
-+#: lib/rpmrc.c:1935
-+msgid "Cannot read %s, HOME_ETC is too large.\n"
-+msgstr "Nie mo�na odczyta� %s, HOME_ETC jest zbyt du�e.\n"
-+
- #: lib/rpmrc.c:1924
- #, c-format
- msgid "Cannot read %s, HOME is too large.\n"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/044171ea6eb7cfc8515d57102788739a95c5992c



More information about the pld-cvs-commit mailing list