diff --git a/0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch b/0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch deleted file mode 100644 index 1cd42d5..0000000 --- a/0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4edcbe72679f95cb60979c77a348c1522a20b0f4 Mon Sep 17 00:00:00 2001 -From: eldstal -Date: Sat, 18 Dec 2021 23:55:22 +0100 -Subject: [PATCH] Added bounds check to CDataList in JWW parser - -This fixes issue #1464 ---- - libraries/jwwlib/src/jwwdoc.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libraries/jwwlib/src/jwwdoc.h b/libraries/jwwlib/src/jwwdoc.h -index fc8cd217..7ccf2d83 100644 ---- a/libraries/jwwlib/src/jwwdoc.h -+++ b/libraries/jwwlib/src/jwwdoc.h -@@ -793,7 +793,17 @@ cout << "MojiData1:" << m_strName << endl; - }else - { - ifstr >> wd; -+ -+ jwDWORD skip = 0; -+ if (wd > 511) { -+ skip = wd - 511; -+ wd = 511; -+ } -+ - ifstr.read(buf,wd); -+ -+ if (skip != 0) ifstr.ignore(skip); -+ - buf[wd] = '\0'; - m_strName = buf; - #ifdef DATA_DUMP --- -2.36.1 - diff --git a/0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch b/0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch deleted file mode 100644 index ca03069..0000000 --- a/0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch +++ /dev/null @@ -1,53 +0,0 @@ -From f3502963eaf379a429bc9da73c1224c5db649997 Mon Sep 17 00:00:00 2001 -From: eldstal -Date: Sat, 18 Dec 2021 20:27:34 +0100 -Subject: [PATCH] Added bounds checking to CDataMoji in jww parser. - -This fixes issue #1462 ---- - libraries/jwwlib/src/jwwdoc.h | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/libraries/jwwlib/src/jwwdoc.h b/libraries/jwwlib/src/jwwdoc.h -index fc8cd217..a11bc63a 100644 ---- a/libraries/jwwlib/src/jwwdoc.h -+++ b/libraries/jwwlib/src/jwwdoc.h -@@ -521,7 +521,17 @@ cout << "MojiData1:" << m_strFontName << endl; - }else - { - ifstr >> wd; -+ -+ jwDWORD skip = 0; -+ if (wd > 511) { -+ skip = wd - 511; -+ wd = 511; -+ } -+ - ifstr.read(buf,wd); -+ -+ if (skip != 0) ifstr.ignore(skip); -+ - buf[wd] = '\0'; - m_strFontName = buf; - #ifdef DATA_DUMP -@@ -539,7 +549,17 @@ cout << "MojiData3:" << m_string << endl; - }else - { - ifstr >> wd; -+ -+ jwDWORD skip = 0; -+ if (wd > 511) { -+ skip = wd - 511; -+ wd = 511; -+ } -+ - ifstr.read(buf,wd); -+ -+ if (skip != 0) ifstr.ignore(skip); -+ - buf[wd] = '\0'; - m_string = buf; - #ifdef DATA_DUMP --- -2.36.1 - diff --git a/0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch b/0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch deleted file mode 100644 index 6bf634e..0000000 --- a/0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch +++ /dev/null @@ -1,272 +0,0 @@ -From: Armin Stebich -Date: Thu, 6 Jan 2022 11:36:44 +0100 -Subject: fixed #1488, getDirectoryList() failed on Linux when librecad is in - $PATH -Git-repo: git://github.com/LibreCAD/LibreCAD.git -Git-commit: 8c3b652a8813588d67ef6bef17ea83ccc3b20f89 -Patch-mainline: yes -References: paths fix - -Signed-off-by: Jiri Slaby ---- - librecad/src/lib/engine/rs_system.cpp | 27 ++++--- - librecad/src/lib/engine/rs_system.h | 15 +--- - librecad/src/main/console_dxf2pdf/console_dxf2pdf.cpp | 61 ++++++++---------- - librecad/src/main/main.cpp | 21 ++---- - 4 files changed, 57 insertions(+), 67 deletions(-) - ---- a/librecad/src/lib/engine/rs_system.cpp -+++ b/librecad/src/lib/engine/rs_system.cpp -@@ -47,20 +47,20 @@ RS_System* RS_System::uniqueInstance = N - * @param appVersion Application version (e.g. "1.2.3") - * @param appDirName Application directory name used for - * subdirectories in /usr, /etc ~/. -- * @param appDir Absolute application directory (e.g. /opt/qcad) -- * defaults to current directory. - */ --void RS_System::init(const QString& appName, const QString& appVersion, -- const QString& appDirName, const QString& appDir) { -+void RS_System::init(const QString& appName, -+ const QString& appVersion, -+ const QString& appDirName) { - this->appName = appName; - this->appVersion = appVersion; - this->appDirName = appDirName; -- if (appDir == "") { -- this->appDir = QDir::currentPath(); -- } -- else { -- this->appDir = appDir; -- } -+ this->appDir = QCoreApplication::applicationDirPath(); -+ -+ // when appDir is not HOME or CURRENT dir, search appDir too in getDirectoryList() -+ externalAppDir = (!appDir.isEmpty() -+ && "/" != appDir -+ && getHomeDir() != appDir -+ && getCurrentDir() != appDir); - - RS_DEBUG->print("RS_System::init: System %s initialized.", appName.toLatin1().data()); - RS_DEBUG->print("RS_System::init: App dir: %s", appDir.toLatin1().data()); -@@ -563,14 +563,15 @@ QStringList RS_System::getDirectoryList( - dirList.append( getHomeDir() + "/." + appDirName + "/" + subDirectory); - - //local (application) directory has priority over other dirs: -- if (!appDir.isEmpty() && appDir!="/" && appDir!=getHomeDir()) { -- if (appDir != getCurrentDir() && subDirectory != QString( "plugins")) {// 17 Aug, 2011, Dongxu Li, do not look for plugins in the current folder, we should install plugins to system or ~/.LibreCAD/plugins/ -+ if (!subDirectory.compare( "plugins")) { -+ // 17 Aug, 2011, Dongxu Li, do not look for plugins in the current folder, -+ // we should install plugins to system or ~/.librecad/plugins/ -+ if (externalAppDir) { - dirList.append( appDir + "/" + subDirectory); - } - } - - #ifdef Q_OS_UNIX -- RS_DEBUG->print( RS_Debug::D_ERROR, "RS_System::getDirectoryList: %s", appDir.toStdString().c_str()); - // for AppImage use relative paths from executable - // from packet manager the executable is in /usr/bin - // in AppImage the executable is APPDIR/usr/bin ---- a/librecad/src/lib/engine/rs_system.h -+++ b/librecad/src/lib/engine/rs_system.h -@@ -63,8 +63,9 @@ public: - return uniqueInstance; - } - -- void init(const QString& appName, const QString& appVersion, -- const QString& appDirName, const QString& appDir=""); -+ void init(const QString& appName, -+ const QString& appVersion, -+ const QString& appDirName); - void initLanguageList(); - void initAllLanguagesList(); - -@@ -86,13 +87,6 @@ public: - } - - /** -- * @return Application directory. -- */ -- QString getAppDir() { -- return appDir; -- } -- -- /** - * @return Application Data directory. - */ - QString getAppDataDir(); -@@ -200,7 +194,8 @@ protected: - QString appDir; - - QStringList languageList; //< List of available translations -- bool initialized; -+ bool initialized {false}; -+ bool externalAppDir {false}; - QList > allKnownLocales; - }; - ---- a/librecad/src/main/console_dxf2pdf/console_dxf2pdf.cpp -+++ b/librecad/src/main/console_dxf2pdf/console_dxf2pdf.cpp -@@ -3,6 +3,7 @@ - ** This file was created for the LibreCAD project, a 2D CAD program. - ** - ** Copyright (C) 2018 Alexander Pravdin -+** Copyright (C) 2022 A. Stebich (librecad@mail.lordofbikes.de) - ** - ** This file may be distributed and/or modified under the terms of the - ** GNU General Public License version 2 as published by the Free Software -@@ -45,8 +46,6 @@ static void parseMarginsArg(QString, Pdf - - int console_dxf2pdf(int argc, char* argv[]) - { -- //QT_REQUIRE_VERSION(argc, argv, "5.2.1"); -- - RS_DEBUG->setLevel(RS_Debug::D_NOTHING); - - QApplication app(argc, argv); -@@ -55,78 +54,78 @@ int console_dxf2pdf(int argc, char* argv - QCoreApplication::setApplicationVersion(XSTR(LC_VERSION)); - - QFileInfo prgInfo(QFile::decodeName(argv[0])); -- QString prgDir(prgInfo.absolutePath()); - RS_SETTINGS->init(app.organizationName(), app.applicationName()); -- RS_SYSTEM->init(app.applicationName(), app.applicationVersion(), -- XSTR(QC_APPDIR), prgDir); -+ RS_SYSTEM->init( app.applicationName(), app.applicationVersion(), XSTR(QC_APPDIR)); - - QCommandLineParser parser; - -- QString appDesc; -- QString librecad; -+ QStringList appDesc; -+ QString librecad( prgInfo.filePath()); - if (prgInfo.baseName() != "dxf2pdf") { -- librecad = prgInfo.filePath(); -- appDesc = "\ndxf2pdf usage: " + prgInfo.filePath() -- + " dxf2pdf [options] \n"; -+ librecad += " dxf2pdf"; // executable is not dxf2pdf, thus argv[1] must be 'dxf2pdf' -+ appDesc << ""; -+ appDesc << "dxf2pdf " + QObject::tr( "usage: ") + librecad + QObject::tr( " [options] "); - } -- appDesc += "\nPrint a bunch of DXF files to PDF file(s)."; -- appDesc += "\n\n"; -- appDesc += "Examples:\n\n"; -- appDesc += " " + librecad + " dxf2pdf *.dxf"; -- appDesc += " -- print all dxf files to pdf files with the same names.\n"; -- appDesc += "\n"; -- appDesc += " " + librecad + " dxf2pdf -o some.pdf *.dxf"; -- appDesc += " -- print all dxf files to 'some.pdf' file."; -- parser.setApplicationDescription(appDesc); -+ appDesc << ""; -+ appDesc << "Print a bunch of DXF files to PDF file(s)."; -+ appDesc << ""; -+ appDesc << "Examples:"; -+ appDesc << ""; -+ appDesc << " " + librecad + QObject::tr( " *.dxf"); -+ appDesc << " " + QObject::tr( "-- print all dxf files to pdf files with the same names."); -+ appDesc << ""; -+ appDesc << " " + librecad + QObject::tr( " -o some.pdf *.dxf"); -+ appDesc << " " + QObject::tr( "-- print all dxf files to 'some.pdf' file."); -+ parser.setApplicationDescription( appDesc.join( "\n")); - - parser.addHelpOption(); - parser.addVersionOption(); - - QCommandLineOption fitOpt(QStringList() << "a" << "fit", -- "Auto fit and center drawing to page."); -+ QObject::tr( "Auto fit and center drawing to page.")); - parser.addOption(fitOpt); - - QCommandLineOption centerOpt(QStringList() << "c" << "center", -- "Auto center drawing on page."); -+ QObject::tr( "Auto center drawing on page.")); - parser.addOption(centerOpt); - - QCommandLineOption grayOpt(QStringList() << "k" << "grayscale", -- "Print grayscale."); -+ QObject::tr( "Print grayscale.")); - parser.addOption(grayOpt); - - QCommandLineOption monoOpt(QStringList() << "m" << "monochrome", -- "Print monochrome (black/white)."); -+ QObject::tr( "Print monochrome (black/white).")); - parser.addOption(monoOpt); - - QCommandLineOption pageSizeOpt(QStringList() << "p" << "paper", -- "Paper size (Width x Height) in mm.", "WxH"); -+ QObject::tr( "Paper size (Width x Height) in mm.", "WxH")); - parser.addOption(pageSizeOpt); - - QCommandLineOption resOpt(QStringList() << "r" << "resolution", -- "Output resolution (DPI).", "integer"); -+ QObject::tr( "Output resolution (DPI).", "integer")); - parser.addOption(resOpt); - - QCommandLineOption scaleOpt(QStringList() << "s" << "scale", -- "Output scale. E.g.: 0.01 (for 1:100 scale).", "double"); -+ QObject::tr( "Output scale. E.g.: 0.01 (for 1:100 scale)."), "double"); - parser.addOption(scaleOpt); - - QCommandLineOption marginsOpt(QStringList() << "f" << "margins", -- "Paper margins in mm (integer or float).", "L,T,R,B"); -+ QObject::tr( "Paper margins in mm (integer or float)."), "L,T,R,B"); - parser.addOption(marginsOpt); - - QCommandLineOption pagesNumOpt(QStringList() << "z" << "pages", -- "Print on multiple pages (Horiz. x Vert.).", "HxV"); -+ QObject::tr( "Print on multiple pages (Horiz. x Vert.)."), "HxV"); - parser.addOption(pagesNumOpt); - - QCommandLineOption outFileOpt(QStringList() << "o" << "outfile", -- "Output PDF file.", "file"); -+ QObject::tr( "Output PDF file.", "file")); - parser.addOption(outFileOpt); - - QCommandLineOption outDirOpt(QStringList() << "t" << "directory", -- "Target output directory.", "path"); -+ QObject::tr( "Target output directory."), "path"); - parser.addOption(outDirOpt); - -- parser.addPositionalArgument("", "Input DXF file(s)"); -+ parser.addPositionalArgument(QObject::tr( ""), QObject::tr( "Input DXF file(s)")); - - parser.process(app); - ---- a/librecad/src/main/main.cpp -+++ b/librecad/src/main/main.cpp -@@ -55,16 +55,13 @@ int main(int argc, char** argv) - { - QT_REQUIRE_VERSION(argc, argv, "5.2.1"); - -- // Check first two arguments in order to decide if we want to run librecad -- // as console dxf2pdf tool. On Linux we can create a link to librecad -- // executable and name it dxf2pdf. So, we can run either: -- // -- // librecad dxf2pdf [options] ... -- // -- // or just: -- // -- // dxf2pdf [options] ... -- // -+ /* Check first two arguments in order to decide if we want to run librecad -+ * as console dxf2pdf tool. On Linux we can create a link to librecad -+ * executable and name it dxf2pdf. So, we can run either: -+ * librecad dxf2pdf [options] ... -+ * or just: -+ * dxf2pdf [options] ... -+ */ - for (int i = 0; i < qMin(argc, 2); i++) { - QString arg(argv[i]); - if (i == 0) { -@@ -206,10 +203,8 @@ int main(int argc, char** argv) - } - RS_DEBUG->print("param 0: %s", argv[0]); - -- QFileInfo prgInfo( QFile::decodeName(argv[0]) ); -- QString prgDir(prgInfo.absolutePath()); - RS_SETTINGS->init(app.organizationName(), app.applicationName()); -- RS_SYSTEM->init(app.applicationName(), app.applicationVersion(), XSTR(QC_APPDIR), prgDir); -+ RS_SYSTEM->init(app.applicationName(), app.applicationVersion(), XSTR(QC_APPDIR)); - - // parse command line arguments that might not need a launched program: - QStringList fileList = handleArgs(argc, argv, argClean); diff --git a/librecad-2.2.0-rc3.tar.gz b/librecad-2.2.0-rc3.tar.gz deleted file mode 100644 index e79de02..0000000 --- a/librecad-2.2.0-rc3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c279e3f688c2e7e11c2268bae3aee3422370a318264d0a7a21d31742ea46257 -size 13563099 diff --git a/librecad-2.2.0-rc4.tar.gz b/librecad-2.2.0-rc4.tar.gz new file mode 100644 index 0000000..8776ba2 --- /dev/null +++ b/librecad-2.2.0-rc4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f34c295cdb22bb4fca021a7cb95a648365e52b97b651a645ae5f78cd7a53e4d4 +size 13833398 diff --git a/librecad.changes b/librecad.changes index e8b5580..d3b40d8 100644 --- a/librecad.changes +++ b/librecad.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Mon Jul 11 18:48:45 UTC 2022 - Dirk Müller + +- update to 2.2.0 rc4: + * symbols to unicode.lff + * new error code from libdxfrw update + * build Windows, MacOS and Linux packages in one action + * added tool tips to Categories tool widget (#1519) + * added @ symbol to relative coordinates in status bar (#1452) + * changed misleading unit label in curent drawing preferences (#1453) + * changed tab order in text dialog (#1432) + * maximum size of status bar for hidpi displays + * sync libdxfrw (072aecd) + * copy/rename media files in desktop folder to remove whitespaces + * fixed renaming of nested blocks (#1527) + * preserve list position in block and layer list (#1515) + * fixed polyline issue when line type was changed (#1496) + * add minutes label to auto save time in application preferences (#1412) + * add files saved as with new name to recent files (#1364) + * snap on middle point failed for spline through points (#1395) + * spline issue with tolerance on ascii to double conversion + * DXF viewport reading issue by updating libdxfrw + * status bar height toggling on auto save + * solid fill hatch issues + * Ukrainian and symbol characters in unicode.lff + * possible out of bounds read with MText entities + * AppImage was broken by fix for (#1488) + * wrong translations folder for additionals paths from settings + * getDirectoryList() failed on Linux when librecad is in $PATH (#1488) + * bounds check in LWPolyline + * NULL check for hatch code 93 + * vulnerabilities in JWW parser + +- drop 0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch, + 0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch + 0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch: upstream + ------------------------------------------------------------------- Mon May 16 20:31:43 UTC 2022 - Jan Engelhardt diff --git a/librecad.spec b/librecad.spec index 9b2e0e3..38e53db 100644 --- a/librecad.spec +++ b/librecad.spec @@ -16,10 +16,10 @@ # -%define tar_version 2.2.0-rc3 +%define tar_version 2.2.0-rc4 Name: librecad -Version: 2.2.0~rc3 +Version: 2.2.0~rc4 Release: 0 Summary: Computer-aided design (CAD) software package for 2D design and drafting License: (Apache-2.0 OR SUSE-GPL-3.0+-with-font-exception) AND GPL-2.0-only @@ -35,14 +35,11 @@ Source3: https://wiki.librecad.org/images/7/70/Electronics3-LCAD.zip Source4: https://wiki.librecad.org/images/9/9d/Electrical1-LCAD.zip Source10: ttf2lff.1 Source20: %name-rpmlintrc -Patch0: 0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch Patch4: librecad-no-date.diff Patch5: librecad-use-system-libdxfrw.patch Patch6: librecad-install.diff Patch7: librecad-plugindir.diff Patch8: librecad-use-system-shapelib.patch -Patch9: 0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch -Patch10: 0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch BuildRequires: fdupes BuildRequires: freetype2-devel BuildRequires: gcc-c++ >= 4.7