Commit 3faa19fd authored by MARGERY David's avatar MARGERY David
Browse files

[Packaging] uses the | construct in debian/control

This enables the same debian/control file for jessie and stretch
variants, and removes the need for live patching using sed in the
.gitlab-ci.yml file
parent a716105e
Pipeline #47129 waiting for manual action with stages
in 17 minutes and 8 seconds
......@@ -25,7 +25,6 @@ test-for-jessie: &test-for-jessie
POSTGRES_DB: oar2_test
script:
- apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs
- "sed -i -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' debian/control"
- mk-build-deps -ir -t 'apt-get -y --no-install-recommends'
- bundle install --path vendor/bundle
- bundle exec rake db:migrate
......@@ -57,7 +56,6 @@ deb-for-jessie: &deb-for-jessie
- grid5000-docker
script:
- apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs
- "sed -i -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' debian/control"
- mk-build-deps -ir -t 'apt-get -y --no-install-recommends'
- apt-get install -y curl pkg-config
- bundle install --path vendor/bundle
......
......@@ -3,7 +3,7 @@ Section: unknown
Priority: extra
Maintainer: Grid'5000 developpers <g5k-developers@lists.grid5000.fr>
Uploaders: David Margery <david.margery@inria.fr>
Build-Depends: debhelper (>= 7), git, bundler, rake, libssl-dev, libxml2-dev, libxslt-dev, libicu-dev, default-libmysqlclient-dev, libpq-dev, nodejs, ruby-dev, lsb-release, postgresql-client
Build-Depends: debhelper (>= 7), git, bundler, rake, libssl-dev, libxml2-dev, libxslt-dev, libicu-dev, default-libmysqlclient-dev | libmysqlclient-dev, libpq-dev, nodejs, ruby-dev, lsb-release, postgresql-client
Standards-Version: 3.7.3
Homepage: https://api.grid5000.fr
......
......@@ -145,19 +145,20 @@ namespace :package do
end
desc "Build debian package with our own scripts"
task :debian => :'package:setup' do
case LSBDISTCODENAME
when 'stretch'
pkg_dependencies= %w{default-libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libpq-dev}
else
pkg_dependencies= %w{libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libpq-dev}
end
if Process.uid == 0
sudo=""
else
sudo='sudo '
end
cmd = "#{sudo}apt-get install #{pkg_dependencies.join(" ")} git-core dh-make dpkg-dev libicu-dev --yes && rm -rf /tmp/#{NAME}"
sh cmd
commands=[
"#{sudo}apt-get -y --no-install-recommends install devscripts build-essential equivs",
"#{sudo}mk-build-deps -ir -t 'apt-get -y --no-install-recommends'",
"rm -rf /tmp/#{NAME}"
]
for cmd in commands do
sh cmd
end
# cmd = "#{sudo}apt-get install #{pkg_dependencies.join(" ")} git-core dh-make dpkg-dev libicu-dev --yes && rm -rf /tmp/#{NAME}"
Dir.chdir('/tmp') do
sh "tar xf #{NAME}.tar -C #{PACKAGING_DIR}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment