[Slackbuilds-users] extra files in $PKG/install

Erich Ritz erich.public at protonmail.com
Mon Apr 11 20:26:16 UTC 2022


------- Original Message -------
On Monday, April 11th, 2022 at 3:23 PM, Giancarlo Dessì <slack at giand.it> wrote:


>
>
>
> Il 11/04/22 19:55, B. Watson ha scritto:
>
> > I've been going through a lot of packages, looking for issues...
> >
> > How many of you have files named like these?
> >
> > $ ls -d /installpkg-*
> > /installpkg-424f0b9b8dfa39116f400a1e28c81427/
> > /installpkg-48c5f1121baf117bc8cd5cb81d4c315a/
> > /installpkg-8ce33bb6875a083c1b82af332c9a1175/
> > /installpkg-a6c16f0748bbc7f892dd56447a375fa6/
> > /installpkg-ad84c0c457f72e604075589930b129de/
> > /installpkg-c863767111eaaddfb8623271f76a6c8b/
> > /installpkg-cd8a50cc9a20baff05436e5e21b3b89b/
> > /installpkg-d9f3419d09ef5f9fe23a0a1a2c198b8d/
> > /installpkg-e4b7c85746cc950dff947233cb978aaa/
> > /installpkg-f850ef68bdfdb986ee187fd495acf84d/
> >
> > It turns out that SlackBuilds which put extra files in $PKG/install
> > cause these 'turds' to be installed. The installpkg command creates
> > these, with the contents of 'install/' in the package (meaning they
> > contain slack-desc and doinst.sh, if it exists), but it doesn't
> > remove them if they contain extra files, because it deletes/moves
> > the slack-desck and doinst.sh, then uses rmdir to delete the
> > /installpkg-<hash> directory.
> >
> > As an added bonus, any code in doinst.sh that expects to use a file
> > in /install (e.g. freeimpi tries to use /install/conffiles), will fail
> > because by the time doinst.sh runs, the directory has been renamed.
> >
> > I can and will fix the ones I know about, but everyone, you should
> > check your builds to see if they do this.
>
>
> I think this could be a singular issue in your system. I have built
> hudrends of different slackbuilds but no files like these exist (I
> searched in / and in /tmp/SBo). Sometimes I check and empty the
> directory but I never found files like these.
>
>

It is (semi-) documented behavior of installpkg.  From /sbin/installpkg:

# Tue Apr 17 17:26:44 UTC 2018
# Quit with the funny business in /install. Note however that /install still
# isn't a safe directory to use in a package for anything other than package
# metadata. Other files placed there are going to be left on the system in
# /installpkg-$(mcookie). That could be worked around, but we'll wait until
# someone reports there is a need. The main reason to do this is that /install
# was a collision point if more than one copy of installpkg was running at
# once. With this change, the pkgtools are (more or less) thread-safe.

Erich

> --
> *********************************************************
> Giancarlo Dessì
> https://www.giand.it
> https://twitter.com/gian_d_gian
>
> Slackware Linux... because it works!
> *********************************************************
>
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/


More information about the SlackBuilds-users mailing list