Public bug reported:

## Summary

The file `/etc/owncloud-client/sync-exclude.lst` should be touched at
install time to avoid an error the first time `owncloudcmd` is run

## Expected behaviour

Installing `owncloud-client-cmd` on a vanilla Ubuntu Server image:

```bash
$ uname -r
4.15.0-38-generic
$ cat /etc/issue
Ubuntu 18.04.2 LTS \n \l
$ sudo apt-get install owncloud-client-cmd
# ... output elided for brevity
$ owncloudcmd --version
ownCloud version 2.4.1
Git revision cd60c2b88ac858339637575f124c58d88b42e78c
Using Qt 5.9.5, built against Qt 5.9.4
Using 'OpenSSL 1.1.0g  2 Nov 2017'
$ mkdir ./ownCloud
$ owncloudcmd -u USER -p PASSWORD ./ownCloud URL
# sync succeeds
$
```

## Actual behaviour (failure) and manual fix

```bash
$ sudo apt-get install owncloud-client-cmd
$ mkdir ./ownCloud
$ owncloudcmd -u USER -p PASSWORD ./ownCloud URL
# ... output elided for brevity
[ fatal default ]:      Cannot load system exclude list or list supplied via 
--exclude
$ sudo mkdir -p /etc/owncloud-client
$ sudo touch /etc/owncloud-client/sync-exclude.lst
$ owncloudcmd -u USER -p PASSWORD ./ownCloud URL
# success
```

## Proposed changes

I would propose to add the following lines to `DEBIAN/postinst` in the
package ... except when I unpack the .tar.xf for this package
<https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/owncloud-
client/2.5.1.10973+dfsg-1/owncloud-client_2.5.1.10973+dfsg.orig.tar.xz>
I don't see a DEBIAN directory.

My (limited) packaging experience has only dealt with packages that have
a DEBIAN directory, so I am out of my depth.

If this package did have a `DEBIAN/postinst` I would propose the
following addition:

```bash
# add to owncloud-client-cmd/DEBIAN/postinst
TGT=/etc/owncloud-client/sync-exclude.lst
[[ -e $TGT ]] || mkdir -p $(dirname $TGT) && touch $TGT
```

## Notes

Any pointers about how to navigate this kind of package and how to
submit pull requests would be much appreciated.

This issue was originally reported [on
github](https://github.com/owncloud/client/issues/7207) but looks like
they have no control over the packaging.

best,

Sirio

** Affects: owncloud-client (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1830509

Title:
  postinst for debian package `owncloud-client-cmd` does not touch `/etc
  /owncloud-client/sync-exclude.lst`

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/owncloud-client/+bug/1830509/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to