spotify / dh-virtualenv

Python virtualenvs in Debian packages

Home Page:http://dh-virtualenv.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

debhelper autoscript python,orig failed venv install v1.0

opened this issue · comments

I am a bit confused here. Any help is greatly appreciated.

How it should look:

master* $ ssh  bowie-node-4258.lvs01.dev.xxx.com ls /opt/venvs/bowie/bin                                                                                                                      [15:23:12]

activate
activate.csh
activate.fish
activate_this.py
bowie-diffbot
bowie-download
bowie-download-partitions
bowie-hash
bowie-node
bowie-search-and-crawltest
bowie-sync-partition-databases
bowie-test-bing-api
diffbot-service
diffbot-service-install
easy_install
easy_install-2.7
fab
gunicorn
gunicorn_paster
pip
pip2
pip2.7
python
python2
python2.7
python-config
python,orig
wex
wheel

How it actually looks:

(venv_gc) 
jmunsch@LM-SFA-11003286 ~/Desktop/dev/GroundControl
master* $ ssh  bowie-node-1904512.lvs01.dev.xxx.com ls /opt/venvs/bowie/bin                                                                                                                   [15:23:48]

python,orig

Why would the bowie package get installed on 1 node, but not the other? Like the python,orig copy occurs, ( https://github.com/spotify/dh-virtualenv/blob/master/autoscripts/postinst-dh-virtualenv#L34 ) but all of the rest of it does not?

debian/control:

Source: bowie
Section: python
Priority: extra
Maintainer: xxx <xxx@xxx.com>
Build-Depends: debhelper (>= 9), python, dh-virtualenv, libxml2-dev, libxslt1-dev, zlib1g-dev, libffi-dev, libssl-dev, liblzma-dev
Standards-Version: 3.9.5

Package: bowie
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, libxml2, libxslt1.1, zlib1g, libffi6, libssl1.0.0, nginx (>= 1.7.11), inotify-tools
Description: Schedule URLs, download them and upload the responses to DDFS
 (name joke -- it's the spider from mars)

debian/rules:

#!/usr/bin/make -f

%:
	dh $@ --with python-virtualenv

override_dh_virtualenv:
	dh_virtualenv --extra-pip-arg='--no-binary' --extra-pip-arg=':all:'

debian/postinst:

#!/bin/bash

#DEBHELPER#

# See http://upstart.ubuntu.com/cookbook/#job-types

PYTHON=/opt/venvs/bowie/bin/python

JOBS='bowie-download bowie-download-all bowie-hash bowie-node bowie-diffbot'
SERVICES='bowie-hash bowie-node bowie-diffbot'

# bowie-download-all will start || restart bowie-download for each partition
TASKS='bowie-download-all'

# copy shared configuration
$PYTHON -m bowie_config bowie.conf > /home/bowie/bowie.conf
chown bowie /home/bowie/bowie.conf

# copy the upstart jobs configurations
for job in $JOBS
do
    config_file=$job.conf
    $PYTHON -m bowie_config upstart/$config_file > /etc/init/$config_file
done

# start or restart services
for service in $SERVICES
do
    start $service || restart $service
done

# run tasks
for task in $TASKS
do
    start $task
done

# configure nginx and reload
$PYTHON -m bowie_config nginx.conf > /etc/nginx/nginx.conf
# restart nginx
nginx || nginx -s reload```

Let me put it this way, your postinst has optimization potential. ;)

I might very well be that it exits with errors and breaks the pkg install.

lol. thanks for the guidance, the postinst was the issue.

There were multiple versions of nginx installed, of which i was looking at the wrong one during the install, and it was indeed exiting with errors.

closing this issue.