-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new package diagnostic/glances #9591
base: oi/hipster
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or http://www.opensolaris.org/os/licensing. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
# | ||
|
||
# | ||
# Copyright 2022, Benny Lyons | ||
# | ||
|
||
BUILD_BITS=NO_ARCH | ||
BUILD_STYLE=setup.py | ||
|
||
|
||
include ../../../make-rules/shared-macros.mk | ||
|
||
COMPONENT_NAME= glances | ||
COMPONENT_VERSION= 3.2.7 | ||
COMPONENT_SUMMARY= Monitoring system resources | ||
COMPONENT_FMRI= diagnostic/glances | ||
COMPONENT_CLASSIFICATION=Applications/System Utilities | ||
COMPONENT_PROJECT_URL= https://github.com/nicolargo/glances | ||
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) | ||
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz | ||
COMPONENT_ARCHIVE_HASH= \ | ||
sha256:8eee819667b39e20f8ba3881dbe5c148146baf2da880a78e5ed184a8f790abd0 | ||
COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/archive/refs/tags/v$(COMPONENT_VERSION).tar.gz | ||
#https://github.com/nicolargo/glances/archive/refs/tags/v3.2.7.tar.gz | ||
#COMPONENT_ARCHIVE_URL=$(call pypi_url) | ||
COMPONENT_LICENSE= LGPL-3.0-only | ||
COMPONENT_LICENSE_FILE=$(COMPONENT_SRC)/LICENSES/LGPL-3.0-only.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you do not need the |
||
#PYTHON_VERSIONS= $(PYTHON3_VERSIONS) | ||
PYTHON_VERSIONS= 3.9 | ||
PYTHON_VERSION= 3.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the build process will produce same results even with the above three lines removed. If so, then please remove them. If not, then please share the differences. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need either PYTHON_VERSIONS or PYTHON_VERSION, as I obtain this: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is because you have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please check the output of "pkg info userland-incorporation". The latest is FMRI: pkg://openindiana.org/consolidation/userland/[email protected]:20221021T131054Z from a few minutes ago. It shouldn't be much older. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i had to update, am now at There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding the remove of PYTHON_VERSIONS= 3.9: There is a subtle difference between what happens with or without this: If you don't have it, there will be builds in the build folder for every python version (3.7 and 3.9 at the moment). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@mebenn: Your output is strange for several reasons. First, there is Second, it miss some lines. The expected output should be something like this:
Third, even with your strange There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is valid point. Yes, you are right. But that should be the only difference (plus a bit longer build time). The resulting package should be the same. If we want to avoid that right now I believe the best way is to set This is also reason why we need to order builds for various Python versions. I removed this ordering recently (mistakenly) so I'll return it back for now until some better solution is implemented. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The automatic addition of $(PYV) to package fmri could be suppressed using BTW, I plan to implement better (and simpler) support for python components that do not need to be build for multiple pythons (like this one, or ansible, etc), but first I'd like to complete fully automatic integration of versioned python components. OTOH, if these components (glances, ansible, and so on) are built as versioned python packages, then they would be easier to integrate now. AFAIK, versioned python packages have only one con I'm aware about: there is set of packages, instead of single package, but the main package name will stay, so no big difference for end users. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's my current env:
...
I've also noticed a problem with glances-3.9 in the bin dir. I tried to resolve this by removing $(PYV) (in glances.p5m) from the fmri to obtain |
||
|
||
TEST_TARGET= $(NO_TESTS) | ||
include $(WS_MAKE_RULES)/common.mk | ||
|
||
PKG_MACROS += PYVER=$(PYTHON_VERSION) | ||
# pkgdepend doesn't like the first line of a Python script to be: | ||
# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)' | ||
COMPONENT_POST_INSTALL_ACTION += \ | ||
$(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \ | ||
$(PROTOUSRBINDIR)/*; | ||
|
||
SHARE_DIR=$(PROTO_DIR)/usr/share | ||
PIXMAPS_DIR=$(PROTOUSRSHAREDIR)/pixmaps | ||
APPLICATIONS_DIR=$(PROTOUSRSHAREDIR)/applications | ||
|
||
COMPONENT_POST_INSTALL_ACTION += \ | ||
$(MKDIR) -p $(PIXMAPS_DIR); \ | ||
$(CP) $(COMPONENT_SRC)/glances/outputs/static/images/glances.png $(PIXMAPS_DIR)/glances.png; | ||
COMPONENT_POST_INSTALL_ACTION += \ | ||
$(MKDIR) -p $(PROTOUSRSHAREDIR)/applications; \ | ||
$(CP) $(COMPONENT_DIR)/glances.desktop $(PROTOUSRSHAREDIR)/applications/glances.desktop; | ||
COMPONENT_POST_INSTALL_ACTION += \ | ||
$(MKDIR) -p $(PROTOUSRSHAREDIR)/man/man1; \ | ||
$(CP) $(COMPONENT_SRC)/docs/man/glances.1 $(PROTOUSRSHAREDIR)/man/man1/glances.1; | ||
|
||
REQUIRED_PACKAGES += print/psutils | ||
|
||
# Auto-generated dependencies | ||
PYTHON_REQUIRED_PACKAGES += library/python/importlib-metadata | ||
PYTHON_REQUIRED_PACKAGES += library/python/setuptools | ||
PYTHON_REQUIRED_PACKAGES += runtime/python |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[Desktop Entry] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where this file comes from? It lacks the copyright/license header. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know much about Mate. I copied /usr/share/applications/htop.desktop to glances.desktop and configured. Now the htop package self does not contain any htop.desktop, so I assume this was generated by Mate?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then, maybe, it would be better to do not include this file? Since Glance seems to be a terminal utility we do not need desktop file for it, IMHO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW: This package is also a candidate as we don't want to have /usr/bin/glances-3.9 |
||
Type=Application | ||
Version=1.0 | ||
Name=Glances | ||
GenericName=Process Viewer | ||
GenericName[ca]=Visualitzador de processos | ||
GenericName[da]=Procesfremviser | ||
GenericName[de]=Prozessanzeige | ||
GenericName[en_GB]=Process Viewer | ||
GenericName[es]=Visor de procesos | ||
GenericName[fi]=Prosessikatselin | ||
GenericName[fr]=Visualiseur de processus | ||
GenericName[gl]=Visor de procesos | ||
GenericName[it]=Visore dei processi | ||
GenericName[ko]=프로세스 뷰어 | ||
GenericName[nb]=Prosessviser | ||
GenericName[nl]=Viewer van processen | ||
GenericName[nn]=Prosessvisar | ||
GenericName[pl]=Przeglądarka procesów | ||
GenericName[pt]=Visualizador de Processos | ||
GenericName[pt_BR]=Visualizador de processos | ||
GenericName[ru]=Монитор процессов | ||
GenericName[sk]=Prehliadač procesov | ||
GenericName[sl]=Pregledovalnik opravil | ||
GenericName[sr@ijekavian]=Приказивач процеса | ||
GenericName[sr@ijekavianlatin]=Prikazivač procesa | ||
GenericName[sr@latin]=Prikazivač procesa | ||
GenericName[sr]=Приказивач процеса | ||
GenericName[sv]=Processvisning | ||
GenericName[tr]=Süreç Görüntüleyici | ||
GenericName[uk]=Перегляд процесів | ||
GenericName[zh_CN]=进程查看器 | ||
GenericName[zh_TW]=行程檢視器 | ||
Comment=Show System Processes | ||
Comment[ca]=Visualitzeu els processos del sistema | ||
Comment[da]=Vis systemprocesser | ||
Comment[de]=Systemprozesse anzeigen | ||
Comment[en_GB]=Show System Processes | ||
Comment[es]=Mostrar procesos del sistema | ||
Comment[fi]=Katsele järjestelmän prosesseja | ||
Comment[fr]=Affiche les processus système | ||
Comment[gl]=Mostrar os procesos do sistema. | ||
Comment[it]=Mostra processi di sistema | ||
Comment[ko]=시스템 프로세스 보기 | ||
Comment[nb]=Vis systemprosesser | ||
Comment[nl]=Systeemprocessen tonen | ||
Comment[nn]=Vis systemprosessar | ||
Comment[pl]=Pokaż procesy systemowe | ||
Comment[pt]=Mostrar os Processos do Sistema | ||
Comment[pt_BR]=Mostra os processos do sistema | ||
Comment[ru]=Просмотр списка процессов в системе | ||
Comment[sk]=Zobraziť systémové procesy | ||
Comment[sl]=Prikaz sistemskih opravil | ||
Comment[sr@ijekavian]=Приказ системских процеса | ||
Comment[sr@ijekavianlatin]=Prikaz sistemskih procesa | ||
Comment[sr@latin]=Prikaz sistemskih procesa | ||
Comment[sr]=Приказ системских процеса | ||
Comment[sv]=Visa systemprocesser | ||
Comment[tr]=Sistem Süreçlerini Göster | ||
Comment[uk]=Перегляд системних процесів | ||
Comment[zh_CN]=显示系统进程 | ||
Comment[zh_TW]=顯示系統行程 | ||
Icon=glances | ||
Exec=glances | ||
Terminal=true | ||
Categories=System;Monitor;ConsoleOnly; | ||
Keywords=system;process;task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm. This seems to be a nice candidate for
python-integrate-project
integration. Did you try to integrate using$WS_TOOLS/python-integrate-project Glances
? It might be a bit harder to create the first integration, but all future maintenance and upgrades would be far far easier.