Restore 'umount -f' usage for now as older releases do not support 'umount -n'.

A better fix will be coming soon.

Reported by:	ohauer
This commit is contained in:
Bryan Drewery 2017-02-22 20:35:50 +00:00
parent 70eec3b6cc
commit c2e8980f0d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434639
4 changed files with 53 additions and 28 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= poudriere
DISTVERSION= 3.1.99.20170221
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/bdrewery/${PORTNAME}/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
@ -21,8 +21,6 @@ GH_ACCOUNT= freebsd
GH_TAGNAME= 3.0-1822-ge8f0d3e
#DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}
BROKEN= umount -n not supported before 11, working on a fix
GNU_CONFIGURE= yes
ETCDIR= ${PREFIX}/etc/poudriere.d

View File

@ -1,6 +1,4 @@
diff --git src/libexec/poudriere/cached/cached.c src/libexec/poudriere/cached/cached.c
index 68ba6e6..ce266cd 100644
--- src/libexec/poudriere/cached/cached.c
--- src/libexec/poudriere/cached/cached.c.orig 2017-02-20 23:37:27 UTC
+++ src/libexec/poudriere/cached/cached.c
@@ -26,6 +26,7 @@

View File

@ -1,11 +1,35 @@
--- src/share/poudriere/common.sh.orig 2015-11-30 17:26:13 UTC
--- src/share/poudriere/common.sh.orig 2017-02-22 20:34:08 UTC
+++ src/share/poudriere/common.sh
@@ -1856,7 +1856,7 @@ jail_stop() {
fi
msg "Umounting file systems"
destroyfs ${MASTERMNT} jail || :
- rm -rfx ${MASTERMNT}/../
+ rm -rf ${MASTERMNT}/../
export STATUS=0
@@ -3216,7 +3216,7 @@ build_pkg() {
if [ ${TMPFS_LOCALBASE} -eq 1 -o ${TMPFS_ALL} -eq 1 ]; then
if [ -f "${mnt}/${LOCALBASE:-/usr/local}/.mounted" ]; then
- umount -n ${mnt}/${LOCALBASE:-/usr/local}
+ umount -f ${mnt}/${LOCALBASE:-/usr/local}
fi
mnt_tmpfs localbase ${mnt}/${LOCALBASE:-/usr/local}
do_clone "${MASTERMNT}/${LOCALBASE:-/usr/local}" \
@@ -3322,7 +3322,7 @@ stop_build() {
_my_path mnt
if [ -f "${mnt}/.npkg_mounted" ]; then
- umount -n "${mnt}/.npkg"
+ umount -f "${mnt}/.npkg"
rm -f "${mnt}/.npkg_mounted"
fi
rm -rf "${PACKAGES}/.npkg/${PKGNAME}"
@@ -4693,12 +4693,12 @@ clean_restricted() {
bset status "clean_restricted:"
# Remount rw
# mount_nullfs does not support mount -u
- umount -n ${MASTERMNT}/packages
+ umount -f ${MASTERMNT}/packages
mount_packages
injail /usr/bin/make -s -C /usr/ports -j ${PARALLEL_JOBS} \
RM="/bin/rm -fv" ECHO_MSG="true" clean-restricted
# Remount ro
- umount -n ${MASTERMNT}/packages
+ umount -f ${MASTERMNT}/packages
mount_packages -o ro
}
# Don't override if there is a failure to grab the last status.

View File

@ -1,15 +1,20 @@
--- src/share/poudriere/include/fs.sh.orig 2016-05-18 22:58:28 UTC
--- src/share/poudriere/include/fs.sh.orig 2017-02-22 20:34:08 UTC
+++ src/share/poudriere/include/fs.sh
@@ -191,10 +191,10 @@ destroyfs() {
zfs destroy -rf ${fs}
rmdir ${mnt}
else
- rm -rfx ${mnt} 2>/dev/null || :
+ rm -rf ${mnt} 2>/dev/null || :
if [ -d "${mnt}" ]; then
chflags -R 0 ${mnt}
- rm -rfx ${mnt}
+ rm -rf ${mnt}
fi
@@ -98,7 +98,7 @@ umountfs() {
[ -d "${mnt}" ] || return 0
mnt=$(realpath ${mnt})
- if ! findmounts "${mnt}" "${pattern}" | xargs umount -n; then
+ if ! findmounts "${mnt}" "${pattern}" | xargs umount -f; then
findmounts "${mnt}" "${pattern}" | xargs umount -fv || :
fi
}
@@ -198,7 +198,7 @@ destroyfs() {
umountfs ${mnt} 1
if [ ${TMPFS_ALL} -eq 1 ]; then
if [ -d "${mnt}" ]; then
- if ! umount -n "${mnt}" 2>/dev/null; then
+ if ! umount -f "${mnt}" 2>/dev/null; then
umount -f "${mnt}" 2>/dev/null || :
fi
fi