Skip to content

Commit 11d8ded

Browse files
author
Digital-Larry
authored
[CTD-264] create Vyos build (#6)
* CTD-264 updated build.sh to make etch builds, couple other cosmetic changes * CTD-264 bumped version, modified package dependencies to match Vyos at Debian 6 level. * CTD-264 updated changelog * CTD-264 added section for 32-bit Debian etch to build.sh, seems to have gotten deleted in a prior code reorganization.
1 parent 434f405 commit 11d8ded

File tree

3 files changed

+56
-43
lines changed

3 files changed

+56
-43
lines changed

connectd/DEBIAN/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Package: connectd
2-
Version: 2.2.4
2+
Version: 2.2.5
33
Section: non-free/net
44
Priority: optional
55
Homepage: https://remote.it
66
Architecture: armhf
7-
Depends: libc6 (>= 2.1), mawk (>= 1.0), grep (>= 2.1.6), curl (>= 7.25.0), psmisc (>= 22.19-1)
7+
Depends: libc6 (>= 2.1), mawk (>= 1.0), grep (>= 2.1.6), curl (>= 7.21.0), psmisc (>= 22.11-1), cron (>= 3.0)
88
Maintainer: Gary Worsham <[email protected]>
99
Description: remote.it is a cloud service that provides secure connections to
1010
your networked devices across the public internet, even those located behind
180 Bytes
Binary file not shown.

scripts/build.sh

Lines changed: 54 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# sorts out Lintian errors/warnings into individual
55
# text files
66
pkg=connectd
7-
ver=2.1.1
7+
ver=2.1.4
8+
MODIFIED="February 08, 2019"
89
pkgFolder="$pkg"
910
# set architecture
1011
controlFilePath="$pkgFolder"/DEBIAN
@@ -102,12 +103,30 @@ sudo chown -R "$user":"$user" "$pkgFolder"
102103
cwd="$(pwd)/build"
103104
mkdir -p $cwd
104105

106+
# build() takes 4 parameters: PLATFORM, arch, buildDeb, and tag (optional)
107+
# PLATFORM indicates the remote.it daemon architecture, e.g. arm-linaro-pi
108+
# buildDeb=0 means make a tar file. buildDeb=1 means make a Debian file
109+
# arch is the Debian architecture, e.g. armhf or amd64
110+
# not required to pass in "arch" if buildDeb=0
111+
# tag is an optional string to put in the file name to distinguish Debian packages
112+
# which have the same "arch" but different "PLATFORM"
113+
105114
build() {
106115
echo
107116
echo "========================================"
108117

109118
echo
110-
119+
PLATFORM=$1
120+
buildDeb=$2
121+
if [ $buildDeb -eq 1 ]; then
122+
arch=$3
123+
else
124+
# give it a default arch, it doesn't matter as we are just building a deb from which to extract the tar file
125+
arch="amd64"
126+
fi
127+
if [ "$4" != "" ]; then
128+
tag="$4"
129+
fi
111130
setEnvironment "$arch" "$PLATFORM"
112131
# put build date into connected_options
113132
setOption options "BUILDDATE" "\"$(date)\""
@@ -125,6 +144,12 @@ build() {
125144

126145
echo "Building Debian package for architecture: $arch"
127146
echo "PLATFORM=$PLATFORM"
147+
# tag variable was added to allow building different Debian packages with the same architecture
148+
# e.g. for Vyos I had to make a package using an older daemon architecture but it's still considered
149+
# amd64 or i386 architecture from the dpkg program's point of view
150+
if [ "$tag" != "" ]; then
151+
echo "tag = $tag"
152+
fi
128153

129154
#--------------------------------------------------------
130155
# for Deb pkg build, remove builddate.txt file
@@ -143,7 +168,7 @@ build() {
143168
fi
144169

145170
version=$(grep -i version "$controlFile" | awk '{ print $2 }')
146-
filename="${pkg}_${version}_$arch".deb
171+
filename="${pkg}_${version}_$arch$tag".deb
147172
mv "$pkgFolder".deb "$cwd/$filename"
148173
else
149174
echo "Building tar package for PLATFORM: $PLATFORM"
@@ -158,79 +183,67 @@ build() {
158183
version=$(grep -i version "$controlFile" | awk '{ print $2 }')
159184
echo "Extracting contents to tar file"
160185
./scripts/extract-scripts.sh "$pkgFolder".deb
161-
filename="${pkg}_${version}_$PLATFORM".tar
186+
filename="${pkg}_${version}_$PLATFORM$tag".tar
162187
mv "$pkgFolder".deb.tar "$cwd/$filename"
163188

164189
fi
190+
ls -l "$cwd/$filename"
165191

166192
}
167193

168-
buildDeb=0
169-
arch="armhf"
170-
PLATFORM=arm-android
171194
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
172195
setOption options "PSFLAGS" "ax"
173-
build
196+
build arm-android 0
174197

175-
buildDeb=0
176-
arch="armhf"
177-
PLATFORM=arm-android_static
178198
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
179199
setOption options "PSFLAGS" "ax"
180-
build
200+
build arm-android_static 0
181201

182-
buildDeb=1
183202
setOption options "PSFLAGS" "ax"
184203
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
185-
arch="armhf"
186-
PLATFORM=arm-linaro-pi
187204
setOption options "BASEDIR" ""
188-
build
205+
build arm-linaro-pi 1 armhf
189206

190-
buildDeb=1
191207
setOption options "PSFLAGS" "ax"
192208
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
193-
arch="armel"
194-
PLATFORM=arm-linaro-pi
195209
setOption options "BASEDIR" ""
196-
build
210+
build arm-linaro-pi 1 armel
197211

198-
buildDeb=0
199212
setOption options "PSFLAGS" "ax"
200213
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
201-
arch="i386"
202-
PLATFORM=x86-etch
203214
setOption options "BASEDIR" ""
204-
build
215+
build x86-etch 0
205216

206-
buildDeb=1
207-
arch="amd64"
208217
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
209-
PLATFORM=x86_64-ubuntu16.04
210218
setOption options "BASEDIR" ""
211219
setOption options "PSFLAGS" "ax"
212-
build
220+
build x86_64-ubuntu16.04 1 amd64
213221

214-
buildDeb=0
215-
arch="armhf"
216-
PLATFORM=arm-linaro-pi
217222
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
218223
setOption options "PSFLAGS" "ax"
219-
build
224+
build arm-linaro-pi 0
220225

221-
buildDeb=0
222-
arch="arm-gnueabi"
223-
PLATFORM=arm-gnueabi
224226
setOption options "PSFLAGS" "w"
225227
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
226-
build
228+
build arm-gnueabi 0
229+
230+
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
231+
setOption options "BASEDIR" ""
232+
setOption options "PSFLAGS" "ax"
233+
build x86_64-etch 0
234+
235+
# here we are using the tag "-etch" to create an amd64 Debian architecture package for the older
236+
# Debian "Etch" architecture that needs to be distinct from the one for Ubuntu 16.04
237+
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
238+
setOption options "BASEDIR" ""
239+
setOption options "PSFLAGS" "ax"
240+
build x86_64-etch 1 amd64 -etch
227241

228-
buildDeb=0
229-
arch="amd64"
230-
PLATFORM=x86_64-etch
242+
# here we are using the tag "-etch" to create an i386 Debian architecture package for the older
243+
# Debian "Etch" architecture that needs to be distinct from the one for Ubuntu 16.04
231244
setOption options "mac" '$'"(ip addr | grep ether | tail -n 1 | awk" "'{ print" '$2' "}')"
232245
setOption options "BASEDIR" ""
233246
setOption options "PSFLAGS" "ax"
234-
build
247+
build x86-etch 1 i386 -etch
235248

236-
ls -l "build/${pkg}"*.*
249+
echo "====== build.sh $ver completed =============="

0 commit comments

Comments
 (0)