Commit graph

43 commits

Author SHA1 Message Date
schmonz
7a1c735319 Extract .zst distfiles using archivers/zstd. 2022-01-06 10:19:11 +00:00
ryoon
e8aa763230 mk: Introduce GITHUB_SUBMODULES to get and place Git submodules for GitHub 2021-03-30 16:47:03 +00:00
rillig
172f1091af mk/extract/extract.mk: enclose extract_file in quotes
This prevents unintended shell word expansion.

It also makes that argument visible in "bmake show-all-extract". Before,
it was left out entirely from the output. Now it is printed as an empty
string literal, which at least gives a hint that "there is something".
2020-03-20 15:00:45 +00:00
gdt
52d38b3cdb mk/extract: move EXTRACT_USING earlier
In an attempt to resolve problems on SunOS, move EXTRACT_USING to the
early variables file, in the hopes that it will be defined before code
that checks it is executed.
2020-03-14 00:14:35 +00:00
gdt
b9c8f5d661 extract.mk: Fix comment about nbtar
Maybe long ago nbtar was pkgsrc's pax-as-tar, but now this is just
${TOOL_PLATFORM.tar} which might be anything.
2020-03-12 16:55:31 +00:00
rillig
b88d952e81 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.
2019-05-07 19:36:43 +00:00
obache
c79cf317c3 Document EXTRACT_ENV 2014-03-02 09:45:42 +00:00
ryoon
65938ffe31 Replace whitespace with tab. 2012-10-06 22:16:08 +00:00
ryoon
b707c18585 Add 7z archive distfile support.
Fix PR pkg/42967
2012-10-01 10:45:16 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
tron
c2b518dacb Use "xzcat" instead of "lzcat" to handle ".lzma" files as the former is
bundled with NetBSD-current.
2010-12-22 09:33:30 +00:00
joerg
2daf2a4e60 Allow EXTRACT_DIR to be specified independently for each file.
OK wiz@
2010-10-15 20:22:27 +00:00
obache
171cda4aeb tools definition of bzcat may have option (ex. bzip2 -cd), allow it. 2010-02-07 08:00:51 +00:00
minskim
ce99bfa433 Uncompress .xz using xzcat. 2009-07-08 13:27:52 +00:00
minskim
9d21508d1a Decompress .lzma files with lzcat. 2008-11-15 20:25:34 +00:00
joerg
5ccc35b89b Document bsdtar value. From OKANO Takayoshi. 2008-05-26 13:39:08 +00:00
joerg
b2a1dcfb92 Add support to extract using bsdtar. 2008-05-25 20:02:02 +00:00
jlam
77ce6ccc01 Invent new variable EXTRACTOR that has the environment and path to the
extract script.  This can be used in a more natural way by custom
do-extract targets than EXTRACT_CMD.
2008-03-12 15:51:39 +00:00
jlam
f08acff9a0 Fix whitespace 2008-03-12 15:48:21 +00:00
rillig
800789264a Got rid of _PKG_SILENT. Why use __file__ when a simple f does the same? 2008-01-23 14:59:35 +00:00
joerg
08016fa1fa EXTRACT_USING is always set, even when the necessary tools are not
depended on because it is not used. Work around it for now by checking
that the target is actually non-empty explicitly. This is still simpler
than the original code. After the branch, this will be reordered so that
it only gets set to non-default values when it will be used.
2007-12-30 13:37:18 +00:00
joerg
780c8a1afe Fix EXTRACT_USING=gtar and simplify the other cases. TOOLS_GTAR was never
defined and therefore no argument was passed to the extract script.
This broke at least scmgit-docs on DragonFly.
2007-12-29 20:08:16 +00:00
rillig
9fab8079e7 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.
2007-12-01 11:11:53 +00:00
jlam
3629e30a61 Teach the extract module to extract RPMs with rpm2pkg. 2007-07-31 17:42:40 +00:00
rillig
c9990b973a Fixed the documentation. 2007-01-09 05:13:27 +00:00
joerg
412d5ea7c7 s,//,/, 2006-12-29 00:48:59 +00:00
rillig
39f8019a3e Forgot to provide the default value for EXTRACT_DIR.
EXTRACT_DIR may be given relative to WRKDIR.
2006-10-09 02:37:32 +00:00
rillig
22d4a3747a Added the EXTRACT_DIR variable, which can be used if the distfiles should
not be extracted into ${WRKDIR}.
2006-10-09 02:31:57 +00:00
jlam
6a569e5eb8 After auditing all the packages the ensure that they never invoke the
compiler toolchain until the configure stage, move the "wrapper" stage
back to between "patch" and "configure".

This makes "make extract NO_DEPENDS=" work again for all packages.
2006-07-27 13:47:29 +00:00
drochner
e3a30663ee add a missing PHONY 2006-07-26 18:29:46 +00:00
jlam
77b719dae8 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.
2006-07-22 16:31:35 +00:00
jlam
4011c5cff2 Rearrange sequence so that "wrapper" occurs between "tools" and
"extract".  This allows all user-definable targets (pre-*, do-*,
post-*) to have access to the wrapper scripts.
2006-07-21 14:21:28 +00:00
jlam
356f5e8af5 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.
2006-07-07 21:24:27 +00:00
jlam
a8fcae3925 The cookie files are indirectly made using *-cookie targets, so verify
that they are never being created more than once by inserting a check
into the *-cookie targets.
2006-07-06 22:29:52 +00:00
jlam
b8d23232b8 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".
2006-07-05 22:21:02 +00:00
jlam
990d0b5377 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.
2006-07-05 09:08:35 +00:00
jlam
8c10d39139 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.
2006-06-09 13:59:06 +00:00
jlam
2b9c2495b3 No need to synthesis the package directory from components when ${.CURDIR}
already has the right value.
2006-06-09 08:20:30 +00:00
jlam
b55dfcc740 Introduce "makedirs" as a helper target to create directories with
unprivileged ownership.
2006-06-08 16:21:51 +00:00
jlam
63ceb4b6f6 Fix the comment. 2006-06-08 15:45:52 +00:00
rillig
a4dea7213f EXTRACT_CMD_DEFAULT should not be set by the package; it may only be used. 2006-06-06 16:33:48 +00:00
jlam
cd1230e8e3 Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk.  This leaves bsd.tools.mk
as a file that pulls in all of the other ones.  Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.

The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools.  Instead, there is now only a single public target
"tools" which may be invoked.  Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.

The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted.  This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract".  As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 06:30:29 +00:00
jlam
c78510391e Refactor "fetch" and "extract" code into correspondingly named
subdirectories of pkgsrc/mk.  Move the following files around for
locality:

	pkgsrc/mk/scripts/extract  -> pkgsrc/mk/extract/extract
	pkgsrc/mk/bsd.sites.mk     -> pkgsrc/mk/fetch/sites.mk

Also get rid of the recursive make for the "fetch" and "extract"
targets.  This basically merges the "fetch" and "extract" phases into
the "patch" phase.

There is still much more work to do to simplify the fetch code, but
this is a good start.
2006-06-06 03:05:48 +00:00
Renamed from mk/bsd.pkg.extract.mk (Browse further)