Re: Working as a team, let's take care of all problems

2018-11-06 Thread Eriberto
)
Em ter, 6 de nov de 2018 às 09:41, Aleksey Kravchenko
 escreveu:
>
> Hello,
>
> Status update on libpff.
>
> While I'm preparing libpff package, I found difficult to fix lintian warning 
> on the libpff.3 manpage [1]. The root cause is multiple warnings from coming 
> from man. The fix would require a very big rewrite of the manpage.  If 
> somebody is good with man syntax and can help, please step in.  I'm thinking 
> on just reporting this issue upstream.
>
> I will commit other fixes next days. So the next release will look much 
> better, than current package state.
>
> [1] 
> https://salsa.debian.org/pkg-security-team/libpff/blob/debian/master/manuals/libpff.3
>
>   Best regards,
>   Aleksey
>


Hi Aleksey,

I will try help in some points.

1. The package fails to build from source (FTBFS) in a fresh jail (or
from cowbuild command) and shows the following message:


dh_auto_clean: Please use the third-party "pybuild" build system
instead of python-distutils
dh_auto_clean: This feature will be removed in compat 12.
Can't exec "pyversions": No such file or directory at
/usr/share/perl5/Debian/Debhelper/Buildsystem/python_distutils.pm line
124.
dh_auto_clean: failed to run pyversions
make: *** [debian/rules:8: clean] Error 2


I think that  you need "python2-minimal | python-minimal" in
Build-Depends field.

You should use debhelper (>=11) instead of debhelper-compat (=11) in
Build-Depends field. If yes, please, create a debian/compat file too
(see other packages).

2. The package does not build twice with debuild command. A list with
several files is shown in screen. You must delete the files that do
not exist in original upstream source code (use debian/clean, # man
dh_clean) and ignore files being changed[1]. I attached two files:
clean and options. Please, read carefully these files and try
understand their missions.

[1] https://www.debian.org/doc/manuals/maint-guide/dother.en.html#sourceopt

3. There are some lintian messages about spelling errors in
libpff.so.1.0.0 and pffexport. You can use grep to find these
spellings in source code.

$ grep intialize * -sr

I attached a patch that will fix these errors. Note that the lintian
message "libpff1: spelling-error-in-binary
usr/lib/x86_64-linux-gnu/libpff.so.1.0.0 Nam Name" is a reference to:

libfwnt/libfwnt_locale_identifier.c: { 0x042a, "vi-VN", "Vietnamese,
Viet Nam" },

So it is a false positive and you can make a lintian override[2].

[2] https://www.debian.org/doc/manuals/maint-guide/dother.en.html#lintian

4. For the manpage errors (pffexport.1.gz, pffinfo.1.gz and
libpff.3.gz), you must edit manual/* files. Commonly, it is a simple
work, don't worry. Try to understand each lintian message (after a
debuild, you can run '$ lintian -i' in upstream place). In this
special case, the manpage was written using groff mdoc. In the most
common cases, groff is used (not groff mdoc). There are manpages for
mdoc and mdoc-samples ($ man mdoc).

I attached a patch to fix the manpages. There are some warnings that
can't be fixed (W: can't break line). In this special case, you can
make a lintian override with a previous commented line to explain the
problem.

"If somebody is good with man syntax and can help, please step in"

To make a manpage from zero (when needed) and understand  the basics
of grof syntax, you can use txt2man. Follow the steps:

# apt-get install txt2man
$ cd /tmp
$ cp /usr/share/doc/txt2man/examples/mac-robber.txt .
$ cat mac-robber.txt
$ txt2man mac-robber.txt > mac-robber.1
$ cat mac-robber.1
$ man ./mac-robber.1
$ man txt2man

See a final and simple example inside debian/ in my package iwatch.

Cheers,

Eriberto


clean
Description: Binary data


options
Description: Binary data
Description: fix spelling errors in final binary
Author: Joao Eriberto Mota Filho 
Last-Update: 2018-11-06
--- libpff-20180714.orig/include/libpff/features.h
+++ libpff-20180714/include/libpff/features.h
@@ -32,7 +32,7 @@
 #define LIBPFF_HAVE_MULTI_THREAD_SUPPORT	1
 #endif
 
-#if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 )
+#if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 1 )
 #define LIBPFF_HAVE_BFIO			1
 #endif
 
--- libpff-20180714.orig/libbfio/libbfio_handle.c
+++ libpff-20180714/libbfio/libbfio_handle.c
@@ -159,7 +159,7 @@ int libbfio_handle_initialize(
 		 error,
 		 LIBCERROR_ERROR_DOMAIN_RUNTIME,
 		 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
-		 "%s: unable to intialize read/write lock.",
+		 "%s: unable to initialize read/write lock.",
 		 function );
 
 		goto on_error;
--- libpff-20180714.orig/libbfio/libbfio_pool.c
+++ libpff-20180714/libbfio/libbfio_pool.c
@@ -158,7 +158,7 @@ int libbfio_pool_initialize(
 		 error,
 		 LIBCERROR_ERROR_DOMAIN_RUNTIME,
 		 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
-		 "%s: unable to intialize read/write lock.",
+		 "%s: unable to initialize read/write lock.",
 		 function );
 
 		goto on_error;
@@ -396,7 +396,7 @@ int libbfio_pool_clone(
 		 error,
 		 LIBCERROR_ERROR_DOMAIN_RUNTIME,
 		

Re: Working as a team, let's take care of all problems

2018-11-06 Thread Aleksey Kravchenko
Hello,

Status update on libpff.

While I'm preparing libpff package, I found difficult to fix lintian
warning on the libpff.3 manpage [1]. The root cause is multiple warnings
from coming from man. The fix would require a very big rewrite of the
manpage.  If somebody is good with man syntax and can help, please step
in.  I'm thinking on just reporting this issue upstream.

I will commit other fixes next days. So the next release will look much
better, than current package state.

[1]
https://salsa.debian.org/pkg-security-team/libpff/blob/debian/master/manuals/libpff.3

  Best regards,
  Aleksey

On Thu, Oct 25, 2018 at 12:59 PM Aleksey Kravchenko 
wrote:

>
> On Thu, Oct 25, 2018 at 11:57 AM Raphael Hertzog 
> wrote:
>
>> > I suggest 'rebasing' two Raphael commits over Imported package, as I've
>> > done in a fork [2]. To do this we need to overwrite last to commits in
>> > the main repository.
>>
>> Neither of this is needed. You can just do a proper merge. You
>> run "gbp import-dsc" of 20120802-5.1 in a branch that contains the
>> 20120802-5 tag. Then you switch back to debian/master and you merge
>> your temporary branch.
>>
>> That's the correct solution that doesn't need history rewriting.
>>
> Ok, let's do it right way.
>
>
>> You already have access to all pkg-security repositories. You can check by
>> yourself:
>> https://salsa.debian.org/pkg-security-team/libpff/project_members
>
> Oh! That's perfect :)
>
>   Thanks,
>   Aleksey
>