diff --git a/man-rpmlintrc b/man-rpmlintrc index cc3177a..9d95a4f 100644 --- a/man-rpmlintrc +++ b/man-rpmlintrc @@ -1,7 +1,4 @@ -addFilter(".*W:.*patch-not-applied.*Patch1:.*man-db-2.6.3-man0.dif.*") -addFilter(".*W:.*tmpfile-not-in-filelist.*/var/cache/man.*") -addFilter(".*W:.*name-repeated-in-summary.*C.*man.*") -addFilter(".*W:.*no-version-in-last-changelog.*") -addFilter(".*W:.*permissions-incorrect-owner.*/var/cache/man/.*") -addFilter(".*W:.*shared-lib-calls-exit.*/usr/lib.*/libman-2\.8\.4\.so.*") -addFilter(".*W:.*suse-missing-rclink.*") +# We use %posttrans +addFilter(".*W:.*post-without-tmpfile-creation.*/usr/lib/tmpfiles\.d/man-db\.conf.*") +addFilter(".*W:.*name-repeated-in-summary.*man.*") +addFilter(".*E:.*missing-call-to-setgroups-before-setuid.*/usr/lib64/libman-.*\.so.*") diff --git a/man.spec b/man.spec index c12b18e..657a58b 100644 --- a/man.spec +++ b/man.spec @@ -79,7 +79,6 @@ Requires: glibc-locale-base Suggests: glibc-locale Requires: groff >= 1.18 Requires: less -Requires: libalternatives1 # FIXME: use proper Requires(pre/post/preun/...) PreReq: coreutils PreReq: fillup @@ -216,34 +215,19 @@ find %{buildroot} -type f -name "*.la" -delete -print # Move manual mkdir -p %{buildroot}%{_docdir} mv %{buildroot}%{_datadir}/doc/man-db %{buildroot}%{_docdir}/man/ -# wrapper which drops roots privileges if root executes man or mandb -mv -vf %{buildroot}%{_bindir}/man %{buildroot}%{_libexecdir}/man-db/ +# wrapper which drops roots privileges if root executes mandb mv -vf %{buildroot}%{_bindir}/mandb %{buildroot}%{_libexecdir}/man-db/ -rm -vf %{buildroot}%{_bindir}/apropos -mv -vf %{buildroot}%{_bindir}/whatis %{buildroot}%{_libexecdir}/man-db/ install -D -m 0755 wrapper %{buildroot}%{_libexecdir}/man-db/ -install -d -m 0755 %{buildroot}%{_sysconfdir}/alternatives -ln -sf %{_libexecdir}/man-db/wrapper %{buildroot}%{_sysconfdir}/alternatives/man ln -sf %{_libexecdir}/man-db/wrapper %{buildroot}%{_bindir}/mandb -ln -sf %{_libexecdir}/man-db/whatis %{buildroot}%{_sysconfdir}/alternatives/apropos -ln -sf %{_libexecdir}/man-db/whatis %{buildroot}%{_sysconfdir}/alternatives/whatis -ln -sf %{_sysconfdir}/alternatives/man %{buildroot}%{_bindir}/man -ln -sf %{_sysconfdir}/alternatives/apropos %{buildroot}%{_bindir}/apropos -ln -sf %{_sysconfdir}/alternatives/whatis %{buildroot}%{_bindir}/whatis # Fix man pages pushd %{buildroot}%{_mandir}/ rm -rf *.ascii/ for d in *.UTF-8 ; do find -name '*.[1-9nlop]' | xargs gzip -9f done -for d in `find -name manpath.5%{?ext_man} -printf '%%h '` ; do +for d in $(find -name manpath.5%{?ext_man} -printf '%%h ') ; do ln -sf manpath.5%{?ext_man} $d/manpath.config.5%{?ext_man} done -for man in apropos man whatis; do - mv man1/${man}.1%{?ext_man} man1/${man}-db.1%{?ext_man} - ln -sf %{_sysconfdir}/alternatives/${man}.1%{?ext_man} man1/${man}.1%{?ext_man} - ln -sf %{_mandir}/man1/${man}-db.1%{?ext_man} %{buildroot}%{_sysconfdir}/alternatives/${man}.1%{?ext_man} -done # remove japanese pages, as they are in man-pages-ja # (need to cross verify at some point that they are up to date there) rm -rf ja @@ -284,6 +268,21 @@ test -d var/catman/ && rm -rf var/catman/ || true %service_add_pre man-db-create.service %endif %endif +if test "$1" > 0 -a -h %{_sysconfdir}/alternatives/man +then + for ua in man apropos whatis man.1%{ext_man} apropos.1%{ext_man} whatis.1%{ext_man} + do + rm -f %{_sysconfdir}/alternatives/$ua + case "$ua" in + *.1*) + rm -f %{_mandir}/man1/$ua + ;; + *) + rm -f %{_bindir}/$ua + ;; + esac + done +fi %post %{fillup_only -an cron} @@ -327,12 +326,6 @@ fi %if 0%{?suse_version} < 1500 %attr(0744,root,root) %{_sysconfdir}/cron.daily/suse-do_mandb %endif -%ghost %{_sysconfdir}/alternatives/man -%ghost %{_sysconfdir}/alternatives/apropos -%ghost %{_sysconfdir}/alternatives/whatis -%ghost %{_sysconfdir}/alternatives/man.1%{ext_man} -%ghost %{_sysconfdir}/alternatives/apropos.1%{ext_man} -%ghost %{_sysconfdir}/alternatives/whatis.1%{ext_man} %dir %{_prefix}/etc/profile.d/ %{_prefix}/etc/profile.d/manpath.* %{_bindir}/apropos @@ -344,8 +337,6 @@ fi %{_bindir}/man-recode %{_bindir}/whatis %dir %attr(0755,root,root) %{_libexecdir}/man-db -%attr(0755,root,root) %{_libexecdir}/man-db/man -%attr(0755,root,root) %{_libexecdir}/man-db/whatis %attr(0755,root,root) %{_libexecdir}/man-db/mandb %attr(0755,root,root) %{_libexecdir}/man-db/manconv %attr(0755,root,root) %{_libexecdir}/man-db/globbing