diff mbox series

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

Message ID 20191023071138.26395-4-adrian.freihofer@siemens.com
State Accepted
Headers show
Series block force_ro, rename binaires | expand

Commit Message

Freihofer, Adrian Oct. 23, 2019, 7:11 a.m. UTC
This adds a "swupdate-" prefix to all binary files in the tools
directory.
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

Patch

diff --git a/.gitignore b/.gitignore
index af9f5cc..652888b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,10 +35,11 @@  swupdate
 swupdate_unstripped*
 lua_swupdate.so*
 tools/*_unstripped
-tools/client
-tools/progress
-tools/sendtohawkbit
-tools/hawkbitcfg
+tools/swupdate-client
+tools/swupdate-progress
+tools/swupdate-sendtohawkbit
+tools/swupdate-hawkbitcfg
+tools/swupdate-sysrestart
 tools/*.map
 tools/*.out
 
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 \
 	 swupdate-sysrestart.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