all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint
@ 2023-06-23  7:08 Dominik Csapak
  2023-06-23  7:08 ` [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint' Dominik Csapak
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

from 'eslint' to 'pve-eslint' to avoid a conflict with debians 'eslint'
package which ships the same binary

to avoid breakage, pull out the eslint binary into a make variable and
use pve-eslint if it exists, and eslint otherwise

changes from v2:
* use $(shell command) instead of $(wildcard), thanks @thomas for the
  suggestions, this makes it shorter + we don't have to use the full
  path
* added Suggested-by trailers

changes from v1:
* use $(ESLINT)
* use $(wildcard) make builtin to check if pve-eslint exists, use eslint as fallback
* introduce defines.mk in pmg-gui for ESLINT variable

pve-eslint:

Dominik Csapak (1):
  change binary name from 'eslint' to 'pve-eslint'

 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

pve-manager:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk            | 2 ++
 www/manager6/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

proxmox-widget-toolkit:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 src/Makefile   | 6 +++---
 src/defines.mk | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

pmg-gui:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk         | 1 +
 js/Makefile        | 6 ++++--
 js/mobile/Makefile | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

proxmox-backup:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk   | 1 +
 www/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.30.2





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

* [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint'
  2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
@ 2023-06-23  7:08 ` Dominik Csapak
  2023-08-30  9:42   ` [pve-devel] applied: " Thomas Lamprecht
  2023-06-23  7:08 ` [pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists Dominik Csapak
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

so that we don't conflict with 'eslint' package in debian, which ships
the same binary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/links b/debian/links
index 99342ed..0a1546f 100644
--- a/debian/links
+++ b/debian/links
@@ -1 +1 @@
-usr/share/nodejs/pve-eslint/bin/app.js usr/bin/eslint
+usr/share/nodejs/pve-eslint/bin/app.js usr/bin/pve-eslint
-- 
2.30.2





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

* [pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
  2023-06-23  7:08 ` [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint' Dominik Csapak
@ 2023-06-23  7:08 ` Dominik Csapak
  2023-06-24 15:45   ` [pve-devel] applied: " Thomas Lamprecht
  2023-06-23  7:08 ` [pve-devel] [PATCH widget-toolkit " Dominik Csapak
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 defines.mk            | 2 ++
 www/manager6/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index 3a5792ad..811f3483 100644
--- a/defines.mk
+++ b/defines.mk
@@ -19,3 +19,5 @@ WWWTOUCHDIR=${WWWBASEDIR}/touch
 WWWCSSDIR=${WWWBASEDIR}/css
 WWWFONTSDIR=${WWWBASEDIR}/css/fonts
 WWWJSDIR=${WWWBASEDIR}/js
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
+
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 2d884f4a..ff113aa2 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -314,13 +314,13 @@ WIDGETKIT=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
 all:
 
 .lint-incremental: $(JSSRC)
-	eslint $?
+	$(ESLINT) $?
 	touch "$@"
 
 .PHONY: lint
 check: lint
 lint: $(JSSRC)
-	eslint --strict $(JSSRC)
+	$(ESLINT) --strict $(JSSRC)
 	touch ".lint-incremental"
 
 pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)
-- 
2.30.2





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

* [pve-devel] [PATCH widget-toolkit v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
  2023-06-23  7:08 ` [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint' Dominik Csapak
  2023-06-23  7:08 ` [pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists Dominik Csapak
@ 2023-06-23  7:08 ` Dominik Csapak
  2023-06-24 15:51   ` [pve-devel] applied: " Thomas Lamprecht
  2023-06-23  7:08 ` [pve-devel] [PATCH pmg-gui " Dominik Csapak
  2023-06-23  7:08 ` [pve-devel] [PATCH proxmox-backup " Dominik Csapak
  4 siblings, 1 reply; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/Makefile   | 6 +++---
 src/defines.mk | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 7cff5dd..2fca191 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -110,14 +110,14 @@ all: $(SUBDIRS)
 	set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
 
 .lint-incremental: $(JSSRC)
-	eslint $?
+	$(ESLINT) $?
 	touch "$@"
 
 .PHONY: lint
 check: lint
-	eslint --strict api-viewer/APIViewer.js
+	$(ESLINT) --strict api-viewer/APIViewer.js
 lint: $(JSSRC)
-	eslint --strict $(JSSRC)
+	$(ESLINT) --strict $(JSSRC)
 	touch ".lint-incremental"
 
 BUILD_TIME=$(or $(SOURCE_DATE_EPOCH),$(shell date '+%s.%N'))
diff --git a/src/defines.mk b/src/defines.mk
index 36d5353..936b51e 100644
--- a/src/defines.mk
+++ b/src/defines.mk
@@ -6,3 +6,4 @@ WWWBASEDIR=$(DESTDIR)/usr/share/javascript/$(PACKAGE)
 WWWCSSDIR=$(WWWBASEDIR)/css
 WWWIMAGESDIR=$(WWWBASEDIR)/images
 WWWTHEMEDIR=$(WWWBASEDIR)/themes
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
-- 
2.30.2





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

* [pve-devel] [PATCH pmg-gui v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
                   ` (2 preceding siblings ...)
  2023-06-23  7:08 ` [pve-devel] [PATCH widget-toolkit " Dominik Csapak
@ 2023-06-23  7:08 ` Dominik Csapak
  2023-08-30  9:42   ` [pve-devel] applied: " Thomas Lamprecht
  2023-06-23  7:08 ` [pve-devel] [PATCH proxmox-backup " Dominik Csapak
  4 siblings, 1 reply; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

but fallback to 'eslint' otherwise

introduce the defines.mk for this

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 defines.mk         | 1 +
 js/Makefile        | 6 ++++--
 js/mobile/Makefile | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

diff --git a/defines.mk b/defines.mk
new file mode 100644
index 0000000..15d118f
--- /dev/null
+++ b/defines.mk
@@ -0,0 +1 @@
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
diff --git a/js/Makefile b/js/Makefile
index fad2bd6..612a185 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -1,3 +1,5 @@
+include ../defines.mk
+
 JSSRC=							\
 	Utils.js					\
 	FilterProxy.js					\
@@ -106,7 +108,7 @@ OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
 	mv $@.tmp $@
 
 .lint-incremental: ${JSSRC}
-	eslint $?
+	$(ESLINT) $?
 	touch "$@"
 
 .PHONY: lint
@@ -114,7 +116,7 @@ lint: .lint-incremental
 
 .PHONY: check
 check: ${JSSRC}
-	eslint --strict ${JSSRC}
+	$(ESLINT) --strict ${JSSRC}
 	touch ".lint-incremental"
 
 pmgmanagerlib.js: OnlineHelpInfo.js ${JSSRC}
diff --git a/js/mobile/Makefile b/js/mobile/Makefile
index 3e379d2..31afab8 100644
--- a/js/mobile/Makefile
+++ b/js/mobile/Makefile
@@ -1,3 +1,4 @@
+include ../../defines.mk
 
 # caution: order is important
 MOBILESRC=				\
@@ -10,7 +11,7 @@ MOBILESRC=				\
 	  app.js			\
 
 lint: pmgmanagerlib-mobile.js
-	eslint $^
+	$(ESLINT) $^
 
 .PHONY: check
 check: lint
-- 
2.30.2





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

* [pve-devel] [PATCH proxmox-backup v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
                   ` (3 preceding siblings ...)
  2023-06-23  7:08 ` [pve-devel] [PATCH pmg-gui " Dominik Csapak
@ 2023-06-23  7:08 ` Dominik Csapak
  2023-06-24 15:51   ` [pve-devel] applied: " Thomas Lamprecht
  4 siblings, 1 reply; 11+ messages in thread
From: Dominik Csapak @ 2023-06-23  7:08 UTC (permalink / raw)
  To: pve-devel

but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 defines.mk   | 1 +
 www/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index cd5b52a2..c113d4e1 100644
--- a/defines.mk
+++ b/defines.mk
@@ -10,6 +10,7 @@ DOCDIR = $(PREFIX)/share/doc/proxmox-backup
 JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
 SYSCONFDIR = /etc
 ZSH_COMPL_DEST = $(PREFIX)/share/zsh/vendor-completions
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
 
 # For local overrides
 -include local.mak
diff --git a/www/Makefile b/www/Makefile
index 476c80b6..2f1df442 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -133,11 +133,11 @@ js/proxmox-backup-gui.js: .lint-incremental js OnlineHelpInfo.js ${JSSRC}
 
 .PHONY: check
 check:
-	eslint --strict ${JSSRC}
+	$(ESLINT) --strict ${JSSRC}
 	touch ".lint-incremental"
 
 .lint-incremental: ${JSSRC}
-	eslint $?
+	$(ESLINT) $?
 	touch "$@"
 
 .PHONY: clean
-- 
2.30.2





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

* [pve-devel] applied: [PATCH manager v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 ` [pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists Dominik Csapak
@ 2023-06-24 15:45   ` Thomas Lamprecht
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Lamprecht @ 2023-06-24 15:45 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 23/06/2023 um 09:08 schrieb Dominik Csapak:
> but fallback to 'eslint' otherwise
> 
> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  defines.mk            | 2 ++
>  www/manager6/Makefile | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
>

applied, but moved the definition into www/manager/Makefile, as it's only used
there so no need to define this package wide – thanks!




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

* [pve-devel] applied: [PATCH widget-toolkit v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 ` [pve-devel] [PATCH widget-toolkit " Dominik Csapak
@ 2023-06-24 15:51   ` Thomas Lamprecht
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Lamprecht @ 2023-06-24 15:51 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 23/06/2023 um 09:08 schrieb Dominik Csapak:
> but fallback to 'eslint' otherwise
> 
> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  src/Makefile   | 6 +++---
>  src/defines.mk | 1 +
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
>

applied, moved the definition to the sole use site here too, thanks!




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

* [pve-devel] applied: [PATCH proxmox-backup v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 ` [pve-devel] [PATCH proxmox-backup " Dominik Csapak
@ 2023-06-24 15:51   ` Thomas Lamprecht
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Lamprecht @ 2023-06-24 15:51 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 23/06/2023 um 09:08 schrieb Dominik Csapak:
> but fallback to 'eslint' otherwise
> 
> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  defines.mk   | 1 +
>  www/Makefile | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
>

applied, moved the definition to the sole use site here too, thanks!




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

* [pve-devel] applied: [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint'
  2023-06-23  7:08 ` [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint' Dominik Csapak
@ 2023-08-30  9:42   ` Thomas Lamprecht
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Lamprecht @ 2023-08-30  9:42 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 23/06/2023 um 09:08 schrieb Dominik Csapak:
> so that we don't conflict with 'eslint' package in debian, which ships
> the same binary
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  debian/links | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




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

* [pve-devel] applied: [PATCH pmg-gui v3 1/1] try using 'pve-eslint' if it exists
  2023-06-23  7:08 ` [pve-devel] [PATCH pmg-gui " Dominik Csapak
@ 2023-08-30  9:42   ` Thomas Lamprecht
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Lamprecht @ 2023-08-30  9:42 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 23/06/2023 um 09:08 schrieb Dominik Csapak:
> but fallback to 'eslint' otherwise
> 
> introduce the defines.mk for this
> 
> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  defines.mk         | 1 +
>  js/Makefile        | 6 ++++--
>  js/mobile/Makefile | 3 ++-
>  3 files changed, 7 insertions(+), 3 deletions(-)
>  create mode 100644 defines.mk
> 
>

applied, by yourself Jul 18 already, thanks!




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

end of thread, other threads:[~2023-08-30  9:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23  7:08 [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint Dominik Csapak
2023-06-23  7:08 ` [pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint' Dominik Csapak
2023-08-30  9:42   ` [pve-devel] applied: " Thomas Lamprecht
2023-06-23  7:08 ` [pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists Dominik Csapak
2023-06-24 15:45   ` [pve-devel] applied: " Thomas Lamprecht
2023-06-23  7:08 ` [pve-devel] [PATCH widget-toolkit " Dominik Csapak
2023-06-24 15:51   ` [pve-devel] applied: " Thomas Lamprecht
2023-06-23  7:08 ` [pve-devel] [PATCH pmg-gui " Dominik Csapak
2023-08-30  9:42   ` [pve-devel] applied: " Thomas Lamprecht
2023-06-23  7:08 ` [pve-devel] [PATCH proxmox-backup " Dominik Csapak
2023-06-24 15:51   ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal