Sorry, nothing change, plugins shows Version 6.x
Upgrade von Omv6 zu Omv7 Plugins zeigen in der Gui Version 6 an
-
- OMV 7.x
- resolved
- Upgrade 6.x -> 7.x
- kloenner
-
-
Sorry, nothing change, plugins shows Version 6.x
sudo omv-mkaptidx
-
What is the output of cat /usr/sbin/omv-mkaptidx
-
-
Hi,
in the morning the OMV hosts get a new update openmediavault (7.0-16), and now the Version 7 is shown,
thanks for the help
Horst-Dieter

-
I have the same issue,The number of plugins has also been reduced from 49 to 25
Also performed
Code
Display Moresudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash [2023-12-25 20:55:14+0800] [omvinstall] Done. sudo omv-mkaptidx cat /usr/sbin/omv-mkaptidx #!/bin/sh exit 0 dpkg -l | grep openmedia ii openmediavault 7.0-18 all openmediavault - The open network attached storage solution ii openmediavault-backup 7.0 all backup plugin for OpenMediaVault. ii openmediavault-cputemp 7.0 all cpu temperature plugin for openmediavault ii openmediavault-diskstats 7.0-1 all openmediavault disk monitoring plugin ii openmediavault-flashmemory 7.0 all folder2ram plugin for openmediavault ii openmediavault-keyring 1.0.2-2 all GnuPG archive keys of the openmediavault archive ii openmediavault-locate 7.0 all locate plugin for OpenMediaVault. ii openmediavault-nut 7.0-1 all openmediavault Network UPS Tools (NUT) plugin ii openmediavault-omvextrasorg 7.0 all OMV-Extras.org Package Repositories for OpenMediaVault rc openmediavault-tftp 6.0.1-1 all openmediavault TFTP-Server plugin ii openmediavault-wetty 7.0-1 all openmediavault WeTTY (Web + TTY) plugin ii openmediavault-wol 7.0 all OpenMediaVault WOL plugin rc openmediavault-zfs 5.0.6 amd64 OpenMediaVault plugin for ZFS -
If the plug-in is uninstalled from the UI successfully, the UI still shows that it has been installed, and the error cannot be uninstalled is displayed when the plug-in is uninstalled again
================================================================================
= openmediavault plugins
================================================================================
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===========================-============-============-======================================================
ii openmediavault-backup 7.0 all backup plugin for OpenMediaVault.
ii openmediavault-diskstats 7.0-1 all openmediavault disk monitoring plugin
ii openmediavault-flashmemory 7.0 all folder2ram plugin for openmediavault
ii openmediavault-keyring 1.0.2-2 all GnuPG archive keys of the openmediavault archive
ii openmediavault-locate 7.0 all locate plugin for OpenMediaVault.
ii openmediavault-nut 7.0-1 all openmediavault Network UPS Tools (NUT) plugin
ii openmediavault-omvextrasorg 7.0 all OMV-Extras.org Package Repositories for OpenMediaVault
rc openmediavault-tftp 6.0.1-1 all openmediavault TFTP-Server plugin
ii openmediavault-wetty 7.0-1 all openmediavault WeTTY (Web + TTY) plugin
ii openmediavault-wol 7.0 all OpenMediaVault WOL plugin
rc openmediavault-zfs 5.0.6 amd64 OpenMediaVault plugin for ZFS
--------------------------------------------------------------------------------
Plugins index:
==============
[
{
"abstract": "OMV-Extras.org Package Repositories for OpenMediaVault",
"architecture": "all",
"breaks": "openmediavault (<< 6.0)",
"conflicts": "",
"depends": "openmediavault (>= 6.4), gnupg",
"description": "OMV-Extras.org Package Repositories for OpenMediaVaultn .n An apt cleaning function is also available for fixing repository cachen problems and saving hard drive space in some instances.",
"descriptionmd5": "",
"extendeddescription": "nnAn apt cleaning function is also available for fixing repository cachenproblems and saving hard drive space in some instances.",
"filename": "",
"homepage": "http://omv-extras.org/",
"installed": true,
"installedsize": 0,
"maintainer": "OpenMediaVault Plugin Developers <plugins@omv-extras.org>",
"md5sum": null,
"multiarch": "",
"name": "openmediavault-omvextrasorg",
"package": "openmediavault-omvextrasorg",
"pluginarchitecture": [],
"pluginsection": "utilities",
"predepends": "",
"priority": "optional",
"repository": "/now",
"section": "net",
"sha1": null,
"sha256": null,
"size": 0,
"suggests": "",
"summary": "OMV-Extras.org Package Repositories for OpenMediaVault",
"version": "6.3.5"
},
-
-
-
use, and reboot
Didn't work anything
-
post the output of head -n5 /usr/sbin/omv-mkaptidx
-
-
Front...
sudo wget -O - https://github.com/OpenMediaVa…raw/master/fix6to7upgrade | sudo bash
.............
dpkg-deb: Error: Encountered an unexpected file terminator when reading the number of archived magic versions in omvextras7.deb
dpkg: Error processing archive omvextras7.deb (--install):
dpkg-deb --control The subprocess returns an error status 2
An error occurred during processing:
omvextras7.deb
Clearing cache ...
/usr/lib/python3/dist-packages/salt/utils/http.py:8: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
/usr/lib/python3/dist-packages/salt/utils/jinja.py:9: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
import pipes
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
local:
.........
-
cat /usr/sbin/omv-mkaptidx
#!/usr/bin/env python3
#
# This file is part of OpenMediaVault.
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @copyright Copyright (c) 2009-2023 Volker Theile
#
# OpenMediaVault is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# OpenMediaVault is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
import json
import platform
import re
# The following error might happen from time to time.
#
# Traceback (most recent call last):
# File "/usr/sbin/omv-mkaptidx", line 27, in <module>
# import openmediavault
# EOFError: EOF read where not expected
#
# To analyse the error execute:
# python3 -vc 'import openmediavault'
#
# To fix this error simply execute the following command:
# rm -f /usr/lib/python3/dist-packages/__pycache__/openmediavault.cpython-32.pyc
import sys
import apt
import click
import openmediavault.productinfo
import openmediavault
pi = openmediavault.productinfo.ProductInfo()
class OpenMediaVaultPluginsFilter(apt.cache.Filter):
"""
Filter that returns all openmediavault plugins except the packages:
- openmediavault
- openmediavault-keyring
"""
def apply(self, pkg):
m = re.match(r"^%s-(\S+)$" % pi.package_name, pkg.name)
if not m:
return False
if m.group(1) == "keyring":
return False
if pkg.candidate is not None:
# The 'Plugin-Architecture' is mostly used by plugins that are
# using container images. The architectures that are supported
# by those images are listed as comma separated values. Note,
# the list contains the architecture labels used by Debian.
arch = explode_csv(pkg.candidate.record.get(
"Plugin-Architecture"))
if arch:
# Map the platform architecture to the Debian
# architecture string used in 'debian/control'.
machine_2_debian = {
"i386": "i386",
"x86_64": "amd64",
"armv6l": "armel",
"armv7l": "armhf",
"aarch64": "arm64"
}
# Skip this package if the host architecture is
# not in the list of the supported architectures.
if machine_2_debian.get(platform.machine()) not in arch:
return False
return True
def get_extended_description(raw_description):
"""
Return the extended description according to the Debian policy
(Chapter 5.6.13).
See http://www.debian.org/doc/debi…icy/ch-controlfields.html
for more information.
"""
parts = raw_description.partition("\n")
lines = parts[2].split("\n")
for i, line in enumerate(lines):
lines[i] = line.strip()
if lines[i] == ".":
lines[i] = "\n"
return "\n".join(lines)
def explode_csv(value):
"""
Split a comma separated string into parts.
"""
if not isinstance(value, str):
return []
return [part.strip() for part in value.split(",") if part.strip()]
def get_value(f, default=None):
"""
:param f: The function to be executed.
:type f: callable
:param default: The default value. Defaults to ``None``.
:type default: str|int|None
:return: Returns the specified value, otherwise the default on failure.
"""
try:
return f()
except SystemError:
pass
return default
@click.command()
@click.option('--verbose', is_flag=True, help='Shows verbose output.')
def main(verbose: bool):
cache = apt.cache.Cache()
# Create the '/var/lib/openmediavault/apt/upgradeindex.json' file.
print("Creating index of upgradeable packages ...")
data = []
cache.upgrade(True)
for pkg in cache.get_changes():
if pkg.candidate is None:
continue
data.append({
"name": pkg.name,
"oldversion": pkg.installed.version if pkg.is_installed and pkg.installed is not None else "",
"repository": "{}/{}".format(pkg.candidate.origins[0].label, pkg.candidate.origins[0].archive)
if pkg.candidate.origins is not None else "",
"package": pkg.candidate.record.get("Package"),
"source": pkg.candidate.source_name,
"sourceversion": pkg.candidate.source_version,
"version": pkg.candidate.version,
"installedsize": pkg.candidate.size,
"maintainer": pkg.candidate.record.get("Maintainer", ""),
"architecture": pkg.candidate.architecture,
"depends": pkg.candidate.record.get("Depends", ""),
"suggests": pkg.candidate.record.get("Suggests", ""),
"conflicts": pkg.candidate.record.get("Conflicts", ""),
"breaks": pkg.candidate.record.get("Breaks", ""),
"abstract": pkg.candidate.summary, # Deprecated
"summary": pkg.candidate.summary,
"description": pkg.candidate.record.get("Description", ""),
"extendeddescription": get_extended_description(pkg.candidate.raw_description),
"homepage": pkg.candidate.homepage,
"descriptionmd5": pkg.candidate.record.get("Description-md5", ""),
"multiarch": pkg.candidate.record.get("Multi-Arch", ""),
"predepends": pkg.candidate.record.get("Pre-Depends", ""),
"section": pkg.candidate.section,
"priority": pkg.candidate.priority,
"filename": pkg.candidate.filename,
"size": pkg.candidate.size,
"md5sum": get_value(lambda: pkg.candidate.md5),
"sha1": get_value(lambda: pkg.candidate.sha1),
"sha256": get_value(lambda: pkg.candidate.sha256),
"uri": pkg.candidate.uri,
"uris": pkg.candidate.uris
})
verbose and print(f"Added package '{pkg.name}'")
with open(
openmediavault.getenv(
'OMV_APT_UPGRADE_INDEX_FILE',
'/var/lib/openmediavault/apt/upgradeindex.json'
), 'w'
) as outfile:
json.dump(data, outfile, sort_keys=True, indent=4)
verbose and print(f"Index file '{outfile.name}' successfully updated.")
# Create the '/var/lib/openmediavault/apt/pluginsindex.json' file.
print("Creating index of plugins ...")
data = []
cache = apt.cache.Cache()
filtered = apt.cache.FilteredCache(cache)
filtered.set_filter(OpenMediaVaultPluginsFilter())
for pkg in filtered:
if pkg.candidate is None:
continue
data.append({
"name": pkg.name,
"repository": "{}/{}".format(pkg.candidate.origins[0].label, pkg.candidate.origins[0].archive)
if pkg.candidate.origins is not None else "",
"package": pkg.candidate.record.get("Package"),
"version": pkg.candidate.version,
"installedsize": pkg.candidate.size,
"maintainer": pkg.candidate.record.get("Maintainer", ""),
"architecture": pkg.candidate.architecture,
"depends": pkg.candidate.record.get("Depends", ""),
"suggests": pkg.candidate.record.get("Suggests", ""),
"conflicts": pkg.candidate.record.get("Conflicts", ""),
"breaks": pkg.candidate.record.get("Breaks", ""),
"abstract": pkg.candidate.summary, # Deprecated
"summary": pkg.candidate.summary,
"description": pkg.candidate.record.get("Description", ""),
"extendeddescription": get_extended_description(pkg.candidate.raw_description),
"homepage": pkg.candidate.homepage,
"descriptionmd5": pkg.candidate.record.get("Description-md5", ""),
"multiarch": pkg.candidate.record.get("Multi-Arch", ""),
"predepends": pkg.candidate.record.get("Pre-Depends", ""),
"section": pkg.candidate.section,
"pluginsection": pkg.candidate.record.get("Plugin-Section", ""),
"pluginarchitecture": explode_csv(pkg.candidate.record.get("Plugin-Architecture")),
"priority": pkg.candidate.priority,
"filename": pkg.candidate.filename,
"size": pkg.candidate.size,
"md5sum": get_value(lambda: pkg.candidate.md5),
"sha1": get_value(lambda: pkg.candidate.sha1),
"sha256": get_value(lambda: pkg.candidate.sha256),
"installed": pkg.is_installed
})
verbose and print(f"Added package '{pkg.name}'")
with open(
openmediavault.getenv(
'OMV_APT_PLUGINS_INDEX_FILE',
'/var/lib/openmediavault/apt/pluginsindex.json'
), 'w'
) as outfile:
json.dump(data, outfile, sort_keys=True, indent=4)
verbose and print(f"Index file '{outfile.name}' successfully updated.")
sys.exit(0)
if __name__ == '__main__':
sys.exit(main())
-
sudo omv-mkaptidx
-
-
It worked
Thank you and wish you a Merry Christmas
-
macom
Added the Label resolved -
macom
Added the Label OMV 7.x (Beta) -
Try:
sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/fix6to7upgrade | sudo bash
I had the same issue that the GUI still showed version 6 plugins. Using your command fix the problem for me.
Thx!
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!