Age | Commit message (Collapse) | Author |
|
* pkgimg-refactor:
Refactored pkgimg.sh
|
|
* pkgmk-refactor:
Refactored pkgmk.sh and libpkg
libport:Added port_download_src function
|
|
This changes the manifest format to somewhat match the Pkgfile format
(shell syntax, requiring name, version, release, and a depends array).
This enables better naming of the built packages.
Implemented support for soon-to-come pkgmk.sh script. Rather than
calling the library, we now call the same process that pkgmk uses,
enabling this script to be a bit more flexible as it not longer needs to
adhere to function signatures.
Added helptext switch.
Implemented support for external config files that provide additional
variables for ports at build time. This will enable more flexible
builds, which may have use when building the same package for different
custom environments.
|
|
libpkg: Removed pkg_download_src function. This one is superceeded by
the new port_download_src.
libpkg: Added pkg_setup_src. This function breaks out the src setup
process during the build process away from the source download process.
This will enable exclusively source downloads in the future, when the
switch is implemented for that.
Updated pkgmk.sh to use the new functions, with their new signatures.
NOTE: This commit changes behavior of pkgmk. It is now required that the
cwd to be the port's directory [that contains the Pkgfile] at runtime,
rather than attempting to intelligently figure out what the user meant
at runtime. If the cwd does not contain a Pkgfile, the build process is
aborted.
|
|
This function is to superceed the pkg_download_src function, as that one
is a bit of a misnomer. This one is also simpler and, per the name, it
now only performs one task: downloading source files. The superceeded
function pkg_download_src also handled extraction into the temporary
packaging location, which was an overstep.
|
|
|
|
Originally, the message printed just said what variable was referenced
that was not set. Now it prints which template file contains the unbound
variable.
|
|
|
|
When checking an unset variable with bash nounset, a default value must
be provided, otherwise an unbound variable error will result. This sets
the default value to empty for _varname when checking if empty.
|
|
|
|
Previously, pkgmk.sh was committed in an incomplete state. This adds
complete support for current project capabilities. Not pkgmk can read a
Pkgfile, build it in a working directory, and convert the built product
into a package file, saving the binary package to the port directory. It
also now cleans up after itself, provided the KEEP_BUILD variable is set
to 0.
|
|
|
|
The new libpkg pkgadd function performs the installation of a compiled
port. This also adds the pkgadd.sh [basic wrapper] script, which
provides easy access to the process.
|
|
|
|
The only functionality using this library previously was libtemplate.
Since it was recently refactored to no longer require libconfig, it is
now being removed, as its functionality is a bit overengineered for the
current project needs.
Also removed source statements from pkgmk.sh and pkgimg.sh.
|
|
|
|
The new version is no longer dependent on the overly-complex config
library. Now we make use of bash environment variables to do template
variable replacement.
Function has also been cleaned up a bit. All variables are now declared
and commented before they are initialized and used.
|
|
|
|
Now the manifest files have a shell syntax, which contains the following
required variables:
* name
* version
* release
* depends
These are loaded at runtime and are now used to name the port image
files (tarball, footprint, workspace, etc). This will allow easier
building of an image library, as the names are no longer randomly
generated, plus they are now versioned as well.
|
|
|
|
Prefixed most internal variables pertinent to the pkgmk function and
pkgimg main function with a '_' to indicate local scope.
Also changed the function signature of the pkgmk function to include a
variable reference which will return the package temporary working
directory path. This was returned using the PKGTMP variable, which was
global, and thus a bit dangerous. Not we use a local and its path is
returned in the referenced variable (arg 2)
Added manifest existence check.
|
|
|
|
Was printing a function call trace. This wasn't very useful though when
the log aliases were called, so this removes it.
|
|
|
|
Previously sources were downloaded every run, even if they already
existed. Now we skip them if they already exist in the port's directory.
|
|
Was calling using the old function signature. Updated the call.
Also renamed the Pkgfile source array from 'src' to 'source', which is
the more common name for that array elsewhere.
|
|
|
|
|
|
|
|
|
|
|
|
Was downloading to the temp directory, but this was temporary and
required re-downloading of the resources on every build. Now we download
the package sources into the packages port directory, which is
[probably] perisistent. These sources are then copied to the temporary
build location.
|
|
This adds libcommon, which contains the footprint_dir function. Also
added calls to it in pkgimg.sh. Added more user messages to indicate the
build destination path, footprint path, and compressed tarball/package
path.
|
|
This will make debugging problems a lot easier, and the problems much
more obvious.
|
|
This new flag will prevent the port build cleanup process. This is
useful for package devs to check the contents of the source path, pkg
build destination, make manual changes to test things, etc.
KEEP_BUILD defaults to 0 (don't keep builds). Just export to 1 (or
anything but 0 really) and individual port builds will persist.
|
|
When a relative PORTSDIR path was used, all ports after the first would
fail because the relative path was wrong after the first build. This
changes the specified path to absolute, which ensures subsequent builds
do not fail for this reason.
|
|
Includes the GPLv3 license and headers.
This version builds a basic composite port filesystem overlay from the
specified manifest list. It also provides a very basic file templating
system using a pseudo jinja syntax for variables (no conditional support
yet). There is also a basic logging library included that outputs
standardized log output indirectoy to stdout (to prevent mucking with
function return vals).
|