upg dosfstools libnghttp3 lvm2

This commit is contained in:
joborun linux 2024-08-24 23:40:08 +03:00
parent 92ba11bd39
commit bd56826af7
7 changed files with 191 additions and 27 deletions

View file

@ -7,13 +7,18 @@
pkgname=dosfstools
pkgver=4.2
pkgrel=04
pkgrel=05
pkgdesc="DOS filesystem utilities"
depends=('glibc')
source=(https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz{,.sig}
)
$pkgname-reproducible-mkfs.patch::https://github.com/dosfstools/dosfstools/commit/8da7bc93315cb0c32ad868f17808468b81fa76ec.patch)
url="https://github.com/dosfstools/dosfstools"
prepare() {
cd $pkgname-$pkgver
patch -Np1 -i ${srcdir}/$pkgname-reproducible-mkfs.patch
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --libexecdir=/usr/lib \
@ -35,8 +40,9 @@ license=('GPL-3.0-or-later')
validpgpkeys=('25714AECDBFDACEE1CE95FE77F6022516E869F64') # Andreas Bombe
sha256sums=(64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527 # dosfstools-4.2.tar.gz
90f58a303fd7c55e02370357054f7207f05c3736f23d9a82cfb4a10acd7d55f9) # dosfstools-4.2.tar.gz.sig
sha256sums=(64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527 # dosfstools-4.2.tar.gz
90f58a303fd7c55e02370357054f7207f05c3736f23d9a82cfb4a10acd7d55f9 # dosfstools-4.2.tar.gz.sig
b9953dde3d755a6e9a31a28e2a7aebccd0b5ed9bcc664893bd55290945589b5b) # dosfstools-reproducible-mkfs.patch
## c72f5f3b00d31bc40e9d4e6d3a93a666d9d267ff8950c35aab64243419ab8ce7 dosfstools-4.2-04-x86_64.pkg.tar.lz
## ba7ce08681a2c74916a88682fa6fe6f82e1b8551a892982af05f5d55ec1117cc dosfstools-4.2-05-x86_64.pkg.tar.lz

View file

@ -3,19 +3,26 @@
pkgname=dosfstools
pkgver=4.2
pkgrel=4
pkgrel=5
pkgdesc="DOS filesystem utilities"
arch=(x86_64)
depends=('glibc')
source=(https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz{,.sig}
$pkgname-reproducible-mkfs.patch::https://github.com/dosfstools/dosfstools/commit/8da7bc93315cb0c32ad868f17808468b81fa76ec.patch
)
url="https://github.com/dosfstools/dosfstools"
license=('GPL-3.0-or-later')
validpgpkeys=('25714AECDBFDACEE1CE95FE77F6022516E869F64') # Andreas Bombe
sha256sums=('64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527'
'SKIP')
'SKIP'
'b9953dde3d755a6e9a31a28e2a7aebccd0b5ed9bcc664893bd55290945589b5b')
prepare() {
cd $pkgname-$pkgver
patch -Np1 -i ${srcdir}/$pkgname-reproducible-mkfs.patch
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --libexecdir=/usr/lib \

View file

@ -0,0 +1,157 @@
From 8da7bc93315cb0c32ad868f17808468b81fa76ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
Date: Wed, 5 Dec 2018 19:52:51 +0100
Subject: [PATCH] Honor the SOURCE_DATE_EPOCH variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Implement the SOURCE_DATE_EPOCH specification[1] for reproducible
builds. If SOURCE_DATE_EPOCH is set, use it as timestamp instead of the
current time.
[1] https://reproducible-builds.org/specs/source-date-epoch/
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
---
src/boot.c | 23 +++++++++++++++++++++--
src/common.c | 18 ++++++++++++++++--
src/mkfs.fat.c | 19 ++++++++++++++++---
3 files changed, 53 insertions(+), 7 deletions(-)
diff --git a/src/boot.c b/src/boot.c
index 4de450d..8f78e1c 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -33,6 +33,8 @@
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
+#include <errno.h>
+#include <ctype.h>
#include "common.h"
#include "fsck.fat.h"
@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, char *label)
{
time_t now;
struct tm *mtime;
+ char *source_date_epoch = NULL;
off_t offset;
int created;
DIR_ENT de;
@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, char *label)
if (de.name[0] == 0xe5)
de.name[0] = 0x05;
- now = time(NULL);
- mtime = (now != (time_t)-1) ? localtime(&now) : NULL;
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ char *tmp = NULL;
+ long long conversion = 0;
+ errno = 0;
+ conversion = strtoll(source_date_epoch, &tmp, 10);
+ now = conversion;
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
+ || errno != 0 || (long long)now != conversion) {
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
+ source_date_epoch);
+ }
+ mtime = gmtime(&now);
+ } else {
+ now = time(NULL);
+ mtime = (now != (time_t)-1) ? localtime(&now) : NULL;
+ }
+
if (mtime && mtime->tm_year >= 80 && mtime->tm_year <= 207) {
de.time = htole16((unsigned short)((mtime->tm_sec >> 1) +
(mtime->tm_min << 5) +
diff --git a/src/common.c b/src/common.c
index 6a2e396..4f1afcb 100644
--- a/src/common.c
+++ b/src/common.c
@@ -30,6 +30,7 @@
#include <string.h>
#include <stdarg.h>
#include <errno.h>
+#include <ctype.h>
#include <wctype.h>
#include <termios.h>
#include <sys/time.h>
@@ -298,8 +299,21 @@ void check_atari(void)
uint32_t generate_volume_id(void)
{
struct timeval now;
-
- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
+ char *source_date_epoch = NULL;
+
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ char *tmp = NULL;
+ long long conversion = 0;
+ errno = 0;
+ conversion = strtoll(source_date_epoch, &tmp, 10);
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
+ || errno != 0) {
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
+ source_date_epoch);
+ }
+ return (uint32_t)conversion;
+ } else if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
srand(getpid());
/* rand() returns int from [0,RAND_MAX], therefore only 31 bits */
return (((uint32_t)(rand() & 0xFFFF)) << 16) | ((uint32_t)(rand() & 0xFFFF));
diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
index 37fc8ff..1948635 100644
--- a/src/mkfs.fat.c
+++ b/src/mkfs.fat.c
@@ -1074,7 +1074,7 @@ static void setup_tables(void)
}
/* If is not available then generate random 32 bit disk signature */
- if (invariant)
+ if (invariant || getenv("SOURCE_DATE_EPOCH"))
disk_sig = volume_id;
else if (!disk_sig)
disk_sig = generate_volume_id();
@@ -1287,7 +1287,7 @@ static void setup_tables(void)
de->name[0] = 0x05;
de->attr = ATTR_VOLUME;
if (create_time != (time_t)-1) {
- if (!invariant)
+ if (!invariant && !getenv("SOURCE_DATE_EPOCH"))
ctime = localtime(&create_time);
else
ctime = gmtime(&create_time);
@@ -1477,6 +1477,7 @@ int main(int argc, char **argv)
int blocks_specified = 0;
struct timeval create_timeval;
long long conversion;
+ char *source_date_epoch = NULL;
enum {OPT_HELP=1000, OPT_INVARIANT, OPT_MBR, OPT_VARIANT, OPT_CODEPAGE, OPT_OFFSET};
const struct option long_options[] = {
@@ -1497,8 +1498,20 @@ int main(int argc, char **argv)
program_name = p + 1;
}
- if (gettimeofday(&create_timeval, NULL) == 0 && create_timeval.tv_sec != (time_t)-1)
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ errno = 0;
+ conversion = strtoll(source_date_epoch, &tmp, 10);
+ create_time = conversion;
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
+ || errno != 0 || (long long)create_time != conversion) {
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
+ source_date_epoch);
+ }
+ } else if (gettimeofday(&create_timeval, NULL) == 0 && create_timeval.tv_sec != (time_t)-1) {
create_time = create_timeval.tv_sec;
+ }
+
volume_id = generate_volume_id();
check_atari();

View file

@ -6,7 +6,7 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=libnghttp3
pkgver=1.4.0
pkgver=1.5.0
pkgrel=01
pkgdesc="HTTP/3 library written in C"
url='https://github.com/ngtcp2/nghttp3'
@ -45,8 +45,7 @@ license=('MIT')
validpgpkeys=('F4F3B91474D1EB29889BD0EF7E8403D5D673C366') # Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
sha256sums=(c87b27ef33982a3b831dd349f4a75c55bd4c22a8ec0890095b84b54009df9d6a # nghttp3-1.4.0.tar.xz
ae8830fa2629aeca963496a12a66fd736ad7aba77fa2e9f0a6fc3381d8dee4c9) # nghttp3-1.4.0.tar.xz.asc
## 06f70bf32c918e66554079e8ef237d6d690c10191240b68388c64c95564da0df libnghttp3-1.4.0-01-x86_64.pkg.tar.lz
sha256sums=(8c00e3910ea2ad1218dafebcf8dd2ffdf030c992d9ceb65834d29e5e5278dd0d # nghttp3-1.5.0.tar.xz
da5d90e37edd8c19a4f6c6cde764a238851d78dfeeef2eac7c03fe1405159a7a) # nghttp3-1.5.0.tar.xz.asc
## 8a4314d75426ee0655d2d64f8c7cf5b2db2455837ca62bed2dcaa64621beb42e libnghttp3-1.5.0-01-x86_64.pkg.tar.lz

View file

@ -2,7 +2,7 @@
# Maintainer: Christian Hesse <eworm@archlinux.org>
pkgname=libnghttp3
pkgver=1.4.0
pkgver=1.5.0
pkgrel=1
pkgdesc="HTTP/3 library written in C"
url='https://github.com/ngtcp2/nghttp3'
@ -12,7 +12,7 @@ depends=('glibc')
provides=('libnghttp3.so')
validpgpkeys=('F4F3B91474D1EB29889BD0EF7E8403D5D673C366') # Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
source=("https://github.com/ngtcp2/nghttp3/releases/download/v${pkgver}/nghttp3-${pkgver}.tar.xz"{,.asc})
sha256sums=('c87b27ef33982a3b831dd349f4a75c55bd4c22a8ec0890095b84b54009df9d6a'
sha256sums=('8c00e3910ea2ad1218dafebcf8dd2ffdf030c992d9ceb65834d29e5e5278dd0d'
'SKIP')
prepare() {

View file

@ -7,11 +7,8 @@
pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
#_tag='' # git rev-parse v${pkgver//./_}
# latest release does not have a tag... :-\
#_commit='d786a8f820d54ce87a919e6af5426c333c173b11'
pkgver=2.03.25
pkgrel=02
pkgver=2.03.26
pkgrel=01
url='https://sourceware.org/lvm2/'
makedepends=('git' 'libaio' 'thin-provisioning-tools')
#options=('!makeflags')
@ -19,7 +16,6 @@ makedepends=('git' 'libaio' 'thin-provisioning-tools')
#source=("git+https://sourceware.org/git/lvm2.git#commit=${_commit}"
source=("git+https://sourceware.org/git/lvm2.git#tag=v${pkgver//./_}?signed"
'0001-udev-initcpio.patch'
# 'lvm2_install'
'11-dm-initramfs.rules')
#_backports=(
@ -136,11 +132,10 @@ license=('GPL2' 'LGPL2.1')
validpgpkeys=('88437EF5C077BD113D3B7224228191C1567E2C17' # Alasdair G Kergon <agk@redhat.com>
'D501A478440AE2FD130A1BE8B9112431E509039F') # Marian Csontos <marian.csontos@gmail.com>
sha256sums=(0870ee6d5929274c18be6bfde1e6c24a499ed6a9659114a15c6062dfec924ae8 # lvm2
sha256sums=(42e1422566e1b028f0e57955bc4050a3c47f3c6b59fb1e13d27b06acd09815bf # lvm2
2b3a16ec05e2bc6678e9ebd5ffa8319ebfde29aa260ce004f79f9b8df57d73c9 # 0001-udev-initcpio.patch
# def6e03aa1629bbc0ca1ee5e84e620366daf779f037eab2fda47487a8471729b # lvm2_install
e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0) # 11-dm-initramfs.rules
## 56642c59d9864dcd7a0bd16258291fa6f8f116e3c986723ff1533e82f4cc8f35 lvm2-2.03.25-02-x86_64.pkg.tar.lz
## 2156b6426143148853c3707f920048a16e2585f1bfee940a4f3fe0f89e1c8278 device-mapper-2.03.25-02-x86_64.pkg.tar.lz
## bc835bf2862ed0860d6246a3396c302389581d408055972cdcb15365089c012d device-mapper-2.03.26-01-x86_64.pkg.tar.lz
## 11d1bb47622c7b474cc8c1153afd04175ab02762dd128187f63988284d28f513 lvm2-2.03.26-01-x86_64.pkg.tar.lz

View file

@ -3,8 +3,8 @@
pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
pkgver=2.03.25
pkgrel=2
pkgver=2.03.26
pkgrel=1
arch=('x86_64')
url='https://sourceware.org/lvm2/'
license=('GPL2' 'LGPL2.1')
@ -14,7 +14,7 @@ validpgpkeys=('88437EF5C077BD113D3B7224228191C1567E2C17' # Alasdair G Kergon <a
source=("git+https://sourceware.org/git/lvm2.git#tag=v${pkgver//./_}?signed"
'0001-udev-initcpio.patch'
'11-dm-initramfs.rules')
sha256sums=('0870ee6d5929274c18be6bfde1e6c24a499ed6a9659114a15c6062dfec924ae8'
sha256sums=('42e1422566e1b028f0e57955bc4050a3c47f3c6b59fb1e13d27b06acd09815bf'
'2b3a16ec05e2bc6678e9ebd5ffa8319ebfde29aa260ce004f79f9b8df57d73c9'
'e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0')