Accepting request 836250 from home:lnussel:branches:Documentation
- fix build fail (mandoc-1.14.5-dummy.diff) - switch to using rpm.execute() as rpm 4.15 is now available - tweak trigger scripts to handle missing files better (boo#1176194) There is no perfect solution though https://github.com/rpm-software-management/rpm/issues/1370 - make triggers more verbose if VERBOSE_FILETRIGGERS is set OBS-URL: https://build.opensuse.org/request/show/836250 OBS-URL: https://build.opensuse.org/package/show/Documentation/mandoc?expand=0&rev=10
This commit is contained in:
parent
4f4f8a6d30
commit
dca8d8b2aa
26
mandoc-1.14.5-dummy.diff
Normal file
26
mandoc-1.14.5-dummy.diff
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Index: mandoc-1.14.5/compat_getline.c
|
||||||
|
===================================================================
|
||||||
|
--- mandoc-1.14.5.orig/compat_getline.c
|
||||||
|
+++ mandoc-1.14.5/compat_getline.c
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
#if HAVE_GETLINE
|
||||||
|
|
||||||
|
-int dummy;
|
||||||
|
+static int dummy;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
Index: mandoc-1.14.5/compat_reallocarray.c
|
||||||
|
===================================================================
|
||||||
|
--- mandoc-1.14.5.orig/compat_reallocarray.c
|
||||||
|
+++ mandoc-1.14.5/compat_reallocarray.c
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
#if HAVE_REALLOCARRAY
|
||||||
|
|
||||||
|
-int dummy;
|
||||||
|
+static int dummy;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 22 15:12:55 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
- fix build fail (mandoc-1.14.5-dummy.diff)
|
||||||
|
- switch to using rpm.execute() as rpm 4.15 is now available
|
||||||
|
- tweak trigger scripts to handle missing files better (boo#1176194)
|
||||||
|
There is no perfect solution though
|
||||||
|
https://github.com/rpm-software-management/rpm/issues/1370
|
||||||
|
- make triggers more verbose if VERBOSE_FILETRIGGERS is set
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 10 18:46:58 CET 2020 - Matej Cepl <mcepl@suse.com>
|
Mon Feb 10 18:46:58 CET 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
61
mandoc.spec
61
mandoc.spec
@ -19,6 +19,7 @@
|
|||||||
Name: mandoc
|
Name: mandoc
|
||||||
Version: 1.14.5
|
Version: 1.14.5
|
||||||
Release: 0
|
Release: 0
|
||||||
|
%define nvr %{name}-%{version}-%{release}
|
||||||
Summary: UNIX manpage compiler
|
Summary: UNIX manpage compiler
|
||||||
License: ISC
|
License: ISC
|
||||||
Group: Productivity/Publishing/Troff
|
Group: Productivity/Publishing/Troff
|
||||||
@ -27,12 +28,16 @@ Source: http://mandoc.bsd.lv/snapshots/mandoc-%{version}.tar.gz
|
|||||||
# PATCH-FEATURE-UPSTREAM empty_w-manpath.patch gh#neovim/neovim#11794 mcepl@suse.com
|
# PATCH-FEATURE-UPSTREAM empty_w-manpath.patch gh#neovim/neovim#11794 mcepl@suse.com
|
||||||
# Add man -w producing manpath (among many other things)
|
# Add man -w producing manpath (among many other things)
|
||||||
Patch0: 1.14.5-master.patch
|
Patch0: 1.14.5-master.patch
|
||||||
|
# PATCH-FIX-openSUSE looks like newer gcc doesn't like those duplicated dummy variables lnussel@suse.com
|
||||||
|
Patch1: mandoc-1.14.5-dummy.diff
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
Provides: man = %{version}
|
Provides: man = %{version}
|
||||||
Conflicts: man
|
Conflicts: man
|
||||||
Conflicts: groff
|
Conflicts: groff
|
||||||
Conflicts: groff-full
|
Conflicts: groff-full
|
||||||
Conflicts: makewhat
|
Conflicts: makewhat
|
||||||
|
# file triggers use rpm.execute()
|
||||||
|
Conflicts: rpm < 4.15
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The mandoc manpage compiler toolset (formerly called "mdocml")
|
The mandoc manpage compiler toolset (formerly called "mdocml")
|
||||||
@ -66,56 +71,54 @@ mv -fv %{_tmppath}/apropos %{buildroot}%{_sbindir}/makewhatis
|
|||||||
%{_sbindir}/makewhatis
|
%{_sbindir}/makewhatis
|
||||||
|
|
||||||
%filetriggerin -p <lua> -- %{_mandir}
|
%filetriggerin -p <lua> -- %{_mandir}
|
||||||
-- TODO: replace with rpm.execute after rpm 4.15
|
|
||||||
function execute(path, ...)
|
|
||||||
local pid = posix.fork()
|
|
||||||
if pid == 0 then
|
|
||||||
posix.exec(path, ...)
|
|
||||||
io.write(path, ": exec failed: ", posix.errno(), "\n")
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
if not pid then
|
|
||||||
error(path .. ": fork failed: " .. posix.errno() .. "\n")
|
|
||||||
end
|
|
||||||
posix.wait(pid)
|
|
||||||
end
|
|
||||||
--
|
|
||||||
-- no point registering individual files if we can call
|
-- no point registering individual files if we can call
|
||||||
-- makewhatis in %%post to catch all if
|
-- makewhatis in %%post to catch all if
|
||||||
|
if posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
|
print("%{nvr}: running file install trigger")
|
||||||
|
end
|
||||||
if posix.access("%{_mandir}/mandoc.db") then
|
if posix.access("%{_mandir}/mandoc.db") then
|
||||||
file = rpm.next_file()
|
file = rpm.next_file()
|
||||||
while file do
|
while file do
|
||||||
if string.match(file, "%{_mandir}/man[^/]+/[^/]+%{?ext_man}$") then
|
if string.match(file, "%{_mandir}/man[^/]+/[^/]+%{?ext_man}$") then
|
||||||
execute("%{_sbindir}/makewhatis", "-d", "%{_mandir}", file)
|
if posix.access(file) then
|
||||||
|
if posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
|
print("%{nvr}: adding " .. file)
|
||||||
|
end
|
||||||
|
rpm.execute("%{_sbindir}/makewhatis", "-d", "%{_mandir}", file)
|
||||||
|
else
|
||||||
|
io.stderr:write("%{nvr}: missing " .. file .. "\n")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
file = rpm.next_file()
|
file = rpm.next_file()
|
||||||
end
|
end
|
||||||
|
elseif posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
|
print("%{nvr}: missing mandoc.db, skipped")
|
||||||
end
|
end
|
||||||
|
io.flush()
|
||||||
|
|
||||||
%filetriggerun -p <lua> -- %{_mandir}
|
%filetriggerun -p <lua> -- %{_mandir}
|
||||||
-- TODO: replace with rpm.execute after rpm 4.15
|
if posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
function execute(path, ...)
|
print("%{nvr}: running file remove trigger")
|
||||||
local pid = posix.fork()
|
|
||||||
if pid == 0 then
|
|
||||||
posix.exec(path, ...)
|
|
||||||
io.write(path, ": exec failed: ", posix.errno(), "\n")
|
|
||||||
os.exit(1)
|
|
||||||
end
|
end
|
||||||
if not pid then
|
|
||||||
error(path .. ": fork failed: " .. posix.errno() .. "\n")
|
|
||||||
end
|
|
||||||
posix.wait(pid)
|
|
||||||
end
|
|
||||||
--
|
|
||||||
if posix.access("%{_mandir}/mandoc.db") then
|
if posix.access("%{_mandir}/mandoc.db") then
|
||||||
file = rpm.next_file()
|
file = rpm.next_file()
|
||||||
while file do
|
while file do
|
||||||
if string.match(file, "%{_mandir}/man[^/]+/[^/]+%{?ext_man}$") then
|
if string.match(file, "%{_mandir}/man[^/]+/[^/]+%{?ext_man}$") then
|
||||||
execute("%{_sbindir}/makewhatis", "-u", "%{_mandir}", file)
|
if posix.access(file) then
|
||||||
|
if posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
|
print("%{nvr}: removing " .. file)
|
||||||
|
end
|
||||||
|
rpm.execute("%{_sbindir}/makewhatis", "-u", "%{_mandir}", file)
|
||||||
|
else
|
||||||
|
io.stderr:write("%{nvr}: missing " .. file .. "\n")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
file = rpm.next_file()
|
file = rpm.next_file()
|
||||||
end
|
end
|
||||||
|
elseif posix.getenv("VERBOSE_FILETRIGGERS") then
|
||||||
|
print("%{nvr}: missing mandoc.db, skipped")
|
||||||
end
|
end
|
||||||
|
io.flush()
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Loading…
Reference in New Issue
Block a user