- update to rpm 4.7.0 beta1
This commit is contained in:
parent
7c290328b0
commit
b60210f8a6
@ -1 +1 @@
|
|||||||
rpm-4.6.0.tar.bz2
|
rpm-4.7.0-beta1.tar.bz2
|
||||||
|
157
rpm-4.7.0-devel-autodep.patch
Normal file
157
rpm-4.7.0-devel-autodep.patch
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
diff -up rpm-4.7.0-beta1/build/rpmfc.c.devel-autodep rpm-4.7.0-beta1/build/rpmfc.c
|
||||||
|
--- rpm-4.7.0-beta1/build/rpmfc.c.devel-autodep 2009-02-23 09:16:11.000000000 +0200
|
||||||
|
+++ rpm-4.7.0-beta1/build/rpmfc.c 2009-02-26 17:30:04.000000000 +0200
|
||||||
|
@@ -506,7 +506,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 },
|
||||||
|
|
||||||
|
@@ -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]++;
|
||||||
|
}
|
||||||
|
|
73
rpm-4.7.0-extra-provides.patch
Normal file
73
rpm-4.7.0-extra-provides.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
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
|
||||||
|
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
|
||||||
|
|
||||||
|
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
|
||||||
|
+ { " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||||
|
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
|
||||||
|
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
|
||||||
|
|
||||||
|
@@ -1189,6 +1190,31 @@ exit:
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int rpmfcMISC(rpmfc fc)
|
||||||
|
+{
|
||||||
|
+ struct stat st;
|
||||||
|
+ int rc = -1;
|
||||||
|
+ const char *what = NULL;
|
||||||
|
+ const char * fn = fc->fn[fc->ix];
|
||||||
|
+ /* this part is enumerated, compare equality not bit flags */
|
||||||
|
+ int ftype = fc->fcolor->vals[fc->ix] & 0x000F0000;
|
||||||
|
+
|
||||||
|
+ if (ftype == RPMFC_FONT) {
|
||||||
|
+ what = "fontconfig";
|
||||||
|
+ } else if (ftype == RPMFC_TEXT && rpmFileHasSuffix(fn, ".desktop")) {
|
||||||
|
+ what = "desktop";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (what == NULL || stat(fn, &st) < 0 || !S_ISREG(st.st_mode)) {
|
||||||
|
+ goto exit;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ (void) rpmfcHelper(fc, 'P', what);
|
||||||
|
+ rc = 0;
|
||||||
|
+
|
||||||
|
+exit:
|
||||||
|
+ return rc;
|
||||||
|
+}
|
||||||
|
typedef const struct rpmfcApplyTbl_s {
|
||||||
|
int (*func) (rpmfc fc);
|
||||||
|
int colormask;
|
||||||
|
@@ -1201,6 +1227,7 @@ static const struct rpmfcApplyTbl_s cons
|
||||||
|
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
|
||||||
|
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
|
||||||
|
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
|
||||||
|
+ { rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
|
||||||
|
{ rpmfcSYMLINK, RPMFC_SYMLINK },
|
||||||
|
{ NULL, 0 }
|
||||||
|
};
|
||||||
|
@@ -1320,7 +1347,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg
|
||||||
|
size_t slen;
|
||||||
|
int fcolor;
|
||||||
|
int xx;
|
||||||
|
- int msflags = MAGIC_CHECK; /* XXX MAGIC_COMPRESS flag? */
|
||||||
|
+ int msflags = MAGIC_CHECK; /* add MAGIC_COMPRESS eventually */
|
||||||
|
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)\
|
||||||
|
%__pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides
|
||||||
|
%__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
|
||||||
|
|
||||||
|
+%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
|
||||||
|
+%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
|
||||||
|
+
|
||||||
|
#==============================================================================
|
||||||
|
# ---- Database configuration macros.
|
||||||
|
# Macros used to configure Berkley db parameters.
|
48
rpm.spec
48
rpm.spec
@ -4,6 +4,8 @@
|
|||||||
%bcond_with sqlite
|
%bcond_with sqlite
|
||||||
# just for giggles, option to build with internal Berkeley DB
|
# just for giggles, option to build with internal Berkeley DB
|
||||||
%bcond_with int_bdb
|
%bcond_with int_bdb
|
||||||
|
# not yet, a missing test-data file in beta1 tarball causes two tests to fail
|
||||||
|
%bcond_with check
|
||||||
|
|
||||||
# switch rpm itself back to md5 file digests until the dust settles a bit
|
# switch rpm itself back to md5 file digests until the dust settles a bit
|
||||||
%define _source_filedigest_algorithm 0
|
%define _source_filedigest_algorithm 0
|
||||||
@ -13,8 +15,9 @@
|
|||||||
|
|
||||||
%define rpmhome /usr/lib/rpm
|
%define rpmhome /usr/lib/rpm
|
||||||
|
|
||||||
%define rpmver 4.6.0
|
%define rpmver 4.7.0
|
||||||
%define srcver %{rpmver}
|
%define snapver beta1
|
||||||
|
%define srcver %{rpmver}-%{snapver}
|
||||||
|
|
||||||
%define bdbver 4.7.25
|
%define bdbver 4.7.25
|
||||||
%define dbprefix db
|
%define dbprefix db
|
||||||
@ -22,17 +25,17 @@
|
|||||||
Summary: The RPM package management system
|
Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 11%{?dist}
|
Release: 0.%{snapver}.1%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.rpm.org/
|
Url: http://www.rpm.org/
|
||||||
Source0: http://rpm.org/releases/4.6.x/%{name}-%{srcver}.tar.bz2
|
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
|
||||||
%if %{with int_bdb}
|
%if %{with int_bdb}
|
||||||
Source1: db-%{bdbver}.tar.gz
|
Source1: db-%{bdbver}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
Source10: desktop-file.prov
|
Source10: desktop-file.prov
|
||||||
Source11: fontconfig.prov
|
Source11: fontconfig.prov
|
||||||
|
|
||||||
Patch0: rpm-4.5.90-devel-autodep.patch
|
Patch0: rpm-4.7.0-devel-autodep.patch
|
||||||
Patch1: rpm-4.5.90-pkgconfig-path.patch
|
Patch1: rpm-4.5.90-pkgconfig-path.patch
|
||||||
Patch2: rpm-4.5.90-gstreamer-provides.patch
|
Patch2: rpm-4.5.90-gstreamer-provides.patch
|
||||||
# Fedora specspo is setup differently than what rpm expects, considering
|
# Fedora specspo is setup differently than what rpm expects, considering
|
||||||
@ -40,17 +43,9 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch
|
|||||||
Patch3: rpm-4.6.0-fedora-specspo.patch
|
Patch3: rpm-4.6.0-fedora-specspo.patch
|
||||||
|
|
||||||
# Patches already in upstream
|
# Patches already in upstream
|
||||||
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
|
|
||||||
Patch207: rpm-4.6.0-rpmds-null.patch
|
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch300: rpm-4.6.0-extra-provides.patch
|
Patch300: rpm-4.7.0-extra-provides.patch
|
||||||
|
|
||||||
# Partially GPL/LGPL dual-licensed and some bits with BSD
|
# Partially GPL/LGPL dual-licensed and some bits with BSD
|
||||||
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
|
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
|
||||||
@ -70,6 +65,10 @@ Requires: curl
|
|||||||
BuildRequires: db4-devel = %{bdbver}
|
BuildRequires: db4-devel = %{bdbver}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
BuildRequires: fakechroot
|
||||||
|
%endif
|
||||||
|
|
||||||
# XXX generally assumed to be installed but make it explicit as rpm
|
# XXX generally assumed to be installed but make it explicit as rpm
|
||||||
# is a bit special...
|
# is a bit special...
|
||||||
BuildRequires: redhat-rpm-config
|
BuildRequires: redhat-rpm-config
|
||||||
@ -93,6 +92,8 @@ BuildRequires: lzma-devel >= 4.42
|
|||||||
%if %{with sqlite}
|
%if %{with sqlite}
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
%endif
|
%endif
|
||||||
|
# Not enabling these yet
|
||||||
|
# BuildRequires: libcap-devel libacl-devel
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -182,15 +183,6 @@ that will manipulate RPM packages and databases.
|
|||||||
%patch2 -p1 -b .gstreamer-prov
|
%patch2 -p1 -b .gstreamer-prov
|
||||||
%patch3 -p1 -b .fedora-specspo
|
%patch3 -p1 -b .fedora-specspo
|
||||||
|
|
||||||
%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
|
|
||||||
%patch207 -p1 -b .rpmds-null
|
|
||||||
|
|
||||||
%patch300 -p1 -b .extra-prov
|
%patch300 -p1 -b .extra-prov
|
||||||
|
|
||||||
%if %{with int_bdb}
|
%if %{with int_bdb}
|
||||||
@ -270,6 +262,11 @@ chmod 0644 $RPM_BUILD_ROOT/%{rpmhome}/perldeps.pl
|
|||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
%endif
|
||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -328,7 +325,7 @@ exit 0
|
|||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/librpm*-*.so
|
%{_libdir}/librpm*.so.*
|
||||||
|
|
||||||
%files build
|
%files build
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -391,6 +388,9 @@ exit 0
|
|||||||
%doc doc/librpm/html/*
|
%doc doc/librpm/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 06 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-0.beta1.1
|
||||||
|
- update to 4.7.0-beta1 (http://rpm.org/wiki/Releases/4.7.0)
|
||||||
|
|
||||||
* Fri Feb 27 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-11
|
* Fri Feb 27 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-11
|
||||||
- build rpm itself with md5 file digests for now to ensure upgradability
|
- build rpm itself with md5 file digests for now to ensure upgradability
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user