Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do post-installation proecudres as part of 'make install' #16

Open
dseomn opened this issue Jun 7, 2015 · 3 comments
Open

do post-installation proecudres as part of 'make install' #16

dseomn opened this issue Jun 7, 2015 · 3 comments

Comments

@dseomn
Copy link
Member

dseomn commented Jun 7, 2015

The README currently has a section dedicated to post-installation procedures that boils down to this:

for d in \
    "${sysconfdir}"/rpstir \
    "${localstatedir}"/cache/rpstir \
    "${localstatedir}"/log/rpstir \
    "${localstatedir}"/lib/rpstir \
    ;
do
    mkdir -p "${d}"
    chmod -R o-rwx "${d}"
done
[ -f "${sysconfdir}"/rpstir/rpstir.conf ] \
    || cp "${docdir}"/examples/rpstir.conf "${sysconfdir}"/rpstir
# edit "${sysconfdir}"/rpstir/rpstir.conf as desired
rpstir-initialize -f

This ticket is about simplifying the installation procedure by doing something similar during make install (probably via the install utility).

  • etc/rpstir.conf.in should be modified to use sensible defaults for all parameters except for DatabasePassword. DatabasePassword should be set by make install.
  • configure.ac should be modified to:
    • take optional --with-user= and --with-group= parameters for the username and group name to use for the files that README currently says to chown
    • test for (but don't require) the presence of a pseudo-random number generating file (e.g., /dev/urandom)
  • make install should be modified to:
    • When installing "${docdir}"/examples/rpstir.conf, set DatabasePassword to an example password.
    • Create the directories mentioned above and in the README. If the username and/or group were specified to configure, use those. Otherwise, use the current user/group.
    • If "${sysconfdir}"/rpstir/rpstir.conf does not exist, and a PRNG device is available, install etc/rpstir.conf.in to "${sysconfdir}"/rpstir/rpstir.conf and set DatabasePassword to a random password. (Note that this only makes sense in conjunction with [make initialize/upgrade safer, easier, and more powerful #20] and possibly also [automatic upgrade or init #21])
  • README should be updated

Reported by: rhansen

Original Ticket: rpstir/tickets/16

@dseomn
Copy link
Member Author

dseomn commented Jun 11, 2015

  • Description has changed:

Diff:


--- old
+++ new
@@ -15,7 +15,14 @@
     # edit "${sysconfdir}"/rpstir/rpstir.conf as desired
     rpstir-initialize -f

-This ticket is about simplifying the installation procedure by doing the equivalent during `make install` (probably via the `install` utility), except for the last two lines:
+This ticket is about simplifying the installation procedure by doing something similar during `make install` (probably via the `install` utility).

-  * the user will need to edit `rpstir.conf`, but we can at least have sensible defaults that just work for 99% of users
-  * running `rpstir-initialize -f` is bad if the user is upgrading
+* `etc/rpstir.conf.in` should be modified to use sensible defaults for all parameters except for `DatabasePassword`. `DatabasePassword` should be set by `make install`.
+* `configure.ac` should be modified to:
+    * take optional `--with-user=` and `--with-group=` parameters
+    * test for (but don't require) the presence of a pseudo-random number generating file (e.g., `/dev/urandom`) 
+* `make install` should be modified to:
+    * When installing `"${docdir}"/examples/rpstir.conf`, set `DatabasePassword` to an example password.
+    * Create the directories mentioned above and in the `README`. If the username and/or group were specified to `configure`, use those. Otherwise, use the current user/group.
+    * If `"${sysconfdir}"/rpstir/rpstir.conf` does not exist, and a PRNG device is available, install `etc/rpstir.conf.in` to `"${sysconfdir}"/rpstir/rpstir.conf` and set `DatabasePassword` to a random password. (TODO: there should be another ticket about modifying everything that uses the database to attempt to initialize the database as needed.)
+* `README` should be updated

Original comment by: dseomn

@dseomn
Copy link
Member Author

dseomn commented Jun 11, 2015

  • Description has changed:

Diff:


--- old
+++ new
@@ -24,5 +24,5 @@
 * `make install` should be modified to:
     * When installing `"${docdir}"/examples/rpstir.conf`, set `DatabasePassword` to an example password.
     * Create the directories mentioned above and in the `README`. If the username and/or group were specified to `configure`, use those. Otherwise, use the current user/group.
-    * If `"${sysconfdir}"/rpstir/rpstir.conf` does not exist, and a PRNG device is available, install `etc/rpstir.conf.in` to `"${sysconfdir}"/rpstir/rpstir.conf` and set `DatabasePassword` to a random password. (TODO: there should be another ticket about modifying everything that uses the database to attempt to initialize the database as needed.)
+    * If `"${sysconfdir}"/rpstir/rpstir.conf` does not exist, and a PRNG device is available, install `etc/rpstir.conf.in` to `"${sysconfdir}"/rpstir/rpstir.conf` and set `DatabasePassword` to a random password. (Note that this only makes sense in conjunction with [#20] and possibly also [#21])
 * `README` should be updated

Original comment by: dseomn

@dseomn
Copy link
Member Author

dseomn commented Jun 11, 2015

  • Description has changed:

Diff:


--- old
+++ new
@@ -19,7 +19,7 @@

 * `etc/rpstir.conf.in` should be modified to use sensible defaults for all parameters except for `DatabasePassword`. `DatabasePassword` should be set by `make install`.
 * `configure.ac` should be modified to:
-    * take optional `--with-user=` and `--with-group=` parameters
+    * take optional `--with-user=` and `--with-group=` parameters for the username and group name to use for the files that `README` currently says to `chown`
     * test for (but don't require) the presence of a pseudo-random number generating file (e.g., `/dev/urandom`) 
 * `make install` should be modified to:
     * When installing `"${docdir}"/examples/rpstir.conf`, set `DatabasePassword` to an example password.

Original comment by: dseomn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants