1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Antoine Brodin
d87748d6f2 - Do not check for ${WRKDIR} in staged files, there are lots of false
positives as some .o files may embed the source path [1]
- Only check shebang of files with executable bit set

Requested by:	bapt [1]
With hat:	portmgr
2014-01-28 22:19:30 +00:00
Mathieu Arnold
98f460acc5 Greatly enhance makeplist to replace all it can find in PLIST_SUB.
With hat:	portmgr
Sponsored by:	Absolight
2014-01-28 14:16:30 +00:00
Baptiste Daroussin
cc445d3636 Do not show orphans anymore with pkgng for .info files 2014-01-27 10:35:19 +00:00
Antoine Brodin
7a75fc64ed Fix paths check from qa.sh
IFS is set to newline so dirs was not correctly splitted

Approved by:	portmgr (bapt)
2014-01-09 18:43:36 +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
0d585ac82e /usr/bin/nawk and /bin/csh are valid shebangs 2013-12-06 23:12:52 +00:00
Mathieu Arnold
5fa7b7d571 Fixup makeplist for directories.
Without, it'll generate :
@dirrmtry %%PORTDOCS%%%%DOCSDIR%%
With :
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%

PR:		ports/184287
Submitted by:	mat
Approved by:	bapt
2013-11-29 16:08:41 +00:00
Matthias Andree
ed6f700839 - in qa.sh, properly work with filenames containing blank or tab,
by setting IFS to just LF

- in check-stagedir.sh, properly detect unset environmental variables,
  and list them all

- in check-stagedir.sh, also list the full prefix as known, not just
  its parents

PR:		184039
Approved by:	portmgr (bapt)
2013-11-23 12:23:19 +00:00
Matthias Andree
13b212c743 bsd.stage.mk: Fewer false positives, much faster, easier maintenance.
Bugfixes:

* @cmd in pkg-plist is now properly handled.
  - It was previously treated the same as though there was a directory
    following it, missing the prefix. (ordering matters in case...esac)

  - Due to the cwd=${PREFIX} inside the while read line loop, state
    tracking was broken and every new line assumed that cwd were the
    prefix.

* stage-qa no longer complains about unstripped binaries if debugging is
  active (WITH_DEBUG set && WITHOUT_DEBUG unset).

* The compress-man target uses ECHO_MSG, not ECHO_CMD, to print its
  build step.

Additions:

* The plist parser now understands @unexec rmdir ... || ... lines,
  including those with redirections, so that there are no false
  positives for directories stripped with @unexec rmdir (usually
  happens on stuff installed outside $PREFIX, as in /var).

* The system's root and var mtrees are now also expanded to avoid
  false @dirrm positives if a port installs directories under /var
  and has to create parents in the stagedir that are present in a fully
  installed system (i. e. in the real $PREFIX).

* Given that pkg_create is deemed beyond repair with respect to deleting
  files outside prefix, generate @unexec rmdir statements for such
  directories, rather than @dirrmtry, to sidestep the problem.

Speedups:

* the orphan check now generates sorted lists of staged files,
  and plisted/mtree files, and compares them with comm(1).
  This saves us the overhead of running one grep process per file
  and up to two per directory, and defers the actual list
  processing to a shell utility.  Complexity has not changed,
  but overhead per item has.

* the orphan check now uses one file for directories and one file for
  files mentioned in pkg-plist, so we need not decorate them with "dir "
  and parse them out any longer.

* qa.sh's shebang scanner only looks at the first line of a file,
  sed is told to exit from the 2nd line.

Other Changes:

* Split the makeplist/check-orphans logic out of bsd.stage.mk,
  it is too unwieldy to maintain in make-escaped shell syntax,
  and permits shell tracing with "SH=sh -x" (including quotes!)

* Unify the functions "makeplist" and "check-orphans" in one
  script.  The only difference is that makeplist assumes an empty
  pkg-plist, whereas check-orphans parses it.

* overhaul the mtree extractor, avoiding awk.

Reviewed by:	bapt
Approved by:	portmgr (bapt)
2013-10-31 19:07:38 +00:00
Alex Kozlov
542371959d - Add check for suid files and directories
Approved by:	portmgr (bapt)
2013-10-20 18:12:49 +00:00
Baptiste Daroussin
049b167664 Recommand to use STRIP_CMD to strip binaries given that it will respect the WITH_DEBUG option 2013-10-19 00:17:10 +00:00
Bryan Drewery
cbfe674254 - Fix desktopfileutils() and sharedmimeinfo() returning non-zero and causing
failure on every port that does not use shared-mime-info or need it.

  Must return 0 at end of functions or it considers the last command ran as
  the return code.

Reported by:	eadler
With hat:	portmgr
2013-10-11 02:52:35 +00:00
Antoine Brodin
0a9a0a511f Add two QA tests for staged ports:
- check for desktop files handling MIME types
- check for share MIME-Info database

Approved by:	portmgr (bapt)
2013-10-10 17:09:33 +00:00
Bryan Drewery
b924147649 - Move dialog4ports.sh to more appropriate new directory Mk/Scripts as
it is related to infrastructure/framework and a required portmgr-
  maintained script

With hat:	portmgr
2013-10-09 23:01:54 +00:00
Baptiste Daroussin
aa40865de1 First set of Q/A for staged ports.
A couple of Q/A tests are done if the DEVELOPER macros is set in make.conf
Right now the tests are:
- Check if the symlinks are properly created
- Check if the binaries are stripped (just warn)
- Check if the STAGEDIR or the WORKDIR are referenced in the final files
- Check if the ports provide script with bad shebangs.
2013-10-09 15:11:32 +00:00