Skip to content

Commit

Permalink
Update embedded pkgdepends
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Sep 12, 2024
1 parent b84ff8b commit 3a59d3e
Show file tree
Hide file tree
Showing 104 changed files with 1,941 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/library/pkgdepends/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.1.9000
NeedsCompilation: no
Packaged: 2024-09-05 09:24:54 UTC; gaborcsardi
Packaged: 2024-09-12 08:23:16 UTC; gaborcsardi
Author: Gábor Csárdi [aut, cre],
Posit Software, PBC [cph, fnd]
Maintainer: Gábor Csárdi <[email protected]>
12 changes: 12 additions & 0 deletions src/library/pkgdepends/R/sysreqs2.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ sysreqs2_cmds <- utils::read.table(
'Red Hat Enterprise Linux' linux redhat 6 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux redhat 7 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux redhat * NA 'dnf install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.0 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.1 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.2 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.3 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.4 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.5 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.6 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.7 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.8 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.9 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel * NA 'dnf install -y' rpm
'Fedora Linux' linux fedora * NA 'dnf install -y' rpm
'openSUSE Linux' linux opensuse * NA 'zypper --non-interactive install' rpm
'SUSE Linux Enterprise' linux sle * NA 'zypper --non-interactive install' rpm
'Alpine Linux' linux alpine * NA 'apk add --no-cache' apk
"))

find_sysreqs_platform <- function(sysreqs_platform = NULL) {
Expand Down
42 changes: 42 additions & 0 deletions src/library/pkgdepends/R/system-packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ async_system_list_packages <- function(config = NULL) {
pkgtool <- sysreqs2_command(sysreqs_platform, "query")
if (pkgtool == "dpkg-query") {
async_system_list_packages_dpkg_query(config)
} else if (pkgtool == "apk") {
async_system_list_packages_apk(config)
} else {
async_system_list_packages_rpm(config)
}
Expand Down Expand Up @@ -124,3 +126,43 @@ parse_rpm_output <- function(lines) {
pkgs <- pkgs[order(tolower(pkgs$package)), ]
pkgs
}

# For APK, we need this query:

async_system_list_packages_apk <- function(config) {
args <- c(
"list",
"-I"
)
stdout <- tempfile()
external_process(function(...) {
processx::process$new(
"apk",
stdout = stdout,
stderr = stdout,
args = args,
...
)
})$
then(function(ret) {
parse_apk_output(strsplit(ret$stdout, "\n")[[1]])
})$
finally(function() unlink(stdout))
}

parse_apk_output <- function(lines) {

package = sub("-[0-9].*", "", lines)
version = sub(".*?-([0-9][^ ]*).*", "\\1", lines)
provides = ""

pkgs <- data_frame(
status = "ii",
package = package,
version = version,
provides = provides
)

pkgs <- pkgs[order(tolower(pkgs$package)), ]
pkgs
}
2 changes: 1 addition & 1 deletion src/library/pkgdepends/inst/sysreqs/HEAD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bdbdad6b8ce837e306588bfb27ec185f1b9fab3a
cab2105ca4d2bdd111b37ef51f36f96aba16691f
11 changes: 10 additions & 1 deletion src/library/pkgdepends/inst/sysreqs/rules/apparmor.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
"distribution": "sle"
}
]
},
{
"packages": ["libapparmor-dev", "libapparmor"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
}
41 changes: 39 additions & 2 deletions src/library/pkgdepends/inst/sysreqs/rules/atk.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,53 @@
}
]
},
{
"packages": ["libatk-1_0-0"],
"constraints": [
{
"os": "linux",
"distribution": "opensuse",
"versions": ["15.6"]
},
{
"os": "linux",
"distribution": "sle",
"versions": ["15.6"]
}
]
},
{
"packages": ["atk-devel"],
"constraints": [
{
"os": "linux",
"distribution": "opensuse"
"distribution": "opensuse",
"versions": ["15.3", "15.4", "15.5"]
},
{
"os": "linux",
"distribution": "sle"
"distribution": "sle",
"versions": ["15.3", "15.4", "15.5"]
}
]
},
{
"packages": ["atk-dev"],
"constraints": [
{
"os": "linux",
"distribution": "alpine",
"versions": [ "3.15", "3.16" ]
}
]
},
{
"packages": ["atkmm-dev"],
"constraints": [
{
"os": "linux",
"distribution": "alpine",
"versions": [ "3.17", "3.18", "3.19", "3.20", "edge" ]
}
]
}
Expand Down
9 changes: 9 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/automake.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
"distribution": "sle"
}
]
},
{
"packages": ["automake"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
9 changes: 9 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/berkeleydb.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
"distribution": "sle"
}
]
},
{
"packages": ["db-dev"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
10 changes: 10 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/blender.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
"versions": [ "12.3", "15.0", "15.2" ]
}
]
},
{
"packages": ["blender"],
"constraints": [
{
"os": "linux",
"distribution": "alpine",
"versions": [ "3.16", "3.17", "3.18", "3.19", "3.20", "edge" ]
}
]
}
]
}
61 changes: 61 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/boost.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"patterns": ["\\Boost\\b"],
"dependencies": [
{
"packages": ["libboost-all-dev"],
"constraints": [
{
"os": "linux",
"distribution": "ubuntu"
},
{
"os": "linux",
"distribution": "debian"
}
]
},
{
"packages": ["boost-devel"],
"constraints": [
{
"os": "linux",
"distribution": "fedora"
},
{
"os": "linux",
"distribution": "centos"
},
{
"os": "linux",
"distribution": "rockylinux"
},
{
"os": "linux",
"distribution": "redhat"
}
]
},
{
"packages": ["boost-gnu-hpc-devel"],
"constraints": [
{
"os": "linux",
"distribution": "opensuse"
},
{
"os": "linux",
"distribution": "sle"
}
]
},
{
"packages": ["boost-dev"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
9 changes: 9 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/cairo.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
}
]
},
{
"packages": ["cairo-dev"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
},
{
"packages": [
"mingw-w64-x86_64-cairo",
Expand Down
38 changes: 36 additions & 2 deletions src/library/pkgdepends/inst/sysreqs/rules/chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,56 @@
"constraints": [
{
"os": "linux",
"distribution": "centos"
"distribution": "centos",
"versions": ["8"]
},
{
"os": "linux",
"distribution": "rockylinux"
},
{
"os": "linux",
"distribution": "redhat"
"distribution": "redhat",
"versions": ["8"]
},
{
"os": "linux",
"distribution": "fedora",
"versions": [ "36", "37" ]
}
]
},
{
"pre_install": [
{ "command": "yum install -y which" },
{ "command": "[ $(which google-chrome) ] || curl -fsSL -o /tmp/google-chrome.rpm https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-125.0.6422.141-1.x86_64.rpm" },
{ "command": "[ $(which google-chrome) ] || yum install -y /tmp/google-chrome.rpm" }
],
"packages": [],
"post_install": [
{ "command": "rm -f /tmp/google-chrome.rpm" }
],
"constraints": [
{
"os": "linux",
"distribution": "centos",
"versions": ["7"]
},
{
"os": "linux",
"distribution": "redhat",
"versions": ["7"]
}
]
},
{
"packages": ["chromium"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
9 changes: 9 additions & 0 deletions src/library/pkgdepends/inst/sysreqs/rules/cmake.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
"distribution": "sle"
}
]
},
{
"packages": ["cmake"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
}
]
}
]
}
Loading

0 comments on commit 3a59d3e

Please sign in to comment.