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`
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
(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 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)
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
If I am correct, you use just the name of the package. Something like this:
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:
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:
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
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
I get:
under windows I get the same, (I enclose some other pieces of tests, to show that the previous steps should be ok):
Last edit: 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)
Last edit: Ric 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.
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.
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
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.
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
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
I am also looking forward to a fix to this issue!
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.
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