Hi
I am new to rpm packaging and I want to do 2 things.
1. Modify the %PATH variable and add my "/usr/bin/Test folder" to it. This should be done from RPM while installing. It should exist until we uninstall.
2. Need to open a port so that our program can use it to send and receive data. This also should be done from RPM while installing.
Thanks
Madhukar Gandra
MGandra@diskeeper.com wrote:
Hi
I am new to rpm packaging and I want to do 2 things.
- Modify the %PATH variable and add my “/usr/bin/Test folder” to it.
This should be done from RPM while installing. It should exist until we uninstall.
add a script in /etc/profiles.d
- Need to open a port so that our program can use it to send and
receive data. This also should be done from RPM while installing.
Add a Readme.Fedora file to your package describing the reasoning and the needs. There are a miriad of ways to manage a local firewall and as sysadmin I would not be happy with a random package messing with my firewall.
Hi
Can you explain little bit more on what to write in script in etc/profiles.d? I also want to update environment variable LD_LIBRARY_PATH, how to do that.
This is my first time on linux in my whole life.
Thanks Madhukar Gandra
-----Original Message----- From: packaging-bounces@lists.fedoraproject.org [mailto:packaging-bounces@lists.fedoraproject.org] On Behalf Of Manuel Wolfshant Sent: Wednesday, March 24, 2010 3:27 AM To: Discussion of RPM packaging standards and practices for Fedora Subject: Re: [Fedora-packaging] port opening and PATH modification in rpm spec file
MGandra@diskeeper.com wrote:
Hi
I am new to rpm packaging and I want to do 2 things.
- Modify the %PATH variable and add my "/usr/bin/Test folder" to it.
This should be done from RPM while installing. It should exist until we uninstall.
add a script in /etc/profiles.d
- Need to open a port so that our program can use it to send and
receive data. This also should be done from RPM while installing.
Add a Readme.Fedora file to your package describing the reasoning and the needs. There are a miriad of ways to manage a local firewall and as sysadmin I would not be happy with a random package messing with my firewall.
-- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4969 (20100323) __________
The message was checked by ESET NOD32 Antivirus.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4975 (20100325) __________
The message was checked by ESET NOD32 Antivirus.
MGandra@diskeeper.com wrote:
Hi
Can you explain little bit more on what to write in script in etc/profiles.d? I also want to update environment variable LD_LIBRARY_PATH, how to do that.
This is my first time on linux in my whole life.
this is an example for sh/bash. in your kindness you should also adapt it for ksh / csh
#! /bin/bash
export PATH=$PATH:/my/new/folder/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/new/path/to/be/added/to/this/variable
Mind that adding a global LD_LIBRARY_PATH is not at all a good idea (it might interfere with other existing applications) so you'd better just provide a script, available in the normal path of the users, which would set this variable only when needed and for the period of time that is needed.
Manuel
Thanks Madhukar Gandra
-----Original Message----- From: packaging-bounces@lists.fedoraproject.org [mailto:packaging-bounces@lists.fedoraproject.org] On Behalf Of Manuel Wolfshant Sent: Wednesday, March 24, 2010 3:27 AM To: Discussion of RPM packaging standards and practices for Fedora Subject: Re: [Fedora-packaging] port opening and PATH modification in rpm spec file
MGandra@diskeeper.com wrote:
Hi
I am new to rpm packaging and I want to do 2 things.
- Modify the %PATH variable and add my "/usr/bin/Test folder" to it.
This should be done from RPM while installing. It should exist until we uninstall.
add a script in /etc/profiles.d
- Need to open a port so that our program can use it to send and
receive data. This also should be done from RPM while installing.
Add a Readme.Fedora file to your package describing the reasoning and the needs. There are a miriad of ways to manage a local firewall and as sysadmin I would not be happy with a random package messing with my firewall.
-- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4969 (20100323) __________
The message was checked by ESET NOD32 Antivirus.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4975 (20100325) __________
The message was checked by ESET NOD32 Antivirus.
-- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On 3/26/2010 9:15, Manuel Wolfshant wrote:
this is an example for sh/bash. in your kindness you should also adapt it for ksh / csh
#! /bin/bash
export PATH=$PATH:/my/new/folder/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/new/path/to/be/added/to/this/variable
Mind that adding a global LD_LIBRARY_PATH is not at all a good idea
(it might interfere with other existing applications) so you'd better just provide a script, available in the normal path of the users, which would set this variable only when needed and for the period of time that is needed.
When packaging you should add a file to /etc/ld.so.conf.d [1, 2] or possibly use an RPATH [3] rather than editing environment variables.
[1] https://fedoraproject.org/wiki/Packaging/Guidelines#AlternativeRpath [2] https://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries [3] https://fedoraproject.org/wiki/Packaging/Guidelines#Rpath_for_Internal_Libra...
2010/3/23 MGandra@diskeeper.com:
2. Need to open a port so that our program can use it to send and receive data. This also should be done from RPM while installing.
Keep in mind that in the Fedora buildsystem, there will be no network access allowed during the build process - this defeats the purpose of reproducible builds if you go grab bits during the build process. I also agree with Manuel, you do not want to mess with iptables during the install - the chances for breaking something are extremely high.
On 03/24/2010 06:47 AM, Jon Stanley wrote:
2010/3/23MGandra@diskeeper.com:
Need to open a port so that our program can use it to send and
receive data. This also should be done from RPM while installing.
Keep in mind that in the Fedora buildsystem, there will be no network access allowed during the build process - this defeats the purpose of reproducible builds if you go grab bits during the build process. I also agree with Manuel, you do not want to mess with iptables during the install - the chances for breaking something are extremely high.
The general philosophy is that installing an RPM is about laying the bits down on disk. Small modifications to system configuration are permitted such as adding a necessary user id. However installing an RPM should not in most cases start services or turn on features. Think about the case where someone installs a whole bunch of RPM's just to have them available (yes people do this) and it would be surprising to discover their system was now highly modified running all sorts of things, their firewall and other security features silently modified from their expectation, that's not a good thing.
Instead it's better for a package to install a setup script and a README which describes what someone needs to do to activate the features in the package. This way modifying the system configuration is an active explicit step performed by the person administering the system.
John Dennis wrote:
On 03/24/2010 06:47 AM, Jon Stanley wrote:
2010/3/23MGandra@diskeeper.com:
Need to open a port so that our program can use it to send and
receive data. This also should be done from RPM while installing.
Keep in mind that in the Fedora buildsystem, there will be no network access allowed during the build process - this defeats the purpose of reproducible builds if you go grab bits during the build process. I also agree with Manuel, you do not want to mess with iptables during the install - the chances for breaking something are extremely high.
The general philosophy is that installing an RPM is about laying the bits down on disk. Small modifications to system configuration are permitted such as adding a necessary user id. However installing an RPM should not in most cases start services or turn on features. Think about the case where someone installs a whole bunch of RPM's just to have them available (yes people do this) and it would be surprising to discover their system was now highly modified running all sorts of things, their firewall and other security features silently modified from their expectation, that's not a good thing.
Instead it's better for a package to install a setup script and a README which describes what someone needs to do to activate the features in the package. This way modifying the system configuration is an active explicit step performed by the person administering the system.
Agreed, you can't possibly know if your iptables change will work with my iptables setup, so you shouldn't try. Same rationale as why we don't touch databases. Where is the database? What credentials do we use? What database is even being used?
-J
tis 2010-03-23 klockan 19:39 -0700 skrev MGandra@diskeeper.com:
Modify the %PATH variable and add my “/usr/bin/Test folder” to
it. This should be done from RPM while installing. It should exist until we uninstall.
Why not put the executables directly in /usr/bin instead?
/Alexander
packaging@lists.fedoraproject.org