Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigFile::excludeFileFromSystem() is returning relative path to etc dir on FreeBSD #8373

Open
tuaris opened this issue Jan 18, 2021 · 3 comments
Labels
Linux p4-low Low priority

Comments

@tuaris
Copy link

tuaris commented Jan 18, 2021

I am upgrading the owncloudclient FreeBSD port from v2.6.0 to v2.7.4 and I am receiving an error saying ownCloud "Could not read system exclude file".

Expected behavior

ConfigFile::excludeFileFromSystem() should return /usr/local/etc/ownCloud

Actual behavior

ConfigFile::excludeFileFromSystem() is returning etc/ownCloud

Steps to reproduce

  1. Build and install client v 2.7.4
  2. Launch
  3. Observe error

Client configuration

Client version: 2.7.4

Operating system: FreeBSD

OS language: English

Logs

01-18 13:14:24:346 [ info sync.configfile ]:	Adding system ignore list to csync: "/usr/home/danny/Shared/Development/ports/deskutils/owncloudclient/etc/ownCloud/sync-exclude.lst"
01-18 13:14:24:346 [ warning gui.folder ]:	Could not read system exclude file

Ktrace shows that it is resolving to a relative path:

 18231 owncloud NAMI  "/usr/home/danny/Shared/Development/ports/deskutils/owncloudclient"
 18231 owncloud RET   __getcwd 0
....
 18231 owncloud STRU  struct stat {dev=10202492494433145596, ino=288741, mode=0100600, nlink=1, uid=1001, gid=1001, rdev=18446744073709551615, atime=1610996815.863931000, mtime=1610996815.864050000, ctime=1610996815.865155000, birthtime=1610996815.863931000, size=1631, blksize=4096, blocks=1, flags=0x800 }
 18231 owncloud RET   fstatat 0
 18231 owncloud CALL  access(0x807108598,0<F_OK>)
 18231 owncloud NAMI  "etc/ownCloud/sync-exclude.lst"
 18231 owncloud RET   access -1 errno 2 No such file or directory
@tuaris
Copy link
Author

tuaris commented Jan 18, 2021

Here is a ktrace for v2.6.0 showing the path is being resolved correctly

 18303 owncloud RET   fstatat 0
 18303 owncloud CALL  access(0x809a11af8,0<F_OK>)
 18303 owncloud NAMI  "/usr/local/etc/ownCloud/sync-exclude.lst"
 18303 owncloud RET   access 0
 18303 owncloud CALL  write(0x1f,0x80763fa58,0x7c)
 18303 owncloud GIO   fd 31 wrote 124 bytes
       "01-18 14:25:08:637 [ info sync.configfile ]:	Adding system ignore list to csync: "/usr/local/etc/ownCloud/sync-exclude.lst"

@tuaris
Copy link
Author

tuaris commented Jan 19, 2021

I was able to work around the problem by passing -DSYSCONF_INSTALL_DIR="${PREFIX}/etc" to the cmake args. (where PREFIX is an env usually set to /usr/local).

This wasn't necessary in any previous versions, but it's fine if it required going forward.

@github-actions
Copy link

This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 19, 2021
@TheOneRing TheOneRing added Linux p4-low Low priority labels Feb 19, 2021
@github-actions github-actions bot removed the Stale label Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux p4-low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants