Hello community,

here is the log from the commit of package restorecond for openSUSE:Leap:15.2 
checked in at 2020-03-21 16:45:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/restorecond (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.restorecond.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "restorecond"

Sat Mar 21 16:45:29 2020 rev:3 rq:785978 version:3.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/restorecond/restorecond.changes        
2020-01-15 15:57:03.275722097 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.restorecond.new.3160/restorecond.changes      
2020-03-21 16:46:41.709618863 +0100
@@ -1,0 +2,27 @@
+Tue Mar  3 12:28:15 UTC 2020 - Johannes Segitz <[email protected]>
+
+- Update to version 3.0
+  * Do not link against libpcre
+  * Fix redundant console log output error
+  * Use /run instead of /var/run
+  Dropped r_opts_global.patch
+
+-------------------------------------------------------------------
+Wed Jan 15 10:11:33 UTC 2020 - Johannes Segitz <[email protected]>
+
+- Added r_opts_global.patch to fix build problems with gcc due to 
+  multiple definitions for global symbols (bsc#1160290)
+
+-------------------------------------------------------------------
+Thu Dec  5 10:06:43 UTC 2019 - Martin Liška <[email protected]>
+
+- Use %make_build and respect %optflags.
+
+-------------------------------------------------------------------
+Wed Mar 20 15:22:48 UTC 2019 - [email protected]
+
+- Update to version 2.9
+  * Do not ignore the -f option
+  * close the PID file if writing to it failed
+
+-------------------------------------------------------------------

Old:
----
  restorecond-2.8.tar.gz

New:
----
  restorecond-3.0.tar.gz

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

Other differences:
------------------
++++++ restorecond.spec ++++++
--- /var/tmp/diff_new_pack.g4Ldsi/_old  2020-03-21 16:46:42.665619843 +0100
+++ /var/tmp/diff_new_pack.g4Ldsi/_new  2020-03-21 16:46:42.669619847 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package restorecond
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,23 +12,23 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%define libselinux_ver   2.8
+%define libselinux_ver   3.0
 Name:           restorecond
-Version:        2.8
+Version:        3.0
 Release:        0
 Summary:        Daemon to restore SELinux contexts
 License:        GPL-2.0-or-later
 Group:          Productivity/Security
 URL:            https://github.com/SELinuxProject/selinux.git
-Source0:        
https://github.com/SELinuxProject/selinux/releases/download/20180524/restorecond-%{version}.tar.gz
+Source0:        
https://github.com/SELinuxProject/selinux/releases/download/20191204/restorecond-%{version}.tar.gz
 BuildRequires:  dbus-1-glib-devel
 BuildRequires:  libselinux-devel >= %{libselinux_ver}
-Requires:       selinux-tools >= %{libselinux_ver}
 Requires:       libselinux1 >= %{libselinux_ver}
+Requires:       selinux-tools >= %{libselinux_ver}
 
 %description
 Daemon that watches for file creation and then sets the default SELinux file 
context
@@ -37,7 +37,8 @@
 %setup -q
 
 %build
-make %{?_smp_mflags} LSPP_PRIV=y all
+export CFLAGS="%optflags"
+%make_build LSPP_PRIV=y all
 
 %install
 make DESTDIR=%{buildroot} SHLIBDIR=/%{_lib} install
@@ -65,5 +66,6 @@
 %{_sbindir}/rcrestorecond
 %{_datadir}/dbus-1/services/org.selinux.Restorecond.service
 %{_mandir}/man8/restorecond.8%{?ext_man}
+%{_mandir}/ru/man8/restorecond.8%{?ext_man}
 
 %changelog

++++++ restorecond-2.8.tar.gz -> restorecond-3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/Makefile new/restorecond-3.0/Makefile
--- old/restorecond-2.8/Makefile        2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/Makefile        2019-11-28 13:46:48.000000000 +0100
@@ -1,6 +1,7 @@
 PKG_CONFIG ?= pkg-config
 
 # Installation directories.
+LINGUAS ?= ru
 PREFIX ?= /usr
 SBINDIR ?= $(PREFIX)/sbin
 MANDIR = $(PREFIX)/share/man
@@ -9,8 +10,8 @@
 SYSTEMDDIR ?= $(PREFIX)/lib/systemd
 
 autostart_DATA = sealertauto.desktop
-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
-SELINUXDIR = $(DESTDIR)/etc/selinux
+INITDIR ?= /etc/rc.d/init.d
+SELINUXDIR = /etc/selinux
 
 DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1)
 DBUSLIB = $(shell $(PKG_CONFIG) --libs dbus-glib-1)
@@ -18,17 +19,7 @@
 CFLAGS ?= -g -Werror -Wall -W
 override CFLAGS += $(DBUSFLAGS)
 
-USE_PCRE2 ?= n
-ifeq ($(USE_PCRE2),y)
-       PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell 
$(PKG_CONFIG) --cflags libpcre2-8)
-       PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre2-8)
-else
-       PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
-       PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre)
-endif
-export PCRE_CFLAGS PCRE_LDLIBS
-
-override LDLIBS += -lselinux $(PCRE_LDLIBS) $(DBUSLIB)
+override LDLIBS += -lselinux $(DBUSLIB)
 
 all: restorecond
 
@@ -42,15 +33,21 @@
        -mkdir -p $(DESTDIR)$(SBINDIR)
        install -m 755 restorecond $(DESTDIR)$(SBINDIR)
        install -m 644 restorecond.8 $(DESTDIR)$(MANDIR)/man8
-       -mkdir -p $(INITDIR)
-       install -m 755 restorecond.init $(INITDIR)/restorecond
-       -mkdir -p $(SELINUXDIR)
-       install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
-       install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
+       for lang in $(LINGUAS) ; do \
+               if [ -e $${lang} ] ; then \
+                       [ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p 
$(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
+                       install -m 644 $${lang}/*.8 
$(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
+               fi ; \
+       done
+       -mkdir -p $(DESTDIR)$(INITDIR)
+       install -m 755 restorecond.init $(DESTDIR)$(INITDIR)/restorecond
+       -mkdir -p $(DESTDIR)$(SELINUXDIR)
+       install -m 644 restorecond.conf $(DESTDIR)$(SELINUXDIR)/restorecond.conf
+       install -m 644 restorecond_user.conf 
$(DESTDIR)$(SELINUXDIR)/restorecond_user.conf
        -mkdir -p $(DESTDIR)$(AUTOSTARTDIR)
        install -m 644 restorecond.desktop 
$(DESTDIR)$(AUTOSTARTDIR)/restorecond.desktop
        -mkdir -p $(DESTDIR)$(DBUSSERVICEDIR)
-       install -m 600 org.selinux.Restorecond.service  
$(DESTDIR)$(DBUSSERVICEDIR)/org.selinux.Restorecond.service
+       install -m 644 org.selinux.Restorecond.service  
$(DESTDIR)$(DBUSSERVICEDIR)/org.selinux.Restorecond.service
        -mkdir -p $(DESTDIR)$(SYSTEMDDIR)/system
        install -m 644 restorecond.service $(DESTDIR)$(SYSTEMDDIR)/system/
 relabel: install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/VERSION new/restorecond-3.0/VERSION
--- old/restorecond-2.8/VERSION 2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/VERSION 2019-11-28 13:46:48.000000000 +0100
@@ -1 +1 @@
-2.8
+3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/restore.c 
new/restorecond-3.0/restore.c
--- old/restorecond-2.8/restore.c       2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/restore.c       2019-11-28 13:46:48.000000000 +0100
@@ -12,39 +12,36 @@
 char **exclude_list;
 int exclude_count;
 
-struct restore_opts *r_opts;
-
 void restore_init(struct restore_opts *opts)
 {
        int rc;
 
-       r_opts = opts;
        struct selinux_opt selinux_opts[] = {
-               { SELABEL_OPT_VALIDATE, r_opts->selabel_opt_validate },
-               { SELABEL_OPT_PATH, r_opts->selabel_opt_path },
-               { SELABEL_OPT_DIGEST, r_opts->selabel_opt_digest }
+               { SELABEL_OPT_VALIDATE, opts->selabel_opt_validate },
+               { SELABEL_OPT_PATH, opts->selabel_opt_path },
+               { SELABEL_OPT_DIGEST, opts->selabel_opt_digest }
        };
 
-       r_opts->hnd = selabel_open(SELABEL_CTX_FILE, selinux_opts, 3);
-       if (!r_opts->hnd) {
-               perror(r_opts->selabel_opt_path);
+       opts->hnd = selabel_open(SELABEL_CTX_FILE, selinux_opts, 3);
+       if (!opts->hnd) {
+               perror(opts->selabel_opt_path);
                exit(1);
        }
 
-       r_opts->restorecon_flags = 0;
-       r_opts->restorecon_flags = r_opts->nochange | r_opts->verbose |
-                          r_opts->progress | r_opts->set_specctx  |
-                          r_opts->add_assoc | r_opts->ignore_digest |
-                          r_opts->recurse | r_opts->userealpath |
-                          r_opts->xdev | r_opts->abort_on_error |
-                          r_opts->syslog_changes | r_opts->log_matches |
-                          r_opts->ignore_noent | r_opts->ignore_mounts;
+       opts->restorecon_flags = 0;
+       opts->restorecon_flags = opts->nochange | opts->verbose |
+                          opts->progress | opts->set_specctx  |
+                          opts->add_assoc | opts->ignore_digest |
+                          opts->recurse | opts->userealpath |
+                          opts->xdev | opts->abort_on_error |
+                          opts->syslog_changes | opts->log_matches |
+                          opts->ignore_noent | opts->ignore_mounts;
 
        /* Use setfiles, restorecon and restorecond own handles */
-       selinux_restorecon_set_sehandle(r_opts->hnd);
+       selinux_restorecon_set_sehandle(opts->hnd);
 
-       if (r_opts->rootpath) {
-               rc = selinux_restorecon_set_alt_rootpath(r_opts->rootpath);
+       if (opts->rootpath) {
+               rc = selinux_restorecon_set_alt_rootpath(opts->rootpath);
                if (rc) {
                        fprintf(stderr,
                                "selinux_restorecon_set_alt_rootpath error: 
%s.\n",
@@ -75,7 +72,6 @@
        size_t i = 0;
        int len, rc, errors;
 
-       r_opts = opts;
        memset(&globbuf, 0, sizeof(globbuf));
 
        errors = glob(name, GLOB_TILDE | GLOB_PERIOD |
@@ -90,7 +86,7 @@
                if (len > 0 && strcmp(&globbuf.gl_pathv[i][len], "/..") == 0)
                        continue;
                rc = selinux_restorecon(globbuf.gl_pathv[i],
-                                       r_opts->restorecon_flags);
+                                       opts->restorecon_flags);
                if (rc < 0)
                        errors = rc;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/restorecond.c 
new/restorecond-3.0/restorecond.c
--- old/restorecond-2.8/restorecond.c   2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/restorecond.c   2019-11-28 13:46:48.000000000 +0100
@@ -84,7 +84,7 @@
        selabel_close(r_opts.hnd);
 }
 
-static const char *pidfile = "/var/run/restorecond.pid";
+static const char *pidfile = "/run/restorecond.pid";
 
 static int write_pid_file(void)
 {
@@ -105,6 +105,7 @@
        }
        if (write(pidfd, val, (unsigned int)len) != len) {
                syslog(LOG_ERR, "Unable to write to pidfile (%s)", 
strerror(errno));
+               close(pidfd);
                return 1;
        }
        close(pidfd);
@@ -147,6 +148,8 @@
        if (is_selinux_enabled() != 1)
                return 0;
 
+       watch_file = server_watch_file;
+
        /* Set all options to zero/NULL except for ignore_noent & digest. */
        memset(&r_opts, 0, sizeof(r_opts));
        r_opts.ignore_noent = SELINUX_RESTORECON_IGNORE_NOENTRY;
@@ -204,7 +207,6 @@
                return 0;
        }
 
-       watch_file = server_watch_file;
        read_config(master_fd, watch_file);
 
        if (!debug_mode) {
@@ -215,7 +217,7 @@
        write_pid_file();
 
        while (watch(master_fd, watch_file) == 0) {
-       };
+       }
 
        watch_list_free(master_fd);
        close(master_fd);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/restorecond.conf 
new/restorecond-3.0/restorecond.conf
--- old/restorecond-2.8/restorecond.conf        2018-05-24 20:21:09.000000000 
+0200
+++ new/restorecond-3.0/restorecond.conf        2019-11-28 13:46:48.000000000 
+0100
@@ -2,7 +2,7 @@
 /etc/resolv.conf
 /etc/samba/secrets.tdb
 /etc/updatedb.conf
-/var/run/utmp
+/run/utmp
 /var/log/wtmp
 /root/*
 /root/.ssh/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/restorecond.init 
new/restorecond-3.0/restorecond.init
--- old/restorecond-2.8/restorecond.init        2018-05-24 20:21:09.000000000 
+0200
+++ new/restorecond-3.0/restorecond.init        2019-11-28 13:46:48.000000000 
+0100
@@ -9,7 +9,7 @@
 #
 # processname: /usr/sbin/restorecond
 # config: /etc/selinux/restorecond.conf 
-# pidfile: /var/run/restorecond.pid
+# pidfile: /run/restorecond.pid
 #
 # Return values according to LSB for all commands but status:
 # 0 - success
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/restorecond.service 
new/restorecond-3.0/restorecond.service
--- old/restorecond-2.8/restorecond.service     2018-05-24 20:21:09.000000000 
+0200
+++ new/restorecond-3.0/restorecond.service     2019-11-28 13:46:48.000000000 
+0100
@@ -1,12 +1,13 @@
 [Unit]
 Description=Restorecon maintaining path file context
+Documentation=man:restorecond(8)
 ConditionPathExists=/etc/selinux/restorecond.conf
 ConditionSecurity=selinux
 
 [Service]
 Type=forking
 ExecStart=/usr/sbin/restorecond
-PIDFile=/var/run/restorecond.pid
+PIDFile=/run/restorecond.pid
 
 [Install]
 WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/ru/restorecond.8 
new/restorecond-3.0/ru/restorecond.8
--- old/restorecond-2.8/ru/restorecond.8        1970-01-01 01:00:00.000000000 
+0100
+++ new/restorecond-3.0/ru/restorecond.8        2019-11-28 13:46:48.000000000 
+0100
@@ -0,0 +1,41 @@
+.TH "restorecond" "8" "2002031409" "" ""
+.SH "ИМЯ"
+restorecond \- внутренняя служба, которая отслеживает создание файлов и затем 
задаёт для них SELinux-контекст по умолчанию
+
+.SH "ОБЗОР"
+.B restorecond  [\-d] [-h] [\-f restorecond_file ] [\-u] [\-v]
+.P
+
+.SH "ОПИСАНИЕ"
+Эта страница руководства содержит описание программы
+.BR restorecond.
+.P
+Эта внутренняя служба использует inotify для отслеживания файлов, 
перечисленных в /etc/selinux/restorecond.conf. После создания этих файлов эта 
служба обеспечивает присвоение им правильного контекста, связанного с политикой.
+
+.SH "ПАРАМЕТРЫ"
+.TP 
+.B \-d
+Включить режим отладки. Приложение останется на переднем плане, будет показано 
много отладочных сообщений.
+.TP
+. B \-h
+Вывести сведения об использовании.
+.TP
+.B \-f restorecond_file
+Использовать альтернативный файл restorecond.conf.
+.TP
+.B \-u
+Включить пользовательский режим. Запускает restorecond в сеансе пользователя и 
выполняет чтение /etc/selinux/restorecond_user.conf. Использует dbus, чтобы 
удостовериться, что в одном сеансе пользователя запущен только один экземпляр 
restorecond.
+.TP
+.B \-v
+Включить отладку с подробным выводом. (Сообщать об отсутствующих файлах)
+
+.SH "ФАЙЛЫ"
+/etc/selinux/restorecond.conf
+/etc/selinux/restorecond_user.conf
+
+.SH "СМОТРИТЕ ТАКЖЕ"
+.BR restorecon (8)
+
+.SH "АВТОРЫ"
+Эта man-страница и программа были написаны Dan Walsh <[email protected]>.
+Перевод на русский язык выполнила Герасименко Олеся <[email protected]>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/user.c new/restorecond-3.0/user.c
--- old/restorecond-2.8/user.c  2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/user.c  2019-11-28 13:46:48.000000000 +0100
@@ -125,7 +125,7 @@
        &bytes_read, NULL);
 
     if (! bytes_read) {
-           /* Sesssion/Terminal Ended */
+           /* Session/Terminal Ended */
            exit(0);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restorecond-2.8/utmpwatcher.c 
new/restorecond-3.0/utmpwatcher.c
--- old/restorecond-2.8/utmpwatcher.c   2018-05-24 20:21:09.000000000 +0200
+++ new/restorecond-3.0/utmpwatcher.c   2019-11-28 13:46:48.000000000 +0100
@@ -49,7 +49,7 @@
 {
        int changed = 0;
        struct utmp u;
-       const char *utmp_path = "/var/run/utmp";
+       const char *utmp_path = "/run/utmp";
        struct stringsList *prev_utmp_ptr = utmp_ptr;
        if (wd != utmp_wd)
                return -1;


Reply via email to