The NetBSD Project

CVS log for pkgsrc/mk/install/install.mk

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / mk / install

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Jan 28 16:02:00 2025 UTC (21 months, 2 weeks ago) by riastradh
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3, pkgsrc-2026Q2-base, pkgsrc-2026Q2, pkgsrc-2026Q1-base, pkgsrc-2026Q1, pkgsrc-2025Q4-base, pkgsrc-2025Q4, pkgsrc-2025Q3-base, pkgsrc-2025Q3, pkgsrc-2025Q2-base, pkgsrc-2025Q2, pkgsrc-2025Q1-base, pkgsrc-2025Q1, HEAD
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +30 -1 lines
mk/install: New install-env target.

Works like configure-env, build-env, and test-env.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Fri Oct 11 12:39:30 2024 UTC (2 years, 1 month ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2024Q4-base, pkgsrc-2024Q4
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +22 -1 lines
mk: Add mktool support to install-ctf.

mktool is an optional external tool, available from pkgtools/mktool or
"cargo install mktool", that provides significant performance improvements
compared to the default install-ctf target, while being 100% compatible.

After installing, set TOOLS_PLATFORM.mktool=/path/to/mktool to enable it.

mktool allows ctfconvert processes to run in parallel, significantly
reducing build time, especially in packages that ship lots of large
binaries.  During testing, enabling mktool reduced the install-ctf time
in emulators/qemu on a SmartOS host from 40m 39s to 5m 13s.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Oct 4 11:39:59 2023 UTC (3 years, 1 month ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -2 lines
mk: Skip rust .rlib archives for debug stripping.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Wed Sep 20 13:45:42 2023 UTC (3 years, 1 month ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +5 -4 lines
mk: Add a few more common _DEBUG_SKIP_PATTERNS.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Wed Nov 23 11:26:51 2022 UTC (3 years, 11 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +28 -22 lines
mk: install performance improvements.

Inline ${RUN} calls where appropriate.  Only call mkdir and rm when
necessary.  Remove useless use of cat(1).

Saves at least 12 execs per build, but often a lot more depending on the
number of files that were not stripped or had CTF conversion applied.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Nov 3 08:29:32 2022 UTC (4 years ago) by jperkin
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +15 -1 lines
mk: Skip many more CTF and debug files by default.

Leave CTF_FILES_SKIP and STRIP_FILES_SKIP purely for packages to set any
additional paths to skip.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Jul 6 18:53:58 2022 UTC (4 years, 4 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +8 -7 lines
mk/install: fix indentation and alignment, no functional change

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Aug 14 08:38:01 2021 UTC (5 years, 3 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +5 -5 lines
mk/install: fix documentation and speed up install-dirs-from-PLIST

The documentation did not mention that conditional entries in PLIST
files are skipped.  Pkglint doesn't know this either and issues wrong
notes that some directories are redundant in INSTALLATION_DIRS when in
reality they need to be listed there.

While here, filter out some duplicate directories.  This invokes the
command for creating a single directory less often.  Since PLIST files
are usually sorted, files in the same directory tend to be listed near
each other.

The fallback to the plain 'uniq' is needed for SCO_SV, which does not
define TOOLS_PLATFORM.uniq.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Jul 8 12:37:13 2020 UTC (6 years, 4 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -2 lines
mk: Skip unnecessary dirs for CTF/debug conversion.

There won't (or at least should never!) be any files under share/ or man/ that
require conversion for CTF or debug support, so set sensible defaults for both
CTF_FILES_SKIP and STRIP_FILES_SKIP.  Further additions are welcome.

While here rearrange the ordering of the debug skips to match CTF and deliver
a small performance improvement by avoiding unnecessary file tests.

Combined, these reduce the runtime for "make install-ctf install-strip-debug"
in lang/rust down from wall/user/sys 10m33s/2m34s/9m30s to 1m13s/0m46s/1m4s.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Sep 6 09:00:35 2019 UTC (7 years, 2 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -2 lines
mk: Skip CTF_FILES_SKIP before anything else.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon Sep 2 02:23:03 2019 UTC (7 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3 lines
mk: use a single form for headings in the documentation comments

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue May 7 19:36:44 2019 UTC (7 years, 6 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
mk: allow "bmake clean depends" as shortcut

When "bmake clean depends" was called for a package where the various
cookie files already existed, these would enable different rules than a
clean package directory.

Since "bmake clean" deletes all the cookie files before "bmake depends"
starts, in these combined command lines the cookie files must be treated
as absent.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Nov 12 14:22:58 2018 UTC (8 years ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +28 -1 lines
mk: Add CTF infrastructure support.

Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the
user enables support by setting PKGSRC_USE_CTF=yes, and packages can
explicitly disable support with CTF_SUPPORTED=no or skip certain files with
CTF_FILES_SKIP.

The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert.

If all of the requisite variables are enabled, a compiler-specific debug flag
is passed via the wrappers to ensure we have DWARF information to convert,
_INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped
prior to conversion, and the conversion is performed during the install stage.

It is recommended that users who enable the feature also set STRIP_DEBUG=yes
to reduce the final binary size once the conversion has been performed.

This has been used for the past year in Joyent SmartOS builds.  FreeBSD is
marked as supported but is untested.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon Nov 12 13:47:32 2018 UTC (8 years ago) by jperkin
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +9 -2 lines
mk/install: Add support for STRIP_DEBUG_SUPPORTED.

This is a package-settable variable that will disable stripping binaries if
set to anything other than "yes" (the default).  This helps packages such as
anything built using golang where stripping binaries is harmful to them.

Document this and the recently introduced STRIP_FILES_SKIP.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon Nov 12 13:42:16 2018 UTC (8 years ago) by jperkin
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +15 -11 lines
mk/install: Improve the strip-debug target.

Use the new strip-dbg tool, ensuring that we don't fail when the native strip
doesn't support -g.  Actually check for the existence of the output file
before trying to move it into place.  Add support for STRIP_FILES_SKIP for
certain files which should not be stripped.  And finally, improve performance
slightly by skipping symlinks.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Aug 8 17:17:25 2017 UTC (9 years, 3 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +12 -8 lines
Check, don't assert, that INSTALLATION_DIRS are all in ${PREFIX}.

Change the assertion into an install-time check that the paths
listed in INSTALLATION_DIRS are relative paths or are in ${PREFIX}.
This delays the check so that some common variables used when
listing directories in INSTALLATION_DIRS are fully-expanded.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Aug 7 15:49:44 2017 UTC (9 years, 3 months ago) by jlam
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +22 -11 lines
Assert INSTALLATION_DIRS begin with ${PREFIX} or are relative.

Add an assertion that all paths listed in INSTALLATION_DIRS must
either begin with ${PREFIX}/ or are relative paths.  Clarify in the
documentation that INSTALLATION_DIRS can list either type of path.

Some packages are using INSTALLATION_DIRS to create directory trees
outside of ${PREFIX}, e.g., under ${PKG_SYSCONFBASE} or ${VARBASE}.
However, these directories are only created as part of the
"install" target, which causes them to only be created during the
staged installation into ${DESTDIR} and not at all if their binary
packages are installed.  These packages should be fixed to use
MAKE_DIRS or OWN_DIRS to create these directory trees at the proper
time.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:15:10 2017 UTC (9 years, 5 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -1 lines
Provide switch to activate new frameworks to replace "pkginstall".

If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks",
"init", and "pkgformat/pkg"-scripts frameworks instead of the
existing "pkginstall" framework.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Jul 26 08:41:36 2016 UTC (10 years, 3 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -2 lines
Support NetBSD man/html entries.  Fixes deforaos-*.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Apr 10 15:58:02 2016 UTC (10 years, 7 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -30 lines
Remove support for USE_DESTDIR=no.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Mon Oct 12 09:08:22 2015 UTC (11 years, 1 month ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2 lines
Support compressed manual pages with 3am and 3f suffixes.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Jan 5 07:32:49 2013 UTC (13 years, 10 months ago) by sbd
Branches: MAIN
CVS tags: pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -1 lines
Modify mk/plist/plist-gnu.mk to convert gnu/man to ${PKGGNUDIR}${PKGMANDIR}.
Also modify mk/install/install.mk to make the conversion when using
AUTO_MKDIRS.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Dec 6 11:36:31 2012 UTC (13 years, 11 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2012Q4-base, pkgsrc-2012Q4
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +6 -4 lines
Introduce PKGGNUDIR as a way to control gnu prefix.

By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install
native versions of GNU tools, which are them symbolically linked back to
the 'g' versions of the files in LOCALBASE, and users can then add
LOCALBASE/gnu/bin to PATH to pick up those tools.

On systems where the GNU environment is desired, PKGGNUDIR now allows
users to install the non-'g' files directly into LOCALBASE, making them
the default without having to alter PATH, whilst retaining the 'g' files
in order to ensure dependencies and tool paths remain the same.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Jul 28 21:33:48 2012 UTC (14 years, 3 months ago) by reed
Branches: MAIN
CVS tags: pkgsrc-2012Q3-base, pkgsrc-2012Q3
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -2 lines
fix typo in comment

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Oct 15 00:23:09 2011 UTC (15 years, 1 month ago) by reed
Branches: MAIN
CVS tags: pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -6 lines
Rename "flavor" to "pkgformat".

This is from Anton Panev's GSoC 2011 project to add RPM and DPKG
support to pkgsrc. (I am not adding that further support in this
commit.)

This is just a rename of the existing functionality. Now it will
be easy to test the GSoC work by simply putting in a single
directory (such as "rpm" or "deb"). See
http://addpackageforma.sourceforge.net/ for some details.

This is from Anton's CVS, but I made some minor changes:

- changed plural pkgformats to singular pkgformat (to be consistent)

- fixed a few places (in comments) that were missed

- catch up on some additions to flavor not in the pkgforma cvs:
PKGSRC_SETENV and _flavor-destdir-undo-replace and
undo-destdir-replace-install.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Sep 8 20:17:16 2011 UTC (15 years, 2 months ago) by abs
Branches: MAIN
CVS tags: pkgsrc-2011Q3-base, pkgsrc-2011Q3
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment

Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Mar 21 08:55:12 2011 UTC (15 years, 8 months ago) by obache
Branches: MAIN
CVS tags: pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
remove quote from "DESTDIR".

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Mar 21 04:52:18 2011 UTC (15 years, 8 months ago) by obache
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +9 -4 lines
Introduce DESTDIR_VARNAME package-settable variable.
	A variable name that should be set as staged installation location
	presented as ${DESTDIR} at installation phase.
	"DESTDIR" is set by default.

for packages using different variable for staged installation prefix,
and/or using DESTDIR variable for different purpose.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu Feb 25 01:03:44 2010 UTC (16 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
Rename internal package-clean target to package-eat-cookie.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Feb 24 22:53:34 2010 UTC (16 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +9 -9 lines
Rename the install phase to stage-install. Introduce a new install
target that defaults to either stage-install or package-install,
depending on whether DESTDIR support is active and supported by the
package or not.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Oct 6 13:34:53 2009 UTC (17 years, 1 month ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -4 lines
Use the correct variable names.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun Sep 20 10:44:33 2009 UTC (17 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -2 lines
Fix syntax. Mea culpra

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Sep 18 10:11:48 2009 UTC (17 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +10 -2 lines
Deal with strip idiosyncracies:
- sometimes creates the temporary file, but fails
- sometimes it is successful, but still keeps the temporary file
- sometimes it crashes when called with more than one argument
Bite the bullet and call it individually with explicit output file
and clean up after it.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Sep 2 22:05:42 2009 UTC (17 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -4 lines
Use filtered plist for install-strip-debug and install-man-handling,
simplifying the latter.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Sep 2 14:40:41 2009 UTC (17 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +22 -1 lines
Add STRIP_DEBUG option, which removes debug information from all files,
leaving basic symbol tables intact. Document that INSTALL_UNSTRIPPED
doesn't work for all packages.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Nov 18 22:03:56 2008 UTC (18 years ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +10 -1 lines
Documented INSTALL_UNSTRIPPED.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Jun 11 07:30:33 2008 UTC (18 years, 5 months ago) by obache
Branches: MAIN
CVS tags: pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, cwrapper, cube-native-xorg-base, cube-native-xorg
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -1 lines
Honor PKGLOCALEDIR for AUTO_MKDIRS.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Dec 10 22:49:19 2007 UTC (18 years, 11 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -1 lines
Added compatibility code for INSTALLATION_DIRS_FROM_PLIST. I had
intended that all the time, but didn't test enough. :(

Thanks to wiz for catching this one.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Dec 7 05:25:25 2007 UTC (18 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -1 lines
Added AUTO_MKDIRS as an alias for INSTALLATION_DIRS_FROM_PLIST. The
variable is much more comfortable than specifying all the directories in
INSTALLATION_DIRS that using such a long name for it feels like a
punishment. It also doesn't look nice in the package Makefiles, for
example:

old:
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8

new:
AUTO_MKDIRS=		yes

The variable INSTALLATION_DIRS_FROM_PLIST will be deprecated slowly.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Dec 1 11:11:56 2007 UTC (18 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +1 -2 lines
Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Sep 13 09:44:58 2007 UTC (19 years, 2 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2007Q3-base, pkgsrc-2007Q3
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +16 -2 lines
It has always annoyed be that package authors had to write ${PKGMANDIR}/
in the definition of INSTALLATION_DIRS, where a short man/ would be much
shorter. Since we already have that man-transforming magic in some other
places of pkgsrc, it's also here.

While here, documented INSTALLATION_DIRS and
INSTALLATION_DIRS_FROM_PLIST so they are found by "bmake help".

Revision 1.46: download - view: text, markup, annotated - select for diffs
Tue Aug 14 23:59:25 2007 UTC (19 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -10 lines
Remove bootstrap-register, bootstrap was changed a while ago to use
normal building and installation.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Tue Aug 14 23:58:24 2007 UTC (19 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -2 lines
Fix a number of bugs in the DESTDIR support:
- check-perms.mk was not DESTDIR aware, prefix files before passing it
  to the directory extraction
- PKG_FILELIST_CMD was calling pkg_info, which is fine for normal
  installation, but fails of course for DESTDIR. Just drop the @ lines
  from ${_DEPENDS_PLIST} and use that.
- To make he former work, ensure that _flavor-generate-metadata is part
  of _INSTALL_ALL_TARGETS. It was normally a dependency of
  _flavor-register, but that is skipped for DESTDIR.
- Remove ${_DEPENDS_PLIST} when running install-clean.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Aug 10 04:00:43 2007 UTC (19 years, 3 months ago) by jlam
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
Remove ${WRKDIR}/.pkgdb during "install-clean" as that directory
contains files that are generated during the "install" phase.  This
should fix the problem where PLIST modifications were ignored if the
PLIST was modified between a "make deinstall" and a "make reinstall".

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jul 2 14:54:10 2007 UTC (19 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -10 lines
Remove USE_MTREE support. Keep one copy (the NetBSD version) for
the purpose of print-PLIST in plist/common-dirs.mtree.

Discussed with wiz@, no objections on tech-pkg@.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Apr 19 18:16:36 2007 UTC (19 years, 7 months ago) by xtraeme
Branches: MAIN
CVS tags: pkgsrc-2007Q2-base, pkgsrc-2007Q2
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -2 lines
Check if INSTALLATION_DIRS_FROM_PLIST is defined before using .if
!empty...

Reported by Mihai Chelaru.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Apr 19 16:52:03 2007 UTC (19 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -2 lines
Drop NO_MTREE by making it the default. Introduce USE_MTREE to get the
old behaviour back. Discussed on tech-pkg@.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Mar 9 03:28:58 2007 UTC (19 years, 8 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2007Q1-base, pkgsrc-2007Q1, jlam-pkgviews-base, jlam-pkgviews
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +9 -9 lines
Fixed pkglint warnings.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Mar 9 03:05:38 2007 UTC (19 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +9 -6 lines
Replaced the remaining PKG_SILENT/PKG_DEBUG pairs with RUN.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Mar 9 02:51:45 2007 UTC (19 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +32 -33 lines
Fixed the quoting in INSTALLATION_DIRS and install-dirs-from-PLIST.

In install-dirs-from-PLIST, all directories that don't contain an '@' or
'$' character are automatically installed.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Mar 9 00:45:54 2007 UTC (19 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -2 lines
Added MAKEFLAGS to the RECURSIVE_MAKE call. Almost all other calls
already have it.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Mar 9 00:39:55 2007 UTC (19 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -42 lines
Renamed some more flavor-specific targets to have the form _flavor-*.

Split check-vulnerable into a general an a flavor-specific part, for
consistence with all the other targets.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Mar 2 09:08:33 2007 UTC (19 years, 8 months ago) by wiz
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +5 -5 lines
Make MTREE_FILE and MTREE_ARGS internal by prefixing them with '_'.
They are not supposed to be set by the user.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Mar 2 08:49:40 2007 UTC (19 years, 8 months ago) by wiz
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Desupport unused FORCE_PKG_REGISTER.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Mar 2 05:54:18 2007 UTC (19 years, 8 months ago) by wiz
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -3 lines
Remove support for obsolete and unused NO_PKG_REGISTER.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Jan 6 20:15:26 2007 UTC (19 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -5 lines
Moved the code that installs check-files on the hook from install.mk to
check-files.mk, for two reasons:

1. It belongs there.
2. Now check-files is run before check-perms and check-interpreter.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Nov 12 00:51:00 2006 UTC (20 years ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -7 lines
Removed the tests for CHECK_INTERPRETER and CHECK_PERMS. They are now in
../checks/*.mk.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Nov 12 00:13:26 2006 UTC (20 years ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -4 lines
Moved the check for whether check-wrkref should be run from
install/install.mk to check/check-wrkref.mk.

Renamed the check-wrkref target to _check-wrkref.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Nov 11 23:51:30 2006 UTC (20 years ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +23 -19 lines
Added some documentation.

Since hooks should not be overwritten, removed the !target() check. That
way, one gets a warning when attempting to add some code to the hook.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Nov 11 23:31:38 2006 UTC (20 years ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +1 -4 lines
Moved the check whether check-shlibs should be run from
install/install.mk to check/check-shlibs.mk.

Renamed check-shlibs to _check-shlibs. Since it had been declared as
"private" before, this will not break anything.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Nov 7 18:16:19 2006 UTC (20 years ago) by joerg
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2 lines
Just make the PREFIX with INSTALL_DATA_DIR. Drop the conditional and
don't use mkdir, as the latter uses the group permissions of the
parent directory under BSDs, resulting in group leaks for
USE_DESTDIR=yes. Discussed with agc@.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Nov 4 07:42:51 2006 UTC (20 years ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +31 -1 lines
When a package sets INSTALLATION_DIRS_FROM_PLIST to "yes", it does not
need to specify INSTALLATION_DIRS itself. Instead, the list is generated
from the static PLIST files. Like for INSTALLATION_DIRS, mtree is
disabled when this variable is set.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Nov 3 15:48:48 2006 UTC (20 years ago) by joerg
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -3 lines
Fix thinko: INSTALLATION_DIRS entries don't have ${DESTDIR} as prefix,
just ${PREFIX}.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Oct 26 20:05:03 2006 UTC (20 years ago) by rillig
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Change INSTALL_MAKE_FLAGS to be _appended_ to MAKE_FLAGS when running
"make install". That way, packages don't have to say:

    INSTALL_MAKE_FLAGS+=    ${MAKE_FLAGS} foo=bar,

instead it suffices to say

    INSTALL_MAKE_FLAGS+=    foo=bar,

which is also more appropriate since multiple files (Makefile,
Makefile.common, options.mk, *.mk) don't need to care about whether
INSTALL_MAKE_FLAGS already includes MAKE_FLAGS or not.

Note: It is no longer possible to override MAKE_FLAGS completely. But
except for some exotic platforms, the default value is empty anyway.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Oct 13 06:32:15 2006 UTC (20 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -1 lines
Added a new post-installation check to see whether the files have their
permissions properly set. See mk/check/check-perms.mk and
sysutils/checkperms for details.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Oct 9 12:25:44 2006 UTC (20 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +26 -13 lines
Main infrastructure for DESTDIR support.

Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or
"user-destdir" to flag support for this, following the same
rules as PKG_INSTALLATION_TYPES (e.g. define before first include
of bsd.prefs.mk).

The user activates it via USE_DESTDIR. When set to "yes",
packages with "user-destdir" are handled as "destdir".
The installation of the package will not go to ${LOCALBASE},
but a subdirectory of ${WRKDIR} instead. pre/post install scripts are
not run and the package is not registered either. A binary package
can be created instead to be installed normally with pkg_add.

For "user-destdir" packages, everything is run as normal user and
ownership is supposed to be correctled by pkg_create later. Since
the current pkg_install code uses pax and it doesn't allow overwriting
owners, this does not work yet.

For "destdir" packages, installation, packaging and cleaning is run as
root.

This commit does not change the handling of DEPENDS_TARGET or
bin-install to allow recursive usage.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Oct 9 11:59:08 2006 UTC (20 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -1 lines
Add variable to control whether the install target is run as root.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Oct 6 20:13:10 2006 UTC (20 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -1 lines
Added more error checking: If a directory is specified in
INSTALLATION_DIRS but a regular file of the same name already exists,
the BSD install(1) program doesn't care but exits successfully.

To avoid much more confusing error messages, this is checked here, and a
_good_ error message is printed.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Oct 5 01:10:59 2006 UTC (20 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Both, the pkgsrc user and the package maintainer must agree that this
package should run the CHECK_FILES test. Otherwise we cannot prevent the
broken shells/standalone-tcsh from scanning the whole filesystem. (hi
agc!)

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:35:13 2006 UTC (20 years, 2 months ago) by obache
Branches: MAIN
CVS tags: pkgsrc-2006Q3-base, pkgsrc-2006Q3
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
Rename variable MAKEFILE to MAKE_FILE, as suggested in PR 28392.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Aug 9 15:25:49 2006 UTC (20 years, 3 months ago) by jlam
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +9 -3 lines
Only acquire the localbase lock after acquiring root privileges.  This
fixes "make install" using just-in-time su-to-root.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Aug 4 20:52:27 2006 UTC (20 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -3 lines
Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.

Added two targets acquire-localbase-lock and release-localbase-lock,
which mark the complete LOCALBASE directory as locked, so that multiple
packages cannot run the install, deinstall or bin-install targets at the
same time.

The install target aquires locks in both WRKSRC and LOCALBASE, the other
two targets only need the LOCALBASE lock, since they may be run without
WRKSRC being present on the system.

locking.mk must be included before tools.mk and the PKG_FAIL_REASON
check.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Jul 27 21:46:46 2006 UTC (20 years, 3 months ago) by jlam
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Whenever we invoke a recursive make, we need to ensure that the proper
environment ${PKGSRC_MAKE_ENV} is also passed along.  Create a
convenience variable RECURSIVE_MAKE that does exactly this and that
can be used in place of MAKE when invoking make recursively.

Use RECURSIVE_MAKE everywhere in pkgsrc/mk that we invoke make
recursively.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Jul 22 16:31:35 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Modify the barrier so that we always invoke the recursive make process
when passing through the barrier.  This ensures the PATH (passed via
PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier.

This fixes a bug in "interactive" pkgsrc use, where if you have no
work directory and type "make build && make install", then the "install"
step does not have a PATH set to include all the wrapper and tools
directories.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Jul 20 14:17:48 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
The package directory path is "PKGPATH", not "PKG_PATH", which is used
by pkg_add(1).

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Jul 14 17:37:03 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +10 -1 lines
Add a "bootstrap-register" target used specially by the bootstrap script
to register packages that were installed by the bootstrap script.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jul 7 21:24:28 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +10 -10 lines
Rename <phase>_COOKIE variables to _COOKIE.<phase>.  These are private
variables so there are no user-visible changes.  This change just makes
it a little easier to write for loops.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jul 5 22:21:02 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +15 -10 lines
Flatten out recursive makes into a single re-invocation of make by
introducing the concept of a "barrier".  We separate the user-invokable
targets into ones that must happen before the barrier, and ones that
must happen after the barrier.  The ones that happen after the barrier
are run in a sub-make process.  In this case, the targets that must
be run after the barrier are from the "wrapper" step and beyond.  We
rewrite the various "flow" targets, e.g. wrapper, configure, build,
etc., so that they of the right form to use the barrier target.

This now completely removes the concept of PKG_PHASE from pkgsrc.  It
is replaced with the concept of "before" and "after" the barrier, and
this state can be checked by testing for the existence of the barrier
cookie file.  Because we've removed most of the recursive makes, there
is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove
them for now.

As part of this commit, put back the logic that conditionalized the
sources for the various cookie files.  Because the sources are all
"phony" targets, they were always run, regardless of whether or not
the cookie file already existed.  Now, if a cookie file exists, then
that entire phase associated with that cookie file is skipped.

Lastly, fix a thinko in configure/bsd.configure.mk where setting
NO_CONFIGURE in a package Makefile would manage to skip the "wrapper"
step altogether.  Fix this by correctly noting "wrapper" and not
"patch" as the preceding step to "configure".

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jul 5 09:08:35 2006 UTC (20 years, 4 months ago) by jlam
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -6 lines
Make the check-vulnerable target more self-sufficient, by moving some
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that
check-vulnerable can be used as a source target.

Make check-vulnerable a source target for every phase of the build
workflow, which ensures that it is always run if the user starts a
new phase from the command line.

Fix the cookie-generation targets so that they don't append, only
overwrite to the cookie file.  This works around potential problems
due to recursive makes.

Move the cookie checks so that they surround the corresponding phase
target.  The presence of the cookie should now inform the make process
to avoid doing any processing of phases that occur before the phase
corresponding to the cookie.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jun 14 07:51:47 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2006Q2-base, pkgsrc-2006Q2
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -1 lines
Insert cookie checks into the "real-install" and "real-package" targets,
which are invoked in recursive make calls for the "install" and
"package" targets respectvely.  These recursive make calls prevent
the top-level make from seeing all of the targets and computing a full
dependency graph, so it becomes possible for some targets to be invoked
more than once.  This change passes enough information along to the
recursive make calls and ensures that the source targets for the real-*
targets are only invoked once.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Jun 10 03:23:46 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
Restore missing ${SETENV} ${BUILD_ENV} that was dropped during the initial
package system flavors commit.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jun 9 13:59:08 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
Introduce the capability to gather all the warnings and errors that
are generated for a target and output them all at once at the conclusion
of the target's invocation.  The implementation is in bsd.pkg.error.mk,
which defines a macro target "error-check" that will print out any
non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR}
and exit appropriately if there were errors.

Convert some targets that were just long sequences of ${ERROR_MSG} or
${WARNING_MSG} within a single shell statement to use the new delayed
error output via error-check.

Modify the compiler "fail" wrappers for C++ and Fortran to be less
verbose during invocation.  Instead collect the warnings and only
print them at the end of the completed phase, e.g. after "configure"
and/or "build" completes.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jun 8 15:47:10 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +23 -8 lines
If the install cookie file exists, then we don't need to do anything.
Also, move the interactive check into a separate target as a prelude
to removing the recursive make for invoking "real-install".

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jun 7 10:04:04 2006 UTC (20 years, 5 months ago) by tron
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -6 lines
1.) Remove all instances of '@${WARNING_MSG} "Warning: ...' which resulted
    in error message like 'WARNING: Warning: ...'.
2.) Replace "WARN_MSG" with "WARNING_MSG" which makes the "make package"
    target work again for restricted packages like "acroread7".

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jun 5 22:49:44 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +13 -13 lines
Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG
in various places.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jun 5 17:41:11 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
Allow overrides of the public targets, e.g. "install", "package", etc.
if PKG_SKIP_REASON or PKG_FAIL_REASON is defined.  This commit adds
!target(...) guards around those target definitions to avoid "duplicate
target definition" warnings.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jun 3 23:11:42 2006 UTC (20 years, 5 months ago) by jlam
Branches: MAIN
First pass at implementing support for package system flavors other
than pkgsrc's current one.  This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices.  This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.

The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc.  modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}.  The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work.  The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support.  Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor.  I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.

There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls.  I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.

The "depends" module is a complete overhaul of the way that we handle
dependencies.  There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed.  This
differs from the old way where dependencies were installed just before
extraction occurred.  The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies.  It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.

Future work on this project include:

    * Resolve the workflow design in anticipation of future work on
      staged installations where "package" conceptually happens before
      "install".

    * Rewrite the buildlink3 framework to not assume the use of the
      pkgsrc pkg_* tools.

    * Rewrite the pkginstall framework to provide a standard pkg_*
      tool to perform the actions, and allowing a purely declarative
      file per package to describe what actions need to be taken at
      install or deinstall time.

    * Implement support for the SVR4 package flavor.  This will be
      proof that the appropriate abstractions are in place to allow
      using a completely different set of package management tools.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>