-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configuration files (and multi local repositories) #36
base: main
Are you sure you want to change the base?
Conversation
if [ -n "$vcs_pkgs" ]; then | ||
echo "Checking $(echo "$vcs_pkgs" | wc -l) VCS packages matching $(yellow "$AURVCS") for updates..." >&2 | ||
# init vcs sync cache | ||
sudo -u "$user" \ | ||
aur sync "$vcs_pkgs" \ | ||
--no-ver-shallow --print >/dev/null 2>&1 # TODO --no-ver-shallow: can't find info regarding this | ||
|
||
mapfile -t git_outdated < <(sudo -u "$user" aur vercmp-devel --database="${cfg[database_name]}" --root="${cfg[database_dir]}" | cut -d: -f1) # TODO vercmp-devel: can't find info regarding this | ||
if [ ${#git_outdated[@]} -gt 0 ]; then | ||
sudo -u "$user" aurto "${cfg[database_name]}" remove "${git_outdated[@]}" | ||
sudo -u "$user" aurto "${cfg[database_name]}" add "${git_outdated[@]}" | ||
else | ||
echo " VCS packages up to date $(green ✓)" >&2 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here: I don't understand what you are trying to do. Can you please help me make this clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is checking *-git
packages for updates, which happens once daily triggered by the check-vcs
file generated by check-aurto-git-trigger.timer
.
The "init vsc sync cache" bit ensures the .cache/aurutils/sync/
cache exists for the vcs packages (aurto generally kills this cache regularly to save space).
aur vercmp-devel
will then list outdated VCS packages which are rebuild into the aurto repo by removing and re-adding them. It looks like this will change in aurutils 3.0, I'll figure something out then I guess.
Thanks for the pr! There are some good ideas you're working towards here. However, I don't really consider multiple repos or archs in scope for aurto. That's because my vision for aurto is a simple and opinionated utility that doesn't try to solve 100% of use cases. If extra functionality was optional, so didn't affect 90% of users at all that would be more acceptable. But then, even if that could be designed, I'd start wondering if the code complexity is really too much to be written in untested bash. If aurto was to take on more complexity I'd probably look to moving those bits to a more appropriate language, like I did with trust-check. Maybe it's worth moving the whole project into rust? I can sympathise & imagine that you may not agree with me here. In which case, of course, you are very welcome to fork the current code and morph it to fit your needs. For my branch I'd currently say
|
Thanks for reading this! Let me try one more time to show you how this could be usefull yet keeping the simplicity you want for aurto. I think aur lacks good enough software to manage from simple use cases to more complex ones. I liked aurto because it uses aurutils which seems to be solid enough regarding aur building proccess but, again, not simple enough as aurto so one can easily install a program. So, I get the idea of simplicity of aurto. I would like to explore this a bit more with you so we can keep both your simplicity ideal and my needed features. Actually I tried to keep the same code style as you did to keep things consistent. I never used rust before but if you believe it is better for this I can have a look. If if had to choose another language, I would go for python. However I prefer bash for this kind of tools and for better integration with aurutils. In meanwhile I came into a point where I imagine this could be either integrated (merged) with aurutils or a kind of a plugin, hence the bash. I totally agree to keep every new features seamless to the current user base. I think the only thing not in that direction is the new usage. I suggest --repo=repo and if no repo provided, take the first, or a global defined one, as default So, every new "complex" feature would be off by default. If you still prefer to opt out these new concepts, it's fine. I have some ideas for your current problems which may help you and I'm happy to share them with you. |
Ok sure, I wouldn't mind I'll convert the project into a rust binary (I'd favour rust) so we can take a little more complexity with tests etc. Before that we can still think about the design, moving stuff into the home folder etc. |
Ok, thanks. |
I'm looking forward to fixes being made and this PR being pushed to the master branch! |
I've been doing some testing of this PR on my repo for aarch64 and raspi4 related things on my raspi4. And I have some feedback.
As I can't think of anymore feedback I can give you, I think that's about it. Keep up the good work! :) |
Thanks Titaniumtown for your feedback! Please keep in my this PR is just an idea and not a ready-to-go implementation of whatever. 1a. As I did not care for documentation at this point, it's you cannot run 1b. I did not even touch in
|
@Noeljunior My idea was to use a stratum in bedrock linux, that already implements running everything (non-native architecture wise) through qemu, and use that to manage the different build environments, it would be much simpler. Another benefit of this route is being able to easily install new ones, for instance, say I wanted to install a aarch64 arch linux arm install: I was thinking a section in the config file could look like this:
Sorry if I didn't make my idea super clear. |
@Titaniumtown as I told you:
With this approach, aurto is architecture agnostic so no need to do custom code. Keep in mind that devtools (the arch linux scripts that build the packages inside a chroot) expects a clean chroot, will update the chroot and will copy it every time you build a package. If you find any problem with this approach let me know. |
Will there be further work on this? this PR has been inactive for a while now. |
alexheretic prefers to consider the merge after aurto is rewritten in rust. I have no special interest in rust language and, as such, I don't find myself time to contribute on the translation. |
Is this ever going to get updated? I would really like it to! It's been ages lmao |
Again, @Titaniumtown. @alexheretic has no interest in these features if they are written in bash so no point further development. If you, @Titaniumtown, are up to maintaining an up to date fork of aurto I'm happy to adapt this to the current state of aurto. That should also help to debug and, when time comes, translate it to rust. |
This PR adds a global configuration file for: run user, database name, database path, makepkg.conf path, pacman.conf path, if to chroot, chroot path and if to update.
It also adds the possibility to configure multiple repositories with all of these configuration per repository except the run user which is global.
I came with this idea mainly to cross-compile to i686 and aarch64 (alarm) on the same machine without a too messy setup. For that, each repo had to have its own makepkg.conf and pacman.conf as well different database names and paths and chroot paths, hence all these new configurations.
The idea turned out to be way more complex than what I thought when I started this. I mean, I modified a lot more of what I thought it would be needed and that may break the idea you have for aurto.
This PR is not 100% ready for a release, in my opinion. I'm more than happy yo make it ready, regarding my ideas, after you accept this new paradigm. If you believe this is out of aurto purpose, then I just keep a fork for myself (and whoever wants to use it).
--
Note: I have an updated version of
aurto.install
to be included with this which handles all the modifications I did.More details about what I did:
/etc/aurto/aurto.conf
as main configuration file, ini-like format:CFG0[]
,CFG1[]
, ...)/usr/lib/aurto/user
and/usr/lib/aurto/conf-disable-chroot
are now part of aurto.conf settings$lib_dir
to local PATH (to help readability)aurto add
) instead of onaurto.install
script/etc/pacman.d/aurto
makepkg-aurto.conf
tomakepkg-x86_64-aurto.conf
pacman-extra-aurto.conf
copied from devtools' filesStill needs to be done before a new release:
aurto.conf
update-aurto
VCS specific codeaur sync <pkgs> --no-ver-shallow --print
andaur vercmp-devel
aurto.install
in AUR packageThings I hope to do soon but probably out of this PR:
setarch
or not on aurutils callsSuggestions/discuss regarding these modifications:
Suggestions independent of this PR I might implement:
summerize-build
a function onshared-functions
makepkg.conf
which will only work on a x86_64 machine--
There's a lot here non relevant to this PR itself, I know. But I got into a point where either I implement things with the merge in mind, or if you don't like this I just don't need to care about much of the work. I would prefer to merge, though, and keep contributing.
I'll implement all of these things eventually. I just would like to know if I keep the merge in mind or not ;)
Feel free to discuss anything I said here.
And, of course, thanks for your work so far!
cheers