How do make a .deb package that reconfigures itself when dependencies are upgraded
I need to build a deb for my application that adjusts some links in my system when installed (I do that in my postinst script). However, when a dependency is upgraded, I might also need to adjust my links. So, ideally I want my prerm (to remove all the links I created) und my postinst (to reestablish them again) to be called whenever my dependencies are updated. Is there a way to force this behavior for my package? If not, is there any other way I can achieve my goal, i.e., some magic script that is called on dependency changes?
See also questions close to this topic
Maven skip recompilation of submodule
This is my current project setup:
- Submodule A
- Submodule B <- Depends on A
- Submodule C
I have a multi module setup where the compilation of one specific submodule (A) takes quite a while. Since A rarely changes I'd like to skip it while recompiling the project. However I've run into issues because B depends on A. So executing
mvn clean install -pl !A
or using a profile like
<modules> <module>Submodule B</module> <module>Submodule C</module> <modules> <profiles> <profile> <id>include-A</id> <modules> <module>Submodule A</module> </modules> </profile> </profiles>
fails because B cannot locate A even if it is present in my .m2 folder from a previous Maven execution since it looks for that artifact on our Nexus repo.
It seems to work if I move Submodule A to a separate project but then I'd have to manage two projects with identical configurations so I'd prefer to keep my project structure.
Verify Java dependencies (some jars) in JDK/JRE lib using batch?
I have a batch that ask some questions to install a custom java application among which can choose if he wants to use jdk or jre and the version.
This application needs a jar dependency that should be in jdk/jre library (there isn't it in default java installation), so in my batch i want to verify if this dependency exists.
If user has jdk I can use jrunscript and verify specific class but with jre i can't.
I thought about looking inside java folder if there is this jar but it isn't a so safe check.
How can I check this dependecy?
PS: The request is that there must be this dependency in jdk/jre library and I can't put inside my java application.
Android studio 3 does not search for libraries dependencies
My Android studio stopped searching for library dependencies. I know that it's better and faster to add dependencies through build.gradle but sometimes it's easier to search from inner search window of android studio than googling it. For example, this is how retrofit search results looks like
This bug appeared after upgrade to Android studio 3
Does anyone know how to solve this problem?
apt update is not working in ubuntu 16.04
I have installed ubuntu 16.04 (new installation).When i try to run,
sudo apt-get update
i ran into the following issues,
**Get:1 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease [17.5 kB] Ign:2 http://archive.canonical.com/ubuntu precise InRelease Ign:3 http://extras.ubuntu.com/ubuntu precise InRelease Get:4 http://extras.ubuntu.com/ubuntu precise Release [11.9 kB] Get:5 http://archive.canonical.com/ubuntu precise Release [8,180 B] Ign:7 http://us.archive.ubuntu.com/ubuntu precise InRelease Hit:9 http://us.archive.ubuntu.com/ubuntu precise-security InRelease Hit:10 http://us.archive.ubuntu.com/ubuntu precise-updates InRelease Hit:11 http://us.archive.ubuntu.com/ubuntu precise-backports InRelease Get:12 http://us.archive.ubuntu.com/ubuntu precise Release [11.9 kB] Get:13 http://us.archive.ubuntu.com/ubuntu precise Release.gpg [72 B] Get:14 http://us.archive.ubuntu.com/ubuntu precise/main Sources [8,130 B] Fetched 57.7 kB in 1s (38.6 kB/s) Reading package lists... Done W: http://archive.canonical.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) W: http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key C47415DFF48C09645B78609416126D3A3E5C1192 uses weak digest algorithm (SHA1) W: http://us.archive.ubuntu.com/ubuntu/dists/precise-security/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) W: http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) W: http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) W: http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key C47415DFF48C09645B78609416126D3A3E5C1192 uses weak digest algorithm (SHA1) E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file) E: Some index files failed to download. They have been ignored, or old ones used instead.**
Then i looked for the issues and found some solutions which is not working for me.
Setting up a server accessible over LAN
I am trying to set up a server (Ubuntu 14.04), which is not connected to the internet, just accessible over LAN.
Can't replace the image of the server being used.
I am using Ubuntu system as my local machine and I want to transfer all the packages installed in the current system to the server.
I tried installing packages like build-tools-essential, node.js using deb files over ssh, but the process gets stuck when it comes to dependencies. I also tried manually installing the dependencies manually, but there's heck lot of them.
Any suggestions, how to package all the installed packages in my current system - which I can transfer at once to the server.
How to circumvent "apt-key output should not be parsed"?
I'm automating my Docker installation. Something like this:
if apt-key fingerprint 0EBFCD88 | grep "Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" > /dev/null then # proceed fi
This worked fine in older versions of
apt-key, but recent versions have two issues:
- A different output format: I can hack around that
Warning: apt-key output should not be parsed (stdout is not a terminal)
Clearly, I can hack around this as well, just redirect
/dev/null. It just made me curious:
How do these fine folks suggest I verify my key fingerprints? Or am I getting this fundamentally wrong by wanting to automate it, does that defeat the point? (I think not, since I still manually lifted the expected fingerprint from the website, but feel free to tell me otherwise...)
customize debian live user
how can I change the home folder of default live user in a customized debian linux? what I want is:
- installing some packages in default installation and for live boot of debian
- some customization in home folder of any new user and the live default user
I know I can remaster a debian and install my package and change what I whant but what about the default user. is it influenced by my default user changes?
How to correct permissions for CPackDeb directories?
PROJECT(asdf NONE) CMAKE_MINIMUM_REQUIRED(VERSION 3.0) INSTALL(FILES CMakeLists.txt DESTINATION share/doc/asdf/whatever) SET(CPACK_GENERATOR "DEB") SET(CPACK_PACKAGE_CONTACT "firstname.lastname@example.org") INCLUDE(CPack)
The package generated by
make packagehas following contents:
$ dpkg-deb --contents asdf-0.1.1-Linux.deb drwx------ root/root 0 2017-12-20 10:50 ./usr/ drwx------ root/root 0 2017-12-20 10:50 ./usr/share/ drwx------ root/root 0 2017-12-20 10:50 ./usr/share/doc/ drwx------ root/root 0 2017-12-20 10:50 ./usr/share/doc/asdf/ drwx------ root/root 0 2017-12-20 10:50 ./usr/share/doc/asdf/whatever/ -rw-r--r-- root/root 235 2017-12-20 10:50 ./usr/share/doc/asdf/whatever/CMakeLists.txt
with the parent directories having only permission bits for the owner. How do I correct these so that the world could read the files I install, e.g. for these to be something like
How to use command line dpkg options to unpack conf and skip postinst script
I have a need to run
dpkg install, unpack the
conffiles, but skip running the
postinstscripts (if it's included in the
I've tried to change the
/usr/bin/true, but that didn't work. Any other ideas would be great!