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

Patch to create debian packages #47

Open
jlaba opened this issue Jul 19, 2016 · 11 comments
Open

Patch to create debian packages #47

jlaba opened this issue Jul 19, 2016 · 11 comments

Comments

@jlaba
Copy link

jlaba commented Jul 19, 2016

Hello,

please find attached a set of debian files, to create debian packages for the V230_G2 and the EPD.py file. The patches (found in debian/patches) improve the Makefiles to support DESTDIR (installation into a specified folder, which is needed to package) and also create a setup.py file to create the python package. They are applied during the build process automatically.

It would be very nice, if you integrate the files (and apply the patches to your repository) into your repository. You may want to improve the packaging, to build a package per PANEL_VERSION. To do this, you need to support out of source builds and add the relevant packages to the debian/control file.

If you have any questions, feel free to ask me!

Kind regards!

P.s.: I'm not able to upload the zip file, but you find the files at https://trac.falaba.de/gnuboat/browser/externals/epaper-driver

@hxw
Copy link
Collaborator

hxw commented Jul 21, 2016

Would it be possible for you to make a fork and issue a pull request for the changes?

@jlaba
Copy link
Author

jlaba commented Aug 16, 2016

I created a fork and integrated the debian packaging. The packages could be build directly from the git repository. To do that, I splitted the changes up into two parts (see Chapter No upstream tarballs at http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.UPSTREAM-GIT for an explanation).

All changes made to the upstream sources, are contained in my pull request from above.

All new code only needed to build the debian packages (all stuff within the debian folder) is located at a new branch called debian/jessie, as I prepared the package for current stable release of debian. If you adapt this structure, the workflow for updating the debian package would be:

  • Making changes on your master
  • Merge wanted changes into the debian/jessie branch
  • checkout the debian/jessie branch
  • use gbp to build the packages with
gbp buildpackage --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s' --git-debian-branch=debian/jessie --git-export-dir=/tmp/build-area -us -uc
  • if everything is ready for a release, commit the pristine tarball and tag the release (have a look at the link above for the commands)

If you want to support a new debian version (like old version wheezy or next version stretch) just create a new debian/XXX branch from debian/jessie and make the changes there.

Do you like to use this workflow? Than you may create a new branch called debian/jessie from merged master and I create a new pull request to merge my debian/jessie branch into yours.

Regards!

@hxw
Copy link
Collaborator

hxw commented Aug 31, 2016

I created a branch called debian/jessie, is that sufficient for you to send request?

@jlaba jlaba mentioned this issue Sep 2, 2016
@hxw
Copy link
Collaborator

hxw commented Sep 5, 2016

Thanks for the changes. Is the workflow above well known? or would it be useful to put you workflow (and gbp command) from your comment above into a README-Debian.md file?

@shawaj
Copy link
Collaborator

shawaj commented Sep 5, 2016

this has broken a lot of the documentation FYI and none of it actually works to build on RPi anymore.

What do we need to change to build on RPi?

@jlaba
Copy link
Author

jlaba commented Sep 5, 2016

Hello,

@hxw: It may be known to people familiar with debian packaging. But it should be documented for all others (who are the majority I think)

@shawaj:
Executing the following steps (replacing the variables with your needed values) in the toplevel directory should work:

Compile:

make PANEL_VERSION=$(PANEL_VERSION) PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) SERVICE=$(SERVICE) rpi-epd_fuse

make PANEL_VERSION=$(PANEL_VERSION) PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) SERVICE=$(SERVICE) rpi-install

The last step might not setup the systemd/init script correctly.

Regards!

@shawaj
Copy link
Collaborator

shawaj commented Sep 5, 2016

@jlaba - hmm. what is prefix and destdir and service supposed to be to keep it exactly the same as before?

we used to be able to install very simply with:

git clone https://github.com/repaper/gratis.git

cd /tmp/epd/gratis
make rpi PANEL_VERSION=V231_G2
sudo make rpi-install PANEL_VERSION=V231_G2
sudo service epd-fuse start

what is the process now? I am currently getting:

make: *** No rule to make target 'rpi-install'. Stop.

@shawaj
Copy link
Collaborator

shawaj commented Sep 5, 2016

@jlaba - also, why won't it setup the systemd/init script correctly? And how do we do that?

What was the reason for breaking this?

@jlaba
Copy link
Author

jlaba commented Sep 5, 2016

Actually I followed exectly your steps:

git clone https://github.com/repaper/gratis.git
cd gratis
make rpi PANEL_VERSION=V231_G2

finished successfully. DESTDIR and PREFIX allows the user to install it in a defined subdirectory or tree (like /usr/local) as proposed by the make guide.

Related to the service install part I need to have a look again. I post my thoughts on wednesday.

Regards!

@shawaj
Copy link
Collaborator

shawaj commented Sep 5, 2016

Make rpi-install doesn't work though, which is important.

Why wasn't this tested before breaking it?

Thanks for looking into it though

On 5 Sep 2016 6:57 pm, "jlaba" notifications@github.com wrote:

Actually I followed exectly your steps:

git clone https://github.com/repaper/gratis.git
cd gratis
make rpi PANEL_VERSION=V231_G2

finished successfully. DESTDIR and PREFIX allows the user to install it in
a defined subdirectory or tree (like /usr/local) as proposed by the make
guid.

Related to the service install part I need to have a look again. I post my
thoughts on wednesday.

Regards!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADNCukCpgX9iPYuL5zX7DiPgKyoWsjEbks5qnFgXgaJpZM4JPx1F
.

@jlaba
Copy link
Author

jlaba commented Sep 8, 2016

Good Afternoon,

you might have a look at https://github.com/jlaba/gratis.git. I have fixed an error creating the directories during installation. I haven't tested the test target, as I do not have the device installed currently. If you find any other errors, feel free to post them. Otherwise I create a merge request.

The installation does add the daemon to a runlevel. But I think this should be done by the user, if he wants it or at least should be handled in a different target.

Regards!

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

No branches or pull requests

3 participants