mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 10:23:04 +00:00
fix with cooker and rediff rosa vendor patch
This commit is contained in:
parent
6c9e2cb70b
commit
f5747bd633
15 changed files with 1012 additions and 58 deletions
|
@ -38,18 +38,3 @@ diff -Nur rpm-5.3.12/macros/mandriva.in rpm-5.3.12.new/macros/mandriva.in
|
|||
|
||||
# This macro will disable the transaction lock on /var/lib/rpm/__db.*.
|
||||
# This lock is of no use to us and will also result in errors when trying to
|
||||
diff -Nur rpm-5.3.12/macros/openmamba rpm-5.3.12.new/macros/openmamba
|
||||
--- rpm-5.3.12/macros/openmamba 2011-07-12 14:08:41.000000000 +0400
|
||||
+++ rpm-5.3.12.new/macros/openmamba 2012-04-10 14:45:46.000000000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
-%distribution mandriva Linux
|
||||
-%vendor mandriva
|
||||
-%bugurl http://bugs.mandriva.org
|
||||
-%disturl http://mandriva.org
|
||||
+%distribution rosa Linux
|
||||
+%vendor rosa
|
||||
+%bugurl http://bugs.rosalinux.ru/
|
||||
+%disturl http://www.rosalab.ru/
|
||||
|
||||
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
|
||||
|
||||
|
|
23
rpm-5.4.9-add-x32-macros.patch
Normal file
23
rpm-5.4.9-add-x32-macros.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- rpm-5.4.9/cpu-os-macros/x32-linux/macros.x32~ 2012-05-17 06:09:01.611004408 +0200
|
||||
+++ rpm-5.4.9/cpu-os-macros/x32-linux/macros 2012-05-17 06:06:14.725072024 +0200
|
||||
@@ -0,0 +1,20 @@
|
||||
+# Per-platform rpm configuration file.
|
||||
+
|
||||
+#==============================================================================
|
||||
+# ---- per-platform macros.
|
||||
+#
|
||||
+%_arch x86_64
|
||||
+%_os linux
|
||||
+%_gnu -gnu
|
||||
+%_target_platform %{_arch}-%{_target_vendor}-%{_target_os}%{?_gnu}
|
||||
+%optflags %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-Os -g -mx32 -march=atom -mtune=core-avx-i}
|
||||
+
|
||||
+#==============================================================================
|
||||
+# ---- configure macros.
|
||||
+#
|
||||
+%_lib lib32
|
||||
+
|
||||
+#---------------------------------------------------------------------
|
||||
+# Multilibs
|
||||
+%_multilibno 1
|
||||
+%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
|
11
rpm-5.4.9-disable-l10ndir.patch
Normal file
11
rpm-5.4.9-disable-l10ndir.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- rpm-5.4.9/macros/macros.in.l10ndir~ 2012-05-18 11:46:41.037713866 +0200
|
||||
+++ rpm-5.4.9/macros/macros.in 2012-05-18 11:46:59.425827976 +0200
|
||||
@@ -286,7 +286,7 @@ package or when debugging this package.\
|
||||
%__gitdir %{__varlibwdj}/git
|
||||
%__svndir %{__varlibwdj}/svn
|
||||
%__sqldir %{__varlibwdj}/sql
|
||||
-%__l10ndir %{__varlibwdj}/l10n
|
||||
+#__l10ndir %{__varlibwdj}/l10n
|
||||
|
||||
# Elements necessary to construct a mongodb:// URI configurably
|
||||
#
|
11
rpm-5.4.9-disable-support-for-i18nstring-type.patch
Normal file
11
rpm-5.4.9-disable-support-for-i18nstring-type.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- rpm-5.4.9/system.h.no18n~ 2012-05-18 08:09:33.444289007 +0200
|
||||
+++ rpm-5.4.9/system.h 2012-05-18 08:09:35.991304560 +0200
|
||||
@@ -741,7 +741,7 @@ static inline const char *rcsid(const ch
|
||||
/**
|
||||
* Eliminate RPM_I18NSTRING_TYPE.
|
||||
*/
|
||||
-#define SUPPORT_I18NSTRING_TYPE 1
|
||||
+#define SUPPORT_I18NSTRING_TYPE 0
|
||||
|
||||
/**
|
||||
* Eliminate signature/digest disablers.
|
|
@ -1,11 +1,11 @@
|
|||
--- rpm-5.4.9.orig/macros/mandriva.in 2012-05-08 07:06:12.000000000 +0400
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-06-15 21:08:21.855422073 +0400
|
||||
@@ -268,7 +268,7 @@
|
||||
--- rpm-5.4.9/macros/mandriva.in.orig 2012-08-07 01:44:06.000000000 +0400
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-08-07 01:53:20.572969492 +0400
|
||||
@@ -266,7 +266,7 @@
|
||||
#%__check_multiarch_files @USRLIBRPM@/check-multiarch-files %{buildroot}
|
||||
|
||||
# Use internal dependency generator rather than external helpers?
|
||||
-%_use_internal_dependency_generator 1
|
||||
+%_use_internal_dependency_generator 0
|
||||
# TODO: merge relevant changes into rpm version rather than using our own
|
||||
%__perl_provides @USRLIBRPM@/@RPMCANONVENDOR@/perl.prov
|
||||
%__perl_requires @USRLIBRPM@/@RPMCANONVENDOR@/perl.req
|
||||
|
||||
%__find_provides @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-provides
|
||||
%__find_requires @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
|
||||
|
|
18
rpm-5.4.9-ditch-install-info-macros.patch
Normal file
18
rpm-5.4.9-ditch-install-info-macros.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- rpm-5.4.9/macros/mandriva.in.install_info~ 2012-05-30 21:11:09.893734550 +0200
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-05-30 21:11:12.643700170 +0200
|
||||
@@ -141,15 +141,6 @@ end\
|
||||
%_extension .xz
|
||||
|
||||
|
||||
-%__install_info /sbin/install-info
|
||||
-
|
||||
-%_install_info() if [[ -f %{_infodir}/%{1}%{_extension} ]]; then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir; fi \
|
||||
-%{nil}
|
||||
-# (nb: keep the "alone on its line ';'")
|
||||
-%_remove_install_info() if [ "$1" = "0" ]; then if [[ -f %{_infodir}/%{1}%{_extension} ]]; then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi; fi \
|
||||
-%{nil}
|
||||
-
|
||||
-
|
||||
# Macro: %{mklibname <name> [<major> [<minor>]] [-s] [-d]}
|
||||
# - %{mklibname test} => lib64test, on a lib64 platform
|
||||
# - %{mklibname test 1 -d} => libtest1-devel
|
14
rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch
Normal file
14
rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- rpm-5.4.9/rpmdb/tagname.c.i18n_str~ 2012-05-18 07:27:53.216728091 +0200
|
||||
+++ rpm-5.4.9/rpmdb/tagname.c 2012-05-18 08:08:19.766839174 +0200
|
||||
@@ -493,7 +493,11 @@ void tagTypeValidate(HE_t he)
|
||||
{
|
||||
/* XXX Re-map RPM_I18NSTRING_TYPE -> RPM_STRING_TYPE */
|
||||
if (he->t == RPM_I18NSTRING_TYPE)
|
||||
+#if !defined(SUPPORT_I18NSTRING_TYPE)
|
||||
he->t = RPM_STRING_TYPE;
|
||||
+#else
|
||||
+ return;
|
||||
+#endif
|
||||
|
||||
/* XXX Arbitrary tags are always strings. */
|
||||
if ((he->tag & 0x40000000)
|
|
@ -0,0 +1,19 @@
|
|||
--- rpm-5.4.9/rpmio/rpmgit.c.nogit~ 2012-05-18 04:24:18.632112853 +0200
|
||||
+++ rpm-5.4.9/rpmio/rpmgit.c 2012-05-18 04:24:20.724125051 +0200
|
||||
@@ -142,8 +142,6 @@ static const char * fmtREFflags(uint32_t
|
||||
}
|
||||
#define _REFFLAGS(_refflags) fmtREFflags(_refflags)
|
||||
|
||||
-#endif /* defined(WITH_LIBGT2) */
|
||||
-
|
||||
/*==============================================================*/
|
||||
|
||||
static int Xchkgit(/*@unused@*/ rpmgit git, const char * msg,
|
||||
@@ -164,7 +162,6 @@ static int Xchkgit(/*@unused@*/ rpmgit g
|
||||
#define chkgit(_git, _msg, _error) \
|
||||
Xchkgit(_git, _msg, _error, _rpmgit_debug, __FUNCTION__, __FILE__, __LINE__)
|
||||
|
||||
-#if defined(WITH_LIBGIT2)
|
||||
void rpmgitPrintOid(const char * msg, const void * _oidp, void * _fp)
|
||||
{
|
||||
FILE * fp = (_fp ? _fp : stderr);
|
11
rpm-5.4.9-drop-dead-cputoolize-macro.patch
Normal file
11
rpm-5.4.9-drop-dead-cputoolize-macro.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- rpm-5.4.9/macros/mandriva.in.cputoolize~ 2012-05-30 19:54:36.169164010 +0200
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-05-30 19:54:37.439148132 +0200
|
||||
@@ -355,8 +355,6 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} -
|
||||
%__fix_libtool_from_moving_options_after_libs @USRLIBRPM@/@RPMCANONVENDOR@/fix-libtool-from-moving-options-after-libs
|
||||
%__fix_dlsearch_path_in_libtool_for_multilib @USRLIBRPM@/@RPMCANONVENDOR@/fix-dlsearch-path-in-libtool-for-multilib
|
||||
|
||||
-%__cputoolize cputoolize
|
||||
-
|
||||
%__libtoolize_configure %{?__libtoolize:(cd $CONFIGURE_TOP; [ ! -f configure.in -a ! -f configure.ac ] || %{__libtoolize} --copy --force)}
|
||||
|
||||
%ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: -Wl,--build-id}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}%{?!_disable_hash_style_gnu: -Wl,--hash-style=gnu}%{?_hardened_flags: %_hardened_flags}
|
17
rpm-5.4.9-find-lang_newgnomehelp.patch
Normal file
17
rpm-5.4.9-find-lang_newgnomehelp.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- rpm-5.4.9/scripts/find-lang.sh 2012-05-08 00:20:18.000000000 +0000
|
||||
+++ rpm-5.4.9.new/scripts/find-lang.sh 2012-05-19 17:55:47.293748869 +0000
|
||||
@@ -124,6 +124,14 @@
|
||||
|
||||
find "$TOP_DIR" -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
+'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/:
|
||||
+'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
|
||||
+s:^\([^%].*\)::
|
||||
+s:%lang(C) ::
|
||||
+/^$/d' >> $MO_NAME
|
||||
+
|
||||
+find $TOP_DIR -type d|sed '
|
||||
+s:'"$TOP_DIR"'::
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1:
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
|
||||
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2:
|
56
rpm-5.4.9-fix-neon-saving-error-pages-as-target-file.patch
Normal file
56
rpm-5.4.9-fix-neon-saving-error-pages-as-target-file.patch
Normal file
|
@ -0,0 +1,56 @@
|
|||
--- rpm-5.4.9/rpmio/rpmdav.c.dl_error~ 2012-07-04 15:18:49.453759994 +0200
|
||||
+++ rpm-5.4.9/rpmio/rpmdav.c 2012-07-04 16:48:20.968647259 +0200
|
||||
@@ -1722,6 +1722,7 @@ int davReq(FD_t ctrl, const char * httpC
|
||||
{
|
||||
urlinfo u;
|
||||
int rc = 0;
|
||||
+ const ne_status *status;
|
||||
|
||||
assert(ctrl != NULL);
|
||||
u = (urlinfo) ctrl->u;
|
||||
@@ -1789,10 +1790,24 @@ assert(ctrl->req != NULL);
|
||||
}
|
||||
|
||||
/* XXX somwhere else instead? */
|
||||
-if (_dav_debug) {
|
||||
- const ne_status *status = ne_get_status((ne_request *)ctrl->req);
|
||||
-fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
|
||||
-}
|
||||
+ status = ne_get_status((ne_request *)ctrl->req);
|
||||
+ if (_dav_debug)
|
||||
+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
|
||||
+
|
||||
+ switch (status->code) {
|
||||
+ case 200:
|
||||
+ case 201: /* 201 Created. */
|
||||
+ break;
|
||||
+ case 204: /* HACK: if overwriting, 204 No Content. */
|
||||
+ case 403: /* 403 Forbidden. */
|
||||
+ rc = FTPERR_UNKNOWN;
|
||||
+ break;
|
||||
+ default:
|
||||
+ rc = FTPERR_FILE_NOT_FOUND;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (rc || _dav_debug)
|
||||
+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
|
||||
|
||||
if (rc)
|
||||
goto errxit;
|
||||
--- rpm-5.4.9/rpmio/rpmio.c.dl_error~ 2012-07-04 15:36:39.367059644 +0200
|
||||
+++ rpm-5.4.9/rpmio/rpmio.c 2012-07-04 16:48:39.241838162 +0200
|
||||
@@ -2305,9 +2305,12 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o
|
||||
u->openError = httpReq(fd, cmd, path);
|
||||
#endif
|
||||
if (u->openError < 0) {
|
||||
+ /* XXX rpmdav doesn't behave consistently with the rest...*/
|
||||
+#ifndef WITH_NEON
|
||||
/* XXX make sure that we can exit through ufdClose */
|
||||
- fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
|
||||
- fd = fdLink(fd, "error data (ufdOpen HTTP)");
|
||||
+ fd = u->ctrl = fdLink(fd, "error ctrl (ufdOpen HTTP)");
|
||||
+ fd = u->data fdLink(fd, "error data (ufdOpen HTTP)");
|
||||
+#endif
|
||||
} else {
|
||||
fd->bytesRemain = ((!strcmp(cmd, "GET"))
|
||||
? fd->contentLength : -1);
|
11
rpm-5.4.9-fix-typo-in-rpmtag-header.patch
Normal file
11
rpm-5.4.9-fix-typo-in-rpmtag-header.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- rpm-5.4.9/rpmdb/rpmtag.h.typo~ 2012-05-03 20:39:52.000000000 +0200
|
||||
+++ rpm-5.4.9/rpmdb/rpmtag.h 2012-05-18 05:30:09.780867642 +0200
|
||||
@@ -948,7 +948,7 @@ Header headerCopyLoad(const void * uh)
|
||||
int headerIsEntry(/*@null@*/ Header h, rpmTag tag)
|
||||
/*@*/;
|
||||
|
||||
-#if defined(SUPPORT_I18BSTRING_TYPE)
|
||||
+#if defined(SUPPORT_I18NSTRING_TYPE)
|
||||
/** \ingroup header
|
||||
* Add locale specific tag to header.
|
||||
* A NULL lang is interpreted as the C locale. Here are the rules:
|
510
rpm-5.4.9-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch
Normal file
510
rpm-5.4.9-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch
Normal file
|
@ -0,0 +1,510 @@
|
|||
--- rpm-5.4.9/macros/mandriva.in.perl_deps~ 2012-06-28 04:32:28.138659046 +0200
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-06-28 04:33:00.710251845 +0200
|
||||
@@ -272,9 +272,6 @@ Group: %{group}\
|
||||
|
||||
# Use internal dependency generator rather than external helpers?
|
||||
%_use_internal_dependency_generator 1
|
||||
-# TODO: merge relevant changes into rpm version rather than using our own
|
||||
-%__perl_provides @USRLIBRPM@/@RPMCANONVENDOR@/perl.prov
|
||||
-%__perl_requires @USRLIBRPM@/@RPMCANONVENDOR@/perl.req
|
||||
|
||||
%__find_provides @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-provides
|
||||
%__find_requires @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
|
||||
--- rpm-5.4.9/scripts/perl.prov.perl_deps~ 2012-06-28 04:32:36.406555684 +0200
|
||||
+++ rpm-5.4.9/scripts/perl.prov 2012-06-28 04:32:46.907424405 +0200
|
||||
@@ -45,8 +45,11 @@
|
||||
|
||||
# by Ken Estes Mail.com kestes@staff.mail.com
|
||||
|
||||
+use File::Basename ();
|
||||
+
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
+ next if !/\.pm$/;
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
@@ -55,12 +58,22 @@ if ("@ARGV") {
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
+ chomp $_;
|
||||
+ next if !/\.pm$/;
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $module (sort keys %require) {
|
||||
+ if ($module =~ m/^abi$/) {
|
||||
+ print "perl($module) = $require{$module}\n";
|
||||
+ next;
|
||||
+ }
|
||||
+ # XXX: skip any modules not starting with upper case letters
|
||||
+ if ($module =~ m/^[^A-Z]/) {
|
||||
+ next;
|
||||
+ }
|
||||
if (length($require{$module}) == 0) {
|
||||
print "perl($module)\n";
|
||||
} else {
|
||||
@@ -69,7 +82,9 @@ foreach $module (sort keys %require) {
|
||||
# operators. Also I will need to change the processing of the
|
||||
# $RPM_* variable when I upgrade.
|
||||
|
||||
- print "perl($module) = $require{$module}\n";
|
||||
+ my $v = qx{ rpm --eval '%perl_convert_version $require{$module}' };
|
||||
+ chomp($v);
|
||||
+ print "perl($module) = $v\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,21 +95,31 @@ exit 0;
|
||||
sub process_file {
|
||||
|
||||
my ($file) = @_;
|
||||
- chomp $file;
|
||||
|
||||
- open(FILE, "<$file") || return;
|
||||
+ if ($file =~ m/$Config{archname}\/Config.pm$/) {
|
||||
+ my $vercmd = "perl -I". File::Basename::dirname($file) . " -MConfig -e 'print \"\$Config{version}\"'";
|
||||
+ my $v = `$vercmd`;
|
||||
+ if ($v) {
|
||||
+ $require{"abi"} = $v;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!open(FILE, $file)) {
|
||||
+ warn("$0: Warning: Could not open file '$file' for reading: $!\n");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
my ($package, $version, $incomment, $inover) = ();
|
||||
|
||||
while (<FILE>) {
|
||||
-
|
||||
+
|
||||
# skip the documentation
|
||||
|
||||
# we should not need to have item in this if statement (it
|
||||
# properly belongs in the over/back section) but people do not
|
||||
# read the perldoc.
|
||||
|
||||
- if (m/^=(head[1-4]|pod|item)/) {
|
||||
+ if (m/^=(head[1-4]|pod|for|item)/) {
|
||||
$incomment = 1;
|
||||
}
|
||||
|
||||
@@ -102,7 +127,7 @@ sub process_file {
|
||||
$incomment = 0;
|
||||
$inover = 0;
|
||||
}
|
||||
-
|
||||
+
|
||||
if (m/^=(over)/) {
|
||||
$inover = 1;
|
||||
}
|
||||
@@ -111,10 +136,10 @@ sub process_file {
|
||||
$inover = 0;
|
||||
}
|
||||
|
||||
- if ($incomment || $inover) {
|
||||
+ if ($incomment || $inover || m/^\s*#/) {
|
||||
next;
|
||||
}
|
||||
-
|
||||
+
|
||||
# skip the data section
|
||||
if (m/^__(DATA|END)__$/) {
|
||||
last;
|
||||
@@ -125,17 +150,20 @@ sub process_file {
|
||||
# false positives as if they were provided packages (really ugly).
|
||||
|
||||
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
|
||||
- $package=$1;
|
||||
- undef $version;
|
||||
- if ($package eq 'main') {
|
||||
- undef $package;
|
||||
- } else {
|
||||
- # If $package already exists in the $require hash, it means
|
||||
- # the package definition is broken up over multiple blocks.
|
||||
- # In that case, don't stomp a previous $VERSION we might have
|
||||
- # found. (See BZ#214496.)
|
||||
- $require{$package}=undef unless (exists $require{$package});
|
||||
- }
|
||||
+ # some internal packages, like DB, might be temporarily redefined inside a module.
|
||||
+ if (!($package && $1 eq 'DB')) {
|
||||
+ $package=$1;
|
||||
+ undef $version;
|
||||
+ if ($package eq 'main') {
|
||||
+ undef $package;
|
||||
+ } else {
|
||||
+ # If $package already exists in the $require hash, it means
|
||||
+ # the package definition is broken up over multiple blocks.
|
||||
+ # In that case, don't stomp a previous $VERSION we might have
|
||||
+ # found. (See BZ#214496.)
|
||||
+ $require{$package}=undef unless (exists $require{$package});
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
# after we found the package name take the first assignment to
|
||||
@@ -144,49 +172,39 @@ sub process_file {
|
||||
|
||||
# here are examples of VERSION lines from the perl distribution
|
||||
|
||||
- #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/);
|
||||
- #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.12 $, 10;
|
||||
- #CGI/Apache.pm:$VERSION = (qw$Revision: 1.12 $)[1];
|
||||
+ #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 273856 $ =~ /(\d+)\.(\d+)/);
|
||||
+ #ExtUtils/Install.pm:$VERSION = substr q$Revision: 273856 $, 10;
|
||||
+ #CGI/Apache.pm:$VERSION = (qw$Revision: 273856 $)[1];
|
||||
#DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
|
||||
- #General.pm:$Config::General::VERSION = 2.33;
|
||||
- #
|
||||
- # or with the new "our" pragma you could (read will) see:
|
||||
- #
|
||||
- # our $VERSION = '1.00'
|
||||
- if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) {
|
||||
+ #$Locale::Maketext::Simple::VERSION = '0.21';
|
||||
+
|
||||
+ if (
|
||||
+ $package &&
|
||||
+ (m/^(.*;)?\s*((my|our)\s+)?\$(${package}::)?VERSION\s*=\s+/)
|
||||
+ ) {
|
||||
|
||||
# first see if the version string contains the string
|
||||
- # '$Revision' this often causes bizzare strings and is the most
|
||||
+ # '$Revision' this often causes bizarre strings and is the most
|
||||
# common method of non static numbering.
|
||||
|
||||
- if (m/(\$Revision: (\d+[.0-9]+))/) {
|
||||
- $version= $2;
|
||||
+ if (m/\$Revision: (\d+[.0-9]+)/) {
|
||||
+ $version = $1;
|
||||
} elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) {
|
||||
-
|
||||
- # look for a static number hard coded in the script
|
||||
-
|
||||
- $version= $1;
|
||||
+
|
||||
+ # look for a static number hard coded in the script
|
||||
+
|
||||
+ $version= $1;
|
||||
}
|
||||
- $require{$package}=$version;
|
||||
+ $require{$package} = $version;
|
||||
}
|
||||
-
|
||||
- # Allow someone to have a variable that defines virtual packages
|
||||
- # The variable is called $RPM_Provides. It must be scoped with
|
||||
- # "our", but not "local" or "my" (just would not make sense).
|
||||
- #
|
||||
- # For instance:
|
||||
- #
|
||||
- # $RPM_Provides = "blah bleah"
|
||||
- #
|
||||
- # Will generate provides for "blah" and "bleah".
|
||||
- #
|
||||
+
|
||||
# Each keyword can appear multiple times. Don't
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
-
|
||||
- if ( m/^\s*(our\s+)?\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
|
||||
- foreach $_ (split(/\s+/, $2)) {
|
||||
- print "$_\n";
|
||||
+
|
||||
+ if (m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
|
||||
+ foreach $_ (split(/\s+/, $1)) {
|
||||
+ print "$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,5 +213,5 @@ sub process_file {
|
||||
close(FILE) ||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
- return ;
|
||||
+ return;
|
||||
}
|
||||
--- rpm-5.4.9/scripts/perl.req.perl_deps~ 2012-06-28 04:32:39.137521541 +0200
|
||||
+++ rpm-5.4.9/scripts/perl.req 2012-06-28 04:32:49.179396000 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
-# RPM (and its source code) is covered under two separate licenses.
|
||||
+# RPM (and its source code) is covered under two separate licenses.
|
||||
|
||||
# The entire code base may be distributed under the terms of the GNU
|
||||
# General Public License (GPL), which appears immediately below.
|
||||
@@ -18,7 +18,7 @@
|
||||
# Erik Troan <ewt@redhat.com>.
|
||||
|
||||
# a simple makedepend like script for perl.
|
||||
-
|
||||
+
|
||||
# To save development time I do not parse the perl grammmar but
|
||||
# instead just lex it looking for what I want. I take special care to
|
||||
# ignore comments and pod's.
|
||||
@@ -39,22 +39,36 @@
|
||||
|
||||
# by Ken Estes Mail.com kestes@staff.mail.com
|
||||
|
||||
+use Config;
|
||||
+
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
-
|
||||
+
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
-
|
||||
+
|
||||
foreach (<>) {
|
||||
+ chomp $_;
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $module (sort keys %require) {
|
||||
+ if ($module =~ m/^abi$/) {
|
||||
+ print "perl($module) = $require{$module}\n";
|
||||
+ next;
|
||||
+ } elsif ($module =~ m/^api$/) {
|
||||
+ print "perl(abi) >= $require{$module}\n";
|
||||
+ next;
|
||||
+ }
|
||||
+ # XXX: skip any modules not starting with upper case letters
|
||||
+ if ($module =~ m/^[^A-Z]/) {
|
||||
+ next;
|
||||
+ }
|
||||
if (length($require{$module}) == 0) {
|
||||
print "perl($module)\n";
|
||||
} else {
|
||||
@@ -63,7 +77,9 @@ foreach $module (sort keys %require) {
|
||||
# operators. Also I will need to change the processing of the
|
||||
# $RPM_* variable when I upgrade.
|
||||
|
||||
- print "perl($module) >= $require{$module}\n";
|
||||
+ my $v = qx{ rpm --eval '%perl_convert_version $require{$module}' }; #' workaround vim highlighting issue.. ;)
|
||||
+ chomp($v);
|
||||
+ print "perl($module) >= $v\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,16 +88,24 @@ exit 0;
|
||||
|
||||
|
||||
sub process_file {
|
||||
-
|
||||
+
|
||||
my ($file) = @_;
|
||||
- chomp $file;
|
||||
-
|
||||
- open(FILE, "<$file") || return;
|
||||
-
|
||||
- while (<FILE>) {
|
||||
|
||||
+ # XXX: dependendency on perl(abi) = <version> for perl extensions
|
||||
+ if ($file =~ m/$Config{archname}/) {
|
||||
+ $require{"abi"} = $Config{version};
|
||||
+ } elsif ($file =~ m/($Config{installsitelib}|$Config{installvendorlib}|$Config{installprivlib})/ and $file =~ m/$Config{version}/) {
|
||||
+ $require{"api"} = $Config{version};
|
||||
+ }
|
||||
+
|
||||
+ if (!open(FILE, $file)) {
|
||||
+ warn("$0: Warning: Could not open file '$file' for reading: $!\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ while (<FILE>) {
|
||||
# skip the documentation
|
||||
- if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) {
|
||||
+ if ( /^ = (?: head\d | pod | for | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) {
|
||||
$_ = <FILE> until /^=cut/ or eof;
|
||||
next;
|
||||
}
|
||||
@@ -100,12 +124,12 @@ sub process_file {
|
||||
# skip q{} quoted sections - just hope we don't have curly brackets
|
||||
# within the quote, nor an escaped hash mark that isn't a comment
|
||||
# marker, such as occurs right here. Draw the line somewhere.
|
||||
- if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
|
||||
+ if ( m/^.*\Wq[qxwr]?\s*([{([#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
|
||||
$tag = $1;
|
||||
$tag =~ tr/{([/})]/;
|
||||
$_ = <FILE> until m/\Q$tag\E/ or eof;
|
||||
}
|
||||
-
|
||||
+
|
||||
# skip the data section
|
||||
if (m/^__(DATA|END)__$/) {
|
||||
last;
|
||||
@@ -115,28 +139,28 @@ sub process_file {
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
#
|
||||
- # Again allow for "our".
|
||||
+ # Again allow for "our".
|
||||
if ( m/^\s*(our\s+)?\$RPM_Requires\s*=\s*["'](.*)['"]/i) {
|
||||
foreach $_ (split(/\s+/, $2)) {
|
||||
- print "$_\n";
|
||||
+ print "$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
# handle "use base qw/ foo::bar baz::blah /;" and variations
|
||||
if (
|
||||
m/^ \s* use \s+ base
|
||||
- (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* \1
|
||||
+ (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* \1
|
||||
|
|
||||
- \s* ( ["'] ) ( [\w:]+? ) \3
|
||||
+ \s* ( ["'] ) ( [\w:]+? ) \3
|
||||
|
|
||||
# qw[], qw(), qw<>, qw{} are handled here; lax, but who gives
|
||||
- \s+ q[wq]? \s* [\[({<] \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* [\])}>]
|
||||
+ \s+ q[wq]? \s* [\[({<] \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* [\])}>]
|
||||
)
|
||||
\s* ;
|
||||
/x
|
||||
)
|
||||
{
|
||||
- my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 );
|
||||
+ my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 );
|
||||
for my $mod ( grep !exists $require{$_}, @deps ) {
|
||||
$require{$mod} = '';
|
||||
$line{$mod} = $_;
|
||||
@@ -153,17 +177,18 @@ sub process_file {
|
||||
# eval { require Carp } if defined $^S; # If error/warning during compilation,
|
||||
|
||||
|
||||
- (m/^(\s*) # we hope the inclusion starts the line
|
||||
- (require|use)\s+(?!\{) # do not want 'do {' loops
|
||||
- # quotes around name are always legal
|
||||
- [\'\"]?([^\;\ \'\"\t]*)[\'\"]?[\t\;\ ]
|
||||
- # the syntax for 'use' allows version requirements
|
||||
- \s*([.0-9]*)
|
||||
- /x)
|
||||
+ (m/^(\s*) # we hope the inclusion starts the line
|
||||
+ (require|use)\s+(?!\{) # do not want 'do {' loops
|
||||
+ # quotes around name are always legal
|
||||
+ ['"]?([^; '"\t#]+)['"]?[\t; ]
|
||||
+ # the syntax for 'use' allows version requirements
|
||||
+ \s*([.0-9]*)
|
||||
+ /x)
|
||||
) {
|
||||
my ($whitespace, $statement, $module, $version) = ($1, $2, $3,$4);
|
||||
+ my $usebase;
|
||||
|
||||
- # we only consider require statements that are flush against
|
||||
+ # we only consider require statements that are flushed against
|
||||
# the left edge. any other require statements give too many
|
||||
# false positives, as they are usually inside of an if statement
|
||||
# as a fallback module or a rarely used option
|
||||
@@ -173,7 +198,7 @@ sub process_file {
|
||||
# if there is some interpolation of variables just skip this
|
||||
# dependency, we do not want
|
||||
# do "$ENV{LOGDIR}/$rcfile";
|
||||
-
|
||||
+
|
||||
($module =~ m/\$/) && next;
|
||||
|
||||
# skip if the phrase was "use of" -- shows up in gimp-perl, et al.
|
||||
@@ -198,6 +223,18 @@ sub process_file {
|
||||
next;
|
||||
}
|
||||
|
||||
+ # as seen in some perl scripts
|
||||
+ # use base qw(App::CLI Class::Accessor::Chained::Fast App::CLI::Command);
|
||||
+ if ($module eq 'base') {
|
||||
+ $require{$module} = $version;
|
||||
+ $line{$module} = $current_line;
|
||||
+ ($module = $_) =~ s/use\s*base\s*//;
|
||||
+ $module =~ s/qw\((.*)\)\s*;/$1/;
|
||||
+ $module =~ s/qw(.)(.*)\1\s*;/$2/;
|
||||
+ $module =~ s/\s*;$//;
|
||||
+ $module =~ s/#.*//;
|
||||
+ $usebase = 1;
|
||||
+ }
|
||||
# sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc.
|
||||
# we can strip qw.*$, as well as (.*$:
|
||||
$module =~ s/qw.*$//;
|
||||
@@ -205,7 +242,7 @@ sub process_file {
|
||||
|
||||
$module =~ s/\.pm$//;
|
||||
|
||||
- # some perl programmers write 'require URI/URL;' when
|
||||
+ # some perl programmers write 'require URI/URL;' when
|
||||
# they mean 'require URI::URL;'
|
||||
|
||||
$module =~ s/\//::/;
|
||||
@@ -215,45 +252,41 @@ sub process_file {
|
||||
|
||||
$module =~ s/\(\s*\)$//;
|
||||
|
||||
- if ( $module =~ m/^v?([0-9._]+)$/ ) {
|
||||
# if module is a number then both require and use interpret that
|
||||
- # to mean that a particular version of perl is specified
|
||||
-
|
||||
- my $ver=$1;
|
||||
- if ($ver =~ /5.00/) {
|
||||
- print "perl >= 0:$ver\n";
|
||||
- next;
|
||||
- }
|
||||
- else {
|
||||
- print "perl >= 1:$ver\n";
|
||||
- next;
|
||||
- }
|
||||
-
|
||||
- };
|
||||
+ # to mean that a particular version of perl is specified. Don't
|
||||
+ # add a dependency, though, since the rpm will already require
|
||||
+ # perl-base at the build version (via find-requires)
|
||||
+ next if $module =~ /^v?\d/;
|
||||
|
||||
# ph files do not use the package name inside the file.
|
||||
# perlmodlib documentation says:
|
||||
-
|
||||
# the .ph files made by h2ph will probably end up as
|
||||
# extension modules made by h2xs.
|
||||
-
|
||||
- # so do not expend much effort on these.
|
||||
-
|
||||
+ # so do not spend much effort on these.
|
||||
|
||||
# there is no easy way to find out if a file named systeminfo.ph
|
||||
# will be included with the name sys/systeminfo.ph so only use the
|
||||
# basename of *.ph files
|
||||
|
||||
- ($module =~ m/\.ph$/) && next;
|
||||
+ ($module =~ m/\.ph$/) && next;
|
||||
|
||||
- $require{$module}=$version;
|
||||
- $line{$module}=$_;
|
||||
+ # if the module was loaded trough base, we need to split the list
|
||||
+ if ($usebase) {
|
||||
+ my $current_line = $_;
|
||||
+ foreach (split(/\s+/, $module)) {
|
||||
+ next unless $_;
|
||||
+ $require{$_} = $version;
|
||||
+ $line{$_} = $current_line;
|
||||
+ }
|
||||
+ } else {
|
||||
+ $require{$module}=$version;
|
||||
+ $line{$module}=$current_line;
|
||||
+ }
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
close(FILE) ||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
-
|
||||
- return ;
|
||||
+
|
||||
+ return ;
|
||||
}
|
245
rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch
Normal file
245
rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch
Normal file
|
@ -0,0 +1,245 @@
|
|||
--- rpm-5.4.9/macros/mandriva.in.php_deps~ 2012-06-28 04:25:18.070035644 +0200
|
||||
+++ rpm-5.4.9/macros/mandriva.in 2012-06-28 04:25:21.883987963 +0200
|
||||
@@ -275,8 +275,6 @@ Group: %{group}\
|
||||
# TODO: merge relevant changes into rpm version rather than using our own
|
||||
%__perl_provides @USRLIBRPM@/@RPMCANONVENDOR@/perl.prov
|
||||
%__perl_requires @USRLIBRPM@/@RPMCANONVENDOR@/perl.req
|
||||
-%__php_provides @USRLIBRPM@/@RPMCANONVENDOR@/php.prov
|
||||
-%__php_requires @USRLIBRPM@/@RPMCANONVENDOR@/php.req
|
||||
|
||||
%__find_provides @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-provides
|
||||
%__find_requires @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
|
||||
--- rpm-5.4.9/scripts/php.prov.php_deps~ 2012-06-28 04:22:17.980287076 +0200
|
||||
+++ rpm-5.4.9/scripts/php.prov 2012-06-28 04:22:33.725090237 +0200
|
||||
@@ -1,17 +1,44 @@
|
||||
#!/usr/bin/perl
|
||||
#####################################################################
|
||||
# #
|
||||
-# Small script to generate provides for php-pear/php-pecl #
|
||||
+# Check system dependences between php-pear modules #
|
||||
# #
|
||||
-# Adam Go³êbiowski <adamg@pld-linux.org> #
|
||||
-# #
|
||||
-# Somehow based on previous work by: #
|
||||
-# Pawe³ Go³aszewski <blues@pld-linux.org> #
|
||||
+# Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
|
||||
# Micha³ Moskal <malekith@pld-linux.org> #
|
||||
+# ------------------------------------------------------------------#
|
||||
+# TODO: #
|
||||
#####################################################################
|
||||
|
||||
-# Contest: shrink this one to oneliner
|
||||
-# Bonus : and fit in 80 columns ;)
|
||||
+$pear = "/usr/share/pear";
|
||||
+@files = ();
|
||||
+
|
||||
+
|
||||
+if ("@ARGV") {
|
||||
+ foreach (@ARGV) {
|
||||
+ process_file($_);
|
||||
+ }
|
||||
+} else {
|
||||
+
|
||||
+ # notice we are passed a list of filenames NOT as common in unix the
|
||||
+ # contents of the file.
|
||||
+
|
||||
+ foreach (<>) {
|
||||
+ chomp $_;
|
||||
+ process_file($_);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+f: for $f (sort keys %req) {
|
||||
+ print "pear($f)\n";
|
||||
+}
|
||||
+
|
||||
+exit(0);
|
||||
+
|
||||
+sub process_file() {
|
||||
+ my ($f) = @_;
|
||||
+ return unless ($f =~ /$pear.*\.php$/);
|
||||
|
||||
-/package.xml/ and open(F, $_) foreach (@ARGV ? @ARGV : <> );
|
||||
-/^\s+\<name\>([a-zA-Z0-9\_]+)\<\/name\>$/ and print "php-pear-$1" while (<F>);
|
||||
+ $f =~ s/.*$pear\///;
|
||||
+ push @files, $f;
|
||||
+ $req{$f} = 1;
|
||||
+}
|
||||
--- rpm-5.4.9/scripts/php.req.php_deps~ 2012-06-28 04:22:21.478243346 +0200
|
||||
+++ rpm-5.4.9/scripts/php.req 2012-06-28 04:22:33.986086975 +0200
|
||||
@@ -1,78 +1,108 @@
|
||||
-#!/usr/bin/perl -W
|
||||
+#!/usr/bin/perl
|
||||
#####################################################################
|
||||
# #
|
||||
-# Check system dependencies between php-pear/php-pecl modules #
|
||||
+# Check system dependences between php-pear modules #
|
||||
# #
|
||||
-# Adam Go³êbiowski <adamg@pld-linux.org> #
|
||||
-# #
|
||||
-# based on previous work by: #
|
||||
# Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
|
||||
-# Micha³ Moskal <malekith@pld-linux.org> #
|
||||
-# #
|
||||
-# ----------------------------------------------------------------- #
|
||||
-# ChangeLog: #
|
||||
-# 20031201: complete rewrite to use PEAR's package.xml, now handles #
|
||||
-# all dependencies, including PHP modules (like php-gmp), #
|
||||
-# and PECL extensions (adamg) #
|
||||
+# Micha³ Moskal <malekith@pld-linux.org> #
|
||||
+# ------------------------------------------------------------------#
|
||||
+# TODO: #
|
||||
+# - extension_loaded - dependencies. #
|
||||
+# - some clean-up... #
|
||||
#####################################################################
|
||||
|
||||
-@req_arr = ();
|
||||
-$fname = '/dev/null';
|
||||
-foreach ( @ARGV ? $ARGV : <> )
|
||||
-{
|
||||
- $fname = $_ if (/package.xml/)
|
||||
+$pear = "/usr/share/pear";
|
||||
+
|
||||
+@files = ();
|
||||
+%req = ();
|
||||
+
|
||||
+if ("@ARGV") {
|
||||
+ foreach (@ARGV) {
|
||||
+ process_file($_);
|
||||
+ }
|
||||
+} else {
|
||||
+
|
||||
+ # notice we are passed a list of filenames NOT as common in unix the
|
||||
+ # contents of the file.
|
||||
+
|
||||
+ foreach (<>) {
|
||||
+ chomp $_;
|
||||
+ process_file($_);
|
||||
+ }
|
||||
}
|
||||
|
||||
-open F, $fname;
|
||||
+f: for $f (keys %req) {
|
||||
+ for $g (@files) { next f if ($g =~ /\Q$f\E$/); }
|
||||
+ print "pear($f)\n";
|
||||
+}
|
||||
+
|
||||
+exit(0);
|
||||
+
|
||||
+sub process_file() {
|
||||
+ my ($f) = @_;
|
||||
+ push @files, $f;
|
||||
+
|
||||
+ # skip non-php files
|
||||
+ next unless ($f =~ /\.php$/);
|
||||
+
|
||||
+ if (!open(F, $f)) {
|
||||
+ warn("$0: Warning: Could not open file '$f' for reading: $!\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if ($f =~ /$pear/) {
|
||||
+ $file_dir = $f;
|
||||
+ $file_dir =~ s|.*$pear/||;
|
||||
+ $file_dir =~ s|/[^/]*$||;
|
||||
+ } else {
|
||||
+ $file_dir = undef;
|
||||
+ }
|
||||
+
|
||||
+ while (<F>) {
|
||||
+ # skip comments
|
||||
+ next if (/^\s*(#|\/\/|\*|\/\*)/);
|
||||
+ while (/(\W|^)(require|include)(_once)?
|
||||
+ \s* \(? \s* ("([^"]*)"|'([^']*)')
|
||||
+ \s* \)? \s* ;/xg) {
|
||||
+
|
||||
+ if ($5 ne "") {
|
||||
+ $x = $5;
|
||||
+ } elsif ($6 ne "") {
|
||||
+ $x = $6;
|
||||
+ } else {
|
||||
+ next;
|
||||
+ }
|
||||
+ $x =~ s/\/\.?\//\//g while $x =~ /\/\.?\//;
|
||||
+ $x =~ s/(\/|^)[^\/]*[^.]\/\.\.\//\1/g while $x =~ /(\/|^)[^\/]*[^.]\/\.\.\//;
|
||||
+ next if ($x =~ m|^\.\.?/| or $x =~ /\$/);
|
||||
+ next unless ($x =~ /\.php$/);
|
||||
+ $req{$x} = 1;
|
||||
+ }
|
||||
+
|
||||
+ next unless (defined $file_dir);
|
||||
+
|
||||
+ while (/(\W|^)(require|include)(_once)?
|
||||
+ \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s*
|
||||
+ ("([^"]*)"|'([^']*)')
|
||||
+ \s* \)? \s* ;/xg) {
|
||||
+ if ($5 ne "") {
|
||||
+ $x = $5;
|
||||
+ } elsif ($6 ne "") {
|
||||
+ $x = $6;
|
||||
+ } else {
|
||||
+ next;
|
||||
+ }
|
||||
+
|
||||
+ next unless ($x =~ /\.php$/);
|
||||
+
|
||||
+ $x = "$file_dir/$x";
|
||||
+ $x =~ s/\/\.?\//\//g while $x =~ /\/\.?\//;
|
||||
+ $x =~ s/(\/|^)[^\/]*[^.]\/\.\.\//\1/g while $x =~ /(\/|^)[^\/]*[^.]\/\.\.\//;
|
||||
+ $req{$x} = 1;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
-while (<F>) {
|
||||
- if ( /\s+\<dep\s+type\=\"([a-zA-z]*)\"/ ) {
|
||||
- $type = $1;
|
||||
- die ("ERROR: Unsupported type: $type\n") if ( $type !~ /^(pkg|ext|php|prog|os|sapi|zend)$/i);
|
||||
- # Default relation (as suggested by PEAR manual) is has
|
||||
- $rel = "has";
|
||||
- $rel = $1 if ( /rel="([a-zA-Z]*)"/ );
|
||||
- die ("ERROR: Unsupported relation: $rel\n") if ( $rel !~ /^(has|eq|lt|le|gt|ge)$/ );
|
||||
-
|
||||
- # Check if we don't have some unsupported connection betweend relation and type
|
||||
- die ("ERROR: Cannot use lt/le/gt/ge relation with prog/os/sapi type!\n") if ( $rel =~ /^(lt|le|gt|ge)$/ && $type =~ /^(prog|os|sapi)$/ );
|
||||
-
|
||||
- # do we have version?
|
||||
- $version = "";
|
||||
- $version = $1 if ( /version="([a-zA-z0-9\.\+]*)"/ );
|
||||
-
|
||||
- # optional - actually this one is optional ;)
|
||||
- # NOTE:
|
||||
- # even though this attribute marks dependency as optional,
|
||||
- # we will add it to Requires:
|
||||
- $optional = "no";
|
||||
- $optional = $1 if ( /optional="([a-zA-Z]*)"/ );
|
||||
- die ("ERROR: Ambigous value of optional attribute: $optional\n") if ( $optional !~ /(yes|no)/i );
|
||||
-
|
||||
- # now, check if we need to pull out package/extension/whatever name
|
||||
- $name = "";
|
||||
- $name = "php" if ( $type =~ /php/ );
|
||||
- $name = "$1" if ( $type !~ /php/ && /\>([a-zA-Z0-9\_\-]*)\</ );
|
||||
-
|
||||
- $relation = "";
|
||||
- $relation = "<" if ( $rel eq "lt");
|
||||
- $relation = "<=" if ( $rel eq "le");
|
||||
- $relation = "=" if ( $rel eq "eq");
|
||||
- $relation = ">=" if ( $rel eq "ge");
|
||||
- $relation = ">" if ( $rel eq "gt");
|
||||
- $relation = "=" if ( $rel eq "has");
|
||||
- # die if we were unable to substitute relations
|
||||
- die "ERROR: Unexpected relation! ($rel)\n" if ( $relation eq "");
|
||||
-
|
||||
- $req = "";
|
||||
- $relver = "";
|
||||
- $relver = "$relation $version" if ( $version !~ /^$/ );
|
||||
- $req = "$name $relver" if ( $type =~ /(php|prog)/ );
|
||||
- $req = "php-$name $relver" if ( $type =~ /ext/ );
|
||||
- $req = "php-pear-$name" if ( $type =~ /pkg/ );
|
||||
-
|
||||
- push @req_arr, $req
|
||||
+ close(F) ||
|
||||
+ die("$0: Could not close file: '$f' : $!\n");
|
||||
|
||||
- }
|
||||
}
|
||||
-for $r (@req_arr) { print "$r\n"; }
|
97
rpm.spec
97
rpm.spec
|
@ -140,11 +140,6 @@ Patch46: rpm-5.4.4-allow-installation-of-repackaged-rpms.patch
|
|||
Patch47: rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch
|
||||
# status: ready to merge
|
||||
Patch48: rpm-5.4.8-dont-show-suggests-with-requires.patch
|
||||
Patch50: rpm-5.4.4-debugedit-recompute-build-id-only-on-dwarf-change.patch
|
||||
Patch51: rpm-5.4.4-debugedit-fix-incorrect-error-messages-regarding_-b-and_-d.patch
|
||||
Patch52: rpm-5.4.4-debugedit-remove-unused-variable.patch
|
||||
Patch53: rpm-5.4.4-debugedit-bail-out-of-debuginfo-if-stabs-format-encountered.patch
|
||||
Patch54: rpm-5.4.4-debugedit-add-dwarf4-support.patch
|
||||
# backport from HEAD
|
||||
# status: almost ready for merge, the strip reloc flag to debugedit needs to be made
|
||||
# conditional first in order to not break backwards compatibility with older elfutils versions
|
||||
|
@ -321,9 +316,54 @@ Patch144: rpm-5.4.8-URPM-build-fix.patch
|
|||
Patch145: rpm-5.4.8-add-armv7l-specific-macros.patch
|
||||
# status: keep locally, might drop this one later..
|
||||
Patch146: rpm-5.4.9-support-signatures-and-digest-disablers.patch
|
||||
# status: undefined
|
||||
Patch147: rpm-5.4.9-add-x32-macros.patch
|
||||
# status: ready and should definitely be merged
|
||||
Patch148: rpm-5.4.9-dont-try-compile-with-libgit2-funcs-unless-enabled.patch
|
||||
# status: ready and should be merged
|
||||
Patch149: rpm-5.4.9-fix-typo-in-rpmtag-header.patch
|
||||
# status: can be merged, but doesn't really matter as it's to be removed and
|
||||
# we now anyways disable the support in question..
|
||||
Patch150: rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch
|
||||
# status: just keep around and toss away when ripped out upstream...
|
||||
Patch151: rpm-5.4.9-disable-support-for-i18nstring-type.patch
|
||||
# lack insight on actual functionality, which anyways seems broken, so let's
|
||||
# disable it to avoid errors from berkeley db..
|
||||
# status: keep locally
|
||||
Patch152: rpm-5.4.9-disable-l10ndir.patch
|
||||
# applied upstream @rpm5.org
|
||||
# adds detection for new gnome help directory
|
||||
Patch153: rpm-5.4.9-find-lang_newgnomehelp.patch
|
||||
# drop this dead macro
|
||||
# status: ready
|
||||
Patch154: rpm-5.4.9-drop-dead-cputoolize-macro.patch
|
||||
# idem
|
||||
Patch155: rpm-5.4.9-ditch-install-info-macros.patch
|
||||
# the php dependency generator carried with rpm5 is based on a version from PLD
|
||||
# that they've backed out later on, reverting to their older version.
|
||||
# this patch replaces current upstream rpm5 version with mandriva one, which is
|
||||
# based on the same as PLD currently uses.
|
||||
# status: current version carried upstream seems useless and unmaintained, so
|
||||
# replacing it with this one shouldn't hurt..
|
||||
Patch156: rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch
|
||||
# this patch contains changes from rpm-setup & rpm.org
|
||||
# status: not entirely convinced by the perl version conversion macro stuff
|
||||
# in the script, which might not be upstream material, but rest of the patch
|
||||
# should otherwise be sane 'nuff
|
||||
Patch157: rpm-5.4.9-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch
|
||||
# Due to rpmdav/neon being written in a different fashion than other rpmio clients,
|
||||
# the inconsistent behaviour affects code elsewhere which expects consistent behaviour,
|
||||
# with the result being that when unable to download files, neon will save error
|
||||
# page as the target file.
|
||||
# status: should go upstream, but uncertain about "correct" fix, ie. this is
|
||||
# more of a workaround, while rewriting rpmdav code to behave consistently
|
||||
# would be "the right thing to do". Yet I'm not fully able to grasp all of the
|
||||
# code and don't want to spend more time just to get the API..
|
||||
Patch158: rpm-5.4.9-fix-neon-saving-error-pages-as-target-file.patch
|
||||
|
||||
#ROSA stuff. Disable internal dependences generator
|
||||
Patch147: rpm-5.4.9-disable_internal_dependency_generator.patch
|
||||
Patch500: rpm-5.4.9-disable_internal_dependency_generator.patch
|
||||
Patch501: rpm-5.3.12.vendor.ROSA.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.57
|
||||
BuildRequires: bzip2-devel
|
||||
|
@ -352,37 +392,9 @@ BuildRequires: libxml2-devel >= 2.7.8
|
|||
# needed by internal lua
|
||||
BuildRequires: expat-devel
|
||||
|
||||
Patch200: rpm-5.3.12.vendor.ROSA.patch
|
||||
|
||||
#Fix error in rpmbuild in GTK2-based terminals
|
||||
Patch26: rpm-5.3.8-rpmsq-ignored-signal-return-value.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.57
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: automake >= 1.8
|
||||
BuildRequires: elfutils-devel
|
||||
BuildRequires: sed >= 4.0.3
|
||||
BuildRequires: beecrypt-devel
|
||||
BuildRequires: ed
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: byacc
|
||||
BuildRequires: pkgconfig(neon)
|
||||
BuildRequires: rpm-mandriva-setup-build
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig(libssl)
|
||||
BuildRequires: pkgconfig(libcrypto)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libpcre)
|
||||
BuildRequires: pkgconfig(libpcreposix)
|
||||
BuildRequires: acl-devel
|
||||
BuildRequires: magic-devel
|
||||
BuildRequires: pkgconfig(popt) >= 1.15
|
||||
BuildRequires: libxml2-devel >= 2.7.8
|
||||
# we're now building with internal..
|
||||
#BuildRequires: pkgconfig(lua)
|
||||
# needed by internal lua
|
||||
BuildRequires: expat-devel
|
||||
%ifarch %{ix86} x86_64 ppc ppc64 ia64
|
||||
BuildRequires: pkgconfig(libcpuinfo)
|
||||
%endif
|
||||
|
@ -703,9 +715,21 @@ This package contains the RPM API documentation generated in HTML format.
|
|||
%patch143 -p1 -b .mono_newline~
|
||||
%patch144 -p1 -b .urpm~
|
||||
%patch146 -p1 -b .nosig~
|
||||
%patch147 -p1 -b .disabledep
|
||||
%patch147 -p1
|
||||
%patch148 -p1 -b .nogit~
|
||||
%patch149 -p1 -b .typo~
|
||||
%patch150 -p1 -b .i18n_str~
|
||||
%patch151 -p1 -b .noi18n~
|
||||
%patch152 -p1 -b .l10ndir~
|
||||
%patch153 -p1
|
||||
%patch154 -p1 -b .cputoolize~
|
||||
%patch155 -p1 -b .install_info~
|
||||
%patch156 -p1 -b .php_deps~
|
||||
%patch157 -p1 -b .perl_deps~
|
||||
%patch158 -p1 -b .dl_error~
|
||||
|
||||
#patch200 -p1 -b .rosa_vendor~
|
||||
%patch500 -p1 -b .disabledep
|
||||
%patch501 -p1 -b .rosa_vendor~
|
||||
|
||||
#required by P55, P80, P81, P94..
|
||||
./autogen.sh
|
||||
|
@ -1074,7 +1098,6 @@ rm -f %{buildroot}/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/perllocal.pod
|
|||
#%%if %%{with sqlite}
|
||||
#%%{_rpmhome}/libsql*.so.*
|
||||
#%%endif
|
||||
#{_rpmhome}/lib/liblua.la
|
||||
|
||||
%files -n %{librpmnamedevel}
|
||||
#%%doc apidocs/html
|
||||
|
|
Loading…
Add table
Reference in a new issue