Menu

problems using remote repositoy

wpkg
Ric
2015-01-28
2018-02-28
  • Ric

    Ric - 2015-01-28

    Hi, I am new to wpkg;
    Just downloaded to test it and verify if fits my needs.
    I'd like to have a my own repository of packages, targets will be win and linux systems.
    My repository will be under http.
    I've:

    • installed the latest version for win and compiled it under linux 32.

    • created the admin dir.

    • created a test pakage, just to see how it works.

    Installing locally (wpkg -i ./thePackage.deb) it's ok.
    So I've tried to setup the remote repo.
    Here is where the problems begin:
    first of all, the command to create the index is quite different respect the manual: to create the index I have had to do:

    cd [path of the repo]
    wpkg --create-index index.tar.gz --repository `pwd`
    

    (the parameters are different respect of the manual http://windowspackager.org/documentation/wpkg/wpkg-create-index ).

    the directory with index and package is visible via http and it is: http://uburik.klab/wpkg/repo/
    so I did:

    wpkg --add-sources "wpkg http://uburik.klab/ wpkg repo"

    wpkg --update

    It worked, anyway I am not able to install anything, in fact if I call:

    wpkg --install my-node_1_win32.deb
    

    wpkg answers:
    wpkg:fatal: 2015/01/28 12:56:48: could not determine the real path of "my-node_1_win32.deb" ("my-node_1_win32.deb") (tool)

    while if I do
    wpkg --install http://uburik.klab/wpkg/repo/my-node_1_win32.deb
    all I get is:
    wpkg:fatal: 2015/01/28 12:56:14: filename "http://uburik.klab/wpkg/repo/my-node_1_win32.deb" is not a direct filename, os_filename() cannot work on such (tool)

     wpkg --repository http://uburik.klab/wpkg/repo/   --install http://uburik.klab/wpkg/repo/my-node_1_win32.deb  --force-all
    wpkg:warning: 2015/01/28 18:13:49: repository "http://uburik.klab/wpkg/repo/" is not a local file and cannot be checked prior to actually attempting to use it. (validate-removal)
    wpkg:fatal: 2015/01/28 18:13:49: filename "http://uburik.klab/wpkg/repo/my-node_1_win32.deb" is not a direct filename, os_filename() cannot work on such (tool)
    

    may be I am doing something wrong, but the lack of full examples and the inconsistency of the manual does not help me :)

    Someone can help me?

    Thanks,
    RIc

    By the way, in some cases wpkg on Linux works different from wpkg on Win, for example:
    to remove a source under linux I have to use the index written by wpkg --list-sources --verbose,while under win I must use "the index -1" AND index 0 crashes the program.
    (I think this is no doubt a bug).

     

    Last edit: Ric 2015-01-29
  • Alexis Wilke

    Alexis Wilke - 2015-01-28

    If I am correct, you use just the name of the package. Something like this:

    wpkg --install my-node
    

    When using the repository, it will search for the package with the newest version (largest) and the architecture comes from your root folder (under core, the control file there has the installation architecture.) This is very similar to the apt-get install command.

    This error, in your test with the full path using HTTP:

    wpkg:fatal: 2015/01/28 12:56:14: filename "http://uburik.klab/wpkg/repo/my-node_1_win32.deb" is not a direct filename, os_filename() cannot work on such (tool)
    

    looks like a bug where the os_filename() function verifies the filename and improperly ignores the fact that there could be a protocol. I thought that was fixed in the latest version, although it could be that it is only in the repository and not in the wpkg.exe available for download.

    One thing to do, to make sure that the path is correct, is run wget against it. That way you can make sure the file can be downloaded. Otherwise, obviously, wpkg will also not be able to get the file. Something like this should work:

    wget http://uburik.klab/wpkg/repo/my-node_1_win32.deb
    

    If wget gets you an error, then obviously your Apache (or whatever HTTP server you're using) is not setup right and that needs to get fixed first.

    I will be looking into a way to have a more complete example in the source package so people can at least see how it is supposed to work. With README.txt files and such it should be a lot easier to get it all to work.

     

    Last edit: Alexis Wilke 2015-01-28
    • Ric

      Ric - 2015-01-29

      Hi ALexis,
      thankyou for the prompt answer :)

      first of all: the http path is correct, I can see the file in the browser and wget gets it, too :)

      I have to say that the same errors happens in windows AND in linux, too.
      The os_filename() bug happens also under linux

      Regarding your other point:
      if I use

      wpkg --install my-node
      

      I get:

      ~$ wpkg -i my-node
      wpkg:error: 2015/01/29 10:19:07: [package:my-node] package "my-node" cannot be used with --install, --unpack, or --check-install. (validate-installation)
      wpkg:fatal: 2015/01/29 10:19:07: cannot open "/var/lib/wpkg/my-node/index.wpkgar" for reading from current working directory "/home/riccardo/wpkgTest" (tool)
      

      under windows I get the same, (I enclose some other pieces of tests, to show that the previous steps should be ok):

      C:\Users\riccardo>wpkg --list-sources
      wpkg http://uburik.klab/ wpkg repo
      
      C:\Users\riccardo>wpkg --update
      
      C:\Users\riccardo>wpkg --install my-node
      wpkg:error: 2015/01/29 09:27:11: [package:my-node] package  "my-node" cannot be used with --install, --unpack, or --check- install. (validate-installation)
      wpkg:fatal: 2015/01/29 09:27:11: cannot open "C:/var/lib/wpkg/my-node/index.wpkgar" for reading from current working directory "C:/Users/riccardo" (tool)
      
       

      Last edit: Ric 2015-01-29
  • Ric

    Ric - 2015-01-29

    I am also trying to use a local repository, but it does not work even.

    the only way it works, for me, is using the absolute paths - I could say "debug mode"

    (I am using the nightly build, compiling on linux)

    $cat /var/lib/wpkg/core/control 
    Architecture: mswindows-i386
    Description: Database description and status.
    Maintainer: test     <riccardo@klab.it>
    Package: core
    Version: 0.9.4
    
    riccardo@uburik:~$ wpkg --list-sources --verbose
    file: "/var/lib/wpkg/core/sources.list"
      1. wpkg file:///home/riccardo/ wpkgTest repo
    riccardo@uburik:~$ ls -al /home/riccardo/wpkgTest/repo
    total 15880
    drwxrwxr-x 2 riccardo riccardo    4096 Jan 29 11:07 .
    drwxrwxr-x 6 riccardo riccardo    4096 Jan 29 10:02 ..
    -rw-rw-r-- 1 riccardo riccardo 1463474 Jan 28 12:10 gras_1_win32.deb
    -rw-rw-r-- 1 riccardo riccardo     550 Jan 29 11:06 index.tar.gz
    -rw-rw-r-- 1 riccardo riccardo 4926930 Jan 29 11:06 my-node_1_linux-amd64.deb
    -rw-rw-r-- 1 riccardo riccardo 4926912 Jan 29 11:06 my-node_1_mswindows-i386.deb
    -rw-rw-r-- 1 riccardo riccardo 4926906 Jan 28 12:09 my-node_1_win32.deb
    riccardo@uburik:~$ wpkg --update --verbose
    wpkg:info: 2015/01/29 12:16:39: successfully updated index file from repository: "/home/riccardo/wpkgTest/repo/index.tar.gz". (repository)
    
    riccardo@uburik:~$ wpkg --list-index-packages /home/riccardo/wpkgTest/repo/index.tar.gz  --verbose 
        324  Wed Jan 28 12:10:14 2015  gras_1_win32.ctrl
        293  Thu Jan 29 11:06:09 2015  my-node_1_linux-amd64.ctrl
        296  Thu Jan 29 11:06:04 2015  my-node_1_mswindows-i386.ctrl
        287  Wed Jan 28 12:09:59 2015  my-node_1_win32.ctrl
    
    riccardo@uburik:~$ wpkg --verbose --install my-node
    wpkg:debug: 2015/01/29 12:18:22: validate directories (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate package name (validate-installation)
    wpkg:error: 2015/01/29 12:18:22: [package:my-node] package "my-node" cannot be used with --install, --unpack, or --check-install. (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate installation type (source/binary) (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate installed packages (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate architecture (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate pre-dependencies (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate dependencies (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate distribution name (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate packager version (validate-installation)
    wpkg:debug: 2015/01/29 12:18:22: validate fields (validate-installation)
    
    riccardo@uburik:~$ wpkg --verbose --install /home/riccardo/wpkgTest/repo/my-node_1_mswindows-i386.deb 
    wpkg:debug: 2015/01/29 12:19:05: validate directories (validate-installation)
    wpkg:debug: 2015/01/29 12:19:05: validate package name (validate-installation)
    wpkg:debug: 2015/01/29 12:19:05: validate installation type (source/binary) (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate installed packages (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate architecture (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate pre-dependencies (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate dependencies (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate distribution name (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate packager version (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate fields (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate size and overwrites (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: validate hooks (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: unpacking "my-node" (validate-installation)
    wpkg:debug: 2015/01/29 12:19:07: configuring "my-node" (validate-installation)
    
     

    Last edit: Ric 2015-01-29
  • Alexis Wilke

    Alexis Wilke - 2015-01-29

    Okay, I will take a day this weekend to work on a full example. I guess I'll take libz which has no dependencies (except to build it...) and do a complete example that I will upload here. That way it should make it a lot easier for others to make all of that work.

     
  • Alexis Wilke

    Alexis Wilke - 2015-01-31

    A quick look at the code and I see that I did not publish the latest changes by Mathiew and Trent, which could explain why you are having problems with the os_filename() function. I am still working on sample7 to include a complete cycle from a project source tarball to a set of wpkg packages on an HTTP server.

     
  • Mathieu SCHROETER

    On the way, please, have a look on the Krasovsky's patches. They fix some problems like the generator argument for cmake, the builds for mingw64, ....

    http://sourceforge.net/p/unigw/discussion/647573/thread/fe87155c/

    :-)
    Thanks

    Regards

     

    Last edit: Mathieu SCHROETER 2015-02-01
  • Alexis Wilke

    Alexis Wilke - 2015-02-02

    Well... there are quite a few bugs that I introduced by not maintaining that part of the software! I had to use the full URI to the package to be able to install it after I fixed the various parts of wpkg that would otherwise prevent the use of such a path.

    I'm quite surprised that I did not work on that part. It looks like the --install command never supported going out using the "sources". It is capable to make use of the --repository but not the sources. I can see that I have not yet implemented that part.

    I am thinking to make a first release that is semi-usable, then look into adding support for repositories defined in sources.list to the --install so that way you can really install things a la Debian.

     
  • Alexis Wilke

    Alexis Wilke - 2015-02-02

    Okay, I uploaded version 0.9.5. If you get the source, you will see a new test named sample7. There is a script named build-linux which one can run under Linux, assuming one fixes the various folders defined in variables at the top to match one's computer setup. This does everything from a source package, to compiling and generating the binary packages, and then installing it. That last step is "broken" as it requires the user to specify the full URI instead of just the name of the package to install (as I mentioned in my previous post.)

     

    Last edit: Alexis Wilke 2015-02-04
    • Ric

      Ric - 2015-02-02

      Hi Alexis,

      I can confirm that the things are running as you said:
      during "--install" I do not have errors, but I must use the absolute URI; remote sources, are ignored ( cannot use "packet" instead of "paket_verion_arch.deb").

      Conversely, the --upgrade option does work well,reading by the source (I mean, I can call "--upgrade package").

      I look forward for the next, full working, version 8)

      Thank you!!

      RIc

       

      Last edit: Ric 2015-02-02
  • Pim

    Pim - 2015-02-03

    I am also looking forward to a fix to this issue!

     
  • Alexis Wilke

    Alexis Wilke - 2015-03-10

    Just in case, we applied a fix to make the --install aware of the repositories in the sources.list file. So that should be working with the latest version.

     
  • Robert Pyttel

    Robert Pyttel - 2018-02-28

    Hello,

    i am still having that issue in version 1.0.0 on a Windows 10 System.

    I have an Apache-WebServer, where my deb files are located
    and trying to install from that source.

    wpkg --install "http://localhost/deb/testhw_1.0.0_all.deb" --force-all

    wpkg:fatal: 2018/02/28 10:51:56: filename "http://localhost/deb/*" is not a direct filename, os_filename() cannot work on such (tool)

    My sources.list looks like this:

    C:\var\lib\deb>wpkg --list-sources
    wpkg http://localhost deb
    wpkg file:C:/var/ lib deb

    Any suggestions about that issue? Do i have to adjust something in the configuration?

    Many thanks in advance.

    P.S.:
    The localhost WebServer is an apache WebServer, maybe due localhost loopback?
    Interestingly it works with an remote extern ftp repository, just tested.

     

    Last edit: Robert Pyttel 2018-02-28

Log in to post a comment.