Opened 21 months ago

Last modified 6 days ago

#13780 new bug

Installing package with a "servers" directory will freeze the system.

Reported by: pulkomandy Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: Servers/package_daemon Version: R1/Development
Keywords: Cc: ttcoder
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by korli)

The BRexx package (recently added to eu.hpkg repo) comes with a server. Naturally it is added to the "servers" directory.

Installing this package will freeze Haiku (no matter if using pkgman or haikudepot).

Change History (8)

comment:1 Changed 21 months ago by korli

Description: modified (diff)

comment:2 Changed 19 months ago by pulkomandy

Ok, after a bit of sleep and more careful investigation, it turns out there was a problem in the package creation. It does not contain a "servers" dir, but it contains a file of that name at the same path.

This explains why things stop working: overriding the "servers" directory with a file is not a good idea.

Should the package system be a bit more protective against such errors?

comment:3 Changed 19 months ago by waddlesplash

Well, the system should not freeze no matter what happens, so we should fix that bug.

comment:4 Changed 8 days ago by leavengood

  1. The package creation should not allow files in the package to overwrite system directories at all.
  2. Activating a package should also surely ignore those and complain to the user.
  3. Even if 1 and 2 were not done, as waddlesplash says, it should not lock up the system.

I may look at this while checking out package stuff.

comment:5 Changed 8 days ago by waddlesplash

The package creation should not allow files in the package to overwrite system directories at all.

This part was already done last year (by me) as part of a fix to a different ticket -- nodes (i.e. files and directories) from packages with the "system package" flag set now have precedence over any and all other package nodes.

comment:6 in reply to:  5 ; Changed 6 days ago by ttcoder

Cc: ttcoder added

Replying to waddlesplash:

This part was already done last year (by me) as part of a fix to a different ticket -- nodes (i.e. files and directories) from packages with the "system package" flag set now have precedence over any and all other package nodes.

Am I reading too much into that statement, or does that mean I can no longer override the HDA driver (/boot/system/add-ons/kernel/drivers/bin/hda) with my own package's, and I have to build Haiku from scratch in order to do so ?

comment:7 in reply to:  6 Changed 6 days ago by waddlesplash

Replying to ttcoder:

Am I reading too much into that statement, or does that mean I can no longer override the HDA driver (/boot/system/add-ons/kernel/drivers/bin/hda) with my own package's

You cannot put a "normal package" in and override said HDA driver without doing anything else, but you can still override a file. You just now must do either one of the following in addition:

1) Blacklist the "haiku" package's "hda" driver (as blacklists are package-specific this will not affect your package, of course) -- requires modifying a settings file on each machine you want to install the package on.

2) Set the "system_package" flag on said package. This just means adding a single line to the .PackageInfo. So this is pretty easy and probably the route you want to take.

In either case you definitely don't need to rebuild Haiku from scratch.

comment:8 Changed 6 days ago by ttcoder

Ok that will take a bit of retooling, but that's reasonable thx

Note: See TracTickets for help on using tickets.