Merge lp:~robru/media-hub/pre_release_hook into lp:media-hub

Proposed by Robert Bruce Park
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 182
Merged at revision: 178
Proposed branch: lp:~robru/media-hub/pre_release_hook
Merge into: lp:media-hub
Diff against target: 198 lines (+33/-62)
4 files modified
debian/bileto_pre_release_hook (+21/-52)
debian/control (+6/-6)
debian/get-versions.sh (+5/-3)
debian/rules (+1/-1)
To merge this branch: bzr merge lp:~robru/media-hub/pre_release_hook
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
Jim Hodapp Pending
Thomas Voß Pending
Review via email: mp+290351@code.launchpad.net

Commit message

Use new bileto_pre_release_hook.

To post a comment you must log in.
lp:~robru/media-hub/pre_release_hook updated
180. By Robert Bruce Park

Print $soversion and $SERIES.

181. By Robert Bruce Park

More logging

182. By Robert Bruce Park

Drop redundant log.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== renamed file 'debian/gen-debian-files.sh' => 'debian/bileto_pre_release_hook'
--- debian/gen-debian-files.sh 2015-11-22 21:01:02 +0000
+++ debian/bileto_pre_release_hook 2016-03-29 18:34:58 +0000
@@ -16,6 +16,7 @@
16#16#
17# Authored by: Michi Henning <michi.henning@canonical.com>17# Authored by: Michi Henning <michi.henning@canonical.com>
18# Thomas Voß <thomas.voss@canonical.com>18# Thomas Voß <thomas.voss@canonical.com>
19# Robert Bruce Park <robert.park@canonical.com>
1920
20#21#
21# Script to generate debian files for dual landing in Vivid (gcc 4.9 ABI)22# Script to generate debian files for dual landing in Vivid (gcc 4.9 ABI)
@@ -24,79 +25,47 @@
24# This script is called from debian/rules and generates:25# This script is called from debian/rules and generates:
25#26#
26# - control27# - control
27# - libtrust-store${soversion}.install.${target_arch}28# - libmedia-hub-client${MEDIA_HUB_SOVERSION}.install
28#29# - libmedia-hub-common${MEDIA_HUB_SOVERSION}.install
29# For all but control, this is a straight substition and/or renaming exercise for each file.
30# For control, if building on Wily or later, we also fix the "Replaces:" and "Conflicts:"
31# entries, so we don't end up with two packages claiming ownership of the same places
32# in the file system.
33#30#
34# Because the debian files for the different distributions are generated on the fly,31# Because the debian files for the different distributions are generated on the fly,
35# this allows us to keep a single source tree for both distributions. See ../HACKING32# this allows us to keep a single source tree for both distributions.
36# for more explanations.
37#33#
3834
39set -e # Fail if any command fails.35set -e # Fail if any command fails.
4036
41progname=$(basename $0)37progname=$(basename $0)
4238
43[ $# -ne 1 ] && {39[ $# -gt 1 ] && {
44 echo "usage: $progname path-to-debian-dir" >&240 echo "usage: $progname [path-to-debian-dir]" >&2
45 exit 141 exit 1
46}42}
43version_dir=$(mktemp -d)
47dir=$144dir=$1
48version_dir=$(mktemp -d)45
46[ -n "$dir" ] || dir="./debian"
4947
50# Dump version numbers into files and initialize vars from those files.48# Dump version numbers into files and initialize vars from those files.
51
52sh ${dir}/get-versions.sh ${dir} ${version_dir}49sh ${dir}/get-versions.sh ${dir} ${version_dir}
5350
54full_version=$(cat "${version_dir}"/libmedia-hub.full-version)51export MEDIA_HUB_SOVERSION=$(cat "$version_dir/libmedia-hub.soversion")
55major_minor=$(cat "${version_dir}"/libmedia-hub.major-minor-version)52
56soversion=$(cat "${version_dir}"/libmedia-hub.soversion)53trap "rm -fr $version_dir" 0 INT TERM QUIT
57vivid_soversion=$(cat "${version_dir}"/libmedia-hub.vivid-soversion)54
5855process()
59warning=$(mktemp -t gen-debian-files-msg.XXX)
60
61trap "rm -fr $warning $version_dir" 0 INT TERM QUIT
62
63warning_msg()
64{56{
65 cat >$warning <<EOF57 cat <<EOF
66# This file is autogenerated. DO NOT EDIT!58# This file is autogenerated. DO NOT EDIT!
67#59#
68# Modifications should be made to $(basename "$1") instead.60# Modifications should be made to $(basename "$1") instead.
69# This file is regenerated automatically in the clean target.61# This file is regenerated automatically in the clean target.
70#62#
71EOF63EOF
72}64 perl -pe 's/@([A-Z_]+)@/$ENV{$1} or die "$1 undefined"/eg' <"$1"
7365}
74# Generate debian/control from debian/control.in, substituting the soversion for both libs.66
75# For wily onwards, we also add an entry for the vivid versions to "Conflicts:" and "Replaces:".67process "$dir/control.in" >"$dir/control"
7668process "$dir/libmedia-hub-client.install.in" >"$dir/libmedia-hub-client${MEDIA_HUB_SOVERSION}.install"
77infile="${dir}"/control.in69process "$dir/libmedia-hub-common.install.in" >"$dir/libmedia-hub-common${MEDIA_HUB_SOVERSION}.install"
78outfile="${dir}"/control
79warning_msg $infile
80cat $warning $infile \
81 | sed -e "s/@MEDIA_HUB_SOVERSION@/${soversion}/" > "$outfile"
82
83[ "$distro" != "vivid" ] && {
84 sed -i -e "/Replaces: libdbus-cpp4,/a\
85\ libdbus-cpp${vivid_soversion}," \
86 "$outfile"
87}
88
89# Generate the install files, naming them according to the soversion.
90
91# Install file for binary package
92infile="${dir}"/libmedia-hub-client.install.in
93outfile="${dir}"/libmedia-hub-client${soversion}.install
94warning_msg "$infile"
95cat $warning "$infile" >"$outfile"
96
97infile="${dir}"/libmedia-hub-common.install.in
98outfile="${dir}"/libmedia-hub-common${soversion}.install
99warning_msg "$infile"
100cat $warning "$infile" >"$outfile"
10170
102exit 071exit 0
10372
=== modified file 'debian/control'
--- debian/control 2016-03-04 18:17:11 +0000
+++ debian/control 2016-03-29 18:34:58 +0000
@@ -20,9 +20,9 @@
20 libboost-program-options-dev (>=1.53),20 libboost-program-options-dev (>=1.53),
21 libboost-system-dev (>=1.53),21 libboost-system-dev (>=1.53),
22 libdbus-1-dev,22 libdbus-1-dev,
23 libdbus-cpp-dev (>= 5.0.0),23 libdbus-cpp-dev (>= 4.3.0),
24 libgoogle-glog-dev,24 libgoogle-glog-dev,
25 libhybris-dev,25 libhybris-dev (>=0.1.0+git20131207+e452e83-0ubuntu30),
26 libprocess-cpp-dev,26 libprocess-cpp-dev,
27 libproperties-cpp-dev,27 libproperties-cpp-dev,
28 libgstreamer1.0-dev,28 libgstreamer1.0-dev,
@@ -42,8 +42,8 @@
42Section: libdevel42Section: libdevel
43Architecture: any43Architecture: any
44Multi-Arch: same44Multi-Arch: same
45Depends: libmedia-hub-common4 (= ${binary:Version}),45Depends: libmedia-hub-common5 (= ${binary:Version}),
46 libmedia-hub-client4 (= ${binary:Version}),46 libmedia-hub-client5 (= ${binary:Version}),
47 ${misc:Depends},47 ${misc:Depends},
48 libproperties-cpp-dev,48 libproperties-cpp-dev,
49Suggests: libmedia-hub-doc49Suggests: libmedia-hub-doc
@@ -64,7 +64,7 @@
64 .64 .
65 This package contains the runtime.65 This package contains the runtime.
6666
67Package: libmedia-hub-common467Package: libmedia-hub-common5
68Architecture: any68Architecture: any
69Multi-Arch: same69Multi-Arch: same
70Depends: ${misc:Depends},70Depends: ${misc:Depends},
@@ -75,7 +75,7 @@
75 .75 .
76 This package contains the common libraries.76 This package contains the common libraries.
7777
78Package: libmedia-hub-client478Package: libmedia-hub-client5
79Architecture: any79Architecture: any
80Multi-Arch: same80Multi-Arch: same
81Depends: ${misc:Depends},81Depends: ${misc:Depends},
8282
=== modified file 'debian/get-versions.sh'
--- debian/get-versions.sh 2015-11-22 21:01:02 +0000
+++ debian/get-versions.sh 2016-03-29 18:34:58 +0000
@@ -38,7 +38,7 @@
38# Write the various version numbers into a bunch of files. This allows38# Write the various version numbers into a bunch of files. This allows
39# us to easily pick them up from both gen-debian-files.sh and CMakeLists.txt.39# us to easily pick them up from both gen-debian-files.sh and CMakeLists.txt.
4040
41distro=$(lsb_release -c -s)41[ -n "$SERIES" ] || SERIES="$(lsb_release -c -s)"
4242
43full_version=$(cat "${dir}"/VERSION)43full_version=$(cat "${dir}"/VERSION)
4444
@@ -51,13 +51,15 @@
51vivid_major=$(echo $vivid_full_version | cut -d'.' -f1)51vivid_major=$(echo $vivid_full_version | cut -d'.' -f1)
52vivid_soversion=$vivid_major52vivid_soversion=$vivid_major
5353
54if [ "$distro" = "vivid" ]54if [ "$SERIES" = "vivid" ]
55then55then
56 soversion=${vivid_soversion}56 soversion=${vivid_soversion}
57else57else
58 soversion="${major}"58 soversion="${major}"
59fi59fi
60[ -n $soversion ]60[ -n "$soversion" ]
61
62echo "Using SOVERSION $soversion in $SERIES." >&2
6163
62echo ${full_version} >${output_dir}/libmedia-hub.full-version64echo ${full_version} >${output_dir}/libmedia-hub.full-version
63echo ${major} >${output_dir}/libmedia-hub.major-version65echo ${major} >${output_dir}/libmedia-hub.major-version
6466
=== modified file 'debian/rules'
--- debian/rules 2015-11-22 21:01:02 +0000
+++ debian/rules 2016-03-29 18:34:58 +0000
@@ -34,5 +34,5 @@
34 dh_installdeb34 dh_installdeb
3535
36override_dh_auto_clean:36override_dh_auto_clean:
37 /bin/sh $(CURDIR)/debian/gen-debian-files.sh $(CURDIR)/debian37 /bin/sh $(CURDIR)/debian/bileto_pre_release_hook
38 dh_auto_clean38 dh_auto_clean

Subscribers

People subscribed via source and target branches