Re: Where can build scripts be found?

2017-01-27 Thread Sven Joachim
On 2017-01-27 20:16 -0800, Thomas Nyberg wrote:

> On 01/25/2017 11:18 PM, Sven Joachim wrote:
>> This seems to be a recurring problem in Mozilla's build process, it
>> fails because SHELL is not set in the environment.  You can work around
>> that by passing --preserve-envvar=SHELL to debuild.
>
> I tried doing this, but I get an error:
>
> $ debuild -uc -us -b --preserve-envvar=SHELL
> debuild: unknown dpkg-buildpackage/debuild option: --preserve-envvar=SHELL
>  dpkg-buildpackage -rfakeroot -D -us -uc -b --preserve-envvar=SHELL
> dpkg-buildpackage: unknown option or argument --preserve-envvar=SHELL
>
> Use --help for program usage information.
> debuild: fatal error at line 1376:
> dpkg-buildpackage -rfakeroot -D -us -uc -b --preserve-envvar=SHELL failed
>
> I wasn't able to track down the --preserve-envvar flag in the debuild
> docs.

It is mentioned in the manpage, have you read that yet?

> Is that the correct place to pass it?

You need to pass it before any dpkg-buildpackage options, like so:

$ debuild --preserve-envvar=SHELL -uc -us -b

See the EXAMPLES section of said manpage.

Cheers,
   Sven



Re: Where can build scripts be found?

2017-01-27 Thread Thomas Nyberg
On 01/25/2017 11:18 PM, Sven Joachim wrote:
> This seems to be a recurring problem in Mozilla's build process, it
> fails because SHELL is not set in the environment.  You can work around
> that by passing --preserve-envvar=SHELL to debuild.

I tried doing this, but I get an error:

$ debuild -uc -us -b --preserve-envvar=SHELL
debuild: unknown dpkg-buildpackage/debuild option: --preserve-envvar=SHELL
 dpkg-buildpackage -rfakeroot -D -us -uc -b --preserve-envvar=SHELL
dpkg-buildpackage: unknown option or argument --preserve-envvar=SHELL

Use --help for program usage information.
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -b --preserve-envvar=SHELL failed

I wasn't able to track down the --preserve-envvar flag in the debuild
docs. Is that the correct place to pass it?

Cheers,
Thomas



Re: Where can build scripts be found? [and 1 more messages]

2017-01-27 Thread Thomas Nyberg
On 01/26/2017 04:43 AM, Ian Jackson wrote:
> 
> In the meantime this should be worked around in the Debian packaging,
> by setting and exporting SHELL in debian/rules.
> 
> I would try adding
> 
>   export SHELL=/bin/bash
> 
> somewhere near the top of debian/rules.  If that fixes it, you should
> send the diff to the Debian bug system and tag your bug "patch".
> 
> Ian.
> 
I did exactly this and it worked. I opened up a bug report with patch here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852867

Let me know if I did anything silly. Thanks for the help and guidance!

Cheers,
Thomas



Re: Where can build scripts be found? [and 1 more messages]

2017-01-26 Thread Thomas Nyberg
On 01/26/2017 04:43 AM, Ian Jackson wrote:
> 
>   [...snip...]
> 

To avoid many similar emails I'll just say thanks a lot to everyone!
This is all great information. Seems like a fun little exercise so I'll
definitely look into producing the patch to fix this.

After I've waded through all the information I've already been given,
I'll ping if I have any more questions. Thanks again everyone for all
the friendly help!



Re: Where can build scripts be found? [and 1 more messages]

2017-01-26 Thread Ian Jackson
Thomas Nyberg writes ("Re: Where can build scripts be found?"):
> I just confirmed that installing build-essential doesn't work and it
> still throws the same error. Should I open up a bug report for this?
> Does this count as a bug?

Yes.

Normally a bug like this ("package will not build") is a serious bug,
but in this case it seems like it's "package will not build in
slightly-nonstandard environment".

> Does there happen to be any "input" log for that log? I see the echoed
> output, but I can't see the script that was executed.

See Sven's mail:

Sven Joachim writes ("Re: Where can build scripts be found?"):
> This seems to be a recurring problem in Mozilla's build process, it
> fails because SHELL is not set in the environment.  You can work around
> that by passing --preserve-envvar=SHELL to debuild.

In the meantime this should be worked around in the Debian packaging,
by setting and exporting SHELL in debian/rules.

I would try adding

  export SHELL=/bin/bash

somewhere near the top of debian/rules.  If that fixes it, you should
send the diff to the Debian bug system and tag your bug "patch".

Ian.



Re: Where can build scripts be found?

2017-01-26 Thread Carsten Schoenert
Hello Thomas,

Am 25.01.2017 um 23:05 schrieb Thomas Nyberg:
...
> I'm trying to compile my own version of icedove to see if I can
> understand certain bugs I'm running into (at the moment I just get
> random crashes, so I can't really report anything useful). I tried the
> following steps on a new machine:

the src:icedove package has a huge list of needed dependencies to get
the package build. So mainly at least one dependency that is missing
will break the build.

For this we (the package maintainers) use usually a chroot to build the
icedove package. As you also probably want to change the source of the
Icedove you will need to handle the debian patches then.
The icedove packages are using git-buildpackage to document and utilize
the changes we have made. So I would suggest to follow the hints we've
written into the wiki for people like you who want to rebuild Icedove.

https://wiki.debian.org/Icedove/Devel#Icedove_Package_Development

You will need to create a chroot first before you can start if you use
the gbp workflow. We use cowbuilder/pbuilder for that, but sbuild will
also work.

For creating a cowbuilder/pbuilder chroot you can use git-pbuilder (from
git-buildpackage). Please see the wiki page for that.

https://wiki.debian.org/git-pbuilder

Feel free to contact me directly if you need more help while
(re)creating Icedove packages.

-- 
Regards
Carsten Schoenert



Re: Where can build scripts be found?

2017-01-25 Thread Sven Joachim
On 2017-01-25 14:05 -0800, Thomas Nyberg wrote:

> I'm trying to compile my own version of icedove to see if I can
> understand certain bugs I'm running into (at the moment I just get
> random crashes, so I can't really report anything useful). I tried the
> following steps on a new machine:
>
> $ mkdir $HOME/icedove
> $ cd $HOME/icedove/
> $ sudo apt-get install devscripts
> $ sudo apt-get build-dep icedove
> $ apt-get source icedove
> $ cd icedove-45.6.0/
> $ build -b -uc -us

I think you mean debuild rather than build in the last step, otherwise this
looks good.

>   File
> "/home/admin/icedove/icedove-45.6.0/mozilla/python/mach/mach/mixin/process.py",
> line 29, in 
> raise Exception('Could not detect environment shell!')
> Exception: Could not detect environment shell!

This seems to be a recurring problem in Mozilla's build process, it
fails because SHELL is not set in the environment.  You can work around
that by passing --preserve-envvar=SHELL to debuild.

Related links:

https://lists.alioth.debian.org/pipermail/pkg-mozilla-maintainers/2016-January/027040.html
https://bugzilla.mozilla.org/show_bug.cgi?id=1213959

Cheers,
   Sven



Re: Where can build scripts be found?

2017-01-25 Thread Rebecca N. Palmer
For investigating a crash, you may not need to recompile: first
try installing the debug symbols package (icedove-dbg).
For already known bugs, see
https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no=icedove

If you still want to recompile, you're missing
$ sudo apt-get install build-essential
but a Python error isn't what I'd expect from missing that
(it's mostly the C/C++ compiler).

Official packages are built inside a chroot using sbuild
( https://www.debian.org/devel/buildd/ ,
https://buildd.debian.org/status/fetch.php?pkg=icedove=amd64=1%3A45.6.0-2=1484088508=0
 ),
but plain dpkg-buildpackage / debuild should also work.



Re: Where can build scripts be found?

2017-01-25 Thread Thomas Nyberg
On 01/25/2017 03:16 PM, Rebecca N. Palmer wrote:
> For investigating a crash, you may not need to recompile: first
> try installing the debug symbols package (icedove-dbg).
> For already known bugs, see
> https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no=icedove
> 

I started down that route and decided I want to try compiling it and
playing around with it myself...though I might instead focus on that
route if this doesn't work.

> If you still want to recompile, you're missing
> $ sudo apt-get install build-essential
> but a Python error isn't what I'd expect from missing that
> (it's mostly the C/C++ compiler).
> 

I just confirmed that installing build-essential doesn't work and it
still throws the same error. Should I open up a bug report for this?
Does this count as a bug?

> Official packages are built inside a chroot using sbuild
> ( https://www.debian.org/devel/buildd/ ,
> https://buildd.debian.org/status/fetch.php?pkg=icedove=amd64=1%3A45.6.0-2=1484088508=0
>  ),
> but plain dpkg-buildpackage / debuild should also work.
> 

Does there happen to be any "input" log for that log? I see the echoed
output, but I can't see the script that was executed.

Thanks for all the help!

Cheers,
Thomas



Where can build scripts be found?

2017-01-25 Thread Thomas Nyberg
Hello,

I'm trying to compile my own version of icedove to see if I can
understand certain bugs I'm running into (at the moment I just get
random crashes, so I can't really report anything useful). I tried the
following steps on a new machine:

$ mkdir $HOME/icedove
$ cd $HOME/icedove/
$ sudo apt-get install devscripts
$ sudo apt-get build-dep icedove
$ apt-get source icedove
$ cd icedove-45.6.0/
$ build -b -uc -us

I then get an error (posting error below as a postscript). What I wonder
is, how is that the packages are originally compiled? I was under the
impression that this would be enough (if I'm wrong, please yell at me!).
There must be some boxes somewhere building this. Are there scripts that
I might follow to better understand what's going on? Am I incorrect in
my believe that the steps above should in theory be enough?

Thanks for any help.

Cheers,
Thomas

P.S. Here's the error:

$ debuild -b -uc -us
 dpkg-buildpackage -rfakeroot -D -us -uc -b
dpkg-buildpackage: source package icedove
dpkg-buildpackage: source version 1:45.6.0-1~deb8u1
dpkg-buildpackage: source distribution stable-security
dpkg-buildpackage: source changed by Christoph Goehre 
 dpkg-source --before-build icedove-45.6.0
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
dh clean
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/admin/icedove/icedove-45.6.0'
# needed for icedove-l10n
dh_auto_clean
rm -rf debian/icedove-l10n-build
# needed for iceowl-l10n
rm -rf debian/iceowl-l10n-build
make[1]: Leaving directory '/home/admin/icedove/icedove-45.6.0'
   dh_clean
 debian/rules build
make: 'build' is up to date.
 fakeroot debian/rules binary
dh binary
   dh_testdir
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/home/admin/icedove/icedove-45.6.0'
# update config.sub and config.guess
dh_autotools-dev_updateconfig
# run autoconf for all configure files
if [ "Z2.13" != Z ] || [ ! -e
/home/admin/icedove/icedove-45.6.0/configure ]; \
then cd /home/admin/icedove/icedove-45.6.0 && `which autoconf2.13 ||
which autoconf`; fi
if [ "Z2.13" != Z ] || [ ! -e
/home/admin/icedove/icedove-45.6.0/mozilla/configure ]; \
then cd /home/admin/icedove/icedove-45.6.0/mozilla && `which
autoconf2.13 || which autoconf`; fi
if [ "Z2.13" != Z ] || [ ! -e
/home/admin/icedove/icedove-45.6.0/mozilla/js/src/configure ]; \
then cd /home/admin/icedove/icedove-45.6.0/mozilla/js/src && `which
autoconf2.13 || which autoconf`; fi
# prepare branding for the Icedove packages
mkdir -p mail/branding/icedove
# copy needed icons
cp -a debian/icedove-branding/*mail/branding/icedove
cp debian/app-icons/icedove16.png  mail/branding/icedove/mailicon16.png
cp debian/app-icons/icedove22.png  mail/branding/icedove/mailicon22.png
cp debian/app-icons/icedove24.png  mail/branding/icedove/mailicon24.png
cp debian/app-icons/icedove32.png  mail/branding/icedove/mailicon32.png
cp debian/app-icons/icedove48.png  mail/branding/icedove/mailicon48.png
cp debian/app-icons/icedove256.png mail/branding/icedove/mailicon256.png
cp debian/app-icons/icedove48.png  mail/branding/icedove/content/icon48.png
cp debian/app-icons/icedove64.png  mail/branding/icedove/content/icon64.png
cp debian/preview.png mail/themes/linux/mail/preview.png
# copy the mozconfig files
cp debian/mozconfig.* .
cp debian/mozconfig.default mozilla/
echo 'mk_add_options
MOZ_OBJDIR=/home/admin/icedove/icedove-45.6.0/obj-icedove' >>
mozconfig.icedove
# configure the various build settings
# icedove, icedove-dev, calendar-google-provider, iceowl-extension
make -f client.mk configure
make[2]: Entering directory '/home/admin/icedove/icedove-45.6.0'
client.mk:205:
/home/admin/icedove/icedove-45.6.0/obj-icedove/.mozconfig.mk: No such
file or directory
mkdir -p '/home/admin/icedove/icedove-45.6.0/obj-icedove/'
> /home/admin/icedove/icedove-45.6.0/obj-icedove/.mozconfig.mk
cd /home/admin/icedove/icedove-45.6.0/obj-icedove
/home/admin/icedove/icedove-45.6.0/configure
creating cache ./config.cache
Traceback (most recent call last):
  File "/home/admin/icedove/icedove-45.6.0/mozilla/./mach", line 148, in

main(sys.argv[1:])
  File "/home/admin/icedove/icedove-45.6.0/mozilla/./mach", line 76, in main
mach = get_mach()
  File "/home/admin/icedove/icedove-45.6.0/mozilla/./mach", line 67, in
get_mach
mach = check_and_get_mach(dir_path)
  File "/home/admin/icedove/icedove-45.6.0/mozilla/./mach", line 42, in
check_and_get_mach
return load_mach(dir_path, mach_path)
  File "/home/admin/icedove/icedove-45.6.0/mozilla/./mach", line 30, in
load_mach
return mach_bootstrap.bootstrap(dir_path)
  File "/home/admin/icedove/icedove-45.6.0/build/mach_bootstrap.py",
line 14, in bootstrap
return build.mach_bootstrap.bootstrap(topsrcdir, mozilla_dir)
  File
"/home/admin/icedove/icedove-45.6.0/mozilla/build/mach_bootstrap.py",
line 314, in bootstrap
mach.load_commands_from_file(os.path.join(mozilla_dir, path))
  File