Hello community,

here is the log from the commit of package man for openSUSE:Factory checked in 
at 2019-03-12 09:48:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/man (Old)
 and      /work/SRC/openSUSE:Factory/.man.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "man"

Tue Mar 12 09:48:19 2019 rev:73 rq:682844 version:2.8.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/man/man.changes  2018-12-03 10:08:56.199789484 
+0100
+++ /work/SRC/openSUSE:Factory/.man.new.28833/man.changes       2019-03-12 
09:48:20.591598719 +0100
@@ -1,0 +2,24 @@
+Fri Mar  8 13:12:07 UTC 2019 - Dr. Werner Fink <wer...@suse.de>
+
+- Ah ... yes, manual pages are also provides by e.g. mandoc
+
+-------------------------------------------------------------------
+Thu Mar  7 07:59:37 UTC 2019 - Dr. Werner Fink <wer...@suse.de>
+
+- Skip %verify(not link mtime) from symbolic links %_bindir even if
+  those should not hurt but avoid superfluous verify messages
+
+-------------------------------------------------------------------
+Wed Mar  6 13:15:43 UTC 2019 - Dr. Werner Fink <wer...@suse.de>
+
+- Minor corrections on %ghost /var/cache/man and link to apropos 
+
+-------------------------------------------------------------------
+Wed Mar  6 11:47:58 UTC 2019 - Dr. Werner Fink <wer...@suse.de>
+
+- Use update-alternatives to allow that man(1), apropos(1), whatis(1)
+  can be overwritten by an other package like mandoc
+- Reintroduce wrapper for man(1) but without mapping to user man to
+  be able to reset the PATH to the standard for any preprocessor
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ man.spec ++++++
--- /var/tmp/diff_new_pack.c1eMgD/_old  2019-03-12 09:48:24.111598016 +0100
+++ /var/tmp/diff_new_pack.c1eMgD/_new  2019-03-12 09:48:24.135598012 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package man
 #
-# 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
@@ -21,8 +21,6 @@
   %define _fillupdir /var/adm/fillup-templates
 %endif
 
-%bcond_with wrapman
-
 Name:           man
 BuildRequires:  automake
 BuildRequires:  flex
@@ -37,6 +35,7 @@
 BuildRequires:  man-pages
 BuildRequires:  pkg-config
 BuildRequires:  po4a
+BuildRequires:  update-alternatives
 BuildRequires:  xz-devel
 BuildRequires:  zlib-devel
 Version:        2.8.4
@@ -58,6 +57,8 @@
 Requires:       less
 Requires(pre):  user(man)
 Requires(pre):  group(man)
+Requires(post): update-alternatives
+Requires(preun): update-alternatives
 Source:         
http://download.savannah.gnu.org/releases/man-db/man-db-%{version}.tar.xz
 Source1:        sysconfig.cron-man
 Source2:        cron.daily.do_mandb
@@ -204,29 +205,39 @@
     mkdir -p %{buildroot}%{_libexecdir}/man-db
     mkdir -p %{buildroot}%{_bindir}
     mkdir -p %{buildroot}/etc
+    mkdir -p %{buildroot}%{_mandir}
+    mkdir -p %{buildroot}%{_sysconfdir}/alternatives
     make nls=all install DESTDIR=%{buildroot}
     rm -vf   %{buildroot}%{_libdir}/*.la
     mv      %{buildroot}%{_datadir}/doc/man-db/man-db-manual.* \
             %{buildroot}%{_datadir}/doc/packages/man/
     # wrapper which drops roots privileges if root executes man or mandb
-    if test -x %{buildroot}%{_bindir}/mandb ; then
-       mv   %{buildroot}%{_bindir}/mandb %{buildroot}%{_libexecdir}/man-db/
-       install wrapper %{buildroot}%{_bindir}/mandb
-    fi
-%if %{with wrapman}
-    if test -x %{buildroot}%{_bindir}/man ; then
-       mv   %{buildroot}%{_bindir}/man   %{buildroot}%{_libexecdir}/man-db/
-       ln -sf mandb %{buildroot}%{_bindir}/man
-    fi
-%endif
-    mkdir -p %{buildroot}%{_mandir}
+    mv -vf   %{buildroot}%{_bindir}/man          
%{buildroot}%{_libexecdir}/man-db/
+    mv -vf   %{buildroot}%{_bindir}/mandb        
%{buildroot}%{_libexecdir}/man-db/
+    rm -vf   %{buildroot}%{_bindir}/apropos
+    mv -vf   %{buildroot}%{_bindir}/whatis       
%{buildroot}%{_libexecdir}/man-db/
+    install wrapper %{buildroot}%{_libexecdir}/man-db/
+    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
     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.gz -printf '%%h '` ; do
-       ln -sf manpath.5.gz $d/manpath.config.5.gz
+    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
@@ -274,12 +285,25 @@
 %if 0%{suse_version} >= 1500
 %service_add_post mandb.service mandb.timer
 %endif
+# Remark: soelim(1)     is part of package groff or mandoc and
+#         makewhatis(8) is part of package makewaht or mandoc
+%{_sbindir}/update-alternatives --quiet --force \
+       --install %{_bindir}/man     man     %{_libexecdir}/man-db/wrapper 1010 
\
+       --slave   %{_bindir}/apropos apropos %{_libexecdir}/man-db/whatis \
+       --slave   %{_bindir}/whatis  whatis  %{_libexecdir}/man-db/whatis \
+       --slave   %{_mandir}/man1/man.1%{?ext_man}     man.1%{?ext_man}     
%{_mandir}/man1/man-db.1%{?ext_man} \
+       --slave   %{_mandir}/man1/apropos.1%{?ext_man} apropos.1%{?ext_man} 
%{_mandir}/man1/apropos-db.1%{?ext_man} \
+       --slave   %{_mandir}/man1/whatis.1%{?ext_man}  whatis.1%{?ext_man}  
%{_mandir}/man1/whatis-db.1%{?ext_man}
 
 %preun
 %service_del_preun man-db-create.service
 %if 0%{suse_version} >= 1500
 %service_del_preun mandb.service mandb.timer
 %endif
+if test $1 -eq 0
+then
+       %{_sbindir}/update-alternatives --quiet --remove man %{_bindir}/man
+fi
 
 %postun
 /sbin/ldconfig
@@ -300,20 +324,26 @@
 %if 0%{suse_version} < 1500
 %attr(0744,root,root) /etc/cron.daily/suse-do_mandb
 %endif
+%ghost %config %{_sysconfdir}/alternatives/man
+%ghost %config %{_sysconfdir}/alternatives/apropos
+%ghost %config %{_sysconfdir}/alternatives/whatis
+%ghost %config %{_sysconfdir}/alternatives/man.1%{ext_man}
+%ghost %config %{_sysconfdir}/alternatives/apropos.1%{ext_man}
+%ghost %config %{_sysconfdir}/alternatives/whatis.1%{ext_man}
+%{_bindir}/man
 %{_bindir}/apropos
+%{_bindir}/whatis
+%{_bindir}/mandb
 %{_bindir}/catman
 %{_bindir}/lexgrog
-%{_bindir}/man
-%{_bindir}/mandb
 %{_bindir}/manpath
-%{_bindir}/whatis
 %dir %attr(0755,root,root) %{_libexecdir}/man-db
-%if %{with wrapman}
 %attr(0755,root,root) %{_libexecdir}/man-db/man
-%endif
+%attr(0755,root,root) %{_libexecdir}/man-db/whatis
 %attr(0755,root,root) %{_libexecdir}/man-db/mandb
 %attr(0755,man,man)   %{_libexecdir}/man-db/manconv
 %attr(0755,man,man)   %{_libexecdir}/man-db/globbing
+%attr(0755,root,root) %{_libexecdir}/man-db/wrapper
 %if 0%{suse_version} >= 1500
 %attr(0744,man,man)   %{_libexecdir}/man-db/do_mandb
 %endif
@@ -332,14 +362,14 @@
 %dir %{_datadir}/groff/site-tmac
 %{_datadir}/groff/site-tmac/tmac.andb
 %{_datadir}/groff/site-tmac/tmac.andocdb
-%doc %{_mandir}/man1/*.1.gz
-%doc %{_mandir}/man5/*.5.gz
-%doc %{_mandir}/man8/*.8.gz
+%doc %{_mandir}/man1/*.1%{?ext_man}
+%doc %{_mandir}/man5/*.5%{?ext_man}
+%doc %{_mandir}/man8/*.8%{?ext_man}
 %dir %{_mandir}/id
 %dir %{_mandir}/sr
 %dir %{_mandir}/tr
 %{_fillupdir}/sysconfig.cron-man
 %defattr(-,man,man)
-%ghost %{_localstatedir}/cache/man
+%ghost %verify(not group) %{_localstatedir}/cache/man
 
 %changelog

++++++ wrapper.c ++++++
--- /var/tmp/diff_new_pack.c1eMgD/_old  2019-03-12 09:48:24.251597989 +0100
+++ /var/tmp/diff_new_pack.c1eMgD/_new  2019-03-12 09:48:24.251597989 +0100
@@ -67,6 +67,7 @@
 
 int main (int argc, char **argv, char *envp[])
 {
+       extern char **environ;
        uid_t ruid, euid;
        gid_t rgid;
 
@@ -87,6 +88,11 @@
        euid = geteuid();
        rgid = getgid ();
 
+       /* The various preprocessors should be in standard path */
+       environ = envp;
+       setenv("PATH", "/bin:/usr/bin", 1); 
+       envp = environ;
+
 #ifdef DEBUG
        printf ("%s:\n", program_name);
 #endif
@@ -101,6 +107,10 @@
 #ifdef DEBUG
        printf ("%s\n", wlp->run);
 #endif
+       if (strcmp("man", wlp->prog) == 0)
+               /* Short cut: do not map man command to an other user */
+               goto man;
+
        if (ruid == 0 || euid == 0) {
                static char *dummy_environ[] = { NULL };
                extern char **environ;
@@ -152,9 +162,10 @@
                setenv("USER", pwd->pw_name, 1);
                setenv("LOGNAME", pwd->pw_name, 1);
                if (cwd)
-                       setenv("TERM", cwd, 1);
+                       setenv("PWD", cwd, 1);
                envp = environ;
        }
+man:
        execve (wlp->run, argv, envp);
        perror ("execve");
        return -errno;


Reply via email to