Re: lftp 4.8.4-1 upload error

2018-08-29 Thread Marco Atzeri

Am 29.08.2018 um 21:15 schrieb Jon Turney:

On 29/08/2018 19:16, Andrew Schulman wrote:




(Possibly you can even add a '-override.hint' to remove it, but I'm not
sure that works :) )


usually yes

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



Re: lftp 4.8.4-1 upload error

2018-08-29 Thread Andrew Schulman
> I think all of this isn't needed any more, so you can add an empty 
> override.hint to your upload to supersede that.

Got it. Thanks.



Re: lftp 4.8.4-1 upload error

2018-08-29 Thread Jon Turney

On 29/08/2018 19:16, Andrew Schulman wrote:

I just uploaded lftp-4.8.4-1 for x86_64, and got these error notices back
from calm:

ERROR: package 'lftp' version '4.8.4-1' is most recent non-test version,
but version '4.7.8-2' is curr:
ERROR: package 'lftp-debuginfo' version '4.8.4-1' is most recent non-test
version, but version '4.7.8-2' is curr:
ERROR: error while validating merged x86_64 packages for Andrew Schulman
SUMMARY: 3 ERROR(s)

I guess this is because we pinned 4.7.8-2 as curr: some time last year,
when I had to forcibly roll back from 4.8.0-1. Is that right? Is this
something you can fix, or do I need to do something?


Correct.

lftp currently has an override.hint containing:

prev: 4.7.7-1
curr: 4.7.8-2
replace-versions: 4.8.0-1

(the last line is an instruction to setup to downgrade any installs of 
the withdrawn 4.8.0-1 to 4.7.8-2)


I think all of this isn't needed any more, so you can add an empty 
override.hint to your upload to supersede that.


(Possibly you can even add a '-override.hint' to remove it, but I'm not 
sure that works :) )


You'll need to do the same thing for lftp-debuginfo as well


lftp 4.8.4-1 upload error

2018-08-29 Thread Andrew Schulman
I just uploaded lftp-4.8.4-1 for x86_64, and got these error notices back
from calm:

ERROR: package 'lftp' version '4.8.4-1' is most recent non-test version,
but version '4.7.8-2' is curr:
ERROR: package 'lftp-debuginfo' version '4.8.4-1' is most recent non-test
version, but version '4.7.8-2' is curr:
ERROR: error while validating merged x86_64 packages for Andrew Schulman
SUMMARY: 3 ERROR(s)

I guess this is because we pinned 4.7.8-2 as curr: some time last year,
when I had to forcibly roll back from 4.8.0-1. Is that right? Is this
something you can fix, or do I need to do something?

Thanks,
Andrew



Re: how to use opam for package builds?

2018-08-29 Thread Andy Li
Hi,

On Wed, Aug 29, 2018 at 11:47 PM Andrew Schulman 
wrote:

> (1) I can't get "opam init" to complete. It hangs after "synchronized from
> https://opam.ocaml.org";, until I interrupt it:
>

It should work, just wait a little longer. For me, it took a bit more than
three minutes to complete.
I'm not sure why it is that slow though.


> (2) Even if I get this to work, I don't think it's the right thing to do
> because it's setting up persistent opam configuration in my home directory,
> which I don't think is the right place for packaging. Should there be some
> global opam configuration, that all packaging scripts that rely on opam
> would use? If so, where should that go?


Indeed the proper way is to package each ocaml library as cygwin packages
and then the orpie package just build depends on them instead of calling
opam.
There are several already packaged ocaml libraries. You may study their
cygport files in
https://github.com/cygwinports?utf8=%E2%9C%93&q=ocaml&type=&language=

Hope it helps.

Best,
Andy


[PATCH setup] Use pkg-config for dependency checking where possible

2018-08-29 Thread Jon Turney
Modernise depedency checking and use pkg-config where possible
---
 Makefile.am  | 10 --
 configure.ac | 33 -
 2 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7bd7c57..a4f9a12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,8 @@ AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
 AM_YFLAGS = -d
 AM_LFLAGS = -8
 WINDRES = @WINDRES@
-AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
+AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include \
+  $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(LIBCRYPT_CFLAGS) 
$(LIBSOLV_CFLAGS)
 
 inilex_CXXFLAGS:=-Wno-sign-compare
 
@@ -97,7 +98,12 @@ inilint_SOURCES = \
String++.h
 
 @SETUP@_LDADD = \
-   libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz -lsolv 
-lregex \
+   libgetopt++/libgetopt++.la \
+   $(LIBGCRYPT_LIBS) \
+   $(LZMA_LIBS) \
+   $(BZ2_LIBS) \
+   $(ZLIB_LIBS) \
+   $(LIBSOLV_LIBS) -lregex \
-lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 
-lmingw32
 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
 @SETUP@_SOURCES = \
diff --git a/configure.ac b/configure.ac
index dcab4ee..103b89e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,28 +48,35 @@ AC_PROG_LIBTOOL
 AC_CHECK_TOOL(WINDRES, windres, windres)
 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
 
-AC_CHECK_HEADERS(alloca.h \
-errno.h \
-string \
-string.h )
+dnl dependencies we can check for using pkgconfig
+PKG_CHECK_MODULES(ZLIB, [zlib])
+PKG_CHECK_MODULES(LZMA, [liblzma])
+PKG_CHECK_MODULES(LIBSOLV, [libsolv])
 
-AC_CHECK_HEADER(zlib.h, , missing_deps="$missing_deps zlib")
-AC_CHECK_HEADER(bzlib.h, , missing_deps="$missing_deps libbz2")
-AC_CHECK_HEADER(lzma.h, , missing_deps="$missing_deps liblzma")
-AC_CHECK_HEADER(gcrypt.h, , missing_deps="$missing_deps libgcrypt")
-AC_CHECK_HEADER(solv/pool.h, , missing_deps="$missing_deps libsolv")
-AC_CHECK_HEADER(regex.h, , missing_deps="$missing_deps libregex")
+dnl dependencies we need to check for by hand
+export SYSROOT=$($CC --print-sysroot)/mingw
+AM_PATH_LIBGCRYPT
+unset SYSROOT
 
-if test -n "$missing_deps"; then
-   AC_MSG_ERROR([missing prerequisites: $missing_deps])
+save_LIBS=$LIBS
+LIBS="$LIBS -lbz2"
+AC_MSG_CHECKING([for bzip2])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[const char *version 
= BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
+AC_MSG_RESULT($HAVE_BZ2)
+LIBS=$save_LIBS
+if test "x$HAVE_BZ2" = "xno"; then
+AC_MSG_ERROR([bzip2 not found])
+  else
+BZ2_LIBS="-lbz2"
 fi
+AC_SUBST(BZ2_LIBS)
 
+dnl configure in libgetopt++
 prefix=`pwd`/inst; mkdir -p "$prefix"
 exec_prefix=$prefix
 ac_configure_args="$ac_configure_args --disable-shared"
 AC_CONFIG_SUBDIRS(libgetopt++)
 
-dnl add portability sources to inilint
 case "$host" in
 i?86-*-mingw32)
   SETUP="setup"
-- 
2.17.0



Re: Zstandard support for setup

2018-08-29 Thread Jon Turney

On 11/08/2018 20:52, Achim Gratz wrote:
[...]


The current code is available here:

http://repo.or.cz/w/cygwin-setup/local.git


Some comments:

This should check for ztd in configure.ac using PKG_CHECK_MODULES, 
rather than just assuming -lzstd is going to work.


The setup executables are cross-built on Fedora, so a 
mingw{32,64}-zstd-static package will need to become available.


compress_zstd.c:

+ using namespace std;

Please don't

compress_zstd.h:

+/* this is the parent class for all compress IO operations.
+ */

Comment is incorrect

I'd suggest removing all the 'virtual' since this class is final, but 
since all the compress subclasses have it, don't bother.



The debug output statements are still in the code (although commented),
I'll let that sit a while and see if I find something else I want to
clean up before I submit it for the upstream repo.


I'd suggest keeping potentially useful ones under #ifdef DEBUG/#endif 
rather than just removing them all.


how to use opam for package builds?

2018-08-29 Thread Andrew Schulman
orpie recently changed to an opam-based build system. So I want to use opam
to update it for Cygwin, but I've never used opam before and I have some
questions about how to use it.

The orpie build instructions say just to run "opam install orpie". When I
do that, opam complains that I haven't set it up yet:

$ opam install orpie
[ERROR] No OPAM root found at /home/andrew/.opam.
Please run 'opam init' to initialize the state of OPAM, or
specify '--root'.
See 'opam init --help' for details.

Now for packaging, what's the right thing to do here? For example I could
create the following install function for Cygport:

src_install()
{
opam init
opam install orpie
}

But this has two problems:

(1) I can't get "opam init" to complete. It hangs after "synchronized from
https://opam.ocaml.org";, until I interrupt it:

$ opam init
Checking for available remotes: rsync and local, git, mercurial.
  - you won't be able to use darcs repositories unless you install the
darcs command on your system.

[WARNING] Recommended external solver aspcud not found.

=-=- Fetching repository information
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
### hangs here until I hit ctrl-C: ###
[ERROR] Initialisation failed
User interruption

# opam-version1.2.2
# os  cygwin
Cannot remove /home/andrew/.opam (error 255).

(2) Even if I get this to work, I don't think it's the right thing to do
because it's setting up persistent opam configuration in my home directory,
which I don't think is the right place for packaging. Should there be some
global opam configuration, that all packaging scripts that rely on opam
would use? If so, where should that go?

Tnanks,
Andrew