[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Private Debian package: Quilt | git | add files to package



Hello,

I trying to create a own private Debian package which mostly worked without Git. Now I moved the sources (just a bunch of files) to a Git repo and used git-buildpackage. That was working too (also with Jenkins), until I wanted to add a file (an example Apache configuration). Now it fails ... and I don't get it in the right way.

===========
[...]
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building sandbox-simulators using existing ./sandbox-simulators_1.0.orig.tar.gz
dpkg-source: info: local changes detected, the modified files are:
 sandbox_simulators/apache.conf
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/sandbox-simulators_1.0-4.diff.NYXrUc
[...]
==========

In the log I can read:

==============
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
[...]
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- /dev/null
+++ sandbox-simulators-1.0/apache.conf
@@ -0,0 +1,32 @@
+# Example Apache configuration for conf.d
+
[...]
==============
So, a diff was created with header .... and examples ...


I red (somewhere), that a Git commit (the new file for example) has to be added via a (quilt) patch, so I created one:

$ quilt new apache2.conf
$ quilt add apache2.conf
$ quilt edit apache2.conf
<some Apache alias lines ...>
$ quilt refresh
<diff was created debian/patches/apache.conf>
$ quilt header --dep3 -e
$ quilt push
<.. apache.conf was successful created>
$ quilt pop -a
<all patches reverted>
git add debian/patches/apache.conf
git commit -m "Added apache example config" debian/patches/apache.conf debian/patches/series

In the Makefile (also a quilt patch, to copy all files to the right place ...), I tried to copy the created apache.conf file to /usr/share/doc/<something>/apache.conf.example

The problem (I think) is, that the apache.conf would be created _after_ my cp command from the Makefile .. so I changed the order that apache.conf "patch" comes first. But that doesn't fix the problem. " cp: cannot stat ‘apache.conf’: No such file or directory'.

So, maybe I'm completely wrong. How should I add new files to use with Git and get it working with:

$ git-buildpackage --git-tag -uc -us --git-ignore-new --git-ignore-branch --git-tag --git-cleaner='git clean -dfx'

=============
 git branch
* debian-debian
  master
 ~/git/sandbox_simulators$ git tag
1.0
debian/1.0
upstream/1.0
====

My last Howto: http://www.lpenz.org/articles/debgit/

I'm new to Git and creating Debian packages without checkinstall :-)

There are a lot of howtos but some are bad to read, some are older and some doesn't fit with Jenkins ...

Any suggestions are welcome :-)

cu denny


Reply to: