{"push_id":2392910367,"size":11,"distinct_size":11,"ref":"refs/heads/qmimodem","head":"b1782aa84302ddaf049ba3f40cb58c18c890105f","before":"51bd8ed0ca3923a5be39f92c2d7a16cb3981cf9f","commits":[{"sha":"e72afc53fd9cb9e8f9d6dc0c1ee03848a1dc93d0","author":{"name":"Oliver Smith","email":"04aa07bc26d4a3b1f5f2f1214958efc6f904b738@bitmessage.ch"},"message":"pmbootstrap zap -m: delete outdated packages too (#1306)\n\n`-m` is for deleting local compiled packages, for which there is no\r\naport with the same version. Prior to this change, this only worked\r\nfor packages where no aport exists, or for packages that are newer\r\nthan the aports.\r\n\r\nThat is, because we used the usual APKINDEX parsing logic, which\r\nignores old packages in the APKINDEX and only returns the one with the\r\nhighest version (that makes sense during dependency resolution).\r\n\r\nChanges:\r\n* New `pmb.parse.apkindex.parse_blocks()` function that returns a raw\r\n  list of blocks, instead of the dict with removed duplicates with\r\n  lower version you get from the usual `.parse()` function.\r\n* Renamed each of the zap flags and their descriptions to make clear\r\n  what they are doing now.\r\n  ```\r\n  short  long (old)         long (new)\r\n  -p     --packages         --pkgs-local\r\n  -m     --mismatch-bins    --pkgs-local-mismatch\r\n  -o,    --old-bins         --pkgs-online-mismatch\r\n  ```","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/e72afc53fd9cb9e8f9d6dc0c1ee03848a1dc93d0"},{"sha":"4cad170844fb6b3cfa9f83944e2faf7b7129aa34","author":{"name":"Daniele Debernardi","email":"e580849d06c6fce99a6754976fda7311a96dba0a@gmail.com"},"message":"[nokia-n900] Add swiss german keyboard layout (#1310)","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/4cad170844fb6b3cfa9f83944e2faf7b7129aa34"},{"sha":"af4b817c217ef0ffee91b40afa48e68a315ef03a","author":{"name":"Oliver Smith","email":"04aa07bc26d4a3b1f5f2f1214958efc6f904b738@bitmessage.ch"},"message":"Skip virtual packages when parsing APKINDEX (#1278)\n\nSince PR #1247 we are using the virtual package `.pmbootstrap` to mark\r\npackages as not explcitly installed. In case `pmbootstrap` doesn't\r\nfinish the installation because of a bug, the `.pmbootstrap` virtual\r\npackage may not get uninstalled.\r\n\r\nAs virtual packages don't have the \"timestamp\" attribute set in the\r\npackage database (which indicates when the package was built), the\r\nAPKINDEX parser fails to parse them.\r\n\r\nChanges:\r\n* pmb.parse.apkindex.parse_next_block(): don't require the \"timestamp\"\r\n  attribute to be set (but the arch attribute instead, which is always\r\n  present)\r\n* pmb.parse.apkindex.parse(): when a block does not have a `timestamp`\r\n  attribute, skip it, because it must be a virtual package.\r\n* add test cases for both functions with a package database that\r\n  contains a virtual package.","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/af4b817c217ef0ffee91b40afa48e68a315ef03a"},{"sha":"d9ebfda2c7fc64bc30e9756359ac17316ab87843","author":{"name":"Ethan R. Jones","email":"765c2bb7b7e119d42d3a4b8563757ec44912c393@gmail.com"},"message":"Add ZTE Kis3 / ZTE Open C (#1311)","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/d9ebfda2c7fc64bc30e9756359ac17316ab87843"},{"sha":"0269073cc18a56ff2d3fecd5e25a7081da80d712","author":{"name":"Joey Hewitt","email":"33e20f6e1a7e8c56f1e30efa4711aa0be60ef6c1@joeyhewitt.com"},"message":"i9195: add touchscreen to deviceinfo (#1313)","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/0269073cc18a56ff2d3fecd5e25a7081da80d712"},{"sha":"dc624aecea43e8ae0d997c42c0e98c83ce7ef1b8","author":{"name":"Oliver Smith","email":"04aa07bc26d4a3b1f5f2f1214958efc6f904b738@bitmessage.ch"},"message":"Mount tmpfs in chroot's /dev folders (#1317)","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/dc624aecea43e8ae0d997c42c0e98c83ce7ef1b8"},{"sha":"5f27aa73ccd58ef02902f8989333ae92e8058eba","author":{"name":"Luca Weiss","email":"c771c40e96519b1604ddc56f39dfdaf1b7b0d439@z3ntu.xyz"},"message":"Kernel updates (#1312)\n\n* linux-postmarketos-stable 4.15.8 [skip ci]\r\n* linux-postmarketos-lts 4.14.25 [skip ci]","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/5f27aa73ccd58ef02902f8989333ae92e8058eba"},{"sha":"4b4f9b0e6cebe993b3a9377e704e5dfe11ddc0ff","author":{"name":"Bart Ribbers","email":"4d470a64baac5eb6926fbf6858182787b7fb65a2@users.noreply.github.com"},"message":"Update KDE Frameworks to 5.44.0 (#1315) [skip ci]","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/4b4f9b0e6cebe993b3a9377e704e5dfe11ddc0ff"},{"sha":"571ddf741a1fbac0f7bc6af283c8465da853a0aa","author":{"name":"pikpok","email":"ae6244bf98309a6360520aac230ad8c178e0e53e@riseup.net"},"message":"peregrine: framebuffer patch and xorg config (#1318)","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/571ddf741a1fbac0f7bc6af283c8465da853a0aa"},{"sha":"3666388619b9f625be56ef8af8d7fd216111a69a","author":{"name":"Oliver Smith","email":"04aa07bc26d4a3b1f5f2f1214958efc6f904b738@bitmessage.ch"},"message":"Properly escape commands in pmb.chroot.user() (#1316)\n\n## Introduction\r\nIn #1302 we noticed that `pmb.chroot.user()` does not escape commands\r\nproperly: When passing one string with spaces, it would pass them as\r\ntwo strings to the chroot. The use case is passing a description with\r\na space inside to `newapkbuild` with `pmboostrap newapkbuild`.\r\n\r\nThis is not a security issue, as we don't pass strings from untrusted\r\ninput to this function.\r\n\r\n## Functions for running commands in pmbootstrap\r\nTo put the rest of the description in context: We have four high level\r\nfunctions that run commands:\r\n* `pmb.helpers.run.user()`\r\n* `pmb.helpers.run.root()`\r\n* `pmb.chroot.root()`\r\n* `pmb.chroot.user()`\r\n\r\nIn addition, one low level function that the others invoke:\r\n* `pmb.helpers.run.core()`\r\n\r\n## Flawed test case\r\nThe issue described above did not get detected for so long, because we\r\nhave a test case in place since day one, which verifies that all of the\r\nfunctions above escape everything properly:\r\n* `test/test_shell_escape.py`\r\n\r\nSo the test case ran a given command through all these functions, and\r\ncompared the result each time. However, `pmb.chroot.root()`\r\nmodified the command variable (passed by reference) and did the\r\nescaping already, which means `pmb.chroot.user()` running directly\r\nafterwards only returns the right output when *not* doing any escaping.\r\n\r\nWithout questioning the accuracy of the test case, I've escaped\r\ncommands and environment variables with `shlex.quote()` *before*\r\npassing them to `pmb.chroot.user()`. In retrospective this does not\r\nmake sense at all and is reverted with this commit.\r\n\r\n## Environment variables\r\nBy coincidence, we have only passed custom environment variables to\r\n`pmb.chroot.user()`, never to the other high level functions. This only\r\nworked, because we did not do any escaping and the passed line gets\r\nexecuted as shell command:\r\n```\r\n$ MYENV=test echo test2\r\ntest 2\r\n```\r\nIf it was properly escaped as one shell command:\r\n```\r\n$ 'MYENV=test echo test2'\r\nsh: MYENV=test echo test2: not found\r\n```\r\nSo doing that clearly doesn't work anymore. I have added a new `env`\r\nparameter to `pmb.chroot.user()` (and to all other high level functions\r\nfor consistency), where environment variables can be passed as a\r\ndictionary. Then the function knows what to do and we end up with\r\nproperly escaped commands and environment variables.\r\n\r\n## Details\r\n* Add new `env` parameter to all high level command execution functions\r\n* New `pmb.helpers.run.flat_cmd()` function, that takes a command as\r\n  list and environment variables as dict, and creates a properly escaped\r\n  flat string from the input.\r\n* Use that function for proper escaping in all high level exec funcs\r\n* Don't escape commands *before* passing them to `pmb.chroot.user()`\r\n* Describe parameters of the command execution functions\r\n* `pmbootstrap -v` writes the exact command to the log that was\r\n  executed (in addition to the simplified form we always write down for\r\n  readability)\r\n* `test_shell_escape.py`: verify that the command passed by reference\r\n  has not been modified, add a new test for strings with spaces, add\r\n  tests for new function `pmb.helpers.run.flat_cmd()`\r\n* Remove obsolete commend in `pmb.chroot.distccd` about environment\r\n  variables, because we don't use any there anymore\r\n* Add `TERM=xterm` to default environment variables in the chroot,\r\n  so running ncurses applications like `menuconfig` and `nano` works out of\r\n  the box","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/3666388619b9f625be56ef8af8d7fd216111a69a"},{"sha":"b1782aa84302ddaf049ba3f40cb58c18c890105f","author":{"name":"Joey Hewitt","email":"33e20f6e1a7e8c56f1e30efa4711aa0be60ef6c1@joeyhewitt.com"},"message":"Merge remote-tracking branch 'origin/master' into qmimodem","distinct":true,"url":"https://api.github.com/repos/scintill/pmbootstrap/commits/b1782aa84302ddaf049ba3f40cb58c18c890105f"}]}
{"actor":{"display_login":"scintill"}}