Hello community, here is the log from the commit of package restorecond for openSUSE:Factory checked in at 2020-03-11 18:31:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/restorecond (Old) and /work/SRC/openSUSE:Factory/.restorecond.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "restorecond" Wed Mar 11 18:31:20 2020 rev:5 rq:781812 version:3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/restorecond/restorecond.changes 2020-01-18 12:17:32.851120130 +0100 +++ /work/SRC/openSUSE:Factory/.restorecond.new.3160/restorecond.changes 2020-03-11 18:31:27.442865941 +0100 @@ -1,0 +2,9 @@ +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 + +------------------------------------------------------------------- Old: ---- r_opts_global.patch restorecond-2.9.tar.gz New: ---- restorecond-3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ restorecond.spec ++++++ --- /var/tmp/diff_new_pack.zEFX0M/_old 2020-03-11 18:31:28.770866756 +0100 +++ /var/tmp/diff_new_pack.zEFX0M/_new 2020-03-11 18:31:28.782866763 +0100 @@ -1,7 +1,7 @@ # # spec file for package restorecond # -# Copyright (c) 2020 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 @@ -16,17 +16,15 @@ # -%define libselinux_ver 2.9 +%define libselinux_ver 3.0 Name: restorecond -Version: 2.9 +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/20190315/restorecond-%{version}.tar.gz -# can be dropped with 3.0 -Patch0: r_opts_global.patch +Source0: https://github.com/SELinuxProject/selinux/releases/download/20191204/restorecond-%{version}.tar.gz BuildRequires: dbus-1-glib-devel BuildRequires: libselinux-devel >= %{libselinux_ver} Requires: libselinux1 >= %{libselinux_ver} @@ -37,7 +35,6 @@ %prep %setup -q -%patch0 -p2 %build export CFLAGS="%optflags" ++++++ restorecond-2.9.tar.gz -> restorecond-3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/restorecond-2.9/Makefile new/restorecond-3.0/Makefile --- old/restorecond-2.9/Makefile 2019-03-15 11:32:30.000000000 +0100 +++ new/restorecond-3.0/Makefile 2019-11-28 13:46:48.000000000 +0100 @@ -19,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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/restorecond-2.9/VERSION new/restorecond-3.0/VERSION --- old/restorecond-2.9/VERSION 2019-03-15 11:32:30.000000000 +0100 +++ new/restorecond-3.0/VERSION 2019-11-28 13:46:48.000000000 +0100 @@ -1 +1 @@ -2.9 +3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/restorecond-2.9/restore.c new/restorecond-3.0/restore.c --- old/restorecond-2.9/restore.c 2019-03-15 11:32:30.000000000 +0100 +++ 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.9/restorecond.c new/restorecond-3.0/restorecond.c --- old/restorecond-2.9/restorecond.c 2019-03-15 11:32:30.000000000 +0100 +++ 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) { @@ -217,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.9/restorecond.conf new/restorecond-3.0/restorecond.conf --- old/restorecond-2.9/restorecond.conf 2019-03-15 11:32:30.000000000 +0100 +++ 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.9/restorecond.init new/restorecond-3.0/restorecond.init --- old/restorecond-2.9/restorecond.init 2019-03-15 11:32:30.000000000 +0100 +++ 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.9/restorecond.service new/restorecond-3.0/restorecond.service --- old/restorecond-2.9/restorecond.service 2019-03-15 11:32:30.000000000 +0100 +++ 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.9/user.c new/restorecond-3.0/user.c --- old/restorecond-2.9/user.c 2019-03-15 11:32:30.000000000 +0100 +++ 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.9/utmpwatcher.c new/restorecond-3.0/utmpwatcher.c --- old/restorecond-2.9/utmpwatcher.c 2019-03-15 11:32:30.000000000 +0100 +++ 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;
