[R-sig-Debian] Converting R package to Debian package
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Sat Jul 24 02:26:12 CEST 2021
Hi Ashim,
Sorry, I must have missed this while traveling.
On 7 July 2021 at 11:42, Ashim Kapoor wrote:
| Dear all,
|
| I am on a Debian buster system. I am a beginner to Debian packaging.
|
| Here is my workflow for converting an R package which I call mypackage
| into a Debian package:
|
| 1. I take an R package, say mypackage_2.1.tar.gz
| 2. I create it's copy as mypackage_2.1.orig.tar.gz
| 3. Then I untar the original tarball and create the mypackage directory.
| [ I have installed dh-r helper function like this : sudo apt install dh-r ]
| 4. I goto the mypackage directory and do: dh-make-R
| in order to create the debian directory.
| 5. Then I modify debian/control ( to make Source / Package entries
| from: r-cran-mypackage into mypackage ) and similarly change
| r-cran-mypackage into mypackage in debian/changelog (where I updated
| the message to "Initial release").
| 6. Then from the mypackage directory I do : debuild
|
| The above workflow FAILS with this error:
|
| dpkg-checkbuilddeps: error: Unmet build dependencies: r-cran-dbi
| r-cran-rsqlite r-cran-xts r-cran-zoo r-cran-foreach r-cran-domc
That may mean they need to be in the minimal 'chroot' environment in which
the package is built, which you ensure via debian/control and the
Build-Depends field.
Or it may mean that dpkg-checkbuilddeps checks against your current system.
| But when I check like this,it says the dependencies are THERE:
|
| $ apt-cache show r-cran-dbi
That tests your outer system / what is known in the _entire distribution_
which is very different from the build-a-package clean room.
| Package: r-cran-dbi
| Source: dbi
| Version: 1.0.0-2
| Installed-Size: 1931
| Maintainer: Dirk Eddelbuettel <edd using debian.org>
| Architecture: all
| Depends: r-base-core (>= 3.5.0-3), r-api-3.5
| Suggests: r-cran-rmysql
| Description-en: GNU R package providing a generic database interface
| A generic database interface (DBI) definition for communication
| between R and relational database management systems -- similar to
| Perl's DBI system. All classes in this package are virtual and need
| to be extended by the various R/DBMS implementations as e.g. RMySQL.
| Description-md5: dc00e91ab4b239de079502722ee124b8
| Homepage: https://cran.r-project.org/package=DBI
| Tag: devel::lang:r, devel::library, field::statistics, implemented-in::r,
| role::app-data, suite::gnu, works-with::db
| Section: gnu-r
| Priority: optional
| Filename: pool/main/d/dbi/r-cran-dbi_1.0.0-2_all.deb
| Size: 788848
| MD5sum: 82a1102a8f6b315b4cbce30edbdb9ed8
| SHA256: 704d743feca0a028da369342fd5b0891758952877185b463db289b45f32c9c0e
|
| When I do :
|
| debuild -d
|
| it does not check the dependencies and creates the package.
That is all that matters :)
| I have 2 queries though:
|
| 1. Why does it say unmet build dependencies when I know for sure that
| the dependencies are present.
See above.
| 2. My second query is that : is there a way that instead of checking
| for say : r-cran-dbi it checks that the corresponding DBI package is
| installed inside R but perhaps by using the incantation
| install.packages("DBI") and not from the r-cran-dbi Debian package?
I do not understand the question. Can you rephrase it?
| Can someone please help me ?
I'll try.
Dirk
| Many thanks and Best Regards,
| Ashim
|
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian using r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-SIG-Debian
mailing list