Changes since 5.0:
* Fixed --autofix mode (it hadn't been enabled before)
* The --autofix mode now advertises itself when it can do something
* The --autofix mode now adds missing empty lines to patch files
(only in the leading text section, not in the actual patch content)
* Made --autofix code simpler ({prepend,append}{Before,After} was not
really needed)
* Fixed unit tests to report invalid command lines
* Added some more unit tests
The Perl version of pkglint (pkglint<5.0) runs on all platforms that
are supported by pkgsrc. Not so the Go version (pkglint>=5.0).
To support development of packages on all platforms, this version is
provided, and it will be supported equally. Its output differs a bit
from pkglint>=5.0, but the basic checks are the same.
Notable changes include:
* The whole code has been rewritten in Go
* It is much faster, especially in recursive mode
* The code has unit tests, providing examples of use
* Some new explanations for existing warnings
* Some adjustments to previous warnings
The find-prefix infrastructure was required in a pkgviews world where
packages installed from pkgsrc could have different installation
prefixes, and this was a way for a dependency prefix to be determined.
Now that pkgviews has been removed there is no longer any need for the
overhead of this infrastructure. Instead we use BUILDLINK_PREFIX.pkg
for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the
dependency is coming from pkgsrc.
Provides a reasonable performance win due to the reduction of `pkg_info
-qp` calls, some of which were redundant anyway as they were duplicating
the same information provided by BUILDLINK_PREFIX.pkg.
packages collection.
Sometimes there's a need to just build a package without any of the
installed pre-requisites being used. Or building a one-off package
which can then be used elsewhere.
This package helps to produce other binary packages, using pkg_comp to
build them in a chroot. The chroot is populated either by cloning the
current operating system, or by using pre-existing binary sets. As an
example:
# gimme -c vip
will clone the current operating system on this host, and use it to
make a chroot in which the sysutils/vip package will be built.
Similarly, to build packages and all their pre-requisites afresh,
something like
# gimme -c mercurial git-base
would be used.
pkgsrc uses the "BUILD_TARGET" definition internally as the primary
target for building in a package's WRKDIR. It defaults to "all".
So pkgsrc cd's to ${WRKDIR} and does a "make ${BUILD_TARGET}"
pkg_comp also wants to use the same "BUILD_TARGET" definition
internally for itself to guide the builds for making binary packages.
It's done at a higher level than the pkgsrc definition. It defaults
to "package".
The use of the same name for two different purposes can cause
pkg_comp to fail to build packages. This commit renames the pkg_comp
definition to be "BUILD_PKG_COMP_TARGET".
With this change in place, my pkg_comp builds now complete successfully.
Bump PKGREVISION for the BUILD_PKG_COMP_TARGET fix
All messages shown to user are sent to stderr
nih:
- CACHEDIR is initialized in nih.default.conf (thanks to wiz@).
- IPv4-only for download is not the default anymore (thanks to gdt@).
- Binary package checksums are kept in pkg_summary.txt.
- Preliminary support for multiple repositories.
- Clean-ups for function "fetch".
It just runs either fetch_wget or fetch_ftp and does nothing else.
- Atomic update for pkg_inst_summary.txt was implemented
(thanks to wiz@ for pointing out!).
nih history:
- Option -p was introduced.
nih list:
- Fix: bug in -f (unexpected line: `Updating pkg_inst_summary...`).
nih remove:
- "nih remove" without arguments uninstalls leaf packages.
This is correct according to the documentation.
"nih install" works the same way (thanks to wiz@ for the report).
nih install:
- Missing dependencies are fixed in a different way.
When nih finds the missing dependency it tries to install
the dependency and then update the installed package.
This is more correct way to fix consequences of 'pkg_delete -f'.
- Fix: the rule "do not change PKGPATHs of installed packages"
was broken in 0.13.0 (thanks to wiz@ for the report!).
- Fix: packages are no longer installed as a dependency by mistake.
- Fix: flag "automatic" is unset correctly
("pkg_add -UD" does not change it).
- Fix: "fake" package creation.
- New option -w was added for ignoring non-existing package.
- New option -f was added for getting package list from a file.
- If "package could not be found", nih exits with non-zero status.
- Configuration variables yes_install and yes_remove_pkgs were removed.
New option -Y was added as a replacement (See NIH_OPTS for details).
- Unnecessary variable "cksums" was removed.
- Better explanation for update plan build failures.
pkg_update_plan:
- New option -w was added for the same purpose as in "nih install".
- Man page was updated.
nih.1:
- A number of typos were fixed (thanks to wiz@).
- All configuration variables were documented.
Existing SHA1 digests verified and found to be the same on the machine
holding the existing distfiles (morden). All existing SHA1 digests
retained for now as an audit trail.
Up to now, all files whose names started with "patch-" were considered
patch files. This was wrong, since e.g. devel/patch also has distfiles
with the same naming pattern.
When shutting down the master after all jobs are done, send a zero
length request to the clients and wait a second for them to shutdown the
connection. Calling shutdown on the server side doesn't avoid TIME_WAIT
as originally intended.
overrides our attempt to set it to "x86_64" and ensure consistency across
platforms. Work around this by setting it using PKGSRC_MACHINE_ARCH.
Confirmed to fix the issue and not break a variety of other platforms by
Sevan, and approved under duress by Joerg.
This resolves issues on platforms which MACHINE & MACHINE_ARCH is explicitly
defined, such as OpenBSD/amd64 & Bitrig/amd64 where we would like to build with
MACHINE_ARCH=x86_64 but can't as a platform check fails when installing
packages after bootstrap
pkg_add: Warning: package `digest-20121220' was built for a platform:
pkg_add: OpenBSD/x86_64 5.8 (pkg) vs. OpenBSD/amd64 5.8 (this host)
Tested on
Mac OS X Tiger/PowerPC
OpenBSD
Bitrig
Solaris 10/SPARC
FreeBSD 10.2-RELEASE & 11-CURRENT
DragonFlyBSD
Debian 8
OmniOS
Reviewed by joerg@
The warning that "return undef" is bad must be taken with great care.
Although perlcritic explains it a lot and warns to think before simply
fixing it, it doesn't mention that in some cases a simple "return" means
"return '0'", which had happened here.
* Removed needless check for MD5; all packages have been migrated already
* Made the code simpler by not relying on state transitions
* Allowed the newly introduced SHA512 to be mentioned in distinfo
The pkglint.pl file has grown pretty large, which makes it hard to under-
stand. Therefore it is useful to split it into reasonable parts.
The code for checking patch files is such a part since it is independent
of the rest of pkglint, and its specialized routines take quite a bit
of space.
Using regular expressions provides more uniform code, but at the cost of
higher runtime, since Perl doesn't optimize them away, even if they are
very simple, like those emulating the startswith() or endswith() functions
that other languages provide.
This warning isn't supposed to fire on macro code, so this is either
something subtly odd in pkgin or broken in OS X's clang. This still
needs fixing, but in a way that's more limited to the problematic
platform.
At least on OS X with clang, pkgin fails to build because of extra
parens around ==. See https://github.com/NetBSDfr/pkgin/issues/64
for details.
This seems to be a new issue with something in the pkgsrc build
environment (bsd makefiles or compat libs), not in pkgin proper, but
pkgin's use of bsd makefiles leads to Werror.
builds. Introduce hooks for sending bulklog and package explicitly the
master. The default bulklog action is a nop and the package action
mirrors the normal package step, i.e. copying to ${packages}/All and
adding the category symlinks.
patchdiff. It is often useful to have tools in one prefix and reach-over
patch creation with a different make and different WRKOBJDIR settings,
e.g. when developing in a bulk build environment.
Bitrig uses ELF on amd64 & arm and does not have any legacy dependency on a.out.
Remove if statement to check $MACHINE_ARCH is x86_64 in-order to set $OBJECT_FMT
to ELF, preventing $OBJECT_FMT being set to a.out by mistake.
Reviewed by joerg@
This replaces calling out to an external gpg command for verification
with inline verification using the security/netpgpverify library.
Bump version to 20150901.
* Reduce unnecessary diffs in Darwin, Linux, and SunOS mods.
* Sync WARNS flags on SunOS.
* Remove obsolete modifications to bsd.sys.mk and sys.mk on Darwin. This
primarily brings in PROG_CXX support.
Tested in bulk builds on all modified platforms.
* Ensure we aren't copying overlapping memory regions. Issue found by
Matthias Ferdinand.
* Free libarchive resources after use.
* Various WARNS and build cleanups.
Tested on Linux (now builds on Ubuntu 12.04), OSX, SmartOS and NetBSD.
* Significantly reduce RAM requirements for both "install" and "update",
headline number is "pkgin install gcc47" on SmartOS/x86_64 reduces from
383MB to 14MB, as well as being significantly faster, especially on
slower hardware. See my blog post at
<http://www.perkin.org.uk/posts/reducing-ram-usage-in-pkgin.html> for
more details.
* Handle pkg_add signature verification failures.
* Support pkg_summary.xz if available.
* Don't switch to parsable output when stdout isn't a tty, which broke
various automation tools.
* Integrate patches/patch-external_progressmeter.h
Tested on NetBSD, OSX, and SmartOS.
that the illumos variants such as SmartOS & OmniOS will be labelled accordingly
rather than being lumped in under the SunOS 5.11 banner.
This was put together with the help of Joerg @ pkgsrcCon 2015
Reviewed by joerg@ bsiegert@