{"id":21339827,"url":"https://github.com/projeto-pindorama/mitzune","last_synced_at":"2025-06-30T02:07:30.086Z","repository":{"id":46972248,"uuid":"407389263","full_name":"Projeto-Pindorama/mitzune","owner":"Projeto-Pindorama","description":"chroot environments, done in a more elegant way","archived":false,"fork":false,"pushed_at":"2023-12-25T17:52:55.000Z","size":43,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T20:51:25.824Z","etag":null,"topics":["chroot","chroot-script","containerization","hacktoberfest","shell","unix"],"latest_commit_sha":null,"homepage":"http://pindorama.dob.jp/pub/mitzune/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Projeto-Pindorama.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"takusuman","liberapay":"takusuman","custom":"https://www.buymeacoffee.com/takusuman"}},"created_at":"2021-09-17T03:15:28.000Z","updated_at":"2024-11-12T02:09:30.000Z","dependencies_parsed_at":"2023-12-25T20:10:42.698Z","dependency_job_id":"fb57eda7-b605-4af2-9916-e25632502ddb","html_url":"https://github.com/Projeto-Pindorama/mitzune","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Projeto-Pindorama/mitzune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Projeto-Pindorama%2Fmitzune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Projeto-Pindorama%2Fmitzune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Projeto-Pindorama%2Fmitzune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Projeto-Pindorama%2Fmitzune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Projeto-Pindorama","download_url":"https://codeload.github.com/Projeto-Pindorama/mitzune/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Projeto-Pindorama%2Fmitzune/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262697277,"owners_count":23349894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chroot","chroot-script","containerization","hacktoberfest","shell","unix"],"created_at":"2024-11-22T00:47:39.009Z","updated_at":"2025-06-30T02:07:30.065Z","avatar_url":"https://github.com/Projeto-Pindorama.png","language":"Shell","funding_links":["https://github.com/sponsors/takusuman","https://liberapay.com/takusuman","https://www.buymeacoffee.com/takusuman"],"categories":[],"sub_categories":[],"readme":"# Mitzune - chroot environments, for poor lads who don't have VMX support on\r\n# their processors\r\nThis is just a prototype that I'm using to test Copacabana Linux on my PC via\r\nchroot(8) since I don't have support to VMX in my low-end 10-year-old processor.\r\nYeah, fuck you Intel, People's Republic of China, TSMC and modern car manufacturers.\r\nAnd fuck you too, Brazil gov't. I don't deserve being smashed by taxes and \r\ninflation and don't getting any nearly decent state services back.\r\n\r\nSo while I can't afford a new laptop, I will use this.\r\nIf this succeeds, I will remake it in Go, with faggotries like JSON for configu\r\nration et cetera. And because Shell is fucking ugly.\r\n\r\n# What is the main idea?\r\nThe main idea is that you have a prefix (~/mitzune) where you can extract/copy\r\nanother UNIX-like (same-kernel, in case of a Linux host, of course) operating \r\nsystem of same architecture root files (which can be saved on an tarball) and \r\nthen configure it.\r\nAfter that, in theory, you'd just need to run Mitzune + the prefix name + the\r\noperation.\r\n\r\nExample:\r\nmitzune -n copacabana -R ~/projects/copacabana_olinux-rootfs-0.4.2a-x86_64.tar.xz -c\r\n\r\nThis will create a prefix with the name of \"copacabana\", using the\r\ncopacabana_olinux-rootfs-0.4.2a-x86_64.tar.xz as the tarball to be extracted.\r\nIt supports extracting gzip and xz'd files-- I don't think you would need\r\nanything else; if you feel the need to use anything else, like for example bzip2,\r\njust pull-resquest it!\r\n\r\nYou can also create a Shell-style configuration file using the -C option, just\r\nset it before -c(reate) or -r(un). \r\nIts contents will be sent into chroot's /etc/profile (if OVERWRITE_CHROOT_PROFILE \r\nis equal to \"true\") or into an identificable Mitzune file called mitzune_config.sh \r\nlocated at /etc/profile.d (if OVERWRITE_CHROOT_PROFILE is equal to \"false\" or \r\nanything else).\r\n\r\nIn Alpine Linux, you may need to source /etc/profile right after logging into it.\r\nKind of a fishy bug, but it works so... :^)\r\n\r\nIt's basically containers made by someone who doesn't ever used popular containers\r\nbefore.\r\n\r\n# How do I install it?\r\nI've designed it to be used as an user-local script, not system-wide.\r\nYou can install it using this pipeline, which extracts the tarball release from\r\nxz and un-tar it directly to your home directory:\r\n\r\nxz -cd mitzune.?.?-?.NOARCH.Linux.tar.xz | tar -xvf - -C ~/\r\n\r\nBut, before you ask me, this is a work in progress.\r\nAt this moment, 17th October 2021, you can't map a prefix (using find(1) + \r\nxz(1) (for compressing it)) yet.\r\nThere's already an implementation for chrooting with Mitzune, but it's\r\nexperimental (polite word for \"crappy\") yet and needs some polishing, but hey,\r\nit works! :^)\r\n\r\n## Dependencies\r\n• GNU Broken-Again Shell;\r\n• OpenDoas --- for privilege elevation;\r\n• The classical standard Unix utilities --- how far I've tested only Plan 9's\r\n  give some odd bugs, otherwise, all the others tend to work perfectly;\r\n• Any tar implementation --- I recommend using star;\r\n• xz and gzip --- I recommend using pigz instead of gzip, since it's fairly\r\n  faster.\r\n\r\n## Get Mitzune\r\nReleases can be found at get.pindorama.dob.jp.\r\nhttp://pindorama.dob.jp/pub/mitzune\r\n\r\n# How do I use it?\r\nThere's a print_help function containing information about the basic usage.\r\nFor now, I didn't wrote a manual yet, so you will need to read the code to know\r\nbetter what happens under the table. Sorry... :^(\r\nBut, if you mind helping me, you can write a small text about the functions and\r\npull-request-it.\r\nI would be grateful. :^)\r\n\r\n## Hacking\r\nMitzune's code is fairly readable even for ones who doesn't actually program in\r\nShell Script, I've been also keeping a consistent and sane code-style (result of\r\nyears of experience being beaten by syntax errors or by reading my own code and\r\ndon't understanding it).\r\n\r\nGood references for learning Shell Script for hacking Mitzune's code are the\r\n\"Advanced Bash-Scripting Guide\", \"Learning the Korn Shell, 2nd Edition\" and, for\r\nPortuguese language speakers, \"Programação Shell Linux\" --- which tries to teach\r\ncharacteristics both from GNU Bourne-Again Shell, Korn Shell and some even from\r\nthe crappy POSIX standard.\r\n\r\nThe ABS can be found on TLDP.org, it's public domain! :^)\r\n\"Learning the Korn Shell\" is a paid book, but can be found for free in some\r\n\"Milk (doc)store\" from Ukraine.\r\n\"Programação Shell Linux\" is also a paid book, but an older version from around\r\n2010 (the 8th edition) can be found in some site whose name sounds like\r\n\"doceiro\" (the portuguese word for \"confectioner\").\r\n\r\nAlthough Bash is used here, I prefer the Korn Shell syntax for the most part of\r\nthings. I just didn't ported Mitzune 100% for Korn Shell yet because of other\r\nthings, such as getopt doesn't working the same.\r\n\r\n# Who can I blame for it?\r\nMe, Luiz Antonio (a.k.a takusuman).\r\n\r\n## Who wrote these libraries?\r\nerrhand.shi was written entirely by me. As its name already says, it's meant\r\nto be a simple error handling library. It is meant to be used in Mitzune, but\r\nyou can fork it and hack it to work as you want in your script (see \"Hacking\"\r\nabove).\r\n\r\nposix-alt.shi, as I said below, was taken from my old, badly-written and\r\ndefunct project, otto-pkg --- and, because of that, it isn't on MIT, but in\r\nthe Caldera License --- and resurrected into something useful.\r\nIt is a collection of copycenter-licensed (MIT, BSD etc) Shell functions\r\nfrom other hackers across the 'Net and, in majority, our own authoral work.\r\nSince this \"read me\" is somewhat also Mitzune's documentation, I'll credit\r\neveryone that some piece of work on it:\r\n• realpath(), timeout(), nproc() and n() by Luiz Antonio;\r\n• n() written originally by Luiz Antonio (as said above), rewritten from\r\nscratch (and fixed) by Caio Yoshimura in September 2021;\r\n• basename() and lines() from Araps' pure-sh-bible;\r\n• lines() was incorporated by Caio Yoshimura, originally from Araps'\r\npure-sh-bible, line counter fixed by Luiz Antonio in June 2021.\r\n\r\n# How can I share it?\r\nThis is under the MIT license, enjoy it. :^)\r\nlib/posix-alt.shi is licensed under Caldera License, as it was taken from\r\notto-pkg, one of my first projects.\r\n\r\nFootnote[0]: \"Mitzune\" is a pun on the name \"Mitsune Konno\", which is a\r\ncharacter from Ken Akamatsu's \"Love Hina\".\r\nMitsune is a beautiful young woman who have voluptuous foxy eyes, and a light\r\nbrown, short/boyish (and somewhat fluffy) hair. She likes drinking sake,\r\ngambling and causing mischief when she's bored, but she never goes over the\r\nlimit.\r\nThe only affiliation between me, Kodansha (manga publisher) and Ken Akamatsu\r\nis that I'm a big fan of his works.\r\n\r\nFootnote[1]: Yeah, I've already got a new laptop, but I won't give up on\r\nMitzune. Besides Copacabana build consolidation already depending on it, I know\r\nthat are people over there with old and low-end PCs that may will need it in the\r\nfuture.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojeto-pindorama%2Fmitzune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojeto-pindorama%2Fmitzune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojeto-pindorama%2Fmitzune/lists"}