Can we make a non-relocatable RPM package relocatable during repackaging?












1















I am trying to install a package on a RHEL4 box, the package is non-relocatable.



I need it at a custom location because there are some other applications which need to be linked to it.



So I wonder if it is possible that to install the package to the default location, then remove it with the -e -repackage option and during this step make it relocatable.



If this can be done can you please specify what options should I be using?



If this is not possible can you please specify some other way?










share|improve this question



























    1















    I am trying to install a package on a RHEL4 box, the package is non-relocatable.



    I need it at a custom location because there are some other applications which need to be linked to it.



    So I wonder if it is possible that to install the package to the default location, then remove it with the -e -repackage option and during this step make it relocatable.



    If this can be done can you please specify what options should I be using?



    If this is not possible can you please specify some other way?










    share|improve this question

























      1












      1








      1


      1






      I am trying to install a package on a RHEL4 box, the package is non-relocatable.



      I need it at a custom location because there are some other applications which need to be linked to it.



      So I wonder if it is possible that to install the package to the default location, then remove it with the -e -repackage option and during this step make it relocatable.



      If this can be done can you please specify what options should I be using?



      If this is not possible can you please specify some other way?










      share|improve this question














      I am trying to install a package on a RHEL4 box, the package is non-relocatable.



      I need it at a custom location because there are some other applications which need to be linked to it.



      So I wonder if it is possible that to install the package to the default location, then remove it with the -e -repackage option and during this step make it relocatable.



      If this can be done can you please specify what options should I be using?



      If this is not possible can you please specify some other way?







      linux rpm






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 24 '13 at 6:19









      user2028989user2028989

      155




      155






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.






          share|improve this answer
























          • Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

            – Fredrik Wendt
            Aug 14 '15 at 8:57






          • 2





            There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

            – Al Onestone
            Mar 22 '16 at 16:16











          • Relocatable packages are "strongly discouraged" but not depreciated.

            – fpmurphy
            Oct 25 '18 at 3:50











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f556533%2fcan-we-make-a-non-relocatable-rpm-package-relocatable-during-repackaging%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.






          share|improve this answer
























          • Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

            – Fredrik Wendt
            Aug 14 '15 at 8:57






          • 2





            There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

            – Al Onestone
            Mar 22 '16 at 16:16











          • Relocatable packages are "strongly discouraged" but not depreciated.

            – fpmurphy
            Oct 25 '18 at 3:50
















          1














          Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.






          share|improve this answer
























          • Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

            – Fredrik Wendt
            Aug 14 '15 at 8:57






          • 2





            There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

            – Al Onestone
            Mar 22 '16 at 16:16











          • Relocatable packages are "strongly discouraged" but not depreciated.

            – fpmurphy
            Oct 25 '18 at 3:50














          1












          1








          1







          Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.






          share|improve this answer













          Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 24 '13 at 19:43









          vonbrandvonbrand

          1,99131417




          1,99131417













          • Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

            – Fredrik Wendt
            Aug 14 '15 at 8:57






          • 2





            There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

            – Al Onestone
            Mar 22 '16 at 16:16











          • Relocatable packages are "strongly discouraged" but not depreciated.

            – fpmurphy
            Oct 25 '18 at 3:50



















          • Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

            – Fredrik Wendt
            Aug 14 '15 at 8:57






          • 2





            There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

            – Al Onestone
            Mar 22 '16 at 16:16











          • Relocatable packages are "strongly discouraged" but not depreciated.

            – fpmurphy
            Oct 25 '18 at 3:50

















          Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

          – Fredrik Wendt
          Aug 14 '15 at 8:57





          Why do you say that relocatable packages are deprecated? Do you have a URL or source for that?

          – Fredrik Wendt
          Aug 14 '15 at 8:57




          2




          2





          There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

          – Al Onestone
          Mar 22 '16 at 16:16





          There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false.

          – Al Onestone
          Mar 22 '16 at 16:16













          Relocatable packages are "strongly discouraged" but not depreciated.

          – fpmurphy
          Oct 25 '18 at 3:50





          Relocatable packages are "strongly discouraged" but not depreciated.

          – fpmurphy
          Oct 25 '18 at 3:50


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f556533%2fcan-we-make-a-non-relocatable-rpm-package-relocatable-during-repackaging%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix