Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix too small timeout for copy command #717

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
menu "Packages"

source "$BR2_EXTERNAL_INFIX_PATH/package/bin/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd-test-mode/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/curios-httpd/Config.in"
Expand Down Expand Up @@ -34,4 +36,5 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/sysrepo-cpp/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/rousette/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/nghttp2-asio/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/date-cpp/Config.in"

endmenu
8 changes: 8 additions & 0 deletions package/bin/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config BR2_PACKAGE_BIN
bool "bin"
select BR2_PACKAGE_SYSREPO
select BR2_PACKAGE_LIBITE
help
Misc. tools for CLI and shell users.

https://github.com/kernelkit/infix
1 change: 1 addition & 0 deletions package/bin/bin.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256 d2f96418893ac66156d0e691cda189b0d85ae1d814065d1d9aa1845383100f46 LICENSE
21 changes: 21 additions & 0 deletions package/bin/bin.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################################################
#
# bin
#
################################################################################

BIN_VERSION = 1.0
BIN_SITE_METHOD = local
BIN_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/bin
BIN_LICENSE = BSD-3-Clause
BIN_LICENSE_FILES = LICENSE
BIN_REDISTRIBUTE = NO
BIN_DEPENDENCIES = sysrepo libite
BIN_CONF_OPTS = --prefix= --disable-silent-rules
BIN_AUTORECONF = YES

define BIN_CONF_ENV
CFLAGS="$(INFIX_CFLAGS)"
endef

$(eval $(autotools-package))
2 changes: 1 addition & 1 deletion package/statd/statd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ STATD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/statd
STATD_LICENSE = BSD-3-Clause
STATD_LICENSE_FILES = LICENSE
STATD_REDISTRIBUTE = NO
STATD_DEPENDENCIES = sysrepo libev libsrx jansson python-statd libyang
STATD_DEPENDENCIES = sysrepo libev libsrx jansson python-statd libyang libite
STATD_AUTORECONF = YES

define STATD_CONF_ENV
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Host build of critical components, for Coverity Scan mostly
APPS = confd execd factory keyack statd
APPS = bin confd execd factory keyack statd

.PHONY: all
all:
Expand Down
31 changes: 31 additions & 0 deletions src/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*~
*.o
copy
erase
files

/aclocal.m4
/autom4te.cache/
/aux
/clixon.xml
/compile
/config.h
/config.h.in
/config.guess
/config.log
/config.status
/config.sub
/configure
/depcomp
/.deps/
/install-sh
/libtool
/ltmain.sh
/m4
/missing

GPATH
GRTAGS
GTAGS
Makefile
Makefile.in
13 changes: 13 additions & 0 deletions src/bin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2024 The KernelKit Authors

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 changes: 22 additions & 0 deletions src/bin/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DISTCLEANFILES = *~ *.d
ACLOCAL_AMFLAGS = -I m4

bin_PROGRAMS = copy erase files

copy_SOURCES = copy.c util.c util.h
copy_CPPFLAGS = -D_DEFAULT_SOURCE -D_GNU_SOURCE
copy_CFLAGS = -W -Wall -Wextra
copy_CFLAGS += $(libite_CFLAGS) $(sysrepo_CFLAGS)
copy_LDADD = $(libite_LIBS) $(sysrepo_LIBS)

erase_SOURCES = erase.c util.c util.h
erase_CPPFLAGS = -D_DEFAULT_SOURCE -D_GNU_SOURCE
erase_CFLAGS = -W -Wall -Wextra
erase_CFLAGS += $(libite_CFLAGS) $(sysrepo_CFLAGS)
erase_LDADD = $(libite_LIBS) $(sysrepo_LIBS)

files_SOURCES = files.c util.c util.h
files_CPPFLAGS = -D_DEFAULT_SOURCE -D_GNU_SOURCE
files_CFLAGS = -W -Wall -Wextra
files_CFLAGS += $(libite_CFLAGS) $(sysrepo_CFLAGS)
files_LDADD = $(libite_LIBS) $(sysrepo_LIBS)
2 changes: 2 additions & 0 deletions src/bin/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Add bash completion to 'copy' + 'erase', use 'files'
* https://github.com/kernelkit/infix/issues/373
3 changes: 3 additions & 0 deletions src/bin/autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

autoreconf -W portability -vifm
8 changes: 8 additions & 0 deletions src/bin/check.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Used by ../Makefile for 'make check' and Coverity Scan
export PKG_CONFIG_PATH = $(CURDIR)/../staging/lib/pkgconfig

all:
./autogen.sh
./configure
make V=1 all
make distclean
70 changes: 70 additions & 0 deletions src/bin/configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
AC_PREREQ(2.61)
AC_INIT([bin], [1.0], [https://github.com/kernelkit/infix/issues])
AM_INIT_AUTOMAKE(1.11 foreign subdir-objects)
AM_SILENT_RULES(yes)

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
])

AC_PROG_CC
AC_PROG_INSTALL

# Check for pkg-config first, warn if it's not installed
PKG_PROG_PKG_CONFIG

PKG_CHECK_MODULES([libite], [libite >= 2.5.0])
PKG_CHECK_MODULES([sysrepo], [sysrepo >= 2.2.36])

# Misc variable replacements for below Summary
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

DATAROOTDIR=`eval echo $datarootdir`
DATAROOTDIR=`eval echo $DATAROOTDIR`
AC_SUBST(DATAROOTDIR)

LIBDIR=`eval echo $libdir`
LIBDIR=`eval echo $LIBDIR`
AC_SUBST(LIBDIR)

LOCALSTATEDIR=`eval echo $localstatedir`
LOCALSTATEDIR=`eval echo $LOCALSTATEDIR`
AC_SUBST(LOCALSTATEDIR)

RUNSTATEDIR=`eval echo $runstatedir`
RUNSTATEDIR=`eval echo $RUNSTATEDIR`
AC_SUBST(RUNSTATEDIR)

SYSCONFDIR=`eval echo $sysconfdir`
SYSCONFDIR=`eval echo $SYSCONFDIR`
AC_SUBST(SYSCONFDIR)

AC_OUTPUT

cat <<EOF

------------------ Summary ------------------
$PACKAGE_NAME version $PACKAGE_VERSION
Prefix................: $prefix
Exec prefix...........: $eprefix
Sysconfdir............: `eval echo $sysconfdir`
Localstatedir.........: `eval echo $localstatedir`
Default fstab.........: `eval echo $fstab`
System environment....: ${sysconfig_path:-${sysconfig}}
C Compiler............: $CC $CFLAGS $CPPFLAGS $LDFLAGS $LIBS
Linker................: $LD $LLDP_LDFLAGS $LLDP_BIN_LDFLAGS $LDFLAGS $LIBS
CFLAGS................: $libite_CFLAGS $sysrepo_CFLAGS
LIBS..................: $libite_LIBS $sysrepo_LIBS

------------- Compiler version --------------
$($CC --version || true)
-------------- Linker version ---------------
$($LD --version || true)
---------------------------------------------

Check the above options and compile with:
${MAKE-make}

EOF
Loading