From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 24 19:01:37 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 040EC809 for ; Wed, 24 Dec 2014 19:01:37 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F6164AD8 for ; Wed, 24 Dec 2014 19:01:36 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOJ1aZ4044329 for ; Wed, 24 Dec 2014 19:01:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196257] New: freebsd-update does not use BASEDIR as set by -b in backup_kernel () Date: Wed, 24 Dec 2014 19:01:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: manon@manon.de X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- 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: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 19:01:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196257 Bug ID: 196257 Summary: freebsd-update does not use BASEDIR as set by -b in backup_kernel () Product: Base System Version: 10.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: manon@manon.de The followning patch allows the install proicess to complete in BASEDIR, not shuzre if additional places need to be changeds [manon@oscar10-host ~]$ diff -ur /usr/sbin/freebsd-update freebsd-update --- /usr/sbin/freebsd-update 2014-12-13 00:12:36.249505000 +0000 +++ freebsd-update 2014-12-24 18:47:01.000000000 +0000 @@ -2661,23 +2661,25 @@ return 0 fi + BASE_BACKUPKERNELDIR="$BASEDIR/$BACKUPKERNELDIR" + BASE_KERNELDIR="$BASEDIR/$KERNELDIR" # Decide which directory name to use for kernel backups. backup_kernel_finddir - # Remove old kernel backup files. If $BACKUPKERNELDIR was + # Remove old kernel backup files. If $BASE_BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASE_BACKUPKERNELDIR ]; then + rm -fr $BASE_BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR + mkdir -p $BASE_BACKUPKERNELDIR mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mtree -Ue -p "${BASE_BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASE_BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2695,8 +2697,8 @@ fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd $BASE_KERNELDIR && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASE_BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f -- You are receiving this mail because: You are the assignee for the bug.