LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   udisks without lvm crypto and assoicated crap (https://www.linuxquestions.org/questions/linux-from-scratch-13/udisks-without-lvm-crypto-and-assoicated-crap-4175655785/)

Luridis 06-15-2019 08:40 PM

udisks without lvm crypto and assoicated crap
 
First, there's a little bit of ranting there. I HATE the whole udisks ecosystem. I just want a simple desktop automounter and since this scatter-brianed project started using libbblockdev, it's become a dependency hell.

Has anyone built this bloatware without lvm, cryptsetup, volume key and all that stuff? I have tried, I've opened GitHub tickets and the result is always the same: can't build a simple udisks2 without libblockdev pulling in lvm2 through some indirect dependency.

--without-crypto --without-lvm --without-lvm_dbus doesn't work. It still wants devmapper.

I hate this project... I hate it. I'm close to saying f-it and finding a way to script around it on the desktop. Most of them want udisks2 in one way or another though.

:banghead:

Luridis 06-15-2019 09:48 PM

So I did manage to get libblockdev to build without that stuff. Then udisks killed it. Udisks wants libblockdev dmraid and libblockdev crypto. Crypto requires volumekey and... you guessed it LVM!

I'm going to see if there are alternatives to this windows 98 like dependency hell that udisks has become. It really is absolutely out of control. I miss the days when Linux was simple.

Luridis 06-15-2019 11:24 PM

Okay, there is a temporary solution. In late 2018 the maintainers updated the 2.6.5 udisks2 package to 2.6.6 to patch a CVE. The only package this version needs is libatasmart. It doesn't 100% support LVM, encrypted volumes, software raid and many of the other plugins that are there to support enterprise stuff like Red Hat's VDO SAN products. But it will work for normal desktop stuff. volume_key, libbytesize, cryptsetup, LVM2, libaio and argon2 are all eliminated by using this version. It probably won't support encrypted usb sticks either, but I don't use those anyway, I just hard encrypt 7z/xz files when I have a need for that.

I may try and fork this and create a udisks-lite package, removing the LVM2/crypt support and focusing on basic mounting that is dbus compatible with udisks2. This would probably help them too, because they could eliminate all those --without flags in the full featured package.

bryan_S 06-18-2019 06:55 PM

I'm using udisks2 version 2.1.8 with current kde5 desktop. It has no stupid dependencies and does everything i want it to do. I build it just like the blfs book options except i add 'enable-fhs-media' to mount stuff on /media/<volume> instead of /run/media/user/<volume> ( i put a symlink in /media for my user: cd /media && ln -s . <user> ).

Luridis 06-19-2019 08:39 AM

Quote:

Originally Posted by bryan_S (Post 6006950)
I'm using udisks2 version 2.1.8 with current kde5 desktop. It has no stupid dependencies and does everything i want it to do. I build it just like the blfs book options except i add 'enable-fhs-media' to mount stuff on /media/<volume> instead of /run/media/user/<volume> ( i put a symlink in /media for my user: cd /media && ln -s . <user> ).

That's what I was going for with the 2.6.6 version. Though, I chose that one because it has the patched CVE.

bryan_S 06-23-2019 10:46 AM

Finally got around to installing and testing usdiks 2.6.6 (upgrade from my 2.1.8). Compiles with the same options as the book and works fine - thanks for finding that. Now the only other old versions i'm using are librsvg, gdk-pixbuf, and firefox. This due to dependencies on rust which i will probably never build (Firefox is about to be replaced with "something" probably palemoon).

Luridis 07-06-2019 03:06 PM

Quote:

Originally Posted by bryan_S (Post 6008238)
Finally got around to installing and testing usdiks 2.6.6 (upgrade from my 2.1.8). Compiles with the same options as the book and works fine - thanks for finding that. Now the only other old versions i'm using are librsvg, gdk-pixbuf, and firefox. This due to dependencies on rust which i will probably never build (Firefox is about to be replaced with "something" probably palemoon).

I download the community compiled rust that is a complete package, it's faster anyway. The curl installer gets everything piecemeal and building it yourself still requires you to download a pre-compiled rust binary. Since all current builds of rustc are self-hosted now, you can never really build rust "from scratch". That is, unless you go all the way back to the initial versions that were built on scheme (I think) and build forward to a recent version from there.

bryan_S 07-08-2019 08:59 PM

I guess you mean the standalone installer package from: https://forge.rust-lang.org/other-in...n-methods.html. That looks like it would be a possible option for me (download via public wifi, install offline). I will see how building palemoon goes first - that's what I'm using right now and I am pretty well satisfied with it (using the pre-built PM binary).

Luridis 07-10-2019 12:03 PM

I can give you good install instructions for both, including building palemoon.

Luridis 07-10-2019 12:21 PM

Rust complete offline install...

Code:

wget https://static.rust-lang.org/dist/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz{,.asc}
gpg --verify rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.asc

Add environment stuff...

Code:

mkdir -v /opt/rustc-1.36.0 && ln -svfin rustc-1.36.0 /opt/rustc

cat > /etc/profile.d/rustc.sh << "EOF"
## Rust Compiler Environment

if [ -d /opt/rustc ]; then
  pathappend /opt/rustc/bin
fi
EOF

echo '/opt/rustc/lib' >> /etc/ld.so.conf

Log out, log back in and untar the package...

Code:

./install.sh --prefix=/opt/rustc --sysconfdir=/etc --mandir=/usr/share/man \
--components=rustc,cargo,rust-std-x86_64-unknown-linux-gnu,\
rust-analysis-x86_64-unknown-linux-gnu && ldconfig

That will give you the standard build tools without hundreds of megabytes of docs and other utilities you don't want unless you're developing rust programs.

Luridis 07-10-2019 12:35 PM

Building Palemoon:

You'll need GConf if you want to save settings, otherwise it has the same requirements as Seamonkey. Don't try to add system libs with commands from Seamonkey because the Palemoon developers maintain their own internally patched versions of those things. Things may break if you try to add system-libs they didn't make available in their config file. Finally, you don't need to add an ld.so.conf setting if you're installing in /opt because the dependencies are either statically linked or use rlib embedded paths during the build. Personally, I don't add a PATH statement either and simply create a symlink to /usr/bin.

Download the source package from: https://github.com/MoonchildProducti...Release.tar.gz

Code:

mkdir -v /opt/palemoon-28.6.0.1 && ln -sfnv palemoon-28.6.0.1 /opt/palemoon

mkdir pmbuild &&
cat > .mozconfig << "EOF"
mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_OBJDIR=./pmbuild/
ac_add_options --enable-application=palemoon
ac_add_options --prefix=/opt/palemoon
ac_add_options --enable-optimize="-O2 -march=core2 -mtune=native" #MODIFY FOR YOUR ENVIRONMENT!

# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1

ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --with-pthreads

#ac_add_options --disable-gconf #REMOVE COMMENT IF YOU'VE NOT INSTALLED GCONF!
ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater

ac_add_options --x-libraries=/usr/lib

mk_add_options PYTHON=/usr/bin/python2
mk_add_options MOZ_MAKE_FLAGS="-j4"

EOF

./mach build


Then, as root:

Code:

make -f client.mk install INSTALL_SDK= && ldconfig
ln -sfv /opt/palemoon/bin/palemoon /usr/bin

for pix in 16 24 32 48 ; do
  install -vm644 application/palemoon/branding/official/default"$pix".png \
  /usr/share/icons/hicolor/"$pix"x"$pix"/apps/palemoon.png
done

install -vm644 application/palemoon/branding/official/mozicon128.png \
  /usr/share/icons/hicolor/128x128/apps/palemoon.png

install -vm644 application/palemoon/branding/official/palemoon.desktop \
  /usr/share/applications

Finally, update the GTK icon cache. The build takes about 45 minutes at J4 on my Core i5 3120M laptop.

bryan_S 07-13-2019 07:18 AM

Great info on both packages - thanks. I intend to build one or both of those this weekend.


All times are GMT -5. The time now is 07:42 PM.