forked from openmediavault/openmediavault
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: openmediavault#1774 Signed-off-by: Volker Theile <votdev@gmx.de>
- Loading branch information
Showing
90 changed files
with
3,443 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/files | ||
/*.debhelper.log | ||
/*.postinst.debhelper | ||
/*.postrm.debhelper | ||
/*.substvars | ||
/*-stamp | ||
/openmediavault-apt/ | ||
/.debhelper/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
openmediavault-apt (7.0) stable; urgency=low | ||
|
||
* Initial release. | ||
|
||
-- Volker Theile <volker.theile@openmediavault.org> Mon, 10 Jun 2024 18:19:58 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Source: openmediavault-apt | ||
Section: admin | ||
XB-Plugin-Section: utilities | ||
Priority: optional | ||
Maintainer: Volker Theile <volker.theile@openmediavault.org> | ||
Build-Depends: debhelper (>= 12), gettext | ||
Standards-Version: 3.9.6 | ||
Homepage: https://www.openmediavault.org | ||
|
||
Package: openmediavault-apt | ||
Architecture: all | ||
Depends: openmediavault (>= 7.3) | ||
Priority: optional | ||
Description: openmediavault APT management plugin | ||
Manage APT (Advanced Package Tool) repositories easily. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Format: http://dep.debian.net/deps/dep5 | ||
Upstream-Contact: Volker Theile <volker.theile@openmediavault.org> | ||
Source: http://www.openmediavault.org | ||
|
||
Files: * | ||
Copyright: 2009-2024 Volker Theile <volker.theile@openmediavault.org> | ||
License: GPL-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
usr/share/openmediavault/* usr/share/openmediavault/ | ||
srv/* srv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env dash | ||
# | ||
# 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-2024 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/>. | ||
|
||
set -e | ||
|
||
. /etc/default/openmediavault | ||
. /usr/share/openmediavault/scripts/helper-functions | ||
|
||
case "$1" in | ||
configure) | ||
######################################################################## | ||
# Activate trigger to rebuild workbench configuration files. | ||
######################################################################## | ||
dpkg-trigger update-workbench | ||
|
||
######################################################################## | ||
# Initialize and migrate configuration database. | ||
######################################################################## | ||
echo "Updating configuration database ..." | ||
omv-confdbadm create "conf.system.apt.source" | ||
if [ -n "$2" ]; then | ||
omv-confdbadm migrate "conf.system.apt.source" "${2}" | ||
fi | ||
;; | ||
|
||
abort-upgrade|abort-remove|abort-deconfigure) | ||
;; | ||
|
||
*) | ||
echo "postinst called with unknown argument '$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env dash | ||
# | ||
# 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-2024 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/>. | ||
|
||
set -e | ||
|
||
. /etc/default/openmediavault | ||
. /usr/share/openmediavault/scripts/helper-functions | ||
|
||
remove_action() { | ||
# Activate trigger to rebuild workbench configuration files. | ||
dpkg-trigger update-workbench | ||
} | ||
|
||
case "$1" in | ||
purge) | ||
remove_action | ||
# Remove the configuration data. Sadly we can not use 'omv-confdbadm' | ||
# here because the database model has been removed already in a | ||
# previous stage, see https://wiki.debian.org/MaintainerScripts. | ||
# Because of that we need to use the helper tools to remove the | ||
# configuration. | ||
echo "Cleaning up configuration database ..." | ||
omv_config_delete "/config/system/apt/sources" | ||
;; | ||
|
||
remove) | ||
remove_action | ||
;; | ||
|
||
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
;; | ||
|
||
*) | ||
echo "postrm called with unknown argument '$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env dash | ||
# | ||
# 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-2024 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/>. | ||
|
||
set -e | ||
|
||
case "$1" in | ||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
;; | ||
|
||
*) | ||
echo "prerm called with unknown argument '$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
activate restart-engined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/make -f | ||
|
||
# Uncomment this to turn on verbose mode. | ||
#export DH_VERBOSE=1 | ||
|
||
include ../openmediavault.mk | ||
|
||
%: | ||
dh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (native) |
47 changes: 47 additions & 0 deletions
47
deb/openmediavault-apt/srv/salt/omv/deploy/apt/20sources.sls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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-2024 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/>. | ||
|
||
# Documentation/Howto: | ||
# https://repolib.readthedocs.io/en/latest/deb822-format.html#deb822-style-format | ||
|
||
{% set sources_prefix = salt['pillar.get']('default:OMV_APT_SOURCES_LIST_DEB822_PREFIX', 'openmediavault-') %} | ||
{% set sources = salt['omv_conf.get']('conf.system.apt.source') %} | ||
|
||
cleanup_apt_sources_list_deb822: | ||
module.run: | ||
- file.find: | ||
- path: "/etc/apt/sources.list.d/" | ||
- iname: "{{ sources_prefix }}*.sources" | ||
- delete: "f" | ||
|
||
{% for item in sources %} | ||
|
||
configure_apt_sources_list_deb822_{{ item.uuid }}: | ||
file.managed: | ||
- name: "/etc/apt/sources.list.d/{{ sources_prefix }}{{ item.uuid }}.sources" | ||
- source: | ||
- salt://{{ tpldir }}/files/etc-apt-sources_list_d-sources.j2 | ||
- context: | ||
config: {{ item | json }} | ||
- template: jinja | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
|
||
{% endfor %} |
8 changes: 8 additions & 0 deletions
8
deb/openmediavault-apt/srv/salt/omv/deploy/apt/files/etc-apt-sources_list_d-sources.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Enabled: {{ config.enable | to_bool | yesno }} | ||
Types: {{ config.types }} | ||
URIs: {{ config.uris }} | ||
Suites: {{ config.suites }} | ||
Components: {{ config.components }} | ||
{%- if config.signedby | length > 0 %} | ||
Signed-By: {{ config.signedby | indent(1) }} | ||
{%- endif %} |
54 changes: 54 additions & 0 deletions
54
deb/openmediavault-apt/usr/share/openmediavault/confdb/create.d/conf.system.apt.source.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env dash | ||
# | ||
# 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-2024 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/>. | ||
|
||
set -e | ||
|
||
. /usr/share/openmediavault/scripts/helper-functions | ||
|
||
######################################################################## | ||
# Update the configuration. | ||
# See https://repolib.readthedocs.io/en/latest/deb822-format.html#deb822-style-format | ||
# <config> | ||
# <system> | ||
# <apt> | ||
# <sources> | ||
# <!-- | ||
# <item> | ||
# <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> | ||
# <enable>0|1</enable> | ||
# <types>xxx</types> | ||
# <uris>xxx</uris> | ||
# <suites>xxx</suites> | ||
# <components>xxx</components> | ||
# <signedby>xxx</signedby> | ||
# <comment>xxx</comment> | ||
# </item> | ||
# --> | ||
# </sources> | ||
# </apt> | ||
# </system> | ||
# </config> | ||
######################################################################## | ||
if ! omv-confdbadm exists "conf.system.apt.source"; then | ||
omv_config_add_node "/config/system/apt" "sources" | ||
fi | ||
|
||
exit 0 |
52 changes: 52 additions & 0 deletions
52
deb/openmediavault-apt/usr/share/openmediavault/datamodels/conf.system.apt.source.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"type": "config", | ||
"id": "conf.system.apt.source", | ||
"title": "APT source", | ||
"queryinfo": { | ||
"xpath": "//system/apt/sources/item", | ||
"iterable": true, | ||
"idproperty": "uuid" | ||
}, | ||
"properties": { | ||
"uuid": { | ||
"type": "string", | ||
"format": "uuidv4", | ||
"default": "" | ||
}, | ||
"enable": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"types": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"uris": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"suites": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"components": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"signedby": { | ||
"type": "string", | ||
"oneOf": [{ | ||
"type": "string", | ||
"format": "pgppubkey" | ||
},{ | ||
"type": "string", | ||
"maxLength": 0 | ||
}], | ||
"default": "" | ||
}, | ||
"comment": { | ||
"type": "string", | ||
"default": "" | ||
} | ||
} | ||
} |
Oops, something went wrong.