-
Notifications
You must be signed in to change notification settings - Fork 1
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
Thoughts on universal PKGBUILD generation #1
Comments
This topic is def something we need to work on, thanks for tackling this issue.
This is not really an important change considering that the current
As of right now this is perfectly fine. While I do want to get ros2 working on Arch as soon as possible most ROS users are still on ROS 1 and as such continued development on ROS1-Arch is much appreciated.
This is always gonna be the case, we will handle those as special cases.
I don't like this because the release tag usually points to ros-gbp. See later on why.
We should use the latest on available on the source github repository.
I think there was some ongoing conversations about this and an existing solution that hasn't been merged in yet: ros-infrastructure/rosdep#560
@bionade24 @jwhendy and I went to some lengths to actually not use ros-gbp. The main reason for this was that the release of ros-gbp happens at a slower pace than upstream. This means that fixes/commits that address Arch Linux issues do not get patched into those releases. Not to mention that the patches that upstream uses have to be rewritten to work for ros-gbp releases due to the change in directory structure. Using the source releases gives us more flexibility as well as a faster turnaround in resolving issues. The closer we are to the source the better. I am pretty adamant on the decision to not use ros-gbp releases and continue using the packages own releases. |
No complaints from me there! Most of what I did all that scripting for and integration with ros.index was specifically to get all the |
@jwhendy thanks for chiming in. How have you been, man? Been a while since I've seen you around, haha. |
Ha indeed! Had some mandatory furlough and vacation for COVID which I used to do a bedroom project, organize my garage, and do woodworking :) We have only just started getting lab access recently since being at home since ~mid March. I've done hardly anything with robots which leads me to be less personally motivated on this project, unfortunately. Also, my job has shifted more to using something we developed over the past couple years vs. getting a lot of time for development. Anyway, life is good, but indeed I'm not super plugged in here at the moment. How about you?? |
Glad to hear you are staying positive in these times! Luckily I still have my part time job (switched completely remote) but my research lab had closed down. Moved into another apartment and tried to double down on open source stuff with some free time, specifically getting ROCm (NVIDIA's CUDA) working on Arch (rocm-arch). Our lab also recently opened back up and we are finally starting to do some hardware experiments, hopefully they go well, haha. |
Yes, I can only agree that using ros-gbp is a bad idea. I would rather use GH's api to get the release URL and format them.
The organization is in the distribution.yaml, so @acxz Is rocm AMD's CUDA equivalent? Just curious. |
I see, I did not know about the issues related to GBP back then, thanks for the feedback. This eliminates the use of tarballs provided by GBP repositories. Are there disadvantages in using the release repositories just to fetch information (i.e. |
I don't see any information in there that is missing in the |
Yep it is AMD's high performance GPU compute stack equivalent to CUDA. It's also open source and the API is very similar to CUDA's to ensure people already familiar with CUDA can easily pick up ROCm, i.e. cudaMemcpy => rocMemcpy There is also a portability layer called HIP that allows you to write code which will use your native compiler, either rocclr (rocm's) or nvcc (cuda's) based on your system. This allows users to write code which will work on both AMD and NVIDIA platforms.
Yeah as @bionade24 mentioned that would be the same as pulling info from rosdistro, although technically even rosdistro lags behind upstream releases right? I think we should use rosdistro to get the names (and URLs) of the ros packages for a particular ROS distro and then go to the github URL and get the latest release with github's API as @bionade24 suggested. |
The only information missing from the distribution file is the name of the version tag from the source repository, which I admit, is in the usual cases
Why that? The url on the master branch is always
Yes, rosdistro lags behind upstream releases as ROS maintainers are responsible for merging PRs with new version information. But the release repositories are maintained by the upstream package maintainers, so when there's a new upstream release available, the release repository is also updated. (http://wiki.ros.org/bloom/Tutorials/ReleaseCatkinPackage) Does the GitHub API know which versions of each package belong to each ROS distribution? For example, the catkin package provides the 0.7.x versions to melodic and the 0.8.x versions to noetic, other repositories have similar version policies. In case we can use the GitHub API to query information such as 'get me the latest release for noetic', using it makes sense using it, otherwise I'd prefer to either fall back to the version specified by rosdistro or the |
|
@bionade24 my previous experience is that tags/releases were... weird as well. I think @stertingen is alluding to this based on the comment about I could be wrong, but this is my recollection. I know maintaining something like a prefix list per repo dawned on me at one point, as it's usually just something like |
If we use repo.get_tags()[0].name, we should always get the latest tag. |
Which gets the latest, but might not get the right tag as the latest tag might refer to a commit for another ROS distribution (possibly even ROS 2). (See also ros-melodic-arch/ros-melodic-catkin#7) |
@stertingen exactly. @bionade24 this was more like what I meant. I will try to find a specific example, but I recall doing something like extracting the version from
And that will fail, never finding it because |
My fault, somewhere there I misread something. If the release repos are up to date, then go for them.
We could just try the other option before failing completely if it's really never 100%ly exact. My skeptic thoughts were based on the wrong believe that the commit id is in the URL to the files at GH, so there is no need to discuss at all. |
Hi, I also want to make something similar for ros2 packages. I changed the code superflore to generate PKGBUILD files. I guess building on superflore is nice, as it provides the packages for all ros distros (including ros2). |
You might be able to do so with aurutils, not sure tho. |
Just build in checking with namcap, Arch's official PKGBUILD and package-checking tool. That's the same that |
I uploaded my modifications at https://github.com/bastinat0r/superflore in case you are interested. Currently it generates a PKGBUILD file with the correct sources for each package, however build/package instructions are not correct yet. |
I looked over it. First of all, I believe superflore is a legacy monster that's hard to touch doing weird things like using deprecated The program fails for me every time: (Tried
Additionally, it generates a lot of ebuilds instead of pkgbuilds. |
Right now I'm pretty involved in my Diploma thesis, so I have not much time to continue something I've started a few months ago.
Based on the ideas of
create_pkgbuild.py
, I've played a little bit around to improve the automaticPKGBUILD
generation. Some of the ideas below can be found in this script: https://gist.github.com/stertingen/76b0d9e5078674eff1fa086bb91fe8ddThis script tries to generate PKGBUILD files for every package in a ROS distribution, there are only few packages failing due to own naming conventions regarding Git tags or other minor issues. (Example: https://github.com/stack-of-tasks/eigenpy)
Important features & changes from
create_pkgbuild.py
:rosdistro
andcatkin_pkg
python tools provided by OSRF.catkin_make_isolated
instead ofcmake
+make
to create split packages by building all packages in a repos at oncepackage.xml
files for each (release) package of the ROS distribution. This way, the package.xml packages do not need to be downloaded for each package.The generation of split packages introduce some advantages over individual Arch packages per ROS package:
yay -S ros-noetic-desktop-full
Currently, there are also some disadvantages in my implementation, too:
By using ROS distro cache only, a PKBUILD generation could look like:1. Use the archive specified by the release tag in the rosdistro cache2. Use the version number from the rosdistro cache3. Use dependencies from cached package.xml4. Use either colcon or build tool specified by cached package.xmlThis PKGBUILD generator would create a PKGBUILD file for each ROS package and relies on the distro cache only.By using the ROS distro cache and the ROS release repository, split packages could become possible again:
tracks.yml
from the release repository specified by the distro cacheAlternatively, archives for the source repository are also available as releases in the release repositories.This PKGBUILD generator would create less PKGBUILD files, but needs to fetch the tracks.yml for each repository.
As the ROS release repository were introduced for automatic package generation, I would propose to make use of them. I see the potential to provide automatically generated PKGBUILD files for all ROS1 and ROS2 distributions as long as they support python 3 (no kinetic, limited melodic).
There are a few little things to consider:
Automatic pkgrel generation/increment. The ROS release repositories also introduce a pkgrel version number which my might either omit or translate into something like 1.2.3r4. I would also propose some sort of two-step PKGBUILD generation, in which the actual PKGBUILD generator (step 1) is stateless and only relies on the distribution files provided by the ROS infrastructure. In step 2, the new PKGBUILD is compared to the old one and the pkgrel is increased if needed.The text was updated successfully, but these errors were encountered: