Fixing "dep5-copyright-license-name-not-unique" and "missing-license-paragraph-in-dep5-copyright"

2015-11-20 Thread T o n g
Hi, 

I need to fix  "dep5-copyright-license-name-not-unique" and "missing-
license-paragraph-in-dep5-copyright" for my package. Ref, https://
lintian.debian.org/maintainer/suntong...@users.sourceforge.net.html#dbab

but I really don't know how to fix them. E.g., I found one example of 
fixing "dep5-copyright-license-name-not-unique" in 
https://launchpad.net/ubuntu/+source/net-luminis-build-plugin/0.2.0-2
and see how exactly it was fixed, from
http://launchpadlibrarian.net/226583095/net-luminis-build-
plugin_0.2.0-1_0.2.0-2.diff.gz
but think I've done that. Ref, my copyright file at
https://github.com/suntong/dbab/blob/master/debian/copyright

I've also tried to:

sed -i 's/BSD-3-Clause/BSD-3-clause/g' debian/copyright 

but that doesn't fix the problem. 

What's wrong? 
Please help. Thanks





From mentors to Debian repo

2015-01-11 Thread T o n g
Hi, 

What happens when I have *more than one* version uploaded to mentors, 
then ftp master upload the package to the official Debian repo?

It happened to me twice, and twice had the older package appear in 
official Debian repo, instead of my newly uploaded latest version.

Is it possible to delete the older package from mentors myself?

Thanks 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m8ulcn$rv0$1...@ger.gmane.org



Re: Bug#773611: Fwd: RFS: histring/1.1.1-1 [ITP] - general purpose highlighting tool

2014-12-28 Thread T o n g
Hi mentors,

All fixes are done and a new package is uploaded. Please sponsor it. 

The respective dsc file can be found at:
http://mentors.debian.net/debian/pool/main/h/histring/histring_1.1.1-1.dsc

Once again, here is the package information:

>> Dear mentors,
>> 
>> Please sponsor for my newly uploaded package "histring".
>> 
>> It's a general purpose highlighting tool that works with arbitrary
>> input text file (e.g. all sorts of log files), and highlight different
>> keywords in different colours (e.g., warnings and errors are
>> highlighted with different colours). You can use this single small tool
>> to replace all kinds of special purpose log parsing tools, and it can
>> do much more, like highlighting results from vcsdiff, etc. E.g.,
>> 
>> http://sfxpt.wordpress.com/2013/06/02/highlighting-strings-in-text-
output-with-histring/
>> 
>> Once again, I am looking for a sponsor for my newly upgraded package
>> "histring". It's *lintian clean*, and without any build problems. Ref
>> http://mentors.debian.net/package/histring
>> 
>>  * Package name: histring
>>Version : 1.1.1-1
>>   * URL : https://github.com/suntong001/histring
>>  * License : GPL-2.0+
>>Section : utils
>> 
>>   It builds those binary packages:
>> 
>> histring   - highlight strings using ANSI terminal escape sequences
>> ...


Moreover, here are the issues that have been recently fixed:


> Hi! I'm not a DD, so I can't sponsor your package, but here are some
> things that I've noticed:
> 
> * It may be a good idea to make releases as tarballs still, instead of
> just making Debian releases, so that other distros can benefit as well.
> 
> * As far as I can see, you can fix "deprecated-configure-filename". All
> you would need to do is change the name of configure.in to configure.ac.
> 
> * Unless you have a compelling reason, the priority of the package (in
> d/control) should be "optional", not "extra".
> 
> * This isn't important, but it would be nice if you put the histring
> manpage outside of the Debian directory when you make your next upstream
> release. This way, other distros and people who build from source will
> also benefit from the manpage.
> 
> * There are a few minor grammatical errors in histring --help:
>   "useage" should be "usage"
>   "your self" should be "yourself" "hilighting" should be 
"highlighting"
> 
> Good luck getting your package into Debian!
> 
> Riley Baird

Please help!
Thanks!



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m7pmh1$e3b$1...@ger.gmane.org



Re: Bug#773611: Fwd: RFS: histring/1.1.1-1 [ITP] - general purpose highlighting tool

2014-12-21 Thread T o n g
On Sun, 21 Dec 2014 18:30:04 +1100, Riley Baird wrote:

> Hi! I'm not a DD, so I can't sponsor your package, but here are some
> things that I've noticed...

Thanks for the review, I'll fix them all. 

>>> * It may be a good idea to make releases as tarballs still, instead of
>>> just making Debian releases, so that other distros can benefit as
>>> well.
>> 
>> Alternatively, he/she can tag the releases in git.
> 
> True, that would also work. (Although it has the disadvantage that it
> makes it difficult to automatically check for new releases using things
> like watch files.)

Yeah, that's unfortunate. All my release histring tarballs are under
https://github.com/suntong001/histring/archive/
however github block the access to that folder. 
Do other distros user watch files or something alike? 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m76n9q$e03$1...@ger.gmane.org



overriding lintian tags

2014-12-20 Thread T o n g
Hi, 

I have the following lintian tags that I want to override:

~~~
W: zh-autoconvert: binary-without-manpage usr/bin/autob5
W: zh-autoconvert: binary-without-manpage usr/bin/autogb
~~~


So in my debian/override file, I tried all of:

~~~
zh-autoconvert binary: binary-without-manpage usr/bin/autob5
zh-autoconvert binary: binary-without-manpage *
zh-autoconvert: binary-without-manpage *
~~

However, all lintian warning tags remain.

What's the proper way to override lintian tags?
Can you help please? Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m75lv2$l0c$1...@ger.gmane.org



Re: Sample Debian package to show-case all

2014-12-14 Thread T o n g
On Mon, 15 Dec 2014 10:53:59 +0800, Paul Wise wrote:

>> - the most simplified Makefile
> 
> This is upstream stuff not Debian stuff...

> Ultimately you should have no patches because ... 

If we can influence upstream, why don't we get their structure right at 
the first place? If Debian can't influence it, then I believe no other 
distro on earth can influence it. I mean, nowadays Debian is so powerful 
and the line between upstream and Debian is becoming thinner and thinner.

Anyway, for my simple case, I meant to say what if I inherit a .c, a .1 
and .html file and need the structure in place to properly pack them. 
E.g., what's the best way to deal with .1 man pages, etc. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6lo5s$fht$3...@ger.gmane.org



Sample Debian package to show-case all

2014-12-14 Thread T o n g
Hi, 

Is there a *simple* sample Debian package somewhere out there that show-
case most of the important Debian packaging aspects? 

E.g., with a small C/C++ file, the sample package shows 

- the latest standard of debian/rules file
- the most simplified Makefile
- how to build from ./configure
- how to properly put/handle .1 man file
- how to properly put/handle .html doc file
- how to properly name patch files

Also, hope the debian directory is within the source tree. 

Again, the keyword is *simple*. I.e., everything is there to show-case 
Debian packaging, instead of distracting to other things, e.g. 10K+ line 
of C code, etc. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6lh4g$fht$2...@ger.gmane.org



Re: Sample systemd service init file please

2014-12-14 Thread T o n g
On Mon, 15 Dec 2014 08:09:30 +0900, Norbert Preining wrote:

>> +if HAVE_SYSTEMD
> 
> Shouldn't that be
>   ifdef HAVE_SYSTEMD

Thank you Norbert & Russ, with both of your helps, everything builds fine 
now. Thanks!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6lftb$fht$1...@ger.gmane.org



Re: Sample systemd service init file please

2014-12-14 Thread T o n g
On Sat, 13 Dec 2014 21:00:56 -0800, Russ Allbery wrote:

>> Can you provide me a sample systemd service init file, that correspond
>> to init.d script please? I.e., the corresponding file for systemd to
>> replace /etc/init.d/service.
> 
> Take a look at the lbcd package in Debian.  It has an init script, a
> systemd unit, and an upstart configuration, all of the same (simple)
> daemon, so it's easy to compare them.

Thanks Russ. So the next question is how do you install it? 

I took a deep look at the lbcd package in Debian, and for the best of my 
guesses, come up with this:

~~~
diff --git a/debian/control b/debian/control
index 82f8edc..f05634a 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: dbab
 Section: net
 Priority: optional
 Maintainer: Tong Sun 
-Build-Depends: debhelper (>= 9), ruby-ronn (>= 0.7.3)
+Build-Depends: debhelper (>= 9), dh-systemd, ruby-ronn (>= 0.7.3)
 Standards-Version: 3.9.6
 Homepage: https://github.com/suntong001/dbab
 Vcs-Git: https://github.com/suntong001/dbab.git
diff --git a/debian/rules b/debian/rules
index 79fd842..df98b29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,4 +5,4 @@
 #export DH_VERBOSE=1
 
 %:
-   dh $@ 
+   dh $@ --parallel --with systemd
diff --git a/src/Makefile b/src/Makefile
index cef854c..592f742 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,6 +8,12 @@ docdir = ${prefix}/share/doc/dbab
 bindir = ${exec_prefix}/sbin
 etcdir = ${DESTDIR}/etc
 astdir = ${etcdir}/dbab
+ssddir = ${etcdir}/systemd
+
+# Install the systemd unit file if systemd support was detected.
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = systemd/dbab.service
+endif
 
 man:
cat README.md | ronn > assets/dbab-svr.8
@@ -23,12 +29,14 @@ install:
$(INSTALL) -m 755 -d $(etcdir)
$(INSTALL) -m 755 -d $(etcdir)/init.d
$(INSTALL) -m 755 -d $(astdir)
+   $(INSTALL) -m 755 -d $(ssddir)
 
$(INSTALL) -m 755 bin/dbab-get-list $(bindir)
$(INSTALL) -m 755 bin/dbab-add-list $(bindir)
$(INSTALL) -m 755 bin/dbab-chk-list $(bindir)
$(INSTALL) -m 755 bin/dbab-svr $(bindir)
$(INSTALL) -m 755 bin/dbab $(etcdir)/init.d
+#  $(INSTALL) -m 755 assets/dbab.service $(ssddir)
 
$(INSTALL) -m 644 assets/dbab-svr.8 $(mandir)/man8
$(INSTALL) -m 644 assets/dbab-add-list.1 $(mandir)/man1
~~~

But will either get:

~~~
W: dbab: executable-not-elf-or-script etc/systemd/dbab.service
E: dbab: systemd-no-service-for-init-script dbab
~~~

or 

  Makefile:14: *** missing separator (did you mean TAB instead of 8 
spaces?).  Stop.

depending if I put in that "if" statement in Makefile. 

here is my dbab.service file:

~~~
$ cat dbab.service 
# systemd configuration for dbab.  -*- conf -*-

[Unit]
Description=Dnsmasq-Based Ad-Blocker
Documentation=man:dbab-svr(8)
Documentation=http://sfxpt.wordpress.com/2014/11/30/use-new-dbab-to-set-
proxy-automatically/

[Service]
ExecStart=/usr/sbin/dbab-srv
Type=forking

[Install]
WantedBy=multi-user.target
~~~

Once again, 

for the purpose of adding that single systemd configuration file, 

- do I need to add the dh-systemd to Build-Depends 
  and use `dh $@ --parallel --with systemd`? 

- and how to fix the executable-not-elf-or-script and systemd-no-service-
for-init-script error?

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6l3o8$85c$4...@ger.gmane.org



Re: How to let different programs use same man page

2014-12-14 Thread T o n g
Thanks Riley, you've been extremely helpful. 

On Sun, 14 Dec 2014 15:34:05 +1100, Riley Baird wrote:

> Looking at the gzip source, it seems that ...



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6l4a9$85c$5...@ger.gmane.org



How to let different programs use same man page

2014-12-13 Thread T o n g
Hi, 

What's the trick to have different programs use same man page when 
packaging a Debian package? 

E.g., say I'm packaging gzip, and I want both `man gzip` and `man gunzip` 
goes to the same man file. How can I make it happen? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6j2sv$85c$3...@ger.gmane.org



Re: Please sponsor dbab, the dnsmasq-based ad-blocker

2014-12-13 Thread T o n g
On Sat, 13 Dec 2014 07:14:18 +1100, Riley Baird wrote:

> here are some things that I've noticed:
> 
> [...]

All fixed. 
 
> * d/docs is empty. You should include dbab.html.

You meant this?

 echo 'dbab.html' > debian/docs

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6j2jb$85c$2...@ger.gmane.org



Sample systemd service init file please

2014-12-13 Thread T o n g
Hi, 

Can you provide me a sample systemd service init file, that correspond to 
init.d script please? I.e., the corresponding file for systemd to 
replace /etc/init.d/service. 

My package have that /etc/init.d/service file, but I want to create one 
for systemd as well. I am asking because I don't even know what that file 
is called, so I didn't find any relevant info from the internet.

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m6j1df$85c$1...@ger.gmane.org



Please sponsor dbab, the dnsmasq-based ad-blocker

2014-12-05 Thread T o n g
Dear mentors,

I'd like to bring your attention again to dbab, the innovative dnsmasq-
based ad-blocker that will benefit most people. Here is my sales-pitch 
again:

Ever want to remove Ads and speed up your (iphone/ipad) mobile device
browsing without installing any apps to them?

Sounds too good to be true? Yes, but unless you install to your server
my `dbab`. It will make the magic happen. Please sponsor my
"wonderful" dnsmasq-based ad-blocking package, so that more people can
benefit from it. More details at

http://sfxpt.wordpress.com/2014/11/30/use-new-dbab-to-set-proxy-
automatically/#advantages;

Once again, I am looking for a sponsor for my newly upgraded package 
"dbab"

 * Package name: dbab
   Version : 1.1.1-1
   Upstream Author :  Tong Sun 
 * URL : https://github.com/suntong001/dbab
 * License : BSD
   Section : net

  It builds those binary packages:

dbab  - dnsmasq-based ad-blocking using pixelserv

  To access further information about this package, please visit the
following URL:

  http://mentors.debian.net/package/dbab

  Alternatively, one can download the package with dget using this 
command:

dget -x http://mentors.debian.net/debian/pool/main/d/dbab/
dbab_1.1.1-1.dsc

  More information about dbab can be obtained from
http://sfxpt.wordpress.com/2014/11/30/use-new-dbab-to-set-proxy-
automatically/#advantages;.

Thanks for your help.

Best Regards,

Tong


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5u0fe$frg$1...@ger.gmane.org



Re: Self-maintained Debian packages best practice

2014-11-30 Thread T o n g
On Sun, 30 Nov 2014 18:12:06 +0100, Santiago Vila wrote:

>> > In the past, having a `debian/` directory upstream was a pain because
>> > we didn't have a proper way to remove a file if needed. Nowadays, it
>> > is perfectly fine if you use a 3.0 format.
>> 
>> Fine in which way ?
> 
> It's fine because, for a 3.0 quilt package, "dpkg-source -x" unpacks the
> .orig.tar.gz, removes all the debian/* files coming from upstream
> tarball, if any, and then unpacks the *.debian.tar.xz file.

Ok, good to know, but that's more targeting towards package building, not 
source code developing and maintaining. Does it imply that I should put 
the `debian` folder within my source tree now? Because as mentioned 
before, the last thing I want to do is to separate my source and my 
`debian` folder into two git repos. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5fusq$hfd$2...@ger.gmane.org



Self-maintained Debian packages best practice

2014-11-30 Thread T o n g
Hi, 

I'm currently hosting my self-maintained Debian packages on GitHub. Here 
is my dilemma:

 - It is commonly recommended not to put the `debian` folder within the 
source tree so as to make it easier for other distros.
 - So I did. I did not put my `debian` folder within the source tree on 
my GitHub.
 - However when building the Debian packages, the build mechanize 
anticipate a `debian` folder under the source tree. 
 - This means my GitHub repo is not directly usable for my build. This is 
nuisance because as a self Debian maintainer, my only focus is Debian, 
and I'm building my Debian package all the time, not for other distros. 
 - I've dealt with it and actually have a solution for myself, but when I 
tagged a release on GitHub, the release .tar.gz file will reflect my 
above folder structure, which means the release .tar.gz file from GitHub 
is not a good candidate for "upstream source". I'm OK with it, but worry 
it might confuse others. 

Is there any easy way to manage it? E.g.., can I tell GitHub only treat a 
sub-folder for my release .tar.gz file? Or anything? The last thing I 
want to do is to separate my current arrangement into two, because when I 
change things, the changes will equally spread between the source and 
`debian` folder. Separate them into two will lost such internal 
connection/logic, E.g.,
https://github.com/suntong001/dbab/commit/
ebfb08674cb4446d05bca5a36d28d76c89c6f9b9

Any suggestions? Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5f896$hfd$1...@ger.gmane.org



Re: Fixing the warning of Depends field unknown substitution variable ${perl:Depends}

2014-11-29 Thread T o n g
Thanks a lot Russ. 

I found my problem happens to be more than that, I.e., I should deal with 
"empty-binary-package" first. Once I got it properly build I see perl 
shows up on the Depends line. 

 Depends: perl, dnsmasq, curl

Sorry about the noise. 
Thanks again. 

On Sat, 29 Nov 2014 18:29:52 -0800, Russ Allbery wrote:

> If you are packaging something that uses Perl, such as this package, you
> should include ${perl:Depends} in the Depends line in debian/control so
> that dh_perl can use it to add the perl dependency.



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5e4j8$mm0$3...@ger.gmane.org



Re: Fixing the warning of Depends field unknown substitution variable ${perl:Depends}

2014-11-29 Thread T o n g
On Sat, 29 Nov 2014 21:26:10 +0100, Stephen Kitt wrote:

>> My packages gives this warning:
>> 
>>   dpkg-gencontrol: warning: Depends field of package dbab: unknown
>> substitution variable ${perl:Depends}
>> 
>> I am packaging Perl stuff, and I do use IO::Socket::INET in my code.

> If you
> think ${perl:Depends} should have a value then there may be something
> else going on; what does dbab end up depending on once it's built?
> (dpkg-deb -I dbab*deb will tell you.)
> 
> (Note that IO::Socket::INET is part of perl, so you don't need to depend
> on anything beyond that as far as I can see.)

Yes, you are right. once it's built, here is what from dpkg-deb -I:

 Depends: dnsmasq, curl

>> $ grep '^Depends: ' debian/control 
>> Depends: ${misc:Depends}, ${perl:Depends}, dnsmasq, curl 

> If you want to fix the warning you should remove ${perl:Depends}. 

But you and Paul Wise in https://lists.debian.org/debian-mentors/2013/12/
msg00059.html suggest that I remove ${perl:Depends}. However, I AM 
packaging a Perl script, would it be better that I put just a 'perl' 
there?

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5dusc$mm0$2...@ger.gmane.org



Fixing the warning of Depends field unknown substitution variable ${perl:Depends}

2014-11-29 Thread T o n g
Hi, 

My packages gives this warning:

  dpkg-gencontrol: warning: Depends field of package dbab: unknown 
substitution variable ${perl:Depends}

I am packaging Perl stuff, and I do use IO::Socket::INET in my code:

https://github.com/suntong001/dbab/blob/master/src/bin/dbab-svr

In https://lists.debian.org/debian-mentors/2013/12/msg00060.html
Russ Allbery pointed out that, 

,-
| "unknown" means you tried to use it and nothing set it... dh_perl found
| some Perl script or library in the package and tried to write out the
| substitution variable.
`-

However, I do have that "${perl:Depends}" in my control file:

$ grep '^Depends: ' debian/control 
Depends: ${misc:Depends}, ${perl:Depends}, dnsmasq, curl 

File: https://github.com/suntong001/dbab/blob/master/debian/control

So how exactly should I fix it? 

Thanks!



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/m5d6ib$mm0$1...@ger.gmane.org



Re: To fix error: binary file contents changed

2014-09-14 Thread T o n g
On Sun, 14 Sep 2014 12:14:13 +0600, Andrey Rahmatullin wrote:

>> The source is at https://github.com/suntong001/histring/
>> it is *very* small.
> This package can't be built. You need to make sure you provide working
> examples when you ask for help, otherwise people will stop helping you
> quickly.
> Though if you are asking for problems involving an upstream tarball and
> building a source package, you need to provide that tarball, not just
> unpacked directory.

OK, ok, you need the tarball? please ask for the tarball. Don't be so 
harsh on people not as clear/smart as you. I wasn't able to upload the 
source package because of the build error, and I don't have a place to 
upload the tarball for the moment. 

Anyway, I've just solved it heavy-handedly. Ref,
http://raphaelhertzog.com/2011/01/28/3-ways-to-not-clutter-your-debian-
source-package-with-autogenerated-files/

Thanks again for your help. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lv49mp$ivb$1...@ger.gmane.org



Re: To fix error: binary file contents changed

2014-09-13 Thread T o n g
On Fri, 12 Sep 2014 09:10:10 +0600, Andrey Rahmatullin wrote:

> On Fri, Sep 12, 2014 at 02:28:34AM +0000, T o n g wrote:
>> Hi,
>> 
>> My histring has this "binary file contents changed" error, how to fix
>> it?
>> 
>> Here is the build log:
>> 
>>   dpkg-source: info: using options from histring-1.1.0/debian/source/
>> options: --extend-diff-ignore=^Makefile$
>>fakeroot debian/rules clean
>>   dh clean
>>  dh_testdir dh_auto_clean dh_clean
>>dpkg-source -b histring-1.1.0
>>   dpkg-source: info: using options from histring-1.1.0/debian/source/
>> options: --extend-diff-ignore=^Makefile$
>>   dpkg-source: info: using source format `3.0 (quilt)'
>>   dpkg-source: info: building histring using existing ./
>> histring_1.1.0.orig.tar.gz
>>   dpkg-source: warning: executable mode 0755 of 'config.status' will
>>   not
>> be represented in diff
>>   dpkg-source: error: cannot represent change to histring: binary file
>> contents changed
>>   dpkg-source: error: add histring in debian/source/include-binaries if
>> you want to store the modified binary in the debian tarball
>>   dpkg-source: error: cannot represent change to histring.o: binary
>>   file
>> contents changed
>>   dpkg-source: error: add histring.o in debian/source/include-binaries
>>   if
>> you want to store the modified binary in the debian tarball
>>   dpkg-source: error: unrepresentable changes to source
>> 
>> I know that I can tweak the dh_clean rule to remove the generate .o and
>> binary executable file, or tweak the 'debian/source/options', but I'm
>> wondering if the true fix is somewhere else, like my .o and  binary
>> executable files are generated to the wrong place, for e.g.
> 
> No, your problem is in not removing the binary in clean.

$ make -n clean 
test -z "histring" || rm -f histring
rm -f *.o core *.core

So the 'make clean' is doing its thing, at least seems to me. If any of 
the 'dh clean' or 'dh_clean' is calling 'make clean', the binaries would 
be removed clean. 

What goes wrong? How exactly should I fix it?
Please help.

The source is at https://github.com/suntong001/histring/
it is *very* small. 

THANKS!



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lv27dd$dtb$2...@ger.gmane.org



Re: Please help fix lintian hardening-no-relro problem

2014-09-13 Thread T o n g
On Fri, 12 Sep 2014 08:11:42 +0100, Azazel wrote:

>> Just out of curiosity, the source package I uploaded,
>> http://mentors.debian.net/debian/pool/main/h/histring/
histring_1.1.0-2.dsc
>> should be working according to your above principle, but why it is
>> failing?
> 
> Because you weren't using debhelper to build the package...

Ahh, got it. I need one further step of replacing the unnecessarily long 
d/rules with the nowadays simplified one which uses dh(1). Now all the 
dots has been connected for me. 

THANKS!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lv1rpt$dtb$1...@ger.gmane.org



To fix error: binary file contents changed

2014-09-11 Thread T o n g
Hi, 

My histring has this "binary file contents changed" error, how to fix it?

Here is the build log:

  dpkg-source: info: using options from histring-1.1.0/debian/source/
options: --extend-diff-ignore=^Makefile$
   fakeroot debian/rules clean
  dh clean 
 dh_testdir
 dh_auto_clean
 dh_clean
   dpkg-source -b histring-1.1.0
  dpkg-source: info: using options from histring-1.1.0/debian/source/
options: --extend-diff-ignore=^Makefile$
  dpkg-source: info: using source format `3.0 (quilt)'
  dpkg-source: info: building histring using existing ./
histring_1.1.0.orig.tar.gz
  dpkg-source: warning: executable mode 0755 of 'config.status' will not 
be represented in diff
  dpkg-source: error: cannot represent change to histring: binary file 
contents changed
  dpkg-source: error: add histring in debian/source/include-binaries if 
you want to store the modified binary in the debian tarball
  dpkg-source: error: cannot represent change to histring.o: binary file 
contents changed
  dpkg-source: error: add histring.o in debian/source/include-binaries if 
you want to store the modified binary in the debian tarball
  dpkg-source: error: unrepresentable changes to source

I know that I can tweak the dh_clean rule to remove the generate .o and  
binary executable file, or tweak the 'debian/source/options', but I'm 
wondering if the true fix is somewhere else, like my .o and  binary 
executable files are generated to the wrong place, for e.g.

The source is at https://github.com/suntong001/histring/
it is *very* small. 

Please help. THANKS!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lutloi$ol1$1...@ger.gmane.org



Re: Please help fix lintian hardening-no-relro problem

2014-09-11 Thread T o n g
On Thu, 11 Sep 2014 09:07:27 +0100, Azazel wrote:

> Now that you've raised the debhelper compat level from 5 to 9, dh should
> do the right thing.  Just revert the changes in which you ripped out the
> auto-tooling, e.g.:

OMG, you are my hero Azazel! histring is the package that I want to take 
up and maintain, however, it has taken me nearly two weeks trying to 
solve this hardening-no-relro error, writing emails back and force again 
and again, making tiny progress each time. Yet, you solve it with a 
single message!!! Moreover, you've not only told me how to fix, but 
showed me how to fix it with git command, that's REALLY appreciated 
because I was ready to rename my git repo and start all over from scratch 
again. THANK YOU!!!

Just out of curiosity, the source package I uploaded, 
http://mentors.debian.net/debian/pool/main/h/histring/histring_1.1.0-2.dsc
should be working according to your above principle, but why it is 
failing? 

Thanks!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/luter4$tni$1...@ger.gmane.org



Re: Please help fix lintian hardening-no-relro problem

2014-09-10 Thread T o n g
Thanks for your response. 

On Sun, 07 Sep 2014 16:55:14 +0600, Andrey Rahmatullin wrote:

> On Sat, Sep 06, 2014 at 08:56:50PM +0000, T o n g wrote:
>> Yes, that's the first thing I tried, but still get the "hardening-no-
>> relro" problem:
>> https://github.com/suntong001/histring/blob/master/debian/rules
>> https://github.com/suntong001/histring/archive/master.zip
> No, this version doesn't have this problem.

hmm... here is my log, duplicated from http://paste.debian.net/120325/ 
for your convenience:

  $ cat debian/rules 
  #!/usr/bin/make -f

  #export DH_VERBOSE=1

  %:
  dh $@ 

  $ cat Makefile 
  INSTALL = /usr/bin/install -c

  # == Installation directories
  prefix = ${DESTDIR}/usr
  mandir = ${prefix}/share/man/man1
  exec_prefix = ${prefix}
  bindir = ${exec_prefix}/bin

  all: histring

  histring: histring.c getopt.c getopt1.c getopt.h
  $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $@.c -o $@

  clean:
  rm -f *.o *~ 

  cleanall: clean
  rm -f histring

  install:
  $(INSTALL) -m 755 -d $(bindir)
  $(INSTALL) -m 755 -d $(mandir)

  $(INSTALL) -m 755 -s histring $(bindir)
  $(INSTALL) -m 644 debian/histring.1 $(mandir)


  $ debuild -i -us -uc -b
   dpkg-buildpackage -rfakeroot -D -us -uc -i -b
  dpkg-buildpackage: warning: using a gain-root-command while being root
  dpkg-buildpackage: source package histring
  dpkg-buildpackage: source version 1.1.0-2
  dpkg-buildpackage: source distribution unstable
  dpkg-buildpackage: source changed by Tong Sun 

   dpkg-source -i --before-build histring-1.1.0_Simplified
  dpkg-buildpackage: host architecture amd64
   fakeroot debian/rules clean
  dh clean 
 dh_testdir
 dh_auto_clean
  make[1]: Entering directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
  rm -f *.o *~ 
  make[1]: Leaving directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
 dh_clean
   debian/rules build
  dh build 
 dh_testdir
 dh_auto_configure
 dh_auto_build
  make[1]: Entering directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
  make[1]: Nothing to be done for 'all'.
  make[1]: Leaving directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
 dh_auto_test
   fakeroot debian/rules binary
  dh binary 
 dh_testroot
 dh_prep
 dh_auto_install
  make[1]: Entering directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
  /usr/bin/install -c -m 755 -d /export/build/pkg/histring/bld/
histring-1.1.0_Simplified/debian/histring/usr/bin
  /usr/bin/install -c -m 755 -d /export/build/pkg/histring/bld/
histring-1.1.0_Simplified/debian/histring/usr/share/man/man1
  /usr/bin/install -c -m 755 -s histring /export/build/pkg/histring/bld/
histring-1.1.0_Simplified/debian/histring/usr/bin
  /usr/bin/install -c -m 644 debian/histring.1 /export/build/pkg/histring/
bld/histring-1.1.0_Simplified/debian/histring/usr/share/man/man1
  make[1]: Leaving directory '/export/build/pkg/histring/bld/
histring-1.1.0_Simplified'
 dh_installdocs
 dh_installchangelogs
 dh_installman
 dh_perl
 dh_link
 dh_compress
 dh_fixperms
 dh_strip
 dh_makeshlibs
 dh_shlibdeps
 dh_installdeb
 dh_gencontrol
 dh_md5sums
 dh_builddeb
  dpkg-deb: building package `histring' in `../
histring_1.1.0-2_amd64.deb'.
   dpkg-genchanges -b >../histring_1.1.0-2_amd64.changes
  dpkg-genchanges: binary-only upload (no source code included)
   dpkg-source -i --after-build histring-1.1.0_Simplified
  dpkg-buildpackage: binary-only upload (no source included)
  Now running lintian...
  warning: the authors of lintian do not recommend running it with root 
privileges!
  W: histring: hardening-no-relro usr/bin/histring
  Finished running lintian.

Note the second last line -- "hardening-no-relro".

>> > You are not using dh_auto_* commands nor exporting flags manually,
>> > hence dpkg-buildflags isn't used in the build process.
>> Would you mind telling me how to do it please? I'm reverting back to
>> such unnecessarily long d/rules because I wasn't able to put back the
>> auto- make rules back into the above short version.
> What "automake rules"?

Oh, I meant using './configure' to generate Makefile from Makefile.in or 
Makefile.am. I don't know how to put the rules in to start from there. 

thanks again


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/luqqrn$qar$1...@ger.gmane.org



Re: Please help fix lintian hardening-no-relro problem

2014-09-06 Thread T o n g
On Sat, 06 Sep 2014 14:03:10 +0600, Andrey Rahmatullin wrote:

>> Please help me fix the lintian "hardening-no-relro" problem. As
>> mentioned before, I've tried several ways myself but none worked. I've
>> uploaded the source package to
>> http://mentors.debian.net/debian/pool/main/h/histring/
histring_1.1.0-2.dsc
>> 
> Consider replacing your
> unnecessarily long d/rules with one using dh(1).

Yes, that's the first thing I tried, but still get the "hardening-no-
relro" problem:
https://github.com/suntong001/histring/blob/master/debian/rules
https://github.com/suntong001/histring/archive/master.zip

> You are not using dh_auto_* commands nor exporting flags manually, hence
> dpkg-buildflags isn't used in the build process.

Would you mind telling me how to do it please? I'm reverting back to such 
unnecessarily long d/rules because I wasn't able to put back the auto-
make rules back into the above short version. 

Thanks




-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lufseh$51d$1...@ger.gmane.org



Please help fix lintian hardening-no-relro problem

2014-09-05 Thread T o n g
[Re-try again as my previous question ended up as "Message not available" 
in the mail archive]

Please help me fix the lintian "hardening-no-relro" problem. As mentioned 
before, I've tried several ways myself but none worked. I've uploaded the 
source package to
http://mentors.debian.net/debian/pool/main/h/histring/histring_1.1.0-2.dsc

Please take a look. it is *very* small. I know there are still lots of 
issues unfixed, but I'll fix them later if this "hardening-no-relro" 
problem can be fixed. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/ludp5f$6o9$1...@ger.gmane.org



Re: Please help fix lintian hardening-no-relro problem

2014-08-28 Thread T o n g
On Thu, 28 Aug 2014 14:32:32 +0600, Andrey Rahmatullin wrote:

> On Thu, Aug 28, 2014 at 12:50:23AM +0000, T o n g wrote:
>> >> Please help me fix the lintian "hardening-no-relro" problem. My code
>> >> is at https://github.com/suntong001/histring (it is *very* small).
>> > The proper way is just to bump debian/compat to 9.
>> > 
>> >> I tried to ...
>> >>   +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk
>> >>   +CFLAGS += -Wextra +
>> >>all: histring
>> >> 
>> >>histring: histring.c getopt.c getopt1.c getopt.h
>> > These lines are for debian/rules, not for the upstream Makefile (they
>> > are unnecessary when using dh(1) with compat 9 though).
>> 
>> I bumped up the compat level to 9,
>> https://github.com/suntong001/histring/commits/master
>> https://github.com/suntong001/histring/
>> commit/6708b109133d63fec73f8113b8b644390adfeb4e but am still getting
>> the "hardening-no-relro" problem.
>> 
>> The build environment is latest sid. Is there anything else?
> Please show the build log or publish a source package so that other
> people could reproduce the build.

Ok, just for problem-solving purpose, the source package is at
http://mentors.debian.net/debian/pool/main/h/histring/histring_1.1.0-2.dsc

This is a minimum-fixed version, ie, there are still lots of issues 
unfixed, but source package is available. I do have the maximum-fixed 
version, at https://github.com/suntong001/histring/, where only the 
hardening-no-relro problem is left unfixed (for the binary package). Make 
your pick. 

For the minimum-fixed version, the one from source package, here is the 
binary package build log:

 $ debuild -i -us -uc -b
  dpkg-buildpackage -rfakeroot -D -us -uc -i -b
 dpkg-buildpackage: warning: using a gain-root-command while being root
 dpkg-buildpackage: source package histring
 dpkg-buildpackage: source version 1.1.0-1
 dpkg-buildpackage: source distribution unstable
 dpkg-buildpackage: source changed by Michael Prokop 
  dpkg-source -i --before-build histring-1.1.0
 dpkg-buildpackage: host architecture amd64
  fakeroot debian/rules clean
 dh_testdir
 dh_testroot
 rm -f build-stamp 
 # Add here commands to clean up after the build process.
 /usr/bin/make distclean
 make[1]: Entering directory '/export/build/pkg/histring/bld/
histring-1.1.0'
 make[1]: *** No rule to make target 'distclean'.  Stop.
 make[1]: Leaving directory '/export/build/pkg/histring/bld/
histring-1.1.0'
 debian/rules:41: recipe for target 'clean' failed
 make: [clean] Error 2 (ignored)
 dh_clean 
  debian/rules build
 dh_testdir
 # Add here commands to configure the package.
 ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu
 creating cache ./config.cache
 checking for a BSD compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking whether make sets ${MAKE}... yes
 checking for working aclocal... found
 checking for working autoconf... found
 checking for working automake... found
 checking for working autoheader... found
 checking for working makeinfo... missing
 checking for gcc... gcc
 checking whether the C compiler (gcc  ) works... yes
 checking whether the C compiler (gcc  ) is a cross-compiler... no
 checking whether we are using GNU C... yes
 checking whether gcc accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking for a BSD compatible install... /usr/bin/install -c
 checking for getopt_long... yes
 checking for string.h... yes
 checking for unistd.h... yes
 checking for stdlib.h... yes
 checking for errno.h... yes
 checking for ctype.h... yes
 checking for getopt.h... yes
 checking for stdio.h... yes
 checking for string.h... (cached) yes
 checking for regex.h... yes
 checking for getopt... yes
 checking for getopt_long... (cached) yes
 checking whether user wants debugging support... no
 updating cache ./config.cache
 creating ./config.status
 creating Makefile
 creating config.h
 dh_testdir
 # Add here commands to compile the package.
 /usr/bin/make
 make[1]: Entering directory '/export/build/pkg/histring/bld/
histring-1.1.0'
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c histring.c
 gcc  -g -O2  -o histring  histring.o  
 make[1]: Leaving directory '/export/build/pkg/histring/bld/
histring-1.1.0'
 touch build-stamp
  fakeroot debian/rules binary
 dh_testdir
 dh_testroot
 dh_clean -k 
 dh_clean: dh_clean -k is deprecated; use dh_prep instead
 dh_installdirs usr/bin
 # Add here commands to install the package into debian/histring.
 install -m 755 histring debian/histring/usr/bin/histring
 dh_testdir
 dh_testroot
 dh_installchangelogs 
 dh_installdocs README
 dh_installexamples
 dh_installman debian/histring.1
 dh_link
 dh_strip
 dh_compress
 dh_fixperms
 dh_in

Re: Please help fix lintian hardening-no-relro problem

2014-08-27 Thread T o n g
On Mon, 25 Aug 2014 13:56:29 +0600, Andrey Rahmatullin wrote:

>> Please help me fix the lintian "hardening-no-relro" problem. My code is
>> at https://github.com/suntong001/histring (it is *very* small).
> The proper way is just to bump debian/compat to 9.
> 
>> I tried to ...
>>   +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk
>>   +CFLAGS += -Wextra +
>>all: histring
>> 
>>histring: histring.c getopt.c getopt1.c getopt.h
> These lines are for debian/rules, not for the upstream Makefile (they
> are unnecessary when using dh(1) with compat 9 though).

I bumped up the compat level to 9, 
https://github.com/suntong001/histring/commits/master
https://github.com/suntong001/histring/
commit/6708b109133d63fec73f8113b8b644390adfeb4e
but am still getting the "hardening-no-relro" problem.

The build environment is latest sid. Is there anything else? 

Can somebody help please? Thanks!




-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/ltlucf$4cm$1...@ger.gmane.org



Please help fix lintian hardening-no-relro problem

2014-08-24 Thread T o n g
hi, 

Please help me fix the lintian "hardening-no-relro" problem. My code is at
https://github.com/suntong001/histring (it is *very* small).

I tried to fix it myself, using the method from 
https://wiki.debian.org/Hardening
and https://groups.google.com/forum/#!msg/debian-bollin/
Ixk9usNsbKw/0eaJLbT142kJ

but neither method works. Details below. 
Please help. Thanks!

  $ diff --git a/Makefile b/Makefile
  index 386aebd..e084f58 100644
  --- a/Makefile
  +++ b/Makefile
  @@ -6,6 +6,10 @@ mandir = ${prefix}/share/man/man1
   exec_prefix = ${prefix}
   bindir = ${exec_prefix}/bin

  +DPKG_EXPORT_BUILDFLAGS = 1
  +include /usr/share/dpkg/buildflags.mk
  +CFLAGS += -Wextra
  +
   all: histring

   histring: histring.c getopt.c getopt1.c getopt.h
  diff --git a/debian/rules b/debian/rules
  index 1485ba0..e6655fb 100755
  --- a/debian/rules
  +++ b/debian/rules
  @@ -2,5 +2,8 @@

   #export DH_VERBOSE=1

  +DPKG_EXPORT_BUILDFLAGS = 1 
  +LDFLAGS += -Wl,--as-needed 
  +
   %:
  dh $@ 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/ltdo9e$ffe$1...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-13 Thread T o n g
On Mon, 14 Jul 2014 04:06:16 +, T o n g wrote:

> On Mon, 14 Jul 2014 00:26:22 +0200, Ross Gammon wrote:
> 
>>> On Sun, 13 Jul 2014 22:29:37 +0600, Andrey Rahmatullin wrote:
>>> 
>>>> dh_install(1) is a program, not a target.
>>>> 
>>>>> install -m 755 ddclient \ $(DESTDIR)/usr/sbin/ddclient
>>>>> 
>>>>> install -D -m 755 debian/ddclient.NetworkManager \
>>>>> $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
>>>> Writing proper *.install would be enough.
>>> 
>>> Please point me to where I can do further reading on this (exact url
>>> appreciated), because I've spent a lot of time find it myself but
>>> haven't found how to do it yet. Or -- an example is better than a
>>> thousand words.
>>> 
>> https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install
> 
> On reviewing it, I think it won't solve my problem, because as said
> before, I saw in the log,
> 
>...
>dh_installdirs debian/rules override_dh_auto_install
> make[1]: Entering directory '/export/build/pkg/ddclient/bld/
> ddclient-3.8.2'
> install -m 755 ddclient \
>   /usr/sbin/ddclient
> install -D -m 755 debian/ddclient.NetworkManager \
>   /etc/NetworkManager/dispatcher.d/50-ddclient
> dh_auto_install make[1]: Leaving directory
> '/export/build/pkg/ddclient/bld/ddclient-3.8.2'
>dh_installdocs ...
> 
> I.e., the problem is that DESTDIR is empty. so $(DESTDIR)/usr/sbin/
> ddclient becomes /usr/sbin/ddclient. Having a install file won't fix
> this problem I am afraid.

Hmm... I maybe wrong. But I'd rather fix my rules file instead of using 
the install file, because there is no way to control the file mode, and 
moreover, "You should first check there is not a more specific tool to 
use. For example, documents should be in the docs file and not in this 
one".

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpvllf$c5h$7...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-13 Thread T o n g
On Mon, 14 Jul 2014 00:26:22 +0200, Ross Gammon wrote:

>> On Sun, 13 Jul 2014 22:29:37 +0600, Andrey Rahmatullin wrote:
>> 
>>> dh_install(1) is a program, not a target.
>>> 
 install -m 755 ddclient \ $(DESTDIR)/usr/sbin/ddclient
 
 install -D -m 755 debian/ddclient.NetworkManager \
 $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
>>> Writing proper *.install would be enough.
>> 
>> Please point me to where I can do further reading on this (exact url
>> appreciated), because I've spent a lot of time find it myself but
>> haven't found how to do it yet. Or -- an example is better than a
>> thousand words.
>> 
> https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install

On reviewing it, I think it won't solve my problem, because as said 
before, I saw in the log,

   ...
   dh_installdirs
   debian/rules override_dh_auto_install
make[1]: Entering directory '/export/build/pkg/ddclient/bld/
ddclient-3.8.2'
install -m 755 ddclient \
  /usr/sbin/ddclient
install -D -m 755 debian/ddclient.NetworkManager \
  /etc/NetworkManager/dispatcher.d/50-ddclient
dh_auto_install
make[1]: Leaving directory '/export/build/pkg/ddclient/bld/ddclient-3.8.2'
   dh_installdocs
   ...

I.e., the problem is that DESTDIR is empty. so $(DESTDIR)/usr/sbin/
ddclient becomes /usr/sbin/ddclient. Having a install file won't fix this 
problem I am afraid. 

Comments?

Thanks




-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpvkvo$c5h$6...@ger.gmane.org



Separate gpg signing from package building

2014-07-13 Thread T o n g
Hi, 

Is it possible to separate gpg signing from package building? 

As I'm still trying to learn Debian package building, I've found myself 
fallen into this silly loop many times -- Thinking that the package would 
be fine, I build it with gpg signing, but only to find out minutes later 
that I need fix something and rebuild, and the cycle goes on and on. 

Now I'm thinking, wouldn't it be nice I always build the package without 
gpg signing, and when finally I tested everything working fine, I sign 
it. Would it be possible? Detailed steps (instead of a mere yes) 
appreciated. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpvkie$c5h$5...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-13 Thread T o n g
On Sun, 13 Jul 2014 22:29:37 +0600, Andrey Rahmatullin wrote:

> dh_install(1) is a program, not a target.
> 
>>  install -m 755 ddclient \
>>$(DESTDIR)/usr/sbin/ddclient
>> 
>>  install -D -m 755 debian/ddclient.NetworkManager \
>>$(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
> Writing proper *.install would be enough.

Please point me to where I can do further reading on this (exact url 
appreciated), because I've spent a lot of time find it myself but haven't 
found how to do it yet. Or -- an example is better than a thousand words. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpv0nr$c5h$4...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-13 Thread T o n g
On Sun, 13 Jul 2014 18:18:21 +0600, Andrey Rahmatullin wrote:

>> I saw in the log,
>> 
>>...
>>dh_installdirs
>>   debian/rules override_dh_auto_install
>> make[1]: Entering directory '/export/build/pkg/ddclient/bld/
>> ddclient-3.8.2'
>> install -m 755 ddclient \
>>   /usr/sbin/ddclient
>> install -D -m 755 debian/ddclient.NetworkManager \
>>   /etc/NetworkManager/dispatcher.d/50-ddclient
>> dh_auto_install make[1]: Leaving directory
>> '/export/build/pkg/ddclient/bld/ddclient-3.8.2'
>>dh_installdocs ...
>> 
>> Seems to me that DESTDIR is empty. Wouldn't dh_make/debuild set DESTDIR
>> at the beginning of the build?
>
> Neither dh_make (which, by the way, is not run during the build process
> at all), nor debuild set DESTDIR. DESTDIR is passed to make install when
> (and if) dh_auto_install invokes it.

Good to know. Regardless the internal details on how things are passed 
along beneath the surface, how to fix it so that my debian/rules works 
and my built package is not empty? 

Again, here is my tweaked new rules file:

-
# main packaging script based on dh7 syntax
%:
dh $@ 

override_dh_auto_install:
install -m 755 ddclient \
  $(DESTDIR)/usr/sbin/ddclient

install -D -m 755 debian/ddclient.NetworkManager \
  $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
dh_auto_install
-




-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpu2ma$c5h$3...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-13 Thread T o n g
On Sun, 13 Jul 2014 18:19:08 +0600, Andrey Rahmatullin wrote:

>> I used the `dh_make` to create a new rules file, but found that what I
>> want to install are not in the final package.
>> 
>> Here is what the old rules file looks like:
>> 
>> install: build
>>  dh_testdir dh_testroot dh_clean -k dh_installdirs
>> 
>>  install -m 755 ddclient \
>>$(DESTDIR)/usr/sbin/ddclient
>> 
>>  install -D -m 755 debian/ddclient.NetworkManager \
>>$(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
>
> Note that you can achieve the same using dh_install(1) and probably
> dh_installdirs(1), without writing override code.

Did you mean this in debian/rules?

---
# main packaging script based on dh7 syntax
%:
dh $@ 

dh_install:
install -m 755 ddclient \
  $(DESTDIR)/usr/sbin/ddclient

install -D -m 755 debian/ddclient.NetworkManager \
  $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient

---

I tried the above and it didn't work. 

Or, did you actually mean that I should not to define the rule for 
'dh_install' but one of the following?

   dh_installdirs
   dh_auto_install
   dh_installdocs
   dh_installchangelogs
   dh_installexamples
   dh_installman
   dh_installdebconf
   dh_installinit
   dh_installppp

The problem is that none seems to fit. The 'dh_installdebconf' seems 
vaguely fit for the second install, but I'm really not sure. 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpu23f$c5h$2...@ger.gmane.org



Re: Resources that help to learn to solve Debian packaging problems by example

2014-07-13 Thread T o n g
On Sun, 13 Jul 2014 12:02:05 +0200, Ross Gammon wrote:

>>> I'm wondering if there is a central place that I can search for all
>>> Debian change logs for all packages, to see if the same lintian
>>> problem I'm having now have been dealt with before, and also see how
>>> exactly those lintian problems are fixed.
>> 
> If you prefer a web-based search, you could try:
> http://codesearch.debian.net/

Terrific. it can solve all my above listed problems in one place!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpu16d$c5h$1...@ger.gmane.org



About debuild -i

2014-07-12 Thread T o n g
Hi, 

What's that '-i' is for in the 'debuild -i' command? 

I was looking for it in debuild & dpkg-buildpackage man pages but still 
wasn't sure what it is for. 

The actual whole command I use is:

  debuild -i -us -uc -b

I found that if I use -i I will get the following problems, whereas if -i 
is omitted, then they won't show up. 

 I: ddclient: unused-debconf-template ddclient/hostslist
 I: ddclient: unused-debconf-template ddclient/blankhostslist

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpsuo5$8bi$1...@ger.gmane.org



Resources that help to learn to solve Debian packaging problems by example

2014-07-12 Thread T o n g
Hi, 

I'm wondering if there is a central place that I can search for all Debian 
change logs for all packages, to see if the same lintian problem I'm 
having now have been dealt with before, and also see how exactly those 
lintian problems are fixed. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpstms$c4u$1...@ger.gmane.org



The SCRIPTSCOMMON tag

2014-07-12 Thread T o n g
On Sat, 12 Jul 2014 09:36:34 +0200, Vincent Bernat wrote:

> I think this warning hide another problem with your modifications is
> that the SCRIPTSCOMMON tag doesn't get extended anymore. Ensure that
> dh_installscripts-common is still executed.

Ah, you are right. 

 script -c "debuild -i -us -uc -b"

 $ grep dh_installscripts-common typescript || echo not found 
 not found

the whole typescript file is posted at http://paste.debian.net/109333/ 
BTW.

Actually, I didn't change anything. I just used the `dh_make` to create a 
new rules file, then add the `override_dh_auto_install` rule. That's it. 
Ref: http://paste.debian.net/109276/

So how can I fix it? Googling is not helpful with it. Ref:
https://www.google.ca/search?q=SCRIPTSCOMMON+"dh_installscripts-common";

Please help. 
Thanks




-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpre4d$dos$5...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-12 Thread T o n g
On Sat, 12 Jul 2014 13:23:16 +, T o n g wrote:

> override_dh_auto_install:
>   install -m 755 ddclient \
> $(DESTDIR)/usr/sbin/ddclient
> 
>   install -D -m 755 debian/ddclient.NetworkManager \
> $(
)/etc/NetworkManager/dispatcher.d/50-ddclient
>   dh_auto_install
> 
> The command dh_auto_install is added to the end. But they are still not
> show up in the final package.

I saw in the log,

   ...
   dh_installdirs
   debian/rules override_dh_auto_install
make[1]: Entering directory '/export/build/pkg/ddclient/bld/
ddclient-3.8.2'
install -m 755 ddclient \
  /usr/sbin/ddclient
install -D -m 755 debian/ddclient.NetworkManager \
  /etc/NetworkManager/dispatcher.d/50-ddclient
dh_auto_install
make[1]: Leaving directory '/export/build/pkg/ddclient/bld/ddclient-3.8.2'
   dh_installdocs
   ...

Seems to me that DESTDIR is empty. Wouldn't dh_make/debuild set DESTDIR 
at the beginning of the build? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lprd5n$dos$4...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-12 Thread T o n g
On Sat, 12 Jul 2014 13:14:23 +, T o n g wrote:

>>> # main packaging script based on dh7 syntax %:
>>> dh $@
>>>
>>> override_dh_auto_install:
>>> install -m 755 ddclient \
>>>   $(DESTDIR)/usr/sbin/ddclient
>>>
>>> install -D -m 755 debian/ddclient.NetworkManager \
>>>   $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
>> 
>> You need to add dh_auto_install to the set of commands to execute in
>> this target.
> 
> Oh, I though "override_dh_auto_install" is the way to add
> dh_auto_install to the set of commands, No?

Oh, did you mean this:

override_dh_auto_install:
install -m 755 ddclient \
  $(DESTDIR)/usr/sbin/ddclient

install -D -m 755 debian/ddclient.NetworkManager \
  $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
dh_auto_install

The command dh_auto_install is added to the end. But they are still not 
show up in the final package. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lprcs4$dos$3...@ger.gmane.org



Re: Please help translate old rules file on the installation rules

2014-07-12 Thread T o n g
On Sat, 12 Jul 2014 09:27:32 +0200, Vincent Bernat wrote:

>> # main packaging script based on dh7 syntax %:
>>  dh $@
>>
>> override_dh_auto_install:
>>  install -m 755 ddclient \
>>$(DESTDIR)/usr/sbin/ddclient
>>
>>  install -D -m 755 debian/ddclient.NetworkManager \
>>$(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient
> 
> You need to add dh_auto_install to the set of commands to execute in
> this target.

Oh, I though "override_dh_auto_install" is the way to add dh_auto_install 
to the set of commands, No?

You mean to rename my "override_dh_auto_install" to "dh_auto_install" 
instead? Do I also need to take care of the following in it as well?

dh_testdir
dh_testroot
dh_clean -k
dh_installdirs





-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lprcbf$dos$2...@ger.gmane.org



where are these lintian problems coming from

2014-07-11 Thread T o n g
Hi, 

Do I need to care about the lintian problems from the binary package that 
I maintain/build?

For the following problems, I have no idea where they come from:

 N: Processing binary package ddclient (version 3.8.2-1, arch all) ...
 W: ddclient: using-imperative-form-in-templates ddclient/fetchhosts
 I: ddclient: unused-debconf-template ddclient/hostslist
 I: ddclient: unused-debconf-template ddclient/blankhostslist

I.e., I can't find ddclient/fetchhosts, or fetchhosts anywhere from my 
source directory, neither it is in the binary package. And so are the 
ddclient/hostslist and ddclient/blankhostslist files too. 

Also, how exactly should I fix the following problems?

 W: ddclient: config-does-not-load-confmodule
 W: ddclient: postinst-does-not-load-confmodule

I know the reasons/fixes are:

- The config script must load one of the debconf libraries.
- Even if your postinst does not involve debconf, you currently need to
  make sure it loads one of the debconf libraries.

but I don't know how to fix them.

Moreover, how to add an override for this tag:

 E: ddclient: read-in-maintainer-script config:25

because the check is false positives since the read is used in a block 
with a redirection. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpqgh4$dos$1...@ger.gmane.org



Please help translate old rules file on the installation rules

2014-07-11 Thread T o n g
Hi, 

I used the `dh_make` to create a new rules file, but found that what I 
want to install are not in the final package. 

Here is what the old rules file looks like:

install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs

install -m 755 ddclient \
  $(DESTDIR)/usr/sbin/ddclient

install -D -m 755 debian/ddclient.NetworkManager \
  $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient


Here is my tweaked new rules file:

# main packaging script based on dh7 syntax
%:
dh $@ 

override_dh_auto_install:
install -m 755 ddclient \
  $(DESTDIR)/usr/sbin/ddclient

install -D -m 755 debian/ddclient.NetworkManager \
  $(DESTDIR)/etc/NetworkManager/dispatcher.d/50-ddclient


Apparently my tweaking is not achieving what I'm expecting. 

How to make it work please?
Both rules files are posted in full at
http://paste.debian.net/109275/ and http://paste.debian.net/109276/

Thanks

tong



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpqbbr$grb$1...@ger.gmane.org



git shallow clone from Debian anonscm git

2014-07-09 Thread T o n g
Hi, 

How can I do a git shallow clone from Debian anonscm git?

The project I want to clone is 

http://anonscm.debian.org/gitweb/?p=collab-maint/ddclient.git;a=summary

in the package's description, the git url is 

git://anonscm.debian.org/collab-maint/ddclient.git

Thus, I tried "git clone --depth 1 git://anonscm.debian.org/collab-maint/
ddclient.git", but got the following:

  $ git clone --depth 1 git://anonscm.debian.org/collab-maint/ddclient.git
  Cloning into 'ddclient'...
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: --shallow-file failed

Then I tried shallow clone from the http interface, but got the following:

  $ git clone --depth 1 https://alioth.debian.org/anonscm/git/collab-
maint/ddclient.git
  Cloning into 'ddclient'...
  fatal: dumb http transport does not support --depth

So, how can I do a git shallow clone from Debian anonscm git?
Or, how can I get the lastest ddclient git code without the histories?

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/lpl4gf$ffp$1...@ger.gmane.org



Re: lintian usage and inconsistence problem

2014-01-28 Thread T o n g
On Tue, 28 Jan 2014 07:34:20 +0100, Niels Thykier wrote:

>>> $ lintian -EviIL +pedantic --color auto --display-experimental
>>>   ../*.dsc
>>> [...]
>>> I.e., when I invoke lintian manually, I didn't see problems reported
>>> by debuild.
>> 
>> Lintian can check both source packages (*.dsc) or binary packages
>> (*.deb). By running it on the .dsc file, you only see the results of
>> source checks.
>> 
>> The solution to this is to invoke lintian on the .changes file.
>> As a consequence it will do both source and binary checks
>> 
> Bonus hint: you can often omit the package argument for lintian, when
> you run it from the unpacked source tree. ...

Thanks everyone for your helps. 

I run my above lintian with and without "../*.changes", but the results 
are all the same. They all are the same as that of "../*.dsc". I.e., 
still missing info. 

Any ideas? 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/lc8k20$5he$1...@ger.gmane.org



lintian usage and inconsistence problem

2014-01-27 Thread T o n g
Hi, 

I'm having problem using lintian.

This was my previous question:

On Thu, 23 Jan 2014 15:49:31 -0500, Tong wrote:

> On Thu, Jan 23, 2014 at 7:50 AM, Eriberto 
> wrote:
>> You have a lintian message yet:
>>
>> I: shc: spelling-error-in-manpage usr/share/man/man1/shc.1.gz comand
>> command
>>
>> And your problem isn't lintian version, but the configuration. Please,
>> read this:
>>
>> http://eriberto.pro.br/blog/?p=1289
> 
> Strange, I've freshly installed my sid, done the above changes, but
> still am not seeing the spelling-error-in-manpage prompt. Putting
> everything on the command line, "lintian -EviIL +pedantic --color auto
> --display-experimental", I'm still not getting that one.

In short, using "lintian -EviIL +pedantic --color auto --display-
experimental" wouldn't let me see the lintian warnings others see. 

Now, on top of that, 

When using "debuild -us -uc", at the end, I see:

---
Now running lintian...
warning: the authors of lintian do not recommend running it with root 
privileges!
W: zh-autoconvert source: newer-standards-version 3.9.5 (current is 3.9.4)
W: libhz-dev: wrong-section-according-to-package-name libhz-dev => 
libdevel
W: libhz0: hardening-no-relro usr/lib/libhz.so.0.0
W: zh-autoconvert: binary-without-manpage usr/bin/autob5
W: zh-autoconvert: binary-without-manpage usr/bin/autogb
E: zh-autoconvert: pkg-has-shlibs-control-file-but-no-actual-shared-libs
W: zh-autoconvert: postinst-has-useless-call-to-ldconfig
W: zh-autoconvert: postrm-has-useless-call-to-ldconfig
Finished running lintian.
---

However, when I invoke lintian manually myself again, I get this:

---
$ lintian -EviIL +pedantic --color auto --display-experimental ../*.dsc
N: Unpacking packages in group zh-autoconvert/0.3.16-5
N: 
N: Processing source package zh-autoconvert (version 0.3.16-5, arch 
source) ...
I: zh-autoconvert source: quilt-patch-missing-description 00_zh-
autoconvert_0.3.16-3.diff
N: 
N:quilt patch files should start with a description of patch. All 
lines...
...
I: zh-autoconvert source: quilt-patch-missing-description 01_hardening-no-
relro.diff
... 
---

I.e., when I invoke lintian manually, I didn't see problems reported by 
debuild. 

What's wrong? 

Thanks





-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/lc6mrl$g6q$1...@ger.gmane.org



Re: Requirement for compat level 9

2014-01-04 Thread T o n g
On Sat, 04 Jan 2014 18:39:23 -0500, Stephen M. Webb wrote:

>> How can I make sure my building environment is at compat level 9?
> 
>>From he debhelper(7) manpage:
> 
> Tell debhelper what compatibility level to use by writing a number to
> debian/compat. For example, to turn on v9 mode:
> 
>  % echo 9 > debian/compat

I know I can force compat level to 9 just like that. But what I want to 
know is how to make sure my building environment is up to that level. 
E.g., in a very old Debian system, e.g., potato, you can "set" debian/
compat to 9, but I don't think it will work. The requirement, that's what 
I'd like to know. 

thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/laa6ki$i8$1...@ger.gmane.org



Requirement for compat level 9

2014-01-04 Thread T o n g
On Sat, 04 Jan 2014 17:22:49 -0500, Stephen M. Webb wrote:

> The instructions available on the web are for older versions of the
> build infrastructure.  The debhelper(7) manual page does mention 
> dpkg-buildflags flags are passed through at compat level 9, but it isn't
> necessarily obvious what that means unless you have intimate knowledge
> of the build tool internals.

Oh, thanks for the further explanation. 

How can I make sure my building environment is at compat level 9? 

thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/laa246$i8$1...@ger.gmane.org



pkg-has-shlibs-control-file-but-no-actual-shared-libs triggered by a private shared library

2014-01-04 Thread T o n g
Hi, 

> "pkg-has-shlibs-control-file-but-no-actual-shared-libs is sometimes 
triggered for packages with a private shared library due to a bug in 
Debhelper"

That seems to have bitten me. 

 E: zh-autoconvert: pkg-has-shlibs-control-file-but-no-actual-shared-libs
 W: zh-autoconvert: postinst-has-useless-call-to-ldconfig
 W: zh-autoconvert: postrm-has-useless-call-to-ldconfig

I've put my debian folder for zh-autoconvert at
https://github.com/suntong001/zh-autoconvert-build

Please verify and/or build zh-autoconvert 0.3.16-3 using my debian folder.
https://github.com/suntong001/zh-autoconvert-build/archive/master.zip

I've checked 
http://bugs.debian.org/204975 and http://bugs.debian.org/633853 for 
details, but still don't how to check if the SONAME of the library is 
set, nor the fix. 

Please help. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/laa1j5$i8$1...@ger.gmane.org



Re: Please help me fix these build problems

2014-01-04 Thread T o n g
Thanks.

On Fri, 03 Jan 2014 11:34:10 -0500, Stephen M. Webb wrote:

>> W: zh-autoconvert: hardening-no-relro usr/bin/autogb
> 
> To fix this one, you need to add $CPPFLAGS and $LDFLAGS to your linker
> command line in your Makefile.

And add the following at the top of the Makefile as well:

# use "dpkg-buildflags"
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

https://wiki.debian.org/Hardening
https://github.com/suntong001/zh-autoconvert-build/blob/master/debian/
patches/01_hardening-no-relro.diff

Thanks again Stephen


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/laa0gh$i8$1...@ger.gmane.org



Re: Bug#733987: RFS: dbab/1.0.1 [ITP] - dnsmasq-based ad-blocking using pixelserv

2014-01-04 Thread T o n g
On Thu, 02 Jan 2014 16:20:57 -0500, Tong Sun wrote:

> Package: sponsorship-requests Severity: normal
> 
>   Dear mentors,
> 
>   I am packing "The Best Ad Blocking Method"[1] into a Debian package
>   and am
>  looking for a sponsor for my package "dbab", which starts with
> reviewing it first.
> 
>  [1] http://sfxpt.wordpress.com/2011/02/21/the-best-ad-blocking-method/
> 
>  * Package name: dbab
>Version : 1.0.1 Upstream Author : Tong Sun
>
>  * URL : https://github.com/suntong001/dbab * License   
>   : bsd
>Section : net
> 
>   It builds those binary packages:
> 
> dbab  - dnsmasq-based ad-blocking using pixelserv
> 
>   To access further information about this package, please visit the
> following URL:
> 
>   http://mentors.debian.net/package/dbab
> 
>   Alternatively, one can download the package with dget using this
>   command:
> 
> dget -x
> http://mentors.debian.net/debian/pool/main/d/dbab/dbab_1.0.1.dsc
> 
>   More information about it can be obtained from,
> 
>  http://sfxpt.wordpress.com/2011/02/21/the-best-ad-blocking-method/
>  https://github.com/suntong001/dbab

Hi everyone,

Sorry that my first two uploads was a bit rush. 

Now I've fixed everything I think I should fix, and tested the binary 
package myself beforehand. All satisfied, I've redo the upload. 

The respective dsc file can be found at:
http://mentors.debian.net/debian/pool/main/d/dbab/dbab_1.0.1-1.dsc

Please review.

Thanks

Tong Sun



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la9n84$i8$9...@ger.gmane.org



Re: Bug#733987: RFS: dbab/1.0.1 [ITP] - dnsmasq-based ad-blocking using pixelserv

2014-01-03 Thread T o n g
On Fri, 03 Jan 2014 17:29:18 -0600, Michael Shuler wrote:

> Prior to sending additional emails - make sure your build actually
> works.

Oh I'm terribly sorry. Will do...


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la7ne0$jp2$1...@ger.gmane.org



Re: dpkg-source: version does not contain a revision

2014-01-03 Thread T o n g
On Fri, 03 Jan 2014 22:02:00 +0100, Niels Thykier wrote:

> I guess (without having it confirmed) that your package has a "native"
> version (i.e. without a "dash").  For 3.0 (quilt) packages your package
> must have a non-native version (e.g. 1.0.1-1).

BINGO. Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la7dpq$i8$8...@ger.gmane.org



Re: Bug#733987: RFS: dbab/1.0.1 [ITP] - dnsmasq-based ad-blocking using pixelserv

2014-01-03 Thread T o n g
On Thu, 02 Jan 2014 17:44:33 -0600, Michael Shuler wrote:

> 1) incomplete source and debian packaging (symlinked to nowhere)
> 2) native package (version 1.0.1 and debian/ dir should be separate from
> upstream source)

Hi everyone, 

I've just uploaded a new version which should have fixed both issues 
above. 

The respective dsc file can be found at:
http://mentors.debian.net/debian/pool/main/d/dbab/dbab_1.0.1-2.dsc

Please review. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la7dkl$i8$7...@ger.gmane.org



dpkg-source: version does not contain a revision

2014-01-03 Thread T o n g
Hi, 

What's the cause (and fix) of the following error?

   dpkg-source -b dbab-1.0.1
  dpkg-source: error: can't build with source format '3.0 (quilt)': 
version does not contain a revision
  dpkg-buildpackage: error: dpkg-source -b dbab-1.0.1 gave error exit 
status 255

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la76i8$i8$6...@ger.gmane.org



Please help me fix these build problems

2014-01-03 Thread T o n g
Hi, 

I'm trying to convert zh-autoconvert from pre-dh to using the dh for the 
making. 
I don't know how to fix the following problems:

W: zh-autoconvert: hardening-no-relro usr/bin/autogb
E: zh-autoconvert: pkg-has-shlibs-control-file-but-no-actual-shared-libs
W: zh-autoconvert: postinst-has-useless-call-to-ldconfig
W: zh-autoconvert: postrm-has-useless-call-to-ldconfig
W: libhz-dev: wrong-section-according-to-package-name libhz-dev => 
libdevel

- For hardening-no-relro, I've enclosed my Makefile and debian/rules in   
REF#1.
- For pkg-has-shlibs-control-file-but-no-actual-shared-libs, hope the 
Makefile in REF#1 can give you some clue. Otherwise, please let me know 
what to show.
- For wrong-section, I have the following in control file:

 Package: libhz-dev
 Architecture: any
 Section: devel

Shall I change the "Section: devel" to "Section: libdevel"?

- For useless-call-to-ldconfig, I have no idea where the postinst & postrm 
are defined. Here are all files under my debian/ folder:

$ find debian/
debian/
debian/control
debian/copyright
debian/source
debian/source/format
debian/changelog
debian/rules
debian/compat
debian/libhz-dev.install
debian/libhz0.install
debian/zh-autoconvert.install
debian/watch
debian/patches
debian/patches/series
debian/patches/zh-autoconvert_0.3.16-3.diff

And I've checked every one of them. 

REF#1,

$ cat Makefile 

CC=gcc
CFLAG=-O2 -g -Wall -Iinclude
LIBS= -Llib -lhz

.PHONY: all hzlib clean install-home install

all: autob5 autogb hzlib  xchat-plugins

autob5: autogb
rm -f autob5;ln -s autogb autob5
autogb:autogb.c  hzlib
$(CC) $(CFLAG) $(LIBS) autogb.c -lhz -o autogb
autogb-static:autogb.c  hzlib
$(CC) $(CFLAG) autogb.c lib/libhz.a -o autogb
hzlib:
cd hzconvert;make
xchat-plugins: 
cd contrib/xchat-plugins;make
clean:
rm -f autob5 autogb *.o *~
rm -f include/*~
cd hzconvert;make clean
cd contrib/xchat-plugins;make clean
install-home:
[ ! -f $(HOME)/bin ] || mkdir $(HOME)/bin
rm -f $(HOME)/bin/autob5
rm -f $(HOME)/bin/autogb
cp -f autogb $(HOME)/bin
ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5
chmod 755 $(HOME)/bin/autogb 
install:
install -s -m 755 autogb $(DESTDIR)/usr/bin
install -s -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
install -s -m 755 lib/libhz.a $(DESTDIR)/usr/lib
install -s -m 755 contrib/xchat-plugins/xchat-autogb.so 
$(DESTDIR)/usr/lib/zh-autoconvert
install -s -m 755 contrib/xchat-plugins/xchat-autob5.so 
$(DESTDIR)/usr/lib/zh-autoconvert
install -m 644 include/*.h  $(DESTDIR)/usr/include
cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5

$ cat debian/rules 
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file . . . 

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
dh $@ 

override_dh_auto_install:
mkdir -p debian/tmp/usr/bin debian/tmp/usr/lib debian/tmp/usr/
include debian/tmp/usr/lib/zh-autoconvert
dh_auto_install


Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la6n5i$i8$5...@ger.gmane.org



Re: Bug#733987: RFS: dbab/1.0.1 [ITP] - dnsmasq-based ad-blocking using pixelserv

2014-01-03 Thread T o n g
Thank you Michael for your review. 

On Thu, 02 Jan 2014 17:44:33 -0600, Michael Shuler wrote:

> 1) incomplete source and debian packaging (symlinked to nowhere)

OK. didn't know that when I was using lndir. Easy fix. 

> 2) native package (version 1.0.1 and debian/ dir should be separate from
> upstream source)

Please elaborate. I'm the packer and also the upstream author. What's the 
easiest way for me to fix it? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la6h7r$i8$4...@ger.gmane.org



Re: File modification and the copyright

2014-01-03 Thread T o n g
On Thu, 02 Jan 2014 14:59:42 -0800, Russ Allbery wrote:

> Usually I . . . 

Thanks, as always!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la6gpb$i8$3...@ger.gmane.org



File modification and the copyright

2014-01-02 Thread T o n g
Hi, 

If I take a simple file (BSD-licensed), (greatly) improved it, and 
include it in my package. How should I handle the situation? 

- I should claim that the author of the new file is me, right?
- I should inherit the BSD-licensed, right?
- How to express that the new file was based on another old file from a 
different author in the debian/copyright file?

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la4nrr$i8$2...@ger.gmane.org



Re: empty-binary-package

2014-01-02 Thread T o n g
On Thu, 02 Jan 2014 11:44:28 -0800, Russ Allbery wrote:

> You're building multiple binary packages from the same source package.
> This means that the Debian package build infrastructure has no inherent
> way of determining which files go into which package.  You have to tell
> it explicitly.

Extremely grateful of your detailed explanation, Russ!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la4lrc$i8$1...@ger.gmane.org



empty-binary-package

2014-01-02 Thread T o n g
Hi, 

I am doing test build of my binary package, and I get the following 
warnings. 

W: zh-autoconvert: empty-binary-package

I checked and it *is* empty, only containing copyright and changelog, 
nothing else. I don't know why because it looks like the installation was 
fine. 

I've post the build log at
http://paste.debian.net/73847/

Please see if you can spot anything unusual, and tell me if you need 
anything else.

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la4a2t$vuj$1...@ger.gmane.org



Re: generic debian/rules that creates directories

2014-01-02 Thread T o n g
On Wed, 01 Jan 2014 21:00:18 -0800, Russ Allbery wrote:

> There have been several replies to this, but none of them quite tell you
> exactly what to do, so let me take a stab at that.
> 
> First, dh_installdirs is not actually useful for solving this particular
> problem . . . 

Thank you, thank you, thank you! At last someone has stepped forward and 
give specific help, instead of *merely* pointing to a manpage (and 
ironically a wrong one). 

Thanks again Sir, for your help!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la3uqm$btl$1...@ger.gmane.org



Re: generic debian/rules that creates directories

2014-01-01 Thread T o n g
On Thu, 02 Jan 2014 00:23:42 +0100, Gergely Nagy wrote:

>> Is it possible to alter the following `debian/rules` file so that it
>> plays nicely with such upstream Makefiles?
> 
> Yes. You want to use dh_installdirs(1). I suggest you read its manpage.
> Mind you, you won't need to touch debian/rules for that.

Ok, so I read the manpage of dh_installdirs(1), which I included below. 
But still how can I use it to create patch that I can send upstream to 
support creating $DESTDIR/usr/bin and so on, as suggested by Paul?

Things are getting far more complicated than I had anticipated. 

NAME

dh_installdirs − create subdirectories in package build directories

SYNOPSIS

dh_installdirs [debhelper options] [−A] [dir ...]

DESCRIPTION

dh_installdirs is a debhelper program that is responsible for creating 
subdirectories in package build directories.

FILES

debian/package.dirs

Lists directories to be created in package.

OPTIONS

−A, −−all

Create any directories specified by command line parameters in ALL 
packages acted on, not just the first.

dir ...

Create these directories in the package build directory of the first 
package acted on. (Or in all packages if −A is specified.)

SEE ALSO

debhelper(7)

This program is a part of debhelper.



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la2ond$ill$1...@ger.gmane.org



generic debian/rules that creates directories

2014-01-01 Thread T o n g
Hi,

Is it possible to have a generic debian/rules that creates directories? 

The upstream Makefiles was not designed to install into $DESTDIR but 
to /, so it assumes /usr/bin exists, while that creates problems for me:

  install -s -m 755 autogb /export/build/zh-autoconvert/bld/zh-
autoconvert-0.3.16/debian/tmp/usr/bin
  install: cannot create regular file '/export/build/zh-autoconvert/bld/
zh-autoconvert-0.3.16/debian/tmp/usr/bin': No such file or directory

Is it possible to alter the following `debian/rules` file so that it 
plays nicely with such upstream Makefiles? 

Thanks


$ cat debian/rules 
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-
make.
#
# Modified to make a template file for a multi-binary package with 
separated
# build-arch and build-indep targets  by Bill Allombert 2001

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
dh $@ 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la23r5$nk5$1...@ger.gmane.org



Solved: To edit an existing quilt patch (fuzz is not allowed when applying patches)

2014-01-01 Thread T o n g
On Wed, 01 Jan 2014 20:54:40 +, T o n g wrote:

> I'm trying to manually converted my packages to 3.0 (quilt) source
> format,
> and have gone so far as made dpkg-source recognize my efforts,

Having read https://wiki.debian.org/UsingQuilt over 3 to 5 times, and 
starting from scratch step by step, I think I solved the problem now. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la20q3$593$2...@ger.gmane.org



To edit an existing quilt patch (fuzz is not allowed when applying patches)

2014-01-01 Thread T o n g
Hi, 

I'm trying to manually converted my packages to 3.0 (quilt) source 
format, and have gone so far as made dpkg-source recognize my efforts, 
with some minor issues:

   dpkg-source -b zh-autoconvert-0.3.16
  dpkg-source: info: using source format `3.0 (quilt)'
  dpkg-source: info: building zh-autoconvert using existing ./zh-
autoconvert_0.3.16.orig.tar.gz
  patching file contrib/xchat-plugins/xchat-autob5.c
  Hunk #1 FAILED at 88.
  Hunk #2 FAILED at 126.
  2 out of 2 hunks FAILED
  patching file contrib/xchat-plugins/xchat-autogb.c
  Hunk #1 FAILED at 88.
  Hunk #2 FAILED at 126.
  2 out of 2 hunks FAILED
  dpkg-source: info: fuzz is not allowed when applying patches
  dpkg-source: info: if patch '01_gcc-3.4.diff' is correctly applied by 
quilt, use 'quilt refresh' to update it
  dpkg-source: error: LC_ALL=C patch -t ...01_gcc-3.4.diff gave error 
exit status 1

However, I can't fix the problem:

$ quilt refresh
No series file found

cd debian/patches/

$ quilt refresh
No patches applied

$ quilt refresh 01_gcc-3.4.diff 
Patch 01_gcc-3.4.diff is not applied

So, how can I use 'quilt refresh' to update my 01_gcc-3.4.diff? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/la1vag$593$1...@ger.gmane.org



Re: About the testing transition known as auto-libunwind

2013-12-22 Thread T o n g
On Sun, 22 Dec 2013 10:20:50 +0100, Niels Thykier wrote:

>In the particular case, not much. libunwind is somewhat a special case...

Thanks a lot for your detailed explanation Niels!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l96vuh$mqh$1...@ger.gmane.org



About the testing transition known as auto-libunwind

2013-12-21 Thread T o n g
Hi, 

I want to adopt the par2cmdline package, but on its QA page, 
http://packages.qa.debian.org/p/par2cmdline.html
it says, 

,-
| "This package is part of the ongoing testing transition known as
| auto-libunwind. Please avoid uploads unrelated to this
| transition, they would likely delay it and require supplementary
| work from the release managers."
`-

what's the impact on me adopting/building/uploading the package?

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l95jnp$9ti$1...@ger.gmane.org



[Help] Usable command options parser for C

2013-12-21 Thread T o n g
Hi, 

I know that the best command options parser is the GNU getopt(3) 
routines. I know that the GNU has a wrapper to generate C code around the 
GNU getopt(3) routines -- the http://www.gnu.org/software/gengetopt/. 

However, that wrapper, gengetopt, is dated and lacks of maintenance now. 
It is causing segmentation faults on newer systems --
https://savannah.gnu.org/bugs/?40370

So I'm wondering what my other options are. If I need to build a tool in 
C that needs command options parsing, which tool/lib will make my life a 
bit easier? I don't need fancy functionalities. Nice and simple would be 
good enough for me and more preferable. 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l95grs$o4o$2...@ger.gmane.org



Packaging review for my newly adopted

2013-12-21 Thread T o n g
Hello all, 
 
Could I get a packaging review for my newly adopted/built package 
please?  

The zh-autoconvert, Chinese encodings auto-converter, was orphaned more 
than two years ago. Lintian reports 6 errors and 34 warnings about this 
package (http://lintian.debian.org/maintainer/y...@debian.org.html#zh-
autoconvert). I have almost cleaned them all. 

I've uploaded my trial build to
http://mentors.debian.net/package/zh-autoconvert

Please review and comment. 

Thanks

tong



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l95eqi$o4o$1...@ger.gmane.org



Maintaining Perl module turned packages

2013-12-07 Thread T o n g
Hi, 

dh-make-perl is good to turn a CPAN module into Debian package. 

However, it is still not clear to me how to maintain such built source 
packages. Having fine-tuned all the control files under debian/ folder, 
how can I make the changes to the new upstream release? 

My upstream don't have git, so I can only download the new release from 
CPAN. I.e., the pristine-tar is not applicable. 

Thanks 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l801h7$nvo$1...@ger.gmane.org



Building Perl modules that have dependencies

2013-12-07 Thread T o n g
Hi, 

How to build to Debian source packages from Perl modules that have 
(alien) dependencies? I.e., the dependencies are not exist yet.

- Can I specify multiple Perl modules to cpan2dsc/dh-make-perl?
- Or should I build the dependencies into binary packages and install 
them first? 
- Or should I build everything into Debian source packages, including the 
dependencies, as if they are independent of each other? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7vkn5$t0v$1...@ger.gmane.org



Re: dpkg-source: error: cannot write /tmp/temp-lintian-lab-...

2013-12-06 Thread T o n g
On Sat, 07 Dec 2013 03:28:14 +, T o n g wrote:

> Well, I'll try building it outside docker...

building it outside docker is fine. So, will look into the problem 
sometimes later...



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7u4ua$lj5$6...@ger.gmane.org



dpkg-source: error: cannot write /tmp/temp-lintian-lab-...

2013-12-06 Thread T o n g
Thanks A LOT for the swift response.

On Sat, 07 Dec 2013 11:09:14 +0800, Paul Wise wrote:

>> - dpkg-source: error: cannot write /tmp/temp-lintian-lab-...
> 
> Something is wrong with your /tmp directory. It is probably either full
> or has incorrect permissions.

I suspect it has something to do with my build environment because 
I'm doing package build under docker. Ref,

http://sfxpt.wordpress.com/2013/11/10/debianubuntu-package-developing-
with-docker/
http://sfxpt.wordpress.com/2013/11/17/debianubuntu-package-developing-
with-docker-continued/

I.e., I'm building under the 'root' account, and the /tmp directory is on 
top of aufs FS. 

I was trying to fix the problem myself, and find the following,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388786

Basically, "lintian follows the normal Unix convention of honoring TMPDIR 
as a location into which to put temporary files", so I did:

 export TMPDIR=/export/build/tmp

when the /export is the bind mount point into the docker image. This 
should rule out the case that I don't have enough space on /tmp. However,

$ lintian ../*.dsc
warning: the authors of lintian do not recommend running it with root 
privileges!
dpkg-source: error: cannot write /export/build/tmp/temp-lintian-lab-
jeMCBqajFT/pool/d/dbab/dbab_1.0.1_source/unpacked/debian/source/format: 
No such file or directory
internal error: dpkg-source -x failed with status  2 at /usr/share/
lintian/collection/unpacked line 62
warning: collect info unpacked about package dbab failed
warning: skipping check of source package dbab

I.e., lintian IS using my host /export directory for temp space, but it 
is still failing. 

Well, I'll try building it outside docker...
Hmm... hold on, I was able to build another package under docker just 
fine. Anyway, will play around further...





-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7u4ke$lj5$5...@ger.gmane.org



Please help fix these build errors

2013-12-06 Thread T o n g
Hi, 

I get some strange build error 

- dpkg-source: error: cannot write /tmp/temp-lintian-lab-...
- unknown substitution variable ${shlibs:Depends}

Here are the details:

$ debuild -us -uc   
 [ . . . ]
/usr/bin/install -c -m 644 file/dbab.list- /export/build/dbab/git/
dbab-1.0.1/debian/dbab/etc
make[1]: Leaving directory `/export/build/dbab/git/dbab-1.0.1'
   dh_installdocs
   dh_installchangelogs
   dh_installman
   dh_perl
   dh_link
   dh_compress
   dh_fixperms
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: Depends field of package dbab: unknown 
substitution variable ${shlibs:Depends}
^^
dpkg-gencontrol: warning: package dbab: unused substitution variable 
${perl:Depends}
^^
   dh_md5sums
   dh_builddeb
dpkg-deb: building package `dbab' in `../dbab_1.0.1_amd64.deb'.
 dpkg-genchanges  >../dbab_1.0.1_amd64.changes
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build dbab-1.0.1
dpkg-buildpackage: full upload; Debian-native package (full source is 
included)
Now running lintian...
warning: the authors of lintian do not recommend running it with root 
privileges!
dpkg-source: error: cannot write /tmp/temp-lintian-lab-DEo3bzMAvt/pool/d/
dbab/dbab_1.0.1_source/unpacked/debian/source/format: No such file or 
directory
^^
internal error: dpkg-source -x failed with status  2 at /usr/share/
lintian/collection/unpacked line 62
warning: collect info unpacked about package dbab failed
warning: skipping check of source package dbab
W: dbab: binary-without-manpage usr/sbin/dbab-add-list
W: dbab: binary-without-manpage usr/sbin/dbab-chk-list
W: dbab: binary-without-manpage usr/sbin/dbab-get-list
Finished running lintian.

$ rm ../dbab_* -f

$ debuild -us -uc -S
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build dbab-1.0.1
dpkg-buildpackage: source only upload: Debian-native package
Now running lintian...
warning: the authors of lintian do not recommend running it with root 
privileges!
dpkg-source: error: cannot write /tmp/temp-lintian-lab-uApusHBMq2/pool/d/
dbab/dbab_1.0.1_source/unpacked/debian/source/format: No such file or 
directory

internal error: dpkg-source -x failed with status  2 at /usr/share/
lintian/collection/unpacked line 62
warning: collect info unpacked about package dbab failed
warning: skipping check of source package dbab
Finished running lintian.

$ lintian ../*.dsc
warning: the authors of lintian do not recommend running it with root 
privileges!
dpkg-source: error: cannot write /tmp/temp-lintian-lab-tU3BBC9fPj/pool/d/
dbab/dbab_1.0.1_source/unpacked/debian/source/format: No such file or 
directory

internal error: dpkg-source -x failed with status  2 at /usr/share/
lintian/collection/unpacked line 62
warning: collect info unpacked about package dbab failed

and, why lintian fails on the source build while it looks OK on the 
binary build. 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7u304$lj5$4...@ger.gmane.org



Re: file-in-unusual-dir and binary-without-manpage

2013-12-06 Thread T o n g
On Sat, 07 Dec 2013 10:20:57 +0800, Paul Wise wrote:

> Only that the Makefile doesn't create a directory for it and assumes
> that it exists already.

Ahhh!!! 
THANKS!


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7u2fr$lj5$3...@ger.gmane.org



Re: file-in-unusual-dir and binary-without-manpage

2013-12-06 Thread T o n g
On Sat, 07 Dec 2013 09:19:37 +0800, Paul Wise wrote:

> Don't symlink the manual page, that isn't useful at all. Just ignore the
> warning until you or upstream have written a useful manual page.

OK. will do. 

>> $(INSTALL) -m 644 file/dbab.addr $(etcdir)
> 
> This command installs the file /etc instead of putting dbab.addr into
> the /etc directory, which is what I assume you wanted.
> 
> You probably want this command instead:
> 
> $(INSTALL) -m 644 -D file/dbab.addr $(etcdir)/dbab.addr

But how come the following get my files in the correct place? 

$(INSTALL) -m 755 bin/dbab-get-list $(bindir)
$(INSTALL) -m 644 file/dbab-get-list.8 $(mandir)

I'm still thinking something odd about the /etc directory. 

BTW, The whole Makefile is posted at
http://paste.debian.net/69755/

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7u02q$lj5$2...@ger.gmane.org



file-in-unusual-dir and binary-without-manpage

2013-12-06 Thread T o n g
Thanks a lot Robert for your comprehensive help. I found your
https://github.com/ramses0/xscreensaver-pi-hdmi/
an excellent example for me to follow as well. 

Now,

On Sun, 01 Dec 2013 13:04:19 -0800, Robert Ames wrote:

>> I want to pack a simple perl script
>> (http://proxytunnel.sourceforge.net/
>> files/pixelserv.pl.txt) as a package, but need your help.
> 
> You should have a close read of the Debian Policy Manual:
> 
>   http://www.debian.org/doc/debian-policy/
> 
> ...specifically: Section 10.7 "Configuration Files" which suggest
> /etc/...

Having installed my configuration files under /etc, I get the following 
lintian warnings:

  W: dbab: file-in-unusual-dir etc

I took a look at the generated binary package, and found that none of my 
files under /etc are included in the binary package. 

Also, in order to fix the "binary-without-manpage" lintian warning, I 
want to symlink the none-existing manpages to an existing one on the 
destination system. How can I do it? (I found my in my generated binary 
package, they are all plain files, even I've symlink the none-existing 
manpages to an existing one in my local build tree.)

Thanks

PS. here is the part I install my configuration files under /etc in my 
Makefile:

etcdir = ${DESTDIR}/etc

$(INSTALL) -m 644 file/dbab.addr $(etcdir)



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7tr4n$lj5$1...@ger.gmane.org



packaging perl programs

2013-12-01 Thread T o n g
Hi, 

I want to pack a simple perl script (http://proxytunnel.sourceforge.net/
files/pixelserv.pl.txt) as a package, but need your help. 

I've checked out the 

Debian Perl Policy
http://www.debian.org/doc/packaging-manuals/perl-policy/

and believe the script is fine. 

But I don't know if there is any ready-made tool that can help me 
packaging the perl script, as packing from .tar.gz files, and if so, how 
to use it. If not, how should I proceed. Detailed instruction 
appreciated. 

Here is the homework I've done so far. 

- it's author and license is listed on 
  http://proxytunnel.sourceforge.net/pixelserv.php
- the package should base on perl-base I suppose
- it uses Perl IO::Socket::INET module, which I believe comes from libio-
socket-ip-perl
- it needs an init script for starting/stopping the pixelserv service, 
which I have coded. Is Debian using upstart now, BTW?

Further, I want to enhance it to have a (extremely simple) configuration 
file. Should I put it as /usr/lib/pixelserv, or as /etc/pixelserv? 

Thanks

PS. For more on pixelserv, plz refer to 
http://sfxpt.wordpress.com/2011/02/21/the-best-ad-blocking-method/



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l7g4n8$6oq$1...@ger.gmane.org



Debian/Ubuntu Package Developing with Docker, Continued

2013-11-17 Thread T o n g
Hi, 

Last time I posted about that Docker being the best tool for developing 
Debian/Ubuntu packages [1]. If you missed it, here is the recap:

- The reason Docker being the best tool for developing Debian/Ubuntu 
packages is that, it gives you isolated pure & pristine environments to 
build packages, *and* it allows you to build layers on top of each other, 
while giving you the freedom to play in any layer at any given time. 
Moreover, when it comes to Debian packages developing, the best part is 
that all your changes to the layer can be discarded at your will, so you 
can *always* start from the pristine stage of your layer.

- I talked about constructing the first layer to be the bare-minimum 
installation system that contains not much more than a deb-bootstrap, 
which will be used to test our final package installation, to verify that 
the package install well on a bare-minimum system.

- I also talked about strategically constructing layers on top of each 
other so as to best facilitate packages developing. Further than that, 
sharing resources among docker images is also briefly touched upon. 

[1]
http://sfxpt.wordpress.com/2013/11/10/debianubuntu-package-developing-
with-docker/


However, that was in *principle* generally speaking. Now let's get 
practical this time -- let's see how thing are done. For details, please 
check out, 
http://sfxpt.wordpress.com/2013/11/17/debianubuntu-package-developing-
with-docker-continued/

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l6bmp9$7ig$1...@ger.gmane.org



How to determine build dependency

2013-11-16 Thread T o n g
Hi, 

How to determine build dependencies? 

I was using 'dpkg-depcheck -d ./configure ...', but that seems to have 
included much more than necessary. 

For example for emacs, using motif instead of gtk3, I get [1], but I 
don't think x11proto-randr-dev, libxinerama-dev, libxrandr-dev, libgl1-
mesa-glx, libexpat1, libpopt0, & libxdmcp6, etc should be in the list. 

Any help? 

Thanks


[1]

dpkg-depcheck -d ./configure --prefix=/usr --sharedstatedir=/var/lib --
program-suffix="-snapshot" --with-x=yes --with-x-toolkit=motif  --with-
toolkit-scroll-bars  --without-all --with-compress-info --with-gpm --with-
x --with-xft --with-libotf --with-xim --with-dbus 
Packages needed:
  x11proto-randr-dev
  mime-support
  lesstif2-dev
  libglib2.0-0:i386
  libpthread-stubs0-dev:i386
  libxau6:i386
  liblockfile-dev
  libxcb1:i386
  libxau-dev:i386
  libgpm-dev:i386
  mawk
  libxft-dev
  x11proto-xext-dev
  libxinerama-dev:i386
  pkg-config
  libdbus-1-dev:i386
  libfreetype6-dev
  libxdmcp-dev:i386
  tzdata
  x11proto-kb-dev
  libxext6:i386
  x11proto-xinerama-dev
  libfontconfig1-dev
  libotf-dev
  libxrandr-dev
  libgl1-mesa-glx:i386
  libexpat1:i386
  libdbus-1-3:i386
  libxcb1-dev:i386
  xutils-dev
  libncurses5-dev
  x11proto-render-dev
  libpopt0:i386
  libxdmcp6:i386



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l69flj$4td$1...@ger.gmane.org



Re: DESTDIR Support for debian/install

2013-11-15 Thread T o n g
On Fri, 15 Nov 2013 18:05:45 -0800, Russ Allbery wrote:

>> All usr/bin/ files have been successfully generated under
>> debian/glimpse/ usr/bin. Should I change all 'usr' to
>> 'debian/glimpse/usr' without knowing why, or there is more proper way
>> to fix it?
> 
> It looks like you're installing (from upstream) directly into
> debian/glimpse...
> 
> debhelper, however, defaults to running make install
> DESTDIR=debian/$(PACKAGE) when the source package builds only one binary
> package.
> 
> So, you have a few options:
> 
> 1. Override the default dh_auto_install rule to pass
>--destdir=$(CURDIR)/debian/tmp:
> 
>   override_dh_auto_install:
>   dh_auto_install --destdir=$(CURDIR)/debian/tmp

That works like a charm. 

Hoary!!! 

Thanks a thousand Russ!



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l66n7s$m0$1...@ger.gmane.org



DESTDIR Support for debian/install

2013-11-15 Thread T o n g
On Mon, 11 Nov 2013 12:11:53 -0800, Russ Allbery wrote:

> Upstream doesn't appear to support DESTDIR in their build system and is
> just trying to install things directly under prefix.  You can possibly
> work around this by setting prefix to $(CURDIR)/debian/tmp, but this
> really should be fixed upstream by adding support for DESTDIR.

Hi, 

Thanks to Russ' help, I was able to fix upstream build system by adding 
support for DESTDIR.

Not it the 'debian/install' file that should be fixed. Here is its 
content:
 
---
usr/bin/tbuild usr/lib/glimpse
usr/bin/cast usr/lib/glimpse
usr/bin/uncast usr/lib/glimpse
usr/bin/buildcast usr/lib/glimpse
usr/bin/glimpseindex
usr/bin/wgconvert usr/lib/glimpse
usr/bin/glimpse
usr/bin/glimpseserver
usr/share/man
---

All usr/bin/ files have been successfully generated under debian/glimpse/
usr/bin. Should I change all 'usr' to 'debian/glimpse/usr' without 
knowing why, or there is more proper way to fix it? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l66je3$tkv$1...@ger.gmane.org



Re: Cannot create regular file under /usr/share/man/man1

2013-11-11 Thread T o n g
On Mon, 11 Nov 2013 21:14:48 +0100, Dominik George wrote:

>> I took a look at the good build, which is glimpse-4.18.5, and I see:
>> 
>> for d in glimpse.1 glimpseindex.1 glimpseserver.1 ; do \
>> /usr/bin/install -c -m 444 $d
>> /export/build/glimpse/bld/
>> glimpse-4.18.5/debian/tmp/usr/share/man/man1 ; \
>> done
> 
> Do you know what /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/
> is?

I admit that I didn't. 

> Tadaa ... it is ${DESTDIR}. Which leads us to the conclusion that, as
> stated in my initial reply, that the lack thereof is the culprit

So how to fix it then? Upstream has been dead for several years. I have 
fix it myself, but I don't know how. 

Please help. 
Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5rfii$nao$4...@ger.gmane.org



Re: Cannot create regular file under /usr/share/man/man1

2013-11-11 Thread T o n g

On Mon, 11 Nov 2013 23:40:46 +0600, Andrey Rahmatullin wrote:

>> >> for d in glimpse.1 glimpseindex.1 glimpseserver.1 ; do \
>> >>   /usr/bin/install -c -m 444 $d /usr/share/man/man1 ; \
>> >>   done
>> > 
>> > Obviously, that should be ${DESTDIR}/usr/share/man/man1 .

Hmm... I don't know if that is accurate, because it is at the end of 
binary package *building*, not the binary package *installation*. 

I took a look at the good build, which is glimpse-4.18.5, and I see:

for d in glimpse.1 glimpseindex.1 glimpseserver.1 ; do \
/usr/bin/install -c -m 444 $d /export/build/glimpse/bld/
glimpse-4.18.5/debian/tmp/usr/share/man/man1 ; \
done

what else is different between the good build and mine is that the 
mkinstalldirs step. The good build is:

./mkinstalldirs /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/
bin /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/share/man/man1
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/bin
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/share
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/share/man
mkdir /export/build/glimpse/bld/glimpse-4.18.5/debian/tmp/usr/share/man/
man1

and mine is:

./mkinstalldirs /usr/bin /usr/share/man/man1

and there are no directories created after it. 

I post the relevant part of the logs for the good build (glimpse-4.18.5) 
and mine (glimpse-4.18.6) at, 
http://paste.debian.net/65265/
http://paste.debian.net/65266/

>> So given the rules file posted in OP, how should I change it?
>> Or is it somewhere else that I should change?
> You need to fix the upstream Makefile.

I first suspect the rules file is because, the Makefile and Makefile.in 
are both the same between the good build (glimpse-4.18.5) and mine 
(glimpse-4.18.6). The only different is the rules file. Mine is, as 
posted in OP:

%:
dh $@  --with autotools-dev

and the good build is more complicated: 


#!/usr/bin/make -f

build: build-stamp
build-stamp:
./configure --prefix=/usr --mandir=\$${prefix}/share/man
$(MAKE)
touch $@

install: build
dh_clean -k
$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr

clean:
rm -f build-stamp
dh_clean
-$(MAKE) distclean

binary-indep:

binary-arch binary: build install
dh_install -a --sourcedir=debian/tmp
dh_installchangelogs -a ChangeLog
dh_installdocs -a
dh_compress -a
dh_fixperms -a
dh_strip -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a

.PHONY: build binary binary-arch binary-indep clean install


I'm explaining this because I still don't know where exactly should I 
fix. 

I can sure try to fix the upstream Makefile, Makefile.in to be exactly I 
suppose, but don't know where and how, so as to fix both problems 
reported above. I've posted the Makefile.in file at 
http://paste.debian.net/65270/.

Please help. 
Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5rc9n$nao$3...@ger.gmane.org



Re: Cannot create regular file under /usr/share/man/man1

2013-11-11 Thread T o n g
On Mon, 11 Nov 2013 17:21:11 +0100, Dominik George wrote:

>> for d in glimpse.1 glimpseindex.1 glimpseserver.1 ; do \
>>  /usr/bin/install -c -m 444 $d /usr/share/man/man1 ; \
>>  done
> 
> Obviously, that should be ${DESTDIR}/usr/share/man/man1 .

So given the rules file posted in OP, how should I change it?
Or is it somewhere else that I should change?

Thanks. 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5r441$nao$2...@ger.gmane.org



Cannot create regular file under /usr/share/man/man1

2013-11-11 Thread T o n g
Hi, 

The package that I'm planning to maintain gives me the following error at 
the end of the build:

for d in glimpse.1 glimpseindex.1 glimpseserver.1 ; do \
/usr/bin/install -c -m 444 $d /usr/share/man/man1 ; \
done
/usr/bin/install: cannot create regular file '/usr/share/man/man1/
glimpse.1': Permission denied
/usr/bin/install: cannot create regular file '/usr/share/man/man1/
glimpseindex.1': Permission denied
/usr/bin/install: cannot create regular file '/usr/share/man/man1/
glimpseserver.1': Permission denied
make[1]: *** [install-man] Error 1

Am I violating any Debian rules? The rules was generated by dh_make:

$ cat glimpse-4.18.6/debian/rules 
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-
make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
dh $@  --with autotools-dev

The detail of the build failure is at
https://launchpadlibrarian.net/156234637/buildlog_ubuntu-saucy-
i386.glimpse_4.18.6-0ubuntu1_FAILEDTOBUILD.txt.gz

Please help.

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5qvth$nao$1...@ger.gmane.org



Re: Debian/Ubuntu Package Developing with Docker

2013-11-10 Thread T o n g
On Sun, 10 Nov 2013 19:36:16 -0500, Paul Tagliamonte wrote:

>> I found that Docker is the best tool for developing Debian/Ubuntu
>> packages, but seems no one has talked about it in Debian world
> 
> In fact, I have. I've got a few tools brewing for Debian that use
> Docker. I've got it packaged and it'll be in Debian soon.

Any write up that I can take a peek before the actual tools available in 
repo? 

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5pbra$ssj$3...@ger.gmane.org



Debian/Ubuntu Package Developing with Docker

2013-11-10 Thread T o n g
Hi, 

I found that Docker is the best tool for developing Debian/Ubuntu 
packages, but seems no one has talked about it in Debian world. So here 
is mine [1].

[1]
http://sfxpt.wordpress.com/2013/11/10/debianubuntu-package-developing-
with-docker/

If you build your packages with pbuilder, then you will love Docker, 
because it is using the same concept, but is much more controllable, and 
it gives you much more freedom.

Docker uses the same concept of pbuilder, which gives you an isolated 
pure & pristine environment to build packages. The reason that I think 
Docker is the best tool for *developing* Debian/Ubuntu packages is that, 
suppose you find some minor problems when building a package and you want 
to fix it, then pbuilder is not a good help here. Sure you can go all the 
nine yards building from the pure & pristine environment every time you 
make a tiny change, but it would not be ideal, because when we do quick 
fixes and tests, the DRY (Do-not Repeat Yourself) principle will be more 
important -- the rebuilds for the quick fixes and tests should not do 
more than a make do. I.e., only build things that need to be built, and 
do not waste a single second on compiling something do not need to be 
compiled again, let alone starting from package downloading and 
installing. However, when the quick fixes and tests are done, we do need 
the ability to backtrack all the way to test installation from a bare-
minimum system. This is where Docker comes shining.

The concept of Docker is far superior than pbuilder in that, it allows 
you to build layers on top of each other, while giving you the freedom to 
play in any layer at any given time. The best part is that you can 
discard your changes you made to the layer at your will. So that you can 
always go back to the pristine stage of your layer and start over again. 
Let’s put that concept into Debian packages developing.

- The first layer would be the bare-minimum installed system that 
contains not much more packages than a net-install or deb-bootstrap. We 
will be using this layer to test our final package installation, to 
verify that the package install well on a bare-minimum system.

- The second layer would be the one that contains our package’s 
dependants. We will be using this layer to test if our built package runs 
fine.

- The third layer would have our package’s build dependants installed. We 
can always do a fresh build from here without downloading and installing 
any dependant packages.

- The forth layer would contains our package’s build caches. I.e., if I 
want to do a quick fixes and tests, I do not need to do more than a make 
will do. No need to compile something that does not need to be compiled 
again, and definitely no need to start from configure again.

- The best part is that if you are maintaining several packages, you can 
share the aforementioned layers between your packages if possible. This 
will be a big saver for both space and time. Even if some packages have 
some unique dependants that you think it is better not to use a shared 
environment, it can still save a huge amount of disk space because you 
can base it on a similar existing layer.

- Sounds too good to be true? Well, here is more -- the Docker layers can 
be defined in Docker files. The Docker files are easy to understand and 
easy to write. Once written, your pristine Docker environments will 
always be one command away. It doesn’t take long to finish, and your 
Docker isolated environment can starts in seconds.

- Moreover, if you find a bug but someone/upstream say he can’t duplicate 
it, all you need to do is to give him your Docker file. The Docker was 
meant for a reliable deploy system originally after all.

Sound very charming to me. What do you think? 
Please comment or share your insights.

Thanks

PS. 

For more information on Docker, check these out:

About Docker
http://sfxpt.wordpress.com/2013/11/02/docker-installation/#refs

Docker Intro & Installation
https://docs.google.com/document/
d/1IDdp1y0oAkDwIXSg4_l3TjNFBPps7MotCAmMywEV4Lc/edit

Docker Image Building
https://docs.google.com/document/
d/1f8iflnFSZxAU9FhoLQPEVlSKhVPXbtCaqTVPTTJb9yo/edit

Docker Advanced Volumes
https://docs.google.com/document/d/1tgzbbc76tV82nxJCpHTSb-
Y5tns8Uim8sLDExy12e5k/edit


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l5p8f8$ssj$1...@ger.gmane.org



Upgrading the Debian Policy

2013-09-24 Thread T o n g
Hi, 

The package that I want to pick up has a status:

"The package should be updated to follow the last version of Debian 
Policy (Standards-Version 3.9.4 instead of 3.8.3)". 

I never knew the details of Debian Policy before, but did try to read the 
policy from 3.8.4 to 3.9.4, and find it a rather long list with no 
further details. At first, I was trying to find a wiki/blog dedicated to 
upgrading the Debian Policy, failing to find that, now I'm thinking,

If I can fix all lintian reported issues, it'll be safe to say that I've 
bring the package to the last version of Debian Policy, right? 

PS. the lintian proposed to me before is:

 lintian --color=always -I -E -i --pedantic

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/l1s13p$uqb$1...@ger.gmane.org



Re: Bug#716852: Fwd: Bug#716852: RFS: libpam-ssh-agent-auth/0.9.5-2.2 [ITP]

2013-07-22 Thread T o n g
On Sun, 21 Jul 2013 12:21:26 +0200, Paul Gevers wrote:

> There is probably more to fix, but I spent enough time already

Thanks a lot Paul for your detailed explanations. I'll look into them one 
by one. 


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/kskh4h$lj1$1...@ger.gmane.org



Re: Empty binary package

2013-07-20 Thread T o n g
On Sat, 20 Jul 2013 18:17:20 +0200, Paul Gevers wrote:

> I think these are the changes to the debian/rules in your mind, right?
>> 
>> [ . . . ]
> 
> Pretty close. . . 

Thanks a lot again Paul for all the helps you gave. 

My sponsor request has been sitting there for a while, 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716852
even though I've been actively inviting people to look into it. 

Would you mind sponsor for me please? 

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ksf2ou$ok7$1...@ger.gmane.org



Re: Empty binary package

2013-07-20 Thread T o n g
On Sat, 20 Jul 2013 08:26:48 +0200, Paul Gevers wrote:

>>> line, I put them there because I want to fix the following lintian
>>> issues:
>>>
>>>   W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
>>> target build-arch
>>>   W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
>>> target build-indep
>>>
>>> How else should I fix it then?
>> 
>> [...] I guess your
> answer can be the answer, but the way you applied it not the correct
> one. My suggestion is to either:
> - Convert your full rules file to short dh(1) style (that would be *my*
> preference)

No, I'm incapable of doing that for now. Even your simple answer gave me 
a hard time trying to understand it. I'll ask in a separated thread to 
see if anyone willing to help. 

> - Simple: add the build-arch and build-indep targets yourself. If I am
> not mistaken, with this specific rules file, you can just add them,
> depend on the build target and do nothing in the target itself.

After a bit of struggle, I think these are the changes to the debian/
rules in your mind, right? 

-build: build-stamp
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
 build-stamp:  config.status

Thanks again. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/kse6sr$144$1...@ger.gmane.org



Re: Empty binary package

2013-07-19 Thread T o n g
On Sat, 20 Jul 2013 03:11:46 +, T o n g wrote:

>>> Did you try to build debian binary package from there?
>> 
>> So please tell me what you mean with this sentence, I just don't know
>> what you mean.
> 
> build debian binary package from the source package that you just built.
> 
>>> I'll get back to you in specific details later, but again just as
>>> normal.
> 
> This is EXACTLY what I did (in a empty directory):
> 
>   dget http://mentors.debian.net/debian/pool/main/libp/libpam-ssh-agent-
> auth/libpam-ssh-agent-auth_0.9.5-2.dsc
> 
>   dpkg-source -x *.dsc cd libpam-ssh-agent-auth-0.9.5/
> 
>   debuild -us -uc
> 
> As normal as building any binary package to me.
> 
> The binary package built this way is empty.
> 
>>>Meanwhile, when I said that "the binary package is empty", as I
>>> explained in my OP, I meant that the built binary package will not
>>> contains the files that I want. I.e., it contains nothing except the
>>> copyright & changelog files.
>> 
>> That part was fully clear to me. And as I said, in my tries it was
>> always there.
> 
> So you did the above normal steps as building any binary package but get
> different result? Or did you do something more than normal?

My bad. 

Revisiting my work log, I suddenly realized the "source package" that I 
built from is not the one that I built from the upstream source but my 
already tweaked one. 

Thanks for your tip on renaming the control files. Now my binary package 
is no longer empty any more. 

>> Sure, remove the second build target
> 
> Are you saying changing the line
> 
>   binary: binary-indep binary-arch
> 
> into:
> 
>   binary: binary-indep # binary-arch
> 
> to remove the second binary build target?
> [ . . .]
> 
> If you talked about the
> 
>   build %:
> dh $@
> 
> line, I put them there because I want to fix the following lintian
> issues:
> 
>   W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
> target build-arch
>   W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
> target build-indep
> 
> How else should I fix it then?

So this is the remaining issue for me so far (As you can see I've tried 
to find the answer myself and using the build %:\n\tdh $@ is the "answer" 
that I found).

Thanks


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ksd3qv$cml$1...@ger.gmane.org



Re: Empty binary package

2013-07-19 Thread T o n g
On Fri, 19 Jul 2013 21:57:14 +0200, Paul Gevers wrote:

 - I then build the upstream into *source package* with 'debuild -S
 -sa',
 and then build the binary debian package *from this source package*.
 The binary package built this way is however empty.
>>>
>>> So how do you do the last step? And why is building from your source
>>> package any different than your first step with -us -uc? What do you
>>> do EXACTLY when you "build from the source package", i.e. please
>>> provide all the copy and build commands. It is NOT empty if I try it
>> 
>> The last steps are just as normal.
> 
> Sorry, but what means "as normal" for you? What command do you use?
> $ debian/rules binary $ debuild # in the source tree $
> some-other-fancy-command $ pdebuild # as I did

  debuild -us -uc

>> Did you try to build debian binary package from there?
> 
> So please tell me what you mean with this sentence, I just don't know
> what you mean.

build debian binary package from the source package that you just built.

>> I'll get back to you in specific details later, but again just as
>> normal. 

This is EXACTLY what I did (in a empty directory):

  dget http://mentors.debian.net/debian/pool/main/libp/libpam-ssh-agent-
auth/libpam-ssh-agent-auth_0.9.5-2.dsc

  dpkg-source -x *.dsc
  cd libpam-ssh-agent-auth-0.9.5/

  debuild -us -uc

As normal as building any binary package to me. 

The binary package built this way is empty. 

>>Meanwhile, when I said that "the binary package is empty", as I
>> explained in my OP, I meant that the built binary package will not
>> contains the files that I want. I.e., it contains nothing except the
>> copyright & changelog files.
> 
> That part was fully clear to me. And as I said, in my tries it was
> always there.

So you did the above normal steps as building any binary package but get 
different result? Or did you do something more than normal?

>> As a reference, you can also build from my source package (which has
>> fixed all the problems you told me to fix):
>> 
>> http://mentors.debian.net/debian/pool/main/libp/libpam-ssh-agent-auth/
>> libpam-ssh-agent-auth_0.9.5-2.dsc
> 
> Now we are getting somewhere. At least we can see what you have been
> trying and inspect your commands. You have two build targets in your
> rules file. The second overwrites the first results and installs to a
> weird location:
> /usr/bin/install -c -m 644 pam_ssh_agent_auth.8
> /tmp/buildd/libpam-ssh-agent-auth-0.9.5/debian/tmp/tmp/buildd/libpam-
ssh-agent-auth-0.9.5/debian/tmp/usr/share/man/cat8/pam_ssh_agent_auth.8
> 
> 
>> And see if you can get anything other than the copyright & changelog
>> files into the binary package.
> 
> Sure, remove the second build target 

Are you saying changing the line

  binary: binary-indep binary-arch

into:

  binary: binary-indep # binary-arch

to remove the second binary build target?

I got the following error when doing that:

  /usr/bin/install -c -m 644 pam_ssh_agent_auth.8 /systems/b/libpam-ssh-
agent-auth/test-mine/libpam-ssh-agent-auth-0.9.5/debian/tmp/usr//share/
man/man8/pam_ssh_agent_auth.8
  /usr/bin/install -c -m 755 pam_ssh_agent_auth.so /systems/b/libpam-ssh-
agent-auth/test-mine/libpam-ssh-agent-auth-0.9.5/debian/tmp/lib/security/
pam_ssh_agent_auth.so
  make[1]: Leaving directory `/systems/b/libpam-ssh-agent-auth/test-mine/
libpam-ssh-agent-auth-0.9.5'
   dpkg-genchanges  >../libpam-ssh-agent-auth_0.9.5-2_i386.changes
  dpkg-genchanges: error: cannot read files list file: No such file or 
directory
  dpkg-buildpackage: error: dpkg-genchanges gave error exit status 2
  debuild: fatal error at line 1357:
  dpkg-buildpackage -rfakeroot -D -us -uc failed

If you talked about the 

  build %:
  dh $@

line, I put them there because I want to fix the following lintian issues:

  W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
target build-arch
  W: libpam-ssh-agent-auth source: debian-rules-missing-recommended-
target build-indep

How else should I fix it then? 

> and additionally, there are several
> control files that need renaming as you renamed the package.
> pam-ssh-agent-auth.* need to renamed to libpam-ssh-agent-auth.* if that
> is the name of your package. These files contain instructions for dh_*
> commands. Fixing those two issues, the package builds again with files
> in the deb.

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/kscv5i$d9v$1...@ger.gmane.org



Re: Empty binary package

2013-07-19 Thread T o n g
On Fri, 19 Jul 2013 08:38:49 +0200, Paul Gevers wrote:

> On 19-07-13 05:13, T o n g wrote:
>> As said in OP,
> 
> Which I don't have anymore, so indeed please repeat it if you want my
> help.

It was still included in the message that I previously replied. 

>> - I unpack the upstream tarball and build the binary debian package
>> with 'debuild -us -uc'. the build is good.
> 
> Why do this debuild -us -uc first if you proceed with the next?

To prove that the upstream can build into binary package just fine. 

>> - I then build the upstream into *source package* with 'debuild -S
>> -sa',
>> and then build the binary debian package *from this source package*.
>> The binary package built this way is however empty.
> 
> So how do you do the last step? And why is building from your source
> package any different than your first step with -us -uc? What do you do
> EXACTLY when you "build from the source package", i.e. please provide
> all the copy and build commands. It is NOT empty if I try it 

The last steps are just as normal. I'll get back to you in specific 
details later, but again just as normal. Meanwhile, when I said that "the 
binary package is empty", as I explained in my OP, I meant that the built 
binary package will not contains the files that I want. I.e., it contains 
nothing except the copyright & changelog files.

So hope it's clearer this time: 

upstream directly to binary package, OK. Files included. 

upstream => debian source then => debian binary package, Not OK. Files 
are missing. 

> . . .
> and paul@wollumbin $ ls -l
> /var/cache/pbuilder/wheezy-amd64/result/pam-ssh-agent-auth_0.9.5*
> -rw-r--r-- 1 paul paul   1324 jul 19 08:19
> /var/cache/pbuilder/wheezy-amd64/result/pam-ssh-agent-
auth_0.9.5-1_amd64.changes
> -rw-r--r-- 1 paul paul  41696 jul 19 08:19
> /var/cache/pbuilder/wheezy-amd64/result/pam-ssh-agent-
auth_0.9.5-1_amd64.deb
> -rw-r--r-- 1 paul paul652 jul 19 08:18
> /var/cache/pbuilder/wheezy-amd64/result/pam-ssh-agent-auth_0.9.5-1.dsc
> -rw-r--r-- 1 paul paul 280317 jul 19 08:18
> /var/cache/pbuilder/wheezy-amd64/result/pam-ssh-agent-
auth_0.9.5-1.tar.gz

Did you try to build debian binary package from there? 

As a reference, you can also build from my source package (which has 
fixed all the problems you told me to fix):

http://mentors.debian.net/debian/pool/main/libp/libpam-ssh-agent-auth/
libpam-ssh-agent-auth_0.9.5-2.dsc

And see if you can get anything other than the copyright & changelog 
files into the binary package. 

PS. I saw the the following being "installed" during my binary package 
building (from my source), but the installed files didn't show up in my 
binary package:

/usr/bin/install-c -m 644 pam_ssh_agent_auth.8 /systems/b/libpam-ssh-
agent-auth/test-mine/libpam-ssh-agent-auth-0.9.5/debian/tmp/usr//share/
man/man8/pam_ssh_agent_auth.8
/usr/bin/install-c -m 755 pam_ssh_agent_auth.so /systems/b/libpam-ssh-
agent-auth/test-mine/libpam-ssh-agent-auth-0.9.5/debian/tmp/lib/security/
pam_ssh_agent_auth.so

Thanks



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ksbe2t$9jn$1...@ger.gmane.org



Re: Empty binary package

2013-07-18 Thread T o n g
On Wed, 17 Jul 2013 21:17:49 +0200, Paul Gevers wrote:

> On 17-07-13 20:30, Tong Sun wrote:
>> 
>> 
>> Re: Empty binary package
>> 
>> 
>>> I'm wondering why the binary package built from my source package is
>>> empty.

 Here is what I've discovered so far:

 - If I unpack the upstream tarball and build the binary debian
 package with 'debuild -us -uc', then the built binary package
 contains the files I want
>>> Using the debian/ directory provided in the upstream tarball? This
>>> case is not interesting or relevant.
 - If I build the upstream into source debian package with 'debuild -S
 -sa', and then build the binary debian package from this source
 package, then the built binary package will be empty.
>>> Hard to say without seeing your debian/ folder.
>> 
>> Right here:
>> 
>> http://downloads.sourceforge.net/project/pamsshagentauth/
pam_ssh_agent_auth/v0.9.5/pam_ssh_agent_auth-0.9.5.tar.bz2
>> 
>> Or, you can consult the extracted build info posted in my OP.
> 
> What EXACTLY do you do, what do you mean by "and then build the binary
> debian package from this source"? It works for me: I use pbuilder to
> build in a clean environment, but I don't expect that to be different
> from what you are doing.

As said in OP, 

- I unpack the upstream tarball and build the binary debian package with 
'debuild -us -uc'. the build is good.
- I then build the upstream into *source package* with 'debuild -S -sa', 
and then build the binary debian package *from this source package*. The  
binary package built this way is however empty. 

> And don't forget that you already identified several problems with the
> upstream source. E.g. it misses a source/format file containing "3.0
> (quilt)".

I've fixed all of those but the binary package built from my source 
package is empty. Thus I'm reverting to the very beginning, to rule out 
that it is caused by my modification. 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ksaase$amm$2...@ger.gmane.org



Re: Empty binary package

2013-07-18 Thread T o n g
On Thu, 18 Jul 2013 23:19:10 +0600, Andrey Rahmatullin wrote:

>> If they provide a debian directory, that means to me that they have
>> done their best to make sure their software can at least be packed into
>> a Debian binary package in the limited Debian environment that they
>> choose to test. They may look amateur in your eyes, but I believe that
>> they have done their best.
> Sure. So?

Inpatient to read the next paragraph?

>> My view is that it is up to the Debian community to embrace and help
>> each and every one software author to make packages
>> perfect Debian packages.
> Sure, if they come to us and ask for help.

Is there any other options? 

> How is this related to your questions? Are you the author of the package
> we are discussing?

I'm just trying to reaching out, embrace their helpful packages and help 
them (him/her at the moment) to make packages good enough to be adopted 
into Debian. I'm new to Debian packaging, and need help maybe every 
single step, but at least I can shield them from being intimidated for 
not knowing how "make a proper package". 



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ksaa8m$amm$1...@ger.gmane.org



  1   2   >