2.1.1-1 Cleanup the spec and update to current release

This commit is contained in:
Fabio Alessandro Locati 2016-03-02 21:35:20 +00:00
commit f79b5855ee
5 changed files with 12 additions and 75 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@
/zmap-1.2.0.tar.gz
/zmap-1.2.1.tar.gz
/zmap-2.1.0.tar.gz
/zmap-2.1.1.tar.gz

View file

@ -1,44 +0,0 @@
From 7940d5311eb0f869bac2e7a9561ba22f69a05424 Mon Sep 17 00:00:00 2001
From: Christopher Meng <i@cicku.me>
Date: Sat, 5 Sep 2015 17:14:58 +0800
Subject: [PATCH] Fix broken conf installation
install(SCRIPT) doesn't read variable from project cmakefile, instead of hacking more on this single file with less than 10 lines, why not merge back to one file?
---
CMakeLists.txt | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2afb37..6a06cbf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,14 +124,24 @@ add_subdirectory(src)
# Install conf files
-FILE(GLOB CONF_FILES "${PROJECT_SOURCE_DIR}/conf/*")
if (RESPECT_INSTALL_PREFIX_CONFIG)
set(CONFIG_DESTINATION "etc/zmap")
else()
set(CONFIG_DESTINATION "/etc/zmap")
endif()
-install(SCRIPT InstallConfFiles.cmake)
+FILE(GLOB CONF_FILES "${PROJECT_SOURCE_DIR}/conf/*")
+
+foreach(EACH_CONF ${CONF_FILES})
+ get_filename_component(CONF_BASENAME ${EACH_CONF} NAME)
+ message(STATUS "Default ZMap configuration file location is /etc/zmap")
+ message(STATUS "Checking if ${CONF_BASENAME} exists there...")
+ if(NOT EXISTS "/etc/zmap/${CONF_BASENAME}")
+ install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION})
+ else()
+ message(WARNING "Existing configuration file detected at /etc/zmap/${CONF_BASENAME}, it will NOT be installed. Please check and install manually!")
+ endif()
+endforeach()
# Allow Debian Packaging
INCLUDE (InstallRequiredSystemLibraries)
--
2.5.1

View file

@ -1,24 +0,0 @@
From d1d911ca481a7d687df847e1ed826f73665614ba Mon Sep 17 00:00:00 2001
From: Christopher Meng <i@cicku.me>
Date: Mon, 27 Jan 2014 17:44:31 +0800
Subject: [PATCH 3/3] Respect DESTDIR during install.
---
zmap_conf_install.cmake.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zmap_conf_install.cmake.in b/zmap_conf_install.cmake.in
index c1b2f61..ec0745e 100644
--- a/zmap_conf_install.cmake.in
+++ b/zmap_conf_install.cmake.in
@@ -1,6 +1,6 @@
message(STATUS "Creating /etc/zmap")
if (NOT EXISTS "/etc/zmap/")
- file(MAKE_DIRECTORY "/etc/zmap")
+ file(INSTALL DESTINATION "/etc/zmap")
else()
message(STATUS "/etc/zmap exists, skipping...")
endif()
--
1.8.5.3

View file

@ -1 +1 @@
0e6b9b0628eb1d3360fbd9ea56e36693 zmap-2.1.0.tar.gz
a37555ac2beda1dc6f3754b411be545e zmap-2.1.1.tar.gz

View file

@ -4,13 +4,13 @@
%bcond_without debug
Name: zmap
Version: 2.1.0
Release: 3%{?dist}
Version: 2.1.1
Release: 1%{?dist}
Summary: Network scanner for Internet-wide network studies
License: ASL 2.0
URL: https://zmap.io
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-broken-conf-installation.patch
#Patch0: 0001-Fix-broken-conf-installation.patch
BuildRequires: byacc
BuildRequires: cmake
BuildRequires: flex
@ -45,8 +45,8 @@ scanning.
%prep
%setup -q
%patch0 -p1
# Custom flags from upstream should be put in the front as preferred.
#%patch0 -p1
# https://github.com/zmap/zmap/pull/332
sed -i 's|${CMAKE_C_FLAGS} ${GCCWARNINGS}|${GCCWARNINGS} ${CMAKE_C_FLAGS}|g;s|${CMAKE_EXE_LINKER_FLAGS} ${LDHARDENING}|${LDHARDENING} ${CMAKE_EXE_LINKER_FLAGS}|g' CMakeLists.txt
%build
@ -68,7 +68,7 @@ find ./examples/ -type f -exec sed -i 's/\r$//' {} \+
%make_install
%files
%doc AUTHORS CHANGELOG README* examples/
%doc AUTHORS CHANGELOG.md README.md examples/
%license LICENSE
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
@ -80,6 +80,10 @@ find ./examples/ -type f -exec sed -i 's/\r$//' {} \+
%{_mandir}/man1/ztee.1*
%changelog
* Thu Mar 02 2016 Fabio Alessandro Locati <fabio@locati.cc> - 2.1.1-1
- Update to 2.1.1
- Clean the spec a little bit
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild