summaryrefslogtreecommitdiff
path: root/misc/rpm
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2000-09-10 12:02:48 +0000
committerwiz <wiz@pkgsrc.org>2000-09-10 12:02:48 +0000
commit0f0e939fd7f0dcbcf899b50052cabe5d736047ac (patch)
treee1eaefb64112286814dfb11e6a1ad4efce6bf562 /misc/rpm
parent17d46ea171db61382dfc60aa23495543b5335ec9 (diff)
downloadpkgsrc-0f0e939fd7f0dcbcf899b50052cabe5d736047ac.tar.gz
Add documentation for --initdb to manpage; mention its use in INSTALL,
and what to remove in DEINSTALL. Fixes pkg/8701 by Hauke Fath.
Diffstat (limited to 'misc/rpm')
-rw-r--r--misc/rpm/Makefile5
-rw-r--r--misc/rpm/files/patch-sum3
-rw-r--r--misc/rpm/patches/patch-ab31
-rw-r--r--misc/rpm/pkg/DEINSTALL29
-rwxr-xr-xmisc/rpm/pkg/INSTALL32
5 files changed, 98 insertions, 2 deletions
diff --git a/misc/rpm/Makefile b/misc/rpm/Makefile
index aa7260ce5c1..8a8efd0d882 100644
--- a/misc/rpm/Makefile
+++ b/misc/rpm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2000/07/31 04:14:09 jlam Exp $
+# $NetBSD: Makefile,v 1.22 2000/09/10 12:02:48 wiz Exp $
#
DISTNAME= rpm-2.5.4
@@ -17,4 +17,7 @@ USE_GMAKE= yes
pre-install:
${MKDIR} ${PREFIX}/include/rpm
+post-install:
+ ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/rpm/files/patch-sum b/misc/rpm/files/patch-sum
index 3d7f7f161be..c1cfcbbdf7d 100644
--- a/misc/rpm/files/patch-sum
+++ b/misc/rpm/files/patch-sum
@@ -1,6 +1,7 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 14:09:19 agc Exp $
+$NetBSD: patch-sum,v 1.2 2000/09/10 12:02:48 wiz Exp $
MD5 (patch-aa) = 85cce95469620f8bf84535613c183465
+MD5 (patch-ab) = 337f236d61533bcdbd2c61cc2350828e
MD5 (patch-ba) = 253fc75bface6b5bdf03691f240feeac
MD5 (patch-bb) = 7cd310e9d42c4d4c47f232d9d720941d
MD5 (patch-bc) = e40eff3c4005743437f3849f1be6e0cd
diff --git a/misc/rpm/patches/patch-ab b/misc/rpm/patches/patch-ab
new file mode 100644
index 00000000000..4e36fd46b50
--- /dev/null
+++ b/misc/rpm/patches/patch-ab
@@ -0,0 +1,31 @@
+$NetBSD: patch-ab,v 1.8 2000/09/10 12:02:48 wiz Exp $
+
+--- rpm.8.orig Tue Aug 25 21:06:11 1998
++++ rpm.8
+@@ -44,6 +44,10 @@
+ .br
+ .I "\fB rpm \-\-rebuilddb"
+ .br
++Initialize database:
++.br
++.I "\fB rpm \-\-initdb"
++.br
+ Fix permissions:
+ .br
+ .I "\fB rpm \-\-setperms [query\-package\-specifiers]\fP"
+@@ -410,6 +414,15 @@
+ The general form of an rpm rebuild database command is
+ .PP
+ \fBrpm \-\-rebuilddb\fP
++.PP
++
++The only options this mode supports are \fB-\-dbpath\fP and \fB-\-root\fP.
++
++.SH INITIALIZE DATABASE OPTIONS
++
++Before the first use, you have to initialize the rpm database with
++.PP
++ \fBrpm \-\-initdb\fP
+ .PP
+
+ The only options this mode supports are \fB-\-dbpath\fP and \fB-\-root\fP.
diff --git a/misc/rpm/pkg/DEINSTALL b/misc/rpm/pkg/DEINSTALL
new file mode 100644
index 00000000000..299dcc5d2ec
--- /dev/null
+++ b/misc/rpm/pkg/DEINSTALL
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/09/10 12:02:48 wiz Exp $
+#
+
+PKGNAME=$1
+
+case $2 in
+DEINSTALL)
+ ;;
+POST-DEINSTALL)
+ /bin/cat << EOF
+===========================================================================
+
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+/var/pkg directory, where the rpm database is stored.
+
+Caution: you will lose any data ${PKGNAME} has about any installed packages!
+
+===========================================================================
+EOF
+ ;;
+*)
+ echo "Unexpected argument: $2"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/misc/rpm/pkg/INSTALL b/misc/rpm/pkg/INSTALL
new file mode 100755
index 00000000000..48db72a5a19
--- /dev/null
+++ b/misc/rpm/pkg/INSTALL
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2000/09/10 12:02:48 wiz Exp $
+#
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+ POST-INSTALL)
+ # create database dir
+ mkdir -p /var/pkg/lib/rpm
+ echo ==============================================================
+ echo
+ echo If this is your first use of rpm, please initialize the
+ echo database with:
+ echo ' rpm --initdb'
+ echo
+ echo If you are unsure, try
+ echo ' rpm -qa'
+ echo If this produces an error like
+ echo ' failed to open //var/pkg/lib/rpm/packages.rpm'
+ echo then you should initialize the database.
+ echo
+ echo ==============================================================
+ ;;
+ *)
+ echo "Unexpected argument $2!"
+ exit 1
+ ;;
+esac
+
+exit 0