rpms/rpm/F-10 rpm-4.6.1-devel-autodep.patch, NONE, 1.1 .cvsignore, 1.29, 1.30 rpm.spec, 1.313, 1.314 sources, 1.137, 1.138 rpm-4.5.90-devel-autodep.patch, 1.1, NONE rpm-4.6.0-alpha-isa.patch, 1.1, NONE rpm-4.6.0-dssingle-null.patch, 1.1, NONE rpm-4.6.0-rc1-defaultdocdir.patch, 1.1, NONE rpm-4.6.0-rsa-v4.patch, 1.1, NONE rpm-4.6.0-utf-depnames.patch, 1.1, NONE

Panu Matilainen pmatilai at fedoraproject.org
Mon May 18 11:08:19 UTC 2009


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9658

Modified Files:
	.cvsignore rpm.spec sources 
Added Files:
	rpm-4.6.1-devel-autodep.patch 
Removed Files:
	rpm-4.5.90-devel-autodep.patch rpm-4.6.0-alpha-isa.patch 
	rpm-4.6.0-dssingle-null.patch 
	rpm-4.6.0-rc1-defaultdocdir.patch rpm-4.6.0-rsa-v4.patch 
	rpm-4.6.0-utf-depnames.patch 
Log Message:
- update to rpm 4.6.1 (http://rpm.org/wiki/Releases/4.6.1)
- fixes #487855, #493157 and several others already fixed in F11/rawhide
- drop patches merged upstream
- eliminate bogus leftover rpm:rpm rpmdb ownership


rpm-4.6.1-devel-autodep.patch:

--- NEW FILE rpm-4.6.1-devel-autodep.patch ---
diff -up rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep rpm-4.7.0.git9101/build/rpmfc.c
--- rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep	2009-04-03 09:26:59.000000000 +0300
+++ rpm-4.7.0.git9101/build/rpmfc.c	2009-04-03 11:34:44.000000000 +0300
@@ -505,7 +505,7 @@ static const struct rpmfcTokens_s const 
   { "ASCII text",		RPMFC_WHITE|RPMFC_INCLUDE },
   { "ISO-8859 text",		RPMFC_WHITE|RPMFC_INCLUDE },
 
-  { "symbolic link to",		RPMFC_SYMLINK },
+  { "symbolic link to",		RPMFC_SYMLINK|RPMFC_INCLUDE },
   { "socket",			RPMFC_DEVICE },
   { "special",			RPMFC_DEVICE },
   { " text",			RPMFC_TEXT },
@@ -667,6 +667,105 @@ rpmds rpmfcRequires(rpmfc fc)
 
 
 /**
+ * Ensure that symlinks for shared libs generate a dep on the shared lib
+ * @param fc            file classifier
+ * @return              0 on success
+ */
+static int rpmfcSYMLINK(rpmfc fc)
+{
+    const char * fn = fc->fn[fc->ix];
+    struct stat sb;
+    int fdno;
+
+    if (fc->skipReq) 
+	return 0;
+
+    if (stat(fn, &sb) < 0)
+	return -1;
+    if (S_ISLNK(sb.st_mode))
+        return -1;
+    
+    fdno = open(fn, O_RDONLY);
+    if (fdno < 0) {
+	return fdno;
+    }
+
+#if HAVE_GELF_H && HAVE_LIBELF
+    Elf * elf = NULL;
+    GElf_Ehdr ehdr_mem, * ehdr;
+    int isElf64 = 0;
+    int i, cnt;
+    char * soname = NULL;
+    rpmds ds;
+
+    (void) elf_version(EV_CURRENT);
+    elf = NULL;
+    if ((elf = elf_begin (fdno, ELF_C_READ_MMAP, NULL)) == NULL
+        || elf_kind(elf) != ELF_K_ELF
+        || (ehdr = gelf_getehdr(elf, &ehdr_mem)) == NULL
+        || ehdr->e_type != ET_DYN)
+	goto exit;
+
+/* alpha uses /lib, not /lib64 so don't add (64bit) deps */
+#if !defined(__alpha__)
+    isElf64 = ehdr->e_ident[EI_CLASS] == ELFCLASS64;
+#endif
+
+    for (i = 0; i < ehdr->e_phnum; ++i) {
+	GElf_Phdr phdr_mem;
+	GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem);
+	GElf_Shdr shdr_mem;
+	Elf_Data * data = NULL;
+	Elf_Scn * scn;
+	GElf_Shdr *shdr;
+
+	if (phdr == NULL || phdr->p_type != PT_DYNAMIC)
+	    continue;
+
+	scn = gelf_offscn(elf, phdr->p_offset);
+	shdr = gelf_getshdr(scn, &shdr_mem);
+
+	if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC)
+	    data = elf_getdata (scn, NULL);
+	if (data == NULL)
+	    continue; 
+	  
+	for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) {
+	    GElf_Dyn dynmem;
+	    GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
+	    char *depname = NULL;
+
+	    if (dyn == NULL)
+		break;
+	    if (dyn->d_tag != DT_SONAME)
+		continue;
+
+	    /* add the soname to package deps */
+	    soname = elf_strptr(elf, shdr->sh_link, dyn->d_un.d_val);
+	    if (soname == NULL)
+		break;
+
+	    rasprintf(&depname, "%s%s", soname, isElf64 ? "()(64bit)" : "");
+	    /* Add to package dependencies. */
+	    ds = rpmdsSingle(RPMTAG_REQUIRENAME, depname, "", 
+			     RPMSENSE_FIND_REQUIRES);
+	    free(depname);
+
+	    rpmdsMerge(&fc->requires, ds);
+	    rpmfcAddFileDep(&fc->ddict, fc->ix, ds);
+	    ds = rpmdsFree(ds);
+	    break;
+	}
+    }
+exit:
+    if (elf) (void) elf_end(elf);
+    close(fdno);
+    return 0;
+#endif
+    return -1;
+}
+
+/**
  * Extract script dependencies.
  * @param fc		file classifier
  * @return		0 on success
@@ -1097,6 +1196,7 @@ static const struct rpmfcApplyTbl_s cons
     { rpmfcSCRIPT,	(RPMFC_SCRIPT|RPMFC_BOURNE|
 			 RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
 			 RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
+    { rpmfcSYMLINK,	RPMFC_SYMLINK },
     { NULL, 0 }
 };
 
@@ -1117,6 +1217,7 @@ rpmRC rpmfcApply(rpmfc fc)
     int ix;
     int i;
     int xx;
+    int skipping = 0;
 
     /* Generate package and per-file dependencies. */
     for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
@@ -1171,11 +1272,13 @@ rpmRC rpmfcApply(rpmfc fc)
 	default:
 	    break;
 	case 'P':	
+	    skipping = fc->skipProv;
 	    ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags);
 	    dix = rpmdsFind(fc->provides, ds);
 	    ds = rpmdsFree(ds);
 	    break;
 	case 'R':
+	    skipping = fc->skipReq;
 	    ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags);
 	    dix = rpmdsFind(fc->requires, ds);
 	    ds = rpmdsFree(ds);
@@ -1197,7 +1300,7 @@ assert(dix >= 0);
 	    previx = ix;
 	    xx = argiAdd(&fc->fddictx, ix, argiCount(fc->ddictx)-1);
 	}
-	if (fc->fddictn && fc->fddictn->vals)
+	if (fc->fddictn && fc->fddictn->vals && !skipping)
 	    fc->fddictn->vals[ix]++;
     }
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/.cvsignore,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- .cvsignore	16 Oct 2008 16:19:41 -0000	1.29
+++ .cvsignore	18 May 2009 11:08:15 -0000	1.30
@@ -1 +1 @@
-rpm-4.6.0-rc1.tar.bz2
+rpm-4.6.1.tar.bz2


Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/rpm.spec,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -p -r1.313 -r1.314
--- rpm.spec	2 Apr 2009 17:41:14 -0000	1.313
+++ rpm.spec	18 May 2009 11:08:17 -0000	1.314
@@ -9,7 +9,7 @@
 
 %define rpmhome /usr/lib/rpm
 
-%define rpmver 4.6.0
+%define rpmver 4.6.1
 %define srcver %{rpmver}
 
 %define bdbver 4.5.20
@@ -17,7 +17,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 4%{?dist}
+Release: 1%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -25,7 +25,7 @@ Source0: http://rpm.org/releases/testing
 Source1: db-%{bdbver}.tar.gz
 %endif
 
-Patch0: rpm-4.5.90-devel-autodep.patch
+Patch0: rpm-4.6.1-devel-autodep.patch
 Patch1: rpm-4.5.90-pkgconfig-path.patch
 Patch2: rpm-4.5.90-gstreamer-provides.patch
 # Fedora specspo is setup differently than what rpm expects, considering
@@ -36,11 +36,6 @@ Patch3: rpm-4.6.0-fedora-specspo.patch
 Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
 
 # Patches already in upstream
-Patch200: rpm-4.6.0-rc1-defaultdocdir.patch
-Patch201: rpm-4.6.0-dssingle-null.patch
-Patch202: rpm-4.6.0-utf-depnames.patch
-Patch203: rpm-4.6.0-alpha-isa.patch
-Patch204: rpm-4.6.0-rsa-v4.patch
 
 # Patches not yet upstream
 Patch300: rpm-4.6.0-niagara.patch
@@ -176,12 +171,6 @@ that will manipulate RPM packages and da
 %patch3 -p1 -b .fedora.specspo
 %patch100 -p1 -b .pkgconfig-deps
 
-%patch200 -p1 -b .defaultdocdir
-%patch201 -p1 -b .dssingle-null
-%patch202 -p1 -b .utf-depnames
-%patch203 -p1 -b .alpha-isa
-%patch204 -p1 -b .rsa-v4
-
 %patch300 -p1 -b .niagara
 
 %if %{with int_bdb}
@@ -282,7 +271,7 @@ exit 0
 %dir                            %{_sysconfdir}/rpm
 
 %attr(0755, root, root)   %dir /var/lib/rpm
-%attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/rpm/*
+%attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/rpm/*
 %attr(0755, root, root) %dir %{rpmhome}
 
 /bin/rpm
@@ -379,6 +368,12 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Mon May 18 2009 Panu Matilainen <pmatilai at redhat.com> - 4.6.1-1
+- update to rpm 4.6.1 (http://rpm.org/wiki/Releases/4.6.1)
+- fixes #487855, #493157 and several others already fixed in F11/rawhide
+- drop patches merged upstream
+- eliminate bogus leftover rpm:rpm rpmdb ownership
+
 * Thu Apr  2 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 4.6.0-4
 - actually apply niagara patch
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/sources,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -p -r1.137 -r1.138
--- sources	7 Feb 2009 07:41:52 -0000	1.137
+++ sources	18 May 2009 11:08:18 -0000	1.138
@@ -1 +1 @@
-77bf389f87f61ff53b068a9870aa91ca  rpm-4.6.0.tar.bz2
+08e09317652a1deddbf01e071db1ce8d  rpm-4.6.1.tar.bz2


--- rpm-4.5.90-devel-autodep.patch DELETED ---


--- rpm-4.6.0-alpha-isa.patch DELETED ---


--- rpm-4.6.0-dssingle-null.patch DELETED ---


--- rpm-4.6.0-rc1-defaultdocdir.patch DELETED ---


--- rpm-4.6.0-rsa-v4.patch DELETED ---


--- rpm-4.6.0-utf-depnames.patch DELETED ---




More information about the scm-commits mailing list