{"action":"created","issue":{"url":"https://api.github.com/repos/tcurdt/jdeb/issues/195","labels_url":"https://api.github.com/repos/tcurdt/jdeb/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/tcurdt/jdeb/issues/195/comments","events_url":"https://api.github.com/repos/tcurdt/jdeb/issues/195/events","html_url":"https://github.com/tcurdt/jdeb/issues/195","id":57736242,"number":195,"title":"jdeb 2.0","user":{"login":"tcurdt","id":13697,"avatar_url":"https://avatars.githubusercontent.com/u/13697?v=3","gravatar_id":"","url":"https://api.github.com/users/tcurdt","html_url":"https://github.com/tcurdt","followers_url":"https://api.github.com/users/tcurdt/followers","following_url":"https://api.github.com/users/tcurdt/following{/other_user}","gists_url":"https://api.github.com/users/tcurdt/gists{/gist_id}","starred_url":"https://api.github.com/users/tcurdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcurdt/subscriptions","organizations_url":"https://api.github.com/users/tcurdt/orgs","repos_url":"https://api.github.com/users/tcurdt/repos","events_url":"https://api.github.com/users/tcurdt/events{/privacy}","received_events_url":"https://api.github.com/users/tcurdt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tcurdt/jdeb/labels/improvement","name":"improvement","color":"d9e01d"},{"url":"https://api.github.com/repos/tcurdt/jdeb/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/tcurdt/jdeb/milestones/2","html_url":"https://github.com/tcurdt/jdeb/milestones/2.0","labels_url":"https://api.github.com/repos/tcurdt/jdeb/milestones/2/labels","id":271529,"number":2,"title":"2.0","description":"","creator":{"login":"tcurdt","id":13697,"avatar_url":"https://avatars.githubusercontent.com/u/13697?v=3","gravatar_id":"","url":"https://api.github.com/users/tcurdt","html_url":"https://github.com/tcurdt","followers_url":"https://api.github.com/users/tcurdt/followers","following_url":"https://api.github.com/users/tcurdt/following{/other_user}","gists_url":"https://api.github.com/users/tcurdt/gists{/gist_id}","starred_url":"https://api.github.com/users/tcurdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcurdt/subscriptions","organizations_url":"https://api.github.com/users/tcurdt/orgs","repos_url":"https://api.github.com/users/tcurdt/repos","events_url":"https://api.github.com/users/tcurdt/events{/privacy}","received_events_url":"https://api.github.com/users/tcurdt/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":2,"state":"open","created_at":"2013-02-20T14:51:59Z","updated_at":"2015-10-09T12:06:32Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-02-15T16:40:26Z","updated_at":"2015-12-18T20:29:50Z","closed_at":null,"body":"# Generate the package meta data\r\n\r\nThis should be based on build system inputs. This could look like this for `maven':\r\n\r\n    <control>\r\n      <package>(default from pom)</package>\r\n      <version>(default from pom)</version>\r\n      <section>(default 'misc')</section>\r\n      <priority>(default 'low')</priority>\r\n      <architecture>(default 'all')</architecture>\r\n      <maintainer>(default from pom)</maintainer>\r\n\r\n      <pre-inst src=\"${basedir}/someshell.sh\"/>\r\n      <pre-rm src=\"${basedir}/someshell.sh\"/>\r\n      <post-inst src=\"${basedir}/someshell.sh\"/>\r\n      <post-rm src=\"${basedir}/someshell.sh\"/>\r\n    </control>\r\n\r\nand for `ant`:\r\n\r\n    <control>\r\n      <package>(no default)</package>\r\n      <version>(no default)</version>\r\n      <section>(default 'misc')</section>\r\n      <priority>(default 'low')</priority>\r\n      <architecture>(default 'all')</architecture>\r\n      <maintainer>(no default)</maintainer>\r\n\r\n      <pre-inst src=\"${basedir}/someshell.sh\"/>\r\n      <pre-rm src=\"${basedir}/someshell.sh\"/>\r\n      <post-inst src=\"${basedir}/someshell.sh\"/>\r\n      <post-rm src=\"${basedir}/someshell.sh\"/>\r\n    </control>\r\n\r\nOf course we could us attributes for `ant` instead. While that makes things more `ant` like it does not make things much easier to read IMO. Maybe we could allow both - not sure how I feel about supporting both though. MIght be more confusing than it helps.\r\n\r\n# Inline data configurations\r\n\r\nWe could use explicit nesting to define the virtual file system properties inside a debian archive tree. We would then map it to the sources. Here attributes would cut down the verboseness immensely. Unfortunately `maven` still doesn't support this. Which could be a point for a custom descriptor. For now the proposal looks like this:\r\n\r\n    <!-- defaults:\r\n      dir:  own=root:root mod=750\r\n      file: own=root:root mod=640 filter=no compress=no\r\n    -->\r\n    <data>\r\n      <dir>\r\n        <dir>\r\n          <name>usr</name>\r\n          <own>root:root</own>\r\n          <mod>755</mod>\r\n\r\n          <dir>\r\n            <name>bin</bin>\r\n            <file>\r\n              <name>test</test>\r\n              <own>root:root</own>\r\n              <mod>755</mod>\r\n              <src>${basedir}/someshell.sh</src>\r\n              <filter>yes|no</filter>\r\n            </file>\r\n            <file>\r\n              <name>test-as-link</test>\r\n              <own>root:root</own>\r\n              <mod>755</mod>\r\n              <type>symbolic</type>\r\n              <target>test</target>\r\n            </file>\r\n          </dir>\r\n\r\n          <dir>\r\n            <name>lib</bin>\r\n            <file>\r\n              <name>${project.build.finalName}.jar</test>\r\n              <mod>755</mod>\r\n              <src>${project.build.directory}/${project.build.finalName}.jar</src>\r\n            </file>\r\n            <file>\r\n              <name>${project.build.finalName}.man.gz</test>\r\n              <mod>755</mod>\r\n              <src>somepath</src>\r\n              <compress>gzip</compress>\r\n            </file>\r\n          </dir>\r\n\r\n          <dir>\r\n            <name>doc</bin>\r\n            <src>${basedir}/docs</src>\r\n            <own>auto</own>\r\n            <mod>auto</mod>\r\n\r\n            <dir>\r\n              <name>examples</bin>\r\n              <src>${basedir}/examples.tgz</src>\r\n              <own>auto</own>\r\n              <mod>auto</mod>\r\n            </dir>\r\n        </dir>\r\n      </dir>\r\n    </data>\r\n\r\nIn `ant` we could use filesets to provide the be `src` of `dir` elements. To make the  the mapping less verbose we could use pattern matching to define default values to specify owner, permissions and so on - or fall back to the defaults or the permissions (since java7) on disk. I assume this would break cross platform buildability though. (Could a windows user confirm?)\r\n\r\nQuestion is whether we need this to be a little more dynamic and allow for generating sub trees base on some kind \"generator\".\r\n\r\n    <data id=\"root\">\r\n      <dir>\r\n        <each>\r\n          <id>item</id>\r\n        </each>\r\n\r\n    <data id=\"item\">\r\n      <dir>\r\n        <dir>\r\n          <name>...</name>\r\n\r\nBut is that really needed? One could also just prepare the dir on disk like before and then just map the dir and apply patterns for permissions. For now I would omit this.\r\n\r\nBased on the old gist https://gist.github.com/tcurdt/9275523"},"comment":{"url":"https://api.github.com/repos/tcurdt/jdeb/issues/comments/165891565","html_url":"https://github.com/tcurdt/jdeb/issues/195#issuecomment-165891565","issue_url":"https://api.github.com/repos/tcurdt/jdeb/issues/195","id":165891565,"user":{"login":"ebourg","id":54304,"avatar_url":"https://avatars.githubusercontent.com/u/54304?v=3","gravatar_id":"","url":"https://api.github.com/users/ebourg","html_url":"https://github.com/ebourg","followers_url":"https://api.github.com/users/ebourg/followers","following_url":"https://api.github.com/users/ebourg/following{/other_user}","gists_url":"https://api.github.com/users/ebourg/gists{/gist_id}","starred_url":"https://api.github.com/users/ebourg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebourg/subscriptions","organizations_url":"https://api.github.com/users/ebourg/orgs","repos_url":"https://api.github.com/users/ebourg/repos","events_url":"https://api.github.com/users/ebourg/events{/privacy}","received_events_url":"https://api.github.com/users/ebourg/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T20:29:50Z","updated_at":"2015-12-18T20:29:50Z","body":"For this level of customization I would recommend using the Ant task combined with the maven-antrun-plugin."}}