Re: Packaging python-xrayutilities

2019-03-21 Thread Dmitry Shachnev
On Thu, Mar 21, 2019 at 02:36:01PM +0300, Dmitry Shachnev wrote:
> Hi Marie!

Perhaps this should have been ‘Hi Alexandre’. Sorry if I got this wrong.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Packaging python-xrayutilities

2019-03-21 Thread Dmitry Shachnev
Hi Marie!

On Thu, Mar 21, 2019 at 10:09:22AM +, MARIE Alexandre wrote:
> Hello,
>
> I'm still working on the package python-xrayutilities for debian.
>
> I've come to a point where the package can be built but when generating the 
> doc,
> lintian comes with a bunch of privacy-generic-breach tags like this :
>
> W: python-xrayutilities-doc: privacy-breach-generic [...]
> (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=tex-ams-mml_htmlormml)
>
> I have tried to add in debian/rules this :
> override_dh_installdocs:
> ln -s /usr/share/javascript/mathjax/MathJax.js 
> $(CURDIR)/doc/build/html/_static/MathJax.js
> find doc/build/html -name "*.html" -exec sed -i 
> "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} 
> \;
> dh_installdocs -ppython-xrayutilities-doc doc/build/html
>
> But it does not seem to work.

Don’t do anything in debian/rules. Instead, patch your conf.py to
have a line like this:

  mathjax_path = 
'file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

This way the files produced by Sphinx will have the right path, and there
won’t be any need for making symlinks.

--
Dmitry Shachnev
(maintainer of both sphinx and mathjax packages)


signature.asc
Description: PGP signature


Re: Packaging python-xrayutilities

2019-03-21 Thread Alex Mestiashvili
On 3/21/19 11:44 AM, MARIE Alexandre wrote:
>> Is there really the leading tab only on the second line?
> 
> In fact I am trying to figure out where should I install the doc, and how 
> could I avoid the lintian tag : privacy-breach-generic.
> 
>> What exactly doesn't seem to work?
> 
> The code I paste before wasn't working because the path was not good, I 
> should have cleaned that before, sorry.
> 
> First I have this overrided to use the right method : 
> _
> override_dh_installdocs-indep:
>   PYTONPATH=$(CURDIR)/debian python3 setup.py build_doc
>   dh_installdocs
> _
> 
> Then I want to deal with mathjax causing the privacy-breach-generic.
> But I really don't know how to do that.
> 
> Cheers,
> 
> Alex
> 
> 

Hi,

I didn't have time to look into issue, but may be looking on how other
people solve similar problems will give you a hint:

 https://codesearch.debian.net/search?q=path%3Adebian%2Frules+mathjax

Best,
Alex



Re: Packaging python-xrayutilities

2019-03-21 Thread Andreas Tille
On Thu, Mar 21, 2019 at 03:23:52PM +0500, Andrey Rahmatullin wrote:
> On Thu, Mar 21, 2019 at 10:09:22AM +, MARIE Alexandre wrote:
> > override_dh_installdocs:
> > ln -s /usr/share/javascript/mathjax/MathJax.js 
> > $(CURDIR)/doc/build/html/_static/MathJax.js
> > find doc/build/html -name "*.html" -exec sed -i 
> > "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" 
> > {} \;
> > dh_installdocs -ppython-xrayutilities-doc doc/build/html
> Is there really the leading tab only on the second line?
> 
> > But it does not seem to work.
> What exactly doesn't seem to work?

Wild guessing: The files to be changed might reside in debian/tmp - thus


find debian ...

could be the solution.

Kind regards

 Andreas.

-- 
http://fam-tille.de



Re: Packaging python-xrayutilities

2019-03-21 Thread Andrey Rahmatullin
On Thu, Mar 21, 2019 at 10:09:22AM +, MARIE Alexandre wrote:
> override_dh_installdocs:
> ln -s /usr/share/javascript/mathjax/MathJax.js 
> $(CURDIR)/doc/build/html/_static/MathJax.js
>   find doc/build/html -name "*.html" -exec sed -i 
> "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} 
> \;
>   dh_installdocs -ppython-xrayutilities-doc doc/build/html
Is there really the leading tab only on the second line?

> But it does not seem to work.
What exactly doesn't seem to work?

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: Packaging python-xrayutilities

2019-03-18 Thread Andrey Rahmatullin
On Mon, Mar 18, 2019 at 03:20:24PM +, MARIE Alexandre wrote:
> gbp:error: Automatic merge failed.
You need to find why there are conflicts and fix them. Good first steps
are running gbp with --no-rollback and/or finding what upstream files are
modified in the master branch in the current state.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: Packaging python-xrayutilities

2019-03-18 Thread Florian Pelgrim

Hi there,

I'm not really deep into packaging but it sounds like the build process 
is looking for https links on the uscan target.


Try to replace all http links to https in your package.

Cheers
Flo

Am 18.03.19 um 10:36 schrieb MARIE Alexandre:

Hello,

I'm sorry if this is in the wrong place.
I've already asked for help but I had not explained well how I was encountering 
my problem and couldn't answer before today.
So here it is, i'm trying to update the debian package of python-xrayutilities.

The problem is when I run:```gbp import-orig --uscan --pristine-tar```

I get this error :
__
uscan warn: In directory ., downloading
   
https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz
 failed: 500 SSL upgrade failed: SSL wants a read first
uscan warn: No upstream tarball downloaded. No further processing with 
mk_origtargz ...
gbp:error: Uscan failed: In directory ., downloading
   
https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz
 failed: 500 SSL upgrade failed: SSL wants a read first
No upstream tarball downloaded. No further processing with 
mk_origtargz ...
__

So what I've done is update d/watch from :

```version=3 
opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ 
http://sf.net/xrayutilities/xrayutilities-(.+)\.tar\.gz```

to :

```version=4
opts="uversionmangle=s/-pre/~pre/, \
   filenamemangle=s%(?:.*)xrayutilities-(.+)\.tar\.gz/download%\
   xrayutilities-$1.tar.gz%" \
   http://sourceforge.net/projects/xrayutilities/files/v([\d\.]+)/ \
   (?:.*)xrayutilities-([\d\.]+)\.tar\.gz/download debian uupdate
```

that I got in the uscan man.

Thus I can run again : ```gbp import-orig --uscan --pristine-tar```

And then the command is able to find the right version.

The fact is when I choose the latest version to update debian's one, I get this 
error :
___
What is the upstream version? [1.5.1] 1.5.1
gbp:info: Importing '../python-xrayutilities_1.5.1.orig.tar.gz' to branch 
'upstream'...
gbp:info: Source package is python-xrayutilities
gbp:info: Upstream version is 1.5.1
Branch pristine-tar set up to track remote branch pristine-tar from origin.
gbp:info: Merging to 'master'
gbp:error: Automatic merge failed.
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream by resetting it to 
5ce1c0bf0d95a9ffd7321a5065041596f05a8fe0
gbp:info: Rolling back branch pristine-tar by deleting it
gbp:info: Rolling back tag upstream/1.5.1 by deleting it
gbp:info: Rolling back branch master by resetting it to 
121347cb1309a8ce3821ed3efdd3646442e59ca3
gbp:info: Rolling back failed merge of upstream/1.5.1
gbp:error: Rolled back changes after import error.
___

Here is where I am stuck and where I am asking for some help please !

Thanks in advance for a response.

Cheers,

Alexandre Marie





Packaging python-xrayutilities

2019-03-18 Thread MARIE Alexandre
Hello,

I'm sorry if this is in the wrong place.
I've already asked for help but I had not explained well how I was encountering 
my problem and couldn't answer before today.
So here it is, i'm trying to update the debian package of python-xrayutilities.

The problem is when I run:```gbp import-orig --uscan --pristine-tar```

I get this error :
__
uscan warn: In directory ., downloading
  
https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz
 failed: 500 SSL upgrade failed: SSL wants a read first
uscan warn: No upstream tarball downloaded. No further processing with 
mk_origtargz ...
gbp:error: Uscan failed: In directory ., downloading
  
https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz
 failed: 500 SSL upgrade failed: SSL wants a read first
No upstream tarball downloaded. No further processing with 
mk_origtargz ...
__

So what I've done is update d/watch from :

```version=3 
opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ 
http://sf.net/xrayutilities/xrayutilities-(.+)\.tar\.gz```

to : 

```version=4
opts="uversionmangle=s/-pre/~pre/, \
  filenamemangle=s%(?:.*)xrayutilities-(.+)\.tar\.gz/download%\
  xrayutilities-$1.tar.gz%" \
  http://sourceforge.net/projects/xrayutilities/files/v([\d\.]+)/ \
  (?:.*)xrayutilities-([\d\.]+)\.tar\.gz/download debian uupdate
```

that I got in the uscan man.

Thus I can run again : ```gbp import-orig --uscan --pristine-tar```

And then the command is able to find the right version.

The fact is when I choose the latest version to update debian's one, I get this 
error :
___
What is the upstream version? [1.5.1] 1.5.1
gbp:info: Importing '../python-xrayutilities_1.5.1.orig.tar.gz' to branch 
'upstream'...
gbp:info: Source package is python-xrayutilities
gbp:info: Upstream version is 1.5.1
Branch pristine-tar set up to track remote branch pristine-tar from origin.
gbp:info: Merging to 'master'
gbp:error: Automatic merge failed.
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream by resetting it to 
5ce1c0bf0d95a9ffd7321a5065041596f05a8fe0
gbp:info: Rolling back branch pristine-tar by deleting it
gbp:info: Rolling back tag upstream/1.5.1 by deleting it
gbp:info: Rolling back branch master by resetting it to 
121347cb1309a8ce3821ed3efdd3646442e59ca3
gbp:info: Rolling back failed merge of upstream/1.5.1
gbp:error: Rolled back changes after import error.
___

Here is where I am stuck and where I am asking for some help please !

Thanks in advance for a response.

Cheers,

Alexandre Marie