This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via f03e254f39ddb7cacea7a39ec6b98dce77018b0d (commit) via a92fb74d1aeb9229044c1a9fbc54abafca50da58 (commit) via f7585bc7ecf81e172ff18c04fece3e4f3227cf2c (commit) via 0bd7b7313293c127cf4782d5434273a5f3559566 (commit) via 9b656e7f40a3e0082681a63d2a2c0d4eea885906 (commit) via ab91dde24b512f7a6067937803946a10750b1ed6 (commit) via 90940aded5b7e233fadaae8bad8efbdfe383ce6c (commit) via c577571e2a6b623f7027d97d3ea523db663c68fa (commit) from c8453e87599fe66f4d18d901bc9dc431306afa2d (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit f03e254f39ddb7cacea7a39ec6b98dce77018b0d Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:46:25 2018 +0100
make.sh: Let XZ determine how many cores it wants to use
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit a92fb74d1aeb9229044c1a9fbc54abafca50da58 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:46:03 2018 +0100
make.sh: Limit XZ memory to 2GB on 32 bit systems
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit f7585bc7ecf81e172ff18c04fece3e4f3227cf2c Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:40:29 2018 +0100
joe: Bump package because of ncurses update
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 0bd7b7313293c127cf4782d5434273a5f3559566 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:38:47 2018 +0100
hostapd: Fix detection of wireless devices with kernel 4.14
Fixes #11738
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 9b656e7f40a3e0082681a63d2a2c0d4eea885906 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:31:12 2018 +0100
entropy: Don't show message for HWRNGs any more
We cannot reliably detect this with the new kernel and therefore cannot show this.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ab91dde24b512f7a6067937803946a10750b1ed6 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:25:03 2018 +0100
rngd: Always start the daemon
We cannot reliably detect in this script any more if the system has an actual HWRNG (/dev/hwrng always exists).
Therefore we always start the daemon now and let it deal with what ever comes.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 90940aded5b7e233fadaae8bad8efbdfe383ce6c Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:23:42 2018 +0100
rngd: Update to version 6.2
Fixes #11737
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit c577571e2a6b623f7027d97d3ea523db663c68fa Author: Michael Tremer michael.tremer@ipfire.org Date: Tue May 22 20:07:59 2018 +0100
installer: Drop /var partition
Fixes #11735
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: html/cgi-bin/entropy.cgi | 19 +++----- lfs/hostapd | 2 +- lfs/joe | 2 +- lfs/rng-tools | 5 +- make.sh | 14 +++++- src/initscripts/packages/hostapd | 7 ++- src/initscripts/system/rngd | 22 +-------- src/installer/hw.c | 100 +++++++-------------------------------- src/installer/hw.h | 2 - src/installer/main.c | 1 - 10 files changed, 46 insertions(+), 128 deletions(-)
Difference in files: diff --git a/html/cgi-bin/entropy.cgi b/html/cgi-bin/entropy.cgi index e5db5c212..d7a9ca5d8 100644 --- a/html/cgi-bin/entropy.cgi +++ b/html/cgi-bin/entropy.cgi @@ -51,14 +51,9 @@ if ( $querry[0] ne~ "") { # Check for hardware support. my $message; my $message_colour = $Header::colourred; - if (&has_hwrng()) { - $message = $Lang::tr{'system has hwrng'}; - $message_colour = $Header::colourgreen; - } elsif (&has_rdrand()) { + if (&has_rdrand()) { $message = $Lang::tr{'system has rdrand'}; $message_colour = $Header::colourgreen; - } else { - $message = $Lang::tr{'no hardware random number generator'}; }
my $rngd_status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>"; @@ -67,9 +62,13 @@ if ( $querry[0] ne~ "") { }
&Header::openbox('100%', 'center', $Lang::tr{'hardware support'}); - print <<EOF; - <p style="color: $message_colour; text-align: center;">$message</p> + if ($message) { + print <<EOF; + <p style="color: $message_colour; text-align: center;">$message</p> +EOF + }
+ print <<EOF; <table width='80%' cellspacing='1' class='tbl'> <tr> <th align='center'><b>$Lang::tr{'service'}</b></th> @@ -89,10 +88,6 @@ EOF &Header::closepage(); }
-sub has_hwrng() { - return (-c "/dev/hwrng"); -} - sub has_rdrand() { open(FILE, "/proc/cpuinfo") or return 0; my @cpuinfo = <FILE>; diff --git a/lfs/hostapd b/lfs/hostapd index 5b2f001d5..349a3d940 100644 --- a/lfs/hostapd +++ b/lfs/hostapd @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = hostapd -PAK_VER = 41 +PAK_VER = 42
DEPS = ""
diff --git a/lfs/joe b/lfs/joe index e4cee9528..73a0d3611 100644 --- a/lfs/joe +++ b/lfs/joe @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = joe -PAK_VER = 1 +PAK_VER = 2
DEPS = ""
diff --git a/lfs/rng-tools b/lfs/rng-tools index c8ea08d8a..f9b79d108 100644 --- a/lfs/rng-tools +++ b/lfs/rng-tools @@ -24,7 +24,7 @@
include Config
-VER = 5 +VER = 6.2
THISAPP = rng-tools-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 6726cdc6fae1f5122463f24ae980dd68 +$(DL_FILE)_MD5 = a596ecd89afc584afe48758923fe6195
install : $(TARGET)
@@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./autogen.sh cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make $(EXTRA_INSTALL) install diff --git a/make.sh b/make.sh index d7f56f293..353441b01 100755 --- a/make.sh +++ b/make.sh @@ -867,8 +867,18 @@ if [ ${HOST_MEM} -lt 1024 ]; then fi
# We compress archives with "xz -8", using all cores and up to 70% of memory -XZ_MEM="$(( HOST_MEM * 7 / 10 ))MiB" -XZ_OPT="-T$(system_processors) -8 --memory=${XZ_MEM}" +XZ_MEM=$(( HOST_MEM * 7 / 10 )) + +# XZ memory cannot be larger than 2GB on 32 bit systems +case "${HOST_ARCH}" in + i*86|armv*) + if [ ${XZ_MEM} -gt 2048 ]; then + XZ_MEM=2048 + fi + ;; +esac + +XZ_OPT="-T0 -8 --memory=${XZ_MEM}MiB"
if [ -n "${BUILD_ARCH}" ]; then configure_build "${BUILD_ARCH}" diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd index 02e8c1614..27e79f0a7 100644 --- a/src/initscripts/packages/hostapd +++ b/src/initscripts/packages/hostapd @@ -17,18 +17,21 @@ case "${1}" in boot_mesg "Starting hostapd... "
# Check Interface configuration - if ! ip link show $INTERFACE > /dev/null 2>&1; then + if [ ! -d "/sys/class/net/${INTERFACE}" ]; then boot_mesg "Interface $INTERFACE doesn't exist." ${FAILURE} echo_failure exit 0 fi + if [ "$(ip link show $INTERFACE | /bin/grep "ether")" == "" ]; then boot_mesg "Interface $INTERFACE is assigned to wlan master device." ${FAILURE} boot_mesg "Please reboot to fix this." ${FAILURE} echo_failure exit 0 fi - if [ "$(iwconfig $INTERFACE | /bin/grep "IEEE")" == "" ]; then + + # Check if INTERFACE is an actual wireless device + if [ ! -d "/sys/class/net/${INTERFACE}/wireless" ]; then boot_mesg "Interface $INTERFACE is no wireless device." ${FAILURE} echo_failure exit 0 diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd index df4aa7da2..91b70a7b4 100644 --- a/src/initscripts/system/rngd +++ b/src/initscripts/system/rngd @@ -11,30 +11,10 @@ . /etc/sysconfig/rc . ${rc_functions}
-function has_rdrand() { - grep -q "rdrand" /proc/cpuinfo -} - -function has_hwrng() { - [ -e "/dev/hwrng" ] -} - case "${1}" in start) - if ! has_hwrng && ! has_rdrand; then - boot_mesg "No Hardware Random Number Generator found..." - echo_warning - exit 0 - fi - boot_mesg "Starting Random Number Generator Daemon..." - - if pidofproc /usr/sbin/rngd &>/dev/null; then - # Is already running. - echo_ok - else - loadproc /usr/sbin/rngd --no-tpm=1 - fi + loadproc /usr/sbin/rngd --quiet ;;
stop) diff --git a/src/installer/hw.c b/src/installer/hw.c index add36c8f4..6acddf9bf 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -420,21 +420,6 @@ static unsigned long long hw_swap_size(struct hw_destination* dest) { return swap_size; }
-static unsigned long long hw_root_size(struct hw_destination* dest) { - unsigned long long root_size; - - if (dest->size < MB2BYTES(2048)) - root_size = MB2BYTES(1024); - - else if (dest->size >= MB2BYTES(2048) && dest->size <= MB2BYTES(3072)) - root_size = MB2BYTES(1536); - - else - root_size = MB2BYTES(2048); - - return root_size; -} - static unsigned long long hw_boot_size(struct hw_destination* dest) { return MB2BYTES(128); } @@ -480,6 +465,10 @@ static int hw_calculate_partition_table(struct hw_destination* dest, int disable // Add some more space for partition tables, etc. dest->size -= MB2BYTES(1);
+ // The disk has to have at least 2GB + if (dest->size <= MB2BYTES(2048)) + return -1; + // Determine partition table dest->part_table = HW_PART_TABLE_MSDOS;
@@ -506,7 +495,14 @@ static int hw_calculate_partition_table(struct hw_destination* dest, int disable }
dest->size_boot = hw_boot_size(dest); - dest->size_root = hw_root_size(dest); + + // Determine the size of the data partition. + unsigned long long space_left = dest->size - \ + (dest->size_bootldr + dest->size_boot); + + // If we have less than 2GB left, we disable swap + if (space_left <= MB2BYTES(2048)) + disable_swap = 1;
// Should we use swap? if (disable_swap) @@ -514,21 +510,11 @@ static int hw_calculate_partition_table(struct hw_destination* dest, int disable else dest->size_swap = hw_swap_size(dest);
- // Determine the size of the data partition. - unsigned long long used_space = dest->size_bootldr + dest->size_boot - + dest->size_swap + dest->size_root; + // Subtract swap + space_left -= dest->size_swap;
- // Disk is way too small - if (used_space >= dest->size) - return -1; - - dest->size_data = dest->size - used_space; - - // If it gets too small, we remove the swap space. - if (dest->size_data <= MB2BYTES(256)) { - dest->size_data += dest->size_swap; - dest->size_swap = 0; - } + // Root is getting what ever is left + dest->size_root = space_left;
// Set partition names if (dest->size_boot > 0) { @@ -550,11 +536,6 @@ static int hw_calculate_partition_table(struct hw_destination* dest, int disable
snprintf(dest->part_root, sizeof(dest->part_root), "%s%d", path, part_idx++);
- if (dest->size_data > 0) - snprintf(dest->part_data, sizeof(dest->part_data), "%s%d", path, part_idx++); - else - *dest->part_data = '\0'; - return 0; }
@@ -682,14 +663,6 @@ int hw_create_partitions(struct hw_destination* dest, const char* output) { part_start += dest->size_root; }
- if (*dest->part_data) { - asprintf(&cmd, "%s mkpart %s ext2 %lluB %lluB", cmd, - (dest->part_table == HW_PART_TABLE_GPT) ? "DATA" : "primary", - part_start, part_start + dest->size_data - 1); - - part_start += dest->size_data; - } - if (dest->part_boot_idx > 0) asprintf(&cmd, "%s set %d boot on", cmd, dest->part_boot_idx);
@@ -721,9 +694,6 @@ int hw_create_partitions(struct hw_destination* dest, const char* output) { if (*dest->part_root && (try_open(dest->part_root) != 0)) continue;
- if (*dest->part_data && (try_open(dest->part_data) != 0)) - continue; - // All partitions do exist, exiting the loop. break; } @@ -787,13 +757,6 @@ int hw_create_filesystems(struct hw_destination* dest, const char* output) { if (r) return r;
- // data - if (*dest->part_data) { - r = hw_format_filesystem(dest->part_data, dest->filesystem, output); - if (r) - return r; - } - return 0; }
@@ -839,19 +802,6 @@ int hw_mount_filesystems(struct hw_destination* dest, const char* prefix) { } }
- // data - if (*dest->part_data) { - snprintf(target, sizeof(target), "%s%s", prefix, HW_PATH_DATA); - mkdir(target, S_IRWXU|S_IRWXG|S_IRWXO); - - r = hw_mount(dest->part_data, target, filesystem, 0); - if (r) { - hw_umount_filesystems(dest, prefix); - - return r; - } - } - // swap if (*dest->part_swap) { r = swapon(dest->part_swap, 0); @@ -896,14 +846,6 @@ int hw_umount_filesystems(struct hw_destination* dest, const char* prefix) { return -1; }
- // data - if (*dest->part_data) { - snprintf(target, sizeof(target), "%s%s", prefix, HW_PATH_DATA); - r = hw_umount(target); - if (r) - return -1; - } - // swap if (*dest->part_swap) { swapoff(dest->part_swap); @@ -1096,16 +1038,6 @@ int hw_write_fstab(struct hw_destination* dest) { free(uuid); }
- // data - if (*dest->part_data) { - uuid = hw_get_uuid(dest->part_data); - - if (uuid) { - fprintf(f, FSTAB_FMT, uuid, "/var", "auto", "defaults", 1, 1); - free(uuid); - } - } - fclose(f);
return 0; diff --git a/src/installer/hw.h b/src/installer/hw.h index e2d621be5..e127f1f51 100644 --- a/src/installer/hw.h +++ b/src/installer/hw.h @@ -84,7 +84,6 @@ struct hw_destination { char part_boot[DEV_SIZE]; char part_swap[DEV_SIZE]; char part_root[DEV_SIZE]; - char part_data[DEV_SIZE]; int part_boot_idx;
int filesystem; @@ -94,7 +93,6 @@ struct hw_destination { unsigned long long size_boot; unsigned long long size_swap; unsigned long long size_root; - unsigned long long size_data; };
struct hw* hw_init(); diff --git a/src/installer/main.c b/src/installer/main.c index c7075aa71..116f52b05 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -685,7 +685,6 @@ int main(int argc, char *argv[]) { fprintf(flog, " boot : %s (%lluMB)\n", destination->part_boot, BYTES2MB(destination->size_boot)); fprintf(flog, " swap : %s (%lluMB)\n", destination->part_swap, BYTES2MB(destination->size_swap)); fprintf(flog, " root : %s (%lluMB)\n", destination->part_root, BYTES2MB(destination->size_root)); - fprintf(flog, " data : %s (%lluMB)\n", destination->part_data, BYTES2MB(destination->size_data)); fprintf(flog, "Memory : %lluMB\n", BYTES2MB(hw_memory()));
// Warn the user if there is not enough space to create a swap partition
hooks/post-receive -- IPFire 2.x development tree