Skip to content

Commit

Permalink
v4l-dvb: change name and ensure reproducibility of created tarball
Browse files Browse the repository at this point in the history
Currently hash of it changes on each rebuild and name doesn't reflect
commit date.

Signed-off-by: Tomasz Maciej Nowak <[email protected]>
  • Loading branch information
tmn505 committed May 8, 2023
1 parent 45f850f commit 03d6239
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions v4l-dvb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ KernelPackage/depends := :
define Build/Prepare
$(call Build/Prepare/Default)

$(SED) '/^DATE .*/a TAR_TS := `git -C $$$$(DIR) log --format="@%ct" -n 1`' \
-e 's,$$$$(TARDIR),$$$$(sort $$$$(TARDIR)),g' \
-e 's,$$$$(TARFILES),$$$$(sort $$$$(TARFILES)),g' \
-e 's,)`", | LC_ALL=C sort)`",g' \
-e 's,tar cf ,tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name --mtime="$$$$(TAR_TS)" -c -f ,g' \
-e 's,tar rvf ,tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name --mtime="$$$$(TAR_TS)" -r -v -f ,g' \
$(PKG_BUILD_DIR)/linux/Makefile

(if [ -s $(DL_DIR)/$(V4L_SOURCE_FILE) ]; \
then $(CP) $(DL_DIR)/$(V4L_SOURCE_FILE) $(PKG_BUILD_DIR)/linux/linux-media.tar.bz2; \
else if [ -d $(DL_DIR)/$(V4L_REPO_NAME) ]; \
Expand Down
3 changes: 2 additions & 1 deletion v4l-dvb/origin/linuxtv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ PKG_SOURCE_DATE := 2022-05-24

V4L_SOURCE_URL := git://linuxtv.org/media_tree.git
V4L_SOURCE_VERSION := 4b0986a3613c92f4ec1bdc7f60ec66fea135991f
V4L_SOURCE_DATE := 2022-05-22
V4L_REPO_NAME := linux-media-linuxtv
V4L_SOURCE_FILE := $(V4L_REPO_NAME)-$(PKG_SOURCE_DATE)-$(shell printf '%.8s' $(V4L_SOURCE_VERSION)).tar.bz2
V4L_SOURCE_FILE := $(V4L_REPO_NAME)-$(V4L_SOURCE_DATE)-$(shell printf '%.8s' $(V4L_SOURCE_VERSION)).tar.bz2

PATCH_DIR := patches-linuxtv
3 changes: 2 additions & 1 deletion v4l-dvb/origin/tbsdtv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ PKG_MIRROR_HASH := 0bb38b20fccc4a6f68ea0a5390d84d98f391beb38de1145d57810c5b8a03f

V4L_SOURCE_URL := https://github.com/tbsdtv/linux_media.git
V4L_SOURCE_VERSION := 16c763979217cd58c35ffd5ad776d73f1e5a950e
V4L_SOURCE_DATE := 2023-01-15
V4L_REPO_NAME := linux-media-tbsdtv
V4L_SOURCE_FILE := $(V4L_REPO_NAME)-$(PKG_SOURCE_DATE)-$(shell printf '%.8s' $(V4L_SOURCE_VERSION)).tar.bz2
V4L_SOURCE_FILE := $(V4L_REPO_NAME)-$(V4L_SOURCE_DATE)-$(shell printf '%.8s' $(V4L_SOURCE_VERSION)).tar.bz2

PATCH_DIR := patches-tbsdtv

0 comments on commit 03d6239

Please sign in to comment.