{"action":"opened","issue":{"url":"https://api.github.com/repos/victronenergy/venus/issues/42","repository_url":"https://api.github.com/repos/victronenergy/venus","labels_url":"https://api.github.com/repos/victronenergy/venus/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/victronenergy/venus/issues/42/comments","events_url":"https://api.github.com/repos/victronenergy/venus/issues/42/events","html_url":"https://github.com/victronenergy/venus/issues/42","id":170006771,"number":42,"title":"replace initscripts.bbappend with permanent-storage","user":{"login":"mpvader","id":5200296,"avatar_url":"https://avatars.githubusercontent.com/u/5200296?v=3","gravatar_id":"","url":"https://api.github.com/users/mpvader","html_url":"https://github.com/mpvader","followers_url":"https://api.github.com/users/mpvader/followers","following_url":"https://api.github.com/users/mpvader/following{/other_user}","gists_url":"https://api.github.com/users/mpvader/gists{/gist_id}","starred_url":"https://api.github.com/users/mpvader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpvader/subscriptions","organizations_url":"https://api.github.com/users/mpvader/orgs","repos_url":"https://api.github.com/users/mpvader/repos","events_url":"https://api.github.com/users/mpvader/events{/privacy}","received_events_url":"https://api.github.com/users/mpvader/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-08T19:40:13Z","updated_at":"2016-08-08T19:40:13Z","closed_at":null,"body":"After adding the [bbappend to initscripts](https://github.com/victronenergy/meta-victronenergy/tree/master/meta-venus/recipes-core/initscripts) (for Jethro, is not used in Danny) a while ago during bbb development, there is now a new package: [permanent storage](https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-core/permanent-storage/permanent-storage.bb). And the two have some overlap and differences. The intention is to get rid of the bbappend on initscripts.\r\n\r\nDiffing the original volatiles and the new one:\r\n```\r\n--- a/meta-venus/recipes-core/initscripts/files/../../../../../openembedded-core/meta/recipes-core/initscripts/initscripts-1.0/volatiles\r\n+++ b/meta-venus/recipes-core/initscripts/files/./volatiles\r\n@@ -22,10 +22,24 @@\r\n # a link will be created at /var/test pointing to /tmp/testfile and due to this\r\n # link the file defined as /var/test will actually be created as /tmp/testfile.\r\n d root root 1777 /run/lock none\r\n+\r\n+# Create file structure on VE data partition\r\n+d root root 1777 /data/conf none\r\n+d root root 1777 /data/db none\r\n+d root root 1777 /data/log none\r\n+\r\n+# keep /data/log and /log as long as not all recipes have been changed.\r\n+l root root 1777 /log /data/log\r\n+\r\n+# Used by hiawatha and perhaps other programs\r\n d root root 0755 /var/volatile/log none\r\n+\r\n+# Used by all applications, including VE ones. They log to /var/log, which is\r\n+# then saved on the data partition\r\n+l root root 0755 /var/log /data/log\r\n+\r\n d root root 1777 /var/volatile/tmp none\r\n l root root 1777 /var/lock /run/lock\r\n-l root root 0755 /var/log /var/volatile/log\r\n l root root 0755 /var/run /run\r\n l root root 1777 /var/tmp /var/volatile/tmp\r\n l root root 1777 /tmp /var/tmp\r\n```\r\n\r\nCode from permanent-storage:\r\n```\r\n[ -d /data/conf ] || mkdir -p /data/conf\r\n[ -d /conf ] || ln -sf /data/conf /conf\r\n[ -d /data/log ] || mkdir -p /data/log\r\n[ -d /log ] || ln -sf /data/log /log\r\n[ -d /data/db ] || mkdir -p /data/db; chown www-data /data/db\r\n[ -d /db ] || ln -sf /data/db /db\r\nmkdir -p /data/home/root\r\nmkdir -p /data/var/lib\r\n```\r\n\r\nBoth recipes make:\r\n* /data/conf, db and log\r\n* /log -> /data/log\r\n\r\nOnly in permanent storage:\r\n* /conf -> /data/conf (no longer necessary in Jethro, and I don't see why Danny would need it)\r\n* /db -> data/db (same, no longer necessary)\r\n* mkdir -p /data/home/root (needed: used to put the home dir for root outside the rootfs)\r\n* mkdir -p /data/var/lib (needed: used to put connman data, aka wifi and ip settings, outside the rootfs)\r\n\r\nOnly in initscripts bbappend:\r\n* /var/log -> /data/log (needed, see below)\r\n\r\nConclusion:\r\n* Remove /conf and /db from permanent-storage\r\n* Add /var/log -> /data/log to permanent-storage, and make sure that initscripts/volatiles does not mess it up."}}
{"actor":{"display_login":"mpvader"}}