From owner-svn-ports-head@freebsd.org Tue Sep 5 08:59:09 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA82E21776; Tue, 5 Sep 2017 08:59:09 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 3775E6382E; Tue, 5 Sep 2017 08:59:09 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v858x8bY060744; Tue, 5 Sep 2017 08:59:08 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v858x73G060740; Tue, 5 Sep 2017 08:59:07 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201709050859.v858x73G060740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Tue, 5 Sep 2017 08:59:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r449274 - in head/sysutils/unetbootin: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/sysutils/unetbootin: . files X-SVN-Commit-Revision: 449274 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 08:59:09 -0000 Author: danfe Date: Tue Sep 5 08:59:07 2017 New Revision: 449274 URL: https://svnweb.freebsd.org/changeset/ports/449274 Log: - Rephrase the comment about why we're calling getvfsbyname(3) to make more sense: saving a few CPU cycles by comparing integers instead of strings is just a nice collateral bonus and not really important - Fix free disk space calculation in unetbootin::checkifoutofspace(); previously it was totally bogus (multiplying `f_bavail' and `f_bfree' fields of `struct statfs', really?), and bump threshold to 1024 KB from the original 1024 bytes (sic) - Add a `pkg-message' suggesting a work-around for a common problem of getting "Boot error" message when booting off MBR-partitioned drives - Couple of cosmetic changes: move NO_WRKSUBDIR line where it normally belongs and sort USE_QT4 values; extend port description text a bit Added: head/sysutils/unetbootin/pkg-message (contents, props changed) Modified: head/sysutils/unetbootin/Makefile head/sysutils/unetbootin/files/patch-unetbootin.cpp head/sysutils/unetbootin/pkg-descr Modified: head/sysutils/unetbootin/Makefile ============================================================================== --- head/sysutils/unetbootin/Makefile Tue Sep 5 07:53:13 2017 (r449273) +++ head/sysutils/unetbootin/Makefile Tue Sep 5 08:59:07 2017 (r449274) @@ -3,6 +3,7 @@ PORTNAME= unetbootin PORTVERSION= 655 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/UNetbootin/${PORTVERSION} DISTNAME= ${PORTNAME}-source-${PORTVERSION} @@ -16,11 +17,11 @@ RUN_DEPENDS= 7z:archivers/p7zip \ syslinux:sysutils/syslinux \ mke2fs:sysutils/e2fsprogs -NO_WRKSUBDIR= yes - -USE_QT4= moc_build qmake_build linguisttools_build uic_build \ +USE_QT4= linguisttools_build moc_build qmake_build uic_build \ corelib gui network QMAKE_ARGS= DEFINES+=LOCALBASE=\\\\\\\"${LOCALBASE}\\\\\\\" + +NO_WRKSUBDIR= yes post-patch: @${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' \ Modified: head/sysutils/unetbootin/files/patch-unetbootin.cpp ============================================================================== --- head/sysutils/unetbootin/files/patch-unetbootin.cpp Tue Sep 5 07:53:13 2017 (r449273) +++ head/sysutils/unetbootin/files/patch-unetbootin.cpp Tue Sep 5 08:59:07 2017 (r449274) @@ -24,10 +24,10 @@ + struct statfs *fslist; + + /* -+ * Find out VFS number assigned by kernel for MSDOSFS, -+ * because it's faster to compare numbers than strings. -+ * This also helps to ensure that it is configured in -+ * the kernel. ++ * Find out VFS number assigned by kernel for MSDOSFS. ++ * This helps to ensure that it is configured with the ++ * kernel. As a nice side effect, this also allows to ++ * compare a number instead of "msdosfs" string later. + */ + if (getvfsbyname("msdosfs", &fsconf) == -1) + goto out; @@ -81,7 +81,21 @@ return fulldrivelist; } -@@ -3412,21 +3469,36 @@ void unetbootin::instIndvfl(QString srcfName, QString +@@ -1100,7 +1157,12 @@ bool unetbootin::checkifoutofspace(QString destindir) + struct statfs diskstatS; + if (!statfs(QString(destindir+"/.").toAscii(), &diskstatS)) + { +- if (diskstatS.f_bavail * diskstatS.f_bfree < 1024) ++ /* ++ * Refuse to work if available disk space is less than 1MB ++ * (1024KB). Even this seems very low, but original value ++ * of 1024 bytes was simply ridiculous. ++ */ ++ if (diskstatS.f_bsize / 1024 * diskstatS.f_bavail < 1024) + outofspace = true; + } + #endif +@@ -3412,21 +3474,36 @@ void unetbootin::instIndvfl(QString srcfName, QString srcF.setFileName(QFile::exists("/usr/share/syslinux/memdisk") ? "/usr/share/syslinux/memdisk" : "/usr/lib/syslinux/memdisk"); else if (srcfName == "menu.c32") { @@ -118,7 +132,7 @@ } else if (srcfName == "mbr.bin") { -@@ -3516,11 +3588,19 @@ void unetbootin::runinst() +@@ -3516,11 +3593,19 @@ void unetbootin::runinst() } if (installType == tr("USB Drive")) { @@ -138,7 +152,7 @@ } #ifdef Q_OS_LINUX if (targetDev.contains(QRegExp("p\\d$"))) -@@ -3528,7 +3608,7 @@ void unetbootin::runinst() +@@ -3528,7 +3613,7 @@ void unetbootin::runinst() else rawtargetDev = QString(targetDev).remove(QRegExp("\\d$")); #endif @@ -147,7 +161,7 @@ rawtargetDev = QString(targetDev).remove(QRegExp("s\\d$")); #endif #endif -@@ -4281,21 +4361,47 @@ void unetbootin::runinstusb() +@@ -4281,21 +4366,47 @@ void unetbootin::runinstusb() instIndvfl("libutil.c32", QString("%1libutil.c32").arg(targetPath)); instIndvfl("libcom32.c32", QString("%1libcom32.c32").arg(targetPath)); } @@ -206,7 +220,7 @@ if (this->persistenceSpaceMB > 0) { pdesc1->setText(tr("Setting up persistence")); -@@ -4334,6 +4440,20 @@ void unetbootin::fininstall() +@@ -4334,6 +4445,20 @@ void unetbootin::fininstall() rmFile(mke2fscommand); #endif } Modified: head/sysutils/unetbootin/pkg-descr ============================================================================== --- head/sysutils/unetbootin/pkg-descr Tue Sep 5 07:53:13 2017 (r449273) +++ head/sysutils/unetbootin/pkg-descr Tue Sep 5 08:59:07 2017 (r449274) @@ -1,5 +1,6 @@ UNetbootin allows to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. This is useful when -supplied ISO image cannot be directly written to USB drive or SD card. +supplied ISO image cannot be directly written to USB drive or SD card to +get a bootable media. WWW: http://unetbootin.sourceforge.net/ Added: head/sysutils/unetbootin/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/unetbootin/pkg-message Tue Sep 5 08:59:07 2017 (r449274) @@ -0,0 +1,3 @@ + If SysLinux refuses to boot with a "Boot error" message when written to + a PC partition (slice), try to reformat the drive in raw (or dedicated) + mode (that is, without a partition table), then reinstall things again.