Celestia: provide a Debian Stretch package

Created on 22 Jun 2017  ·  20Comments  ·  Source: CelestiaProject/Celestia

or maybe even provide a base /debian/ directory.

Context: Stretch (new stable), dropped Celestia. That's a huge loss for the Debian ecosystem and users.
(and, incidentally, the loss of the source of possible contributors too)

packaging

Most helpful comment

Hi,

here comes my step-by-step instruction for creatung a celestia package for Debian 9.

Happy building :-)

Install build dependencies

apt-get install git build-essential autoconf debhelper freeglut3-dev liblua5.1-dev libgnomeui-dev libgtkglext1-dev libtheora-dev chrpath libjpeg-dev

Fetch the source

git clone https://github.com/CelestiaProject/Celestia.git

Configure it

cd Celestia
autoreconf -iv
./configure --with-gnome --enable-cairo --enable-theora --with-lua --disable-warnings --prefix=/usr

Compile

make -j2

Workaround for make error

export MKDIR_P='mkdir -p'

Build Debian package

checkinstall -D --pkgversion 1.6.1 make install-strip

Get package dependencies

mkdir debian
touch debian/control
dpkg-shlibdeps /usr/bin/celestia
cat debian/substvars

Extract package

dpkg-deb -R celestia_1.6.1-1_amd64.deb .

Add dependencies to DEBIAN/control (add new line with "Depends: ")

Change menu entry file: usr/share/applications/celestia.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.6.1
Type=Application
Exec=celestia -c /usr/share/celestia/celestia.cfg
Icon=celestia
X-GNOME-DocPath=
Terminal=false
Name=Celestia
Comment=Space Simulator
StartupNotify=true
Categories=Astronomy;Science;Application;Education;

Build changed package

dpkg-deb --build . ../celestia_1.6.1-1_amd64.deb

All 20 comments

@drzraf Alexell does not work with Linux and is absolutely not familiar with the above. Now we do not have a person who understands the Celestia code for Linux.
Please describe, what exactly should we do to solve the problem? Who can do this?

[ ] someone using Debian who already did a Debian package (or want to learn it)
[ ] install the necessary Linux build environment for Celestia
The most standard are the build-tools needed (autotools, cmake, ..) the better/simpler
[ ] build, run and test Celestia on Debian

From this one could create Debian necessary files (possibly modifying old version) which stipulate some characteristics of the program.
[ ] the dependencies it needs to be built [software/versions]
[ ] the dependencies it needs to be run [software/versions]

If for some reason it crashes, bug, ... some custom patches are needed
and these are often the most painful work for Debian maintainer.
Having most fixes quickly inside upstream code helps a lot here.

In the best case Debian/Linux wouldn't need additional patches neither to build nor to run. Then packaging would just be a few basic files away (https://wiki.debian.org/Packaging) and then downloadable/installable easily.

Having the package distributed (again) in Debian's 9 repository is a bit more of "social work", but I think software building/stability on Linux is the only real possible show-stopper.

Another/Alternative direction by the way: flatpak

@drzraf You are well versed in what you write. Maybe you can do everything yourself? We will be very grateful for the help.

I tried to install Celestia on Stretch and I had problems with glu.h, libjpg, libpng and the version of lua requested is too old, even after having successfully configured the make failed
may be helpful

ok, I and especially my kids are missing celestia for some time now. My first attempt was as well to just build from the code for 1.6.1 from the celestia projetc page (how hard can it be...). Some code fixes later a linker error stopped me. Today I got it running for the first time after some years on Ububtu 17.10.

What next? Is there some way to provide my changes and bring celestia back some time?

One question as I am definitely no automake guru... I needed to workaround one aspect on the command line:

-ldl -llua5.1 ../celengine/libcelengine.a -ldl ../celtxf/libceltxf.a

the problem was that all celestia libraries are in an automake variable $(all_libraries) and for some reason the -ldl needs to be exactly behind libcelengine.a.... the first -ldl does not help. Can I put a linker flag for a specific library like libcelengine.a?

happy to help getting it back - my kids will be happy has celestia is really a great and intersting way to view our universe :).

Great @TheBigW.
Do you think that -ldl compilation tweak was this one in the previous Celestia Debian package ?
See https://sources.debian.net/src/celestia/1.6.1%2Bdfsg-3.1/debian/patches/ (OP) for the list of patches needed to build Celestia in previous Debian releases.

I've the impression that starting from the debian/ directory of the 1.6.1 package could be the right direction. Then, using dpkg-buildpackage, you should be able to produce a Debian package.

What would probably have to be adapted from the current debian/ directory are probably:

  • build/runtime dependencies' versions in the control file (use Debian's Stretch version)
  • patches/ for which there is a serie file which determinate which one apply in which order, and which do not
  • maybe changelog
    (some may have been integrated into Celestia's git, other some may not but most of them probably should)

I'd be glad to be able to dpkg-buildpackage myself (I'm on Debian Stretch) with the changes you will add to the debian/ directory. Then I'd could test the stability of the resulting package.
(at some point, you could open an ITP-bug (Intend to Package) on Debian's bugtracker and hope that a stable package could come back in the repositories and please so many Debian users.

Hi drzraf,
the -ldl mentioned above shall work but as far as I have seen only fixes it in the configure file. If I am not wrong the next ./configure would override it - but for building the package this will work (still better than manual linking on command line :) ).
One question: I used the Ubuntu src package I found as zip for download. This works for me but of course misses all the Debian specifics (changelog etc...).Do you know how I can get the previous debian celestia src package running on a different linux (I am on Ubuntu 17.10). I know that worst case I can get Jessie in a VM and do a "apt-get source", but an easier way is preferable.

ok, I found a source package here (basically the same I got on the ubuntu package page):
http://http.debian.net/debian/pool/main/c/celestia/celestia_1.6.1+dfsg.orig.tar.gz
problem is that to maintain the history, changelog etc. I would propably need the complete debian subfolder from your source link. If it is ok to build from above source package form scratch I can proceed but the previos deb/package history would be lost even if I copy at least the changelog. Is it still worth to go ahead?

and to reply (maybe) more specifically to the point:

Let's ping ex-maintainer @gsliepen / uploader @kees

... and quote the original issue which lead to package orphaning 2 years ago:

Upstream has not produced any new releases in the last 4 years.
In the mean time, the package is accumulating bugs due to bitrot. It already
wasn't a trouble-free package, due to some quite important resources not
being DFSG compliant.

In order to get Celestia back into Debian, you need to address the reasons I had to remove it in the first place:

  • Make proper releases.
  • If you want to have Celestia in Debian's main archive, then ensure it comes with DFSG compatible data files.
  • Make sure it runs properly on contemporary hardware runnign Linux. Test it with reasonably recent AMD, Intel and Nvidia cards.
  • Ensure it compiles without warnings (not only the code, but also autoconf and automake should run without warnings), and works properly with libraries that are in Debian.
  • Ensure there is a dedicated maintainer for the Debian package (which will not be me).

Last but not least, Celestia really needs a serious do-over. Move to C++11, use the standard library and Boost where approriate, change the rendering engine to require OpenGL ES 2.0 and drop support for anything older than that. Don't try to support 5 different frontends on Linux (and that's not even counting Windows and Mac stuff), but go for something that's truly cross-platform and stick with that. If you can do without a full-blown widget toolkit, I'd go for SDL2, otherwise I'd recommend Qt5. If you won't commit to this, I'm afraid I don't see a bright future for Celestia.

just when I finished to create the 1st unsigned deb packages for testing :). Basically it would be fine for me (and maybe others) if there is any way to get it installed/running on debian/Ubuntu again at all. This does not necessarily mean to have it as part of the debian main archive.
Problem at the moment is that there is no way as non of the packages (neither the old deb package nor the package directly from the celestia site) even get past compiling...

I can handle the code aspects as long as it means cleanup (warning free, C++11 etc.) - anything further is a quite big assignment. Do-over sounds interesting ... maybe something to think about ...

Ok, looks like the celestia team has heard us and develops a new QT5 version for windows right now :) :

https://github.com/CelestiaProject/Celestia

I got it compiled for Ubuntu now and it works out of the box. I will discuss with them how to get my changes back to them and I will also see how to get a .deb binary package done.

Is this something to be considered again or shall I rather just focus to get the linux support working for them and have it just hosted on their side?

Hi,

here comes my step-by-step instruction for creatung a celestia package for Debian 9.

Happy building :-)

Install build dependencies

apt-get install git build-essential autoconf debhelper freeglut3-dev liblua5.1-dev libgnomeui-dev libgtkglext1-dev libtheora-dev chrpath libjpeg-dev

Fetch the source

git clone https://github.com/CelestiaProject/Celestia.git

Configure it

cd Celestia
autoreconf -iv
./configure --with-gnome --enable-cairo --enable-theora --with-lua --disable-warnings --prefix=/usr

Compile

make -j2

Workaround for make error

export MKDIR_P='mkdir -p'

Build Debian package

checkinstall -D --pkgversion 1.6.1 make install-strip

Get package dependencies

mkdir debian
touch debian/control
dpkg-shlibdeps /usr/bin/celestia
cat debian/substvars

Extract package

dpkg-deb -R celestia_1.6.1-1_amd64.deb .

Add dependencies to DEBIAN/control (add new line with "Depends: ")

Change menu entry file: usr/share/applications/celestia.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.6.1
Type=Application
Exec=celestia -c /usr/share/celestia/celestia.cfg
Icon=celestia
X-GNOME-DocPath=
Terminal=false
Name=Celestia
Comment=Space Simulator
StartupNotify=true
Categories=Astronomy;Science;Application;Education;

Build changed package

dpkg-deb --build . ../celestia_1.6.1-1_amd64.deb

On Mon, Dec 04, 2017 at 06:26:59AM +0000, m23project wrote:

here comes my step-by-step instruction for creatung a celestia package for Debian 9.

This is NOT how proper Debian packages should be built. This will never
be accepted in Debian, and I think you are doing others a disservice by
presenting these instructions.

Please see https://wiki.debian.org/Packaging/Intro and/or the links
posted by @dzraf.

--
Met vriendelijke groet / with kind regards,
Guus Sliepen guus@tinc-vpn.org

Hi,

it was not my intention to build a package valuable to be included to Debian.
It's just a step-by-step for people who want build a package on their own.

Cu Hauke

Hi! I'm currently working on a package for the debian-based distro HuayraLinux. When i have a mostly usable package (using the Qt5 frontend) (and debian/ folder that recreates it) i will update this.

I've seen that earlier versions of celestia were split in several packages on debian (mostly for legal resons). Can anyone give me some support on what-goes-were? I have no experience on legal issues but if i can build an usable package i think it can be really useful for the redistribution of Celestia.

PS: Keep up the good work! Celestia is a wonderful software!

EDIT: I have a quick&dirty working package that uses the WorkInProgress debian cspice package

I would highly appreciate it if you guys provide snap or flatpack images.

we provide *.deb and *.appimage through https://build.opensuse.org/package/show/home:munix9:unstable/celestia

Hi,

I am from the Debian Astro team.

Since the Debian files look quite good already: would you consider to maintain the package directly within Debian? This would allow people to install Celestia without any additional efforts in the standard way.

Best regards

Ole

Hi Ole,

That's actually was my plan but when 1.7 is released. For an upcoming 1.6.2 version we still have the old issue with licenses for some textures. And for Unix-like systems 1.6.x provides glut and gtk2 interfaces only and I'm afraid Debian will drop it (gtk2) sooner or later.

Was this page helpful?
0 / 5 - 0 ratings