This commit is contained in:
lean 2020-04-03 23:18:52 +08:00
commit 0a395d6fd6
13 changed files with 32 additions and 111 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-diskman PKG_NAME:=luci-app-diskman
PKG_VERSION:=v0.2.5 PKG_VERSION:=v0.2.7
PKG_RELEASE:=beta PKG_RELEASE:=beta
PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-app-diskman> PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-app-diskman>
PKG_LICENSE:=AGPL-3.0 PKG_LICENSE:=AGPL-3.0

View File

@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl PKG_NAME:=openssl
PKG_BASE:=1.1.1 PKG_BASE:=1.1.1
PKG_BUGFIX:=e PKG_BUGFIX:=f
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_USE_MIPS16:=0 PKG_USE_MIPS16:=0
ENGINES_DIR=engines-1.1 ENGINES_DIR=engines-1.1
@ -19,12 +19,12 @@ PKG_BUILD_PARALLEL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \ PKG_SOURCE_URL:= \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/ \
http://ftp.fi.muni.cz/pub/openssl/source/ \ http://ftp.fi.muni.cz/pub/openssl/source/ \
http://ftp.linux.hr/pub/openssl/source/ \ http://ftp.linux.hr/pub/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
PKG_HASH:=694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
PKG_HASH:=186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35
PKG_LICENSE:=OpenSSL PKG_LICENSE:=OpenSSL
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE

View File

@ -1,80 +0,0 @@
From 30d190caf311d534867df97e26b552e628cb7d85 Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz@fedoraproject.org>
Date: Wed, 25 Mar 2020 14:15:31 +0100
Subject: [PATCH] Partially revert "Detect EOF while reading in libssl"
This partially reverts commit db943f43a60d1b5b1277e4b5317e8f288e7a0a3a.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11400)
diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
index f5324c6819..35512f9caf 100644
--- a/crypto/err/openssl.txt
+++ b/crypto/err/openssl.txt
@@ -2852,7 +2852,6 @@ SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES:242:unable to load ssl3 md5 routines
SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES:243:unable to load ssl3 sha1 routines
SSL_R_UNEXPECTED_CCS_MESSAGE:262:unexpected ccs message
SSL_R_UNEXPECTED_END_OF_EARLY_DATA:178:unexpected end of early data
-SSL_R_UNEXPECTED_EOF_WHILE_READING:294:unexpected eof while reading
SSL_R_UNEXPECTED_MESSAGE:244:unexpected message
SSL_R_UNEXPECTED_RECORD:245:unexpected record
SSL_R_UNINITIALIZED:276:uninitialized
diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h
index 0ef684f3c1..ba4c4ae5fb 100644
--- a/include/openssl/sslerr.h
+++ b/include/openssl/sslerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -734,7 +734,6 @@ int ERR_load_SSL_strings(void);
# define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243
# define SSL_R_UNEXPECTED_CCS_MESSAGE 262
# define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178
-# define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
# define SSL_R_UNEXPECTED_MESSAGE 244
# define SSL_R_UNEXPECTED_RECORD 245
# define SSL_R_UNINITIALIZED 276
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 1c885a664f..b2a7a47eb0 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -296,12 +296,6 @@ int ssl3_read_n(SSL *s, size_t n, size_t max, int extend, int clearold,
ret = BIO_read(s->rbio, pkt + len + left, max - left);
if (ret >= 0)
bioread = ret;
- if (ret <= 0
- && !BIO_should_retry(s->rbio)
- && BIO_eof(s->rbio)) {
- SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_F_SSL3_READ_N,
- SSL_R_UNEXPECTED_EOF_WHILE_READING);
- }
} else {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL3_READ_N,
SSL_R_READ_BIO_NOT_SET);
diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c
index a0c7b79659..4b12ed1485 100644
--- a/ssl/ssl_err.c
+++ b/ssl/ssl_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -1205,8 +1205,6 @@ static const ERR_STRING_DATA SSL_str_reasons[] = {
"unexpected ccs message"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_END_OF_EARLY_DATA),
"unexpected end of early data"},
- {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_EOF_WHILE_READING),
- "unexpected eof while reading"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_MESSAGE), "unexpected message"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_RECORD), "unexpected record"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNINITIALIZED), "uninitialized"},

View File

@ -14,7 +14,7 @@ redboot_fis_do_upgrade() {
if [ "$magic" = "4349" ]; then if [ "$magic" = "4349" ]; then
local kern_length=0x$(dd if="$sysup_file" bs=2 skip=1 count=4 2>/dev/null) local kern_length=0x$(dd if="$sysup_file" bs=2 skip=1 count=4 2>/dev/null)
[ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" [ -f "$CONF_TAR" ] && append="-j $CONF_TAR"
dd if="$sysup_file" bs=64k skip=1 2>/dev/null | \ dd if="$sysup_file" bs=64k skip=1 2>/dev/null | \
mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs
@ -22,7 +22,7 @@ redboot_fis_do_upgrade() {
local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$')
local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c) local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c)
[ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" [ -f "$CONF_TAR" ] && append="-j $CONF_TAR"
tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \
mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs

View File

@ -45,7 +45,7 @@ platform_do_upgrade() {
sync sync
if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then if [ "$SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk get_partitions "/dev/$diskdev" bootdisk
#extract the boot sector from the image #extract the boot sector from the image
@ -91,8 +91,8 @@ platform_copy_config() {
if export_partdevice partdev 1; then if export_partdevice partdev 1; then
mkdir -p /boot mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime "/dev/$partdev" /boot [ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime "/dev/$partdev" /boot
cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE" cp -af "$CONF_TAR" /boot/
tar -C / -zxvf "$UPGRADE_BACKUP" boot/config.txt tar -C / -zxvf "$CONF_TAR" boot/config.txt
sync sync
unmount /boot unmount /boot
fi fi

View File

@ -54,7 +54,7 @@ platform_check_image() {
platform_copy_config_emmc() { platform_copy_config_emmc() {
mkdir -p /recovery mkdir -p /recovery
mount -o rw,noatime /dev/mmcblk0p1 /recovery mount -o rw,noatime /dev/mmcblk0p1 /recovery
cp -af "$UPGRADE_BACKUP" "/recovery/$BACKUP_FILE" cp -af "$CONF_TAR" "/recovery/$CONF_TAR"
sync sync
umount /recovery umount /recovery
} }

View File

@ -18,7 +18,7 @@ move_config() {
esac esac
mkdir -p /boot mkdir -p /boot
mount -o rw,noatime "/dev/$partdev" /boot mount -o rw,noatime "/dev/$partdev" /boot
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
umount /boot umount /boot
fi fi
} }

View File

@ -22,12 +22,12 @@ preinit_mount_syscfg() {
fi fi
mkdir /tmp/syscfg mkdir /tmp/syscfg
mount -t ubifs ubi1:syscfg /tmp/syscfg mount -t ubifs ubi1:syscfg /tmp/syscfg
[ -f "/tmp/syscfg/$BACKUP_FILE" ] && { [ -f /tmp/syscfg/sysupgrade.tgz ] && {
echo "- config restore -" echo "- config restore -"
cd / cd /
mv "/tmp/syscfg/$BACKUP_FILE" /tmp mv /tmp/syscfg/sysupgrade.tgz /tmp
tar xzf "/tmp/$BACKUP_FILE" tar xzf /tmp/sysupgrade.tgz
rm -f "/tmp/$BACKUP_FILE" rm -f /tmp/sysupgrade.tgz
sync sync
} }
;; ;;

View File

@ -15,10 +15,10 @@ preinit_mount_udpu() {
if [ -b "${mmcdev}p4" ]; then if [ -b "${mmcdev}p4" ]; then
mkdir /misc mkdir /misc
mount -t f2fs ${mmcdev}p4 /misc mount -t f2fs ${mmcdev}p4 /misc
[ -f "/misc/$BACKUP_FILE" ] && { [ -f /misc/sysupgrade.tgz ] && {
echo "- Restoring configuration files -" echo "- Restoring configuration files -"
tar xzf "/misc/$BACKUP_FILE" -C / tar xzf /misc/sysupgrade.tgz -C /
rm -f "/misc/$BACKUP_FILE" rm -f /misc/sysupgrade.tgz
sync sync
} }
[ -f "/misc/firmware/recovery.itb" ] && { [ -f "/misc/firmware/recovery.itb" ] && {

View File

@ -93,6 +93,6 @@ platform_do_upgrade_linksys() {
} }
platform_copy_config_linksys() { platform_copy_config_linksys() {
cp -f "$UPGRADE_BACKUP" "/tmp/syscfg/$BACKUP_FILE" cp -f /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz
sync sync
} }

View File

@ -11,7 +11,7 @@ platform_check_image() {
case "$(board_name)" in case "$(board_name)" in
cznic,turris-omnia|globalscale,espressobin|globalscale,espressobin-emmc|globalscale,espressobin-v7|globalscale,espressobin-v7-emmc|\ cznic,turris-omnia|globalscale,espressobin|globalscale,espressobin-emmc|globalscale,espressobin-v7|globalscale,espressobin-v7-emmc|\
marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1) marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
platform_check_image_sdcard "$1" platform_check_image_sdcard "$ARGV"
;; ;;
*) *)
return 0 return 0
@ -22,20 +22,21 @@ platform_check_image() {
platform_do_upgrade() { platform_do_upgrade() {
case "$(board_name)" in case "$(board_name)" in
linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
platform_do_upgrade_linksys "$1" platform_do_upgrade_linksys "$ARGV"
;; ;;
cznic,turris-omnia|globalscale,espressobin|globalscale,espressobin-emmc|globalscale,espressobin-v7|globalscale,espressobin-v7-emmc|\ cznic,turris-omnia|globalscale,espressobin|globalscale,espressobin-emmc|globalscale,espressobin-v7|globalscale,espressobin-v7-emmc|\
marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1) marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
platform_do_upgrade_sdcard "$1" platform_do_upgrade_sdcard "$ARGV"
;; ;;
methode,udpu) methode,udpu)
platform_do_upgrade_uDPU "$1" platform_do_upgrade_uDPU "$ARGV"
;; ;;
*) *)
default_do_upgrade "$1" default_do_upgrade "$ARGV"
;; ;;
esac esac
} }
platform_copy_config() { platform_copy_config() {
case "$(board_name)" in case "$(board_name)" in
linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)

View File

@ -49,7 +49,7 @@ platform_do_upgrade_sdcard() {
sync sync
if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then if [ "$SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk get_partitions "/dev/$diskdev" bootdisk
#extract the boot sector from the image #extract the boot sector from the image
@ -106,7 +106,7 @@ platform_copy_config_sdcard() {
if export_partdevice partdev 1; then if export_partdevice partdev 1; then
mkdir -p /boot mkdir -p /boot
[ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot [ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot
cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE" cp -af "$CONF_TAR" /boot/
sync sync
umount /boot umount /boot
fi fi

View File

@ -149,8 +149,8 @@ platform_do_upgrade_uDPU() {
platform_copy_config_uDPU() { platform_copy_config_uDPU() {
# Config is saved on the /misc partition and copied on the rootfs after the reboot # Config is saved on the /misc partition and copied on the rootfs after the reboot
if [ -f "$UPGRADE_BACKUP" ]; then if [ -f /tmp/sysupgrade.tgz ]; then
cp -f "$UPGRADE_BACKUP" "/misc/$BACKUP_FILE" cp -f /tmp/sysupgrade.tgz /misc/
sync sync
fi fi
} }