Bug 148436 - www/firefox35: directories installed with incorrect permissons
Summary: www/firefox35: directories installed with incorrect permissons
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beat Gaetzi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 21:10 UTC by Peter Jeremy
Modified: 2010-07-22 14:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy 2010-07-07 21:10:02 UTC
	www/firefox35 (and other firefox ports) install a number of
	include files under $LOCALBASE/include/firefox3.  Unfortunately,
	the directories are set to mode 0644, preventing access other
	than by root.

Fix: 

Not known.  A workaround is:
	find /usr/local/include -perm 755 -o -type d -print | xargs chmod 755
How-To-Repeat: 	cd /usr/ports/www/firefox35 && make install
	find /usr/local/include -perm 755 -o -type d -ls
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-07-07 21:10:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gecko

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 swell.k 2010-07-09 13:44:15 UTC
Well, nsinstall(1) uses same permissions when copying directories
recursively. It's easily reproducable by

  $ nsinstall -m 644 /usr/include blah
  nsinstall: cannot create /path/to/blah/include/unctrl.h: Permission denied

More accurately

  $ nsinstall -t -m 644 dist/include/system_wrappers FAKEDIR/include/firefox3/unstable

from toolkit/mozapps/installer/packager.mk

  # The dist/include has module subdirectories that we need to flatten
  find $(DIST)/include -type f -o -type l -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;

This also makes SU_CMD-aware install as well as INSTALL_AS_USER unable
to copy system_wrapper directory contents to FAKEDIR.

And on do-install cpio(1) faithfully copies those wrong permissions
to PREFIX/include.

However, there is a port's specific bug in mimicing `-xtype f' behaviour.
The man pages says

  -xtype c
      The  same as -type unless the file is a symbolic link.  For sym-
      bolic links: if the -H or -P option was specified, true  if  the
      file  is  a  link to a file of type c; if the -L option has been
      given, true if c is `l'.  In other words,  for  symbolic  links,
      -xtype checks the type of the file that -type does not check.

So, it should match all files and symlinks that do *not* point to
directories. IOW, above command should not try to install
system_wrappers and system_wrappers_js. Here is a quick fix.

--- a.diff begins here ---
Index: www/firefox35/files/patch-toolkit_mozapps_installer_packager.mk
===================================================================
RCS file: /a/.cvsup/ports/www/firefox35/files/patch-toolkit_mozapps_installer_packager.mk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-toolkit_mozapps_installer_packager.mk
--- www/firefox35/files/patch-toolkit_mozapps_installer_packager.mk	25 Apr 2009 22:45:27 -0000	1.1
+++ www/firefox35/files/patch-toolkit_mozapps_installer_packager.mk	9 Jul 2010 12:12:28 -0000
@@ -5,7 +5,7 @@
  	  (cd $(DESTDIR)$(includedir)/stable && tar -xf -)
  # The dist/include has module subdirectories that we need to flatten
 -	find $(DIST)/include -xtype f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
-+	find $(DIST)/include -type f -o -type l -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
++	find -L $(DIST)/include -name system_wrappers\* -prune -or -type f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
  # IDL directory is stable (dist/sdk/idl) and unstable (dist/idl)
  	$(NSINSTALL) -D $(DESTDIR)$(idldir)/stable 
  	$(NSINSTALL) -D $(DESTDIR)$(idldir)/unstable
--- a.diff ends here ---
Comment 3 Beat Gaetzi freebsd_committer freebsd_triage 2010-07-09 14:32:30 UTC
Responsible Changed
From-To: gecko->beat

I'll take it.
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-07-21 14:37:27 UTC
beat        2010-07-21 13:37:19 UTC

  FreeBSD ports repository

  Modified files:
    www/firefox35        Makefile distinfo 
    www/firefox35/files  
                         patch-toolkit_mozapps_installer_packager.mk 
  Log:
  - Update to 3.5.11.
  - Remove NEWTAB option as the preference browser.link.open_external was
    removed in Firefox 3.5. [1]
  - Fix directory permissions in PREFIX/include/firefox3. [2]
  
  PR:             ports/148436 [2]
  Reported by:    crsd on EFnet [1], Peter Jeremy <peterjeremy AT acm.org> [2]
  Submitted by:   Anonymous <swell.k AT gmail.com> [2]
  Security:       http://www.vuxml.org/freebsd/8c2ea875-9499-11df-8e32-000f20797ede.html
  
  Revision  Changes    Path
  1.193     +1 -10     ports/www/firefox35/Makefile
  1.52      +3 -3      ports/www/firefox35/distinfo
  1.2       +1 -1      ports/www/firefox35/files/patch-toolkit_mozapps_installer_packager.mk
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Beat Gaetzi freebsd_committer freebsd_triage 2010-07-22 14:47:11 UTC
State Changed
From-To: open->closed

Patch has been committed to www/firefox35. We will update libxul to 
1.9.2 very soon which is not affected by this problem. Thanks for the 
report and the patch!