All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] backports: re-introduce make uninstall
@ 2013-06-16 23:52 ASIC Felix
  2013-06-19 21:59 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: ASIC Felix @ 2013-06-16 23:52 UTC (permalink / raw)
  To: do-not, backports

Signed-off-by: Felix Bitterli <ic.felix@gmail.com>
---
 backport/Makefile.real               |   10 ++++++++++
 backport/scripts/compress_modules.sh |   12 +-----------
 backport/scripts/mod_helpers.sh      |   15 +++++++++++++++
 backport/scripts/uninstall.sh        |   17 +++++++++++++++++
 4 files changed, 42 insertions(+), 11 deletions(-)
 create mode 100644 backport/scripts/mod_helpers.sh
 create mode 100755 backport/scripts/uninstall.sh

diff --git a/backport/Makefile.real b/backport/Makefile.real
index 2a1f640..40d91bd 100644
--- a/backport/Makefile.real
+++ b/backport/Makefile.real
@@ -101,6 +101,16 @@ install: modules
 .PHONY: modules_install
 modules_install: install

+.PHONY: uninstall
+uninstall:
+	@./scripts/uninstall.sh
+	@/sbin/depmod -a
+	@./scripts/update-initramfs.sh $(KLIB)
+	@echo
+	@echo Your backported driver modules should be uninstalled now.
+	@echo Reboot.
+	@echo
+	
 .PHONY: clean
 clean:
 	@$(MAKE) -f Makefile.build clean
diff --git a/backport/scripts/compress_modules.sh
b/backport/scripts/compress_modules.sh
index bbf264f..82368b2 100755
--- a/backport/scripts/compress_modules.sh
+++ b/backport/scripts/compress_modules.sh
@@ -2,17 +2,7 @@

 set -e

-function mod_filename()
-{
-	which modinfo > /dev/null 2>&1
-	if [[ $? -eq 0 ]]; then
-		MOD_QUERY="modinfo -F filename"
-	else
-		MOD_QUERY="modprobe -l"
-	fi
-	mod_path="$($MOD_QUERY $1 | tail -1)"
-	echo $(basename "$mod_path")
-}
+source ./scripts/mod_helpers.sh

 if test "$(mod_filename mac80211)" = "mac80211.ko.gz" ; then
 	for driver in $(find "$1" -type f -name *.ko); do
diff --git a/backport/scripts/mod_helpers.sh b/backport/scripts/mod_helpers.sh
new file mode 100644
index 0000000..b360a17
--- /dev/null
+++ b/backport/scripts/mod_helpers.sh
@@ -0,0 +1,15 @@
+function mod_filename()
+{
+	which modinfo > /dev/null 2>&1
+	if [[ $? -eq 0 ]]; then
+		MOD_QUERY="modinfo -F filename"
+	else
+		MOD_QUERY="modprobe -l"
+	fi
+	mod_path="$($MOD_QUERY $1 | tail -1)"
+	echo $(basename "$mod_path")
+}
diff --git a/backport/scripts/uninstall.sh b/backport/scripts/uninstall.sh
new file mode 100755
index 0000000..2dcf4da
--- /dev/null
+++ b/backport/scripts/uninstall.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+source ./scripts/mod_helpers.sh
+
+if test "$(mod_filename mac80211)" = "mac80211.ko.gz" ; then
+	compr=".gz"
+else
+	compr=""
+fi
+
+for driver in $(find -type f -name *.ko); do
+	mod_name=$KLIB"updates/"$driver$compr
+	echo UNINSTALLING $mod_name
+	rm -f $mod_name
+done
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] backports: re-introduce make uninstall
  2013-06-16 23:52 [PATCH v2] backports: re-introduce make uninstall ASIC Felix
@ 2013-06-19 21:59 ` Luis R. Rodriguez
       [not found]   ` <CAJqaZwxoKwwXX2ROh2XZ113Fbi+7GO_qnM03ZYvnoGmCBVdXNQ@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2013-06-19 21:59 UTC (permalink / raw)
  To: ASIC Felix; +Cc: do-not, backports

On Sun, Jun 16, 2013 at 4:52 PM, ASIC Felix <ic.felix@gmail.com> wrote:
> diff --git a/backport/scripts/uninstall.sh b/backport/scripts/uninstall.sh
> new file mode 100755
> index 0000000..2dcf4da
> --- /dev/null
> +++ b/backport/scripts/uninstall.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +
> +set -e
> +
> +source ./scripts/mod_helpers.sh
> +
> +if test "$(mod_filename mac80211)" = "mac80211.ko.gz" ; then
> +       compr=".gz"
> +else
> +       compr=""
> +fi
> +
> +for driver in $(find -type f -name *.ko); do

Looks good except for the path here, as it is this would search from
the current path, no?

> +       mod_name=$KLIB"updates/"$driver$compr

and to make things clearer, can you do ${driver}${compr}

> +       echo UNINSTALLING $mod_name

No need for caps please.

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3] backports: re-introduce make uninstall
       [not found]   ` <CAJqaZwxoKwwXX2ROh2XZ113Fbi+7GO_qnM03ZYvnoGmCBVdXNQ@mail.gmail.com>
@ 2013-06-21  5:02     ` ASIC Felix
  2013-06-26 16:49       ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: ASIC Felix @ 2013-06-21  5:02 UTC (permalink / raw)
  To: do-not, backports

Signed-off-by: Felix Bitterli <ic.felix@gmail.com>
---
 backport/Makefile.real               |   10 ++++++++++
 backport/scripts/compress_modules.sh |   13 ++-----------
 backport/scripts/mod_helpers.sh      |   11 +++++++++++
 backport/scripts/uninstall.sh        |   17 +++++++++++++++++
 4 files changed, 40 insertions(+), 11 deletions(-)
 create mode 100644 backport/scripts/mod_helpers.sh
 create mode 100755 backport/scripts/uninstall.sh

diff --git a/backport/Makefile.real b/backport/Makefile.real
index 2a1f640..40d91bd 100644
--- a/backport/Makefile.real
+++ b/backport/Makefile.real
@@ -101,6 +101,16 @@ install: modules
 .PHONY: modules_install
 modules_install: install

+.PHONY: uninstall
+uninstall:
+	@./scripts/uninstall.sh
+	@/sbin/depmod -a
+	@./scripts/update-initramfs.sh $(KLIB)
+	@echo
+	@echo Your backported driver modules should be uninstalled now.
+	@echo Reboot.
+	@echo
+	
 .PHONY: clean
 clean:
 	@$(MAKE) -f Makefile.build clean
diff --git a/backport/scripts/compress_modules.sh
b/backport/scripts/compress_modules.sh
index bbf264f..b2034c2 100755
--- a/backport/scripts/compress_modules.sh
+++ b/backport/scripts/compress_modules.sh
@@ -2,20 +2,11 @@

 set -e

-function mod_filename()
-{
-	which modinfo > /dev/null 2>&1
-	if [[ $? -eq 0 ]]; then
-		MOD_QUERY="modinfo -F filename"
-	else
-		MOD_QUERY="modprobe -l"
-	fi
-	mod_path="$($MOD_QUERY $1 | tail -1)"
-	echo $(basename "$mod_path")
-}
+source ./scripts/mod_helpers.sh

 if test "$(mod_filename mac80211)" = "mac80211.ko.gz" ; then
 	for driver in $(find "$1" -type f -name *.ko); do
+		echo COMPRESS $driver
 		gzip -9 $driver
 	done
 fi
diff --git a/backport/scripts/mod_helpers.sh b/backport/scripts/mod_helpers.sh
new file mode 100644
index 0000000..0845b3e
--- /dev/null
+++ b/backport/scripts/mod_helpers.sh
@@ -0,0 +1,11 @@
+function mod_filename()
+{
+	which modinfo > /dev/null 2>&1
+	if [[ $? -eq 0 ]]; then
+		MOD_QUERY="modinfo -F filename"
+	else
+		MOD_QUERY="modprobe -l"
+	fi
+	mod_path="$($MOD_QUERY $1 | tail -1)"
+	echo $(basename "$mod_path")
+}
diff --git a/backport/scripts/uninstall.sh b/backport/scripts/uninstall.sh
new file mode 100755
index 0000000..7b54d2a
--- /dev/null
+++ b/backport/scripts/uninstall.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+source ./scripts/mod_helpers.sh
+
+if test "$(mod_filename mac80211)" = "mac80211.ko.gz" ; then
+	compr=".gz"
+else
+	compr=""
+fi
+
+for driver in $(find ${BACKPORT_PWD} -type f -name *.ko); do
+	mod_name=${KLIB}${KMODDIR}/${driver}${compr}
+	echo "  uninstall" $mod_name
+	rm -f $mod_name
+done
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] backports: re-introduce make uninstall
  2013-06-21  5:02     ` [PATCH v3] " ASIC Felix
@ 2013-06-26 16:49       ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2013-06-26 16:49 UTC (permalink / raw)
  To: ASIC Felix; +Cc: do-not, backports

On Thu, Jun 20, 2013 at 10:02 PM, ASIC Felix <ic.felix@gmail.com> wrote:
> Signed-off-by: Felix Bitterli <ic.felix@gmail.com>

Great! I just adjusted the commit log with this below, applied and
pushed! Thanks!

    This approach only uninstalls modules you have built
    previously on your current build directory for backports.
    If this requires adjustments then we'll have to just have
    to use our own new backports KMODDIR.

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-26 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-16 23:52 [PATCH v2] backports: re-introduce make uninstall ASIC Felix
2013-06-19 21:59 ` Luis R. Rodriguez
     [not found]   ` <CAJqaZwxoKwwXX2ROh2XZ113Fbi+7GO_qnM03ZYvnoGmCBVdXNQ@mail.gmail.com>
2013-06-21  5:02     ` [PATCH v3] " ASIC Felix
2013-06-26 16:49       ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.