Bug 225683 - sysutils/sbase: Move PREFIX to avoid conflicts
Summary: sysutils/sbase: Move PREFIX to avoid conflicts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-05 14:17 UTC by Piotr Kubaj
Modified: 2018-03-13 14:45 UTC (History)
1 user (show)

See Also:
pkubaj: maintainer-feedback+


Attachments
patch (8.23 KB, patch)
2018-02-05 14:17 UTC, Piotr Kubaj
no flags Details | Diff
patch (8.02 KB, patch)
2018-03-13 14:22 UTC, Piotr Kubaj
pkubaj: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2018-02-05 14:17:15 UTC
Created attachment 190339 [details]
patch

After inclusion of sbase in ports I noticed that its binaries conflict with binutils and coreutils. This patch moves sbase to its own PREFIX, which users can include in their PATH.

I'm also removing adding ? to "PREFIX =" in config.mk, since ports' PREFIX overrides it.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-13 07:50:41 UTC
How was this tested?  It fails to build.  You might have to remove
_XOPEN_SOURCE=700 from config.mk since it hides flock().

Also since you're using a custom prefix please set
MANDIRS=${PREFIX}/${PORTNAME}/man so that the man pages get gzipped properly
by the framework.

--- flock.o ---
flock.c:21:38: error: use of undeclared identifier 'LOCK_EX'
        int fd, status, savederrno, flags = LOCK_EX, nonblk = 0, oflag = 0;
                                            ^
flock.c:26:12: error: use of undeclared identifier 'LOCK_NB'
                nonblk = LOCK_NB;
                         ^
flock.c:32:11: error: use of undeclared identifier 'LOCK_SH'
                flags = LOCK_SH;
                        ^
flock.c:35:11: error: use of undeclared identifier 'LOCK_UN'
                flags = LOCK_UN;
                        ^
flock.c:38:11: error: use of undeclared identifier 'LOCK_EX'
                flags = LOCK_EX;
                        ^
flock.c:50:6: warning: implicit declaration of function 'flock' is invalid in C99 [-Wimplicit-function-declaration]
        if (flock(fd, flags | nonblk)) {
            ^
1 warning and 6 errors generated.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-13 14:22:17 UTC
Created attachment 191467 [details]
patch

Sorry, I did remove -D_XOPEN_SOURCE=700 (it's removed in the port), but then I added it by accident in this patch.

Corrected patch is attached. MANPREFIX="${PREFIX}/${PORTNAME}/man" is already set in the previous patch in port's Makefile.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-03-13 14:44:01 UTC
A commit references this bug:

Author: tobik
Date: Tue Mar 13 14:43:51 UTC 2018
New revision: 464386
URL: https://svnweb.freebsd.org/changeset/ports/464386

Log:
  sysutils/sbase: Move to separate PREFIX

  This avoids conflicts with base utilities and coreutils

  PR:		225683
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Changes:
  head/sysutils/sbase/Makefile
  head/sysutils/sbase/files/patch-config.mk
  head/sysutils/sbase/pkg-plist
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-13 14:45:27 UTC
Committed. Thanks!

> MANPREFIX="${PREFIX}/${PORTNAME}/man" is already set in the previous patch in port's Makefile.

MANPREFIX != MANDIRS