From a16e2d69dbf36bb3601002568e4c4ad5e73e1d31 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 3 Oct 2020 18:54:29 +0200 Subject: [PATCH 1/2] libsrtp: remove Nothing in this repo nor in packages depends on libsrtp anymore. This removes it from the tree. Signed-off-by: Sebastian Kemper --- libs/libsrtp/Makefile | 71 -------------- .../1003_fix_mips_namespace_collision.patch | 54 ----------- .../patches/1005_fix_data_alignment.patch | 27 ------ .../patches/1007_update_Doxyfile.patch | 94 ------------------- libs/libsrtp/patches/1008_shared-lib.patch | 11 --- 5 files changed, 257 deletions(-) delete mode 100644 libs/libsrtp/Makefile delete mode 100644 libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch delete mode 100644 libs/libsrtp/patches/1005_fix_data_alignment.patch delete mode 100644 libs/libsrtp/patches/1007_update_Doxyfile.patch delete mode 100644 libs/libsrtp/patches/1008_shared-lib.patch diff --git a/libs/libsrtp/Makefile b/libs/libsrtp/Makefile deleted file mode 100644 index c0899ed..0000000 --- a/libs/libsrtp/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2006-2018 OpenWrt.org -# Copyright (C) 2011 Victor Seva -# Copyright (C) 2017 - 2018 Jiri Slachta -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=libsrtp -PKG_VERSION:=1.6.0 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/cisco/libsrtp.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=2b091a4fb21c9b06fc5d4b5763bdaec97542fcd7 -PKG_MIRROR_HASH:=7ac6c3113fd7a966c9a9108c185d9425e75a8fdc600e4ccef158e68ee1988c89 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jiri Slachta - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_ARGS += \ - --disable-stdout \ - --enable-syslog - -define Package/libsrtp - SUBMENU:=Telephony - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Secure Real-time Transport Protocol (SRTP) library - DEPENDS:=+libpcap - URL:=http://sourceforge.net/projects/srtp -endef - -define Package/libsrtp/description - Open-source implementation of the Secure Real-time Transport - Protocol (SRTP) originally authored by Cisco Systems, Inc. - It is available under a BSD-style license. -endef - -define Build/Install - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) uninstall - $(call Build/Install/Default) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/srtp $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsrtp.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsrtp.pc $(1)/usr/lib/pkgconfig/ -endef - - -define Package/libsrtp/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libsrtp.so* \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libsrtp)) diff --git a/libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch b/libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch deleted file mode 100644 index b4e2d57..0000000 --- a/libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- a/test/srtp_driver.c -+++ b/test/srtp_driver.c -@@ -341,7 +341,7 @@ main (int argc, char *argv[]) { - if (do_codec_timing) { - srtp_policy_t policy; - int ignore; -- double mips = mips_estimate(1000000000, &ignore); -+ double mips_est = mips_estimate(1000000000, &ignore); - - crypto_policy_set_rtp_default(&policy.rtp); - crypto_policy_set_rtcp_default(&policy.rtcp); -@@ -353,33 +353,33 @@ main (int argc, char *argv[]) { - policy.allow_repeat_tx = 0; - policy.next = NULL; - -- printf("mips estimate: %e\n", mips); -+ printf("mips estimate: %e\n", mips_est); - - printf("testing srtp processing time for voice codecs:\n"); - printf("codec\t\tlength (octets)\t\tsrtp instructions/second\n"); - printf("G.711\t\t%d\t\t\t%e\n", 80, -- (double) mips * (80 * 8) / -+ (double) mips_est * (80 * 8) / - srtp_bits_per_second(80, &policy) / .01 ); - printf("G.711\t\t%d\t\t\t%e\n", 160, -- (double) mips * (160 * 8) / -+ (double) mips_est * (160 * 8) / - srtp_bits_per_second(160, &policy) / .02); - printf("G.726-32\t%d\t\t\t%e\n", 40, -- (double) mips * (40 * 8) / -+ (double) mips_est * (40 * 8) / - srtp_bits_per_second(40, &policy) / .01 ); - printf("G.726-32\t%d\t\t\t%e\n", 80, -- (double) mips * (80 * 8) / -+ (double) mips_est * (80 * 8) / - srtp_bits_per_second(80, &policy) / .02); - printf("G.729\t\t%d\t\t\t%e\n", 10, -- (double) mips * (10 * 8) / -+ (double) mips_est * (10 * 8) / - srtp_bits_per_second(10, &policy) / .01 ); - printf("G.729\t\t%d\t\t\t%e\n", 20, -- (double) mips * (20 * 8) / -+ (double) mips_est * (20 * 8) / - srtp_bits_per_second(20, &policy) / .02 ); - printf("Wideband\t%d\t\t\t%e\n", 320, -- (double) mips * (320 * 8) / -+ (double) mips_est * (320 * 8) / - srtp_bits_per_second(320, &policy) / .01 ); - printf("Wideband\t%d\t\t\t%e\n", 640, -- (double) mips * (640 * 8) / -+ (double) mips_est * (640 * 8) / - srtp_bits_per_second(640, &policy) / .02 ); - } - diff --git a/libs/libsrtp/patches/1005_fix_data_alignment.patch b/libs/libsrtp/patches/1005_fix_data_alignment.patch deleted file mode 100644 index 5f2a2e0..0000000 --- a/libs/libsrtp/patches/1005_fix_data_alignment.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/test/srtp_driver.c -+++ b/test/srtp_driver.c -@@ -1198,7 +1198,6 @@ mips_estimate(int num_trials, int *ignor - * These packets were made with the default SRTP policy. - */ - -- - err_status_t - srtp_validate() { - uint8_t srtp_plaintext_ref[28] = { -@@ -1207,14 +1206,14 @@ srtp_validate() { - 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, - 0xab, 0xab, 0xab, 0xab - }; -- uint8_t srtp_plaintext[38] = { -+ uint8_t srtp_plaintext[38] __attribute__((aligned(4))) = { - 0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad, - 0xca, 0xfe, 0xba, 0xbe, 0xab, 0xab, 0xab, 0xab, - 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, - 0xab, 0xab, 0xab, 0xab, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; -- uint8_t srtp_ciphertext[38] = { -+ uint8_t srtp_ciphertext[38] __attribute__((aligned(4))) = { - 0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad, - 0xca, 0xfe, 0xba, 0xbe, 0x4e, 0x55, 0xdc, 0x4c, - 0xe7, 0x99, 0x78, 0xd8, 0x8c, 0xa4, 0xd2, 0x15, diff --git a/libs/libsrtp/patches/1007_update_Doxyfile.patch b/libs/libsrtp/patches/1007_update_Doxyfile.patch deleted file mode 100644 index 8108d7d..0000000 --- a/libs/libsrtp/patches/1007_update_Doxyfile.patch +++ /dev/null @@ -1,94 +0,0 @@ -Description: Update Doxyfile and header template -Author: Jonas Smedegaard -Last-Update: 2010-02-28 ---- a/doc/Makefile.in -+++ b/doc/Makefile.in -@@ -25,6 +25,7 @@ libsrtpdoc: - echo "*** Sorry, can't build doc outside source dir"; exit 1; \ - fi - sed 's/LIBSRTPVERSION/$(version)/' header.template > header.tex -+ doxygen -u - doxygen - sed 's/\subsection/\section/' latex/index.tex > latex/index.tmp - mv latex/index.tmp latex/index.tex -@@ -38,7 +39,7 @@ cryptodoc: clean - cp latex/refman.pdf crypto.pdf - - clean: -- rm -rf latex/ header.tex -+ rm -rf latex/ header.tex Doxyfile.bak - for a in * ; do \ - if [ -f "$$a~" ] ; then rm -f $$a~; fi; \ - done; ---- a/doc/header.template -+++ b/doc/header.template -@@ -6,28 +6,40 @@ - % - \documentclass[letterpaper]{book} - \usepackage{makeidx} --\usepackage{fancyhdr} - \usepackage{graphicx} - \usepackage{multicol} - \usepackage{float} -+\usepackage{listings} -+\usepackage{color} -+\usepackage{ifthen} -+\usepackage[table]{xcolor} - \usepackage{textcomp} - \usepackage{alltt} --\usepackage{times} --\usepackage{graphicx} --\ifx\pdfoutput\undefined --\usepackage[ps2pdf, -+\usepackage{ifpdf} -+\ifpdf -+\usepackage[pdftex, - pagebackref=true, - colorlinks=true, -- linkcolor=blue -+ linkcolor=blue, -+ unicode - ]{hyperref} - \else --\usepackage[pdftex, -+\usepackage[ps2pdf, - pagebackref=true, - colorlinks=true, -- linkcolor=blue -+ linkcolor=blue, -+ unicode - ]{hyperref} -+\usepackage{pspicture} - \fi -+\usepackage[utf8]{inputenc} -+\usepackage{mathptmx} -+\usepackage[scaled=.90]{helvet} -+\usepackage{courier} -+\usepackage{sectsty} -+\usepackage[titles]{tocloft} - \usepackage{doxygen} -+\lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=3,numbers=left } - \makeindex - \setcounter{tocdepth}{1} - \renewcommand{\footrulewidth}{0.4pt} -@@ -59,7 +71,9 @@ - \selectfont - - -+\renewcommand{\familydefault}{\sfdefault} - \begin{document} -+\hypersetup{pageanchor=false} - \begin{titlepage} - \vspace*{4cm} - %\begin{center} -@@ -107,9 +121,6 @@ This reference material in this documena - \clearemptydoublepage - \pagenumbering{roman} - \tableofcontents --%\clearemptydoublepage -- - \clearemptydoublepage - \pagenumbering{arabic} -- -- -+\hypersetup{pageanchor=true} diff --git a/libs/libsrtp/patches/1008_shared-lib.patch b/libs/libsrtp/patches/1008_shared-lib.patch deleted file mode 100644 index e29305c..0000000 --- a/libs/libsrtp/patches/1008_shared-lib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -20,7 +20,7 @@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ - - .PHONY: all shared_library test build_table_apps - --all: test -+all: shared_library test - - runtest: build_table_apps test - @echo "running libsrtp test applications..." From a85ce8450a3167c12918d5ebfb626ad3efeb5aea Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 3 Oct 2020 18:58:03 +0200 Subject: [PATCH 2/2] libsrtp2: move folder, bump to 2.3.0 Bump to upstream release 2.3.0. Move folder and change PKG_NAME so that we don't have to deal with how github names the tar.gz archive. Also, don't install the libsrtp2.so symlink anymore on target, as it is not required and only used in staging. Signed-off-by: Sebastian Kemper --- libs/{libsrtp2 => libsrtp}/Makefile | 19 +++++++------------ .../patches/010-gcc10.patch | 0 2 files changed, 7 insertions(+), 12 deletions(-) rename libs/{libsrtp2 => libsrtp}/Makefile (73%) rename libs/{libsrtp2 => libsrtp}/patches/010-gcc10.patch (100%) diff --git a/libs/libsrtp2/Makefile b/libs/libsrtp/Makefile similarity index 73% rename from libs/libsrtp2/Makefile rename to libs/libsrtp/Makefile index 345fc29..8c0cb4c 100644 --- a/libs/libsrtp2/Makefile +++ b/libs/libsrtp/Makefile @@ -7,18 +7,13 @@ # include $(TOPDIR)/rules.mk -PKG_NAME:=libsrtp2 -PKG_VERSION:=2.2.0 -PKG_RELEASE:=2 +PKG_NAME:=libsrtp +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/cisco/libsrtp.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=94ac00d5ac6409e3f6409e4a5edfcdbdaa7fdabe -PKG_MIRROR_HASH:=0429edcddfe9d36ee47eb221384c528bbe31ee9255e216f9755641c7b6083457 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=libsrtp-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/cisco/libsrtp/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=94093a5d04c5f4743e8d81182b76938374df6d393b45322f24960d250b0110e8 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE @@ -57,7 +52,7 @@ endef define Package/libsrtp2/install $(INSTALL_DIR) $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.so.* \ $(1)/usr/lib/ endef diff --git a/libs/libsrtp2/patches/010-gcc10.patch b/libs/libsrtp/patches/010-gcc10.patch similarity index 100% rename from libs/libsrtp2/patches/010-gcc10.patch rename to libs/libsrtp/patches/010-gcc10.patch