Bug 86355 - executable bit is set on non-executable files CREDITS, LICENSE and NOTICE
Summary: executable bit is set on non-executable files CREDITS, LICENSE and NOTICE
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
4.3.4.1 release
Hardware: Other Solaris
: medium minor
Assignee: Andras Timar
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 21:40 UTC by Richard PALO
Modified: 2015-06-18 14:17 UTC (History)
3 users (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 Richard PALO 2014-11-16 21:40:08 UTC
I believe everything is mentioned in the below install message:

=> Checking file permissions in libreoffice4-4.3.4.1
warning: /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/CREDITS.fodt: executable bit is set on non-executable file.
warning: /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/LICENSE.fodt: executable bit is set on non-executable file.
warning: /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/NOTICE: executable bit is set on non-executable file.
0 errors and 3 warnings.

from the source tarball:
richard@omnis:/home/richard$ gtar tvfa /export/pub/pkgsrc/distfiles/libreoffice/libreoffice-4.3.4.1.tar.xz libreoffice-4.3.4.1/readlicense_oo/license
drwxr-xr-x cloph/users       0 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/
-rw-r--r-- cloph/users 1186481 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/CREDITS.fodt
-rw-r--r-- cloph/users  599950 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/LICENSE.html
-rw-r--r-- cloph/users  437049 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/LICENSE
-rw-r--r-- cloph/users  925549 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/LICENSE.fodt
-rw-r--r-- cloph/users    5025 2014-11-10 12:52 libreoffice-4.3.4.1/readlicense_oo/license/NOTICE
Comment 1 Robinson Tryon (qubit) 2014-12-21 19:23:59 UTC
(In reply to Richard PALO from comment #0)
> I believe everything is mentioned in the below install message:

I'm a bit confused here...

> => Checking file permissions in libreoffice4-4.3.4.1
> warning:
> /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/
> CREDITS.fodt: executable bit is set on non-executable file.

Based on that warning, I'd expect to see an executable bit set on CREDITS.fodt

> richard@omnis:/home/richard$ gtar tvfa
> /export/pub/pkgsrc/distfiles/libreoffice/libreoffice-4.3.4.1.tar.xz
> ...
> libreoffice-4.3.4.1/readlicense_oo/license/CREDITS.fodt
> -rw-r--r-- cloph/users  599950 2014-11-10 12:52

No executable bits are set? What am I missing here?

Status -> NEEDINFO
(change back to UNCONFIRMED after you reply)
Comment 2 Richard PALO 2015-01-25 06:44:52 UTC
Well, with 4.3.5.2 I get:
richard@omnis:/home/richard$ gtar tvfa /export/pub/pkgsrc/distfiles/libreoffice/libreoffice-4.3.5.2.tar.xz libreoffice-4.3.5.2/readlicense_oo/license
drwxrwxr-x qubit/qubit       0 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/
-rw-rw-r-- qubit/qubit  925549 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/LICENSE.fodt
-rw-rw-r-- qubit/qubit  437049 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/LICENSE
-rw-rw-r-- qubit/qubit    5025 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/NOTICE
-rw-rw-r-- qubit/qubit  599950 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/LICENSE.html
-rw-rw-r-- qubit/qubit 1186481 2014-12-11 22:00 libreoffice-4.3.5.2/readlicense_oo/license/CREDITS.fodt


In git (tracking branch from above):
richard@omnis:/home/richard/src/libreoffice/readlicense_oo/license$ ls -latotal 1799
drwxr-xr-x   2 richard  staff          7 janv. 25 07:41 ./
drwxr-xr-x   4 richard  staff         11 janv. 26  2014 ../
-rw-r--r--   1 richard  staff    1186481 janv. 25 07:41 CREDITS.fodt
-rw-r--r--   1 richard  staff     437049 janv. 25 07:41 LICENSE
-rw-r--r--   1 richard  staff     925549 janv. 25 07:41 LICENSE.fodt
-rw-r--r--   1 richard  staff     599950 janv. 25 07:41 LICENSE.html
-rw-r--r--   1 richard  staff       5025 nov.  9 17:35 NOTICE

What is the `umask` for the tarball creation of these files?
Comment 3 Robinson Tryon (qubit) 2015-01-26 09:51:11 UTC
(In reply to Richard PALO from comment #2)
> 
> What is the `umask` for the tarball creation of these files?

Not sure if it's changed from the host on which the files are created. Here's how we pack up the source files:
  $LO_GIT/bin/lo-pack-sources --xz --set-version=9.8.7.6 $LO_GIT
Comment 4 Richard PALO 2015-01-26 17:36:44 UTC
Some more setup needed for my git clone?


richard@omnis:/home/richard/src$ umask 
0022
richard@omnis:/home/richard/src$ export LO_GIT=/home/richard/src/libreofficerichard@omnis:/home/richard/src$ $LO_GIT/bin/lo-pack-sources --xz --set-version=4.3.5.2 $LO_GIT
Source: /home/richard/src/libreoffice
Detected module:
    core
did not found: /home/richard/src/libreoffice/dictionaries/.git
Warning: dictionaries sources are not available -> skipping
did not found: /home/richard/src/libreoffice/helpcontent2/.git
Warning: help sources are not available -> skipping
did not found: /home/richard/src/libreoffice/translations/.git
Warning: translations sources are not available -> skipping
New version       : 4.3.5.2

Waiting 3 seconds...

--- Generating core ---
Copying "/home/richard/src/libreoffice/" -> "/tmp/libreoffice-7KOsxk/libreoffice-4.3.5.2/"...
Removing empty submodule: dictionaries...
Error: Can't remove submodule directory: /tmp/libreoffice-7KOsxk/libreoffice-4.3.5.2//dictionaries at /home/richard/src/libreoffice/bin/lo-pack-sources line 101.
richard@omnis:/home/richard/src$
Comment 5 Robinson Tryon (qubit) 2015-01-26 17:52:10 UTC
(In reply to Richard PALO from comment #4)
> Some more setup needed for my git clone?
> 

Yep, there are git submodules, so after the clone, do

./g checkout master

I believe that will do the right thing with submodules, both init-ing and updating them.
Comment 6 Richard PALO 2015-01-27 05:41:05 UTC
I still needed to manually init and update all the submodules, but I still get
>richard@omnis:/home/richard/src$ sudo /opt/local/bin/perl $LO_GIT/bin/lo-pack->sources --xz --set-version=4.3.5.2 $LO_GIT
>Source: /home/richard/src/libreoffice
>Detected module:
>    core
>    dictionaries
>    help
>    translations
>New version       : 4.3.5.2
>
>Waiting 3 seconds...
>
>--- Generating core ---
>Copying "/home/richard/src/libreoffice/" -> "/tmp/libreoffice-Jc1VCF/libreoffice-4.3.5.2/"...
>Removing empty submodule: dictionaries...
>Error: Can't remove submodule directory: /tmp/libreoffice-Jc1VCF/libreoffice->4.3.5.2//dictionaries at /home/richard/src/libreoffice/bin/lo-pack-sources line 101.

not up to debugging perl right now, but noticing that it primarily use git archive --format=tar I tried the following test:

>richard@omnis:/home/richard/src/libreoffice$ git archive --format=tar HEAD -o ../foo.tar readlicense_oo/license
>richard@omnis:/home/richard/src/libreoffice$ gtar tvfa ../foo.tar
>drwxrwxr-x root/root         0 2014-12-11 22:00 readlicense_oo/
>drwxrwxr-x root/root         0 2014-12-11 22:00 readlicense_oo/license/
>-rw-rw-r-- root/root   1186481 2014-12-11 22:00 readlicense_oo/license/CREDITS.fodt
>-rw-rw-r-- root/root    437049 2014-12-11 22:00 readlicense_oo/license/LICENSE
>-rw-rw-r-- root/root    925549 2014-12-11 22:00 readlicense_oo/license/LICENSE.fodt
>-rw-rw-r-- root/root    599950 2014-12-11 22:00 readlicense_oo/license/LICENSE.html
>-rw-rw-r-- root/root      5025 2014-12-11 22:00 readlicense_oo/license/NOTICE
>richard@omnis:/home/richard/src/libreoffice$ ls -la readlicense_oo/license
>total 1799
>drwxr-xr-x   2 richard  staff          7 janv. 26 18:58 ./
>drwxr-xr-x   4 richard  staff         11 janv. 26  2014 ../
>-rw-r--r--   1 richard  staff    1186481 janv. 26 18:58 CREDITS.fodt
>-rw-r--r--   1 richard  staff     437049 janv. 26 18:58 LICENSE
>-rw-r--r--   1 richard  staff     925549 janv. 26 18:58 LICENSE.fodt
>-rw-r--r--   1 richard  staff     599950 janv. 26 18:58 LICENSE.html
>-rw-r--r--   1 richard  staff       5025 nov.  9 17:35 NOTICE

I believe the issue is really there, with git archive...
Comment 7 Robinson Tryon (qubit) 2015-01-27 05:48:25 UTC
(In reply to Richard PALO from comment #6)
> not up to debugging perl right now, but noticing that it primarily use git
> archive --format=tar I tried the following test:
> 
> >richard@omnis:/home/richard/src/libreoffice$ git archive --format=tar HEAD -o ../foo.tar readlicense_oo/license
> >richard@omnis:/home/richard/src/libreoffice$ gtar tvfa ../foo.tar
> ...
> >-rw-rw-r-- root/root    437049 2014-12-11 22:00 readlicense_oo/license/LICENSE
> ...
> >richard@omnis:/home/richard/src/libreoffice$ ls -la readlicense_oo/license
> ...
> >-rw-r--r--   1 richard  staff     437049 janv. 26 18:58 LICENSE

Interesting. So it looks like round-tripping through git archive changes perms.

> I believe the issue is really there, with git archive...

So do you see this as a bug with git-archive? Perhaps it's something that can be fixed upstream..
Comment 8 Richard PALO 2015-01-27 05:56:14 UTC
Apparently so.
For what it's worth:
>richard@omnis:/home/richard/src/libreoffice$ git --version
>git version 2.2.1
Comment 9 Richard PALO 2015-01-27 06:00:10 UTC
I must say I don't use git archive, perhaps there's some simple thing.
from 'git help archive'

ATTRIBUTES
       export-ignore
           Files and directories with the attribute export-ignore won't be
           added to archive files. See gitattributes(5) for details.

       export-subst
           If the attribute export-subst is set for a file then Git will
           expand several placeholders when adding this file to an archive.
           See gitattributes(5) for details.

       Note that attributes are by default taken from the .gitattributes files
       in the tree that is being archived. If you want to tweak the way the
       output is generated after the fact (e.g. you committed without adding
       an appropriate export-ignore in its .gitattributes), adjust the checked
       out .gitattributes file as necessary and use --worktree-attributes
       option. Alternatively you can keep necessary attributes that should
       apply while archiving any tree in your $GIT_DIR/info/attributes file.
Comment 10 Robinson Tryon (qubit) 2015-02-04 08:52:31 UTC
(In reply to Richard PALO from comment #9)
> I must say I don't use git archive, perhaps there's some simple thing.
> from 'git help archive'

I'm still not seeing executable bits set. Do you have a suggestion re: the perms changing? Perhaps the summary needs an update?

Status -> NEEDINFO
Comment 11 Richard PALO 2015-02-04 09:03:36 UTC
(In reply to Robinson Tryon (qubit) from comment #10)
> (In reply to Richard PALO from comment #9)
> > I must say I don't use git archive, perhaps there's some simple thing.
> > from 'git help archive'
> 
> I'm still not seeing executable bits set. Do you have a suggestion re: the
> perms changing? Perhaps the summary needs an update?
> 
> Status -> NEEDINFO

What platform are you running on?  Perhaps try a couple?
Comment 12 Robinson Tryon (qubit) 2015-02-04 09:16:56 UTC
(In reply to Richard PALO from comment #11)
> (In reply to Robinson Tryon (qubit) from comment #10)
> > I'm still not seeing executable bits set. Do you have a suggestion re: the
> > perms changing? Perhaps the summary needs an update?
> > Status -> NEEDINFO
> 
> What platform are you running on?  Perhaps try a couple?

I can try multiple platforms, but the point remains that I still haven't seen any direct evidence that the executable bit is set on anything but a directory.

You have this:
> => Checking file permissions in libreoffice4-4.3.4.1
> warning:
> /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/
> CREDITS.fodt: executable bit is set on non-executable file.

...but I don't know what program generated that output (and on which OS, version, etc..). Are you installing from source?

Please provide more information so that I can see the problem and seek to reproduce it.
Comment 13 Richard PALO 2015-02-04 09:26:21 UTC
(In reply to Robinson Tryon (qubit) from comment #12)
> I can try multiple platforms, but the point remains that I still haven't
> seen any direct evidence that the executable bit is set on anything but a
> directory.
> 
> You have this:
> > => Checking file permissions in libreoffice4-4.3.4.1
> > warning:
> > /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/
> > CREDITS.fodt: executable bit is set on non-executable file.
> 
> ...but I don't know what program generated that output (and on which OS,
> version, etc..). Are you installing from source?
> 
> Please provide more information so that I can see the problem and seek to
> reproduce it.

As mentioned above, pkgsrc builds from the tarball.  The tarball, as shown in the
extract snippet provided clearly indicates the protection bits *in the tarball*.
What more could I possibly provide?
Comment 14 Richard PALO 2015-02-05 06:37:52 UTC
Just for reference: https://bugs.documentfoundation.org/show_bug.cgi?id=86355#c2
Comment 15 Robinson Tryon (qubit) 2015-02-05 21:27:18 UTC
(In reply to Richard PALO from comment #14)
> Just for reference:
> https://bugs.documentfoundation.org/show_bug.cgi?id=86355#c2

Bug was never marked RESOLVED FIXED, so UNCONFIRMED is the right status for this bug.
Comment 16 Richard PALO 2015-03-01 15:34:05 UTC
This is still true with the latest tarball:
>richard@omnis:/home/richard/src/pkgsrc/devel/xulrunner31$ gtar tvfa /export/pub/pkgsrc/distfiles/libreoffice/libreoffice-4.4.1.2.tar.xz libreoffice-4.4.1.2/readlicense_oo/license
>drwxr-xr-x cloph/users       0 2015-02-20 18:33 libreoffice-4.4.1.2/readlicense_oo/license/
>-rw-r--r-- cloph/users 1226159 2015-02-20 18:33 libreoffice->4.4.1.2/readlicense_oo/license/CREDITS.fodt
>-rw-r--r-- cloph/users  609409 2015-02-20 18:33 libreoffice-4.4.1.2/readlicense_oo/license/LICENSE.html
>-rw-r--r-- cloph/users  438889 2015-02-20 18:33 libreoffice-4.4.1.2/readlicense_oo/license/LICENSE
>-rw-r--r-- cloph/users  961417 2015-02-20 18:33 libreoffice-4.4.1.2/readlicense_oo/license/LICENSE.fodt
>-rw-r--r-- cloph/users    5025 2015-02-20 18:33 libreoffice-4.4.1.2/readlicense_oo/license/NOTICE

Should be rather trivial using .gitattributes to set the correct
settings as indicated in man gitattributes (see EXAMPLES)
Comment 17 Octavio Alvarez 2015-03-04 17:21:55 UTC
I also don't understand. Can you provide exact steps to replicate? (Also, and please excuse my ignorance regarding pkgsrc.) Is the error being thrown by pkgsrc?

The permissions in the tarball are apparently OK. According with your pasted text, the CREDITS.fodt from the tarball does _not_ have executable bits set (rw-r--r--). The executable bit is in the containing folder. So far so good.

The warning is thrown about the one on /tmp/pkgsrc/... Can you provide the output for:

> ls -l /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.3.4.1/CREDITS.fodt

At the risk of just making noise:

Sounds to me that it has nothing to do with the original tarball. It sounds to me that, during the build of the pkgsrc package, the installation of the files in the temporary folder is being done with the executable bit set. And that is what the warning is all about.
Comment 18 Richard PALO 2015-03-06 21:46:56 UTC
I agree I totally became obsessed with the git issue that I lost track of the issue:

here is the real problem:
>richard@omnis:/tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2$ ggrep -E -B2 -A3 'CREDITS\.fodt|LICENSE\.fodt|NOTICE'  workdir/InstallScriptTarget/setup_osl.ins 
>File gid_Apache_Notice
>	Dir = gid_Dir_Brand_Root;
>	Name = "NOTICE";
>	Styles = (PACKED);
>	UnixRights = 755;
>End
>--
>File gid_Credits_Odt
>	Dir = gid_Dir_Brand_Root;
>	Name = "CREDITS.fodt";
>	Styles = (PACKED);
>	UnixRights = 755;
>End
>--
>File gid_License_Odt
>	Dir = gid_Dir_Brand_Root;
>	Name = "LICENSE.fodt";
>	Styles = (PACKED);
>	UnixRights = 755;
>End

these should probably be '644' or something similar.

here they are (ignore the last entry):
>richard@omnis:/home/richard/src/pkgsrc/misc/libreoffice4$ find  /tmp/pkgsrc/misc/libreoffice4/work/ -name CREDITS.fodt -o -name LICENSE.fodt -o -name NOTICE  |xargs ls -la
>-rwxr-xr-x   1 richard  staff    1226159 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.4.1.2/CREDITS.fodt
>-rwxr-xr-x   1 richard  staff     961417 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.4.1.2/LICENSE.fodt
>-rwxr-xr-x   1 richard  staff       5025 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.4.1.2/NOTICE
>-rw-r--r--   1 richard  staff    1226159 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/instdir/CREDITS.fodt
>-rw-r--r--   1 richard  staff     961417 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/instdir/LICENSE.fodt
>-rw-r--r--   1 richard  staff       5025 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/instdir/NOTICE
>-rw-r--r--   1 richard  staff    1226159 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/readlicense_oo/license/CREDITS.fodt
>-rw-r--r--   1 richard  staff     961417 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/readlicense_oo/license/LICENSE.fodt
>-rw-r--r--   1 richard  staff       5025 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/readlicense_oo/license/NOTICE
>-rw-r--r--   1 richard  staff        179 août 18  2007 /tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2/workdir/UnpackedTarball/apache_commons_httpclient/NOTICE

sorry for the recurrent momentary lapses of reason.
Comment 19 Robinson Tryon (qubit) 2015-03-14 06:39:30 UTC
(In reply to Richard PALO from comment #18)
> here is the real problem:
> >richard@omnis:/tmp/pkgsrc/misc/libreoffice4/work/libreoffice-4.4.1.2$ ggrep -E -B2 -A3 'CREDITS\.fodt|LICENSE\.fodt|NOTICE'  workdir/InstallScriptTarget/setup_osl.ins 
> >File gid_Credits_Odt
> >	Dir = gid_Dir_Brand_Root;
> >	Name = "CREDITS.fodt";
> >	Styles = (PACKED);
> >	UnixRights = 755;
> >End
> these should probably be '644' or something similar.

Those perms (755) do look suspect...I think this one is worth further investigation by the devs.
Status -> NEW

> >richard@omnis:/home/richard/src/pkgsrc/misc/libreoffice4$ find  /tmp/pkgsrc/misc/libreoffice4/work/ -name CREDITS.fodt -o -name LICENSE.fodt -o -name NOTICE  |xargs ls -la
> >-rwxr-xr-x   1 richard  staff    1226159 févr. 20 18:33 /tmp/pkgsrc/misc/libreoffice4/work/.destdir/opt/local/libreoffice4-4.4.1.2/CREDITS.fodt
>

Directly in the source file, here are the perms:
qubit@lo:~/libreoffice/builds$ tar -pxvf libreoffice-4.4.1.2.tar.xz libreoffice-4.4.1.2/readlicense_oo/license/CREDITS.fodt
libreoffice-4.4.1.2/readlicense_oo/license/CREDITS.fodt

qubit@lo:~/libreoffice/builds/libreoffice-4.4.1.2/readlicense_oo/license$ ls -l
total 1200
-rw-r--r-- 1 qubit qubit 1226159 Feb 20 11:33 CREDITS.fodt

So I do think the issue is in the packaging step.