Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jul 2021 10:02:15 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 052247b68119 - main - sysutils/unetbootin: update UNetbootin to the latest version (+)
Message-ID:  <202107031002.163A2Fbp069195@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=052247b681199ebbf6e6c5d99a4a28effd078ec0

commit 052247b681199ebbf6e6c5d99a4a28effd078ec0
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-07-03 10:01:02 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-07-03 10:01:21 +0000

    sysutils/unetbootin: update UNetbootin to the latest version (+)
    
    - Update to version 702, which finally integrates Qt 5 support,
      allowing to remove those hunks from our patches
    - Show program version in the main window title (some users like
      to post screenshots when reporting problems, this would make
      more obvious which version they were using)
---
 sysutils/unetbootin/Makefile                   |   4 +-
 sysutils/unetbootin/distinfo                   |   6 +-
 sysutils/unetbootin/files/patch-main.cpp       |  46 +--
 sysutils/unetbootin/files/patch-unetbootin.cpp | 439 +------------------------
 sysutils/unetbootin/files/patch-unetbootin.h   |  64 +---
 sysutils/unetbootin/files/patch-unetbootin.pro |  23 --
 6 files changed, 23 insertions(+), 559 deletions(-)

diff --git a/sysutils/unetbootin/Makefile b/sysutils/unetbootin/Makefile
index 29236a3547b7..9515de782991 100644
--- a/sysutils/unetbootin/Makefile
+++ b/sysutils/unetbootin/Makefile
@@ -1,7 +1,7 @@
 # Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
 
 PORTNAME=	unetbootin
-PORTVERSION=	681
+PORTVERSION=	702
 CATEGORIES=	sysutils
 MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTVERSION}/
 DISTNAME=	${PORTNAME}-source-${PORTVERSION}
@@ -25,6 +25,8 @@ NO_WRKSUBDIR=	yes
 post-patch:
 	@${REINPLACE_CMD} -e 's,/usr/,${PREFIX}/,g' \
 		${WRKSRC}/main.cpp
+	@${REINPLACE_CMD} -e 's,this->setWindowTitle(UNETBOOTINB,& \
+		" ${PORTVERSION}",' ${WRKSRC}/unetbootin.cpp
 
 do-configure:
 	cd ${CONFIGURE_WRKSRC} && ${LUPDATE} unetbootin.pro \
diff --git a/sysutils/unetbootin/distinfo b/sysutils/unetbootin/distinfo
index fd290e216fe2..6a63664fc877 100644
--- a/sysutils/unetbootin/distinfo
+++ b/sysutils/unetbootin/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1591840919
-SHA256 (unetbootin-source-681.tar.gz) = e10fced1d504deb93e788fceb556c3af8528e2e5e4f67e0360059bc805ba4031
-SIZE (unetbootin-source-681.tar.gz) = 770455
+TIMESTAMP = 1612431180
+SHA256 (unetbootin-source-702.tar.gz) = dabc6330937a95fb2707dbd9f52e5a30fce04bd6b413d6ab92079226692346ba
+SIZE (unetbootin-source-702.tar.gz) = 769682
diff --git a/sysutils/unetbootin/files/patch-main.cpp b/sysutils/unetbootin/files/patch-main.cpp
index 9feb8efa68d4..0439c32c62cc 100644
--- a/sysutils/unetbootin/files/patch-main.cpp
+++ b/sysutils/unetbootin/files/patch-main.cpp
@@ -1,15 +1,6 @@
---- main.cpp.orig	2016-05-16 08:57:42 UTC
+--- main.cpp.orig	2021-02-04 09:18:21 UTC
 +++ main.cpp
-@@ -9,6 +9,8 @@ This program is distributed in the hope that it will b
- 
- #include "unetbootin.h"
- 
-+#include <QMessageBox>
-+
- #ifdef Q_OS_WIN32
- 
- void configsysUndo(QString uninstPathL)
-@@ -292,9 +294,9 @@ int main(int argc, char **argv)
+@@ -294,9 +294,9 @@ int main(int argc, char **argv)
  			}
              argsconc += "\"rootcheck=no\"";
              argsconcSingleQuote += "'rootcheck=no'";
@@ -21,7 +12,7 @@
              gksuarg1 += QString("%1 %2").arg(app.applicationFilePath()).arg(argsconc);
              gksuarg1 += QString("'");
              QStringList gksuargs;
-@@ -370,7 +372,7 @@ int main(int argc, char **argv)
+@@ -395,7 +395,7 @@ int main(int argc, char **argv)
  	#ifdef Q_OS_WIN32
  	QSettings chkinst("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UNetbootin", QSettings::NativeFormat);
  	#endif
@@ -30,36 +21,7 @@
  	QSettings chkinst(QSettings::SystemScope, "UNetbootin");
  	#endif
  #ifndef Q_OS_MAC
-@@ -380,18 +382,16 @@ int main(int argc, char **argv)
- 		uninstmsgb.setIcon(QMessageBox::Information);
- 		uninstmsgb.setWindowTitle(uninstaller::tr("%1 Uninstaller").arg(UNETBOOTINB));
- 		uninstmsgb.setText(uninstaller::tr("%1 is currently installed. Remove the existing version?").arg(UNETBOOTINB));
-- 		uninstmsgb.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
-- 		switch (uninstmsgb.exec())
-- 		{
-- 			case QMessageBox::Ok:
-- 			{
-- 				ubnUninst();
--			}
--			case QMessageBox::Cancel:
--				break;
--	 		default:
--				break;
-- 		}
-+		uninstmsgb.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
-+		switch (uninstmsgb.exec())
-+		{
-+		case QMessageBox::Ok:
-+			ubnUninst();
-+			break;
-+		case QMessageBox::Cancel:
-+		default:
-+			break;
-+		}
- 		return 0;
- 	}
- #endif
-@@ -405,7 +405,7 @@ int main(int argc, char **argv)
+@@ -428,7 +428,7 @@ int main(int argc, char **argv)
  	icon.addFile(":/unetbootin_24.png", QSize(24,24));
  	icon.addFile(":/unetbootin_32.png", QSize(32,32));
  	icon.addFile(":/unetbootin_48.png", QSize(48,48));
diff --git a/sysutils/unetbootin/files/patch-unetbootin.cpp b/sysutils/unetbootin/files/patch-unetbootin.cpp
index b97a3cc79a22..f697ec06c21e 100644
--- a/sysutils/unetbootin/files/patch-unetbootin.cpp
+++ b/sysutils/unetbootin/files/patch-unetbootin.cpp
@@ -1,64 +1,6 @@
---- unetbootin.cpp.orig	2019-09-29 00:26:32 UTC
+--- unetbootin.cpp.orig	2020-11-09 01:52:38 UTC
 +++ unetbootin.cpp
-@@ -9,6 +9,11 @@ This program is distributed in the hope that it will b
- 
- #include "unetbootin.h"
- 
-+#include <QMessageBox>
-+#include <QFileDialog>
-+#include <QProgressDialog>
-+#include <QDebug>
-+
- static const QList<QRegExp> ignoredtypesbothRL = QList<QRegExp>()
- << QRegExp("isolinux.bin$", Qt::CaseInsensitive)
- << QRegExp("isolinux.cfg$", Qt::CaseInsensitive)
-@@ -101,8 +106,8 @@ void callexternappT::run()
- void callexternappWriteToStdinT::run()
- {
- 	QProcess lnexternapp;
--    lnexternapp.start("\"" + execFile + "\" " + execParm);
--	lnexternapp.write(writeToStdin.toAscii().data());
-+	lnexternapp.start("\"" + execFile + "\" " + execParm);
-+	lnexternapp.write(writeToStdin.toLatin1().data());
- 	lnexternapp.closeWriteChannel();
- 	lnexternapp.waitForFinished(-1);
- 	retnValu = QString(lnexternapp.readAll());
-@@ -133,16 +138,6 @@ void copyfileT::run()
- 	emit finished();
- }
- 
--ubngetrequestheader::ubngetrequestheader(QString urhost, QString urpath)
--{
--	this->setRequest("GET", urpath);
--	this->setValue("HOST", urhost);
--	this->setValue("User-Agent", "UNetbootin/1.1.1");
--//	this->setValue("User-Agent", "Wget/1.10.2");
--	this->setValue("Accept", "*/*");
--	this->setValue("Connection", "Keep-Alive");
--}
--
- randtmpfile::randtmpfile(QString rfpath, QString rfextn)
- {
- 	QString basefn = getrandfilename(rfpath, rfextn);
-@@ -159,7 +154,7 @@ QString randtmpfile::getrandfilename(QString rfpath, Q
- 	}
- 	return basefn;
- }
--
-+/*
- void nDirListStor::sAppendSelfUrlInfoList(QUrlInfo curDirUrl)
- {
- 	if (curDirUrl.isValid() && curDirUrl.isReadable() && curDirUrl.isFile() && curDirUrl.size() > nMinFileSizeBytes && curDirUrl.size() < nMaxFileSizeBytes)
-@@ -171,7 +166,7 @@ void nDirListStor::sAppendSelfUrlInfoList(QUrlInfo cur
- 		nDirFileListSL.append(curDirUrl.name());
- 	}
- }
--
-+*/
- unetbootin::unetbootin(QWidget *parent)
- 	: QWidget(parent)
- {
-@@ -301,8 +296,13 @@ bool unetbootin::ubninitialize(QList<QPair<QString, QS
+@@ -296,8 +296,13 @@ bool unetbootin::ubninitialize(QList<QPair<QString, QS
  	#endif
  	sevzcommand = locatecommand("7z", tr("either"), "p7zip-full");
  #endif // Q_OS_LINUX
@@ -73,33 +15,7 @@
      if (ubntmpf.isEmpty() || ubntmpf == "/")
      {
          ubntmpf = "/tmp/";
-@@ -471,19 +471,23 @@ bool unetbootin::ubninitialize(QList<QPair<QString, QS
- 		{
- 			if (psecond.contains("listdistros", Qt::CaseInsensitive))
- 			{
-+				QTextStream out(stdout);
- 				for (int i = 1; i < this->distroselect->count(); ++i)
- 				{
--					printf("%s\n", this->distroselect->itemText(i).toAscii().constData());
-+					out << this->distroselect->itemText(i) << endl;
- 				}
-+				out.flush();
- 				QApplication::exit();
- 				exit(0);
- 			}
- 			else if (psecond.contains("listversions", Qt::CaseInsensitive))
- 			{
-+				QTextStream out(stdout);
- 				for (int i = 0; i < this->dverselect->count(); ++i)
- 				{
--					printf("%s\n", this->dverselect->itemText(i).toAscii().constData());
-+					out << this->dverselect->itemText(i) << endl;
- 				}
-+				out.flush();
- 				QApplication::exit();
- 				exit(0);
- 			}
-@@ -649,6 +653,57 @@ QStringList unetbootin::listsanedrives()
+@@ -648,6 +653,57 @@ QStringList unetbootin::listsanedrives()
  				}
  				*/
  		#endif
@@ -157,7 +73,7 @@
  #ifdef Q_OS_MAC
  QString systemprofilertext = callexternapp("system_profiler", "SPStorageDataType");
  QRegExp filesystemregex("File System: (.+)\\n");
-@@ -669,6 +724,7 @@ for (int i = 0; i < filesystemlist.size(); ++i)
+@@ -668,6 +724,7 @@ for (int i = 0; i < filesystemlist.size(); ++i)
  }
  #endif
  	}
@@ -165,33 +81,9 @@
  	return fulldrivelist;
  }
  
-@@ -700,17 +756,17 @@ QStringList unetbootin::listalldrives()
- 	return fulldrivelist;
- }
- 
--void unetbootin::on_typeselect_currentIndexChanged(int typeselectIndex)
-+void unetbootin::on_typeselect_currentIndexChanged(int)
- {
- 	refreshdriveslist();
- }
- 
--void unetbootin::on_dverselect_currentIndexChanged()
-+void unetbootin::on_dverselect_currentIndexChanged(int)
- {
- 	radioDistro->setChecked(true);
- }
- 
--void unetbootin::on_diskimagetypeselect_currentIndexChanged()
-+void unetbootin::on_diskimagetypeselect_currentIndexChanged(int)
- {
- 	radioFloppy->setChecked(true);
- }
-@@ -1098,9 +1154,14 @@ bool unetbootin::checkifoutofspace(QString destindir)
- 	bool outofspace = false;
- 	#ifdef Q_OS_UNIX
+@@ -1099,7 +1156,12 @@ bool unetbootin::checkifoutofspace(QString destindir)
  	struct statfs diskstatS;
--	if (!statfs(QString(destindir+"/.").toAscii(), &diskstatS))
-+	if (!statfs(QString(destindir+"/.").toLatin1(), &diskstatS))
+ 	if (!statfs(QString(destindir+"/.").toLatin1(), &diskstatS))
  	{
 -		if (diskstatS.f_bavail * diskstatS.f_bfree < 1024)
 +		/*
@@ -203,306 +95,7 @@
  			outofspace = true;
  	}
  	#endif
-@@ -2620,31 +2681,27 @@ void unetbootin::downloadfile(QString fileurl, QString
- 	{
- 		rmFile(targetfile);
- 	}
--	QUrl dlurl(fileurl);
--	bool isftp = false;
--	if (dlurl.scheme() == "ftp")
--	{
--		isftp = true;
--	}
--	QHttp dlhttp;
--	QFtp dlftp;
-+	QNetworkAccessManager manager;
-+	QNetworkRequest dlurl(fileurl);
-+	QNetworkReply * networkReply = manager.get(dlurl);
-+
- 	QEventLoop dlewait;
- 	pdesc5->setText("");
- 	pdesc4->setText(tr("Downloading files, please wait..."));
- 	pdesc3->setText(tr("<b>Source:</b> <a href=\"%1\">%1</a>").arg(fileurl));
- 	pdesc2->setText(tr("<b>Destination:</b> %1").arg(targetfile));
- 	pdesc1->setText(tr("<b>Downloaded:</b> 0 bytes"));
--	QString realupath = QString(fileurl).remove(0, fileurl.indexOf(QString("://%1").arg(dlurl.host())) + QString("://%1").arg(dlurl.host()).length());
--	if (isftp)
--	{
--		connect(&dlftp, SIGNAL(done(bool)), &dlewait, SLOT(quit()));
--		connect(&dlftp, SIGNAL(dataTransferProgress(qint64, qint64)), this, SLOT(dlprogressupdate64(qint64, qint64)));
--	}
--	else
--	{
--		connect(&dlhttp, SIGNAL(done(bool)), &dlewait, SLOT(quit()));
--		connect(&dlhttp, SIGNAL(dataReadProgress(int, int)), this, SLOT(dlprogressupdate(int, int)));
--	}
-+
-+	QUrl redirectUrl;
-+	bool downloadFailed = false;
-+	QNetworkReply::NetworkError errorCode;
-+
-+	connect(networkReply, &QNetworkReply::finished, &dlewait, &QEventLoop::quit);
-+	connect(networkReply, &QNetworkReply::downloadProgress, this, &unetbootin::dlprogressupdate64);
-+	connect(networkReply, &QNetworkReply::redirected, [&](const QUrl &url){ redirectUrl = url; });
-+	connect(networkReply, static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
-+			[&](QNetworkReply::NetworkError code){ downloadFailed = true; errorCode = code; });
-+
- 	QFile dloutfile;
- 	if (installType == tr("USB Drive"))
- 	{
-@@ -2655,82 +2712,38 @@ void unetbootin::downloadfile(QString fileurl, QString
- 		dloutfile.setFileName(targetfile);
- 	}
- 	dloutfile.open(QIODevice::WriteOnly);
--	if (isftp)
--	{
--		dlftp.connectToHost(dlurl.host());
--		dlftp.login();
--		dlftp.get(realupath, &dloutfile);
--	}
--	else
--	{
--		dlhttp.setHost(dlurl.host());
--		ubngetrequestheader dlrequest(dlurl.host(), realupath);
--		dlhttp.request(dlrequest, 0, &dloutfile);
--	}
-+
-+	connect(networkReply, &QNetworkReply::downloadProgress, [&](qint64, qint64){
-+		dloutfile.write(networkReply->readAll());
-+	});
-+
- 	dlewait.exec();
--	if (!isftp)
-+
-+	if (!redirectUrl.isEmpty())
- 	{
--		QHttpResponseHeader dlresponse(dlhttp.lastResponse());
--		int dlrstatus = dlresponse.statusCode();
--		if (dlrstatus >= 300 && dlrstatus < 400 && dlresponse.hasKey("Location"))
--		{
--			dloutfile.close();
--			rmFile(dloutfile);
--			downloadfile(dlresponse.value("Location"), targetfile, minsize);
--			return;
--		}
-+		networkReply->deleteLater();
-+		downloadfile(redirectUrl.toString(), targetfile, minsize);
-+		return;
- 	}
--	if (isftp)
-+
-+	if (downloadFailed)
- 	{
--		dlftp.close();
-+		qDebug() << "Failed to download URL: " << fileurl;
-+		qDebug() << "Error code: " << errorCode;
-+		qDebug() << "Error string: " << networkReply->errorString();
-+		networkReply->deleteLater();
-+		showDownloadFailedScreen(fileurl);
-+		return;
- 	}
--	else
--	{
--		dlhttp.close();
--	}
-+
-+	dloutfile.write(networkReply->readAll());
-+	networkReply->deleteLater();
- 	dloutfile.close();
- 	if (installType == tr("USB Drive"))
- 	{
- 		dloutfile.rename(targetfile);
- 	}
--    if (QFile(targetfile).size() <= 4096)
--    {
--        QString redirectTargetURL;
--        QFile seeRedirect(targetfile);
--        seeRedirect.open(QIODevice::ReadOnly | QIODevice::Text);
--        QTextStream seeRedirectTextStream(&seeRedirect);
--        while (!seeRedirectTextStream.atEnd())
--        {
--            QString curline = seeRedirectTextStream.readLine();
--            if (curline.contains("content=\"0;url="))
--            {
--                int urlstartidx = curline.indexOf("content=\"0;url=") + QString("content=\"0;url=").size();
--                redirectTargetURL = curline.mid(urlstartidx);
--                if (redirectTargetURL.contains("\""))
--                {
--                    redirectTargetURL = redirectTargetURL.left(redirectTargetURL.indexOf("\""));
--                }
--                break;
--            }
--            if (curline.contains("content='0;url="))
--            {
--                int urlstartidx = curline.indexOf("content='0;url=") + QString("content='0;url=").size();
--                redirectTargetURL = curline.mid(urlstartidx);
--                if (redirectTargetURL.contains("'"))
--                {
--                    redirectTargetURL = redirectTargetURL.left(redirectTargetURL.indexOf("'"));
--                }
--                break;
--            }
--        }
--        seeRedirect.close();
--        if (!redirectTargetURL.isEmpty())
--        {
--            rmFile(targetfile);
--            downloadfile(redirectTargetURL, targetfile, minsize);
--            return;
--        }
--    }
-+
- 	if (QFile(targetfile).size() < minsize)
- 	{
- 		// download failed
-@@ -2745,7 +2758,8 @@ void unetbootin::downloadfile(QString fileurl, QString
- 	if (testingDownload)
- 	{
- 		// Note that this only tests that the first download succeeds
--		printf("exitstatus:downloadcomplete\n");
-+		QTextStream out(stdout);
-+		out << "exitstatus:downloadcomplete" << endl << flush;
- 		QApplication::exit();
- 		exit(0);
- 	}
-@@ -2761,40 +2775,26 @@ void unetbootin::showDownloadFailedScreen(const QStrin
- 	this->downloadFailed = true;
- 	if (exitOnCompletion)
- 	{
--		printf("exitstatus:downloadfailed\n");
-+		QTextStream out(stdout);
-+		out << "exitstatus:downloadfailed" << endl << flush;
- 		QApplication::exit();
- 		exit(0);
- 	}
- }
- 
--void unetbootin::dlprogressupdate(int dlbytes, int maxbytes)
--{
-- QTime time = QTime::currentTime();
-- static int oldsec = 0;
-- // refresh the progress bar every second
-- if(oldsec != time.second())
-- {
--   oldsec = time.second();
--     tprogress->setValue(dlbytes);
--     tprogress->setMaximum(maxbytes);
--   // display the downloaded size with suffix
--     pdesc1->setText(tr("<b>Downloaded:</b> %1 of %2").arg(displayfisize(dlbytes)).arg(displayfisize(maxbytes)));
-- }
--}
--
- void unetbootin::dlprogressupdate64(qint64 dlbytes, qint64 maxbytes)
- {
-- QTime time = QTime::currentTime();
-- static int oldsec = 0;
-- // refresh the progress bar every second
-- if(oldsec != time.second())
-- {
--   oldsec = time.second();
--     tprogress->setValue(dlbytes);
--     tprogress->setMaximum(maxbytes);
--   // display the downloaded size with suffix
--     pdesc1->setText(tr("<b>Downloaded:</b> %1 of %2").arg(displayfisize(dlbytes)).arg(displayfisize(maxbytes)));
-- }
-+	QTime time = QTime::currentTime();
-+	static int oldsec = 0;
-+	// refresh the progress bar every second
-+	if(oldsec != time.second())
-+	{
-+		oldsec = time.second();
-+		tprogress->setValue(dlbytes);
-+		tprogress->setMaximum(maxbytes);
-+		// display the downloaded size with suffix
-+		pdesc1->setText(tr("<b>Downloaded:</b> %1 of %2").arg(displayfisize(dlbytes)).arg(displayfisize(maxbytes)));
-+	}
- }
- 
- void unetbootin::cpprogressupdate64(qint64 dlbytes, qint64 maxbytes)
-@@ -2812,31 +2812,35 @@ void unetbootin::cpprogressupdate64(qint64 dlbytes, qi
-  }
- }
- 
--QString unetbootin::downloadpagecontents(QString pageurl)
-+QString unetbootin::downloadpagecontents(QUrl pageurl)
- {
--	QUrl pgurl(pageurl);
--	QHttp pghttp;
-+	QNetworkAccessManager manager;
-+	QNetworkRequest dlurl(pageurl);
-+	QNetworkReply * networkReply = manager.get(dlurl);
- 	QEventLoop pgwait;
--	connect(&pghttp, SIGNAL(done(bool)), &pgwait, SLOT(quit()));
--	pghttp.setHost(pgurl.host());
--	QString realpgupath = QString(pageurl).remove(0, pageurl.indexOf(QString("://%1").arg(pgurl.host())) + QString("://%1").arg(pgurl.host()).length());
--	ubngetrequestheader pgrequest(pgurl.host(), realpgupath);
--	pghttp.request(pgrequest);
-+	QUrl redirectUrl;
-+	connect(networkReply, &QNetworkReply::finished, &pgwait, &QEventLoop::quit);
-+	connect(networkReply, &QNetworkReply::redirected, [&redirectUrl](const QUrl &url){ redirectUrl = url; });
-+
- 	pgwait.exec();
--	QHttpResponseHeader pgresponse(pghttp.lastResponse());
--	int pgrstatus = pgresponse.statusCode();
--	if (pgrstatus >= 300 && pgrstatus < 400 && pgresponse.hasKey("Location"))
-+
-+	if (!redirectUrl.isEmpty())
- 	{
--		return downloadpagecontents(pgresponse.value("Location"));
-+		networkReply->deleteLater();
-+		return downloadpagecontents(redirectUrl);
- 	}
--	else
--	{
--		return QString(pghttp.readAll());
--	}
-+
-+	QString result = networkReply->readAll();
-+	networkReply->close();
-+	networkReply->deleteLater();
-+	return result;
- }
- 
- QStringList unetbootin::lstFtpDirFiles(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize)
- {
-+	qDebug() << "lstFtpDirFiles called for " << ldfDirStringUrl;
-+	return {};
-+/*
- 	QUrl ldfDirUrl(ldfDirStringUrl);
- 	QFtp ldfFtp;
- 	QEventLoop ldfWait;
-@@ -2851,14 +2855,14 @@ QStringList unetbootin::lstFtpDirFiles(QString ldfDirS
- 	ldfFtp.list(ldfDirUrl.path());
- 	ldfWait.exec();
- 	ldfFtp.close();
--	return nDirListStorL.nDirFileListSL;
-+	return nDirListStorL.nDirFileListSL;*/
- }
- 
- QStringList unetbootin::lstHttpDirFiles(QString ldfDirStringUrl)
- {
- 	QStringList relativefilelinksL;
- 	QStringList relativelinksLPreFilter =
--		downloadpagecontents(ldfDirStringUrl)
-+		downloadpagecontents(QUrl(ldfDirStringUrl))
- 		.replace(">", ">\n")
- 		.replace("<", "\n<")
- 		.split("\n");
-@@ -3218,11 +3222,11 @@ int unetbootin::letterToNumber(QChar lettertoconvert)
- {
- 	if (lettertoconvert.isLower())
- 	{
--		return static_cast<int>(lettertoconvert.toAscii() - 'a');
-+		return static_cast<int>(lettertoconvert.toLatin1() - 'a');
- 	}
- 	if (lettertoconvert.isUpper())
- 	{
--		return static_cast<int>(lettertoconvert.toAscii() - 'A');
-+		return static_cast<int>(lettertoconvert.toLatin1() - 'A');
- 	}
- 	else
- 	{
-@@ -3412,21 +3416,36 @@ void unetbootin::instIndvfl(QString srcfName, QString 
+@@ -3354,21 +3416,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")
  	{
@@ -539,7 +132,7 @@
  	}
      else if (srcfName == "mbr.bin")
  	{
-@@ -3516,11 +3535,26 @@ void unetbootin::runinst()
+@@ -3458,11 +3535,26 @@ void unetbootin::runinst()
  	}
  	if (installType == tr("USB Drive"))
  	{
@@ -566,7 +159,7 @@
  	}
  #ifdef Q_OS_LINUX
  	if (targetDev.contains(QRegExp("p\\d$")))
-@@ -3528,7 +3562,7 @@ void unetbootin::runinst()
+@@ -3470,7 +3562,7 @@ void unetbootin::runinst()
  	else
  		rawtargetDev = QString(targetDev).remove(QRegExp("\\d$"));
  #endif
@@ -575,7 +168,7 @@
  	rawtargetDev = QString(targetDev).remove(QRegExp("s\\d$"));
  #endif
  	#endif
-@@ -4281,21 +4315,47 @@ void unetbootin::runinstusb()
+@@ -4223,21 +4315,47 @@ void unetbootin::runinstusb()
              instIndvfl("libutil.c32", QString("%1libutil.c32").arg(targetPath));
              instIndvfl("libcom32.c32", QString("%1libcom32.c32").arg(targetPath));
          }
@@ -634,7 +227,7 @@
  	if (this->persistenceSpaceMB > 0)
  	{
  		pdesc1->setText(tr("Setting up persistence"));
-@@ -4334,6 +4394,20 @@ void unetbootin::fininstall()
+@@ -4276,6 +4394,20 @@ void unetbootin::fininstall()
  		rmFile(mke2fscommand);
  #endif
  	}
@@ -655,13 +248,3 @@
  	pdesc1->setText("");
  	progresslayer->setEnabled(false);
  	progresslayer->hide();
-@@ -4357,7 +4431,8 @@ void unetbootin::fininstall()
-     finishLogging();
- 	if (exitOnCompletion)
- 	{
--		printf("exitstatus:success\n");
-+		QTextStream out(stdout);
-+		out << "exitstatus:success" << endl << flush;
- 		QApplication::exit();
- 		exit(0);
- 	}
diff --git a/sysutils/unetbootin/files/patch-unetbootin.h b/sysutils/unetbootin/files/patch-unetbootin.h
index 4837c4b9f502..49d5fb62d470 100644
--- a/sysutils/unetbootin/files/patch-unetbootin.h
+++ b/sysutils/unetbootin/files/patch-unetbootin.h
@@ -1,4 +1,4 @@
---- unetbootin.h.orig	2018-04-28 01:24:54 UTC
+--- unetbootin.h.orig	2020-11-09 00:01:49 UTC
 +++ unetbootin.h
 @@ -35,6 +35,10 @@ This program is distributed in the hope that it will b
  #include <sys/vfs.h>
@@ -11,46 +11,7 @@
  #ifdef AUTOSUPERGRUBDISK
  #define UNETBOOTINB "Auto Super Grub Disk"
  #define NOEXTERN
-@@ -152,19 +156,13 @@ signals:
- 	void finished();
- };
- 
--class ubngetrequestheader : public QHttpRequestHeader
--{
--public:
--	ubngetrequestheader(QString urhost, QString urpath);
--};
--
- class randtmpfile : public QFile
- {
- public:
- 	randtmpfile(QString rfpath, QString rfextn);
- 	static QString getrandfilename(QString rfpath, QString rfextn);
- };
--
-+/*
- class nDirListStor : public QObject
- {
- 	Q_OBJECT
-@@ -178,7 +176,7 @@ class nDirListStor : public QObject (public)
- public slots:
- 	void sAppendSelfUrlInfoList(QUrlInfo curDirUrl);
- };
--
-+*/
- class unetbootin : public QWidget, private Ui::unetbootinui
- {
- 	Q_OBJECT
-@@ -280,7 +278,7 @@ class unetbootin : public QWidget, private Ui::unetboo
- 	QString searchforgrub2includesfile(QString includesfile, QString archivefile, QStringList archivefileconts, QStringList visitedincludes);
- 	QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > searchforgrub2includesfileL(QString includesfile, QString archivefile, QStringList archivefileconts, QStringList visitedincludes);
- 	void downloadfile(QString fileurl, QString targetfile, int minsize);
--	QString downloadpagecontents(QString pageurl);
-+	QString downloadpagecontents(QUrl pageurl);
- 	QStringList lstFtpDirFiles(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize);
- 	QStringList lstHttpDirFiles(QString ldfDirStringUrl);
- 	QStringList lstNetDirFiles(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize);
-@@ -333,6 +331,7 @@ class unetbootin : public QWidget, private Ui::unetboo
+@@ -327,6 +331,7 @@ class unetbootin : public QWidget, private Ui::unetboo
      void logText(const QString &text);
      void finishLogging();
      void writeTextToFile(const QString &text, const QString &filePath);
@@ -58,24 +19,3 @@
  	void fininstall();
  	void rmFile(const QString &fn);
  	void rmFile(QFile &fn);
-@@ -342,9 +341,9 @@ class unetbootin : public QWidget, private Ui::unetboo
- 
- private slots:
- 	void on_distroselect_currentIndexChanged(int distroselectIndex);
--	void on_typeselect_currentIndexChanged(int typeselectIndex);
--	void on_dverselect_currentIndexChanged();
--	void on_diskimagetypeselect_currentIndexChanged();
-+	void on_typeselect_currentIndexChanged(int);
-+	void on_dverselect_currentIndexChanged(int);
-+	void on_diskimagetypeselect_currentIndexChanged(int);
- 	void on_FloppyFileSelector_clicked();
- 	void on_KernelFileSelector_clicked();
- 	void on_InitrdFileSelector_clicked();
-@@ -353,7 +352,6 @@ private slots:
- 	void on_fexitbutton_clicked();
- 
- public slots:
--	void dlprogressupdate(int dlbytes, int maxbytes);
- 	void dlprogressupdate64(qint64 dlbytes, qint64 maxbytes);
- 	void cpprogressupdate64(qint64 dlbytes, qint64 maxbytes);
- 	void on_okbutton_clicked();
diff --git a/sysutils/unetbootin/files/patch-unetbootin.pro b/sysutils/unetbootin/files/patch-unetbootin.pro
deleted file mode 100644
index b867e8ed14ac..000000000000
--- a/sysutils/unetbootin/files/patch-unetbootin.pro
+++ /dev/null
@@ -1,23 +0,0 @@
---- unetbootin.pro.orig	2018-04-28 09:30:55 UTC
-+++ unetbootin.pro
-@@ -2,18 +2,18 @@ TEMPLATE = app
- TARGET = unetbootin
- DEPENDPATH += .
- INCLUDEPATH += .
--CONFIG += release \
--    static
- 
- HEADERS += unetbootin.h
- FORMS += unetbootin.ui
- SOURCES += main.cpp \
-     unetbootin.cpp \
-+    customdistrolst.cpp \
-     distrolst.cpp \
-     distrover.cpp \
-     distrovercust.cpp
- QT += core \
-     gui \
-+    widgets \
-     network
- ICON = unetbootin.icns
- TRANSLATIONS += unetbootin.ts \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107031002.163A2Fbp069195>