8000 net-print/cnijfilter: new package version 3.80 by mfld-fr · Pull Request #5595 · gentoo/gentoo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

net-print/cnijfilter: new package version 3.80 #5595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

net-print/cnijfilter: new package version 3.80 #5595

wants to merge 2 commits into from

Conversation

mfld-fr
Copy link
@mfld-fr mfld-fr commented Sep 2, 2017

Add support of the Canon IP 7200 series inkjet printers to the CUPS subsystem.

Contains actually two packages : the common part to all printers (cnijfilter-common), and the printer-specific part (cnijfilter-ip7200). This layout was requested by Gentoo developers, to allow upgrading the common part while keeping the printer-specific part that does not provide downward compatibility between versions.

The sources are still provided by the manufacturer, and that support is frequently requested in Bugzilla
(see linked bugs).

Gentoo-Bug: https://bugs.gentoo.org/130645

Built on AMD64 architecture, and tested with IP 7250 printer model on Wifi. There are still several but without impact compilation warnings that would be fixed in a next release.

This package was sourced from the Sabayon overlay, that still proposes it for mainstream (see Sabayon/for-gentoo#69), then tuned to pass the repoman check.

Package-Manager: Portage-2.3.6, Repoman-2.3.1

@gentoo-repo-qa-bot gentoo-repo-qa-bot added new package The PR is adding a new package. self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) assigned PR successfully assigned to the package maintainer(s). labels Sep 2, 2017
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: net-print/cnijfilter, net-print/cnijfilter-drivers

net-print/cnijfilter: @gentoo/proxy-maint (new package)
net-print/cnijfilter-drivers: @gentoo/proxy-maint (new package)

@mfld-fr
Copy link
Author
mfld-fr commented Sep 2, 2017

Rebased the cnijfilter-1 branch as requested.

@@ -0,0 +1,167 @@
# Copyright 1999-2012 Gentoo Foundation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to get a new calendar!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -0,0 +1 @@
DIST cnijfilter-source-3.80-1.tar.gz 8923054 SHA256 8b6d408f18191f19465ee8fc31aa08455e8bec186fdd3f02ee822f53a9b086a9 SHA512 95a16e3b4fc38ce0b7a12bd74466d97e726bc410b59bf6d1963fa52b16a8cc67f6a993a5ef945107201f860d8ac6734c462bc0bf6d2160d6c85c5f61aff040c1 WHIRLPOOL 2e27afa454ce1fa41700f65ace7ae7469464cc8685499c4927c559aef2fd79613297d1ec1e5cf1dd309da541c5b662a0c4d4d71fabf4b514e186eb2bceb80c5c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this into separate commit for each package added, and add them in dependency order.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package cnijfilter-drivers depends on cnijfilter, so moving cnijfilter-drivers in another branch for a next PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not two pull requests. Two commits on a single branch.

Copy link
Author
@mfld-fr mfld-fr Sep 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so let us complete that review first on cnijfilter, for me to understand and to get a clean package as the first commit, then I will do the same on cnijfilter-drivers and move it back in the branch as a second commit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


RDEPEND="
net-print/cnijfilter[servicetools?]
>=media-libs/libpng-1.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libpng is slotted, so you probably want :0=.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

RDEPEND="
net-print/cnijfilter[servicetools?]
>=media-libs/libpng-1.5
>=media-libs/tiff-3.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


DESCRIPTION="Canon InkJet Printer Driver for Linux (Pixus/Pixma-Series)."
HOMEPAGE="http://support-sg.canon-asia.com/contents/SG/EN/0100469302.html"
SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${MY_PN}-source-${PV}-1.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're using the filename twice (here and in S), so put it into MY_P variable instead. You can also kill MY_PN since it is of no value as separate variable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


inherit eutils autotools flag-o-matic multilib

DESCRIPTION="Canon InkJet Printer Driver for Linux (Pixus/Pixma-Series)."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a proper sentence, so no . at the end.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


MY_PN="${PN/-drivers/}"

inherit eutils autotools flag-o-matic multilib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, you're not using eutils flag-o-matic multilib eclasses.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${MY_PN}-source-${PV}-1.tar.gz"

LICENSE="GPL-2"
SLOT="${PV}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package doesn't look like you can install multiple versions simultaneously, so slotting is wrong.

Copy link
Author
@mfld-fr mfld-fr Sep 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, yes, we should be able to install multiple versions of cnijfilter-drivers, as each printer model is supported only by a specific version. Only cnijfilter is common to all models and evolves through versions. See the discussion in bug 130645.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is indeed the case, you should really add an appropriate comment. However, I should point out that such a layout will be terribly hard to use for the users.

Copy link
< A3E2 /details>
Author
@mfld-fr mfld-fr Sep 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are 100% right: this Canon's policy is really a nightmare for the users, and generates tons of discussion to find the right version for a given printer model, and to manage the obsolescence of that version. This is probably the reason why many guys try to merge all versions in the latest (just look for projects with the cnijfilter keyword on Github).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed

@@ -0,0 +1,112 @@
# Copyright 1999-2012 Gentoo Foundation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as for the other package, for a start.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go for EAPI 6.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mfld-fr
Copy link
Author
mfld-fr commented Sep 3, 2017

@mgorny : Thanks for that initial review ! Now working on it...

@mfld-fr mfld-fr changed the title net-print/cnijfilter: new package version 3.80-1 net-print/cnijfilter: new package version 3.80 Sep 3, 2017
@mfld-fr
Copy link
Author
mfld-fr commented Sep 4, 2017

@mgorny : I fixed what I understood from your review of the first package cnijfilter. Could you tell me if more fixing is required on that first one, or if I could squash into a first commit and begin to rework the second package cnijfilter-drivers ?


inherit autotools

PS="${PN}-source-${PV}-1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually name this MY_P, and I suggest you follow suit for clarity.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


# Patches applied by the default src_prepare() since EAPI=6

PATCHES=( \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those backslashes are unnecessary here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

src_configure() {
_dir_build "${DIRS}" "eautoreconf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline that loop from _dir_build, and don't print that >>> thing pretending to come from Portage. Also, eautoreconf belogs in src_prepare.

Alternatively, you could create a simple configure.ac+Makefile.am using AC_CONFIG_SUBDIRS + SUBDIRS that would let you build it like a regular package with autotools automatically recurring into subdirectories.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

src_compile() {
_dir_build "${DIRS}" "emake&q C95D uot;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do pushd+emake, use emake -C directory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

_dir_build "${DIRS}" "emake DESTDIR=${D} install"

if use net; then
pushd com/${_libdir_pkg} > /dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're using this exactly once, so don't create an extra variable for it.

External commands need ||die

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


if use net; then
pushd com/${_libdir_pkg} > /dev/null
dodir ${_libdir}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dodir needs a path without EPREFIX. But it's not necessary since…

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

pushd com/${_libdir_pkg} > /dev/null
dodir ${_libdir}
# no doexe to preserve symlinks
cp -a libcnnet.so* "${D}/${_libdir}" || die
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dolib is the function you're looking for.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

pkg_postinst() {
einfo ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

einfo is for status/progress messages that are of no value once the build is complete. You're lookin for elog.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


pkg_postinst() {
einfo ""
einfo "For installing a printer:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like entirely boilerplate 'how to use CUPS' instruction. Any reason you're repeating it here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

einfo " -> Printers -> Add Printer"
einfo ""
einfo "If you experience any problem, please visit:"
einfo " http://forums.gentoo.org/viewtopic-p-3217721.html"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https. Besides, Forums threads are not really means of providing support and/or information. They have very poor SNR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@mfld-fr
Copy link
Author
mfld-fr commented Sep 6, 2017

@mgorny : Thanks for that second review ! Now working on it...

@mfld-fr
Copy link
Author
mfld-fr commented Sep 6, 2017

@mgorny : I fixed all the points from your second review. Now waiting for your green light to proceed further...

"${FILESDIR}/cnijfilter-3.80-cups1.6.patch"
)

pkg_setup() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a minor note, you could move this logic to src_prepare (or surround with ${MERGE_TYPE} conditional) since I don't think it's needed when you install binary packages.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

local d
for d in ${DIRS}; do
pushd ${d} >/dev/null || die
eautoreconf ${d}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eautoreconf doesn't take any parameters.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

src_configure() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ELEADINGEMPTYLINE

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


src_configure() {

# progpath must be set otherwise defaulted to /usr/local/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would fit better next to econf

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


local d
for d in ${DIRS}; do
pushd ${d} >/dev/null || die
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always quote paths. Even if by design they can't contain spaces. In fact, you should convert whole DIRS to bash array, and use "${DIRS[@]}" to respect quoting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

local d
for d in ${DIRS}; do
pushd ${d} >/dev/null || die
econf --enable-progpath=${EPREFIX}/usr/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EPREFIX may contain spaces, quote it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

src_install() {
local d
for d in ${DIRS}; do
emake -C ${d} DESTDIR=${D} install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also missing quoting around ${D}.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

if use net; then
pushd com/libs_bin$(usex amd64 64 32) >/dev/null || die
dolib.so libcnnet.so.1.2.2
dolib.so libcnnet.so
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use libcnnet.so*?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mfld-fr
Copy link
Author
mfld-fr commented Sep 7, 2017

@mgorny : Thanks for that third review ! Now working on it...

@mfld-fr
Copy link
Author
mfld-fr commented Sep 7, 2017

@mgorny : I fixed all the points from your third review. Now waiting for your feedback...

Copy link
Member
@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides this one minor nit, I have no further comments on the first package. Please let me know when the other one is ready.

As a side note, are all those patches needed for both packages?

DIRS=(libs pstocanonij backend)
use net && DIRS+=(backendnet)
use servicetools && DIRS+=(cngpij)
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misindent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mfld-fr
Copy link
Author
mfld-fr commented Sep 7, 2017

About your side note: actually the two packages build from the same set of sources, but the first builds a single variant, and the second builds as many variants as printer series. This is why in the bug discussion, a Gentoo developer (scarabeus) splitted that package into two parts. But as the sources are the same for both, we still need to apply the same patches.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 7, 2017

Squashed all the previous commits into a single one for the first package cnijfilter (common part). Now reworking the second package cnijfilter-drivers (printer-specific part)...

Add support of some Canon inkjet printers to the CUPS subsystem.

Contains the common part to all printers.

Gentoo-Bug: https://bugs.gentoo.org/130645

This package was sourced from the Sabayon overlay,
that proposes it for mainstream (see for-gentoo repository),
and reworked to reach the Gentoo quality level.

Package-Manager: Portage-2.3.6, Repoman-2.3.1
@mfld-fr
Copy link
Author
mfld-fr commented Sep 8, 2017

@mgorny : I moved back the second package cnijfilter-drivers and cleaned up according to your previous reviews. Now I need your help to factorize the current code with the multibuild.eclass, because I am a beginner in writing ebuilds. Could you please provide me some guidelines to do so ?

@mgorny
Copy link
Member
mgorny commented Sep 8, 2017

You use it like this:

  1. Set MULTIBUILD_VARIANTS to an array of variants you'd like to build, i.e. different printer models.
  2. Call multibuild_foreach_variant somefunc to call somefunc for each variant.

where somefunc would appropriately be your functions doing different phases of the ebuild. The eclass will set BUILD_DIR which you can use to do the building, i.e. given your previous code for configure you'd do something like:

my_configure() {
  for x in subdir1 subdir2 subdir3...; do
    mkdir -p "${BUILD_DIR}/${x}" || die
    cd "${BUILD_DIR}/${x}" || die
    ECONF_SOURCE=${S}/${x} econf ...
  done
}

This will trigger an out-of-source configure, i.e. it will use sources from another directory to avoid unnecessary copying. For other phases, you'd do something like:

my_compile() {
  for x in subdir1 subdir2 subdir3...; do
    emake -C "${BUILD_DIR}/${x}"
  done
}

and so on.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 14, 2017

@mgorny : Thanks for your guidelines to use multibuild.eclass. I switched to that, could you please review again and tell me if my usage is correct ?

[[ -z ${LINGUAS} ]] && LINGUAS="en"

if [[ ${MERGE_TYPE} == source ]]; then

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid empty lines on top of block.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


# select variants

for (( i=0; i<${#PRINTERS[@]}; i++ )); do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point was that you don't have to do the (( ... )) anymore and you can just do for x in "${PRINTERS[@]}"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


for (( i=0; i<${#PRINTERS[@]}; i++ )); do
local name=${PRINTERS[$i]#*:}
use ${name} && MULTIBUILD_VARIANTS+=(${name})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

# missing macros directory make aclocal fail
mkdir maintenance/m4 || die

# maybe default could be called here ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it could.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

for d in "${DIRS[@]}"; do
mkdir -p "${BUILD_DIR}/${d}" || die
cd "${BUILD_DIR}/${d}" || die
ECONF_SOURCE=${S}/${d} econf \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misindent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mfld-fr
Copy link
Author
mfld-fr commented Sep 15, 2017

@mgorny : I fixed all the points from your latest review. Any more fix needed or could I squash all the commits related to the cnijfilter-drivers package ?

@mfld-fr
Copy link
Author
mfld-fr commented Sep 18, 2017

I just had a thought : should the printing@gentoo.org project be added as maintainer in the metadata.xml files ?

@mfld-fr
Copy link
Author
mfld-fr commented Sep 23, 2017

@mgorny : gentle ping

Copy link
Member
@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry but I had to finally move on with more important projects and I have little time to review pull requests these days. I'll try to find time to finish this one, however.

As for adding printing, a good practice is to get their consent first. @gentoo/printing.

local p
for p in "${PRINTERS[@]}"; do
local name="${p#*:}"
use ${name} && MULTIBUILD_VARIANTS+=("${name}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: missing quoting around first ${name}. It'd be nice to quote consistently.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

local _libdir_pkg=libs_bin$(usex amd64 64 32)
local _ppddir="${EPREFIX}/usr/share/cups/model"

dodir ${_libdir}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dodir prepends ${EPREFIX} itself, so you need to pass the unprefixed path here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


dodir ${_libdir}
# create symlink from cnijlib to bjlib as some formats need it
dosym ${_libdir}/cnijlib ${_libdir}/bjlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does dosym for its second argument. For the first argument, please use relative path instead. That'd be just cnijlib if I'm not mistaken.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dosym ${_libdir}/cnijlib ${_libdir}/bjlib

local i
for (( i=0; i<${#PRINTERS[@]}; i++ )); do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch this one to for ... in as well, please.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

for (( i=0; i<${#PRINTERS[@]}; i++ )); do
local name="${PRINTERS[$i]#*:}"
local pid="${PRINTERS[$i]%:*}"
if use ${name}; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: quoting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

local pid="${PRINTERS[$i]%:*}"
if use ${name}; then
dolib.so ${pid}/${_libdir_pkg}/*
insinto "${_libdir}/cnijlib"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spurious EPREFIX again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dolib.so ${pid}/${_libdir_pkg}/*
insinto "${_libdir}/cnijlib"
doins ${pid}/database/*
insinto "${_ppddir}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mgorny
Copy link
Member
mgorny commented Sep 25, 2017

I've thought about it some, and to be honest I don't think the slotting solution will fly. It will cause a lot of confusion to the users, and some of them will suddenly lose a driver on upgrade+depclean when you add a new version. Most of the people would not even think about looking at old versions.

i will understand if that's too much work for you but I think this would be best to do as one-package-per-printer.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 25, 2017

@mgorny : so you want the same layout as in AUR (https://repology.org/metapackages/all/?search=cnijfilter) ?

If factorization is removed, there is roughly one Canon release per year (2012-2017), each release supporting about 6~8 printer series, so one would have to manage about ~35 packages, not including the backward with about 5 years more (to support the expected ~10 years of mechanical lifetime), total ~70 packages. Plus the already existing workload to maintain ~10 sets of patches.

This could only be managed through automation, like generating the ebuild from a common template, and a table of the printer series, manufacturer's source packages and patches. Otherwise it would become the mess, with many maintainers (up to one for each printer series) and no consistency, as in AUR today.

I agree it would be easier for the dummy user, but is Gentoo targeting such user profile ? To help selecting the right version for each printer series, I also started to write a Wiki page : https://wiki.gentoo.org/index.php?title=Canon_Pixma_Printer.

This is a design decision with big impact, so please confirm before I proceed. I can commit to maintain a cnijfilter-common and a cnijfilter-ip7200, because I can fully test it with my IP 7250 printer and be confident about the package quality. But for other models, one would have to rely on other contributors to test the package candidates.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 25, 2017

Also asking opinion from @tokiclover and @Sabayon, as experienced people on this topic.

@mgorny
Copy link
Member
mgorny commented Sep 25, 2017

Yes, that's the correct layout. And as you said, those will probably be low maintenance packages, with a lot of common code that you could easily automate locally. As for the patches, I'd suggest using a common patch tarball. If that's the final patch set, one of us can make a tarball of them and put it on Gentoo hosting for you.

Gentoo is targeting good quality of design and using the newest available version of software whenever possible. A design which relies on user having to do research and force old version of software to make it work is simply wrong.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 26, 2017

@mgorny : I removed the multibuild from the specific-part and kept only the printer series which I am able to test (ip7200). I also squashed the previous commits while renaming cnijfilter-drivers to cnijfilter-ip7200. Could you please review this new layout ?


dodir ${_libdir}
# create symlink from cnijlib to bjlib as some formats need it
dosym cnijlib ${_libdir}/bjlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this dosym to after you create the directory. It seems more logical to link to something that's already there; it will also save you from dodir-ing the directory manually.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

pkg_setup() {
[[ -z ${LINGUAS} ]] && LINGUAS="en"

if [[ ${MERGE_TYPE} == source ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work when building a binary package. Use != binary instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

"${FILESDIR}/cnijfilter-3.70-ppd2.patch"
"${FILESDIR}/cnijfilter-3.70-libexec-cups.patch"
"${FILESDIR}/cnijfilter-3.70-libexec-backend.patch"
"${FILESDIR}/cnijfilter-3.80-cups1.6.patch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor request but could you try to use a more meaningful patch names? Something that could let others figure out which patches they need for their drivers because right now, I don't understand what's the difference e.g. between 'cups1.6' and 'cups' patches.

Copy link
Author
@mfld-fr mfld-fr Sep 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already explained in a previous comment the practical reason why I am keeping the patches as they are sourced from many locations (16 related bugs, 2 layouts and 4 other repos). I am currently consolidating them in my own working copy of the sources, and I will submit more consistent (+ automation compatible) patches in a next release. Closed.

Add support of some Canon Pixma inkjet printers to the CUPS subsystem.

Contains the printer-specific part for the IP7200 series.

Gentoo-Bug: https://bugs.gentoo.org/130645

This package was sourced from the Sabayon overlay,
that proposes it for mainstream (see for-gentoo repository),
and reworked to reach the Gentoo quality level.

Package-Manager: Portage-2.3.6, Repoman-2.3.1
@mfld-fr
Copy link
Author
mfld-fr commented Sep 26, 2017

@mgorny : I fixed your latest review findings (except the one related to the patches, see above), and squashed again the commits. Could you check it, please ?

Copy link
Member
@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then. I put the patches into a tarball @ https://dev.gentoo.org/~mgorny/dist/cnijfilter-3.80-patchset.tar.bz2.

Please add to SRC_URI:

https://dev.gentoo.org/~mgorny/dist/cnijfilter-${PV}-patchset.tar.bz2

and update both ebuilds to apply patches from the unpacked tarball.

SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${MY_P}.tar.gz"

LICENSE="GPL-2"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: stray empty line.

Copy link
Author
@mfld-fr mfld-fr Sep 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in next release.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 26, 2017

@mgorny : Sorry, but this time it looks not reasonable to me to follow you. The submitted ebuild are working well (no problem with the printer since 2 years now), we spent already 3 weeks to iterate, and now you are requesting lately a design change by packing the patches, that would be temporary in the end, as I said that I will deliver soon a next revision (-r1) with a consolidated patch that will do the same as your packing.

I would rather like to focus now on fixing the current compilation warnings that have actually no real impact but raise QA issues, and extending the printer support to other series, but I am kept stuck on this PR.

I therefore won't change any more these package candidates for that first revision. Please either accept as is, reject them, or implement the packing yourselves, because I don't think such packing will change the game.

Thanks anyway for your time, I learned much in writting ebuild.

@urcindalo
Copy link

I really appreciate your efforts, @mfld-fr
Thanks to you I now have a working Canon PIXMA iP7250 on my Gentoo box. I hope your ebuild enters the official tree soon.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

@urcindalo : nice comment, thank you !

Copy link
Member
@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry but this is a no-go. I could ignore one or two QA warning but the first package triggers a whole screen-full of them:

 * Messages for package net-print/cnijfilter-3.80:
 * Log file: /var/log/portage/net-print:cnijfilter-3.80:20170928-133153.log

 * This package has a configure.in file which has long been deprecated.  Please
 * update it to use configure.ac instead as newer versions of autotools will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * This package has a configure.in file which has long been deprecated.  Please
 * update it to use configure.ac instead as newer versions of autotools will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * This package has a configure.in file which has long been deprecated.  Please
 * update it to use configure.ac instead as newer versions of autotools will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * This package has a configure.in file which has long been deprecated.  Please
 * update it to use configure.ac instead as newer versions of autotools will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * This package has a configure.in file which has long been deprecated.  Please
 * update it to use configure.ac instead as newer versions of autotools will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * QA Notice: Unrecognized configure options:
 * 
 * 	--enable-progpath
 * 	--enable-progpath
 * QA Notice: Files built without respecting CFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib64/libcnnet.so.1.2.2
 * /usr/bin/cngpij
 * /usr/bin/cnijnetprn
 * /usr/libexec/cups/backend/cnijnet
 * /usr/libexec/cups/backend/cnijusb
 * /usr/libexec/cups/filter/pstocanonij
 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib64/libcnnet.so.1.2.2

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

@mgorny : Yes, I already spotted them. The ones related to --enable-progpath are fixed inside ebuild in the next package release. But for others (configure.in, CFLAGS and LDFLAGS), fixing requires to rework many Canon scripts & sources, not just patching a few files.

Canon did only one release of that 3.80 sources, and provides no way to contribute to the product by submitting changes. Therefore, one will never be able to fix the (configure.in, CFLAGS, LDFLAGS) in the mainstream, especially for /usr/lib64/libcnnet.so.1.2.2, as that library and some others are provided as binary files in the source package.

So either you accept these limitations and allow the Gentoo users to work with their Canon printers without going through another box (Windows ?..), because these packages are proven to work very well on site despite these QA issues; or you reject the whole.

IMHO, I would more prioritize my users needs and open the gate for continuous improvement, than trying to reach the perfection at first glance. The "voice of your customers" looks very clear by just searching for the bugs with the "cnijfilter" keyword and then reading [1]. Up to you to at least listen that voice or to continue to ignore it, but in the latest, don't cry if other distros take the market lead by making the good balancing...

[1] https://bugs.gentoo.org/buglist.cgi?bug_status=__all__&content=cnijfilter&no_redirect=1&order=Importance&product=Gentoo%20Linux&query_format=specific

@mgorny
Copy link
Member
mgorny commented Sep 28, 2017

I would really appreciate if you stopped the preaching and focused on doing your work. As for prebuilt files, there is a QA_PREBUILT variable (man 5 ebuild) for that purpose.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

My work ?!? I am not paid by Gentoo to become an expert like you in the portage system. Thank you for the trick about prebuilt binaries that I will use in my next release, but I am afraid it won't change the whole picture.

@a17r
Copy link
Member
a17r commented Sep 28, 2017

@mfld-fr: Sure, we all work together on this platform and are not paid for that. Please also appreciate the time that it takes another developer to review your submissions.

While a package hardly ever enters tree to be called perfect, when we know there are issues, and we know the way to fix them, then we do that.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

@a17r : Be sure I think that one could never thanks enough all the people that work hard to maintain our favorite distro and to help newbies like me to improve their contribution.

But the keypoint here is that the mentionned QA issues have stricly no impact on the final user, and thus cannot be a blocker to deliver a working feature. First times of that review had added value in the sense it improved the ebuild itslef and the use case, but now what is asked is more to work on the Canon software itself, or to hide its defects, beyond the scope of a smooth integration. I am not the maintainer of the Canon software, just a user that needs it working in Gentoo, as the others listed in the related bugs.

Such QA issues can be fixed with a lower priority (this is what I am doing in the background). As in software industry, one should keep in mind that time to market with a good level of quality is critical for customer satisfaction, not looking for a perfect product that would come too late. Canon drivers have been requested for more than 10 years now, don't you think it is time to stop playing this rejection game ?

@mgorny
Copy link
Member
mgorny commented Sep 28, 2017

So are you saying that a warning telling user that in the future the autoconf will explode has no impact on the final user? Having user be shot with a screenful of warnings and spending his effort reporting a bug that shouldn't be there in the first place is not an impact? Or when things actually stop working, will that have no impact on the user?

My problem is that you submit an ebuild with known issues, and instead of either fixing them or asking about them, you pretend that they are not there. Then I verify it and suddenly discover that you have been ignoring a screenful of issues all the time.

HOMEPAGE="https://wiki.gentoo.org/wiki/Canon_Pixma_Printer"
SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${MY_P}.tar.gz"

LICENSE="GPL-2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you convinced this is GPL-2? Because AFAICS there's an EULA in LICENSE* which seems to cover the prebuilt files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you are right, there is a Canon prologue before the GPL v2 not only in the license files, but also displayed on the download web pages. Should i submit that prologue as a new license in Gentoo ?

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

@mgorny : Have you read my comments in the referenced bug and in this PR header ? I always stated that there are build warnings and QA issues. Sorry if you discover it only now. And do you think I never inspected these warnings to be sure they won't be a potential problem that would impact me the first, as the printer daily user ?

About the impact, I repeat again : these can be fixed in a second step, before the big crunch you are predicting in the future. I had a look to many bugs reports for some packages I am interested in : users are usually more concerned by package availability and working state than a clean build or emerge. Ones that open bugs for QA are... Larry and developers ! Think also about that.

QA should be a helper for us to continuously improve the quality, not a blocker. And yes, you are right, I am preaching to not see again the damage of a misused QMS on too E264 many businesses.

@a17r
Copy link
Member
a17r commented Sep 28, 2017

No, users will be concerned by flashing red QA warnings, and they do submit bugs. Thing is, this could have been fixed instead of spending time on several paragraphs. There's just no reason not to do it, even if you only get around to do it tomorrow or the day after - that won't matter after already waiting 10 years, as you said.

@mfld-fr
Copy link
Author
mfld-fr commented Sep 28, 2017

@a17r : thing is, we all together spent too much time for almost one month just on one package, and I am now afraid by the so predictible amount of time it will require to push more, that time without being able to test myself on other models.

Plus the fact that there is obviously a disconnect in our idea of quality management for non-critical software. Thanks anyway for your time and this conversation, it helped me to realize it won't match as a contributor, and you saved much time of everybody in the end.

Therefore closing this PR as rejected. I keep the submitted packages in https://github.com/mfld-fr/gentoo so that anyone could reuse the code improved during the review.

@mfld-fr mfld-fr closed this Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). new package The PR is adding a new package. self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0