ipp-usb 0.9.27 announce
Hi everybody,
I am pleased to announce the release of ipp-usb 0.9.27.
A few hours before I've erroneously issued a 0.9.26 release. Please, ignore it and sorry for inconvenience.
This new release brings some bug fixes and improvements.
1. Previously, after introduction of [uid auth], ipp-usb attempted to obtain localhost client UID even if it was not actually required. For example, in the default, permissive configuration. If client UID could not be obtained, it could cause connection attempt to be rejected.
As result, ipp-usb didn't work in snap, because snap configuration effectively prohibits ability to obtain client UID (this problem was noticed and reported by Till).
Now, ipp-usb obtains client UID only if it is really required by configuration.
2. Fixed [uid auth] behavior on systems with IPv6 disabled in the kernel configuration and only IPv4 is enabled.
3. Fixed allocation of TCP ports for devices. ipp-usb attempts to persist port allocation, so once allocated, port is "bound" to device, and if device disconnected and then connected again, it will receive the same port. Strictly speaking, it is not required neither for printing nor for scanning, but this level of reproducibility should be convenient for users.
Due to mistake, at the moment of port allocation for newly connected device only allocations of currently connected devices were taken into consideration. So port allocated for some device could be reused by newly connected device, if old device was not connected when new device arrives.
This is fixed in this release.
4. External dependency, github.com/OpenPrinting/goipp, now "vendored" which means that copy of its sources included into the ipp-usb source tree. This is a standard Go practice, and consistency of "vendored" libraries is strictly controlled by Go toolchain.
As result, there is no need to package the github.com/OpenPrinting/goipp in order to build ipp-usb; The ipp-usb package currently has no external dependencies at the moment of building. It should simplify packaging process.
Signature · 1 line
Wishes, Alexander Pevzner ([email protected])
Hi Alex,
can I somehow ignore vendor dir of goipp at the moment?
goipp project is already in Fedora for several years, and now it is already cloned into the newest CentOS Stream, so making it disappear would be more work than it gains.
Thank you in advance!
Zdenek
Quoted 26 lines · Alexander Pevzner
Hi everybody,
I am pleased to announce the release of ipp-usb 0.9.27.
A few hours before I've erroneously issued a 0.9.26 release. Please, ignore it and sorry for inconvenience.
This new release brings some bug fixes and improvements.
1. Previously, after introduction of [uid auth], ipp-usb attempted to obtain localhost client UID even if it was not actually required. For example, in the default, permissive configuration. If client UID could not be obtained, it could cause connection attempt to be rejected.
As result, ipp-usb didn't work in snap, because snap configuration effectively prohibits ability to obtain client UID (this problem was noticed and reported by Till).
Now, ipp-usb obtains client UID only if it is really required by configuration.
2. Fixed [uid auth] behavior on systems with IPv6 disabled in the kernel configuration and only IPv4 is enabled.
3. Fixed allocation of TCP ports for devices. ipp-usb attempts to persist port allocation, so once allocated, port is "bound" to device, and if device disconnected and then connected again, it will receive the same port. Strictly speaking, it is not required neither for printing nor for scanning, but this level of reproducibility should be convenient for users.
Due to mistake, at the moment of port allocation for newly connected device only allocations of currently connected devices were taken into consideration. So port allocated for some device could be reused by newly connected device, if old device was not connected when new device arrives.
This is fixed in this release.
4. External dependency, github.com/OpenPrinting/goipp, now "vendored" which means that copy of its sources included into the ipp-usb source tree. This is a standard Go practice, and consistency of "vendored" libraries is strictly controlled by Go toolchain.
As result, there is no need to package the github.com/OpenPrinting/goipp in order to build ipp-usb; The ipp-usb package currently has no external dependencies at the moment of building. It should simplify packaging process.
Signature · 3 lines
Zdenek Dohnal Senior Software Engineer Red Hat, BRQ-TPBC
Hi Zdenek,
you don't need to ignore. goipp can peacefully coexist with ipp-usb.
Alex.
Quoted 37 lines · Zdenek Dohnal
Hi Alex,
can I somehow ignore vendor dir of goipp at the moment?
goipp project is already in Fedora for several years, and now it is already cloned into the newest CentOS Stream, so making it disappear would be more work than it gains.
Thank you in advance!
Zdenek
Quoted 26 lines · Alexander Pevzner
Hi everybody,
I am pleased to announce the release of ipp-usb 0.9.27.
A few hours before I've erroneously issued a 0.9.26 release. Please, ignore it and sorry for inconvenience.
This new release brings some bug fixes and improvements.
1. Previously, after introduction of [uid auth], ipp-usb attempted to obtain localhost client UID even if it was not actually required. For example, in the default, permissive configuration. If client UID could not be obtained, it could cause connection attempt to be rejected.
As result, ipp-usb didn't work in snap, because snap configuration effectively prohibits ability to obtain client UID (this problem was noticed and reported by Till).
Now, ipp-usb obtains client UID only if it is really required by configuration.
2. Fixed [uid auth] behavior on systems with IPv6 disabled in the kernel configuration and only IPv4 is enabled.
3. Fixed allocation of TCP ports for devices. ipp-usb attempts to persist port allocation, so once allocated, port is "bound" to device, and if device disconnected and then connected again, it will receive the same port. Strictly speaking, it is not required neither for printing nor for scanning, but this level of reproducibility should be convenient for users.
Due to mistake, at the moment of port allocation for newly connected device only allocations of currently connected devices were taken into consideration. So port allocated for some device could be reused by newly connected device, if old device was not connected when new device arrives.
This is fixed in this release.
4. External dependency, github.com/OpenPrinting/goipp, now "vendored" which means that copy of its sources included into the ipp-usb source tree. This is a standard Go practice, and consistency of "vendored" libraries is strictly controlled by Go toolchain.
As result, there is no need to package the github.com/OpenPrinting/goipp in order to build ipp-usb; The ipp-usb package currently has no external dependencies at the moment of building. It should simplify packaging process.
Signature · 1 line
Wishes, Alexander Pevzner ([email protected])
Hello Zdenek
Quoted 1 line · Zdenek Dohnal
can I somehow ignore vendor dir of goipp at the moment?
I don't know how ipp-usb is made on Fedora / Red Hat so I may misunderstand things here.
I guess you talk about some additional vendor.tar.zst source file?
At openSUSE we have ipp-usb and goipp as separated source packages in the openSUSE Build Service (OBS) see
https://build.opensuse.org/package/show/Printing/ipp-usb
and
https://build.opensuse.org/package/show/Printing/goipp
Why separated source packages?
See my
https://build.opensuse.org/request/show/1157901#comment-1919874
where I wrote (excerpt):
-----------------------------------------------------------
please describe via an explanatory comment in the spec file what the additional vendor.tar.zst source is,
what its purpose is, and wherefrom it can be downloaded (exact upstream download URL) so that others at openSUSE can understand what that additional source is,
why it is needed for the openSUSE package, and that we can verify that vendor.tar.zst in the openSUSE package is the unmodified source from its upstream URL.
-----------------------------------------------------------
and my subsequent
https://build.opensuse.org/request/show/1157901#comment-1919883
where I wrote (excerpt):
-----------------------------------------------------------
In this particular case (additional vendor.tar.zst source) the files in vendor/github.com/OpenPrinting/goipp neither match GitHub master code in
https://github.com/OpenPrinting/goipp
nor what on
https://github.com/OpenPrinting/goipp/tags
the tar.gz for v1.0.0 nor v1.1.0 result
(in contrast to what vendor/modules.txt seems to tell) so currently the additional vendor.tar.zst source looks rather "suspicious" - at least to me.
-----------------------------------------------------------
I wrote that in Aplil 2024 with the XZ attack in my mind so additional sources that do not match what one gets from its "well known" upstream URLs are rather scary.
I would recommend to
Keep Separated Sources Strictly Separated ( KSSSS ;-) so that others can understand what "the sources" are and can retrace where "the sources" come from and can validate that "the sources" are unmodified upstream sources.
Kind Regards
Johannes Meixner
Signature · 3 lines
SUSE Software Solutions Germany GmbH Frankenstr. 146 - 90461 Nuernberg - Germany (HRB 36809, AG Nuernberg) GF: Ivo Totev
Hi Johannes,
Quoted 11 lines · Johannes Meixner
Hello Zdenek
Quoted 1 line · Zdenek Dohnal
can I somehow ignore vendor dir of goipp at the moment?
I don't know how ipp-usb is made on Fedora / Red Hat so I may misunderstand things here.
I guess you talk about some additional vendor.tar.zst source file?
Nope, Alex added some version of goipp (around goipp upstream commit 94c92a6d5d2 ) into ipp-usb 0.9.27 archive itself - there are some differences, but it does not look critical, and they are in the current goipp master...
Quoted 7 lines
At openSUSE we have ipp-usb and goipp as separated source packages in the openSUSE Build Service (OBS) see
https://build.opensuse.org/package/show/Printing/ipp-usb
and
https://build.opensuse.org/package/show/Printing/goipp
I packaged goipp and ipp-usb this way as well, back in 2020 or something - https://koji.fedoraproject.org/koji/packageinfo?packageID=32067 , https://koji.fedoraproject.org/koji/packageinfo?packageID=32248
Quoted 2 lines
Why separated source packages?
I usually am against bundling, but sometimes it makes sense - if we could say ipp-usb is the only project using goipp, then it could be okay to include it. But this could happen only in OS, where it is defined that ipp-usb will be the only goipp user. This we can't say for sure for github project, where we don't know how many users forked and uses the code...
So I would go for goipp being separated as well...
Quoted 34 lines
See my
https://build.opensuse.org/request/show/1157901#comment-1919874
where I wrote (excerpt):
-----------------------------------------------------------
please describe via an explanatory comment in the spec file what the additional vendor.tar.zst source is,
what its purpose is, and wherefrom it can be downloaded (exact upstream download URL) so that others at openSUSE can understand what that additional source is,
why it is needed for the openSUSE package, and that we can verify that vendor.tar.zst in the openSUSE package is the unmodified source from its upstream URL.
-----------------------------------------------------------
and my subsequent
https://build.opensuse.org/request/show/1157901#comment-1919883
where I wrote (excerpt):
-----------------------------------------------------------
In this particular case (additional vendor.tar.zst source) the files in vendor/github.com/OpenPrinting/goipp neither match GitHub master code in
https://github.com/OpenPrinting/goipp
nor what on
https://github.com/OpenPrinting/goipp/tags
the tar.gz for v1.0.0 nor v1.1.0 result
(in contrast to whatvendor/modules.txtseems to tell) so currently the additional vendor.tar.zst source looks rather "suspicious" - at least to me.
-----------------------------------------------------------I wrote that in Aplil 2024 with the XZ attack in my mind so additional sources that do not match what one gets from its "well known" upstream URLs are rather scary.
Quoted 6 lines
I would recommend to
Keep Separated Sources Strictly Separated ( KSSSS ;-) so that others can understand what "the sources" are and can retrace where "the sources" come from and can validate that "the sources" are unmodified upstream sources.
The archive you speak about looks to be added by someone from community, where here it was added by goipp author.
Best regards,
Zdenek
P.S. 0.9.27 can be compiled even without vendor dir (I was afraid it will fail since it is missing and Makefile sets -mod=vendor)
Quoted 4 lines
Kind Regards
Johannes Meixner
Signature · 3 lines
Zdenek Dohnal Senior Software Engineer Red Hat, BRQ-TPBC
Hi Zdenek & Johannes,
I probably need to explain some details.
First of all, when working with external dependencies, Go binds to specific versions of external libraries. This is done not by version number—which can easily be changed, either intentionally or by mistake—but by the cryptographic hash of the entire source code of the external libraries. Thus, the library sources actually used for building are always consistent with a particular version of the library.
Second, no changes in the goipp master will affect the building of ipp-usb. If I want to upgrade to the next goipp version, this is always an explicit action on the ipp-usb side (not on the goipp side).
The relationship between a project that uses certain libraries (i.e., ipp-usb) and projects that provide these libraries is controlled by the go.mod and go.sum files, which are part of the versioned source of ipp-usb. Therefore, any changes in dependencies will be visible in the ipp-usb repository.
In the Go ecosystem, this is referred to as a "reproducible build." By the way, the Go toolchain itself contains many external libraries in vendored form.
Additionally, vendored libraries are only used for building packages that vendor them and are never installed locally. Consider it not as an independent copy of the library, but as a kind of cache. The consistency of this cache with the master copy is strictly enforced by the Go toolchain.
Thus, vendoring goipp does not violate your KSSSS principle and actually simplifies logistics, as any good cache does.
The -mod=vendor option is only required by the older Go compiler, which is still used on Debian 10. To my surprise, there is still some demand for ipp-usb to run on this old OS, so I will support it for a reasonable time. Newer versions of the Go toolchain handle this automatically.
You may delete the vendor directory in your RedHat build or leave it; it will not change the result. However, you cannot modify source files in the vendored copy and expect your changes to be included in the ipp-usb build; Go will not allow that.
So essentially, nothing has changed from your perspective. You can continue to distribute the goipp package with RedHat and CentOS; it is now just another Go library package that does not affect ipp-usb. You may remove the build dependency from the ipp-usb .spec file, but you are not required to do so.
Regarding SUSE, distributing goipp as a separate vendor.tar.zst may work for SUSE, but it compromises source code transparency. SUSE users cannot easily verify that ipp-usb for their system is built exactly from the sources published on GitHub. I believe that source code transparency is a significant feature of open-source projects from a cybersecurity standpoint; it helps ensure that our users will not inadvertently receive malicious code from official sources.
Honestly, I have also used this practice in OpenSUSE build services because it is simpler than building an "intermediate" package. However, it is no longer necessary.
I hope my explanation clarifies things for now. Please feel free to ask additional questions if any details are still unclear.
--
Best regards, Alex.