:: Re: [Dng] The basic of building pac…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Anto
日付:  
To: dng
題目: Re: [Dng] The basic of building package


On 20/05/15 18:15, Anto wrote:
> Hello Everybody,
>
> I am sorry to ask a basic question, but I fail to find the information
> on Debian documentation. There are million of them, so I must have
> missed it. My main source of reading is
> https://www.debian.org/doc/manuals/maint-guide/index.en.html.
>
> My question is quite generic as I see the same problem on some
> packages that I have been trying to build. So they are not specific to
> one package.
>
> That problem happens when I use <name the package>.debian.tar.xz which
> was built for older version of <name the package>.orig.tar.xz. As far
> as I understood, due to the differences in the files of the source
> packages, i.e. some files exist on the new source but not on the old
> one, the "debian/rules clean" deletes some files from the new source.
> And most of the time, the build packages fail if I see the messages
> similar as the ones below:
>
> dpkg-source: info: building <package name> using existing ./<package
> name and version>.orig.tar.xz
> dpkg-source: warning: ignoring deletion of file dir1/file1
> dpkg-source: warning: ignoring deletion of file dir2/file2
> dpkg-source: warning: ignoring deletion of file dir3/file3
> And so on.
>
> If the files that got deleted were not needed during the compilation,
> I could get the package successfully built.
>
> I know that I must change something on the debian directory of the
> package to match the new source, but I am not sure which ones. Could
> anyone please point me to the right direction?
>
> Thanks a lot in advance for your help.
>
> Cheers,
>
> Anto


Hello Everybody,

First of all, thanks to Brian and Angel for your suggestions.

What I have found last night is that, the dh_clean deletes some source
files. So my quick and dirty workaround was to remove the rm commands on
debian/rules.

The other thing that I found last night is that, when I add patch files
into debian/patches especially for the files which do not exist on the
main stream source package, I should also patch the corresponding
Makefile.am. A part from Makefile.am, which other files on the source
package should I also take care of?

Another question is about generating the patch files to be added into
debian/patches directory. What I have been doing so far are the
followings, to get the patch files which look similar to the official
patches:

1. Create "a" and "b" directory

2. Copy the files from the original source package including their
directory structures, into "a" and "b" directories

    If the file does not exist on the original sourcepackage, only 
generate its directory structure on "a" directory and put the new file 
on "b" directory under the same directory structure


3. Modify only the files on "b" directory

4. Run "git diff --no-prefix --no-index a/ b/ > <name of the patch>.patch"


I am sure that is not the proper way to do it. So could you please let
me know how to properly build the patches, especially for off-line
purpose so no local and remote git repositories?

Thanks in advance.

Cheers,

Anto