how to run builddep- manually due to circular dep

If none of the more specific forums is the right place to ask

how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 06:04

how to build this package in sid called openjdk-8-jdk so that it is installable on stable?

it has a dependency to itself.

SO I need to install build-dep manually with rdepends, how can I do it?

I am in a stable chroot
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby cuckooflew » 2020-06-16 06:22

Why don't you try what was suggested here? : http://forums.debian.net/viewtopic.php?f=10&t=146491&p=722363#p722363

Also there are some other valid methods in the search results, using keywwords:
Code: Select all
How to build openjdk-8-jdk for Debian 10
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 09:09

Thanks for the help. I made a new thread that is more specific.

People proposed alternatives (MIRBSD, run my app in a chroot), but I want to learn and I think my package is buildable on stable, because no dependency is absolutely outside of stable. The dependency to the package itself will block build-dep, but I can install the packages manually.

The reason I cannot install on sid in a chroot is because I cannot install the flutter android license in a chroot and then copy the folders outside of it, the license will break.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 09:25

I already built one openjdk-8 a few months ago but it only works if I temporarily change libc6 version. It is not Frankendebian if i revert after use. Maybe a shell temprorary change of LD_LBIRARY_PATH would work too.

Or maybe I am wrong. stable has g++ 8 while the package seems to depend on g++9.
But in the rules file the g++ version is said to be 8 if I run buster.
So this dependency to g++-9 seems artificial.
yes apt-rdpends requires g++-9, but here is the rules file, and it seems I could build with stable packages.

debian/rules
else ifneq (,$(filter $(distrel),buster))
export CC = $(DEB_HOST_GNU_TYPE)-gcc-8
export CXX = $(DEB_HOST_GNU_TYPE)-g++-8
else
export CC = $(DEB_HOST_GNU_TYPE)-gcc-9
export CXX = $(DEB_HOST_GNU_TYPE)-g++-9
endif

This is what I will do:
clone the bzr repo on launchpad
get an older version jsut before the buster release.
lsit the buster dependencies and isntall then
then build the latest source on usntable using the stable build-dep
If I find that it is really locked to usntable, then I will build the old version.

Perhaps I will suggest changes to the package admins. But not before I am sure.
Any opinion if the circular dependency to the package itself should be corrected?
Maybe I will make a backports if it can be useful to others.

---
update: I "checked out" a version needing GCC 8 and not 9 since buster has GCC 8.
I could install all dependencies and that are all available in buster, until the circular dependency remained. Then I learnt that building Java 8 requires a boot JDK, which means java 8 or 7 already isntalled.

So now I will try to find a prebuilt Java 8 (mirbsd?) to use as a boot JDK, and as a debian dependency for the debuild command. Then I will build with 100% compatibility on buster stable. So far I have run for 5 minutes the debuild without errors.
ANd the link below gives the latest build even if a commit was don 1 month ago, it builds the latest, it is actualized.
from stevepusser:
https://www.mirbsd.org/~tg/Debs/dists/b ... openjdk-8/

I do not understand how they can they call their version
Version: 8u252-b09-1~wtf10+1
and only depend on libc6 >= 2.2.5

that revision 8u252-b09-1 requires g++9 to be built.

UPDATE:
With the latest revision, changing g++-9 to 8 in the control file, and then it will build fine.

To people saying I waste your time, I am confused etc... you must realize that building from source is more secure than just installing from mirbsd a package.
That is the whole point of open source, one can check the source and build it.

OK I am not totally independent of an external package. But it still makes a difference.
Last edited by MagicPoulp on 2020-06-16 15:11, edited 6 times in total.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 12:53

other question,
how do I unmount proc and sys and dev? It says "busy".
To delete the chroot, I need to unmount first.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby cuckooflew » 2020-06-16 13:29

how do I unmount proc and sys and dev? It says "busy"
If none of the results work, then maybe with examples of what you tried ,etc.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 15:11

edited above with the final solution.

Does anyone think it can be useful if I publish a formal backports?
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby Head_on_a_Stick » 2020-06-16 15:24

MagicPoulp wrote:you must realize that building from source is more secure than just installing from mirbsd a package

No, it isn't. The person in charge of MirBSD is a Debian developer...

https://wiki.debian.org/ThorstenGlaser
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12765
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-16 16:17

ANd what if the NSA corrupts him to put in corrupted malware?

Still building from source can only be better.
I will compare the binary sizes. THey probably will match.

By the way, the debuild command reports about missing dependencies so I could install those to enventually get an error explaining the JAVA Boot thing.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby Head_on_a_Stick » 2020-06-16 16:54

MagicPoulp wrote:ANd what if the NSA corrupts him to put in corrupted malware?

Perhaps buy some tin foil and make a nice hat with which to protect yourself? :mrgreen:

But seriously, the wtf repositories include the sources so if you're that paranoid you could grab those instead and build them locally after examining the code line-by-line.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12765
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-17 04:49

and for the other question this is what I get while all terminals except one are closed:

How can I unmount?

thierry@debian-thierry:/stable-chroot$ sudo umount sys
umount: /stable-chroot/sys: target is busy.


It is still mounted after I reboot using sudo reboot.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby stevepusser » 2020-06-17 05:52

MagicPoulp wrote:ANd what if the NSA corrupts him to put in corrupted malware?

Still building from source can only be better.
I will compare the binary sizes. THey probably will match.

By the way, the debuild command reports about missing dependencies so I could install those to enventually get an error explaining the JAVA Boot thing.


What if the NSA corrupts any other Debian developer to add spyware to the Debian repositories? What if reptilian aliens replace all the developers with evil replicants?

You said you already built an older version of openjdk-8?
Did you build packages, or something else, or does it need a FrankenDebian?
If you built good packages, why not use those as the build-dependencies?

I already said it once. You can use the mirbsd packages to recompile their source packages on Buster. Not Sid's source packages, because that debian folder's files aren't tweaked to build correctly on Buster like mirbsd's. You don't need any newer libc6 from Sid, nothing like that.

I already pointed out that I did the same thing already for MX Linux, several times in fact to keep up with the updates. I suggest you install sbuild from buster-backports and learn how to use it to build packages in schroots. Install ubuntu-dev-tools (which are in Debian repos) to get some scripts to easily create an sbuild schroot, such as

Code: Select all
mk-sbuild buster


to create one for Buster and your current architecture. Check out the Debian and Ubuntu wikis, plus the man page for sbuild.
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12131
Joined: 2009-10-06 05:53

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-17 06:24

Thanks for suggestions.

I start simple with the debian doc for build, there is a main website edbian build.

I ran debuild -b -us -uc like the debian doc website suggests.
But the CPu usage is only of 67,2%

and this is for one core, if I run shift + i it shows the overall percentage which is lower, just 5%.

Q1: Is there a way to parallelize builds?
If you run make there is an option -j8 to run on several cores.

edit: actually tests are being run not the build so that may be why. It is probably prallelized automatically.

Q2. ANd is there a way to skip the tests at the end?
the .deb files still dont show up.

I found the answer in the debian/rules file
there is an install make target

install: packaging-files
dh_testdir
dh_testroot
dh_prep || dh_clean -k
rm -f debian/*.install debian/*.links
dh_installdirs
Last edited by MagicPoulp on 2020-06-17 07:29, edited 3 times in total.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-17 06:56

You said you already built an older version of openjdk-8?
Did you build packages, or something else, or does it need a FrankenDebian?
If you built good packages, why not use those as the build-dependencies?


It required a Frankenstein libc6 from unstable.
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Re: how to run builddep- manually due to circular dep

Postby MagicPoulp » 2020-06-17 10:08

files have few bytes of difference, exept one file which has a huge difference:
openjdk-8-jdk_8u252-b09-1_amd64.deb
1905916
381580 for WTF

I only built the binary using debuild -us -uc -b

root@debian-thierry:/downloads/source# ls -l *.deb | grep -vE "dbg|zero|demo|source|doc"
-rw-r--r-- 1 root root 1905916 Jun 17 09:44 openjdk-8-jdk_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 8268140 Jun 17 09:45 openjdk-8-jdk-headless_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 69652 Jun 17 09:44 openjdk-8-jre_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 27350968 Jun 17 09:45 openjdk-8-jre-headless_8u252-b09-1_amd64.deb
root@debian-thierry:/downloads/source# ls -l ../mirbsd/*.deb
-rw-r--r-- 1 root root 381580 Apr 21 19:12 ../mirbsd/openjdk-8-jdk_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 8272928 Apr 21 19:13 ../mirbsd/openjdk-8-jdk-headless_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 69572 Apr 21 19:12 ../mirbsd/openjdk-8-jre_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 27359972 Apr 21 19:14 ../mirbsd/openjdk-8-jre-headless_8u252-b09-1~wtf10+1_amd64.deb


My build dworked.
But using java 8 requires 500 MB of extra packages, but present in buster:

openssl ca-certificates libnspr4 libsqlite3-0 libnss3 ca-certificates-java java-common libavahi-common-data libavahi-common3 libdbus-1-3 libavahi-client3 libkeyutils1 libkrb5support0 libk5crypto3 libkrb5-3 libgssapi-krb5-2 libcups2 liblcms2-2 libjpeg62-turbo libexpat1 libpng16-16 libfreetype6 ucf fonts-dejavu-core fontconfig-config libfontconfig1 libpcsclite1 libxau6 libxdmcp6 libxcb1 libx11-data libx11-6 libxext6 libxi6 libxrender1 x11-common libxtst6 dbus krb5-locales libglib2.0-0 libxrandr2 libxinerama1 libglvnd0 libdrm-common libdrm2 libglapi-mesa libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxfixes3 libxdamage1 libxshmfence1 libxxf86vm1 libdrm-amdgpu1 libpciaccess0 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libedit2 libllvm7 libsensors-config libsensors5 libgl1-mesa-dri libglx-mesa0 libglx0 libgl1 libgl1-mesa-glx libgtk2.0-common libatk1.0-data libatk1.0-0 libpixman-1-0 libxcb-render0 libxcb-shm0 libcairo2 libjbig0 libwebp6 libtiff5 libicu63 libxml2 shared-mime-info libgdk-pixbuf2.0-common libgdk-pixbuf2.0-0 fontconfig libfribidi0 libthai-data libdatrie1 libthai0 libpango-1.0-0 libgraphite2-3 libharfbuzz0b libpangoft2-1.0-0 libpangocairo-1.0-0 libxcomposite1 libxcursor1 hicolor-icon-theme gtk-update-icon-cache libcroco3 librsvg2-2 librsvg2-common adwaita-icon-theme libgtk2.0-0 libatspi2.0-0 libatk-bridge2.0-0 libcairo-gobject2 libcolord2 libepoxy0 libjson-glib-1.0-common libjson-glib-1.0-0 libpsl5 libproxy1v5 glib-networking-common glib-networking-services libdconf1 libpam-systemd dbus-user-session dconf-service dconf-gsettings-backend gsettings-desktop-schemas glib-networking libsoup2.4-1 libsoup-gnome2.4-1 librest-0.7-0 libwayland-client0 libwayland-cursor0 libwayland-egl1 xkb-data libxkbcommon0 libgtk-3-common libgtk-3-0 libfontenc1 libice6 libsm6 libxt6 libxmu6 libxpm4 libxaw7 libxcb-shape0 libxft2 libxmuu1 libxv1 libxxf86dga1 x11-utils libatk-wrapper-java libatk-wrapper-java-jni libasound2-data libasound2 libgif7 libasyncns0 libogg0 libflac8 libvorbis0a libvorbisenc2 libsndfile1 libwrap0 libpulse0 at-spi2-core libgail18 libgail-common libgdk-pixbuf2.0-bin libglib2.0-data libgtk-3-bin libgtk2.0-bin publicsuffix xdg-user-dirs
MagicPoulp
 
Posts: 392
Joined: 2018-11-05 21:30

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable