New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #21066 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

xcb overwrites entire /etc dir

Reported by: bakvis_68@… Owned by: qbarnes@…
Priority: High Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: snc@…
Port: xcb

Description (last modified by ryandesign@…) (diff)

I just upgraded port startup-notification to version 0.10, which pulls in port xcb (new dependency). After building there was a warning message indicating that xcb is installing something outside /opt/local:

...
--->  Compressing man pages for xcb
man1/xcb.1:	 60.0% -- replaced with man1/xcb.1.gz
Warning: violation by /etc
Warning: xcb violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!
--->  Installing xcb @2.4_1
--->  Activating xcb @2.4_1
--->  Cleaning xcb
--->  Removing build directory for xcb

After uninstalling xcb I noticed that the entire /etc dir was gone! On Mac OS X, /etc is a symlink to /private/etc, so it was easily repaired by

sudo ln -s /private/etc /etc

However, this is potentially very dangerous! I don't know what would have happened if I had logged out?

The offending line in the Makefile (produced after configure phase) is at line 379:

ETCX11DIR = /etc/X11

This should be replaced by ${prefix}/etc/X11.

Change History

comment:1 Changed 4 years ago by macsforever2000@…

  • Owner changed from macports-tickets@… to qbarnes@…

comment:2 Changed 4 years ago by ryandesign@…

  • Description modified (diff)

comment:3 Changed 4 years ago by snc@…

Added a reinplace in r57007.

comment:4 Changed 4 years ago by snc@…

  • Status changed from new to closed
  • Cc snc@… added
  • Resolution set to fixed

I made that change since it's marked as high priority and is fairly critical to the system's wellbeing.

That appears to be the only etc reference. Bumping revision and closing.

comment:5 Changed 4 years ago by macsforever2000@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

I cannot activate xcb now.

--->  Activating xcb @2.4_2
DEBUG: activating directory: /
DEBUG: activating directory: /opt
DEBUG: activating directory: /opt/local
DEBUG: activating directory: /opt/local/bin
DEBUG: activating file: /opt/local/bin/xcb
DEBUG: activating directory: /opt/local/etc
DEBUG: activating directory: /opt/local/etc/X11
DEBUG: activating directory: /opt/local/etc/X11/app-defaults
DEBUG: activating file: /opt/local/etc/X11/app-defaults/Xcb
DEBUG: activating directory: /opt/local/lib
DEBUG: activating directory: /opt/local/lib/X11
DEBUG: activating link: /opt/local/lib/X11/app-defaults
DEBUG: activating directory: /opt/local/share
DEBUG: activating directory: /opt/local/share/man
DEBUG: activating directory: /opt/local/share/man/man1
DEBUG: activating file: /opt/local/share/man/man1/xcb.1.gz
DEBUG: Adding file to file_map: /opt/local/bin/xcb for: xcb
DEBUG: Adding file to file_map: /opt/local/etc/X11/app-defaults/Xcb for: xcb
DEBUG: Adding link to file_map: /opt/local/lib/X11/app-defaults for: xcb
Error: Target org.macports.activate returned: Is a directory
DEBUG: Backtrace: Is a directory
    while executing
"filemap set file_map $file $port"
    (procedure "receipt_flat::register_file" line 11)
    invoked from within
"${macports::registry.format}::register_file $file $port"
    (procedure "registry::register_file" line 3)
    invoked from within
"registry::register_file $file $name"
    (procedure "portimage::activate" line 63)
    invoked from within
"registry_activate $name ${version}_${revision}${portvariants} [array get user_options]"
    (procedure "portactivate::activate_main" line 3)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for xcb): org.macports.activate
Error: Status 1 encountered during processing.

comment:6 Changed 4 years ago by macsforever2000@…

It does not work for me on 10.5.8. But I just tried on Snow Leopard at home and it works.

comment:7 Changed 4 years ago by jeremyhu@…

  • Status changed from reopened to closed
  • Resolution set to fixed

I submitted the correct fix in r57050

Note: See TracTickets for help on using tickets.