Commit Graph

332 Commits

Author SHA1 Message Date
Gordian Edenhofer 52ec8dfffe bacman: handle SIGHUP, SIGINT, SIGTERM signals
Trap SIGHUP, SIGINT, SIGTERM and remove working directories accordingly.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Gordian Edenhofer 7568928e71 bacman: allow for multiple packages as arguments
To enable the creation of multiple packages with one command move the
assembly process into its own function.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Alastair Hughes 45b6a3074a Add missing newline in paclog-pkglist help output
Add missing newline in paclog-pkglist help output

Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:40:49 +10:00
Eli Schwartz 38e229e4db bash-completion: fix leaking "files" array into shell environment
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-03 20:38:13 +10:00
Florian Pritz 406c9b66b4 Document contrib/verify-pacman-repo-db.pl
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-30 20:08:34 +10:00
Florian Pritz 6c15cc4d22 contrib: Add documentation Makefile
Makefile.am is mostly copied from ./doc/Makefile.am

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-30 20:08:34 +10:00
Florian Pritz 6d8e3d2a91 contrib: Add verify-pacman-repo-db.pl
From the documentation:

verify-pacman-repo-db looks at a pacman repo database and verifies its
content with the actual package files. The database is expected to be in
the same directory as the packages (or symlinks to the packages).

The following properties are verified for each package in the database:

    - existence of the package file
    - file size
    - MD5 and SHA256 checksum (--checksum)

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-30 20:08:33 +10:00
Giulio Fidente 69aee3e391 Merge Giolio Fidente into "Pacman Development Team" contribution
As discussed on mailing list:
https://lists.archlinux.org/pipermail/pacman-dev/2016-July/021239.html

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-08-30 18:10:40 +10:00
Ashley Whetter b012da645e Add -m/--nocolor options to updpkgsums
Fixes FS#43346

Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-05-05 13:52:23 +10:00
Eric Engestrom 2694d17ad9 fix spelling mistakes
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-05-05 13:52:23 +10:00
Allan McRae 1a29744d0d makepkg: Remove upx and optipng support
These options were added before libmakepkg allowed passes like this to be
dropped in.  I prefer only real core packaging tasks to be included in
makepkg and additional things like this to be dropped in by a user or
distribution that wants to support them.

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-26 15:18:43 +10:00
Doug Newgard 252183b409 Bring makepkg zsh completions up to date
Signed-off-by: Doug Newgard <scimmia@archlinux.info>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20 14:01:52 +10:00
Daniel Wallace 9604570add Update zsh completion for pacman 5
also include updates from pacman 4.2

https://bugs.archlinux.org/task/47559

Original-patch-by: Boris Staletic <bstaletic@archlinux.net>
Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29 09:50:11 +10:00
Allan McRae 43a09d1663 bash_completion: update pacman completion
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29 09:50:09 +10:00
Allan McRae b65c7afc17 bash_completion: update makepkg completion
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-27 12:40:15 +10:00
Allan McRae 4742f5929d Update copyright years for 2016
make update-copyright OLD=2015 NEW=2016

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Daniel Hahler 8ca96447dd zsh_completion: add -q/--quiet for -Q/-S
This should also be added for "-Fh", but that is missing completely in
zsh_completion.

1: https://lists.archlinux.org/pipermail/pacman-dev/2015-November/020538.html

Signed-off-by: Daniel Hahler <git@thequod.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Alastair Hughes 6aee32102f Replace mktemp's --tmpdir option with shell code.
bacman and updpkgsums used GNU mktemp's --tmpdir option, which is not
supported by some other implementations (including busybox). Replace that with
shell code.

Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Evangelos Foutras 34bbe4cf7b pacdiff: do not require DIFFPROG for -o/--output
Signed-off-by: Evangelos Foutras <evangelos@foutrelis.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-28 22:57:24 +10:00
Mohammad Alsaleh 0fd6d354a6 zsh_completion: Handle --ignore/--ignoregroup correctly
Completion now works as expected with a comma-separated sequence.

Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-03 15:07:11 +10:00
Mohammad Alsaleh 4c5bf09eec zsh_completion: Add --asdeps/--asexplicit to -U options
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27 14:03:15 +10:00
Allan McRae 0ee1beca12 contrib/checkupdates: separate fakeroot call and command
Separating the fakeroot command and the pacman call with "--" prevents weird
interactions with some locales.  See FS#46405.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18 11:27:56 +10:00
Maxim Andersson 68602f4931 paccache: added --quiet option
Less output, although errors and warnings will still be printed
(scripts/library/output_format.sh).

Cleaner to have -q,--quiet than >/dev/null in cron.

Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:45:03 +10:00
Christian Hesse 9917930ae1 add option to optimize PNG images with optipng
This can decrease package size by optimizing PNG image size. Images are
just stored with better compression and/or filter options. The actual
image content is not altered.

Additionally this can automatically fix broken PNG images which caused
some trouble lately.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Allan McRae 2e48101999 Update copyright notices for 2015
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Allan McRae 54c630f6ec Merge branch 'maint' 2015-02-01 21:18:31 +10:00
Allan McRae 3b22183a4d contrib: remove fakeroot option from PKGBUILD.vim
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:12:45 +10:00
Jeffrey Tolar aa12a773b8 Add --noarchive to makepkg's zsh completion
Signed-off-by: Jeffrey Tolar <tolar.jeffrey@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:11:15 +10:00
Jeffrey Tolar 50de87e0e6 Remove --asroot from makepkg's completions
Signed-off-by: Jeffrey Tolar <tolar.jeffrey@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:11:06 +10:00
Andrew Gregory 926280cfc7 remove support for .pacorig files
Leave user files in place and save new config files with a .pacnew
extension.  This reduces the complexity of file extraction and respects
the principle that pacman shouldn't modify files it didn't create.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Allan McRae 77ca6e4062 Merge branch 'maint' 2015-01-11 18:57:54 +10:00
Dario Giovannetti e8d757b6ba paccache: exit in case of pacman error when -u flag is used
Fixes https://bugs.archlinux.org/task/43286

Signed-off-by: Dario Giovannetti <dariogiova@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11 18:57:19 +10:00
Allan McRae fafcbdeb8c Merge branch 'maint' 2015-01-02 21:43:56 +10:00
Dave Reisner ca5a2771ae updpkgsums: retain permissions on rewritten PKGBUILD
This could have been easy with something like chown's --reference flag,
but this is GNU specific. Instead, just truncate and rewrite the file.
Our exit trap cleans up after us.

Fixes: https://bugs.archlinux.org/task/43272

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02 21:43:28 +10:00
Evangelos Foutras eb7cc246c6 checkupdates: include package versions in output
Especially useful now that pacman -Qu will also show the new version.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras c9ca363431 checkupdates: show error when fakeroot is missing
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras d107aced37 paclist: fix myver in usage()
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-21 16:26:36 +10:00
Dave Reisner 565c931e2c updpkgsums: add more error checking before replacement
Re-add some paranoia which was inadvertently lost with 768b65e934. In
case 'makepkg -g' fails to generate new sums (e.g. when a remote
resource cannot be fetched), or awk fails to write the new file (i have
no idea when this would happen), bail out with an error.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 14:31:01 +10:00
Dave Reisner 768b65e934 updpkgsums: drop in-place rewrite hack, use a tempfile
This apparently exposes (what I think is) a subtle bug in cygwin's
handling of subst'd drives. Let's just drop the hackery and use a
tempfile, which should always work.

Also, introduce a proper die() function which replaces previous
hand-rolled error+exit pattern, but which wrote to stdout.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 16:36:18 +10:00
Allan McRae bb878217cd Remove pacsysclean
This script parsed pacman output and was broken by the change to the use
of appropriate units for package sizes.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-21 14:13:57 +10:00
Allan McRae c23ff87893 checkupdates: do not print ignored packages
FS#41223

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19 17:09:55 +10:00
Florian Pritz f77933ea1e Add --assume-installed to shell completion
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 13:46:23 +10:00
Dave Reisner de442b6867 bash_completion: add --noarchive to makepkg's completions
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 10:59:57 +10:00
Dave Reisner 167a598265 updpkgsums: avoid exec'ing awk, so the trap actually works
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 10:59:30 +10:00
Eric Schultz 566dc23357 Exit with 0/SUCCESS if there are no packages to remove
Previously the lack of candidate packages was considered an error
and return 1/FAILURE but really this isn't an issue. Also, for
systemd (and others) this flagged the instance as having failed
for no good reason.

Signed-off-by: Eric Schultz <eric@schultzter.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:10:29 +10:00
Dave Reisner 9d4d81783d paccache: avoid spurious blank line written to stderr
this is just stylistic formatting, so write it to stdout.

ref: https://bugs.archlinux.org/task/42389

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19 21:32:22 +10:00
Maxim Andersson 699937e94d paccache: parse_filename bug fix
Filenames got parsed wrongly, causing whitelist- and blacklist-checks to
always return false. Caused by 8122fae51a when full path names to pkgs
were introduced.

Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
2014-09-30 12:57:05 +10:00
Dave Reisner 235562a85e updpkgsums: update to recognize arch-specific sources
This change reveals a bootstrapping bug -- since we call the bare
"makepkg" and rely on PATH lookup, we might not have a makepkg which
can generate architecture-specific checksums.
2014-09-30 12:56:21 +10:00
Dave Reisner d9cf14ff1d updpkgsums: use a throwaway build dir
This prevents updpkgsums from potentially dirtying an otherwise pristine
directory (likely $PWD) when makepkg creates the srclinks.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-15 09:33:07 +10:00
Dave Reisner 38b6de937c paccache: read default cachedir from pacman.conf
Implements FS#40738.
2014-09-15 09:27:21 +10:00