revert the myspell compat symlink changes (rhbz#2064189)
relative to 6ffc042, the only change now is really to add
/usr/share/hunspell to filesystem
This should also help with rpm-ostree, eg Silverblue 36:
currently dictionaries still in myspell/ can't be installed (upgraded).
So this simplifies things a lot and seems much cleaner
both pretrans and post for filesystem are gone.
The only downside is that any legacy apps with hardcoded
/usr/share/myspell might stop working for spellchecking.
Perhaps a hunspell-filesystem-compat package could be added
later to carry the symlink once all the Fedora dicts have been moved.
			
			
This commit is contained in:
		
							parent
							
								
									0954b46d01
								
							
						
					
					
						commit
						5e321c5e7b
					
				| @ -1,26 +0,0 @@ | ||||
| From 1d54eddedf6178ca0de6c53514678879541c646a Mon Sep 17 00:00:00 2001 | ||||
| From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> | ||||
| Date: Mon, 7 Mar 2022 10:57:21 +0000 | ||||
| Subject: [PATCH] rhbz#2060751 don't list duplicate dics from | ||||
|  /usr/share/myspell symlink | ||||
| 
 | ||||
| ---
 | ||||
|  src/tools/hunspell.cxx | 2 -- | ||||
|  1 file changed, 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx
 | ||||
| index 46dd2b6..08eb5b2 100644
 | ||||
| --- a/src/tools/hunspell.cxx
 | ||||
| +++ b/src/tools/hunspell.cxx
 | ||||
| @@ -117,8 +117,6 @@
 | ||||
|   | ||||
|  #define LIBDIR                \ | ||||
|    "/usr/share/hunspell:"      \ | ||||
| -  "/usr/share/myspell:"       \
 | ||||
| -  "/usr/share/myspell/dicts:" \
 | ||||
|    "/Library/Spelling" | ||||
|  #define USEROOODIR {                  \ | ||||
|    ".openoffice.org/3/user/wordbook", \ | ||||
| -- 
 | ||||
| 2.35.1 | ||||
| 
 | ||||
| @ -3,7 +3,7 @@ | ||||
| Name:      hunspell | ||||
| Summary:   A spell checker and morphological analyzer library | ||||
| Version:   1.7.0 | ||||
| Release:   18%{?dist} | ||||
| Release:   19%{?dist} | ||||
| Source:    https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz | ||||
| URL:       https://github.com/hunspell/hunspell | ||||
| License:   LGPLv2+ or GPLv2+ or MPLv1.1 | ||||
| @ -21,9 +21,6 @@ Requires:  hunspell-en-US | ||||
| Requires:  hunspell-filesystem = %{version}-%{release} | ||||
| 
 | ||||
| Patch0: 0001-invalid-read-memory-access-624.patch | ||||
| %if 0%{?fedora} >= 36 | ||||
| Patch1: 0001-rhbz-2060751-don-t-list-duplicate-dics-from-usr-shar.patch | ||||
| %endif | ||||
| 
 | ||||
| %description | ||||
| Hunspell is a spell checker and morphological analyzer library and program | ||||
| @ -40,7 +37,6 @@ Includes and definitions for developing with hunspell | ||||
| 
 | ||||
| %package filesystem | ||||
| Summary: Hunspell filesystem layout | ||||
| Requires(post): coreutils | ||||
| 
 | ||||
| %description filesystem | ||||
| Provides a directory in which to store dictionaries provided by other | ||||
| @ -49,9 +45,6 @@ packages. | ||||
| %prep | ||||
| %setup -q | ||||
| %patch0 -p1 -b .CVE-2019-16707 | ||||
| %if 0%{?fedora} >= 36 | ||||
| %patch1 -p1 -b .rhbz-2060751 | ||||
| %endif | ||||
| 
 | ||||
| %build | ||||
| autoreconf -vfi | ||||
| @ -99,33 +92,12 @@ rm -rf $RPM_BUILD_ROOT | ||||
| %make_install | ||||
| rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a | ||||
| rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la | ||||
| %if 0%{?fedora} >= 36 | ||||
| mkdir $RPM_BUILD_ROOT/%{_datadir}/hunspell | ||||
| %else | ||||
| mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell | ||||
| %endif | ||||
| %find_lang %{name} | ||||
| 
 | ||||
| %ldconfig_scriptlets | ||||
| 
 | ||||
| %if 0%{?fedora} >= 36 | ||||
| %pretrans filesystem -p <lua> | ||||
| -- Rename dir from myspell to hunspell | ||||
| -- DO NOT add a trailing slash at the end. | ||||
| old_path = "%{_datadir}/myspell" | ||||
| new_path = "%{_datadir}/hunspell" | ||||
| old_st = posix.stat(old_path) | ||||
| new_st = posix.stat(new_path) | ||||
| if old_st and old_st.type == "directory" and not new_st then | ||||
|   os.rename(old_path, new_path) | ||||
| end | ||||
| 
 | ||||
| %post filesystem | ||||
| if [ ! -e "%{_datadir}/myspell" ]; then | ||||
|   %__ln_s %{_datadir}/hunspell %{_datadir}/myspell | ||||
| fi | ||||
| %endif | ||||
| 
 | ||||
| %files -f %{name}.lang | ||||
| %doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS | ||||
| %{_libdir}/*.so.* | ||||
| @ -154,14 +126,17 @@ fi | ||||
| %{_mandir}/man5/hunspell.5.gz | ||||
| 
 | ||||
| %files filesystem | ||||
| %if 0%{?fedora} >= 36 | ||||
| %ghost %{_datadir}/myspell | ||||
| %{_datadir}/hunspell | ||||
| %else | ||||
| %{_datadir}/myspell | ||||
| %endif | ||||
| 
 | ||||
| %changelog | ||||
| * Wed Mar 16 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-19 | ||||
| - rework the new hunspell dictionary directory (#2064189) | ||||
| - drop the myspell/ compatibility symlink | ||||
| - keep myspell/ as directory and also the new hunspell/ dir | ||||
| - because of this drop the duplicate directory patch for #2060751 | ||||
| - filesystem scriptlets are no more | ||||
| 
 | ||||
| * Mon Mar 07 2022 Caolán McNamara <caolanm@redhat.com> - 1.7.0-18 | ||||
| - Resolves: rhbz#2060751 - “hunspell -D” lists dictionaries twice | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user