Bug 216083 - ports-mgmt/poudriere-devel: (e.g. at) -r431413: "mv: rename /usr/obj/arm.armv6/nxb-bin to" fails with wrong path: MAKEOBJDIRPREFIX was ignored
Summary: ports-mgmt/poudriere-devel: (e.g. at) -r431413: "mv: rename /usr/obj/arm.armv...
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: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-14 19:10 UTC by Mark Millard
Modified: 2017-11-28 20:24 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Millard 2017-01-14 19:10:21 UTC
I got:

--- _installlinks ---
/usr/bin/chgrp -> /usr/sbin/chown
mv: rename /usr/obj/arm.armv6/nxb-bin to /usr/local/poudriere/jails/head-cortex-a7/nxb-bin: No such file or directory
[01:11:28] ====>> Error: Failed to move native-xtools
[01:11:28] ====>> Error while creating jail, cleaning up.
[01:11:28] ====>> Removing head-cortex-a7 jail... done

But I'd used:

# grep MAKEOBJ /usr/local/etc/poudriere.d/head-cortex-a7-poudriere.conf
export MAKEOBJDIRPREFIX="/usr/obj/poudriere_cross_bld"

so earlier paths were were as shown in the below example:

--- obj ---
/usr/obj/poudriere_cross_bld/arm.armv6/nxb/usr/src/usr.bin/yacc created for /usr/src/usr.bin/yacc

And showing the correct directory's contents:

# ls -lt /usr/obj/poudriere_cross_bld/arm.armv6/
total 2
drwxr-xr-x  3 root  wheel  3 Jan 14 01:45 nxb
drwxr-xr-x  5 root  wheel  5 Jan 14 01:45 nxb-bin
drwxr-xr-x  3 root  wheel  3 Jan 14 01:00 usr


The /usr/obj/arm.armv6/nxb-bi path construction for this mv is ignoring
MAKEOBJDIRPREFIX .
Comment 1 Mark Millard 2017-01-14 19:42:41 UTC
(In reply to Mark Millard from comment #0)

In /usr/local/share/poudriere/jail.sh :

build_and_install_world() {
. . .
        if [ ${XDEV} -eq 1 ]; then
                msg "Starting make native-xtools with ${PARALLEL_JOBS} jobs"
                ${MAKE_CMD} -C /usr/src native-xtools ${MAKE_JOBS} \
                    ${MAKEWORLDARGS} || err 1 "Failed to 'make native-xtools'"
                XDEV_TOOLS=/usr/obj/${TARGET}.${TARGET_ARCH}/nxb-bin
                rm -rf ${JAILMNT}/nxb-bin || err 1 "Failed to remove old native-xtools"

has XDEV_TOOLS set incorrectly when MAKEOBJDIRPREFIX is set to something
other than /usr/obj .

May be something more like:

                XDEV_TOOLS=${MAKEOBJDIRPREFIX:-/usr/obj}/${TARGET}.${TARGET_ARCH}/nxb-bin

for the XDEV_TOOLS assignment would be appropriate.
Comment 2 Mark Millard 2017-01-14 20:06:53 UTC
(In reply to Mark Millard from comment #1)

I see I omitted the original code's line with the use of ${XDEV_TOOLS} . So
here is the code with the proposed change but also showing the (unchanged)
mv line as well:

. . .
        if [ ${XDEV} -eq 1 ]; then
                msg "Starting make native-xtools with ${PARALLEL_JOBS} jobs"
                ${MAKE_CMD} -C /usr/src native-xtools ${MAKE_JOBS} \
                    ${MAKEWORLDARGS} || err 1 "Failed to 'make native-xtools'"
                XDEV_TOOLS=${MAKEOBJDIRPREFIX:-/usr/obj}/${TARGET}.${TARGET_ARCH}/nxb-bin
                rm -rf ${JAILMNT}/nxb-bin || err 1 "Failed to remove old native-xtools"
                mv ${XDEV_TOOLS} ${JAILMNT} || err 1 "Failed to move native-xtools"
. . .

(I do not claim tabs vs. spaces have been preserved.)
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2017-10-27 00:36:05 UTC
Thanks, fixed in git.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-10-27 23:11:36 UTC
A commit references this bug:

Author: bdrewery
Date: Fri Oct 27 23:11:19 UTC 2017
New revision: 453027
URL: https://svnweb.freebsd.org/changeset/ports/453027

Log:
  Update to 3.0-2583-g7913a064

        - jail -x: Tell where native-xtools is being built
        - XDEV: Support the fixed native-xtools build target in FreeBSD head
          that builds from the Jail rather than the host system's /usr/src. [1]
        - Add XDEV_SRC_JAIL, if set will use the jail's source for xdev.  This
          should only be used in special cases and will effectively default to
          on for head and soon for stable/11.
        - Record flavor for port build results.
        - jail -c: Fix EMULATOR being unset if ran via poudriered
        - Assert EMULATOR is not empty on use
        - .poudriere.ports.queued: Store flavor for dependencies
        - jail -x: Respect MAKEOBJDIRPREFIX [2]
        - jail -c: Disallow using a colon (:) in jail name.

  PR:	216083 [1]
  PR:	215541 [2]

Changes:
  head/ports-mgmt/poudriere-devel/Makefile
  head/ports-mgmt/poudriere-devel/distinfo
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-10-29 01:20:52 UTC
A commit references this bug:

Author: bdrewery
Date: Sun Oct 29 01:20:11 UTC 2017
New revision: 453087
URL: https://svnweb.freebsd.org/changeset/ports/453087

Log:
  - Update to 3.1.22

  Changes: https://github.com/freebsd/poudriere/wiki/release_notes_3122

  PR:	216083
  PR:	215541

Changes:
  head/ports-mgmt/poudriere/Makefile
  head/ports-mgmt/poudriere/distinfo
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-11-28 20:24:59 UTC
A commit references this bug:

Author: bdrewery
Date: Tue Nov 28 20:24:27 UTC 2017
New revision: 455072
URL: https://svnweb.freebsd.org/changeset/ports/455072

Log:
  MFH: r453087 r453882

  - Update to 3.1.22

  Changes: https://github.com/freebsd/poudriere/wiki/release_notes_3122

  PR:	216083
  PR:	215541

  Avoid running git and finding PORTSDIR/.git.

  Reported by:	xmj

  Approved by:	portmgr (implicit)

Changes:
_U  branches/2017Q4/
  branches/2017Q4/ports-mgmt/poudriere/Makefile
  branches/2017Q4/ports-mgmt/poudriere/distinfo
  branches/2017Q4/ports-mgmt/poudriere-devel/Makefile