summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2015-11-17 13:40:44 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2015-11-17 13:41:26 +0900
commitd4b897a5cd5c7755127d29083e52d2e15c94788d (patch)
tree57d75ec7315ff05c70cadbdaa92f0e2df9165ccd
parente3cae2fb0844cd337f959b3dd0b6f27abb58f2ff (diff)
downloaddnsmasq-d4b897a5cd5c7755127d29083e52d2e15c94788d.tar.gz
dnsmasq-d4b897a5cd5c7755127d29083e52d2e15c94788d.tar.bz2
dnsmasq-d4b897a5cd5c7755127d29083e52d2e15c94788d.zip
Change-Id: I41a02810399e793c4a2fcdd0a3acd7f11c5a222e Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rw-r--r--CMakeLists.txt4
-rw-r--r--dbus/dnsmasq.conf12
-rw-r--r--debian/changelog23
-rw-r--r--debian/compat1
-rw-r--r--debian/control20
-rw-r--r--debian/dnsmasq.install.in1
-rwxr-xr-xdebian/rules118
-rw-r--r--debian/source/format1
-rw-r--r--packaging/dnsmasq.spec23
-rw-r--r--src/rfc2131.c6
10 files changed, 19 insertions, 190 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25e9554..aca7e76 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,10 +38,12 @@ pkg_check_modules(pkgs REQUIRED dbus-1)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_C_FLAGS_RELEASE "-O2")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
diff --git a/dbus/dnsmasq.conf b/dbus/dnsmasq.conf
index 222867c..82b1c76 100644
--- a/dbus/dnsmasq.conf
+++ b/dbus/dnsmasq.conf
@@ -7,16 +7,8 @@
<allow send_destination="uk.org.thekelleys.dnsmasq"/>
</policy>
<policy context="default">
- <check send_destination="uk.org.thekelleys.dnsmasq"
- send_interface="uk.org.thekelleys.dnsmasq" send_member="SetServers"
- privilege="http://tizen.org/privilege/network.set"/>
-
- <check send_destination="uk.org.thekelleys.dnsmasq"
- send_interface="uk.org.thekelleys.dnsmasq" send_member="ClearCache"
- privilege="http://tizen.org/privilege/network.set"/>
-
- <allow send_destination="uk.org.thekelleys.dnsmasq"
- send_interface="uk.org.thekelleys.dnsmasq" send_member="GetVersion"/>
+ <deny own="uk.org.thekelleys.dnsmasq"/>
+ <deny send_destination="uk.org.thekelleys.dnsmasq"/>
</policy>
</busconfig>
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 2cbf56b..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,23 +0,0 @@
-dnsmasq (2.57-slp2+3) unstable; urgency=low
-
- * Enable dbus feature
- * Git: 165.213.180.234:/slp/pkgs/d/dnsmasq
- * Tag: dnsmasq_2.57-slp2+3
-
- -- Byeongho Shim <bh.shim@samsung.com> Mon, 07 Nov 2011 21:26:30 +0900
-
-dnsmasq (2.57-slp2+2) unstable; urgency=low
-
- * Change the section on control file
- * Git: 165.213.180.234:/slp/pkgs/d/dnsmasq
- * Tag: dnsmasq_2.57-slp2+2
-
- -- Byeongho Shim <bh.shim@samsung.com> Tue, 30 Aug 2011 09:59:52 +0900
-
-dnsmasq (2.57-slp2+1) unstable; urgency=low
-
- * Initial Release.
- * Git: 165.213.180.234:/slp/pkgs/d/dnsmasq
- * Tag: dnsmasq_2.57-slp2+1
-
- -- Byeongho Shim <bh.shim@samsung.com> Tue, 16 Aug 2011 16:43:13 +0900
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7f8f011..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/debian/control b/debian/control
deleted file mode 100644
index edba10b..0000000
--- a/debian/control
+++ /dev/null
@@ -1,20 +0,0 @@
-Source: dnsmasq
-Section: base
-Priority: extra
-Maintainer: Seungyoun Ju <sy39.ju@samsung.com>, Hocheol Seo <hocheol.seo@samsung.com>
-Build-Depends: debhelper (>= 5), libdbus-1-dev
-Standards-Version: 3.7.2
-
-Package: dnsmasq
-Section: base
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Dnsmasq is a lightweight, easy to configure DNS forwarder
- and DHCP server.
-
-Package: dnsmasq-dbg
-Section: debug
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, dnsmasq (= ${Source-Version})
-Description: Dnsmasq is a lightweight, easy to configure DNS forwarder
- and DHCP server.
diff --git a/debian/dnsmasq.install.in b/debian/dnsmasq.install.in
deleted file mode 100644
index 7346c45..0000000
--- a/debian/dnsmasq.install.in
+++ /dev/null
@@ -1 +0,0 @@
-@PREFIX@/bin/*
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index be777c3..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-CXXFLAGS ?= -Wall -g
-LDFLAGS ?=
-PREFIX ?= /usr
-DATADIR ?= /opt
-
-CFLAGS += -fPIE
-CXXFLAGS += -fPIE
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
- CXXFLAGS += -O0
-else
- CFLAGS += -O2
- CXXFLAGS += -O2
-endif
-
-LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed -pie
-
-CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
- CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
-
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- cd $(CMAKE_BUILD_DIR) && $(MAKE)
-
- #docbook-to-man debian/wavplayer.sgml > wavplayer.1
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- done
-
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- rm -rf $(CMAKE_BUILD_DIR)
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/wavplayer.
- cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
-# dh_installchangelogs
-# dh_installdocs
-# dh_installexamples
- dh_install --sourcedir=debian/tmp
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
-# dh_installman
- dh_link
- dh_strip --dbg-package=dnsmasq-dbg
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 89ae9db..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/packaging/dnsmasq.spec b/packaging/dnsmasq.spec
index 1c00c19..f99cae8 100644
--- a/packaging/dnsmasq.spec
+++ b/packaging/dnsmasq.spec
@@ -1,13 +1,13 @@
-Name: dnsmasq
-Summary: A lightweight DNS forwarder and DHCP server
-Version: 2.57.1
-Release: 0
-Group: Network & Connectivity/Data Network
-License: GPL-2.0
-Source0: %{name}-%{version}.tar.gz
-Source1001: dnsmasq.manifest
-BuildRequires: cmake
-BuildRequires: pkgconfig(dbus-1)
+Name: dnsmasq
+Summary: dnsmasq, DNS forwarder.
+Version: 2.57.1
+Release: 7
+Group: System/Network
+License: GPL-2.0+ or GPL-3.0+
+Source0: %{name}-%{version}.tar.gz
+Source1001: packaging/dnsmasq.manifest
+BuildRequires: cmake
+BuildRequires: pkgconfig(dbus-1)
%description
Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server.
@@ -33,8 +33,11 @@ mkdir -p /opt/var/lib/misc
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp dbus/dnsmasq.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
+mkdir -p %{buildroot}/usr/share/license
+cp COPYING %{buildroot}/usr/share/license/dnsmasq
%files
%manifest %{name}.manifest
%{_bindir}/dnsmasq
+/usr/share/license/dnsmasq
%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 9218765..3dbfd79 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -97,8 +97,6 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
unsigned char pxe_uuid[17];
unsigned char *oui = NULL, *serial = NULL, *class = NULL;
- static time_t old_time = 0;
-
subnet_addr.s_addr = override.s_addr = 0;
/* set tag with name == interface */
@@ -1267,9 +1265,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
override = lease->override;
log_packet("DHCPACK", &mess->yiaddr, emac, emac_len, iface_name, hostname, mess->xid);
- if (difftime(now, old_time) > 7)
- emit_dbus_signal(ACTION_CONNECT, lease, hostname);
- old_time = now;
+ emit_dbus_signal(ACTION_CONNECT, lease, hostname);
clear_packet(mess, end);
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);