asdil12 / aurbs Goto Github PK
View Code? Open in Web Editor NEWAUR Build System
AUR Build System
I can't build the AUR package python-path
because aurbs crash when it tries to build it:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 406, in <module>
res = check_pkg(pkg, arch, args.force or args.forceall)
File "/usr/bin/aurbs", line 236, in check_pkg
ver_local = by_name(pkg_build['linkdepends'], dep)['version']
File "/usr/lib/python3.6/site-packages/aurbs/helper.py", line 48, in by_name
return filter(lambda i: i['name'] == name, dictlist).__next__()
StopIteration
If you add a package which is based on a package base f. e. bareos it wil not build:
> aurbs
[2017-05-15 09:52:28] INFO: Building for architecture x86_64
[2017-05-15 09:52:28] INFO: Updating x86_64 build root
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
aurstaging is up to date
:: Starting full system upgrade...
there is nothing to do
[2017-05-15 09:52:33] WARNING: AUR-PKG 'bareos-common' not found in local db --> syncing
[2017-05-15 09:52:33] INFO: Falling back to legacy PKGBUILD parser for pkg 'bareos-common'
Traceback (most recent call last):
File "/usr/bin/aurbs", line 221, in check_pkg
pkg_local = db.get_pkg(pkgname)
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 48, in get_pkg
raise KeyError("Package '%s' not found in database" % pkgname)
KeyError: "Package 'bareos-common' not found in database"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 228, in check_pkg
raise PKGSyncNeeded()
aurbs.model.PKGSyncNeeded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 395, in <module>
res = check_pkg(pkg, arch, args.force or args.forceall)
File "/usr/bin/aurbs", line 236, in check_pkg
db.sync_pkg(pkgname)
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 68, in sync_pkg
pkgbuild = pkg_parser.parseFile(tar.extractfile('%s/PKGBUILD' % pkgname))
File "/usr/lib/python3.6/tarfile.py", line 2073, in extractfile
tarinfo = self.getmember(member)
File "/usr/lib/python3.6/tarfile.py", line 1749, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename 'bareos-common/PKGBUILD' not found"
This appears to be high enough quality to be published on PyPI.
The name is still available, and should be reserved. https://pypi.org/project/aurbs/
Is there a reason to run rsync? Can this be made optional? E.g. if no url is given, the step is omitted?
Currently there is no authentification needed to access the db.
When installed from AUR Package and running, I get ERROR: Fatal Error: Database requires authentification
, have changed nothing and happens on a fresh arch install.
EDIT: Installing mongodb fixed it, that should be added to dependencies or optional dependencies, or even mentioned in the README.
Also there's a "sudo prompt" that's showing the password, and not continuing
(And yes running as sudo/root bypasses the sudo prompt, but that should be fixed)
File "/usr/bin/aurbs", line 351, in
db.cleanup_orphaned()
File "/usr/lib/python3.7/site-packages/aurbs/db.py", line 256, in cleanup_orphaned
if pkg['name'] not in AurBSConfig().aurpkgs:
TypeError: argument of type 'NoneType' is not iterable
Stay in batch_mode
, even if the -a
flag is defined.
You said that the error was fixed but I still get the error about not finding the package:
[2018-05-27 16:55:24] WARNING: AUR-PKG 'bareos-common' not found in local db --> syncing
[2018-05-27 16:55:25] INFO: Falling back to legacy PKGBUILD parser for pkg 'bareos-common'
[2018-05-27 16:55:25] DEBUG: Stop serving '/var/lib/aurbs/aurstaging/' at port 8024
Traceback (most recent call last):
File "/usr/bin/aurbs", line 308, in sync_pkg
pkg_local = db.get_pkg(pkgname)
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 48, in get_pkg
raise KeyError("Package '%s' not found in database" % pkgname)
KeyError: "Package 'bareos-common' not found in database"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 315, in sync_pkg
raise PKGSyncNeeded()
aurbs.model.PKGSyncNeeded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 404, in <module>
sync_pkg(pkg, args.forcesync)
File "/usr/bin/aurbs", line 326, in sync_pkg
db.sync_pkg(pkgname)
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 88, in sync_pkg
pkgbuild = pkg_parser.parseFile(tar.extractfile('%s/PKGBUILD' % pkgname))
File "/usr/lib/python3.6/tarfile.py", line 2074, in extractfile
tarinfo = self.getmember(member)
File "/usr/lib/python3.6/tarfile.py", line 1750, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename 'bareos-common/PKGBUILD' not found"
PS: I ran aurbs twice like you said.
I tried to build bareos by adding only the package bareos-common
to the build list but I found that the build blocked because AurBS didn't find the package mtx
required by bareos-storage-tape
:
[2018-05-30 13:30:24] WARNING: No build for AUR-PKG 'bareos-common' --> building
[2018-05-30 13:30:24] ERROR: Dependency 'mtx' for 'bareos-common' not found! Build blocked.
I think it's because the package doesn't exist but is provided by another package: mtx-svn
@asdil12 Do you have a fix for this error?
The info is in available via the aur.get_pkg()
result.
SFTP is the only synchronize method, it could be great to add FTP to synchronize on a shared hosting that doesn't provide SFTP for example.
Make the aurstaging repo available in the chroot using a ro-bind (pacman supports file:/// urls).
Then we can drop the internal webserver.
This needs https://mailman.archlinux.org/pipermail/arch-projects/2013-August/003871.html to be merged, first.
Provide a way to cleanup pkg's that are not in the pkg-db from the repo.
eg. if a pkg was moved to community
Adding each pkg (once for each arch) takes a lot of time. It would be better to reuse the aurstaging repo-db.
When building a pkg and some dep has to be built first, the webui will still show the first pkg as building, while aurbs is actually building the dep.
When something fails with makechrootpkg, only the following is printed out:
WARNING: Error: Command '['makechrootpkg', '-cu', '-l', 'build', '-d', '/var/cache/aurbs/ccache/x86_64:/build/.ccache', '-d', '/var/cache/aurbs/.gnupg:/build/.gnupg', '-r', '/var/lib/aurbs/chroot/x86_64', '--', '--noprogressbar']' returned non-zero exit status 65280
The actual error is written to os.path.join(build_dir_pkg, "makepkg.log"). Unfortunately, this file gets deleted after the build fails.
The MongoDB could prevent all the mess with the different json files, while it (should) perform better.
Without ccache installed, makechrootpkg exits with an error. After pacman -S ccache, aurbs builds the package(s). Can you add this in the readme?
PS: I have just came across this tool. It looks great! ๐
Did you set _external=True for the build links intentionally (here)?
EDIT: I deleted this argument. Now, I can donwload the package from outside my network.
Handle pkgs with
maintainer: None
in the ui.
Decide, if any arch pkgs need a rebuild, if a remote dependency got updated.
After updating using make install
to the 2.0.0 version I get this error while running aurbs
:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
downloading aurstaging.db...
aurstaging is up to date
:: Starting full system upgrade...
there is nothing to do
[2018-05-26 21:44:20] WARNING: No build for AUR-PKG 'package-query' --> building
Traceback (most recent call last):
File "/usr/bin/aurbs", line 397, in <module>
res = check_pkg(pkg, arch, args.force or args.forceall)
File "/usr/bin/aurbs", line 253, in check_pkg
remote_deps = db.filter_dependencies([pkg_local['depends']], local=False)
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 270, in filter_dependencies
pkgs.union(self.get_all_provides())
File "/usr/lib/python3.6/site-packages/aurbs/db.py", line 67, in get_all_provides
provides.union(pkg['provides'])
KeyError: 'provides'
How can I fix it?
External dependency versions may change, while the build is running.
The least bad outcome is an incorrect info in the build db entry. But a build fail could also appear.
I came across a couple of packages which cannot be build
For facette I get the following error:
[2015-05-31 17:39:36] WARNING: AUR-PKG 'facette' not found in local db --> syncing
[2015-05-31 17:39:36] DEBUG: Stop serving '/var/lib/aurbs/aurstaging/' at port 8024
Traceback (most recent call last):
File "/usr/bin/aurbs", line 221, in check_pkg
pkg_local = db.get_pkg(pkgname)
File "/usr/lib/python3.4/site-packages/aurbs/db.py", line 48, in get_pkg
raise KeyError("Package '%s' not found in database" % pkgname)
KeyError: "Package 'facette' not found in database"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 228, in check_pkg
raise PKGSyncNeeded()
aurbs.model.PKGSyncNeeded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/aurbs", line 395, in <module>
res = check_pkg(pkg, arch, args.force or args.forceall)
File "/usr/bin/aurbs", line 236, in check_pkg
db.sync_pkg(pkgname)
File "/usr/lib/python3.4/site-packages/aurbs/db.py", line 77, in sync_pkg
pkg['arch'] = srcinfo['arch']
KeyError: 'arch'
I added energia. The package is build by aurbs and shown on the web interface under packages. However, pacman cannot find it.
Usage example:
import os
import pyalpm
from pycman.config import PacmanConfig
class RemoteDB(object):
def __init__(self, root='/'):
self.root = root
pc = PacmanConfig(conf=self._rp('/etc/pacman.conf'))
# Add root path prefix, as alpm seems to expect absolute paths
for option in ['RootDir', 'DBPath', 'GPGDir', 'LogFile']:
pc.options[option] = self._rp(pc.options[option])
self.handle = pc.initialize_alpm()
def _rp(self, path):
"""
Add the root prefix to a path
"""
return os.path.join(self.root, path.lstrip('/'))
def get_pkg(self, pkgname):
"""
Get a pkg, which provides pkgname
"""
dbs = self.handle.get_syncdbs()
for db in dbs:
pkg = pyalpm.find_satisfier(db.pkgcache, pkgname)
if pkg is not None:
return pkg
To avoid breaking cached pkgs (with same name but other md5sum) and to force updating to newer builds (eg when a new rebuilt is done against libboost)
the buildsystem must increase the pkgrel.
When the aur package version (this includes the aur package rel) changes (is increased), our rel is set to 1 again.
The way to do that depends on the possibility to use dots in the pkgrel:
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.