summaryrefslogtreecommitdiff
path: root/cmdline/apt-dump-solver.cc
Commit message (Collapse)AuthorAgeFilesLines
* edsp: drop privileges before executing solversDavid Kalnischkies2016-06-081-0/+2
| | | | | | | | | | | | | | | Most (if not all) solvers should be able to run perfectly fine without root privileges as they get the entire state they are supposed to work on via stdin and do not perform any action directly, but just pass suggestions on via stdout. The new default is to run them all as _apt hence, but each solver can configure another user if it chooses/must. The security benefits are minimal at best, but it helps preventing silly mistakes (see 35f3ed061f10a25a3fb28bc988fddbb976344c4d) and that is always good. Note that our 'apt' and 'dump' solver already dropped privileges if they had them.
* edsp: optionally store a compressed copy of the last scenarioDavid Kalnischkies2016-06-081-54/+161
| | | | | | | | For bugreports and co it could be handy to have the scenario and all the settings used in it around later for inspection for EDSP like protocols. EDSP might not be the most interesting as the user can still interrupt the process before the solution is applied and users tend to have an opinion on the "rightness" of a solution, so it is disabled by default.
* edsp: dump: support dumping into compressed fileDavid Kalnischkies2016-05-201-1/+1
|
* convert EDSP to be based on FileFd instead of FILE*David Kalnischkies2016-05-201-5/+10
| | | | I doubt there is any non-src:apt usage of these interfaces.
* wrap every unlink call to check for != /dev/nullDavid Kalnischkies2015-11-041-2/+1
| | | | | | | | | | | | | | | | Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
* various changes to increase test-coverageDavid Kalnischkies2015-09-141-1/+2
| | | | | | | And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore
* fix insecure use of /tmp in EDSP solver 'dump'David Kalnischkies2015-09-141-12/+29
| | | | | | | | | | | | As said in the bugreport, this is hardly a serious problem on a security front, but it was always on the list to have the filename configurable somehow and the stable filename is a problem for parallel executions. Using an environment variable (APT_EDSP_DUMP_FILENAME) for this is more or less the best we can do here as solvers do not get told about our configuration and such. Closes: 795600
* stop displaying time of build in online helpJérémy Bobbio2015-03-161-2/+1
| | | | | | | | | | | | | | | | | | As part of the “reproducible builds” effort [1], we have noticed that apt could not be built reproducibly. One issue is that it uses the __DATE__ and __TIME__ macros of the C preprocessor to display the time of build in the online help. We believe this information not to be really useful to users as they can always look at the package data and metadata to figure it out. The attached patch simply removes this information. All non-documentation packages can then be built reproducibly with our current experimental framework. [David: changed the string slightly to be untranslateable as well] Closes: 774342
* Rename DropPrivs() to DropPrivileges()Michael Vogt2014-10-071-1/+1
| | | | Git-Dch: ignore
* DropPrivs in the solvers (just to be on the safe side)Michael Vogt2014-06-111-0/+2
|
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+4
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* the previously used VERSION didn't work everywhere so we are switchingDavid Kalnischkies2012-03-221-1/+1
| | | | to the more standard PACKAGE_VERSION and make it work in every file
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
|
* implement correct error reportingDavid Kalnischkies2011-05-071-1/+1
|
* add a tiny dump solver to quickly output a scenarioDavid Kalnischkies2011-05-031-0/+50