Compare commits

..

1 Commits

Author SHA1 Message Date
Zdenek Dohnal a8bd0e8343 Testing: check if hostname is longer than zero 2020-12-15 12:05:54 +01:00
4 changed files with 36 additions and 71 deletions

6
.gitignore vendored
View File

@ -9,9 +9,3 @@
/sane-airscan-0.99.19.tar.gz
/sane-airscan-0.99.20.tar.gz
/sane-airscan-0.99.21.tar.gz
/sane-airscan-0.99.22.tar.gz
/sane-airscan-0.99.23.tar.gz
/sane-airscan-0.99.24.tar.gz
/sane-airscan-0.99.25.tar.gz
/sane-airscan-0.99.26.tar.gz
/sane-airscan-0.99.27.tar.gz

23
airscan-nohostname.patch Normal file
View File

@ -0,0 +1,23 @@
diff --git a/airscan-http.c b/airscan-http.c
index 1fdef6e..a32c50f 100644
--- a/airscan-http.c
+++ b/airscan-http.c
@@ -972,7 +972,7 @@ http_uri_strip_zone_suffux (http_uri *uri)
{
http_uri_field field;
const char *suffix;
- size_t len;
+ size_t len = 0;
char *host;
/* Check if we need to change something */
@@ -987,6 +987,9 @@ http_uri_strip_zone_suffux (http_uri *uri)
}
len = suffix - field.str;
+ if (len == 0) {
+ return; /* No hostname */
+ }
/* Update host */
host = alloca(len + 1);

View File

@ -4,8 +4,8 @@
%global _hardened_build 1
Name: sane-airscan
Version: 0.99.27
Release: 8%{?dist}
Version: 0.99.21
Release: 1%{?dist}.testing
Summary: SANE backend for AirScan (eSCL) and WSD document scanners
# the exception is defined in LICENSE, meant for SANE project in most cases
License: GPLv2+ with exceptions
@ -13,14 +13,13 @@ URL: https://github.com/alexpevzner/sane-airscan
Source: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
# backported from upstream
Patch001: airscan-nohostname.patch
# needed for querying and getting mDNS messages from local network
BuildRequires: avahi-devel
# project is written in C
BuildRequires: gcc
# fuzzer for testing is written in C++
BuildRequires: gcc-c++
# git is used during autosetup
BuildRequires: git-core
# creating credentials and SHA256 for UUID
@ -29,18 +28,14 @@ BuildRequires: gnutls-devel
BuildRequires: libjpeg-turbo-devel, libpng-devel
# XML data are carried on HTTP protocol, we need to create them and parse them
BuildRequires: libxml2-devel
# uses meson
BuildRequires: meson
# uses make
BuildRequires: make
# used in Makefile to get the correct compile and link flags
BuildRequires: pkgconf-pkg-config
# package is meant to be as one of SANE backends - it uses SANE API for handling
# devices, strings, words (bytes) and backend itself
BuildRequires: sane-backends-devel
%if 0%{?fedora} >= 38 || 0%{?rhel} >= 9
Recommends: ipp-usb
%endif
# needs shared library implementing the backend
Requires: libsane-airscan%{?_isa} = %{version}-%{release}
@ -51,11 +46,6 @@ when automatic discovery fails - airscan-discover.
%package -n libsane-airscan
Summary: SANE backend for eSCL or WSD
# USB scanners which support IPP-over-USB interface can communicate
# via sane-airscan once ipp-usb brings up an IPP interface for them
# remove for now until migration app is implemented
#Recommends: ipp-usb
%description -n libsane-airscan
This package contain a SANE backend for MFP and document scanners that
implements either eSCL (AirScan/AirPrint scanning) or WSD "driverless"
@ -66,16 +56,16 @@ scanning protocol.
%autosetup -S git
%build
%meson
%meson_build
# we need to set default CFLAGS, CPPFLAGS and LDFLAGS to get flags
# from build system into the build, otherwise project's default
# are used
%set_build_flags
%make_build
%check
%meson_test
%install
%meson_install
rm -f %{buildroot}%{_libdir}/sane/libsane-airscan.so
mkdir -p %{buildroot}/
%make_install STRIP=''
%files
%license COPYING LICENSE
@ -96,48 +86,6 @@ rm -f %{buildroot}%{_libdir}/sane/libsane-airscan.so
%changelog
* Thu Feb 23 2023 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-8
- move to meson
* Thu Feb 02 2023 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-7
- 2165612 - IPP-USB as a weak dependency of CUPS and sane-airscan
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.27-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.27-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Mar 31 2022 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-4
- remove ipp-usb for now until there is a migration path
* Wed Mar 23 2022 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-3
- recommend ipp-usb in case of USB scanner capable of IPP-over-USB
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.27-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Oct 11 2021 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-1
- 2012253 - sane-airscan-0.99.27 is available
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Apr 19 2021 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.26-1
- 1949055 - sane-airscan-0.99.26 is available
* Thu Feb 04 2021 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.24-1
- 1922563 - sane-airscan-0.99.24 is available
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 11 2021 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.23-1
- 1914565 - sane-airscan-0.99.23 is available
* Tue Dec 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.22-1
- 1906510 - sane-airscan-0.99.22 is available
* Tue Nov 24 2020 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.21-1
- 0.99.21

View File

@ -1 +1 @@
SHA512 (sane-airscan-0.99.27.tar.gz) = a35a92e26a4e3831f127e59bc520248abde8a7b304eb63ecf1d68092f51a8bc49bbc7503bead47ac84d0333d59ae0045d6d7a9f7b89d95f3ddfa2458f3781256
SHA512 (sane-airscan-0.99.21.tar.gz) = ab713995cfba6df4f627cf4bdf16222ddab64010c254d20b6a48f4aed22aef911c0b25c432983eee8ddf4b9d517224c62b032c02769943f2cca3dbdc6cf38010