Skip to content

Commit 1af6b15

Browse files
committed
Merge branch 'develop' into Fledge
2 parents a7e91bd + 7edb6e9 commit 1af6b15

File tree

7 files changed

+599
-99
lines changed

7 files changed

+599
-99
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Build
1212
packages/Debian/build/
13+
packages/RPM/build/
1314

1415
# Archived packages
1516
plugins/archive

README.rst

Lines changed: 54 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Internal Structure
1818
The repository contains the following set of files:
1919

2020
- Files named with **make_** prefix, such as ``make_deb``, ``make_rpm``, are the shell scripts used to build the package. The script runs as per the architecture to build.
21-
- The **packages** folder contains the list package types to build. It contains *Debian* and *rpmbuild*, latter for RedHat/Centos RPM creation.
21+
- The **packages** folder contains the list package types to build. It contains *Debian* and *RPM*, latter for RedHat/Centos RPM creation.
2222

2323
- Inside the *packages/Debian* folder, we have the **architecture** folders, plus a *common* folder containing files that are common to all the architectures. The architectures that we provide at the moment are *aarch64*, *armv7l* and *x86_64*.
2424

@@ -29,6 +29,11 @@ The repository contains the following set of files:
2929

3030
- In the *build/architecture* folder, folders and files that have a sequence number are a previous package build.
3131

32+
- Inside the *packages/RPM/SPECS* folder, which contains RPM spec-based file, i.e. fledge.spec needed for the creation of the package.
33+
34+
- In the *packages/RPM/build/RPMS/x86_64* folder which contains the actual rpm package.
35+
- In the *packages/RPM/build/BUILDROOT/fledge-1.7.0-1.x86_64* folder which contains the RPM package file structure
36+
3237

3338
The make_deb Script
3439
===================
@@ -121,87 +126,91 @@ The make_rpm Script
121126
===================
122127
.. code-block:: console
123128
124-
$ ./make_rpm --help
125-
make_rpm help [clean|cleanall]
126-
This script is used to create the RPM package of Fledge
127-
Arguments:
128-
help - Display this help text
129-
clean - Remove all the old versions saved in format .XXXX
130-
cleanall - Remove all the versions, including the last one
129+
$ ./make_rpm -h
130+
make_rpm [-h] [-c] [-a] [-s] [-b <branch>]
131+
This script is used to create the RPM package of Fledge
132+
133+
Arguments:
134+
-h - Display this help text
135+
-c - Remove all the old versions saved in format .XXXX
136+
-a - Remove all the versions, including the last one
137+
-s - Skip Fledge building using the binaries already available
138+
-b - Branch to base package on
131139
$
132140
133141
Building a RPM Package
134142
======================
135143

136-
First, make sure that Fledge is properly installed via ``make install`` somewhere on your environment (default is */usr/local/fledge*).
144+
``make_rpm`` script automatically do Fledge clone repo with branch master (by default) and then ``sudo make install`` followed by some prerequisite
145+
146+
You may override the branch with ``-b`` or skip Fledge build with ``-s``. For more info just see its help ``-h``
147+
137148
Next, *x86* is the only currently supported architecture for RedHat/Centos.
138-
Finally, run the ``make_rpm`` command:
149+
139150

140151
.. code-block:: console
141152
142153
$ ./make_rpm
143-
The package root directory is : /home/fledge/repos/fledge-pkg
144-
The Fledge directory is : /home/fledge/fledge
145-
The Fledge version is : 1.5.2
146-
The package will be built in : /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64
147-
The package name is : fledge-1.5.2-1.x86_64
154+
The package root directory is : /home/fledge/fledge-pkg
155+
The FogLAMP directory is : /home/fledge/Fledge
156+
The FogLAMP version is : 1.7.0
157+
The package will be built in : /home/fledge/fledge-pkg/packages/RPM/build/RPMS/x86_64
158+
The package name is : fledge-1.7.0-1.x86_64
148159
149-
Saving the old working environment as fledge-1.5.2-1.x86_64.0077
150160
Populating the package and updating version in control file...Done.
151161
Prepare data directory
152-
Saving the old package as fledge-1.5.2-1.x86_64.rpm.0001
153162
Building the new package...
154-
Processing files: fledge-1.5.2-1.x86_64
155-
Provides: fledge = 1.5.2-1 fledge(x86-64) = 1.5.2-1
163+
Processing files: fledge-1.7.0-1.x86_64
164+
Provides: fledge = 1.7.0-1 fledge(x86-64) = 1.7.0-1
156165
Requires(interp): /bin/sh /bin/sh /bin/sh
157166
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
158167
Requires(pre): /bin/sh
159168
Requires(post): /bin/sh
160169
Requires(preun): /bin/sh
161-
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/repos/fledge-pkg/packages/rpmbuild/BUILDROOT/fledge-1.5.2-1.x86_64
162-
Wrote: /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64/fledge-1.5.2-1.x86_64.rpm
170+
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/fledge-pkg/packages/RPM/build/BUILDROOT/fledge-1.7.0-1.x86_64
171+
Wrote: /home/fledge/fledge-pkg/packages/RPM/build/RPMS/x86_64/fledge-1.7.0-1.x86_64.rpm
163172
Building Complete.
164173
$
165174
166175
The result will be:
167176

168177
.. code-block:: console
169178
170-
$ ls -l packages/rpmbuild/RPMS/x86_64
179+
$ ls -l packages/RPM/build/RPMS/x86_64
171180
total 6444
172-
-rw-rw-r-- 1 fledge fledge 6597376 May 10 02:08 fledge-1.5.2-1.x86_64.rpm
181+
-rw-rw-r-- 1 fledge fledge 9715306 Sep 27 02:08 fledge-1.7.0-1.x86_64.rpm
173182
$
174183
175184
If you execute the ``make_rpm`` command again, you will see:
176185

177186
.. code-block:: console
178187
179188
$ ./make_rpm
180-
The package root directory is : /home/fledge/repos/fledge-pkg
181-
The Fledge directory is : /home/fledge/fledge
182-
The Fledge version is : 1.5.2
183-
The package will be built in : /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64
184-
The package name is : fledge-1.5.2-1.x86_64
189+
The package root directory is : /home/fledge/fledge-pkg
190+
The FogLAMP directory is : /home/fledge/Fledge
191+
The FogLAMP version is : 1.7.0
192+
The package will be built in : /home/fledge/fledge-pkg/packages/RPM/build/RPMS/x86_64
193+
The package name is : fledge-1.7.0-1.x86_64
185194
186-
Saving the old working environment as fledge-1.5.2-1.x86_64.0079
195+
Saving the old working environment as fledge-1.7.0-1.x86_64.0001
187196
Populating the package and updating version in control file...Done.
188197
Prepare data directory
189-
Saving the old package as fledge-1.5.2-1.x86_64.rpm.0001
198+
Saving the old package as fledge-1.7.0-1.x86_64.rpm.0001
190199
Building the new package...
191-
Processing files: fledge-1.5.2-1.x86_64
192-
Provides: fledge = 1.5.2-1 fledge(x86-64) = 1.5.2-1
200+
Processing files: fledge-1.7.0-1.x86_64
201+
Provides: fledge = 1.7.0-1 fledge(x86-64) = 1.7.0-1
193202
Requires(interp): /bin/sh /bin/sh /bin/sh
194203
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
195204
Requires(pre): /bin/sh
196205
Requires(post): /bin/sh
197206
Requires(preun): /bin/sh
198-
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/repos/fledge-pkg/packages/rpmbuild/BUILDROOT/fledge-1.5.2-1.x86_64
199-
Wrote: /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64/fledge-1.5.2-1.x86_64.rpm
207+
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/fledge-pkg/packages/RPM/build/BUILDROOT/fledge-1.7.0-1.x86_64
208+
Wrote: /home/fledge/fledge-pkg/packages/RPM/build/RPMS/x86_64/fledge-1.7.0-1.x86_64.rpm
200209
Building Complete.
201-
$ ls -l packages/rpmbuild/RPMS/x86_64
210+
$ ls -l packages/RPM/build/RPMS/x86_64
202211
total 12888
203-
-rw-rw-r-- 1 fledge fledge 6597420 May 10 02:10 fledge-1.5.2-1.x86_64.rpm
204-
-rw-rw-r-- 1 fledge fledge 6597376 May 10 02:08 fledge-1.5.2-1.x86_64.rpm.0001
212+
-rw-rw-r-- 1 fledge fledge 9715306 Sep 27 02:10 fledge-1.7.0-1.x86_64.rpm
213+
-rw-rw-r-- 1 fledge fledge 9715326 Sep 27 02:08 fledge-1.7.0-1.x86_64.rpm.0001
205214
$
206215
207216
... where the previous build is now marked with the suffix *.0001*.
@@ -211,9 +220,17 @@ If you execute the ``make_rpm`` command again, you will see:
211220
Cleaning the Package Folder
212221
===========================
213222

223+
a) Debian
224+
214225
Use the ``clean`` option to remove all the old packages and the files used to make the package.
215226
Use the ``cleanall`` option to remove all the packages and the files used to make the package.
216227

228+
b) RPM
229+
230+
Use the ``-a`` option to remove all the RPM packages and the files used to make the package.
231+
Use the ``-c`` option to remove all the old versions of RPM packages and the files used to make the package.
232+
233+
217234

218235
Packaging for Plugins
219236
======================

make_deb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ echo "Done."
127127
echo "Prepare data directory"
128128
mv data data.new
129129
cd data.new
130+
rm -rf backup
130131
rm -rf core.err
131132
rm -rf etc/certs/*
132133
rm -rf fledge.db
134+
rm -rf logs
135+
rm -rf scripts
136+
rm -rf support
133137
rm -rf var
134138

135139
# Add customised files

0 commit comments

Comments
 (0)