diff mbox series

[v2,3/3] Makefile: rename tools binaries

Message ID 20191021154739.12228-3-adrian.freihofer@siemens.com
State Changes Requested
Headers show
Series [v2,1/3] add .editorconfig file | expand

Commit Message

Freihofer, Adrian Oct. 21, 2019, 3:47 p.m. UTC
This adds a "swupdate-" prefix to all binary files in the tools
Binaries should not be installed as /usr/bin/client or
/usr/bin/progress. On the one hand, it is risky for name conflicts.
On the other hand, the name gives little indication of the meaning of
the binary. This renaming is also required by Debian maintainers.

Another reason for the renaming is that do_install in meta-swupdate is
currently defective. The binaries are installed twice, once with and
once without the swupdate prefix. If the binaries are already installed
correctly named by "make install", the code that renames and duplicates
the binaries can be deleted from meta-swupdate.

This change also fixes an inconsistency in the "make install" target.
The recently added service files call the binaries named swupdate-*.
But these binaries have not yet been installed. The inconsistency was
overlooked because meta-swupdate provides two copies of the binaries.

The swupdate-sysrestart was missing in the .gitignore file.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
 .gitignore                                          | 9 +++++----
 tools/Makefile                                      | 8 ++++----
 tools/{client.c => swupdate-client.c}               | 0
 tools/{hawkbitcfg.c => swupdate-hawkbitcfg.c}       | 0
 tools/{progress.c => swupdate-progress.c}           | 0
 tools/{sendtohawkbit.c => swupdate-sendtohawkbit.c} | 0
 6 files changed, 9 insertions(+), 8 deletions(-)
 rename tools/{client.c => swupdate-client.c} (100%)
 rename tools/{hawkbitcfg.c => swupdate-hawkbitcfg.c} (100%)
 rename tools/{progress.c => swupdate-progress.c} (100%)
 rename tools/{sendtohawkbit.c => swupdate-sendtohawkbit.c} (100%)
diff mbox series


diff --git a/.gitignore b/.gitignore
index af9f5cc..652888b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,10 +35,11 @@  swupdate
diff --git a/tools/Makefile b/tools/Makefile
index ca0a4a3..206b0eb 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -9,10 +9,10 @@ 
 # SPDX-License-Identifier:     GPL-2.0-or-later
 lib-y += \
-	 client.o \
-	 progress.o \
-	 hawkbitcfg.o \
-	 sendtohawkbit.o \
+	 swupdate-client.o \
+	 swupdate-progress.o \
+	 swupdate-hawkbitcfg.o \
+	 swupdate-sendtohawkbit.o \
 # # Uncomment the next lines to integrate the compiling/linking of
diff --git a/tools/client.c b/tools/swupdate-client.c
similarity index 100%
rename from tools/client.c
rename to tools/swupdate-client.c
diff --git a/tools/hawkbitcfg.c b/tools/swupdate-hawkbitcfg.c
similarity index 100%
rename from tools/hawkbitcfg.c
rename to tools/swupdate-hawkbitcfg.c
diff --git a/tools/progress.c b/tools/swupdate-progress.c
similarity index 100%
rename from tools/progress.c
rename to tools/swupdate-progress.c
diff --git a/tools/sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c
similarity index 100%
rename from tools/sendtohawkbit.c
rename to tools/swupdate-sendtohawkbit.c