Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2003 17:41:31 +0200
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject:   ports/54478: [NEW PORT] sysutils/pkg_install
Message-ID:  <E19c5SF-000OYr-0n@mx1.fillmore-labs.com>
Resent-Message-ID: <200307141550.h6EFoGE1070584@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         54478
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/pkg_install
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 14 08:50:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE

>Description:

The recent changes made it difficult for users of FreeBSD systems <= 4.6
to use a recent ports tree. Furthermore ports conflict checking is only
available on 5.x systems


>How-To-Repeat:
>Fix:

This port installs a -CURRENT snapshot of the pkg_install tools as a port,
a patch to bsd.ports.mk to use this port when installed and to install
this port on systems < 4.7 is included.

How to test:

replace
  ${MASTER_SITE_LOCAL}
by
  ftp://ftp.fillmore-labs.com/pub/FreeBSD/ports/local-distfiles/%SUBDIR%/

How to commit:

put pkg_install-20030714.tar.bz2 into ~/public_distfiles/ on your freefall
account and set MASTER_SITE_SUBDIR to your freefall username.

How to create a new snapshot:

Go to a machine with -CURRENT in /usr/src. Then do
  pax -w -x ustar -s ",^/usr/src/usr.sbin/pkg_install,pkg_install-`date +%Y%m%d`," \
    /usr/src/usr.sbin/pkg_install | bzip2 > "pkg_install-`date +%Y%m%d`.tar.bz2"
nd adjust PORTVERSION and distinfo accordingly.

--- pkg_install.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sysutils/pkg_install
#	sysutils/pkg_install/Makefile
#	sysutils/pkg_install/distinfo
#	sysutils/pkg_install/files
#	sysutils/pkg_install/files/Makefile.inc
#	sysutils/pkg_install/pkg-descr
#	sysutils/pkg_install/pkg-plist
#
echo c - sysutils/pkg_install
mkdir -p sysutils/pkg_install > /dev/null 2>&1
echo x - sysutils/pkg_install/Makefile
sed 's/^X//' >sysutils/pkg_install/Makefile << 'END-of-sysutils/pkg_install/Makefile'
X# New ports collection makefile for:	pkg_install
X# Date created:				14 Jul 2003
X# Whom:					Oliver Eikemeier
X#
X# $FreeBSD$
X#
X
XPORTNAME=		pkg_install
XPORTVERSION=		20030714
XCATEGORIES=		sysutils
XMASTER_SITES=		${MASTER_SITE_LOCAL}
XMASTER_SITE_SUBDIR=	pkg_install
X
XMAINTAINER=		eikemeier@fillmore-labs.com
XCOMMENT=		FreeBSD 5.x version of the package tools for older system releases
X
XUSE_BZIP2=		yes
XUSE_OPENSSL=		yes
XMANCOMPRESSED=		yes
X
XMAN1=			pkg_add.1 pkg_create.1 pkg_delete.1 \
X			pkg_info.1 pkg_sign.1 pkg_version.1
XMLINKS=			pkg_sign.1 pkg_check.1
X
XMAKE_ARGS=		-DNOOBJ
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 470000
Xcheck-already-installed:
X.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
X	@if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
X		${ECHO_CMD} "===>  ${PKGNAME} is already installed - perhaps an older version?"; \
X		${ECHO_CMD} "      If so, you may wish to \`\`make deinstall'' and install"; \
X		${ECHO_CMD} "      this port again by \`\`make reinstall'' to upgrade it properly."; \
X		${ECHO_CMD} "      If you really wish to overwrite the old port of ${PKGNAME}"; \
X		${ECHO_CMD} "      without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \
X		${ECHO_CMD} "      in your environment or the \"make install\" command line."; \
X		exit 1; \
X	fi
X.else
X	@${DO_NADA}
X.endif
X.endif
X
Xpre-configure:
X	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
X		-e 's,%%MANPREFIX%%,${MANPREFIX},g' \
X		${FILESDIR}/Makefile.inc > ${WRKDIR}/Makefile.inc
X
X.include <bsd.port.post.mk>
END-of-sysutils/pkg_install/Makefile
echo x - sysutils/pkg_install/distinfo
sed 's/^X//' >sysutils/pkg_install/distinfo << 'END-of-sysutils/pkg_install/distinfo'
XMD5 (pkg_install-20030714.tar.bz2) = dd98b0275c6bb1e31089e67ea18f22b6
END-of-sysutils/pkg_install/distinfo
echo c - sysutils/pkg_install/files
mkdir -p sysutils/pkg_install/files > /dev/null 2>&1
echo x - sysutils/pkg_install/files/Makefile.inc
sed 's/^X//' >sysutils/pkg_install/files/Makefile.inc << 'END-of-sysutils/pkg_install/files/Makefile.inc'
X# $FreeBSD$
X
XBINDIR=%%PREFIX%%/sbin
XMANDIR=%%MANPREFIX%%/man/man
END-of-sysutils/pkg_install/files/Makefile.inc
echo x - sysutils/pkg_install/pkg-descr
sed 's/^X//' >sysutils/pkg_install/pkg-descr << 'END-of-sysutils/pkg_install/pkg-descr'
XFreeBSD 5.x version of the pkg_install suite of tools for doing
Xmaintainance of software packages.
X
XThis is mainly useful on FreeBSD systems <= 4.6.
X
XWWW: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/
X
X-- Oliver Eikemeier
Xeikemeier@fillmore-labs.com
END-of-sysutils/pkg_install/pkg-descr
echo x - sysutils/pkg_install/pkg-plist
sed 's/^X//' >sysutils/pkg_install/pkg-plist << 'END-of-sysutils/pkg_install/pkg-plist'
Xsbin/pkg_add
Xsbin/pkg_check
Xsbin/pkg_create
Xsbin/pkg_delete
Xsbin/pkg_info
Xsbin/pkg_sign
Xsbin/pkg_version
END-of-sysutils/pkg_install/pkg-plist
exit
--- pkg_install.shar ends here ---

--- bsd.port.mk.patch begins here ---
--- Mk/bsd.port.mk.orig	Sat Jul 12 02:05:02 2003
+++ Mk/bsd.port.mk	Mon Jul 14 17:03:08 2003
@@ -1682,10 +1682,21 @@
 PKGORIGIN?=		${PKGCATEGORY}/${PORTDIRNAME}
 .endif
 
+.if ${OSVERSION} < 470000 && ${PKGORIGIN} != "sysutils/pkg_install"
+BUILD_DEPENDS+=	${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install
+.endif
+
+.if exists(${LOCALBASE}/sbin/pkg_info)
+PKG_CMD?=	${LOCALBASE}/sbin/pkg_create
+PKG_ADD?=	${LOCALBASE}/sbin/pkg_add
+PKG_DELETE?=	${LOCALBASE}/sbin/pkg_delete
+PKG_INFO?=	${LOCALBASE}/sbin/pkg_info
+.else
-PKG_CMD?=		/usr/sbin/pkg_create
+PKG_CMD?=	/usr/sbin/pkg_create
 PKG_ADD?=	/usr/sbin/pkg_add
 PKG_DELETE?=	/usr/sbin/pkg_delete
-PKG_INFO?=		/usr/sbin/pkg_info
+PKG_INFO?=	/usr/sbin/pkg_info
+.endif
 
 # Does the pkg_create tool support conflict checking?
 PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
--- bsd.port.mk.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E19c5SF-000OYr-0n>