diff --git a/data/other/dpkg-origins b/data/other/dpkg-origins new file mode 100644 index 000000000..b3079a59c --- /dev/null +++ b/data/other/dpkg-origins @@ -0,0 +1,4 @@ +Vendor: YunoHost +Vendor-URL: https://yunohost.org/ +Bugs: https://github.com/YunoHost/issues/ +Parent: Debian diff --git a/debian/install b/debian/install index df65fe51e..eb92e44ec 100644 --- a/debian/install +++ b/debian/install @@ -6,6 +6,7 @@ data/actionsmap/* /usr/share/moulinette/actionsmap/ data/hooks/* /usr/share/yunohost/hooks/ data/other/yunoprompt.service /etc/systemd/system/ data/other/password/* /usr/share/yunohost/other/password/ +data/other/dpkg-origins /etc/dpkg/origins/yunohost data/other/* /usr/share/yunohost/yunohost-config/moulinette/ data/templates/* /usr/share/yunohost/templates/ data/helpers /usr/share/yunohost/ diff --git a/debian/postinst b/debian/postinst index 83220ae0b..7b7080513 100644 --- a/debian/postinst +++ b/debian/postinst @@ -23,6 +23,12 @@ do_configure() { || echo "yunohost-firewall service is not running, you should " \ "consider to start it by doing 'service yunohost-firewall start'." fi + + # Change dpkg vendor + # see https://wiki.debian.org/Derivatives/Guidelines#Vendor + readlink -f /etc/dpkg/origins/default | grep -q debian \ + && rm -f /etc/dpkg/origins/default \ + && ln -s /etc/dpkg/origins/yunohost /etc/dpkg/origins/default # Yunoprompt systemctl enable yunoprompt.service diff --git a/debian/postrm b/debian/postrm index 93338c4ff..63e42b4d4 100644 --- a/debian/postrm +++ b/debian/postrm @@ -14,6 +14,10 @@ if [ "$1" = "remove" ]; then rm -f /etc/yunohost/installed fi +# Reset dpkg vendor to debian +# see https://wiki.debian.org/Derivatives/Guidelines#Vendor +rm -f /etc/dpkg/origins/default +ln -s /etc/dpkg/origins/debian /etc/dpkg/origins/default #DEBHELPER#