Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2013 23:51:48 -0500
From:      CyberLeo Kitsana <cyberleo@cyberleo.net>
To:        Jack Mc Lauren <jack.mclauren@yahoo.com>
Cc:        FreeBSD Global Users Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: make release fails
Message-ID:  <51A97DE4.2080408@cyberleo.net>
In-Reply-To: <1369309963.43730.YahooMailNeo@web160101.mail.bf1.yahoo.com>
References:  <1369309963.43730.YahooMailNeo@web160101.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/23/2013 06:52 AM, Jack Mc Lauren wrote:
> Hi
<snip>
> find //usr/obj/usr/src/release/dist/doc -empty -delete
> find: -delete: //usr/obj/usr/src/release/dist/doc: relative path potentially not
>  safe
> *** [distributeworld] Error code 1
<snip>
> What's wrong with this?
> Thanks in advance

Huh. Apparently I ran across this myself in the past, since I found a
patch lurking in my source tree.

----8<----
diff --git a/Makefile.inc1 b/Makefile.inc1
index 4567e5d..1830483 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -685,7 +685,7 @@ distributeworld installworld: installcheck
            ${IMAKEENV} rm -rf ${INSTALLTMP}
 .if make(distributeworld)
 .for dist in ${EXTRA_DISTRIBUTIONS}
-       find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete
+       find ${DESTDIR}/${DISTDIR}/${dist} -empty -exec rmdir {} +
 .endfor
 .endif

----8<----

The reason this occurs is because you and I are building with NODOC,
which leaves dist/doc empty, and the above find construct will refuse to
-delete if the directory specified on the command line is one of the
ones that would have been deleted.

Either patch the makefile as above, tell make to ignore the return code
of this find invocation, or put some non-empty files into
/usr/obj/usr/src/release/dist/doc during the release building process
(like a README pointing to the docs tarball on the mirrors) to make it
not trigger the empty condition.

Hope this helps!

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo@CyberLeo.Net>

Furry Peace! - http://www.fur.com/peace/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51A97DE4.2080408>