Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2021-07-02 13:26:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/snapper (Old) and /work/SRC/openSUSE:Factory/.snapper.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper" Fri Jul 2 13:26:45 2021 rev:131 rq:903000 version:0.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2021-05-19 17:48:56.833643558 +0200 +++ /work/SRC/openSUSE:Factory/.snapper.new.2625/snapper.changes 2021-07-02 13:27:16.804847647 +0200 @@ -1,0 +2,6 @@ +Wed Jun 16 11:50:49 CEST 2021 - [email protected] + +- added configure option for location of PAM module + (gh#openSUSE/snapper#659) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper.spec ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:17.548841874 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:17.548841874 +0200 @@ -16,12 +16,19 @@ # -#Compat macro for new _fillupdir macro introduced in Nov 2017 +# Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif -# optionally build with test coverage reporting +# Location for PAM module +%if 0%{?usrmerged} +%define pam_security_dir %{_libdir}/security +%else +%define pam_security_dir /%{_lib}/security +%endif + +# Optionally build with test coverage reporting %bcond_with coverage Name: snapper @@ -121,6 +128,7 @@ %if %{with coverage} --enable-coverage \ %endif + --with-pam-security="%{pam_security_dir}" \ %if 0%{?suse_version} <= 1310 --disable-rollback \ %endif @@ -132,7 +140,7 @@ %install %make_install -rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{_lib}/security/pam_snapper.la" +rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{pam_security_dir}/pam_snapper.la" rm -f %{buildroot}/etc/cron.hourly/suse.de-snapper rm -f %{buildroot}/etc/cron.daily/suse.de-snapper @@ -301,7 +309,7 @@ %files -n pam_snapper %defattr(-,root,root) -/%{_lib}/security/pam_snapper.so +/%{pam_security_dir}/pam_snapper.so %dir /usr/lib/pam_snapper /usr/lib/pam_snapper/*.sh %doc %{_mandir}/*/pam_snapper.8* ++++++ debian.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/rules new/debian/rules --- old/debian/rules 2021-05-17 02:00:00.000000000 +0200 +++ new/debian/rules 2021-06-22 02:00:00.000000000 +0200 @@ -16,7 +16,8 @@ override_dh_auto_configure: dh_auto_configure -- --docdir=/usr/share/doc/packages/snapper --disable-silent-rules \ - --disable-ext4 --enable-xattrs --disable-rollback --disable-btrfs-quota + --disable-ext4 --enable-xattrs --disable-rollback --disable-btrfs-quota \ + --with-pam-security=/lib/security override_dh_auto_install: dh_auto_install ++++++ snapper-0.9.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/Makefile.in new/snapper-0.9.0/Makefile.in --- old/snapper-0.9.0/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -323,6 +323,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/client/Makefile.in new/snapper-0.9.0/client/Makefile.in --- old/snapper-0.9.0/client/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/client/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -376,6 +376,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/client/snapper.cc new/snapper-0.9.0/client/snapper.cc --- old/snapper-0.9.0/client/snapper.cc 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/client/snapper.cc 2021-06-22 02:00:00.000000000 +0200 @@ -129,7 +129,7 @@ } catch (const runtime_error& e) { - cerr << _("Failed to set locale. Fix your system.") << endl; + cerr << _("Failed to set locale.") << endl; } setLogDo(&log_do); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/client/utils/Makefile.in new/snapper-0.9.0/client/utils/Makefile.in --- old/snapper-0.9.0/client/utils/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/client/utils/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -276,6 +276,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/configure new/snapper-0.9.0/configure --- old/snapper-0.9.0/configure 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/configure 2021-06-22 02:00:00.000000000 +0200 @@ -634,6 +634,7 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +PAM_SECURITY SYSCONFIG LIBVERSION_INFO LIBVERSION_PATCHLEVEL @@ -819,6 +820,7 @@ with_sysroot enable_libtool_lock with_conf +with_pam_security enable_btrfs enable_ext4 enable_lvm @@ -1508,6 +1510,8 @@ compiler's sysroot if not specified). --with-conf Use a custom sysconfig directory (default is /etc/sysconfig) + --pam-security Use a custom pam security directory (default is + $libdir/security) Some influential environment variables: CXX C++ compiler command @@ -16526,6 +16530,19 @@ CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'" +PAM_SECURITY=${libdir}/security + + +# Check whether --with-pam-security was given. +if test "${with_pam_security+set}" = set; then : + withval=$with_pam_security; with_pam_security=$withval +else + with_pam_security=no +fi + +if test "x$with_pam_security" != xno; then : + PAM_SECURITY="${with_pam_security}" +fi # Check whether --enable-btrfs was given. if test "${enable_btrfs+set}" = set; then : @@ -17292,6 +17309,7 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/configure.ac new/snapper-0.9.0/configure.ac --- old/snapper-0.9.0/configure.ac 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/configure.ac 2021-06-22 02:00:00.000000000 +0200 @@ -82,6 +82,11 @@ CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'" +PAM_SECURITY=${libdir}/security + +AC_ARG_WITH([pam-security], AC_HELP_STRING([--pam-security], [Use a custom pam security directory (default is $libdir/security)]), + [with_pam_security=$withval], [with_pam_security=no]) +AS_IF([test "x$with_pam_security" != xno], [PAM_SECURITY="${with_pam_security}"]) AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]), [with_btrfs=$enableval],[with_btrfs=yes]) @@ -200,6 +205,7 @@ AC_SUBST(LIBVERSION_PATCHLEVEL) AC_SUBST(LIBVERSION_INFO) AC_SUBST(SYSCONFIG) +AC_SUBST(PAM_SECURITY) AC_SUBST(docdir) AC_OUTPUT( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/data/Makefile.in new/snapper-0.9.0/data/Makefile.in --- old/snapper-0.9.0/data/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/data/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -201,6 +201,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/dbus/Makefile.in new/snapper-0.9.0/dbus/Makefile.in --- old/snapper-0.9.0/dbus/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/dbus/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -275,6 +275,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/doc/Makefile.in new/snapper-0.9.0/doc/Makefile.in --- old/snapper-0.9.0/doc/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/doc/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -242,6 +242,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/examples/Makefile.in new/snapper-0.9.0/examples/Makefile.in --- old/snapper-0.9.0/examples/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/examples/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -261,6 +261,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/examples/c/Makefile.in new/snapper-0.9.0/examples/c/Makefile.in --- old/snapper-0.9.0/examples/c/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/examples/c/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -255,6 +255,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/examples/c++-lib/Makefile.in new/snapper-0.9.0/examples/c++-lib/Makefile.in --- old/snapper-0.9.0/examples/c++-lib/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/examples/c++-lib/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -279,6 +279,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/pam/Makefile.am new/snapper-0.9.0/pam/Makefile.am --- old/snapper-0.9.0/pam/Makefile.am 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/pam/Makefile.am 2021-06-22 02:00:00.000000000 +0200 @@ -8,9 +8,9 @@ AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) -securelibdir = $(shell echo /`basename $(libdir)`/security) +pam_security_libdir = @PAM_SECURITY@ -securelib_LTLIBRARIES = pam_snapper.la +pam_security_lib_LTLIBRARIES = pam_snapper.la pam_snapper_la_LDFLAGS = -no-undefined -avoid-version -module pam_snapper_la_LIBADD = -lpam $(DBUS_LIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/pam/Makefile.in new/snapper-0.9.0/pam/Makefile.in --- old/snapper-0.9.0/pam/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/pam/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -129,8 +129,8 @@ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(securelibdir)" -LTLIBRARIES = $(securelib_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(pam_security_libdir)" +LTLIBRARIES = $(pam_security_lib_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_PAM_TRUE@pam_snapper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) pam_snapper_la_SOURCES = pam_snapper.c @@ -143,7 +143,7 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(pam_snapper_la_LDFLAGS) $(LDFLAGS) -o \ $@ -@HAVE_PAM_TRUE@am_pam_snapper_la_rpath = -rpath $(securelibdir) +@HAVE_PAM_TRUE@am_pam_snapper_la_rpath = -rpath $(pam_security_libdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -285,6 +285,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ @@ -356,8 +357,8 @@ top_srcdir = @top_srcdir@ @HAVE_PAM_TRUE@AM_CFLAGS = -D_GNU_SOURCE -Wwrite-strings @HAVE_PAM_TRUE@AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) -@HAVE_PAM_TRUE@securelibdir = $(shell echo /`basename $(libdir)`/security) -@HAVE_PAM_TRUE@securelib_LTLIBRARIES = pam_snapper.la +@HAVE_PAM_TRUE@pam_security_libdir = @PAM_SECURITY@ +@HAVE_PAM_TRUE@pam_security_lib_LTLIBRARIES = pam_snapper.la @HAVE_PAM_TRUE@pam_snapper_la_LDFLAGS = -no-undefined -avoid-version -module @HAVE_PAM_TRUE@pam_snapper_la_LIBADD = -lpam $(DBUS_LIBS) all: all-am @@ -394,33 +395,33 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-securelibLTLIBRARIES: $(securelib_LTLIBRARIES) +install-pam_security_libLTLIBRARIES: $(pam_security_lib_LTLIBRARIES) @$(NORMAL_INSTALL) - @list='$(securelib_LTLIBRARIES)'; test -n "$(securelibdir)" || list=; \ + @list='$(pam_security_lib_LTLIBRARIES)'; test -n "$(pam_security_libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(securelibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(securelibdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(securelibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(securelibdir)"; \ + echo " $(MKDIR_P) '$(DESTDIR)$(pam_security_libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pam_security_libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pam_security_libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pam_security_libdir)"; \ } -uninstall-securelibLTLIBRARIES: +uninstall-pam_security_libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(securelib_LTLIBRARIES)'; test -n "$(securelibdir)" || list=; \ + @list='$(pam_security_lib_LTLIBRARIES)'; test -n "$(pam_security_libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(securelibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(securelibdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pam_security_libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pam_security_libdir)/$$f"; \ done -clean-securelibLTLIBRARIES: - -test -z "$(securelib_LTLIBRARIES)" || rm -f $(securelib_LTLIBRARIES) - @list='$(securelib_LTLIBRARIES)'; \ +clean-pam_security_libLTLIBRARIES: + -test -z "$(pam_security_lib_LTLIBRARIES)" || rm -f $(pam_security_lib_LTLIBRARIES) + @list='$(pam_security_lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -562,7 +563,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(securelibdir)"; do \ + for dir in "$(DESTDIR)$(pam_security_libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -597,8 +598,8 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-securelibLTLIBRARIES \ - mostlyclean-am +clean-am: clean-generic clean-libtool \ + clean-pam_security_libLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/pam_snapper.Plo @@ -618,7 +619,7 @@ info-am: -install-data-am: install-securelibLTLIBRARIES +install-data-am: install-pam_security_libLTLIBRARIES install-dvi: install-dvi-am @@ -664,25 +665,25 @@ ps-am: -uninstall-am: uninstall-securelibLTLIBRARIES +uninstall-am: uninstall-pam_security_libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-securelibLTLIBRARIES \ + clean-generic clean-libtool clean-pam_security_libLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am \ - install-securelibLTLIBRARIES install-strip installcheck \ + install-info install-info-am install-man \ + install-pam_security_libLTLIBRARIES install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ - uninstall-securelibLTLIBRARIES + uninstall-pam_security_libLTLIBRARIES .PRECIOUS: Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/po/Makefile.in new/snapper-0.9.0/po/Makefile.in --- old/snapper-0.9.0/po/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/po/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -201,6 +201,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/po/it.po new/snapper-0.9.0/po/it.po --- old/snapper-0.9.0/po/it.po 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/po/it.po 2021-06-22 02:00:00.000000000 +0200 @@ -4,7 +4,7 @@ "Project-Id-Version: @PACKAGE@\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-12-17 13:34+0100\n" -"PO-Revision-Date: 2020-12-25 17:27+0000\n" +"PO-Revision-Date: 2021-06-08 16:00+0000\n" "Last-Translator: Paolo Za <[email protected]>\n" "Language-Team: Italian <https://l10n.opensuse.org/projects/snapper/master/it/" ">\n" @@ -13,7 +13,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.6.1\n" +"X-Generator: Weblate 4.6.2\n" msgid "\t--abbreviate\t\t\tAllow to abbreviate table columns." msgstr "\t--abbreviate\t\t\tConsente di abbreviare le colonne della tabella." @@ -871,8 +871,8 @@ msgid "usage: snapper [--global-options] <command> [--command-options] [command-arguments]" msgstr "" -"Uso:\n" -"\tsnapper [--opzioni-globali] <comando> [--opzioni-del-comando] [argomenti-del-comando]" +"uso: snapper [--opzioni-globali] <comando> [--opzioni-del-comando] " +"[argomenti-del-comando]" msgid "yes" msgstr "s??" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/po/zh_CN.po new/snapper-0.9.0/po/zh_CN.po --- old/snapper-0.9.0/po/zh_CN.po 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/po/zh_CN.po 2021-06-22 02:00:00.000000000 +0200 @@ -10,8 +10,8 @@ "Project-Id-Version: @PACKAGE@\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-12-17 13:34+0100\n" -"PO-Revision-Date: 2021-03-07 03:08+0000\n" -"Last-Translator: Grace Yu <[email protected]>\n" +"PO-Revision-Date: 2021-06-06 22:00+0000\n" +"Last-Translator: Dingzhong Chen <[email protected]>\n" "Language-Team: Chinese (China) <https://l10n.opensuse.org/projects/snapper/" "master/zh_CN/>\n" "Language: zh_CN\n" @@ -19,7 +19,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 3.6.1\n" +"X-Generator: Weblate 4.6.2\n" msgid "\t--abbreviate\t\t\tAllow to abbreviate table columns." msgstr "\t--abbreviate\t\t\t????????????????????????????????????" @@ -771,7 +771,7 @@ msgstr "TiB" msgid "Try 'snapper --help' for more information." -msgstr "????????????????????? 'snapper help'???" +msgstr "????????????????????? 'snapper --help'???" msgid "Type" msgstr "??????" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/scripts/Makefile.in new/snapper-0.9.0/scripts/Makefile.in --- old/snapper-0.9.0/scripts/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/scripts/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -231,6 +231,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/server/Makefile.in new/snapper-0.9.0/server/Makefile.in --- old/snapper-0.9.0/server/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/server/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -277,6 +277,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/server/snapperd.cc new/snapper-0.9.0/server/snapperd.cc --- old/snapper-0.9.0/server/snapperd.cc 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/server/snapperd.cc 2021-06-22 02:00:00.000000000 +0200 @@ -275,7 +275,18 @@ y2mil("Requesting DBus name"); - mainloop.request_name(SERVICE, DBUS_NAME_FLAG_REPLACE_EXISTING); + try + { + mainloop.request_name(SERVICE, DBUS_NAME_FLAG_REPLACE_EXISTING); + } + catch (const Exception& e) + { + SN_CAUGHT(e); + + y2err("Failed to request DBus name"); + + return EXIT_FAILURE; + } y2mil("Loading snapper configs"); @@ -287,7 +298,7 @@ { SN_CAUGHT(e); - y2err("failed to load snapper configs"); + y2err("Failed to load snapper configs"); } y2mil("Listening for method calls and signals"); @@ -298,5 +309,5 @@ meta_snappers.unload(); - return 0; + return EXIT_SUCCESS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/snapper/Makefile.in new/snapper-0.9.0/snapper/Makefile.in --- old/snapper-0.9.0/snapper/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/snapper/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -361,6 +361,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/snapper/SnapperDefines.h new/snapper-0.9.0/snapper/SnapperDefines.h --- old/snapper-0.9.0/snapper/SnapperDefines.h 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/snapper/SnapperDefines.h 2021-06-22 02:00:00.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2014] Novell, Inc. - * Copyright (c) 2020 SUSE LLC + * Copyright (c) [2020-2021] SUSE LLC * * All Rights Reserved. * @@ -38,6 +38,11 @@ #define DEV_MAPPER_DIR "/dev/mapper" +// commands + +#define SH_BIN "/bin/sh" + + // keys from the config files #define KEY_SUBVOLUME "SUBVOLUME" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/snapper/SystemCmd.cc new/snapper-0.9.0/snapper/SystemCmd.cc --- old/snapper-0.9.0/snapper/SystemCmd.cc 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/snapper/SystemCmd.cc 2021-06-22 02:00:00.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2011] Novell, Inc. - * Copyright (c) 2018 SUSE LLC + * Copyright (c) [2018-2021] SUSE LLC * * All Rights Reserved. * @@ -25,8 +25,6 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> -#include <ostream> -#include <fstream> #include <sys/wait.h> #include <string> #include <boost/algorithm/string.hpp> @@ -36,6 +34,7 @@ #include "snapper/Log.h" #include "snapper/AppUtil.h" #include "snapper/SystemCmd.h" +#include "snapper/SnapperDefines.h" namespace snapper @@ -44,7 +43,7 @@ SystemCmd::SystemCmd(const string& Command_Cv, bool log_output) - : Combine_b(false), log_output(log_output) + : log_output(log_output) { y2mil("constructor SystemCmd:\"" << Command_Cv << "\""); init(); @@ -83,95 +82,13 @@ SystemCmd::execute(const string& Cmd_Cv) { y2mil("SystemCmd Executing:\"" << Cmd_Cv << "\""); - Background_b = false; return doExecute(Cmd_Cv); } int -SystemCmd::executeBackground( const string& Cmd_Cv ) -{ - y2mil("SystemCmd Executing (Background):\"" << Cmd_Cv << "\""); - Background_b = true; - return doExecute(Cmd_Cv); -} - - -int -SystemCmd::executeRestricted( const string& Command_Cv, - long unsigned MaxTimeSec, long unsigned MaxLineOut, - bool& ExceedTime, bool& ExceedLines ) -{ - y2mil("cmd:" << Command_Cv << " MaxTime:" << MaxTimeSec << " MaxLines:" << MaxLineOut); - ExceedTime = ExceedLines = false; - int ret = executeBackground( Command_Cv ); - unsigned long ts = 0; - unsigned long ls = 0; - unsigned long start_time = time(NULL); - while( !ExceedTime && !ExceedLines && !doWait( false, ret ) ) - { - if( MaxTimeSec>0 ) - { - ts = time(NULL)-start_time; - y2mil( "time used:" << ts ); - } - if( MaxLineOut>0 ) - { - ls = numLines()+numLines(false,IDX_STDERR); - y2mil( "lines out:" << ls ); - } - ExceedTime = MaxTimeSec>0 && ts>MaxTimeSec; - ExceedLines = MaxLineOut>0 && ls>MaxLineOut; - sleep( 1 ); - } - if( ExceedTime || ExceedLines ) - { - int r = kill( Pid_i, SIGKILL ); - y2mil( "kill pid:" << Pid_i << " ret:" << r ); - unsigned count=0; - int Status_ii; - int Wait_ii = -1; - while( count<5 && Wait_ii<=0 ) - { - Wait_ii = waitpid( Pid_i, &Status_ii, WNOHANG ); - y2mil( "waitpid:" << Wait_ii ); - count++; - sleep( 1 ); - } - /* - r = kill( Pid_i, SIGKILL ); - y2mil( "kill pid:" << Pid_i << " ret:" << r ); - count=0; - waitDone = false; - while( count<8 && !waitDone ) - { - y2mil( "doWait:" << count ); - waitDone = doWait( false, ret ); - count++; - sleep( 1 ); - } - */ - Ret_i = -257; - } - else - Ret_i = ret; - y2mil("ret:" << ret << " ExceedTime:" << ExceedTime << " ExceedLines:" << ExceedLines); - return ret; -} - - -#define PRIMARY_SHELL "/bin/sh" -#define ALTERNATE_SHELL "/bin/bash" - -int SystemCmd::doExecute( const string& Cmd ) { - string Shell_Ci = PRIMARY_SHELL; - if( access( Shell_Ci.c_str(), X_OK ) != 0 ) - { - Shell_Ci = ALTERNATE_SHELL; - } - lastCmd = Cmd; y2deb("Cmd:" << Cmd); @@ -182,32 +99,29 @@ int sout[2]; int serr[2]; bool ok_bi = true; - if( !testmode && pipe(sout)<0 ) + if( pipe(sout)<0 ) { y2err("pipe stdout creation failed errno:" << errno << " (" << stringerror(errno) << ")"); ok_bi = false; } - if( !testmode && !Combine_b && pipe(serr)<0 ) + if( pipe(serr)<0 ) { y2err("pipe stderr creation failed errno:" << errno << " (" << stringerror(errno) << ")"); ok_bi = false; } - if( !testmode && ok_bi ) + if( ok_bi ) { pfds[0].fd = sout[0]; if( fcntl( pfds[0].fd, F_SETFL, O_NONBLOCK )<0 ) { y2err("fcntl O_NONBLOCK failed errno:" << errno << " (" << stringerror(errno) << ")"); } - if( !Combine_b ) + pfds[1].fd = serr[0]; + if( fcntl( pfds[1].fd, F_SETFL, O_NONBLOCK )<0 ) { - pfds[1].fd = serr[0]; - if( fcntl( pfds[1].fd, F_SETFL, O_NONBLOCK )<0 ) - { - y2err("fcntl O_NONBLOCK failed errno:" << errno << " (" << stringerror(errno) << ")"); - } + y2err("fcntl O_NONBLOCK failed errno:" << errno << " (" << stringerror(errno) << ")"); } - y2deb("sout:" << pfds[0].fd << " serr:" << (Combine_b?-1:pfds[1].fd)); + y2deb("sout:" << pfds[0].fd << " serr:" << pfds[1].fd); const vector<const char*> env = make_env(); @@ -218,11 +132,7 @@ { y2err("dup2 stdout child failed errno:" << errno << " (" << stringerror(errno) << ")"); } - if( !Combine_b && dup2( serr[1], STDERR_FILENO )<0 ) - { - y2err("dup2 stderr child failed errno:" << errno << " (" << stringerror(errno) << ")"); - } - if( Combine_b && dup2( STDOUT_FILENO, STDERR_FILENO )<0 ) + if( dup2( serr[1], STDERR_FILENO )<0 ) { y2err("dup2 stderr child failed errno:" << errno << " (" << stringerror(errno) << ")"); } @@ -230,13 +140,13 @@ { y2err("close child failed errno:" << errno << " (" << stringerror(errno) << ")"); } - if( !Combine_b && close( serr[0] )<0 ) + if( close( serr[0] )<0 ) { y2err("close child failed errno:" << errno << " (" << stringerror(errno) << ")"); } closeOpenFds(); - Ret_i = execle(Shell_Ci.c_str(), Shell_Ci.c_str(), "-c", Cmd.c_str(), nullptr, &env[0]); - y2err("SHOULD NOT HAPPEN \"" << Shell_Ci << "\" Ret:" << Ret_i); + Ret_i = execle(SH_BIN, SH_BIN, "-c", Cmd.c_str(), nullptr, &env[0]); + y2err("SHOULD NOT HAPPEN \"" SH_BIN "\" Ret:" << Ret_i); break; case -1: Ret_i = -1; @@ -246,7 +156,7 @@ { y2err("close parent failed errno:" << errno << " (" << stringerror(errno) << ")"); } - if( !Combine_b && close( serr[1] )<0 ) + if( close( serr[1] )<0 ) { y2err("close parent failed errno:" << errno << " (" << stringerror(errno) << ")"); } @@ -256,37 +166,27 @@ { y2err("fdopen stdout failed errno:" << errno << " (" << stringerror(errno) << ")"); } - if( !Combine_b ) + File_aC[IDX_STDERR] = fdopen( serr[0], "r" ); + if( File_aC[IDX_STDERR] == NULL ) { - File_aC[IDX_STDERR] = fdopen( serr[0], "r" ); - if( File_aC[IDX_STDERR] == NULL ) - { y2err("fdopen stderr failed errno:" << errno << " (" << stringerror(errno) << ")"); - } - } - if( !Background_b ) - { - doWait( true, Ret_i ); - y2mil("stopwatch " << stopwatch << " for \"" << cmd() << "\""); } + + doWait( Ret_i ); + y2mil("stopwatch " << stopwatch << " for \"" << cmd() << "\""); + break; } } - else if( !testmode ) - { - Ret_i = -1; - } else { - Ret_i = 0; - y2mil("TESTMODE would execute \"" << Cmd << "\""); + Ret_i = -1; } if( Ret_i==-127 || Ret_i==-1 ) { y2err("system (\"" << Cmd << "\") = " << Ret_i); } - if( !testmode ) - checkOutput(); + checkOutput(); y2mil("system() Returns:" << Ret_i); if (Ret_i != 0 && log_output) logOutput(); @@ -295,16 +195,16 @@ bool -SystemCmd::doWait( bool Hang_bv, int& Ret_ir ) +SystemCmd::doWait( int& Ret_ir ) { int Wait_ii; int Status_ii; do { - y2deb("[0] id:" << pfds[0].fd << " ev:" << hex << (unsigned)pfds[0].events << dec << " [1] fs:" << - (Combine_b?-1:pfds[1].fd) << " ev:" << hex << (Combine_b?0:(unsigned)pfds[1].events)); - int sel = poll( pfds, Combine_b?1:2, 1000 ); + y2deb("[0] fd:" << pfds[0].fd << " ev:" << hex << (unsigned)(pfds[0].events) << dec << " " + "[1] fd:" << pfds[1].fd << " ev:" << hex << (unsigned)(pfds[1].events)); + int sel = poll( pfds, 2, 1000 ); if (sel < 0) { y2err("poll failed errno:" << errno << " (" << stringerror(errno) << ")"); @@ -317,18 +217,15 @@ Wait_ii = waitpid( Pid_i, &Status_ii, WNOHANG ); y2deb("Wait ret:" << Wait_ii); } - while( Hang_bv && Wait_ii == 0 ); + while( Wait_ii == 0 ); if( Wait_ii != 0 ) { checkOutput(); fclose( File_aC[IDX_STDOUT] ); File_aC[IDX_STDOUT] = NULL; - if( !Combine_b ) - { - fclose( File_aC[IDX_STDERR] ); - File_aC[IDX_STDERR] = NULL; - } + fclose( File_aC[IDX_STDERR] ); + File_aC[IDX_STDERR] = NULL; if (WIFEXITED(Status_ii)) { Ret_ir = WEXITSTATUS(Status_ii); @@ -345,27 +242,13 @@ } y2deb("Wait:" << Wait_ii << " pid:" << Pid_i << " stat:" << Status_ii << - " Hang:" << Hang_bv << " Ret:" << Ret_ir); + " Ret:" << Ret_ir); return Wait_ii != 0; } -void -SystemCmd::setCombine(bool val) -{ - Combine_b = val; -} - - -void -SystemCmd::setTestmode(bool val) -{ - testmode = val; -} - - unsigned -SystemCmd::numLines( bool Sel_bv, OutputStream Idx_iv ) const +SystemCmd::numLines( OutputStream Idx_iv ) const { unsigned Ret_ii; @@ -373,21 +256,14 @@ { y2err("invalid index " << Idx_iv); } - if( Sel_bv ) - { - Ret_ii = SelLines_aC[Idx_iv].size(); - } - else - { - Ret_ii = Lines_aC[Idx_iv].size(); - } + Ret_ii = Lines_aC[Idx_iv].size(); y2deb("ret:" << Ret_ii); return Ret_ii; } string -SystemCmd::getLine( unsigned Nr_iv, bool Sel_bv, OutputStream Idx_iv ) const +SystemCmd::getLine( unsigned Nr_iv, OutputStream Idx_iv ) const { string ret; @@ -395,19 +271,9 @@ { y2err("invalid index " << Idx_iv); } - if( Sel_bv ) - { - if( Nr_iv < SelLines_aC[Idx_iv].capacity() ) - { - ret = *SelLines_aC[Idx_iv][Nr_iv]; - } - } - else + if( Nr_iv < Lines_aC[Idx_iv].size() ) { - if( Nr_iv < Lines_aC[Idx_iv].size() ) - { - ret = Lines_aC[Idx_iv][Nr_iv]; - } + ret = Lines_aC[Idx_iv][Nr_iv]; } return ret; } @@ -418,7 +284,6 @@ { for (int Idx_ii = 0; Idx_ii < 2; Idx_ii++) { - SelLines_aC[Idx_ii].resize(0); Lines_aC[Idx_ii].clear(); NewLineSeen_ab[Idx_ii] = true; } @@ -538,34 +403,34 @@ void SystemCmd::logOutput() const { - unsigned lines = numLines(false, IDX_STDERR); + unsigned lines = numLines(IDX_STDERR); if (lines <= line_limit) { for (unsigned i = 0; i < lines; ++i) - y2mil("stderr:" << getLine(i, false, IDX_STDERR)); + y2mil("stderr:" << getLine(i, IDX_STDERR)); } else { for (unsigned i = 0; i < line_limit / 2; ++i) - y2mil("stderr:" << getLine(i, false, IDX_STDERR)); + y2mil("stderr:" << getLine(i, IDX_STDERR)); y2mil("stderr omitting lines"); for (unsigned i = lines - line_limit / 2; i < lines; ++i) - y2mil("stderr:" << getLine(i, false, IDX_STDERR)); + y2mil("stderr:" << getLine(i, IDX_STDERR)); } - lines = numLines(false, IDX_STDOUT); + lines = numLines(IDX_STDOUT); if (lines <= line_limit) { for (unsigned i = 0; i < lines; ++i) - y2mil("stdout:" << getLine(i, false, IDX_STDOUT)); + y2mil("stdout:" << getLine(i, IDX_STDOUT)); } else { for (unsigned i = 0; i < line_limit / 2; ++i) - y2mil("stdout:" << getLine(i, false, IDX_STDOUT)); + y2mil("stdout:" << getLine(i, IDX_STDOUT)); y2mil("stdout omitting lines"); for (unsigned i = lines - line_limit / 2; i < lines; ++i) - y2mil("stdout:" << getLine(i, false, IDX_STDOUT)); + y2mil("stdout:" << getLine(i, IDX_STDOUT)); } } @@ -597,21 +462,4 @@ return "'" + boost::replace_all_copy(str, "'", "'\\''") + "'"; } - -string -SystemCmd::quote(const list<string>& strs) -{ - string ret; - for (std::list<string>::const_iterator it = strs.begin(); it != strs.end(); it++) - { - if (it != strs.begin()) - ret.append(" "); - ret.append(quote(*it)); - } - return ret; -} - - -bool SystemCmd::testmode = false; - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/snapper/SystemCmd.h new/snapper-0.9.0/snapper/SystemCmd.h --- old/snapper-0.9.0/snapper/SystemCmd.h 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/snapper/SystemCmd.h 2021-06-22 02:00:00.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2014] Novell, Inc. - * Copyright (c) [2018-2020] SUSE LLC + * Copyright (c) [2018-2021] SUSE LLC * * All Rights Reserved. * @@ -29,7 +29,6 @@ #include <string> #include <vector> -#include <list> #include <boost/noncopyable.hpp> @@ -43,19 +42,15 @@ { public: - enum OutputStream { IDX_STDOUT, IDX_STDERR }; - SystemCmd(const string& Command_Cv, bool log_output = true); virtual ~SystemCmd(); - protected: + private: + + enum OutputStream { IDX_STDOUT, IDX_STDERR }; int execute(const string& Command_Cv); - int executeBackground(const string& Command_Cv); - int executeRestricted(const string& Command_Cv, - unsigned long MaxTimeSec, unsigned long MaxLineOut, - bool& ExceedTime, bool& ExceedLines); public: @@ -65,14 +60,10 @@ string cmd() const { return lastCmd; } int retcode() const { return Ret_i; } - protected: + private: - unsigned numLines(bool Selected_bv = false, OutputStream Idx_ii = IDX_STDOUT) const; - string getLine(unsigned Num_iv, bool Selected_bv = false, OutputStream Idx_ii = IDX_STDOUT) const; - - void setCombine(bool combine = true); - - static void setTestmode(bool testmode = true); + unsigned numLines(OutputStream Idx_ii = IDX_STDOUT) const; + string getLine(unsigned Num_iv, OutputStream Idx_ii = IDX_STDOUT) const; public: @@ -81,23 +72,18 @@ */ static string quote(const string& str); - /** - * Quotes and protects every single string in the list for shell execution. - */ - static string quote(const std::list<string>& strs); - - protected: + private: void invalidate(); void closeOpenFds() const; int doExecute(const string& Cmd_Cv); - bool doWait(bool Hang_bv, int& Ret_ir); + bool doWait(int& Ret_ir); void checkOutput(); - void getUntilEOF(FILE* File_Cr, std::vector<string>& Lines_Cr, bool& NewLineSeen_br, + void getUntilEOF(FILE* File_Cr, vector<string>& Lines_Cr, bool& NewLineSeen_br, bool Stderr_bv); void extractNewline(const string& Buf_ti, int Cnt_ii, bool& NewLineSeen_br, - string& Text_Cr, std::vector<string>& Lines_Cr); - void addLine(const string& Text_Cv, std::vector<string>& Lines_Cr); + string& Text_Cr, vector<string>& Lines_Cr); + void addLine(const string& Text_Cv, vector<string>& Lines_Cr); void init(); void logOutput() const; @@ -113,19 +99,14 @@ vector<const char*> make_env() const; FILE* File_aC[2]; - std::vector<string> Lines_aC[2]; - std::vector<string*> SelLines_aC[2]; + vector<string> Lines_aC[2]; bool NewLineSeen_ab[2]; - bool Combine_b; bool log_output; - bool Background_b; string lastCmd; int Ret_i; int Pid_i; struct pollfd pfds[2]; - static bool testmode; - static const unsigned line_limit = 50; }; @@ -135,11 +116,6 @@ return SystemCmd::quote(str); } - inline string quote(const std::list<string>& strs) - { - return SystemCmd::quote(strs); - } - } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/snapper.spec.in new/snapper-0.9.0/snapper.spec.in --- old/snapper-0.9.0/snapper.spec.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/snapper.spec.in 2021-06-22 02:00:00.000000000 +0200 @@ -16,12 +16,19 @@ # -#Compat macro for new _fillupdir macro introduced in Nov 2017 +# Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif -# optionally build with test coverage reporting +# Location for PAM module +%if 0%{?usrmerged} +%define pam_security_dir %{_libdir}/security +%else +%define pam_security_dir /%{_lib}/security +%endif + +# Optionally build with test coverage reporting %bcond_with coverage Name: snapper @@ -117,10 +124,11 @@ autoreconf -fvi %configure \ - --docdir="%{_defaultdocdir}/snapper" \ + --docdir="%{_defaultdocdir}/snapper" \ %if %{with coverage} --enable-coverage \ %endif + --with-pam-security="%{pam_security_dir}" \ %if 0%{?suse_version} <= 1310 --disable-rollback \ %endif @@ -132,7 +140,7 @@ %install %make_install -rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{_lib}/security/pam_snapper.la" +rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{pam_security_dir}/pam_snapper.la" rm -f %{buildroot}/etc/cron.hourly/suse.de-snapper rm -f %{buildroot}/etc/cron.daily/suse.de-snapper @@ -301,7 +309,7 @@ %files -n pam_snapper %defattr(-,root,root) -/%{_lib}/security/pam_snapper.so +/%{pam_security_dir}/pam_snapper.so %dir /usr/lib/pam_snapper /usr/lib/pam_snapper/*.sh %doc %{_mandir}/*/pam_snapper.8* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/testsuite/Makefile.in new/snapper-0.9.0/testsuite/Makefile.in --- old/snapper-0.9.0/testsuite/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/testsuite/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -552,6 +552,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/testsuite-cmp/Makefile.in new/snapper-0.9.0/testsuite-cmp/Makefile.in --- old/snapper-0.9.0/testsuite-cmp/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/testsuite-cmp/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -255,6 +255,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/testsuite-real/Makefile.in new/snapper-0.9.0/testsuite-real/Makefile.in --- old/snapper-0.9.0/testsuite-real/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/testsuite-real/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -410,6 +410,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/zypp-plugin/Makefile.in new/snapper-0.9.0/zypp-plugin/Makefile.in --- old/snapper-0.9.0/zypp-plugin/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/zypp-plugin/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -554,6 +554,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.0/zypp-plugin/testsuite/Makefile.in new/snapper-0.9.0/zypp-plugin/testsuite/Makefile.in --- old/snapper-0.9.0/zypp-plugin/testsuite/Makefile.in 2021-05-17 02:00:00.000000000 +0200 +++ new/snapper-0.9.0/zypp-plugin/testsuite/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -403,6 +403,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_SECURITY = @PAM_SECURITY@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ ++++++ snapper-Debian_10.0.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.116837467 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.116837467 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-Debian_9.0.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.132837343 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.136837312 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-Debian_Unstable.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.152837188 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.152837188 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_17.04.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.180836971 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.180836971 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_17.10.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.200836816 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.200836816 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_18.04.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.216836691 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.216836691 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_18.10.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.232836567 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.232836567 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_19.04.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.252836412 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.252836412 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_19.10.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.268836288 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.268836288 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_20.04.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.284836164 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.288836133 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_20.10.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.304836008 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.304836008 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_21.04.dsc ++++++ --- /var/tmp/diff_new_pack.Z8JVE8/_old 2021-07-02 13:27:18.320835884 +0200 +++ /var/tmp/diff_new_pack.Z8JVE8/_new 2021-07-02 13:27:18.320835884 +0200 @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -422828cb89d5e8c43c22c845fcea3ff2 639544 snapper-0.9.0.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2
