Closed r4rdsn closed 3 years ago
I had this problem in the past and thought I fixed it by detecting file conflicts. Turns out, I completely fucked the conditionals.
The ||
and &&
operators in shell gives me a hard time, because they are so different compared to other programming languages.
To fix this relink /usr/lib
to /lib
.
It should be working fine now.
$ ./xdeb -Sed ~/Downloads/mongodb-org-server_4.4.1_amd64.deb
[+] Synced shlibs
[+] Extracted files
[-] Unable to find dependency for libcrypto.so.1.1
[-] Unable to find dependency for libssl.so.1.1
[+] Resolved dependencies ( glibc>=2.29_1 libcurl>=7.19_1 libgcc>=4.4.0_1 liblzma>=5.0.0_1 )
[!] Conflict: destdir/lib
[-] Unless updating, consider removing conflicting files and rebuild with "-rb"
index: skipping `mongodb-org-server-4.4.1_1' (x86_64), already registered.
index: 4 packages registered.
[+] Done. Install using `xbps-install -R binpkgs mongodb-org-server-4.4.1_1`
I'm thinking about making xdeb automatically move those files, or refusing to build. What do you think about that?
I'm thinking about making xdeb automatically move those files, or refusing to build. What do you think about that?
@toluschr Yeah I don't think xdeb should build packages that mess up conflicting system files by default. Refusing to build is better but I don't think it should do that either, since at least in this case the lack of /lib isn't a problem, so xdeb can safely ignore it. I imagine it would also make updates more difficult. Maybe it should build but put file conflicts in a different directory than destdir by default, so that if you want to force it you can mv
them into destdir and rebuild.
I'll bump this (if you don't mind) since I've got a totally unusable system recently after converting a package (actually a XanMod kernel for Debian). So yes, in fact, ~/lib, which is a soft link to /usr/lib on a normal Void Linux installation, gets replaced with a plain /lib directory. I couldn't neither boot my PC nor chroot into the system.
P.S. What are the options to actually build a package without installing it? (so I can inspect its contents prior to installation)
Thanks.
xdeb just builds the package. Leave out the xbps-install
step. I don't think converting custom kernel packages is a good idea.
Also:
[!] Conflict: 'destdir/lib'
[!] Unless updating, consider removing conflicting files and rebuild with "-rb"
@r4rdsn I went with the first idea. The script now moves symlinks in / by default. Just moving known conflicts isn't a good solution, but atleast the script won't break the system when ignoring the logs anymore.
Information
XDEB_PKGROOT="." ./xdeb -Sde mongodb-org-server_4.4.1_amd64.deb
Package
Script output
Describe the issue
After installing the package, /lib/, which is a soft link to /usr/lib/ on a normal Void Linux installation, gets replaced with /lib/systemd/system/mongod.service. That breaks the system as binaries can no longer use any of the library files.