Bug 196147 - freebsd-update on 10.1 gives: rmdir: ///: Is a directory
Summary: freebsd-update on 10.1 gives: rmdir: ///: Is a directory
Status: Closed DUPLICATE of bug 196055
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-20 02:46 UTC by Sydney Meyer
Modified: 2014-12-22 21:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sydney Meyer 2014-12-20 02:46:38 UTC
Hello,

"freebsd-update fetch install" on a fresh 10.1 (amd64) install gives:

Installing updates...rmdir: ///: Is a directory
 done.


###

root@carl:/home/sydney # freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 5 mirrors found.
Fetching public key from update5.freebsd.org... done.
Fetching metadata signature for 10.1-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 23 patches.....10....20. done.
Applying patches... done.
Fetching 461 files... done.

The following files will be removed as part of updating to 10.1-RELEASE-p2:
/

The following files will be added as part of updating to 10.1-RELEASE-p2:
/libexec/ld-elf32.so.1
/usr/bin/ldd32
/usr/lib32/Scrt1.o
...


root@carl:/home/sydney # freebsd-update install
Installing updates...rmdir: ///: Is a directory
 done.


root@carl:/home/sydney # freebsd-update IDS
Looking up update.FreeBSD.org mirrors... 5 mirrors found.
Fetching metadata signature for 10.1-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system... done.
/ is a directory, but should be a 
/etc/group has SHA256 hash 0408aff6ef103f
...
Comment 1 Sydney Meyer 2014-12-21 03:01:17 UTC

*** This bug has been marked as a duplicate of bug 196055 ***
Comment 2 commit-hook freebsd_committer 2014-12-22 21:53:35 UTC
A commit references this bug:

Author: cperciva
Date: Mon Dec 22 21:52:38 UTC 2014
New revision: 276086
URL: https://svnweb.freebsd.org/changeset/base/276086

Log:
  Strip trailing / characters from paths in "not present" index entries, not
  just "directory" entries.

  Prior to this commit, if / was added as part of a security update (how? In
  the most recent case, because lib32 was accidentally omitted and was then
  re-added, and every installer distribution set gets its own paths) then
  the code which was supposed to filter out updates to deleted parts of the
  base system (if someone decides to delete / then we shouldn't re-create it
  for them) would instead get confused and decided that while / should exist,
  // should not exist and needs to be removed.

  This fixes the bug which caused freebsd-update to want to delete / (which is
  harmless, since `rm /` fails, but scary nonetheless).  A workaround is being
  applied to the update bits in order to avoid triggering the bug on unpatched
  systems.

  PR:		196055, 196091, 196147

Changes:
  head/usr.sbin/freebsd-update/freebsd-update.sh