1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00
Commit Graph

185 Commits

Author SHA1 Message Date
Antoine Brodin
428645d185 Fix directory creation when primary group is different from user name 2016-11-01 00:33:36 +00:00
Bryan Drewery
e73c0c591a Fix package upgrade setting wrong ownership on a package's $HOME.
This happens when the UID/GID doesn't match the expected number from
UIDs/GIDs.

https://github.com/freebsd/pkg/issues/1485 has more details.

With hat:	portmgr
Discussed with:	bapt, mat
2016-10-31 22:37:21 +00:00
Bryan Drewery
5851a354c5 Don't truncate DEPENDS_ARGS here.
This code seems unused though since bsd.port.mk has its own handling
for clean-depends.

PR:		212273
With hat:	portmgr
2016-10-31 20:54:50 +00:00
Mathieu Arnold
7c8e7b69a8 Add a Perl CORE QA check.
This will use Module::CoreList to tell you if a dependency you added can
be removed, or only conditionally added.

Approved by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7832
2016-10-29 10:10:33 +00:00
Mathieu Arnold
73a69a6388 Do not force a lookup in LOCALBASE/lib for shared libraries.
ldd should work correctly if rpath is set, and this adds false
positives.

PR:		213547
Submitted by:	John Hein
Sponsored by:	Absolight
2016-10-25 11:44:19 +00:00
Mathieu Arnold
e7064f0d41 Replace non breaking space \xa0 with a normal space.
Sponsored by:	Absolight
2016-10-20 13:19:39 +00:00
Mathieu Arnold
1ce1ab6ba3 Make make clean be recursive again.
PR:		213188
Submitted by:	tijl
Exp-run by:	antoine
Sponsored by:	Absolight
2016-10-18 15:27:25 +00:00
Koop Mast
c8776db59d Add ncurses suggestion to qa.sh.
Approved by:	portmgr (mat@)
Differential Revision:	https://reviews.freebsd.org/D7885
2016-09-13 20:35:34 +00:00
Mathieu Arnold
f999dd783a Provide a standard way to look up for executables and shared libraries.
PR:		211146
Submitted by:	yuri rawbw com
Sponsored by:	Absolight
2016-09-08 14:12:58 +00:00
Mathieu Arnold
63598e1919 Disable some checks for linux ports.
- shebang check: skip scripts in LINUXBASE.  Things like /bin/bash are
  valid in a Linux context.  Also, these scripts usually only work with
  a Linux shell so it doesn't make sense to try to make them work from a
  FreeBSD shell.
- prefixvar check: allow LINUXBASE/var.
- proxydeps check: only test FreeBSD ELF files because ldd(1) doesn't
  work with other ELF files.

PR:		212419
Submitted by:	tijl
Sponsored by:	Absolight
2016-09-08 14:12:41 +00:00
Tijl Coosemans
82a87de90c - Replace Mk/bsd.linux-apps.mk and Mk/bsd.linux-rpm.mk with
Mk/Uses/linux.mk.
- Replace USE_LINUX=yes with USES+=linux and USE_LINUX=(.*) with
  USES+=linux:\1 in all ports.
- Replace USE_LINUX_APPS with USE_LINUX in all ports.
- Use INSTALL_SCRIPT instead of INSTALL_PROGRAM to install scripts in some
  ports.
- When USE_LINUX_RPM is defined, simplify the way DISTFILES and EXTRACT_ONLY
  are defined.
- Remove BRANDELF_DIRS and BRANDELF_FILES handling.  In the very rare cases
  that it is still necessary ports can run ${BRANDELF} from post-patch.
- Remove AUTOMATIC_PLIST handling.  Only one port used it.
- Fix Linux MASTER_SITES.
- Replace OVERRIDE_LINUX_BASE_PORT and OVERRIDE_LINUX_NONBASE_PORTS with
  default versions framework.
- bsd.port.mk:
  - Move Linux related bits to Uses/linux.mk, except USE_LINUX_PREFIX.
  - Put USE_LINUX_PREFIX handling after USES processing.
  - Define DOCSDIR, DATADIR, etc. after handling USE_LINUX_PREFIX so it can
    give these variables a different default value.
  - When a package needs to run Linux ldconfig check before installation if
    Linux support is enabled.
- emulators/linux_base-*:
  - Use USES=linux and remove duplication.
  - Remove files/lp.  FreeBSD or CUPS lp(1) should work.
  - Remove files/yp.conf.  No longer seems to be used.
  - Remove pkg-deinstall and move pkg-install into pkg-plist.
  - Update pkg-descr and pkg-message.
  - Fix handling of ldconfig cache in pkg-plist.
- devel/fb-adb: Use a Linux shell to run a Linux script but patch the script
  to use FreeBSD mkdir so mkdir -p $path creates $path and not
  /compat/linux/$path.

PR:		211645
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-09-05 19:23:42 +00:00
Mathieu Arnold
ac80808e02 Add a stage-qa check to check for the existence of SONAME in .so's.
If a port provides .so.X files, they have to have a SONAME for them to
work correctly.

While there, incorporate a reverse soname checks in proxydeps.
A port that needs a .so.X from another port which does not have a
SONAME.

Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7454
2016-08-29 15:23:52 +00:00
Mathieu Arnold
64a3179722 Use LIB_DEPENDS when appropriate in KDE components.
Lots of KDE components are providing libraries, and they were,
strangely, written as BUILD_ or RUN_DEPENDS, with a full path to the
library.  Change this so that if a component is needed at both build,
and, run-time, then it gets a LIB_DEPENDS.

Reviewed by:	rakuco, tcberner
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7625
2016-08-26 12:43:57 +00:00
Mathieu Arnold
d131b524b1 typo.
Submitted by:	wblock
Sponsored by:	Absolight
2016-08-17 08:55:35 +00:00
Mathieu Arnold
38efae9d84 Unbreak make missing.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7504
2016-08-17 08:54:43 +00:00
Mathieu Arnold
74109de537 Only try to create DISTDIR if it does not exist already.
It turns out, some people, instead of setting DISTDIR, replace it with a
symlink pointing to where DISTDIR should be pointing.

And mkdir -p <symlink> fails.

PR:		211623
Reported by:	Harald Schmalzbauer
Sponsored by:	Absolight
2016-08-08 12:57:34 +00:00
Mathieu Arnold
a09e3f68ab Tell people to add USES=gettext-runtime, not USES=gettext.
This is done after the port has been built, so it is already building,
so it does not need to be added a BUILD_DEPENDS on gettext-tools.

Discussed with:	dumbbell
Sponsored by:	Absolight
2016-08-05 18:29:10 +00:00
Mathieu Arnold
b79eed7e66 Add a PKGMESSAGES variable that allows the framework to have more than
one PKGMESSAGE file.

This allows the framework to add messages to ports, without touching
their PKGMESSAGE file.

Sponsored by:	Absolight
2016-08-03 12:45:30 +00:00
Mathieu Arnold
816ca34d92 Only warn about symlinks that exist in the stage directory, or that
exist nowhere.

Sponsored by:	Absolight
2016-06-30 09:59:27 +00:00
Dmitry Marakasov
062a97e125 - Fix typo: "you need USES=nssl" -> "you need USES=ssl"
Approved by:	mat
Differential Revision:	D6997
2016-06-28 07:58:43 +00:00
Mathieu Arnold
639a283517 Catch up two instances of USE_OPENSSL.
Sponsored by:	Absolight
2016-06-27 13:26:17 +00:00
Mathieu Arnold
06b4ea3876 Replace bsd.openssl.mk with USES=ssl
Add a qa hint about needing, or not, USES=ssl.

Fix ports doing silly things, like including bsd.openssl.mk directly.

PR:		210322
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6866
2016-06-27 11:31:10 +00:00
Bryan Drewery
c203addf6d Fix package depends install not respecting DEPENDS_ARGS for the PKGFILE lookup.
This also optimizes the PKGBASE/PKGFILE lookup with the new port_var_fetch(),
which passes in the known DEPENDS_ARGS.
2016-06-24 05:04:33 +00:00
Bryan Drewery
5061f450c8 Add a function port_var_fetch() for fetching multiple variables from a port.
This is taken from Poudriere (uncommitted)
2016-06-24 05:03:34 +00:00
Bryan Drewery
97587b1a48 Show proper variable in error.
With hat:	portmgr
2016-06-24 04:53:45 +00:00
Mathieu Arnold
267e746730 Extend the symlink checks to warn on absolute targets.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6930
2016-06-23 11:31:15 +00:00
Mathieu Arnold
5f1b1ae084 Extract create-manifest.
PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:39 +00:00
Mathieu Arnold
5ba3aba7ff Reverse tests to decrease complexity.
PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:35 +00:00
Mathieu Arnold
a2262e9313 Remove unnecessary evals that do-fetch was using.
Turns out that env(1) knows how to parse a properly quoted string
using -S "string", it makes the double eval used for the fetch
command to be unnecessary.

This is because running:
eval "foo $(escape $bar)"
is silly when this works:
foo $bar

So remove escaping and quoting, and sillyness.

PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:29 +00:00
Mathieu Arnold
86cad8dff1 Simplify do-fetch, and remove now unused code.
Turns out that the DEFAULT, and other groups sites were handled in
a different way, ending up having the same code twice, but in
slightly different places.

PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:24:39 +00:00
Mathieu Arnold
4d1c2e3e50 Add USE_OPENSSL to the proxy libs thing.
Sponsored by:	Absolight
2016-06-16 14:32:18 +00:00
Mathieu Arnold
8d3ade7517 Fix having the :DEFAULT MASTER_SITES entries ending up being there twice
in the end.

Sponsored by:	Absolight
2016-06-06 15:25:22 +00:00
Mathieu Arnold
06da80d826 Fix logic a bit, in case pkg is not installed (I guess.)
PR:		209754
Reported by:	Nick Evans
Sponsored by:	Absolight
2016-06-04 09:35:21 +00:00
Mathieu Arnold
0abe36d5be Fix fetch-list and fetch-url-list-int when DISTDIR is not writable.
PR:		209820
Reported by:	amdmi3
Sponsored by:	Absolight
2016-05-29 08:02:28 +00:00
Dmitry Marakasov
79302ffde3 Fix sed command in proxydeps_suggest_uses qa.sh check
It led to incorrect "you need USE_XORG+" suggestion

Submitted by:	amdmi3
Approved by:	portmgr (bapt)
Differential Revision:	D6618
2016-05-28 17:16:03 +00:00
Baptiste Daroussin
c4407c70ba Fix make check-plist with new @xmlcatmgr keyword 2016-05-25 18:46:58 +00:00
Baptiste Daroussin
c3dba507a0 Ensure dp_PKGNAME has been passed to check-vulnerable 2016-05-25 18:46:29 +00:00
Mathieu Arnold
3255095c16 Extract the larger bsd.port.mk targets into separate scripts.
Refactor all the fetch code so that there are not 6 slightly different
versions of it but one that does it all.

The targets that have been extracted are:
- check-vulnerable
- do-fetch
- fetch-list
- fetch-url-list-int
- fetch-urlall-list
- checksum.
- makesum.
- check-checksum-algorithms

Run the fetch code directly from make makesum instead of calling make
fetch, this is because some port change the options with OPTIONS_*_FORCE
when make(makesum) to be able to add all distfiles in one go, which was
a nice, non working, idea.

PR:		208916
Submitted by:	mat
Exp-run by:	antoine
With hat:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D5997
2016-05-25 15:58:31 +00:00
Mathieu Arnold
6596903add A new stage-qa test has been added, it reports all shared libraries
dependencies that are not part of the port list of dependencies.  It help
finds what is called proxy dependencies.

A is needed by B, and B is needed by C.  If C also needs A, then it needs to
be registered, and this check will tell you to do so.

Right now, it is only reporting the problems, but if you add
PROXYDEPS_FATAL=yes to your environment, it will give an error and will force
you to fix the dependencies.

PR:		195203
Submitted by:	yuri rawbw com (earlier version)
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6531
2016-05-25 11:59:39 +00:00
Mathieu Arnold
f69e8567aa Ease debugging of Mk/Scripts scripts.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6474
2016-05-20 19:01:59 +00:00
Mathieu Arnold
88f3d729d2 Try to simplify how libperl.so is looked for.
PR:		209123
Submitted by:	mat
Exp-run by:	antoine
With hat:	perl@
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6107
2016-05-09 10:12:18 +00:00
Mathieu Arnold
b1fb5a15c1 Extract the users/groups creation into a separate shell script.
This adds a few features:
- it checks that the UID line has the right number of fields [1]
- it tells the user that there are groups that he may want to remove [2]

PR:		208800, 173318 [1], 157546 [2]
Submitted by:	mat
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D5939
2016-04-18 18:39:44 +00:00
Steve Wills
afac595132 exclude all gem stuff from path check 2016-01-21 16:18:42 +00:00
Raphael Kubo da Costa
b73fa50dbc smart_makepatch: Quote PATCH_WRKSRC when regenerating patches.
Put ${PATCH_WRSKRC} within quotes so that expanding it works properly when it
contains spaces. This is required for `make makepatch' to work with
audio/quimup or any other port that has WRKSRC with spaces. Before the patch:

  % make -dl makepatch
  cd: too many arguments
  cd: too many arguments

and the port would be left with an empty files/ directory.

Reviewed by:	marino
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D5011
2016-01-21 10:25:56 +00:00
Mathieu Arnold
c3c55bce6e Be consistent and always enclose shell variables inside braces.
Sponsored by:	Absolight
2016-01-18 16:16:43 +00:00
Mathieu Arnold
bbda11cd53 Rework the logic of the libperl detection, making it a bit more simple,
and also a bit more verbose.

With hat:	perl
Sponsored by:	Absolight
2016-01-18 16:16:39 +00:00
Antoine Brodin
2e5d78ca45 Do not advise to strip object files, it can be harmful
Reported by:	koobs
With hat:	portmgr
2015-12-25 23:22:47 +00:00
Antoine Brodin
c6ef4747ef Do not cache PYTHON_PORTVERSION, it is not invariant between ports 2015-12-25 21:55:34 +00:00
Olli Hauer
3ad4a7aca8 - add additional blank line, else the first line of the error message
is directly appended to the last line from the build output

deamon@ already fixed the typos in the error message (r404229)

PR:		203157
2015-12-23 11:49:08 +00:00
Dmitry Sivachenko
efa42a5fc4 Fix typo in message. 2015-12-22 12:56:28 +00:00