{"action":"created","issue":{"url":"https://api.github.com/repos/sergev/LiteBSD/issues/23","labels_url":"https://api.github.com/repos/sergev/LiteBSD/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/sergev/LiteBSD/issues/23/comments","events_url":"https://api.github.com/repos/sergev/LiteBSD/issues/23/events","html_url":"https://github.com/sergev/LiteBSD/issues/23","id":123557380,"number":23,"title":"pkg - develop a new package management utility","user":{"login":"sergev","id":1139878,"avatar_url":"https://avatars.githubusercontent.com/u/1139878?v=3","gravatar_id":"","url":"https://api.github.com/users/sergev","html_url":"https://github.com/sergev","followers_url":"https://api.github.com/users/sergev/followers","following_url":"https://api.github.com/users/sergev/following{/other_user}","gists_url":"https://api.github.com/users/sergev/gists{/gist_id}","starred_url":"https://api.github.com/users/sergev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergev/subscriptions","organizations_url":"https://api.github.com/users/sergev/orgs","repos_url":"https://api.github.com/users/sergev/repos","events_url":"https://api.github.com/users/sergev/events{/privacy}","received_events_url":"https://api.github.com/users/sergev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sergev/LiteBSD/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T21:16:15Z","updated_at":"2015-12-22T21:49:58Z","closed_at":null,"body":"For LiteBSD, we need a package management utility, similar to Debian's \"apt\" or OpenWrt \"opkg\" tool. Here is a brief list of requirements:\r\n1. BSD or MIT or Apache license.\r\n2. Small memory footprint.\r\n3. Allow multiple remote repositories.\r\n4. The name can be \"pkg\" or something like \"pak\" or \"pac\".\r\n5. No need for source packages. \r\n6. No need for package development services. Packages can be built by other tools.\r\n7. Keep the list of repositories in /etc directory, like \"/etc/pkg/sources.list\"\r\n8. Store the configuration parameters in \"/etc/pkg/pkg.conf\" file. Consider JSON as a format for *.conf files.\r\n9. Store the local database in \"/var/lib/pkg/\" directory.\r\n10. \"pkg update\" - update the list of package known by your system.  Fetch lists from remote repositories.\r\n11. \"pkg upgrade\" - upgrade all the packages already installed on your system. Fetch and install new versions of packages from remote repositories (without installing extra packages or removing packages).\r\n12. \"pkg install foo\" - install the foo package and all its dependencies.\r\n13. \"pkg remove foo\" - remove the foo package from your system.\r\n14. \"pkg search word\" - find packages whose description contain word.\r\n15. \"pkg show foo\" - print the detailed information of a package (not yet installed). Include the versions available for a package, the packages a given package depends on, and the packages that reverse-depend on it.\r\n16. \"pkg status foo\" - get a report on a particular installed package, including a list of all the files provided by the package foo.\r\n17. \"pkg list\" - print a list of all the packages installed on your system.\r\n"},"comment":{"url":"https://api.github.com/repos/sergev/LiteBSD/issues/comments/166739779","html_url":"https://github.com/sergev/LiteBSD/issues/23#issuecomment-166739779","issue_url":"https://api.github.com/repos/sergev/LiteBSD/issues/23","id":166739779,"user":{"login":"ibara","id":3883351,"avatar_url":"https://avatars.githubusercontent.com/u/3883351?v=3","gravatar_id":"","url":"https://api.github.com/users/ibara","html_url":"https://github.com/ibara","followers_url":"https://api.github.com/users/ibara/followers","following_url":"https://api.github.com/users/ibara/following{/other_user}","gists_url":"https://api.github.com/users/ibara/gists{/gist_id}","starred_url":"https://api.github.com/users/ibara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibara/subscriptions","organizations_url":"https://api.github.com/users/ibara/orgs","repos_url":"https://api.github.com/users/ibara/repos","events_url":"https://api.github.com/users/ibara/events{/privacy}","received_events_url":"https://api.github.com/users/ibara/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T21:49:58Z","updated_at":"2015-12-22T21:49:58Z","body":"So I already have:\r\n1. Covered\r\n2. It's a 130 LOC ksh shell script right now :)\r\n3. Ii's repo agnostic; actually it doesn't really have a concept of repos (this is in-line with pkgng from FreeBSD/DFly, pkg_add from OpenBSD, and pkgsrc)\r\n4. Sure, we can name it whatever :) pkg was just the easiest\r\n5. I like having source packages, but pkg will work even if a user never builds from source\r\n6. Not sure what you mean by this--right now my Ports Tree hooks directly into the LiteBSD build system. The difference is it creates packages instead of installing directly to the file system. This makes it the same as all the other *BSD package tools and ports trees.\r\n7. This is not a thing *BSD ports tree/pkg tools do. That's a Linuxism. (or an apt-getism specifically)\r\n8. One of the things all the BSDs have learned is playing with things outside ${LOCALBASE} (aka /usr/local) is extremely messy. pkgng does everything in ${LOCALBASE}. OpenBSD installs everything to ${LOCALBASE} then @sample's anything that needs to live elsewhere after install.\r\n9. I'm currently storing that info in ${LOCALBASE}/pkg but that can be changed.\r\n10. I haven't implemented version control yet. But that can be done.\r\n11. Haven't implemented version control yet.\r\n12. I called it \"pkg add\" (but this can be changed). Doesn't do dep checking yet.\r\n13. Implemented. I called it \"pkg rm\" but we can change the wording no problem.\r\n14. Not implemented yet\r\n15. Can be implemented\r\n16. That can very easily be done, I already have all the logic to do this (it's basically what I already have for \"pkg info\" but reads a different part of the plist)\r\n17. Already implemented. I called it \"pkg info\" but we can always change that. If \"pkg info\" is called without argument, it lists all installed packages. If you run \"pkg info <package>\" it only gives you info for that package."}}