Update to new version with only minor changes

This commit is contained in:
Honza Horák 2012-03-26 12:12:00 +02:00
parent 1d2b9862a1
commit a2d5bcacd3
5 changed files with 7 additions and 133 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
ypbind-mt-1.32.tar.bz2
/ypbind-mt-1.33.tar.bz2
/ypbind-mt-1.35.tar.bz2

View File

@ -1 +1 @@
692f68ed0476762be4228ce543a5b791 ypbind-mt-1.33.tar.bz2
b992febc3b31942b848207cb0465f508 ypbind-mt-1.35.tar.bz2

View File

@ -1,50 +0,0 @@
diff -up ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus ypbind-mt-1.32/src/ypbind_dbus_nm.c
--- ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus 2010-07-07 14:27:26.000000000 +0200
+++ ypbind-mt-1.32/src/ypbind_dbus_nm.c 2011-04-29 14:38:23.565951109 +0200
@@ -32,6 +32,9 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
+/* We have our own constant, NM uses directly "StateChanged" string */
+#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged"
+
#ifdef HAVE_NETWORKMANAGER_NETWORKMANAGER_H
#include <NetworkManager/NetworkManager.h>
#include <NetworkManager/NetworkManagerVPN.h>
@@ -39,16 +42,21 @@
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
-#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange"
typedef enum NMState {
- NM_STATE_UNKNOWN = 0,
- NM_STATE_ASLEEP,
- NM_STATE_CONNECTING,
- NM_STATE_CONNECTED,
- NM_STATE_DISCONNECTED
+ NM_STATE_UNKNOWN = 0,
+ NM_STATE_ASLEEP = 10,
+ NM_STATE_DISCONNECTED = 20,
+ NM_STATE_DISCONNECTING = 30,
+ NM_STATE_CONNECTING = 40,
+ NM_STATE_CONNECTED_LOCAL = 50,
+ NM_STATE_CONNECTED_SITE = 60,
+ NM_STATE_CONNECTED_GLOBAL = 70
} NMState;
+/* For backwards compat */
+#define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL
+
#endif
#define DBUS_MESSAGE_MATCH \
@@ -150,7 +158,7 @@ dbus_filter (DBusConnection *connection,
handled = DBUS_HANDLER_RESULT_HANDLED;
}
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE,
- NM_DBUS_VPN_SIGNAL_STATE_CHANGE))
+ NM_DBUS_SIGNAL_STATE_CHANGED))
{
NMState state = NM_STATE_UNKNOWN;

View File

@ -1,76 +0,0 @@
diff -up ypbind-mt-1.33/man/ypbind.8.systemd ypbind-mt-1.33/man/ypbind.8
--- ypbind-mt-1.33/man/ypbind.8.systemd 2011-06-13 12:44:54.420376848 +0200
+++ ypbind-mt-1.33/man/ypbind.8 2011-06-13 12:57:19.777377125 +0200
@@ -171,7 +171,7 @@ ypbind \- NIS binding process
.SH "Synopsis"
.fam C
.HP \w'\fBypbind\fR\ 'u
-\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
+\fBypbind\fR [\-c] [\-d | \-debug] [\-n | \-foreground] [\-verbose] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
.fam
.fam C
.HP \w'\fBypbind\fR\ 'u
@@ -292,6 +292,12 @@ in debug mode\&.
will not put itself into background, and error messages and debug output are written to standard error\&.
.RE
.PP
+\fB\-n, \-foreground\fR
+.RS 4
+\fBypbind\fR
+will not put itself into background\&.
+.RE
+.PP
\fB\-verbose\fR
.RS 4
Causes
@@ -365,6 +371,11 @@ contains the process id of the currently
\fBypbind\fR
master process\&.
.RE
+.PP
+/lib/systemd/system/ypbind\&.service
+.RS 4
+systemd native service file\&.
+.RE
.SH "SEE ALSO"
.PP
diff -up ypbind-mt-1.33/src/ypbind-mt.c.systemd ypbind-mt-1.33/src/ypbind-mt.c
--- ypbind-mt-1.33/src/ypbind-mt.c.systemd 2011-04-29 16:33:11.000000000 +0200
+++ ypbind-mt-1.33/src/ypbind-mt.c 2011-06-13 12:55:10.185377077 +0200
@@ -71,6 +71,7 @@ const char *configfile = "/etc/yp.conf";
int ypset = SET_NO;
int use_broadcast = 0;
int broken_server = 0;
+int foreground_flag = 0;
int ping_interval = 20;
int local_only = 0;
int port = -1;
@@ -506,7 +507,7 @@ usage (int ret)
output = stdout;
fputs (_("Usage:\n"), output);
- fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t [-no-ping] [-broken-server] [-local-only] [-i ping-interval] [-debug] [-verbose]\n"), output);
+ fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t [-no-ping] [-broken-server] [-local-only] [-i ping-interval] [-debug]\n\t [-verbose] [-n | -foreground]\n"), output);
#ifdef USE_DBUS_NM
fputs (_("\t [-no-dbus]\n"), output);
#endif
@@ -691,6 +692,9 @@ main (int argc, char **argv)
else if (strcmp ("-d", argv[i]) == 0 ||
strcmp ("-debug", argv[i]) == 0)
debug_flag = 1;
+ else if (strcmp ("-n", argv[i]) == 0 ||
+ strcmp ("-foreground", argv[i]) == 0)
+ foreground_flag = 1;
else if (strcmp ("-v", argv[i]) == 0 ||
strcmp ("-verbose", argv[i]) == 0)
verbose_flag = 1;
@@ -833,7 +837,7 @@ main (int argc, char **argv)
log_msg (LOG_DEBUG, "[Welcome to ypbind-mt, version %s]\n", VERSION);
log_msg (LOG_DEBUG, "ping interval is %d seconds\n", ping_interval);
}
- else
+ else if (! foreground_flag)
{
int j;

View File

@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Version: 1.33
Release: 11%{?dist}
Version: 1.35
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@ -17,8 +17,6 @@ Patch1: ypbind-1.11-gettextdomain.patch
# Not sent to upstream.
Patch2: ypbind-mt-1.32-typo.patch
Patch3: ypbind-mt-1.32-typo2.patch
Patch4: ypbind-mt-1.32-dbus.patch
Patch5: ypbind-mt-1.33-systemd.patch
# This is for /bin/systemctl
Requires(post): systemd-units
Requires(preun): systemd-units
@ -54,8 +52,6 @@ also need to install the ypserv package to a machine on your network.
%patch1 -p1 -b .gettextdomain
%patch2 -p1 -b .typo
%patch3 -p1 -b .typo2
%patch4 -p1 -b .dbus
%patch5 -p1 -b .systemd
%build
%configure --enable-dbus-nm
@ -117,6 +113,9 @@ fi
%doc README NEWS COPYING
%changelog
* Mon Mar 26 2012 Honza Horak <hhorak@redhat.com> - 3:1.35-1
- Update to new version with only minor changes
* Tue Jan 24 2012 Honza Horak <hhorak@redhat.com> - 3:1.33-11
- Don't fail when killing ypbind after unsuccessfull start fails
- Let ypbind start before systemd-user-sessions.service