Skip to content

R 4.0.0 rebuild status

8 messages · José Abílio Matos, Elliott Sales de Andrade, Iñaki Ucar

#
On Monday, 29 June 2020 13.46.02 WEST I?aki Ucar wrote:
I think that I meant the way that the python packages are rebuilt for each new 
python version. I should have said Python mass rebuild.

I took your work as the basis, together with Tom's help and I used dnf to get 
a list of R packages (assuming that their name starts with R- ). The advantage 
of this approach is that it works for CRAN and Bioconductor.

$ dnf list available --disablerepo=\* --enablerepo=rawhide-source R-* | tail -
n +3 | awk -e '{print $1};' | sed -e 's/\.src$//' > r-packages.txt

That gave the list of the (source) packages to rebuild.

In order to get the list of dependencies I used a similar strategy:
$ (for p in $(cat r-packages.txt); do echo -n $p, ; dnf -q repoquery --
disablerepo=\* --enablerepo=rawhide-source --requires $p | sed ':a;N;$!ba;s/
\n/,/g'; done) > r-packages-dependencies.csv

The resulting file is a csv file with the first column as the package and the 
remaining columns as the dependencies.

Now the idea was to process this file using a python script to create a direct 
graph of dependencies (using networkx). In the process non R packages are 
removed and some dependencies are cleaned (e.g. -devel packages direct to the 
source package).


The advantage of this is that it allows to identify cycles.

My only surprise in this process was to find that several packages require R-
rpm-macros.

That causes some dependency cycles because R-rpm-macros also requires
R-rprintf,R-devel,R-knitr,R-stringi,R-testthat.

Since R-rpm-macros is used for Fedora and epel 8 I suggest to remove the 
dependency. Do you agree?
#
On Fri, 3 Jul 2020 at 19:03, Jos? Ab?lio Matos <jamatos at fc.up.pt> wrote:
Nice! What if we create a group "R" on Pagure and a repo
"fedora-scripts" or something like that?
Are these the packages that require R-rpm-macros or others?
The packages are most probably maintained by Elliott, right? He would
know better why they have this dependency.
#
On Fri, 3 Jul 2020 at 13:03, Jos? Ab?lio Matos <jamatos at fc.up.pt> wrote:
Your process must have an error, because R-rpm-macros only Requires
R-core. It also BuildRequires nothing.

R-devel depends on R-rpm-macros, and this is intended, in order to
pull in automated dependency generators. If anything else directly
requires R-rpm-macros, that is an error, and these are all in packages
I don't own.

  
    
#
[Apologies if this message is a dupe but I do not find evidence of the other 
message I wrote]
On Friday, 3 July 2020 23.06.43 WEST Elliott Sales de Andrade wrote:
You are right.
This caught a blind spot in my shell script. If there are no dependencies the 
script does not change line and thus R-rpm-macros and R-rprintf entries were 
merged.
There are several Rccp related packages that require R-rpm-macros. Currently 
it is no-op so not a problem although it is unnecessary.

Regards,
17 days later
#
On Friday, 3 July 2020 18.36.17 WEST I?aki Ucar wrote:
I would like to improve the scripts but FWIW here it comes a rough version of 
the script I used.

The python script loads the csv file and constructs a directed graph and it 
starts to remove the leave packages (pruning or trimming if you take a 
gardening analogy).

The csv files has the dependency of the packages. It is always possible to go 
to the packages that remain after the first stage and using a bootstrap mode 
to remove most of the dependencies and then to run the code again.

This procedure was enough to process all the packages.
#
On Tue, 21 Jul 2020 at 17:05, Jos? Ab?lio Matos <jamatos at fc.up.pt> wrote:
Looks great! I've created an R group on Pagure and added you all
(jamatos, qulogic, spot) to it (feel free to add anyone else that may
be interested). Please, create a repo there with these tools. I'll
transfer https://pagure.io/fedora-r-packages there too (if that's
possible; or just mirror it if not).
5 days later
#
On Tue, 21 Jul 2020 at 11:05, Jos? Ab?lio Matos <jamatos at fc.up.pt> wrote:
I'm not exactly fluent in Haskell, but Jens Petersen has a tool called
fbrnch [1], which is able to calculate the build order, and then
submit them, and even handles override for non-Rawhide builds. It does
need you to handle some of the bootstrap conditions yourself, but with
a defined workflow, it might be possible to request that it handle
that too.
[1] https://github.com/juhp/fbrnch/
#
On Mon, 27 Jul 2020 at 09:09, Elliott Sales de Andrade
<quantum.analyst at gmail.com> wrote:
Very interesting! I poked around a bit and discovered that they use a
Haskell library [1] for that, and a quick search led me to a package
called rpmbuild-order [2]. Never heard of it. So

$ rpmbuild-order sort pkg1 pkg2 pkg3 ...

works nicely. It works by scanning for the packages' SPEC files in the
current working directory, so you need to clone all the repos locally
in the first place.

[1] https://github.com/juhp/fbrnch/blob/d37825c1012d35ae3277d0d0185bd55213fdecd2/src/Cmd/Local.hs#L10
[2] https://hackage.haskell.org/package/rpmbuild-order