After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743318 - configure script missing check for scrollkeeper dependency
configure script missing check for scrollkeeper dependency
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.20.0
Other Linux
: Normal enhancement
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2015-01-21 22:05 UTC by Adam Danischewski
Modified: 2018-03-19 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove scrollkeeper / rarian dependency for help manual (4.03 KB, patch)
2018-01-25 19:34 UTC, Curtis Gedak
none Details | Review
Reduce scrollkeeper dependency (v2) (3.70 KB, patch)
2018-01-30 23:51 UTC, Curtis Gedak
none Details | Review
Reduce scrollkeeper dependency (v3) (4.75 KB, patch)
2018-01-31 17:10 UTC, Curtis Gedak
none Details | Review
Reduce scrollkeeper dependency (v4) (7.08 KB, patch)
2018-02-08 10:53 UTC, Mike Fleetwood
none Details | Review

Description Adam Danischewski 2015-01-21 22:05:08 UTC
> Which version of Ubuntu are you using to compile GParted?
>
I was compiling gparted 0.20.0 on a Chrome/Chroot - Crouton a Ubuntu fork of precise (3.8.11) for Acer C720 (peppy) x86_64.

On 1/21/15, Curtis Gedak <gedakc@gmail.com> wrote:
> Hi Adam,
>
> Your suggestion sounds reasonable.
>
> So that your request does not get lost, please create a bug report with
> the issue and your suggestion as an enhancement request.
> http://gparted.org/bugs.php
>
> A patch to address the issue would be welcome too.  :-)
>
> Regards,
> Curtis
>
> On 15-01-21 12:47 PM, Adam Danischewski wrote:
>>>    ./configure --disable-scrollkeeper
>>>
>>> This is documented in the README file.
>>>
>>> Having said that, the fact you encountered this issue is an indication
>>> that there is probably a better way to do this.  If you have a
>>> suggestion then we'd like to hear it.
>>
>> I think it would probably be more intuitive if you required the reverse
>> logic:
>>
>> ./configure --enable-scrollkeeper
>>
>> Such that scrollkeeper is not a dependency in the general target list
>> for "make" in the Makefile.
>>
>> This way people know that they are adding in something that the
>> configure script isn't really going to check for. Otherwise, you could
>> add logic to the configure script to automatically and quietly avoid
>> building a Makefile that requires scrollkeeper if its not found. If
>> so, it would probably be useful to put a message at the end of the
>> configure script output stating: scrollkeeper is not installed - and
>> list the functionality that will be missing - and if you want the
>> functionality you can install the missing packages/libraries then
>> rerun the configure script.
>>
>> The problem from a human-factors pov is that the instructions I've
>> seen for compiling gparted state to type "make" then as root "make
>> install" or "sudo make install". No mention about be sure to check the
>> README for additional dependencies.
>>
>> I think the configure script is probably the best place to avoid
>> problems like this since its already designed to detect gaps in in
>> dependencies so I would try to keep it that way wherever possible.
>>
>> +Adam
>>
>> On 1/21/15, Curtis Gedak <gedakc@gmail.com> wrote:
>>> Hi Adam,
>>>
>>> Thank you for your interest in GParted.
>>>
>>> Which version of Ubuntu are you using to compile GParted?
>>>
>>> We try to indicate dependencies for several GNU/Linux distributions in
>>> the README file (under the b. Building from Source section).
>>> https://git.gnome.org/browse/gparted/tree/README
>>>
>>> Scrollkeeper is not a requirement to build and run GParted.  As such I
>>> don't think we should make it a requirement in the configure script.
>>>
>>> Scrollkeeper can be disabled using the --disable-scrollkeeper configure
>>> option.  For example:
>>>
>>>    ./configure --disable-scrollkeeper
>>>
>>> This is documented in the README file.
>>>
>>> Having said that, the fact you encountered this issue is an indication
>>> that there is probably a better way to do this.  If you have a
>>> suggestion then we'd like to hear it.
>>>
>>> Regards,
>>> Curtis
>>>
>>> On 15-01-20 04:03 PM, Adam Danischewski wrote:
>>>> Hi,
>>>>
>>>> I just tried to compile gparted on Ubuntu, the configure script
>>>> completed (after I installed several missing packages).
>>>>
>>>> However while compiling I received scrollkeeper errors.
>>>>
>>>> I installed librarian-dev and librarian0 and it still did not compile.
>>>>
>>>> Then I installed rarian-compat and it compiled.
>>>>
>>>> So it looks like the configure script should require at least
>>>> rarian-compat, and should probably be checked for the other two.
>>>>
>>>> +Adam
>>>
>>>
>
Comment 1 Adam Danischewski 2015-01-22 00:17:09 UTC
I took a look at the configure script and m4 templates. 

I didn't test it, but changing configure lines 17387 to 17392 from this:  
# Check whether --enable-scrollkeeper was given.
if test "${enable_scrollkeeper+set}" = set; then :
  enableval=$enable_scrollkeeper;
else
  enable_scrollkeeper=yes
fi

to this:  
# Check whether --enable-scrollkeeper was given.
if test "${enable_scrollkeeper+set}" = set; then :
  enableval=$enable_scrollkeeper;
else
  enable_scrollkeeper=no 
fi

should default scrollkeeper compilation to no making it so you have to pass --enable-scrollkeeper to configure. This would solve the dependency problem yet it won't tell the user that the scrollkeeper functionality is missing. 

I don't have alot of time to really dig into this at the moment + I have only minimal m4 scripting knowledge (although it-just-so-happened before this issue I was just starting to play with m4). 

I tried to track down the logic a little and it looks like the configure scripts presume that if gnome-doc-utils is installed then everything is good to go for scrollkeeper, this wasn't the case on Ubuntu for me. 

My gnome-doc-utils requires the following: 
apt-cache depends gnome-doc-utils
gnome-doc-utils
  Depends: python2.7
  Depends: python
  Depends: python
  Depends: python-libxml2
  Depends: libxml2-utils
    libxml2-utils:i386
  Depends: xsltproc
    xsltproc:i386

Yet I needed rarian-compat and possibly librarian0, librarian-dev.
Comment 2 Curtis Gedak 2015-01-23 19:52:13 UTC
Thank you Adam for creating this report, posting the information, and
researching further.

The code you mentioned changing is not part of the GParted code base
we manage, but appears to be in gnome-doc-utils.

While researching this problem I came across the following related bug
report:

Bug 670917 - gnome-doc-utils requires rarian-compat: "/bin/sh:
             scrollkeeper-config: command not found"

My guess that the distro you used does not yet contain the fix
mentioned in bug 670917 because Ubuntu 12.04 Precise was released in
April 2012 and was likely in a freeze status when the fix was
committed.


Adam,

Can you test with a newer distro version to test if the problem is
resolved?

If not, then it might be best to close this report as "RESOLVED -
FIXED" with the assumption that the upstream gnome-doc-utils bug has
indeed been properly fixed.

Regards,
Curtis


BACKGROUND INFORMATION
======================

I've been researching this issue and come to the following discovery:
The GParted code does not contain scrollkeeper configure logic.

More specifically the problem is that the scrollkeeper requirement is
related to gnome-doc-utils (as you mentioned Adam).  GParted uses
gnome-doc-utils which is required for the GParted help manual
documentation.  However, the GParted source code does not contain the
logic referred to by Adam.


How I checked GParted code for ScrollKeeper
-------------------------------------------

$ git clone git://git.gnome.org/gparted
Cloning into 'gparted'...
remote: Counting objects: 14359, done.
remote: Compressing objects: 100% (7678/7678), done.
remote: Total 14359 (delta 11467), reused 7936 (delta 6626)
Receiving objects: 100% (14359/14359), 5.84 MiB | 741 KiB/s, done.
Resolving deltas: 100% (11467/11467), done.
$ find ./gparted/ -exec grep -li scrollkeeper {} \;
./gparted/README
./gparted/Makefile.am
$ grep -A 5 -B 5 -i scrollkeeper ./gparted/Makefile.am
        intltool-merge          \
        intltool-update         \
        gnome-doc-utils.make

DISTCHECK_CONFIGURE_FLAGS =     \
        --disable-scrollkeeper
$

Note that the --disable-scrollkeeper in the GParted top level
Makefile.am file is required by gnome-doc-utils.
See - 2.8 Modifying the Toplevel Makefile.am:
https://developer.gnome.org/gnome-doc-make/unstable/migrating.html.en


Information on ScrollKeeper
---------------------------

According to the Wikipedia ScrollKeeper [1] entry:

   ScrollKeeper is a document cataloging system. It manages
   documentation metadata, as specified by the Open Source Metadata
   Framework (OMF). ScrollKeeper was used by the GNOME desktop help
   browser, Yelp, but has since been replaced by Rarian. It
   was also used by the KDE help browser and ScrollServer
   documentation server.

The last release was scrollkeeper-0.3.14 [2] on 2003-12-06.

---
[1] https://en.wikipedia.org/wiki/ScrollKeeper
[2] http://sourceforge.net/projects/scrollkeeper/files/scrollkeeper/
Comment 3 Adam Danischewski 2015-01-24 02:31:11 UTC
Hi Curtis, 

Thanks for looking into it. 

Looks like the bug you found (Bug 670917) is exactly the issue - so I think its probably safe to close this out. 

If you don't mind holding off for a day or two, I have just finished setting up Virtualbox so I can probably download and test it on a new distro sometime within the next couple of days (internet connection has been really slow) if you want to be sure. 

+Adam
Comment 4 Curtis Gedak 2015-01-24 16:57:06 UTC
> If you don't mind holding off for a day or two...

'Sure can do Adam.  It is preferable to test solutions to be sure that the bugs are indeed fixed.

Waiting on your testing results response.  :-)
Comment 5 Adam Danischewski 2015-01-24 17:14:52 UTC
Tested compilation of gparted-0.20.0 on a fresh Ubuntu 14.10 install (on VirtualBox 4.3.20 
- although it probably doesn't matter for purposes of this problem). 

########## run 1 
./configure 
./configure: line 15974: intltool-update: command not found
checking for intltool >= 0.35.5...  found
configure: error: Your intltool is too old.  You need intltool 0.35.5 or later.
... 

++ after installing intltool ++
########## run 2 
./configure  
checking for uuid_generate in -luuid... no
configure: error: *** libuuid not found.
... 

++ after installing uuid-dev ++  
########## run 3 
./configure 
checking for ped_device_read in -lparted... no
configure: error: *** libparted not found.
... 

++ after installing libparted-dev ++
########## run 4 
./configure 
checking for GTHREAD... no
configure: error: Package requirements (gthread-2.0) were not met:

++ after installing libglib2.0-dev ++ 
########## run 5 
./configure 
checking for GTKMM... no
configure: error: Package requirements (gtkmm-2.4 > 2.8) were not met:

No package 'gtkmm-2.4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTKMM_CFLAGS
and GTKMM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

++ after installing libgtkmm-2.4-dev ++
########## run 6 
./configure 
checking gnome-doc-utils >= 0.3.2... no
configure: error: gnome-doc-utils >= 0.3.2 not found

Without providing any options configure requires gnome-doc-utils, 
is that supposed to be the default? Maybe it would be useful to 
change this to default to no documentation and have the user supply
the flags if they want the documentation built-in? Or simply remark 
that documentation will not be included because gnome-doc-utils 
was missing, if you want the documentation install the gnome-doc-utils
package and rerun configure. 

++ after installing gnome-doc-utils ++ 
########## run 7 
./configure  

======================== Final configuration ===========================
                         Installing into prefix  :  /usr/local

                      Build help documentation?  :  yes

           Use native libparted dmraid support?  :  no

       --- Features Based On Libparted Version ---
       Need partition table re-read workaround?  :  no
     Supports large sector sizes (> 512 bytes)?  :  yes
   Have old libparted file system resizing API?  :  no
   Have new libparted file system resizing LIB?  :  yes
                  Enable online resize support?  :  yes

 If all settings are OK, type make and then (as root) make install

======================================================================== 

configure Success!! 

++ after successful configure ++ 
make run 1 
  `which xml2po` -m docbook -e -t "${mo}" \
    "${d}C/gparted.xml" > gparted.xml.tmp && \
    cp gparted.xml.tmp gparted.xml && rm -f gparted.xml.tmp)
/bin/bash: scrollkeeper-config: command not found
/bin/bash: line 1: scrollkeeper-config: command not found
The file '/Templates/C/scrollkeeper_cl.xml' does not exist.
Please check your ScrollKeeper installation.
Makefile:666: recipe for target 'gparted-C.omf' failed
make[2]: *** [gparted-C.omf] Error 1
make[2]: Leaving directory '/home/vmuser/gparted-0.20.0/help'
Makefile:484: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/vmuser/gparted-0.20.0'
Makefile:347: recipe for target 'all' failed
make: *** [all] Error 2

++ after install of rarian-compat ++ 
make run 2
make[2]: Entering directory '/home/vmuser/gparted-0.20.0'
sed -e 's,[@]installdir[@],/usr/local/sbin,g' -e 's,[@]gksuprog[@],,g' < ./gparted.in > gparted
chmod +x gparted
sed -e 's,[@]installdir[@],/usr/local/sbin,g' -e 's,[@]gksuprog[@],,g' < ./gparted.desktop.in.in > gparted.desktop.in
LC_ALL=C /usr/bin/intltool-merge  -d -u -c ./po/.intltool-merge-cache ./po gparted.desktop.in gparted.desktop
Generating and caching the translation database
Merging translations into gparted.desktop.
make[2]: Leaving directory '/home/vmuser/gparted-0.20.0'
make[1]: Leaving directory '/home/vmuser/gparted-0.20.0'

make Success!! 
..
make install Success!!
test gparted works Success!!  

So it looks like the issue with missing rarian-compat dependency is still there
in the latest gnome-doc-utils yet I'm not sure what version its supposed to be 
fixed in.
  
root@vmuser-VirtualBox:~/gparted-0.20.0# dpkg -l gnome-doc-utils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  gnome-doc-util 0.20.10-1bui all          collection of documentation utili

It may make sense to change the default to exclude gnome-doc-utils and if it is 
included to include a warning. 

Here are some other issues that probably have nothing to do with gparted
development yet I have no idea who else to tell: 
The configure script would be more useful if it would switch to probe mode after a failure and report all failed dependencies to whatever extent it can. 
Rerunning for every failure to keep detecting missing packages can be time-consuming. 

Also some of the missing dependencies can not be found by simply doing an apt-cache search, such as gthread-2.0 missing requires libglib2.0-dev yet libglib2.0-dev does not show up in apt-cache search gthread-2.0 

It looks like some additional keywords are needed for those packages. 

Not sure if its worth documenting this in gparted but it may be useful to do so.
Comment 6 Adam Danischewski 2015-01-24 17:39:00 UTC
root@vmuser-VirtualBox:~# dpkg -s gnome-doc-utils | grep Version
Version: 0.20.10-1build1
Comment 7 Adam Danischewski 2015-01-24 18:48:36 UTC
Caveat emptor: I don't know m4 or automake. 

Looking at the Automake documentation (https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Libraries.html): 
==============================================================================
— Macro: AC_CHECK_LIB (library, function, [action-if-found], [action-if-not-found], [other-libraries])

    Test whether the library library is available by trying to link a test program that calls function function with the library. function should be a function provided by the library. Use the base name of the library; e.g., to check for -lmp, use ‘mp’ as the library argument.

    action-if-found is a list of shell commands to run if the link with the library succeeds; action-if-not-found is a list of shell commands to run if the link fails. If action-if-found is not specified, the default action prepends -llibrary to LIBS and defines ‘HAVE_LIBlibrary’ (in all capitals). This macro is intended to support building LIBS in a right-to-left (least-dependent to most-dependent) fashion such that library dependencies are satisfied as a natural side effect of consecutive tests. Linkers are sensitive to library ordering so the order in which LIBS is generated is important to reliable detection of libraries.

    If linking with library results in unresolved symbols that would be resolved by linking with additional libraries, give those libraries as the other-libraries argument, separated by spaces: e.g., -lXt -lX11. Otherwise, this macro may fail to detect that library is present, because linking the test program can fail with unresolved symbols. The other-libraries argument should be limited to cases where it is desirable to test for one library in the presence of another that is not already in LIBS. 

    AC_CHECK_LIB requires some care in usage, and should be avoided in some common cases. Many standard functions like gethostbyname appear in the standard C library on some hosts, and in special libraries like nsl on other hosts. On some hosts the special libraries contain variant implementations that you may not want to use. These days it is normally better to use AC_SEARCH_LIBS([gethostbyname], [nsl]) instead of AC_CHECK_LIB([nsl], [gethostbyname]).

==============================================================================

I'm not sure but it looks like in most of the configure script macro defintions, the action-if-not-found is empty so that causes it to stop. 
E.g. configure.ac 
AC_CHECK_LIB([uuid], [uuid_generate], [], AC_MSG_ERROR([*** libuuid not found.]))

If thats the case then to detect all the missing packages perhaps logic can be included that builds a missing packages string and sets a flag to skip the Makefile creation and anything else that will break. 
E.g. 
AC_CHECK_LIB([uuid], [uuid_generate], [<<< insert hooks to logic for keeping track of missing packages and set a flag for skipping anything that will break  >>>>], AC_MSG_ERROR([*** libuuid not found.]))

Also, it looks like changing 
gnome-doc-utils.m4 line 27: AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
to 
gnome-doc-utils.m4 line 27: AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "no"])
would default the configure script - w/out telling the user - to not include the documentation if gnome-doc-utils is not installed (yet it will still possibly fail if gnome-doc-utils *is* installed) due to the still-not-fixed dependency on rarian-compat not being detected.
Comment 8 Adam Danischewski 2015-01-24 18:52:47 UTC
Hit send on accident, maybe not on second thought about gnome-doc-utils.m4 line 27: AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu"
= "yes" -a "$enable_scrollkeeper" = "no"])

and I meant to mention that the logic would skip whatever breaks and then 
display the missing packages string.
Comment 9 Curtis Gedak 2015-01-28 17:55:53 UTC
Hi Adam,

It looks like you've been busy.  :-)

> Without providing any options configure requires gnome-doc-utils, 
> is that supposed to be the default?

Yes, we wish the default to build documentation because this is desired as the default for GNU/Linux distribution packages.  The standard "./configure; make; make install" makes it it easier for the package maintainers.


> Rerunning for every failure to keep detecting missing packages can be
> time-consuming. 

This is what I'm familiar with regarding building other packages too.  Part of this might be a trade off of keeping the configure.ac file maintainable.


If I understand the situation correctly then based on your testing the problem appears to be that the rarian-compat package is not listed as a requirement for gnome-doc-utils package in the distro you are using.

Perhaps you might consider raising this issue with the distro you are using?


A complicating factor in all this is that the GNOME project appears to be moving towards yelp-utils and away from gnome-doc-utils.

GNOME Goal: Port To New Documentation Infrastructure
https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/NewDocumentationInfrastructure?action=show&redirect=GnomeGoals%2FNewDocumentationInfrastructure

For GParted we try to ensure that it compiles and runs on many currently support GNU/Linux distros.  That means support for older distros like RedHat/CentOS 5, which do not have GNOME 3.x or yelp-tools.
Comment 10 Curtis Gedak 2018-01-25 19:26:25 UTC
With the next release of Debian (code named "Buster) there is a plan to remove the rarian package.

Because the rarian package (which provided the old scrollkeeper package functionality) does not appear to be required for viewing the GParted help manual it would seem the best path forward is to remove the dependency on scollkeeper / rarian.

Patch to follow.
Comment 11 Curtis Gedak 2018-01-25 19:34:19 UTC
Created attachment 367439 [details] [review]
Remove scrollkeeper / rarian dependency for help manual

Remove dependency on scrollkeeper / rarian for help manual (#743318)
    
Currently the help manual works with the yelp viewer regardless of
whether GParted is compiled and installed with support for
scrollkeeper and omf files.
    
The next Debian release named "Buster" plans to remove the rarian
package which provides the old scrollkeeper functionality.  See:
    
    rarian: Don't release with Buster
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885657
    
Due to this upcoming change remove the help manual dependency on
scrollkeeper.
Comment 12 Curtis Gedak 2018-01-25 19:39:31 UTC
'Just adding another Debian bug reference that is specific to GParted.

    gparted: Please drop Build-Depends on rarian-compat
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885651

Curtis
Comment 13 Mike Fleetwood 2018-01-29 19:56:39 UTC
Hi Curtis,

I've tested this on the following distros:
  Arch (rolling)  OK
  Fedora 27       OK
  CentOS 7        OK
  CentOS 6        Help breaks
On CentOS 6, without the help/gparted.omf.in file, the OMF files aren't
built or installed into /usr/share/omf/gparted/ and yelp doesn't display
the GParted manual when run as 'yelp ghelp:gparted' or from GParted >
Help > Contents.  I assume that the GNOME 2 desktop of CentOS 6 still
requires OMF files.

Thanks,
Mike
Comment 14 Curtis Gedak 2018-01-29 20:33:48 UTC
Thank you Mike for testing.  I will re-write the patch to use additional logic so that we don't break CentOS 6.

For reference sake I have included our IRC discussion below:

<mfleetwo> Hi Curtis,
 I've been testing your fix for bug 743318
 My initial findings is that removing gparted.omf.in is that it breaks finding GParted GNOME help manual on CentOS 6.
 I assume that the installed /usr/share/omf/gnome/* files are needed by yelp in GNOME 2.
 Put an update into the bug now with the same information.

<gedakc> mfleetwo:  Hi Mike.

<mfleetwo> Hi Curtis

<gedakc> If you compile GParted without the patch and with "--disable-scrollkeeper" do you get the same result?

<mfleetwo> Didn't try that.  Just a min ...

<gedakc> My understanding of ScrollKeeper is that it is a document cataloging system.  If/when Debian removes Rarian/ScrollKeeper the catalogue will be lost.
 https://en.wikipedia.org/wiki/ScrollKeeper#cite_note-2

<mfleetwo> Yes when building on CentOS 6 with --disable-scrollkeeper yelp continues to fail to find the GParted help Manual.

<gedakc> That makes sense because the catalog entry would be missing.  It seems that the ScrollKeeper catalog is destined for obsolescence.

<mfleetwo> As I said, but not in so many words, in the bug update, I suspect that GNOME 2 needs scrollkeeper catalog.  And for GNOME 3 it is ignored.
 I think that RHEL / CentOS 6 is the only remaining supported distro that still uses GNOME 2.

<gedakc> Hmm.... Do you think we need conditional code for CentOS 6 with #ifdefs ?

<mfleetwo> I think the dependency check should be against GNOME 2

<gedakc> Is there a specific GNOME 2 version to check for to identify the issue with GParted and CentOS 6?
 I could make the default be "--disable-scrollkeeper" and only use "--enable-scrollkeeper" if it matched some identifier that works for CentOS 6.

<mfleetwo> On a quick look use the version of the yelp package.  If yelp version 2.x then enable-scrollkeeper else disable.

<gedakc> That should be easy enough to do in a configure script.
 If you have no objections then I'll copy our conversation from here and post it into the bug report for reference purposes.

<mfleetwo> CentOS 6 has yelp 2.28;  CentOS 7 has yelp 3.22; Fedora 27 has yelp 3.26
Slight change.  Make --enable-scrollkeeper update depend on scrollkeeper-update executable being available.
 That is the command that make install uses to install the OMF files.

<gedakc> That sounds more robust.
 I will update the patch and also copy/paste our IRC conversation into the bug report.
 Debian 7 has 3.4.2-1+b1 so all of Debian is okay.  Ubuntu 14.04 has 3.10.2 so all of Ubuntu is okay.

<mfleetwo> Then also mention something in the README that --enable-scrollkeeper is automatically selected and only needed for GNOME 2 and not GNOME 3
Yes, the oldest supported Debian and Ubuntu are GNOME 3.

<gedakc> 'Will do.  Thank you for the testing and suggestions for enhancement.  :-)

<mfleetwo> Welcome
Comment 15 Curtis Gedak 2018-01-30 23:51:37 UTC
Created attachment 367667 [details] [review]
Reduce scrollkeeper dependency (v2)

Hi Mike,

Attached is the updated patch which reduces the dependency on scrollkeeper using the method we discussed over IRC.

Following is a copy of the commit message:

Scrollkeeper and the associated OMF catalog files are used by the
GNOME 2 version of yelp to display the GParted help manual.

To see how this works try the following command:

  yelp ghelp:gparted

GNOME version 3 and higher yelp do not require scrollkeeper or the OMF
catalog files to properly display the GParted help manual.

Because at least one of our currently supported GNU/Linux
distributions (Debian) plans to remove the scrollkeeper / rarian
package with the next release (Buster), we reduce the need for
scrollkeeper.

  rarian: Don't release with Buster
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885657

This enhancement changes scrollkeeper usage in the following way:

  Executable          | Configure              | Use scrollkeeper
  scrollkeeper-update | Option Used on         | when building help
  exists?             | Command Line           | for GParted?
  --------------------+------------------------+-------------------
  Yes                 | <none>                 | Yes
  Yes                 | --enable-scrollkeeper  | Yes
  Yes                 | --disable-scrollkeeper | No
  No                  | <none>                 | No
  No                  | --enable-scrollkeeper  | No
  No                  | --disable-scrollkeeper | No

Note that this enhancement does not remove the usage of scrollkeeper
because it is still needed for our currently supported CentOS 6 distro
which uses GNOME 2.

Curtis
Comment 16 Curtis Gedak 2018-01-31 17:10:35 UTC
Created attachment 367726 [details] [review]
Reduce scrollkeeper dependency (v3)

Hi Mike,

My bad.  I missed the updates to the README file in patch (v2).

This new patch (v3) is the same as (v2) but with the addition of the README updates.

Curtis
Comment 17 Curtis Gedak 2018-01-31 20:01:52 UTC
Following is a copy of the IRC discussion regarding patch (v3) in comment #16.

<mfleetwo>  Just looking at your scrollkeeper update.
 If I understand correctly what the autoconf check does is:
 1) enable by default with --disable-scrollkeeper switch
 2) If scrollkeeper-update command is not found force disable-scrollkeeper setting
 I find the logic a bit complicated to explain to the user/builder.
 Given that scrollkeeper is now rarely used and on the way out I think the configure option should be changed to automatic by default (depending on whether scrollkeeper-update command is found) with possible override of either enable or disable.  Also document the switch as --enable-scrollkeeper.
 This is how --enable-online-resize works.
 Also the configure help says this:
 --disable-scrollkeeper  do not build with scrollkeeper [default=disabled]
 Double negatives are really nasty.
 On my CentOS 6 box I assume it actually means it will enable scrollkeeper!

<gedakc> mfleetwo: Hi Mike.  'Just back at my computer.
 There are two reasons I used --disable-scrollkeeper as the flag name.
   1. This is the name that is used by default (see "./configure --help") so by using the same name it gets grouped with the one from the scrollkeeper package.
 2. The default is still the same as before which is to use scrollkeeper.  It is only "automatically" disabled if scrollkeeper-update is not available.

<mfleetwo> That probably also explains why there are two --disable-scrollkeeper flags described in the configure help with different text

<gedakc> I agree that a double negative is not intuitive.
 Yes, that's why there are two.  I was unable to determine how to access the configure flag setting without enabling it in the configure.ac file.

<mfleetwo> Hummm
 Do you know what adds the default --disable-scrollkeeper option into configure?
 I am wondering if that could be removed and we take on the responsibility for configuring it.

<gedakc> I'm not sure.  It's added by one of the GParted dependencies, and might be part of the old gnome-common package.
 The bug report points to an issue upstream with gnome-doc-utils.
 https://bugzilla.gnome.org/show_bug.cgi?id=670917
 A cleaner option is to remove scrollkeeper entirely like the patch in https://bugzilla.gnome.org/show_bug.cgi?id=743318#c11
 It looks like full updates of CentOS6 are scheduled to end on May 10, 2017 [1].
 [1] https://en.wikipedia.org/wiki/CentOS#End-of-support_schedule

<mfleetwo> CentOS is just rebuilt RHEL.  RHEL 6 is still supported until the end of 2020.
 https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Version_history

<gedakc> Wow, it looks like "extended support" goes even further into mid 2024.

<mfleetwo> For RHEL extended support means paying RH even more money I think.

<gedakc> Another option I thought of is to simply ignore the scrollkeeper flags altogether and blindly override ENABLE_SK if scrollkeeper-update does not exist.
 Essentially just the following two lines:
 AC_CHECK_PROG(SCROLLKEEPER_UPDATE_CHECK,scrollkeeper-update,yes)
 AM_CONDITIONAL([ENABLE_SK], [test x"$SCROLLKEEPER_UPDATE_CHECK" != x"yes" ]

<mfleetwo> I'll do some more digging into how the --disable-scrollkeeper option gets added by default and see if there is a more consistent way we can do this.

<gedakc> Okay.
Comment 18 Mike Fleetwood 2018-02-08 10:53:35 UTC
Created attachment 368142 [details] [review]
Reduce scrollkeeper dependency (v4)

Hi Curtis,

Here's patchset v4.  Compared to your patch v3 from comment 16 it does:

1) Amends [P1] Reduce dependency on scrollkeeper (#743318)
   Doesn't duplicate the --disable-scroolkeeper option.  Re-words the
   README file a bit.  Still works by detecting whether the
   scrollkeeper-update command is avaiable or not.  (I tried to check
   for the version of yelp installed because that more directly matches
   the fact that use of scrollkeeper is deprecated on GNOME 3.  However
   yelp doesn't provide any pkg-config .pc file so a PKG_CHECK_EXISTS()
   check doesn't work).  Also updates the commit message some what,
   including adding references:

[GNOME 2] Migrating your documentation to gnome-doc-utils
https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo

[GNOME 3] GNOME Goal: Port To New Documentation Infrastructure
https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure

   and adding this paragraph:

      Note that because GParted is still using the GNOME 2 documentation
      build system it still builds and installs OMF files.  It is just
      that they are not required with GNOME 3 yelp and this commit
      automatically disables updating the scrollkeeper database when the
      scrollkeeper-update command is not available.

2) Adds [P2] Remove deprecated USE_GNOME2_MACROS from autogen.sh
   I looked at all the warnings from ./autogen.sh:

      /usr/bin/gnome-autogen.sh
      ***Warning*** USE_COMMON_DOC_BUILD is deprecated, you may remov...
      ***Warning*** USE_GNOME2_MACROS is deprecated, you may remove i...
      ***Warning*** PKG_NAME is deprecated, you may remove it from au...

   However USE_GNOME2_MACROS was the only one I could remove.

   PKG_NAME is still used in GNOME 2.28's gnome-autogen.sh in error
   messages.  (GNOME 3's gnome-autogen.sh queries it from configure.ac
   instead of requiring it to be set).

   USE_COMMON_DOC_BUILD is part of GNOME 2's document build process that
   GParted is still using so is still needed.  It is not used in
   GNOME 3's gnome-autogen.sh, other than producing the warning.

Successfully tested on:
* CentOS 6 [1]
* CentOS 7
* Fedora 27
Test matrix:
* With and without --disable-scrollkeeper configure option.
* With and without scrollkeeper-update command (provided by
  rarian-compat package on CentOS and Fedora).
* yelp ghelp:gparted shows the GParted help manual
* GParted > Help > Contents shows the GParted help manual
[1] As CentOS 6 uses GNOME 2 trying to remove rarian-compat package
    tries to remove the whole of the GNOME 2 desktop.  Therefore didn't
    test without scrollkeeper-update command.

Thanks,
Mike
Comment 19 Curtis Gedak 2018-02-08 18:30:26 UTC
Hi Mike,

Thank you for digging deeper into this bug report.  Your updated patch
set (v4) addresses the issue and has less code (and better
maintainability).

While I did not anticipate any issues, I did successfully test patch
set (v4) on the following distros:

    Debian     7  Wheezy  (oldoldstable)
    Debian   *10* *Sid*   (unstable) [1]   # Will become Debian 10 Buster
    openSUSE 42.2 Leap
    Ubuntu  14.04 Trusty Tahr
    Kubuntu 16.04 Xenial Xerus
    Ubuntu  17.10 Artful Aardvark

[1] Using GParted Help->About menu worked.
    Invoking yelp from the command line produced a segmentation fault.
    This even occurred without any command parameters/options.  As SID
    is a work-in-progress I did not investigate any further.

Overall patch set (v4) from comment #18 looks good to me.

Mike, if you are in agreement then please feel free to commit the
patch set.

Curtis
Comment 20 Mike Fleetwood 2018-02-08 22:01:25 UTC
Hi Curtis,

Patchset v4 has been pushed upstream ready for inclusion in the next
release of GParted.

Reduce dependency on scrollkeeper (#743318)
https://git.gnome.org/browse/gparted/commit/?id=0eb9f1fcfb2a438ecd85ad7e526f0ec3d01e2da6

Remove deprecated USE_GNOME2_MACROS from autogen.sh
https://git.gnome.org/browse/gparted/commit/?id=fdc0f3b391d628296114ce93bba01cb4e5110ccb

Thanks,
Mike
Comment 21 Curtis Gedak 2018-03-19 17:07:54 UTC
This enhancement was included in the GParted 0.31.0 release on March 19, 2018.