Merge pull request #223 from lynxis/rb_asterisk
asterisk: reproducible builds
This commit is contained in:
commit
37603d22fb
6 changed files with 72 additions and 3 deletions
|
@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=asterisk13
|
||||
PKG_VERSION:=13.18.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
|
||||
|
|
28
net/asterisk-13.x/patches/100-build-reproducibly.patch
Normal file
28
net/asterisk-13.x/patches/100-build-reproducibly.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- a/build_tools/make_build_h
|
||||
+++ b/build_tools/make_build_h
|
||||
@@ -5,6 +5,14 @@
|
||||
OS=`uname -s`
|
||||
USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'`
|
||||
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
|
||||
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
|
||||
+ # building reproducibly, faking some data
|
||||
+ HOSTNAME='buildd.debian.org'
|
||||
+ KERNEL='unknown'
|
||||
+ MACHINE='unknown'
|
||||
+ USER='nobody'
|
||||
+ DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}`
|
||||
+fi
|
||||
cat << END
|
||||
/*
|
||||
* build.h
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -465,7 +465,7 @@
|
||||
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
|
||||
@for x in $(MOD_SUBDIRS); do \
|
||||
printf "$$x " ; \
|
||||
- for i in `find $$x -name '*.c'`; do \
|
||||
+ for i in `find $$x -name '*.c' | LC_ALL=C sort`; do \
|
||||
$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
|
||||
done ; \
|
||||
done
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=asterisk15
|
||||
PKG_VERSION:=15.1.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
|
||||
|
|
28
net/asterisk-15.x/patches/100-build-reproducibly.patch
Normal file
28
net/asterisk-15.x/patches/100-build-reproducibly.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- a/build_tools/make_build_h
|
||||
+++ b/build_tools/make_build_h
|
||||
@@ -5,6 +5,14 @@
|
||||
OS=`uname -s`
|
||||
USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'`
|
||||
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
|
||||
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
|
||||
+ # building reproducibly, faking some data
|
||||
+ HOSTNAME='buildd.debian.org'
|
||||
+ KERNEL='unknown'
|
||||
+ MACHINE='unknown'
|
||||
+ USER='nobody'
|
||||
+ DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}`
|
||||
+fi
|
||||
cat << END
|
||||
/*
|
||||
* build.h
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -465,7 +465,7 @@
|
||||
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
|
||||
@for x in $(MOD_SUBDIRS); do \
|
||||
printf "$$x " ; \
|
||||
- for i in `find $$x -name '*.c'`; do \
|
||||
+ for i in `find $$x -name '*.c' | LC_ALL=C sort`; do \
|
||||
$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
|
||||
done ; \
|
||||
done
|
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=chan-sccp
|
||||
PKG_VERSION:=v4.3.0-20171123
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/chan-sccp/chan-sccp.git
|
||||
|
|
13
net/asterisk-chan-sccp/patches/100-reproducible-builds.patch
Normal file
13
net/asterisk-chan-sccp/patches/100-reproducible-builds.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
Index: chan-sccp-v4.3.0-20171123/src/chan_sccp.c
|
||||
===================================================================
|
||||
--- chan-sccp-v4.3.0-20171123.orig/src/chan_sccp.c
|
||||
+++ chan-sccp-v4.3.0-20171123/src/chan_sccp.c
|
||||
@@ -186,7 +186,7 @@ boolean_t sccp_postPBX_load(void)
|
||||
#else
|
||||
snprintf(SCCP_REVISIONSTR, sizeof(SCCP_REVISIONSTR), "%s", SCCP_REVISION);
|
||||
#endif
|
||||
- snprintf(SCCP_VERSIONSTR, sizeof(SCCP_VERSIONSTR), "Skinny Client Control Protocol (SCCP). Release: %s %s - %s (built by '%s' on '%s')\n", SCCP_VERSION, SCCP_BRANCH, SCCP_REVISIONSTR, BUILD_USER, BUILD_DATE);
|
||||
+ snprintf(SCCP_VERSIONSTR, sizeof(SCCP_VERSIONSTR), "Skinny Client Control Protocol (SCCP). Release: %s %s - %s\n", SCCP_VERSION, SCCP_BRANCH, SCCP_REVISIONSTR);
|
||||
|
||||
GLOB(module_running) = TRUE;
|
||||
pbx_rwlock_unlock(&GLOB(lock));
|
Loading…
Reference in a new issue