D27291: install smb as both smb:// and cifs://

2020-02-13 Thread Harald Sitter
This revision was automatically updated to reflect the committed changes.
Closed by commit R320:a5f51238fab7: smb: install smb as both smb:// and cifs:// 
(authored by sitter).

REPOSITORY
  R320 KIO Extras

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27291?vs=75382&id=75603

REVISION DETAIL
  https://phabricator.kde.org/D27291

AFFECTED FILES
  smb/CMakeLists.txt
  smb/kio_smb_browse.cpp
  smb/kio_smb_internal.cpp
  smb/smb.protocol
  smb/smb.protocol.cmake

To: sitter, dfaure, ngraham
Cc: meven, feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, 
fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-11 Thread Harald Sitter
sitter added a comment.


  Easy merge for master, just needs some ctrl-c magic. Thanks for the heads up 
though :)

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: meven, feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, 
fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-11 Thread Méven Car
meven added a comment.


  Samba protocol has been partly ported to the json format 
https://phabricator.kde.org/D26358
  This may be a great time to add the cifs protocol to `smb/smb.json` instead 
of propagating another .protocol file

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: meven, feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, 
fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread Alexander Saoutkin
feverfew added a comment.


  In D27291#609358 , @dfaure wrote:
  
  > feverfew: you're probably looking at master while this is a patch for the 
19.12 branch.
  >  See https://phabricator.kde.org/D26358 which happened in master.
  >
  > I guess that makes this commit ok for 19.12, but it has to be redone 
differently in master.
  
  
  That's exactly what I did, ignore me :)

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, 
LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread David Faure
dfaure added a comment.


  feverfew: you're probably looking at master while this is a patch for the 
19.12 branch.
  See https://phabricator.kde.org/D26358 which happened in master.
  
  I guess that makes this commit ok for 19.12, but it has to be redone 
differently in master.

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, 
LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread David Faure
dfaure added a comment.


  Both are supported, but indeed json is preferred over installed .protocol 
files.
  
  You can use protocoltojson (from kio) to do the conversion.
  This is all technically unrelated to this commit, except that the nice cmake 
hack to generate two files isn't even needed with json, you can just bundle up 
both protocols into the same json file (see kio/src/ioslaves/http/http.json for 
an example).

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, 
LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread Alexander Saoutkin
feverfew added a comment.


  I'm a bit confused here, isn't the protocol file now a JSON file? I'm looking 
at the repo and it appears to be the case, so I'm not seeing how this diff is 
seeing this as a rename?

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: feverfew, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, 
LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

To: sitter, dfaure, ngraham
Cc: kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, 
cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


D27291: install smb as both smb:// and cifs://

2020-02-10 Thread Harald Sitter
sitter created this revision.
sitter added a reviewer: dfaure.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
sitter requested review of this revision.

REVISION SUMMARY
  the latter while not IANA registered is apparently used in places. to
  cheaply support it we now configure the protocol file for both protocol
  'smb' and 'cifs' and installing two protocol files. they are still both
  backed by the same plugin and otherwise the same.
  code-wise this also required adjustments to the URL validation tech as
  it has hardcoded checks for smb schemes.
  
  FIXED-IN: 19.12.3
  BUG: 327295

TEST PLAN
  - cifs://host/share
  - cifs://host
  - cifs://
  
  all open correctly. they do get translated to smb because of the checkUrl 
code.
  
  checkUrl seems entirely pointless, SMBUrl does a bit of validation/fixing as 
part of
  updateCache. It occurs to me checkUrl should simply be incorporated into 
SMBUrl
  and we should construct an SMBUrl where we previously called checkUrl. before 
doing
  anything of value we construct SMBUrls anyway, so the isolated logic does 
absolutely
  nothing SMBUrl couldn't do just as well. also needs a unit test -.- ... too 
much 
  refactoring for a bugfix though

REPOSITORY
  R320 KIO Extras

BRANCH
  bug327295

REVISION DETAIL
  https://phabricator.kde.org/D27291

AFFECTED FILES
  smb/CMakeLists.txt
  smb/kio_smb_browse.cpp
  smb/kio_smb_internal.cpp
  smb/smb.protocol
  smb/smb.protocol.cmake

To: sitter, dfaure
Cc: kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, 
cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov