Re: plans for eclipse luna in debian
- To: Markus Koschany <apo@debian.org>
- Cc: debian-java@lists.debian.org
- Subject: Re: plans for eclipse luna in debian
- From: Luca Vercelli <luca.vercelli.to@gmail.com>
- Date: Thu, 7 Jan 2016 13:14:52 +0100
- Message-id: <[🔎] 568E56BC.3060302@gmail.com>
- In-reply-to: <566DDFF8.6060007@debian.org>
- References: <551EA3D7.30105@onenetbeyond.org> <5617EEA7.6030803@gmail.com> <5617F732.6060202@gambaru.de> <562246E8.7050209@gmail.com> <5622636C.2030008@gambaru.de> <5623BF70.3040907@gambaru.de> <56261E4C.8010503@gmail.com> <56267489.3040909@gambaru.de> <5641E335.2060907@gmail.com> <56423C7A.7080509@gambaru.de> <5644853D.2060507@gmail.com> <56461911.1090907@gambaru.de> <566707FA.60506@gmail.com> <566DDFF8.6060007@debian.org>
Here is a rules file to download sources.
Now, what about Tycho's dependency on Eclipse? If you want a more
"clean" solution, I could create another package "eclipse-bundles", with
the same sources of eclipse, that build and install just the few (100)
bundles required by Tycho compilation. This could create also related
maven artifacts.
Il 13/12/2015 22:15, Markus Koschany ha scritto:
> Am 08.12.2015 um 17:40 schrieb Luca Vercelli:
>> Any news about it?
>>
>>
>> Il 13/11/2015 18:08, Markus Koschany ha scritto:
>>> Am 12.11.2015 um 13:25 schrieb Luca Vercelli:
>>>> Thank you Markus.
>>>> Here I attach a more complete version. Please ignore the file I sent you
>>>> before, and consider only this one.
>>>> I've written a "README" that should be enough, otherwise just ask me.
>>>>
>>> Hi Luca,
>>>
>>> thank you for sending the debian directory. I will create a new git
>>> repository tomorrow and try to build Tycho.
> Hello Luca,
>
> sorry for the late reply. The debian directory that you sent to me was
> unfortunately by far not complete to create a working Debian package and
> I haven't found the time to wrap my head around the issues.
>
> For instance the tarball from
>
> http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-tycho-0.23.0.tar.xz
>
> contains tons of embedded jar files which we must remove to create a
> Policy compliant Debian package. The eclipse-bootstrap.sh script creates
> directories in /usr/share/maven-repo which requires root permissions.
> The other tycho-* shell scripts modify various variables and pom files
> with ugly sed commands and in order to build a Debian package we have to
> call debian/rules in the end, so all those hacks and commands must be
> translated into a working rules file. I know I surely have to blame
> myself for writing "to solve this issue with the least amount of effort"
> but the current approach is too hackish and would only work for an
> unofficial version.
>
> You usually should start with creating a so called orig-tar.sh script
> which you can call by using the get-orig-source target in debian/rules.
> This ensures that people can download the original sources with just one
> command: debian/rules get-orig-source
>
> It's fine to merge the two tarballs into one as described in your README
> file. At the same time this target should also remove all files which
> are not DFSG-compliant like all jar and class files and files with
> non-free licenses.
>
> This wiki page is an excellent resource for writing such
> "get-orig-source" targets.
>
> https://wiki.debian.org/onlyjob/get-orig-source
>
> The next step is to convert all scripts that modify the original sources
> into patches which are stored in debian/patches with an informative
> description and patch header, so that we can properly maintain them in
> the future. You can also rewrite maven artifacts and group ids with the
> maven.rules or maven.ignoreRules file. Often you won't even need a patch
> to accomplish this goal.
>
> At the moment I would rather suggest to start with an easier package
> because Tycho doesn't appear to be a rewarding task for people new to
> Debian packaging.
>
> Regards,
>
> Markus
>
>
#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/default-java
PKG=tycho
VER=0.23.0
DTYPE=+dfsg
UVER=0.23.0
UURL=http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-tycho-$(UVER).tar.xz
FUURL=https://github.com/rgrunber/fedoraproject-p2
TEMPDIR=tmp1233432143
#maven 3
%:
dh $@ --parallel --buildsystem=maven
dh_autoclean:
/usr/lib/jvm/default-java/bin/java -noverify -cp /usr/share/maven/boot/classworlds.jar:/usr/lib/jvm/default-java/lib/tools.jar -Dclassworlds.conf=/etc/maven/m-debian-nodocs.conf org.codehaus.classworlds.Launcher -s/etc/maven/settings-debian.xml -Ddebian.dir=/src/tycho-debian/org.eclipse.tycho-tycho-0.23.0/debian -Dmaven.repo.local=/src/tycho-debian/org.eclipse.tycho-tycho-0.23.0/debian/maven-repo clean
dh_build:
/usr/lib/jvm/default-java/bin/java -noverify -cp /usr/share/maven/boot/classworlds.jar:/usr/lib/jvm/default-java/lib/tools.jar -Dclassworlds.conf=/etc/maven/m-debian-nodocs.conf org.codehaus.classworlds.Launcher -s/etc/maven/settings-debian.xml -Ddebian.dir=/src/tycho-debian/org.eclipse.tycho-tycho-0.23.0/debian -Dmaven.repo.local=/src/tycho-debian/org.eclipse.tycho-tycho-0.23.0/debian/maven-repo build
.PHONY: get-orig-source
# upstream is http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-tycho-0.23.0.tar.xz
# plus
# https://github.com/rgrunber/fedoraproject-p2
# plus
# some of eclipse sources (TODO)
get-orig-source:
$(RM) -rf $(TEMPDIR)
mkdir -p $(TEMPDIR)
@echo "# Downloading Tycho..."
cd $(TEMPDIR) && wget $(UURL)
cd $(TEMPDIR) && tar xf org.eclipse.tycho-tycho-$(UVER).tar.xz
#should create folder org.eclipse.tycho-tycho-$(UVER)
$(RM) $(TEMPDIR)/org.eclipse.tycho-tycho-$(UVER).tar.xz
find $(TEMPDIR)/org.eclipse.tycho-tycho-$(UVER) -name '*.jar' -delete #let's try...
@echo "# Downloading Fedora project P2..."
cd $(TEMPDIR) && git clone $(FUURL)
cd $(TEMPDIR)/fedoraproject-p2 \
&& git checkout \
&& $(RM) -r .git .git*
@echo "# Packing..."
$(RM) -rf $(PKG)_$(VER)$(DTYPE).orig.tar.xz
find -L "$(TEMPDIR)" -xdev -type f -print | LC_ALL=C sort \
| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
@echo "# Cleaning up..."
$(RM) -r $(TEMPDIR)
### Commented entries have reasonable defaults.
### Uncomment to edit them.
Source: tycho
Section: java
Priority: optional
Homepage: https://eclipse.org/tycho/
Standards-Version: 3.9.2
Build-Depends:
openjdk-8-jdk,
maven (>=3.0),
libmaven-plugin-testing-java,
libmaven-bundle-plugin-java,
libmaven-dependency-plugin-java,
libmaven-plugin-testing-java,
libmaven-verifier-java,
libmaven-source-plugin-java,
libmaven-site-plugin-java,
libplexus-utils-java,
libcommons-exec-java,
libdecentxml-java,
libcommons-compress-java,
libbcel-java,
ecj,
libmockito-java,
libcommons-jxpath-java,
libgeronimo-commonj-spec-java,
glassfish-javaee,
libicu4j-java,
libsac-java,
sat4j,
libxz-java
Package: libtycho-java
Version: 0.23.0
Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers@lists.alioth.debian.org>
# Pre-Depends: <comma-separated list of packages>
Depends:
libplexus-utils-java,
libcommons-exec-java,
libdecentxml-java,
libcommons-compress-java,
libbcel-java,
ecj,
libmockito-java,
libcommons-jxpath-java,
libgeronimo-commonj-spec-java,
glassfish-javaee,
libicu4j-java,
libsac-java,
sat4j,
libxz-java
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
Architecture: all
# Copyright: GPL2
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
# <more pairs, if there's more than one file to include. Notice the starting space>
Description: Buld Eclipse plugins with Maven
Tycho is focused on a Maven-centric, manifest-first approach
to building Eclipse plug-ins, features, update sites, RCP applications
and OSGi bundles.
.
Required to build many Eclipse plugins.
Reply to: