mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 18:33:04 +00:00
More debug when building RPM with --with debug
This commit is contained in:
parent
fca84f830f
commit
66a068fa55
2 changed files with 47 additions and 2 deletions
37
debug.patch
Normal file
37
debug.patch
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
diff --git a/build/parseScript.c b/build/parseScript.c
|
||||||
|
index 4a677cb..f15535f 100644
|
||||||
|
--- a/build/parseScript.c
|
||||||
|
+++ b/build/parseScript.c
|
||||||
|
@@ -265,6 +265,11 @@ int parseScript(Spec spec, int parsePart)
|
||||||
|
case 'n':
|
||||||
|
flag = PART_NAME;
|
||||||
|
/*@switchbreak@*/ break;
|
||||||
|
+#ifdef DEBUG
|
||||||
|
+ case 'f':
|
||||||
|
+ rpmlog(RPMLOG_INFO, "Got -f option for a script\n");
|
||||||
|
+ break;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -465,12 +470,20 @@ int parseScript(Spec spec, int parsePart)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
+#ifdef DEBUG
|
||||||
|
+ rpmlog(RPMLOG_INFO, "DEBUG: Got a file to be included into the script\n");
|
||||||
|
+#endif
|
||||||
|
switch (parsePart) {
|
||||||
|
case PART_PRE:
|
||||||
|
pkg->preInFile = xstrdup(file);
|
||||||
|
break;
|
||||||
|
case PART_POST:
|
||||||
|
pkg->postInFile = xstrdup(file);
|
||||||
|
+#ifdef DEBUG
|
||||||
|
+ if (pkg->postInFile) {
|
||||||
|
+ rpmlog(RPMLOG_INFO, "DEBUG: xstrdup-ped for file in post-script\n");
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
break;
|
||||||
|
case PART_PREUN:
|
||||||
|
pkg->preUnFile = xstrdup(file);
|
12
rpm.spec
12
rpm.spec
|
@ -44,7 +44,7 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with debug}
|
%if %{with debug}
|
||||||
%global debugcflags %{debugcflags} -g3 -O0
|
%global debugcflags %{debugcflags} -g3 -O0 -DDEBUG
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# can probably be restored now..
|
# can probably be restored now..
|
||||||
|
@ -65,7 +65,7 @@ Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: %{libver}.%{minorver}
|
Version: %{libver}.%{minorver}
|
||||||
Release: 95.git%{short_commit}
|
Release: 96.git%{short_commit}
|
||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
Group: System/Configuration/Packaging
|
Group: System/Configuration/Packaging
|
||||||
Url: http://rpm5.org/
|
Url: http://rpm5.org/
|
||||||
|
@ -79,6 +79,10 @@ Source2: rpm.rpmlintrc
|
||||||
Source3: cpu-os-macros.tar.gz
|
Source3: cpu-os-macros.tar.gz
|
||||||
Source5: RPMBDB-0.1.tar.xz
|
Source5: RPMBDB-0.1.tar.xz
|
||||||
Source6: autosetup.macros
|
Source6: autosetup.macros
|
||||||
|
%if %{with debug}
|
||||||
|
# git diff master debug
|
||||||
|
Patch0: debug.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: autoconf >= 2.57
|
BuildRequires: autoconf >= 2.57
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
|
@ -162,6 +166,9 @@ BuildRequires: pkgconfig(ossp-uuid)
|
||||||
%if %{with augeas}
|
%if %{with augeas}
|
||||||
BuildRequires: pkgconfig(augeas)
|
BuildRequires: pkgconfig(augeas)
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with debug}
|
||||||
|
BuildRequires: pkgconfig(valgrind)
|
||||||
|
%endif
|
||||||
BuildRequires: spec-helper >= 0.31.12
|
BuildRequires: spec-helper >= 0.31.12
|
||||||
BuildRequires: stdc++-static-devel >= 4.6.2-8
|
BuildRequires: stdc++-static-devel >= 4.6.2-8
|
||||||
BuildRequires: elfutils >= 0.153
|
BuildRequires: elfutils >= 0.153
|
||||||
|
@ -592,6 +599,7 @@ tar -zxf %{SOURCE3} -C cpu-os-macros
|
||||||
--with-pic \
|
--with-pic \
|
||||||
%if %{with debug}
|
%if %{with debug}
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
|
--enable-build-debug \
|
||||||
--with-valgrind \
|
--with-valgrind \
|
||||||
%endif
|
%endif
|
||||||
--enable-posixmutexes \
|
--enable-posixmutexes \
|
||||||
|
|
Loading…
Add table
Reference in a new issue