aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Makefile8
-rw-r--r--gendepslist2.cc2
-rw-r--r--genhdlist_cz24
-rw-r--r--rpm2header.c8
-rw-r--r--rpmtools.spec57
6 files changed, 72 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index b9e0162..d59f885 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-08-11 François Pons <fpons@mandrakesoft.com>
+
+ * gendepslist2.cc, genhdlist_cz2: modified to use packdrake -c instead of bzcat.
+ * rpm2header.c: added comment about upgrade and removing tags.
+
+2000-08-11 François Pons <fpons@mandrakesoft.com>
+
+ * packdrake: inserted waiting its proper package, new version
+ obsoleting extract_archive and build_archive.
+
2000-08-03 Pixel <pixel@mandrakesoft.com>
* gendepslist2.cc: skip "rpmlib(..." dependencies
diff --git a/Makefile b/Makefile
index 6270383..0c566ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
-VERSION = 1.1
+VERSION = 1.2
NAME = rpmtools
-FROMC = rpm2header #rpm-find-leaves
-FROMCC = gendepslist2 hdlist2names hdlist2files hdlist2prereq hdlist2groups
+FROMC = parsehdlist rpm2header #rpm-find-leaves
+FROMCC = gendepslist2 #hdlist2names hdlist2files hdlist2prereq hdlist2groups
FROMC_STATIC = $(FROMC:%=%_static)
FROMCC_STATIC = $(FROMCC:%=%_static)
ALL = $(FROMC) $(FROMCC)
@@ -14,7 +14,7 @@ all: $(ALL)
install: $(ALL)
install -d $(PREFIX)/usr/bin
install -s $(ALL) $(PREFIX)/usr/bin
- install genhdlist_cz2 genhdlists genfilelist build_archive extract_archive $(PREFIX)/usr/bin
+ install genhdlist_cz2 genhdlists genfilelist packdrake $(PREFIX)/usr/bin
$(FROMCC): %: %.cc
$(CXX) $(CFLAGS) $< $(LIBRPM) -o $@
diff --git a/gendepslist2.cc b/gendepslist2.cc
index 810400c..3b71259 100644
--- a/gendepslist2.cc
+++ b/gendepslist2.cc
@@ -373,7 +373,7 @@ void printDepslist(ofstream *out1, ofstream *out2) {
void hdlists(void (*f)(FD_t, int), const char *file, int current_hdlist) {
bool isfile = strlen(file) > 4 && strncmp(file + strlen(file) - 4, ".rpm", 4) == 0;
- string cmd = isfile ? "rpm2header " : "bzip2 -d <";
+ string cmd = isfile ? "rpm2header " : "packdrake -c ";
FILE *pipe = popen((cmd + file + " 2>/dev/null").c_str(), "r");
f(fdDup(fileno(pipe)), current_hdlist);
diff --git a/genhdlist_cz2 b/genhdlist_cz2
index d464049..2a12858 100644
--- a/genhdlist_cz2
+++ b/genhdlist_cz2
@@ -57,8 +57,8 @@ if (-e $depslist) {
}
@keys = grep { delete $keys{$_} } @keys;
-open B, "| build_archive $hdlist 400000";
+open B, "| packdrake -b9s $hdlist 400000";
foreach (@keys, keys %keys) { print B "$_\n" }
-close B or die "build_archive failed\n";
+close B or die "packdrake failed\n";
system("rm -rf $work_dir") unless $noclean;
diff --git a/rpm2header.c b/rpm2header.c
index 0cf6d6b..554b8bd 100644
--- a/rpm2header.c
+++ b/rpm2header.c
@@ -73,6 +73,14 @@ int main(int argc, char **argv) {
headerRemoveEntry(h, RPMTAG_EXCLUSIVE);
headerRemoveEntry(h, RPMTAG_DISTRIBUTION);
headerRemoveEntry(h, RPMTAG_VERIFYSCRIPT);
+
+ /* removing that break updates.
+ headerRemoveEntry(h, RPMTAG_OLDFILENAMES);
+ headerRemoveEntry(h, RPMTAG_BASENAMES);
+ headerRemoveEntry(h, RPMTAG_DIRINDEXES);
+ headerRemoveEntry(h, RPMTAG_DIRNAMES);
+ */
+
headerAddEntry(h, FILENAME_TAG, RPM_STRING_TYPE, name, 1);
headerAddEntry(h, FILESIZE_TAG, RPM_INT32_TYPE, &size, 1);
headerWrite(fout, h, HEADER_MAGIC_YES);
diff --git a/rpmtools.spec b/rpmtools.spec
index 5ab3699..81ce012 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,8 +1,8 @@
%define name rpmtools
-%define release 29mdk
+%define release 1mdk
# do not modify here, see Makefile in the CVS
-%define version 1.1
+%define version 1.2
Summary: contains various rpm command-line tools
Name: %{name}
@@ -28,6 +28,14 @@ Group: Development/Other
Various devel rpm tools which can be used to build a customized
Linux-Mandrake distribution.
+%package compat
+Summary: contains various rpm command-line tools for compability
+Group: System/Configuration/Packaging
+Requires: rpmtools
+%description compat
+Various rpm tools for compability issue with previous version of
+rpmtools package.
+
%prep
%setup
@@ -35,30 +43,59 @@ Linux-Mandrake distribution.
make CFLAGS="$RPM_OPT_FLAGS"
%install
+rm -rf $RPM_BUILD_ROOT
make install PREFIX=$RPM_BUILD_ROOT
+# compability tools, based upon parsehdlist ones.
+ln -s parsehdlist $RPM_BUILD_ROOT%{_bindir}/hdlist2names
+
+cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/hdlist2prereq
+#!/bin/sh
+%{_bindir}/parsehdlist --quiet --prereqs $*
+EOF
+chmod a+x $RPM_BUILD_ROOT%{_bindir}/hdlist2prereq
+
+cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/hdlist2groups
+#!/bin/sh
+%{_bindir}/parsehdlist --quiet --groups $*
+EOF
+chmod a+x $RPM_BUILD_ROOT%{_bindir}/hdlist2groups
+
+cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/hdlist2files
+#!/bin/sh
+%{_bindir}/parsehdlist --quiet --files $*
+EOF
+chmod a+x $RPM_BUILD_ROOT%{_bindir}/hdlist2files
+
%clean
rm -rf $RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
-/usr/bin/gendepslist2
-/usr/bin/hdlist2files
-/usr/bin/hdlist2names
+/usr/bin/packdrake
+/usr/bin/parsehdlist
/usr/bin/rpm2header
/usr/bin/genhdlist_cz2
-/usr/bin/extract_archive
-/usr/bin/build_archive
%files devel
%defattr(-,root,root)
-/usr/bin/hdlist2prereq
-/usr/bin/hdlist2groups
/usr/bin/genhdlists
/usr/bin/genfilelist
+%files compat
+%defattr(-,root,root)
+/usr/bin/gendepslist2
+/usr/bin/hdlist2prereq
+/usr/bin/hdlist2groups
+/usr/bin/hdlist2files
+/usr/bin/hdlist2names
+
+
%changelog
+* Wed Aug 23 2000 François Pons <fpons@mandrakesoft.com> 1.2-1mdk
+- 1.2 of rpmtools.
+- new tools packdrake and parsehdlist.
+
* Thu Aug 3 2000 Pixel <pixel@mandrakesoft.com> 1.1-29mdk
- skip "rpmlib(..." dependencies