1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
Commit Graph

4254 Commits

Author SHA1 Message Date
Olli Hauer
edfcd95e30 - automatically strip modules build with
AP_FAST_BUILD, except if DEBUG is set
2014-04-27 14:11:30 +00:00
Bryan Drewery
779bba4486 - Fix check-stagedir causing staging violating. Quote all directory names
when doing plist checks. This could leak out if an unsupported format
  was used such as 'rmdir -p' or 'rmdir dir1 dir2 dir3'

With hat:	portmgr
Reported by:	antoine
Pointyhat to:	bdrewery
2014-04-24 22:42:06 +00:00
Bryan Drewery
eacc5a1959 - Fix false-positive orphanned dir when '@unexec rmdir -p' is used.
Reported by:	antoine
With hat:	portmgr
2014-04-24 22:31:24 +00:00
Bryan Drewery
821e60e4cc - Refactor a bit into functions
With hat:	portmgr
2014-04-24 22:30:05 +00:00
Jung-uk Kim
d367a33745 - Sort Java implementations by preference, i.e., java/openjdk7 is preferred
over java/openjdk8.  java/openjdk8 is still in its infancy.
- Retire redundant _JAVA_PREFERRED_PORTS hack.  We only have one preferred
port since r290539 and we want to keep it that way.
2014-04-24 18:05:21 +00:00
Bryan Drewery
4541c779c7 check-plist: Don't error if GNOME_MTREE_FILE is missing, which can happen
in nox11 ports that USE_GNOME.

With hat:	portmgr
Reported by:	swills
2014-04-24 12:00:27 +00:00
Bryan Drewery
a0b9955c09 - Fix regression from r315599: Allow pkg to install itself first
if not yet installed and WITH_PKGNG is set. Just skip the
  vulnerabilities check as intended in r315599.

With hat:	portmgr
Reported by:	diizzy on EFNet
Pointyhat to:	bdrewery (with interest)
2014-04-24 00:52:16 +00:00
Bryan Drewery
5c4ee29736 - Fix when USES not defined
With hat:	pormtmgr
Pointyhat to:	bdrewery
2014-04-23 22:22:42 +00:00
Bryan Drewery
2c1715db99 - Fix stage-qa when USES contains desktop-file-utils twice
Reported by:	mandree
With hat:	portmgr
2014-04-23 22:19:58 +00:00
Antoine Brodin
a373437d73 - Handle plist containing @unexec /bin/rmdir
- Handle directories ending with digits

With hat:	portmgr
2014-04-23 20:46:45 +00:00
Tijl Coosemans
aad09bc5e2 When linking a library libA with a library libB using libtool, if libB.la
exists, libtool will add all libraries libB.la refers to (dependency_libs
field) to the linker command line and store them in the dependency_libs
field of libA.la.  So everything that subsequently links with libA will also
link to these extra libraries.  This causes too much overlinking.

This commit modifies Mk/Uses/libtool.mk so it empties the dependency_libs
field in .la libraries during staging.  However, because .la libraries have
very limited use when dependency_libs is empty it makes sense to completely
remove them during staging.

So with this commit USES=libtool is modified to remove .la libraries and a
new form (USES=libtool:keepla) is introduced in case they need to be kept
(dependency_libs is still emptied).

PORTREVISION is bumped on all ports with USES=libtool that install .la
libraries.  Most ports are also changed to add :keepla because .la
libraries have to be kept around as long as there are dependent ports with
.la libraries that refer to them in their dependency_libs field.  In most
cases :keepla can be removed again as soon as all dependent ports that
install .la libraries have some form of USES=libtool added to their
Makefile.

PR:		ports/188759
Exp-run:	bdrewery
Approved by:	portmgr (bdrewery)
2014-04-23 13:25:16 +00:00
Bryan Drewery
196182d95e - Mostly revert r338509 and re-add SF mirrors. Prefer main redirect.
Sourceforce is currently having major issues and without this we
  risk having weekly packages fail to build.

With hat:	portmgr
2014-04-23 00:46:23 +00:00
Bryan Drewery
3964423d4f - Fix handling of "@comment @cwd" so it does not reset real @cwd; only
change the cwd for commented lines (such as %%OPTION%%file). Reset it
  back to the normal on the first non-commented line.
- Sort files after stripping out @comment

With hat:	portmgr
2014-04-22 23:28:27 +00:00
Antoine Brodin
fc05fd3aae Fix directory keywords handling
Reviewed by:	bdrewery
With hat:	portmgr
2014-04-22 14:11:48 +00:00
Bryan Drewery
a12e34d03e - For pkg run-depends dir listing, consider deps recursively.
pkg_install already did this.
- Speedup the pkg_install run-depends listing by processing unique
  packages.

With hat:	portmgr
Reported by:	antoine
2014-04-22 12:56:13 +00:00
Antoine Brodin
4053a4a28f Fill orphans white list with files regenerated by installation scripts:
- info directories
- fonts.dir and fonts.scale
- desktop database
- mime database

With hat:	portmgr
2014-04-21 22:08:32 +00:00
Antoine Brodin
a45906707f - Do not advise to strip non FreeBSD binaries [1]
- Shorten messages

Requested and tested by:	xmj [1]
With hat:	portmgr
2014-04-21 20:17:00 +00:00
Bryan Drewery
b8334287c4 - Split MTREE check into its own check
- Split dependency-owned check its own and make into a non-fatal warning.
  This is not black-and-white. Python/Rubygem ports cleanup the lib dir
  for every installed package, and for python/ruby-gems too. This is fine,
  the extensions should not clean them up then; the error is valid here.
  However, there's other frameworks which don't cleanup in the master package
  and yield unexpected results. An example is that php does not cleanup
  etc/php itself. Only extensions do. So if an extension depends on another
  extension it will complain that the dependent extension owns etc/php,
  so we remove from bsd.php.mk, now it's a leftover. The proper place is in the
  php port itself, but it's unknown how many other cases there are like this.
  So for now make this non-fatal and into a warning.

  This is all mostly moot once pkg auto handles directories anyhow.

With hat:	portmgr
Discussed with:	antoine
2014-04-21 18:42:15 +00:00
Bryan Drewery
e81c57a53d - Sort directories by Lexicographical Depth-First order (find -ds)
With hat:	portmgr
2014-04-21 16:22:20 +00:00
Antoine Brodin
5be1bc5fe0 Fix plist_sub_sed_sort.sh when value contains spaces 2014-04-20 23:47:25 +00:00
Antoine Brodin
4091ee9287 Fix PLIST_SUB_SED when value contains =
With hat:	portmgr
2014-04-20 23:45:56 +00:00
Mathieu Arnold
9ea93fc774 Add / to the blacklist of homedirs that should not be created or touched.
With hat:	portmgr
Sponsored by:	Absolight
2014-04-19 13:54:30 +00:00
Bryan Drewery
e15449a9ef - Rename check-orphans to check-plist. Keep the old for backwards-compat.
- Bug fixes:
  makeplist/check-plist:
   - Fix showing directories owned by RUN_DEPENDS/LIB_DEPENDS [1]
   - Use proper "rmdir PATH" syntax, not "rmdir >/dev/null... PATH" which
     pkg will not recognize.
   - Never consider base /etc/mtree/BSD.usr.dist or LOCLABASE
     Templates/BSD.local.dist as needing @dirrm handling.
  check-plist:
   - Fix showing PORTDOCS/PORTEXAMPLES files when the OPTIONS are not set.
     makeplist will still suggest them.
   - Fix showing files installed through unselected OPTIONS as orphans,
     by considering "@comment file" to be ignored. [2]
   - Fix @sample, @fc, @fcfontsdir, @fontsdir support
   - Fix return status when orphans are found to be non-zero
   - Add note when PREFIX=!LOCALBASE
   - Be more clear when orphans/no orphans are found.
   - Add a whitelist mechanism for globally approved ignores.
   - Add *.bak/*.orig to orphan whitelist for now.
   - Fix false-positive with dirs installed to /, such as with
     archivers/dpkg creating /var/db/dpkg
   - Fix false-positive with @dirrm ending in /, such as with
     ports-mgmt/poudriere with a @dirrmtry share/zsh/
   - There are likely still some false-positives. I fixed as many as I could
     find. Please let me know of others.
    * One in particular that is not easily fixable is installing a file into
      a directory owned by another port where that other port is not a run-time
      dependency. So the leaf port may create all of the parent dirs and never
      clean them up. Cleaning them up is not proper unless no other package is
      depending on them. This will be addressed by pkg(8) once pkg_install is
      EOL, or sooner.
   - Consider @dirrm of directories owned by run-time dependencies, or
     /etc/mtree/* or Templates/BSD.local.dist (at LOCALBASE) as fatal errors.
     These should not be removed in the plist. @comment lines are not
     considered for this; they will not ignore an error.
        ===> Checking for directories owned by dependencies or MTREEs
        Error: Owned by dependency: @dirrmtry share/locale/af/LC_MESSAGES
        Error: Owned by dependency: @dirrmtry share/locale/af
        Error: Owned by dependency: @dirrmtry %%PERL5_MAN3%%
   - Detect files in plist that do not exist in the stagedir. Pkgng already did
     this, but now we have it unified with this check. @comment lines are
     not considered for this; they will not ignore an error.
        ===> Checking for items in pkg-plist which are not in STAGEDIR
        Error: Missing: foo
        Error: Missing: @dirrmtry bar
   - Change orphaned output due to several new errors introduced:
        ===> Checking for items in STAGEDIR missing from pkg-plist
        Error: Orphaned: foo
   - Send errors to stderr
  check_leftovers.sh:
   - Prefer longer values for PLIST_SUB.
  bsd.options.mk:
   - Fix NOPORTDOCS/WITHOUT_NLS/NOPORTEXAMPLES not unsetting their respective
     OPTIONS.
   - Mark NOPORTDOCS/NOPORTEXAMPLES deprecated and hook them into the
     OPTIONS_WARNING to tell users the new format.
- check-stagedir.sh refactoring:
  - Switch to using new PLIST_SUB_SED
  - Use ! instead of , in sed(1) regex to allow files/dirs with ','
  - Rework PORTEXAMPLES/PORTDOCS handling so it acts on PLIST_SUB_SED'd
    value and not absolutes. Also simplify the regex for these a bit to
    allow reuse.
  - No longer need DOCSDIRS/EXAMPLESDIR in env
  - Wrap long lines
  - Unset some vars in env when they are done being used to free space for
    larger sed vars
  - Cleanup redundant sed regexes
- Add a Scripts/plist_sub_sed_sort.sh to prefer longer values when substituting
  over shorter values.

- To make check-plist ignore a file *as an orphan* do one of the following:
  1. Install it
  2. post-install: ${RM} ${STAGEDIR}file
  3. Put the file behind an OPTION with a PLIST_SUB: %%OPTION%%file
  4. Add to plist as a @comment [2]:
     @comment file
     @comment @dirrmtry dir

Reviewed by:	mat (much earlier version)
Discussed with:	mat, antoine, bapt, swills (various bits)
With hat:	portmgr
PR:		ports/185561 [1]
Reported By:	Alexander Yerenkow <yerenkow@gmail.com> [1]
Tested with:	pkg and pkg_install
Reported by:	many (false-positives)

[2] This is a partial solution, we may still need a plist.ignore too. It
    doesn't make much sense to add files in main pkg-plist we don't care about,
    but maybe it does since you'll see and reconsider them being ignored
    someday. @comment is used as all the OPTION PLIST_SUB deactivations use
    @comment instead of something like @ignore.
2014-04-19 06:44:56 +00:00
Pawel Pekala
914c02c741 makepatch: don't create empty patches
PR:		ports/188764
Submitted by:	myself
Approved by:	portmgr (bdrewery)
2014-04-18 17:31:12 +00:00
Thomas Zander
389bd99220 libvpx is unconditionally built with VP9 support, so adapt its description accordingly
Approved by:	jadawin (co-mentor)
2014-04-18 12:19:10 +00:00
Bryan Drewery
193b6cc6d8 - Fix HOMEDIR handling to not exclude all directories for ports without USERS
Reported by:	antoine
With hat:	portmgr
2014-04-17 14:45:49 +00:00
Bryan Drewery
e0e4f6e0e6 - Document PLIST_SUB_SED= will disable PLIST_SUB hints
- Avoid a redundant 'test -d'
- Properly show %%PORTEXAMPLES%% %%PORTDOCS%% where needed
- Avoid some forking for always-ignored files

With hat:	portmgr
2014-04-17 14:42:44 +00:00
Bryan Drewery
2221aba2de - Add script for handling leftover processing by poudriere/tinderbox.
This will contain all approved/whitelisted leftovers in a single
  reference. It will also allow us to update the whitelist without
  needing a new release of poudriere/tinderbox and forcing users
  to update those tools.

    Usage: env PORTSDIR=... check_leftovers.sh category/port
    stdin:
     - missing-file
     + new-file
     M modified-file reason...

    stdout:
     same -/+/M format, but with files substituted, without approved
     whitelisted files, and hides any directories already in plist.
- Add /var/qmail/queue to the list of whitelisted directories just as
  /var/mail is. This queue directory contains mails in flight and may receive
  or have mail removed during an upgrade.

Obtained from:	Mostly poudriere
Reviewed by:	antoine
With hat:	portmgr
2014-04-17 04:56:04 +00:00
Bryan Drewery
bf13bd7229 - Create a DO_MAKE_BUILD which will do the right thing for building, such
as setting MAKE_ENV. Without this things like WITH_CCACHE_BUILD do not
  properly work if a port does its own building.

With hat:	portmgr
2014-04-17 04:02:59 +00:00
Bryan Drewery
c9e5403827 - Add PLIST_SUB_SED which is used to replace absolute paths with PLIST_SUB'd
paths. This will be used for check-stagedir.sh and poudriere/tinderbox
  leftover handling.
  This version handles several flaws of other implementations:
    - Remove VARS that are too generic
    - Remove empty values
    - Remove @comment values
    - Remove quotes
    - Replace . with \. for later sed(1) usage
    - Handle values with spaces
    - By default only use values 2+ characters long. Let this be overridable
      with PLIST_SUB_SED_MIN.

Reviewed by:	antoine, mat
With hat:	portmgr
2014-04-17 03:47:54 +00:00
Bryan Drewery
b8856298ff - Detect failure to create PREFIX for pkg_install workaround added in r351422
With hat:	portmgr
2014-04-16 22:27:38 +00:00
Bryan Drewery
60c86fe0f7 - During 'make package' create PREFIX if not there to workaround a pkg_install
bug [1] requiring it to be even if creating from STAGEDIR. This is only done
  when NO_STAGE is not set and for pkg_install.

  This fixes the following error with 'make package' from stagedir:

    pkg_create: couldn't resolve path for prefix: /var/qmail: No such file or directory

  [1] This is due to base r231300 requiring the prefix to exist when
      running pkg_create (which may not be true in staging). This was
      fixed in r240682, but never made it to 9.1

With hat:	portmgr
2014-04-16 22:17:41 +00:00
Niclas Zeising
39fc32e828 The FreeBSD x11@ and graphics team proudly presents
a zeising, kwm production, with help from dumbbell, bdrewery:

NEW XORG ON FREEBSD 9-STABLE AND 10-STABLE

This update switches over to use the new xorg stack by default on FreeBSD 9
and 10 stable, on osversions where vt(9) is available.
It is still possible to use the old stack by specifying WITHOUT_NEW_XORG in
/etc/make.conf .
FreeBSD 8-STABLE and released versions of FreeBSD still use
the old version.
A package repository with binary packages for new xorg will
be available soon.

This patch also contains updates of libxcb and related ports, pixman, as well
as some drivers and utilities.

Bump portrevisions for xf86-* ports, as well as virtualbox-ose-additions due
to xserver version change.

Apart from these updates, the way shared libraries are handled has been
changed for all xorg ports, as well as libxml2 and freetype, which means
ltverhack is gone and as a consequence shared libraries have been bumped.
The plan is that this change will make library bumps less likely in the
future.
All affected ports have had their portrevisions bumped as a consequence of
this.

Fix some issues where WITH_NEW_XORG weren't detected properly on CURRENT.

Update instructions, hardware support, and more notes can be found on
https://wiki.freebsd.org/Graphics

Thanks to:	all testers, bdrewery and the FreeBSD x11@ team
exp-run by:	bdrewery [1]
PR:		ports/187602 [1]
Approved by:	portmgr (bdrewery), core (jhb)
2014-04-16 18:28:47 +00:00
Bryan Drewery
a189085d53 - Make default target "make stage" if staging supported.
This is so that 'make' followed by 'make deinstall install' will, by default,
  have a much shorter period of files missing on the system as it is without
  staging.

Discussed with:	bapt
With hat:	portmgr
2014-04-16 16:29:38 +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
Steve Wills
d370b8a9bf - Fix issues with specifying ${RUBY} variable
PR:		ports/170916
Reported by:	Hiroto Kagotani <hiroto.kagotani@gmail.com>
2014-04-13 02:44:45 +00:00
Baptiste Daroussin
0636191626 Add PORTSDIR path into PKG_ENV to allow the pkg command to properly find the keywords when PORTSDIR is not /usr/ports 2014-04-12 22:35:09 +00:00
Baptiste Daroussin
ae64e0c22c Add PKG_ENV to pkg register command 2014-04-12 22:29:15 +00:00
Antoine Brodin
0ade3b428b Do not advise to strip ELF relocatables, usually it is harmful
With hat:	portmgr
2014-04-12 20:49:52 +00:00
Antoine Brodin
32d4470be8 Reduce the number of false positives reported by the shebang qa check
by looking only at files and symlinks in bin, sbin and libexec

Reviewed by:	bdrewery
With hat:	portmgr
2014-04-12 20:48:04 +00:00
Bryan Drewery
4070b12551 - Add a @sample plist keyword
It accepts a file (must end in .sample, this is not configurable):

    @sample file.conf.sample

  This will install file.conf.sample and copy it to file.conf. The file.conf
  will be removed if it matches file.conf.sample on deinstall.

  This replaces older patterns of:

    @unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; then rm -f %D/etc/pkgtools.conf; fi
    etc/pkgtools.conf.sample
    @exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf

  [1] This somewhat obsoletes work in ports/157168 which added CONF_FILES,
      but we have been moving towards more logic in pkg-plist where possible
      and less magical macros. Though this thinking does clash with autoplist
      ideas. We may still want CONF_FILES, which just drops a list of
      @sample entries into the plist anyway.
- Add a Keywords/pkg_install.awk and hook it into generate-plist. This is
  for pkg_install compatibility since it does not know how to read
  Keywords/sample.yaml.
  This file gives us a strategy to implement more keywords before
  pkg_install is EOL.
  Keywords are documented here:
  bffc31420b
- This needs to be documented in PH and portlint support added still.

PR:		ports/157168 [1]
Discussed with:	bapt
Reviewed by:	bapt
Requested by:	many
With hat:	portmgr
2014-04-12 03:39:02 +00:00
Kubilay Kocak
25fa2634a3 Mk/bsd.python.mk: Space to tabs in user message
Fix (replace) spaces with a tab in user message for valid Python versions.

Submitted by:	John Hein <john dot hein at microsemi dot com>
2014-04-12 03:07:31 +00:00
Brooks Davis
ad2f70940d Allow an alternative install prefix to be specified with
CMAKE_INSTALL_PREFIX.  This is similar to GNU_CONFIGURE_PREFIX and is
useful for ports that would conflict if installed directly in PREFIX.
2014-04-11 21:45:55 +00:00
Jung-uk Kim
6b6b88f5da Update comments. 2014-04-11 17:17:33 +00:00
Sunpoet Po-Chuan Hsieh
841cd91930 - Fix _JAVA_PORT_LINUX_ORACLE_JDK_1_8_INFO
- Reorder _JAVA_VENDOR_*
- Update comment

Submitted by:	sunpoet (myself)
Approved by:	bapt (portmgr)
2014-04-11 15:37:52 +00:00
Bryan Drewery
33c153382d - Make shebang a warning for now, too many false-positives in files we
do not care about.

  antoine@ is working on a better solution for this.

With hat:	portmgr
2014-04-11 14:15:57 +00:00
Baptiste Daroussin
86fffbda3c followup with recent cleanup 2014-04-11 12:45:16 +00:00
Sunpoet Po-Chuan Hsieh
9d89ae5c91 - Pet portlint: use PYTHON_DISTNAME instead of PYTHON_DISTFILE 2014-04-11 08:25:00 +00:00
Greg Lewis
713cd98aca . Set maintainer to java@FreeBSD.org. 2014-04-11 02:08:05 +00:00