Hello!
I use Debian GNU/Linux at work and I really like apt-get tool. As far as
I understand the whole picture, there are now some Debian packages of R
packages. Build of Debian packages is done automagically by Perl script.
By the way, what is the status of Debianizing R packages? Is it stopped,
just holded, ... I don't know so I am asking
There is also Bioconductor and I am aware that the list of packages is
growing quite fast and afterall I understand that there is probably to
few people to work on Debianization.
The main point of this mail is however installation. I usually first
try to use apt-get install and if there is no Debian package I use
R tools. However some packages that I have already installed with R tools
might eventually appear as Debian packages, ... or I might use
update.packages() for Debian packages. By the way is field
'Package-Manager: Debian' already implemented. I would check, but I
unfortunately don't have Debain at home.
I was thinking on some functions or eventually an R package r-debian,
which would ease this installation dilemma. Actually I wrote something
already in december but put it off. It is given bellow. It is probably
far from optimal but it was just a proof of concept. Many more functions
would be needed to fuzz everything up. Any comments?
debian.install.packages <- function(package, ...) {
# Description:
# Installs package on Debian GNU/Linux system. For given R package it
# tries to get Debian package and install/upgrade it with apt-get if it
# exists. Otherwise install.packages() is used.
# Gregor GORJANC 2004-12-30
# Arguments:
# package: R package name as character, only one
# ...: other parameters for install.packages() or update.packages()
# Examples:
# debian.install.packages("Design")
# Code:
# apt-get update i.e. refresh list of Debian packages
system(apt-get update)
# Transform R package name to Debian package name policy i.e change R
# package name to lowercase and test if this Debian package exists
# (test1). This could be done without grep, but then it is not possible
# to test on exit status, since apt-cache search always returns 0.
packagelow <- tolower(package)
tmp1 <- c("system(\"apt-cache search ^r- | grep")
tmp2 <- c("| awk '{print $1}'\", intern = TRUE\)")
tmp3 <- as.expression(paste(tmp1, packagelow, tmp2, "\n"))
deb <- eval(parse(file = "", text = tmp3))
cat("\nR package:", package, "\n")
cat("Corresponding Debian package name:", deb, "\n")
# Package install/update or upgrade in apt meaning
if (length(deb) != 0) { # Debian package does exist
cat("Debian package", deb, "exists: yes\n")
cat("Proceeding with apt-get.\n")
# apt-get install, which can also be used for package upgrade
tmp1 <- c("system(\"apt-get install")
tmp2 <- as.expression(paste(tmp1, deb, "\")", "\n"))
eval(parse(file = "", text = tmp2))
}
else { # Debian package doesn't exist or something went wrong in test1
cat("Debian package", deb, "exists: no\n")
# cat("Proceeding with install/update.packages().\n")
# install.update.packages(package, ...)
cat("Proceeding with install.packages().\n")
install.packages(package, ...)
}
}
One more thing. Why is r-noncran-lindsey and not r-other-lindsey?
--
Lep pozdrav / With regards,
Gregor Gorjanc
------------------------------------------------------------------------
University of Ljubljana
Biotechnical Faculty URI: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department email: gregor.gorjanc <at> bfro.uni-lj.si
Groblje 3 tel: +386 (0)1 72 17 861
SI-1230 Domzale fax: +386 (0)1 72 17 888
Slovenia
"Debain" way of installing packages
10 messages · Gorjanc Gregor, A.J. Rossini, Egon Willighagen +4 more
YMMV, but what I do is to install duplicates (i.e. R CMD INSTALL places things in /usr/local/, and apt-get in /usr/), and resolve the library I want at load time. This has a few advantages, and the obvious disadvantage that you can shoot yourself in the foot REALLY EASILY if you don't pay attention to what you've got configured. best, -tony
On 4/24/05, Gorjanc Gregor <Gregor.Gorjanc@bfro.uni-lj.si> wrote:
Hello!
I use Debian GNU/Linux at work and I really like apt-get tool. As far as
I understand the whole picture, there are now some Debian packages of R
packages. Build of Debian packages is done automagically by Perl script.
By the way, what is the status of Debianizing R packages? Is it stopped,
just holded, ... I don't know so I am asking
There is also Bioconductor and I am aware that the list of packages is
growing quite fast and afterall I understand that there is probably to
few people to work on Debianization.
The main point of this mail is however installation. I usually first
try to use apt-get install and if there is no Debian package I use
R tools. However some packages that I have already installed with R tools
might eventually appear as Debian packages, ... or I might use
update.packages() for Debian packages. By the way is field
'Package-Manager: Debian' already implemented. I would check, but I
unfortunately don't have Debain at home.
I was thinking on some functions or eventually an R package r-debian,
which would ease this installation dilemma. Actually I wrote something
already in december but put it off. It is given bellow. It is probably
far from optimal but it was just a proof of concept. Many more functions
would be needed to fuzz everything up. Any comments?
debian.install.packages <- function(package, ...) {
# Description:
# Installs package on Debian GNU/Linux system. For given R package it
# tries to get Debian package and install/upgrade it with apt-get if it
# exists. Otherwise install.packages() is used.
# Gregor GORJANC 2004-12-30
# Arguments:
# package: R package name as character, only one
# ...: other parameters for install.packages() or update.packages()
# Examples:
# debian.install.packages("Design")
# Code:
# apt-get update i.e. refresh list of Debian packages
system(apt-get update)
# Transform R package name to Debian package name policy i.e change R
# package name to lowercase and test if this Debian package exists
# (test1). This could be done without grep, but then it is not possible
# to test on exit status, since apt-cache search always returns 0.
packagelow <- tolower(package)
tmp1 <- c("system(\"apt-cache search ^r- | grep")
tmp2 <- c("| awk '{print $1}'\", intern = TRUE\)")
tmp3 <- as.expression(paste(tmp1, packagelow, tmp2, "\n"))
deb <- eval(parse(file = "", text = tmp3))
cat("\nR package:", package, "\n")
cat("Corresponding Debian package name:", deb, "\n")
# Package install/update or upgrade in apt meaning
if (length(deb) != 0) { # Debian package does exist
cat("Debian package", deb, "exists: yes\n")
cat("Proceeding with apt-get.\n")
# apt-get install, which can also be used for package upgrade
tmp1 <- c("system(\"apt-get install")
tmp2 <- as.expression(paste(tmp1, deb, "\")", "\n"))
eval(parse(file = "", text = tmp2))
}
else { # Debian package doesn't exist or something went wrong in test1
cat("Debian package", deb, "exists: no\n")
# cat("Proceeding with install/update.packages().\n")
# install.update.packages(package, ...)
cat("Proceeding with install.packages().\n")
install.packages(package, ...)
}
}
One more thing. Why is r-noncran-lindsey and not r-other-lindsey?
--
Lep pozdrav / With regards,
Gregor Gorjanc
------------------------------------------------------------------------
University of Ljubljana
Biotechnical Faculty URI: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department email: gregor.gorjanc <at> bfro.uni-lj.si
Groblje 3 tel: +386 (0)1 72 17 861
SI-1230 Domzale fax: +386 (0)1 72 17 888
Slovenia
_______________________________________________ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
best, -tony "Commit early,commit often, and commit in a repository from which we can easily roll-back your mistakes" (AJR, 4Jan05). A.J. Rossini blindglobe@gmail.com
Hi Gregor, Your enthusiasm in this matter is greatly appreciated. I am CC'ing this to the existing list on the alioth.debian.org hosting system: pkg-bioc-devel. This was initially set up my Matt Hope to foster debianising BioC, I then threw my exisiting Perl infrastructure (used previously for Quantian) at it and Egon Willighagen carried it from there with further improvements, incl. large scale builds of amd64 packages. With a little push from all of us (Hi Tony, Hi Matt, Hi Egon, Hi anybody-else-willing-to-chip-in :) we can make this even better and hopefully have something proper by the summer, maybe for DSC 20003.
On 24 April 2005 at 16:04, Gorjanc Gregor wrote:
| Hello!
|
| I use Debian GNU/Linux at work and I really like apt-get tool. As far as
| I understand the whole picture, there are now some Debian packages of R
| packages. Build of Debian packages is done automagically by Perl script.
|
| By the way, what is the status of Debianizing R packages? Is it stopped,
| just holded, ... I don't know so I am asking
| There is also Bioconductor and I am aware that the list of packages is
| growing quite fast and afterall I understand that there is probably to
| few people to work on Debianization.
|
| The main point of this mail is however installation. I usually first
| try to use apt-get install and if there is no Debian package I use
| R tools. However some packages that I have already installed with R tools
| might eventually appear as Debian packages, ... or I might use
| update.packages() for Debian packages. By the way is field
| 'Package-Manager: Debian' already implemented. I would check, but I
| unfortunately don't have Debain at home.
|
| I was thinking on some functions or eventually an R package r-debian,
| which would ease this installation dilemma. Actually I wrote something
| already in december but put it off. It is given bellow. It is probably
| far from optimal but it was just a proof of concept. Many more functions
| would be needed to fuzz everything up. Any comments?
|
| debian.install.packages <- function(package, ...) {
|
| # Description:
| # Installs package on Debian GNU/Linux system. For given R package it
| # tries to get Debian package and install/upgrade it with apt-get if it
| # exists. Otherwise install.packages() is used.
| # Gregor GORJANC 2004-12-30
|
| # Arguments:
| # package: R package name as character, only one
| # ...: other parameters for install.packages() or update.packages()
|
| # Examples:
| # debian.install.packages("Design")
|
| # Code:
| # apt-get update i.e. refresh list of Debian packages
| system(apt-get update)
|
| # Transform R package name to Debian package name policy i.e change R
| # package name to lowercase and test if this Debian package exists
| # (test1). This could be done without grep, but then it is not possible
| # to test on exit status, since apt-cache search always returns 0.
| packagelow <- tolower(package)
| tmp1 <- c("system(\"apt-cache search ^r- | grep")
| tmp2 <- c("| awk '{print $1}'\", intern = TRUE\)")
| tmp3 <- as.expression(paste(tmp1, packagelow, tmp2, "\n"))
| deb <- eval(parse(file = "", text = tmp3))
|
| cat("\nR package:", package, "\n")
| cat("Corresponding Debian package name:", deb, "\n")
|
| # Package install/update or upgrade in apt meaning
| if (length(deb) != 0) { # Debian package does exist
| cat("Debian package", deb, "exists: yes\n")
| cat("Proceeding with apt-get.\n")
|
| # apt-get install, which can also be used for package upgrade
| tmp1 <- c("system(\"apt-get install")
| tmp2 <- as.expression(paste(tmp1, deb, "\")", "\n"))
| eval(parse(file = "", text = tmp2))
| }
| else { # Debian package doesn't exist or something went wrong in test1
| cat("Debian package", deb, "exists: no\n")
| # cat("Proceeding with install/update.packages().\n")
| # install.update.packages(package, ...)
| cat("Proceeding with install.packages().\n")
| install.packages(package, ...)
| }
| }
As Tony said in his follow-up, the mixing and matching is hard to do
properly, which is why I think the high-end solution is to provide a robust
script, maybe with a db backend, that debianises what is on CRAN -- similar
to what exists on Windows. We'd simply use apt-get instead of
install.packages() wherever possible.
| One more thing. Why is r-noncran-lindsey and not r-other-lindsey?
Because nobody pressed Chris hard enough to implement the change. I am sure
he would take a patch from you (hint, hint).
Cheers, Dirk
PS Adorable type in you Subject line. I have done gazillion times as well :)
|
| --
| Lep pozdrav / With regards,
| Gregor Gorjanc
|
| ------------------------------------------------------------------------
| University of Ljubljana
| Biotechnical Faculty URI: http://www.bfro.uni-lj.si/MR/ggorjan
| Zootechnical Department email: gregor.gorjanc <at> bfro.uni-lj.si
| Groblje 3 tel: +386 (0)1 72 17 861
| SI-1230 Domzale fax: +386 (0)1 72 17 888
| Slovenia
|
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian@r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Better to have an approximate answer to the right question than a precise answer to the wrong question. -- John Tukey as quoted by John Chambers
On Sunday 24 April 2005 19:45, Dirk Eddelbuettel wrote:
Your enthusiasm in this matter is greatly appreciated. I am CC'ing this to the existing list on the alioth.debian.org hosting system: pkg-bioc-devel. This was initially set up my Matt Hope to foster debianising BioC, I then threw my exisiting Perl infrastructure (used previously for Quantian) at it and Egon Willighagen carried it from there with further improvements, incl. large scale builds of amd64 packages. With a little push from all of us (Hi Tony, Hi Matt, Hi Egon, Hi anybody-else-willing-to-chip-in :) we can make this even better and hopefully have something proper by the summer, maybe for DSC 20003.
What remains to be done? I think we can compile most of the CRAN packages automatically with the Perl script on Alioth... there are some packages that won't work at this moment, for various reasons, but I think 80+ percent gets debianized. The resulting packages are quite Lintian ok, and I think the packages are actually tested if they work during the process... Dirk, you mentioned a few times some remaining bugs. What are the things you feel that need to be fixed before we can try an setup a repository? Egon
e.willighagen@science.ru.nl PhD student on Molecular Representation in Chemometrics Radboud University Nijmegen http://www.cac.science.ru.nl/people/egonw/ GPG: 1024D/D6336BA6
On 24 April 2005 at 19:58, Egon Willighagen wrote:
| On Sunday 24 April 2005 19:45, Dirk Eddelbuettel wrote:
| > Your enthusiasm in this matter is greatly appreciated. I am CC'ing this to | > the existing list on the alioth.debian.org hosting system: pkg-bioc-devel. | > This was initially set up my Matt Hope to foster debianising BioC, I then | > threw my exisiting Perl infrastructure (used previously for Quantian) at it | > and Egon Willighagen carried it from there with further improvements, | > incl. large scale builds of amd64 packages. | > | > With a little push from all of us (Hi Tony, Hi Matt, Hi Egon, Hi | > anybody-else-willing-to-chip-in :) we can make this even better and | > hopefully have something proper by the summer, maybe for DSC 20003. | | What remains to be done? I think we can compile most of the CRAN packages | automatically with the Perl script on Alioth... there are some packages that | won't work at this moment, for various reasons, but I think 80+ percent gets | debianized. The resulting packages are quite Lintian ok, and I think the | packages are actually tested if they work during the process... | | Dirk, you mentioned a few times some remaining bugs. What are the things you | feel that need to be fixed before we can try an setup a repository? Not sure. We probably just need to "keep on rolling" to experience the bugs and squish. I am somewhat behind the eight ball in terms of other committments, so I am not sure I can get to it. Does anybody feel like like starting this for i386? Would be nice to complement R 2.1.0 with a few hundred apt-get'able packages, and even nice if you can add the same for amd64. Any powerpc users here who could run a chroot? In terms of space and bandwidth, I could put them into people.debian.org as alioth appears to be permanently full. Anybody else have space? Tony: Could we / should we put them onto opus? Cheers, Dirk
Better to have an approximate answer to the right question than a precise answer to the wrong question. -- John Tukey as quoted by John Chambers
On 4/24/05, Dirk Eddelbuettel <edd@debian.org> wrote:
In terms of space and bandwidth, I could put them into people.debian.org as alioth appears to be permanently full. Anybody else have space? Tony: Could we / should we put them onto opus?
Depends on how the process would work. Opus will be shutdown at the end of August, as I'll not be able to pay a systems admin at that point until October, which is when I would head back (if that is our decision). So, for a temporary move, it's fine. For permanent work, it would be silly. We might be able to see if Greg W's site would carry it (the Quantian "mirror" at Yale). best, -tony "Commit early,commit often, and commit in a repository from which we can easily roll-back your mistakes" (AJR, 4Jan05). A.J. Rossini blindglobe@gmail.com
On 4/24/05, Dirk Eddelbuettel <edd@debian.org> wrote:
Because nobody pressed Chris hard enough to implement the change. I am sure he would take a patch from you (hint, hint).
-lindsey is sufficiently annoying for this and other reasons that I plan to either orphan it or ask for its removal. Chris
Chris Lawrence - http://blog.lordsutch.com/
access to maintainers) and (non-backuped) disk space. Since we mirror everything, this should not be too much of an issue, is it? I might have to pay for a disk myself, but this is fine. We could do both i386 and sparc. Also MIPS, but this is a bit pointless for now, isn't it?
how much disk space would such a project need? ballpark estimate? tens or low hundreds of gigabytes? --elijah
Dear all, we move our institute somewhen later in the summer and might have a little downtime then, but besides, I could offer both accounts (ssh access to maintainers) and (non-backuped) disk space. Since we mirror everything, this should not be too much of an issue, is it? I might have to pay for a disk myself, but this is fine. We could do both i386 and sparc. Also MIPS, but this is a bit pointless for now, isn't it? I am likely to leave my current institute in October. It might be that I do not find somebody else taking over responsibility and that we then have to change the URL. But maybe there would be some r-project.debian.net alias for us anyway. Many greetings and thanks for all your good work! Steffen
Chris Lawrence wrote:
On 4/24/05, Dirk Eddelbuettel <edd@debian.org> wrote:
Because nobody pressed Chris hard enough to implement the change. I am sure he would take a patch from you (hint, hint).
-lindsey is sufficiently annoying for this and other reasons that I plan to either orphan it or ask for its removal. Chris
On 25 April 2005 at 08:07, elijah wright wrote:
| | > access to maintainers) and (non-backuped) disk space. Since we mirror | > everything, this should not be too much of an issue, is it? I might have | > to pay for a disk myself, but this is fine. We could do both i386 and | > sparc. Also MIPS, but this is a bit pointless for now, isn't it? | | how much disk space would such a project need? ballpark estimate? tens | or low hundreds of gigabytes? One ballpark is from the build I did last summer / fall for Quantian and for which the resulting .deb files are still lingering here on my machine -- just the .deb files for most of (then) CRAN and BioC is about 430 mb, incl. a few double entries. Dirk
Better to have an approximate answer to the right question than a precise answer to the wrong question. -- John Tukey as quoted by John Chambers