1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
284a7045cf Fix quoting: make is too smart and quotes tildes, which trips up pkg.
Approved by:	portmgr (bapt)
2014-05-17 03:25:37 +00:00
Dag-Erling Smørgrav
1504bf2f9f Add support for package annotations. PKG_NOTES is a list of
annotation keys.  For each key "foo", there should be a variable
PKG_NOTE_foo which contains the corresponding value.

Approved by:	portmgr (bdrewery)
2014-05-17 02:43:37 +00:00
Baptiste Daroussin
31d81cbb2b Remove useless .undef opt
Fix indentation

Reported by:	des
2014-05-16 21:14:24 +00:00
Baptiste Daroussin
86b335b8cc Revert bdrewery will work on this later 2014-04-15 13:04:18 +00:00
Baptiste Daroussin
aa8bd6bc5d Register deprecation and expiration in packages 2014-04-15 12:49:46 +00:00
Baptiste Daroussin
ae64e0c22c Add PKG_ENV to pkg register command 2014-04-12 22:29:15 +00:00
Baptiste Daroussin
a0bbe9aa9f Add PKG_ENV to allow specifying the file to read the ABI from in case of cross building
Add STRIPBIN set the the cross building version of strip in MAKE_ENV so install(1) use
the proper one in case of cross building
2014-04-03 13:35:51 +00:00
Antoine Brodin
3502613c64 Add ocamlfind to _FORCE_POST_PATTERNS
This will silence warnings from pkg about files already removed by "ocamlfind remove" during "pkg remove".
Note: I am not convinced that running "ocamlfind remove" during uninstall is necessary as all files are tracked.
2014-03-26 08:34:53 +00:00
Bryan Drewery
e09ae1cae1 - Create package in WRKDIR/pkg/ instead of WORKDIR/ to avoid pkg-create bug
not creating the PKGNAME.PKG_SUFX if PKGNAME already exists.

  Fixes regression packaging some from r348861

With hat:	portmgr
2014-03-23 15:34:13 +00:00
Bryan Drewery
5256c01b0d - Only create ports-mgmt/pkg latest link if can write to PACKAGES
With hat:	portmgr
2014-03-23 15:22:36 +00:00
Bryan Drewery
ca93c6f7e1 - pkgng: Create package in WRKDIR and then try to link it to the PACKAGES dir.
If that fails, copy it. This fixes packaging as non-root when not able to
  write to the PACKAGES dir which causes the following warning:
      pkg-static: archive_write_open_filename(/usr/ports/packages/All/myport-1.2.3.txz): Bad file descriptor

  We do the same thing for pkg_install already.

With hat:	portmgr
2014-03-23 15:21:42 +00:00
Bryan Drewery
8d8103d173 - Remove redundant WITH_PKGNG checks. bsd.pkgng.mk is only included if
it is defined.

With hat:	portmgr
Discussed with:	bapt
2014-03-05 13:53:51 +00:00
Antoine Brodin
3b099900ff Add ccache-update-links to _FORCE_POST_PATTERNS to run it after gcc has
been uninstalled

With hat:	portmgr
2014-02-12 21:35:41 +00:00
Antoine Brodin
d6daa9d172 Handle _FORCE_POST_PATTERNS for staged ports
PR:		ports/185369
Reviewed by:	bapt
With hat:	portmgr
2014-01-17 17:22:50 +00:00
Baptiste Daroussin
108b7594d8 Backout encoding of comments, it is triggering a pkgng bug with one of our ports 2014-01-10 13:07:05 +00:00
Baptiste Daroussin
fd3075530d pkgng expect all non ascii code and '%' to be urlencoded in the comment
Reported by:	antoine
Tested by:	antoine
2014-01-06 23:34:29 +00:00
Baptiste Daroussin
b30d2c8526 Remove more now useless fallback targets 2014-01-03 23:05:37 +00:00
Baptiste Daroussin
6a2d5db265 Stop registering recursively dependencies into package with pkgng
pkg has a naive solver but good enough to properly order the dependencies
and not get into a missed dependency
pkg register is also able to figure out by itself lib_depends magically
added during the compilation.
2013-12-20 23:05:35 +00:00
Baptiste Daroussin
48d34b8d40 Disable NO_ARCH for now as it prevent from upgrading from pkg 1.1 to pkg 1.2 (pkg 1.1 will not understand it and claim there invalid ABIs)
Let's wait a bit before activating it.

Reported by:	mat
2013-12-10 19:05:41 +00:00
Alex Kozlov
325d7d2c22 - Use NO_ARCH instead of NOARCH for consistency with other NO_ knobs
Suggested by:	Eugene Stenkin <eugeni.stenkin@gmail.com>
Approved by:	portmgr (bapt)
2013-12-06 09:14:13 +00:00
Alex Kozlov
fcf2320fd6 - Implement support for architecture-neutral ports
- Replace 'alpha' with 'amd64'
- Remove gratuitous whitespaces at the end of the line

Approved by:	portmgr (bapt)
2013-12-06 08:20:16 +00:00
Raphael Kubo da Costa
703c66c2ad Fix typo (PKGPOSRDEINSTALL -> PKGPOSTDEINSTALL).
Approved by:	portmgr (bapt)
2013-11-25 22:49:29 +00:00
Bryan Drewery
1358254695 Fix copying +INSTALL after r332158
Reported by:	antoine
With hat:	portmgr
2013-10-30 22:13:56 +00:00
Baptiste Daroussin
ff058e3176 Staging showed that user/groups creation from plist are done in
post-install process instead of pre-install. in case pkgng is in
use.
Replace it by a new mecanism that allows to append scripts into
what will become pre-install, post-install, pre-deinstall or
post-deinstall
Change the user-group creation to use that mecanism in case the
ports tree is using pkgng.

Reported by:	mandree
Reviewed by:	bdrewery
2013-10-30 17:47:48 +00:00
Bryan Drewery
6059af56b7 - Properly reference pkg(8) for conflcts instead of pkg_delete(1)
Reported by:	Julian H. Stacey, gjb
With hat:	portmgr
2013-10-16 00:38:38 +00:00
Dmitry Marakasov
1ae61fce0e - Fix message displayed when the port being installed is already installed
Approved by:	portmgr (bdrewery via irc)
2013-09-27 19:10:59 +00:00
Baptiste Daroussin
cf099c77fa Add support for staging area in the ports tree
The ports tree is now staged by default. With pkgng the sequence hasn't
changed, the main difference is that creating package is now independent
from installing it. With pkg_install, the package is now created first
and make install, do install the package.

New macros:
- STAGEDIR: PATH to the directory where the port will be staged.
- NO_STAGE: Keep the old behaviour of the ports tree (aka no staging area)

Unsupported macro if NO_STAGE is not set:
- MAN* with staging man page compression and handling of hardlinks and
symlinks is automatically done in the stage. the manpages becomes then a
"normal" plist files and should be tracked in pkg-plist.
- MANCOMPRESSED the compress-man target is able to only compress when it
needed.

New target:
- stage: this installs everything into the stage directory
- makeplist: this will create a pkg-plist and print it to stdout. This is
a sample plist and it should always be _reviewed_ not directly used.

NOTE: with staging only what is in the plist will be installed, nothing more,
meaning a port staged cannot have leftovers exect directories left. It is
really important to double check the pkg-plist to make sure all the files
the maintainer want to package are in! make makeplist can help in that area.

The goal is to handle as quickly as possible a full removal of the NO_STAGE
support.

More features can be added once the full ports tree is converted to using the
staging area

Conversion notes:
- Remove NO_STAGE
- in {pre,do,post}-install
  * Before any usage of ${PREFIX}, ${ETCDIR}, ${PORTSDIR}, ${PORTEXAMPLES}
    prepend ${STAGEDIR}
  * Remove any thing that is done by @exec or +INSTALL script it will be
    done automatically when syncing packages
  * Remove any code to show PKG-MESSAGE it will be done automatically when
    syncing packages
  * Directory creation should remain in post-install (in particular because
    pkgng doesn't work like pkg_install in that area and pkgng ignores the
    @exec mkdir but directly pack the directory even if empty)
- PORTDOCS/PORTEXAMPELS
  To support PORTDOCS, PORTEXAMPLES most of the time there is no more need
  for hacks. just add the right %%PORTDOCS%% or %%PORTEXAMPLES%% in your
  plist then the given files from the stagedir will or will not sync
  according to NOPORTDOCS and NOPORTEXAMPLES.

With hat:	portmgr
Reviewed by:	bdrewery
2013-09-23 05:56:35 +00:00
Bryan Drewery
9584952370 - Fix pkg2ng due to UID/ID not being defined.
Pkg-1.1.4 will define UID=0 when sourcing bsd.pkgng.mk directly.
  This extra defined(UID) can eventually be removed, but is needed
  for backwards compatibility for now.

Reported by:	uqs
Reviewed by:	bapt
With hat:	portmgr
2013-07-05 12:29:35 +00:00
Baptiste Daroussin
7a5af7b75c Better attempt to comment r322214 and fix typos.
Base on suggestions and typo fixes by: pluknet@ and sunpoet@
2013-07-03 16:00:05 +00:00
Baptiste Daroussin
44900b87e1 pkg2ng is calling directly bsd.pkgng.mk if present which will fail because of the lack of UID.
Define it if not already defined earlier

Submitted by:	Yar Tikhiy <yar.tikhiy@gmail.com>
2013-07-03 05:48:25 +00:00
Baptiste Daroussin
4b653b49e1 Define UID earlier so that it can be used inside bsd.pkng.mk
Allow make deinstall to prompt for su if run as a user if using pkgng

Reported by:	jhb, dim
Submitted by:	jhb
2013-06-25 12:24:10 +00:00
Antoine Brodin
82b690f55a - Add gtk-query-immodules to _FORCE_POST_PATTERNS to run it post-deinstall
with pkg
- Consistently use full path when running gtk-query-immodules as the path
is embedded in output (we prefer reproducible output)

This fixes leftovers reported by poudriere
====>> Files or directories modified:
etc/gtk-2.0/gtk.immodules

PR:		ports/179230
Approved by:	portmgr (bapt)
2013-06-17 16:18:54 +00:00
Antoine Brodin
7389a2494c Add load-octave-pkg to _FORCE_POST_PATTERNS.
This fixes leftovers of octave-forge-* with pkg

PR:		ports/179559
Approved by:	portmgr (bapt)
2013-06-15 09:10:37 +00:00
Baptiste Daroussin
632f0ed926 Yes more simplification in showconfig, pretty-print-config and pkgng manifest generation 2013-06-14 06:56:16 +00:00
Baptiste Daroussin
14e094c1bd Avoid corrupting the manifest when bmake is run with -dl arguments
Reported and tested by:	vsevolod
2013-06-10 14:38:18 +00:00
Baptiste Daroussin
9db022d954 Simplify the creation of the options part of the pkgng manifest 2013-06-10 13:47:43 +00:00
Baptiste Daroussin
0eb6b89d24 The pkg developement team is proud to announce the new 1.1.0 beta1 release of
pkg.

Here is the list of new features that happened in pkg 1.1:
- new simpler and more reliable solver
- shared libraries are now always tracked
- ssh:// is supported as a protocol to distribute packages (needs pkg 1.1+ on
  the server hosting the packages)
- multirepository is no longer considered experimental and works by default.
- incremental update of the catalog (only if the repository was created by pkg
  1.1+)
- simplification of the public API
- stabilisation of the public API (we will now try to keep it stable and if
  change are needed there will be deprecation time before removal of some old
  functions)
- new experimental pkg convert (can convert from and to legacy pkg database)
  pkg2ng now uses pkg convert (still recommanded to use pkg2ng)
- new pkg lock/unlock to prevent any manipulation of a given package (no
  upgrade,delete,etc)
- improved UI (now you can see the progress of an upgrade what is left to be
  done)
- new pkg annotation to allow one to add annotations (free form key/value) to a
  package)
- pkg audit is now able to directly parse the vuxml native format and not only
  the compact version
- pkg -vv now shows all available options and their current settings
- pkg -vvv now shows a description of all the available options
- pkg info now automatically considers the query as globbing if * is in the
  requested pattern
- new hook plugin interface (allows users to create hooks that get called at
  anytime during and upgrade/installation/deletion of a package)
- new cmd plugin interface (allows users to create new sub command available for
  pkg)
- pkg register can now register a port installation in the legacy database
  format
- repository can be defined in simple yaml files

Internal:
- massive usage of hash tables (uthash), which simplifies a lot of the code,
  and improves performances
- lots of optimisation in plist and manifest parsing
- lots of optimisation in loading packages (mmap used when possible)
- lots of cleanup in memory usage
- regression test framework is now ready (using atf) regression test are slowly
  being added and populated.

To use this new version:
  Ports users (or in building factories: poudriere/tinderbox):
    Add WITH_PKGNG=devel to your make.conf
    pkg set -o ports-mgmt/pkg:ports-mgmt/pkg-devel

  Binary package users, if the remote repository is providing pkg 1.1:
    pkg set -o ports-mgmt/pkg:ports-mgmt/pkg-devel
    pkg upgrade

Note that pkg 1.1 can use a repository created for pkg 1.0 and vis versa.

Huge thanks to all the people that have contributed to the pkg developement:
- may that be by code
- documentation
- bug report
- feedback
- ideas

List of people who contributed code:
Baptiste Daroussin, Matthew Seaman, Bryan Drewery, Vsevolod Stakhov,
Marin Atanasov Nikolov, Alexandre Perrin, Romain Tartière, Julien Laffaye,
Glen Barber, John Marino, Alex Kozlov, Roman Naumann, Sofian Brabez,
Alberto Villa, Will Andrews, Eitan Adler, Dan McGregor, namor, niamtokik,
Arthur Gautier, Garrett Cooper, Andrew Turner, Jeremy Chadwick,
Hajimu UMEMOTO, Mark Lokowich, Eygene Ryabinkin, Pietro Cerutti,
Rolf Grossmann, Ed Schouten, Dimitry Andric, David Forsythe, Stefan Grundmann,
Craig Rodrigues, Antoine Brodin, Andrey Zonov, Joel Dahl

Stats between 1.0 and 1.1:
287 files changed, 63418 insertions(+), 18763 deletions(-)

1198 commits
2013-05-30 15:17:29 +00:00
Bryan Drewery
f5759ef3c8 - Run ldconfig in post-deinstall for pkgng.
This was a pkg-1.0.9 regression. The impact of this is
  that some ld cache files would show as leftovers.

PR:		ports/178837
Submitted by:	Antoine Brodin <antoine@FreeBSD.org>
Tested by:	miwi, bdrewery
With hat:	portmgr
2013-05-24 11:51:08 +00:00
Baptiste Daroussin
00de219290 Do not be verbose while removing old now unused symlinks
Reported by:	sunpoet
2013-04-26 20:19:50 +00:00
Baptiste Daroussin
0b88ec16dc Remove old links while creating the new packages
Force creation of the symlink for pkgng to avoid failure if the link already exists

Submitted by:	ohauer@
2013-04-22 22:13:14 +00:00
Baptiste Daroussin
adb87e14ab LATEST_LINK makes no sense with pkgng
Remove any symlink and category in the packages directory when using WITH_PKGNG.
Only keep links for pkg itself (to allow bootstrap)
2013-04-22 15:51:07 +00:00
Baptiste Daroussin
5acd6720b9 catalog.ports needs to be regenerated in post-deinstall.
glib-compiled-schema needs to be executed in post-deinstall

Approved by:	portmgr (implicit)
2013-04-05 09:24:39 +00:00
Baptiste Daroussin
61d28942f6 Execute gdk-pixbuf-query-loaders in post-deinstall with pkgng
Approved by:	portmgr (implicit)
2013-04-04 17:03:53 +00:00
Baptiste Daroussin
13b458eb10 Fix typo
Submitted by:	bf
2013-03-28 07:45:02 +00:00
Baptiste Daroussin
9c08e72240 Add new _FORCE_POST_PATTERNS which is a pkgng only macro containing a list of command
that if found in a @(un)exec pkgng will force to push them in post_deinstallation script.

This allows not to hardcode anymore those in the pkgng binary.
2013-03-28 07:00:59 +00:00
Bryan Drewery
189cb180bd - Fix CONFLICTS handling after r313713 caused pkg-query
output to not properly be piped. This was due to || :
  causing its output to be piped to the while loop
  instead of the pkg-query output.

With hat:	portmgr
Reviewed by:	bapt
2013-03-12 22:15:57 +00:00
Bryan Drewery
654506e304 - pkg-query(8) in pkg-1.1.x returns non-zero exit status when
no matching packages are found. Fix cases that
  expect to potentially find no matches.

PR:		ports/176783
Approved by:	portmgr (bapt)
2013-03-09 14:14:40 +00:00
Baptiste Daroussin
3b629d5544 Save RADIO and GROUP option in the pkgng manifest
Submitted by:	bdrewery
2012-12-13 21:23:52 +00:00
Bryan Drewery
27514941d1 - Revert ports/171672 patch to 'do-package' due
to reported problems with defining PKG_SUFX,
  and leaving behind tmp files.

PR:		ports/171672
Reported by:	poyopoyo@puripuri.plala.or.jp
Approved by:	portmgr (beat, implicit)
2012-09-21 13:30:57 +00:00
Beat Gaetzi
87ed9dc1c6 - Remove ftp fallback as all supported FreeBSD versions provide fetch [1]
- Don't call 'pre-config' twice in the 'config-conditional' target [2]
- Clean up pkgng metadir so that the 'clean' target can be executed without
  root permissions if the build was done with a non-root user. [3]
- Make 'do-package' atomic while creating the pkg file [4]

PR:		ports/171161 [2], ports/171329 [3], ports/171672 [4]
Submitted by:	bapt [1], A.J. Kehoe IV (Nanoman) <m7k60pkr@nanoman.ca> [2],
Submitted by:	bdrewery [3, 4]
Reported by:	Kimmo Paasiala <kpaasial@gmail.com> [3]
Tested by:	Exp-run on pointyhat, bapt (pkgng changes)
2012-09-20 19:51:30 +00:00