From nobody Mon May 09 13:48:54 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E067D1AC17DC for ; Mon, 9 May 2022 13:48:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KxjFL4dw5z3tP4 for ; Mon, 9 May 2022 13:48:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77FAE12337 for ; Mon, 9 May 2022 13:48:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 249DmspP093237 for ; Mon, 9 May 2022 13:48:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 249Dmsqr093236 for bugs@FreeBSD.org; Mon, 9 May 2022 13:48:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263880] make clean, cleandir doesn't clean /usr/obj Date: Mon, 09 May 2022 13:48:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jon@xyinn.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652104134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VdQkkAzbvqnWg04vVyS0mIVJPPs8Ny49KwOdq+MmFJA=; b=hsFN3zNA0qCchR/YwCL7YQ8sTiSqTW2bYrZ7bxlpPTLNFeyly98cJNcaIm+bl8DCAVaFZu I4H9uTLjV1SboiDkaHwrh0JTZQkx6Jibae/VeORqP8zhH83lkXaiExnZXvByF5MSt6BRMk R/PzJ9boX+NtHGFl3o3dj9OhA4VaxK5/4w16cIKNxIr7GuZ9gJTM6kKwmFK1ErZc4l4OJg z9xHjudNnlaxHgQ1Ik5S4D8tq5to4fQ7EW3EorztYfRZu9g6oYjveDug7h6uHfMZVYWK/a A95bkeKrn56GTZ2du4doqkrQZU+NZ3d0fVJt6Fu+5Qj94LVbD7GYuZ22TLnOvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652104134; a=rsa-sha256; cv=none; b=fBJGrEluGnR7dIa/q4jlxjFgcaKxep0Eyss+MNNaIW0LuAZcbNydZsNbCSB9EeiobOjSA5 Q7r+roCWAPYoY+cWL1kweRSoMrQ06va/Ar0vcCoVwGMQBtE35/J24sve/4hRrVWFgrM5SN zrELylnf/Ke/qzdfN4mMrB2vlMoJFuZndlKDfYuMVcE2nsq1F4tADAuvZJzzF2BhKsrOHq HJtrUp2YbtxPC1NXBXO5RWrNRTiMdwy1J5RJPJsmAhlthJPBAbGxny5X72ORZFcvRvobFz 4dkIsw7C7GbyCYqh20kwTJtr4Z3A+/JcEF/rXFwlbchpwhpen6RZ4tKWm0St5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263880 Bug ID: 263880 Summary: make clean, cleandir doesn't clean /usr/obj Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jon@xyinn.org Hello, Apologies if this is not a bug and just a lack of understanding on my part,= but looking at build(7), the description for 'clean' says: "Remove any files created during the build process." and the description for 'cleandir' mentions removing the 'canonical object directory if it exists or perform actions equivalent to 'make clean cleandepend'. In my testing, I noticed that if I do a 'make clean' or 'make cleandir' (ev= en if I run cleandir twice), it doesn't actually clean up my /usr/obj director= y. Only a 'make cleanworld' cleans it: root@leslie:/usr/src # find /usr/obj /usr/obj /usr/obj/usr /usr/obj/usr/src /usr/obj/usr/src/amd64.amd64 A quick test I did was the following: -- I originally did the touch on /usr/obj but I noticed that the cleanworld command only cleans up stuff under the particular architecture rather than a flat out nuking of /usr/obj. I'm guessing this is possibly to support a cro= ss building workflow. root@leslie:/usr/src # touch /usr/obj/usr/src/amd64.amd64/lol root@leslie:/usr/src # ls -l /usr/obj/usr/src/amd64.amd64/ total 1 -rw-r--r-- 1 root wheel 0 May 9 09:43 lol root@leslie:/usr/src # make cleanworld (cd /usr/obj/usr/src/amd64.amd64/ && rm -rf *) chflags -R 0 /usr/obj/usr/src/amd64.amd64/ (cd /usr/obj/usr/src/amd64.amd64/ && rm -rf *) root@leslie:/usr/src # ls -l /usr/obj/usr/src/amd64.amd64/ total 0 ---- My expectation for a 'make clean' in /usr/src would be that all of the build files created are cleaned up (including /usr/obj). root@leslie:/usr/src # touch /usr/obj/usr/src/amd64.amd64/lol root@leslie:/usr/src # ls -l /usr/obj/usr/src/amd64.amd64/ total 1 -rw-r--r-- 1 root wheel 0 May 9 09:44 lol root@leslie:/usr/src # make cleandir ... root@leslie:/usr/src # ls -l /usr/obj/usr/src/amd64.amd64/ total 1 -rw-r--r-- 1 root wheel 0 May 9 09:44 lol --- Another related note (which I'll need confirmation for) is if /usr/obj is e= ven re-used during subsequent builds. The handbook mentions that /usr/obj can s= peed up subsequent builds, but I've noticed that the first thing a build does is pretty much to cleanworld before rebuilding. That kinda defeats the purpose= of re-using those objects. There's this old link (seems forked by someone) whe= re in the past it mentioned /usr/obj is not used afterwards so it could be deleted, but I'm not sure if behavior in FreeBSD changed from that time of = that post: https://people.freebsd.org/~rodrigc/doc/handbook/makeworld.html --=20 You are receiving this mail because: You are the assignee for the bug.=