Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a PPA for Ubuntu #22

Open
khurshid-alam opened this issue May 24, 2016 · 16 comments
Open

Create a PPA for Ubuntu #22

khurshid-alam opened this issue May 24, 2016 · 16 comments

Comments

@khurshid-alam
Copy link

A ppa for Ubuntu would be nice.

@samdroid-apps
Copy link
Owner

Does this even run on Ubuntu?

I think that there is a folder relating to Debian packaging, is that helpful for a ppa?

@khurshid-alam
Copy link
Author

khurshid-alam commented May 24, 2016

Yes, if it works on debian, it will work on Ubuntu. I have started importing code to my branch (not realizing reddit is a different project) here: https://code.launchpad.net/~khurshid-alam/reddit/something-for-reddit

As of now, its building. If it compiles properly, I would like to propose few things:

  1. Create a project at launchpad: samdroid-apps
  2. Srtip debian folder from main repository or move it to other branch. That way your code can be imported into launchpad and can be compiled on changes in a launchpad recipe. Also remove patches from debian....if you don't need. This allows anyone to push a Ubuntu/Debian specific patch without touching the main source code or without clonning entire repo. The recipe may look like this:
# bzr-builder format 0.3 deb-version {debupstream}+{time}
lp:~samdroid/samdrioid-apps/something-for-reddit
merge packaging lp:~samdroid/samdrioid-apps/something-for-reddit
    nest-part packaging lp:~khurshid-alam/samdrioid-apps/patch1 debian/patches debian/patches
    nest-part packaging2 lp:~khurshid-alam/samdrioid-apps/patch1 .pc

@khurshid-alam
Copy link
Author

khurshid-alam commented May 24, 2016

@samdroid-apps

As of now it gives me following error (https://launchpadlibrarian.net/261349321/buildlog_ubuntu-xenial-i386.reddit-is-gtk_0.1.0+201605240812~ubuntu16.04.1_BUILDING.txt.gz)

Makefile.am: error: required file './AUTHORS' not found
src/Makefile.am:3: installing './py-compile'
autoreconf: automake failed with exit status: 1
dh_autoreconf: autoreconf -f -i returned exit code 1
debian/rules:3: recipe for target 'build-arch' failed

It seems I must tell debian/rules to run ./autogen.sh first.

@samdroid-apps
Copy link
Owner

Sounds correct. The autogen.sh script creates the authors file automatically.

Please just create the ppa under your account. If you need me to set up any web hooks I can do so, just post the url or email them to me sam@sam.today.

@khurshid-alam
Copy link
Author

khurshid-alam commented May 24, 2016

@samdroid-apps

I added it under /debian/rules like this:

#!/usr/bin/make -f
%:
    dh $@ --with autoreconf

override_dh_autoreconf:
    dh_autoreconf -- ./autogen.sh

which calls autogen.sh first and it works....But then, I am getting error like this:

Invalid configuration `./autogen.sh': machine `./autogen.sh' not recognized
configure: error: /bin/bash ./config.sub ./autogen.sh failed
dh_autoreconf: ./autogen.sh ./autogen.sh returned exit code 1
checking build system type... debian/rules:6: recipe for target 'override_dh_autoreconf' failed

Any idea?

Full log is available here: https://launchpadlibrarian.net/261372206/buildlog_ubuntu-xenial-amd64.reddit-is-gtk_0.1.0+201605241044~ubuntu16.04.1_BUILDING.txt.gz

@khurshid-alam
Copy link
Author

khurshid-alam commented May 24, 2016

Update:

  1. It seems we can not use gnome-autogen.sh inside autogen.sh. gnome-autogen.sh comes from gnome-common which is deprecated.
  2. autogen.sh at line 23 (https://github.com/samdroid-apps/something-for-reddit/blob/master/autogen.sh#L23) should not contain any git command.

So I manually copied AUTHORS to source tree and removed autogen.sh from /debian/rules. Now it doesn't give above error but shows following error:


/* confdefs.h */
#define PACKAGE_NAME "reddit-is-gtk"
#define PACKAGE_TARNAME "reddit-is-gtk"
#define PACKAGE_VERSION "0.1"
#define PACKAGE_STRING "reddit-is-gtk 0.1"
#define PACKAGE_BUGREPORT "https://github.com/samdroid-apps/reddit-is-gtk/issues"
#define PACKAGE_URL "https://github.com/samdroid-apps/reddit-is-gtk"
#define PACKAGE "reddit-is-gtk"
#define VERSION "0.1"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define GETTEXT_PACKAGE "reddit-is-gtk"

configure: exit 1
dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1

@samdroid-apps
Copy link
Owner

Maybe we can just revert it back to not using autogen.sh? Then, just touch AUTHORS. Would that work?

@samdroid-apps samdroid-apps modified the milestone: 0.2 Release Jun 4, 2016
@khurshid-alam
Copy link
Author

khurshid-alam commented Jun 5, 2016

Yes That's what am I doing. And its working. But it failed to find mdx_urlize module for python3 which belongs to marky package. In debian/control we only have dependency set python3-markdown and python3-arrow.

checking python3 module: arrow... yes
checking python3 module: markdown... yes
checking python3 module: mdx_urlize... no
configure: error: failed to find required module mdx_urlize

@samdroid-apps
Copy link
Owner

I'll actually roll that into this repository - I need to make some changes to it anyway so we can support /r/subreddit urls. It is under a 2 clause BSD licence. Can I copy it and change it to GPLv3, or can I have 2 licences in a package?

BTW it has a repo here: https://github.com/r0wb0t/markdown-urlize/blob/master/mdx_urlize.py

@khurshid-alam
Copy link
Author

khurshid-alam commented Jun 5, 2016

It seems that project has been abandoned. There was a request to make this as a part of python-markdown. But the author is not interested (Python-Markdown/markdown#37) . So there are two options:

  1. Compile and add python3-urlize to PPA. Then it can compile. But it won't be easy. It needs to be converted from python2 to python3 in the first place.
  2. Ideal option is not to use python3-urlize and change your code accordingly....and use python-markdown only.

Can I copy it and change it to GPLv3

No. Not really (perhaps If only the author permits.)

or can I have 2 licences in a package?

Yes that's possible: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
In file paragraph it can be written as this:

Files: debian/*
Copyright: 2010 Daniela Debianizer
License: GPL-2+

Files: debian/patches/fancy-feature
Copyright: 2010 Daniela Debianizer
License: GPL-3+

But this isn't mandatory. Nowdays nobody bother with this anymore.

@samdroid-apps
Copy link
Owner

Ok, so I will write a new peice of code that is unrelated to mdx_urlize. It will do a similar function though. This new code will be GPLv3 and included in this repo. Is that a good solution?

@khurshid-alam
Copy link
Author

Yes. That seems good solution. You can also file an RFP (Request For Package) in debian. If it geets into debian, it automatically gets into Ubuntu.

@samdroid-apps
Copy link
Owner

Ok, I just pushed a commit to remove the mdx_urlize dep. Is is good now?

@samdroid-apps
Copy link
Owner

Also, how should I file a RFP? Should I install debian and test it first before I file an RFP, or is it ok?

@khurshid-alam
Copy link
Author

Sorry for late reply. Finally I compiled it successfully on local machine by running ./configure manually. However dhbuild shows eroor when it tries to run ./configure. I will fix it tomorrow.

@mhall119
Copy link

A Snap package would be faster and easier than a PPA, I've filed a new issue requesting that: #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants