tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
OSVERSION_SPECIFIC dummy package
The back story to this is PR pkg/41087 "(OS_VERSION should be removed from
PKGPATH)"
The complaint is that OS_VERSION is appended to lsof's PKGNAME, an
alternative suggestion from David Holland is to have a dummy dependence
package that's version is OS_VERSION and I suggested making it a dependence
for all packages that set OSVERSION_SPECIFIC.
I've included an INSTALL script that causes installation failure with an
error message if the package version and OS_VERSION don't match.
The draft package to be imported as "pkgsrc/pkgtools/osabi" is attached as
well as the bsd.pkg.mk/bsd.prefs.mk patch.
As for the three packages with OS_VERSION appended to there name:
* lsof - I've got an update waiting, so can remove OS_VERSION then.
* x11-link - Remove OS_VERSION and just update the version number to
0.48
* p5-perl-headers - I think this should just be left as is.
--
Steven
This is a dummy-package which is made a dependence for packages which are
tightly bound to a specific version of an operating system, e.g. LKMs or
sysutils/lsof. Such binary packages are not backwards compatible with other
versions of the OS.
The version number of this package should be similar to the operating system
version (`uname -r' output).
# $NetBSD$
UNAME="@UNAME@"
case ${STAGE} in
PRE-INSTALL)
OS_VERSION=`${UNAME} -r`
PKG_VERSION="${PKGNAME##*-}"
case `${UNAME} -s` in
AIX)
if ${TEST} -f /usr/bin/oslevel ;then
OS_VERSION=`/usr/bin/oslevel | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
else
OS_VERSION="`${UNAME} -v`.`${UNAME} -r`"
OS_VERSION=`echo "${OS_VERSION}" | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
fi
;;
DragonFly|FreeBSD|Linux)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/-.*$//'`
;;
Interix)
if ${TEST} -f /usr/lib/libc.so.3.5 ;then
OS_VERSION="3.5"
elif ${TEST} -f /usr/lib/libc.so.3.1 ;then
OS_VERSION="3.1"
else
OS_VERSION="3.0"
fi
;;
OSF1)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^V//'`
;;
HPUX)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^B.//'`
;;
esac
if ${TEST} "${OS_VERSION}" != "${PKG_VERSION}" ;then
echo "The Operating System version (${OS_VERSION}) does not
match ${PKG_VERSION}"
exit 1
fi
;;
esac
# $NetBSD$
#
DISTNAME= OSabi-${OPSYS}-${OS_VERSION}
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://www.pkgsrc.org/
COMMENT= Operating System version dummy-package
META_PACKAGE= yes
FILES_SUBST+= UNAME=${UNAME:Q}
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/mk/bsd.pkg.mk
===================================================================
--- pkgsrc.orig/mk/bsd.pkg.mk
+++ pkgsrc/mk/bsd.pkg.mk
@@ -516,6 +516,7 @@ _BUILD_DEFS+= NO_BIN_ON_FTP NO_BIN_ON_CD
.if defined(OSVERSION_SPECIFIC)
_BUILD_DEFS+= OSVERSION_SPECIFIC
+DEPENDS+= OSabi-${OPSYS}=${OS_VERSION}:../../pkgtools/osabi
.endif # OSVERSION_SPECIFIC
.PHONY: all
Index: pkgsrc/mk/bsd.prefs.mk
===================================================================
--- pkgsrc.orig/mk/bsd.prefs.mk
+++ pkgsrc/mk/bsd.prefs.mk
@@ -97,6 +97,8 @@ GNU_ARCH.sh3el?= shle
NATIVE_MACHINE_GNU_ARCH?=
${GNU_ARCH.${NATIVE_MACHINE_ARCH}:U${NATIVE_MACHINE_ARCH}}
MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
+## If changes are made to how OS_VERSION is set below please keep
+## "pkgsrc/pkgtools/osabi/INSTALL" in-sync.
.if ${OPSYS} == "NetBSD"
LOWER_OPSYS?= netbsd
Home |
Main Index |
Thread Index |
Old Index