Hello community,

here is the log from the commit of package surfraw for openSUSE:Factory checked 
in at 2019-06-19 21:13:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/surfraw (Old)
 and      /work/SRC/openSUSE:Factory/.surfraw.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "surfraw"

Wed Jun 19 21:13:20 2019 rev:2 rq:710794 version:2.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/surfraw/surfraw.changes  2018-03-26 
13:03:23.540636053 +0200
+++ /work/SRC/openSUSE:Factory/.surfraw.new.4811/surfraw.changes        
2019-06-19 21:13:55.158833110 +0200
@@ -1,0 +2,19 @@
+Tue Jun 11 13:09:31 UTC 2019 - Bernhard Wiedemann <[email protected]>
+
+- Add reproducible.patch to override build date (boo#1047218)
+
+-------------------------------------------------------------------
+Sat Mar 30 11:04:50 UTC 2019 - John Vandenberg <[email protected]>
+
+- Create subpackages for opensearch and woffle as they have
+  different dependencies, with opensearch disabled due to
+  dependencies not in factory
+- Fix elvi phpdoc which wasnt executable
+- Add missing dependencies
+- Activate the tests.  While they mostly fail due to no internet,
+  they are useful to spot missing dependencies.
+- Remove two elvi which depend on apt-cache, suited for Debian systems
+- Remove /etc/xdg from directories owned by this package
+- Add test-show-failing-url.patch for debugging purpose
+
+-------------------------------------------------------------------

New:
----
  reproducible.patch
  test-show-failing-url.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ surfraw.spec ++++++
--- /var/tmp/diff_new_pack.Q6qWRa/_old  2019-06-19 21:13:58.226836236 +0200
+++ /var/tmp/diff_new_pack.Q6qWRa/_new  2019-06-19 21:13:58.230836240 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package surfraw
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,10 +12,13 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
+# Requires perl-WWW-OpenSearch not in factory
+%bcond_with     elvi_opensearch
+
 Name:           surfraw
 Version:        2.3.0
 Release:        0
@@ -24,11 +27,21 @@
 Group:          Productivity/Networking/Web/Browsers
 URL:            https://gitlab.com/surfraw/Surfraw
 Source:         
https://gitlab.com/surfraw/Surfraw/uploads/2de827b2786ef2fe43b6f07913ca7b7f/%{name}-%{version}.tar.gz
+Patch0:         test-show-failing-url.patch
+# PATCH-FIX-UPSTREAM
+Patch1:         reproducible.patch
+BuildRequires:  htdig
 BuildRequires:  make
 BuildRequires:  perl-HTML-Parser
+BuildRequires:  perl-LWP-Protocol-https
 BuildRequires:  perl-libwww-perl
+%if %{with elvi_opensearch}
+BuildRequires:  perl-WWW-OpenSearch
+%endif
 BuildRequires:  sed
 BuildRequires:  w3m
+BuildRequires:  wget
+Requires:       sed
 Requires:       w3m
 Requires:       xdg-utils
 BuildArch:      noarch
@@ -40,18 +53,67 @@
 Surfraw abstracts the browser away from input. Interpretation of
 linguistic forms is handed back to the shell.
 
+%if %{with elvi_opensearch}
+%package opensearch
+Summary:        Surfraw OpenSearch support
+Group:          Productivity/Networking/Web/Browsers
+Requires:       %{name} = %{version}
+Requires:       perl-HTML-Parser
+Requires:       perl-LWP-Protocol-https
+Requires:       perl-WWW-OpenSearch
+Requires:       perl-libwww-perl
+
+%description opensearch
+Surfraw OpenSearch provides opensearch support.
+%endif
+
+%package woffle
+Summary:        Surfraw woffle
+Group:          Productivity/Networking/Web/Browsers
+Requires:       %{name} = %{version}
+Requires:       htdig
+Requires:       wget
+
+%description woffle
+Surfraw elvi woffle.
+
+Uses htdig to create an index that needs to be served via a webserver.
+
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+chmod a+x elvi/phpdoc
 
 %build
 %configure --libdir=%{_libexecdir} \
+%if %{without elvi_opensearch}
             --disable-opensearch \
+%endif
             --with-text-browser=w3m \
             --with-graphical-browser=xdg-open
 make %{?_smp_mflags}
 
 %install
 %make_install
+# These depend on apt-cache
+rm %{buildroot}/%{_libexecdir}/%{name}/debpkghome
+rm %{buildroot}/%{_libexecdir}/%{name}/debvcsbrowse
+
+%check
+# Several elvi fail trying to re-use elvi duckduckgo and google , resulting in
+# Get failed: 501 Protocol scheme 'surfraw' is not supported
+# as it is trying to fetch `surfraw: duckduckgo: No elvis or bookmark with 
that name`
+mkdir -p $HOME/.config/surfraw/elvi
+cp elvi/duckduckgo $HOME/.config/surfraw/elvi
+cp elvi/google $HOME/.config/surfraw/elvi
+
+rm test/debpkghome.test
+rm test/debvcsbrowse.test
+
+export BROWSER=echo
+export PATH=${PWD}/%{buildroot}/%{_libexecdir}/%{name}:$PATH
+./test/runtests
 
 %files
 %doc AUTHORS ChangeLog HACKING NEWS TODO surfraw.lsm
@@ -59,11 +121,24 @@
 %{_bindir}/sr
 %{_bindir}/%{name}
 %{_bindir}/surfraw-update-path
-%{_sysconfdir}/xdg
+%dir %{_sysconfdir}/xdg/%{name}
 %config(noreplace) %{_sysconfdir}/xdg/%{name}/bookmarks
 %config(noreplace) %{_sysconfdir}/xdg/%{name}/conf
-%{_libexecdir}/%{name}
+%exclude %{_libexecdir}/%{name}/woffle
+%dir %{_libexecdir}/%{name}
 %{_libexecdir}/%{name}/*
+%exclude %{_mandir}/man1/opensearch-* 
 %{_mandir}/man1/*.1*
 
+%if %{with elvi_opensearch}
+%files opensearch
+%license COPYING
+%{_bindir}/opensearch*
+%{_mandir}/man1/opensearch-* 
+%endif
+
+%files woffle
+%license COPYING
+%{_libexecdir}/%{name}/woffle
+
 %changelog

++++++ reproducible.patch ++++++
https://gitlab.com/surfraw/Surfraw/merge_requests/2

commit b5c3922105ccf5fbfddb9819daf2e662827f6d2c
Author: Bernhard M. Wiedemann <[email protected]>
Date:   Fri Mar 30 04:29:22 2018 +0200

    Use ChangeLog date instead of build date
    
    in order to make builds reproducible.
    See https://reproducible-builds.org/ for why this is good
    
    Without this patch, surfraw.lsm differed between builds.

Index: surfraw-2.3.0/configure
===================================================================
--- surfraw-2.3.0.orig/configure
+++ surfraw-2.3.0/configure
@@ -2504,7 +2504,7 @@ fi
 
 
 
-ISODATE=`date +%Y-%m-%d`
+ISODATE=`date -u -r ChangeLog +%Y-%m-%d`
 
 
 
++++++ test-show-failing-url.patch ++++++
Index: surfraw-2.3.0/test/runtests
===================================================================
--- surfraw-2.3.0.orig/test/runtests
+++ surfraw-2.3.0/test/runtests
@@ -160,7 +160,7 @@ sub testelvis
        my $response=$ua->get($url);
        unless($response->is_success)
        {
-           print "FAIL: Get failed: ",$response->status_line;
+           print "FAIL: Get '", $url, "' failed: ",$response->status_line;
            if($response->code =~/^[45]/)
            {
                push(@results,$FAIL);

Reply via email to