{"action":"created","issue":{"url":"https://api.github.com/repos/rauc/rauc/issues/333","repository_url":"https://api.github.com/repos/rauc/rauc","labels_url":"https://api.github.com/repos/rauc/rauc/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/rauc/rauc/issues/333/comments","events_url":"https://api.github.com/repos/rauc/rauc/issues/333/events","html_url":"https://github.com/rauc/rauc/issues/333","id":364000960,"node_id":"MDU6SXNzdWUzNjQwMDA5NjA=","number":333,"title":"attach file to bundle","user":{"login":"ilkondr","id":12596151,"node_id":"MDQ6VXNlcjEyNTk2MTUx","avatar_url":"https://avatars1.githubusercontent.com/u/12596151?v=4","gravatar_id":"","url":"https://api.github.com/users/ilkondr","html_url":"https://github.com/ilkondr","followers_url":"https://api.github.com/users/ilkondr/followers","following_url":"https://api.github.com/users/ilkondr/following{/other_user}","gists_url":"https://api.github.com/users/ilkondr/gists{/gist_id}","starred_url":"https://api.github.com/users/ilkondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilkondr/subscriptions","organizations_url":"https://api.github.com/users/ilkondr/orgs","repos_url":"https://api.github.com/users/ilkondr/repos","events_url":"https://api.github.com/users/ilkondr/events{/privacy}","received_events_url":"https://api.github.com/users/ilkondr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-26T12:21:36Z","updated_at":"2018-09-26T12:55:50Z","closed_at":null,"author_association":"NONE","body":"Hi folks,\r\nI'm trying to get configured pre-install and post-install hooks, which are not slot-related, but system-related. So I would like to have code put into bundle with behaviour of **handlers**. Is there any internal solution for this? Is there way to just attach a file to bundle?\r\n\r\nIn order to attach file I tried to add new slot with type=file to manifest (tarball with my scripts).\r\nThan I created handlers which unpack tarball and execute scripts. Sounds good.\r\nBut rauc install does not work for me if manifest has extra slot (system.conf with 3 slots and bundle manifest with 4 slots).\r\nAs you can see install succeeded but no update performed:\r\n\r\n```\r\nrauc[282]: Starting pre install handler: /etc/rauc/pre-install.sh\r\nrauc[282]: Using default handler\r\nrauc[282]: (rauc:282): rauc-WARNING **: No target slot for class upgrade-handlers of image upgrade-handlers.tar.img found\r\nrauc[282]: rauc-Message: Marking target slot as non-bootable...\r\nrauc[282]: rauc-Message: Marking slots as bootable...\r\nrauc[282]: rauc-Message: installing /home/root/bundle.raucb: Updating slots...\r\nrauc[282]: rauc-Message: installing /home/root/bundle.raucb: All slots updated\r\nrauc[282]: Starting post install handler: /etc/rauc/post-install.sh\r\nrauc[282]: rauc-Message: installing /home/root/bundle.raucb: finished\r\nrauc[282]: rauc-Message: installing `/home/root/bundle.raucb` succeeded\r\n```\r\n\r\nThat would be great if there is a way to get things working with extra slot.\r\nThanks"},"comment":{"url":"https://api.github.com/repos/rauc/rauc/issues/comments/424704624","html_url":"https://github.com/rauc/rauc/issues/333#issuecomment-424704624","issue_url":"https://api.github.com/repos/rauc/rauc/issues/333","id":424704624,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDcwNDYyNA==","user":{"login":"ejoerns","id":1416326,"node_id":"MDQ6VXNlcjE0MTYzMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1416326?v=4","gravatar_id":"","url":"https://api.github.com/users/ejoerns","html_url":"https://github.com/ejoerns","followers_url":"https://api.github.com/users/ejoerns/followers","following_url":"https://api.github.com/users/ejoerns/following{/other_user}","gists_url":"https://api.github.com/users/ejoerns/gists{/gist_id}","starred_url":"https://api.github.com/users/ejoerns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejoerns/subscriptions","organizations_url":"https://api.github.com/users/ejoerns/orgs","repos_url":"https://api.github.com/users/ejoerns/repos","events_url":"https://api.github.com/users/ejoerns/events{/privacy}","received_events_url":"https://api.github.com/users/ejoerns/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T12:55:50Z","updated_at":"2018-09-26T12:55:50Z","author_association":"MEMBER","body":"Hi @ilkondr \r\n\r\nSeveral things on this:\r\n\r\n* An image listed in the manifest must have a corresponding slot (class) listed in system.conf. This is what your log already rejected and what is by intention\r\n\r\n* Attaching a file to a bundle is quite easy, RAUC packs all files that are located in the folder you create your bundle from together. There is no need to list it in the manifest.\r\n\r\n* Hooks lack support for pre- and post-install. This is not intentionally but simply because it is not implemented yet -> patches welcome\r\n\r\nThus, without adding support to the handlers, the only way to achieve what you described would be to use a handler and simply put the image into the bundle. Build system integration for this might be missing -> patches welcome :)\r\n\r\nAnyway, to better understand what would fit your needs, could you explain what actual purpose of your extra image / archive is? It means, what do you want to do with it? Bootstrapping something? Adding additional content to a slot? .."}}
{"actor":{"display_login":"ejoerns"}}