News:

SimuTranslator
Make Simutrans speak your language.

Simutrans Experimental DEB for Debian, Ubuntu, Linux Mint

Started by Vonjo, July 05, 2012, 12:11:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vonjo

Here is the deb package of Simutrans Experimental 10.11 for Debian Linux and its derivatives (Ubuntu, Mint, etc). :D

simutrans-experimental 10.11 executable files (i386)
simutrans-experimental 10.11 executable files (amd64)
simutrans-experimental 10.11 data and configuration files
You need to install simutrans-experimental-data package first.

I haven't created any deb package for pakset as I write this. So, you need to manually copy the pakset folder to /usr/share/games/simutrans-experimental/ for the time being. ;D

jamespetts

Splendid! Thank you for doing this. Would it be possible to create a single package containing all of the data files, executable and one or two paksets? This would make for a much more user friendly install.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

I don't think it is a good idea. The data/config and pakset package can be used by a lot of other packages. For example, the graphic executable and the non-graphic executable use the same data and pakset package. The executable can be compiled to multiple architecture, like i386, amd64, and ARM. So, in this scenario, the data and pakset can be used by 6 other package. Putting executable, data/config, and pakset in a single package will create duplicates.

Besides, in my opinion, installing 3 packages is still user friendly. It is easier than requiring user to manually extract multiple zip archive and run from terminal. The user only need to download and double-click 3 packages. When one of the package is updated, the user doesn't need to re-install all of them.
The sequence is:
1. install data package
2. install executable package
3. install pakset package

There is another option which may be more user friendly: making our own repository server. It can install depedencies/requirements automatically. We can also push update to user automatically. Seting up a trivial debian repository for a few packages should be easy.

jamespetts

#3
Ahh, I see the point. A repository server is an interesting idea indeed. How much processing power/bandwidth space do you think that one of those would take?

Edit: Does anything in this thread affect matters at all?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

cheesehead

Quote from: jamespetts on July 07, 2012, 11:17:16 AMHow much processing power/bandwidth space do you think that one of those would take?

Very little. While the package itself is fairly large, the number of likely downloaders seems reasonably small.
The host must be prepared for a small spike when new releases are packaged.

Quote from: jamespetts on July 07, 2012, 11:17:16 AMDoes anything in this thread affect matters at all?
I see no affect there, as long as the main and -experimental packages don't have a same-name conflict.

jamespetts

Quote from: cheesehead on July 07, 2012, 01:32:37 PM
Very little. While the package itself is fairly large, the number of likely downloaders seems reasonably small.
The host must be prepared for a small spike when new releases are packaged.

I ask because I am wondering whether I could host it on the same server as on which I host the server game without it interfering with performance excessively - any thoughts?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

As long as the bandwidth is reasonable on the server you shouldn't have issues (processing power is not really needed).

jamespetts

Thank you - that's helpful. I've never set up a repository server before - how does one go about it?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Quote from: jamespetts on July 07, 2012, 11:17:16 AM
Edit: Does anything in this thread affect matters at all?
I'll test it soon.

Quote from: jamespetts on July 07, 2012, 02:45:28 PM
Thank you - that's helpful. I've never set up a repository server before - how does one go about it?
Do that server runs Debian? It is not a requirement though. I just need to know it first, so I can tell you how to set it up.

jamespetts

My server runs Ubuntu. Is that close enough to Debian for these purposes?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Yes, I can tell you later, I still have something to do. :)

Vonjo

I just know that, for security reason, Ubuntu Software Center doesn't support trivial repository. To make it work with Ubuntu Software Center, you should create full and signed Debian repository. It is not really hard to do that, though, it just need some extra steps and more knowledge about Debian repository. If you interested in it, I can make the deb packages for the next release support this feature.
http://wiki.debian.org/SettingUpSignedAptRepositoryWithReprepro

Like this: :D
http://simutrans-germany.com/files/upload/Screenshot_from_2012-07-08_13:00:49.png

If you need an example of how it will look like:
http://43-1.org/~simutrans/packages/

If you just don't care, you can create a trivial repository which is easier. The packages can still be installed using apt-get, synaptic, and apptitude. It just doesn't work with Ubuntu Software Center. I have a simple script to manage this.

jamespetts

I am very interested indeed in this feature! Do you need me to set up my server to serve these packages? If you're able to provide a script to set things up/manage things, that'd be most helpful. Thank you very much!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Nice you like it. :)
Unfortunately, you need to setup the repository server by yourself. It should only hard to set it up for the first time. Adding and removing package later using reprepro is easy. No need for complex script. You may only need my script for trivial repo.
I can only provide the deb packages.


But I think, currently, there are still a few linux simutrans-experimental players. We need to see how many people demand this feature, first.

jamespetts

Ahh, I think that it might be rather a chicken and egg thing, perhaps - there might well be far more Linux Simutrans-Experimental players if installation was much easier! On the other hand, we could set up the trivial server that you described, and see how popular that that is before considering making it more sophisticated?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Ok, here is the script and directory structure for a simple trivial repo.

1. Extract the archive in the attachment below to any directory in your server's www or public_html directory.
2. Edit the script in the archive. Change the BASE variable to the directory where you put the extracted archive above, and move it somewhere unaccesible to public.
3. Move the deb packages to the binary-xyz directory, depending on the architecture. The architecture can be identified by looking at the filename of each deb packages.

Now, everytime you add, change, or remove any deb packages in the repo directory above, you need to run the script above to update the index file (Package or Package.gz file). You may need to install dpkg-dev if it haven't been installed.
Done. :)

Note : It looks like binary-all doesn't always work in some system. That's why the script above doesn't create Package.gz in binary-all directory. Instead, binary-all directory is symlinked to each binary-xyz directory.


Some info : www.ibiblio.org/gferg/ldp/giles/repository/repository-2.html

jamespetts

Thank you for this - that is most helpful. One query, though, about the relationship between the first and second instructions: what is it that I ought be moving to somewhere inaccessible to the public? Is it the extracted archive that should be inaccessible to the public? If so, is there reason that you suggest initially extracting it somewhere that is accessible to the public?

Sorry if I am being dim - I don't have much experience in server administration!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Sorry for being unclear.
I mean, move the script to somewhere unaccesible to public (for security reason). Only the script needs to be moved somewhere else non-pubilc.

jamespetts

Vonjo,

I have had a go at this. I notice that there is a "sources" directory, but no sources package (should people not be directed to Github instead, I wonder?). When I execute the script, I get the following output:


dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning:   simutrans-experimental simutrans-experimental-data
dpkg-scanpackages: info: Wrote 2 entries to output Packages file.
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning:   simutrans-experimental simutrans-experimental-data
dpkg-scanpackages: info: Wrote 2 entries to output Packages file.
rm: cannot remove `/var/www/repository/dists/stable/main/binary-all/Packages*': No such file or directory
./update-repo.sh: line 35: dists/stable/main/i386/Sources.gz: No such file or directory
find: `dists/stable/main/i386': No such file or directory
Use of uninitialized value $name in sprintf at /usr/bin/dpkg-scansources line 105.
dpkg-scansources: error: error closing  ($? 256, $! `')


Is this all in order (the error only because of the lack of sources), or is there an issue? The public directory for the installation is http://www.bridgewater-brunel.me.uk/repository if you want to check whether all is in order there.

How does one go about putting together the files to go into the directory in the first place at the time of each release?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Nice.  8) Thank you very much.  :D

Quote from: jamespetts on July 10, 2012, 10:45:26 PM
I have had a go at this. I notice that there is a "sources" directory, but no sources package (should people not be directed to Github instead, I wonder?).
You don't have to worry about source package for now. I haven't uploaded the source package. The repository can work without it.
Quote from: jamespetts on July 10, 2012, 10:45:26 PM
How does one go about putting together the files to go into the directory in the first place at the time of each release?
When you update the package on the server, you need to run the script again.
If the user disabled automatic update, he/she need to run sudo apt-get update when a new release available.

To add the repository to the system:
1. Run Synaptic -> Settings -> Repositories, OR run Ubuntu Software Center -> Edit -> Software Sources
2. On Software Sources dialog, click Other Software -> Add -> enter this: deb http://www.bridgewater-brunel.me.uk/repository stable main
3. Click 'Reload' from Synaptic, or run from terminal: sudo apt-get update
4. Simutrans experimental can be installed from Synaptic, or using this terminal command: sudo apt-get install simutrans-experimental


jamespetts

I understand how to update the packages using the script (and thank you for the instructions on how to set up the repository, which I shall copy and paste into my "How to get Simutrans-Expermiental" thread when I have time if you don't mind); but how does one go about generating the packages in the first place? Would it be possible, for example, to set up a script to: (1) download the latest build from the master branch; (2) build i386 and x64 versions of it if it has changed since the last build, both the graphical version and the server version; (3) construct .deb packages from them, if they have changed; and (4) update the packages in the repository, and do this automatically as a cron job? Or would step (2) interfere too greatly with the running server? (Perhaps there are times of day - say 0500h GMT - when the server is so little used that this is not an issue).

Thank you very much for your help with this!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Quote from: jamespetts on July 11, 2012, 11:36:00 AM
(and thank you for the instructions on how to set up the repository, which I shall copy and paste into my "How to get Simutrans-Expermiental" thread when I have time if you don't mind)
I don't mind.
Quote from: jamespetts on July 11, 2012, 11:36:00 AM
but how does one go about generating the packages in the first place? Would it be possible, for example, to set up a script to: (1) download the latest build from the master branch; (2) build i386 and x64 versions of it if it has changed since the last build, both the graphical version and the server version; (3) construct .deb packages from them, if they have changed; and (4) update the packages in the repository, and do this automatically as a cron job? Or would step (2) interfere too greatly with the running server? (Perhaps there are times of day - say 0500h GMT - when the server is so little used that this is not an issue).
Of course it is very possible. Just ask git to check whether there is a new release. You can even create a nightly build with that! :D
I have a script which can generate a deb package from a pakset folder (and can be used for the data/config package too). However, I haven't yet made a script which builds the executable package.

Building the executable package itself should not be hard, it only hard for the first time. Once everything is set up, the process can be done easily for the next time. :D
Info : http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html
For Simutrans:
Build-Depends: debhelper, autotools-dev, libsdl1.2-dev, libsdl-mixer1.2-dev, zlib1g-dev, libpng-dev, libbz2-dev, dpkg

The building process for simutrans is usually about 10-20 minutes, depending on the server specifications. So to build 4 versions (2 arch, graphic and non-graphic), it can reach about an hour.

jamespetts

I am looking into doing this for the current released version (10.13). Do you have your script for building the pakset available so that I can make use of it? Also, a rather belated query about your last post: is,

Build-Depends: debhelper, autotools-dev, libsdl1.2-dev, libsdl-mixer1.2-dev, zlib1g-dev, libpng-dev, libbz2-dev, dpkg

the exact command that I need to issue to build the package from the executable? Apologies if I am being dim. I should very much like to have Linux packages for Simutrans-Experimental in the near future.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.