* Allows building deb packages for R on ubuntu-1804
this update provides a mechanism for building deb packages on Ubunto
1804. Several changes have been necessary to facilitate this:
* Dockerfile has been updated. It now includes:
- fpm - a tool tool to create OS specific packages
- copying the package script into the image
* the OS specific package.ubuntu-1804 packaging script
- this is the script that uses fpm to build the package
* Updates to build.sh. It now includes:
- runs the package script if it exists
- stores the resultant package to s3
* removed duplicate dependencies
* fixed minor bug with output directory creation
* moved package creation to after the clean step
* Changed deb priority to "optional"
The fpm default priority is "extra" which is now deprecated.
https://github.com/jordansissel/fpm/issues/1398
* Added additional package fields
Added 'Bugs', URL (Homepage), 'Description', 'Maintainer' and 'License'
* Fixed the repo URL
* Added passthrough for Jenkins BUILD_NUMBER
Jenkins sets the BUILD_NUMBER environment variable for all jobs.
This change sets that env var inside the container as BUILD_NO.
BUILD_NO is used bythe packaging scripts in place of a version number
for all of the created packages.
* removed liblapack
* Improved consistency of environment variable use
Removed the needless renaming of environment variables to improve
overall consistency and readability
* No longer tries to version the packages
Previous commits relied on the idea that the Jenkins BUILD_NUMBER
environment variable could be used as a version number for the package
itself (in addition to R's existing version numbers). This is not the
case and having a version number for the package is not deemed desirable
at this time. This change pins *all* packages produced to version 1.
* Moved additional apt package installations
Packages were being installed in two places, have rationalised to a
single location to reduce the number of layers in the final container.
* Tidy up of package script
Alphabetised the dependencies to make things easier to find.
* Added additional dependencies
These dependencies were added as they were identified to be missing when
running against the R 3.6.1 build during testing
* Removed an unrequired dependency
Further trimming down the dependency list based on reviewer feedback.
* Swapped liblapack-dev for libopenblas-dev
51 lines
1.1 KiB
Text
51 lines
1.1 KiB
Text
if [[ ! -d /tmp/output/ubuntu-1804 ]]; then
|
|
mkdir -p /tmp/output/ubuntu-1804
|
|
fi
|
|
|
|
fpm \
|
|
-s dir \
|
|
-t deb \
|
|
-v 1 \
|
|
-n R-${R_VERSION} \
|
|
--deb-priority "optional" \
|
|
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
|
--url "http://www.r-project.org/" \
|
|
--description "GNU R statistical computation and graphics system" \
|
|
--maintainer "RStudio Inc https://github.com/rstudio/r-builds" \
|
|
--license "GPL-2" \
|
|
-p /tmp/output/ubuntu-1804/ \
|
|
-d g++ \
|
|
-d gcc \
|
|
-d gfortran \
|
|
-d libbz2-1.0 \
|
|
-d libc6 \
|
|
-d libcairo2 \
|
|
-d libcurl4 \
|
|
-d libglib2.0-0 \
|
|
-d libgomp1 \
|
|
-d libicu60 \
|
|
-d libjpeg8 \
|
|
-d liblzma5 \
|
|
-d libopenblas-dev \
|
|
-d libpango-1.0-0 \
|
|
-d libpangocairo-1.0-0 \
|
|
-d libpaper-utils \
|
|
-d libpcre3 \
|
|
-d libpng16-16 \
|
|
-d libreadline7 \
|
|
-d libtcl8.6 \
|
|
-d libtiff5 \
|
|
-d libtk8.6 \
|
|
-d libx11-6 \
|
|
-d libxt6 \
|
|
-d make \
|
|
-d ucf \
|
|
-d unzip \
|
|
-d xdg-utils \
|
|
-d zip \
|
|
-d zlib1g \
|
|
/opt/R/${R_VERSION}
|
|
|
|
shopt -s extglob
|
|
export PKG_FILE=$(ls /tmp/output/ubuntu-1804/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
|
|