my RPM package requires 2 already installed shared libraries - rpmbuild

I'm looking for help about making rpm packages.
I just created my first RPM package with rpmbuild.
This package is simple. It has just to copy several config files and one executable.
I cannot install this .rpm because 2 shared librairies used by the executable are required.
These librairies are already installed but they are not linked with another .rpm package because I build them from one of my projects. There are located in the /usr/myproject/lib directory.
I tried to put symbolic links to /lib and /usr/lib, tried also to run a "ldconfig" update from a .conf file which contains the /usr/myproject/lib directory, and tried to update the LD_LIBRARY_PATH env variable without any success.
I know I can ignore dependencies using the -nodeps command line option but I'd like in the next step to create my own yum repository but yum do not allow to install a package if the dependencies are not fulfilled.
I would also prefer to keep the automatic dependency feature of rpmbuild enabled.
Thanks in advance.

Package these 2 libraries in another RPM, then you can install both RPMs in one rpm -i call.

Related

conda build R packages to different library location

I'm following the instructions from https://www.continuum.io/content/conda-data-science in order to build a CRAN-available R package (e.g. synthpop).
conda skeleton cran synthpop
conda build r-synthpop
How can I change the default conda build sequence to install to a different library location, as I don't have permission to install to the default one?
* installing to library ‘/path/to/default/lib’
Error: ERROR: no permission to install to directory ‘/path/to/default/lib’
Also, I'm running conda build from within a virtual env.
Raised this as an issue here: https://github.com/ContinuumIO/anaconda-issues/issues/1562
Hi I was faced with this similar problem recently. After some researches, I wrote one passage about it
https://github.com/alfredzj/Documentations/blob/master/anaconda-set-up.md
I don't think changing location is a good idea.
The --croot option allows installs to a specific location:
conda build --croot /path/to/somewhere/env r-synthpop/
In our case we had two R installs, and the configuration in .Rprofile listed a library location which had restricted write permissions. This location masked the path we gave via --croot. Once we edited .Rprofile we could run conda build with the desired path.

How to build and use a Meteor package on an arm?

I tried to host a Meteor server from my Rasperry pi. Until now I was good to go with 4commerce build. I would like to use the CollectionsFS, which is not build for arm processors. I want to build the package myself and need some guidance on how to proceed. It seems like that I only need to build the npm package gridfs-stream
cfs:gridfs have no binaries, but it depends on two npm packages ("gridfs-stream" and "mongodb"), you need rebuild that packages.
due to CollectionFS Issue
Until now I tried to clone the gridfs-stream package and make the makefile, but it seems some important files are missing?
/bin/sh: 1: ./node_modules/mocha/bin/mocha: not found
So how do I compile the package?
Do I have to use the source from Github? Lastly when the package is compiled how will I include it within my Meteor dependencies?

How to use R CMD INSTALL to install only essential files

I am using R CMD INSTALL to install libraries from a folder with .zip binaries to my rlibs directory. When I do this, many folders for each library are installed in the rlibs directory. Take for example the bit package. I have downloaded the bit_1.1-12.zip file from https://cran.r-project.org/web/packages/bit/index.html.
Now I install it by using the following command:
R CMD INSTALL --library=./r_libs ./external/bit_1.1-12.zip
This will create a file structure underneath the folder ./r_libs/bit
Now here is my question: How can I install only the essential library files that R needs to import? I believe this is the ./r_libs/bit/libs/ folder (I might be wrong). Currently there is plenty of additional folders installed, such as html, help, Meta, and more.
I have tried several options that R CMD INSTALL --help gives me. The description in https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html tells me to install just the compiled code for another sub-architecture, use --libs-only. However,
R CMD INSTALL --libs-only --library=./r_libs ./external/bit_1.1-12.zip
gives me an error message that there is no ./r_libs/bit/lib directory. The options --no-html, --no-help seem to not do anything.
I am working on a Windows 7 machine using R add-on package installer 3.0.2.
What am I missing here?
Thank you.

How to specify lib directory when installing development version R Packages from github repository

In Ubuntu, I am installing all the R packages in the directory, /usr/lib/R/site-library by specifying lib option in install.packages().
But when I try to install the development version of the R packages using, install_github(), it always installs in a local repository of the system user.
.libPaths() has 4 directories including the local repository. So, I have 2 questions,
Will it install in any of the other 3 repositories if i remove the local repository from .libPaths()?
Is there any way to specify installation library path in install_github()?
I am using Ubuntu 12.04 64bit and R 3.0.1
----------------------UPDATE--------------------------------
Unable to remove the local repository from .libPaths()
If I try to install using install_github() in RStudio, it installs in the local repository since lib is not specified.
If I try to install using install_github() as non-root user, it installs in the local repository since lib is not specified.
If I try to install using install_github() as root user, it installs in the /usr/local/lib/R/site-library since lib is not specified.
Is there any to specify installation lib?
To add specified library paths in devtools, we need to use with_libpaths()
Arguments for with_libpaths() are, with_libpaths(new, code)
Following is an example for using with_libpaths(),
library(devtools)
with_libpaths(new = "/usr/lib/R/site-library/", install_github('rCharts', 'ramnathv'))
Courtesy: Hadley, here :)
And other than with_libpaths(), there are more options for in devtools::with_something()
in_dir: working directory
with_collate: collation order
with_envvar: environmental variables
with_libpaths: library paths, replacing current libpaths
with_lib: library paths, prepending to current libpaths
with_locale: any locale setting
with_options: options
with_path: PATH environment variable
with_par: graphics parameters
More explanations here
install_github takes a ... argument that passes to devtools::install. devtools::install has an args argument.
args
An optional character vector of additional command line arguments to be passed to R CMD install. This defaults to the value of the option "devtools.install.args".
R CMD install takes a library argument
Options:
-h, --help print short help message and exit
-v, --version print INSTALL version info and exit
-c, --clean remove files created during installation
--preclean remove files created during a previous run
-d, --debug turn on debugging messages
and build a debug DLL
-l, --library=LIB install packages to library tree LIB
So the following should work:
devtools::install_github("repo", args = c('--library="./mypath/gdfgdg/"'))
however it doesnt appear to be replacing the call to R CMD install
"C:/PROGRA~1/R/R-31~1.0/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\john\AppData\Local\Temp\RtmpucrXMD/RSelenium_1.3.2.tar.gz" \
--library="C:/Users/john/Documents/R/win-library/3.1" --install-tests \
--library="C:/Users/john/Desktop/"
This is more of a workaround, but I found a way using the command-line version of R.
Starting from Ubuntu:
sudo -i R
the trick (I found) is to use -i option
Then from R:
.libPaths()
my local R directory does not appear; the default directory is the one that I want.
Then, I install.packages() or install_github() with impunity.
Hope this helps,
Ian

R install package globally

How do I install an R package globally, so it's available to all users? Currently I'm doing
R.exe CMD INSTALL *.zip
But it does
* installing to library 'C:/Users/Matt/Documents/R/win-library/2.15'
I would like to install the packages alongside R in Windows' 'program files'.
Your big problem here is installing to C:\Program Files\. This means on versions of windows with file permissions, you need admin permissions to write to that folder. As R does not commonly request admin permissions, it will on default install to an user subdirectory, unless you run R as administrator (by right clicking on the shortcut). In which case you can use the GUI to install packages and it will install them globally by default. For working on the command line, you can also run the cmd session as administrator.
In future, it's recommended that you install R to say, C:\R\ to avoid this.
What worked for me was running:
install.packages("MyPackage", lib="C:\\Program Files\\R\\R-3.0.1\\library")
Installing it to Program Files wasn't a problem for me - the problem was that the default installation directory was in C:\\Users\\Mike\\Documents\\R\\...
Ultimately you just want to install it to wherever .libPaths() looks by default, and in my environment that was most commonly C:\\Program Files\\R\\R-3.0.1\\library
Here is a way to specify where to find or install libraries. You can put the libraries in a common directory.
http://cran.r-project.org/doc/manuals/R-admin.html#Managing-libraries

Resources