From 973fb83019f0fb2073e0a632347f7cc39a56e8dd Mon Sep 17 00:00:00 2001 From: Rik Mills Date: Sun, 9 Jun 2019 22:40:42 +0100 Subject: [PATCH 1/6] merge with debian and release to eoan --- debian/changelog | 22 +++ debian/libfm-qt6.symbols | 2 + debian/patches/series | 1 + .../workaround-missed-file-monitoring.patch | 143 ++++++++++++++++++ 4 files changed, 168 insertions(+) create mode 100644 debian/patches/workaround-missed-file-monitoring.patch diff --git a/debian/changelog b/debian/changelog index 6f7ba51..a5b37ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +libfm-qt (0.14.1-9ubuntu1) eoan; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - debian/control: + + Update Vcs-* and maintainer for maintaining by Lubuntu. + + Add Breaks/Replaces on old libfm-qt-l10n. + - debian/libfmqt-qt6.symbols + + Retain and update Lubuntu generated symbols file. + - debian/patches: fix-metadata-for-trusting-executables.patch + + Fix metadata for trusting executables. Use Ubuntu standard for + trusting executables. + + -- Rik Mills Sun, 09 Jun 2019 22:20:26 +0100 + +libfm-qt (0.14.1-9) unstable; urgency=medium + + * Added upstream patch workaround-missed-file-monitoring.patch + (Closes: #926803) + * Added two new symbols - internal use only + + -- Alf Gaida Sat, 08 Jun 2019 16:39:11 +0200 + libfm-qt (0.14.1-8ubuntu1) eoan; urgency=medium * Merge from Debian unstable. Remaining changes: diff --git a/debian/libfm-qt6.symbols b/debian/libfm-qt6.symbols index fd5d808..8acb904 100644 --- a/debian/libfm-qt6.symbols +++ b/debian/libfm-qt6.symbols @@ -1119,6 +1119,8 @@ libfm-qt.so.6 libfm-qt6 #MINVER# (c++)"Fm::uidFromName(QString)@Base" 0.10.0 (c++)"Fm::uidToName(unsigned int)@Base" 0.10.0 (c++)"Fm::uriExists(char const*)@Base" 0.10.0 + _ZN2Fm6Folder10findByPathERKNS_8FilePathE@Base 0.14.1 + _ZNK2Fm6Folder14hasFileMonitorEv@Base 0.14.1 (optional=templinst)_ZNSt6vectorI18QRegularExpressionSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Base 0.14.1 createFileDialogHelper@Base 0.13.2~ fm_config@Base 0.13.1~ diff --git a/debian/patches/series b/debian/patches/series index 4627866..dbe41e9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ fix-smb-recursive-copy.patch fix-license-headers.patch dont-ignore-crea-del-sequences.patch workaround-glib-recursive-moving-error.patch +workaround-missed-file-monitoring.patch diff --git a/debian/patches/workaround-missed-file-monitoring.patch b/debian/patches/workaround-missed-file-monitoring.patch new file mode 100644 index 0000000..5be3811 --- /dev/null +++ b/debian/patches/workaround-missed-file-monitoring.patch @@ -0,0 +1,143 @@ +Description: Realod folder after transfer job if it lacks file monitoring + Closes https://github.com/lxqt/pcmanfm-qt/issues/933 and closes + https://github.com/lxqt/libfm-qt/issues/280. After a file transfer job is + finished inside a directory, if it is the path of an open folder that lacks + file monitoring, this patch reloads its corresponding folder. In this way, the + lack of file monitoring is partially compensated for. + Please note that this doesn't work with `search://` because the files inside + `search://` don't belong to it. By covering file creation, renaming, moving + from one shared folder to another and deleting after trying to move into Trash. + +Last-Update: 2019-06-08 + +--- libfm-qt-0.14.1.orig/src/core/folder.cpp ++++ libfm-qt-0.14.1/src/core/folder.cpp +@@ -112,6 +112,20 @@ std::shared_ptr Folder::fromPath + return folder; + } + ++// static ++// Checks if this is the path of a folder in use. ++std::shared_ptr Folder::findByPath(const FilePath& path) { ++ std::lock_guard lock{mutex_}; ++ auto it = cache_.find(path); ++ if(it != cache_.end()) { ++ auto folder = it->second.lock(); ++ if(folder) { ++ return folder; ++ } ++ } ++ return nullptr; ++} ++ + bool Folder::makeDirectory(const char* /*name*/, GError** /*error*/) { + // TODO: + // FIXME: what the API is used for in the original libfm C API? +@@ -142,6 +156,10 @@ bool Folder::isEmpty() const { + return files_.empty(); + } + ++bool Folder::hasFileMonitor() const { ++ return (dirMonitor_ != nullptr); ++} ++ + FileInfoList Folder::files() const { + FileInfoList ret; + ret.reserve(files_.size()); +--- libfm-qt-0.14.1.orig/src/core/folder.h ++++ libfm-qt-0.14.1/src/core/folder.h +@@ -56,6 +56,8 @@ public: + + static std::shared_ptr fromPath(const FilePath& path); + ++ static std::shared_ptr findByPath(const FilePath& path); ++ + bool makeDirectory(const char* name, GError** error); + + void queryFilesystemInfo(); +@@ -74,6 +76,8 @@ public: + + bool isEmpty() const; + ++ bool hasFileMonitor() const; ++ + FileInfoList files() const; + + const FilePath& path() const; +--- libfm-qt-0.14.1.orig/src/fileoperation.cpp ++++ libfm-qt-0.14.1/src/fileoperation.cpp +@@ -298,6 +298,8 @@ void FileOperation::onJobFinish() { + } + Q_EMIT finished(); + ++ bool tryReload = true; ++ + // special handling for trash job + if(type_ == Trash && !job_->isCancelled()) { + auto trashJob = static_cast(job_); +@@ -313,6 +315,26 @@ void FileOperation::onJobFinish() { + "Do you want to delete them instead?")) == QMessageBox::Yes) { + deleteFiles(std::move(unsupportedFiles), false); + } ++ tryReload = false; ++ } ++ } ++ ++ // reload the containing folder if it is in use but does not have a file monitor ++ if(tryReload) { ++ if(!srcPaths_.empty() && (type_ == Trash || type_ == Delete || type_ == Move)) { ++ auto parent_path = srcPaths_[0].parent(); ++ if(parent_path != destPath_) { // otherwise, it will be done below ++ auto folder = Fm::Folder::findByPath(parent_path); ++ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) { ++ folder->reload(); ++ } ++ } ++ } ++ if(destPath_) { ++ auto folder = Fm::Folder::findByPath(destPath_); ++ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) { ++ folder->reload(); ++ } + } + } + +--- libfm-qt-0.14.1.orig/src/utilities.cpp ++++ libfm-qt-0.14.1/src/utilities.cpp +@@ -157,7 +157,8 @@ bool isCurrentPidClipboardData(const QMi + } + + bool changeFileName(const Fm::FilePath& filePath, const QString& newName, QWidget* parent, bool showMessage) { +- auto dest = filePath.parent().child(newName.toLocal8Bit().constData()); ++ auto parent_path = filePath.parent(); ++ auto dest = parent_path.child(newName.toLocal8Bit().constData()); + Fm::GErrorPtr err; + if(!g_file_move(filePath.gfile().get(), dest.gfile().get(), + GFileCopyFlags(G_FILE_COPY_ALL_METADATA | +@@ -170,6 +171,13 @@ bool changeFileName(const Fm::FilePath& + } + return false; + } ++ ++ // reload the containing folder if it is in use but does not have a file monitor ++ auto folder = Fm::Folder::findByPath(parent_path); ++ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) { ++ folder->reload(); ++ } ++ + return true; + } + +@@ -263,6 +271,12 @@ _retry: + + QMessageBox::critical(parent ? parent->window() : nullptr, QObject::tr("Error"), err.message()); + } ++ else { // reload the containing folder if it is in use but does not have a file monitor ++ auto folder = Fm::Folder::findByPath(parentDir); ++ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) { ++ folder->reload(); ++ } ++ } + } + + uid_t uidFromName(QString name) { From faec7ee9c2f838f45e23235dfb73693a77ab0cfc Mon Sep 17 00:00:00 2001 From: Rik Mills Date: Sat, 13 Jul 2019 07:07:30 +0100 Subject: [PATCH 2/6] sync with eoan archive --- debian/changelog | 7 +++++++ debian/libfm-qt6.symbols | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index a5b37ab..6c4f04e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libfm-qt (0.14.1-9ubuntu2) eoan; urgency=medium + + * Rebuild against Qt 5.12.4. + * Update symbols files from the current build logs. + + -- Dmitry Shachnev Fri, 12 Jul 2019 23:28:09 +0300 + libfm-qt (0.14.1-9ubuntu1) eoan; urgency=medium * Merge from Debian unstable. Remaining changes: diff --git a/debian/libfm-qt6.symbols b/debian/libfm-qt6.symbols index 8acb904..1112a6b 100644 --- a/debian/libfm-qt6.symbols +++ b/debian/libfm-qt6.symbols @@ -1300,7 +1300,7 @@ libfm-qt.so.6 libfm-qt6 #MINVER# (optional|c++|arch= !amd64 !arm64 !armel !armhf !i386 !mips !mipsel !ppc64el !s390x !alpha !hppa !kfreebsd-amd64 !kfreebsd-i386 !m68k !powerpc !ppc64 !sh4 !x32 )"std::__cxx11::basic_string, std::allocator > __gnu_cxx::__to_xstring, std::allocator >, char>(int (*)(char*, unsigned long, char const*, void*), unsigned long, char const*, ...)@Base" 0.12.0 (c++)"std::__detail::_Map_base, std::allocator > const, std::pair, std::allocator > const, std::shared_ptr >, std::allocator, std::allocator > const, std::shared_ptr > >, std::__detail::_Select1st, std::equal_to, std::allocator > const>, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits, true>::operator[](std::__cxx11::basic_string, std::allocator > const&&)@Base" 0.13.2~ (c++)"std::__detail::_Map_base, std::allocator >, std::pair, std::allocator > const, Fm::FileInfoList>, std::allocator, std::allocator > const, Fm::FileInfoList> >, std::__detail::_Select1st, std::equal_to, std::allocator > >, std::hash, std::allocator > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits, true>::operator[](std::__cxx11::basic_string, std::allocator >&&)@Base" 0.12.1~ - (c++|arch=armhf i386 s390x)"std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(unsigned int&&)@Base" 0.14.1 + (optional=templinst|c++)"std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(unsigned int&&)@Base" 0.14.1 (c++)"std::unique_ptr >::~unique_ptr()@Base" 0.13.2~ (c++)"std::vector >::_M_erase(__gnu_cxx::__normal_iterator > >)@Base" 0.12.0 (optional|c++|arch= !i386 )"std::vector >::_M_erase(__gnu_cxx::__normal_iterator > >)@Base" 0.13.2~ @@ -1513,7 +1513,6 @@ libfm-qt.so.6 libfm-qt6 #MINVER# (c++|arch= armel riscv64 )"typeinfo name for std::_Sp_counted_ptr_inplace, std::allocator >, std::allocator, std::allocator > >, (__gnu_cxx::_Lock_policy)1>@Base" 0.12.0 (c++|arch= !armel !riscv64 )"typeinfo name for std::_Sp_counted_ptr_inplace, std::allocator >, std::allocator, std::allocator > >, (__gnu_cxx::_Lock_policy)2>@Base" 0.12.0 (c++)"typeinfo name for std::_Sp_make_shared_tag@Base" 0.12.0 - (optional=gcc8|c++)"void std::__cxx11::basic_string, std::allocator >::_M_construct(char const*, char const*, std::forward_iterator_tag)@Base" 0.12.1~ (optional=gcc8|c++)"void std::__cxx11::basic_string, std::allocator >::_M_construct(char*, char*, std::forward_iterator_tag)@Base" 0.12.1~ (c++)"void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, Fm::BrowseHistoryItem&&)@Base" 0.12.0 (c++|optional=templinst)"void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, Fm::DirTreeModelItem*&&)@Base" 0.14.1 @@ -1529,7 +1528,6 @@ libfm-qt.so.6 libfm-qt6 #MINVER# (c++)"void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, Fm::Volume&&)@Base" 0.12.0 (c++)"void std::vector >::emplace_back(Fm::Volume&&)@Base" 0.12.0 (c++)"void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, QImage&&)@Base" 0.12.0 - (c++)"void std::vector, std::shared_ptr >, std::allocator, std::shared_ptr > > >::_M_realloc_insert, std::shared_ptr > >(__gnu_cxx::__normal_iterator, std::shared_ptr >*, std::vector, std::shared_ptr >, std::allocator, std::shared_ptr > > > >, std::pair, std::shared_ptr >&&)@Base" 0.12.0 (c++)"void std::vector, std::shared_ptr >, std::allocator, std::shared_ptr > > >::emplace_back, std::shared_ptr > >(std::pair, std::shared_ptr >&&)@Base" 0.12.0 (c++)"void std::vector, std::allocator > >::_M_realloc_insert >(__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >, std::shared_ptr&&)@Base" 0.12.0 (c++)"void std::vector, std::allocator > >::_M_realloc_insert >(__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >, std::shared_ptr&&)@Base" 0.12.0 From 3663fb0ed1c2c102b4183ab98c05c79a225bd7a2 Mon Sep 17 00:00:00 2001 From: Raman Sarda Date: Fri, 16 Aug 2019 22:00:04 -0700 Subject: [PATCH 3/6] Fix DND MTP Bug Summary: Bug Description: DND from mtp:// mounted folders do not work. DND of local files works, though. Patched src/foldermodel.cpp by hand. Had a nice cpp exercise. XD Test Plan: Test if DND from mtp:// mounted folders works or not. Reviewers: tsimonq2, wxl Reviewed By: tsimonq2, wxl Subscribers: kc2bez Maniphest Tasks: T99 Differential Revision: https://phab.lubuntu.me/D32 --- debian/changelog | 6 ++++ debian/patches/fix-dnd-mtp.patch | 48 ++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 55 insertions(+) create mode 100644 debian/patches/fix-dnd-mtp.patch diff --git a/debian/changelog b/debian/changelog index 6c4f04e..be07e57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libfm-qt (0.14.1-9ubuntu3) eoan; urgency=medium + + * Fixed DND not working for mtp:// mounted folders + + -- Raman Sarda Sat, 17 Aug 2019 10:11:52 +0530 + libfm-qt (0.14.1-9ubuntu2) eoan; urgency=medium * Rebuild against Qt 5.12.4. diff --git a/debian/patches/fix-dnd-mtp.patch b/debian/patches/fix-dnd-mtp.patch new file mode 100644 index 0000000..277ead9 --- /dev/null +++ b/debian/patches/fix-dnd-mtp.patch @@ -0,0 +1,48 @@ +Description: Fix DND for MTP mounted folders +Author: Tsu Jan +Bug-Upstream: https://github.com/lxqt/pcmanfm-qt/issues/301 +Applied-Upstream: https://github.com/lxqt/libfm-qt/commit/7de18bc89b9b47f66de54a7e347bf8d391d44a48 +Last-Update: 2019-08-17 +--- a/src/foldermodel.cpp ++++ b/src/foldermodel.cpp +@@ -384,7 +384,7 @@ QStringList FolderModel::mimeTypes() con + // the real implementation is in FolderView::childDropEvent(). + types << "XdndDirectSave0"; + types << "text/uri-list"; +- // types << "x-special/gnome-copied-files"; ++ types << QStringLiteral("libfm/files"); // see FolderModel::mimeData() below + return types; + } + +@@ -407,6 +407,9 @@ QMimeData* FolderModel::mimeData(const Q + } + } + data->setData("text/uri-list", urilist); ++ // NOTE: The mimetype "text/uri-list" changes the list in QMimeData::setData() to get URLs ++ // but some protocols (like MTP) may need the original list to query file info. ++ data->setData(QStringLiteral("libfm/files"), urilist); + + return data; + } +@@ -442,10 +445,19 @@ bool FolderModel::dropMimeData(const QMi + destPath = path(); + } + ++ Fm::FilePathList srcPaths; ++ // try to get paths from the original data ++ if(data->hasFormat(QStringLiteral("libfm/files"))) { ++ QByteArray _data = data->data(QStringLiteral("libfm/files")); ++ srcPaths = pathListFromUriList(_data.data()); ++ } ++ if(srcPaths.empty() && data->hasUrls()) { ++ srcPaths = Fm::pathListFromQUrls(data->urls()); ++ } ++ + // FIXME: should we put this in dropEvent handler of FolderView instead? +- if(data->hasUrls()) { ++ if(!srcPaths.empty()) { + //qDebug("drop action: %d", action); +- auto srcPaths = pathListFromQUrls(data->urls()); + switch(action) { + case Qt::CopyAction: + FileOperation::copyFiles(srcPaths, destPath); \ No newline at end of file diff --git a/debian/patches/series b/debian/patches/series index dbe41e9..b8ec5d7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ fix-license-headers.patch dont-ignore-crea-del-sequences.patch workaround-glib-recursive-moving-error.patch workaround-missed-file-monitoring.patch +fix-dnd-mtp.patch From 4cfa12445f16c039f96b83373e86a9154ace7c16 Mon Sep 17 00:00:00 2001 From: Walter Lapchynski Date: Fri, 16 Aug 2019 22:15:35 -0700 Subject: [PATCH 4/6] Add missing empty line to end of patch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strangely, though the differential revision featured an empty line, when `arc patch`ing the repo, it didn't come with it. 🤷🏽 --- debian/patches/fix-dnd-mtp.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/patches/fix-dnd-mtp.patch b/debian/patches/fix-dnd-mtp.patch index 277ead9..b86fabc 100644 --- a/debian/patches/fix-dnd-mtp.patch +++ b/debian/patches/fix-dnd-mtp.patch @@ -45,4 +45,5 @@ Last-Update: 2019-08-17 - auto srcPaths = pathListFromQUrls(data->urls()); switch(action) { case Qt::CopyAction: - FileOperation::copyFiles(srcPaths, destPath); \ No newline at end of file + FileOperation::copyFiles(srcPaths, destPath); + From e8e7d9bd5a4c11f76e7daf93721949f5deac5148 Mon Sep 17 00:00:00 2001 From: Rik Mills Date: Sun, 27 Oct 2019 07:10:21 +0000 Subject: [PATCH 5/6] No-change rebuild against qtbase-abi-5-12-5 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index be07e57..1623573 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libfm-qt (0.14.1-9ubuntu4) focal; urgency=medium + + * No-change rebuild against qtbase-abi-5-12-5. + + -- Rik Mills Sun, 27 Oct 2019 06:29:34 +0000 + libfm-qt (0.14.1-9ubuntu3) eoan; urgency=medium * Fixed DND not working for mtp:// mounted folders From b75411bb141c2635a1c08f57da51cbb7019e2865 Mon Sep 17 00:00:00 2001 From: Rik Mills Date: Sat, 1 Feb 2020 10:19:51 +0000 Subject: [PATCH 6/6] merge from debian 0.14.1-12 --- debian/changelog | 36 ++++++++++++++++++++++++++++++++++++ debian/gbp.conf | 6 ++++++ 2 files changed, 42 insertions(+) create mode 100644 debian/gbp.conf diff --git a/debian/changelog b/debian/changelog index 1623573..b113d48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,39 @@ +libfm-qt (0.14.1-12ubuntu1) focal; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - debian/control: + + Update Vcs-* and maintainer for maintaining by Lubuntu. + + Additional Breaks/Replaces on old libfm-qt-l10n. + - debian/libfmqt-qt6.symbols + + Retain Lubuntu generated symbols file. + - debian/patches: fix-metadata-for-trusting-executables.patch + + Fix metadata for trusting executables. Use Ubuntu standard for + trusting executables. + - debian/patches: fix-dnd-mtp.patch + + Fix drag-and-drop from mtp:// mounted folders. + + -- Rik Mills Sat, 01 Feb 2020 09:48:17 +0000 + +libfm-qt (0.14.1-12) unstable; urgency=medium + + * Fixed symbol QRegEx -> QRegularExpression + + -- Alf Gaida Tue, 22 Oct 2019 23:52:39 +0200 + +libfm-qt (0.14.1-11) unstable; urgency=medium + + * Bumped Standards to 4.4.1, no changes needed + * Switched to gbp, gbp.conf added + + -- Alf Gaida Sat, 05 Oct 2019 12:56:09 +0200 + +libfm-qt (0.14.1-10) unstable; urgency=medium + + * Fixed symbols for gcc 9.2.1 (Closes: #925742) + * Bumped Standards to 4.4.0, no changes needed + + -- Alf Gaida Sat, 17 Aug 2019 13:00:08 +0200 + libfm-qt (0.14.1-9ubuntu4) focal; urgency=medium * No-change rebuild against qtbase-abi-5-12-5. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..8957fee --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +debian-branch = debian/sid +upstream-branch = upstream/latest +pristine-tar = True +compression = xz +