26

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

The lite hplip build does not work with scanning as too many libraries are removed. This PKGBUILD works - I removed the /usr/bin and /usr/share/applications/ directories.

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url="https://developers.hp.com/hp-linux-imaging-and-printing"
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine')
makedepends=('sane' 'rpcbind' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'python-pillow: for commandline scanning support'
            'python-reportlab: for pdf output in hp-scan'
            'rpcbind: for network support'
            'libusb: for advanced usb support'
            'wget: for network support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation - https://labs.parabola.nu/issues/893
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network, also disabled
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-lite-build=no \
              --disable-network-build \
              --disable-qt4 \
              --disable-fax-build \
              --disable-dbus-build \
              --disable-gui-build \
              --enable-hpcups-install=yes \
              --enable-new-hpcups=yes \
              --disable-network-build \
              --enable-hpps-install=yes \
              --disable-doc-build \
              --enable-pp-build=yes \
              --enable-cups-ppd-install=yes \
              --enable-foomatic-drv-install=yes \
              --enable-foomatic-ppd-install=yes
  make
}

package() {
  cd $pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/bin
}

27

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Okay, so the test with the PKGBUILD is working? I can cleanup the PKGBUILD, remove python-pillow and python-reportlab including rpcbind. Then I think we can reconstruct also the other parts: The lite-build is not needed and the disabled dependencies can be left where they are. I would later post than another proposal for the final test before re-adding hplip-libre. smile

The new naming-scheme is meant therefore that our package here is for sure no longer hplip in the original form or as it is included elsewhere. So we make further difference with that once and have then a working flow. That would be for sure great!

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

28 (edited by aloniv 2022-04-07 06:37:32)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

I think some python packages are needed as the directory (or at least some of the files in the directory) /usr/share/hplip is needed for scanning. The dependencies you mentioned are opt-epends so they aren't needed anyway smile
Also wget can be removed from the list of dependencies.

29

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

This would be then the next proposal:

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip-libre
_pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/$_pkgname-$pkgver.tar.gz #{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            #'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
#validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $_pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $_pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network also disabled
  # no gui-support needed furthermore
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-hpcups-install \
              --enable-new-hpcups \
              --enable-cups-ppd-install \
              --enable-cups-drv-install \
              --enable-foomatic-drv-install \
              --enable-foomatic-ppd-install \
              --enable-pp-build \
              --disable-dbus-build \
              --disable-fax-build \
              --disable-gui-build \
              --disable-qt3 \
              --disable-qt4 \
              --disable-qt5 \
              --disable-foomatic-rip-hplip-install \
              --disable-polkit \
              --disable-network-build \
              --disable-doc-build
  make
}

package() {
  cd $_pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/share/hplip/data/localization
  rm -rf "$pkgdir"/usr/bin
}

Please recheck if this PKGBUILD brings up all files needed. Thanks! smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

30 (edited by aloniv 2022-04-07 13:20:31)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

The PKGBUILD works fine for both printing and scanning.
More cleaning up in /usr/share/hplip is possible. See attached PKGBUILD.

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip-libre
_pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/$_pkgname-$pkgver.tar.gz #{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            #'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
#validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $_pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $_pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network also disabled
  # no gui-support needed furthermore
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-hpcups-install \
              --enable-new-hpcups \
              --enable-cups-ppd-install \
              --enable-cups-drv-install \
              --enable-foomatic-drv-install \
              --enable-foomatic-ppd-install \
              --enable-pp-build \
              --disable-dbus-build \
              --disable-fax-build \
              --disable-gui-build \
              --disable-qt3 \
              --disable-qt4 \
              --disable-qt5 \
              --disable-foomatic-rip-hplip-install \
              --disable-polkit \
              --disable-network-build \
              --disable-doc-build
  make
}

package() {
  cd $_pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/share/hplip/data/localization
  rm -rf "$pkgdir"/usr/bin
  rm -rf "$pkgdir"/usr/share/hplip/*.py
  rm -rf "$pkgdir"/usr/share/hplip/hplip_clean.sh
  rm -rf "$pkgdir"/usr/share/hplip/scan
  rm -rf "$pkgdir"/usr/share/hplip/prnt
  rm -rf "$pkgdir"/usr/share/hplip/pcard
  rm -rf "$pkgdir"/usr/share/hplip/installer
  rm -rf "$pkgdir"/usr/share/hplip/copier
  rm -rf "$pkgdir"/usr/share/hplip/base
}

31

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Thanks, for your whole work and engagement. This helps a lot now to clean the package and grant the drivers back working. smile
Will use the further cleaning also with a slight tryout of reformat.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

32

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

@aloniv I know throgh wouldn't be as fond of this idea, but for those of us who have laser printers and don't want to be too close to them due to the possibility of *cough the risks  *cough of being near one, I wondered if it is possible for a replacement for the default method for wiffi, so that dbus won't be needed at all for that as well.
wink
Again, not an immediate, requirement, but something very helpful for the future.

As for if thats secure or not...

I don't think it is a problem especially for those of us who use llibre routers and/or non-backdoored routers or servers without blobs, etc...

Given the importance of HyperbolaBSD though, I am willing to wait for a while.

Especially given the situation.

wink

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

33 (edited by aloniv 2022-04-07 13:27:44)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

I edited the PKGBUILD in my previous post. All the libraries apart from the data directory can be removed for my scanner to work (it needs the models.dat file).

34

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

zapper wrote:

@aloniv I know throgh wouldn't be as fond of this idea, but for those of us who have laser printers and don't want to be too close to them due to the possibility of *cough the risks  *cough of being near one, I wondered if it is possible for a replacement for the default method for wiffi, so that dbus won't be needed at all for that as well.
wink
Again, not an immediate, requirement, but something very helpful for the future.

As for if thats secure or not...

I don't think it is a problem especially for those of us who use llibre routers and/or non-backdoored routers or servers without blobs, etc...

Given the importance of HyperbolaBSD though, I am willing to wait for a while.

Especially given the situation.

wink

For sure I'm not a fan of that solution, but only because of one reason: You will need avahi and dbus for that. If there is no other solution in reach this will be a no-result at all and point we cannot make as we have done so much work and effort, just to get those packages back we wanted to remove for serious problems and reasoning. So for sure: Not eager for that. And I mention it again as I've told it multiple times now: The work done for hplip was and is showing how much effort is needed for just ONE package. We cannot do that for every other in some need. And therefore I invite you to research for an alternate solution onto that. Clearly said: No network as there is no avahi included in Hyperbola any longer. Searching for a solution? Okay, please work with us onto that. We alone won't search for a solution anytime soon for reactivating network in hplip!

So please note the motivation from my side: Don't wait, tryout for solutions possible on yourself and share them. Don't wait for something we won't and can't provide. And I remember here also that hplip was just added at once as being asked for, but aloniv showed clearly what we need. Working together onto problems as community. smile Feedback for tests? Testing alternative modes? Otherwise we would be left alone and the package would stay there where it is for now: On the blacklist. With the solution now we can replace that entry with a friendly alternative. A free system is living from its community, not only from any core-team as this is not the philosophy we want to follow at all.

zapper wrote:

(...)

I don't think it is a problem especially for those of us who use llibre routers and/or non-backdoored routers or servers without blobs, etc...

Given the importance of HyperbolaBSD though, I am willing to wait for a while.

(...)

wink

Otherwise: I hope you can sit good then for a waiting-time, you will have to wait for sure very long. wink
We have done everything possible for 0.4 and 0.4.x to come. Help us, or just wait.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

35 (edited by aloniv 2022-04-07 15:32:55)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Perhaps a suitable name for the new hplip package is hplip-drivers as the package only contains the drivers, libraries and data files.

36

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

aloniv wrote:

Perhaps a suitable name for the new hplip package is hplip-drivers as the package only contains the drivers, libraries and data files.

Nice proposal. smile
Will be done.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

37

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

I had meant without dbus/avahi,  but yeah, I definitely, expect to have to wait a while, my point was more as of a way of saying, it probably won't return in Hyperbola's GNU/Linux version, wink

Just a guess, but yeah, I wondered if its even possible.

By the way, we already have python-requests in Hyperbola, I thought...

I wonder why tblock doesn't build...

So weird...

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

38

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

We have python-requests, but the new version of tblock demands a version not on head with Debian Bullseye. That was explicitely written. And that's the reasoning behind: We cannot risk stability of the whole system. If you wish to do: Feel invited and tryout. But as mentioned: 0.4.x is not about great new additions or updates, it is about stability and fixing when needed. Nothing weird, just rational. And having packages to demand newer versions is the mentioned "always up-to-date"-nonsense we have besides many of them don't even grant more security, only growing complexity. And again the error-message when running:

pkg_resources.DistributionNotFound: The 'requests>=2.26.0' distribution was not found and is required by tblock

It is not only building and then the package runs. hplip is the point of approval and as long as we don't have enough testing-feedback we won't add or update packages. When something is running, there is no need to go for the next update.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

39

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

My bad, I didn't know how problematic it was...

I am going to guess you tried to change the version it required and it still wouldn't work, am I right?

I tried that myself, failure complete and total.

wink

I wonder if hblock could be reworked the same way...

Probably not, but meh... idk.

wink

I will see if I can get any advice from the creator and stop bother you guys about this regardless.

Sorry in advance...

As for hplip, no worries, I have a backup plan if need be for now anyways.

Either vms, or a, usb install of some distro that isn't as trustworthy, but I will not risk on an important computer, etc...

wink

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

40

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

I'm interested about all backup-plans fur sure smile perhaps a "printer-server"? There are some little systems for helping working under GNU/Linux and BSD further. So no worries also: We can work together something out. But that's one key-sentence for me. big_smile

I know it is hard and some words makes only now sense when I speak that out again: But we are all here and we can all work together as one small but also "internal big" community. I will never leave this thought. And I hope we will get that spirit further. So it is not bad to speak out, also sometimes a bitter tone but with a smile as it is just sarcasm meant. A big THANK YOU for aloniv and this unbelievable cool demonstration for working together. We keep it that way.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

41 (edited by zapper 2022-04-08 02:36:32)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

To be honest, I wasn't even talking about hplip in general, I just meant being able to connect to my laserjet printer wirelessly, whether that be via, hplip or cups even if its modified a bit... wink

That being said, I have other interests that go WAY beyond that one...

Such as ARM64 bit support for HyperbolaBSD by somewhere between 2023 and 2026 if possible.

wink

I have a feeling, this request is way beyond what you can even handle without more funding though, so I won't assume anything unless you say otherwise.

Aka, until the original Hyperbola system is deprecated, aka Hyperbola's GNU/Linux-Libre version, I have this feeling, that would be a bridge too far at this time...

and no not this one:

https://en.wikipedia.org/wiki/Fort_Lee_ … re_scandal

wink

But anyways, joking aside, less infastructure being used would be required to even think about support anything ARM based anyhow. At least that is my current thought? As well as money, as a small edit...

wink

Hope its okay that I left an amusing joke for you, if not, let me know, I usually check emails more often than anything else.

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

42

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Updated PKGBUILD with more removed data formats - I just kept PostScript and PDF pages in the data directory as the others - LDL and PCL - I'm not even sure how to open (and the resulting package is now 4 MB smaller smile )

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip-libre
_pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/$_pkgname-$pkgver.tar.gz #{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            #'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
#validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $_pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $_pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network also disabled
  # no gui-support needed furthermore
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-hpcups-install \
              --enable-new-hpcups \
              --enable-cups-ppd-install \
              --enable-cups-drv-install \
              --enable-foomatic-drv-install \
              --enable-foomatic-ppd-install \
              --enable-pp-build \
              --disable-dbus-build \
              --disable-fax-build \
              --disable-gui-build \
              --disable-qt3 \
              --disable-qt4 \
              --disable-qt5 \
              --disable-foomatic-rip-hplip-install \
              --disable-polkit \
              --disable-network-build \
              --disable-doc-build
  make
}

package() {
  cd $_pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/share/hplip/data/localization
  rm -rf "$pkgdir"/usr/share/hplip/data/ldl
  rm -rf "$pkgdir"/usr/share/hplip/data/pcl 
  rm -rf "$pkgdir"/usr/bin
  rm -rf "$pkgdir"/usr/share/hplip/*.py
  rm -rf "$pkgdir"/usr/share/hplip/hplip_clean.sh
  rm -rf "$pkgdir"/usr/share/hplip/scan
  rm -rf "$pkgdir"/usr/share/hplip/prnt
  rm -rf "$pkgdir"/usr/share/hplip/pcard
  rm -rf "$pkgdir"/usr/share/hplip/installer
  rm -rf "$pkgdir"/usr/share/hplip/copier
  rm -rf "$pkgdir"/usr/share/hplip/base
}

43

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Thanks, but PCL and LDL are for sure needed further later on when using cups more in depth. smile Proposal in combination:

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip-drivers
_pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/$_pkgname-$pkgver.tar.gz{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $_pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $_pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network also disabled
  # no gui-support needed furthermore
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-hpcups-install \
              --enable-new-hpcups \
              --enable-cups-ppd-install \
              --enable-cups-drv-install \
              --enable-foomatic-drv-install \
              --enable-foomatic-ppd-install \
              --enable-pp-build \
              --disable-dbus-build \
              --disable-fax-build \
              --disable-gui-build \
              --disable-qt3 \
              --disable-qt4 \
              --disable-qt5 \
              --disable-foomatic-rip-hplip-install \
              --disable-polkit \
              --disable-network-build \
              --disable-doc-build
  make
}

package() {
  cd $_pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/share/hplip/data/localization
  rm -rf "$pkgdir"/usr/bin
  rm -rf "$pkgdir"/usr/share/hplip/*.py
  rm -rf "$pkgdir"/usr/share/hplip/hplip_clean.sh
  rm -rf "$pkgdir"/usr/share/hplip/scan
  rm -rf "$pkgdir"/usr/share/hplip/prnt
  rm -rf "$pkgdir"/usr/share/hplip/pcard
  rm -rf "$pkgdir"/usr/share/hplip/installer
  rm -rf "$pkgdir"/usr/share/hplip/copier
  rm -rf "$pkgdir"/usr/share/hplip/base
}

Package-name would be now hplip-drivers and the resulting outcome should be also support for PCL and PS in general.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

44 (edited by aloniv 2022-04-09 08:37:55)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

If I understand correctly, PCL is used for generic drivers for printers. Parallel port is not used by modern printers which use USB or wireless connectivity. LDL appears to refer to this limited format (generic drivers that don't support PCL):
https://en.wikipedia.org/wiki/Lightweig … e_Language
So a modern install with a desktop printer can probably be compiled with --disable-pp-build and with pcl and ldl directories removed.
The ps directory only contains print test pages which aren't that big (around 100 KB in total) and are useful.

45 (edited by aloniv 2022-04-09 08:39:28)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

After running ./configure -h and removing deprecated options and keeping the disabled option for the settings if it is the default setting (unless I actually want the disabled option such as disabling GUI) I trimmed some more from the resulting package.

# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Contributor (Arch): Rémy Oudompheng <remy@archlinux.org>
# Contributor (Arch): Morgan LEFIEUX <comete@archlinuxfr.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Jorge López <jorginho@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=hplip-libre
_pkgname=hplip
pkgver=3.21.2
_debver=3.21.2+dfsg1
_debrel=2
pkgrel=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
            'sane: for scanner support'
            'xsane: sane scanner frontend'
            'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
        'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/$_pkgname-$pkgver.tar.gz #{,.asc}
        https://deb.debian.org/debian/pool/main/h/hplip/hplip_$_debver-$_debrel.debian.tar.xz
        disable_upgrade.patch
        0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
        remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
            #'SKIP'
            '771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
            'd6a6b1de0fb6a0d6af6badd81088bc2b493d894057a520ccd70abee0adc7e1b019aae641600c10d4d2053c8677b14897b40a0a306374a5702a7cd7bdeabd736e'
            '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
            'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
#validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>

prepare() {
  cd $_pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
    rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
    rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true

    quilt push -av
  else
    # add missing 'include <cups/ppd.h>' at various places
    patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
  fi

  # based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
  # keep header license
  sed  '/\[/,99999d' data/models/models.dat > mktemp

  for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
    sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
    grep '^download=True' -q mktemp1 && continue
    grep '^plugin=1' -q mktemp1 && continue
    grep '^support-type=0' -q mktemp1 && continue
    cat mktemp1 >> mktemp
  done

  sed -i 's/plugin=2/plugin=0/g' mktemp

  cp mktemp data/models/models.dat

  rm -v mktemp{,1}

  # remove systemd support
  patch -p1 -i ../remove-systemd-support.patch

  # remove nonfree software recommendation
  sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')

  # disable insecure update
  patch -Np0 -i ${srcdir}/disable_upgrade.patch

  export AUTOMAKE='automake --foreign'
  autoreconf --force --install
}

build() {
  cd $_pkgname-$pkgver

  # disable dbus for build including fax
  # avahi is needed for network also disabled
  # no gui-support needed furthermore
  ./configure --prefix=/usr \
              --with-cupsbackenddir=/usr/libexec/cups/backend \
              --with-cupsfilterdir=/usr/libexec/cups/filter \
              --enable-hpcups-install \
              --disable-new-hpcups \
              --enable-cups-drv-install \
              --disable-cups-ppd-install \
              --disable-foomatic-drv-install \
              --disable-foomatic-ppd-install \
              --disable-pp-build \
              --disable-dbus-build \
              --disable-fax-build \
              --disable-gui-build \
              --disable-qt3 \
              --disable-qt4 \
              --disable-qt5 \
              --disable-foomatic-rip-hplip-install \
              --disable-polkit \
              --disable-network-build \
              --disable-doc-build
  make
}

package() {
  cd $_pkgname-$pkgver
  make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install

  # install license
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/COPYING

  # remove config provided by sane and autostart of hp-daemon
  rm -rf "$pkgdir"/etc/{sane.d,xdg}
  install -dm755 ${pkgdir}/etc/sane.d/dll.d
  echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio

  # remove HAL .fdi file because HAL is no longer used
  rm -vrf "$pkgdir"/usr/share/hal

  # cleanup
  rm -rf "$pkgdir"/usr/share/applications
  rm -rf "$pkgdir"/usr/share/hplip/data/localization
  rm -rf "$pkgdir"/usr/share/hplip/data/ldl
  rm -rf "$pkgdir"/usr/share/hplip/data/pcl 
  rm -rf "$pkgdir"/usr/bin
  rm -rf "$pkgdir"/usr/share/hplip/*.py
  rm -rf "$pkgdir"/usr/share/hplip/hplip_clean.sh
  rm -rf "$pkgdir"/usr/share/hplip/scan
  rm -rf "$pkgdir"/usr/share/hplip/prnt
  rm -rf "$pkgdir"/usr/share/hplip/pcard
  rm -rf "$pkgdir"/usr/share/hplip/installer
  rm -rf "$pkgdir"/usr/share/hplip/copier
  rm -rf "$pkgdir"/usr/share/hplip/base
}

46

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

aloniv wrote:

If I understand correctly, PCL is used for generic drivers for printers. Parallel port is not used by modern printers which use USB or wireless connectivity. LDL appears to refer to this limited format (generic drivers that don't support PCL):
https://en.wikipedia.org/wiki/Lightweig … e_Language
So a modern install with a desktop printer can probably be compiled with --disable-pp-build and with pcl and ldl directories removed.
The ps directory only contains print test pages which aren't that big (around 100 KB in total) and are useful.

Thing is: We should remember what the wording "modern" implies. Generalized progress without looking backwards and that should never be the implied goal. Support for parallel port has to stay in. So the last posted PKGBUILD cannot be included, the one before is the way therefore. Thanks for helping. I will add you as "Contributor".

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

47 (edited by aloniv 2022-04-12 04:57:15)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

A few comments:

1. The parallel port option (--enable-pp-build) is a deprecated option and disabled by default.

2. --disable-new-hpcups is the default option. --enable-hpcups-install should be enough for cups printing.

3. All the foomatic options are deprecated and disabled by default (is it a good idea to keep those enabled in case they get removed from future hplip versions?). Also cups dynamic ppd install (--enable-cups-drv-install) is the default setting, while cups static ppd install is disabled by default (--disable-cups-ppd-install). So in order to use PPD files it should be enough to only use --enable-cups-drv-install while the other options are disabled.

3. Another possible options is to provide a basic drivers and full drivers packages which would conflict with one another - the basic would provide anything needed to get a printer bought (say) in the last ten years running (e.g. my PKGBUILD), and the full would be needed for very old printers (e.g. mine with --enable-pp-build and ldl and pcl directories kept and perhaps support for static PPD files as well).

48

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

For sure nice ideas. smile For now I would think first to re-enable hplip-drivers as one package and leave it to the community to decide what's up for that. It would be also possible to create alternative PKGBUILD-scripts in other threads and recommend them as tryouts for interested. Hyperbola is for sure oriented onto lightweight packages and therefore a favor for your proposals. Hyperbola is also: Recommendations for and from the community and a system designed to be modified as much as possible from in- and outside. For now that would be the one here, not final if there are wishes left: https://git.hyperbola.info:50100/~team/ … 5a3e02e2af

You think a mail-address can be used from you, aloniv? No need to post it open, when you have thoughts about your privacy. We are here to protect it. But I would like to name you and your work fully! smile

https://git.hyperbola.info:50100/~team/ … 5a3e02e2af

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

49

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

throgh: Sure I can provide an email address but sadly the one I currently check regularly using the email client with GPG encryption Claws Mail (without much luck at getting others to encrypt as well) is made by an evil corporation so maybe it isn't a great idea to promote it.

50 (edited by anthk 2022-05-03 15:39:09)

Re: [Hyperbola] Going the way and packaging, the roadmap after 0.4

Hello.

On easy packages to build, I'd suggest you ccache, as it greatly speeds up further builds:

https://ccache.dev/

and Mosh, really useful for a lot of places where SSH show ups its
latency/lag even over fiber connections:

https://mosh.org/#getting

The dependencies for Mosh are clearly shown on the page by scrolling down.

I was about to write some PKGBUILD myself, but maybe someone would
like to write a service file for mosh-server under openrc, something I lack the experience for.