Bug 234069 - ports-mgmt/pkg: 12.0 pkg -r error message
Summary: ports-mgmt/pkg: 12.0 pkg -r error message
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
Keywords: needs-qa
Depends on:
Reported: 2018-12-16 18:13 UTC by Poul-Henning Kamp
Modified: 2019-09-06 09:08 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Poul-Henning Kamp freebsd_committer 2018-12-16 18:13:38 UTC
When I install rsync with 'pkg -r somedir' I get this error:

 [1/2] Fetching rsync-3.1.3.txz: .......... done
 [2/2] Fetching libiconv-1.14_11.txz: .......... done
 Checking integrity... done (0 conflicting)
 [1/2] Installing libiconv-1.14_11...
 [1/2] Extracting libiconv-1.14_11: .......... done
 [2/2] Installing rsync-3.1.3...
 [2/2] Extracting rsync-3.1.3: .......... done
 cp: /usr/local/etc/rsync/rsyncd.conf.sample: No such file or directory
 pkg: POST-INSTALL script failed

The rsync.conf.sample file has been put into place however:

        # ls -l /mnt.newroot/usr/local/etc/rsync/rsyncd.conf.sample  
        -rw-r--r--  1 root  wheel  772 Dec  8 05:28 /mnt.newroot/usr/local/etc/rsync/rsyncd.conf.sample

Rsync is not installed on the running image I do this from, so my
theory is that the "-r somedir" is not getting applied to a cp from
'rsyncd.conf.sample' to 'rsyncd.conf'

Hope somebody with more ports-clue can untangle this...
Comment 1 Baptiste Daroussin freebsd_committer 2019-04-19 14:12:33 UTC
this is not a pkg(8) bug, this is a port bugs, most of the ports are not yet friendly with pkg -r
Comment 2 Poul-Henning Kamp freebsd_committer 2019-04-19 16:16:15 UTC
If pkg -r is not ready for prime time, maybe the manual page should have a footnote to that effect ?
Comment 3 Baptiste Daroussin freebsd_committer 2019-04-19 16:27:10 UTC
pkg -r is ready for prime time, the ports are not!
Comment 4 Poul-Henning Kamp freebsd_committer 2019-04-19 19:00:02 UTC
That may be true in a very specific and narrow sense, but I don't think a lot of people will think of it that way...
Comment 5 Mathieu Arnold freebsd_committer 2019-04-19 19:36:47 UTC
I have never understood the use case of pkg -r, I have always used pkg -c instead.
Comment 6 Baptiste Daroussin freebsd_committer 2019-09-06 09:08:14 UTC
pkg -r is a rootdir, aka no chroot, the main purpose of this option is to allow cross installation.

For instance, create a armv6 image in which you do install packages, but do that from your amd64 laptop.

pkg -r is quite used for such purpose today.
pkg -r is also used by some people packaging stuff but not using the ports tree at all (yes pkg is not entirely tight to the ports tree).

Again @sample is not a pkg thing it is a port thing (see the Keywords directory).
And that @sample is not yet ready for pkg -r. meaning the ports tree is not ready.

If you find a way to document that properly, I will be more that happy to improve the documentation.