Bug 100453 - Building fails with permission denied for `unpack-sources`
Summary: Building fails with permission denied for `unpack-sources`
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All All
: medium normal
Assignee: Christian Lohmaier
QA Contact:
URL:
Whiteboard: target:5.3.0 target:5.2.0.1 target:5.1.5
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-17 14:00 UTC by Paul Menzel
Modified: 2016-10-25 18:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Menzel 2016-06-17 14:00:03 UTC
Building LibreOffice 5.1.3.2 [1] with the flags below, it fails to unpack the downloaded archives.

```
$ ./configure \
        --enable-verbose \
        --enable-release-build \
        --with-help \
        --with-lang=de \
        --with-jdk-home=/usr/local/java \
        --with-ant-home=/package/mariux64/ant \
        --with-system-openssl \
        --without-junit \
        --without-doxygen \
        --disable-odk \
        --disable-epm \
        --enable-python=internal
$ make -j
[…]
/sources/libreoffice-5.1.3.2/bin/unpack-sources /sources/libreoffice-5.1.3.2 /sources/libreoffice-5.1.3.2/src/libreoffice-translations-5.1.3.2.tar.xz
/sources/libreoffice-5.1.3.2/bin/unpack-sources: Permission denied
 make: *** [get-submodules] Error 126
```

Reason is, that the executable bit is not set.

```
$ ls -l bin/unpack-sources
-rw-r----- 1 joey joey 2393 May  4 00:51 bin/unpack-sources
```

It can be verified directly.

```
$ tar xf libreoffice-5.1.3.2.tar.xz
$ cd libreoffice-5.1.3.2/
$ ls -l bin/unpack-sources 
-rw-r----- 1 joey joey 2393 May  4 00:51 bin/unpack-sources
```

It seems to be an old problem already present in LibreOffice 4.1.0 [1].

The solution is to correct the file permission in the source repository, or to call the script with `bash`.

The first solution looks more correct, as the script has the shebang line below.

```
#!/usr/bin/env bash
```

[1] https://download.documentfoundation.org/libreoffice/src/5.1.3/libreoffice-5.1.3.2.tar.xz
[2] http://lists.linuxfromscratch.org/pipermail/blfs-support/2013-August/073286.html
Comment 1 Commit Notification 2016-06-17 14:28:49 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=10f112376b5767aacef99aff239c87b17ac38d27

tdf#100453 – bin/unpack-sources needs to be executable

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2016-06-17 14:30:12 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=08664ec1f7553acc88719a2b8779cca2eab75f76&h=libreoffice-5-2

tdf#100453 – bin/unpack-sources needs to be executable

It will be available in 5.2.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2016-06-17 14:31:34 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a9593e8db116edd000a7a19f7d83256474faed6f&h=libreoffice-5-1

tdf#100453 – bin/unpack-sources needs to be executable

It will be available in 5.1.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.