[arch-commits] Commit in fscrypt/trunk (PKGBUILD reprobuild.patch)

2020-03-24 Thread Anatol Pomozov via arch-commits
Date: Tuesday, March 24, 2020 @ 23:59:27
  Author: anatolik
Revision: 603949

upgpkg: fscrypt 0.2.7-1

Modified:
  fscrypt/trunk/PKGBUILD
Deleted:
  fscrypt/trunk/reprobuild.patch

--+
 PKGBUILD |   17 +
 reprobuild.patch |   14 --
 2 files changed, 5 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-03-24 23:59:27 UTC (rev 603948)
+++ PKGBUILD2020-03-24 23:59:27 UTC (rev 603949)
@@ -2,8 +2,8 @@
 # Maintainer: Eric Biggers 
 
 pkgname=fscrypt
-pkgver=0.2.6
-pkgrel=3
+pkgver=0.2.7
+pkgrel=1
 pkgdesc='A tool for managing Linux filesystem encryption'
 arch=('x86_64')
 url='https://github.com/google/fscrypt'
@@ -11,17 +11,10 @@
 makedepends=('go-pie')
 depends=('pam')
 
source=("fscrypt-$pkgver.zip::https://github.com/google/fscrypt/archive/v$pkgver.zip;
-"pam_config"
-"reprobuild.patch")
-sha256sums=('8717a8edec2367ccb6c2d934880603f7f454f9f68030370885015c6d309125fa'
-'ae6ceaefc6d936c95a9b7a3f925111ffb946e6fd0152373247f1d40132f05aef'
-'cad9f7964dbb0caaa07250c60805096e2be58a739aa0af1edd8d55582582055a')
+"pam_config")
+sha256sums=('06bed0916f2374251aa3eb7337a639b4264a8a73fb490df3a6866694b8547c30'
+'ae6ceaefc6d936c95a9b7a3f925111ffb946e6fd0152373247f1d40132f05aef')
 
-prepare() {
-  cd "fscrypt-$pkgver"
-  patch -p1 < ../reprobuild.patch
-}
-
 build() {
   cd "fscrypt-$pkgver"
   BUILDDATE="`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"`" make

Deleted: reprobuild.patch
===
--- reprobuild.patch2020-03-24 23:59:27 UTC (rev 603948)
+++ reprobuild.patch2020-03-24 23:59:27 UTC (rev 603949)
@@ -1,14 +0,0 @@
-diff --git a/Makefile b/Makefile
-index f7add11..840a160 100644
 a/Makefile
-+++ b/Makefile
-@@ -67,7 +67,8 @@ GO_LINK_FLAGS := -s -w
- TAG_VERSION := $(shell git describe --tags)
- VERSION_FLAG := -X "main.version=$(if 
$(TAG_VERSION),$(TAG_VERSION),$(VERSION))"
- # Flag to embed the date and time of the build into the binary.
--DATE_FLAG := -X "main.buildTime=$(shell date)"
-+BUILDDATE ?= $(shell date)
-+DATE_FLAG := -X "main.buildTime='"$(BUILDDATE)"'"
- 
- override GO_LINK_FLAGS += $(VERSION_FLAG) $(DATE_FLAG) -extldflags 
"$(LDFLAGS)"
- override GO_FLAGS += --ldflags '$(GO_LINK_FLAGS)'


[arch-commits] Commit in fscrypt/trunk (PKGBUILD reprobuild.patch)

2020-02-06 Thread Anatol Pomozov via arch-commits
Date: Thursday, February 6, 2020 @ 17:49:14
  Author: anatolik
Revision: 563647

Use $SOURCE_DATE_EPOCH (if present) as a build date to make the package 
reproducible

Added:
  fscrypt/trunk/reprobuild.patch
Modified:
  fscrypt/trunk/PKGBUILD

--+
 PKGBUILD |   11 ++-
 reprobuild.patch |   14 ++
 2 files changed, 20 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-02-06 17:46:06 UTC (rev 563646)
+++ PKGBUILD2020-02-06 17:49:14 UTC (rev 563647)
@@ -11,19 +11,20 @@
 makedepends=('go')
 depends=('pam')
 
source=("fscrypt-$pkgver.zip::https://github.com/google/fscrypt/archive/v$pkgver.zip;
-"pam_config")
+"pam_config"
+"reprobuild.patch")
 sha256sums=('7ec0dfe6d28079829dfd52bde20821d96957b3399fa47b3b2f4b7ae39b977dc7'
-'ae6ceaefc6d936c95a9b7a3f925111ffb946e6fd0152373247f1d40132f05aef')
+'ae6ceaefc6d936c95a9b7a3f925111ffb946e6fd0152373247f1d40132f05aef'
+'cad9f7964dbb0caaa07250c60805096e2be58a739aa0af1edd8d55582582055a')
 
 prepare() {
   cd "fscrypt-$pkgver"
-  # TODO: replace it with $SOURCE_DATE_EPOCH?
-  sed "s/\$(shell date)//g" -i Makefile
+  patch -p1 < ../reprobuild.patch
 }
 
 build() {
   cd "fscrypt-$pkgver"
-  make
+  BUILDDATE="`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"`" make
 }
 
 package() {

Added: reprobuild.patch
===
--- reprobuild.patch(rev 0)
+++ reprobuild.patch2020-02-06 17:49:14 UTC (rev 563647)
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index f7add11..840a160 100644
+--- a/Makefile
 b/Makefile
+@@ -67,7 +67,8 @@ GO_LINK_FLAGS := -s -w
+ TAG_VERSION := $(shell git describe --tags)
+ VERSION_FLAG := -X "main.version=$(if 
$(TAG_VERSION),$(TAG_VERSION),$(VERSION))"
+ # Flag to embed the date and time of the build into the binary.
+-DATE_FLAG := -X "main.buildTime=$(shell date)"
++BUILDDATE ?= $(shell date)
++DATE_FLAG := -X "main.buildTime='"$(BUILDDATE)"'"
+ 
+ override GO_LINK_FLAGS += $(VERSION_FLAG) $(DATE_FLAG) -extldflags 
"$(LDFLAGS)"
+ override GO_FLAGS += --ldflags '$(GO_LINK_FLAGS)'