Pls. refer to:
Palemoon installation from source
https://dev1galaxy.org/viewtopic.php?id=616#p7706
on the issue of compatibility of gcc/g++ versions in different releases in Devuan/Debian.
---
The conclusion about my compilations of these days, I hope it'll be useful for others trying to compile Pale Moon.
Code: Select all
$ ls -ldABRgo palemoon-27.7.2*
-rw-r--r-- 1 10373 2018-02-23 17:39 palemoon_27.7.2~repack-1_amd64.buildinfo
-rw-r--r-- 1 3080 2018-02-23 17:39 palemoon_27.7.2~repack-1_amd64.changes
-rw-r--r-- 1 27392 2018-02-23 17:08 palemoon_27.7.2~repack-1.debian.tar.xz
-rw-r--r-- 1 1258 2018-02-23 17:08 palemoon_27.7.2~repack-1.dsc
drwxr-xr-x 2 4096 2018-02-18 11:51 palemoon_27.7.2~repack.d
-rw-r--r-- 1 127153528 2018-02-01 22:10 palemoon_27.7.2~repack.orig.tar.xz
$ ls -ldABRgo palemoon_27.7.2~repack*
drwxr-xr-x 53 4096 2018-02-23 17:39 palemoon-27.7.2~repack
-rw-r--r-- 1 908 2018-02-18 12:19 palemoon-27.7.2~repack_allow-sslkelogfile.patch
$ ls -lABRgo allow-sslkelogfile.patch
-rw-r--r-- 1 908 2018-02-18 12:19 allow-sslkelogfile.patch
$
I'm not even sure what made it keep my patch at every new try, but I only once, more than 3-4 days ago now, patched the source with quilt with my allow-sslkeylog-file.patch, as explained earlier in this topic. Also the entire method is explained earlier in this topic. Just for the reader to get the gist, I'll recount the routine that I used for the past few days.
So that above is what I got in a dir where I have all the necessary perms, which actually
dget http://download.opensuse.org/repositori ... estion.dsc command got me, and with grsecurity RBAC rules set to allow the compiling and all (that's a broader issue, but for those who use grsec, and for those who will be using grsecunoff in the future, as we hope that the project will continue, there's plenty on setting RBAC rules on
https://forums.grsecurity.net/).
And in particular I don't know at this time, whether the:
Code: Select all
palemoon-27.7.2~repack_allow-sslkelogfile.patch
was necessary at all. But it's just a copy of allow-sslkeylog-file.patch.
Anyway this was my routine for days:
Code: Select all
$ rm -rf palemoon-27.7.2~repack && \
dpkg-source -x palemoon_27.7.2~repack-1.dsc |& \
tee ~mr/LOG_/dpkg-source-x_palemoon_27.7.2_$(date +%y%m%d_%H%M%S)_5 && ask; \
if [ "$?" == 0 ]; then cd palemoon-27.7.2~repack && dpkg-buildpackage -d -j4 |& \
tee ~mr/LOG_/dpkg-buildpackage-d-j4_$(date +%y%m%d_%H%M%S) ; \
fi
I prettified it a little for easier perusing, but I actually used it all as just one line.
The if condition is there to allow me to check up on the sources before I start building it. The ask is souced in my .bashrc:
Code: Select all
$ cat .bashrc
...
source ~/.bashrc.ask
...
And the .bashrc.ask looks like this (it's from Mendel Cooper Advanced Bash Scripting Guide, just
apt-get install abs-guide):
Code: Select all
function ask()
{
echo -n "$@" '[y/n] ' ; read ans
case "$ans" in
y*|Y*) return 0 ;;
*) return 1 ;;
esac
}
So, before confirming with Y/y/Yes or similar to start compiling, I check up on the changes I made to the debian/mozconfig or anything other. E.g. it needed to have:
Code: Select all
$ cat palemoon-27.7.2~repack/debian/mozconfig | grep 'gcc\|g++'
export CC=gcc-4.9
export CXX=g++-4.9
for Pale Moon to compile correctly.
If the next time (which may not be soon) I use that method I notice there are any typoes, I'll be back to correct it (here in some future post, or even in another topic by me that should contain strings "compile" or "compiling", or build/building [Pale Moon, of course], or such, on this forum).
The thing is, even though I kept unpacking the sources all anew, the quilt somehow would always reapply my patch, as you can see from the logs that that command one-liner above tee's into for me in a dedicated dir in my homedir.
Here are some:
$ cat LOG_/dpkg-source-x_palemoon_27.7.2_180223_135158_5
Code: Select all
dpkg-source: warning: extracting unsigned source package (palemoon_27.7.2~repack-1.dsc)
dpkg-source: info: extracting palemoon in palemoon-27.7.2~repack
dpkg-source: info: unpacking palemoon_27.7.2~repack.orig.tar.xz
dpkg-source: info: unpacking palemoon_27.7.2~repack-1.debian.tar.xz
dpkg-source: info: applying allow-sslkelogfile.patch
And here I check it up if all is ready and then:
$ cat LOG_/dpkg-buildpackage-d-j4_180223_135223
Code: Select all
dpkg-buildpackage: info: source package palemoon
dpkg-buildpackage: info: source version 27.7.2~repack-1
dpkg-buildpackage: info: source distribution obs
dpkg-buildpackage: info: source changed by Steven Pusser <stevep@mxlinux.org>
dpkg-source --before-build palemoon-27.7.2~repack
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
dh clean --parallel
debian/rules override_dh_auto_clean
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
rm -f mozconfig
dh_auto_clean
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
dh_clean -O--parallel
dpkg-source -b palemoon-27.7.2~repack
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building palemoon using existing ./palemoon_27.7.2~repack.orig.tar.xz
dpkg-source: info: building palemoon in palemoon_27.7.2~repack-1.debian.tar.xz
dpkg-source: info: building palemoon in palemoon_27.7.2~repack-1.dsc
debian/rules build
make: 'build' is up to date.
fakeroot debian/rules binary
dh binary --parallel
dh_update_autotools_config -O--parallel
debian/rules override_dh_auto_configure
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
cp debian/mozconfig mozconfig
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
debian/rules override_dh_auto_build
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
make -f client.mk build
make[2]: Entering directory '/some/where/palemoon-27.7.2~repack'
[...]
copying build/lib.linux-x86_64-2.7/_psutil_linux.so ->
copying build/lib.linux-x86_64-2.7/_psutil_posix.so ->
checking Python environment is Mozilla virtualenv... yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for objcopy... /usr/bin/objcopy
checking for gcc... gcc-4.9
checking whether the C compiler (gcc-4.9 -g -O2 ) works... yes
checking whether the C compiler (gcc-4.9 -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc-4.9 accepts -g... yes
checking for c++... g++-4.9
checking whether the C++ compiler (g++-4.9 -g -O2 ) works... yes
checking whether the C++ compiler (g++-4.9 -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++-4.9 accepts -g... yes
See above? And if you have:
Code: Select all
checking whether g++-6 accepts -g... yes
you get a Pale Moon with segmentation faults that I had for months now (I'm still testing, but that's what appears to me to be the reason, for even old segfaults that I metioned earlier in this topic)
Here I skip about one thousand lines. To show where SSLKEYLOGFILE support begins to compile:
Code: Select all
[...]
make[7]: Entering directory '/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/config/external/nss'
LDFLAGS=-Wl,--build-id make -C /some/where/palemoon-27.7.2~repack/security/nss/lib private_export CC=' gcc-4.9' SOURCE_MD_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist SOURCE_MDHEADERS_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/nspr DIST=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist NSPR_INCLUDE_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/nspr NSPR_LIB_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/lib MOZILLA_CLIENT=1 NO_MDUPDATE=1 NSS_ENABLE_ECC=1 NSS_ENABLE_TLS_1_3=1 SQLITE_LIB_NAME=mozsqlite3 SQLITE_INCLUDE_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include topsrcdir='/some/where/palemoon-27.7.2~repack' BUILD='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/security/$(subst $(topsrcdir)/security/,,$(CURDIR))' BUILD_TREE='$(BUILD)' OBJDIR='$(BUILD)' DEPENDENCIES='$(BUILD)/.deps' SINGLE_SHLIB_DIR='$(BUILD)' SOURCE_XP_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist BUILD_OPT=1 OPT_CODE_SIZE=1 NS_USE_GCC=1 USE_64=1 NSS_SSL_ENABLE_ZLIB= PROGRAMS= CHECKLOC= FREEBL_NO_DEPEND=0 FREEBL_LOWHASH=1 NSS_ALLOW_SSLKEYLOGFILE=1 NSS_NO_PKCS11_BYPASS=1 PUBLIC_EXPORT_DIR='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/$(MODULE)' SOURCE_XPHEADERS_DIR='$(SOURCE_XP_DIR)/include/$(MODULE)' MODULE_INCLUDES='$(addprefix -I$(SOURCE_XP_DIR)/include/,$(REQUIRES))' MAKE_OBJDIR='$(INSTALL) -D $(OBJDIR)' TARGETS='$(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)' NSS_ENABLE_WERROR=0 NSINSTALL='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/config/nsinstall'
[...]
Maybe some 16000 lines I skip here.
Code: Select all
[...]
WARNING: Found 39 duplicated files taking 816463 bytes (uncompressed)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon
(cd ../../dist/palemoon && tar --exclude=precomplete --exclude=.mkdir.done -chf - .) | \
(cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin
rm -f -f /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin/palemoon
ln -s /usr/lib/palemoon/palemoon /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/include/palemoon-27.7.2
(cd ../../dist/include && tar --exclude=.mkdir.done -chf - .) | \
(cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/include/palemoon-27.7.2 && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/share/idl/palemoon-27.7.2
(cd ../../dist/idl && tar --exclude=.mkdir.done -chf - .) | \
(cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/share/idl/palemoon-27.7.2 && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel/sdk/lib
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel/sdk/bin
if test -f ../../dist/include/xpcom-config.h; then \
../../config/nsinstall -t -m 644 ../../dist/include/xpcom-config.h /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel; \
fi
[...]
I don't know if this is anything to worry about, but I got lots of these lines:
Code: Select all
[...]
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
dh_shlibdeps -l /usr/lib/palemoon
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libmozalloc.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libmozalloc.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libplds4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libplc4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libxul.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnssutil3.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnssutil3.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libxul.so'
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libatk-1.0.so.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libpangoft2-1.0.so.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libpangocairo-1.0.so.0 (they use none of the library's symbols)
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
dh_installdeb -O--parallel
dh_gencontrol -O--parallel
dh_md5sums -O--parallel
debian/rules override_dh_builddeb
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
dh_builddeb -- -Z xz
dpkg-deb: building package 'palemoon' in '../palemoon_27.7.2~repack-1_amd64.deb'.
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
dpkg-genbuildinfo
dpkg-genchanges >../palemoon_27.7.2~repack-1_amd64.changes
dpkg-genchanges: info: including full source code in upload
dpkg-source --after-build palemoon-27.7.2~repack
signfile palemoon_27.7.2~repack-1.dsc
dpkg-buildpackage: info: full upload (original source is included)
gpg: skipped "Steven Pusser <stevep@mxlinux.org>": No secret key
gpg: dpkg-sign.eD2uUcdg/palemoon_27.7.2~repack-1.dsc: clear-sign failed: No secret key
dpkg-buildpackage: error: failed to sign .dsc file
And it got me the package that I was able to install:
Code: Select all
# cd ../
# dpkg -i palemoon_27.7.2~repack-1_amd64.deb
As can be seen in the video, and the video is verified via the network trace taken, the SSL-logging made possible with my patch, at:
Pale Moon and uBlock0 on a grsec-hardened kernel 3
https://www.croatiafidelis.hr/foss/cap/ ... ock0-3.php
all the addons can now be installed without issues. Well, so far it appears to be the case.
Regards!