https://wiki.archlinux.org/api.php?action=feedcontributions&user=Apg&feedformat=atomArchWiki - User contributions [en]2024-03-29T08:03:45ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Apg&diff=758810User:Apg2022-12-04T04:24:14Z<p>Apg: /* hooks/scripts */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/WJSMASZG3QZ5VC37GEROLYMEPFVB6W6K/)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YQMBVSXZWBN4VAKIKLPN7CRKIRIPMF3E/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/3RUSCPHQRL2XE3V4GDPANESNXJVL7H2U/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EBZ6IYCPF33DLMU4J47INQYIPOJVU5OI/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/PGTYF56MG5GA5AC7HNPLAXCWUPKHLHQJ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/XXNXBGRWUYL3CWKOQZSE3DUU4UZ743OU/<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EVWKSWFRJICEQITSLANRKXKVWFB6IUDQ/<br />
* https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/LE3YBUSAPKTLJKXLAIXYQAJV5MQH5GXZ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YE4CJ5PCPSSPO4TBIBHBGWIKJ2TXITRM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/4A2IHVQDC4HOKYJLLOIYKPP23WJBX6IM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/7JS74J5DQBK3RLHM6OZOISGECQS5AZPE/<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872<br />
<br />
= Notes =<br />
* replace manual signal restoration for hooks/scripts? posix_spawn has POSIX_SPAWN_SETSIGDEF but is an optional part of the spec<br />
* switch to dpkg-style packages? uncompressed outer archive with package info, compressed archive with package files. could massively speed up reading package meta info<br />
<br />
== hooks/scripts ==<br />
* specify reliable way to get alpm pid (get_ppid(), $ALPM_PID?)<br />
* provide way to get detailed package information<br />
** read from db? db may not be inside root; pass db file descriptor?<br />
** chroot into sysroot instead of rootdir?<br />
** need a way to get info for files provided directly to -U<br />
** request info from alpm process via api socket?<br />
* ipc for persistent hooks<br />
* track alpm proc lifetime for persistent hooks; pidfd_open/procfs/poll can be used but are not portable<br />
* prompt for user interaction; ipc being built for unprivileged downloads could be used for this<br />
* trigger PostTransaction hooks even when transaction doesn't complete<br />
* PostAction hooks? requires scanning hooks before/after every single action; fs caching may make this irrelevant<br />
* allow specifying scripts as executable files to run directly instead of through bash<br />
** how to determine if a script needs to run?<br />
*** action-specific scripts? e.g. post-install.py, pre-install.py<br />
*** always run script if present?</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=758809User:Apg2022-12-04T04:20:19Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/WJSMASZG3QZ5VC37GEROLYMEPFVB6W6K/)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YQMBVSXZWBN4VAKIKLPN7CRKIRIPMF3E/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/3RUSCPHQRL2XE3V4GDPANESNXJVL7H2U/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EBZ6IYCPF33DLMU4J47INQYIPOJVU5OI/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/PGTYF56MG5GA5AC7HNPLAXCWUPKHLHQJ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/XXNXBGRWUYL3CWKOQZSE3DUU4UZ743OU/<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EVWKSWFRJICEQITSLANRKXKVWFB6IUDQ/<br />
* https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/LE3YBUSAPKTLJKXLAIXYQAJV5MQH5GXZ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YE4CJ5PCPSSPO4TBIBHBGWIKJ2TXITRM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/4A2IHVQDC4HOKYJLLOIYKPP23WJBX6IM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/7JS74J5DQBK3RLHM6OZOISGECQS5AZPE/<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872<br />
<br />
= Notes =<br />
* replace manual signal restoration for hooks/scripts? posix_spawn has POSIX_SPAWN_SETSIGDEF but is an optional part of the spec<br />
* switch to dpkg-style packages? uncompressed outer archive with package info, compressed archive with package files. could massively speed up reading package meta info<br />
<br />
== hooks/scripts ==<br />
* specify reliable way to get alpm pid (get_pid(), $ALPM_PID?)<br />
* provide way to get detailed package information<br />
** read from db? db may not be inside root; pass db file descriptor?<br />
** chroot into sysroot instead of rootdir?<br />
** need a way to get info for files provided directly to -U<br />
** request info from alpm process via api socket?<br />
* ipc for persistent hooks<br />
* track alpm proc lifetime for persistent hooks; pidfd_open/procfs/poll can be used but are not portable<br />
* prompt for user interaction; ipc being built for unprivileged downloads could be used for this<br />
* trigger PostTransaction hooks even when transaction doesn't complete<br />
* PostAction hooks? requires scanning hooks before/after every single action; fs caching may make this irrelevant</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=758808User:Apg2022-12-04T03:37:33Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/WJSMASZG3QZ5VC37GEROLYMEPFVB6W6K/)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YQMBVSXZWBN4VAKIKLPN7CRKIRIPMF3E/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/3RUSCPHQRL2XE3V4GDPANESNXJVL7H2U/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EBZ6IYCPF33DLMU4J47INQYIPOJVU5OI/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/PGTYF56MG5GA5AC7HNPLAXCWUPKHLHQJ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/XXNXBGRWUYL3CWKOQZSE3DUU4UZ743OU/<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EVWKSWFRJICEQITSLANRKXKVWFB6IUDQ/<br />
* https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/LE3YBUSAPKTLJKXLAIXYQAJV5MQH5GXZ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YE4CJ5PCPSSPO4TBIBHBGWIKJ2TXITRM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/4A2IHVQDC4HOKYJLLOIYKPP23WJBX6IM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/7JS74J5DQBK3RLHM6OZOISGECQS5AZPE/<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872<br />
<br />
= Notes =<br />
* replace manual signal restoration for hooks/scripts? posix_spawn has POSIX_SPAWN_SETSIGDEF but is an optional part of the spec<br />
* switch to dpkg-style packages? uncompressed outer archive with package info, compressed archive with package files. could massively speed up reading package meta info</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=758807User:Apg2022-12-04T03:35:35Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/WJSMASZG3QZ5VC37GEROLYMEPFVB6W6K/)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YQMBVSXZWBN4VAKIKLPN7CRKIRIPMF3E/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/3RUSCPHQRL2XE3V4GDPANESNXJVL7H2U/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EBZ6IYCPF33DLMU4J47INQYIPOJVU5OI/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/PGTYF56MG5GA5AC7HNPLAXCWUPKHLHQJ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/XXNXBGRWUYL3CWKOQZSE3DUU4UZ743OU/<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EVWKSWFRJICEQITSLANRKXKVWFB6IUDQ/<br />
* https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/LE3YBUSAPKTLJKXLAIXYQAJV5MQH5GXZ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YE4CJ5PCPSSPO4TBIBHBGWIKJ2TXITRM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/4A2IHVQDC4HOKYJLLOIYKPP23WJBX6IM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/7JS74J5DQBK3RLHM6OZOISGECQS5AZPE/<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872<br />
<br />
= Notes =<br />
* replace manual signal restoration for hooks/scripts? posix_spawn has POSIX_SPAWN_SETSIGDEF but is an optional part of the spec</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=758806User:Apg2022-12-04T03:35:08Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/WJSMASZG3QZ5VC37GEROLYMEPFVB6W6K/)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YQMBVSXZWBN4VAKIKLPN7CRKIRIPMF3E/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/3RUSCPHQRL2XE3V4GDPANESNXJVL7H2U/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EBZ6IYCPF33DLMU4J47INQYIPOJVU5OI/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/PGTYF56MG5GA5AC7HNPLAXCWUPKHLHQJ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/XXNXBGRWUYL3CWKOQZSE3DUU4UZ743OU/<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/EVWKSWFRJICEQITSLANRKXKVWFB6IUDQ/<br />
* https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/LE3YBUSAPKTLJKXLAIXYQAJV5MQH5GXZ/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/YE4CJ5PCPSSPO4TBIBHBGWIKJ2TXITRM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/4A2IHVQDC4HOKYJLLOIYKPP23WJBX6IM/<br />
* https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/7JS74J5DQBK3RLHM6OZOISGECQS5AZPE/<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872<br />
<br />
= Notes<br />
* replace manual signal restoration for hooks/scripts? posix_spawn has POSIX_SPAWN_SETSIGDEF but is an optional part of the spec</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=726801User:Apg2022-04-17T17:06:24Z<p>Apg: /* miscellaneous */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
* SyncGroup<br />
* RefreshOnSync<br />
* UpgradeOnSync<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=614289User:Apg2020-05-18T17:13:26Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== v6.0.0 ==<br />
<br />
* fix --sysroot<br />
* limit package name/version (db name?)<br />
* fix callback api's<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=565668User:Apg2019-02-02T23:31:48Z<p>Apg: remove completed TODOs</p>
<hr />
<div>= pacman TODO =<br />
<br />
== config/option parsing ==<br />
<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=481525User:Apg2017-07-08T20:40:34Z<p>Apg: /* miscellaneous */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* restrict package name characters<br />
* provide syntax to skip targets <code>base ^nano</code><br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=468974User:Apg2017-02-24T17:00:30Z<p>Apg: /* makepkg: replace default checksums */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=160872</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=468960User:Apg2017-02-24T13:07:36Z<p>Apg: add 'makepkg: replace default checksums' to rejected features</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.<br />
<br />
== makepkg: replace default checksums ==<br />
* https://bugs.archlinux.org/task/12772<br />
* https://bugs.archlinux.org/task/37215<br />
* https://bugs.archlinux.org/task/38543<br />
* https://bugs.archlinux.org/task/39210<br />
* https://bugs.archlinux.org/task/47141<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2006-October/000556.html<br />
* https://lists.archlinux.org/pipermail/arch-general/2009-January/003222.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-January/018546.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-June/019081.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2017-February/021880.html</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=468299User:Apg2017-02-14T04:05:57Z<p>Apg: /* makepkg: shallow git clones */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://bugs.archlinux.org/task/52957<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=466940User:Apg2017-01-27T16:54:32Z<p>Apg: begin documentation of file formats</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= Format Specifications =<br />
<br />
== package ==<br />
<br />
A package is an archive file readable by libarchive that contains metadata files and the actual package contents. All metadata files begin with a period (dot) and are located in the archive root:<br />
<br />
* .PKGINFO<br />
* .BUILDINFO (optional)<br />
* .MTREE (optional)<br />
* .INSTALL (optional)<br />
* .CHANGELOG (optional)<br />
<br />
All other root dotfiles are reserved for use by libalpm. The package contents are similarly located directly in the package root. All file paths should be relative and not contain '.' or '..' anywhere. All intermediate directories must exist in the archive. Metadata files must come before package files. Package contents must be sorted according to the C locale. For example, a package file structure might look like:<br />
<br />
.PKGINFO<br />
.MTREE<br />
bin/<br />
bin/pacman<br />
<br />
=== .PKGINFO ===<br />
<br />
The .PKGINFO file contains metadata about the package itself. It must be a plain INI-style text file. Lines must not contain any leading whitespace. Empty lines and lines beginning with '#' will be skipped. Key-value pairs must be separated by " = ".<br />
<br />
==== String Fields ====<br />
<br />
* pkgname<br />
* pkgbase<br />
* pkgver<br />
* pkgdesc<br />
* url<br />
* packager<br />
* arch<br />
<br />
==== String List Fields ====<br />
<br />
* group<br />
* license<br />
* depend<br />
* optdepend<br />
* makedepend<br />
* checkdepend<br />
* conflict<br />
* replaces<br />
* provides<br />
* backup<br />
<br />
==== Numeric Fields ====<br />
<br />
* builddate<br />
* size<br />
<br />
=== .BUILDINFO ===<br />
<br />
=== .MTREE ===<br />
<br />
The .MTREE file is an optional file that describes file properties such as size, owner, group, etc. It allows pacman to check if files on a system have been modified after installation. It can be in any format readable by libarchive. Note: third-party tools may expect this to be in the same format generated by makepkg, which uses the following:<br />
<br />
LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link'<br />
<br />
=== .INSTALL ===<br />
<br />
The .INSTALL file defines functions to run before and/or after a package operation is performed. See PKGBUILD(5) for more information.<br />
<br />
=== .CHANGELOG ===<br />
<br />
An optional file describing the changes between package versions. .CHANGELOG is intended solely for display directly to the user without any parsing or processing. It should be plain text, but the contents may be formatted in any way suitable for presentation to the user. See PKGBUILD(5) for more information.<br />
<br />
== database ==<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=456697User:Apg2016-11-13T17:35:08Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== remove/rename --force ==<br />
<br />
<code>--force</code> is a very generic name for what it actually does and is often misunderstood. It's also an all-or-nothing option. Replace it with a more specific <code>--overwrite-files</code> option that allows specifying the exact files to be overwritten.<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=455304User:Apg2016-10-27T17:07:48Z<p>Apg: /* config/option parsing */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all single-value options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=455236User:Apg2016-10-26T13:08:20Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== config/option parsing ==<br />
<br />
* only interpret '#' as starting a comment at the beginning of a line (https://bugs.archlinux.org/task/48702)<br />
* error on unknown options<br />
* multi-value options provided on the command-line override rather than append to configuration values<br />
* use wordsplit to split multi-value configuration options that can contain spaces<br />
* use the last configured value for all options (dbpath, root, logfile, etc)<br />
* do not split --ignore/--ignoregroup on ',' (commas are valid characters in package names and groups)<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=454247User:Apg2016-10-17T21:35:22Z<p>Apg: /* pacman: save warning messages until the end */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400<br />
* See https://gist.github.com/andrewgregory/a06247986552c3216b5b3d05ae071b2e for one way to accomplish this.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=454181User:Apg2016-10-17T04:11:13Z<p>Apg: /* makepkg: shallow git clones */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=197459<br />
* https://bbs.archlinux.org/viewtopic.php?id=216583<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=454180User:Apg2016-10-17T03:53:59Z<p>Apg: fix headers</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones ==<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end ==<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=454179User:Apg2016-10-17T03:53:29Z<p>Apg: update shallow clone references</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
== makepkg: shallow git clones<br />
* https://bugs.archlinux.org/task/34677<br />
* https://bugs.archlinux.org/task/36631<br />
* https://bugs.archlinux.org/task/37747<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2013-February/016468.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019417.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2014-October/019502.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2015-October/020362.html<br />
* https://lists.archlinux.org/pipermail/pacman-dev/2016-April/021092.html<br />
* See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
<br />
== pacman: save warning messages until the end<br />
* https://bugs.archlinux.org/task/5899<br />
* https://bugs.archlinux.org/task/12419<br />
* https://bugs.archlinux.org/task/12861<br />
* https://bugs.archlinux.org/task/28794<br />
* https://bugs.archlinux.org/task/51400</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=454018User:Apg2016-10-15T17:53:58Z<p>Apg: add summary of common rejected feature requests</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)<br />
<br />
= Rejected Features =<br />
<br />
* makepkg: shallow git clones<br />
** https://bugs.archlinux.org/task/34677<br />
** https://bugs.archlinux.org/task/36631<br />
** https://bugs.archlinux.org/task/37747<br />
** See https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8 for a way to force shallow clones. WARNING: breaks PKGBUILDs that expect a full clone.<br />
* pacman: save warning messages until the end<br />
** https://bugs.archlinux.org/task/5899<br />
** https://bugs.archlinux.org/task/12419<br />
** https://bugs.archlinux.org/task/12861<br />
** https://bugs.archlinux.org/task/28794<br />
** https://bugs.archlinux.org/task/51400</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=450964User:Apg2016-09-17T04:51:05Z<p>Apg: external downloader todo</p>
<hr />
<div>= pacman TODO =<br />
<br />
== external downloader ==<br />
<br />
The external callback-based downloader has several deficiencies compared to the internal downloader:<br />
<br />
* download to a file other than the remote file name (https://lists.archlinux.org/pipermail/pacman-dev/2016-September/021410.html)<br />
* report final url in case of redirects (for downloading signatures)<br />
* report final file name/path for downloads with a file name (https://bugs.archlinux.org/task/50616)<br />
* optional downloads (optional signatures)<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=441560User:Apg2016-07-15T17:55:09Z<p>Apg: /* alpm */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
* front-ends may not set a global SIGPIPE - if a SIGPIPE handler is active when gpgme is initialized it will not ignore SIGPIPE<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=441559User:Apg2016-07-15T17:52:02Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
* reset ignored signals prior to running scripts/hooks - child processes inherit any ignored signals from their parent. GPGME sets SIGPIPE to SIG_IGN and front-ends may ignore additional signals.<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=439884User:Apg2016-07-05T00:21:07Z<p>Apg: /* libalpm */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
* need to use the user info from inside the root (chroot for file extraction?)<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=436573User:Apg2016-05-28T13:47:49Z<p>Apg: /* pacman */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
* no # in option values<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=436572User:Apg2016-05-28T13:39:51Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== download callback ==<br />
<br />
The download callback is ill-equipped to deal with slow or poorly configured servers. libalpm should normalize arguments to the front-end callback (xfered, total) to indicate the following conditions:<br />
<br />
* download initialized (0, -1)<br />
* non-xfer event (0, 0)<br />
* download progress, unknown size (X {X>0}, 0)<br />
* download progress, known size (X {X>0,X<Y}, Y {Y>0})<br />
* download completed (X {X>0}, X)<br />
* download error (-1, HTTP_ERR)<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Pacman_Hooks&diff=432339DeveloperWiki:Pacman Hooks2016-04-23T12:12:41Z<p>Apg: gtk-update-icon-cache: move filter into hook</p>
<hr />
<div>=Hooks!=<br />
<br />
==update-desktop-database==<br />
Used by 490 packages<br />
<br />
Proposed Hook (desktop-file-utils)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/share/applications/*.desktop<br />
<br />
[Action]<br />
Description = Updating the desktop file MIME type cache...<br />
When = PostTransaction<br />
Exec = /usr/bin/update-desktop-database --quiet<br />
<br />
==update-mime-database==<br />
Used by 142 packages<br />
<br />
Proposed Hook (shared-mime-info)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/share/mime/packages/*.xml<br />
<br />
[Action]<br />
Description = Updating the MIME type database...<br />
When = PostTransaction<br />
Exec = /usr/bin/update-mime-database /usr/share/mime<br />
<br />
==install-info==<br />
Used by 170 packages<br />
<br />
Proposed Hook (install/upgrade)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Target = usr/share/info/*<br />
<br />
[Action]<br />
Description = Updating the info directory file...<br />
When = PostTransaction<br />
Exec = /bin/sh -c 'while read -r f; do install-info "$f" /usr/share/info/dir 2> /dev/null; done'<br />
NeedsTargets<br />
<br />
Proposed Hook (remove)<br />
[Trigger]<br />
Type = File<br />
Operation = Remove<br />
Target = usr/share/info/*<br />
<br />
[Action]<br />
Description = Removing old entries from the info directory file...<br />
When = PostTransaction<br />
Exec = /bin/sh -c 'while read -r f; do install-info --delete "$f" /usr/share/info/dir 2> /dev/null; done'<br />
NeedsTargets<br />
<br />
==glib-compile-schemas==<br />
Used by 222 packages<br />
<br />
Proposed Hook (glib2)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/share/glib-2.0/schemas/*.gschema.xml<br />
Target = usr/share/glib-2.0/schemas/*.gschema.override<br />
<br />
[Action]<br />
Description = Compiling GSettings XML schema files...<br />
When = PostTransaction<br />
Exec = /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas<br />
<br />
==gtk-update-icon-cache, xdg-icon-resource==<br />
Used by 754 packages<br />
<br />
Note that `xdg-icon-resource forceupdate` has no effect without gtk-update-icon-cache installed, so removing it doesn't hurt.<br />
<br />
Proposed Hook (gtk-update-icon-cache)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/share/icons/*/<br />
Target = !usr/share/icons/*/?*<br />
<br />
[Action]<br />
Description = Updating icon cache...<br />
When = PostTransaction<br />
Exec = /usr/lib/pacman-hooks/gtk-update-icon-cache<br />
NeedsTargets<br />
<br />
#!/bin/bash<br />
<br />
while read -r f; do<br />
if [[ -e ${f}index.theme ]]; then<br />
gtk-update-icon-cache -q "$f"<br />
else<br />
rm -f "${f}icon-theme.cache"<br />
rmdir --ignore-fail-on-non-empty "$f"<br />
fi<br />
done<br />
<br />
==OTHER==<br />
* mkfontdir<br />
* mkfontscale<br />
* fc-cache<br />
* gio-querymodules<br />
* gdk-pixbuf-query-loaders<br />
* gtk-query-immodules-2.0<br />
* gtk-query-immodules-3.0</div>Apghttps://wiki.archlinux.org/index.php?title=DeveloperWiki_talk:Pacman_Hooks&diff=432333DeveloperWiki talk:Pacman Hooks2016-04-23T11:48:20Z<p>Apg: hook script location</p>
<hr />
<div>==glib-compile-schemas==<br />
Used by 222 packages<br />
<br />
Proposed Hook (glib-compile-schemas)<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/share/glib-2.0/schemas/*.gschema.xml<br />
Target = usr/share/glib-2.0/schemas/*.gschema.override<br />
<br />
[Action]<br />
Description = Compile GSettings XML schema files...<br />
When = PostTransaction<br />
Exec = /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas<br />
<br />
--[[User:City-busz|City-busz]] ([[User talk:City-busz|talk]]) 08:06, 23 April 2016 (UTC)<br />
<br />
:Thanks, I think that will work. --[[User:Heftig|Heftig]] ([[User talk:Heftig|talk]]) 08:22, 23 April 2016 (UTC)<br />
<br />
==hook script location==<br />
libalpm doesn't place any restrictions on where we store custom scripts for hooks, but I think we should store them all in the same place for the sake of consistency. I suggest '/usr/share/libalpm/hooks.bin/' in order to keep them near the hooks themselves. [[User:Apg|Apg]] ([[User talk:Apg|talk]]) 11:47, 23 April 2016 (UTC)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=429079User:Apg2016-04-01T13:56:59Z<p>Apg: /* pacman TODO */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
* stop resetting pm_errno everywhere<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=415428User:Apg2016-01-15T05:28:46Z<p>Apg: add dynamic user todo</p>
<hr />
<div>= pacman TODO =<br />
<br />
== dynamic users ==<br />
<br />
=== makepkg ===<br />
<br />
* add package user information to PKGBUILD (/etc/passwd format?)<br />
* add users to .PKGINFO<br />
* create dynamic users with fakeuser during package()<br />
<br />
=== libalpm ===<br />
<br />
* if user exists on system, use system uid<br />
* if user does not exist and uid is unassigned, use package uid<br />
** attempt to add user to /etc/passwd<br />
* if user does not exist and uid is assigned, fallback to uid 0<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=415080User:Apg2016-01-13T02:25:27Z<p>Apg: /* signal handling */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* <strike>separate different signal handlers</strike><br />
* <strike>restrict to safe functions (see signal(7))</strike><br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=411269User:Apg2015-12-08T15:48:56Z<p>Apg: /* alpm */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* separate different signal handlers<br />
* restrict to safe functions (see signal(7))<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
* pkgver cannot contain '-', can lead to overlap in database entry names causing aborted transactions<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=411008DeveloperWiki:Roll Call2015-12-06T02:45:25Z<p>Apg: /* Developers */</p>
<hr />
<div>[[Category:DeveloperWiki]]<br />
<br />
==Developers==<br />
* Aaron Griffin<br />
<br />
* Allan McRae<br />
** Packaging (toolchain)<br />
** Pacman development<br />
<br />
* Anatol Pomozov<br />
* Andreas Radke<br />
* Andrew Gregory<br />
** Pacman development<br />
* Ángel Velásquez<br />
* Antonio Rojas<br />
* Bartłomiej Piotrowski<br />
* Dan McGee<br />
* Daniel Isenmann<br />
* Dave Reisner<br />
* Eric Bélanger<br />
* Evangelos Foutras<br />
** Packaging (Xfce)<br />
** Might be inactive for some period in 2016 and/or 2017<br />
* Felix Yan<br />
* Florian Pritz<br />
** Packaging<br />
** Serveradmin<br />
** Mirrors<br />
** Mailinglists<br />
* Gaetan Bisson<br />
** Packaging<br />
<br />
* Gerardo Pozzi<br />
* Giovanni Scafora<br />
* Guillaume Alaux<br />
* Ionuț Mircea Bîru<br />
* Jan de Groot<br />
* Jan Steffens<br />
* Jürgen Hötzel<br />
* Laurent Carlier<br />
* Lukas Fleischer<br />
* Maxime Gauduin<br />
* Pierre Schmitz<br />
* Ray Rashif<br />
* Rémy Oudompheng<br />
* Ronald van Haren<br />
* Sébastien Luttringer<br />
* Sven-Hendrik Haase<br />
** Packaging (NVIDIA stuff, multimedia stuff)<br />
<br />
* Thomas Bächler<br />
* Thomas Dziedzic<br />
* Tobias Powalowski<br />
* Tom Gundersen<br />
<br />
==Trusted Users==<br />
* Alexander Rødseth<br />
* Alexandre Filgueira<br />
* Anatol Pomozov<br />
* Andrzej Giniewicz<br />
* Antonio Rojas<br />
* Balló György<br />
* Bartłomiej Piotrowski<br />
* Christian Hesse<br />
* Connor Behan<br />
* Daniel Micay<br />
* Daniel Wallace<br />
* Evgeniy Alekseev<br />
* Fabio Castelli<br />
** Packaging<br />
* Felix Yan<br />
* Ike Devolder<br />
* Jakob Gruber<br />
* Jan Steffens<br />
* Jaroslav Lichtblau<br />
* Jelle van der Waa<br />
* Jerome Leclanche<br />
* Jiachen Yang<br />
* Johannes Löthberg<br />
* Jonathan Steel<br />
* Kyle Keen<br />
* Laurent Carlier<br />
* Levente Polyak<br />
** Packaging<br />
** Security team<br />
** Reproducible builds<br />
* Lukas Fleischer<br />
* Lukas Jirkovsky<br />
* Martin Wimpress<br />
* Massimiliano Torromeo<br />
* Maxime Gauduin<br />
* Pierre Neidhardt<br />
* Ray Rashif<br />
* Sébastien Luttringer<br />
* Sergej Pupykin<br />
* speps<br />
* Thomas Dziedzic<br />
* Thorsten Töpper<br />
* Timothy Redaelli<br />
* Xyne<br />
* Михаил Страшун<br />
<br />
==Support Staff==<br />
* Christian Rebischke<br />
* Doug Newgard<br />
* Eric Waller<br />
* Jakob Wadsager<br />
* Jason Ryan<br />
** Forum Administration and Moderation<br />
** Wiki Administration<br />
* Johannes Löthberg<br />
* Levente Polyak<br />
** See above (TU)<br />
* Remi Gacogne<br />
* tigrmesh<br />
* WorMzy Tykashi<br />
** Forum moderation<br />
* Xyne</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=410949User:Apg2015-12-05T10:47:15Z<p>Apg: new scriptlet reader automatically adds missing '\n'</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* separate different signal handlers<br />
* restrict to safe functions (see signal(7))<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408966User:Apg2015-11-12T01:04:06Z<p>Apg: /* alpm */</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* separate different signal handlers<br />
* restrict to safe functions (see signal(7))<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
* db extension should not be .part<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408848User:Apg2015-11-11T00:46:39Z<p>Apg: update TODO</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* separate different signal handlers<br />
* restrict to safe functions (see signal(7))<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* move max filename tests to alpm unit tests<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408807User:Apg2015-11-10T16:27:40Z<p>Apg: update TODO</p>
<hr />
<div>= pacman TODO =<br />
<br />
== signal handling ==<br />
<br />
* separate different signal handlers<br />
* restrict to safe functions (see signal(7))<br />
* restrict scope to trans_commit<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* sync db files immediately after extraction<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408007User:Apg2015-11-03T01:06:01Z<p>Apg: remove hook section</p>
<hr />
<div>= pacman TODO =<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408005User:Apg2015-11-02T22:41:16Z<p>Apg: fix nested lists</p>
<hr />
<div>= pacman TODO =<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
NeedsFileList*<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
* should PostTransaction hooks run if the transaction fails?<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
** sync_db_read handles 512 * 1024<br />
** parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
** limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=408004User:Apg2015-11-02T22:39:23Z<p>Apg: add pacman limits</p>
<hr />
<div>= pacman TODO =<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
NeedsFileList*<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
* should PostTransaction hooks run if the transaction fails?<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success<br />
<br />
= pacman LIMITS =<br />
<br />
== alpm ==<br />
* all pkginfo fields limited to 1024 (local_db_read)<br />
* sync_db_read handles 512 * 1024<br />
* parse_descfile limits to 512 * 1024 - length of field name<br />
* path length: 1024 (local_db_read)<br />
* limited to PATH_MAX - strlen(rootdir) elsewhere<br />
* no newlines in any package data<br />
* no dotfiles in base directory<br />
* no '/' in db names, package name, or package version<br />
* syncdb cannot be named 'local'<br />
* package name + package version limited to NAME_MAX<br />
* script output cannot contain NUL bytes<br />
* script output must end with '\n'<br />
* package name should not contain '=<>' (can't be used as a dependency)<br />
* package name should not contain ": " (can't be used as a dependency)<br />
* backup file paths limited to PATH_MAX - (len(hash) + 2)<br />
<br />
== pacman ==<br />
* maximum file length: PATH_MAX<br />
* no whitespace in multivalue options<br />
<br />
== makepkg ==<br />
* pkgname may not start with '-'<br />
* pkgname may not start with '.'<br />
* pkgname may only contain [:alnum:]+_.@-]<br />
* epoch must be a positive integer<br />
* pkgrel must be a positive decimal<br />
* arch may only contain [:alnum:]_<br />
* provides cannot contain '<>'<br />
* pkgver cannot contain ':-' (confuses epoch/pkgrel parsing)</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=401405User:Apg2015-09-23T02:19:52Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
NeedsFileList*<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
* should PostTransaction hooks run if the transaction fails?<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success</div>Apghttps://wiki.archlinux.org/index.php?title=Talk:OpenRC&diff=389997Talk:OpenRC2015-08-04T18:40:03Z<p>Apg: </p>
<hr />
<div>== <s>Why two methods</s> ==<br />
<br />
Very tiny number of Arch users use OpenRC and they have to choose from two methods. Why? Could they be unified into just one?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 13:26, 8 April 2015 (UTC)<br />
<br />
:{{AUR|openrc}} keeps compability to other Arch packages, but has fewer service files than {{AUR|openrc-core}} and doesn't build [https://wiki.gentoo.org/wiki/Netifrc netifrc]. If you made a netifrc package and merged the services, I don't see the need for two methods either. This should probably be discussed on [https://lists.archlinux.org//listinfo/aur-general/ aur-general]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 16:41, 8 April 2015 (UTC)<br />
<br />
::It seems {{AUR|openrc-core}} now ignores compability to Arch [https://aur4.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=openrc-core#n72], maybe the maintainer will solve this but if not the "artoo way" can be safely removed from this page. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:52, 16 June 2015 (UTC)<br />
<br />
:::According to the maintainer it's a cosmetic change. Either way, considering how often the "artoo way" breaks [https://bbs.archlinux.org/viewtopic.php?id=152606&p=26] and other incompabilities, I still argue for its removal.<br />
:::If there are any compelling arguments to keep documenting the "artoo way" please mention them in time. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:04, 16 June 2015 (UTC)<br />
<br />
::::Implemented, closing. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:58, 2 August 2015 (UTC)<br />
::::I think the "artoo way" is the most used for 2 reasons: 1) it's used by Manjaro. 2) it has an unofficial repository. The apg way, instead, doesn't have any repository nor a distribution that uses it. Moreover the [https://github.com/andrewgregory/openrc-arch-services openrc-arch-services] are not updated since 1 year. [[User:Tredaelli|Tredaelli]] ([[User talk:Tredaelli|talk]]) 09:02, 3 August 2015 (UTC)<br />
<br />
:::::There's no need for a repository as there's no arbitrary splitting of service files. See my [https://bbs.archlinux.org/viewtopic.php?pid=1550169#p1550169 BBS post] for the rest. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:43, 3 August 2015 (UTC)<br />
<br />
:::::: But the apg way is broken too, for example the sshd openrc init script present in {{AUR|openrc-arch-services-git}} doesn't work correctly, since the -d option of ssh-keygen is removed. At least Artoo fixes the scripts. [[User:Tredaelli|Tredaelli]] ([[User talk:Tredaelli|talk]]) 14:45, 3 August 2015 (UTC)<br />
:::::::So any objections about restoring the old wiki page? [[User:Tredaelli|Tredaelli]] ([[User talk:Tredaelli|talk]]) 15:25, 4 August 2015 (UTC)<br />
<br />
::::::: I fix every issue that is actually brought to my attention. [[User:Apg|Apg]] ([[User talk:Apg|talk]]) 18:40, 4 August 2015 (UTC)<br />
<br />
== sysvinit-openrc ==<br />
<br />
{{AUR|openrc-sysvinit}} <s>for some reason</s> - it doesn't include all binaries - depends on {{AUR|sysvinit}}, so the mentioned compability to {{Pkg|systemd-sysvcompat}} is not present. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 13:03, 2 August 2015 (UTC)</div>Apghttps://wiki.archlinux.org/index.php?title=Perl_package_guidelines&diff=382086Perl package guidelines2015-07-13T19:51:58Z<p>Apg: Do not recommend subshells; they break split PKGBUILDs</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Perl Package Guidelines]]<br />
{{Package guidelines}}<br />
<br />
This document covers the creation of [[PKGBUILD]]s for perl modules distributed over CPAN, the Comprehensive Perl Authors Network. The target audience of this document is intended to be packagers of perl modules.<br />
<br />
== ArchLinux Packaging Conventions ==<br />
<br />
The following conventions should be used to keep perl module packages consistent. This section serves as an introduction to the concept of perl packaging, from the point of view of ArchLinux; that is, package management and system administration. In an effort to please the casual TL;DR reader, the easiest and/or most popular material is at the top.<br />
<br />
=== Package names ===<br />
For modules the package name should begin with {{Ic|perl-}} and the rest of the name should be constructed from the module name by converting it to lowercase and then replacing colons with hyphens. For example the package name corresponding to {{Ic|HTML::Parser}} will be {{Ic|perl-html-parser}}. Perl applications should have the same name as that of the application but in lowercase.<br />
<br />
=== Package file placement ===<br />
Perl packages should install module files into {{ic|/usr/lib/perl5/vendor_perl/}}, or {{ic|/usr/share/perl5/vendor_perl/}}. This is done by setting the {{Ic|INSTALLDIRS}} command line parameter to {{ic|vendor}} as shown below. No files should be stored in {{ic|/usr/lib/perl5/site_perl/}} as that directory is reserved for use by the system administrator to install Perl packages outside the package management system. When a user installs modules system-wide by using the <i>cpan</i> shell, modules end up in the site-perl sub-directories.<br />
<br />
The files {{ic|perllocal.pod}} and {{ic|.packlist}} also should not be present; this is taken care of by the example PKGBUILD described below.<br />
<br />
=== Architecture ===<br />
In most cases, the {{Ic|arch}} array should contain {{Ic|'any'}} because most Perl packages are architecture independent. XS modules are compiled into dynamically loaded libraries (.so files) and should explicitly set their architecture to {{Ic|('i686' 'x86_64')}} in order to indicate that they are architecture dependent when built. An XS module usually contains one or more .xs files which dynamically generate .c files.<br />
<br />
=== Automation ===<br />
A plugin for the second-generation CPAN shell, CPANPLUS, is available in the perl-cpanplus-dist-arch package from the community repo. This plugin packages distributions on the fly as they are installed by CPANPLUS. Online documentation is available at https://metacpan.org/release/CPANPLUS-Dist-Arch<br />
<br />
== PKGBUILD Examples ==<br />
An example PKGBUILD can be found at {{ic|/usr/share/pacman/PKGBUILD-perl.proto}}, which is in the {{Pkg|abs}} package.<br />
<br />
The following two PKGBUILD examples use techniques, introduced in this page, that are intended to make a PKGBUILD more resilient to more sophisticated problems. Because there are two styles of build scripts, there are two example PKGBUILDS. The first PKGBUILD is an example of how to package a distribution that uses {{ic|Makefile.PL}}. The second PKGBUILD can be used as a starting point for a distribution which uses {{ic|Build.PL}}.<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
# Contributor: Your Name <youremail@domain.com><br />
pkgname=perl-foo-bar<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc='This packages the Foo-Bar distribution, containing the Foo::Bar module!'<br />
_dist=Foo-Bar<br />
arch=('any')<br />
url="https://metacpan.org/release/$_dist"<br />
license=('GPL' 'PerlArtistic')<br />
depends=(perl)<br />
options=('!emptydirs' purge)<br />
source=("http://search.cpan.org/CPAN/authors/id/BAZ/$_dist-$pkgver.tar.gz")<br />
md5sums=(...)<br />
<br />
build() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps<br />
/usr/bin/perl Makefile.PL<br />
make<br />
}<br />
<br />
check() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1<br />
make test<br />
}<br />
<br />
package() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
make install INSTALLDIRS=vendor DESTDIR="$pkgdir"<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
# Contributor: Your Name <youremail@domain.com><br />
pkgname=perl-foo-bar<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc='This packages the Foo-Bar distribution, containing the Foo::Bar module!'<br />
_dist=Foo-Bar<br />
arch=('any')<br />
url="https://metacpan.org/release/$_dist"<br />
license=('GPL' 'PerlArtistic')<br />
depends=(perl)<br />
options=('!emptydirs' purge)<br />
source=("http://search.cpan.org/CPAN/authors/id/BAZ/$_dist-$pkgver.tar.gz")<br />
md5sums=(...)<br />
<br />
build() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null<br />
/usr/bin/perl Build.PL<br />
./Build<br />
}<br />
<br />
check() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1<br />
./Build test<br />
}<br />
<br />
package() {<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
./Build install installdirs=vendor destdir="$pkgdir"<br />
}<br />
</nowiki>}}<br />
<br />
Justification for the added complexity of these PKGBUILDs is attempted in the latter sections.<br />
<br />
== CPAN Module Mechanics ==<br />
<br />
There are a number of carefully, and not so carefully, designed mechanics that work together to create the module system. When making use of the CPAN, procedures must be followed to fetch the source code of a module, build that fetched module, and insert it into the system software for later execution. In order to understand how modules should be packaged, it helps immensely if one understands how modules work without any involvement from pacman and ArchLinux packages. Our goal in the end is to try to be unobtrusive as possible, while improving organization and consistency in the end product.<br />
<br />
=== Modules ===<br />
Modules are declared with the {{Ic|package}} keyword in perl. Modules are contained inside a {{ic|.pm}} ("dot-pee-em") file. Though it's possible more than one module ({{Ic|package}}) is in the file. Modules have namespaces separated with {{Ic|::}} (double colons), like: {{Ic|Archlinux::Module}}. When loading a module, the {{Ic|::}}s are replaced with directory separators. For example: {{ic|Archlinux/Module.pm}} will be loaded for the module {{Ic|Archlinux::Module}}.<br />
<br />
Core modules are included with an installation of perl. Some core modules are ''only'' available bundled with perl. Other modules can still be downloaded and installed separately from CPAN.<br />
<br />
=== Distributions ===<br />
(aka dist, package) This is the equivalent of an Archlinux package in CPAN-lingo. Distributions are {{ic|.tar.gz}} archives full of files. These archives contain primarily .pm module files, tests for the included modules, documentation for the modules, and whatever else is deemed necessary.<br />
<br />
Usually a distribution contains a primary module with the same name. Sometimes this is not true, like with the Template-Toolkit distribution. The latest package, {{ic|Template-Toolkit-2.22.tar.gz}}, for the {{Ic|Template-Toolkit}} dist, contains no {{Ic|Template::Toolkit}} module!<br />
<br />
Sometimes because distributions are named after a main module, their names are used interchangeably and they get muddled together. However it is sometimes useful to consider them a separate entity (like in Template-Toolkit's case).<br />
<br />
=== CPAN ===<br />
Each CPAN mirror contains indices that list the distributions on CPAN, the modules in the dists, and the name of the author who uploaded the dist. These are simply text files. The most useful index is in the {{ic|/modules/02packages.details.txt.gz}} file available from each CPAN mirror. The term "packages" here refers to the {{ic|package}} keyword in the perl language itself, not something similar to pacman packages. The CPAN shell, referred to as lowercased, italicized <i>cpan</i>, is simply the venerable perl script which navigates indices to find the module you want to install.<br />
<br />
Modules are found in the {{ic|02packages.details.txt.gz}} list. On the same line as the module/package name is the path to the distribution tarball that contains the module. When you ask <i>cpan</i> to install a module, it will look up the module and install the relevant distribution. As the distribution is installing it will generate a list of module dependencies. <i>Cpan</i> will try to load each module dependency into the perl interpreter. If a module of the given version cannot be loaded the process is repeated.<br />
<br />
The <i>cpan</i> shell does not have to worry about what version of the required module it is installing. <i>cpan</i> can rely on the fact that the latest version of the module must satisfy the requirements of the original module that it began installing in the first place. Only the latest versions of modules are listed in the packages details file. Unfortunately for the perl package author, we cannot always rely on the fact that our packages offer the most recent version of a perl distribution and the modules contained within. Pacman dependency checking is much more static and strongly enforced.<br />
<br />
=== Module dependencies ===<br />
Perl has a unique way of defining dependencies compared to similar systems like python eggs and ruby gems. Eggs define dependencies on other eggs. Gems depend on gems. Perl dists depend on modules. Modules are only available from CPAN distributions so in a way perl distributions depend on distributions only indirectly. Modules can define their own versions independent from distributions inside the module source code. This is done by defining a <i>package</i> variable called {{ic|$VERSION}}. When using strict and warnings, this is defined with the our keyword. For example:<br />
<br />
{{bc|1=<br />
package Foo::Module;<br />
use warnings;<br />
use strict;<br />
our $VERSION = '1.00';<br />
}}<br />
<br />
Modules can change their versions however they like and even have a version distinct from the distribution version. The utility of this is questionable but it is important to keep in mind. Module versions are more difficult to determine from outside of the perl interpreter and require parsing the perl code itself and maybe even loading the module into perl. The advantage is that from inside the perl interpreter module versions are easy to determine. For example:<br />
<br />
{{bc|<br />
use Foo::Module;<br />
print $Foo::Module::VERSION, "\n";<br />
}}<br />
<br />
=== Dependency definition ===<br />
Where are dependencies defined in perl distributions? They are "defined" inside of the {{ic|Makefile.PL}} or {{ic|Build.PL}} script. For example, inside of the {{ic|Makefile.PL}} script the {{ic|WriteMakeFile}} function is called to generate the {{ic|Makefile}} like this:<br />
<br />
{{bc|<nowiki><br />
use ExtUtils::MakeMaker;<br />
WriteMakeFile(<br />
'NAME' => 'ArchLinux::Module',<br />
'VERSION' => '0.01',<br />
'PREREQ_PM' => { 'POSIX' => '0.01' },<br />
);<br />
</nowiki>}}<br />
<br />
This is a contrived example but it is important to understand the dependencies aren't final until after the {{ic|Makefile.PL}} or {{ic|Build.PL}} script is run. Dependencies are specified at runtime, which means they can be changed or modified using the full power of perl. This means the module author can add, remove, or change versions of dependencies right before the distribution is installed. Some modules authors use this to do overly clever things like depend on modules only if they are installed. Some multi-platform dists also depend on system-specific modules when installed on different operating systems.<br />
<br />
As an example, the CPANPLUS distribution looks for CPANPLUS::Dist plugins that are currently installed. If any plugins are installed for the currently installed version of CPANPLUS it adds them to the new CPANPLUS's prerequisites. I'm not quite sure why. Luckily for the perl packager most dependencies are static like in the above example that requires the POSIX module with a minimum version of 0.01.<br />
<br />
=== Meta information ===<br />
Meta files are included in recent distributions which contain meta-information about distributions such as the name, author, abstract description, and module requirements. Previously there were {{ic|META.yml}} files in the YAML format but more recently the switch has been made to {{ic|META.json}} files in the JSON format. These files can<br />
be edited by hand but more often they are generated automatically by {{ic|Makefile.PL}} or {{ic|Build.PL}} scripts when packaging a distribution for release. The latest specification is described in [http://search.cpan.org/perldoc?CPAN::Meta::Spec CPAN::Meta::Spec's online docs].<br />
<br />
Remember that dependencies can be changed at runtime! For this reason another meta file is generated after running the build script. This second meta file is called {{ic|MYMETA.json}} and reflects changes the script made at runtime and may be different from the meta file generated when the distribution was packaged for CPAN.<br />
<br />
Elderly distributions on the CPAN have no meta file at all. These old releases predate the idea of the META.yml file and only describe their prerequisites in their {{ic|Makefile.PL}}.<br />
<br />
== Installation modules ==<br />
One of perl's greatest strengths is the sheer number of modules available on CPAN. Not too surprisingly, there are also several different modules used for installing... well... modules! TMTOWTDI! I am not aware of a standard name for these types of modules, so I just called them "Installation Modules".<br />
<br />
These modules are concerned with building the distribution and installing module files wherever the user prefers. This seems straightforward, but considering the number of different systems perl runs on, this can get complex. Installation modules all place a perl code file inside the dist tarball. Running this perl script will initiate the build and install process. The script always ends with the {{ic|.PL}} suffix and is termed the "Build script" in the below list.<br />
<br />
=== ExtUtils::MakeMaker ===<br />
;Build script: {{ic|Makefile.PL}}<br />
;CPAN link: http://search.cpan.org/dist/ExtUtils-MakeMaker<br />
<br />
The original, oldest module for installing modules is {{Ic|ExtUtils::MakeMaker}}. The major downside to this module is that it requires the {{ic|make}} program to build and install everything. This may not seem like a big deal to linux users but is a real hassle for Windows people!<br />
<br />
=== Module::Build ===<br />
;Build script: {{ic|Build.PL}}<br />
;CPAN link: http://search.cpan.org/dist/Module-Build<br />
<br />
The main advantage of Module::Build is that it is pure-perl. This means it does not require a {{ic|make}} program to be installed for you to build/install modules. Its adoption was rocky because if {{Ic|Module::Build}} was not already installed, you could not run the bundled {{ic|Build.PL}} script! This is not a problem with recent versions of perl because {{Ic|Module::Build}} is a core module. ('''NOTE''' As of perl 5.22, Module::Build will no longer be a core module)<br />
<br />
=== Module::Install ===<br />
;Build script: {{ic|Makefile.PL}}<br />
;CPAN link: http://search.cpan.org/dist/Module-Install<br />
<br />
Another modern build/installation module, {{Ic|Module::Install}} still requires the {{ic|make}} program be installed to function. {{Ic|MI}} was designed as a drop-in replacement for {{Ic|MakeMaker}}, to address some of {{Ic|MakeMaker}}'s shortcomings. Ironically, it depends on {{Ic|MakeMaker}} in order to operate. The {{ic|Makefile.PL}} files that are generated by {{Ic|MI}} look much different and are implemented using a simple domain specific language.<br />
<br />
One very interesting feature is that {{Ic|Module::Install}} bundles a ''complete'' ''copy'' of itself into the distribution file. Because of this, unlike {{Ic|MakeMaker}} or {{Ic|M::B}}, you do not need {{Ic|Module::Install}} to be installed on your system.<br />
<br />
Another very unique feature is auto-install. ''Though not recommended by {{Ic|Module::Install}}'s authors this feature is used quite often.'' When the module author enables auto-install for his distribution, {{Ic|Module::Install}} will search for and install any pre-requisite modules that are not installed when {{ic|Makefile.PL}} is executed. This feature is skipped when {{Ic|Module::Install}} detects it is being run by {{Ic|CPAN}} or {{Ic|CPANPLUS}}. However, this feature is not skipped when run inside... oh I don't know... a '''PKGBUILD'''! I hope you can see how a rogue perl program downloading and installing modules willy-nilly ''inside a PKGBUILD'' can be a problem. See the [[#PERL AUTOINSTALL]] environment variable to see how to fix this.<br />
<br />
=== Environment variables ===<br />
A number of environment variables can affect the way the modules are built or installed. Some have a very dramatic effect and can cause problems if misunderstood. An advanced user could be using these environment variables. Some of these will break an unsuspecting PKGBUILD or cause unexpected behavior.<br />
<br />
==== PERL_MM_USE_DEFAULT ====<br />
When this variable is set to a true value, the installation module will pretend the default answer was given to any question it would normally ask. This does not ''always'' work, but all of the installation modules honour it. ''That doesn't mean the module author will!''<br />
<br />
==== PERL_AUTOINSTALL ====<br />
You can pass additional command-line arguments to {{Ic|Module::Install}}'s {{ic|Makefile.PL}} with this variable. In order to turn off auto-install (''highly recommended''), assign {{Ic|--skipdeps}} to this.<br />
<br />
{{bc|1=export PERL_AUTOINSTALL='--skipdeps'}}<br />
<br />
==== PERL_MM_OPT ====<br />
You can pass additional command-line arguments to {{ic|Makefile.PL}} and/or {{ic|Build.PL}} with this variable. For example, you can install modules into your home-dir by using:<br />
<br />
{{bc|1=export PERL_MM_OPT=INSTALLBASE=~/perl5}}<br />
<br />
==== PERL_MB_OPT ====<br />
This is the same thing as {{Ic|PERL_MM_OPT}} except it is only for {{Ic|Module::Build}}. For example, you could install modules into your home-dir by using: <br />
<br />
{{bc|1=export PERL_MB_OPT=--install_base=~/perl5}}<br />
<br />
==== MODULEBUILDRC ====<br />
{{Ic|Module::Build}} allows you to override its command-line-arguments with an rcfile. This defaults to {{ic|~/.modulebuildrc}}. You can override which file it uses by setting the path to the rcfile in {{Ic|MODULEBUILDRC}}. The paranoid might set {{Ic|MODULEBUILDRC}} to {{ic|/dev/null}}... just in case.<br />
<br />
==== PERL5LIB ====<br />
The directories searched for libraries can be set by the user (particularly if they are using {{ic|Local::Lib}}) by setting {{ic|PERL5LIB}}. That should be cleared before building.<br />
<br />
==== PERL_LOCAL_LIB_ROOT ====<br />
If the user is using {{ic|Local::Lib}} it will set {{ic|PERL_LOCAL_LIB_ROOT}}. That should be cleared before building.<br />
<br />
== Problems with user-installed perl ==<br />
A subtle problem is that advanced perl programmers may like to have multiple versions of perl installed. This is useful for testing backwards-compatibility in created programs. There are also speed benefits to compiling your own custom perl interpreter (i.e. without threads). Another reason for a custom ''perl'' is simply because the official perl Arch Linux package sometimes lags behind perl releases. The user may be trying out the latest perl... who knows?<br />
<br />
If the user has the custom perl executable in their {{Ic|$PATH}}, the custom perl will be run when the user types the ''perl'' command on the shell. In fact the custom perl will run inside the {{ic|PKGBUILD}} as well! This can lead to insidious problems that are difficult to understand.<br />
<br />
The problem lies in compiled XS modules. These modules bridge perl and C. As such they must use perl's internal C API to accomplish this bridge. Perl's C API changes slightly with different versions of perl. If the user has a different version of perl than the system perl ({{ic|/usr/bin/perl}}) then any XS module compiled with the user's perl will be incompatible with the system-wide perl. When trying to use the compiled XS module with the system perl, the module will fail to load with a link error.<br />
<br />
A simple solution is to always use the absolute path of the system-wide perl interpreter ({{ic|/usr/bin/perl}}) when running perl in the {{ic|PKGBUILD}}.</div>Apghttps://wiki.archlinux.org/index.php?title=Perl_package_guidelines&diff=382085Perl package guidelines2015-07-13T19:49:24Z<p>Apg: Remove incorrect version information. 6.0001 and 6.1 are the same to pacman.</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Perl Package Guidelines]]<br />
{{Package guidelines}}<br />
<br />
This document covers the creation of [[PKGBUILD]]s for perl modules distributed over CPAN, the Comprehensive Perl Authors Network. The target audience of this document is intended to be packagers of perl modules.<br />
<br />
== ArchLinux Packaging Conventions ==<br />
<br />
The following conventions should be used to keep perl module packages consistent. This section serves as an introduction to the concept of perl packaging, from the point of view of ArchLinux; that is, package management and system administration. In an effort to please the casual TL;DR reader, the easiest and/or most popular material is at the top.<br />
<br />
=== Package names ===<br />
For modules the package name should begin with {{Ic|perl-}} and the rest of the name should be constructed from the module name by converting it to lowercase and then replacing colons with hyphens. For example the package name corresponding to {{Ic|HTML::Parser}} will be {{Ic|perl-html-parser}}. Perl applications should have the same name as that of the application but in lowercase.<br />
<br />
=== Package file placement ===<br />
Perl packages should install module files into {{ic|/usr/lib/perl5/vendor_perl/}}, or {{ic|/usr/share/perl5/vendor_perl/}}. This is done by setting the {{Ic|INSTALLDIRS}} command line parameter to {{ic|vendor}} as shown below. No files should be stored in {{ic|/usr/lib/perl5/site_perl/}} as that directory is reserved for use by the system administrator to install Perl packages outside the package management system. When a user installs modules system-wide by using the <i>cpan</i> shell, modules end up in the site-perl sub-directories.<br />
<br />
The files {{ic|perllocal.pod}} and {{ic|.packlist}} also should not be present; this is taken care of by the example PKGBUILD described below.<br />
<br />
=== Architecture ===<br />
In most cases, the {{Ic|arch}} array should contain {{Ic|'any'}} because most Perl packages are architecture independent. XS modules are compiled into dynamically loaded libraries (.so files) and should explicitly set their architecture to {{Ic|('i686' 'x86_64')}} in order to indicate that they are architecture dependent when built. An XS module usually contains one or more .xs files which dynamically generate .c files.<br />
<br />
=== Automation ===<br />
A plugin for the second-generation CPAN shell, CPANPLUS, is available in the perl-cpanplus-dist-arch package from the community repo. This plugin packages distributions on the fly as they are installed by CPANPLUS. Online documentation is available at https://metacpan.org/release/CPANPLUS-Dist-Arch<br />
<br />
== PKGBUILD Examples ==<br />
An example PKGBUILD can be found at {{ic|/usr/share/pacman/PKGBUILD-perl.proto}}, which is in the {{Pkg|abs}} package.<br />
<br />
The following two PKGBUILD examples use techniques, introduced in this page, that are intended to make a PKGBUILD more resilient to more sophisticated problems. Because there are two styles of build scripts, there are two example PKGBUILDS. The first PKGBUILD is an example of how to package a distribution that uses {{ic|Makefile.PL}}. The second PKGBUILD can be used as a starting point for a distribution which uses {{ic|Build.PL}}.<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
# Contributor: Your Name <youremail@domain.com><br />
pkgname=perl-foo-bar<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc='This packages the Foo-Bar distribution, containing the Foo::Bar module!'<br />
_dist=Foo-Bar<br />
arch=('any')<br />
url="https://metacpan.org/release/$_dist"<br />
license=('GPL' 'PerlArtistic')<br />
depends=(perl)<br />
options=('!emptydirs' purge)<br />
source=("http://search.cpan.org/CPAN/authors/id/BAZ/$_dist-$pkgver.tar.gz")<br />
md5sums=(...)<br />
<br />
build() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps<br />
/usr/bin/perl Makefile.PL<br />
make<br />
)<br />
<br />
check() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1<br />
make test<br />
)<br />
<br />
package() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT<br />
make install INSTALLDIRS=vendor DESTDIR="$pkgdir"<br />
)<br />
</nowiki>}}<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
# Contributor: Your Name <youremail@domain.com><br />
pkgname=perl-foo-bar<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc='This packages the Foo-Bar distribution, containing the Foo::Bar module!'<br />
_dist=Foo-Bar<br />
arch=('any')<br />
url="https://metacpan.org/release/$_dist"<br />
license=('GPL' 'PerlArtistic')<br />
depends=(perl)<br />
options=('!emptydirs' purge)<br />
source=("http://search.cpan.org/CPAN/authors/id/BAZ/$_dist-$pkgver.tar.gz")<br />
md5sums=(...)<br />
<br />
build() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null<br />
/usr/bin/perl Build.PL<br />
./Build<br />
)<br />
<br />
check() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
export PERL_MM_USE_DEFAULT=1<br />
./Build test<br />
)<br />
<br />
package() (<br />
cd "$srcdir/$_dist-$pkgver"<br />
unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT<br />
./Build install installdirs=vendor destdir="$pkgdir"<br />
)<br />
</nowiki>}}<br />
<br />
The build, check, and package functions use parenthesis instead of curly brackets to surround their body of statements. Doing so causes the function body to be run in a subshell, avoiding modification of makepkg's environment. This is simply a precaution.<br />
<br />
Justification for the added complexity of these PKGBUILDs is attempted in the latter sections.<br />
<br />
== CPAN Module Mechanics ==<br />
<br />
There are a number of carefully, and not so carefully, designed mechanics that work together to create the module system. When making use of the CPAN, procedures must be followed to fetch the source code of a module, build that fetched module, and insert it into the system software for later execution. In order to understand how modules should be packaged, it helps immensely if one understands how modules work without any involvement from pacman and ArchLinux packages. Our goal in the end is to try to be unobtrusive as possible, while improving organization and consistency in the end product.<br />
<br />
=== Modules ===<br />
Modules are declared with the {{Ic|package}} keyword in perl. Modules are contained inside a {{ic|.pm}} ("dot-pee-em") file. Though it's possible more than one module ({{Ic|package}}) is in the file. Modules have namespaces separated with {{Ic|::}} (double colons), like: {{Ic|Archlinux::Module}}. When loading a module, the {{Ic|::}}s are replaced with directory separators. For example: {{ic|Archlinux/Module.pm}} will be loaded for the module {{Ic|Archlinux::Module}}.<br />
<br />
Core modules are included with an installation of perl. Some core modules are ''only'' available bundled with perl. Other modules can still be downloaded and installed separately from CPAN.<br />
<br />
=== Distributions ===<br />
(aka dist, package) This is the equivalent of an Archlinux package in CPAN-lingo. Distributions are {{ic|.tar.gz}} archives full of files. These archives contain primarily .pm module files, tests for the included modules, documentation for the modules, and whatever else is deemed necessary.<br />
<br />
Usually a distribution contains a primary module with the same name. Sometimes this is not true, like with the Template-Toolkit distribution. The latest package, {{ic|Template-Toolkit-2.22.tar.gz}}, for the {{Ic|Template-Toolkit}} dist, contains no {{Ic|Template::Toolkit}} module!<br />
<br />
Sometimes because distributions are named after a main module, their names are used interchangeably and they get muddled together. However it is sometimes useful to consider them a separate entity (like in Template-Toolkit's case).<br />
<br />
=== CPAN ===<br />
Each CPAN mirror contains indices that list the distributions on CPAN, the modules in the dists, and the name of the author who uploaded the dist. These are simply text files. The most useful index is in the {{ic|/modules/02packages.details.txt.gz}} file available from each CPAN mirror. The term "packages" here refers to the {{ic|package}} keyword in the perl language itself, not something similar to pacman packages. The CPAN shell, referred to as lowercased, italicized <i>cpan</i>, is simply the venerable perl script which navigates indices to find the module you want to install.<br />
<br />
Modules are found in the {{ic|02packages.details.txt.gz}} list. On the same line as the module/package name is the path to the distribution tarball that contains the module. When you ask <i>cpan</i> to install a module, it will look up the module and install the relevant distribution. As the distribution is installing it will generate a list of module dependencies. <i>Cpan</i> will try to load each module dependency into the perl interpreter. If a module of the given version cannot be loaded the process is repeated.<br />
<br />
The <i>cpan</i> shell does not have to worry about what version of the required module it is installing. <i>cpan</i> can rely on the fact that the latest version of the module must satisfy the requirements of the original module that it began installing in the first place. Only the latest versions of modules are listed in the packages details file. Unfortunately for the perl package author, we cannot always rely on the fact that our packages offer the most recent version of a perl distribution and the modules contained within. Pacman dependency checking is much more static and strongly enforced.<br />
<br />
=== Module dependencies ===<br />
Perl has a unique way of defining dependencies compared to similar systems like python eggs and ruby gems. Eggs define dependencies on other eggs. Gems depend on gems. Perl dists depend on modules. Modules are only available from CPAN distributions so in a way perl distributions depend on distributions only indirectly. Modules can define their own versions independent from distributions inside the module source code. This is done by defining a <i>package</i> variable called {{ic|$VERSION}}. When using strict and warnings, this is defined with the our keyword. For example:<br />
<br />
{{bc|1=<br />
package Foo::Module;<br />
use warnings;<br />
use strict;<br />
our $VERSION = '1.00';<br />
}}<br />
<br />
Modules can change their versions however they like and even have a version distinct from the distribution version. The utility of this is questionable but it is important to keep in mind. Module versions are more difficult to determine from outside of the perl interpreter and require parsing the perl code itself and maybe even loading the module into perl. The advantage is that from inside the perl interpreter module versions are easy to determine. For example:<br />
<br />
{{bc|<br />
use Foo::Module;<br />
print $Foo::Module::VERSION, "\n";<br />
}}<br />
<br />
=== Dependency definition ===<br />
Where are dependencies defined in perl distributions? They are "defined" inside of the {{ic|Makefile.PL}} or {{ic|Build.PL}} script. For example, inside of the {{ic|Makefile.PL}} script the {{ic|WriteMakeFile}} function is called to generate the {{ic|Makefile}} like this:<br />
<br />
{{bc|<nowiki><br />
use ExtUtils::MakeMaker;<br />
WriteMakeFile(<br />
'NAME' => 'ArchLinux::Module',<br />
'VERSION' => '0.01',<br />
'PREREQ_PM' => { 'POSIX' => '0.01' },<br />
);<br />
</nowiki>}}<br />
<br />
This is a contrived example but it is important to understand the dependencies aren't final until after the {{ic|Makefile.PL}} or {{ic|Build.PL}} script is run. Dependencies are specified at runtime, which means they can be changed or modified using the full power of perl. This means the module author can add, remove, or change versions of dependencies right before the distribution is installed. Some modules authors use this to do overly clever things like depend on modules only if they are installed. Some multi-platform dists also depend on system-specific modules when installed on different operating systems.<br />
<br />
As an example, the CPANPLUS distribution looks for CPANPLUS::Dist plugins that are currently installed. If any plugins are installed for the currently installed version of CPANPLUS it adds them to the new CPANPLUS's prerequisites. I'm not quite sure why. Luckily for the perl packager most dependencies are static like in the above example that requires the POSIX module with a minimum version of 0.01.<br />
<br />
=== Meta information ===<br />
Meta files are included in recent distributions which contain meta-information about distributions such as the name, author, abstract description, and module requirements. Previously there were {{ic|META.yml}} files in the YAML format but more recently the switch has been made to {{ic|META.json}} files in the JSON format. These files can<br />
be edited by hand but more often they are generated automatically by {{ic|Makefile.PL}} or {{ic|Build.PL}} scripts when packaging a distribution for release. The latest specification is described in [http://search.cpan.org/perldoc?CPAN::Meta::Spec CPAN::Meta::Spec's online docs].<br />
<br />
Remember that dependencies can be changed at runtime! For this reason another meta file is generated after running the build script. This second meta file is called {{ic|MYMETA.json}} and reflects changes the script made at runtime and may be different from the meta file generated when the distribution was packaged for CPAN.<br />
<br />
Elderly distributions on the CPAN have no meta file at all. These old releases predate the idea of the META.yml file and only describe their prerequisites in their {{ic|Makefile.PL}}.<br />
<br />
== Installation modules ==<br />
One of perl's greatest strengths is the sheer number of modules available on CPAN. Not too surprisingly, there are also several different modules used for installing... well... modules! TMTOWTDI! I am not aware of a standard name for these types of modules, so I just called them "Installation Modules".<br />
<br />
These modules are concerned with building the distribution and installing module files wherever the user prefers. This seems straightforward, but considering the number of different systems perl runs on, this can get complex. Installation modules all place a perl code file inside the dist tarball. Running this perl script will initiate the build and install process. The script always ends with the {{ic|.PL}} suffix and is termed the "Build script" in the below list.<br />
<br />
=== ExtUtils::MakeMaker ===<br />
;Build script: {{ic|Makefile.PL}}<br />
;CPAN link: http://search.cpan.org/dist/ExtUtils-MakeMaker<br />
<br />
The original, oldest module for installing modules is {{Ic|ExtUtils::MakeMaker}}. The major downside to this module is that it requires the {{ic|make}} program to build and install everything. This may not seem like a big deal to linux users but is a real hassle for Windows people!<br />
<br />
=== Module::Build ===<br />
;Build script: {{ic|Build.PL}}<br />
;CPAN link: http://search.cpan.org/dist/Module-Build<br />
<br />
The main advantage of Module::Build is that it is pure-perl. This means it does not require a {{ic|make}} program to be installed for you to build/install modules. Its adoption was rocky because if {{Ic|Module::Build}} was not already installed, you could not run the bundled {{ic|Build.PL}} script! This is not a problem with recent versions of perl because {{Ic|Module::Build}} is a core module. ('''NOTE''' As of perl 5.22, Module::Build will no longer be a core module)<br />
<br />
=== Module::Install ===<br />
;Build script: {{ic|Makefile.PL}}<br />
;CPAN link: http://search.cpan.org/dist/Module-Install<br />
<br />
Another modern build/installation module, {{Ic|Module::Install}} still requires the {{ic|make}} program be installed to function. {{Ic|MI}} was designed as a drop-in replacement for {{Ic|MakeMaker}}, to address some of {{Ic|MakeMaker}}'s shortcomings. Ironically, it depends on {{Ic|MakeMaker}} in order to operate. The {{ic|Makefile.PL}} files that are generated by {{Ic|MI}} look much different and are implemented using a simple domain specific language.<br />
<br />
One very interesting feature is that {{Ic|Module::Install}} bundles a ''complete'' ''copy'' of itself into the distribution file. Because of this, unlike {{Ic|MakeMaker}} or {{Ic|M::B}}, you do not need {{Ic|Module::Install}} to be installed on your system.<br />
<br />
Another very unique feature is auto-install. ''Though not recommended by {{Ic|Module::Install}}'s authors this feature is used quite often.'' When the module author enables auto-install for his distribution, {{Ic|Module::Install}} will search for and install any pre-requisite modules that are not installed when {{ic|Makefile.PL}} is executed. This feature is skipped when {{Ic|Module::Install}} detects it is being run by {{Ic|CPAN}} or {{Ic|CPANPLUS}}. However, this feature is not skipped when run inside... oh I don't know... a '''PKGBUILD'''! I hope you can see how a rogue perl program downloading and installing modules willy-nilly ''inside a PKGBUILD'' can be a problem. See the [[#PERL AUTOINSTALL]] environment variable to see how to fix this.<br />
<br />
=== Environment variables ===<br />
A number of environment variables can affect the way the modules are built or installed. Some have a very dramatic effect and can cause problems if misunderstood. An advanced user could be using these environment variables. Some of these will break an unsuspecting PKGBUILD or cause unexpected behavior.<br />
<br />
==== PERL_MM_USE_DEFAULT ====<br />
When this variable is set to a true value, the installation module will pretend the default answer was given to any question it would normally ask. This does not ''always'' work, but all of the installation modules honour it. ''That doesn't mean the module author will!''<br />
<br />
==== PERL_AUTOINSTALL ====<br />
You can pass additional command-line arguments to {{Ic|Module::Install}}'s {{ic|Makefile.PL}} with this variable. In order to turn off auto-install (''highly recommended''), assign {{Ic|--skipdeps}} to this.<br />
<br />
{{bc|1=export PERL_AUTOINSTALL='--skipdeps'}}<br />
<br />
==== PERL_MM_OPT ====<br />
You can pass additional command-line arguments to {{ic|Makefile.PL}} and/or {{ic|Build.PL}} with this variable. For example, you can install modules into your home-dir by using:<br />
<br />
{{bc|1=export PERL_MM_OPT=INSTALLBASE=~/perl5}}<br />
<br />
==== PERL_MB_OPT ====<br />
This is the same thing as {{Ic|PERL_MM_OPT}} except it is only for {{Ic|Module::Build}}. For example, you could install modules into your home-dir by using: <br />
<br />
{{bc|1=export PERL_MB_OPT=--install_base=~/perl5}}<br />
<br />
==== MODULEBUILDRC ====<br />
{{Ic|Module::Build}} allows you to override its command-line-arguments with an rcfile. This defaults to {{ic|~/.modulebuildrc}}. You can override which file it uses by setting the path to the rcfile in {{Ic|MODULEBUILDRC}}. The paranoid might set {{Ic|MODULEBUILDRC}} to {{ic|/dev/null}}... just in case.<br />
<br />
==== PERL5LIB ====<br />
The directories searched for libraries can be set by the user (particularly if they are using {{ic|Local::Lib}}) by setting {{ic|PERL5LIB}}. That should be cleared before building.<br />
<br />
==== PERL_LOCAL_LIB_ROOT ====<br />
If the user is using {{ic|Local::Lib}} it will set {{ic|PERL_LOCAL_LIB_ROOT}}. That should be cleared before building.<br />
<br />
== Problems with user-installed perl ==<br />
A subtle problem is that advanced perl programmers may like to have multiple versions of perl installed. This is useful for testing backwards-compatibility in created programs. There are also speed benefits to compiling your own custom perl interpreter (i.e. without threads). Another reason for a custom ''perl'' is simply because the official perl Arch Linux package sometimes lags behind perl releases. The user may be trying out the latest perl... who knows?<br />
<br />
If the user has the custom perl executable in their {{Ic|$PATH}}, the custom perl will be run when the user types the ''perl'' command on the shell. In fact the custom perl will run inside the {{ic|PKGBUILD}} as well! This can lead to insidious problems that are difficult to understand.<br />
<br />
The problem lies in compiled XS modules. These modules bridge perl and C. As such they must use perl's internal C API to accomplish this bridge. Perl's C API changes slightly with different versions of perl. If the user has a different version of perl than the system perl ({{ic|/usr/bin/perl}}) then any XS module compiled with the user's perl will be incompatible with the system-wide perl. When trying to use the compiled XS module with the system perl, the module will fail to load with a link error.<br />
<br />
A simple solution is to always use the absolute path of the system-wide perl interpreter ({{ic|/usr/bin/perl}}) when running perl in the {{ic|PKGBUILD}}.</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=354954User:Apg2015-01-02T15:04:56Z<p>Apg: </p>
<hr />
<div>= pacman TODO =<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
Frequency = PerTransaction|PerPackage* (Optional, defaults to PerTransaction)<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* db upgrade script for symlink support removal<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success</div>Apghttps://wiki.archlinux.org/index.php?title=Improve_pacman_performance&diff=342669Improve pacman performance2014-11-01T15:40:06Z<p>Apg: revert pacman-optimize changes, it was not removed</p>
<hr />
<div>[[Category:Package management]]<br />
[[de:Pacman beschleunigen]]<br />
[[es:Improve Pacman Performance]]<br />
[[fr:Ameliorer Pacman]]<br />
[[it:Improve Pacman Performance]]<br />
[[ja:Improve Pacman Performance]]<br />
[[ru:Improve Pacman Performance]]<br />
[[tr:Pacman_verimini_arttırmak]]<br />
[[zh-CN:Improve Pacman Performance]]<br />
[[zh-TW:Improve Pacman Performance]]<br />
== Improving database access speeds ==<br />
<br />
Pacman stores all package information in a collection of small files, one for each package. Improving database access speeds reduces the time taken in database-related tasks, e.g. searching packages and resolving package dependencies. The safest and easiest method is to run as root:<br />
<br />
# pacman-optimize && sync<br />
<br />
This will attempt to put all the small files together in one (physical) location on the hard disk so that the hard disk head does not have to move so much when accessing all the data. This method is safe, but is not foolproof: it depends on your filesystem, disk usage and empty space fragmentation. Another, more aggressive, option would be to first remove uninstalled packages from cache and to remove unused repositories before database optimization:<br />
<br />
# pacman -Sc && pacman-optimize<br />
<br />
For those who regularly optimize database place command in cron or use a [[systemd/Timers|systemd timer]] provided by the {{AUR|systemd-timer-pacman-optimize-git}} package.<br />
<br />
== Improving download speeds ==<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
Pacman's speed in downloading packages can be improved by using a different application to download packages instead of Pacman's built-in file downloader.<br />
<br />
In all cases, make sure you have the latest Pacman before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
=== Using Powerpill ===<br />
<br />
Powerpill is a full wrapper for Pacman that uses parallel and segmented downloads to speed up the download process. Normally Pacman will download one package at a time, waiting for it to complete before beginning the next download. Powerpill takes a different approach: it tries to download as many packages as possible at once.<br />
<br />
The [[Powerpill | Powerpill wiki page]] provides basic configuration and usage examples along with package and upstream links.<br />
<br />
=== Using wget ===<br />
<br />
This is also very handy if you need more powerful proxy settings than pacman's built-in capabilities. <br />
<br />
To use {{ic|wget}}, first install it with {{ic|pacman -S wget}} and then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget -c --passive-ftp -c %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
=== Using aria2 ===<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. [http://aria2.sourceforge.net/ aria2] allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in Pacman's XferCommand will '''not''' result in parallel downloads of multiple packages. Pacman invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see the [[Improve pacman performance#Using_Powerpill | powerpill]] section above.}}<br />
<br />
==== Installation ====<br />
<br />
Download and install {{Pkg|aria2}} and its dependencies:<br />
<br />
# pacman -S aria2<br />
<br />
==== Configuration ====<br />
<br />
Edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
{{bc|1=XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error -m2 -x2 --max-file-not-found=5 -k5M --no-conf -Rtrue --summary-interval=60 -t5 -d / -o %o %u}}<br />
<br />
==== Option Details ====<br />
<br />
; {{Ic|/usr/bin/aria2c}}: The full PATH to the aria2 executable.<br />
; {{Ic|1=--allow-overwrite=true}}: Restart download if a corresponding control file does not exist. (Default: false)<br />
; {{Ic|-c, --continue}}: Continue downloading a partially downloaded file if a corresponding control file exists.<br />
; {{Ic|1=--file-allocation=none}}: Do not pre-allocate file space before download begins. (Default: prealloc) <b><sup>1</sup></b><br />
; {{Ic|1=--log-level=error}}: Set log level to output errors only. (Default: debug)<br />
; {{Ic|1=-m2, --max-tries=2}}: Make 2 maximum attempts to download specified file(s) per mirror. (Default: 5)<br />
; {{Ic|1=-x2, --max-connection-per-server=2}}: Set a maximum of 2 connections to each mirror per file. (Default: 1)<br />
; {{Ic|1=--max-file-not-found=5}}: Force download to fail if a single byte is not received within 5 attempts. (Default: 0)<br />
; {{Ic|1=-k5M, --min-split-size=5M}}: Only split the file if the size is larger than 2;5MB = 10MB. (Default: 20M)<br />
; {{Ic|--no-conf}}: Disable loading an {{ic|aria2.conf}} file if it exists. (Default: {{ic|~/.aria2/aria2.conf}})<br />
; {{Ic|1=-Rtrue, --remote-time=true}}: Apply timestamps of the remote file(s) and apply them to the local file(s). (Default: false)<br />
; {{Ic|1=--summary-interval=60}}: Output download progress summary every 60 seconds. (Default: 60) <b><sup>2</sup></b><br />
; {{Ic|1=-t5, --timeout=5}}: Set a 5 second timeout per mirror after a connection is established. (Default: 60)<br />
; {{Ic|-d, --dir}}: The directory to store the downloaded file(s) as specified by [[pacman|pacman]].<br />
; {{Ic|-o, --out}}: The output file name(s) of the downloaded file(s). <br />
; {{Ic|%o}}: Variable which represents the local filename(s) as specified by pacman.<br />
; {{Ic|%u}}: Variable which represents the download URL as specified by pacman.<br />
<br />
==== Additional notes ====<br />
<br />
; <sup>1</sup> {{Ic|1=--file-allocation=falloc}}: Recommended for newer file systems such as ext4 (with extents support), btrfs or xfs as it allocates large files (GB) almost instantly. Do not use falloc with legacy file systems such as ext3 as prealloc consumes approximately the same amount of time as standard allocation would while locking the aria2 process from proceeding to download.<br />
<br />
; <sup>2</sup> {{Ic|1=--summary-interval=0}}: Supresses download progress summary output and may improve overall performance. Logs will continue to be output according to the value specified in the {{Ic|log-level}} option.<br />
<br />
; <sup>3</sup> {{Ic|1=<nowiki>XferCommand = /usr/bin/printf 'Downloading ' && echo %u | awk -F/ '{printf $NF}' && printf '...' && /usr/bin/aria2c -q --allow-overwrite=true -c --file-allocation=none --log-level=error -m2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=0 -t5 -d / -o %o %u && echo ' Complete!'</nowiki>}}: Using this XferCommand gives less useful, but much more readable, output.<br />
<br />
=== pacget (aria2) mirror script ===<br />
<br />
This script will greatly improve the download speed for broadband users. It uses the servers in {{ic|/etc/pacman.d/mirrorlist}} as mirrors in aria2. What happens is that aria2 downloads a single package from multiple servers simultaneously which gives a huge boost in download speed.<br />
<br />
{{Note|You have to put 'exec' before /usr/bin/pacget in the XferCommand. This is needed so that when you terminate pacget or aria2 (with process id used by pacget), pacman would also terminate. This would prevent inconvenience because Pacman would not persist downloading a file when you tell it not to.}}<br />
<br />
{{Warning|You may experience some problems if the mirrors used are out-of-sync or are simply not up-to-date. Just use the [[Reflector]] script to generate a list of up-to-date and ''fast'' mirrors. Also, ftp.archlinux.org resolves to two IPs. You may want to choose only one of them and hard code ftp.archlinux.org and the chosen IP address to {{ic|/etc/hosts}}.}}<br />
<br />
{{hc|/usr/bin/pacget|<nowiki><br />
#!/bin/bash<br />
<br />
msg() {<br />
echo ""<br />
echo -e " \033[1;34m->\033[1;0m \033[1;1m${1}\033[1;0m" >&2<br />
}<br />
<br />
error() {<br />
echo -e "\033[1;31m==> ERROR:\033[1;0m \033[1;1m$1\033[1;0m" >&2<br />
}<br />
<br />
CONF=/etc/pacget.conf<br />
STATS=/etc/pacget.stats<br />
ARIA2=$(which aria2c 2> /dev/null)<br />
<br />
# ----- do some checks first -----<br />
if [ ! -x "$ARIA2" ]; then<br />
error "aria2c was not found or isn't executable."<br />
exit 1<br />
fi<br />
<br />
if [ $# -ne 2 ]; then<br />
error "Incorrect number of arguments"<br />
exit 1<br />
fi<br />
<br />
filename=$(basename $1)<br />
server=${1%/$filename}<br />
arch=$(grep ^Architecture /etc/pacman.conf | cut -d '=' -f2 | sed 's/ //g')<br />
if [[ $arch = "auto" ]]; then<br />
arch=$(uname -m)<br />
fi<br />
# Determine which repo is being used<br />
repo=$(awk -F'/' '$(NF-2)~/^(community|core|extra|testing|comunity-testing|multilib)$/{print $(NF-2)}' <<< $server)<br />
[ -z $repo ] && repo="custom"<br />
<br />
# For db files, or when using a custom repo (which most likely doesn't have any mirror),<br />
# use only the URL passed by pacman; Otherwise, extract the list of servers (from the include file of the repo) to download from<br />
url=$1<br />
if ! [[ $filename = *.db || $repo = "custom" ]]; then<br />
mirrorlist=$(awk -F' *= *' '$0~"^\\["r"\\]",/Include *= */{l=$2} END{print l}' r=$repo /etc/pacman.conf)<br />
if [ -n mirrorlist ]; then<br />
num_conn=$(grep ^split $CONF | cut -d'=' -f2)<br />
url=$(sed -r '/^Server *= */!d; s/Server *= *//; s/\$repo'"/$repo/"'; s/\$arch'"/$arch/; s/$/\/$filename/" $mirrorlist | head -n $(($num_conn *2)) )<br />
fi<br />
fi<br />
<br />
msg "Downloading $filename"<br />
cd /var/cache/pacman/pkg/<br />
<br />
touch $STATS<br />
<br />
$ARIA2 --conf-path=$CONF --max-tries=1 --max-file-not-found=5 \<br />
--uri-selector=adaptive --server-stat-if=$STATS --server-stat-of=$STATS \<br />
--allow-overwrite=true --remote-time=true --log-level=error --summary-interval=0 \<br />
$url --out=${filename}.pacget && [ ! -f ${filename}.pacget.aria2 ] && mv ${filename}.pacget $2 && chmod 644 $2<br />
<br />
exit $?<br />
</nowiki>}}<br />
<br />
{{hc|/etc/pacget.conf|<nowiki><br />
# The log file<br />
log=/var/log/pacget.log<br />
# Number of servers to download from<br />
split=5<br />
# Minimum file size that justifies a split, i.e. concurrent download (default 20M)<br />
min-split-size=1M<br />
# Maximum download speed (0 = unrestricted)<br />
max-download-limit=0<br />
# Minimum download speed (0 = do not care)<br />
lowest-speed-limit=0<br />
# Server timeout period<br />
timeout=5<br />
# 'none' or 'falloc'<br />
file-allocation=none<br />
</nowiki>}}<br />
<br />
Save this script as /usr/bin/pacget.<br />
# chmod 755 /usr/bin/pacget<br />
This makes the script an executable<br />
<br />
In /etc/pacman.conf, in the [options] section, the following needs to be added:<br />
XferCommand = exec /usr/bin/pacget %u %o<br />
<br />
{{Note|If you use ftp.archlinux.org as the first server listed in your include files (/etc/pacman.d/*), some problems may occur when the mirrors you are using have not yet synced. To make great use of this script, choose a mirror (that syncs in a timely manner) that is more appropriate for you, then put that on top of the server lists. This is to prevent downloading only from ftp.archlinux.org when the mirrors have not yet synced. The rankmirrors script can be useful in this case.}}<br />
<br />
=== Using other applications ===<br />
<br />
There are other downloading applications that you can use with Pacman. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}<br />
<br />
== Choosing the fastest mirror ==<br />
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
== Sharing packages over your LAN ==<br />
<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you'll get into troubles.<br />
<br />
See [[Pacman tips#Network_shared_pacman_cache]].</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=336050User:Apg2014-09-19T01:05:58Z<p>Apg: add pacman 4.2 news draft</p>
<hr />
<div>= pacman TODO =<br />
<br />
== pacman v4.2 NEWS ==<br />
<br />
4.2.0 - pacman:<br />
- clear partial downloads from cache with -Sc (FS#34317)<br />
- die if '-' is given with empty stdin<br />
- exclude optdepends from --unrequired output unless passed twice<br />
- allow combining additional filters with -Qg<br />
- skip unknown groups with -Sl<br />
- return non-zero from -Sg if a group doesn't exist<br />
- only note backup file changes with -Qkk<br />
- warn on directory ownership differences with -Qkk<br />
- die on config errors in included files<br />
- add new version to -Qu output<br />
- do not run install scripts with --dbonly<br />
- die on invalid option combinations (FS#20950)<br />
- report packages with missing signatures<br />
- list keys in -Sii output<br />
- indicate ignored packages in -Qu output<br />
- check file type with -Qk<br />
- libalpm:<br />
- add alpm_fileconflict_free, alpm_depmissing_free, and<br />
alpm_conflict_free<br />
- repository names may not contain '/'<br />
- rename ALPM_EVENT_OPTDEP_REQUIRED to _OPTDEP_REMOVAL<br />
- require unique database names<br />
- log transaction events from the backend<br />
- log missing lock file<br />
- log beginning and end of transactions<br />
- add alpm_pkg_should_ignore<br />
- add alpm_decode_signature<br />
- add alpm_extract_keyid<br />
- add repository usage levels<br />
- allow inverting patters in NoExtract and NoUpgrade<br />
- use new question_t struct for question callback<br />
- removed support for replacing package-owned directories with<br />
symlinks and vice versa<br />
- use new event_t struct for event callback<br />
- add events ALPM_EVENT_RETRIEVE_{DONE,FAILED}<br />
- add events ALPM_EVENT_PKGDOWNLOAD_{START,DONE,FAILED}<br />
- add events ALPM_EVENT_{PACNEW,PACSAVE,PACORIG}_CREATED<br />
- makepkg:<br />
- add --noprepare option<br />
- stdin can no longer be used for the buildscript<br />
- require a package() function<br />
- add support for CARCH environment var (FS#35030)<br />
- install makedepends and checkdepends together (FS#31557)<br />
- allow make-style environment variable overrides<br />
- add sha224 checksum support (FS#36776)<br />
- add --cleanbuild option (FS#17175)<br />
- only remove static libraries if they have a shared version<br />
- support kernel.org's PGP signature scheme<br />
- add --noarchive option<br />
- remove --asroot option<br />
- treat signatures from untrusted keys as errors<br />
- add validpgpkeys<br />
- require buildscripts to be in $startdir (FS#40293)<br />
- add VCSCLIENTS<br />
- arch specific attributes<br />
- contrib:<br />
- add makepkg-template<br />
- pacdiff: add Quit option<br />
- pacdiff: add --nocolor option<br />
- pacdiff: add --find option<br />
- pacdiff: add --pacmandb option<br />
- pacdiff: add --output option<br />
- pacdiff: do not remove pacfile after viewing<br />
- pacdiff: allow DIFFPROF to contain commandline options<br />
- bacman: add --pacnew option to include unmodified .pacnew<br />
files<br />
- pacsearch: add color support<br />
- pacsearch: allow multiple search terms<br />
- pactree: remove provision information from linear output<br />
- paccache: read default cachedir from pacman.conf<br />
- pacman-key: stricter parsing for -verify<br />
<br />
<br />
== pacman v4.2 blockers ==<br />
<br />
* db upgrade script<br />
* fix/remove pacsysclean<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
Frequency = PerTransaction|PerPackage* (Optional, defaults to PerTransaction)<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* db upgrade script for symlink support removal<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=335924User:Apg2014-09-18T04:35:24Z<p>Apg: update hooks</p>
<hr />
<div>= pacman TODO =<br />
<br />
== pacman v4.2 blockers ==<br />
<br />
* db upgrade script<br />
* fix/remove pacsysclean<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
Requires = <PkgName> (Optional)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
Frequency = PerTransaction|PerPackage* (Optional, defaults to PerTransaction)<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* hooks must end with '.hook' (prevent confusion around pac{save,orig,new} files)<br />
* store hooks in /etc/pacman/hooks (easier to implement, can seamlessly switch to /etc, /usr/lib split later if needed)<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
* only run if all Requires packages are installed, prevents problems with modified/overidden hooks on package removal<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* db upgrade script for symlink support removal<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success</div>Apghttps://wiki.archlinux.org/index.php?title=User:Apg&diff=334926User:Apg2014-09-12T01:38:53Z<p>Apg: update hooks todo</p>
<hr />
<div>= pacman TODO =<br />
<br />
== pacman v4.2 blockers ==<br />
<br />
* db upgrade script<br />
* fix/remove pacsysclean<br />
<br />
== libalpm API ==<br />
<br />
* remove ignorepkg support from functions that don't modify the transaction<br />
** move alpm_find_group_packages to frontend<br />
* allow searching arbitrary package lists rather than databases<br />
* report memory errors from alpm_list_* functions<br />
<br />
== hooks ==<br />
<br />
=== format ===<br />
<br />
[Trigger] (multiple Trigger sections allowed)<br />
Operation = Install|Remove (Required)<br />
Type = File|Package (Required)<br />
Target = <Path|PkgName> (Required)<br />
<br />
[Action] (only one Action section allowed)<br />
When = PreTransaction|PostTransaction|PrePackage*|PostPackage* (Required)<br />
Exec = <Command> (Required)<br />
AbortOnFail* (Optional, PreTransaction only)<br />
Frequency = PerTransaction|PerPackage* (Optional, defaults to PerTransaction)<br />
<br />
* * may be omitted from initial implementation<br />
* Operation and Type may be merged (InstallFile|RemovePackage...)<br />
<br />
=== details ===<br />
<br />
* undefined run order (may add sorting mechanism later)<br />
* file paths are absolute (inside chroot)<br />
* PrePackage actions are run before pre_* scriptlets, PostPackage actions are run after post_* scriptlets<br />
<br />
See [[User:Allan/Pacman_Hooks]]<br />
<br />
=== TODO ===<br />
<br />
* commands run PerPackage receive the matched pkgname or file as the first argument (or possibly "%t" substitution)<br />
* command wordsplitting (wordexp?)<br />
* system hooks stored in /usr/lib/pacman/hooks<br />
* user hooks stored in /etc/pacman/hooks, override system hooks with same name<br />
* OR store all in /etc/pacman/hooks, use NoExtract/NoUpgrade to override<br />
* PerPackage actions triggered by both files and pkgnames can distinguish by the leading '/' for paths<br />
<br />
== pacman ui reorganization ==<br />
<br />
Some of pacman's options are organized by target (--query) while others are organized by action (--deptest). Organization by target results in a large number of unrelated operations being grouped together. Reorganizing operations by action will provide greater consistency, fewer invalid option combinations that must manually be checked for, and easier extensibility for things like combined add/remove transactions.<br />
<br />
-X install/upgrade/remove<br />
--install<br />
--pkgfile<br />
--remove<br />
--refresh, -y<br />
--sysupgrade, -u<br />
--print, -p<br />
--dryrun<br />
--nodeps, -d<br />
--downloadonly, -w<br />
--asdeps<br />
--asexplicit<br />
--ignore<br />
--ignoregrp<br />
-S search<br />
--local/--sync (show both by default)<br />
--group<br />
--foreign<br />
--native<br />
--owns-file<br />
--unrequired<br />
--required<br />
--explicit<br />
--depends<br />
--upgrades<br />
--satisfies (-T replacement)<br />
--info, -I <pkgname>...<br />
--local/--sync (show both by default)<br />
--short --search style output<br />
--verbose show extended information<br />
--files list files owned by <package><br />
--changelog<br />
--format expac-style output<br />
--check, -K [<pkgname>...]<br />
--recursive perform checks on package [opt-]depends<br />
--files basic file list verification (default)<br />
--depends check for missing dependencies<br />
--opt-depends check for missing optional dependencies<br />
--file-properties check file properties against MTREE data<br />
--backup include backup files in modification checks<br />
--database, -D<br />
--asdeps<br />
--asexplicit<br />
--version, -V<br />
--help, -h<br />
--groups, -G list groups<br />
--local/--sync (show both by default)<br />
-? clean cache (retire in favor of paccache?)<br />
<br />
== combined transactions ==<br />
<br />
TRANS_FLAG_NEEDED with sync?<br />
<br />
== miscellaneous ==<br />
<br />
* unit/integration tests<br />
* store md5/sha256 in local db for comparison to sync db pkgs<br />
* allow checking user/group names with -Qkk (requires modifications to libarchive)<br />
* db upgrade script for symlink support removal<br />
* libalpm man pages<br />
* clarify "skipping duplicate target" messages<br />
* githooks<br />
* check that fs file type matches old package filelist for conflict checks<br />
* document doxygen format<br />
* consolidate similar messages<br />
* use -fvisibility=hidden for clang<br />
* peculiar run_chroot arg0 strcpy's<br />
* dependency tree<br />
* sync, remove, etc. call graphs<br />
* translation context<br />
* add targets to conflicts if they need to be removed first<br />
* look at upgrade045.py<br />
* makepkg test suite<br />
* check all malloc's for success</div>Apg