Короче пока я остановился, вот на таком скрипте автоматического обновления плагина. Вроде все учел, хотя может проверки гдето еще надо, но работает вроде..
И какую задачу он решает? Как он запускается при
apt-get dist-upgrade? Если самому руками, так это просто и через
hp-setup -i можно.
Я уже кому-то давал "болванку" и объяснял суть проблемы. Нужно опакечивать, но проблема в том, что в публичный репозиторий мы это поместить не можем по лицензионным соображениям. Другое дело, если вы у себя зеркалите нашу репу на один хост и в скрипте зеркалирования добавляете синхронизацию с версией hplip. Можете взять вот это за основу:
export PLUGIN_VERSION=3.19.1
export PLUGIN_RELEASE=alt0.M70C.1
mkdir hplip-plugin
cd hplip-plugin
mkdir .gear
cat .gear/rules
tar: hplip-plugin
cat hplip-plugin.spec
%set_verify_elf_method skip
%define hplipdir %_datadir/hplip
Name: hplip-plugin
Version: $PLUGIN_VERSION
Release: $PLUGIN_RELEASE
Summary: HPLIP Plugin for support some HP printers, scaners and faxes
License: Distributable
Group: Publishing
Url: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/
Source: %name-%version.tar
Packager: Leonid Krivoshein <klark@altlinux.org>
Requires: hplip = %version
Requires: %name-data = %EVR
%description
HP Linux Imaging and Printing (HPLIP) Driver Plug-in. This package include
binary so-modules for some models of the HP printers, scaners and faxes.
%package data
Summary: Common architecture-independed data files for HPLIP plugin
Group: Publishing
BuildArch: noarch
Requires: hplip = %version
%description data
HP Linux Imaging and Printing (HPLIP) Driver Plug-in. This package include
firmware and other common data files for some models of the HP printers,
scaners and faxes.
%prep
%setup
/bin/sh ./hplip-%version-plugin.run --check
/bin/sh ./hplip-%version-plugin.run --tar xpf
%install
chmod 644 *
test "%version" = "$(cat version.txt)"
chmod 755 so-pack.sh hplip-plugin-install
mkdir -pm755 %{buildroot}%hplipdir/data/plugins
mkdir -pm755 %{buildroot}%hplipdir/data/firmware
cp -a license.txt %{buildroot}%hplipdir/data/plugins/
mv -f hp_*.fw.gz %{buildroot}%hplipdir/data/firmware/
mv -f plugin.spec %{buildroot}%hplipdir/
%ifarch x86_64
./so-pack.sh x86_64 %{buildroot}%hplipdir
%endif
%ifarch ix86
./so-pack.sh x86_32 %{buildroot}%hplipdir
%endif
mkdir -pm755 %{buildroot}%_localstatedir/hp
cat > %{buildroot}%_localstatedir/hp/hplip.state <<EOF
[plugin]
installed = 1
eula = 1
version = %version
EOF
%files
%doc license.txt
%dir %hplipdir/fax/plugins
%dir %hplipdir/scan/plugins
%hplipdir/fax/plugins/*.so
%hplipdir/prnt/plugins/*.so
%hplipdir/scan/plugins/*.so
%files data
%dir %hplipdir/data/plugins
%hplipdir/data/plugins/license.txt
%hplipdir/data/firmware/*.fw.gz
%hplipdir/plugin.spec
%_localstatedir/hp/hplip.state
%changelog
* Fri Sep 14 2018 Leonid Krivoshein <klark@altlinux.org> 3.18.6-alt0.M70C.1
- Rebuild with hplip 3.18.6.
* Wed Jun 20 2018 Leonid Krivoshein <klark@altlinux.org> 3.17.10-alt0.M70C.1
- Initial build for c7.
mkdir hplip-plugin
cd hplip-plugin
cat so-pack.sh
#!/bin/sh -eu
#
# This file 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 2 of the License,
# or (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Copyright (C) 2018, Leonid Krivoshein
#
arch="$1"
target="$2"
mklinks() {
cd "$target/$1/plugins"
for filename in $(ls *-$arch.so); do
ln -snf $filename ${filename//-$arch.so/.so}
done
}
mkdir -p -m 755 "$target/fax/plugins"
mkdir -p -m 755 "$target/scan/plugins"
mkdir -p -m 755 "$target/prnt/plugins"
mv -f fax_*-$arch.so "$target/fax/plugins/"
mv -f bb_*-$arch.so "$target/scan/plugins/"
mv -f *-$arch.so "$target/prnt/plugins/"
mklinks fax
mklinks scan
mklinks prnt
ls -1
hplip-3.18.6-plugin.run
hplip-3.18.6-plugin.run.asc
so-pack.sh
wget http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$PLUGIN_VERSION-plugin.run
Из него
hplip-plugin собирается под любой бранч и под любой hplip. Замечено на последних версиях, что содержимое тарбола по структуре составу не изменяется, вносить изменения в спек не требуется.
UPD #1: В спеке указан URL, в конце инструкции с него скачиваются два нужных файла. Последний выложенный по ссылке плагин: 3.19.6, с тех пор обновлений не было. С новой версией hplip-3.19.12 плагин следует скачивать из другого места:
https://developers.hp.com/sites/default/files/hplip-3.19.12-plugin.run