The package rpms/nuxwdog.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nuxwdog.git/commit/?id=99b08f6e8d....
Change:
+%ifarch ppc64 s390x sparc64 x86_64
Thanks.
Full change:
============
commit 99b08f6e8da628a0cab5fd3d866f177c12c85889
Author: Dinesh Prasanth M K <mkdineshprasanth(a)gmail.com>
Date: Tue Jul 24 11:38:30 2018 -0400
Syncing up with upstream
Bumping the version to 1.0.4 and sync up with
the upstream version
diff --git a/.gitignore b/.gitignore
index 718d3b2..be5e6b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/nuxwdog-1.0.1.tar.gz
/nuxwdog-1.0.2.tar.gz
/nuxwdog-1.0.3.tar.gz
+/nuxwdog-1.0.4.tar.gz
diff --git a/nuxwdog-Allow-unlimited-conf-line-length.patch
b/nuxwdog-Allow-unlimited-conf-line-length.patch
deleted file mode 100644
index 513c483..0000000
--- a/nuxwdog-Allow-unlimited-conf-line-length.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From f4b47d21560fd57c7d2e326ebfae66f42b66864f Mon Sep 17 00:00:00 2001
-From: Ade Lee <alee(a)redhat.com>
-Date: Mon, 30 Oct 2017 22:47:15 -0400
-Subject: [PATCH] Allow unlimited conf line length
-
-Errors occurred because the line length was being truncated,
-especially for long lines like JVM args. Now the line length
-will be allocated correctly.
-
-Change-Id: I77553817931883e05180a1082d45a20e3a6afe4c
----
- src/com/redhat/nuxwdog/wdconf.cpp | 45 ++++++++++++++++++++++-----------------
- 1 file changed, 26 insertions(+), 19 deletions(-)
-
-diff --git a/src/com/redhat/nuxwdog/wdconf.cpp b/src/com/redhat/nuxwdog/wdconf.cpp
-index 086bc5ae36c79ff3570ba0e39da10a42d8ab9687..95603c96dbd021289b60a001ee6fba0b15f9f540
100644
---- a/src/com/redhat/nuxwdog/wdconf.cpp
-+++ b/src/com/redhat/nuxwdog/wdconf.cpp
-@@ -29,24 +29,23 @@
- #include "wdconf.h"
- #include "wdlog.h"
-
--#define MAX_CONF_LINE_LENGTH 1024
-+#define CHUNK 1024
-
- /* Read config file line like util_getline() */
--static int _watchdog_readconf_line(char *line, int maxlen, FILE *file)
-+static char * _watchdog_readconf_line(FILE *file)
- {
- int len = 0;
- int nlseen = 0;
-- int src;
-- int dst;
-- char *bufp = line;
-+ int src = 0;
-+ int dst = 0;
-+ char bufp[CHUNK];
-
-- if (feof(file)) {
-- return -1;
-- }
-+ char *line = (char *) malloc(1);
-+ line[0] = '\0';
-
-- while (!nlseen && (len < maxlen - 1)) {
-+ while (!nlseen && !feof(file)) {
-
-- if (!fgets(bufp, maxlen - len, file))
-+ if (!fgets(bufp, CHUNK, file))
- break;
-
- /* Scan what was just read */
-@@ -68,26 +67,31 @@ static int _watchdog_readconf_line(char *line, int maxlen, FILE
*file)
- ++dst;
- }
- }
-+ bufp[dst] = '\0';
-
- if (dst > 0) {
- /* Check for continuation */
- if (nlseen && (bufp[dst-1] == '\\')) {
-+ bufp[dst-1] = '\0';
- dst -= 1;
- nlseen = 0;
- }
-
- len += dst;
-- bufp += dst;
-+
-+ line = (char *) realloc(line, len+1);
-+ strcat(line, bufp);
- }
- }
-
- if ((len <= 0) && !nlseen) {
-- return -1;
-+ if (line) {
-+ free(line);
-+ }
-+ return NULL;
- }
-
-- line[len] = '\0';
--
-- return len;
-+ return line;
- }
-
- static int
-@@ -95,8 +99,7 @@ _watchdog_parse_conffile(char *conffile,
- watchdog_conf_info_t *info)
- {
- FILE *cfile;
-- char line[MAX_CONF_LINE_LENGTH];
-- char *name, *value;
-+ char *line, *name, *value;
- int len;
-
- cfile = fopen(conffile, "r");
-@@ -110,7 +113,8 @@ _watchdog_parse_conffile(char *conffile,
- return -1;
- }
-
-- while ((len = _watchdog_readconf_line(line, MAX_CONF_LINE_LENGTH, cfile)) >= 0)
{
-+ while ((line = _watchdog_readconf_line(cfile)) != NULL) {
-+ len = strlen(line);
- name = line;
- if ((*name) == '#')
- continue;
-@@ -154,10 +158,13 @@ _watchdog_parse_conffile(char *conffile,
- if (!strcasecmp(name, "ChildSecurity")) {
- info->childSecurity = atoi(value);
- }
-+ if (line != NULL) {
-+ free(line);
-+ line = NULL;
-+ }
- }
-
- fclose(cfile);
--
- return 0;
- }
-
---
-2.9.5
-
diff --git a/nuxwdog-set-uid.patch b/nuxwdog-set-uid.patch
deleted file mode 100644
index 9f725fe..0000000
--- a/nuxwdog-set-uid.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 3d7adfbe0788f33a67c3ed65e12ba9d32074a674 Mon Sep 17 00:00:00 2001
-From: Ade Lee <alee(a)redhat.com>
-Date: Mon, 15 Jan 2018 15:25:36 -0500
-Subject: [PATCH] Add parameter to set the uid of the invoked process
-
----
- src/com/redhat/nuxwdog/watchdog.cpp | 36 ++++++++++++++++++++++++++++++++++--
- src/com/redhat/nuxwdog/wdconf.cpp | 7 +++++++
- src/com/redhat/nuxwdog/wdconf.h | 3 ++-
- 3 files changed, 43 insertions(+), 3 deletions(-)
-
-diff --git a/src/com/redhat/nuxwdog/watchdog.cpp b/src/com/redhat/nuxwdog/watchdog.cpp
-index a4d6a77..36b13e4 100644
---- a/src/com/redhat/nuxwdog/watchdog.cpp
-+++ b/src/com/redhat/nuxwdog/watchdog.cpp
-@@ -33,6 +33,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <errno.h>
-+#include <cerrno>
- #include <signal.h>
- #include <fcntl.h>
- #include <pwd.h>
-@@ -280,7 +281,7 @@ watchdog_exit(int status)
-
- int
- _watchdog_exec(int server_starts, char *server_exe, char *args[],
-- char * envp[], int *spid)
-+ char * envp[], int *spid, int uid)
- {
- int server_background = 0;
- char *server_out = NULL;
-@@ -412,6 +413,14 @@ _watchdog_exec(int server_starts, char *server_exe, char *args[],
- free(server_context);
- }
-
-+ if (uid >= 0) {
-+ rv = setuid(uid);
-+ if (rv != 0) {
-+ watchdog_error("unable to setuid");
-+ watchdog_exit(1);
-+ }
-+ }
-+
- rv = execv(server_exe, args);
- if (rv < 0) {
- watchdog_error("could not execute server binary");
-@@ -757,10 +766,12 @@ int main(int argc, char **argv, char **envp)
- int ver=0;
- int server_starts;
- int server_stat;
-+ int uid=-1;
- char *server_exe = NULL;
- char *server_args = NULL;
- char *conffile = NULL;
- char *pch;
-+ char *user = NULL;
- char *args[100];
- struct stat statbuf;
- UDS_NAME[0]=0;
-@@ -833,6 +844,11 @@ int main(int argc, char **argv, char **envp)
- watchdog_exit(1);
- }
-
-+ /* user */
-+ if (confinfo->user) {
-+ user = strdup(confinfo->user);
-+ }
-+
- if (detach) {
- parent_watchdog_create_signal_handlers();
-
-@@ -883,6 +899,22 @@ int main(int argc, char **argv, char **envp)
- watchdog_exit(1);
- }
-
-+ if (user != NULL) {
-+ struct passwd *pw = getpwnam(user);
-+ if (pw == NULL) {
-+ sprintf(errmsgstr, "user %s does not exist", user);
-+ watchdog_error(errmsgstr);
-+ watchdog_exit(1);
-+ }
-+
-+ if (chown(UDS_NAME, pw->pw_uid, pw->pw_gid) != 0) {
-+ sprintf(errmsgstr, "chown failed errno %d %s", errno,
strerror(errno));
-+ watchdog_error(errmsgstr);
-+ watchdog_exit(1);
-+ }
-+ uid = pw->pw_uid;
-+ }
-+
- for (server_starts = 0;; ++server_starts) {
-
- _watchdog_death = 0;
-@@ -895,7 +927,7 @@ int main(int argc, char **argv, char **envp)
-
- watchdog_create_signal_handlers();
-
-- rv = _watchdog_exec(server_starts, server_exe, args, envp, &server_pid);
-+ rv = _watchdog_exec(server_starts, server_exe, args, envp, &server_pid,
uid);
-
- if (server_pid < 0) {
- // exec failed: kill parent if it's still waiting
-diff --git a/src/com/redhat/nuxwdog/wdconf.cpp b/src/com/redhat/nuxwdog/wdconf.cpp
-index 95603c9..2d50575 100644
---- a/src/com/redhat/nuxwdog/wdconf.cpp
-+++ b/src/com/redhat/nuxwdog/wdconf.cpp
-@@ -158,6 +158,9 @@ _watchdog_parse_conffile(char *conffile,
- if (!strcasecmp(name, "ChildSecurity")) {
- info->childSecurity = atoi(value);
- }
-+ if (!strcasecmp(name, "User")) {
-+ info->user = strdup(value);
-+ }
- if (line != NULL) {
- free(line);
- line = NULL;
-@@ -227,5 +230,9 @@ watchdog_confinfo_free(watchdog_conf_info_t *info)
- free(info->childPidFile);
- }
-
-+ if (info->user) {
-+ free(info->user);
-+ }
-+
- free(info);
- }
-diff --git a/src/com/redhat/nuxwdog/wdconf.h b/src/com/redhat/nuxwdog/wdconf.h
-index bb2e7b1..94f02e3 100644
---- a/src/com/redhat/nuxwdog/wdconf.h
-+++ b/src/com/redhat/nuxwdog/wdconf.h
-@@ -36,7 +36,8 @@ typedef struct watchdog_conf_info_t {
- char *exeContext; /* selinux type context */
- char *pidFile; /* pidFile */
- char *childPidFile; /* child pid file */
-- int childSecurity; /* enforce child security */
-+ int childSecurity; /* enforce child security */
-+ char *user; /* user to execute the process as */
- } watchdog_conf_info_t;
-
- watchdog_conf_info_t *watchdog_parse(char *conf_file);
---
-2.14.3
-
diff --git a/nuxwdog.spec b/nuxwdog.spec
index 77b4119..a14b2d9 100644
--- a/nuxwdog.spec
+++ b/nuxwdog.spec
@@ -1,16 +1,13 @@
Name: nuxwdog
-Version: 1.0.3
-Release: 16%{?dist}
+Version: 1.0.4
+Release: 1%{?dist}
Summary: Watchdog server to start and stop processes, and prompt for passwords
# The entire source code is LGPLv2 except for the perl module, which is GPL+ or Artistic
License: LGPLv2 and (GPL+ or Artistic)
Group: System Environment/Libraries
URL:
http://www.redhat.com/certificate_system
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-# For epel5 and fc < 20 compatibility
-%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
-
-BuildRequires: gcc-c++
BuildRequires: ant
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
@@ -19,24 +16,23 @@ BuildRequires: nss-devel
BuildRequires: pkgconfig
BuildRequires: libselinux-devel
BuildRequires: perl-devel
-BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: keyutils-libs-devel
+BuildRequires: gcc-c++
Requires: nss
Requires: keyutils-libs
Obsoletes: nuxwdog-client
+Obsoletes: nuxwdog-client-perl
Source0:
https://fedorahosted.org/released/nuxwdog/%{name}-%{version}.tar.gz
-Patch0: nuxwdog-Allow-unlimited-conf-line-length.patch
-Patch1: nuxwdog-set-uid.patch
# Note: there is an rpmlint warning about Nuxwdogclient.so being a
private-shared-object-provide
# This would ordinarily be fixed by calling the macro perl_default_filter, but
# this disables rpms file coloring and makes the package fail multilib tests.
%if 0%{?rhel}
-ExcludeArch: ppc ppc64 ppcle ppc64le s390 s390x
+ExcludeArch: ppc ppc64 s390 s390x
%endif
%description
@@ -59,7 +55,7 @@ nuxwdog watchdog server.
%package client-java
Group: System Environment/Libraries
Summary: Nuxwdog Watchdog client JNI Package
-Requires: java-headless >= 1:1.6.0
+Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires: %{name} = %{version}-%{release}
@@ -68,22 +64,9 @@ The nuxwdog-client-java package contains a JNI interface to the
nuxwdog
client code, so that Java clients can interact with the nuxwdog watchdog
server.
-%package client-perl
-Group: System Environment/Libraries
-Summary: Nuxwdog Watchdog client perl bindings
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
-Requires: %{name} = %{version}-%{release}
-
-%description client-perl
-The nuxwdog-client-perl package contains a perl interface to nuxwdog.
%prep
%setup -q -n %{name}-%{version}
-%patch0 -p1
-%patch1 -p1
-
-sed -i \
- -e
's,^NUXWDOGCLIENT_DOCUMENTATION=${NUXWDOGCLIENT_BUILD_PREFIX}/.*$,NUXWDOGCLIENT_DOCUMENTATION=${NUXWDOGCLIENT_BUILD_PREFIX}%{_pkgdocdir},'
setup_package
%build
ant \
@@ -92,17 +75,21 @@ ant \
-Dproduct="nuxwdog" \
-Dversion="%{version}"
%configure --disable-static \
-%if 0%{?__isa_bits} == 64
+%ifarch ppc64 s390x sparc64 x86_64
--enable-64bit \
%endif
- --docdir=%{_pkgdocdir}
-make licensedir=%{_pkgdocdir}
+ --libdir=%{_libdir}
+make
%install
-make install DESTDIR=%{buildroot} INSTALL="install -p"
licensedir=%{_pkgdocdir}
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot} INSTALL="install -p"
find %{buildroot} -name '*.la' -exec rm -f {} ';'
+mkdir -p %{buildroot}%{_docdir}
+mv %{buildroot}%{_usr}/doc %{buildroot}%{_docdir}/%{name}-%{version}
+
find %{buildroot}/%{perl_vendorarch} -name .packlist |xargs rm -f {}
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -name "perllocal.pod" |xargs rm -f {}
@@ -115,42 +102,42 @@ mkdir -p %{buildroot}%{_jnidir}
cd %{buildroot}/%{_jnidir}
ln -s %{_libdir}/nuxwdog-jni/nuxwdog-%{version}.jar nuxwdog.jar
rm -rf %{buildroot}%{_usr}/jars
+rm -rf %{buildroot}%{_usr}/doc
+rm -rf %{buildroot}%{_usr}/share/doc/nuxwdog-%{version}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%clean
+rm -rf %{buildroot}
+
%files
-%_pkgdocdir
+%defattr(-,root,root,-)
+%doc LICENSE
%{_bindir}/*
%{_libdir}/libnuxwdog.so.*
+%{_mandir}/man3/Nuxwdogclient.3pm*
%{_mandir}/man1/nuxwdog.1*
+%{perl_vendorarch}/*
+%exclude %dir %{perl_vendorarch}/auto/
%files devel
+%defattr(-,root,root,-)
+%doc
%{_includedir}/nuxwdog/
%{_libdir}/libnuxwdog.so
%files client-java
+%defattr(-,root,root,-)
+%doc
%{_libdir}/nuxwdog-jni/
%{_jnidir}/*
-%files client-perl
-%{perl_vendorarch}/Nuxwdogclient.pm
-%{perl_vendorarch}/auto/Nuxwdogclient
-%{_mandir}/man3/Nuxwdogclient.3pm*
-
%changelog
-* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.3-16
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Wed Jun 27 2018 Jitka Plesnikova <jplesnik(a)redhat.com> - 1.0.3-15
-- Perl 5.28 rebuild
-
-* Thu Feb 08 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.3-14
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Wed Jan 17 2018 Ade Lee <alee(a)redhat.com> 1.0.3-13
+* Mon Jul 23 2018 Dogtag PKI Team (pki-devel(a)redhat.com) 1.0.4-1
- Resolves: 1534030 - add option to set process uid
+- Resolves: 1605267 - add gcc-c++ and perl-devel deps
* Thu Nov 2 2017 Ade Lee <alee(a)redhat.com> 1.0.3-12
- nuxwdog Pagure Issue #2 - nuxwdog is cutting off long ExeArgs resulting
@@ -294,5 +281,4 @@ rm -rf %{buildroot}%{_usr}/jars
* Tue Dec 1 2009 Ade Lee <alee(a)redhat.com> 1.0.0-1
- Initial open source version based upon Red Hat
- Certificate System (RHCS) 6.1 uxwdog code.
-
+ Certificate System (RHCS) 6.1 uxwdog code.
\ No newline at end of file
diff --git a/sources b/sources
index 526a3fc..9c12075 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (nuxwdog-1.0.3.tar.gz) =
20440027b7fcae12217c9925097a4d9e01479342b935c460d4d4be36c2f3f75738a5bf6e49bfe36d6d96389dd6278ebfb0875b625a7ee5c5af24d1ead1956ca5
+SHA512 (nuxwdog-1.0.4.tar.gz) =
55ba9de71bd66953c2d78855f53661d326aacd26be68f7aacf641f5de05386d7d437aa81ed2de5bb9edbcda2ac3e87700e049e7dbc7b6e9602756cf70006509b