kitsunyan / pakku Goto Github PK
View Code? Open in Web Editor NEWPacman wrapper with AUR support
License: GNU General Public License v3.0
Pacman wrapper with AUR support
License: GNU General Public License v3.0
Trying to build latest stable version, getting following error:
GEN: completion/bash
GEN: completion/zsh
NIM: lib/bisect
CC: bisect
CC: stdlib_system
CC: stdlib_future
CC: stdlib_os
CC: stdlib_osproc
CC: stdlib_re
CC: stdlib_strutils
CC: stdlib_macros
CC: stdlib_parseutils
CC: stdlib_math
CC: stdlib_algorithm
CC: stdlib_times
CC: stdlib_posix
CC: stdlib_ospaths
CC: stdlib_strtabs
CC: stdlib_hashes
CC: stdlib_streams
CC: stdlib_cpuinfo
CC: stdlib_linux
CC: stdlib_pcre
CC: stdlib_rtarrays
NIM: lib/install
CC: install
CC: stdlib_system
CC: stdlib_future
CC: stdlib_os
CC: stdlib_posix
CC: stdlib_sequtils
CC: stdlib_strutils
CC: stdlib_macros
CC: stdlib_parseutils
CC: stdlib_math
CC: stdlib_algorithm
CC: stdlib_times
CC: stdlib_ospaths
NIM: src/pakku
utils.nim(130, 24) Error: cannot evaluate at compile time: SIGINT
make: *** [Makefile:130: src/pakku] Error 1
Hello.
I'm not quite sure if problem is in pakku.
But it seems like it has some mistake in dependency processing.
I've tried to install samsung-unified-driver from aur, but pakku didn't deal with it due to unresolved dependency.
pakku couldn't find samsung-unified-driver-common package, even though it is listed as a dependency for samsung-unified-driver.
After I explicitly specified two packages to install everything went fine:
pakku -S samsung-unified-driver samsung-unified-driver-common
I hope my information would be helpful to you.
After #50 got solved I tried to install the new version. But I can't build pakku from sources:
[peter /tmp ] 1653 $ git clone https://github.com/kitsunyan/pakku.git
Cloning into 'pakku'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 852 (delta 38), reused 43 (delta 30), pack-reused 778
Receiving objects: 100% (852/852), 241.02 KiB | 839.00 KiB/s, done.
Resolving deltas: 100% (608/608), done.
[peter /tmp ] 1655 $ cd pakku
[peter /tmp/pakku (master) ✓ ] 1656 $ git checkout v0.14
Note: switching to 'v0.14'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8c75dc9 Release 0.14
[peter /tmp/pakku ((HEAD detached at v0.14)) ✓ ] 1657 $ ls
completion/ doc/ lib/ src/ COPYING Makefile pakku.conf README.md
[peter /tmp/pakku ((HEAD detached at v0.14)) ✓ ] 1658 $ make
GEN: completion/bash
GEN: completion/zsh
NIM: lib/tools
CC: stdlib_assertions.nim
CC: stdlib_io.nim
CC: stdlib_system.nim
CC: stdlib_parseutils.nim
CC: stdlib_strutils.nim
CC: stdlib_pathnorm.nim
CC: stdlib_posix.nim
CC: stdlib_times.nim
CC: stdlib_os.nim
CC: stdlib_strtabs.nim
CC: stdlib_streams.nim
CC: stdlib_osproc.nim
CC: bisect.nim
CC: stdlib_sequtils.nim
CC: install.nim
CC: tools.nim
NIM: src/pakku
/tmp/pakku/src/utils.nim(214, 23) Warning: use `csize_t` instead; csize is deprecated [Deprecated]
/tmp/pakku/src/args.nim(108, 15) Error: undeclared identifier: 'lc'
make: *** [Makefile:120: src/pakku] Error 1
i choose not to use sudo. But pakku requires it:
% pakku -S compton-conf
:: Resolving build targets...
checking AUR database...
(1/1) cloning repositories 00:00 [################################] 100%
resolving dependencies...
Packages (1) compton-conf-0.14.1-1
:: Proceed with building? [Y/n]
downloading comments from AUR...
:: View and edit compton-conf/PKGBUILD? [Y/n/s/a/?]
:: Enter editor executable name:
:: Import PGP key 7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3? [Y/n/c/a/?]
:: Installing build dependencies...
[sudo] password for johny:
johny is not in the sudoers file. This incident will be reported.
Please remove sudo requirement.
thx
Is there a possibility to permanently disable a View and edit XXX/PKGBUILD? [Y/n/s/a/?] dialog?
If you wait too long to input password (like if you forget about long and big package) it will delete it for some reason...:
:: Continue installing? [Y/n] y
[sudo] password for pvan:
loading packages...
error: '/storage/tmp-pakku/quartus-free-18.1.0.625-1-x86_64.pkg.tar.xz': could not find or read package
warning: packages are saved to '/storage/tmp-pakku'
Using pakku 0.12-3.
mrvik@mrvik~% pakku -V
advertencia: la opción --root está obsoleta; a partir de ahora es --sysroot
Pakku v0.12
Copyright (C) 2018 kitsunyan
.--. Pacman v5.1.0 - libalpm v11.0.0
/ _.-' .-. .-. .-. Copyright (C) 2006-2018 Pacman Development Team
\ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet
'--'
Este programa puede distribuirse libremente bajo
los términos de la licencia GNU General Public License
The first line appears in every command where pakku
runs pacman
An option similar to cower -u
cower
-u, --update
Check foreign packages for updates in the AUR. Without any arguments, all manually installed packages will be checked. If targets are supplied, only those targets will be checked. cower will exit with a non-zero status if and only if updates are available.
This prints all upgradable aur packages in separate lines.
This behaviour seems inconsistent. The pacman manpage documents the -s
behaviour as such:
-s, --search <regexp>
Search each locally-installed package for names or descriptions that match regexp. When including multiple search terms, only packages with descriptions matching ALL of those terms are returned.
One possible solution to this is to make pakku search from the AUR by looking at both names and descriptions. This is done in PR #32.
Not sure why (is used to work, and pakku's code did not change) but for a week or so runnig pakku -Suy now results in an error message and lots of warnings.
Error: failed to parse server response
Warnings: ... was not found in AUR.
The ... stands for many packages that actually are in AUR but also in my personal repo. Is this only on my side?
$ pakku -Sw st-pa<tab-completion>
warning: option --root is deprecated; use --sysroot instead
error: target not found: st-patched-git
Hi! A lot of thanks for this good job. I've written a (very basic) GTK frontend. It's available as pakku-gui on GitLab and now on the AUR. I thought you may like to know it.
Thanks again for keeping this fabolous software.
Be aware of this.
pakku is currently not able to install clion-lldb
. see:
[jonny@jonny-arch-pc ~]$ pakku -S clion-lldb
:: Checking AUR database...
downloading full package descriptions...
resolving dependencies...
error: unable to satisfy dependency '' required by clion-lldb
I think your helper has the potential to become the best out here in terms of performance and compatibility with pacman as Nim can easily align to or even adapt C routines if required. Sure some extra features like trizen -C
to read AUR comments would be a welcome extra.
The most essential omission currently is absence of Out of Date line in package info, preferably with color, according to pacman.conf (most compatible, as pacaur) or separate settings (in pakku.conf).
IMO the best out-of-date implementation as the reference (with Color and VerbosePkgLists enabled) has pacaur, for instance see currently outdated pacaur -Si visual-studio-code-insiders
It's incredibly frustrating to spend five minutes cloning git repositories, 10-20 tweaking PKGBUILDs, and another 30 or more building... only to have a failed build undo EVERYTHING.
I can understand why you might not want to cache things by default, but for -Su to be useful (especially for people who sometimes go a couple weeks or more between invocations), pakku really needs to support either caching or the ability to continue updating other packages after a build fails, skipping just the fail package and those dependent on it.
Title says it all really. Checking the pacman package I can see that libalpm has updated to v12:
$ pacman -Ql pacman | grep libalpm.so
pacman /usr/lib/libalpm.so
pacman /usr/lib/libalpm.so.12
pacman /usr/lib/libalpm.so.12.0.0
Would it be possible to remove one of the redundant "Continue installing? [Y/n]" / "Proceed with installation? [Y/n]" questions, or make it configurable via /etc/pakku.conf
? Maybe even both since we already answered "Proceed with building? [Y/n]"?
...
==> Leaving fakeroot environment.
==> Finished making: pakku 0.12-3
:: Continue installing? [Y/n]
loading packages...
warning: pakku-0.12-3 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) pakku-0.12-3
Total Installed Size: 0,71 MiB
Net Upgrade Size: -0,05 MiB
:: Proceed with installation? [Y/n]
...
With 864cc03, does pakku
still need a Red entry in the wiki table for "Clean build"?
I am migrating from yaourt and was checking pakku functinality for the operations I am performing frequently. Using yaourt I was periodically running something like
yaourt -Su --devel
which will rebuild the developmental packages only (with sources from VCS, their names end with -git
, -hg
, -bzr
, -svn
. All other AUR packages are remain untouch. Since such packages rarely get version change in PKGBUILD in AUR, they are not updated by standard update procedure. To handle this, yaourt with --devel
flag specified was fetching PKGBUILDs for them, checking pkgver()
(which was updated according to the VCS revision) and install the updated version, if it is never, than already installed.
Are there any way to perform same kind of action using pakku?
nimble install pakku
As per title, either by default on -Ss
and -Qs
searches or as an option in config file.
See pacaur -Ss telegram
as a functional reference.
After successfully building on RPi3, any pacman -Ss packge
search would fail with the message in this ticket title.
Others packages seems to work fine, including yaourt
and yay
.
Please let me know if you need any other detail, thanks.
$ pakku -Ss steam-cli-
aur/steam-cli-git 0.r27.b7583dc-1 [0 / 0.000000]
fatal.nim(39) sysFatal
Error: unhandled exception: index out of bounds, the container is empty [IndexError]
$ echo $?
1
This package in the AUR has a 0 length description. It causes pakku to crash here: https://github.com/kitsunyan/pakku/blob/master/src/format.nim#L152
I tested a change off of version 0.14 where I just didn't print anything if the description is empty:
if len(description) > 0:
let lines = description.get("").splitLines(getWindowSize().width - padding)
for line in lines:
echo(' '.repeat(padding), line)
output after change:
$ ./pakku -Ss steam-cli-
aur/steam-cli-git 0.r27.b7583dc-1 [0 / 0.000000]
$ echo $?
0
I didn't do any searching for other areas where an empty string would cause issues, and as I don't know nim in the slightest, there is probably a more elegant solution.
If someone adds or removes in depends array pakku doesn't reflect accordingly. I know this is how it designed.
I had problems with mpv-git. I had vulkan-icd-loader
installed but not vulkan-headers
. PKGBUILD reconfigured depends and makedepends. Is there a way to avoid such cases.
Everytime I try to build pakku, either from Git or from Aur, I get the following error:
GEN: completion/bash
1 out of 4 hunks FAILED
make: *** [Makefile:90: completion/bash] Error 1
==> ERROR: A failure occurred in build().
Aborting...
Error making: pakku
Document Install Instructions on the README.
Would it be possible to add a option in /etc/pakku.conf
to always remove build dependencies, if they were installed beforehand.
Hey!
Welcome to the AUR helper business! :)
Here are a few well known packages, which may be used to validate the function of your helper, which are known to cause problems. Regarding the first two packages: opinions about whether an aur helper should be capable of installing those, or not, differ strongly, so may you decide that for your helper by yourself, but it is nevertheless nice to know about those.
mingw-w64-gcc
- see: polygamma/aurman#17 problem and solution are being discussed over thereros-indigo-desktop-full
- see: https://github.com/actionless/pikaur/issues/53 or description of aurman dep solving which describes a way of fetching needed information about aur packages, so that enough information becomes available and hence allows installing of that packageros-lunar-desktop
- long dep chain, but all in all it is possible to installclion
, clion-lldb
etc. to check split package support - notice: clion-lldb
requires also ncurses5-compat-libs
, the other parts of that split package do notplasma-git-meta
- not possible to install, but it is nice to test the output of your helper to describe the problems which occurred. currently your helper points out the following 2 problems:
discover-git
not fulfillableoxygen-git
not fulfillablethat is correct, but there is one more unsolvable problem: botan-1.10
which is a dep of qca-qt5-git
way: plasma-git-meta
to plasma-nm-git
to qca-qt5-git
it would be nice to also display that problem
It would be nice if the repositories in ~/.cache/pakku/repositories/
would be removed with pakku -Sc
if the package is not installed anymore.
Thanks. 😊
$ pakku -Su
:: Resolving build targets...
checking AUR database...
(2/2) cloning repositories 00:00 [######################################################################] 100%
:: Starting full system upgrade...
warning: nemo: ignoring package upgrade (3.6.5-1 => 3.8.2-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: aurman: installing pacman (5.1.0-1) breaks dependency 'pacman<5.1'
$ pakku -Si aurman| grep Depends
Depends On : python expac python-requests pacman sudo git python-regex pacman>=5.1
Hello, amazing project (and the fact that it's written in Nim is even more amazing!) :)
I have a question - why did you wrap libcurl instead of using Nim's httpclient
stdlib module? It only depends on sockets and openssl (for SSL)
Maybe add one to the README?
Thanks for your awesome work!
Not sure if this is an issue or not, but it appears pakku scheduled itself for removal right after upgrading:
(4/4) upgrading pakku [########################################################################################] 100%
:: Running post-transaction hooks...
(1/4) Updating icon theme caches...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Updating the desktop file MIME type cache...
(4/4) Updating the MIME type database...
:: Removing build dependencies...
checking dependencies...
Packages (1) pakku-0.7-1
Total Removed Size: 0.55 MiB
:: Do you want to remove these packages? [Y/n]
0.7-1 was also the version I was trying to upgrade to.
I don't know where to look for extended logs but I'll happily hastebin them if you tell me?
Every time I try to build anything from the AUR, pakku gives up as soon as I finish all the "view and edit" prompts with User defined signal 1
:
[stuart@stushiba Downloads]$ pakku -S yay
:: Resolving build targets...
checking AUR database...
(1/1) cloning repositories 00:00 [##################################################################] 100%
resolving dependencies...
Packages (1) yay-8.1157.0-1
:: Proceed with building? [Y/n] y
downloading comments from AUR...
:: View and edit yay/PKGBUILD? [Y/n/s/a/?] s
User defined signal 1
e.g. pakku -S cower-git cower
does not warn about trying to install conflicting packages.
You just reach a point during installation like:
warning: removing 'cower' from target list because it conflicts with 'cower-git'
pakku should not even try to install those packages imho.
It seems that pakku is using SUDO_UID
to determine the user. However this fails in a scenario where I am using sudo to change to a non-root user outside pakku. Consider the following case:
user1@localhost$ sudo -iu user2
user2@localhost$ pakku -S pakku
It seems that pakku tries to access ~user1
with user2. I would expect it to use ~user2
instead. The fact that I was user1 earlier should not affect the programs I run in the shell of user2 in any way.
Compiling pakku using nim-git currently fails. Merely because "future" module was renamed to "sugar" and "SystemError" was replaced by "CatchableError".
I therefore suggest to have a branch targeting to upcoming nim version, if you do not have one already.
I have this patch,
new_nim.txt
but the build still fails.
NIM: src/pakku
utils.nim(346, 29) Error: type mismatch: got
but expected one of:
proc toHex(x: BiggestInt; len: Positive): string
proc toHex[T: SomeInteger](x: T): string
proc toHex(s: string): string
expression: toHex
make: *** [Makefile:123: src/pakku] Error 1
I've noticed that pakku prompts about ignored packages to add them to the transaction. It's an interesting feature, but the default option (in my opinion) would be no
. However, it's not critical, but if a package is ignored, the expected behaviour is to ignore it always also the aur helper.
Here is the output of pakku (some lines were omitted)
> LANG=C pakku -Syu $(pacman -Qqs git |grep -P '^..*git$') --noconfirm --ignore ipxe-git
:: Synchronizing package databases...
:: Resolving build targets...
:: ipxe-git is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]
:: Starting full system upgrade...
there is nothing to do
:: Resolving build targets...
resolving dependencies...
:: Proceed with building? [Y/n]
I'm trying to switch from yaourt
, but I miss the -C
feature that lets me quickly clean up any *.pacnew
, etc, files.
This follows-up comment in #49 (comment)
Hi! Thanks for your patch.
Sorry, neither I have time nor motivation to maintain my projects right now. I didn't even update my arch linux system for about 3 months. So fixing this problem took this much time.
If you are looking for a new maintainer, you can create a "pakku" organization and add people with "write" rights to pakku
. I am not proposing myself as a main maintainer but as a full-time Nim dev I can do quick fixes and review the PRs.
To find maintainers, AFAIK a lot of people in the Arch community are using pakku and similarly a lot of people in the Nim community are using Arch and a couple are also using pakku like @juancarlospaco.
Additionally, so that the Nim team can gives you a heads up (like for #36) or plain avoid breaking pakku, it can be added to Nim's important packages so that pakku is part of Nim anti-regression suite, cc @narimiran, cc @Araq. This would require a test that we can run (i.e. is just compiling main.nim enough?)
I set TmpDir = ~/.cache/pakku
. Now whenever I build and install from aur this directory vanishes. I kind of need these files. This helps me quickly install previous version of a package. Or review the changes that I made in the previous pkgbuild.
I'd very much like if the files are not permanently deleted after each build.
IF POSSIBLE:
I propose you create another variable eg preserveDir
which when non-empty moves the successfully build package-folder to the directory. When empty files will be deleted.
This can help faster building in ram-disk, also depending on user choice when/if needed files will be there.
Code no longer builds with Nim 1.0.2, complaining:
"Error: undeclared identifier: 'SystemError'."
According to the changelog (https://github.com/nim-lang/Nim/blob/6e83746caabca00ab2b97a81bd732de4588996fe/changelog.md), SystemError is now CatchableError: "The exception hierarchy was slightly reworked, SystemError was renamed to CatchableError and is the new base class for any exception that is guaranteed to be catchable. This change should have minimal impact on most existing Nim code."
Make install should strip binary:
$ du -h /usr/local/bin/pakku
860K /usr/local/bin/pakku
$ sudo strip --strip-all /usr/local/bin/pakku
$ du -h /usr/local/bin/pakku
630K /usr/local/bin/pakku
Same with other binaries if any.
What about supporting customizepkg?
It is a nice tool to let you automtize changing PKGBUILDs on the fly. It is usefull for some circumstance, e.g. if you want another download mirror as the AUR default provides ore change default configure options.
In fact there are several flavours of customizepkg in the AUR, but they all use the same interface to the user or to aur helpers.
nim-0.19.0-1 is now in community-testing (Arch Linux)
This is what comes up when attempting to build either pakku or pakku-git:
GEN: doc/pakku.conf.5
tools.nim(1, 8) Error: cannot open file: os
make: *** [Makefile:117: lib/tools] Error 1
make: *** Waiting for unfinished jobs....
main.nim(2, 3) Error: cannot open file: future
make: *** [Makefile:123: src/pakku] Error 1
==> ERROR: A failure occurred in build().
Aborting...
error: failed to build 'pakku'
This package has a dependency java-runtime>=8
and it installs as expected: https://aur.archlinux.org/packages/minecraft/
This package has a dependency java-runtime=8
and pakku complains that it cannot find the literal package java-runtime=8
and does not attempt to find a package that provides java-runtime=8
as it does with the similar package in the previous: https://aur.archlinux.org/packages/minecraft-launcher
If I define ignored packages in /etc/pacman.conf
IgnorePkg = pkgname
it works for repo pkgs but not for AUR pkgs.
yay does not upgrade them but pakku offers to build any AUR pkg including these with a y/n option.
pakku -Syu --ignore aurpkg1 --ignore aurpkg2
does work as expected though, so that can be used.
You can cleanup non-installed official packages with pakku -Sc
but there is no way to do the same with packages from AUR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.