diff options
author | wiz <wiz@pkgsrc.org> | 2014-12-30 15:13:19 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-12-30 15:13:19 +0000 |
commit | 0a38ae95b75e4191d2bc7779141805837a604f40 (patch) | |
tree | 72a940b4201682de30eda8c9b0e307555f4681b7 /mk | |
parent | b5926d9e70f0671f279182501e176f93922bc79a (diff) | |
download | pkgsrc-0a38ae95b75e4191d2bc7779141805837a604f40.tar.gz |
Remove pkg_views support, second part: infrastructure.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 33 | ||||
-rw-r--r-- | mk/bsd.pkg.use.mk | 18 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 26 | ||||
-rw-r--r-- | mk/buildlink3/BUILDLINK3_DG | 15 | ||||
-rw-r--r-- | mk/buildlink3/PKGVIEWS_UG | 222 | ||||
-rw-r--r-- | mk/buildlink3/README | 140 | ||||
-rw-r--r-- | mk/buildlink3/TODO | 51 | ||||
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 112 | ||||
-rw-r--r-- | mk/buildlink3/libtool-fix-la | 33 | ||||
-rw-r--r-- | mk/defaults/mk.conf | 8 | ||||
-rw-r--r-- | mk/help/directories.help | 8 | ||||
-rw-r--r-- | mk/misc/can-be-built-here.mk | 13 | ||||
-rw-r--r-- | mk/pkgformat/README | 3 | ||||
-rw-r--r-- | mk/pkgformat/pkg/package.mk | 5 | ||||
-rw-r--r-- | mk/pkgformat/pkg/pkgformat-vars.mk | 17 | ||||
-rw-r--r-- | mk/pkgformat/pkg/pkgformat.mk | 3 | ||||
-rw-r--r-- | mk/pkgformat/pkg/views.mk | 90 | ||||
-rw-r--r-- | mk/pkginstall/bsd.pkginstall.mk | 11 | ||||
-rw-r--r-- | mk/pkginstall/deinstall | 28 | ||||
-rw-r--r-- | mk/pkginstall/deinstall-pre | 15 | ||||
-rw-r--r-- | mk/pkginstall/files | 44 | ||||
-rw-r--r-- | mk/pkginstall/header | 15 | ||||
-rw-r--r-- | mk/pkginstall/install | 29 | ||||
-rw-r--r-- | mk/pkginstall/install-post | 15 | ||||
-rw-r--r-- | mk/plist/plist.mk | 21 | ||||
-rw-r--r-- | mk/wrapper/gen-transform.sh | 33 |
26 files changed, 54 insertions, 954 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a16022cad7f..af767bb06eb 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.2006 2014/11/25 18:27:17 joerg Exp $ +# $NetBSD: bsd.pkg.mk,v 1.2007 2014/12/30 15:13:19 wiz Exp $ # # This file is in the public domain. # @@ -121,17 +121,6 @@ _INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk) PKG_FAIL_REASON+= "Out-dated buildlink3.mk detected, please update" .endif -# PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or -# "overwrite". -.if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \ - (${PKG_INSTALLATION_TYPE} != "overwrite") -PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''." -.endif - -.if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE}) -PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}." -.endif - .if !defined(CATEGORIES) PKG_FAIL_REASON+='CATEGORIES are mandatory.' .endif @@ -216,10 +205,6 @@ _BUILD_DEFS+= _USE_DESTDIR _BUILD_DEFS+= PKG_OPTIONS .endif -.if empty(DEPOT_SUBDIR) -PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty." -.endif - # Store the build options for multi-packages, i.e. packages that can # be built with multiple versions of Apache, Python, Ruby, PHP etc. # @@ -349,19 +334,7 @@ FAIL?= ${SH} ${PKGSRCDIR}/mk/scripts/fail # PKG_SYSCONFVAR?= ${PKGBASE} PKG_SYSCONFSUBDIR?= # empty -.if ${PKG_INSTALLATION_TYPE} == "overwrite" -PKG_SYSCONFDEPOTBASE= # empty PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE} -.else -. if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \ - !empty(PKG_SYSCONFBASE:M${PREFIX}/*) -PKG_SYSCONFDEPOTBASE= # empty -PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE} -. else -PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR} -PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME} -. endif -.endif .if empty(PKG_SYSCONFSUBDIR) DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR} .else @@ -371,7 +344,6 @@ PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR} .if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR}) PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} -PKG_SYSCONFDEPOTBASE= # empty .endif PKG_SYSCONFDIR_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755 @@ -662,9 +634,6 @@ lint: # List of flags to pass to pkg_add(1) for bin-install: BIN_INSTALL_FLAGS?= # -v -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -PKG_ARGS_ADD= -W ${LOCALBASE} -w ${DEFAULT_VIEW} -.endif _BIN_INSTALL_FLAGS= ${BIN_INSTALL_FLAGS} .if defined(_AUTOMATIC) && !empty(_AUTOMATIC:M[Yy][Ee][Ss]) _BIN_INSTALL_FLAGS+= -A diff --git a/mk/bsd.pkg.use.mk b/mk/bsd.pkg.use.mk index 9bab4f26cd0..c0e44554075 100644 --- a/mk/bsd.pkg.use.mk +++ b/mk/bsd.pkg.use.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.use.mk,v 1.57 2014/10/01 19:14:21 joerg Exp $ +# $NetBSD: bsd.pkg.use.mk,v 1.58 2014/12/30 15:13:19 wiz Exp $ # # Turn USE_* macros into proper depedency logic. Included near the top of # bsd.pkg.mk, after bsd.prefs.mk. @@ -55,22 +55,14 @@ MAKE_FLAGS+= CC=${CC:Q} CXX=${CXX:Q} . include "x11.buildlink3.mk" .endif -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -PREFIX= ${DEPOTBASE}/${PKGNAME} -.elif ${PKG_INSTALLATION_TYPE} == "overwrite" -. if defined(INSTALLATION_PREFIX) +.if defined(INSTALLATION_PREFIX) PREFIX= ${INSTALLATION_PREFIX} -. elif defined(USE_X11BASE) +.elif defined(USE_X11BASE) PREFIX= ${X11PREFIX} -. elif defined(USE_CROSSBASE) +.elif defined(USE_CROSSBASE) PREFIX= ${CROSSBASE} -. else +.else PREFIX= ${LOCALBASE} -. endif -.endif - -.if (${PKG_INSTALLATION_TYPE} == "pkgviews") && defined(INSTALLATION_PREFIX) -PKG_FAIL_REASON= "INSTALLATION_PREFIX can't be used in a pkgviews package" .endif ############################################################################ diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index bcd1ae66082..7bf10df5823 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.352 2014/12/07 06:22:52 obache Exp $ +# $NetBSD: bsd.prefs.mk,v 1.353 2014/12/30 15:13:19 wiz Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -577,27 +577,6 @@ APPEND_ELF= elf . endif .endif -PKG_INSTALLATION_TYPES?= overwrite -# This is a whitespace-separated list of installation types supported -# by the package. -# -# *NOTE*: This variable *must* be set in the package Makefile *before* -# the inclusion of bsd.prefs.mk. -# -# Possible: any of: overwrite, pkgviews -# Default: overwrite - -# Set the style of installation to be performed for the package. The -# funky make variable modifiers just select the first word of the value -# stored in the referenced variable. -# -.for _pref_ in ${PKG_INSTALLATION_PREFS} -. if !empty(PKG_INSTALLATION_TYPES:M${_pref_}) -PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//} -. endif -.endfor -PKG_INSTALLATION_TYPE?= none - # if the system is IPv6-ready, compile with IPv6 support turned on. .if empty(_OPSYS_HAS_INET6:M[nN][oO]) IPV6_READY= YES @@ -668,9 +647,6 @@ IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7 IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX} IMAKE_MANINSTALL?= maninstall -DEPOT_SUBDIR?= packages -DEPOTBASE= ${LOCALBASE}/${DEPOT_SUBDIR} - # LINK_RPATH_FLAG publicly exports the linker flag used to set the # run-time library search path. # diff --git a/mk/buildlink3/BUILDLINK3_DG b/mk/buildlink3/BUILDLINK3_DG index 6f7f4d05d4d..342afdd7e1d 100644 --- a/mk/buildlink3/BUILDLINK3_DG +++ b/mk/buildlink3/BUILDLINK3_DG @@ -1,4 +1,4 @@ -$NetBSD: BUILDLINK3_DG,v 1.7 2005/03/24 17:46:01 tv Exp $ +$NetBSD: BUILDLINK3_DG,v 1.8 2014/12/30 15:13:19 wiz Exp $ 0 Developer's guide to buildlink3 ================================= @@ -43,19 +43,6 @@ packages that want to add a dependency must directly include the buildlink3.mk file for that dependency. - 1.3 Support for pkgviews - ======================== - -When building pkgviews packages, buildlink3 doesn't symlink files -into ${BUILDLINK_DIR} since it can safely refer to only a specific -package's files by passing the appropriate -I<dir> and -L<dir> flags -to the compiler, where <dir> points to a location in the package's -depot directory. When building "overwrite" packages, buildlink3 will -act and feel very much like buildlink2 but with more advanced wrapper -scripts, and there are provisions for allowing an "overwrite" package -to build against the viewed instance of a depoted package. - - 2 Troubleshooting ================= diff --git a/mk/buildlink3/PKGVIEWS_UG b/mk/buildlink3/PKGVIEWS_UG deleted file mode 100644 index 703e9c54078..00000000000 --- a/mk/buildlink3/PKGVIEWS_UG +++ /dev/null @@ -1,222 +0,0 @@ -$NetBSD: PKGVIEWS_UG,v 1.4 2007/10/07 12:59:13 kano Exp $ - - 0 User's Guide to pkgviews - ========================== - -This is a tutorial for pkgsrc users who wish to experiment with the -new "pkgviews" implementation in pkgsrc. More information about -pkgviews may be found in pkgsrc/mk/buildlink3/README. That document -also explains why you might want to use pkgviews. Some reasons -include: - - * fully dynamic PLISTs - * multiple version of the same package can co-exist - * no or non-fatal conflicting packages - - - 0.1 CAVEAT (USE AT YOUR OWN RISK!) - ================================== - -Pkgviews is *completely experimental* at this point in time. Bug -reports on pkgviews will be treated with a fairly low priority by the -general pkgsrc developers, though I may personally be more responsive. -However, the major thrust of the next several weeks of pkgsrc -development for me will revolve around testing and integrating the -buildlink3 framework into pkgsrc and deprecating buildlink2. Any -work on pkgviews during that time is strictly happenstance. - - - 0.1 Preparing your system to use pkgviews - ========================================= - -You will need to start with a clean system to use pkgviews. Depoted -packages, a.k.a "pkgviews" packages (packages that are built using -pkgviews) cannot depend on non-depoted packages, a.k.a. "overwrite" -packages, although the reverse is possible. If you have _any_ -packages installed, you will need to pkg_delete them before you can -start building depoted packages. In fact, it's best to completely -nuke /usr/pkg (or wherever you choose for your ${LOCALBASE}) as -pkgviews manages all of its own directories. - -Next you will need to add the following line to /etc/mk.conf: - - PKG_INSTALLATION_PREFS= pkgviews overwrite - -This creates pkgviews packages instead of overwrite packages for any -packages that support it. The packages that do support pkgviews -can be identified by searching the package Makefile for the -following line: - - PKG_INSTALLATION_TYPES= overwrite pkgviews - - - 0.2 Installing your first pkgviews package - ========================================== - -The first package you will need to install is pkgsrc/pkgtools/digest. - -===> Checking for vulnerabilities in digest-20021220 -===> Extracting for digest-20021220 -===> Checking for vulnerabilities in digest-20021220 -===> Patching for digest-20021220 -===> Overriding tools for digest-20021220 -===> Buildlinking for digest-20021220 -===> Configuring for digest-20021220 -configure: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used. -checking build system type... i386-unknown-netbsdelf1.6.2. -checking host system type... i386--netbsdelf -... -configure: creating ./config.status -config.status: creating Makefile -config.status: creating config.h -===> Building for digest-20021220 -cc -DHAVE_CONFIG_H -I. -I. -DHOST=\"i386--netbsdelf\" -DVERSION=\"20021220\" -O2 -mcpu=pentiumpro -c bits.c -o bits.o -... -cc -O2 -mcpu=pentiumpro -o digest digest.o md5c.o rmd160.o rmd160hl.o sha2.o sha2hl.o md5hl.o sha1.o sha1hl.o -=> Fixing buildlink references in files-to-be-installed. -===> Installing for digest-20021220 -===> Becoming root@blossom.hq.williamlam.com to install digest. -sudo /bin/sh ./mkinstalldirs /usr/pkg/packages/digest-20021220/bin -mkdir /usr/pkg/packages/digest-20021220/bin -install -c -s -o root -g wheel -m 555 digest /usr/pkg/packages/digest-20021220/bin/digest -/bin/sh ./mkinstalldirs /usr/pkg/packages/digest-20021220/man/man1 -mkdir /usr/pkg/packages/digest-20021220/man -mkdir /usr/pkg/packages/digest-20021220/man/man1 -install -c -o root -g wheel -m 444 digest.1 /usr/pkg/packages/digest-20021220/man/man1/digest.1 -===> Registering installation for digest-20021220 -===> Building views for digest-20021220 -=> Performing package view clash check for digest-20021220 in standard view -=> Performing package view overwrite check for digest-20021220 in standard view -=> Linking package into standard view - -Notice in the transcript that the digest package has been installed -into /usr/pkg/packages/digest-20021220 and then subsequently linked -into the "standard view". The standard view is simply /usr/pkg, which -means that the digest executable is accessible as /usr/pkg/bin/digest. - - - 0.3 The contents of /usr/pkg (${LOCALBASE}) - =========================================== - -There is a directory /usr/pkg/packages that contains all of the -depoted packages. The contents of /usr/pkg/packages after installing -digest are: - -/usr/pkg/packages/digest-20021220/+BUILD_INFO -/usr/pkg/packages/digest-20021220/+BUILD_VERSION -/usr/pkg/packages/digest-20021220/+COMMENT -/usr/pkg/packages/digest-20021220/+CONTENTS -/usr/pkg/packages/digest-20021220/+DESC -/usr/pkg/packages/digest-20021220/+SIZE_ALL -/usr/pkg/packages/digest-20021220/+SIZE_PKG -/usr/pkg/packages/digest-20021220/+VIEWS -/usr/pkg/packages/digest-20021220/bin/digest -/usr/pkg/packages/digest-20021220/man/man1/digest.1 - -Note that all of the files related to the package, including the -package metadata files used by the pkg_* tools, are stored in the -"depot directory" for digest (/usr/pkg/packages/digest-20021220). - -The digest package was also linked into the standard view. Looking -inside /usr/pkg shows us the following symlinks: - -/usr/pkg/bin/digest -> /usr/pkg/packages/digest-20021220/bin/digest -/usr/pkg/man/man1/digest.1 -> /usr/pkg/packages/digest-20021220/man/man1/digest.1 - -Since digest is present in /usr/pkg/bin, it can be used as always -without any changes needed by the typical user with /usr/pkg/bin in -his PATH, and "man digest" will continue to work as expected. - - - 0.4 Creating new views - ====================== - -The following commands will install both pkgsrc/www/lynx and -pkgsrc/www/lynx-current onto the same system using pkgviews: - - cd /usr/pkgsrc/www/lynx; make install - cd /usr/pkgsrc/www/lynx-current; make install PKGVIEWS=devel - -The stable version of lynx (2.8.4.1nb2) is linked into the standard -view, while the -current version of lynx (2.8.5.0.7nb3) is linked into -the "devel" view. The lynx-related files in /usr/pkg are: - -/usr/pkg/bin/lynx -> /usr/pkg/packages/lynx-2.8.4.1nb2/bin/lynx -/usr/pkg/man/man1/lynx.1 -> /usr/pkg/packages/lynx-2.8.4.1nb2/man/man1/lynx.1 -/usr/pkg/share/locale/cs/LC_MESSAGES/lynx.mo -> ... -... - -/usr/pkg/devel/bin/lynx -> /usr/pkg/packages/lynx-2.8.5.0.7nb3/bin/lynx -/usr/pkg/devel/man/man1/lynx.1 -> /usr/pkg/packages/lynx-2.8.5.0.7nb3/man/man1/lynx.1 -/usr/pkg/devel/share/locale/cs/LC_MESSAGES/lynx.mo -> ... -... - -Note that the files for pkgsrc/www/lynx have been symlinked into -/usr/pkg as usual, but the files for pkgsrc/www/lynx-current have been -symlinked into the "devel" subdirectory of /usr/pkg. The files in -in the "devel" view can be accessed by adding /usr/pkg/devel/bin to -the PATH and adding /usr/pkg/devel/man to MANPATH in the appropriate -place. - - - 0.5 Managing views using pkg_* tools - ==================================== - -Adding and removing package instances to and from views is always a -safe operation as the true package files are left untouched. All that -happens is that linkfarms are being added or removed, thus changes are -always easy to reverse. - -Adding a depoted package into a view may be accomplished with: - - pkg_view -w devel add gmake-3.80nb2 - -This adds the gmake-3.80nb2 package (already present on the system) to -the "devel" view. The "devel" view is created if it doesn't already -exist. - -Removing a package from a view may be accomplished with either of the -following commands: - - pkg_view -w devel delete gmake-3.80nb2 - pkg_delete -K /usr/pkg/devel/.pkgdb gmake - -Either of these will remove the gmake-3.80nb2 package from the "devel" -view if the package exists in the view. - -Removing a package from the standard view may be accomplished with -either of the following commands - - pkg_view delete gmake-3.80nb2 - pkg_delete gmake - -The latter one is recommended for speed. - - - 0.6 Completely removing a package - ================================= - -Removing a depoted package from the system (removing it from all views -and removing the depot directory) is done with: - - pkg_delete -K /usr/pkg/packages gmake-3.80nb2 - -If you know that only a single gmake is present on your system, then -you can specify "gmake" instead of the full package name to -pkg_delete(1). However, I recommend being explicit about the package -you are removing to avoid any surprises. - - - 0.6 Where to learn more about pkgviews - ====================================== - -There are several shell environment variables that may be set to -affect the default behaviour of the pkg_* tools. Please read the -pkg_view(1) man page for more information. - -For a more complete understanding of the motivations and principles -behind pkgviews, the following paper by Alistair Crooks is highly -recommended: - - http://www.NetBSD.org/docs/software/pkgviews.pdf diff --git a/mk/buildlink3/README b/mk/buildlink3/README deleted file mode 100644 index e0215e438ec..00000000000 --- a/mk/buildlink3/README +++ /dev/null @@ -1,140 +0,0 @@ -$NetBSD: README,v 1.7 2007/10/07 12:59:13 kano Exp $ - - 0 Package Views - =============== - -Package views is a pkgsrc technology that supports building and -installing multiple versions of the same software such that they -co-exist on a single system. Individual packages are installed into -their own directory tree and their files are symlinked into "views". -Users can choose amongst different software collections provided by -different views by appropriately setting shell environment variables, -e.g., PATH, MANPATH, etc. - -Package views is similar in spirit to the Encap Package Management -System, the GNU Stow Project, and the Carnegie Mellon University Depot -Configuration Management system: - - http://www.encap.org/ - http://www.gnu.org/software/stow/stow.html - http://asg.web.cmu.edu/andrew2/depot/ - -However, these projects have a philosophy of "install anywhere, use in -one place", whereas package views departs from that model with a -philosophy that can roughly be summarized as "install in one place, -use anywhere". - - - 0.1 A short history of package views - ==================================== - -Package views was proposed as a solution to the problem of not being -able to install multiple versions of the same software simultaneously -via pkgsrc. Alistair Crooks presented a paper on package views at -EuroBSDCon in November 2002 that described the work he did on the -"pkgviews" branch of pkgsrc where he implemented his ideas. The paper -is highly-recommended reading for a more complete understanding of -package views principles and is available at: - - http://www.NetBSD.org/docs/software/pkgviews.pdf - -Unfortunately, Alistair ran out of time to devote to integrating his -work into the main pkgsrc branch. The code he developed languished on -the "pkgviews" branch for over a year, and in the meantime much code -was added to pkgsrc that increased the complexity and the capabilities -of pkgsrc, including buildlink2, which conflicted with Alistair's -implementation of package views. In September 2003, Johnny Lam -integrated the functionality on the pkgviews branch into modern -pkgsrc. As part of the integration, a new buildlink3 framework was -created so that the ability to isolate builds from differences in -the environment wouldn't be lost. - - - 0.2 Package views terminology - ============================= - -The terminology for packages in the package views world is as -follows: a "pkgviews" package is a package that has been converted to -build and install using package views. An "overwrite" package is one -that hasn't. A "depoted" package describes a pkgviews package -installed into /usr/pkg/packages in its "depot" directory. A package -"instance" in a view describes a depoted package symlinked into a -view. - - - 0.3 What's been done - ==================== - -The pkg_install tools have been enhanced to handle both binary depoted -packages and binary "overwrite" packages. The pkgsrc internals have -been modified to allow building and installing depoted packages and to -automatically add a depoted package in the default view. -"Overwrite" packages shouldn't be affected by the changes, and can be -freely mixed with pkgviews packages. - -Packages that have been converted to use "pkgviews" should add the -following line to their Makefiles: - - PKG_INSTALLATION_TYPES= overwrite pkgviews - -PKG_INSTALLATION_TYPES can also just be one value or the other to -explicitly note that the package only supports that one type of -installation style. Users may add the following line to /etc/mk.conf: - - PKG_INSTALLATION_PREFS= pkgviews overwrite - -to note that they prefer building using pkgviews if the package -supports it, otherwise to build using the "overwrite" installation -style. However, users should not change PKG_INSTALLATION_PREFS from -the default value unless they're sure that they want to start -migrating their package system over to using pkgviews. The default, -"overwrite pkgviews", will cause all packages to build using the -"overwrite" installation style. - -Some highlight of pkgviews packages include: - - * fully dynamic PLISTs - * multiple versions of the same package can co-exist - - - 0.4 buildlink3 pkgsrc build framework - ===================================== - -A new buildlink3 framework that takes advantage of depoted packages -has been added to pkgsrc as part of the package views changes. -Buildlink3 uses wrapper scripts much like buildlink2. However, when -building pkgviews packages, it doesn't symlink files into -${BUILDLINK_DIR} since it can safely refer to only a specific -package's files by passing the appropriate -I<dir> and -L<dir> flags -to the compiler, where <dir> points to a location in the package's -depot directory. When building "overwrite" packages, buildlink3 will -act and feel very much like buildlink2 but with more advanced wrapper -scripts, and there are provisions for allowing an "overwrite" package -to build against the viewed instance of a depoted package. The -implementation currently allows "overwrite" to depend on either -"overwrite" or pkgviews packages, but pkgviews packages are restricted -to only being able to depend on other pkgviews packages. - - - 0.5 Future Work - =============== - -There may be some way around the problem of pkgviews packages not -being able to depend on "overwrite" packages. That's the only thing -standing in the way between allowing an arbitrary package to be built -using either installation style and working seamlessly with any other -package. The problem has to do with proper handling of metadata in -the +REQUIRED_BY and +CONTENTS files that are split in two separate -places. One possible route to a solution is that for each overwrite -package, we can symlink /usr/pkg/packages/<pkg> -> /var/db/pkg/<pkg>. -This allows depoted packages to record themselves directly in the -+REQUIRED_BY files of "overwrite" packages. If a user happens to run - - pkg_delete -K /usr/pkg/packages <overwrite_pkg> - -then it still uses the correct +CONTENTS, +INSTALL, and +DEINSTALL -scripts, so the package will still remove itself properly from -/usr/pkg. However, there are some remaining issues with properly -removing both the /var/db/pkg/<pkg> directory and the -/usr/pkg/packages/<pkg> symlink, so the deletion won't be completely -clean until this issue can be resolved. diff --git a/mk/buildlink3/TODO b/mk/buildlink3/TODO deleted file mode 100644 index 3d05c4f5b15..00000000000 --- a/mk/buildlink3/TODO +++ /dev/null @@ -1,51 +0,0 @@ -$NetBSD: TODO,v 1.5 2004/02/17 08:59:44 jlam Exp $ - -TODO items -========== - -* Make the error where pkgviews packages depend on overwrite packages - less obfuscated. -* Teach linkfarm to do tree-folding a la GNU stow. -* Correct handling of pkgconfig *.pc files. - -Package views integration plan: -============================== - -(1) Modify pkgsrc internals (bsd.pkg.mk & friends) to build and - install depoted packages if PKG_INSTALLATION_TYPE is set to - "pkgviews" in the package Makefile, and to add the depoted - package to the default view. The depoted package will include - all of its metadata files in the depot directory, and we rely - on pkg_view to copy the metadata files into /var/db/pkg as - part of adding the package to the default view. We only - support the default view. Depoted packages will install into - ${LOCALBASE}/packages and the default view will be through - ${LOCALBASE} for all packages. - -Using this infrastructure, depoted packages that have been added to -the default view should look and feel like a non-depoted package in -all respects, down to what you find in /var/db/pkg/${PKGNAME}, so -non-depoted packages can depend on depoted packages without change. - -(2) Migrate non-USE_X11BASE and non-USE_IMAKE packages to set - PKG_INSTALLATION_TYPE to "pkgviews". Depoted packages can only - depend on other depoted packages. A depoted package will have - <deppkg_dir>/lib and ${LOCALBASE}/lib in the run-time library - search path (-Wl,-R*) so that wildcard dependencies on library - packages will still work (so long as the major number of the shlib - hasn't increased). - -At this point, all packages in pkgsrc except for those that define -USE_X11BASE or USE_IMAKE will be depoted. - -(3) Make xpkgwedge the default for pkgsrc. It would be nice to - enhance xpkgwedge in some way so that a package could be compiled - with the correct defaults for finding app-defaults files without - having the user fiddle with environment variables. - -This is a flag day change and will require bumping the PKGREVISIONs -for every single USE_X11BASE and USE_IMAKE package and all packages -that depend on them. - -(4) Migrate the USE_X11BASE and USE_IMAKE packages to set - PKG_INSTALLATION_TYPE to "pkgviews". diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 5486f0dd54d..5d5992f424b 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.231 2014/11/25 19:01:02 joerg Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.232 2014/12/30 15:13:19 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -205,7 +205,7 @@ _VARGROUPS+= bl3 _SYS_VARS.bl3+= BUILDLINK_${v} .endfor .for p in ${_BUILDLINK_TREE} -. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS +. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS _SYS_VARS.bl3+= BUILDLINK_${v}.${p} . endfor . for v in IGNORE_PKG USE_BUILTIN @@ -290,9 +290,6 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}} # # BUILDLINK_PKGNAME.<pkg> the name of the package # -# BUILDLINK_IS_DEPOT.<pkg> "yes" or "no" for whether <pkg> is a -# depoted package. -# # BUILDLINK_PREFIX.<pkg> contains all of the installed files # for <pkg> # @@ -335,7 +332,6 @@ USE_BUILTIN.${_pkg_}?= no _BLNK_PKG_DBDIR.${_pkg_}?= _BLNK_PKG_DBDIR.${_pkg_}_not_found _BLNK_PKG_INFO.${_pkg_}?= ${TRUE} BUILDLINK_PKGNAME.${_pkg_}?= ${_pkg_} -BUILDLINK_IS_DEPOT.${_pkg_}?= no # Usual systems has builtin packages in /usr . if exists(/usr) BUILDLINK_PREFIX.${_pkg_}?= /usr @@ -365,9 +361,6 @@ _BLNK_PKG_DBDIR.${_pkg_}!= \ case "$$pkg" in \ "") dir="_BLNK_PKG_DBDIR.${_pkg_}_not_found" ;; \ *) dir="${_PKG_DBDIR}/$$pkg"; \ - if [ -f $$dir/+DEPOT ]; then \ - dir=`${HEAD} -1 $$dir/+DEPOT`; \ - fi ;; \ esac; \ ${ECHO} $$dir . endif @@ -384,26 +377,17 @@ _BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_PKG_DBDIR} . endif BUILDLINK_PKGNAME.${_pkg_}?= ${_BLNK_PKG_DBDIR.${_pkg_}:T} -. if exists(${_BLNK_PKG_DBDIR.${_pkg_}}/+VIEWS) -BUILDLINK_IS_DEPOT.${_pkg_}?= yes -. else -BUILDLINK_IS_DEPOT.${_pkg_}?= no -. endif # # Set BUILDLINK_PREFIX.<pkg> to the "PREFIX" value for the package. # . if !defined(BUILDLINK_PREFIX.${_pkg_}) -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -BUILDLINK_PREFIX.${_pkg_}= ${_BLNK_PKG_DBDIR.${_pkg_}} -. else -. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found) +. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found) BUILDLINK_PREFIX.${_pkg_}!= \ ${TRUE} Computing BUILDLINK_PREFIX.${_pkg_:Q}; \ ${_BLNK_PKG_INFO.${_pkg_}} -qp ${BUILDLINK_PKGNAME.${_pkg_}} | \ ${SED} -e "s,^[^/]*,,;q" -. else +. else BUILDLINK_PREFIX.${_pkg_}= BUILDLINK_PREFIX.${_pkg_}_not_found -. endif . endif . endif . if empty(BUILDLINK_PREFIX.${_pkg_}:M*not_found) @@ -497,15 +481,6 @@ BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_} . endif .endfor # -# Add the depot directory library directory for this package to the -# runtime library search path. -# -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${PREFIX}/lib) -BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib -. endif -.endif -# # Add the default view library directories to the runtime library search # path so that wildcard dependencies on library packages can always be # fulfilled through the default view. @@ -615,11 +590,9 @@ buildlink-directories: # # BUILDLINK_CONTENTS_FILTER.<pkg> # filter command that filters +CONTENTS input into a list of files -# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default for -# overwrite packages, BUILDLINK_CONTENTS_FILTER.<pkg> outputs the -# contents of the include and lib directories in the package -# +CONTENTS, and for pkgviews packages, it outputs any libtool -# archives in lib directories. +# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default, +# BUILDLINK_CONTENTS_FILTER.<pkg> outputs the contents of the include +# and lib directories in the package +CONTENTS. # # BUILDLINK_FNAME_TRANSFORM.<pkg> # sed arguments used to transform the name of the source filename @@ -646,14 +619,8 @@ buildlink-${_pkg_}-cookie: ${RUN} \ ${TOUCH} ${TOUCH_FLAGS} ${_BLNK_COOKIE.${_pkg_}} -. if (${PKG_INSTALLATION_TYPE} == "pkgviews") && \ - !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ - ${EGREP} 'lib(/pkgconfig/.*\.pc$$|.*/lib[^/]*\.la$$)' -. else BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ ${EGREP} '(include.*/|\.h$$|\.idl$$|\.pc$$|/lib[^/]*\.[^/]*$$)' -. endif # XXX: Why not pkg_info -qL? BUILDLINK_FILES_CMD.${_pkg_}?= \ ${_BLNK_PKG_INFO.${_pkg_}} -f ${BUILDLINK_PKGNAME.${_pkg_}} | \ @@ -742,9 +709,7 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}= # empty # _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" + -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" .if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ @@ -798,19 +763,15 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ # This prevents libtool from looking into the original directory # for other *.la files. # -. if (${PKG_INSTALLATION_TYPE} == "overwrite") || \ - !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ - -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" \ - -e "/^libdir=/s,${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" + -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^libdir=/s,${LOCALBASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" -. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" +. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^libdir=/s,${X11BASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_X11_DIR}\\1,g" -. endif . endif .endfor @@ -840,21 +801,6 @@ do-buildlink: ${_target_} _BLNK_PASSTHRU_DIRS= # empty _BLNK_PASSTHRU_RPATHDIRS= # empty # -# Allow all of the depot directories for packages whose headers and -# libraries we use. -# -.for _pkg_ in ${_BLNK_PACKAGES} -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -_BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.${_pkg_}} -. endif -.endfor -# -# Allow the depot directory for the package we're building. -# -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_PASSTHRU_DIRS+= ${PREFIX} -.endif -# # Allow any directories specified by the package or user. # _BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PASSTHRU_DIRS} @@ -871,14 +817,12 @@ _BLNK_PASSTHRU_DIRS:= ${_BLNK_PASSTHRU_DIRS:N${_dir_}} # package to be in the runtime library search path. # .for _pkg_ in ${_BLNK_PACKAGES} -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) -. if !empty(BUILDLINK_LIBDIRS.${_pkg_}) -. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}} -. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}) +. if !empty(BUILDLINK_LIBDIRS.${_pkg_}) +. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}} +. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}) _BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_PREFIX.${_pkg_}}/${_dir_} -. endif -. endfor -. endif +. endif +. endfor . endif .endfor # @@ -916,9 +860,6 @@ _BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_DIRS} _BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_RPATHDIRS} _BLNK_MANGLE_DIRS+= ${COMPILER_INCLUDE_DIRS} _BLNK_MANGLE_DIRS+= ${COMPILER_LIB_DIRS} -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_MANGLE_DIRS+= ${PREFIX} -.endif _BLNK_MANGLE_DIRS+= ${LOCALBASE} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_MANGLE_DIRS+= ${X11BASE} @@ -945,9 +886,6 @@ _BLNK_PROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS} _BLNK_UNPROTECT_DIRS+= ${COMPILER_INCLUDE_DIRS} _BLNK_UNPROTECT_DIRS+= ${COMPILER_LIB_DIRS} -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_UNPROTECT_DIRS+= ${PREFIX} -.endif _BLNK_UNPROTECT_DIRS+= ${LOCALBASE} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_UNPROTECT_DIRS+= ${X11BASE} @@ -1055,24 +993,14 @@ _BLNK_TRANSFORM+= sub-rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir}} _CWRAPPERS_TRANSFORM+= R:/usr/lib:/usr/lib .endfor # -# Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that -# "overwrite" packages think headers and libraries for "pkgviews" packages -# are just found in the default view. -# -.if ${PKG_INSTALLATION_TYPE} == "overwrite" -_BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE} -.endif -# # Convert direct paths to static libraries and libtool archives in # ${LOCALBASE} or ${X11BASE} into references into ${BUILDLINK_DIR}. # -.if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _CWRAPPERS_TRANSFORM+= P:${X11BASE}:${BUILDLINK_X11_DIR} -. if defined(USE_X11) && ${X11_TYPE} != "modular" +.if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} _CWRAPPERS_TRANSFORM+= P:${LOCALBASE}:${BUILDLINK_DIR} -. endif .endif # # Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. @@ -1088,12 +1016,10 @@ _CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} # # Transform references to ${LOCALBASE} into ${BUILDLINK_DIR}. # -.if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _CWRAPPERS_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR} _CWRAPPERS_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR} -.endif # # Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. # (do so only after transforming references to ${LOCALBASE} if the @@ -1106,11 +1032,8 @@ _CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} _CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} .endif # -# Protect any remaining references to ${PREFIX}, ${LOCALBASE}, or ${X11BASE}. +# Protect any remaining references to ${LOCALBASE}, or ${X11BASE}. # -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_TRANSFORM+= untransform:sub-mangle:${PREFIX}:${_BLNK_MANGLE_DIR.${PREFIX}} -.endif _BLNK_TRANSFORM+= untransform:sub-mangle:${LOCALBASE}:${_BLNK_MANGLE_DIR.${LOCALBASE}} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= untransform:sub-mangle:${X11BASE}:${_BLNK_MANGLE_DIR.${X11BASE}} @@ -1203,7 +1126,6 @@ ${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la ${RUN}${CAT} ${.ALLSRC} \ | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \ -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \ - -e "s|@DEPOTBASE@|${DEPOTBASE}|g" \ -e "s|@LOCALBASE@|${LOCALBASE}|g" \ -e "s|@WRKSRC@|${WRKSRC}|g" \ -e "s|@BASENAME@|"${BASENAME:Q}"|g" \ diff --git a/mk/buildlink3/libtool-fix-la b/mk/buildlink3/libtool-fix-la index ac6f00ebc16..83c55823e00 100644 --- a/mk/buildlink3/libtool-fix-la +++ b/mk/buildlink3/libtool-fix-la @@ -1,4 +1,4 @@ -# $NetBSD: libtool-fix-la,v 1.8 2006/11/09 02:07:59 rillig Exp $ +# $NetBSD: libtool-fix-la,v 1.9 2014/12/30 15:13:19 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -46,13 +46,9 @@ # For the *.lai files, in the "dependency_libs" line, we remove # redundant -Ldir and -llib options. We also make sure that we don't # ever reference other .la files, only referring to other libraries -# via the usual "-L/path -llib" and making sure that /path is always -# somewhere under the default view. This makes wildcard dependencies -# work for "overwrite" packages by letting libtool find libraries in -# the default view. +# via the usual "-L/path -llib". BUILDLINK_DIR="@BUILDLINK_DIR@" -DEPOTBASE="@DEPOTBASE@" LOCALBASE="@LOCALBASE@" WRKSRC="@WRKSRC@" @@ -257,12 +253,7 @@ if $test -f $lafile; then ;; ###################################### # Skip directories that should never - # appear in the -L<dir> flags. Also - # modify directories in ${DEPOTBASE} to - # point to somewhere in the default view - # ${LOCALBASE}, since we want "overwrite" - # packages to think the libraries really - # do just exist through the default view. + # appear in the -L<dir> flags. ###################################### -L*) case $i in @@ -270,14 +261,6 @@ if $test -f $lafile; then ;; -L${WRKSRC}|-L${WRKSRC}/*) ;; - -L${DEPOTBASE}/*) - i=`$echo "$i" | $sed -e "s,-L${DEPOTBASE}/[^/]*/,-L${LOCALBASE}/,"` - case $L in - *"$i "*) ;; - *"$i") ;; - *) L="$L $i" ;; - esac - ;; *) case $L in *"$i "*) ;; @@ -299,17 +282,11 @@ if $test -f $lafile; then ###################################### # Libtool archives should be changed from # "/path/libfoo.la" to "-L/path -lfoo", - # where /path is appropriately modified - # so that the depot directory is changed - # to the views directory. This allows - # the .la files to be used by either - # "overwrite" or "pkgviews" packages and - # works correctly with wildcard + # This works correctly with wildcard # dependencies. ###################################### *.la) - dirbase=`$dirname $i` - dir=`$echo "X$dirbase" | $Xsed -e "s,^${DEPOTBASE}/[^/]*/,${LOCALBASE}/,"` + dir=`$dirname $i` case $L in *"-L$dir "*) ;; *"-L$dir") ;; diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf index 95c1b821de0..166dd741d49 100644 --- a/mk/defaults/mk.conf +++ b/mk/defaults/mk.conf @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf,v 1.251 2014/12/10 12:28:49 wiz Exp $ +# $NetBSD: mk.conf,v 1.252 2014/12/30 15:13:19 wiz Exp $ # # This file provides default values for variables that may be overridden @@ -398,12 +398,6 @@ LIBTOOLIZE_PLIST?= yes # Possible: yes, no # Default: yes -PKG_INSTALLATION_PREFS?= overwrite pkgviews -# This is a whitespace-separated list of installation types to try when -# building a package, in order of preference. -# Possible: any of: overwrite, pkgviews -# Default: overwrite pkgviews - PKG_RESUME_TRANSFERS?= NO # Used in pkgsrc to resume transfers, if enabled the whole file won't be # downloaded from scratch again. diff --git a/mk/help/directories.help b/mk/help/directories.help index 600a2953f5e..02c9ba58db4 100644 --- a/mk/help/directories.help +++ b/mk/help/directories.help @@ -1,4 +1,4 @@ -# $NetBSD: directories.help,v 1.1 2008/01/19 22:41:48 rillig Exp $ +# $NetBSD: directories.help,v 1.2 2014/12/30 15:13:19 wiz Exp $ # # This file contains some short documentation on the directories that # are used within pkgsrc. @@ -6,7 +6,7 @@ # PREFIX # This is the directory where the package should install its # files. The actual value depends on the variables -# PKG_INSTALLATION_TYPE, USE_X11BASE and USE_CROSSBASE. +# USE_X11BASE and USE_CROSSBASE. # # Tags: read-only, system-defined, non-overridable, etc. # @@ -14,8 +14,7 @@ # CROSSBASE, # INSTALLATION_PREFIX, # LOCALBASE, -# X11PREFIX, -# PKG_INSTALLATION_TYPE. +# X11PREFIX. # # LOCALBASE @@ -45,7 +44,6 @@ # point to a subdirectory of PKG_SYSCONFBASE. # -# TODO:PKG_SYSCONFDEPOTBASE # TODO:PKG_SYSCONFBASEDIR # diff --git a/mk/misc/can-be-built-here.mk b/mk/misc/can-be-built-here.mk index 2a11b642d28..8218687a38c 100644 --- a/mk/misc/can-be-built-here.mk +++ b/mk/misc/can-be-built-here.mk @@ -1,4 +1,4 @@ -# $NetBSD: can-be-built-here.mk,v 1.6 2008/11/05 08:24:23 rillig Exp $ +# $NetBSD: can-be-built-here.mk,v 1.7 2014/12/30 15:13:19 wiz Exp $ # # This file checks whether a package can be built in the current pkgsrc # environment. It checks the following variables: @@ -129,17 +129,6 @@ _CBBH.skip= yes _CBBH.skip= no .endif -# Check PKG_INSTALLATION_TYPES -_CBBH_CHECKS+= pkgviews -_CBBH_MSGS.pkgviews= "This package is not available for pkgviews." - -_CBBH.pkgviews= yes -.if ${PKG_INSTALLATION_PREFS} == "pkgviews overwrite" -. if empty(PKG_INSTALLATION_TYPES:Mpkgviews) -_CBBH.pkgviews= no -. endif -.endif - # Collect and combine the results _CBBH= yes _CBBH_MSGS= # none diff --git a/mk/pkgformat/README b/mk/pkgformat/README index 8de3f480767..23a39d2f411 100644 --- a/mk/pkgformat/README +++ b/mk/pkgformat/README @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.1 2011/10/15 00:23:09 reed Exp $ +$NetBSD: README,v 1.2 2014/12/30 15:13:19 wiz Exp $ = Introduction = @@ -38,7 +38,6 @@ ones are useful. Document them.) * PKG_CREATE * PKG_DELETE * PKG_INFO -* PKG_VIEW * LINKFARM * PKG_BEST_EXISTS diff --git a/mk/pkgformat/pkg/package.mk b/mk/pkgformat/pkg/package.mk index db379516b06..de92a7d268c 100644 --- a/mk/pkgformat/pkg/package.mk +++ b/mk/pkgformat/pkg/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.6 2014/12/07 05:09:02 obache Exp $ +# $NetBSD: package.mk,v 1.7 2014/12/30 15:13:20 wiz Exp $ .if defined(PKG_SUFX) WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION" @@ -68,9 +68,6 @@ _PKG_ARGS_PACKAGE+= -I ${PREFIX} -p ${DESTDIR}${PREFIX} _PKG_ARGS_PACKAGE+= -u ${REAL_ROOT_USER} -g ${REAL_ROOT_GROUP} . endif .endif -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_PKG_ARGS_PACKAGE+= -E -.endif ${STAGE_PKGFILE}: ${_CONTENTS_TARGETS} ${RUN} ${MKDIR} ${.TARGET:H} diff --git a/mk/pkgformat/pkg/pkgformat-vars.mk b/mk/pkgformat/pkg/pkgformat-vars.mk index c2ca46476c7..6a9284213e6 100644 --- a/mk/pkgformat/pkg/pkgformat-vars.mk +++ b/mk/pkgformat/pkg/pkgformat-vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: pkgformat-vars.mk,v 1.4 2014/12/08 02:43:25 agc Exp $ +# $NetBSD: pkgformat-vars.mk,v 1.5 2014/12/30 15:13:20 wiz Exp $ # # This Makefile fragment is included indirectly by bsd.prefs.mk and # defines some variables which must be defined earlier than where @@ -21,20 +21,14 @@ PKG_DBDIR?= /var/db/pkg # _PKG_DBDIR is the actual packages database directory where we register # packages. # -.if ${PKG_INSTALLATION_TYPE} == "overwrite" _PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} _HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} -.elif ${PKG_INSTALLATION_TYPE} == "pkgviews" -_PKG_DBDIR= ${_CROSS_DESTDIR}${DEPOTBASE} -_HOST_PKG_DBDIR= ${HOST_DEPOTBASE:U${DEPOTBASE}} -.endif PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info -PKG_VIEW_CMD?= ${PKG_TOOLS_BIN}/pkg_view LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm # Latest versions of tools required for correct pkgsrc operation. @@ -71,19 +65,11 @@ _AUDIT_CONFIG_OPTION= IGNORE_URL PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR} -# Views are rooted in ${LOCALBASE}, all packages are depoted in -# ${DEPOTBASE}, and the package database directory for the default view -# is in ${PKG_DBDIR}. -# -PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${_CROSS_DESTDIR}${PKG_DBDIR} -HOST_PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${PKG_DBDIR} - PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} -PKG_VIEW?= ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS} LINKFARM?= ${LINKFARM_CMD} HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS} @@ -91,7 +77,6 @@ HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS} HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS} HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS} HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS} -HOST_PKG_VIEW?= ${PKG_VIEW_CMD} ${HOST_PKG_VIEW_ARGS} HOST_LINKFARM?= ${LINKFARM_CMD} # "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed diff --git a/mk/pkgformat/pkg/pkgformat.mk b/mk/pkgformat/pkg/pkgformat.mk index 2652c3da044..5bf736fe4e4 100644 --- a/mk/pkgformat/pkg/pkgformat.mk +++ b/mk/pkgformat/pkg/pkgformat.mk @@ -1,4 +1,4 @@ -# $NetBSD: pkgformat.mk,v 1.1 2011/10/15 00:23:09 reed Exp $ +# $NetBSD: pkgformat.mk,v 1.2 2014/12/30 15:13:20 wiz Exp $ # # This Makefile fragment provides variable and target overrides that are # specific to the pkgsrc native package format. @@ -22,6 +22,5 @@ PKG_FILELIST_CMD= ${SED} -e "/^@/d" -e "s|^|${PREFIX}/|" ${_DEPENDS_PLIST} .include "deinstall.mk" .include "replace.mk" .include "package.mk" -.include "views.mk" .include "utility.mk" diff --git a/mk/pkgformat/pkg/views.mk b/mk/pkgformat/pkg/views.mk deleted file mode 100644 index db1929f8517..00000000000 --- a/mk/pkgformat/pkg/views.mk +++ /dev/null @@ -1,90 +0,0 @@ -# $NetBSD: views.mk,v 1.1 2011/10/15 00:23:09 reed Exp $ - -# By default, all packages attempt to link into the views. -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -BUILD_VIEWS?= yes -.endif - -# DEFAULT_VIEW.${PKGBASE} default view for ${PKGBASE} -# VIEWBASE base location of files at run-time -# -DEFAULT_VIEW.${PKGBASE}?= ${DEFAULT_VIEW} -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -. if empty(DEFAULT_VIEW.${PKGBASE}:M"") -VIEWBASE= ${LOCALBASE}/${DEFAULT_VIEW.${PKGBASE}} -. else -VIEWBASE= ${LOCALBASE} -. endif -.elif ${PKG_INSTALLATION_TYPE} == "overwrite" -VIEWBASE= ${PREFIX} -.endif -MAKE_ENV+= VIEWBASE=${VIEWBASE} - -PKGVIEWS+= ${DEFAULT_VIEW.${PKGBASE}} - -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -privileged-install-hook: build-views -.endif - -###################################################################### -### build-views, su-build-views (PRIVATE) -###################################################################### -### build-views adds the package to each view in PKGVIEWS. -### -.PHONY: build-views su-build-views -build-views: su-target - @${STEP_MSG} "Building views for ${PKGNAME}" - -su-build-views: - ${RUN} \ - ${MKDIR} ${LOCALBASE}; \ - for v in ${PKGVIEWS}; do \ - case "$$v" in \ - "") dbdir=${PKG_DBDIR}; viewname=standard ;; \ - *) dbdir=${LOCALBASE}/$$v/.dbdir; viewname=$$v ;; \ - esac; \ - ${STEP_MSG} "Performing package view clash check for ${PKGNAME} in $$viewname view"; \ - pkg=`${PKG_INFO_CMD} -K $$dbdir -e ${PKGBASE} || ${TRUE}`; \ - case "$$pkg" in \ - "") ;; \ - *) ${WARNING_MSG} "${PKGBASE} exists in $$viewname view - package $$pkg ***"; \ - ${WARNING_MSG} "Not hoisting ${PKGNAME} into $$viewname view"; \ - continue; \ - ;; \ - esac; \ - ${STEP_MSG} "Performing package view overwrite check for ${PKGNAME} in $$viewname view"; \ - dups=`${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v check ${PKGNAME} || ${TRUE}`; \ - case "$$dups" in \ - "") ;; \ - *) ${WARNING_MSG} "***********************************************************"; \ - ${WARNING_MSG} "**** The following symbolic links will be overwritten *****"; \ - for f in $$dups; do \ - ${LS} -l ${LOCALBASE}/$$v/$$f | ${WARNING_CAT}; \ - done; \ - ${WARNING_MSG} "***********************************************************"; \ - ;; \ - esac; \ - ${STEP_MSG} "Linking package into $$viewname view"; \ - ${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v add ${PKGNAME}; \ - done - -###################################################################### -### remove-views, su-remove-views (PRIVATE) -###################################################################### -### remove-views removes the package from each view in PKGVIEWS. -### -.PHONY: remove-views su-remove-views -remove-views: su-target - @${STEP_MSG} "Removing ${PKGNAME} from views" - -su-remove-views: - ${RUN} \ - for v in "" ${PKGVIEWS}; do \ - ${TEST} -n "$$v" || continue; \ - case "$$v" in \ - "") dbdir=${PKG_DBDIR}; viewname=standard ;; \ - *) dbdir=${LOCALBASE}/$$v/.dbdir; viewname=$$v ;; \ - esac; \ - ${STEP_MSG} "Removing package from $$viewname view"; \ - ${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v delete ${PKGNAME}; \ - done diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index 408f1d6abfc..4fc096c66bf 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.60 2014/10/12 23:44:32 joerg Exp $ +# $NetBSD: bsd.pkginstall.mk,v 1.61 2014/12/30 15:13:20 wiz Exp $ # # This Makefile fragment is included by bsd.pkg.mk and implements the # common INSTALL/DEINSTALL scripts framework. To use the pkginstall @@ -86,7 +86,6 @@ HEADER_TEMPLATES?= # empty empty(HEADER_TEMPLATES:M${PKGDIR}/HEADER) HEADER_TEMPLATES+= ${PKGDIR}/HEADER .endif -_DEINSTALL_PRE_TMPL?= ${.CURDIR}/../../mk/pkginstall/deinstall-pre DEINSTALL_TEMPLATES?= # empty .if exists(${PKGDIR}/DEINSTALL) && \ empty(DEINSTALL_TEMPLATES:M${PKGDIR}/DEINSTALL) @@ -100,7 +99,6 @@ INSTALL_TEMPLATES?= # empty empty(INSTALL_TEMPLATES:M${PKGDIR}/INSTALL) INSTALL_TEMPLATES+= ${PKGDIR}/INSTALL .endif -_INSTALL_POST_TMPL?= ${.CURDIR}/../../mk/pkginstall/install-post _INSTALL_DATA_TMPL?= # empty _FOOTER_TMPL?= ${.CURDIR}/../../mk/pkginstall/footer @@ -112,7 +110,6 @@ _FOOTER_TMPL?= ${.CURDIR}/../../mk/pkginstall/footer # template files minus any user-supplied templates. # _DEINSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \ - ${_DEINSTALL_PRE_TMPL} \ ${DEINSTALL_TEMPLATES} \ ${_DEINSTALL_TMPL} \ ${_FOOTER_TMPL} @@ -120,17 +117,14 @@ _INSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \ ${_INSTALL_UNPACK_TMPL} \ ${_INSTALL_TMPL} \ ${INSTALL_TEMPLATES} \ - ${_INSTALL_POST_TMPL} \ ${_FOOTER_TMPL} \ ${_INSTALL_DATA_TMPL} \ _DEINSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \ - ${_DEINSTALL_PRE_TMPL} \ ${_DEINSTALL_TMPL} \ ${_FOOTER_TMPL} _INSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \ ${_INSTALL_TMPL} \ - ${_INSTALL_POST_TMPL} \ ${_FOOTER_TMPL} # These are the list of source files that are concatenated to form the @@ -145,15 +139,12 @@ INSTALL_SRC?= ${_INSTALL_TEMPLATES} FILES_SUBST+= PREFIX=${PREFIX:Q} FILES_SUBST+= LOCALBASE=${LOCALBASE:Q} FILES_SUBST+= X11BASE=${X11BASE:Q} -FILES_SUBST+= DEPOTBASE=${DEPOTBASE:Q} FILES_SUBST+= VARBASE=${VARBASE:Q} FILES_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q} -FILES_SUBST+= PKG_SYSCONFDEPOTBASE=${PKG_SYSCONFDEPOTBASE:Q} FILES_SUBST+= PKG_SYSCONFBASEDIR=${PKG_SYSCONFBASEDIR:Q} FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q} FILES_SUBST+= CONF_DEPENDS=${CONF_DEPENDS:C/:.*//:Q} FILES_SUBST+= PKGBASE=${PKGBASE:Q} -FILES_SUBST+= PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE:Q} # PKG_USERS represents the users to create for the package. It is a # space-separated list of elements of the form diff --git a/mk/pkginstall/deinstall b/mk/pkginstall/deinstall index 28d7ef2e744..6fd7f05693f 100644 --- a/mk/pkginstall/deinstall +++ b/mk/pkginstall/deinstall @@ -1,22 +1,7 @@ -# $NetBSD: deinstall,v 1.2 2007/07/18 18:01:03 jlam Exp $ +# $NetBSD: deinstall,v 1.3 2014/12/30 15:13:20 wiz Exp $ case ${STAGE} in -VIEW-DEINSTALL) - case ${_PKG_CONFIG} in - yes) - case ${PKG_SYSCONFDEPOTBASE} in - "") - ${TEST} ! -x ./+FILES || - ./+FILES VIEW-REMOVE ${PREFIX} ${PKG_PREFIX} - ;; - *) - ${SETENV} PLIST_IGNORE_FILES="${CONF_IGNORE_FILES}" \ - ${LINKFARM} -D -t ${PKG_SYSCONFVIEWBASE} -d ${PKG_SYSCONFDEPOTBASE} ${PKGNAME} - ${RMDIR} -p ${PKG_SYSCONFVIEWBASE} 2>/dev/null || ${TRUE} - ;; - esac - ;; - esac +DEINSTALL) # # Unregister info files. # @@ -29,9 +14,7 @@ VIEW-DEINSTALL) ./+SHELL REMOVE ${PKG_METADATA_DIR} ${TEST} ! -x ./+SHELL || ./+SHELL CHECK-REMOVE ${PKG_METADATA_DIR} - ;; -DEINSTALL) # Remove configuration files if they don't differ from the default # config file. # @@ -40,13 +23,6 @@ DEINSTALL) ;; POST-DEINSTALL) - if [ "${PKG_INSTALLATION_TYPE}" = "pkgviews" -a \ - "${_PKG_CONFIG}" = "yes" -a -n "${CONF_DEPENDS}" ]; then - if [ -h ${PKG_SYSCONFDIR} ]; then - ${RM} -f ${PKG_SYSCONFDIR} - fi - ${RMDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}` 2>/dev/null || ${TRUE} - fi # # Update any fonts databases. # diff --git a/mk/pkginstall/deinstall-pre b/mk/pkginstall/deinstall-pre deleted file mode 100644 index 679374c7e13..00000000000 --- a/mk/pkginstall/deinstall-pre +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: deinstall-pre,v 1.1 2006/05/21 23:50:15 jlam Exp $ - -# Ensure that the VIEW-DEINSTALL action is called for overwrite packages. -# This is here to ensure that it's the first DEINSTALL action (before -# any DEINSTALL_TEMPLATE DEINSTALL actions). -# -case ${STAGE} in -DEINSTALL) - if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then - ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \ - $0 ${PKGNAME} VIEW-DEINSTALL - fi - ;; -esac - diff --git a/mk/pkginstall/files b/mk/pkginstall/files index 6761966e2db..edbb666f3c3 100644 --- a/mk/pkginstall/files +++ b/mk/pkginstall/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.8 2012/04/21 10:22:32 wiz Exp $ +# $NetBSD: files,v 1.9 2014/12/30 15:13:20 wiz Exp $ # # Generate a +FILES script that reference counts config files that are # required for the proper functioning of the package. @@ -11,7 +11,6 @@ UNPACK,|UNPACK,+FILES) # +FILES - reference-counted configuration file management script # # Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir] -# ./+FILES VIEW-REMOVE depotdir viewdir # ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir] # # This script supports two actions, ADD and REMOVE, that will add or @@ -22,8 +21,7 @@ UNPACK,|UNPACK,+FILES) # any files needed by the package still exist, and print an informative # message noting those files. The CHECK-ADD and CHECK-REMOVE actions # return non-zero if they detect either missing or existing files, -# respectively. The VIEW-REMOVE action will remove from <viewdir> the -# links to the configuration files in <depotdir>. The PERMS action +# respectively. The PERMS action # will correct any ownership or permission discrepancies between the # existing files and the data in this script, and the CHECK-PERMS # action will check whether any files have the wrong ownership or @@ -98,21 +96,12 @@ case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in ;; esac -case $ACTION in -VIEW-REMOVE) - DEPOTDIR="$2" - VIEWDIR="$3" - ${TEST} -n "${DEPOTDIR}" -a -n "${VIEWDIR}" || exit 0 - ;; -*) - CURDIR=`${PWD_CMD}` - PKG_METADATA_DIR="${2-${CURDIR}}" - : ${PKGNAME=${PKG_METADATA_DIR##*/}} - : ${PKG_DBDIR=${PKG_METADATA_DIR%/*}} - : ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount} - PKG_REFCOUNT_FILES_DBDIR="${PKG_REFCOUNT_DBDIR}/files" - ;; -esac +CURDIR=`${PWD_CMD}` +PKG_METADATA_DIR="${2-${CURDIR}}" +: ${PKGNAME=${PKG_METADATA_DIR##*/}} +: ${PKG_DBDIR=${PKG_METADATA_DIR%/*}} +: ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount} +PKG_REFCOUNT_FILES_DBDIR="${PKG_REFCOUNT_DBDIR}/files" exitcode=0 case $ACTION in @@ -254,22 +243,6 @@ PERMS) done ;; -VIEW-REMOVE) - ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -ru | - while read file f_flags f_eg f_mode f_user f_group; do - case $file in - ${DEPOTDIR}/*) link="${VIEWDIR}/${file#${DEPOTDIR}/}" ;; - [!/]*) link="${VIEWDIR}/$file" ;; - *) continue ;; - esac - dir="${link%[^/]*}" - if ${TEST} -h "$link"; then - ${RM} -f $link - ${RMDIR} -p $dir 2>/dev/null || ${TRUE} - fi - done - ;; - CHECK-ADD) ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -ru | { while read file f_flags f_eg f_mode f_user f_group; do @@ -431,7 +404,6 @@ CHECK-PERMS) *) ${ECHO} "Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir]" - ${ECHO} " ./+FILES VIEW-REMOVE depotdir viewdir" ${ECHO} " ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir]" ;; esac diff --git a/mk/pkginstall/header b/mk/pkginstall/header index 42bdc29f624..1a270cd0ea9 100644 --- a/mk/pkginstall/header +++ b/mk/pkginstall/header @@ -1,6 +1,6 @@ #!@SH@ # -# $NetBSD: header,v 1.2 2006/07/19 22:26:26 jlam Exp $ +# $NetBSD: header,v 1.3 2014/12/30 15:13:20 wiz Exp $ SELF="$0" PKGNAME="$1" @@ -54,28 +54,15 @@ PKGBASE="@PKGBASE@" LOCALBASE="@LOCALBASE@" X11BASE="@X11BASE@" -DEPOTBASE="@DEPOTBASE@" PREFIX="@PREFIX@" -case ${PKG_PREFIX} in -${LOCALBASE}/*) VIEW="${PKG_PREFIX#${LOCALBASE}/}" ;; -*) VIEW="" ;; -esac PKG_SYSCONFBASE="@PKG_SYSCONFBASE@" -PKG_SYSCONFDEPOTBASE="@PKG_SYSCONFDEPOTBASE@" PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@" PKG_SYSCONFDIR="@PKG_SYSCONFDIR@" CONF_DEPENDS="@CONF_DEPENDS@" -case ${VIEW} in -"") PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}" ;; -*) PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}/${VIEW}" ;; -esac - CONF_IGNORE_FILES="*[~#] *.OLD *.orig *,v .pkgsrc */.pkgsrc" -PKG_INSTALLATION_TYPE="@PKG_INSTALLATION_TYPE@" - case "${PKG_CONFIG:-@PKG_CONFIG@}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) _PKG_CONFIG=yes diff --git a/mk/pkginstall/install b/mk/pkginstall/install index 45c79319db4..598cec620c3 100644 --- a/mk/pkginstall/install +++ b/mk/pkginstall/install @@ -1,4 +1,4 @@ -# $NetBSD: install,v 1.2 2007/07/18 18:01:03 jlam Exp $ +# $NetBSD: install,v 1.3 2014/12/30 15:13:20 wiz Exp $ case ${STAGE} in PRE-INSTALL) @@ -17,23 +17,6 @@ PRE-INSTALL) else exit 1 fi; } - # - # Create package directories at pre-install time. - # - if [ "${PKG_INSTALLATION_TYPE}" = "pkgviews" -a \ - "${_PKG_CONFIG}" = "yes" -a -n "${CONF_DEPENDS}" ]; then - pkg=`${PKG_ADMIN} -b -d ${DEPOTBASE} -s "" lsbest "${CONF_DEPENDS}"` - sysconfdir=`${PKG_INFO} -B -K ${DEPOTBASE} $pkg | \ - ${AWK} '/^PKG_SYSCONFDIR=/ { \ - gsub("^PKG_SYSCONFDIR=[ ]*", ""); \ - print; \ - }' \ - ` - if [ -d $sysconfdir -a ! -d ${PKG_SYSCONFDIR} ]; then - ${MKDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}` - ${LN} -sf $sysconfdir ${PKG_SYSCONFDIR} - fi - fi ${TEST} ! -x ./+DIRS || ./+DIRS ADD ${PKG_METADATA_DIR} ${TEST} ! -x ./+DIRS || @@ -74,9 +57,7 @@ POST-INSTALL) ./+FILES CHECK-ADD ${PKG_METADATA_DIR} ${TEST} ! -x ./+FILES || ./+FILES CHECK-PERMS ${PKG_METADATA_DIR} - ;; -VIEW-INSTALL) # # Register shells in /etc/shells. # @@ -89,14 +70,6 @@ VIEW-INSTALL) # ${TEST} ! -x ./+INFO_FILES || ./+INFO_FILES ADD ${PKG_METADATA_DIR} - - # If ${PKG_SYSCONFBASE} points outside of ${PREFIX}, then add the - # package config files to the proper view. - # - if [ "${_PKG_CONFIG}" = "yes" -a -n "${PKG_SYSCONFDEPOTBASE}" ]; then - ${SETENV} PLIST_IGNORE_FILES="${CONF_IGNORE_FILES}" \ - ${LINKFARM} -t ${PKG_SYSCONFVIEWBASE} -d ${PKG_SYSCONFDEPOTBASE} ${PKGNAME} - fi ;; esac diff --git a/mk/pkginstall/install-post b/mk/pkginstall/install-post deleted file mode 100644 index 2e2ea84fd3a..00000000000 --- a/mk/pkginstall/install-post +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: install-post,v 1.1 2006/05/21 23:50:15 jlam Exp $ - -# Ensure that the VIEW-INSTALL action is called for overwrite packages. -# This is here to ensure that it's the final POST-INSTALL action (after -# any INSTALL_TEMPLATE POST-INSTALL actions). -# -case ${STAGE} in -POST-INSTALL) - if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then - ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \ - $0 ${PKGNAME} VIEW-INSTALL - fi - ;; -esac - diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk index 8310fc31a36..625343558c7 100644 --- a/mk/plist/plist.mk +++ b/mk/plist/plist.mk @@ -1,4 +1,4 @@ -# $NetBSD: plist.mk,v 1.47 2014/10/09 13:44:51 wiz Exp $ +# $NetBSD: plist.mk,v 1.48 2014/12/30 15:13:20 wiz Exp $ # # This Makefile fragment handles the creation of PLISTs for use by # pkg_create(8). @@ -50,9 +50,6 @@ PLIST_VARS?= # empty PLIST_AWK?= # empty PLIST_AWK_ENV?= # empty -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -PLIST_TYPE?= dynamic -.endif PLIST_TYPE?= static ###################################################################### @@ -227,22 +224,6 @@ GENERATE_PLIST?= ${ECHO} "@comment "${PKGNAME:Q}" has no files."; GENERATE_PLIST?= ${TRUE}; .endif -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -# -# _PLIST_IGNORE_FILES basically mirrors the list of ignored files found -# in pkg_views(1). It's used by the dynamic PLIST generator to skip -# adding the named files to the PLIST. -# -_PLIST_IGNORE_FILES+= +* # package metadata files -. if defined(INFO_FILES) -_PLIST_IGNORE_FILES+= ${PKGINFODIR}/dir -. endif -_PLIST_IGNORE_FILES+= *[~\#] *.OLD *.orig *,v # scratch config files -. if !empty(CONF_DEPENDS) -_PLIST_IGNORE_FILES+= ${PKG_SYSCONFDIR:S,^${PREFIX}/,,} -. endif -_PLIST_IGNORE_FILES+= ${PLIST_IGNORE_FILES} -.endif _BUILD_DEFS+= _PLIST_IGNORE_FILES .if ${PLIST_TYPE} == "dynamic" diff --git a/mk/wrapper/gen-transform.sh b/mk/wrapper/gen-transform.sh index a89892d4834..58eabd869af 100644 --- a/mk/wrapper/gen-transform.sh +++ b/mk/wrapper/gen-transform.sh @@ -1,6 +1,6 @@ #! @WRAPPER_SHELL@ # -# $NetBSD: gen-transform.sh,v 1.9 2014/09/02 14:23:00 jperkin Exp $ +# $NetBSD: gen-transform.sh,v 1.10 2014/12/30 15:13:20 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -72,16 +72,6 @@ gen() case $_cmd in ############################################################### - # depot:src:dst - # Change "src/<dir>/*" into "dst/*", and the same in -I and - # -L options. - ############################################################### - depot) - gen $_action "opt-depot:$1:$2" - gen $_action "opt-depot:-I$1:-I$2" - gen $_action "opt-depot:-L$1:-L$2" - ;; - ############################################################### # I:src:dst # Change "src" into "dst" and "src/*" into "dst/*" in -I # options for transform, and back for untransform. @@ -221,27 +211,6 @@ gen() ;; esac ;; - ############################################################### - # opt-depot:src:dst - # Change "src/<dir>/*" into "dst/*". - ############################################################### - opt-depot) - case $_action in - transform) - $debug_log $wrapperlog " (gen-transform) $_cmd: $@" - $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g" - $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g" - ;; - untransform) - $debug_log $wrapperlog " (gen-transform) $_cmd: $@" - $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g" - $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g" - $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*\)$|\1$2\2|g" - $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g" - $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g" - ;; - esac - ;; ############################################################## # opt-sub:src:dst # Change "src/*" into "dst/*". |