Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11502 closed enhancement (no change required)

Package management: implement the ability to write data out of read only directories

Reported by: Giova84 Owned by: bonefish
Priority: low Milestone: R1
Component: Servers/package_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

Well, currently when we install a package, the only way to write data out of the read only directories, atm, is to rely on post_install scripts. In this page https://dev.haiku-os.org/wiki/PackageManagement/TODO I've read that someday the package system will get rid of these post_install scripts, and I agree: would be a better and more clean way achieve this ability (write data out of read only directories) in the structure of HPKG's files. There is some task about? As reference I have seen this similar ticket #10025 which is about Desktop symlinks (in that ticket i read about "allow the desktop directory to be replaced with a virtual directory") , but would be also useful (for those which, eg like TTcoder, prepare packages/OEM installations for customers) implementing this ability for any other directory. Eg, to mention some of these, to "/boot/home/config/settings/Tracker/Tracker New Templates." or "/boot/home/config/settings/boot/launch" I also do something similar as TTcoder does, since I work in IT support (and I'm waiting for Haiku R1B1 to start to promote a little bit more this nice OS). For some OEM installations, there would be the necessity to supply everything as default, for some particular situations and customers, to provide them a system which is ready to use, also in terms of applications, settings and behaviour.

In anyway i set this ticket as low priority, since for now the post_install scripts are able to do the job.

Change History (3)

comment:1 by Giova84, 10 years ago

Type: bugenhancement

in reply to:  description ; comment:2 by bonefish, 10 years ago

Resolution: no change required
Status: newclosed

Replying to Giova84:

Well, currently when we install a package, the only way to write data out of the read only directories, atm, is to rely on post_install scripts.

Global settings/configuration files can be written using the "global-writable-file". E.g. cf. the "man" package.

In this page https://dev.haiku-os.org/wiki/PackageManagement/TODO I've read that someday the package system will get rid of these post_install scripts,

That is not what the TODO item means. It refers to the post_install scripts that the Haiku build system installs ("default_deskbar_items.sh" and "add_catalog_entry_attributes.sh"). Those tasks can be performed by the build system and shouldn't use post_install scripts at all.

and I agree: would be a better and more clean way achieve this ability (write data out of read only directories) in the structure of HPKG's files. There is some task about? As reference I have seen this similar ticket #10025 which is about Desktop symlinks (in that ticket i read about "allow the desktop directory to be replaced with a virtual directory") , but would be also useful (for those which, eg like TTcoder, prepare packages/OEM installations for customers) implementing this ability for any other directory. Eg, to mention some of these, to "/boot/home/config/settings/Tracker/Tracker New Templates." or "/boot/home/config/settings/boot/launch" I also do something similar as TTcoder does, since I work in IT support (and I'm waiting for Haiku R1B1 to start to promote a little bit more this nice OS). For some OEM installations, there would be the necessity to supply everything as default, for some particular situations and customers, to provide them a system which is ready to use, also in terms of applications, settings and behaviour.

I don't really see what this has to do with packages at all. When creating/customizing the image for the customer, you can just copy the settings and other data, create desktop symlinks, etc. at your heart's desire. If you really need to provide you customization via a package (for whatever reason) you can use the post_install script mechanism (it won't go away anytime soon, respectively will only be replaced by an at least equally powerful mechanism).

in reply to:  2 comment:3 by Giova84, 10 years ago

Replying to bonefish:

Replying to Giova84:

In this page https://dev.haiku-os.org/wiki/PackageManagement/TODO I've read that someday the package system will get rid of these post_install scripts,

That is not what the TODO item means. It refers to the post_install scripts that the Haiku build system installs ("default_deskbar_items.sh" and "add_catalog_entry_attributes.sh"). Those tasks can be performed by the build system and shouldn't use post_install scripts at all.

Sorry, i misunderstood, since also the "post_install" scripts are present in packages building.

I don't really see what this has to do with packages at all. When creating/customizing the image for the customer, you can just copy the settings and other data, create desktop symlinks, etc. at your heart's desire. If you really need to provide you customization via a package (for whatever reason) you can use the post_install script mechanism (it won't go away anytime soon, respectively will only be replaced by an at least equally powerful mechanism).

And in facts is what I do :-) The reason is that HPKG files (with post_install scripts) are able to provide, in a simple way, updates or changes in needed configuration. "Just install this file and everything will be as you currently needs".

Thank you for your reply.

Note: See TracTickets for help on using tickets.