Bug 211097 - mail/postsrsd: Incorrectly uses USE_LDCONFIG (causing warning at install time)
Summary: mail/postsrsd: Incorrectly uses USE_LDCONFIG (causing warning at install time)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 21:56 UTC by Miroslav Lachman
Modified: 2016-07-14 12:05 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)
koobs: merge-quarterly+


Attachments
Remove USE_LDCONFIG (551 bytes, patch)
2016-07-14 11:27 UTC, Kubilay Kocak
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2016-07-13 21:56:53 UTC
I installed postsrsd on 2 machines. Both show this error:

   ldconfig: warning: /usr/local/lib/postsrsd: No such file or directory


Complete example:

# pkg install postsrsd
Updating codelab repository catalogue...
codelab repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        postsrsd: 1.3_1
        base64: 1.5_1

21 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching postsrsd-1.3_1.txz: 100%   15 KiB  15.6kB/s    00:01
Fetching base64-1.5_1.txz: 100%    6 KiB   6.3kB/s    00:01
Checking integrity... done (0 conflicting)
[1/2] Installing base64-1.5_1...
[1/2] Extracting base64-1.5_1: 100%
[2/2] Installing postsrsd-1.3_1...
[2/2] Extracting postsrsd-1.3_1: 100%
ldconfig: warning: /usr/local/lib/postsrsd: No such file or directory



# pkg info -l postsrsd-1.3_1
postsrsd-1.3_1:
        /usr/local/etc/postsrsd.secret
        /usr/local/etc/rc.d/postsrsd
        /usr/local/libdata/ldconfig/postsrsd
        /usr/local/man/man8/postsrsd.8.gz
        /usr/local/sbin/postsrsd



# ll /usr/local/libdata/ldconfig/postsrsd
-rw-r--r--  1 root  wheel    24B Jul  5 20:08 /usr/local/libdata/ldconfig/postsrsd


# cat /usr/local/libdata/ldconfig/postsrsd
/usr/local/lib/postsrsd


# ldd /usr/local/sbin/postsrsd
/usr/local/sbin/postsrsd:
        libc.so.7 => /lib/libc.so.7 (0x800826000)


Postsrsd works fine so I don't know why it installs ldconfig/postsrsd referencing missing file lib/postsrsd.


I built postsrsd in our poudriere with following options:

Name           : postsrsd
Version        : 1.3_1
Installed on   : Tue Jul  5 20:27:49 2016 CEST
Origin         : mail/postsrsd
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : mail
Licenses       : GPLv2+
Maintainer     : ports@bsdserwis.com
WWW            : https://github.com/roehling/postsrsd
Comment        : Postfix Sender Rewriting Scheme daemon
Options        :
        DOCS           : off
Annotations    :
        repo_type      : binary
        repository     : codelab
Flat size      : 36.2KiB
Comment 1 Krzysztof 2016-07-14 00:23:28 UTC
Thank you for your request.

I've checked port's pkg-plist/Makefile. There is no lib/postsrsd anywhere. So it must be created automatically by ports framework (as default file?).

So I have to check it where this entry is generated nad how to disable it for postsrsd port.
Comment 2 Krzysztof 2016-07-14 00:37:30 UTC
I've made a testport of my poudriere server. You can check logfile: https://rtm.bsdserwis.com/poudriere/data/10x64-default/2016-07-14_02h27m56s/logs/postsrsd-1.3_1.log

As you can see this message (lib/postrsd missing) is generate by ldconfig during install. So I think it's "a feature" of pkg install script - there is no such file during generating pkg-plist (during staging). As you can see there is no error during deleting package.

So I think we can close this ticket or redirect it to pkg developers.
Comment 3 Miroslav Lachman 2016-07-14 09:42:13 UTC
I think it is caused by this line in Makefile
USE_LDCONFIG=   ${PREFIX}/lib/${PORTNAME}

If port doesn't install libraries, USE_LDCONFIG should not be there.

https://www.freebsd.org/doc/en/books/porters-handbook/porting-shlibs.html
Comment 4 Krzysztof 2016-07-14 09:45:27 UTC
I don't remember that was added by me (but I'm not sure). So patch will be very simple :-)))

I've one another ticket on postsrsd, so I'll make this patch cummulative.

Thank's a lot for your suggestions.
Comment 5 Miroslav Lachman 2016-07-14 11:06:10 UTC
Thank you for maintaining this port! :)
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 11:16:33 UTC
It doesn't appear that this port installs shared libraries, so I don't know why USE_LDCONFIG is used. It has been in the port since it was first committed.

I'll have a patch for this shortly. The change comes under blanket approval.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 11:21:54 UTC
This should be committed separately (not with other changes) so that it can be MFH'd
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 11:27:53 UTC
Created attachment 172504 [details]
Remove USE_LDCONFIG
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-07-14 12:00:22 UTC
A commit references this bug:

Author: koobs
Date: Thu Jul 14 11:59:19 UTC 2016
New revision: 418529
URL: https://svnweb.freebsd.org/changeset/ports/418529

Log:
  mail/postsrsd: Remove USE_LDCONFIG

  postsrsd does not install shared libraries but the port uses
  USE_LDCONFIG causing the following warning:

  ldconfig: warning: /usr/local/lib/postsrsd: No such file or directory

  Remove USE_LDCONFIG to compensate

  PR:		211097
  Reported by:	Miroslav Lachman <000.fbsd quip cz>
  Approved by:	Krzysztof <ports bsdserwis com> (maintainer)
  Approved by:	portmgr (blanket)
  MFH:		2016Q3

Changes:
  head/mail/postsrsd/Makefile
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 12:03:42 UTC
Comment on attachment 172504 [details]
Remove USE_LDCONFIG

Implicitly approved in comment 4, but also comes under blanket approval
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-07-14 12:05:24 UTC
A commit references this bug:

Author: koobs
Date: Thu Jul 14 12:04:41 UTC 2016
New revision: 418530
URL: https://svnweb.freebsd.org/changeset/ports/418530

Log:
  MFH: r418529 mail/postsrsd: Remove USE_LDCONFIG

  postsrsd does not install shared libraries but the port uses
  USE_LDCONFIG causing the following warning:

  ldconfig: warning: /usr/local/lib/postsrsd: No such file or directory

  Remove USE_LDCONFIG to compensate

  PR:		211097
  Reported by:	Miroslav Lachman <000.fbsd quip cz>
  Approved by:	Krzysztof <ports bsdserwis com> (maintainer)
  Approved by:	portmgr (blanket)

  Approved by:	portmgr (blanket)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/mail/postsrsd/Makefile
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 12:05:59 UTC
Committed and merged, thank you for the report Miroslav