SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've modified a single program: kcheckpass, in the kde-workspace package. I don't want to blacklist the whole package, but I don't want my modified program to get clobbered on the next upgrade. Is there a way to blacklist a single component within a package?
no, if you want to handle this via slackpkg you have to blacklist the package: slackpkg won't handle anything about the content of the packages, it uses the pkgtools utilities (installpkg, upgradepkg, etc.) for installing/upgrading.
alternatively, you can make the file immutable with chattr
Or, could I simple `chmod a-w /usr/lib$LIBDIRSUFFIX/kde4/libexec/kcheckpass`, rather than using chattr? I've used chattr, but not much and when I need to ultimate modify such a file I always forget that months/years ago I chattr'ed it.
You can still remove a file that has the write permission removed. Try it yourself.
Code:
touch test
chmod -w test
rm test
It will ask if you want to remove a write-protected file, and you can hit the y to continue to remove it. removepkg would force that using the -f option of rm.
no, if you want to handle this via slackpkg you have to blacklist the package: slackpkg won't handle anything about the content of the packages, it uses the pkgtools utilities (installpkg, upgradepkg, etc.) for installing/upgrading.
alternatively, you can make the file immutable with chattr
the 'common' way to solve this is to put the program on a place that is before /usr/bin in you $PATH,
that is usually /usr/local/bin, which is there for such and similar reasons.
than it doesn't matter if the original binary becomes overwritten by an update. and you can easily switch both versions, if this is ever needed.
putting things to /usr/local/ will also allow you to package and manage your software via the available pkg tools
the 'common' way to solve this is to put the program on a place that is before /usr/bin in you $PATH,
that is usually /usr/local/bin, which is there for such and similar reasons.
than it doesn't matter if the original binary becomes overwritten by an update. and you can easily switch both versions, if this is ever needed.
putting things to /usr/local/ will also allow you to package and manage your software via the available pkg tools
That is an excellent idea!! I'll try it. That would save me from having to either chattr the file, or move it elsewhere before doing the update. The problem with the chattr solution is that I still want the original to get updated because my kcheckpass script will run the 'real' program for local users. So, if I put my replacement in /user/local/bin, my script can still run /usr/lib64/kde4/libexec/kcheckpass explicitly. This solution lets me substitute the command while still retaining the original's upgradeability!
LATER ...
Although a great idea, it doesn't work in this case. Apparently the system calling program, kscreenlocker_greet, looks for kcheckpass explicitly in the /usr/lib64/kde4/libexec directory. I had to move it back to get it to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.